kohin-app-v2-sdk
Version:
The Kohin JS is a comprehensive developer toolkit designed to integrate Kohin's decentralized insurance system seamlessly into your applications. It enables efficient interaction with Kohin smart contracts and backend APIs, facilitating management and ana
43 lines (42 loc) • 1.24 kB
TypeScript
interface ErrorResponse {
success: false;
error: string;
data?: any;
}
export declare const handleError: (error: any, context: string) => ErrorResponse;
interface ValidateCalculatePremiumParams {
odds: number;
betAmount: number;
limits: {
minOdds: number;
maxOdds: number;
minAmount: number;
maxAmount: number;
};
type: number;
numLegs: number;
maxSubBetLimit?: number;
}
export declare function validateForCalculatePremium(params: ValidateCalculatePremiumParams): {
success: boolean;
error?: string;
};
interface validateForAddLiquidityParams {
maxDeposit: number;
minDeposit: number;
amount: number;
}
export declare function validateForAddLiquidity(params: validateForAddLiquidityParams): {
success: boolean;
error?: string;
};
export declare function validateForBuyCover(slippagePercent: number, maxSlippagePercent: number, isBooked: boolean, coverPremium: bigint, tokenBalance: bigint): {
success: boolean;
error?: string;
};
export declare function formatTime(remainingTimeInSeconds: number): string;
export declare function validateAffiliateAddress(address: string): {
success: boolean;
error?: string;
};
export {};