Mobile (WalletConnect)

XRP Ledger

The xrpl WalletConnect namespace Joey supports.

Joey handles sign requests on the xrpl WalletConnect namespace. A typical proposal requests:

const namespaces = {
  xrpl: {
    chains: ['xrpl:0'], // xrpl:1 for Testnet, xrpl:2 for Devnet
    methods: ['xrpl_signTransaction', 'xrpl_signTransactionFor', 'xrpl_signTransactionBulk'],
    events: [],
  },
};

When the user approves, Joey returns a session for one account on one chain: the account and network active in Joey at that moment.

// Approved session namespace returned by Joey
{
  xrpl: {
    chains: ['xrpl:0'],
    accounts: ['xrpl:0:rExampleAddress…'],
    methods: ['xrpl_signTransaction', 'xrpl_signTransactionBulk', 'xrpl_signTransactionFor'],
    events: ['connect', 'disconnect', 'chainChanged', 'accountsChanged'],
  },
}

Note

Joey lists these events in the session but doesn't currently send them. Instead, it ends the session when the user switches account or network. See Events.

With wc-client, the namespace is available as core.constants.chains.xrplNamespace, and the chain definitions as core.constants.chains.xrpl.mainnet, .testnet and .devnet. See the chain constants in wc-client.