Documentation
¶
Index ¶
Constants ¶
View Source
const ( // NMTIgnoreMaxNamespace is currently used value for IgnoreMaxNamespace option in NMT. // IgnoreMaxNamespace defines whether the largest possible Namespace MAX_NID should be 'ignored'. // If set to true, this allows for shorter proofs in particular use-cases. NMTIgnoreMaxNamespace = true )
Variables ¶
View Source
var ( ErrBlobNotFound = errors.New("blob: not found") ErrInvalidProof = errors.New("blob: invalid proof") )
Functions ¶
This section is empty.
Types ¶
type Blob ¶
type Blob struct {
Namespace []byte `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
NamespaceVersion uint32 `protobuf:"varint,4,opt,name=namespace_version,json=namespaceVersion,proto3" json:"namespace_version,omitempty"`
Commitment []byte `protobuf:"bytes,5,opt,name=commitment,proto3" json:"commitment,omitempty"`
}
Blob represents any application-specific binary data that anyone can submit to Celestia.
func NewBlobV0 ¶
NewBlobV0 constructs a new blob from the provided Namespace and data. The blob will be formatted as v0 shares.
func (*Blob) MarshalJSON ¶
func (*Blob) UnmarshalJSON ¶
type Commitment ¶
type Commitment []byte
Commitment is a Merkle Root of the subtree built from shares of the Blob. It is computed by splitting the blob into shares and building the Merkle subtree to be included after Submit.
func (Commitment) Equal ¶
func (com Commitment) Equal(c Commitment) bool
Equal ensures that commitments are the same
func (Commitment) String ¶
func (com Commitment) String() string
type Proof ¶
Proof is a collection of nmt.Proofs that verifies the inclusion of the data.
func (*Proof) MarshalJSON ¶
func (*Proof) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.