UNPKG

@metamask/eth-trezor-keyring

Version:

A MetaMask compatible keyring, for trezor hardware wallets

1 lines 1.3 kB
{"version":3,"file":"onekey-keyring.cjs","sourceRoot":"","sources":["../../src/v2/onekey-keyring.ts"],"names":[],"mappings":";;;AACA,iDAAuD;AAGvD,yDAAiD;AAUjD;;;;;GAKG;AACH,MAAa,aAAc,SAAQ,8BAAa;IAC9C,YAAY,OAA6B;QACvC,KAAK,CAAC;YACJ,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,IAAI,EAAE,gBAAW,CAAC,MAAM;SACzB,CAAC,CAAC;IACL,CAAC;CACF;AARD,sCAQC","sourcesContent":["import type { EntropySourceId } from '@metamask/keyring-api';\nimport { KeyringType } from '@metamask/keyring-api/v2';\n\nimport type { OneKeyKeyring as LegacyOneKeyKeyring } from '../onekey-keyring';\nimport { TrezorKeyring } from './trezor-keyring';\n\n/**\n * Options for creating a OneKeyKeyring instance.\n */\nexport type OneKeyKeyringOptions = {\n legacyKeyring: LegacyOneKeyKeyring;\n entropySource: EntropySourceId;\n};\n\n/**\n * Concrete {@link Keyring} adapter for {@link OneKeyKeyring}.\n *\n * This wrapper extends {@link TrezorKeyring} since OneKeyKeyring extends\n * TrezorKeyring. The only difference is the keyring type identifier.\n */\nexport class OneKeyKeyring extends TrezorKeyring {\n constructor(options: OneKeyKeyringOptions) {\n super({\n legacyKeyring: options.legacyKeyring,\n entropySource: options.entropySource,\n type: KeyringType.OneKey,\n });\n }\n}\n"]}