Getting Started
Connect to Conflux using OneKey's Fluent-compatible provider
Learn how to detect, connect, and interact with Conflux using OneKey's provider.
OneKey's Conflux provider is compatible with both ConfluxPortal and Fluent wallet interfaces.
Provider Detection
// Detect OneKey Conflux provider
const provider = window.$onekey?.conflux
if (!provider) {
throw new Error('OneKey Conflux provider not detected')
}
// Check compatibility flags
console.log('isConfluxPortal:', provider.isConfluxPortal) // true
console.log('isFluent:', provider.isFluent) // true
console.log('isOneKey:', provider.isOneKey) // trueRequest Accounts
const accounts = await provider.request({
method: 'cfx_requestAccounts'
})
console.log('Connected:', accounts[0])Check Connection
Get Chain ID
Get Network Version
Get Balance
Event Handling
Listen for Account Changes
Listen for Chain Changes
Listen for Connection
Address Format
Conflux uses base32 addresses (CIP-37):
Networks
Network
Chain ID (hex)
Network ID
Mainnet
0x405
1029
Testnet
0x1
1
Last updated
Was this helpful?