Skip to content

Commit 021a248

Browse files
committed
feat(retrievalmarkets): expose GetDynamicAsk
expose the GetDynamicAsk method on the provider interface
1 parent 10e86a0 commit 021a248

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

retrievalmarket/provider.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55

66
"github.com/filecoin-project/go-fil-markets/shared"
7+
"github.com/filecoin-project/go-state-types/abi"
78
)
89

910
// ProviderSubscriber is a callback that is registered to listen for retrieval events on a provider
@@ -27,6 +28,10 @@ type RetrievalProvider interface {
2728
// GetAsk returns the retrieval providers pricing information
2829
GetAsk() *Ask
2930

31+
// GetDynamicAsk quotes a dynamic price for the retrieval deal by calling the user configured
32+
// dynamic pricing function. It passes the static price parameters set in the Ask Store to the pricing function.
33+
GetDynamicAsk(ctx context.Context, input PricingInput, storageDeals []abi.DealID) (Ask, error)
34+
3035
// SubscribeToEvents listens for events that happen related to client retrievals
3136
SubscribeToEvents(subscriber ProviderSubscriber) Unsubscribe
3237

0 commit comments

Comments
 (0)