Skip to content

MockTrezorAdapter

SIP Protocol API Reference v0.7.2


SIP Protocol API Reference / MockTrezorAdapter

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11413

Mock Trezor adapter for testing

new MockTrezorAdapter(config): MockTrezorAdapter

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11421

MockHardwareConfig

MockTrezorAdapter

BaseWalletAdapter.constructor

readonly chain: ChainId

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11414

Chain this adapter connects to

BaseWalletAdapter.chain


readonly name: string

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11415

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

BaseWalletAdapter.name

get address(): string

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:8993

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-CzWPI6Le.d.ts:8994

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-CzWPI6Le.d.ts:8995

Current connection state

WalletConnectionState

Current connection state

BaseWalletAdapter.connectionState


get deviceInfo(): HardwareDeviceInfo | null

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11422

HardwareDeviceInfo | null


get derivationPath(): string

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11423

string


get account(): HardwareAccount | null

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11424

HardwareAccount | null

on<T>(event, handler): void

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:9000

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-CzWPI6Le.d.ts:9006

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-CzWPI6Le.d.ts:9036

Check if wallet is connected

boolean

BaseWalletAdapter.isConnected


connect(): Promise<void>

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11425

Connect to the wallet

Promise<void>

If connection fails

BaseWalletAdapter.connect


disconnect(): Promise<void>

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11426

Disconnect from the wallet

Promise<void>

BaseWalletAdapter.disconnect


signMessage(message): Promise<Signature>

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11427

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-CzWPI6Le.d.ts:11428

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-CzWPI6Le.d.ts:11429

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-CzWPI6Le.d.ts:11430

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-CzWPI6Le.d.ts:11431

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-CzWPI6Le.d.ts:11432

number

number

Promise<HardwareAccount[]>


switchAccount(accountIndex): Promise<HardwareAccount>

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11433

number

Promise<HardwareAccount>


setShouldReject(shouldReject): void

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11434

boolean

void


setSigningDelay(delay): void

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11435

number

void


simulateLock(): void

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11436

void


simulateUnlock(): void

Defined in: @sip-protocol/sdk/dist/index-CzWPI6Le.d.ts:11437

void