SignAndSendTransaction

Once an application is connected to Broearn Wallet, it can prompt the user for permission to send transactions on their behalf.

In order to send a transaction, an application must:

1. Create an unsigned transaction. 2.Have the transaction be signed and submitted to the network by the user's Broearn Wallet. 3.Optionally await network confirmation using a PUT JSON RPC connection.

Query String Parameters

window.bw.put.signAndSendTransaction({
  "transaction": "...", // serialized transaction, base58 encoded
  "session": "...", // token received from connect-method
})
  • transaction (required): The transaction that Broearn wallet will sign, serialized and encoded in base58.

  • session (required): The session token received from the Connect method.

Returns

​✅ Approve

  • data: An encrypted JSON string. Refer to Encryption to learn how apps can decrypt data using a shared secret. Encrypted bytes are encoded in base58.

    {
      "signature": "..." // transaction-signature
    }
    • signature: The first signature in the transaction, which can be used as its transaction id

​❌ Reject

An errorCode and errorMessage as query parameters. Please refer to Errors for a full list of possible error codes.

{
  "errorCode": "...",
  "errorMessage": "..."
}

Last updated