Sui
Sui integration via OneKey's Sui Wallet Standard provider
Integrate Sui blockchain using OneKey's provider. Access via window.$onekey.sui.
OneKey implements the Sui Wallet Standard, ensuring compatibility with all Sui dApps.
Quick Links
Provider Detection
// Detect OneKey Sui provider
const provider = window.$onekey?.sui
if (!provider) {
throw new Error('OneKey Sui provider not detected')
}Quick Start
Check Permissions
Request Connection
Disconnect
Account Management
Get Accounts
Get Active Chain
Transactions
Sign and Execute Transaction Block
Sign Transaction Block (Without Executing)
Sign and Execute Transaction (New API)
Sign Transaction (New API)
Message Signing
Sign Personal Message
Sign arbitrary messages for authentication:
Sign Message (Legacy)
Verify Signature
Smart Contract Interaction
Move Call
Publish Package
API Reference
Methods
hasPermissions()
Check if connected
requestPermissions()
Request connection
disconnect()
Disconnect wallet
getAccounts()
Get connected accounts (address, publicKey only)
getActiveChain()
Get current chain
signAndExecuteTransactionBlock(input)
Sign and execute, requires account/chain
signTransactionBlock(input)
Sign only, requires account/chain
signAndExecuteTransaction(input)
Sign and execute (new API, Transaction, requires account/chain)
signTransaction(input)
Sign transaction (new API, Transaction, requires account/chain)
signMessage(input)
Sign message (legacy, requires account/chain)
signPersonalMessage(input)
Sign personal message (requires account/chain)
Types
Supported Chains
Testnet
sui:testnet
Devnet
sui:devnet
Error Handling
Common Error Codes
4001
User rejected request
4100
Unauthorized
-32603
Internal error
Using with Sui Wallet Kit
For React applications, use the official Sui Wallet Kit:
OneKey is automatically detected through the Sui Wallet Standard.
Using with Sui SDK
Last updated
Was this helpful?