MockTrezorAdapter
SIP Protocol API Reference v0.15.1
SIP Protocol API Reference / MockTrezorAdapter
Class: MockTrezorAdapter
Section titled “Class: MockTrezorAdapter”Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15132
Mock Trezor adapter for testing
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MockTrezorAdapter(
config):MockTrezorAdapter
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15140
Parameters
Section titled “Parameters”config
Section titled “config”Returns
Section titled “Returns”MockTrezorAdapter
Overrides
Section titled “Overrides”Properties
Section titled “Properties”
readonlychain:ChainId
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15133
Chain this adapter connects to
Overrides
Section titled “Overrides”
readonlyname:string
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15134
Wallet name/identifier (e.g., ‘phantom’, ‘metamask’)
Overrides
Section titled “Overrides”Accessors
Section titled “Accessors”address
Section titled “address”Get Signature
Section titled “Get Signature”get address():
string
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:12601
Current address (empty string if not connected)
Returns
Section titled “Returns”string
Current address (empty string if not connected)
Inherited from
Section titled “Inherited from”publicKey
Section titled “publicKey”Get Signature
Section titled “Get Signature”get publicKey():
""|`0x${string}`
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:12602
Public key (hex encoded, empty string if not connected)
Returns
Section titled “Returns”"" | `0x${string}`
Public key (hex encoded, empty string if not connected)
Inherited from
Section titled “Inherited from”connectionState
Section titled “connectionState”Get Signature
Section titled “Get Signature”get connectionState():
WalletConnectionState
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:12603
Current connection state
Returns
Section titled “Returns”Current connection state
Inherited from
Section titled “Inherited from”BaseWalletAdapter.connectionState
deviceInfo
Section titled “deviceInfo”Get Signature
Section titled “Get Signature”get deviceInfo():
HardwareDeviceInfo|null
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15141
Returns
Section titled “Returns”HardwareDeviceInfo | null
derivationPath
Section titled “derivationPath”Get Signature
Section titled “Get Signature”get derivationPath():
string
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15142
Returns
Section titled “Returns”string
account
Section titled “account”Get Signature
Section titled “Get Signature”get account():
HardwareAccount|null
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15143
Returns
Section titled “Returns”HardwareAccount | null
Methods
Section titled “Methods”on<
T>(event,handler):void
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:12608
Subscribe to wallet events
Type Parameters
Section titled “Type Parameters”T extends WalletEventType
Parameters
Section titled “Parameters”T
handler
Section titled “handler”WalletEventHandler<Extract<WalletConnectEvent, { type: T; }> | Extract<WalletDisconnectEvent, { type: T; }> | Extract<WalletAccountChangedEvent, { type: T; }> | Extract<WalletChainChangedEvent, { type: T; }> | Extract<WalletErrorEvent, { type: T; }>>
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”off<
T>(event,handler):void
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:12614
Unsubscribe from wallet events
Type Parameters
Section titled “Type Parameters”T extends WalletEventType
Parameters
Section titled “Parameters”T
handler
Section titled “handler”WalletEventHandler<Extract<WalletConnectEvent, { type: T; }> | Extract<WalletDisconnectEvent, { type: T; }> | Extract<WalletAccountChangedEvent, { type: T; }> | Extract<WalletChainChangedEvent, { type: T; }> | Extract<WalletErrorEvent, { type: T; }>>
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”isConnected()
Section titled “isConnected()”isConnected():
boolean
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:12644
Check if wallet is connected
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”connect()
Section titled “connect()”connect():
Promise<void>
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15144
Connect to the wallet
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”If connection fails
Overrides
Section titled “Overrides”disconnect()
Section titled “disconnect()”disconnect():
Promise<void>
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15145
Disconnect from the wallet
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”signMessage()
Section titled “signMessage()”signMessage(
message):Promise<Signature>
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15146
Sign an arbitrary message
Parameters
Section titled “Parameters”message
Section titled “message”Uint8Array
The message bytes to sign
Returns
Section titled “Returns”Promise<Signature>
The signature
Throws
Section titled “Throws”If signing fails or wallet not connected
Overrides
Section titled “Overrides”signTransaction()
Section titled “signTransaction()”signTransaction(
tx):Promise<SignedTransaction>
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15147
Sign a transaction
Parameters
Section titled “Parameters”The unsigned transaction
Returns
Section titled “Returns”Promise<SignedTransaction>
The signed transaction
Throws
Section titled “Throws”If signing fails or wallet not connected
Overrides
Section titled “Overrides”BaseWalletAdapter.signTransaction
signAndSendTransaction()
Section titled “signAndSendTransaction()”signAndSendTransaction(
tx):Promise<TransactionReceipt>
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15148
Sign and broadcast a transaction
Parameters
Section titled “Parameters”The unsigned transaction
Returns
Section titled “Returns”Promise<TransactionReceipt>
The transaction receipt
Throws
Section titled “Throws”If signing or broadcast fails
Overrides
Section titled “Overrides”BaseWalletAdapter.signAndSendTransaction
getBalance()
Section titled “getBalance()”getBalance():
Promise<bigint>
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15149
Get native token balance
Returns
Section titled “Returns”Promise<bigint>
Balance in smallest unit (lamports, wei, etc.)
Throws
Section titled “Throws”If query fails
Overrides
Section titled “Overrides”getTokenBalance()
Section titled “getTokenBalance()”getTokenBalance(
_asset):Promise<bigint>
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15150
Get token balance for a specific asset
Parameters
Section titled “Parameters”_asset
Section titled “_asset”The asset to query balance for
Returns
Section titled “Returns”Promise<bigint>
Balance in smallest unit
Throws
Section titled “Throws”If query fails or asset not supported
Overrides
Section titled “Overrides”BaseWalletAdapter.getTokenBalance
getAccounts()
Section titled “getAccounts()”getAccounts(
startIndex?,count?):Promise<HardwareAccount[]>
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15151
Parameters
Section titled “Parameters”startIndex?
Section titled “startIndex?”number
count?
Section titled “count?”number
Returns
Section titled “Returns”Promise<HardwareAccount[]>
switchAccount()
Section titled “switchAccount()”switchAccount(
accountIndex):Promise<HardwareAccount>
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15152
Parameters
Section titled “Parameters”accountIndex
Section titled “accountIndex”number
Returns
Section titled “Returns”Promise<HardwareAccount>
setShouldReject()
Section titled “setShouldReject()”setShouldReject(
shouldReject):void
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15153
Parameters
Section titled “Parameters”shouldReject
Section titled “shouldReject”boolean
Returns
Section titled “Returns”void
setSigningDelay()
Section titled “setSigningDelay()”setSigningDelay(
delay):void
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15154
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
simulateLock()
Section titled “simulateLock()”simulateLock():
void
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15155
Returns
Section titled “Returns”void
simulateUnlock()
Section titled “simulateUnlock()”simulateUnlock():
void
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15156
Returns
Section titled “Returns”void