request methods
Last updated
Last updated
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.
The request
method is available as Wallet.request
from sats-connect
if you'd like users to connect to any wallet, or as a named export from @sats-connect/core
if you only need Xverse Wallet support.
request
gives you access to a set of JSON RPC 2.0 methods which follow the WBIP001 standard. All available Bitcoin & Stacks methods are detailed in the present documentation:
Request parameters | Description |
---|---|
Depending on the status property the response will contain either a result or error object.
Property | Description |
---|---|
Error handling for these methods follows the JSON-RPC 2.0 protocol format:
Error codes
Property | Description |
---|---|
code
RpcErrorCode
message
error message
data
any
Connect, fetch accounts & manage permissions
Bitcoin Methods
Stacks Methods
method
a string representing the RPC method to call
params
the params required by the RPC method
providerId (optional)
wallet provider id to use for the request
status
success | error
result (optional)
an object containing the result of the RPC request
error (optional)
an object containing the error of the RPC request
[Legacy ] getAccounts