The Ultralight client exposes a JSON-RPC interface that allows for low-level interaction with the node. A list of methods exposed can be found below but is not guaranteed to be up to date. Please refer to the source for all currently available methods.
The below RPC methods from the Portal Network RPC specification are supported:
discv5 Discv5 Routing Table operations
discv5_nodeInfo
- Returns the NodeId and ENRdiscv5_updateNodeInfo
- Update a node in the Routing Tablediscv5_routingTableInfo
- Returns Routing Table K-Bucketsdiscv5_addEnr
- Adds an ENR to Discv5 Routing Tablediscv5_getEnr
- Retrieves an ENR by NodeIddiscv5_deleteEnr
- Deletes an ENR from Routing Tablediscv5_lookupEnr
- Lookup node by NodeId
portal_ Portal Network subnetwork operations.
portal_statePing
portal_stateRoutingTableInfo
portal_stateStore
portal_stateLocalContent
portal_stateGossip
portal_stateFindContent
portal_stateRecursiveFindContent
portal_stateOffer
portal_stateSendOffer
portal_historyRoutingTableInfo
portal_historyAddEnr
portal_historyGetEnr
portal_historyDeleteEnr
portal_historyLookupEnr
portal_historySendPing
portal_historySendPong
portal_historySendFindNodes
portal_historySendNodes
portal_historySendFindContent
portal_historySendContent
portal_historySendOffer
portal_historySendAccept
portal_historyPing
portal_historyFindNodes
portal_historyFindContent
portal_historyOffer
portal_historyRecursiveFindNodes
portal_historyRecursiveFindContent
portal_historyStore
portal_historyLocalContent
portal_historyGossip
portal_beaconSendFindContent
- not currently in the spec but follows other network variants of this methodportal_beaconStore
- not currently in the spec but follows other network variants of this methodportal_beaconLocalContent
- not currently in the spec but follows other network variants of this method
In addition, we also have several other non-standard RPC methods for the history
and beacon
networks
portal_beaconAddBootNode
portal_beaconStartLightClient
- starts the Beacon Chain light client if not already startedportal_historyAddBootNode
- Adds a new ENR to HistoryNetwork routing tableportal_historyNodeInfo
- Returns NodeId and ENR of History Network supporting nodeportal_historyRoutingTableInfo
- Returns History Network Routing Table K-Bucketsportal_historyLookupEnr
- Lookup node by NodeIdportal_historyAddEnrs
- Add ENRs to Routing Tableportal_historyFindNodes
- Takes anodeId
and an array oflog2distances
and sends aFINDNODES
request to that nodeportal_historyLocalContent
- Search local database for contentportal_historyFindContent
- Ask a peer for content by content key
These endpoints emulate a subset of the the Ethereum JSON-RPC endpoints named, though data is sourced from Portal Network backends.
eth_getBlockByNumber
eth_getBlockByHash
eth_getBlockTransactionCountByHash
eth_getUncleCountByNumber
eth_getBalance
eth_call
Note: expect gaps in functionality in above methods
ultralight_addBlockToHistory
- Add an RLP serialized block header and body to databaseultralight_addContentToDB
- Add any content to databaseultralight_indexBlock
- Adds a block number to block hash mapping