Provider API
SUI wallet standard
Introduction
Sui wallet uses wallet standard, which is somewhat different from other heterogeneous chains. You can obtain the wallet object through event notification:
const GlobalWallet = {
register: (wallet) => {
GlobalWallet[wallet.chainName] = wallet
}
}
const event = new CustomEvent('wallet-standard:app-ready', { detail: GlobalWallet });
window.dispatchEvent(event);
const suiWallet = GlobalWallet.suiMainnet;
// You can also use the official SDK to connect to NaboxConnect your wallet
const { accounts } = await NaboxWallet.sui.features['standard:connect'].connect();
// accounts
[{
address: '0x0451ff5a1b06f....272366aef69b369',
chains: ['sui:mainnet'],
features: ['sui:signAndExecuteTransactionBlock', 'sui:signTransactionBlock', 'sui:signMessage'],
publicKey: 'sui publicKey'
}]signAndExecuteTransactionBlock (sign and broadcast transaction)
signTransactionBlock (signature transaction)
signMessage(Message Signature)
Event
Last updated