Skip to Content
Offline SigningOverview

Air-Gap (Offline QR Signing)

Build a “device stays offline” signing loop using UR-encoded QR codes.

How it Works

  1. Build Request: Create a sign request UR payload (per chain), render as animated QR frames
  2. Device Scans: Device scans QR, verifies details on-screen, signs offline
  3. Get Signature: Device displays signature UR as animated QR
  4. Broadcast: App scans response, verifies, and broadcasts via your network

Quick Start by Chain

ChainRequest Type (App → Device)Response Type (Device → App)
Ethereum & EVMeth-sign-requesteth-signature
Bitcoin (PSBT)crypto-psbtcrypto-psbt
Solanasol-sign-requestsol-signature
Trontron-sign-requesttron-signature

Account Export Types (Device → App)

These UR types are used when the device exports account information to the app during initial setup:

UR TypeDescription
crypto-hdkeySingle HD key export (BCR-2020-007 )
crypto-multi-accountsMulti-chain account bundle export

API Reference

  • Basic API – Core UR types: CryptoHDKey, CryptoCoinInfo, CryptoKeypath

Packages

# Keystone SDK & UR registries npm install @keystonehq/keystone-sdk @keystonehq/bc-ur-registry-eth # UR primitives npm install @ngraveio/bc-ur

Third-Party Wallet Integration

If you are integrating OneKey Air-Gap into an existing wallet, you need to ensure your QR scanner routes these UR types to a BC-UR v2 decoder (fountain-coded), not a legacy v1 decoder.

UR types your scanner must accept

DirectionUR TypeWhen
Device → Appcrypto-psbtBTC signed PSBT
Device → Appcrypto-hdkeyHD key export on connect
Device → Appcrypto-multi-accountsMulti-account export on connect
Device → Appeth-signatureETH signed transaction
Device → Appsol-signatureSOL signed transaction
Device → Appbtc-signatureBTC signature (non-PSBT)
App → Deviceeth-sign-requestETH sign request
App → Devicesol-sign-requestSOL sign request
App → Devicecrypto-psbtBTC unsigned PSBT

Common pitfall: UR type routing

Some wallets use a whitelist to decide which UR types are decoded with the modern BC-UR v2 decoder (fountain codes via @ngraveio/bc-ur). Types not in the whitelist may fall through to a legacy v1 decoder that uses a completely different encoding scheme, causing the scanner to get stuck.

If your scanner shows “please continue scanning” but never completes, check that the UR type is in your v2 whitelist.

onekey-app-call-device (private protocol)

The onekey-app-call-device UR type is a OneKey-internal protocol used for device management operations (e.g., getMultiAccounts, verifyAddress). Third-party wallets should NOT implement this type — it may change without notice. Use the standard Keystone SDK methods instead.

Demo & Examples

Note: Air-Gap is offline by design. There is no online browser playground.

Last updated on