> For the complete documentation index, see [llms.txt](https://wallet-docs.broearn.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wallet-docs.broearn.com/provider-methods/signandsendtransaction.md).

# 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 <a href="#query-string-parameters" id="query-string-parameters"></a>

```json
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](/provider-methods/connect.md) method.&#x20;

#### Returns <a href="#returns" id="returns"></a>

​✅ **Approve**

* `data`: An encrypted JSON string. Refer to [Encryption](broken://pages/WZ5QJqS5c5F0UYHvz1Sz) to learn how apps can decrypt `data` using a shared secret. Encrypted bytes are encoded in base58.

  ```json
  {
    "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](/errors.md) for a full list of possible error codes.

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://wallet-docs.broearn.com/provider-methods/signandsendtransaction.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
