Skip to main content
Version: 11.x

Function: getLedgerPathBuffer221()

getLedgerPathBuffer221(accountId, applicationName?): Uint8Array

Defined in: src/signer/ledgerSigner221.ts:455

Format the Ledger wallet path to an Uint8Array. for a Ledger Starknet DAPP v2.2.0 EIP2645 path = 2645'/starknet'/application'/0'/accountId'/0

Parameters​

accountId​

number

Id of account. < 2**31.

applicationName?​

string = 'LedgerW'

utf8 string of application name.

Returns​

Uint8Array

an Uint8array of 24 bytes.

Deprecated​

Import it from starknet/ledger instead: it is the same function. Importing it from starknet is kept only for backward compatibility, and will be removed in v12.

Example​

const result = getLedgerPathBuffer221(0);
// result = Uint8Array(24) [
128, 0, 10, 85, 199, 65, 233, 201,
171, 206, 231, 219, 128, 0, 0, 0,
128, 0, 0, 0, 0, 0, 0, 0
]