Documentation ¶
Index ¶
- Variables
- func CallCelestiaRelay(ctx context.Context, height uint64, start uint64, end uint64, ...) error
- func FetchFromTendermint(ctx context.Context, id string) (*string, error)
- func GetBlob(ctx context.Context, id string, url string, token string) ([]byte, error)
- func GetDataCommitment(eth *ethclient.Client, height int64, blocks uint64) (*blobstreamx.BlobstreamXDataCommitmentStored, error)
- func GetShareProof(ctx context.Context, height uint64, start uint64, end uint64) (shareProofFinal *contracts.ShareDigestsProof, blockDataRoot [32]byte, ...)
- func SubmitBlob(ctx context.Context, url string, token string, namespaceHex string, ...) (height uint64, start uint64, end uint64, err error)
- type CelestiaClient
- type EspressoAPI
- func (s *EspressoAPI) FetchLatestBlockHeight(ctx context.Context) (uint64, error)
- func (s *EspressoAPI) FetchTransactionsInBlock(ctx context.Context, blockHeight uint64, namespace uint64) (client.TransactionsInBlock, error)
- func (s *EspressoAPI) GetHeaderByBlockByHeight(height *big.Int) (*EspressoHeader, error)
- func (s *EspressoAPI) GetLatestBlockHeight() (*big.Int, error)
- func (s *EspressoAPI) GetTransactionByHeight(height *big.Int) (*EspressoBlockResponse, error)
- type EspressoBlockResponse
- type EspressoFetcher
- type EspressoHeader
- type Fetch
- type FetchInputBoxContext
- type GioReqParams
- type HttpCustomError
- type SyscoinClient
Constants ¶
This section is empty.
Variables ¶
var ( EPOCH_DURATION = getEpochDuration() VM_ID = devnet.ApplicationAddress[0:18] INPUT_FETCH_SIZE = 130 )
var CELESTIA_RELAY_ADDRESS common.Address = common.HexToAddress("0x4e64020dc800f02decb8Bd45bB4D0f74048e7535")
Functions ¶
func CallCelestiaRelay ¶
func FetchFromTendermint ¶
func GetDataCommitment ¶
func GetDataCommitment(eth *ethclient.Client, height int64, blocks uint64) (*blobstreamx.BlobstreamXDataCommitmentStored, error)
GetDataCommitment returns the data commitment event matching the given height within the last `blocks` blocks. Example usage:
dataCommitment, err := GetDataCommitment(eth, 10000, 90_000 )
Please note this method will make at least blocks/maxFilterRange calls to the Ethereum node
func GetShareProof ¶
func GetShareProof(ctx context.Context, height uint64, start uint64, end uint64) (shareProofFinal *contracts.ShareDigestsProof, blockDataRoot [32]byte, err error)
GetShareProof returns the share proof for the given share pointer. Ready to be used with the DAVerifier library. RE: https://docs.celestia.org/developers/blobstream-proof-queries#example-rollup-that-uses-the-daverifier
func SubmitBlob ¶
func SubmitBlob(ctx context.Context, url string, token string, namespaceHex string, rawData []byte) (height uint64, start uint64, end uint64, err error)
SubmitBlob submits a blob containing "Hello, World!" to the 0xDEADBEEF namespace. It uses the default signer on the running node.
Types ¶
type CelestiaClient ¶
type CelestiaClient struct{}
func (*CelestiaClient) Fetch ¶
func (c *CelestiaClient) Fetch(ctx echo.Context, id string) (*string, *HttpCustomError)
Fetch implements Fetch.
type EspressoAPI ¶
type EspressoAPI struct {
// contains filtered or unexported fields
}
func NewEspressoAPI ¶
func NewEspressoAPI(ctx context.Context, url *string) *EspressoAPI
func (*EspressoAPI) FetchLatestBlockHeight ¶
func (s *EspressoAPI) FetchLatestBlockHeight(ctx context.Context) (uint64, error)
func (*EspressoAPI) FetchTransactionsInBlock ¶
func (s *EspressoAPI) FetchTransactionsInBlock(ctx context.Context, blockHeight uint64, namespace uint64) (client.TransactionsInBlock, error)
func (*EspressoAPI) GetHeaderByBlockByHeight ¶
func (s *EspressoAPI) GetHeaderByBlockByHeight(height *big.Int) (*EspressoHeader, error)
*
- GET /availability/header/:height
- https://docs.espressosys.com/sequencer/api-reference/sequencer-api/availability-api#get-availability-header
func (*EspressoAPI) GetLatestBlockHeight ¶
func (s *EspressoAPI) GetLatestBlockHeight() (*big.Int, error)
*
- The last known block height of the chain.
- GET /status/block_height
- https://docs.espressosys.com/sequencer/api-reference/sequencer-api/status-api#get-status-block-height
- returns integer
func (*EspressoAPI) GetTransactionByHeight ¶
func (s *EspressoAPI) GetTransactionByHeight(height *big.Int) (*EspressoBlockResponse, error)
*
- GET /availability/block/:height/namespace/:namespace
- https://docs.espressosys.com/sequencer/api-reference/sequencer-api/availability-api#get-availability-block-height-namespace-namespace
type EspressoBlockResponse ¶
type EspressoBlockResponse = client.TransactionsInBlock
type EspressoFetcher ¶
type EspressoFetcher struct {
// contains filtered or unexported fields
}
func (*EspressoFetcher) Fetch ¶
func (e *EspressoFetcher) Fetch(ctx echo.Context, id string) (*string, *HttpCustomError)
type EspressoHeader ¶
type Fetch ¶
type Fetch interface {
Fetch(ctx echo.Context, id string) (*string, *HttpCustomError)
}
func NewCelestiaClient ¶
func NewCelestiaClient() Fetch
func NewEspressoFetcher ¶
func NewEspressoFetcher(input *cRepos.InputRepository) Fetch
func NewSyscoinClient ¶
func NewSyscoinClient() Fetch
type FetchInputBoxContext ¶
type FetchInputBoxContext struct {
// contains filtered or unexported fields
}
type GioReqParams ¶
type HttpCustomError ¶
type HttpCustomError struct {
// contains filtered or unexported fields
}
func NewHttpCustomError ¶
func NewHttpCustomError(status uint, body *string) *HttpCustomError
func (*HttpCustomError) Body ¶
func (m *HttpCustomError) Body() *string
func (*HttpCustomError) Error ¶
func (m *HttpCustomError) Error() string
func (*HttpCustomError) Status ¶
func (m *HttpCustomError) Status() uint
type SyscoinClient ¶
type SyscoinClient struct {
// contains filtered or unexported fields
}
func (*SyscoinClient) Fetch ¶
func (sc *SyscoinClient) Fetch(ctx echo.Context, id string) (*string, *HttpCustomError)
example: https://poda.syscoin.org/vh/06310294ee0af7f1ae4c8e19fa509264565fa82ba8c82a7a9074b2abf12a15d9