Skip to main content
Version: Next

Interface: RpcTypeToMessageMap

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:9

Maps each RPC message type to its corresponding parameters and result type.

Properties

wallet_getPermissions

wallet_getPermissions: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:14

Get permissions from the wallet.

params?

optional params?: ApiVersionRequest

result

result: [] | "accounts"[]

errors

errors: API_VERSION_NOT_SUPPORTED | UNKNOWN_ERROR

Returns

An array of permissions.


wallet_requestAccounts

wallet_requestAccounts: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:24

Request active accounts from the wallet.

params?

optional params?: RequestAccountsParameters & ApiVersionRequest

result

result: string[]

errors

errors: API_VERSION_NOT_SUPPORTED | UNKNOWN_ERROR

Param

Optional parameters for requesting accounts.

Returns

An array of account addresses as strings.


wallet_watchAsset

wallet_watchAsset: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:34

Watch an asset in the wallet.

params

params: WatchAssetParameters & ApiVersionRequest

result

result: boolean

errors

errors: NOT_ERC20 | USER_REFUSED_OP | INVALID_REQUEST_PAYLOAD | API_VERSION_NOT_SUPPORTED | UNKNOWN_ERROR

Param

The parameters required to watch an asset.

Returns

A boolean indicating if the operation was successful.


wallet_addStarknetChain

wallet_addStarknetChain: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:44

Add a new Starknet chain to the wallet.

params

params: AddStarknetChainParameters & ApiVersionRequest

result

result: boolean

errors

errors: USER_REFUSED_OP | INVALID_REQUEST_PAYLOAD | API_VERSION_NOT_SUPPORTED | UNKNOWN_ERROR

Param

The parameters required to add a new chain.

Returns

A boolean indicating if the operation was successful.


wallet_switchStarknetChain

wallet_switchStarknetChain: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:54

Switch the current Starknet chain in the wallet.

params

params: SwitchStarknetChainParameters & ApiVersionRequest

result

result: boolean

errors

errors: UNLISTED_NETWORK | USER_REFUSED_OP | CHAIN_ID_NOT_SUPPORTED | API_VERSION_NOT_SUPPORTED | UNKNOWN_ERROR

Param

The parameters required to switch chains.

Returns

A boolean indicating if the operation was successful.


wallet_requestChainId

wallet_requestChainId: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:63

Request the current chain ID from the wallet.

params?

optional params?: ApiVersionRequest

result

result: string

errors

errors: API_VERSION_NOT_SUPPORTED | UNKNOWN_ERROR

Returns

The current Starknet chain ID.


wallet_deploymentData

wallet_deploymentData: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:72

Get deployment data for a contract.

params?

optional params?: ApiVersionRequest

result

result: AccountDeploymentData

errors

errors: ACCOUNT_ALREADY_DEPLOYED | DEPLOYMENT_DATA_NOT_AVAILABLE | API_VERSION_NOT_SUPPORTED | UNKNOWN_ERROR

Returns

The deployment data result.


wallet_addInvokeTransaction

wallet_addInvokeTransaction: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:82

Add an invoke transaction to the wallet.

params

params: AddInvokeTransactionParameters & ApiVersionRequest

result

result: AddInvokeTransactionResult

errors

errors: USER_REFUSED_OP | INVALID_REQUEST_PAYLOAD | API_VERSION_NOT_SUPPORTED | UNKNOWN_ERROR

Param

The parameters required for the invoke transaction.

Returns

The result of adding the invoke transaction.


wallet_addDeclareTransaction

wallet_addDeclareTransaction: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:92

Add a declare transaction to the wallet.

params

params: AddDeclareTransactionParameters & ApiVersionRequest

result

result: AddDeclareTransactionResult

errors

errors: USER_REFUSED_OP | INVALID_REQUEST_PAYLOAD | API_VERSION_NOT_SUPPORTED | UNKNOWN_ERROR

Param

The parameters required for the declare transaction.

Returns

The result of adding the declare transaction.


wallet_signTypedData

wallet_signTypedData: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:102

Sign typed data using the wallet.

params

params: TypedData & ApiVersionRequest

result

result: SIGNATURE

errors

errors: USER_REFUSED_OP | INVALID_REQUEST_PAYLOAD | API_VERSION_NOT_SUPPORTED | UNKNOWN_ERROR

Param

The typed data to sign.

Returns

An array of signatures as strings.


wallet_supportedSpecs

wallet_supportedSpecs: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:111

Get the list of supported RPC specification versions.

params?

optional params?: undefined

result

result: SpecVersion[]

Returns

An array of supported specification strings.


wallet_supportedWalletApi

wallet_supportedWalletApi: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:120

Returns a list of wallet api versions compatible with the wallet. Notice this might be different from Starknet JSON-RPC spec

params?

optional params?: undefined

result

result: API_VERSION[]

Returns

An array of supported wallet api versions.


wallet_strk20InvokeTransaction

wallet_strk20InvokeTransaction: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:135

Submit a transaction containing STRK20 privacy protocol actions. Submits one or more STRK20 actions (deposit, withdraw, private transfer) as a single atomic transaction. The wallet shows an approval UI and may take significantly longer than wallet_addInvokeTransaction because SNIP-36 ZK proof generation is required; the dapp must tolerate long-running calls. Registration into the pool is transparent — if the user is not registered, NOT_REGISTERED is returned.

params

params: object

params.actions

actions: STRK20_ACTION[]

params.api_version?

optional api_version?: API_VERSION

result

result: object

result.transaction_hash

transaction_hash: string

errors

errors: USER_REFUSED_OP | INVALID_REQUEST_PAYLOAD | NOT_REGISTERED | INSUFFICIENT_PRIVATE_BALANCE | PRIVACY_LEAK | API_VERSION_NOT_SUPPORTED | UNKNOWN_ERROR

Param

An ordered list of STRK20 actions to execute atomically (min 1).

Returns

The transaction hash.


wallet_strk20PrepareInvoke

wallet_strk20PrepareInvoke: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:157

Build the Starknet call (and SNIP-36 ZK proof) for a STRK20 transaction without submitting it. The dapp submits the returned call itself. The wallet supplies the viewing key and the user's private state (channels, notes); the dapp only describes the actions. When simulate is true the wallet skips the expensive, state-revealing proof generation and returns the call with an empty proof — same shape, but NOT submittable on-chain (use for fee estimation / UI previews). NOT_REGISTERED if the user is not registered.

params

params: object

params.actions

actions: STRK20_ACTION[]

params.simulate?

optional simulate?: boolean

params.api_version?

optional api_version?: API_VERSION

result

result: STRK20_CALL_AND_PROOF

errors

errors: USER_REFUSED_OP | INVALID_REQUEST_PAYLOAD | NOT_REGISTERED | INSUFFICIENT_PRIVATE_BALANCE | PRIVACY_LEAK | API_VERSION_NOT_SUPPORTED | UNKNOWN_ERROR

Param

An ordered list of STRK20 actions to bundle (min 1).

Param

If true, skip proof generation and return an empty proof. Defaults to false.

Returns

The assembled call and proof (proof fields are empty when simulate is true).


wallet_strk20Balances

wallet_strk20Balances: object

Defined in: node_modules/@starknet-io/starknet-types-0103/dist/types/wallet-api/methods.d.ts:174

Query the user's private balances for a list of tokens, or for all shielded tokens. Returns the private balance held inside the pool for each requested token address; an empty array returns balances of all shielded tokens the wallet holds. NOT_REGISTERED if the user is not registered.

params

params: object

params.tokens

tokens: string[]

Token addresses to query. Pass an empty array to return balances of all shielded tokens in the privacy pool.

params.api_version?

optional api_version?: API_VERSION

result

result: STRK20_BALANCE_ENTRY[]

errors

errors: USER_REFUSED_OP | INVALID_REQUEST_PAYLOAD | NOT_REGISTERED | API_VERSION_NOT_SUPPORTED | UNKNOWN_ERROR

Param

Token addresses to query; an empty array returns all shielded tokens.

Returns

Balance per token.