Skip to content

deriveAddressAndPublicKey

The deriveAddressAndPublicKey method derives an address and public key from a predecessor ID and derivation path.

Usage

const predecessor = '0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199'
const path = 'my_derivation_path'
const keyVersion = 1
 
const { address, publicKey } = await evmChain.deriveAddressAndPublicKey(
  predecessor,
  path,
  keyVersion
)

Parameters

ParameterTypeDescription
predecessorstringThe wallet/contract address requesting the signature
pathstringThe derivation path to use
keyVersionnumberThe version of the MPC key to use

Returns

PropertyTypeDescription
addressstringThe derived address
publicKeystringThe corresponding public key in SEC1 uncompressed format