blob: aeff7b352192c9e9c95dc459fdd908abe643e350 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
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
}
// Bidder is the interface that the Auction engine uses to communicate
type Bidder interface {
Result()
Send(msg []byte, sig []byte)
}
|