/** * Nado wire encodings: bytes32 subaccount ids and x18 ↔ native-decimal * amount scaling. * * @see {@link https://docs.nado.xyz/developer-resources/api/gateway/signing/examples | Nado signing examples} * @see {@link https://docs.nado.xyz/developer-resources/api/gateway/queries#amounts-and-prices | Nado amounts & prices (x18 convention)} */ import { type Address, type Hex } from 'viem'; /** * Nado subaccount id: 20-byte owner address ++ 12-byte ascii name, * zero-padded right. Every wallet's primary subaccount is named `default` * (auto-assigned on first interaction) — the empty name is a different subaccount. */ export declare function buildNadoSubaccountId(owner: Address, name?: string): Hex; /** * x18 query amount → raw base units. Floors — never rounds up — so a * converted `max_withdrawable` can't exceed the true maximum. Same semantics * as Nado's own frontend, which floors at submit (`BigNumber.ROUND_DOWN`). * * Takes a bigint so it cannot throw: parsing a gateway string stays at the one * boundary that receives it (`safeBigInt`). */ export declare function x18ToRawBaseUnit(x18Amount: bigint, decimals: number): bigint; /** x18-scaled query amount → human token units, floored at native decimals. */ export declare function x18ToTokenUnits(x18Amount: bigint, decimals: number): string; //# sourceMappingURL=encoding.d.ts.map