import { AssetAmount, FunctionCallConfig, NearChain } from '@galacticcouncil/xc-core'; import { NearCall } from './types'; import { Platform } from '../types'; export declare class NearPlatform implements Platform { #private; constructor(chain: NearChain); /** * Build the transactions of a transfer. * * - Consecutive configs on the same receiver share one transaction, whose * actions run in order and atomically * - A native source is wrapped in that transaction, ahead of the call */ buildCalls(account: string, amount: bigint, _feeBalance: AssetAmount, configs: FunctionCallConfig[]): Promise; /** * Fee of a transfer, in native near. * * - What the sender has to hold for it to be accepted: prepaid gas at the * current price, attached deposits and its own storage stake * - Unused gas is refunded, so the settled cost is lower * - Near wrapped for a native source is the amount, not a cost */ estimateFee(account: string, amount: bigint, feeBalance: AssetAmount, configs: FunctionCallConfig[]): Promise; private getTransactions; /** * Wrap ahead of a call spending native near. * * - Registers the sender on the token first if it never was, paying the * token's own minimum * - Wraps only the shortfall - a token balance already held is spent first * * @param account - sender * @param amount - transfer amount * @param config - call on the wrap token */ private getWrap; }