Skip to content

LedgerWalletAdapter

SIP Protocol API Reference v0.7.0


SIP Protocol API Reference / LedgerWalletAdapter

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:10979

Ledger wallet adapter

Supports Ethereum and Solana chains via Ledger device apps.

new LedgerWalletAdapter(config): LedgerWalletAdapter

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:10988

LedgerConfig

LedgerWalletAdapter

BaseWalletAdapter.constructor

readonly chain: ChainId

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:10980

Chain this adapter connects to

BaseWalletAdapter.chain


readonly name: string

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:10981

Wallet name/identifier (e.g., ‘phantom’, ‘metamask’)

BaseWalletAdapter.name

get address(): string

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:8930

Current address (empty string if not connected)

string

Current address (empty string if not connected)

BaseWalletAdapter.address


get publicKey(): "" | `0x${string}`

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:8931

Public key (hex encoded, empty string if not connected)

"" | `0x${string}`

Public key (hex encoded, empty string if not connected)

BaseWalletAdapter.publicKey


get connectionState(): WalletConnectionState

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:8932

Current connection state

WalletConnectionState

Current connection state

BaseWalletAdapter.connectionState


get deviceInfo(): HardwareDeviceInfo | null

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:10992

Get device information

HardwareDeviceInfo | null


get derivationPath(): string

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:10996

Get current derivation path

string


get account(): HardwareAccount | null

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:11000

Get current account

HardwareAccount | null

on<T>(event, handler): void

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:8937

Subscribe to wallet events

T extends WalletEventType

T

WalletEventHandler<Extract<WalletConnectEvent, { type: T; }> | Extract<WalletDisconnectEvent, { type: T; }> | Extract<WalletAccountChangedEvent, { type: T; }> | Extract<WalletChainChangedEvent, { type: T; }> | Extract<WalletErrorEvent, { type: T; }>>

void

BaseWalletAdapter.on


off<T>(event, handler): void

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:8943

Unsubscribe from wallet events

T extends WalletEventType

T

WalletEventHandler<Extract<WalletConnectEvent, { type: T; }> | Extract<WalletDisconnectEvent, { type: T; }> | Extract<WalletAccountChangedEvent, { type: T; }> | Extract<WalletChainChangedEvent, { type: T; }> | Extract<WalletErrorEvent, { type: T; }>>

void

BaseWalletAdapter.off


isConnected(): boolean

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:8973

Check if wallet is connected

boolean

BaseWalletAdapter.isConnected


connect(): Promise<void>

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:11004

Connect to Ledger device

Promise<void>

BaseWalletAdapter.connect


disconnect(): Promise<void>

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:11008

Disconnect from Ledger device

Promise<void>

BaseWalletAdapter.disconnect


signMessage(message): Promise<Signature>

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:11012

Sign a message

Uint8Array

Promise<Signature>

BaseWalletAdapter.signMessage


signTransaction(tx): Promise<SignedTransaction>

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:11016

Sign a transaction

UnsignedTransaction

Promise<SignedTransaction>

BaseWalletAdapter.signTransaction


signAndSendTransaction(tx): Promise<TransactionReceipt>

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:11023

Sign and send transaction

Note: Hardware wallets can only sign, not send. This returns a signed transaction that must be broadcast separately.

UnsignedTransaction

Promise<TransactionReceipt>

BaseWalletAdapter.signAndSendTransaction


getBalance(): Promise<bigint>

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:11029

Get native token balance

Note: Hardware wallets don’t track balances - this requires RPC.

Promise<bigint>

BaseWalletAdapter.getBalance


getTokenBalance(_asset): Promise<bigint>

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:11035

Get token balance

Note: Hardware wallets don’t track balances - this requires RPC.

Asset

Promise<bigint>

BaseWalletAdapter.getTokenBalance


getAccounts(startIndex?, count?): Promise<HardwareAccount[]>

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:11039

Get multiple accounts from device

number

number

Promise<HardwareAccount[]>


switchAccount(accountIndex): Promise<HardwareAccount>

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:11043

Switch to different account index

number

Promise<HardwareAccount>