Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle struct { ShardHint uint64 Signature types.Signature KeyHash types.Hash InclusionProof types.InclusionProof CosignedTreeHead types.CosignedTreeHead }
TODO: should signature+key_hash (not) be in bundle?
type SubmitClient ¶
type SubmitClient struct {
// contains filtered or unexported fields
}
func NewSubmitClient ¶
func NewSubmitClient(policy policy.Policy) *SubmitClient
func (*SubmitClient) AddLeaves ¶
TODO: feedback on the below sketch; improve it; implement properly. 0. Select one log in policy, setup API network client. 1. Loop over all leaves that have yet to received 200 OK. Move on to the next leaf on a non-200 status code, trying again next itteration. 3. Try to fetch an inclusion proof for the latest HTTP 200 OK response every time a new cosigned tree head becomes available. Output warning if more than two cosigned tree heads pass. 4. Loop over all leaves and fetch inclusion proofs for X. [Exit with error if any inclusion proof is not available / invalid] 5. Return bundles in the same order as leaves were passed.