Documentation ¶
Index ¶
- func NamespaceID(base64Value string) (string, error)
- type API
- func (api API) Balance(ctx context.Context) (response Balance, err error)
- func (api API) BalanceOf(ctx context.Context, address string) (response Balance, err error)
- func (api API) DataAvailable(ctx context.Context, height uint64) (response DataAvailableResponse, err error)
- func (api API) Head(ctx context.Context) (response HeaderResponse, err error)
- func (api API) Header(ctx context.Context, height uint64) (response HeaderResponse, err error)
- func (api API) NamespaceData(ctx context.Context, namespaceID string, height uint64) (response NamespaceData, err error)
- func (api API) NamespaceShares(ctx context.Context, namespaceID string) (response NamespaceData, err error)
- func (api API) NamespaceSharesByHeight(ctx context.Context, namespaceID string, height uint64) (response NamespaceShares, err error)
- func (api API) SubmitPfd(ctx context.Context, tx SubmitPfd) (response SubmittedPfd, err error)
- func (api API) SubmitTx(ctx context.Context, tx SubmitTx) (response SubmittedTx, err error)
- type Attribute
- type Balance
- type BlockID
- type BlockIDParts
- type Commit
- type Dah
- type DataAvailableResponse
- type Event
- type Header
- type HeaderResponse
- type Log
- type NamespaceData
- type NamespaceShares
- type Signature
- type SubmitPfd
- type SubmitTx
- type SubmittedPfd
- type SubmittedTx
- type Validator
- type ValidatorSet
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API - wrapper of celestia node API.
func (API) DataAvailable ¶
func (api API) DataAvailable(ctx context.Context, height uint64) (response DataAvailableResponse, err error)
DataAvailable - returns whether data is available at a specific block `height` and the probability that it is available based on the amount of samples collected.
func (API) Head ¶
func (api API) Head(ctx context.Context) (response HeaderResponse, err error)
Head - returns the tip (head) of the node's current chain.
func (API) NamespaceData ¶
func (api API) NamespaceData(ctx context.Context, namespaceID string, height uint64) (response NamespaceData, err error)
NamespaceData - returns original messages of the given namespace ID `namespaceID` from the given block `height`.
func (API) NamespaceShares ¶
func (api API) NamespaceShares(ctx context.Context, namespaceID string) (response NamespaceData, err error)
NamespaceShares - returns shares of the given namespace ID `namespaceID` from the latest block (chain head).
func (API) NamespaceSharesByHeight ¶
func (api API) NamespaceSharesByHeight(ctx context.Context, namespaceID string, height uint64) (response NamespaceShares, err error)
NamespaceSharesByHeight - returns shares of the given namespace ID `namespaceID` from the block of the given `height`.
type Attribute ¶
type Attribute struct { Key string `json:"key"` Value string `json:"value"` Index *bool `json:"index"` }
Attribute -
type BlockID ¶
type BlockID struct { Hash string `json:"hash"` Parts BlockIDParts `json:"parts"` }
BlockID -
type BlockIDParts ¶
BlockIDParts -
type Commit ¶
type Commit struct { Height uint64 `json:"height"` Round int `json:"round"` BlockID BlockID `json:"block_id"` Signatures []Signature `json:"signatures"` }
Commit -
type DataAvailableResponse ¶
type DataAvailableResponse struct { Available bool `json:"available"` ProbabilityOfAvailability string `json:"probability_of_availability"` }
DataAvailableResponse -
type Header ¶
type Header struct { Version Version `json:"version"` ChainID string `json:"chain_id"` Height uint64 `json:"height"` Time time.Time `json:"time"` LastBlockID BlockID `json:"last_block_id"` LastCommitHash string `json:"last_commit_hash"` DataHash string `json:"data_hash"` ValidatorsHash string `json:"validators_hash"` NextValidatorsHash string `json:"next_validators_hash"` ConsensusHash string `json:"consensus_hash"` AppHash string `json:"app_hash"` LastResultsHash string `json:"last_results_hash"` EvidenceHash string `json:"evidence_hash"` ProposerAddress string `json:"proposer_address"` }
Header -
type HeaderResponse ¶
type HeaderResponse struct { Header Header `json:"header"` Commit Commit `json:"commit"` ValidatorSet ValidatorSet `json:"validator_set"` Dah Dah `json:"dah"` }
HeaderResponse -
type NamespaceData ¶
NamespaceData -
func (NamespaceData) GetBytes ¶
func (nd NamespaceData) GetBytes() ([][]byte, error)
GetBytes - returns array of bytes array from `Data` field of `NamespaceData` response
type Signature ¶
type Signature struct { BlockIDFlag uint64 `json:"block_id_flag"` ValidatorAddress string `json:"validator_address"` Timestamp time.Time `json:"timestamp"` Signature string `json:"signature"` }
Signature -
type SubmitPfd ¶
type SubmitPfd struct { NamespaceID string `json:"namespace_id"` Data string `json:"data"` GasLimit uint64 `json:"gas_limit"` }
SubmitPfd -
type SubmittedPfd ¶
type SubmittedPfd struct { Height int `json:"height"` Txhash string `json:"txhash"` Data string `json:"data"` RawLog string `json:"raw_log"` Logs []Log `json:"logs"` Events []Event `json:"events"` }
SubmittedPfd -
type SubmittedTx ¶
type SubmittedTx struct { Txhash string `json:"txhash"` Codespace string `json:"codespace"` Code int64 `json:"code"` RawLog string `json:"raw_log"` Logs []Log `json:"logs,omitempty"` GasWanted uint64 `json:"gas_wanted"` }
SubmittedTx -
type Validator ¶
type Validator struct { Address string `json:"address"` PubKey string `json:"pub_key"` VotingPower int `json:"voting_power"` ProposerPriority int `json:"proposer_priority"` }
Validator -
type ValidatorSet ¶
type ValidatorSet struct { Validators []Validator `json:"validators"` Proposer Validator `json:"proposer"` }
ValidatorSet -