API Reference
Complete API reference for OneKey's Cosmos provider
Complete reference for OneKey's Cosmos provider methods and types.
Methods
enable(chainIds)
Enable chain(s) and get key info
disable(chainIds)
Disable chain(s)
disconnect()
Disconnect from all chains
getKey(chainId)
Get account key for chain
signAmino(chainId, signer, signDoc)
Sign Amino-encoded transaction
signDirect(chainId, signer, signDoc)
Sign Protobuf-encoded transaction
sendTx(chainId, tx, mode)
Broadcast signed transaction
signArbitrary(chainId, signer, data)
Sign arbitrary message
verifyArbitrary(chainId, signer, data, signature)
Verify signature
signEthereum(chainId, signer, data, type)
Sign Ethereum data
experimentalSuggestChain(chainInfo)
Add custom chain
getOfflineSigner(chainId)
Get Direct offline signer
getOfflineSignerOnlyAmino(chainId)
Get Amino-only offline signer
getOfflineSignerAuto(chainId)
Auto-detect best signer type
getChainInfosWithoutEndpoints()
Get all chain infos
getChainInfoWithoutEndpoints(chainId)
Get specific chain info
ping()
Check connection
babylonConnectWallet()
Connect to Babylon wallet
babylonGetKey()
Get Babylon wallet key
Key Interface
Sign Doc Types
Amino Sign Doc
Direct Sign Doc
Sign Response Types
Broadcast Modes
block
Wait for block inclusion
sync
Wait for CheckTx
async
Return immediately
Supported Chains
Cosmos Hub
cosmoshub-4
Yes
Osmosis
osmosis-1
Yes
Juno
juno-1
Yes
Stargaze
stargaze-1
Yes
Akash
akashnet-2
Yes
Secret Network
secret-4
Yes
Evmos
evmos_9001-2
Yes
Injective
injective-1
Yes
Custom
Any
Via experimentalSuggestChain
Events
keplr_keystorechange
Account or key changed
connect
Connected to chain
disconnect
Disconnected
Error Codes
4001
User rejected request
4100
Unauthorized
-32603
Internal error
Last updated
Was this helpful?