Documentation ¶
Index ¶
- func MBid(r *rusk.Bid, f *Bid)
- func MBidList(r *rusk.BidList, f *BidList)
- func MBidTransactionRequest(r *rusk.BidTransactionRequest, f *BidTransactionRequest)
- func MFindBidRequest(r *rusk.FindBidRequest, f *FindBidRequest)
- func MGenerateScoreRequest(r *rusk.GenerateScoreRequest, f *GenerateScoreRequest)
- func MGenerateScoreResponse(r *rusk.GenerateScoreResponse, f *GenerateScoreResponse)
- func MVerifyScoreRequest(r *rusk.VerifyScoreRequest, f *VerifyScoreRequest)
- func MVerifyScoreResponse(r *rusk.VerifyScoreResponse, f *VerifyScoreResponse)
- func MarshalBid(r *bytes.Buffer, f *Bid) error
- func MarshalBidList(r *bytes.Buffer, f *BidList) error
- func MarshalBidTransactionRequest(r *bytes.Buffer, f *BidTransactionRequest) error
- func MarshalFindBidRequest(r *bytes.Buffer, f *FindBidRequest) error
- func MarshalGenerateScoreRequest(r *bytes.Buffer, f *GenerateScoreRequest) error
- func MarshalGenerateScoreResponse(r *bytes.Buffer, f *GenerateScoreResponse) error
- func MarshalVerifyScoreRequest(r *bytes.Buffer, f *VerifyScoreRequest) error
- func MarshalVerifyScoreResponse(r *bytes.Buffer, f *VerifyScoreResponse) error
- func UBid(r *rusk.Bid, f *Bid)
- func UBidList(r *rusk.BidList, f *BidList)
- func UBidTransactionRequest(r *rusk.BidTransactionRequest, f *BidTransactionRequest)
- func UFindBidRequest(r *rusk.FindBidRequest, f *FindBidRequest)
- func UGenerateScoreRequest(r *rusk.GenerateScoreRequest, f *GenerateScoreRequest)
- func UGenerateScoreResponse(r *rusk.GenerateScoreResponse, f *GenerateScoreResponse)
- func UVerifyScoreRequest(r *rusk.VerifyScoreRequest, f *VerifyScoreRequest)
- func UVerifyScoreResponse(r *rusk.VerifyScoreResponse, f *VerifyScoreResponse)
- func UnmarshalBid(r *bytes.Buffer, f *Bid) error
- func UnmarshalBidList(r *bytes.Buffer, f *BidList) error
- func UnmarshalBidTransactionRequest(r *bytes.Buffer, f *BidTransactionRequest) error
- func UnmarshalFindBidRequest(r *bytes.Buffer, f *FindBidRequest) error
- func UnmarshalGenerateScoreRequest(r *bytes.Buffer, f *GenerateScoreRequest) error
- func UnmarshalGenerateScoreResponse(r *bytes.Buffer, f *GenerateScoreResponse) error
- func UnmarshalVerifyScoreRequest(r *bytes.Buffer, f *VerifyScoreRequest) error
- func UnmarshalVerifyScoreResponse(r *bytes.Buffer, f *VerifyScoreResponse) error
- type Bid
- type BidList
- type BidTransactionRequest
- type FindBidRequest
- type GenerateScoreRequest
- type GenerateScoreResponse
- type VerifyScoreRequest
- type VerifyScoreResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MBidTransactionRequest ¶
func MBidTransactionRequest(r *rusk.BidTransactionRequest, f *BidTransactionRequest)
MBidTransactionRequest copies the BidTransactionRequest structure into the Rusk equivalent.
func MFindBidRequest ¶
func MFindBidRequest(r *rusk.FindBidRequest, f *FindBidRequest)
MFindBidRequest copies the FindBidRequest structure into the Rusk equivalent.
func MGenerateScoreRequest ¶
func MGenerateScoreRequest(r *rusk.GenerateScoreRequest, f *GenerateScoreRequest)
MGenerateScoreRequest copies the GenerateScoreRequest structure into the Rusk equivalent.
func MGenerateScoreResponse ¶
func MGenerateScoreResponse(r *rusk.GenerateScoreResponse, f *GenerateScoreResponse)
MGenerateScoreResponse copies the GenerateScoreResponse structure into the Rusk equivalent.
func MVerifyScoreRequest ¶
func MVerifyScoreRequest(r *rusk.VerifyScoreRequest, f *VerifyScoreRequest)
MVerifyScoreRequest copies the VerifyScoreRequest structure into the Rusk equivalent.
func MVerifyScoreResponse ¶
func MVerifyScoreResponse(r *rusk.VerifyScoreResponse, f *VerifyScoreResponse)
MVerifyScoreResponse copies the VerifyScoreResponse structure into the Rusk equivalent.
func MarshalBid ¶
MarshalBid writes the Bid struct into a bytes.Buffer.
func MarshalBidList ¶
MarshalBidList writes the BidList struct into a bytes.Buffer.
func MarshalBidTransactionRequest ¶
func MarshalBidTransactionRequest(r *bytes.Buffer, f *BidTransactionRequest) error
MarshalBidTransactionRequest writes the BidTransactionRequest struct into a bytes.Buffer.
func MarshalFindBidRequest ¶
func MarshalFindBidRequest(r *bytes.Buffer, f *FindBidRequest) error
MarshalFindBidRequest writes the FindBidRequest struct into a bytes.Buffer.
func MarshalGenerateScoreRequest ¶
func MarshalGenerateScoreRequest(r *bytes.Buffer, f *GenerateScoreRequest) error
MarshalGenerateScoreRequest writes the GenerateScoreRequest struct into a bytes.Buffer.
func MarshalGenerateScoreResponse ¶
func MarshalGenerateScoreResponse(r *bytes.Buffer, f *GenerateScoreResponse) error
MarshalGenerateScoreResponse writes the GenerateScoreResponse struct into a bytes.Buffer.
func MarshalVerifyScoreRequest ¶
func MarshalVerifyScoreRequest(r *bytes.Buffer, f *VerifyScoreRequest) error
MarshalVerifyScoreRequest writes the VerifyScoreRequest struct into a bytes.Buffer.
func MarshalVerifyScoreResponse ¶
func MarshalVerifyScoreResponse(r *bytes.Buffer, f *VerifyScoreResponse) error
MarshalVerifyScoreResponse writes the VerifyScoreResponse struct into a bytes.Buffer.
func UBidTransactionRequest ¶
func UBidTransactionRequest(r *rusk.BidTransactionRequest, f *BidTransactionRequest)
UBidTransactionRequest copies the Rusk BidTransactionRequest structure into the native equivalent.
func UFindBidRequest ¶
func UFindBidRequest(r *rusk.FindBidRequest, f *FindBidRequest)
UFindBidRequest copies the Rusk FindBidRequest structure into the native equivalent.
func UGenerateScoreRequest ¶
func UGenerateScoreRequest(r *rusk.GenerateScoreRequest, f *GenerateScoreRequest)
UGenerateScoreRequest copies the Rusk GenerateScoreRequest structure into the native equivalent.
func UGenerateScoreResponse ¶
func UGenerateScoreResponse(r *rusk.GenerateScoreResponse, f *GenerateScoreResponse)
UGenerateScoreResponse copies the Rusk GenerateScoreResponse structure into the native equivalent.
func UVerifyScoreRequest ¶
func UVerifyScoreRequest(r *rusk.VerifyScoreRequest, f *VerifyScoreRequest)
UVerifyScoreRequest copies the Rusk VerifyScoreRequest structure into the native equivalent.
func UVerifyScoreResponse ¶
func UVerifyScoreResponse(r *rusk.VerifyScoreResponse, f *VerifyScoreResponse)
UVerifyScoreResponse copies the Rusk VerifyScoreResponse structure into the native equivalent.
func UnmarshalBid ¶
UnmarshalBid reads a Bid struct from a bytes.Buffer.
func UnmarshalBidList ¶
UnmarshalBidList reads a BidList struct from a bytes.Buffer.
func UnmarshalBidTransactionRequest ¶
func UnmarshalBidTransactionRequest(r *bytes.Buffer, f *BidTransactionRequest) error
UnmarshalBidTransactionRequest reads a BidTransactionRequest struct from a bytes.Buffer.
func UnmarshalFindBidRequest ¶
func UnmarshalFindBidRequest(r *bytes.Buffer, f *FindBidRequest) error
UnmarshalFindBidRequest reads a FindBidRequest struct from a bytes.Buffer.
func UnmarshalGenerateScoreRequest ¶
func UnmarshalGenerateScoreRequest(r *bytes.Buffer, f *GenerateScoreRequest) error
UnmarshalGenerateScoreRequest reads a GenerateScoreRequest struct from a bytes.Buffer.
func UnmarshalGenerateScoreResponse ¶
func UnmarshalGenerateScoreResponse(r *bytes.Buffer, f *GenerateScoreResponse) error
UnmarshalGenerateScoreResponse reads a GenerateScoreResponse struct from a bytes.Buffer.
func UnmarshalVerifyScoreRequest ¶
func UnmarshalVerifyScoreRequest(r *bytes.Buffer, f *VerifyScoreRequest) error
UnmarshalVerifyScoreRequest reads a VerifyScoreRequest struct from a bytes.Buffer.
func UnmarshalVerifyScoreResponse ¶
func UnmarshalVerifyScoreResponse(r *bytes.Buffer, f *VerifyScoreResponse) error
UnmarshalVerifyScoreResponse reads a VerifyScoreResponse struct from a bytes.Buffer.
Types ¶
type Bid ¶
type Bid struct { EncryptedData []byte `json:"encrypted_data"` HashedSecret []byte `json:"hashed_secret"` Nonce []byte `json:"nonce"` StealthAddress *keys.StealthAddress `json:"stealth_address"` Commitment []byte `json:"commitment"` Eligibility []byte `json:"eligibility"` Expiration []byte `json:"expiration"` }
Bid represents a blind bid, made by a block generator.
type BidList ¶
type BidList struct { BidList []*Bid `json:"bid_list"` BidHashList [][]byte `json:"bid_hash_list"` }
BidList is the collection of all blind bids.
type BidTransactionRequest ¶
type BidTransactionRequest struct { K []byte `json:"k"` Value uint64 `json:"value"` Secret []byte `json:"secret"` StealthAddress *keys.StealthAddress `json:"stealth_address"` Seed []byte `json:"seed"` LatestConsensusRound uint64 `json:"latest_consensus_round"` LatestConsensusStep uint64 `json:"latest_consensus_step"` GasLimit uint64 `json:"gas_limit"` GasPrice uint64 `json:"gas_price"` }
BidTransactionRequest is used to construct a Bid transaction.
func (*BidTransactionRequest) Copy ¶
func (b *BidTransactionRequest) Copy() *BidTransactionRequest
Copy complies with message.Safe interface. It returns a deep copy of the message safe to publish to multiple subscribers.
type FindBidRequest ¶
type FindBidRequest struct {
StealthAddress *keys.StealthAddress `json:"stealth_address"`
}
FindBidRequest is used to find a specific Bid belonging to a public key.
func (*FindBidRequest) Copy ¶
func (f *FindBidRequest) Copy() *FindBidRequest
Copy complies with message.Safe interface. It returns a deep copy of the message safe to publish to multiple subscribers.
type GenerateScoreRequest ¶
type GenerateScoreRequest struct { K []byte `json:"k"` Seed []byte `json:"seed"` Secret []byte `json:"secret"` Round uint32 `json:"round"` Step uint32 `json:"step"` IndexStoredBid uint64 `json:"index_stored_bid"` }
GenerateScoreRequest is used by block generators to generate a score and a proof of blind bid, in order to propose a block.
func NewGenerateScoreRequest ¶
func NewGenerateScoreRequest() *GenerateScoreRequest
NewGenerateScoreRequest returns a new empty GenerateScoreRequest struct.
func (*GenerateScoreRequest) Copy ¶
func (g *GenerateScoreRequest) Copy() *GenerateScoreRequest
Copy complies with message.Safe interface. It returns a deep copy of the message safe to publish to multiple subscribers.
type GenerateScoreResponse ¶
type GenerateScoreResponse struct { BlindbidProof []byte `json:"blindbid_proof"` Score []byte `json:"score"` ProverIdentity []byte `json:"prover_identity"` }
GenerateScoreResponse contains the resulting proof of blind bid, score, and the prover identity, to be used for proposing a block.
func NewGenerateScoreResponse ¶
func NewGenerateScoreResponse() *GenerateScoreResponse
NewGenerateScoreResponse returns a new empty GenerateScoreResponse struct.
func (*GenerateScoreResponse) Copy ¶
func (g *GenerateScoreResponse) Copy() *GenerateScoreResponse
Copy complies with message.Safe interface. It returns a deep copy of the message safe to publish to multiple subscribers.
type VerifyScoreRequest ¶
type VerifyScoreRequest struct { Proof []byte `json:"proof"` Score []byte `json:"score"` Seed []byte `json:"seed"` ProverID []byte `json:"prover_id"` Round uint64 `json:"round"` Step uint32 `json:"step"` }
VerifyScoreRequest is used by provisioners to ensure that a given blind bid proof is valid.
func (*VerifyScoreRequest) Copy ¶
func (v *VerifyScoreRequest) Copy() *VerifyScoreRequest
Copy complies with message.Safe interface. It returns a deep copy of the message safe to publish to multiple subscribers.
type VerifyScoreResponse ¶
type VerifyScoreResponse struct {
Success bool `json:"success"`
}
VerifyScoreResponse tells a provisioner whether a supplied proof is valid or not.
func (*VerifyScoreResponse) Copy ¶
func (v *VerifyScoreResponse) Copy() *VerifyScoreResponse
Copy complies with message.Safe interface. It returns a deep copy of the message safe to publish to multiple subscribers.