dataavailability

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EPOCH_DURATION   = getEpochDuration()
	VM_ID            = devnet.ApplicationAddress[0:18]
	INPUT_FETCH_SIZE = 130
)
View Source
var CELESTIA_RELAY_ADDRESS common.Address = common.HexToAddress("0x4e64020dc800f02decb8Bd45bB4D0f74048e7535")

Functions

func CallCelestiaRelay

func CallCelestiaRelay(ctx context.Context, height uint64, start uint64, end uint64, dappAddress common.Address, execLayerData []byte, ethEndpointRPC string, chainId int64) error

func FetchFromTendermint

func FetchFromTendermint(ctx context.Context, id string) (*string, error)

func GetBlob

func GetBlob(ctx context.Context, id string, url string, token string) ([]byte, error)

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) GetLatestBlockHeight

func (s *EspressoAPI) GetLatestBlockHeight() (*big.Int, error)

*

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 EspressoHeader = types.Header

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

func NewSyscoinClientMock

func NewSyscoinClientMock(endpoint string, client *http.Client) Fetch

type FetchInputBoxContext

type FetchInputBoxContext struct {
	// contains filtered or unexported fields
}

type GioReqParams

type GioReqParams struct {
	Namespace []byte
	Height    *big.Int
	Start     *big.Int
	End       *big.Int
}

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
}

Directories

Path Synopsis
contracts

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL