# Functions
AvailableBytesFromCompactShares returns the maximum amount of bytes that could fit in `n` compact shares.
AvailableBytesFromSparseShares returns the maximum amount of bytes that could fit in `n` sparse shares.
CompactSharesNeeded returns the number of compact shares needed to store a sequence of length sequenceLen.
No description provided by the author
No description provided by the author
GenerateV0Blobs is a test utility producing v0 share formatted blobs with the requested size and namespaces.
GetShareRangeForNamespace returns all shares that belong to a given namespace.
GetSigner returns the signer of the share, if the share is not of type v1 and is not the first share in a sequence it returns nil.
MarshalDelimitedTx prefixes a transaction with the length of the transaction encoded as a varint.
MustNewNamespace returns a new namespace with the provided version and id.
MustNewV0Namespace returns a new namespace with version 0 and the provided subID.
NamespacePaddingShare returns a share that acts as padding.
NamespacePaddingShares returns n namespace padding shares.
New creates a new coretypes.Blob from the provided data after performing basic stateless checks over it.
NewBlobFromProto creates a new blob from the proto generated type.
NewCompactShareCounter creates a new instance of a counter which calculates the amount of compact shares a set of data will be split into.
NewCompactShareSplitter returns a CompactShareSplitter using the provided namespace and shareVersion.
No description provided by the author
NewNamespace validates the provided version and id and returns a new namespace.
NewNamespaceFromBytes returns a new namespace from the provided byte slice.
No description provided by the author
NewReservedBytes returns a byte slice of length ShareReservedBytes that contains the byteIndex of the first unit that starts in a compact share.
NewShare creates a new share from the raw data, validating it's size and versioning.
No description provided by the author
NewV0Blob creates a new blob with share version 0.
NewV0Namespace returns a new namespace with version 0 and the provided subID.
NewV1Blob creates a new blob with share version 1.
ParseBlobs collects all blobs from the shares provided.
No description provided by the author
ParseReservedBytes parses a byte slice of length ShareReservedBytes into a byteIndex.
ParseShares parses the shares provided and returns a list of Sequences.
ParseTxs collects all of the transactions from the shares provided.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RandShares generates total amount of shares and fills them with random data.
RandSharesWithNamespace is the same as RandShares, but sets the same namespace for all shares.
ReservedPaddingShare returns a share that acts as padding.
ReservedPaddingShares returns n reserved padding shares.
Sort sorts the blobs by their namespace.
SparseSharesNeeded returns the number of shares needed to store a sequence of length sequenceLen.
TailPaddingShare is a share that is used to pad a data square to the desired square size.
TailPaddingShares returns n tail padding shares.
No description provided by the author
UnmarshalBlob unmarshals a blob from the proto encoded bytes.
# Constants
CompactShareReservedBytes is the number of bytes reserved for the location of the first unit (transaction, ISR) in a compact share.
ContinuationCompactShareContentSize is the number of bytes usable for data in a continuation compact share of a sequence.
ContinuationSparseShareContentSize is the number of bytes usable for data in a continuation sparse share of a sequence.
DefaultShareVersion is the defacto share version.
FirstCompactShareContentSize is the number of bytes usable for data in the first compact share of a sequence.
FirstSparseShareContentSize is the number of bytes usable for data in the first sparse share of a sequence.
MaxShareVersion is the maximum value a share version can be.
MinShareCount is the minimum number of shares allowed in the original data square.
MinSquareSize is the smallest original square width.
NamespaceIDSize is the size of a namespace ID in bytes.
NamespaceSize is the size of a namespace (version + ID) in bytes.
NamespaceVersionMax is the max namespace version.
NamespaceVersionSize is the size of a namespace version in bytes.
NamespaceVersionZero is the first namespace version.
NamespaceVersionZeroIDSize is the number of bytes available for user-specified namespace ID in a namespace ID for version 0.
NamespaceVersionZeroPrefixSize is the number of `0` bytes that are prefixed to namespace IDs for version 0.
SequenceLenBytes is the number of bytes reserved for the sequence length that is present in the first share of a sequence.
ShareInfoBytes is the number of bytes reserved for information.
ShareReservedBytes is the number of bytes reserved for the location of the first unit (transaction, ISR) in a compact share.
ShareSize is the size of a share in bytes.
ShareVersionOne is the second share version format.
ShareVersionZero is the first share version format.
SignerSize is the size of the signer in bytes.
VersionIndex is the index of the version in the namespace.
# Variables
IntermediateStateRootsNamespace is the namespace reserved for intermediate state root data.
MaxPrimaryReservedNamespace is the highest primary reserved namespace.
MinSecondaryReservedNamespace is the lowest secondary reserved namespace reserved for protocol use.
NamespaceVersionZeroPrefix is the prefix of a namespace ID for version 0.
ParitySharesNamespace is the namespace reserved for erasure coded data.
PayForBlobNamespace is the namespace reserved for PayForBlobs transactions.
PrimaryReservedPaddingNamespace is the namespace used for padding after all primary reserved namespaces.
SupportedBlobNamespaceVersions is a list of namespace versions that can be specified by a user for blobs.
SupportedShareVersions is a list of supported share versions.
TailPaddingNamespace is the namespace reserved for tail padding.
TxNamespace is the namespace reserved for ordinary Cosmos SDK transactions.
# Structs
Blob (stands for binary large object) is a core type that represents data to be submitted to the Celestia network alongside an accompanying namespace and optional signer (for proving the signer of the blob).
No description provided by the author
CompactShareSplitter will write raw data compactly across a progressively increasing set of shares.
No description provided by the author
Range is an end exclusive set of share indexes.
Sequence represents a contiguous sequence of shares that are part of the same namespace and blob.
Share contains the raw share data (including namespace ID).
SparseShareSplitter lazily splits blobs into shares that will eventually be included in a data square.
# Type aliases
InfoByte is a byte with the following structure: the first 7 bits are reserved for version information in big endian form (initially `0000000`).