# request methods

You can use `request` to connect to users' wallets, prompt users to share their Bitcoin & Stacks wallet addresses, and sign messages and transactions with their Bitcoin & Stacks addresses.&#x20;

{% hint style="info" %}
The `request` method is available as `Wallet.request` from `sats-connect` if you'd like users to [connect to any wallet](/sats-connect/connecting-to-the-wallet/connect-to-other-wallets.md), or as a named export from `@sats-connect/core` if you only need Xverse Wallet support.
{% endhint %}

## Available methods

`request` gives you access to a set of [JSON RPC 2.0](https://www.jsonrpc.org/specification) methods which follow the [WBIP001](https://wbips.netlify.app/wbips/WBIP001) standard. All available Bitcoin & Stacks methods are detailed in the present documentation:

<table data-header-hidden><thead><tr><th width="268"></th><th></th></tr></thead><tbody><tr><td>Connect, fetch accounts &#x26; manage permissions</td><td><ul><li><a href="/pages/AhYSLBXpfyPKPKgldJqx">wallet_connect</a></li><li><a href="/pages/FOoTRMQLyi8eObgTUBf3">wallet_disconnect</a></li><li><a href="/pages/2dsMTr3ckRbH0zzw4vCK">getAccount</a></li><li><a href="/pages/msBkjAI2eX51d1zSqE7H">wallet_requestPermissions</a></li><li><a href="/pages/msBkjAI2eX51d1zSqE7H">wallet_getCurrentPermissions</a></li><li><a href="/pages/msBkjAI2eX51d1zSqE7H">wallet_renouncePermissions</a></li><li><a href="/pages/3MWFXlRRRsGFC9zYM6MU">wallet_getNetwork</a></li><li><a href="/pages/GPzgWtwme9s8xvAYdC7P">wallet_changeNetwork</a></li><li><a href="/pages/BrWNmDPjvIbY0qMwoxX5">wallet_addNetwork</a></li><li>[Legacy <span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span>]<a href="/pages/RcWJxj35XtRqIFK54Ghm"> getAccounts</a></li></ul></td></tr><tr><td><i class="fa-bitcoin">:bitcoin:</i> Bitcoin Methods </td><td><p></p><ul><li><a href="/pages/vDpqgbWJLb9XwhlN64ik">getAddresses</a></li><li><a href="/pages/13famuET6h5M2DSmADzM">getBalance</a></li><li><a href="/pages/Ob2ot6lMtJ3DdXkzcaK0">signMessage</a></li><li><a href="/pages/FwhJPNPZAXb6kcTzxgKr">signPsbt</a></li><li><a href="/pages/SixLSqh1NnjjsnB5jn6H">sendTransfer</a></li><li><a href="/pages/tqNdnvLTr4SRDuhPwpXn">ord_getInscriptions</a> &#x26; <a href="/pages/QMFNG4CYihjuh0BrUpQS">ord_sendInscriptions</a></li><li><a href="/pages/NhvqQG0ndazeVW0ub4DN">runes_getBalance</a> &#x26; <a href="/pages/BGwOMnkSHpmLDlxhOAEG">runes_transfer</a></li><li><a href="/pages/qkrRMsxXPbFbB0DuMfrr">Runes Minting methods</a></li><li><a href="/pages/PrqMZrgASi1VQh0xs2jY">Runes Etching methods</a></li></ul></td></tr><tr><td>🔴 Stacks Methods </td><td><p></p><ul><li><a href="/pages/99VY1kJW6TQm2fyuXv1P">stx_getAccounts</a></li><li><a href="/pages/b38JRUSL8npzTh0xPSFJ">stx_signMessage</a></li><li><a href="/pages/ODiGmqeeXBd5JYpaUG6I">stx_signStructuredMessage</a></li><li><a href="/pages/Ob2ot6lMtJ3DdXkzcaK0">stx_signMessage</a></li><li><a href="/pages/MS32gxJe2ravc2XS4SBZ">stx_transferStx</a></li><li><a href="/pages/zyoXR3VXjc9xYvyK1UrP">stx_signTransaction</a></li><li><a href="/pages/oWJpYFNTtdwk6g3JrojG">stx_callContract</a></li><li><a href="/pages/3pxegto2GQGjQ8ynJCKI">stx_deployContract</a></li></ul></td></tr><tr><td><i class="fa-sparkle">:sparkle:</i> Spark Methods</td><td><ul><li><a href="/pages/42Zbx7mnucQF8DpAfMjJ">spark_getAddress</a></li><li><a href="/pages/rahttdBi8MhlC9aipLAY">spark_getBalance</a></li><li><a href="/pages/VT5sNvXiat4YcdpR8GKx">spark_transfer</a></li><li><a href="/pages/2tAKyzJjAUaggSHQY8IW">spark_transferToken</a></li><li><a href="/pages/Zx7TfMYiIpEQsyoZ72iT">spark_signMessage</a></li></ul></td></tr></tbody></table>

## Request parameters

<table><thead><tr><th width="268">Request parameters</th><th>Description</th></tr></thead><tbody><tr><td><code>method</code></td><td>a string representing the RPC method to call</td></tr><tr><td><code>params</code></td><td>the params required by the RPC method</td></tr><tr><td><code>providerId (optional)</code></td><td>wallet provider id to use for the request</td></tr></tbody></table>

## Response format & error handling

Depending on the status property the response will contain either a result or error object.

<table><thead><tr><th width="223">Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> </td><td>success | error </td></tr><tr><td><code>result (optional)</code></td><td>an object containing the result of the RPC request</td></tr><tr><td><code>error (optional)</code> </td><td>an object containing the error of the RPC request</td></tr></tbody></table>

Error handling for these methods follows the JSON-RPC 2.0 protocol format:

<table><thead><tr><th width="162">Property</th><th>Description</th></tr></thead><tbody><tr><td><code>code</code> </td><td><code>RpcErrorCode</code></td></tr><tr><td><code>message</code></td><td> error message </td></tr><tr><td><code>data</code> </td><td>any</td></tr></tbody></table>

Error codes

```tsx
enum RpcErrorCode {
  PARSE_ERROR = -32700, // Parse error	Invalid JSON
  INVALID_REQUEST = -32600, // The JSON sent is not a valid Request object.
  METHOD_NOT_FOUND = -32601, // The method does not exist/is not available.
  INVALID_PARAMS = -32602, // Invalid method parameter(s)
  INTERNAL_ERROR = -32603, // Internal JSON-RPC error
  USER_REJECTION = -32000, // user rejected/canceled the request
  METHOD_NOT_SUPPORTED = -32001, // method is not supported for the address provided
}
```


---

# Agent Instructions: 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:

```
GET https://docs.xverse.app/sats-connect/wallet-methods/request-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
