Skip to main content
These are the methods that wallets should implement to handle Stellar transactions and messages via WalletConnect.
The Stellar RPC standard is a proposal still under review and specifications may change. Implementation details and method signatures are subject to updates.

Network / Chain Information

The CAIP-2 reference pubnet matches the Stellar CAIP-2 namespace draft. The network passphrase ("Public Global Stellar Network ; September 2015" for mainnet, "Test SDF Network ; September 2015" for testnet) is not the CAIP-2 reference — it is a separate signing-domain constant that wallets MUST bind into every signature (see Signing semantics).

Account format

Account IDs returned to the dApp are CAIP-10 strings, e.g.:
Wallets MUST return the G… StrKey form (Ed25519 public key + CRC16 checksum, base32-encoded). Wallets MUST NOT return:
  • Muxed account (M…) IDs — these require a separate spec (CAP-27) and are not universally supported.
  • Pre-auth (T…) or signer-hash (X…) StrKey forms — these are not accounts.
  • Raw 32-byte public keys without StrKey encoding.

XDR encoding convention

All transaction payloads cross the wire as base64-encoded XDR strings, matching SDF’s reference SDKs and Horizon’s /transactions?tx=… parameter. Specifically:
  • stellar_signXDR and stellar_signAndSubmitXDR accept and return a base64-encoded TransactionEnvelope XDR.
  • The envelope’s discriminant determines tx version: ENVELOPE_TYPE_TX_V0, ENVELOPE_TYPE_TX, or ENVELOPE_TYPE_TX_FEE_BUMP.
  • Wallets MUST accept all three; wallets MAY emit signatures only on V1 and fee-bump envelopes (V0 is deprecated).

Session Properties

A standard WalletConnect session proposal for a Stellar-enabled dApp:

RPC Methods

stellar_signXDR

Asks the wallet to attach a signature to a Stellar TransactionEnvelope and return the resulting envelope without broadcasting it. The dApp (or a relayer it trusts — e.g. pay-core’s fee-payer) is responsible for submission. This is the primary method for fee-abstracted flows: the dApp constructs an inner transaction whose source_account is the buyer; the wallet signs as the buyer; a separate fee-source wraps the result in a FeeBumpTransactionEnvelope and submits.

Parameters

Object: This method signs only. To sign and broadcast in a single round-trip, use stellar_signAndSubmitXDR.

Returns

Object:

Example

stellar_signAndSubmitXDR

Asks the wallet to sign and submit a transaction in one step. The wallet broadcasts via its configured RPC (Horizon or Stellar RPC) and returns the resulting transaction hash. Use this method when the dApp does not operate a relayer (i.e. the buyer is paying their own XLM fee directly).

Parameters

Object:

Returns

Object:

Example

stellar_signMessage

Asks the wallet to sign an arbitrary message under a Stellar account’s Ed25519 key, outside the context of a Stellar transaction. This enables SEP-10 web auth-style sign-in flows and dApp session attestation. To prevent a malicious dApp from getting a wallet to sign a payload that is also a valid transaction body, wallets MUST prepend a domain-separating prefix before signing:
The literal byte string "StellarMessage" (14 bytes) followed by a 0x00 separator MUST be hashed alongside the message bytes. This matches the SEP-53 (in-draft) convention and ensures cross-context replay is impossible — a SEP-10 challenge transaction would never collide with a stellar_signMessage payload.

Parameters

Object:

Returns

Object:

Example

Anti-pattern: Do NOT sign raw bytes without the domain prefix. Wallets that do so MUST be considered non-compliant — they expose users to transaction-impersonation attacks.

stellar_signAuthEntry (Soroban)

Signs a Soroban SorobanAuthorizationEntry, enabling Soroban contract authorizations to be co-signed by an address that is not the transaction’s source account. This is the Stellar analogue to Ethereum’s EIP-712 typed-data signing for permits / meta-transactions: a user authorizes a specific contract invocation tree, a separate party submits the transaction that consumes the authorization. The signing payload is the HashIDPreimage::SOROBAN_AUTHORIZATION preimage, computed as:
All four fields are pulled from the SorobanCredentials::SOROBAN_CREDENTIALS_ADDRESS block inside the auth entry. network_id is bound by the wallet from the session’s CAIP-2 chain (NOT trusted from the request).

Parameters

Object: The wallet MUST also reject (4304AUTH_EXPIRED) if signature_expiration_ledger is ≤ the current ledger sequence as known to the wallet, with a small safety margin to account for propagation.

Returns

Object: The signature SCVal follows Stellar’s account-contract signer convention: an SCMap with keys "public_key" (32-byte Ed25519 pubkey as SCBytes) and "signature" (64-byte Ed25519 signature as SCBytes). Wallets MUST NOT emit a raw 64-byte signature without the map wrapper — Soroban host code rejects it.

Example

Events

Signing semantics

Network passphrase binding

Every Stellar transaction signature is computed over:
where network_id = sha256("Public Global Stellar Network ; September 2015") for pubnet. This is inside the XDR envelope and is the protocol-level replay protection across networks. Wallets MUST:
  1. Decode the envelope’s signing payload, not the wire bytes, before signing.
  2. Compute network_id from the network the session belongs to (stellar:pubnet → pubnet passphrase). Wallets MUST NOT trust a network_id embedded in the request — only the CAIP-2 chain identifier.
  3. Refuse to sign if the decoded envelope’s internal network reference (when present, e.g. on fee-bump inner txs) does not match the session chain.

Fee-bump envelopes

When the dApp passes a FeeBumpTransactionEnvelope to stellar_signXDR:
  • The wallet signs only the inner tx, not the outer fee-bump envelope. The outer envelope is signed by the fee_source account (typically a different party — the relayer).
  • Wallets MUST validate that the inner tx’s source_account is in fact the account parameter.
  • Wallets MAY warn the user that fees are being paid by a different account (fee_source), and SHOULD display both the inner source and outer fee source in the signing UI.

Computing the tx hash and explorer discoverability

The transaction hash is deterministic from the signed envelope — signatures are computed over the hash, they are not part of it. As soon as a dApp receives signedXDR from stellar_signXDR, it can derive the same hash the network will use.
Adding, removing, or reordering signatures does NOT change the hash. Reference computation:
Inner hash vs. fee-bump hash. When stellar_signXDR is used inside a fee-abstraction flow (the wallet signs an inner tx, a relayer wraps it in a FeeBumpTransaction before submitting), the hash the dApp computes from the inner tx (H_inner) is not the hash that lands on-chain (H_fb). Horizon resolves either hash to the same transaction record — a GET /transactions/{hash} request works whether you pass H_inner or H_fb, and both are exposed on the returned fee-bump record. For stable UX, prefer H_fb for explorer links once submission is confirmed; H_inner works as an immediate optimistic identifier between sign-time and submission. Note that Horizon will 404 on an H_inner lookup until the wrapping fee-bump transaction has been submitted and included in a ledger.

Additional Resources