@exodus/key-identifier
v1.3.1
Published
Provides a KeyIdentifier class that helps to define how a key is derived
Downloads
17,317
Readme
@exodus/key-identifier
Usage
To interact with a key, you must first specify how to derive it. This is done through the KeyIdentifier
class provided by this library. A key identifier is most notably provided to the keychain for operations such as exporting a key or signing a transaction.
import KeyIdentifier from '@exodus/key-identifier'
const keyId = new KeyIdentifier({
derivationAlgorithm: 'BIP32',
derivationPath: "m/44'/501'/0'/0/0",
keyType: 'nacl',
})
const { privateKey, publicKey, xpub, xpriv } = await keychain.exportKey({
seedId,
keyId,
exportPrivate: true,
})