Skip to content

Commit 603303c

Browse files
authored
get ask (#1907)
1 parent 7ea3377 commit 603303c

File tree

6 files changed

+50
-59
lines changed

6 files changed

+50
-59
lines changed

api/api.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type Boost interface {
3939
BoostIndexerAnnounceDeal(ctx context.Context, deal *smtypes.ProviderDealState) (cid.Cid, error) //perm:admin
4040
BoostIndexerAnnounceLegacyDeal(ctx context.Context, proposalCid cid.Cid) (cid.Cid, error) //perm:admin
4141
BoostDirectDeal(ctx context.Context, params smtypes.DirectDealParams) (*ProviderDealRejectionInfo, error) //perm:admin
42+
MarketGetAsk(ctx context.Context) (*legacytypes.SignedStorageAsk, error) //perm:read
4243

4344
// MethodGroup: Blockstore
4445
BlockstoreGet(ctx context.Context, c cid.Cid) ([]byte, error) //perm:read

api/proxy_gen.go

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/openrpc/boost.json.gz

165 Bytes
Binary file not shown.

documentation/en/api-v1-methods.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* [Log](#log)
2828
* [LogList](#loglist)
2929
* [LogSetLevel](#logsetlevel)
30+
* [Market](#market)
31+
* [MarketGetAsk](#marketgetask)
3032
* [Net](#net)
3133
* [NetAddrsListen](#netaddrslisten)
3234
* [NetAgentVersion](#netagentversion)
@@ -704,6 +706,36 @@ Inputs:
704706

705707
Response: `{}`
706708

709+
## Market
710+
711+
712+
### MarketGetAsk
713+
714+
715+
Perms: read
716+
717+
Inputs: `null`
718+
719+
Response:
720+
```json
721+
{
722+
"Ask": {
723+
"Price": "0",
724+
"VerifiedPrice": "0",
725+
"MinPieceSize": 1032,
726+
"MaxPieceSize": 1032,
727+
"Miner": "f01234",
728+
"Timestamp": 10101,
729+
"Expiry": 10101,
730+
"SeqNo": 42
731+
},
732+
"Signature": {
733+
"Type": 2,
734+
"Data": "Ynl0ZSBhcnJheQ=="
735+
}
736+
}
737+
```
738+
707739
## Net
708740

709741

node/impl/boost.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,7 @@ func (sm *BoostAPI) PdRemoveDealForPiece(ctx context.Context, piececid cid.Cid,
227227
func (sm *BoostAPI) PdCleanup(ctx context.Context) error {
228228
return sm.Pdc.CleanOnce(ctx)
229229
}
230+
231+
func (sm *BoostAPI) MarketGetAsk(ctx context.Context) (*legacytypes.SignedStorageAsk, error) {
232+
return sm.StorageProvider.GetAsk(), nil
233+
}

node/impl/market/market.go

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)