Establishes a connection between the dApp and the user’s Sui wallet. This method typically prompts the user to authorize access to their wallet and returns account-related information upon approval.
Usage
window.bitkeep.suiWallet.connect()
Returns
An array of wallet addresses/accounts the user granted access to.
interface ConnectResult { accounts: Account[];}
Try It
Loading live editor...
Sign Message
Preview
Used to prompt the user to sign a personal message and return the signed message to the dApp. This is used to verify the user’s public key. if you use @mysten/sui < 1.0, please use signMessage, otherwise use signPersonalMessage instead
Note
If you’re using the latest version of the official Sui SDK, it’s recommended to use signPersonalMessage. Otherwise, fall back to signMessage.
Parameters
message: The message to be signed (string or Uint8Array).
Used to prompt the user to sign a personal message and return the signed message to the dApp. This is used to verify the user’s public key. if you use @mysten/sui < 1.0, please use signTransaction, otherwise use signTransactionBlock instead
Parameters
message: The message to be signed (string or Uint8Array).
import {Transaction} from "@mysten/sui/transactions";interface signTransactionInput { transaction: Transaction}// orimport {TransactionBlock} from "@mysten/sui.js/transactions";interface signTransactionBlockInput { transactionBlock: TransactionBlock}
Returns
signature: The signed message in base64 or hex format.