rewards

package
v0.0.0-...-201e75b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaimAuthority

type ClaimAuthority struct {
	Address string `json:"address"`
	Name    string `json:"name"`
}

type Reward

type Reward struct {
	ClaimAuthorities []ClaimAuthority `json:"claim_authorities"`
	Amount           uint64           `json:"amount"`
	RewardId         string           `json:"reward_id"`
	Name             string           `json:"name"`
}

type RewardAttester

type RewardAttester struct {
	EthereumAddress string
	EthereumKey     *ecdsa.PrivateKey
	Rewards         []Reward
}

func NewRewardAttester

func NewRewardAttester(ethereumKey *ecdsa.PrivateKey, rewards []Reward) *RewardAttester

func (*RewardAttester) Attest

func (rs *RewardAttester) Attest(claim RewardClaim) (message []byte, signature string, err error)

func (*RewardAttester) Authenticate

func (rs *RewardAttester) Authenticate(claim RewardClaim, signature string) error

func (*RewardAttester) Validate

func (rs *RewardAttester) Validate(claim RewardClaim) error

type RewardClaim

type RewardClaim struct {
	RecipientEthAddress       string
	Amount                    uint64
	RewardID                  string
	Specifier                 string
	AntiAbuseOracleEthAddress string
}

func (RewardClaim) Compile

func (claim RewardClaim) Compile() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL