Skip to content

MockTrezorAdapter

SIP Protocol API Reference v0.15.1


SIP Protocol API Reference / MockTrezorAdapter

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15132

Mock Trezor adapter for testing

new MockTrezorAdapter(config): MockTrezorAdapter

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15140

MockHardwareConfig

MockTrezorAdapter

BaseWalletAdapter.constructor

readonly chain: ChainId

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15133

Chain this adapter connects to

BaseWalletAdapter.chain


readonly name: string

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15134

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

BaseWalletAdapter.name

get address(): string

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:12601

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-GLbkPPho.d.ts:12602

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-GLbkPPho.d.ts:12603

Current connection state

WalletConnectionState

Current connection state

BaseWalletAdapter.connectionState


get deviceInfo(): HardwareDeviceInfo | null

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15141

HardwareDeviceInfo | null


get derivationPath(): string

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15142

string


get account(): HardwareAccount | null

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15143

HardwareAccount | null

on<T>(event, handler): void

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:12608

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-GLbkPPho.d.ts:12614

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-GLbkPPho.d.ts:12644

Check if wallet is connected

boolean

BaseWalletAdapter.isConnected


connect(): Promise<void>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15144

Connect to the wallet

Promise<void>

If connection fails

BaseWalletAdapter.connect


disconnect(): Promise<void>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15145

Disconnect from the wallet

Promise<void>

BaseWalletAdapter.disconnect


signMessage(message): Promise<Signature>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15146

Sign an arbitrary message

Uint8Array

The message bytes to sign

Promise<Signature>

The signature

If signing fails or wallet not connected

BaseWalletAdapter.signMessage


signTransaction(tx): Promise<SignedTransaction>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15147

Sign a transaction

UnsignedTransaction

The unsigned transaction

Promise<SignedTransaction>

The signed transaction

If signing fails or wallet not connected

BaseWalletAdapter.signTransaction


signAndSendTransaction(tx): Promise<TransactionReceipt>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15148

Sign and broadcast a transaction

UnsignedTransaction

The unsigned transaction

Promise<TransactionReceipt>

The transaction receipt

If signing or broadcast fails

BaseWalletAdapter.signAndSendTransaction


getBalance(): Promise<bigint>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15149

Get native token balance

Promise<bigint>

Balance in smallest unit (lamports, wei, etc.)

If query fails

BaseWalletAdapter.getBalance


getTokenBalance(_asset): Promise<bigint>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15150

Get token balance for a specific asset

Asset

The asset to query balance for

Promise<bigint>

Balance in smallest unit

If query fails or asset not supported

BaseWalletAdapter.getTokenBalance


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

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15151

number

number

Promise<HardwareAccount[]>


switchAccount(accountIndex): Promise<HardwareAccount>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15152

number

Promise<HardwareAccount>


setShouldReject(shouldReject): void

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15153

boolean

void


setSigningDelay(delay): void

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15154

number

void


simulateLock(): void

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15155

void


simulateUnlock(): void

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15156

void