From daf0ec678e51046966262164a8748e4d8440dffd Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Thu, 16 Mar 2023 16:07:35 +0800 Subject: [PATCH] feat: get signer deal --- venus-shared/api/market/v0/api.go | 2 + venus-shared/api/market/v0/method.md | 136 ++++++++++++++++++ .../api/market/v0/mock/mock_imarket.go | 30 ++++ venus-shared/api/market/v0/proxy_gen.go | 8 ++ venus-shared/api/market/v1/api.go | 2 + venus-shared/api/market/v1/method.md | 136 ++++++++++++++++++ .../api/market/v1/mock/mock_imarket.go | 30 ++++ venus-shared/api/market/v1/proxy_gen.go | 8 ++ 8 files changed, 352 insertions(+) diff --git a/venus-shared/api/market/v0/api.go b/venus-shared/api/market/v0/api.go index a7770a486b..52e4b17546 100644 --- a/venus-shared/api/market/v0/api.go +++ b/venus-shared/api/market/v0/api.go @@ -31,7 +31,9 @@ type IMarket interface { MarketImportDealData(ctx context.Context, propcid cid.Cid, path string) error //perm:admin MarketImportPublishedDeal(ctx context.Context, deal market.MinerDeal) error //perm:write MarketListDeals(ctx context.Context, addrs []address.Address) ([]*types.MarketDeal, error) //perm:read + MarketGetDeal(ctx context.Context, dealPropCid cid.Cid) (*market.MinerDeal, error) //perm:read MarketListRetrievalDeals(ctx context.Context) ([]market.ProviderDealState, error) //perm:read + MarketGetRetrievalDeal(ctx context.Context, receiver peer.ID, dealID uint64) (*market.ProviderDealState, error) //perm:read MarketGetDealUpdates(ctx context.Context) (<-chan market.MinerDeal, error) //perm:admin MarketListIncompleteDeals(ctx context.Context, mAddr address.Address) ([]market.MinerDeal, error) //perm:read MarketSetAsk(ctx context.Context, mAddr address.Address, price types.BigInt, verifiedPrice types.BigInt, duration abi.ChainEpoch, minPieceSize abi.PaddedPieceSize, maxPieceSize abi.PaddedPieceSize) error //perm:admin diff --git a/venus-shared/api/market/v0/method.md b/venus-shared/api/market/v0/method.md index bfb823633b..1df1594771 100644 --- a/venus-shared/api/market/v0/method.md +++ b/venus-shared/api/market/v0/method.md @@ -57,9 +57,11 @@ curl http://:/rpc/v0 -X POST -H "Content-Type: application/json" -H " * [MarketDataTransferPath](#marketdatatransferpath) * [MarketDataTransferUpdates](#marketdatatransferupdates) * [MarketGetAsk](#marketgetask) + * [MarketGetDeal](#marketgetdeal) * [MarketGetDealUpdates](#marketgetdealupdates) * [MarketGetReserved](#marketgetreserved) * [MarketGetRetrievalAsk](#marketgetretrievalask) + * [MarketGetRetrievalDeal](#marketgetretrievaldeal) * [MarketImportDealData](#marketimportdealdata) * [MarketImportPublishedDeal](#marketimportpublisheddeal) * [MarketListDataTransfers](#marketlistdatatransfers) @@ -1134,6 +1136,89 @@ Response: } ``` +### MarketGetDeal + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: +```json +{ + "Proposal": { + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PieceSize": 1032, + "VerifiedDeal": true, + "Client": "f01234", + "Provider": "f01234", + "Label": "", + "StartEpoch": 10101, + "EndEpoch": 10101, + "StoragePricePerEpoch": "0", + "ProviderCollateral": "0", + "ClientCollateral": "0" + }, + "ClientSignature": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "ProposalCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "AddFundsCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PublishCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Miner": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "Client": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "State": 42, + "PiecePath": "/some/path", + "PayloadSize": 42, + "MetadataPath": "/some/path", + "SlashEpoch": 10101, + "FastRetrieval": true, + "Message": "string value", + "FundsReserved": "0", + "Ref": { + "TransferType": "string value", + "Root": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PieceCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PieceSize": 1024, + "RawBlockSize": 42 + }, + "AvailableForRetrieval": true, + "DealID": 5432, + "CreationTime": "0001-01-01T00:00:00Z", + "TransferChannelId": { + "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": 3 + }, + "SectorNumber": 9, + "Offset": 1032, + "PieceStatus": "Undefine", + "InboundCAR": "string value", + "CreatedAt": 42, + "UpdatedAt": 42 +} +``` + ### MarketGetDealUpdates @@ -1246,6 +1331,57 @@ Response: } ``` +### MarketGetRetrievalDeal + + +Perms: read + +Inputs: +```json +[ + "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + 42 +] +``` + +Response: +```json +{ + "PayloadCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "ID": 5, + "Selector": { + "Raw": "Ynl0ZSBhcnJheQ==" + }, + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PricePerByte": "0", + "PaymentInterval": 42, + "PaymentIntervalIncrease": 42, + "UnsealPrice": "0", + "StoreID": 42, + "SelStorageProposalCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "ChannelID": { + "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": 3 + }, + "Status": 0, + "Receiver": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "TotalSent": 42, + "FundsReceived": "0", + "Message": "string value", + "CurrentInterval": 42, + "LegacyProtocol": true, + "CreatedAt": 42, + "UpdatedAt": 42 +} +``` + ### MarketImportDealData diff --git a/venus-shared/api/market/v0/mock/mock_imarket.go b/venus-shared/api/market/v0/mock/mock_imarket.go index b57c178b36..111112c54e 100644 --- a/venus-shared/api/market/v0/mock/mock_imarket.go +++ b/venus-shared/api/market/v0/mock/mock_imarket.go @@ -778,6 +778,21 @@ func (mr *MockIMarketMockRecorder) MarketGetAsk(arg0, arg1 interface{}) *gomock. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarketGetAsk", reflect.TypeOf((*MockIMarket)(nil).MarketGetAsk), arg0, arg1) } +// MarketGetDeal mocks base method. +func (m *MockIMarket) MarketGetDeal(arg0 context.Context, arg1 cid.Cid) (*market.MinerDeal, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "MarketGetDeal", arg0, arg1) + ret0, _ := ret[0].(*market.MinerDeal) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// MarketGetDeal indicates an expected call of MarketGetDeal. +func (mr *MockIMarketMockRecorder) MarketGetDeal(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarketGetDeal", reflect.TypeOf((*MockIMarket)(nil).MarketGetDeal), arg0, arg1) +} + // MarketGetDealUpdates mocks base method. func (m *MockIMarket) MarketGetDealUpdates(arg0 context.Context) (<-chan market.MinerDeal, error) { m.ctrl.T.Helper() @@ -823,6 +838,21 @@ func (mr *MockIMarketMockRecorder) MarketGetRetrievalAsk(arg0, arg1 interface{}) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarketGetRetrievalAsk", reflect.TypeOf((*MockIMarket)(nil).MarketGetRetrievalAsk), arg0, arg1) } +// MarketGetRetrievalDeal mocks base method. +func (m *MockIMarket) MarketGetRetrievalDeal(arg0 context.Context, arg1 peer.ID, arg2 uint64) (*market.ProviderDealState, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "MarketGetRetrievalDeal", arg0, arg1, arg2) + ret0, _ := ret[0].(*market.ProviderDealState) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// MarketGetRetrievalDeal indicates an expected call of MarketGetRetrievalDeal. +func (mr *MockIMarketMockRecorder) MarketGetRetrievalDeal(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarketGetRetrievalDeal", reflect.TypeOf((*MockIMarket)(nil).MarketGetRetrievalDeal), arg0, arg1, arg2) +} + // MarketImportDealData mocks base method. func (m *MockIMarket) MarketImportDealData(arg0 context.Context, arg1 cid.Cid, arg2 string) error { m.ctrl.T.Helper() diff --git a/venus-shared/api/market/v0/proxy_gen.go b/venus-shared/api/market/v0/proxy_gen.go index 6e178b0eb9..b7dd89995f 100644 --- a/venus-shared/api/market/v0/proxy_gen.go +++ b/venus-shared/api/market/v0/proxy_gen.go @@ -72,9 +72,11 @@ type IMarketStruct struct { MarketDataTransferPath func(context.Context, address.Address) (string, error) `perm:"admin"` MarketDataTransferUpdates func(ctx context.Context) (<-chan market.DataTransferChannel, error) `perm:"admin"` MarketGetAsk func(ctx context.Context, mAddr address.Address) (*market.SignedStorageAsk, error) `perm:"read"` + MarketGetDeal func(ctx context.Context, dealPropCid cid.Cid) (*market.MinerDeal, error) `perm:"read"` MarketGetDealUpdates func(ctx context.Context) (<-chan market.MinerDeal, error) `perm:"admin"` MarketGetReserved func(ctx context.Context, addr address.Address) (types.BigInt, error) `perm:"sign"` MarketGetRetrievalAsk func(ctx context.Context, mAddr address.Address) (*retrievalmarket.Ask, error) `perm:"read"` + MarketGetRetrievalDeal func(ctx context.Context, receiver peer.ID, dealID uint64) (*market.ProviderDealState, error) `perm:"read"` MarketImportDealData func(ctx context.Context, propcid cid.Cid, path string) error `perm:"admin"` MarketImportPublishedDeal func(ctx context.Context, deal market.MinerDeal) error `perm:"write"` MarketListDataTransfers func(ctx context.Context) ([]market.DataTransferChannel, error) `perm:"admin"` @@ -265,6 +267,9 @@ func (s *IMarketStruct) MarketDataTransferUpdates(p0 context.Context) (<-chan ma func (s *IMarketStruct) MarketGetAsk(p0 context.Context, p1 address.Address) (*market.SignedStorageAsk, error) { return s.Internal.MarketGetAsk(p0, p1) } +func (s *IMarketStruct) MarketGetDeal(p0 context.Context, p1 cid.Cid) (*market.MinerDeal, error) { + return s.Internal.MarketGetDeal(p0, p1) +} func (s *IMarketStruct) MarketGetDealUpdates(p0 context.Context) (<-chan market.MinerDeal, error) { return s.Internal.MarketGetDealUpdates(p0) } @@ -274,6 +279,9 @@ func (s *IMarketStruct) MarketGetReserved(p0 context.Context, p1 address.Address func (s *IMarketStruct) MarketGetRetrievalAsk(p0 context.Context, p1 address.Address) (*retrievalmarket.Ask, error) { return s.Internal.MarketGetRetrievalAsk(p0, p1) } +func (s *IMarketStruct) MarketGetRetrievalDeal(p0 context.Context, p1 peer.ID, p2 uint64) (*market.ProviderDealState, error) { + return s.Internal.MarketGetRetrievalDeal(p0, p1, p2) +} func (s *IMarketStruct) MarketImportDealData(p0 context.Context, p1 cid.Cid, p2 string) error { return s.Internal.MarketImportDealData(p0, p1, p2) } diff --git a/venus-shared/api/market/v1/api.go b/venus-shared/api/market/v1/api.go index 8d0ca3fc5e..4f9048b9e8 100644 --- a/venus-shared/api/market/v1/api.go +++ b/venus-shared/api/market/v1/api.go @@ -31,7 +31,9 @@ type IMarket interface { MarketImportDealData(ctx context.Context, propcid cid.Cid, path string) error //perm:admin MarketImportPublishedDeal(ctx context.Context, deal market.MinerDeal) error //perm:write MarketListDeals(ctx context.Context, addrs []address.Address) ([]*types.MarketDeal, error) //perm:read + MarketGetDeal(ctx context.Context, dealPropCid cid.Cid) (*market.MinerDeal, error) //perm:read MarketListRetrievalDeals(ctx context.Context) ([]market.ProviderDealState, error) //perm:read + MarketGetRetrievalDeal(ctx context.Context, receiver peer.ID, dealID uint64) (*market.ProviderDealState, error) //perm:read MarketGetDealUpdates(ctx context.Context) (<-chan market.MinerDeal, error) //perm:admin MarketListIncompleteDeals(ctx context.Context, mAddr address.Address) ([]market.MinerDeal, error) //perm:read MarketSetAsk(ctx context.Context, mAddr address.Address, price types.BigInt, verifiedPrice types.BigInt, duration abi.ChainEpoch, minPieceSize abi.PaddedPieceSize, maxPieceSize abi.PaddedPieceSize) error //perm:admin diff --git a/venus-shared/api/market/v1/method.md b/venus-shared/api/market/v1/method.md index 9e5c0619bc..bc0d4a5fdb 100644 --- a/venus-shared/api/market/v1/method.md +++ b/venus-shared/api/market/v1/method.md @@ -57,9 +57,11 @@ curl http://:/rpc/v1 -X POST -H "Content-Type: application/json" -H " * [MarketDataTransferPath](#marketdatatransferpath) * [MarketDataTransferUpdates](#marketdatatransferupdates) * [MarketGetAsk](#marketgetask) + * [MarketGetDeal](#marketgetdeal) * [MarketGetDealUpdates](#marketgetdealupdates) * [MarketGetReserved](#marketgetreserved) * [MarketGetRetrievalAsk](#marketgetretrievalask) + * [MarketGetRetrievalDeal](#marketgetretrievaldeal) * [MarketImportDealData](#marketimportdealdata) * [MarketImportPublishedDeal](#marketimportpublisheddeal) * [MarketListDataTransfers](#marketlistdatatransfers) @@ -1134,6 +1136,89 @@ Response: } ``` +### MarketGetDeal + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: +```json +{ + "Proposal": { + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PieceSize": 1032, + "VerifiedDeal": true, + "Client": "f01234", + "Provider": "f01234", + "Label": "", + "StartEpoch": 10101, + "EndEpoch": 10101, + "StoragePricePerEpoch": "0", + "ProviderCollateral": "0", + "ClientCollateral": "0" + }, + "ClientSignature": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "ProposalCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "AddFundsCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PublishCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Miner": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "Client": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "State": 42, + "PiecePath": "/some/path", + "PayloadSize": 42, + "MetadataPath": "/some/path", + "SlashEpoch": 10101, + "FastRetrieval": true, + "Message": "string value", + "FundsReserved": "0", + "Ref": { + "TransferType": "string value", + "Root": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PieceCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PieceSize": 1024, + "RawBlockSize": 42 + }, + "AvailableForRetrieval": true, + "DealID": 5432, + "CreationTime": "0001-01-01T00:00:00Z", + "TransferChannelId": { + "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": 3 + }, + "SectorNumber": 9, + "Offset": 1032, + "PieceStatus": "Undefine", + "InboundCAR": "string value", + "CreatedAt": 42, + "UpdatedAt": 42 +} +``` + ### MarketGetDealUpdates @@ -1246,6 +1331,57 @@ Response: } ``` +### MarketGetRetrievalDeal + + +Perms: read + +Inputs: +```json +[ + "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + 42 +] +``` + +Response: +```json +{ + "PayloadCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "ID": 5, + "Selector": { + "Raw": "Ynl0ZSBhcnJheQ==" + }, + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PricePerByte": "0", + "PaymentInterval": 42, + "PaymentIntervalIncrease": 42, + "UnsealPrice": "0", + "StoreID": 42, + "SelStorageProposalCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "ChannelID": { + "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": 3 + }, + "Status": 0, + "Receiver": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "TotalSent": 42, + "FundsReceived": "0", + "Message": "string value", + "CurrentInterval": 42, + "LegacyProtocol": true, + "CreatedAt": 42, + "UpdatedAt": 42 +} +``` + ### MarketImportDealData diff --git a/venus-shared/api/market/v1/mock/mock_imarket.go b/venus-shared/api/market/v1/mock/mock_imarket.go index b5564d9591..a819a6dd30 100644 --- a/venus-shared/api/market/v1/mock/mock_imarket.go +++ b/venus-shared/api/market/v1/mock/mock_imarket.go @@ -778,6 +778,21 @@ func (mr *MockIMarketMockRecorder) MarketGetAsk(arg0, arg1 interface{}) *gomock. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarketGetAsk", reflect.TypeOf((*MockIMarket)(nil).MarketGetAsk), arg0, arg1) } +// MarketGetDeal mocks base method. +func (m *MockIMarket) MarketGetDeal(arg0 context.Context, arg1 cid.Cid) (*market.MinerDeal, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "MarketGetDeal", arg0, arg1) + ret0, _ := ret[0].(*market.MinerDeal) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// MarketGetDeal indicates an expected call of MarketGetDeal. +func (mr *MockIMarketMockRecorder) MarketGetDeal(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarketGetDeal", reflect.TypeOf((*MockIMarket)(nil).MarketGetDeal), arg0, arg1) +} + // MarketGetDealUpdates mocks base method. func (m *MockIMarket) MarketGetDealUpdates(arg0 context.Context) (<-chan market.MinerDeal, error) { m.ctrl.T.Helper() @@ -823,6 +838,21 @@ func (mr *MockIMarketMockRecorder) MarketGetRetrievalAsk(arg0, arg1 interface{}) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarketGetRetrievalAsk", reflect.TypeOf((*MockIMarket)(nil).MarketGetRetrievalAsk), arg0, arg1) } +// MarketGetRetrievalDeal mocks base method. +func (m *MockIMarket) MarketGetRetrievalDeal(arg0 context.Context, arg1 peer.ID, arg2 uint64) (*market.ProviderDealState, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "MarketGetRetrievalDeal", arg0, arg1, arg2) + ret0, _ := ret[0].(*market.ProviderDealState) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// MarketGetRetrievalDeal indicates an expected call of MarketGetRetrievalDeal. +func (mr *MockIMarketMockRecorder) MarketGetRetrievalDeal(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarketGetRetrievalDeal", reflect.TypeOf((*MockIMarket)(nil).MarketGetRetrievalDeal), arg0, arg1, arg2) +} + // MarketImportDealData mocks base method. func (m *MockIMarket) MarketImportDealData(arg0 context.Context, arg1 cid.Cid, arg2 string) error { m.ctrl.T.Helper() diff --git a/venus-shared/api/market/v1/proxy_gen.go b/venus-shared/api/market/v1/proxy_gen.go index 827caa03cc..2119776a2d 100644 --- a/venus-shared/api/market/v1/proxy_gen.go +++ b/venus-shared/api/market/v1/proxy_gen.go @@ -72,9 +72,11 @@ type IMarketStruct struct { MarketDataTransferPath func(context.Context, address.Address) (string, error) `perm:"admin"` MarketDataTransferUpdates func(ctx context.Context) (<-chan market.DataTransferChannel, error) `perm:"admin"` MarketGetAsk func(ctx context.Context, mAddr address.Address) (*market.SignedStorageAsk, error) `perm:"read"` + MarketGetDeal func(ctx context.Context, dealPropCid cid.Cid) (*market.MinerDeal, error) `perm:"read"` MarketGetDealUpdates func(ctx context.Context) (<-chan market.MinerDeal, error) `perm:"admin"` MarketGetReserved func(ctx context.Context, addr address.Address) (types.BigInt, error) `perm:"sign"` MarketGetRetrievalAsk func(ctx context.Context, mAddr address.Address) (*retrievalmarket.Ask, error) `perm:"read"` + MarketGetRetrievalDeal func(ctx context.Context, receiver peer.ID, dealID uint64) (*market.ProviderDealState, error) `perm:"read"` MarketImportDealData func(ctx context.Context, propcid cid.Cid, path string) error `perm:"admin"` MarketImportPublishedDeal func(ctx context.Context, deal market.MinerDeal) error `perm:"write"` MarketListDataTransfers func(ctx context.Context) ([]market.DataTransferChannel, error) `perm:"admin"` @@ -265,6 +267,9 @@ func (s *IMarketStruct) MarketDataTransferUpdates(p0 context.Context) (<-chan ma func (s *IMarketStruct) MarketGetAsk(p0 context.Context, p1 address.Address) (*market.SignedStorageAsk, error) { return s.Internal.MarketGetAsk(p0, p1) } +func (s *IMarketStruct) MarketGetDeal(p0 context.Context, p1 cid.Cid) (*market.MinerDeal, error) { + return s.Internal.MarketGetDeal(p0, p1) +} func (s *IMarketStruct) MarketGetDealUpdates(p0 context.Context) (<-chan market.MinerDeal, error) { return s.Internal.MarketGetDealUpdates(p0) } @@ -274,6 +279,9 @@ func (s *IMarketStruct) MarketGetReserved(p0 context.Context, p1 address.Address func (s *IMarketStruct) MarketGetRetrievalAsk(p0 context.Context, p1 address.Address) (*retrievalmarket.Ask, error) { return s.Internal.MarketGetRetrievalAsk(p0, p1) } +func (s *IMarketStruct) MarketGetRetrievalDeal(p0 context.Context, p1 peer.ID, p2 uint64) (*market.ProviderDealState, error) { + return s.Internal.MarketGetRetrievalDeal(p0, p1, p2) +} func (s *IMarketStruct) MarketImportDealData(p0 context.Context, p1 cid.Cid, p2 string) error { return s.Internal.MarketImportDealData(p0, p1, p2) }