Type alias RestResponseGetMarketMakerRewardsEpoch<RequestType>

Returns the detailed information about the requested epoch.


Type Parameters

See

Example

 // KumaMarketMakerRewardsEpochDetailedWithWallet | KumaMarketMakerRewardsEpochDetailedWithoutWallet
type Response = RestResponseGetEpoch;

// KumaMarketMakerRewardsEpochDetailedWithWallet
const response = await client.getEpoch({ wallet: '0x...', nonce: '...', epochId: '...' });
// KumaEpochDetailedWithoutWallet
const response = await client.getEpoch({ nonce: '...', epochId: '...' });
// KumaMarketMakerRewardsEpochDetailedWithoutWallet | KumaMarketMakerRewardsEpochDetailedWithWallet
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 KumaMarketMakerRewardsEpochDetailedWithWallet
} else {
// response satisfies KumaMarketMakerRewardsEpochDetailedWithoutWallet
}