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.
WaitCatchUp()perms: read
WaitCatchUp blocks until DASer finishes catching up to the network head.
fraud
Get(proofType fraud.ProofType)[]Proofperms: public
Get fetches fraud proofs from the disk by its type.
Subscribe(proofType fraud.ProofType)<-chan Proofperms: public
Subscribe allows to subscribe on a Proof pub sub topic by its type.
header
GetByHash(hash libhead.Hash)*header.ExtendedHeaderperms: public
GetByHash returns the header of the given hash from the node's header store.
GetByHeight(u uint64)*header.ExtendedHeaderperms: public
GetByHeight returns the ExtendedHeader at the given height, blocking until header has been processed by the store or context deadline is exceeded.
GetVerifiedRangeByHeight(from *header.ExtendedHeader, to uint64)[]*header.ExtendedHeaderperms: public
GetVerifiedRangeByHeight returns the given range [from:to) of ExtendedHeaders from the node's header store and verifies that the returned headers are adjacent to each other.
LocalHead()*header.ExtendedHeaderperms: read
LocalHead returns the ExtendedHeader of the chain head.
NetworkHead()*header.ExtendedHeaderperms: public
NetworkHead provides the Syncer's view of the current network head.
SyncState()sync.Stateperms: read
SyncState returns the current state of the header Syncer.
SyncWait()perms: read
SyncWait blocks until the header Syncer is synced to network head.
node
AuthNew(perms []auth.Permission)[]byteperms: admin
AuthNew signs and returns a new token with the given permissions.
AuthVerify(token string)[]auth.Permissionperms: admin
AuthVerify returns the permissions assigned to the given token.
Info()Infoperms: admin
Info returns administrative information about the node.
LogLevelSet(name string, level string)perms: admin
LogLevelSet sets the given component log level to the given level.
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.
BandwidthForProtocol(proto protocol.ID)metrics.Statsperms: admin
BandwidthForProtocol returns a Stats struct with bandwidth metrics associated with the given protocol.ID.
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.
BlockPeer(p peer.ID)perms: admin
BlockPeer adds a peer to the set of blocked peers.
ClosePeer(id peer.ID)perms: admin
ClosePeer closes the connection to a given peer.
Connect(pi peer.AddrInfo)perms: admin
Connect ensures there is a connection between this host and the peer with given peer.
Connectedness(id peer.ID)network.Connectednessperms: admin
Connectedness returns a state signaling connection capabilities.
Info()peer.AddrInfoperms: admin
Info returns administrative information about the node.
IsProtected(id peer.ID, tag string)boolperms: admin
IsProtected returns whether the given peer is protected.
ListBlockedPeers()[]peer.IDperms: admin
ListBlockedPeers returns a list of blocked peers.
NATStatus()network.Reachabilityperms: admin
NATStatus returns the current NAT status.
PeerInfo(id peer.ID)peer.AddrInfoperms: admin
PeerInfo returns a small slice of information Peerstore has on the given peer.
Peers()[]peer.IDperms: admin
Peers returns all peer IDs used across all inner stores.
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.
PubSubPeers(topic string)[]peer.IDperms: admin
PubSubPeers returns the peer IDs of the peers joined on the given topic.
ResourceState()rcmgr.ResourceManagerStatperms: admin
ResourceState returns the state of the resource manager.
UnblockPeer(p peer.ID)perms: admin
UnblockPeer removes a peer from the set of blocked peers.
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.
state
AccountAddress()state.Addressperms: read
AccountAddress retrieves the address of the node's account/signer
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.
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.
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.
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.
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.
IsStopped()boolperms: public
IsStopped checks if the Module's context has been stopped
QueryDelegation(valAddr state.ValAddress)*types.QueryDelegationResponseperms: public
QueryDelegation retrieves the delegation information between a delegator and a validator.
QueryRedelegations(srcValAddr state.ValAddress, dstValAddr state.ValAddress)*types.QueryRedelegationsResponseperms: public
QueryRedelegations retrieves the status of the redelegations between a delegator and a validator.
QueryUnbonding(valAddr state.ValAddress)*types.QueryUnbondingDelegationResponseperms: public
QueryUnbonding retrieves the unbonding status between a delegator and a validator.
SubmitPayForBlob(nID namespace.ID, data []byte, fee state.Int, gasLim uint64)*state.TxResponseperms: write
SubmitPayForBlob builds, signs and submits a PayForBlob transaction.
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.
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.
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.