Skip to main content
These are the methods that wallets should implement to handle Sui transactions and messages via WalletConnect.

sui_getAccounts

This method returns an Array of public keys and addresses available to sign from the wallet.

Parameters

none

Returns

Array - Array of accounts:
  • Object :
    • pubkey : String - public key for keypair
    • address : String - the Sui address

Example

Session Properties

In a connection request, it is recommended to serialize the response to getAccounts in session.sessionProperties.sui_getAccounts. 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. :::warning This method is required for all wallets to implement in order to connect to applications using Sui Dappkit. Wallets that do not implement sui_getAccounts will not be able to establish connections with dapps using the Sui Dappkit SDK. :::

sui_signTransaction

Sign a Sui transaction without executing it.

Parameters

  1. transaction (object) - The transaction to sign:
    • transaction (string) - The base64 encoded, BCS encoded, transaction data
    • address (string) - The sender’s Sui address

Returns

object - The signed transaction:
  • signature (string) - The base64 encoded signature
  • transactionBytes (string) - The base64 encoded signed transaction bytes

Example

sui_signAndExecuteTransaction

Sign and execute a Sui transaction.

Parameters

  1. transaction (object) - The transaction to sign and execute:
    • transaction (string) - The base64 encoded, BCS encoded, transaction data
    • address (string) - The sender’s Sui address

Returns

object - The transaction result:
  • digest (string) - The transaction digest that can be used to look up the transaction in the explorer

Example

sui_signPersonalMessage

Sign a personal message.

Parameters

  1. message (object) - The message to sign:
    • message (string) - The message to sign (plain text)
    • address (string) - The account address to sign with

Returns

object - The signed message:
  • signature (string) - The base64 encoded signature

Example

Additional Resources

For more information about Sui RPC methods and implementation details, please refer to the official Sui documentation.