Documentation ¶
Index ¶
- Variables
- func AbiEncodeClaim(claim AgentData) ([]byte, error)
- func Digest(chainId int64, verifyingContract common.Address, ...) (common.Hash, error)
- func NewVerifiableCredential(issuer common.Address, subject *big.Int, epochIssued *big.Int, ...) (*abigen.VerifiableCredential, error)
- func NullishVerifiableCredential(claim AgentData) (*abigen.VerifiableCredential, error)
- func TypedEIP712(chainId int64, verifyingContract common.Address, ...) apitypes.TypedData
- type AgentData
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrZeroSubject = errors.New("subject cannot be 0")
)
Functions ¶
func AbiEncodeClaim ¶
func NewVerifiableCredential ¶
func NullishVerifiableCredential ¶
func NullishVerifiableCredential(claim AgentData) (*abigen.VerifiableCredential, error)
func TypedEIP712 ¶
Types ¶
type AgentData ¶
type AgentData struct { AgentValue *big.Int CollateralValue *big.Int ExpectedDailyFaultPenalties *big.Int ExpectedDailyRewards *big.Int Gcred *big.Int QaPower *big.Int Principal *big.Int FaultySectors *big.Int LiveSectors *big.Int GreenScore *big.Int }
func AbiDecodeClaim ¶
func DecodeVCClaims ¶ added in v1.1.0
func DecodeVCClaims(vcred *abigen.VerifiableCredential) (*AgentData, error)
func EmptyAgentData ¶
func EmptyAgentData() *AgentData
Click to show internal directories.
Click to hide internal directories.