aboutsummaryrefslogtreecommitdiff
path: root/main.go
blob: 4d497a80b52b5a5bcb152c1afc445d56b373400a (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
package seal

import (
	"crypto"
	"time"
)

// Auction describes the asset of an auction and other
// relevant meta-data
type Auction struct {
	// Start date
	Start time.Time
	// End date
	End time.Time
	// Timeout per round by which all responses must have arrived
	RoundTimeout time.Duration

	// Sha512 Hash of the Asset
	AssetHash string

	// Public key of the Seller
	SellerPublicKey crypto.PublicKey
}

// 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 SignedAuction struct {
	Auction
	SellerSignature string
}

// The published commiment of a participant
type Commitment struct {
}