Documentation ¶
Index ¶
- func CheckResult(jsonStr string) (code types.ResultCode, msg string)
- func GetExchangeRateFromJSON(jsonStr string) (sdk.Dec, error)
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- func ParamKeyTable() paramstypes.KeyTable
- func TxHash(ctx sdk.Context) []byte
- type Keeper
- func (k Keeper) ActiveRequestsIterator(ctx sdk.Context, serviceName string, provider sdk.AccAddress) sdk.Iterator
- func (k Keeper) ActiveRequestsIteratorByReqCtx(ctx sdk.Context, requestContextID tmbytes.HexBytes, batchCounter uint64) sdk.Iterator
- func (k Keeper) AddActiveRequest(ctx sdk.Context, serviceName string, provider sdk.AccAddress, ...)
- func (k Keeper) AddActiveRequestByBinding(ctx sdk.Context, serviceName string, provider sdk.AccAddress, ...)
- func (k Keeper) AddActiveRequestByID(ctx sdk.Context, requestID tmbytes.HexBytes)
- func (k Keeper) AddEarnedFee(ctx sdk.Context, provider sdk.AccAddress, fee sdk.Coins) error
- func (k Keeper) AddNewRequestBatch(ctx sdk.Context, requestContextID tmbytes.HexBytes, requestBatchHeight int64)
- func (k Keeper) AddRequestBatchExpiration(ctx sdk.Context, requestContextID tmbytes.HexBytes, expirationHeight int64)
- func (k Keeper) AddResponse(ctx sdk.Context, requestID tmbytes.HexBytes, provider sdk.AccAddress, ...) (request types.Request, response types.Response, err error)
- func (k Keeper) AddServiceBinding(ctx sdk.Context, serviceName string, provider sdk.AccAddress, ...) error
- func (k Keeper) AddServiceDefinition(ctx sdk.Context, name, description string, tags []string, ...) error
- func (k Keeper) AllActiveRequestsIterator(store sdk.KVStore) sdk.Iterator
- func (k Keeper) AllEarnedFeesIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) AllServiceBindingsIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) ArbitrationTimeLimit(ctx sdk.Context) (res time.Duration)
- func (k Keeper) BaseDenom(ctx sdk.Context) (res string)
- func (k Keeper) Binding(c context.Context, req *types.QueryBindingRequest) (*types.QueryBindingResponse, error)
- func (k Keeper) Bindings(c context.Context, req *types.QueryBindingsRequest) (*types.QueryBindingsResponse, error)
- func (k Keeper) Callback(ctx sdk.Context, requestContextID tmbytes.HexBytes)
- func (k Keeper) CheckAuthority(ctx sdk.Context, consumer sdk.AccAddress, requestContextID tmbytes.HexBytes, ...) error
- func (k Keeper) CleanBatch(ctx sdk.Context, requestContext types.RequestContext, ...)
- func (k Keeper) ComplaintRetrospect(ctx sdk.Context) (res time.Duration)
- func (k Keeper) CompleteBatch(ctx sdk.Context, requestContext types.RequestContext, ...) types.RequestContext
- func (k Keeper) CompleteServiceContext(ctx sdk.Context, context types.RequestContext, ...)
- func (k Keeper) CreateRequestContext(ctx sdk.Context, serviceName string, providers []sdk.AccAddress, ...) (tmbytes.HexBytes, error)
- func (k Keeper) DeductServiceFees(ctx sdk.Context, consumer sdk.AccAddress, serviceFees sdk.Coins) error
- func (k Keeper) Definition(c context.Context, req *types.QueryDefinitionRequest) (*types.QueryDefinitionResponse, error)
- func (k Keeper) DeleteActiveRequest(ctx sdk.Context, serviceName string, provider sdk.AccAddress, ...)
- func (k Keeper) DeleteActiveRequestByBinding(ctx sdk.Context, serviceName string, provider sdk.AccAddress, ...)
- func (k Keeper) DeleteActiveRequestByID(ctx sdk.Context, requestID tmbytes.HexBytes)
- func (k Keeper) DeleteCompactRequest(ctx sdk.Context, requestID tmbytes.HexBytes)
- func (k Keeper) DeleteEarnedFees(ctx sdk.Context, provider sdk.AccAddress)
- func (k Keeper) DeleteNewRequestBatch(ctx sdk.Context, requestContextID tmbytes.HexBytes, requestBatchHeight int64)
- func (k Keeper) DeleteNewRequestBatchHeight(ctx sdk.Context, requestContextID tmbytes.HexBytes)
- func (k Keeper) DeleteOwnerEarnedFees(ctx sdk.Context, owner sdk.AccAddress)
- func (k Keeper) DeleteRequestBatchExpiration(ctx sdk.Context, requestContextID tmbytes.HexBytes, expirationHeight int64)
- func (k Keeper) DeleteRequestBatchExpirationHeight(ctx sdk.Context, requestContextID tmbytes.HexBytes)
- func (k Keeper) DeleteRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes)
- func (k Keeper) DeleteResponse(ctx sdk.Context, requestID tmbytes.HexBytes)
- func (k Keeper) DisableServiceBinding(ctx sdk.Context, serviceName string, provider, owner sdk.AccAddress) error
- func (k Keeper) EarnedFees(c context.Context, req *types.QueryEarnedFeesRequest) (*types.QueryEarnedFeesResponse, error)
- func (k Keeper) EnableServiceBinding(ctx sdk.Context, serviceName string, provider sdk.AccAddress, ...) error
- func (k Keeper) FilterServiceProviders(ctx sdk.Context, serviceName string, providers []sdk.AccAddress, timeout int64, ...) ([]sdk.AccAddress, sdk.Coins, string, error)
- func (k Keeper) GetCompactRequest(ctx sdk.Context, requestID tmbytes.HexBytes) (request types.CompactRequest, found bool)
- func (k Keeper) GetEarnedFees(ctx sdk.Context, provider sdk.AccAddress) (fees sdk.Coins, found bool)
- func (k Keeper) GetExchangeRate(ctx sdk.Context, baseDenom, quoteDenom string) (sdk.Dec, error)
- func (k Keeper) GetExchangedPrice(ctx sdk.Context, consumer sdk.AccAddress, binding types.ServiceBinding) (sdk.Coins, string, error)
- func (k Keeper) GetInternalIndex(ctx sdk.Context) int64
- func (k Keeper) GetMinDeposit(ctx sdk.Context, pricing types.Pricing) (sdk.Coins, error)
- func (k Keeper) GetModuleServiceByModuleName(moduleName string) (*types.ModuleService, bool)
- func (k Keeper) GetModuleServiceByServiceName(serviceName string) (string, *types.ModuleService, bool)
- func (k Keeper) GetOwner(ctx sdk.Context, provider sdk.AccAddress) (sdk.AccAddress, bool)
- func (k Keeper) GetOwnerEarnedFees(ctx sdk.Context, owner sdk.AccAddress) (fees sdk.Coins, found bool)
- func (k Keeper) GetOwnerServiceBindings(ctx sdk.Context, owner sdk.AccAddress, serviceName string) []*types.ServiceBinding
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetPrice(ctx sdk.Context, consumer sdk.AccAddress, binding types.ServiceBinding) sdk.Coins
- func (k Keeper) GetPricing(ctx sdk.Context, serviceName string, provider sdk.AccAddress) (pricing types.Pricing)
- func (k Keeper) GetRequest(ctx sdk.Context, requestID tmbytes.HexBytes) (request types.Request, found bool)
- func (k Keeper) GetRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes) (requestContext types.RequestContext, found bool)
- func (k Keeper) GetRequestVolume(ctx sdk.Context, consumer sdk.AccAddress, serviceName string, ...) uint64
- func (k Keeper) GetResponse(ctx sdk.Context, requestID tmbytes.HexBytes) (response types.Response, found bool)
- func (k Keeper) GetResponseCallback(moduleName string) (types.ResponseCallback, error)
- func (k Keeper) GetResponseOutputs(ctx sdk.Context, requestContextID tmbytes.HexBytes, batchCounter uint64) []string
- func (k Keeper) GetServiceBinding(ctx sdk.Context, serviceName string, provider sdk.AccAddress) (svcBinding types.ServiceBinding, found bool)
- func (k Keeper) GetServiceDefinition(ctx sdk.Context, serviceName string) (svcDef types.ServiceDefinition, found bool)
- func (k Keeper) GetServiceDepositAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetServiceRequestAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetStateCallback(moduleName string) (types.StateCallback, error)
- func (k Keeper) GetWithdrawAddress(ctx sdk.Context, owner sdk.AccAddress) sdk.AccAddress
- func (k Keeper) HasNewRequestBatch(ctx sdk.Context, requestContextID tmbytes.HexBytes) bool
- func (k Keeper) HasRequestBatchExpiration(ctx sdk.Context, requestContextID tmbytes.HexBytes) bool
- func (k Keeper) IncreaseRequestVolume(ctx sdk.Context, consumer sdk.AccAddress, serviceName string, ...)
- func (k Keeper) InitiateRequests(ctx sdk.Context, requestContextID tmbytes.HexBytes, providers []sdk.AccAddress, ...) []tmbytes.HexBytes
- func (k Keeper) IsRequestActive(ctx sdk.Context, requestID tmbytes.HexBytes) bool
- func (k Keeper) IterateActiveRequests(ctx sdk.Context, requestContextID tmbytes.HexBytes, batchCounter uint64, ...)
- func (k Keeper) IterateExpiredRequestBatch(ctx sdk.Context, expirationHeight int64, ...)
- func (k Keeper) IterateNewRequestBatch(ctx sdk.Context, requestBatchHeight int64, ...)
- func (k Keeper) IterateRequestContexts(ctx sdk.Context, ...)
- func (k Keeper) IterateRequests(ctx sdk.Context, ...)
- func (k Keeper) IterateResponses(ctx sdk.Context, ...)
- func (k Keeper) IterateServiceBindings(ctx sdk.Context, op func(binding types.ServiceBinding) (stop bool))
- func (k Keeper) IterateServiceDefinitions(ctx sdk.Context, op func(definition types.ServiceDefinition) (stop bool))
- func (k Keeper) IterateWithdrawAddresses(ctx sdk.Context, ...)
- func (k Keeper) KillRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes, consumer sdk.AccAddress) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MaxRequestTimeout(ctx sdk.Context) (res int64)
- func (k Keeper) MinDeposit(ctx sdk.Context) (res sdk.Coins)
- func (k Keeper) MinDepositMultiple(ctx sdk.Context) (res int64)
- func (k Keeper) OnRequestContextPaused(ctx sdk.Context, requestContext *types.RequestContext, ...)
- func (k Keeper) OwnerProvidersIterator(ctx sdk.Context, owner sdk.AccAddress) sdk.Iterator
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) ParsePricing(ctx sdk.Context, pricing string) (p types.Pricing, err error)
- func (k Keeper) PauseRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes, consumer sdk.AccAddress) error
- func (k Keeper) RefundDeposit(ctx sdk.Context, serviceName string, provider, owner sdk.AccAddress) error
- func (k Keeper) RefundDeposits(ctx sdk.Context) error
- func (k Keeper) RefundEarnedFees(ctx sdk.Context) error
- func (k Keeper) RefundServiceFee(ctx sdk.Context, consumer sdk.AccAddress, serviceFee sdk.Coins) error
- func (k Keeper) RefundServiceFees(ctx sdk.Context) error
- func (k Keeper) RegisterModuleService(moduleName string, moduleService *types.ModuleService) error
- func (k Keeper) RegisterResponseCallback(moduleName string, respCallback types.ResponseCallback) error
- func (k Keeper) RegisterStateCallback(moduleName string, stateCallback types.StateCallback) error
- func (k Keeper) Request(c context.Context, req *types.QueryRequestRequest) (*types.QueryRequestResponse, error)
- func (k Keeper) RequestContext(c context.Context, req *types.QueryRequestContextRequest) (*types.QueryRequestContextResponse, error)
- func (k Keeper) RequestModuleService(ctx sdk.Context, moduleService *types.ModuleService, ...) error
- func (k Keeper) Requests(c context.Context, req *types.QueryRequestsRequest) (*types.QueryRequestsResponse, error)
- func (k Keeper) RequestsByReqCtx(c context.Context, req *types.QueryRequestsByReqCtxRequest) (*types.QueryRequestsByReqCtxResponse, error)
- func (k Keeper) RequestsIteratorByReqCtx(ctx sdk.Context, requestContextID tmbytes.HexBytes, batchCounter uint64) sdk.Iterator
- func (k Keeper) ResetRequestContextsStateAndBatch(ctx sdk.Context) error
- func (k Keeper) Response(c context.Context, req *types.QueryResponseRequest) (*types.QueryResponseResponse, error)
- func (k Keeper) Responses(c context.Context, req *types.QueryResponsesRequest) (*types.QueryResponsesResponse, error)
- func (k Keeper) ResponsesIteratorByReqCtx(ctx sdk.Context, requestContextID tmbytes.HexBytes, batchCounter uint64) sdk.Iterator
- func (k Keeper) Schema(c context.Context, req *types.QuerySchemaRequest) (*types.QuerySchemaResponse, error)
- func (k Keeper) ServiceBindingsIterator(ctx sdk.Context, serviceName string) sdk.Iterator
- func (k Keeper) ServiceFeeTax(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) SetCompactRequest(ctx sdk.Context, requestID tmbytes.HexBytes, request types.CompactRequest)
- func (k Keeper) SetEarnedFees(ctx sdk.Context, provider sdk.AccAddress, fees sdk.Coins)
- func (k Keeper) SetInternalIndex(ctx sdk.Context, index int64)
- func (k Keeper) SetModuleService(moduleName string, moduleService *types.ModuleService)
- func (k Keeper) SetNewRequestBatchHeight(ctx sdk.Context, requestContextID tmbytes.HexBytes, requestBatchHeight int64)
- func (k Keeper) SetOwner(ctx sdk.Context, provider, owner sdk.AccAddress)
- func (k Keeper) SetOwnerEarnedFees(ctx sdk.Context, owner sdk.AccAddress, fees sdk.Coins)
- func (k Keeper) SetOwnerProvider(ctx sdk.Context, owner, provider sdk.AccAddress)
- func (k Keeper) SetOwnerServiceBinding(ctx sdk.Context, svcBinding types.ServiceBinding)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPricing(ctx sdk.Context, serviceName string, provider sdk.AccAddress, ...)
- func (k Keeper) SetRequestBatchExpirationHeight(ctx sdk.Context, requestContextID tmbytes.HexBytes, expirationHeight int64)
- func (k Keeper) SetRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes, ...)
- func (k Keeper) SetRequestVolume(ctx sdk.Context, consumer sdk.AccAddress, serviceName string, ...)
- func (k Keeper) SetResponse(ctx sdk.Context, requestID tmbytes.HexBytes, response types.Response)
- func (k Keeper) SetServiceBinding(ctx sdk.Context, svcBinding types.ServiceBinding)
- func (k Keeper) SetServiceBindingForGenesis(ctx sdk.Context, svcBinding types.ServiceBinding) error
- func (k Keeper) SetServiceDefinition(ctx sdk.Context, svcDef types.ServiceDefinition)
- func (k Keeper) SetWithdrawAddress(ctx sdk.Context, owner, withdrawAddr sdk.AccAddress)
- func (k Keeper) SkipCurrentRequestBatch(ctx sdk.Context, requestContextID tmbytes.HexBytes, ...)
- func (k Keeper) Slash(ctx sdk.Context, requestID tmbytes.HexBytes) error
- func (k Keeper) SlashFraction(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) StartRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes, consumer sdk.AccAddress) error
- func (k Keeper) TxSizeLimit(ctx sdk.Context) (res uint64)
- func (k Keeper) UpdateRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes, providers []sdk.AccAddress, ...) error
- func (k Keeper) UpdateServiceBinding(ctx sdk.Context, serviceName string, provider sdk.AccAddress, ...) error
- func (k Keeper) WithdrawAddress(c context.Context, req *types.QueryWithdrawAddressRequest) (*types.QueryWithdrawAddressResponse, error)
- func (k Keeper) WithdrawEarnedFees(ctx sdk.Context, owner, provider sdk.AccAddress) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResult ¶
func CheckResult(jsonStr string) (code types.ResultCode, msg string)
func GetExchangeRateFromJSON ¶ added in v1.2.0
func NewMsgServerImpl ¶ added in v1.2.0
NewMsgServerImpl returns an implementation of the service MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier creates a new service Querier instance
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the service keeper
func NewKeeper ¶
func NewKeeper( cdc codec.Marshaler, key sdk.StoreKey, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, paramSpace paramstypes.Subspace, taxAccName string, ) Keeper
NewKeeper creates a new service Keeper instance
func (Keeper) ActiveRequestsIterator ¶
func (k Keeper) ActiveRequestsIterator(ctx sdk.Context, serviceName string, provider sdk.AccAddress) sdk.Iterator
ActiveRequestsIterator returns an iterator for all the active requests of the specified service binding
func (Keeper) ActiveRequestsIteratorByReqCtx ¶
func (k Keeper) ActiveRequestsIteratorByReqCtx(ctx sdk.Context, requestContextID tmbytes.HexBytes, batchCounter uint64) sdk.Iterator
ActiveRequestsIteratorByReqCtx returns an iterator for all the active requests of the specified service binding
func (Keeper) AddActiveRequest ¶
func (k Keeper) AddActiveRequest( ctx sdk.Context, serviceName string, provider sdk.AccAddress, expirationHeight int64, requestID tmbytes.HexBytes, )
AddActiveRequest adds the specified active request
func (Keeper) AddActiveRequestByBinding ¶
func (k Keeper) AddActiveRequestByBinding( ctx sdk.Context, serviceName string, provider sdk.AccAddress, expirationHeight int64, requestID tmbytes.HexBytes, )
AddActiveRequestByBinding adds the specified active request by the binding
func (Keeper) AddActiveRequestByID ¶
AddActiveRequestByID adds the specified active request by request ID
func (Keeper) AddEarnedFee ¶
AddEarnedFee adds the earned fee for the given provider
func (Keeper) AddNewRequestBatch ¶
func (k Keeper) AddNewRequestBatch(ctx sdk.Context, requestContextID tmbytes.HexBytes, requestBatchHeight int64)
AddNewRequestBatch adds a request batch to the new request batch queue
func (Keeper) AddRequestBatchExpiration ¶
func (k Keeper) AddRequestBatchExpiration(ctx sdk.Context, requestContextID tmbytes.HexBytes, expirationHeight int64)
AddRequestBatchExpiration adds a request batch to the expiration queue
func (Keeper) AddResponse ¶
func (k Keeper) AddResponse( ctx sdk.Context, requestID tmbytes.HexBytes, provider sdk.AccAddress, result string, output string, ) ( request types.Request, response types.Response, err error, )
AddResponse adds the response for the specified request ID
func (Keeper) AddServiceBinding ¶
func (k Keeper) AddServiceBinding( ctx sdk.Context, serviceName string, provider sdk.AccAddress, deposit sdk.Coins, pricing string, qos uint64, options string, owner sdk.AccAddress, ) error
AddServiceBinding creates a new service binding
func (Keeper) AddServiceDefinition ¶
func (k Keeper) AddServiceDefinition( ctx sdk.Context, name, description string, tags []string, author sdk.AccAddress, authorDescription, schemas string, ) error
AddServiceDefinition creates a new service definition
func (Keeper) AllActiveRequestsIterator ¶
AllActiveRequestsIterator returns an iterator for all the active requests
func (Keeper) AllEarnedFeesIterator ¶
AllEarnedFeesIterator returns an iterator for all the earned fees
func (Keeper) AllServiceBindingsIterator ¶
AllServiceBindingsIterator returns an iterator for all bindings
func (Keeper) ArbitrationTimeLimit ¶
ArbitrationTimeLimit returns the arbitration time limit
func (Keeper) Binding ¶
func (k Keeper) Binding(c context.Context, req *types.QueryBindingRequest) (*types.QueryBindingResponse, error)
func (Keeper) Bindings ¶
func (k Keeper) Bindings(c context.Context, req *types.QueryBindingsRequest) (*types.QueryBindingsResponse, error)
func (Keeper) CheckAuthority ¶
func (k Keeper) CheckAuthority( ctx sdk.Context, consumer sdk.AccAddress, requestContextID tmbytes.HexBytes, checkModule bool, ) error
CheckAuthority checks if the operation on the specified request context is authorized
func (Keeper) CleanBatch ¶
func (k Keeper) CleanBatch(ctx sdk.Context, requestContext types.RequestContext, requestContextID tmbytes.HexBytes)
CleanBatch cleans up all requests and responses related to the batch
func (Keeper) ComplaintRetrospect ¶
ComplaintRetrospect returns the complaint retrospect duration
func (Keeper) CompleteBatch ¶
func (k Keeper) CompleteBatch(ctx sdk.Context, requestContext types.RequestContext, requestContextID tmbytes.HexBytes) types.RequestContext
CompleteBatch completes a running batch
func (Keeper) CompleteServiceContext ¶
func (k Keeper) CompleteServiceContext(ctx sdk.Context, context types.RequestContext, requestContextID tmbytes.HexBytes)
CompleteServiceContext completes a running or paused context
func (Keeper) CreateRequestContext ¶
func (k Keeper) CreateRequestContext( ctx sdk.Context, serviceName string, providers []sdk.AccAddress, consumer sdk.AccAddress, input string, serviceFeeCap sdk.Coins, timeout int64, repeated bool, repeatedFrequency uint64, repeatedTotal int64, state types.RequestContextState, responseThreshold uint32, moduleName string, ) ( tmbytes.HexBytes, error, )
CreateRequestContext creates a request context with the specified params
func (Keeper) DeductServiceFees ¶
func (k Keeper) DeductServiceFees(ctx sdk.Context, consumer sdk.AccAddress, serviceFees sdk.Coins) error
DeductServiceFees deducts the given service fees from the specified consumer
func (Keeper) Definition ¶
func (k Keeper) Definition(c context.Context, req *types.QueryDefinitionRequest) (*types.QueryDefinitionResponse, error)
func (Keeper) DeleteActiveRequest ¶
func (k Keeper) DeleteActiveRequest( ctx sdk.Context, serviceName string, provider sdk.AccAddress, expirationHeight int64, requestID tmbytes.HexBytes, )
DeleteActiveRequest deletes the specified active request
func (Keeper) DeleteActiveRequestByBinding ¶
func (k Keeper) DeleteActiveRequestByBinding( ctx sdk.Context, serviceName string, provider sdk.AccAddress, expirationHeight int64, requestID tmbytes.HexBytes, )
DeleteActiveRequestByBinding deletes the specified active request by the binding
func (Keeper) DeleteActiveRequestByID ¶
DeleteActiveRequestByID deletes the specified active request by request ID
func (Keeper) DeleteCompactRequest ¶
DeleteCompactRequest deletes the specified compact request
func (Keeper) DeleteEarnedFees ¶
func (k Keeper) DeleteEarnedFees(ctx sdk.Context, provider sdk.AccAddress)
DeleteEarnedFees removes the earned fees of the specified provider
func (Keeper) DeleteNewRequestBatch ¶
func (k Keeper) DeleteNewRequestBatch(ctx sdk.Context, requestContextID tmbytes.HexBytes, requestBatchHeight int64)
DeleteNewRequestBatch deletes the request batch in the given height from the new request batch queue
func (Keeper) DeleteNewRequestBatchHeight ¶
DeleteNewRequestBatchHeight deletes the new request batch height for the specified request context
func (Keeper) DeleteOwnerEarnedFees ¶
func (k Keeper) DeleteOwnerEarnedFees(ctx sdk.Context, owner sdk.AccAddress)
DeleteOwnerEarnedFees removes the earned fees of the specified owner
func (Keeper) DeleteRequestBatchExpiration ¶
func (k Keeper) DeleteRequestBatchExpiration(ctx sdk.Context, requestContextID tmbytes.HexBytes, expirationHeight int64)
DeleteRequestBatchExpiration deletes the request batch from the expiration queue
func (Keeper) DeleteRequestBatchExpirationHeight ¶
func (k Keeper) DeleteRequestBatchExpirationHeight(ctx sdk.Context, requestContextID tmbytes.HexBytes)
DeleteRequestBatchExpirationHeight deletes the request batch expiration height for the specified request context
func (Keeper) DeleteRequestContext ¶
DeleteRequestContext deletes the specified request context
func (Keeper) DeleteResponse ¶
DeleteResponse deletes a response with the speicified request ID
func (Keeper) DisableServiceBinding ¶
func (k Keeper) DisableServiceBinding( ctx sdk.Context, serviceName string, provider, owner sdk.AccAddress, ) error
DisableServiceBinding disables the specified service binding
func (Keeper) EarnedFees ¶
func (k Keeper) EarnedFees(c context.Context, req *types.QueryEarnedFeesRequest) (*types.QueryEarnedFeesResponse, error)
func (Keeper) EnableServiceBinding ¶
func (k Keeper) EnableServiceBinding( ctx sdk.Context, serviceName string, provider sdk.AccAddress, deposit sdk.Coins, owner sdk.AccAddress, ) error
EnableServiceBinding enables the specified service binding
func (Keeper) FilterServiceProviders ¶
func (k Keeper) FilterServiceProviders( ctx sdk.Context, serviceName string, providers []sdk.AccAddress, timeout int64, serviceFeeCap sdk.Coins, consumer sdk.AccAddress, ) ( []sdk.AccAddress, sdk.Coins, string, error, )
FilterServiceProviders gets the providers which satisfy the specified requirement
func (Keeper) GetCompactRequest ¶
func (k Keeper) GetCompactRequest(ctx sdk.Context, requestID tmbytes.HexBytes) (request types.CompactRequest, found bool)
GetCompactRequest retrieves the specified compact request
func (Keeper) GetEarnedFees ¶
func (k Keeper) GetEarnedFees(ctx sdk.Context, provider sdk.AccAddress) (fees sdk.Coins, found bool)
GetEarnedFees retrieves the earned fees of the specified provider
func (Keeper) GetExchangeRate ¶ added in v1.2.0
GetExchangeRate retrieves the exchange rate of the given pair by the oracle module service
func (Keeper) GetExchangedPrice ¶
func (k Keeper) GetExchangedPrice( ctx sdk.Context, consumer sdk.AccAddress, binding types.ServiceBinding, ) ( sdk.Coins, string, error, )
GetExchangedPrice gets the exchanged price for the specified consumer and binding Note: ensure that the binding is valid
func (Keeper) GetInternalIndex ¶ added in v1.2.0
GetInternalIndex returns the internal index and increases the internal index + 1
func (Keeper) GetMinDeposit ¶ added in v1.2.0
GetMinDeposit gets the minimum deposit required for the service binding
func (Keeper) GetModuleServiceByModuleName ¶
func (k Keeper) GetModuleServiceByModuleName(moduleName string) (*types.ModuleService, bool)
func (Keeper) GetModuleServiceByServiceName ¶
func (Keeper) GetOwner ¶
func (k Keeper) GetOwner(ctx sdk.Context, provider sdk.AccAddress) (sdk.AccAddress, bool)
GetOwner gets the owner for the specified provider
func (Keeper) GetOwnerEarnedFees ¶
func (k Keeper) GetOwnerEarnedFees(ctx sdk.Context, owner sdk.AccAddress) (fees sdk.Coins, found bool)
GetOwnerEarnedFees retrieves the earned fees of the specified owner
func (Keeper) GetOwnerServiceBindings ¶
func (k Keeper) GetOwnerServiceBindings(ctx sdk.Context, owner sdk.AccAddress, serviceName string) []*types.ServiceBinding
GetOwnerServiceBindings retrieves the service bindings with the specified service name and owner
func (Keeper) GetPrice ¶
func (k Keeper) GetPrice( ctx sdk.Context, consumer sdk.AccAddress, binding types.ServiceBinding, ) sdk.Coins
func (Keeper) GetPricing ¶
func (k Keeper) GetPricing(ctx sdk.Context, serviceName string, provider sdk.AccAddress) (pricing types.Pricing)
GetPricing retrieves the pricing of the specified service binding
func (Keeper) GetRequest ¶
func (k Keeper) GetRequest(ctx sdk.Context, requestID tmbytes.HexBytes) (request types.Request, found bool)
GetRequest returns the specified request
func (Keeper) GetRequestContext ¶
func (k Keeper) GetRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes) (requestContext types.RequestContext, found bool)
GetRequestContext retrieves the specified request context
func (Keeper) GetRequestVolume ¶
func (k Keeper) GetRequestVolume( ctx sdk.Context, consumer sdk.AccAddress, serviceName string, provider sdk.AccAddress, ) uint64
GetRequestVolume gets the current request volume for the specified consumer and binding
func (Keeper) GetResponse ¶
func (k Keeper) GetResponse(ctx sdk.Context, requestID tmbytes.HexBytes) (response types.Response, found bool)
GetResponse returns a response with the speicified request ID
func (Keeper) GetResponseCallback ¶
func (k Keeper) GetResponseCallback(moduleName string) (types.ResponseCallback, error)
GetResponseCallback gets the registered module callback for response handling
func (Keeper) GetResponseOutputs ¶
func (k Keeper) GetResponseOutputs(ctx sdk.Context, requestContextID tmbytes.HexBytes, batchCounter uint64) []string
GetResponseOutputs retrieves all response outputs of the specified request context and batch counter
func (Keeper) GetServiceBinding ¶
func (k Keeper) GetServiceBinding( ctx sdk.Context, serviceName string, provider sdk.AccAddress, ) ( svcBinding types.ServiceBinding, found bool, )
GetServiceBinding retrieves the specified service binding
func (Keeper) GetServiceDefinition ¶
func (k Keeper) GetServiceDefinition(ctx sdk.Context, serviceName string) (svcDef types.ServiceDefinition, found bool)
GetServiceDefinition retrieves a service definition of the specified service name
func (Keeper) GetServiceDepositAccount ¶
func (k Keeper) GetServiceDepositAccount(ctx sdk.Context) authtypes.ModuleAccountI
GetServiceDepositAccount returns the service depost ModuleAccount
func (Keeper) GetServiceRequestAccount ¶
func (k Keeper) GetServiceRequestAccount(ctx sdk.Context) authtypes.ModuleAccountI
GetServiceRequestAccount returns the service request ModuleAccount
func (Keeper) GetStateCallback ¶
func (k Keeper) GetStateCallback(moduleName string) (types.StateCallback, error)
GetStateCallback gets the registered module callback for state handling
func (Keeper) GetWithdrawAddress ¶
func (k Keeper) GetWithdrawAddress(ctx sdk.Context, owner sdk.AccAddress) sdk.AccAddress
GetWithdrawAddress gets the withdrawal address of the specified owner
func (Keeper) HasNewRequestBatch ¶
HasNewRequestBatch checks if the new request batch of the specified request context exists
func (Keeper) HasRequestBatchExpiration ¶
HasRequestBatchExpiration checks if the request batch expiration of the specified request context exists
func (Keeper) IncreaseRequestVolume ¶
func (k Keeper) IncreaseRequestVolume( ctx sdk.Context, consumer sdk.AccAddress, serviceName string, provider sdk.AccAddress, )
IncreaseRequestVolume increases the request volume by 1
func (Keeper) InitiateRequests ¶
func (k Keeper) InitiateRequests( ctx sdk.Context, requestContextID tmbytes.HexBytes, providers []sdk.AccAddress, providerRequests map[string][]string, ) []tmbytes.HexBytes
InitiateRequests creates requests for the given providers from the specified request context Note: make sure that request context is valid and running, and providers are valid
func (Keeper) IsRequestActive ¶
IsRequestActive checks if the specified request is active
func (Keeper) IterateActiveRequests ¶
func (k Keeper) IterateActiveRequests( ctx sdk.Context, requestContextID tmbytes.HexBytes, batchCounter uint64, op func(requestID tmbytes.HexBytes, request types.Request), )
IterateActiveRequests iterates through the active requests for the specified request context ID and batch counter
func (Keeper) IterateExpiredRequestBatch ¶
func (k Keeper) IterateExpiredRequestBatch( ctx sdk.Context, expirationHeight int64, op func(requestContextID tmbytes.HexBytes, requestContext types.RequestContext), )
IterateExpiredRequestBatch iterates through the expired request batch queue in the specified height
func (Keeper) IterateNewRequestBatch ¶
func (k Keeper) IterateNewRequestBatch( ctx sdk.Context, requestBatchHeight int64, op func(requestContextID tmbytes.HexBytes, requestContext *types.RequestContext), )
IterateNewRequestBatch iterates through the new request batch queue in the specified height
func (Keeper) IterateRequestContexts ¶
func (k Keeper) IterateRequestContexts( ctx sdk.Context, op func(requestContextID tmbytes.HexBytes, requestContext types.RequestContext) (stop bool), )
IterateRequestContexts iterates through all request contexts
func (Keeper) IterateRequests ¶
func (k Keeper) IterateRequests( ctx sdk.Context, op func(requestID tmbytes.HexBytes, request types.CompactRequest) (stop bool), )
IterateRequests iterates through all compact requests
func (Keeper) IterateResponses ¶
func (k Keeper) IterateResponses( ctx sdk.Context, op func(requestID tmbytes.HexBytes, response types.Response) (stop bool), )
IterateResponses iterates through all responses
func (Keeper) IterateServiceBindings ¶
func (Keeper) IterateServiceDefinitions ¶
func (k Keeper) IterateServiceDefinitions( ctx sdk.Context, op func(definition types.ServiceDefinition) (stop bool), )
IterateServiceDefinitions iterates through all service definitions
func (Keeper) IterateWithdrawAddresses ¶
func (k Keeper) IterateWithdrawAddresses( ctx sdk.Context, op func(owner sdk.AccAddress, withdrawAddress sdk.AccAddress) (stop bool), )
IterateWithdrawAddresses iterates through all withdrawal addresses
func (Keeper) KillRequestContext ¶
func (k Keeper) KillRequestContext( ctx sdk.Context, requestContextID tmbytes.HexBytes, consumer sdk.AccAddress, ) error
KillRequestContext terminates the specified request context
func (Keeper) MaxRequestTimeout ¶
MaxRequestTimeout returns the maximum request timeout
func (Keeper) MinDeposit ¶
MinDeposit returns the minimum deposit
func (Keeper) MinDepositMultiple ¶
MinDepositMultiple returns the minimum deposit multiple
func (Keeper) OnRequestContextPaused ¶
func (k Keeper) OnRequestContextPaused( ctx sdk.Context, requestContext *types.RequestContext, requestContextID tmbytes.HexBytes, cause string, )
OnRequestContextPaused handles the event where the specified request context is paused due to certain cause
func (Keeper) OwnerProvidersIterator ¶
OwnerProvidersIterator returns an iterator for all providers of the specified owner
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) ParsePricing ¶
ParsePricing parses the given string to Pricing
func (Keeper) PauseRequestContext ¶
func (k Keeper) PauseRequestContext( ctx sdk.Context, requestContextID tmbytes.HexBytes, consumer sdk.AccAddress, ) error
PauseRequestContext suspends the specified request context
func (Keeper) RefundDeposit ¶
func (k Keeper) RefundDeposit(ctx sdk.Context, serviceName string, provider, owner sdk.AccAddress) error
RefundDeposit refunds the deposit from the specified service binding
func (Keeper) RefundDeposits ¶
RefundDeposits refunds the deposits of all the service bindings
func (Keeper) RefundEarnedFees ¶
RefundEarnedFees refunds all the earned fees
func (Keeper) RefundServiceFee ¶
func (k Keeper) RefundServiceFee(ctx sdk.Context, consumer sdk.AccAddress, serviceFee sdk.Coins) error
RefundServiceFee refunds the service fee to the specified consumer
func (Keeper) RefundServiceFees ¶
RefundServiceFees refunds the service fees of all the active requests
func (Keeper) RegisterModuleService ¶
func (k Keeper) RegisterModuleService(moduleName string, moduleService *types.ModuleService) error
RegisterModuleService registers a module service
func (Keeper) RegisterResponseCallback ¶
func (k Keeper) RegisterResponseCallback(moduleName string, respCallback types.ResponseCallback) error
RegisterResponseCallback registers a module callback for response handling
func (Keeper) RegisterStateCallback ¶
func (k Keeper) RegisterStateCallback(moduleName string, stateCallback types.StateCallback) error
RegisterStateCallback registers a module callback for state handling
func (Keeper) Request ¶
func (k Keeper) Request(c context.Context, req *types.QueryRequestRequest) (*types.QueryRequestResponse, error)
func (Keeper) RequestContext ¶
func (k Keeper) RequestContext(c context.Context, req *types.QueryRequestContextRequest) (*types.QueryRequestContextResponse, error)
func (Keeper) RequestModuleService ¶
func (Keeper) Requests ¶
func (k Keeper) Requests(c context.Context, req *types.QueryRequestsRequest) (*types.QueryRequestsResponse, error)
func (Keeper) RequestsByReqCtx ¶
func (k Keeper) RequestsByReqCtx(c context.Context, req *types.QueryRequestsByReqCtxRequest) (*types.QueryRequestsByReqCtxResponse, error)
func (Keeper) RequestsIteratorByReqCtx ¶
func (k Keeper) RequestsIteratorByReqCtx(ctx sdk.Context, requestContextID tmbytes.HexBytes, batchCounter uint64) sdk.Iterator
RequestsIteratorByReqCtx returns an iterator for all requests of the specified request context ID and batch counter
func (Keeper) ResetRequestContextsStateAndBatch ¶
ResetRequestContextsStateAndBatch reset request contexts state and batch
func (Keeper) Response ¶
func (k Keeper) Response(c context.Context, req *types.QueryResponseRequest) (*types.QueryResponseResponse, error)
func (Keeper) Responses ¶
func (k Keeper) Responses(c context.Context, req *types.QueryResponsesRequest) (*types.QueryResponsesResponse, error)
func (Keeper) ResponsesIteratorByReqCtx ¶
func (k Keeper) ResponsesIteratorByReqCtx(ctx sdk.Context, requestContextID tmbytes.HexBytes, batchCounter uint64) sdk.Iterator
ResponsesIteratorByReqCtx returns an iterator for all responses of the specified request context and batch counter
func (Keeper) Schema ¶
func (k Keeper) Schema(c context.Context, req *types.QuerySchemaRequest) (*types.QuerySchemaResponse, error)
func (Keeper) ServiceBindingsIterator ¶
ServiceBindingsIterator returns an iterator for all bindings of the specified service definition
func (Keeper) ServiceFeeTax ¶
ServiceFeeTax returns the service fee tax
func (Keeper) SetCompactRequest ¶
func (k Keeper) SetCompactRequest(ctx sdk.Context, requestID tmbytes.HexBytes, request types.CompactRequest)
SetCompactRequest sets the specified compact request
func (Keeper) SetEarnedFees ¶
SetEarnedFees sets the earned fees for the specified provider
func (Keeper) SetInternalIndex ¶ added in v1.2.0
GetInternalIndex sets the internal index
func (Keeper) SetModuleService ¶ added in v1.2.0
func (k Keeper) SetModuleService(moduleName string, moduleService *types.ModuleService)
SetModuleService sets the module service for the given module
func (Keeper) SetNewRequestBatchHeight ¶
func (k Keeper) SetNewRequestBatchHeight(ctx sdk.Context, requestContextID tmbytes.HexBytes, requestBatchHeight int64)
SetNewRequestBatchHeight sets the new request batch height for the specified request context
func (Keeper) SetOwner ¶
func (k Keeper) SetOwner(ctx sdk.Context, provider, owner sdk.AccAddress)
SetOwner sets an owner for the specified provider
func (Keeper) SetOwnerEarnedFees ¶
SetOwnerEarnedFees sets the earned fees for the specified owner
func (Keeper) SetOwnerProvider ¶
func (k Keeper) SetOwnerProvider(ctx sdk.Context, owner, provider sdk.AccAddress)
SetOwnerProvider sets the provider with the owner
func (Keeper) SetOwnerServiceBinding ¶
func (k Keeper) SetOwnerServiceBinding(ctx sdk.Context, svcBinding types.ServiceBinding)
SetOwnerServiceBinding sets the owner service binding
func (Keeper) SetPricing ¶
func (k Keeper) SetPricing( ctx sdk.Context, serviceName string, provider sdk.AccAddress, pricing types.Pricing, )
SetPricing sets the pricing for the specified service binding
func (Keeper) SetRequestBatchExpirationHeight ¶
func (k Keeper) SetRequestBatchExpirationHeight(ctx sdk.Context, requestContextID tmbytes.HexBytes, expirationHeight int64)
SetRequestBatchExpirationHeight sets the request batch expiration height for the specified request context
func (Keeper) SetRequestContext ¶
func (k Keeper) SetRequestContext(ctx sdk.Context, requestContextID tmbytes.HexBytes, requestContext types.RequestContext)
SetRequestContext sets the specified request context
func (Keeper) SetRequestVolume ¶
func (k Keeper) SetRequestVolume( ctx sdk.Context, consumer sdk.AccAddress, serviceName string, provider sdk.AccAddress, volume uint64, )
SetRequestVolume sets the request volume for the specified consumer and binding
func (Keeper) SetResponse ¶
SetResponse sets the specified response
func (Keeper) SetServiceBinding ¶
func (k Keeper) SetServiceBinding(ctx sdk.Context, svcBinding types.ServiceBinding)
SetServiceBinding sets the service binding
func (Keeper) SetServiceBindingForGenesis ¶
func (k Keeper) SetServiceBindingForGenesis( ctx sdk.Context, svcBinding types.ServiceBinding, ) error
SetServiceBindingForGenesis sets the service binding for genesis
func (Keeper) SetServiceDefinition ¶
func (k Keeper) SetServiceDefinition(ctx sdk.Context, svcDef types.ServiceDefinition)
SetServiceDefinition sets the service definition
func (Keeper) SetWithdrawAddress ¶
func (k Keeper) SetWithdrawAddress(ctx sdk.Context, owner, withdrawAddr sdk.AccAddress)
SetWithdrawAddress sets the withdrawal address for the specified owner
func (Keeper) SkipCurrentRequestBatch ¶
func (k Keeper) SkipCurrentRequestBatch(ctx sdk.Context, requestContextID tmbytes.HexBytes, requestContext types.RequestContext)
SkipCurrentRequestBatch skips the current request batch
func (Keeper) Slash ¶
Slash slashes the provider from the specified request Note: ensure that the request is valid
func (Keeper) SlashFraction ¶
SlashFraction returns the slashing fraction
func (Keeper) StartRequestContext ¶
func (k Keeper) StartRequestContext( ctx sdk.Context, requestContextID tmbytes.HexBytes, consumer sdk.AccAddress, ) error
StartRequestContext starts the specified request context
func (Keeper) TxSizeLimit ¶
TxSizeLimit returns the tx size limit
func (Keeper) UpdateRequestContext ¶
func (k Keeper) UpdateRequestContext( ctx sdk.Context, requestContextID tmbytes.HexBytes, providers []sdk.AccAddress, respThreshold uint32, serviceFeeCap sdk.Coins, timeout int64, repeatedFreq uint64, repeatedTotal int64, consumer sdk.AccAddress, ) error
UpdateRequestContext updates the specified request context
func (Keeper) UpdateServiceBinding ¶
func (k Keeper) UpdateServiceBinding( ctx sdk.Context, serviceName string, provider sdk.AccAddress, deposit sdk.Coins, pricing string, qos uint64, options string, owner sdk.AccAddress, ) error
UpdateServiceBinding updates the specified service binding
func (Keeper) WithdrawAddress ¶
func (k Keeper) WithdrawAddress(c context.Context, req *types.QueryWithdrawAddressRequest) (*types.QueryWithdrawAddressResponse, error)
func (Keeper) WithdrawEarnedFees ¶
WithdrawEarnedFees withdraws the earned fees of the specified provider or owner