Skip to content

accountFromPrivateKey

accountFromPrivateKey(privateKey, type, network, path?): object

Defined in: packages/iso-filecoin/src/wallet.js:108

Get account from private key

Lotus BLS private key is little endian so you need to reverse the byte order. Use lotusBlsPrivateKeyToBytes to convert.

ParameterType
privateKeyUint8Array<ArrayBufferLike>
type"SECP256K1" | "BLS"
networkNetwork
path?string

address: IAddress

optional path: string

Derivation path - only for HD wallets

privateKey: Uint8Array

Private key - only for RAW and HD wallets

publicKey: Uint8Array

type: "SECP256K1" | "BLS"