From 021a2480af255fb62bb9fe4ac39c28bb358f4046 Mon Sep 17 00:00:00 2001 From: hannahhoward Date: Thu, 1 Sep 2022 15:22:35 -0700 Subject: [PATCH] feat(retrievalmarkets): expose GetDynamicAsk expose the GetDynamicAsk method on the provider interface --- retrievalmarket/provider.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/retrievalmarket/provider.go b/retrievalmarket/provider.go index f2926aa0..6112759e 100644 --- a/retrievalmarket/provider.go +++ b/retrievalmarket/provider.go @@ -4,6 +4,7 @@ import ( "context" "github.com/filecoin-project/go-fil-markets/shared" + "github.com/filecoin-project/go-state-types/abi" ) // ProviderSubscriber is a callback that is registered to listen for retrieval events on a provider @@ -27,6 +28,10 @@ type RetrievalProvider interface { // GetAsk returns the retrieval providers pricing information GetAsk() *Ask + // GetDynamicAsk quotes a dynamic price for the retrieval deal by calling the user configured + // dynamic pricing function. It passes the static price parameters set in the Ask Store to the pricing function. + GetDynamicAsk(ctx context.Context, input PricingInput, storageDeals []abi.DealID) (Ask, error) + // SubscribeToEvents listens for events that happen related to client retrievals SubscribeToEvents(subscriber ProviderSubscriber) Unsubscribe