Getting Started

Connect to Polkadot using OneKey's Polkadot.js-compatible provider

Learn how to detect, connect, and interact with Polkadot and Substrate chains.

OneKey implements the Polkadot.js extension interface, ensuring compatibility with all Substrate dApps.


Provider Detection

// OneKey registers as a Polkadot.js extension
const provider = window.$onekey?.polkadot

// Or use the standard web3Enable API

Enable Extension

// Using OneKey provider directly
const enabled = await provider.web3Enable('My dApp')

if (enabled) {
  const accounts = await provider.web3Accounts()
  console.log('Accounts:', accounts)
}


Get Accounts


Subscribe to Account Changes


Using with Polkadot.js API

Setup

Connect and Sign Transaction

Last updated

Was this helpful?