Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kynesys.xyz/llms.txt

Use this file to discover all available pages before exploring further.

JSON-RPC Methods

Every Demos node exposes a single JSON-RPC entry point at POST /. Requests are dispatched by processPayload in src/libs/network/rpcDispatch.ts; the HTTP server that hosts it lives in src/libs/network/server_rpc.ts.

Request and response shape

A request is a JSON object with a method string and a params array (validated by isRPCRequest):
{
  "method": "ping",
  "params": []
}
Every method returns an RPCResponse:
{
  "result": 200,
  "response": "pong",
  "require_reply": false,
  "extra": null
}
FieldTypeMeaning
resultnumberStatus code (HTTP-like: 200 ok, 400 bad request, 401 unauthorized, 500 error, 501 method not implemented).
responseanyMethod payload (string, object, array, or number).
require_replybooleanWhether the caller is expected to reply (used by peer routines).
extraany | nullOptional auxiliary data (e.g. error details, block metadata).
Unknown methods return result: 501 with "Method not implemented: <method>".
The server may attach X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers to responses so SDK clients can self-throttle.

Top-level methods

These are the case branches of the processPayload switch.
MethodDescription
pingLiveness check. Returns result: 200, response: "pong".
executeSubmit a transaction bundle (BundleContent) for execution via manageExecution.
nativeBridgeProcess a native bridge operation via manageNativeBridge.
hello_peerPeer handshake/introduction (manageHelloPeer).
mempoolMerge a peer’s mempool into the local mempool.
peerlistExchange/handle peer lists.
authAuthentication message handling (manageAuth).
nodeCallDispatch a read-only sub-method from the handler registry (see below).
login_requestBrowser login request (handleLoginRequest).
login_responseBrowser login response (handleLoginResponse).
consensus_routineConsensus protocol routine (manageConsensusRoutines).
gcr_routineGlobal Chain Registry routine (manageGCRRoutines).
bridgeCross-chain bridge routine (manageBridges).
web2ProxyRequestProxy a Web2 HTTP request (handleWeb2ProxyRequest).
rate-limit/unblockSUDO. Unblock an array of IP addresses on the rate limiter.
getCampaignDataSUDO. Return GCR campaign data.
awardPointsSUDO. Award points to accounts (GCR.awardPoints).
verifyProofVerify a ZK identity attestation proof and check nullifier reuse.

SUDO-protected methods

The following methods are listed in PROTECTED_ENDPOINTS and require the caller’s authenticated public key to equal the node’s SUDO_PUBKEY. Unauthorized callers receive result: 401, response: "Unauthorized sender":
  • rate-limit/unblock
  • getCampaignData
  • awardPoints
See Protected Endpoints for how SUDO authentication is configured and enforced.

nodeCall sub-method registry

nodeCall takes a single NodeCall object in params[0] and routes it to a named handler from handlerRegistry (src/libs/network/handlers/index.ts). Handlers are read-only and grouped by domain.
{
  "method": "nodeCall",
  "params": [{ "method": "getLastBlockNumber" }]
}

Peer handlers

Source: peerHandlers.ts.
HandlerDescription
getPeerInfoReturn this node’s peer info.
getPeerlistReturn the known peer list.
getPeerlistHashSHA-256 hash of the peer list.
getPeerIdentityThis node’s public key (hex).
getPeerTimeCurrent node time (epoch ms).

Block handlers

Source: blockHandlers.ts.
HandlerDescription
getGenesisDataHashHash of the genesis data.
getPreviousHashFromBlockNumberPrevious block hash given a block number.
getPreviousHashFromBlockHashPrevious block hash given a block hash.
getBlockHeaderByNumberBlock header by number.
getBlockHeaderByHashBlock header by hash.
getLastBlockNumberTip block number.
getLastBlockFull tip block.
getLastBlockHashTip block hash.
getBlockByNumberFull block by number.
getBlocksRange/batch of blocks.
getBlockByHashFull block by hash (hash or blockHash).
getBlockTransactionsTransactions in a block (blockHash).

Transaction handlers

Source: transactionHandlers.ts.
HandlerDescription
getTransactionsQuery transactions.
getTransactionStatusStatus of a transaction.
getTxByHashSingle transaction by hash.
getTxsByHashesMultiple transactions by hashes.
getAllTxsDeprecated; returns {}.
getTransactionHistoryHistory for an address + type (paginated).
getMempoolCurrent mempool contents.

Identity handlers

Source: identityHandlers.ts.
HandlerDescription
getAddressInfoGCR account info for an address.
getAddressNonceCurrent nonce for an address.
getNativeSubnetsTxsNative subnet transactions for a subnetId.
getTweetFetch tweet data by tweetUrl.
getDiscordMessageFetch Discord message by discordUrl.
resolveUdDomainResolve an Unstoppable Domains domain.

Validator handlers

Source: validatorHandlers.ts.
HandlerDescription
getValidatorInfoValidator record for an address.
getValidatorsValidator set (optionally at a blockNumber).
getStakedAmountStaked amount for a validator address.

Governance handlers

Source: governanceHandlers.ts.
HandlerDescription
getNetworkParametersActive NetworkParameters.
getActiveProposalsOpen proposals (pending/approved/activating).
getProposalVotesLive tally for a proposalId.
getUpgradeHistoryProposals that reached active.

Storage program handlers

Source: storageProgramHandlers.ts. ACL-enforced read side.
HandlerDescription
getStorageProgramRead a storage program by address.
getStorageProgramAllRead the program’s raw data.
getStorageProgramFieldsList top-level field names.
getStorageProgramFieldTypeType of a field.
getStorageProgramItemItem from an array field.
getStorageProgramValueValue of a field.
getStorageProgramsByOwnerPrograms owned by an address.
hasStorageProgramFieldWhether a field exists.
searchStorageProgramsSearch programs by name.

Fork handlers

Source: forkHandlers.ts.
HandlerDescription
getNetworkInfoFork-activation status (e.g. osDenomination) plus node version info.

TLSNotary handlers

Source: tlsnotaryHandlers.ts.
HandlerDescription
requestTLSNproxyRequest a TLS attestation proxy for a targetUrl.
tlsnotary.getInfoNotary/proxy URLs and public key.
tlsnotary.getTokenLook up a token by tokenId or txHash.
tlsnotary.getTokenStatsAggregate token statistics.

L2PS handlers

Source: l2psHandlers.ts.
HandlerDescription
getL2PSParticipationByIdWhether this node participates in an l2psUid.
getL2PSMempoolInfoMempool summary for an l2psUid.
getL2PSTransactionsExecuted transactions for an l2psUid (optionally since_timestamp).
getL2PSAccountTransactionsSigned/authenticated account history for an l2psUid + address.

Misc handlers

Source: miscHandlers.ts.
HandlerDescription
RELAY_TXReceive relayed transactions (DTR).
hotsEaster-egg/diagnostic routine.