OneKey Docs
  • 👋GUIDE
    • Introduction
    • Web App Integration Developer
    • Hardware Integration Developer
    • External Contribution Guide
    • Common Terms
  • 🔮Connect To Software
    • Compatible with Metamask
      • detectEthereumProvider
    • Support Wallet Kit
      • Web3 Onboard
      • Rainbowkit
      • Aptos Wallet Adapter
      • Web3Modal
    • WebApp Connect OneKey
      • ETH
        • Provider API
        • RPC API
        • Accessing Accounts
        • Sending Transactions
        • Signing Data
      • BTC
        • Guide
        • API Reference
          • requestAccounts
          • getAccounts
          • getNetwork
          • switchNetwork
          • getPublicKey
          • getBalance
          • getInscriptions
          • sendBitcoin
          • sendInscription
          • signMessage
          • pushTx
          • signPsbt
          • signPsbts
          • pushPsbt
          • inscribeTransfer (Deprecated)
        • Event
      • Nostr
        • Guide
        • API Reference
          • getPublicKey
          • signEvent
          • signSchnorr
          • getRelays
          • nip04.encrypt
          • nip04.decrypt
        • Event
      • WebLN
        • Guide
        • API Reference
          • enable
          • getInfo
          • makeInvoice
          • sendPayment
          • signMessage
          • verifyMessage
          • lnurl
          • getBalance
        • Event
      • NEAR
        • Introduction
        • Integrating
          • Install the Provider SDK
          • Detecting the Provider
          • Establishing a Connection
          • Accessing Accounts
          • Detecting Provider Network
          • Watch Accounts & Network Status
          • Sending Transactions
            • Create Transaction
            • Sign and Send Transaction
            • Signing Transaction
          • Signing Messages
          • RPC API Calling
          • Debug Logging
          • Migrate from Near Web Wallet
        • Reference
          • API Reference
          • Trouble Shooting
        • Resources
          • Example & Demo
          • FAQ
      • SOLANA
        • Detecting the Provider
        • Establishing a Connection
        • Sending a Transaction
        • Signing a Message
    • Using WalletConnect
      • ETH
      • APTOS
        • Wallet Connect API
  • 📟Connect to Hardware
    • Hardware SDK
      • Started
      • Install SDK
      • Config Event
      • Common Params
      • Path Params
      • Error Code
      • API Reference
        • Basic API
          • Init SDK
          • Search Devices
          • Get Features
          • Get Passphrase State
          • Cancel Request
          • Response UI Event
        • Device API
          • deviceSupportFeatures
          • checkBridgeStatus
          • checkTransportRelease
          • checkFirmwareRelease
          • checkBLEFirmwareRelease
          • deviceChangePin
          • deviceReset
          • deviceSettings
          • deviceUpdateReboot
          • deviceVerify
          • deviceWipe
          • firmwareUpdate
        • Bitcoin & Bitcoin forks
          • btcGetAddress
          • btcGetPublicKey
          • btcSignMessage
          • btcSignTransaction
          • btcVerifyMessage
        • Ethereum & EVM
          • evmGetPublicKey
          • evmGetAddress
          • evmSignTransaction
          • evmSignTypedData
          • evmSignMessage
          • evmVerifyMessage
        • Algorand
          • algoGetAddress
          • algoSignTransaction
        • Aptos
          • aptosGetAddress
          • aptosGetPublicKey
          • aptosSignMessage
          • aptosSignTransaction
        • Alephium
          • alephiumGetAddress
          • alephiumSignMessage
          • alephiumSignTransaction
        • Cardano
          • cardanoGetAddress
          • cardanoGetPublicKey
          • cardanoSignMessage
          • cardanoSignTransaction
        • Conflux
          • confluxGetAddress
          • confluxSignMessage
          • confluxSignMessageCIP23
          • confluxSignTransaction
        • Cosmos
          • cosmosGetAddress
          • cosmosGetPublicKey
          • cosmosSignTransaction
        • Dynex
          • dnxGetAddress
          • dnxSignTransaction
        • FileCoin
          • filecoinGetAddress
          • filecoinSignTransaction
        • Kaspa
          • kaspaGetAddress
          • kaspaSignTransaction
        • Near
          • nearGetAddress
          • nearSignTransaction
        • Nervos
          • nervosGetAddress
          • nervosSignTransaction
        • Nostr
          • nostrGetPublicKey
          • nostrSignEvent
          • nostrSignSchnorr
          • nostrEncryptMessage
          • nostrDecryptMessage
        • NEM
          • nemGetAddress
          • nemSignTransaction
        • Nexa
          • nexaGetAddress
          • nexaSignTransaction
        • Polkadot
          • polkadotGetAddress
          • polkadotSignTransaction
        • Ripple
          • xrpGetAddress
          • xrpSignTransaction
        • Scdo
          • scdoGetAddress
          • scdoSignMessage
          • scdoSignTransaction
        • Solana
          • solGetAddress
          • solSignTransaction
        • Starcoin
          • startcoinGetAddress
          • starcoinGetPublicKey
          • starcoinSignMessage
          • starcoinSignTransaction
          • starcoinVerifyMessage
        • Stellar
          • stellarGetAddress
          • stellarSignTransaction
        • Sui
          • suiGetAddress
          • suiGetPublicKey
          • suiSignMessage
          • suiSignTransaction
        • Tron
          • tronGetAddress
          • tronSignMessage
          • tronSignTransaction
        • Ton
          • tonGetAddress
          • tonSignMessage
          • tonSignProof
      • Advanced
        • Passphrase
        • Common SDK Guide
        • Low-level transport plugin
        • OneKey Message Protocol
      • Tutorial: Get started with OneKey
    • Air Gap SDK
      • Started
      • Tutorial: Wallet Integration
      • API Reference
        • Basic API
          • CryptoHDkey
          • CryptoCoinInfo
          • CryptoKeypath
        • Ethereum & EVM
          • EthSignRequest
          • EthSignature
  • ⛳Best Practice
    • Registering Your Contract's Method Names
    • Registering Tokens with Users
    • Defining Your App's Icon
    • Migration from MetaMask
  • 🎨Logo Assets
  • 🧙Support
  • 🕹️Trouble Shooting
  • ❤️Contribute
Powered by GitBook
On this page
  • 1. Introduction
  • 2. Error Code Structure
  • 3. Common Errors
  • 4. Device Errors
  • 5. Iframe Errors
  • 6. Method Errors
  • 7. Network Errors
  • 8. Transport Errors
  • 9. Bluetooth Errors
  • 10. Runtime Errors
  • 11. Low-Level Transport Errors

Was this helpful?

Edit on GitHub
  1. Connect to Hardware
  2. Hardware SDK

Error Code

PreviousPath ParamsNextAPI Reference

Last updated 1 year ago

Was this helpful?

This document provides a comprehensive guide to the error codes used in the Hardware Wallet JS-SDK. These error codes help developers identify and handle various scenarios that may arise when interacting with the hardware wallet.

1. Introduction

The Hardware SDK is equipped with a range of error codes that provide insight into the nature of issues encountered during usage. These error codes allow for efficient error handling and troubleshooting in your application.

2. Error Code Structure

Each error code is represented by a constant variable in the SDK, which allows easy identification and handling. Additionally, an associated message provides a brief description of the error. You can see all the source code in .

3. Common Errors

  • UnknownError (0): An unexpected error occurred. Check the message property for more details.

4. Device Errors

  • DeviceFwException (101): Firmware version mismatch.

  • DeviceUnexpectedMode (102): Device is in an unexpected mode.

  • DeviceListNotInitialized (103): Device list is not initialized.

  • SelectDevice (104): Please select the connected device.

  • DeviceNotFound (105): Device not found.

  • DeviceInitializeFailed (106): Device initialization failed.

  • DeviceInterruptedFromOutside (107): Device operation interrupted from outside.

  • DeviceUnexpectedBootloaderMode (108): Device should be in bootloader mode.

  • DeviceInterruptedFromUser (109): Device operation interrupted by the user.

  • DeviceCheckDeviceIdError (110): Device ID in the features is not the same.

  • DeviceNotSupportPassphrase (111): Device does not support passphrase.

  • DeviceCheckPassphraseStateError (112): Device passphrase state error.

  • DeviceNotOpenedPassphrase (113): Passphrase not opened for the device.

  • DeviceOpenedPassphrase (114): Passphrase is opened for the device.

  • NotInitialized(200): Device is not initialized.

5. Iframe Errors

  • IFrameNotInitialized (300): IFrame is not initialized.

  • IFrameAleradyInitialized (301): IFrame is already initialized.

  • IFrameLoadFail (302): IFrame load failed.

  • IframeTimeout (303): IFrame initialization timed out.

  • IframeBlocked (304): IFrame is blocked.

6. Method Errors

  • CallMethodError (400): Runtime error during method execution.

  • CallMethodNotResponse (404): Method does not respond.

  • CallMethodInvalidParameter (405): Invalid parameter passed to the method.

  • FirmwareUpdateDownloadFailed (406): Firmware update download failed.

  • CallMethodNeedUpgradeFirmware (407): Method not supported, firmware update required.

  • CallMethodDeprecated (408): Method is deprecated.

  • FirmwareUpdateLimitOneDevice (409): Only one device allowed during firmware update.

  • FirmwareUpdateManuallyEnterBoot (410): Manual entry required for firmware update.

  • FirmwareUpdateAutoEnterBootFailure (411): Failed to automatically enter boot mode for firmware update.

  • NewFirmwareUnRelease (412): New firmware has not been released yet.

  • UseDesktopToUpdateFirmware (413): Update firmware using OneKey desktop client.

  • NewFirmwareForceUpdate (414): Mandatory firmware update required.

7. Network Errors

  • NetworkError (500): Network request error.

8. Transport Errors

  • TransportNotConfigured (600): Transport is not configured.

  • TransportCallInProgress (601): Transport call in progress.

  • TransportNotFound (602): Transport not found.

  • TransportInvalidProtobuf (603): Invalid protobuf for transport.

9. Bluetooth Errors

  • BleScanError (700): BLE scan error.

  • BlePermissionError (701): Bluetooth permission required.

  • BleLocationError (702): Location permissions for the application are not available.

  • BleRequiredUUID (703): UUID is required.

  • BleConnectedError (704): Connected error is always a runtime error.

  • BleDeviceNotBonded (705): Device is not bonded.

  • BleServiceNotFound (706): BLEServiceNotFound: service not found.

  • BleCharacteristicNotFound (707): BLEServiceNotFound: service not found.

  • BleMonitorError (708): Monitor Error: characteristic not found.

  • BleCharacteristicNotifyError (709): Characteristic Notify Error.

  • BleWriteCharacteristicError (710): Write Characteristic Error.

  • BleAlreadyConnected (711): Already connected to device.

  • BleLocationServicesDisabled (712): Location Services disabled.

  • BleTimeoutError (713): The connection has timed out unexpectedly.

  • BleForceCleanRunPromise (714): Force clean Bluetooth run promise.

  • BleDeviceBondError (715): Bluetooth pairing failed.

10. Runtime Errors

  • RuntimeError (800): Runtime error.

  • PinInvalid (801): Invalid PIN.

  • PinCancelled (802): PIN entry cancelled by user.

  • ActionCancelled (803): Action cancelled by user.

  • FirmwareError (804): Firmware installation failed.

  • ResponseUnexpectTypeError (805): Response type is not expected.

  • BridgeNetworkError (806): Bridge network error.

  • BridgeTimeoutError (807): Bridge network timeout.

  • BridgeNotInstalled (808): Bridge not installed.

  • PollingTimeout (809): Polling timeout.

  • PollingStop (810): Polling stopped.

  • BlindSignDisabled (811): BlindSign is disabled on the device.

  • UnexpectPassphrase (812): Unexpected passphrase encountered.

  • FileAlreadyExists (813): NFT file already exists.

  • CheckDownloadFileError (814): Check download file error.

  • NotInSigningMode (815): Not in signing mode.

11. Low-Level Transport Errors

  • LowlevelTrasnportConnectError (900): Low-level transport connect error.


📟
here