API Reference

Complete API reference for OneKey's Polkadot provider

Complete reference for OneKey's Polkadot provider methods and types.


Methods

Method
Description

web3Enable(dappName)

Enable extension for dApp

web3Accounts(anyType?)

Get all accounts

web3AccountsSubscribe(callback)

Subscribe to account changes

web3SignPayload(payload)

Sign transaction payload

web3SignRaw(payload)

Sign raw message

web3RpcSend(request)

Send RPC request

web3RpcSubscribe(request, callback)

Subscribe to RPC events

web3RpcUnSubscribe()

Unsubscribe from all

web3RpcListProviders()

List RPC providers

web3RpcStartProvider(key)

Start specific provider


Types

Injected Account

interface InjectedAccount {
  address: string          // Substrate address
  name?: string            // Account name
  type?: 'sr25519' | 'ed25519' | 'ecdsa'
  genesisHash?: string     // Optional chain restriction
}

Signer Payload JSON

Signer Payload Raw

Signer Result


Supported Chains

Chain
Description

Polkadot

Main relay chain

Kusama

Canary network

Acala

DeFi hub

Moonbeam

EVM-compatible

Astar

Smart contract platform

Any Substrate

Custom chains

Last updated

Was this helpful?