/
market_types.go
86 lines (70 loc) · 1.89 KB
/
market_types.go
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package market
import (
addr "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/ipfs/go-cid"
cbg "github.com/whyrusleeping/cbor-gen"
)
type WithdrawBalanceParams struct {
ProviderOrClientAddress addr.Address
Amount abi.TokenAmount
}
type PublishStorageDealsParams struct {
Deals []ClientDealProposal
}
type PublishStorageDealsReturn struct {
IDs []abi.DealID
ValidDeals bitfield.BitField
}
// - Array of sectors rather than just one
// - Removed SectorStart (which is unknown at call time)
type VerifyDealsForActivationParams struct {
Sectors []SectorDeals
}
type SectorDeals struct {
SectorType abi.RegisteredSealProof
SectorExpiry abi.ChainEpoch
DealIDs []abi.DealID
}
// - Array of sectors weights
type VerifyDealsForActivationReturn struct {
Sectors []SectorDealData
}
type SectorDealData struct {
CommD *cid.Cid
}
type ActivateDealsParams struct {
DealIDs []abi.DealID
SectorExpiry abi.ChainEpoch
}
type ActivateDealsResult struct {
NonVerifiedDealSpace big.Int
VerifiedInfos []VerifiedDealInfo
}
type VerifiedDealInfo struct {
Client abi.ActorID
AllocationId verifreg.AllocationId
Data cid.Cid
Size abi.PaddedPieceSize
}
type SectorDataSpec struct {
DealIDs []abi.DealID
SectorType abi.RegisteredSealProof
}
type DealSpaces struct {
DealSpace abi.DealWeight // Total space of submitted deals.
VerifiedDealSpace abi.DealWeight // Total space of submitted verified deals.
}
type ComputeDataCommitmentParams struct {
Inputs []*SectorDataSpec
}
type ComputeDataCommitmentReturn struct {
CommDs []cbg.CborCid
}
type OnMinerSectorsTerminateParams struct {
Epoch abi.ChainEpoch
DealIDs []abi.DealID
}