Core Methods (common)
stx_getAddresses
Retrieve active account addresses; primarily Stacks-focused.Request
Response
- Use this first to select the wallet’s active address.
- Filter on
symbol: "STX"
or by address prefix (SP for mainnet, ST for testnet).
Stacks Methods
stx_transferStx
Transfer STX.Request
Parameters
Parameter | Required? | Data Type | Description |
---|---|---|---|
sender | Required | string | The stacks address of sender (required for multi-account scenarios) |
recipient | Required | string | Stacks address |
amount | Required | string | micro-STX (uSTX) |
memo | Optional | string | Memo string to be included with the transfer transaction |
network | Optional | string | ”mainnet” | “testnet” | “devnet” |
Response
stx_signTransaction
Sign a Stacks transaction. Optional broadcast.Request
Parameters
Parameter | Required? | Data Type | Description |
---|---|---|---|
transaction | Required | string | hex transaction |
broadcast | Optional | boolean | default false |
network | Optional | string | ”mainnet” | “testnet” | “devnet” |
Response
txid
is present if broadcast=true
stx_signMessage
Sign arbitrary message; supports structured (SIP-018).Request
Parameters
Parameter | Required? | Data Type | Description |
---|---|---|---|
address | Required | string | The stacks address of sender |
message | Required | string | Utf-8 string representing the message to be signed by the wallet |
messageType | Optional | string | Type of message for signing: utf8 for basic string or structured for structured data |
network | Optional | string | Network for signing: mainnet , testnet , signet , devnet (note: redundant since chainId is provided) |
domain | Optional | string | Domain tuple per SIP-018 (for structured messages only) |
Response
stx_signStructuredMessage
Domain-bound structured signing (SIP-018).Request
Parameters
Parameter | Required? | Data Type | Description |
---|---|---|---|
message | Required | string | object | message to be signed |
domain | Required | string | object | domain for structured signing |
Response
publicKey
is optional
stx_callContract
Wrapper method forstx_signTransaction
that calls a Stacks contract.
Request
Parameters
Parameter | Required? | Data Type | Description |
---|---|---|---|
contract | Required | string | Fully qualified contract identifier, including Stacks address and contract name |
functionName | Required | string | Name of the function to call |
functionArgs | Required | string[] | Arguments to pass to the contract function, encoded as strings |
Response
txid
- is used to identify the transaction on the explorertransaction
- hex-encoded raw transaction
Session Properties
In a connection request, it is recommended to serialize the response tostx_getAddresses
in session.sessionProperties.stacks_getAddresses
. This allows dapps to consume an active session without requiring a context switch to re-request all addresses and associated public keys from the wallet.