Powerful testing utilities unique to Surfpool that allow you to directly modify account and token states. These methods are only available on Surfnet.
surfnet_setAccount
Sets or updates an account's properties including lamports, data, owner, and executable status.
| Name | Type | Description |
|---|---|---|
pubkey* | string | The public key of the account to update, as a base-58 encoded string. This identifies which account will be modified. |
update* | object | The account data to update. Contains the new values for lamports, owner, executable status, rent epoch, and data. |
└ data | string | The new account data, as a hex encoded string. This contains the actual data stored in the account. |
└ executable | boolean | Whether the account should be executable (true for program accounts, false for data accounts). |
└ lamports | integer | The new balance in lamports (1 SOL = 1,000,000,000 lamports). |
└ owner | string | The new owner program ID, as a base-58 encoded string. |
└ rentEpoch | integer | The new rent epoch in which this account will next owe rent. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_setAccount",
"params": [
"83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
{
"data": "0x3b9aca00",
"executable": true,
"lamports": 1000000000,
"owner": "11111111111111111111111111111111",
"rentEpoch": 100
}
]
}surfnet_setTokenAccount
Sets or updates a token account's properties including balance, delegate, state, and authorities.
| Name | Type | Description |
|---|---|---|
owner* | string | The public key of the token account owner, as a base-58 encoded string. This is the wallet that owns the token account. |
mint* | string | The public key of the token mint, as a base-58 encoded string. This identifies the specific token type (e.g., USDC, SOL). |
tokenProgram | string | The token program ID, as a base-58 encoded string. Defaults to SPL Token program if not specified. |
update* | object | The token account data to update. Contains new values for balance, delegate, state, and authorities. |
└ amount | integer | The new token balance amount in the smallest unit (e.g., lamports for SOL, or the smallest token unit). |
└ closeAuthority | string | The new close authority that can close the account and recover rent. |
└ delegate | string | The new delegate account that can spend tokens on behalf of the owner. |
└ delegatedAmount | integer | The new delegated amount that the delegate is authorized to spend. |
└ state | string | The new account state (e.g., 'initialized', 'frozen', 'closed'). |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_setTokenAccount",
"params": [
"11111111111111111111111111111111",
"<some-mint>",
{
"amount": 1000000000,
"closeAuthority": "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
"delegate": "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
"delegatedAmount": 1000000000,
"state": "<some-state>"
},
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
]
}surfnet_cloneProgramAccount
Clones a program account from one program ID to another, including its associated program data.
| Name | Type | Description |
|---|---|---|
sourceProgramId* | string | The public key of the source program to clone, as a base-58 encoded string. |
destinationProgramId* | string | The public key of the destination program, as a base-58 encoded string. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_cloneProgramAccount",
"params": [
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
]
}surfnet_profileTransaction
Profiles a transaction to analyze compute units, account changes, and execution details.
| Name | Type | Description |
|---|---|---|
transactionData* | string | The transaction data to profile, as a base-64 encoded string. This should be a serialized VersionedTransaction. |
tag | string | An optional tag to identify the profiling results. Useful for grouping related transaction profiles. |
config | object | Configuration for the profile result, including encoding format and profiling depth. |
└ depth | string | The depth of profiling - 'transaction' for overall transaction profile, 'instruction' for per-instruction breakdown. |
└ encoding | string | The encoding format for returned account data (e.g., 'base64', 'base58', 'jsonParsed'). |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | object | |
└ computeUnits | object | Compute units estimation result |
└ computeUnitsConsumed | integer | Number of compute units consumed |
└ errorMessage | string | Error message if estimation failed |
└ logMessages | array | Log messages from the transaction |
└ success | boolean | Indicates if the estimation was successful |
└ state | object | Profile state containing pre and post execution states |
└ postExecution | object | Account states after execution |
└ preExecution | object | Account states before execution |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_profileTransaction",
"params": [
"0x3b9aca00",
"<some-tag>",
{
"depth": "instruction",
"encoding": "base64"
}
]
}surfnet_getProfileResultsByTag
Retrieves all profiling results for transactions tagged with a specific identifier.
| Name | Type | Description |
|---|---|---|
tag* | string | The tag to retrieve profiling results for. Returns all transaction profiles that were tagged with this identifier. |
config | object | Configuration for the profile result, including encoding format and profiling depth. |
└ depth | string | The depth of profiling - 'transaction' for overall transaction profile, 'instruction' for per-instruction breakdown. |
└ encoding | string | The encoding format for returned account data (e.g., 'base64', 'base58', 'jsonParsed'). |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | array<ProfileResultSchema> | |
└ [] | object | Array item |
└ computeUnits | object | Compute units estimation result |
└ computeUnitsConsumed | integer | Number of compute units consumed |
└ errorMessage | string | Error message if estimation failed |
└ logMessages | array | Log messages from the transaction |
└ success | boolean | Indicates if the estimation was successful |
└ state | object | Profile state containing pre and post execution states |
└ postExecution | object | Account states after execution |
└ preExecution | object | Account states before execution |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_getProfileResultsByTag",
"params": [
"<some-tag>",
{
"depth": "instruction",
"encoding": "base64"
}
]
}surfnet_setSupply
Configures the network supply information including total, circulating, and non-circulating amounts.
| Name | Type | Description |
|---|---|---|
update* | object | The supply data to update. Contains new values for total, circulating, and non-circulating SOL amounts. |
└ circulating | integer | The new circulating supply of SOL in lamports (total supply minus non-circulating). |
└ nonCirculating | integer | The new non-circulating supply of SOL in lamports (locked in non-circulating accounts). |
└ nonCirculatingAccounts | array | The new list of non-circulating account addresses that hold locked SOL. |
└ total | integer | The new total supply of SOL in lamports across the entire network. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_setSupply",
"params": [
{
"circulating": 0,
"nonCirculating": 0,
"nonCirculatingAccounts": [],
"total": 0
}
]
}surfnet_setProgramAuthority
Sets or removes the upgrade authority for a program's ProgramData account.
| Name | Type | Description |
|---|---|---|
programId* | string | The public key of the program, as a base-58 encoded string. This is the program whose upgrade authority will be modified. |
newAuthority | string | The public key of the new authority, as a base-58 encoded string. If omitted, the program will have no upgrade authority (immutable). |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_setProgramAuthority",
"params": [
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"<some-newauthority>"
]
}surfnet_getTransactionProfile
Retrieves the detailed profile of a specific transaction by signature or UUID.
| Name | Type | Description |
|---|---|---|
signatureOrUuid* | object | object | The transaction signature (as a base-58 string) or a UUID (as a string) for which to retrieve the profile. This identifies the specific transaction to analyze. |
config | object | Configuration for the profile result, including encoding format and profiling depth. |
└ depth | string | The depth of profiling - 'transaction' for overall transaction profile, 'instruction' for per-instruction breakdown. |
└ encoding | string | The encoding format for returned account data (e.g., 'base64', 'base58', 'jsonParsed'). |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | object | |
└ instructionProfiles | array | |
└ key | UuidOrSignature | |
└ readonlyAccountStates | object | |
└ slot | integer | |
└ transactionProfile | object | |
└ accountStates | object | |
└ computeUnitsConsumed | integer | |
└ errorMessage | string | |
└ logMessages | array |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_getTransactionProfile",
"params": [
{
"uuid": "<some-uuid>"
},
{
"depth": "instruction",
"encoding": "base64"
}
]
}surfnet_registerIdl
Registers an IDL (Interface Definition Language) for a program to enable account data parsing.
| Name | Type | Description |
|---|---|---|
slot | integer | The slot at which to register the IDL. If omitted, uses the latest slot. This determines when the IDL becomes active for account parsing. |
idl* | object | The full IDL object to be registered in memory. The `address` field should match the program's public key. This enables account data parsing for the program. |
└ accounts* | array | The IDL accounts array defining all account types that the program can create or interact with. |
└ address* | string | The program address that this IDL describes, as a base-58 encoded string. |
└ constants* | array | The IDL constants array defining constant values used by the program. |
└ errors* | array | The IDL errors array defining custom error types that the program can return. |
└ events* | array | The IDL events array defining events that the program can emit. |
└ instructions* | array | The IDL instructions array defining all available program instructions and their parameters. |
└ metadata* | string | The IDL metadata containing program name, version, and description information. |
└ state | string | The IDL state object defining the program's state account structure (if applicable). |
└ types* | array | The IDL types array defining custom data types used by the program. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_registerIdl",
"params": [
{
"accounts": [],
"address": "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
"constants": [],
"errors": [],
"events": [],
"instructions": [],
"metadata": null,
"state": null,
"types": []
},
123456789
]
}surfnet_getActiveIdl
Retrieves the registered IDL for a specific program ID at a given slot.
| Name | Type | Description |
|---|---|---|
programId* | string | The public key of the program whose IDL is being requested, as a base-58 encoded string. This identifies which program's IDL to retrieve. |
slot | integer | The slot at which to query the IDL. If omitted, the latest slot will be used. This determines which version of the IDL to return. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | object | |
└ accounts | array<any> | The IDL accounts array defining all account types that the program can create or interact with. |
└ address | string | The program address that this IDL describes, as a base-58 encoded string. |
└ constants | array<any> | The IDL constants array defining constant values used by the program. |
└ errors | array<any> | The IDL errors array defining custom error types that the program can return. |
└ events | array<any> | The IDL events array defining events that the program can emit. |
└ instructions | array<any> | The IDL instructions array defining all available program instructions and their parameters. |
└ metadata | any | The IDL metadata containing program name, version, and description information. |
└ state | any | The IDL state object defining the program's state account structure (if applicable). |
└ types | array<any> | The IDL types array defining custom data types used by the program. |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_getActiveIdl",
"params": [
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
123456789
]
}surfnet_getLocalSignatures
Retrieves the most recent transaction signatures from the local network.
| Name | Type | Description |
|---|---|---|
limit | integer | The maximum number of signatures to return. Defaults to 50 if not specified. Returns the most recent signatures first. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | array<RpcLogsResponse> | |
└ [] | object | Array item |
└ err | object | |
└ errorType | string | Error type |
└ message | string | Error message |
└ logs | array<string> | |
└ signature | string |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_getLocalSignatures",
"params": [
0
]
}surfnet_timeTravel
Sets the network's current epoch info to a future time based on the supplied epoch, slot, or time.
| Name | Type | Description |
|---|---|---|
config | string | Configuration specifying how to modify the clock. Can move to a specific epoch, slot, or timestamp. |
| Field | Type | Description |
|---|---|---|
absoluteSlot | integer | Absolute root slot |
blockHeight | integer | Block height |
epoch | integer | Current epoch |
slotIndex | integer | Current slot index within the epoch |
slotsInEpoch | integer | Total number of slots in the epoch |
transactionCount | integer | Current transaction count |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_timeTravel",
"params": [
{
"absoluteEpoch": 100
}
]
}surfnet_pauseClock
Pauses the local network's clock progression, halting block production.
| Field | Type | Description |
|---|---|---|
absoluteSlot | integer | Absolute root slot |
blockHeight | integer | Block height |
epoch | integer | Current epoch |
slotIndex | integer | Current slot index within the epoch |
slotsInEpoch | integer | Total number of slots in the epoch |
transactionCount | integer | Current transaction count |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_pauseClock",
"params": []
}surfnet_resumeClock
Resumes the network's block production if paused.
| Field | Type | Description |
|---|---|---|
absoluteSlot | integer | Absolute root slot |
blockHeight | integer | Block height |
epoch | integer | Current epoch |
slotIndex | integer | Current slot index within the epoch |
slotsInEpoch | integer | Total number of slots in the epoch |
transactionCount | integer | Current transaction count |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_resumeClock",
"params": []
}surfnet_resetAccount
Resets an account on the local network to its original state from the remote datasource.
| Name | Type | Description |
|---|---|---|
pubkey* | string | The base-58 encoded public key of the account to reset. |
config | object | Configuration for the reset operation. |
└ includeOwnedAccounts | boolean | If true, also resets accounts owned by the specified account. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_resetAccount",
"params": [
"83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
{
"includeOwnedAccounts": true
}
]
}surfnet_exportSnapshot
Exports a snapshot of all accounts in the Surfnet SVM.
| Name | Type | Description |
|---|---|---|
config | object | Configuration for the export operation. |
└ includeParsedAccounts | boolean | If true, includes parsed account data in the snapshot. |
└ filter | object | Filter configuration to limit which accounts are included. |
└ includeProgramAccounts | boolean | Whether to include program accounts in the snapshot. |
└ includeAccounts | array | List of specific account public keys to include. |
└ excludeAccounts | array | List of specific account public keys to exclude. |
└ scope | string | object | Scope to limit the accounts included. Options are 'network' (all accounts) or 'preTransaction' (accounts touched by a transaction). |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | object | Map of account public keys to their snapshots |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_exportSnapshot",
"params": [
{
"includeParsedAccounts": true,
"filter": {
"includeProgramAccounts": true,
"includeAccounts": [],
"excludeAccounts": []
},
"scope": "network"
}
]
}surfnet_streamAccount
Registers an account for streaming, downloading it from the datasource every time rather than caching it in the SVM.
| Name | Type | Description |
|---|---|---|
pubkey* | string | The base-58 encoded public key of the account to stream. |
config | object | Configuration for the stream operation. |
└ includeOwnedAccounts | boolean | If true, also streams accounts owned by the specified account. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_streamAccount",
"params": [
"83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
{
"includeOwnedAccounts": true
}
]
}surfnet_streamAccounts
Registers multiple accounts for streaming from the datasource in a single batch call. See also `surfnet_streamAccount`.
| Name | Type | Description |
|---|---|---|
accounts* | array[StreamAccountsEntry] | List of accounts to register for streaming. Each entry specifies a pubkey and an optional flag to also stream accounts it owns. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_streamAccounts",
"params": [
[]
]
}surfnet_offlineAccount
Prevents an account (and optionally accounts it owns) from being downloaded from the remote RPC. See also `surfnet_streamAccount`.
| Name | Type | Description |
|---|---|---|
pubkey* | string | The base-58 encoded public key of the account or program to mark offline. |
config | object | Configuration for the offline operation. |
└ includeOwnedAccounts | boolean | If true, also marks accounts owned by the specified account as offline. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_offlineAccount",
"params": [
"83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
{
"includeOwnedAccounts": true
}
]
}surfnet_writeProgram
Writes program data at a specified offset, allowing deployment of large programs by sending data in chunks.
| Name | Type | Description |
|---|---|---|
programId* | string | The public key of the program account, as a base-58 encoded string. |
data* | string | Hex-encoded program data chunk to write. |
offset* | integer | The byte offset at which to write this data chunk. |
authority | string | The base-58 encoded public key of the authority allowed to write to the program. Defaults to the system program if omitted. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_writeProgram",
"params": [
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"0x3b9aca00",
0,
"<some-authority>"
]
}surfnet_registerScenario
Registers a scenario with account overrides for testing different network states.
| Name | Type | Description |
|---|---|---|
slot | integer | The base slot from which relative slot offsets are calculated. If omitted, uses the current slot. |
scenario* | object | The scenario object containing overrides. |
└ id* | string | Unique identifier for the scenario. |
└ name* | string | Human-readable name. |
└ description* | string | Description of this scenario. |
└ overrides* | array[OverrideInstance] | List of override instances in this scenario. |
└ tags* | array[string] | Tags for categorization. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_registerScenario",
"params": [
{
"id": "<some-id>",
"name": "<some-name>",
"description": "<some-description>",
"overrides": [
{
"id": "<some-id>",
"templateId": "<some-templateid>",
"values": {},
"scenarioRelativeSlot": 123456789,
"label": "<some-label>",
"enabled": true,
"fetchBeforeUse": true,
"account": {
"pubkey": "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"
}
}
],
"tags": [
"<some-tags>"
]
},
123456789
]
}surfnet_enableCheatcode
Re-enables one or more previously disabled Surfpool cheatcode RPC methods for the current session. See also `surfnet_disableCheatcode`.
| Name | Type | Description |
|---|---|---|
cheatcodesFilter* | string | array | Which cheatcodes to enable: either the string "all" or an explicit list of method names. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_enableCheatcode",
"params": [
"all"
]
}surfnet_disableCheatcode
Disables one or more Surfpool cheatcode RPC methods for the current session. Without `lockout=true`, `surfnet_enableCheatcode` and `surfnet_disableCheatcode` themselves cannot be disabled. See also `surfnet_enableCheatcode`.
| Name | Type | Description |
|---|---|---|
cheatcodesFilter* | string | array | Which cheatcodes to disable: either the string "all" or an explicit list of method names. |
config | object | Optional control config. When `lockout` is true, `surfnet_enableCheatcode` and `surfnet_disableCheatcode` may themselves be disabled. |
└ lockout | boolean | If true, the disable operation is permitted to disable `surfnet_enableCheatcode` and `surfnet_disableCheatcode` themselves, locking the cheatcode surface for the rest of the session. |
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_disableCheatcode",
"params": [
"all",
{
"lockout": true
}
]
}surfnet_resetNetwork
Resets the entire network to its initial state
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | null |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_resetNetwork",
"params": []
}surfnet_getStreamedAccounts
Retrieves the list of accounts registered for streaming
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | object | |
└ accounts | array<StreamedAccountInfoSchema> | |
└ [] | object | Array item |
└ pubkey | string | Account public key as base-58 string |
└ includeOwnedAccounts | boolean | Whether owned accounts are also streamed |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_getStreamedAccounts",
"params": []
}surfnet_getSurfnetInfo
Retrieves Surfnet network information
| Field | Type | Description |
|---|---|---|
context | object | |
└ apiVersion | string | The API version |
└ slot | integer | The current slot |
value | object | |
└ runbookExecutions | array<RunbookExecutionStatusSchema> | |
└ [] | object | Array item |
└ startedAt | integer | Unix timestamp when execution started |
└ completedAt | integer | Unix timestamp when execution completed (null if still running) |
└ runbookId | string | Identifier of the runbook |
└ errors | array | List of errors encountered during execution |
{
"jsonrpc": "2.0",
"id": 1,
"method": "surfnet_getSurfnetInfo",
"params": []
}Is this page helpful?