Algorand

Algorand integration via OneKey's provider

Integrate Algorand blockchain using OneKey's provider. Access via window.$onekey.algo.

OneKey's Algorand provider supports both legacy and ARC-0001 compliant interfaces.



Provider Detection

// Detect OneKey Algorand provider
const provider = window.$onekey?.algo

if (!provider) {
  throw new Error('OneKey Algorand provider not detected')
}

// Check compatibility
console.log('isOneKey:', provider.isOneKey) // true

Quick Start

Connect (Legacy API)

Enable (ARC-0001)

Disconnect


Transactions

Sign Transactions (ARC-0001)

Sign one or more transactions:

Sign Multiple Transactions

Partial Signing (Multi-sig)

Post Transactions

Broadcast signed transactions:

Sign and Post

Sign and broadcast in one step:


Legacy Transaction API

Sign Transaction (Legacy)

Sign and Send (Legacy)


Message Signing

Sign Arbitrary Message

Verify Signature


Event Handling

Listen for Account Changes

Listen for Connection


Using with Algod Client

Get Client from Provider

Manual Client Setup


API Reference

Methods

Method
Description

connect()

Connect wallet (legacy)

disconnect()

Disconnect wallet

enable(opts?)

Enable wallet (ARC-0001)

signTxns(transactions)

Sign transactions (ARC-0001)

postTxns(signedTxns)

Broadcast transactions

signAndPostTxns(transactions)

Sign and broadcast

signTransaction(txns)

Sign transactions (legacy)

signAndSendTransaction(txns)

Sign and send (legacy)

signMessage(message, encoding?)

Sign arbitrary message

getAlgodv2Client()

Get Algod client

getIndexerClient()

Get Indexer client

Types

Properties

Property
Type
Description

isConnected

boolean

Connection status

address

string | null

Connected address

isOneKey

boolean

OneKey identifier

Events

Event
Parameters
Description

connect

{ address }

Wallet connected

disconnect

-

Wallet disconnected

accountChanged

address

Account changed


Error Handling

Common Error Codes

Code
Description

4001

User rejected request

4100

Unauthorized

4200

Unsupported method

4300

Invalid input


Complete Example

Last updated

Was this helpful?