@celo/wallet-ledger"ledger-wallet"LedgerWallet

Class: LedgerWallet

Hierarchy

LedgerWallet

Implements

  • ReadOnlyWallet
  • ReadOnlyWallet
  • ReadOnlyWallet

Index

Constructors

Properties

Methods

Constructors

constructor

+ new LedgerWallet(derivationPathIndexes: number[], baseDerivationPath: string, transport: any, ledgerAddressValidation: AddressValidation): LedgerWallet

Defined in wallet-ledger/src/ledger-wallet.ts:45

Parameters:

Name Type Default Description
derivationPathIndexes number[] zeroRange(ADDRESS_QTY) number array of "address_index" for the base derivation path. Default: Array[0..9]. Example: [3, 99, 53] will retrieve the derivation paths of [${baseDerivationPath}/3, ${baseDerivationPath}/99, ${baseDerivationPath}/53]
baseDerivationPath string CELO_BASE_DERIVATION_PATH base derivation path. Default: "44'/52752'/0'/0"
transport any {} Transport to connect the ledger device
ledgerAddressValidation AddressValidation AddressValidation.firstTransactionPerAddress -

Returns: LedgerWallet

Properties

Readonly baseDerivationPath

baseDerivationPath: string

Defined in wallet-ledger/src/ledger-wallet.ts:57

base derivation path. Default: "44'/52752'/0'/0"


Readonly derivationPathIndexes

derivationPathIndexes: number[]

Defined in wallet-ledger/src/ledger-wallet.ts:56

number array of "address_index" for the base derivation path. Default: Array[0..9]. Example: [3, 99, 53] will retrieve the derivation paths of [${baseDerivationPath}/3, ${baseDerivationPath}/99, ${baseDerivationPath}/53]


isSetupFinished

isSetupFinished: function

Inherited from LedgerWallet.isSetupFinished

Defined in wallet-remote/lib/remote-wallet.d.ts:51

Type declaration:

▸ (): boolean


Readonly ledgerAddressValidation

ledgerAddressValidation: AddressValidation

Defined in wallet-ledger/src/ledger-wallet.ts:59


Readonly transport

transport: any

Defined in wallet-ledger/src/ledger-wallet.ts:58

Transport to connect the ledger device

Methods

computeSharedSecret

computeSharedSecret(address: Address, publicKey: string): Promise‹Buffer›

Inherited from LedgerWallet.computeSharedSecret

Defined in wallet-base/lib/wallet-base.d.ts:64

Computes the shared secret (an ECDH key exchange object) between two accounts

Parameters:

Name Type
address Address
publicKey string

Returns: Promise‹Buffer›


decrypt

decrypt(address: string, ciphertext: Buffer): Promise‹Buffer›

Inherited from LedgerWallet.decrypt

Defined in wallet-base/lib/wallet-base.d.ts:60

Parameters:

Name Type
address string
ciphertext Buffer

Returns: Promise‹Buffer›


getAccounts

getAccounts(): Address[]

Inherited from LedgerWallet.getAccounts

Overrides void

Defined in wallet-remote/lib/remote-wallet.d.ts:27

Get a list of accounts in the remote wallet

Returns: Address[]


hasAccount

hasAccount(address?: Address): boolean

Inherited from LedgerWallet.hasAccount

Overrides void

Defined in wallet-remote/lib/remote-wallet.d.ts:32

Returns true if account is in the remote wallet

Parameters:

Name Type Description
address? Address Account to check

Returns: boolean


init

init(): Promise‹void›

Inherited from LedgerWallet.init

Defined in wallet-remote/lib/remote-wallet.d.ts:15

Discovers wallet accounts and caches results in memory Idempotent to ensure multiple calls are benign

Returns: Promise‹void›


removeAccount

removeAccount(_address: string): void

Inherited from LedgerWallet.removeAccount

Defined in wallet-base/lib/wallet-base.d.ts:23

Removes the account with the given address. Needs to be implemented by subclass, otherwise throws error

Parameters:

Name Type
_address string

Returns: void


signPersonalMessage

signPersonalMessage(address: Address, data: string): Promise‹string›

Inherited from LedgerWallet.signPersonalMessage

Overrides void

Defined in wallet-remote/lib/remote-wallet.d.ts:43

Parameters:

Name Type Description
address Address Address of the account to sign with
data string Hex string message to sign

Returns: Promise‹string›

Signature hex string (order: rsv)


signTransaction

signTransaction(txParams: CeloTx): Promise‹EncodedTransaction›

Inherited from LedgerWallet.signTransaction

Overrides void

Defined in wallet-remote/lib/remote-wallet.d.ts:37

Signs the EVM transaction using the signer pulled from the from field

Parameters:

Name Type Description
txParams CeloTx EVM transaction

Returns: Promise‹EncodedTransaction›


signTypedData

signTypedData(address: Address, typedData: EIP712TypedData): Promise‹string›

Inherited from LedgerWallet.signTypedData

Overrides void

Defined in wallet-remote/lib/remote-wallet.d.ts:49

Parameters:

Name Type Description
address Address Address of the account to sign with
typedData EIP712TypedData the typed data object

Returns: Promise‹string›

Signature hex string (order: rsv)