Class: LedgerSigner231<Transport>
Signer for accounts using a Ledger Nano S+/X signature (Starknet Ledger APP version 2.3.1).
The Ledger has to be connected, unlocked and the Starknet APP has to be selected prior of use of this class.
Type parameters
| Name | Type |
|---|---|
Transport | extends Record<any, any> = any |
Hierarchy
-
↳
LedgerSigner231
Implements
Constructors
constructor
• new LedgerSigner231<Transport>(transport, accountID, eip2645application?, pathFunction?): LedgerSigner231<Transport>
constructor of the LedgerSigner class.
Type parameters
| Name | Type |
|---|---|
Transport | extends Record<any, any> = any |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
transport | Transport | undefined | 5 transports are available to handle USB, bluetooth, Node, Web, Mobile. See Guides for more details. |
accountID | number | undefined | ID of Ledger Nano account (can handle 2**31 accounts). |
eip2645application? | string | 'LedgerW' | A wallet is defined by an ERC2645 derivation path (6 items). One item is called application and can be customized. Default value is LedgerW. |
pathFunction? | LedgerPathCalculation | getLedgerPathBuffer221 | defines the function that will calculate the path. By default getLedgerPathBuffer221 is selected. If you are using APP v2.3.1 with an account created with the v1.1.1, you need to use : typescript const myLedgerSigner = new LedgerSigner231(myNodeTransport, 0, undefined, getLedgerPathBuffer111); |
Returns
LedgerSigner231<Transport>
Example
import TransportNodeHid from '@ledgerhq/hw-transport-node-hid';
const myNodeTransport = await TransportNodeHid.create();
const myLedgerSigner = new LedgerSigner231(myNodeTransport, 0);
Overrides
Defined in
src/signer/ledgerSigner231.ts:63
Properties
transporter
• Readonly transporter: any