2024-02-13 07:04:56 +00:00
|
|
|
package crypto
|
|
|
|
|
2024-10-12 18:55:17 +00:00
|
|
|
import "source.quilibrium.com/quilibrium/monorepo/node/protobufs"
|
|
|
|
|
2024-02-13 07:04:56 +00:00
|
|
|
type InclusionCommitment struct {
|
|
|
|
TypeUrl string
|
|
|
|
Data []byte
|
|
|
|
Commitment []byte
|
|
|
|
}
|
|
|
|
|
|
|
|
type InclusionAggregateProof struct {
|
|
|
|
InclusionCommitments []*InclusionCommitment
|
|
|
|
AggregateCommitment []byte
|
|
|
|
Proof []byte
|
|
|
|
}
|
|
|
|
|
|
|
|
type InclusionProver interface {
|
2024-10-12 18:55:17 +00:00
|
|
|
VerifyFrame(frame *protobufs.ClockFrame) error
|
2024-06-08 11:32:45 +00:00
|
|
|
CommitRaw(
|
|
|
|
data []byte,
|
|
|
|
polySize uint64,
|
|
|
|
) ([]byte, error)
|
|
|
|
ProveRaw(
|
|
|
|
data []byte,
|
|
|
|
index int,
|
|
|
|
polySize uint64,
|
|
|
|
) ([]byte, error)
|
|
|
|
VerifyRaw(
|
|
|
|
data []byte,
|
|
|
|
commit []byte,
|
|
|
|
index int,
|
|
|
|
proof []byte,
|
|
|
|
polySize uint64,
|
|
|
|
) (bool, error)
|
2024-02-13 07:04:56 +00:00
|
|
|
}
|