challenge.go 992 B

123456789101112131415
  1. package challenge
  2. import "time"
  3. // Challenge is the metadata about a single challenge issuance.
  4. type Challenge struct {
  5. IssuedAt time.Time `json:"issuedAt"` // When the challenge was issued
  6. Metadata map[string]string `json:"metadata"` // Challenge metadata such as IP address and user agent
  7. ID string `json:"id"` // UUID identifying the challenge
  8. Method string `json:"method"` // Challenge method
  9. RandomData string `json:"randomData"` // The random data the client processes
  10. PolicyRuleHash string `json:"policyRuleHash,omitempty"` // Hash of the policy rule that issued this challenge
  11. Difficulty int `json:"difficulty,omitempty"` // Difficulty that was in effect when issued
  12. Spent bool `json:"spent"` // Has the challenge already been solved?
  13. }