Please note: The SUI RPC standard is still under review and specifications may change. Implementation details and method signatures are subject to updates.
sui_getAccounts
This method returns an Array of public keys and addresses available to sign from the wallet.Parameters
noneReturns
Array
- Array of accounts:
Object
:pubkey
:String
- public key for keypairaddress
:String
- the Sui address
Example
sui_signTransaction
Sign a Sui transaction without executing it.Parameters
transaction
(object) - The transaction to sign:transaction
(string) - The base64 encoded, BCS encoded, transaction dataaddress
(string) - The sender’s Sui address
Returns
object
- The signed transaction:
signature
(string) - The base64 encoded signaturetransactionBytes
(string) - The base64 encoded signed transaction bytes
Example
sui_signAndExecuteTransaction
Sign and execute a Sui transaction.Parameters
transaction
(object) - The transaction to sign and execute:transaction
(string) - The base64 encoded, BCS encoded, transaction dataaddress
(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
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