RPC

Admin

Administrative controls for managing the Surfnet instance

Administrative controls for managing the Surfnet instance, plugins, and system configuration.

exit

Immediately shuts down the RPC server.

Result
FieldTypeDescription
result
nullexit - Immediately shuts down the RPC server
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "exit",  "params": []}

reloadPlugin

Reloads a runtime plugin with new configuration.

Parameters
NameTypeDescription
name*
stringThe name of the plugin to reload.
configFile*
stringThe path to the new configuration file for the plugin.
Result
FieldTypeDescription
configFile
string
name
string
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "reloadPlugin",  "params": {    "name": "<some-name>",    "configFile": "<some-configfile>"  }}

unloadPlugin

Unloads a runtime plugin.

Parameters
NameTypeDescription
name*
stringThe name of the plugin to unload.
Result
FieldTypeDescription
name
string
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "unloadPlugin",  "params": {    "name": "<some-name>"  }}

loadPlugin

Dynamically loads a new plugin into the runtime from a configuration file.

Parameters
NameTypeDescription
configFile*
stringThe path to the configuration file for the new plugin.
Result
FieldTypeDescription
configFile
string
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "loadPlugin",  "params": {    "configFile": "<some-configfile>"  }}

listPlugins

Returns a list of all currently loaded plugin names.

Result
FieldTypeDescription
result
array<string>listPlugins - Lists all loaded plugins
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "listPlugins",  "params": []}

rpcAddress

Returns the address of the RPC server.

Result
FieldTypeDescription
ip
string
port
integer
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "rpcAddress",  "params": []}

setLogFilter

Sets a filter for log messages in the system.

Parameters
NameTypeDescription
filter*
stringThe log filter string to apply.
Result
FieldTypeDescription
result
nullsetLogFilter - Sets log filter
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "setLogFilter",  "params": {    "filter": "<some-filter>"  }}

startTime

Returns the system start time.

Result
FieldTypeDescription
nanos
integerNanoseconds
secsSinceEpoch
integerSeconds since Unix epoch
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "startTime",  "params": []}

addAuthorizedVoter

Adds an authorized voter to the system.

Parameters
NameTypeDescription
keypairFile*
stringPath to the keypair file for the authorized voter.
Result
FieldTypeDescription
result
nulladdAuthorizedVoter - Adds authorized voter
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "addAuthorizedVoter",  "params": {    "keypairFile": "<some-keypairfile>"  }}

addAuthorizedVoterFromBytes

Adds an authorized voter to the system using a byte-encoded keypair.

Parameters
NameTypeDescription
keypair*
array[integer]Byte array representing the keypair for the authorized voter.
Result
FieldTypeDescription
result
nulladdAuthorizedVoterFromBytes - Adds voter from bytes
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "addAuthorizedVoterFromBytes",  "params": {    "keypair": [      0    ]  }}

removeAllAuthorizedVoters

Removes all authorized voters from the system.

Result
FieldTypeDescription
result
nullremoveAllAuthorizedVoters - Removes all voters
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "removeAllAuthorizedVoters",  "params": []}

setIdentity

Sets the identity for the system using the provided keypair.

Parameters
NameTypeDescription
keypairFile*
stringPath to the keypair file to be used as the node's identity.
requireTower*
booleanBoolean indicating if a tower is required for this identity.
Result
FieldTypeDescription
result
nullsetIdentity - Sets cluster identity
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "setIdentity",  "params": {    "keypairFile": "<some-keypairfile>",    "requireTower": true  }}

setIdentityFromBytes

Sets the identity for the system using a keypair provided as a byte array.

Parameters
NameTypeDescription
identityKeypair*
array[integer]Byte array representing the identity keypair.
requireTower*
booleanBoolean indicating if a tower is required for this identity.
Result
FieldTypeDescription
result
nullsetIdentityFromBytes - Sets identity from bytes
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "setIdentityFromBytes",  "params": {    "identityKeypair": [      0    ],    "requireTower": true  }}

setStakedNodesOverrides

Sets the overrides for staked nodes using a specified path.

Parameters
NameTypeDescription
path*
stringPath to the file containing staked nodes overrides.
Result
FieldTypeDescription
result
nullsetStakedNodesOverrides - Sets staked nodes overrides
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "setStakedNodesOverrides",  "params": {    "path": "<some-path>"  }}

repairShredFromPeer

Repairs a shred from a peer node in the network.

Parameters
NameTypeDescription
pubkey
stringThe public key of the peer to repair from, as a base-58 encoded string.
slot*
integerThe slot of the shred to repair.
shredIndex*
integerThe index of the shred to repair.
Result
FieldTypeDescription
result
nullrepairShredFromPeer - Repairs shred from peer
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "repairShredFromPeer",  "params": {    "pubkey": "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",    "slot": 123456789,    "shredIndex": 0  }}

setRepairWhitelist

Sets the whitelist of nodes allowed to repair shreds.

Parameters
NameTypeDescription
whitelist*
array[string]A list of public keys (base-58 encoded strings) to set as the repair whitelist.
Result
FieldTypeDescription
result
nullsetRepairWhitelist - Sets repair whitelist
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "setRepairWhitelist",  "params": {    "whitelist": [      "<some-whitelist>"    ]  }}

getSecondaryIndexKeySize

Retrieves the size of the secondary index key for a given account.

Parameters
NameTypeDescription
pubkeyStr*
stringThe public key of the account to get the secondary index key size for, as a base-58 encoded string.
Result
FieldTypeDescription
result
integergetSecondaryIndexKeySize - Gets secondary index key size
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "getSecondaryIndexKeySize",  "params": {    "pubkeyStr": "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"  }}

setPublicTpuAddress

Sets the public TPU (Transaction Processing Unit) address.

Parameters
NameTypeDescription
publicTpuAddr*
stringThe public TPU address as a string.
Result
FieldTypeDescription
result
nullsetPublicTpuAddress - Sets public TPU address
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "setPublicTpuAddress",  "params": {    "publicTpuAddr": "<some-publictpuaddr>"  }}

setPublicTpuForwardsAddress

Sets the public TPU forwards address.

Parameters
NameTypeDescription
publicTpuForwardsAddr*
stringThe public TPU forwards address as a string.
Result
FieldTypeDescription
result
nullsetPublicTpuForwardsAddress - Sets public TPU forwards address
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "setPublicTpuForwardsAddress",  "params": {    "publicTpuForwardsAddr": "<some-publictpuforwardsaddr>"  }}

On this page