lib

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvancedQueryMessage

type AdvancedQueryMessage struct {
	Filter QueryFilter
}

type BlockData

type BlockData struct {
	Leaf   merkle_dag.DagLeaf
	Branch merkle_dag.ClassicTreeBranch
}

type ClaimOwnershipMessage

type ClaimOwnershipMessage struct {
	Root      string
	PublicKey string
	Signature string
}

type Connector

type Connector interface {
	Connect(ctx context.Context) error
	Disconnect() error
	OpenStream(ctx context.Context, protocolID string) (Stream, error)
}

type DagData

type DagData struct {
	PublicKey secp256k1.PublicKey
	Signature schnorr.Signature
	Dag       merkle_dag.Dag
}

type DownloadFilter

type DownloadFilter struct {
	LeafRanges     *LeafLabelRange
	LeafHashes     []string
	IncludeContent bool
}

type DownloadMessage

type DownloadMessage struct {
	Root      string
	PublicKey string
	Signature string
	Filter    *DownloadFilter
}

type DownloadProgress

type DownloadProgress struct {
	ConnectionID   string
	LeafsRetreived int
	Error          error
}

type ErrorMessage

type ErrorMessage struct {
	Message string
}

type LeafLabelRange

type LeafLabelRange struct {
	From int
	To   int
}

type MessageEnvelope

type MessageEnvelope struct {
	Type    string      `cbor:"type"`
	Payload interface{} `cbor:"payload"`
}

type QueryFilter

type QueryFilter struct {
	Names   []string
	PubKeys []string
	Tags    map[string]string
}

type QueryMessage

type QueryMessage struct {
	QueryFilter map[string]string
}

type QueryResponse

type QueryResponse struct {
	Hashes []string
}

type ResponseMessage

type ResponseMessage struct {
	Ok      bool
	Message string
}

type Stream

type Stream interface {
	Read(p []byte) (int, error)
	Write(p []byte) (int, error)
	Close() error
	Context() context.Context
}

type TagFilter

type TagFilter struct {
	Tags    map[string]string
	OrderBy string
}

type UploadMessage

type UploadMessage struct {
	Root          string
	Packet        merkle_dag.SerializableBatchedTransmissionPacket
	PublicKey     string
	Signature     string
	IsFinalPacket bool // Indicates this is the last packet in the transmission
}

type UploadProgress

type UploadProgress struct {
	ConnectionID string
	LeafsSent    int
	TotalLeafs   int
	Error        error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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