Documentation ¶
Index ¶
- Constants
- func BaseClaim(serviceId, appAddr, supplierOperatorAddr string, numRelays uint64) prooftypes.Claim
- func ClaimWithRandomHash(t *testing.T, appAddr, supplierOperatorAddr string, numRelays uint64) prooftypes.Claim
- func RandSmstRootWithSumAndCount(t *testing.T, sum, count uint64) smt.MerkleSumRoot
- func SmstRootWithSumAndCount(sum, count uint64) smt.MerkleSumRoot
Constants ¶
const (
// DefaultTestServiceID is the default test service ID
DefaultTestServiceID = "svc1"
)
Variables ¶
This section is empty.
Functions ¶
func BaseClaim ¶
func BaseClaim(serviceId, appAddr, supplierOperatorAddr string, numRelays uint64) prooftypes.Claim
BaseClaim returns a base (default, example, etc..) claim with the given service ID, app address, supplier operator address and num relays that can be used for testing.
func ClaimWithRandomHash ¶
func ClaimWithRandomHash(t *testing.T, appAddr, supplierOperatorAddr string, numRelays uint64) prooftypes.Claim
ClaimWithRandomHash returns a claim with a random SMST root hash with the given app address, supplier operator address, and num relays that can be used for testing. Each claim generated this way will have a random chance to require a proof via probabilistic selection.
func RandSmstRootWithSumAndCount ¶ added in v0.0.6
func RandSmstRootWithSumAndCount(t *testing.T, sum, count uint64) smt.MerkleSumRoot
RandSmstRootWithSumAndCount returns a randomized SMST root with the given sum and count that can be used for testing. Randomizing the root is a simple way to randomize test claim hashes for testing proof requirement cases.
func SmstRootWithSumAndCount ¶ added in v0.0.6
func SmstRootWithSumAndCount(sum, count uint64) smt.MerkleSumRoot
SmstRootWithSumAndCount returns a SMST root with the given sum and relay count.
Types ¶
This section is empty.