Skip to content

Commit

Permalink
feat(core): add optional 'options' argument to StakePoolSearchProvide…
Browse files Browse the repository at this point in the history
…r.queryStakePools
  • Loading branch information
mkazlauskas committed Feb 3, 2022
1 parent 7c3d496 commit 6ae18a6
Showing 1 changed file with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
import { Cardano } from '../../..';

export interface StakePoolQueryOptions {
/**
* Will fetch all stake pool reward history if not specified
*/
rewardsHistoryLimit?: number;
/**
* Will return all stake pools matching the query if not specified
*/
pagination?: {
startAt: number;
limit: number;
};
}

export interface StakePoolSearchProvider {
/**
* @param {string[]} query an array of partial pool data: bech32 ID, name, ticker
* @returns Stake pools that match any fragment.
* @param {StakePoolQueryOptions} options query options
* @returns Stake pools that match any fragment
* @throws ProviderError
*/
queryStakePools: (fragments: string[]) => Promise<Cardano.StakePool[]>;
queryStakePools: (fragments: string[], options?: StakePoolQueryOptions) => Promise<Cardano.StakePool[]>;
}

0 comments on commit 6ae18a6

Please sign in to comment.