Documentation
¶
Overview ¶
Package ipldgen transforms Solana ledger data into IPLD DAGs.
Index ¶
Constants ¶
View Source
const ( // SolanaTx is canonical serialization (ledger/wire-format) of a versioned transaction. // Stable and upgradable format, unlikely to change soon. SolanaTx = 0xc00001 // RadianceTxList is a list of transactions. // DAG-CBOR, non-standard. RadianceTxList = 0xc00102 // RadianceEntry is a representation of a Solana entry, with extra data. // DAG-CBOR, non-standard. RadianceEntry = 0xc00103 // RadianceBlock describes a slot and points to entries. // DAG-CBOR, non-standard. RadianceBlock = 0xc00104 )
Multicodec IDs of Solana-related IPLD blocks.
View Source
const CIDLen = 39
CIDLen is the serialized size in bytes of a Solana/Radiance CID.
View Source
const TargetBlockSize = 1 << 19
TargetBlockSize is the target size of variable-length IPLD blocks (e.g. link lists). Don't set this to the IPFS max block size, as we might overrun by a few kB.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockAssembler ¶
type BlockAssembler struct {
// contains filtered or unexported fields
}
func NewBlockAssembler ¶
func NewBlockAssembler(writer car.OutStream, slot uint64) *BlockAssembler
func (*BlockAssembler) Finish ¶
func (b *BlockAssembler) Finish() (link cidlink.Link, err error)
Finish appends block metadata to the CAR and returns the root CID.
func (*BlockAssembler) WriteEntry ¶
func (b *BlockAssembler) WriteEntry(entry shred.Entry, pos EntryPos) error
WriteEntry appends a ledger entry to the CAR.
type TxListAssembler ¶
type TxListAssembler struct {
// contains filtered or unexported fields
}
TxListAssembler produces a Merkle tree of transactions with wide branches.
func NewTxListAssembler ¶
func NewTxListAssembler(writer car.OutStream) TxListAssembler
Click to show internal directories.
Click to hide internal directories.