package seal import ( "crypto" "net/url" "time" ) type Type int const ( TypHighest = iota TypSecondHighest ) // Auction describes the asset of an auction and other // relevant meta-data type Description struct { DashboardUrl *url.URL // can be empty Start time.Time End time.Time RoundTimeout time.Duration // Timeout per round by which all responses must have arrived BitLength uint8 // Length of the price encoding Currency string Type Type SellerPublicKey crypto.PublicKey // Public key of the Seller } // The SignedAuction contains an Auction and the signature, // signed by the seller's public key off the SHA512 hash of // the normalized JSON-object. // TODO(oec): normalized? type SignedDesciption struct { Description SellerSignature string } // Auction is the simple interface for the engine type Auction interface { Join(bidder Bidder) Received(msg []byte) error } // Bidder is the interface that the Auction engine uses to communicate type Bidder interface { Result() Send(msg []byte, sig []byte) error }