checkpoint

package
v0.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 16 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNamespace

func CreateNamespace(pk, gasCoupon, namespaceName, network string) (string, error)

func IsValidNamespaceID

func IsValidNamespaceID(nID string) bool

func UploadCheckpointByDA

func UploadCheckpointByDA(checkpoint *Checkpoint, pk, gasCoupon, namespaceID, network string, timeout time.Duration) error

func UploadCheckpointByS3

func UploadCheckpointByS3(c *Checkpoint, accessKey, secretKey, region, bucket string, timeout time.Duration) error

Types

type Checkpoint

type Checkpoint struct {
	// Hex of the Commitment of the Verkle Tree Root
	Commitment string `json:"commitment"`
	// Hex of the BlockHash of the checkpoint
	Hash string `json:"hash"`
	// BlockHeight of the checkpoint
	Height string `json:"height"`
	// Protocol name used by the indexer, fixed as "BRC-20" now
	MetaProtocol string `json:"metaProtocol"`
	// Name of the indexer
	Name string `json:"name"`
	// URL of the indexer service
	URL string `json:"url"`
	// Version number of the Modular Indexer
	Version string `json:"version"`
}

CheckpointFromCommitteeIndexer

func NewCheckpoint

func NewCheckpoint(indexID *IndexerIdentification, height uint, hash string, commitment string) Checkpoint

type IndexerIdentification

type IndexerIdentification struct {
	URL          string
	Name         string
	Version      string
	MetaProtocol string
}

type UploadHistory

type UploadHistory = map[uint]map[string]UploadRecord

type UploadRecord

type UploadRecord struct {
	Success bool
}

Jump to

Keyboard shortcuts

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