import type { Unit } from "@ledgerhq/ledger-wallet-framework/types"; import BigNumber from "bignumber.js"; import { NearMappedStakingPosition, Transaction, NearStakingPosition, NearValidatorItem, NearAccount } from "./types"; export declare const isValidAddress: (address: string) => boolean; export declare const isImplicitAccount: (address: string) => boolean; /** One budget for every staking-pool call, see {@link STAKING_GAS} for how it was sized. */ export declare const getStakingGas: () => BigNumber; /** * The single place that answers "what is this account staking?", for both account shapes. * * NEAR is mid-migration: the generic bridge writes per-(validator, state) entries to * `account.stakingPositions`, while the legacy bridge writes per-validator aggregates to * `account.nearResources`. Which one is populated depends on the routing flag, and a migrated * account can briefly carry both — so the framework field wins when present and the legacy blob * is the fallback. Callers get the legacy-shaped `NearStakingPosition[]` either way. * * Once the flag flip lands and no account carries `nearResources` any more, the fallback branch * becomes dead and can be dropped. * * The presence test is `!== undefined`, not `.length`: `getAccountShape` always writes the field * under the generic route, so an empty array is a real answer ("nothing staked") and must not fall * back to a stale `nearResources` blob left over from before the migration. */ export declare const getNearStakingPositions: (account: NearAccount) => NearStakingPosition[]; export declare const getMaxAmount: (account: NearAccount, transaction: Transaction, fees?: BigNumber | null) => BigNumber; export declare const getFeeAvailableBalance: (account: NearAccount) => BigNumber; export declare const getTotalSpent: (a: NearAccount, t: Transaction, fees: BigNumber) => BigNumber; export declare const mapStakingPositions: (stakingPositions: NearStakingPosition[], validators: NearValidatorItem[], unit: Unit) => NearMappedStakingPosition[]; export declare const canStake: (account: NearAccount) => boolean; export declare const canUnstake: (stakingPosition: NearMappedStakingPosition | NearStakingPosition) => boolean; export declare const canWithdraw: (stakingPosition: NearMappedStakingPosition | NearStakingPosition) => boolean; export declare const getYoctoThreshold: () => BigNumber; export declare const getStakingFees: (gasPrice: BigNumber, minGasPurchasePrice: BigNumber) => BigNumber; //# sourceMappingURL=logic.d.ts.map