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?
optionalparams?: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?
optionalparams?: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
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?
optionalparams?: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?
optionalparams?: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
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
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?
optionalparams?:undefined
result
result:
string[]
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?
optionalparams?:undefined
result
result:
string[]
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:129
Execute a STRK20 privacy protocol transaction directly.
params
params:
object
params.actions
actions:
STRK20_ACTION[]
params.api_version?
optionalapi_version?:string
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
The list of STRK20 actions to perform (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:145
Prepare a STRK20 invoke transaction by building the calldata and generating a ZK proof. Pass simulate: true to skip proof generation (for fee estimation or preview).
params
params:
object
params.actions
actions:
STRK20_ACTION[]
params.simulate?
optionalsimulate?:boolean
params.api_version?
optionalapi_version?:string
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
The list of STRK20 actions and optional simulate flag.
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:159
Get STRK20 private balances for the given tokens.
params
params:
object
params.tokens
tokens:
string[]
params.api_version?
optionalapi_version?:string
result
result:
STRK20_BALANCE_ENTRY[]
errors
errors:
USER_REFUSED_OP|INVALID_REQUEST_PAYLOAD|NOT_REGISTERED|API_VERSION_NOT_SUPPORTED|UNKNOWN_ERROR
Param
The list of token addresses to query (min 1).
Returns
Balance per token.