Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.reown.com/llms.txt

Use this file to discover all available pages before exploring further.

These are the methods that wallets should implement to handle Stacks transfers and messages via WalletConnect.

Core Methods (common)

stx_getAddresses

Retrieve active account addresses; primarily Stacks-focused.

Request

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "stx_getAddresses",
  "params": {}
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "addresses": [
      {
        "symbol": "STX",
        "address": "SP…"
      }
    ]
  }
}
Notes:
  • 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

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "stx_transferStx",
  "params": {
    "sender": "SP3F7GQ48JY59521DZEE6KABHBF4Q33PEYJ823ZXQ",
    "recipient": "SP3F7GQ48JY59521DZEE6KABHBF4Q33PEYJ823ZXQ",
    "amount": "100000000000",
    "memo": "",
    "network": "mainnet"
  }
}

Parameters

ParameterRequired?Data TypeDescription
senderRequiredstringThe stacks address of sender (required for multi-account scenarios)
recipientRequiredstringStacks address
amountRequiredstringmicro-STX (uSTX)
memoOptionalstringMemo string to be included with the transfer transaction
networkOptionalstring”mainnet” | “testnet” | “devnet”

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "txid": "1234567890abcdef1234567890abcdef12345678",
    "transaction": "0x…"
  }
}

stx_signTransaction

Sign a Stacks transaction. Optional broadcast.

Request

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "stx_signTransaction",
  "params": {
    "transaction": "0x…",
    "broadcast": false,
    "network": "mainnet"
  }
}

Parameters

ParameterRequired?Data TypeDescription
transactionRequiredstringhex transaction
broadcastOptionalbooleandefault false
networkOptionalstring”mainnet” | “testnet” | “devnet”

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "signature": "0x…",
    "transaction": "0x…",
    "txid": "1234567890abcdef1234567890abcdef12345678"
  }
}
Note: txid is present if broadcast=true

stx_signMessage

Sign arbitrary message; supports structured (SIP-018).

Request

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "stx_signMessage",
  "params": {
    "address": "SP3F7GQ48JY59521DZEE6KABHBF4Q33PEYJ823ZXQ",
    "message": "message",
    "messageType": "utf8",
    "network": "mainnet",
    "domain": "example.com"
  }
}

Parameters

ParameterRequired?Data TypeDescription
addressRequiredstringThe stacks address of sender
messageRequiredstringUtf-8 string representing the message to be signed by the wallet
messageTypeOptionalstringType of message for signing: utf8 for basic string or structured for structured data
networkOptionalstringNetwork for signing: mainnet, testnet, signet, devnet (note: redundant since chainId is provided)
domainOptionalstringDomain tuple per SIP-018 (for structured messages only)

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "signature": "0x…"
  }
}

stx_signStructuredMessage

Domain-bound structured signing (SIP-018).

Request

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "stx_signStructuredMessage",
  "params": {
    "message": "message",
    "domain": "domain"
  }
}

Parameters

ParameterRequired?Data TypeDescription
messageRequiredstring | objectmessage to be signed
domainRequiredstring | objectdomain for structured signing

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "signature": "0x…",
    "publicKey": "0x04…"
  }
}
Note: publicKey is optional

stx_callContract

Wrapper method for stx_signTransaction that calls a Stacks contract.

Request

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "stx_callContract",
  "params": {
    "contract": "SP3F7GQ48JY59521DZEE6KABHBF4Q33PEYJ823ZXQ.my-contract",
    "functionName": "get-balance",
    "functionArgs": []
  }
}

Parameters

ParameterRequired?Data TypeDescription
contractRequiredstringFully qualified contract identifier, including Stacks address and contract name
functionNameRequiredstringName of the function to call
functionArgsRequiredstring[]Arguments to pass to the contract function, encoded as strings

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "txid": "stack_tx_id",
    "transaction": "raw_tx_hex"
  }
}
  • txid - is used to identify the transaction on the explorer
  • transaction - hex-encoded raw transaction

Session Properties

In a connection request, it is recommended to serialize the response to stx_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.