Optionally provide the request parameters used to return strong types based on if the wallet parameter was used. (this is automatic when calling the client methods)
// IDEXMarketMakerRewardsEpochDetailedWithWallet | IDEXMarketMakerRewardsEpochDetailedWithoutWallet
type Response = RestResponseGetEpoch;
// IDEXMarketMakerRewardsEpochDetailedWithWallet
const response = await client.getEpoch({ wallet: '0x...', nonce: '...', epochId: '...' });
// IDEXEpochDetailedWithoutWallet
const response = await client.getEpoch({ nonce: '...', epochId: '...' });
// IDEXMarketMakerRewardsEpochDetailedWithoutWallet | IDEXMarketMakerRewardsEpochDetailedWithWallet
const response = await client.getEpoch(someUntypedObj)
// When the response is returned as either, you can easily narrow the type
// by checking any of the wallet-specific properties:
if (response.walletScorePercent) {
// response satisfies IDEXMarketMakerRewardsEpochDetailedWithWallet
} else {
// response satisfies IDEXMarketMakerRewardsEpochDetailedWithoutWallet
}
Returns the detailed information about the requested epoch.