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.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
privateKey | Uint8Array <ArrayBufferLike > |
type | "SECP256K1" | "BLS" |
network | Network |
path? | string |
Returns
Section titled “Returns”address
Section titled “address”address:
IAddress
optional
path:string
Derivation path - only for HD wallets
privateKey
Section titled “privateKey”privateKey:
Uint8Array
Private key - only for RAW and HD wallets
publicKey
Section titled “publicKey”publicKey:
Uint8Array
type:
"SECP256K1"
|"BLS"