@azuro-org/toolkit
Version:
This framework-agnostic package provides essential utilities for building applications on the Azuro Protocol.
57 lines (56 loc) • 1.77 kB
TypeScript
import { type Address } from 'viem';
import { type ChainId } from '../../config';
import { BonusStatus, type BonusType, type Bonus, type FreebetType, type BetRestrictionType, type EventRestrictionState } from '../../global';
export type RawBonus = {
id: string;
bonusType: BonusType;
freebetParam: {
isBetSponsored: true;
isFeeSponsored: true;
isSponsoredBetReturnable: true;
settings: {
bonusType: FreebetType;
feeSponsored: boolean;
betRestriction: {
betType: BetRestrictionType | 'All';
minOdds: string;
maxOdds?: string;
};
eventRestriction: {
eventStatus: EventRestrictionState | 'All';
eventFilter?: {
exclude: boolean;
filter: [
{
sportId: string;
leagues: string[];
markets: {
marketId: number;
gamePeriodId: number;
gameTypeId: number;
}[];
}
];
};
};
periodOfValidityMs: 86400000;
};
};
address: string;
amount: string;
status: BonusStatus;
network: string;
currency: string;
expiresAt: string;
usedAt: string;
createdAt: string;
};
export type GetBonuses = Bonus[] | null;
type Props = {
chainId: ChainId;
account: Address;
affiliate: Address;
bonusStatus?: BonusStatus;
};
export declare const getBonuses: (props: Props) => Promise<GetBonuses>;
export {};