UNPKG

@shogun-sdk/money-legos

Version:

Shogun Money Legos: clients and types for quotes, memes, prices, balances, fees, validations, etc.

32 lines 1.42 kB
import { AffiliateFeeData, FormattedAffiliateFee } from '../types/affiliateFees.js'; import { CallStruct } from '../types/multicall.js'; export interface PrepareAffiliateFeeParams { srcToken: string; destToken: string; srcChainId: number; destChainId: number; } export declare const excludeAffiliateFee: ({ srcToken, destToken, srcChainId, destChainId }: PrepareAffiliateFeeParams) => boolean; /** * Calculates fee amount based on base amount and fee percent * @param feePercent Fee percent % * @param baseAmount Base amount to take fees from */ export declare function getFeeAmount(feePercent: number, baseAmount: bigint): bigint; /** * Formats affiliate fee data for query response * @param affiliateFeeData Affiliate fee data * @param config Trade config */ export declare function formatAffiliateData(affiliateFeeData: AffiliateFeeData, config: { affiliateWallet: string; }): FormattedAffiliateFee; /** * Generate call to transfer Token to affiliate wallet * @param feeAmount Amount of fee tokens to collect * @param affiliateWallet Affiliate wallet address * @param tokenAddress Token address that needs to be transferred * @param nativeToken `true` - Token OUT is native token */ export declare function getTransferTokenFeeCall(feeAmount: bigint, affiliateWallet: `0x${string}`, tokenAddress: `0x${string}`, nativeToken: boolean): CallStruct; //# sourceMappingURL=fee.d.ts.map