Documentation
¶
Overview ¶
package: tests/helpers / testkit type: tool job: shared helpers for driving a ranke.Sequencer from tests and test tooling limits: the contract only — no fixtures, no assertions, no backend knowledge (-> tests, tests/backends)
Index ¶
Constants ¶
const FoundBranch = "main"
FoundBranch is the branch Found binds the first contributor to — "main", which the fixtures then contribute to, so a test archive holds one branch rather than two.
Variables ¶
This section is empty.
Functions ¶
func Contribute ¶
func Contribute(ctx context.Context, seq ranke.Sequencer, branch string, claims []ranke.Claim, opts ...ranke.ContributionOption) (ranke.Id, error)
Contribute drives one contribution through the Sequencer contract's seven steps — open, fill, verify, persist, merge, bookmark — returning the head it advanced to. opts carry the constraints the contribution opens under.
func Found ¶ added in v0.29.0
Found brings seq's archive into being under the key label names, which every operation but Found itself now requires. It returns the first contributor, resolved with its own private key so a test may contribute as it.
func FoundedKey ¶ added in v0.29.0
func FoundedKey(label string) ed25519.PrivateKey
FoundedKey is the deterministic key a label names, so a fixture's first contributor is the same identity on every run and across backends. Ed25519 keys come from a seed, so a fixed label is a fixed key.
Types ¶
This section is empty.