Created
September 15, 2023 06:19
-
-
Save tzdybal/10c07354a7f4f7c9bf8a5b9966b4d247 to your computer and use it in GitHub Desktop.
minimalistic general modular DA interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package da | |
type DA interface { | |
Get(id ID) (Blob, error) | |
Commit(blob Blob) (Commitement, error) | |
Submit(blob Blob) (ID, Proof, error) | |
Validate(commit Commitement, proof Proof) (bool, error) | |
} | |
type BatchDA interface { | |
Get(ids []ID) ([]Blob, error) | |
Commit(blobs []Blob) ([]Commitement, error) | |
Submit(blobs []Blob) ([]ID, []Proof, error) | |
Validate(commits []Commitement, proofs []Proof) ([]bool, error) | |
} | |
type Blob []byte | |
type ID []byte | |
type Proof []byte | |
type Commitement []byte |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment