Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commitment ¶
type Commitment = []byte
Commitment should contain serialized cryptographic commitment to Blob value.
type DA ¶
type DA interface {
// MaxBlobSize returns the max blob size
MaxBlobSize(ctx context.Context) (uint64, error)
// Get returns Blob for each given ID, or an error.
//
// Error should be returned if ID is not formatted properly, there is no Blob for given ID or any other client-level
// error occurred (dropped connection, timeout, etc).
Get(ctx context.Context, ids []ID, namespace Namespace) ([]Blob, error)
// GetIDs returns IDs of all Blobs located in DA at given height.
GetIDs(ctx context.Context, height uint64, namespace Namespace) ([]ID, error)
// GetProofs returns inclusion Proofs for Blobs specified by their IDs.
GetProofs(ctx context.Context, ids []ID, namespace Namespace) ([]Proof, error)
// Commit creates a Commitment for each given Blob.
Commit(ctx context.Context, blobs []Blob, namespace Namespace) ([]Commitment, error)
// Submit submits the Blobs to Data Availability layer.
//
// This method is synchronous. Upon successful submission to Data Availability layer, it returns the IDs identifying blobs
// in DA.
Submit(ctx context.Context, blobs []Blob, gasPrice float64, namespace Namespace) ([]ID, error)
// Validate validates Commitments against the corresponding Proofs. This should be possible without retrieving the Blobs.
Validate(ctx context.Context, ids []ID, proofs []Proof, namespace Namespace) ([]bool, error)
}
DA defines very generic interface for interaction with Data Availability layers.
type ID ¶
type ID = []byte
ID should contain serialized data required by the implementation to find blob in Data Availability layer.
Click to show internal directories.
Click to hide internal directories.