@metamask/eth-trezor-keyring
Version:
A MetaMask compatible keyring, for trezor hardware wallets
1 lines • 1.32 kB
Source Map (JSON)
{"version":3,"file":"onekey-keyring.mjs","sourceRoot":"","sources":["../../src/v2/onekey-keyring.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,iCAAiC;AAGvD,OAAO,EAAE,aAAa,EAAE,6BAAyB;AAUjD;;;;;GAKG;AACH,MAAM,OAAO,aAAc,SAAQ,aAAa;IAC9C,YAAY,OAA6B;QACvC,KAAK,CAAC;YACJ,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,IAAI,EAAE,WAAW,CAAC,MAAM;SACzB,CAAC,CAAC;IACL,CAAC;CACF","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"]}