Celestia Node API Playground

v0.0.1

The Celestia Node API is the collection of RPC methods that can be used to interact with the services provided by Celestia Data Availability Nodes.

daser

SamplingStats()das.SamplingStatsperms: read

SamplingStats returns the current statistics over the DA sampling process.

Request
Response

WaitCatchUp()perms: read

WaitCatchUp blocks until DASer finishes catching up to the network head.

Request
Response

fraud

Get(proofType fraud.ProofType)[]Proofperms: public

Get fetches fraud proofs from the disk by its type.

Request
Response

Subscribe(proofType fraud.ProofType)<-chan Proofperms: public

Subscribe allows to subscribe on a Proof pub sub topic by its type.

Request
Response

node

AuthNew(perms []auth.Permission)[]byteperms: admin

AuthNew signs and returns a new token with the given permissions.

Request
Response

AuthVerify(token string)[]auth.Permissionperms: admin

AuthVerify returns the permissions assigned to the given token.

Request
Response

Info()Infoperms: admin

Info returns administrative information about the node.

Request
Response

LogLevelSet(name string, level string)perms: admin

LogLevelSet sets the given component log level to the given level.

Request
Response

p2p

BandwidthForPeer(id peer.ID)metrics.Statsperms: admin

BandwidthForPeer returns a Stats struct with bandwidth metrics associated with the given peer.ID. The metrics returned include all traffic sent / received for the peer, regardless of protocol.

Request
Response

BandwidthForProtocol(proto protocol.ID)metrics.Statsperms: admin

BandwidthForProtocol returns a Stats struct with bandwidth metrics associated with the given protocol.ID.

Request
Response

BandwidthStats()metrics.Statsperms: admin

BandwidthStats returns a Stats struct with bandwidth metrics for all data sent/received by the local peer, regardless of protocol or remote peer IDs.

Request
Response

BlockPeer(p peer.ID)perms: admin

BlockPeer adds a peer to the set of blocked peers.

Request
Response

ClosePeer(id peer.ID)perms: admin

ClosePeer closes the connection to a given peer.

Request
Response

Connect(pi peer.AddrInfo)perms: admin

Connect ensures there is a connection between this host and the peer with given peer.

Request
Response

Connectedness(id peer.ID)network.Connectednessperms: admin

Connectedness returns a state signaling connection capabilities.

Request
Response

Info()peer.AddrInfoperms: admin

Info returns administrative information about the node.

Request
Response

IsProtected(id peer.ID, tag string)boolperms: admin

IsProtected returns whether the given peer is protected.

Request
Response

ListBlockedPeers()[]peer.IDperms: admin

ListBlockedPeers returns a list of blocked peers.

Request
Response

NATStatus()network.Reachabilityperms: admin

NATStatus returns the current NAT status.

Request
Response

PeerInfo(id peer.ID)peer.AddrInfoperms: admin

PeerInfo returns a small slice of information Peerstore has on the given peer.

Request
Response

Peers()[]peer.IDperms: admin

Peers returns all peer IDs used across all inner stores.

Request
Response

Protect(id peer.ID, tag string)perms: admin

Protect adds a peer to the list of peers who have a bidirectional peering agreement that they are protected from being trimmed, dropped or negatively scored.

Request
Response

PubSubPeers(topic string)[]peer.IDperms: admin

PubSubPeers returns the peer IDs of the peers joined on the given topic.

Request
Response

ResourceState()rcmgr.ResourceManagerStatperms: admin

ResourceState returns the state of the resource manager.

Request
Response

UnblockPeer(p peer.ID)perms: admin

UnblockPeer removes a peer from the set of blocked peers.

Request
Response

Unprotect(id peer.ID, tag string)boolperms: admin

Unprotect removes a peer from the list of peers who have a bidirectional peering agreement that they are protected from being trimmed, dropped or negatively scored, returning a bool representing whether the given peer is protected or not.

Request
Response

share

GetEDS(root *share.Root)*rsmt2d.ExtendedDataSquareperms: public

GetEDS gets the full EDS identified by the given root.

Request
Response

GetShare(dah *share.Root, row int, col int)share.Shareperms: public

GetShare gets a Share by coordinates in EDS.

Request
Response

GetSharesByNamespace(root *share.Root, namespace namespace.ID)share.NamespacedSharesperms: public

GetSharesByNamespace gets all shares from an EDS within the given namespace. Shares are returned in a row-by-row order if the namespace spans multiple rows.

Request
Response

ProbabilityOfAvailability()float64perms: public

ProbabilityOfAvailability calculates the probability of the data square being available based on the number of samples collected.

Request
Response

SharesAvailable(root *share.Root)perms: public

SharesAvailable subjectively validates if Shares committed to the given Root are available on the Network.

Request
Response

state

AccountAddress()state.Addressperms: read

AccountAddress retrieves the address of the node's account/signer

Request
Response

Balance()*state.Balanceperms: read

Balance retrieves the Celestia coin balance for the node's account/signer and verifies it against the corresponding block's AppHash.

Request
Response

BalanceForAddress(addr state.Address)*state.Balanceperms: public

BalanceForAddress retrieves the Celestia coin balance for the given address and verifies the returned balance against the corresponding block's AppHash. NOTE: the balance returned is the balance reported by the block right before the node's current head (head-1). This is due to the fact that for block N, the block's `AppHash` is the result of applying the previous block's transaction list.

Request
Response

BeginRedelegate(srcValAddr state.ValAddress, dstValAddr state.ValAddress, amount state.Int, fee state.Int, gasLim uint64)*state.TxResponseperms: write

BeginRedelegate sends a user's delegated tokens to a new validator for redelegation.

Request
Response

CancelUnbondingDelegation(valAddr state.ValAddress, amount state.Int, height state.Int, fee state.Int, gasLim uint64)*state.TxResponseperms: write

CancelUnbondingDelegation cancels a user's pending undelegation from a validator.

Request
Response

Delegate(delAddr state.ValAddress, amount state.Int, fee state.Int, gasLim uint64)*state.TxResponseperms: write

Delegate sends a user's liquid tokens to a validator for delegation.

Request
Response

IsStopped()boolperms: public

IsStopped checks if the Module's context has been stopped

Request
Response

QueryDelegation(valAddr state.ValAddress)*types.QueryDelegationResponseperms: public

QueryDelegation retrieves the delegation information between a delegator and a validator.

Request
Response

QueryRedelegations(srcValAddr state.ValAddress, dstValAddr state.ValAddress)*types.QueryRedelegationsResponseperms: public

QueryRedelegations retrieves the status of the redelegations between a delegator and a validator.

Request
Response

QueryUnbonding(valAddr state.ValAddress)*types.QueryUnbondingDelegationResponseperms: public

QueryUnbonding retrieves the unbonding status between a delegator and a validator.

Request
Response

SubmitPayForBlob(nID namespace.ID, data []byte, fee state.Int, gasLim uint64)*state.TxResponseperms: write

SubmitPayForBlob builds, signs and submits a PayForBlob transaction.

Request
Response

SubmitTx(tx state.Tx)*state.TxResponseperms: write

SubmitTx submits the given transaction/message to the Celestia network and blocks until the tx is included in a block.

Request
Response

Transfer(to state.AccAddress, amount state.Int, fee state.Int, gasLimit uint64)*state.TxResponseperms: write

Transfer sends the given amount of coins from default wallet of the node to the given account address.

Request
Response

Undelegate(delAddr state.ValAddress, amount state.Int, fee state.Int, gasLim uint64)*state.TxResponseperms: write

Undelegate undelegates a user's delegated tokens, unbonding them from the current validator.

Request
Response