-
Notifications
You must be signed in to change notification settings - Fork 35
/
market_types.go
145 lines (107 loc) · 3.25 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
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/v11/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
}
type GetBalanceReturn struct {
Balance abi.TokenAmount
Locked abi.TokenAmount
}
type DealQueryParams = cbg.CborInt // abi.DealID
type GetDealDataCommitmentParams = DealQueryParams
type GetDealDataCommitmentReturn struct {
Data cid.Cid
Size abi.PaddedPieceSize
}
type GetDealClientParams = DealQueryParams
type GetDealClientReturn = cbg.CborInt // abi.ActorID
type GetDealProviderParams = DealQueryParams
type GetDealProviderReturn = cbg.CborInt // abi.ActorID
type GetDealLabelParams = DealQueryParams
type GetDealLabelReturn = DealLabel
type GetDealTermParams = DealQueryParams
type GetDealTermReturn struct {
Start abi.ChainEpoch
Duration abi.ChainEpoch
}
type GetDealTotalPriceParams = DealQueryParams
type GetDealTotalPriceReturn = abi.TokenAmount
type GetDealClientCollateralParams = DealQueryParams
type GetDealClientCollateralReturn = abi.TokenAmount
type GetDealProviderCollateralParams = DealQueryParams
type GetDealProviderCollateralReturn = abi.TokenAmount
type GetDealVerifiedParams = DealQueryParams
type GetDealVerifiedReturn = cbg.CborBool
type GetDealActivationParams = DealQueryParams
type GetDealActivationReturn struct {
// Epoch at which the deal was activated, or -1.
// This may be before the proposed start epoch.
Activated abi.ChainEpoch
// Epoch at which the deal was terminated abnormally, or -1.
Terminated abi.ChainEpoch
}