import type { ServiceMetadata } from '../../lib/resolver.ts';
import type * as CurrencyInfo from '@keetanetwork/currency-info';
import type { AccountKeyAlgorithm, GenericAccount, IdentifierKeyAlgorithm, TokenPublicKeyString } from '@keetanetwork/keetanet-client/lib/account.js';
import type { JSONSerializable, ToJSONSerializable } from '@keetanetwork/keetanet-client/lib/utils/conversion.js';
import type { HTTPSignedField } from '../../lib/http-server/common.js';
import type { Signable } from '../../lib/utils/signing.js';
import type { SharableCertificateAttributes } from '../../lib/certificates.js';
import * as KeetaNet from '@keetanetwork/keetanet-client';
import { KeetaAnchorUserError } from '../../lib/error.js';
import type { AssetLocationLike, AssetLocationString, AssetLocationInput, AssetLocationCanonical, ChainLocationString } from './lib/location.js';
import type { BankAccountAddressObfuscated, BankAccountAddressResolved, MobileWalletAddressObfuscated, MobileWalletAddressResolved } from './lib/data/addresses/types.generated.js';
import type { HexString, KeetaNetAccount, MovableAsset, MovableAssetSearchCanonical, CurrencySearchCanonical, ExternalChainLocationType, ExternalChainAsset } from '../../lib/asset.js';
import type { ClientRenderableContent } from '../../lib/metadata.types.js';
import type { TokenMetadata } from '../../lib/token-metadata.js';
import type { DistributiveOmit } from '@keetanetwork/keetanet-client/lib/utils/helper.js';
import type { ACLPermissionRequirement } from '@keetanetwork/keetanet-client/lib/ledger/types.js';
import type { Certificate } from '@keetanetwork/keetanet-client/lib/utils/certificate.js';
import type { UserClientBuilder } from '@keetanetwork/keetanet-client/client/builder.js';
export * from './lib/data/addresses/types.generated.js';
export * from './lib/location.js';
export * from './common.generated.js';
export type { HexString, KeetaNetAccount, KeetaNetTokenPublicKeyString, EVMAsset, TronAsset, SolanaAsset, ChainAssetString, MovableAssetSearchInput, MovableAssetSearchCanonical, MovableAsset, CurrencySearchCanonical, CurrencySearchInput, TokenSearchInput, TokenSearchCanonical } from '../../lib/asset.js';
export { toEVMAsset, parseEVMAsset, isEVMAsset, toTronAsset, parseTronAsset, isTronAsset, toSolanaAsset, parseSolanaAsset, isSolanaAsset, convertAssetSearchInputToCanonical, isExternalChainAsset } from '../../lib/asset.js';
export type ISOCountryCode = CurrencyInfo.ISOCountryCode;
type RailOrRails = Rail | Rail[];
/**
 * Search criteria for filtering asset movement rails when searching for supported rails for a given transfer.
 * This can be either a single rail or an array of rails, and can be specified for inbound, outbound or common rails.
 *
 * If a single rail or array of rails is provided, it will be applied to both inbound and outbound rails.
 * If separate inbound and outbound rails are provided, they will be applied to their respective directions.
 *
 * For both methods, this will look for providers that support at least one of the specified rails in the respective direction(s).
 * For example, if { inbound: ['ACH', 'WIRE'] } is provided, it will match providers that support either ACH or WIRE inbound rails.
 */
export type AssetMovementRailSearchInput = RailOrRails | ({
    inbound: RailOrRails;
    outbound?: RailOrRails;
} | {
    inbound?: RailOrRails;
    outbound: RailOrRails;
});
export type ProviderSearchInput = {
    asset?: MovableAsset | AssetPair;
    from?: AssetLocationInput;
    to?: AssetLocationInput;
    rail?: AssetMovementRailSearchInput;
};
export interface Asset {
    location?: AssetLocationString;
    /**
     * Keeta token public key string, external chain asset, ticker, or a currency code
     */
    id: AssetMetadataTargetValue;
}
export type FiatPullRails = 'ACH_DEBIT' | 'CARD_PULL';
export type FiatPushRails = 'ACH' | 'WIRE' | 'PIX_PUSH' | 'SPEI_PUSH' | 'WIRE_INTL_PUSH' | 'SEPA_PUSH' | 'MOBILE_WALLET' | 'INTERAC_PUSH' | 'FPS_PUSH' | 'CARD_PUSH' | 'HK_FPS_PUSH' | 'BCR_PAY_PUSH' | 'DUIT_NOW_PUSH' | 'PAY_NOW_PUSH' | 'UPI_PUSH' | 'CA_PUSH' | 'AE_PUSH' | 'RTP_PUSH' | 'AR_PUSH' | 'AU_PUSH' | 'GG_PUSH' | 'BD_PUSH' | 'BJ_PUSH' | 'BF_PUSH' | 'CL_PUSH' | 'CN_PUSH' | 'CO_PUSH' | 'CK_PUSH' | 'CR_PUSH' | 'CZ_PUSH' | 'DK_PUSH' | 'EG_PUSH' | 'SV_PUSH' | 'FO_PUSH' | 'GM_PUSH' | 'GH_PUSH' | 'GI_PUSH' | 'GL_PUSH' | 'GT_PUSH' | 'GN_PUSH' | 'ID_PUSH' | 'IM_PUSH' | 'IL_PUSH' | 'CI_PUSH' | 'JM_PUSH' | 'JP_PUSH' | 'JE_PUSH' | 'JO_PUSH' | 'KE_PUSH' | 'KI_PUSH' | 'MA_PUSH' | 'NP_PUSH' | 'NZ_PUSH' | 'NG_PUSH' | 'PK_PUSH' | 'PE_PUSH' | 'PH_PUSH' | 'SN_PUSH' | 'ZA_PUSH' | 'KR_PUSH' | 'LK_PUSH' | 'TZ_PUSH' | 'TH_PUSH' | 'TG_PUSH' | 'TN_PUSH' | 'TR_PUSH' | 'TV_PUSH' | 'UG_PUSH' | 'VN_PUSH' | 'ZM_PUSH';
export type FiatRails = FiatPullRails | FiatPushRails;
export type CryptoRails = 'KEETA_SEND' | 'EVM_SEND' | 'EVM_CALL' | 'SOLANA_SEND' | 'BITCOIN_SEND' | 'TRON_SEND';
export type Rail = FiatRails | CryptoRails;
export interface AssetWithRails extends Asset {
    rails: (({
        inbound: RailOrRailWithExtendedDetails[];
        outbound?: RailOrRailWithExtendedDetails[];
    } | {
        inbound?: RailOrRailWithExtendedDetails[];
        outbound: RailOrRailWithExtendedDetails[];
    } | {
        inbound?: never;
        outbound?: never;
    }) & {
        common?: RailOrRailWithExtendedDetails[];
    });
}
export interface AssetPath {
    /**
     * The asset or asset pair for this path, with from and to locations supporting the assets in the pair
     */
    pair: [AssetWithRails, AssetWithRails];
    /**
     * KYC providers which this Asset Movement Provider
     * supports (DN) -- if not specified,
     * then it does not require KYC.
     */
    kycProviders?: string[];
}
export interface AnchorTokenLocationMetadata extends TokenMetadata {
    displayName?: string;
    ticker?: `$${string}`;
}
export type PerChainLocationMetadata<Chain extends ExternalChainLocationType = ExternalChainLocationType> = {
    assets?: {
        [AssetId in ExternalChainAsset<Chain>]?: AnchorTokenLocationMetadata | undefined;
    };
};
type ExtractLocationTypeFromString<I extends ChainLocationString> = I extends ChainLocationString<infer R extends ExternalChainLocationType> ? R : never;
export type AnchorCustomLocationMetadata = {
    [Location in ChainLocationString<ExternalChainLocationType>]?: PerChainLocationMetadata<ExtractLocationTypeFromString<Location>> | undefined;
};
export type AssetMetadataTargetValue = TokenPublicKeyString | CurrencySearchCanonical | `$${string}` | ExternalChainAsset;
export interface SupportedAssetsMetadata {
    asset: AssetMetadataTargetValue | [AssetMetadataTargetValue, AssetMetadataTargetValue];
    paths: AssetPath[];
}
export interface RailWithExtendedDetails {
    rail: Rail;
    /**
     * An estimate of the time it will take for a transfer using this rail to complete, in milliseconds. This can be a single number or a tuple representing an estimated range [min, max].
     */
    estimatedTransferTimeMs?: number | [minEstimateMs: number, maxEstimateMs: number];
    /**
     * Minimum/Maximum transfer value details for this rail, if applicable.
     */
    estimatedTransferValueRange?: {
        /**
         * Min/max transfer value range, as a string in the asset's smallest unit (e.g. cents for USD, or 1/(10**6) for USDC).
         */
        value: [string | undefined, string | undefined];
        /**
         * The asset in which the min transfer value is denominated. If omitted, it is assumed to be the same as the source asset being transferred.
         */
        asset?: MovableAssetSearchCanonical;
    };
    /**
     * Fee estimate details for this rail, if applicable.
     */
    estimatedFee?: {
        fixedFee?: {
            /**
             * Transfer fixed fee, as a string in the asset's smallest unit (e.g. cents for USD, or 1/(10**6) for USDC).
             */
            value: string;
            /**
             * The asset in which the fixed fee is denominated. If omitted, it is assumed to be the same as the source asset being transferred.
             */
            asset?: MovableAssetSearchCanonical;
        };
        /**
         * Estimated transfer variable fee in basis points (bps). 1 bps = 0.01%
         */
        variableFeeBps?: number;
    };
    /**
     * Supported operations for this rail
     */
    supportedOperations?: {
        /**
         * Whether this rail supports creating persistent forwarding addresses for (unmanaged) transfers
         */
        createPersistentForwarding?: boolean;
        /**
         * Whether this rail supports initiating (managed) transfers
         */
        initiateTransfer?: boolean;
    };
}
export type RailOrRailWithExtendedDetails = Rail | RailWithExtendedDetails;
export declare function commonJSONStringify(input: unknown): string;
export type AssetPair<From extends MovableAsset = MovableAsset, To extends MovableAsset = MovableAsset> = {
    from: From;
    to: To;
};
export type AssetOrPair = MovableAsset | AssetPair;
export type AssetPairCanonical<From extends MovableAssetSearchCanonical = MovableAssetSearchCanonical, To extends MovableAssetSearchCanonical = MovableAssetSearchCanonical> = {
    from: From;
    to: To;
};
export type AssetOrPairCanonical = MovableAssetSearchCanonical | AssetPairCanonical;
export declare function toAssetPair(input: AssetOrPair): AssetPair;
export declare function convertAssetOrPairSearchInputToCanonical(input: MovableAsset): MovableAssetSearchCanonical;
export declare function convertAssetOrPairSearchInputToCanonical(input: AssetPair): AssetPairCanonical;
export declare function convertAssetOrPairSearchInputToCanonical(input: AssetOrPair): AssetOrPairCanonical;
export type Operations = NonNullable<ServiceMetadata['services']['assetMovement']>[string]['operations'];
export type OperationNames = keyof Operations;
export type PersistentAddressReference = {
    type: 'persistent-address';
    persistentAddressId: string;
};
export type PersistentAddressTemplateReference = {
    type: 'persistent-address-template';
    persistentAddressTemplateId: string;
};
export type PersistentAddressOrTemplateReference = PersistentAddressReference | PersistentAddressTemplateReference;
export type RecipientResolved = AddressResolved | PersistentAddressOrTemplateReference;
/**
 * Optional deposit message to include with the transfer, ex: for wire this is a reference note.
 */
type AddressDepositMessage = string;
type ConvertToExternalRequest<Internal extends object, Overrides, Signed = {
    signed?: HTTPSignedField | undefined;
}> = ToJSONSerializable<Omit<Internal, keyof Overrides>> & Overrides & Signed;
/**
 * The client-side request type for initiating an asset transfer via the Keeta Asset Movement Anchor service
 */
export interface KeetaAssetMovementAnchorInitiateTransferClientRequest {
    /**
     * Optional KeetaNet account to use for signing the request
     */
    account?: KeetaNetAccount | undefined;
    /**
     * The asset or asset pair to transfer, if a pair is given the from and to locations must support both assets in the pair
     */
    asset: AssetOrPair;
    /**
     * The source location for the asset transfer
     */
    from: {
        location: AssetLocationLike;
        /**
         * If sending from a persistent address (ex ACH pull), this would be the account the user wants to debit from
         */
        source?: PersistentAddressOrTemplateReference;
    };
    /**
     * The destination location and recipient for the asset transfer
     */
    to: {
        location: AssetLocationLike;
        recipient: RecipientResolved;
        depositMessage?: AddressDepositMessage;
    };
    /**
     * The amount of the asset to transfer, as a string in the asset's smallest unit (e.g. cents for USD).
     */
    value: string | bigint;
    /**
     * Optional list of allowed rails for the transfer, the service should throw an error if none of the allowed rails are available
     */
    allowedRails?: Rail[];
}
type PartialKeys<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>> & Partial<Pick<T, K>>;
export interface KeetaAssetMovementAnchorSimulateTransferClientRequest extends Omit<KeetaAssetMovementAnchorInitiateTransferClientRequest, 'to'> {
    to: PartialKeys<KeetaAssetMovementAnchorInitiateTransferClientRequest['to'], 'recipient'>;
}
/**
 * The serialized HTTP Body for the {@link KeetaAssetMovementAnchorInitiateTransferClientRequest} request
 */
export type KeetaAssetMovementAnchorInitiateTransferRequest = ConvertToExternalRequest<KeetaAssetMovementAnchorInitiateTransferClientRequest, {
    asset: AssetOrPairCanonical;
    from: {
        location: AssetLocationCanonical;
        source?: PersistentAddressOrTemplateReference;
    };
    to: {
        location: AssetLocationCanonical;
        recipient: RecipientResolved;
        depositMessage?: AddressDepositMessage;
    };
}>;
export type KeetaAssetMovementAnchorSimulateTransferRequest = Omit<KeetaAssetMovementAnchorInitiateTransferRequest, 'to'> & {
    to: PartialKeys<KeetaAssetMovementAnchorInitiateTransferRequest['to'], 'recipient'>;
};
export declare function getKeetaAssetMovementAnchorInitiateTransferRequestSigningData(input: KeetaAssetMovementAnchorInitiateTransferClientRequest | KeetaAssetMovementAnchorInitiateTransferRequest | KeetaAssetMovementAnchorSimulateTransferRequest | KeetaAssetMovementAnchorSimulateTransferClientRequest): Signable;
export declare function getKeetaAssetMovementAnchorSimulateTransferRequestSigningData(input: KeetaAssetMovementAnchorSimulateTransferClientRequest | KeetaAssetMovementAnchorSimulateTransferRequest): Signable;
/**
 * Fee line item type in an asset transfer fee breakdown, showing the purpose of each fee line item.
 */
export type AssetFeeLineItemType = 'RAIL' | 'NETWORK' | 'PROVIDER' | 'VALUE_VARIABLE' | 'OTHER';
/**
 * Breakdown of fees for an asset transfer, including line items and total amounts.
 */
export type AssetFeeBreakdown = {
    lineItems: {
        /**
         * The amount of the fee line item, as a string in the asset's smallest unit (e.g. cents for USD).
         */
        value: string;
        /**
         * The purpose of the fee line item. @see AssetFeeLineItemType
         */
        purpose: AssetFeeLineItemType;
        /**
         * The asset in which the fee line item is denominated. If omitted, it is assumed to be the same as the asset being transferred.
         */
        asset?: MovableAssetSearchCanonical;
    }[];
    /**
     * The total fee amount priced in a canonical asset. If omitted, the total is assumed to be in the asset being transferred.
     */
    totalPricedIn?: MovableAssetSearchCanonical;
    /**
     * The total fee amount, as a string in the asset's smallest unit (e.g. cents for USD).
     */
    total: string;
};
/**
 * An instruction on how to complete a transfer, ex: where to send tokens, or where to wire USD.
 */
export type AssetTransferInstructions = ({
    type: 'KEETA_SEND';
    /**
     * The location from which to send the asset for this instruction, this will only be a keeta chain location.
     */
    location: AssetLocationLike;
    /**
     * The keeta wallet address to send to
     */
    sendToAddress: ReturnType<GenericAccount['publicKeyString']['get']>;
    /**
     * Amount to send, as a string in the asset's smallest unit.
     */
    value: string;
    /**
     * The token address to send.
     */
    tokenAddress: TokenPublicKeyString;
    /**
     * If provided, the value to put in the external field of the send operation.
     */
    external?: string;
} | {
    type: 'EVM_SEND';
    /**
     * The EVM location from which to send the asset for this instruction.
     */
    location: AssetLocationLike;
    /**
     * EVM address to send to
     */
    sendToAddress: HexString;
    /**
     * Amount to send, as a string in the asset's smallest unit.
     */
    value: string;
    /**
     * The EVM token contract address to send.
     */
    tokenAddress: HexString;
} | {
    /**
     * An EVM contract call instruction, used for assets that require contract interaction to transfer (ex: ERC20 contract deposit() method).
     */
    type: 'EVM_CALL';
    /**
     * The EVM location on which the contract call should be made.
     */
    location: AssetLocationLike;
    /**
     * The EVM contract address to call.
     */
    contractAddress: HexString;
    /**
     * The method name to call on the contract. Should be either the full method signature (ex: deposit(uint256 value)), or the hashed method ID.
     */
    contractMethodName: string;
    /**
     * The arguments to pass to the contract method, as an array of strings.
     */
    contractMethodArgs: string[];
} | {
    type: FiatPushRails;
    /**
     * The resolved bank account address details to send funds to
     */
    account: BankAccountAddressResolved;
    depositMessage?: AddressDepositMessage;
    /**
     * Amount to send, as a string in the asset's smallest unit (e.g. cents for USD).
     */
    value: string;
} | 
/**
 * Instructions when pulling funds from a persistent address.
 * If the user wants to execute this instruction, they will need to call the executeInstruction endpoint with the transfer id
 */
{
    type: FiatPullRails;
    /**
     * The previously created persistent address template or persistent address to pull funds from
     */
    pullFrom: PersistentAddressOrTemplateReference;
} | {
    type: 'TRON_SEND';
    location: AssetLocationLike;
    /**
     * Tron address to send to
     */
    sendToAddress: string;
    /**
     * Amount to send, as a string in the asset's smallest unit (e.g. SUN for TRX).
     */
    value: string;
    /**
     * TRC20 token contract address if non-TRX.
     * Omitting will indicate native TRX.
     */
    tokenAddress?: string;
} | {
    type: 'BITCOIN_SEND';
    location: AssetLocationLike;
    /**
     * Bitcoin address to send to
     */
    sendToAddress: string;
    /**
     * Amount in sats to send, as a string
     */
    value: string;
} | {
    type: 'SOLANA_SEND';
    location: AssetLocationLike;
    /**
     * Solana recipient address (base58 pubkey).
     */
    sendToAddress: string;
    /**
     * Amount to send, as a string (e.g. in lamports or
     * normalized units, depending on your convention).
     */
    value: string;
    /**
     * SPL token mint address if non-native SOL.
     * Omitting will indicate native SOL.
     */
    tokenMintAddress?: string;
}) & ({
    /**
     * assetFee is an advisory fee estimate for the fee that will be incurred when the instruction is executed.
     * This can be a total value or a breakdown of line items for the executed transfer.
     */
    assetFee: string | AssetFeeBreakdown;
    /**
     * If provided, this is the total amount the recipient should expect to receive after fees are deducted, formatted in the destination asset's smallest unit.
     */
    totalReceiveAmount?: string;
    /**
     * If provided, this is the ID of a persistent address created/used for this transfer instruction.
     */
    persistentAddressId?: string;
});
export type SimulatedAssetTransferInstructions = DistributiveOmit<AssetTransferInstructions, 'sendToAddress'>;
export type KeetaAssetMovementAnchorSimulateTransferResponse = {
    ok: true;
    instructionChoices: SimulatedAssetTransferInstructions[];
} | {
    ok: false;
    error: string;
};
export type KeetaAssetMovementAnchorInitiateTransferResponse = {
    ok: true;
    id: string;
    instructionChoices: AssetTransferInstructions[];
} | ({
    ok: false;
    error: string;
});
export interface KeetaAssetMovementAnchorExecuteTransferClientRequest {
    account?: KeetaNetAccount;
    /**
     * The ID of the transfer to execute the instruction for, which was returned in the initiate transfer response
     */
    id: string;
    /**
     * The instruction to execute
     */
    instruction: Pick<Extract<AssetTransferInstructions, {
        type: FiatPullRails;
    }>, 'pullFrom' | 'type'>;
}
export type KeetaAssetMovementAnchorExecuteTransferRequest = ConvertToExternalRequest<Omit<KeetaAssetMovementAnchorExecuteTransferClientRequest, 'id'>, unknown>;
export declare function getKeetaAssetMovementAnchorExecuteTransferRequestSigningData(input: (KeetaAssetMovementAnchorExecuteTransferRequest | KeetaAssetMovementAnchorExecuteTransferClientRequest) & {
    id: string;
}): Signable;
export type KeetaAssetMovementAnchorExecuteTransferResponse = KeetaAssetMovementAnchorGetTransferStatusResponse;
export interface KeetaAssetMovementAnchorGetTransferStatusClientRequest {
    account?: KeetaNetAccount;
    id: string;
}
export interface KeetaAssetMovementAnchorGetTransferStatusRequest {
    id: string;
}
export declare function getKeetaAssetMovementAnchorGetTransferStatusRequestSigningData(input: KeetaAssetMovementAnchorGetTransferStatusRequest): Signable;
type TransactionStatus = string;
export type TransactionId = {
    id: string;
    nonce: string;
};
type TransactionIds<T extends string> = {
    [type in T]: TransactionId | null;
};
export type TransactionSourceObfuscated = AddressObfuscated | PersistentAddressOrTemplateReference;
/**
 * Representation of an asset movement transaction in the Asset Movement Anchor's system.
 */
export type KeetaAssetMovementTransaction = {
    /**
     * The unique (per anchor) identifier for the asset movement transaction.
     *
     * This ID is opaque and has no meaning outside of a specific anchor's system.
     */
    id: string;
    /**
     * The current status of the asset movement transaction.
     */
    status: TransactionStatus;
    /**
     * The asset being moved in the transaction.
     */
    asset: AssetOrPair;
    /**
     * Information about the source of the asset movement.
     */
    from: {
        /**
         * The location of the source of the movement.
         */
        location: AssetLocationString;
        /**
         * The value that was sent/to be sent on the source.
         */
        value: string;
        /**
         * A list of transaction IDs related to the source chain.
         */
        transactions: TransactionIds<'persistentForwarding' | 'deposit' | 'finalization'>;
        /**
         * A reference to the sender of the transaction, this can be a reference to a persistent address, or general recipient information
         */
        source?: TransactionSourceObfuscated;
    };
    /**
     * Information about the destination of the asset movement.
     */
    to: {
        /**
         * The location of the destination of the movement.
         */
        location: AssetLocationString;
        /**
         * The value that was received/to be received on the destination.
         */
        value: string;
        /**
         * A list of transaction IDs related to the destination chain.
         */
        transactions: TransactionIds<'withdraw'>;
    };
    /**
     * Information related to the fee charged for the asset movement.
     */
    fee: {
        asset: MovableAsset;
        value: string;
    } | null;
    /**
     * Additional details about this rail that (optionally) can be rendered in the client application.
     *
     * Ex: If there is a proprietary block explorer for a chain involved in the transfer, this field could contain a URL to view the transaction on that explorer.
     */
    additionalTransferDetails?: ClientRenderableContent;
    /**
     * Timestamp for when the transaction was created
     */
    createdAt: string;
    /**
     * Timestamp for when the transaction was last updated
     */
    updatedAt: string;
};
export type KeetaAssetMovementAnchorGetTransferStatusResponse = ({
    ok: true;
    transaction: KeetaAssetMovementTransaction;
} | {
    ok: false;
    error: string;
});
type CryptoAddress = string;
type AddressResolved = BankAccountAddressResolved | MobileWalletAddressResolved | CryptoAddress;
type AddressObfuscated = BankAccountAddressObfuscated | MobileWalletAddressObfuscated | CryptoAddress;
export type PersistentAddressTemplateData = {
    id: string;
    location: AssetLocationLike;
    asset: MovableAsset;
    address: AddressObfuscated;
};
export type KeetaAssetMovementAnchorInitiatePersistentForwardingAddressTemplateClientRequest = {
    account?: KeetaNetAccount;
    asset: MovableAsset;
    location: AssetLocationLike;
};
export type KeetaAssetMovementAnchorInitiatePersistentForwardingAddressTemplateRequest = ConvertToExternalRequest<KeetaAssetMovementAnchorInitiatePersistentForwardingAddressTemplateClientRequest, {
    asset: AssetOrPairCanonical;
    location: AssetLocationCanonical;
}>;
export declare function getKeetaAssetMovementAnchorInitiatePersistentForwardingAddressTemplateRequestSigningData(input: KeetaAssetMovementAnchorInitiatePersistentForwardingAddressTemplateClientRequest | KeetaAssetMovementAnchorInitiatePersistentForwardingAddressTemplateRequest): Signable;
export type PersistentForwardingTemplateSessionData = {
    type: 'plaid';
    plaidLinkToken: string;
} | {
    type: 'other';
    [key: string]: JSONSerializable;
};
export type KeetaAssetMovementAnchorInitiatePersistentForwardingAddressTemplateResponse = ({
    ok: true;
    id: string;
    expiresAt: string;
    data: PersistentForwardingTemplateSessionData;
} | {
    ok: false;
    error: string;
});
export type PersistentForwardingTemplateCompletionData = {
    type: 'plaid';
    plaidPublicToken: string;
    plaidAccountId: string;
} | {
    type: 'other';
    [key: string]: JSONSerializable;
};
export type KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateClientRequest = {
    account?: KeetaNetAccount;
    asset: MovableAsset;
    location: AssetLocationLike;
    address: AddressResolved;
} | {
    account?: KeetaNetAccount;
    id?: string;
    data: PersistentForwardingTemplateCompletionData;
};
export type KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateRequest = ConvertToExternalRequest<{
    account?: KeetaNetAccount;
    asset: MovableAsset;
    location: AssetLocationLike;
    address: AddressResolved;
}, {
    asset: AssetOrPairCanonical;
    location: AssetLocationCanonical;
    address: AddressResolved;
}> | ConvertToExternalRequest<{
    account?: KeetaNetAccount;
    id?: string;
    data: PersistentForwardingTemplateCompletionData;
}, unknown>;
export declare function getKeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateRequestSigningData(input: KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateClientRequest | KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateRequest): Signable;
export type KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateResponse = (({
    ok: true;
} & PersistentAddressTemplateData) | {
    ok: false;
    error: string;
});
export type KeetaAssetMovementAnchorListForwardingAddressTemplateClientRequest = {
    account?: KeetaNetAccount;
    asset?: MovableAsset[];
    location?: AssetLocationLike[];
    pagination?: PaginationQuery;
};
export type KeetaAssetMovementAnchorListForwardingAddressTemplateRequest = ToJSONSerializable<Pick<KeetaAssetMovementAnchorListForwardingAddressTemplateClientRequest, 'account' | 'pagination'>> & {
    asset?: MovableAssetSearchCanonical[] | undefined;
    location?: AssetLocationCanonical[] | undefined;
    signed?: HTTPSignedField;
};
export declare function getKeetaAssetMovementAnchorListForwardingAddressTemplateRequestSigningData(_ignore_input: KeetaAssetMovementAnchorListForwardingAddressTemplateClientRequest | KeetaAssetMovementAnchorListForwardingAddressTemplateRequest): Signable;
export type KeetaAssetMovementAnchorListForwardingAddressTemplateResponse = (({
    ok: true;
    templates: PersistentAddressTemplateData[];
} & PaginationResponseInformation) | {
    ok: false;
    error: string;
});
export type KeetaPersistentForwardingAddressDetails = {
    id?: string;
    address: AddressObfuscated | AddressResolved;
    depositMessage?: AddressDepositMessage;
    asset?: AssetOrPair;
    sourceLocation?: AssetLocationLike;
    destinationLocation?: AssetLocationLike;
    destinationAddress?: AddressResolved | AddressObfuscated;
    outgoingRail?: Rail;
    incomingRail?: Rail[];
};
export type KeetaAssetMovementAnchorCreatePersistentForwardingClientRequest = {
    account?: KeetaNetAccount;
    sourceLocation: AssetLocationLike;
    asset: AssetOrPair;
    outgoingRail?: Rail;
} & ({
    destinationLocation: AssetLocationLike;
    destinationAddress: AddressResolved;
} | {
    persistentAddressTemplateId: string;
});
export type KeetaAssetMovementAnchorCreatePersistentForwardingRequest = {
    account?: ToJSONSerializable<KeetaNetAccount> | undefined;
    signed?: HTTPSignedField;
    sourceLocation: AssetLocationCanonical;
    asset: AssetOrPairCanonical;
    outgoingRail?: Rail | undefined;
} & ({
    destinationLocation: AssetLocationCanonical;
    destinationAddress: AddressResolved;
} | {
    persistentAddressTemplateId: string;
});
export declare function getKeetaAssetMovementAnchorCreatePersistentForwardingRequestSigningData(input: KeetaAssetMovementAnchorCreatePersistentForwardingClientRequest | KeetaAssetMovementAnchorCreatePersistentForwardingRequest): Signable;
export type KeetaAssetMovementAnchorCreatePersistentForwardingResponse = (({
    ok: true;
} & KeetaPersistentForwardingAddressDetails) | {
    ok: false;
    error: string;
});
export type KeetaAssetMovementAnchorListPersistentForwardingClientRequest = {
    account?: KeetaNetAccount;
    signed?: HTTPSignedField | undefined;
    search?: {
        sourceLocation?: AssetLocationLike;
        destinationLocation?: AssetLocationLike;
        asset?: MovableAsset;
        destinationAddress?: string;
        persistentAddressTemplateId?: string;
    }[];
    pagination?: PaginationQuery;
};
export type KeetaAssetMovementAnchorListPersistentForwardingRequest = {
    account?: ToJSONSerializable<KeetaNetAccount> | undefined;
    signed?: HTTPSignedField | undefined;
    search?: {
        sourceLocation?: AssetLocationCanonical | undefined;
        destinationLocation?: AssetLocationCanonical | undefined;
        asset?: MovableAssetSearchCanonical | undefined;
        destinationAddress?: string | undefined;
        persistentAddressTemplateId?: string | undefined;
    }[] | undefined;
    pagination?: PaginationQuery | undefined;
};
export type KeetaAssetMovementAnchorListPersistentForwardingResponse = (({
    ok: true;
    addresses: KeetaPersistentForwardingAddressDetails[];
} & PaginationResponseInformation) | {
    ok: false;
    error: string;
});
export declare function getKeetaAssetMovementAnchorListPersistentForwardingRequestSigningData(_ignore_input: KeetaAssetMovementAnchorListPersistentForwardingClientRequest | KeetaAssetMovementAnchorListPersistentForwardingRequest): Signable;
type PaginationQuery = {
    limit?: number;
    offset?: number;
};
type PaginationResponseInformation = {
    total: string;
};
export type KeetaAssetMovementAnchorlistTransactionsClientRequest = {
    account?: KeetaNetAccount;
    persistentAddresses?: ({
        location: AssetLocationLike;
    } & ({
        persistentAddress?: string;
        persistentAddressTemplate: string;
    } | {
        persistentAddress: string;
        persistentAddressTemplate?: string;
    }))[];
    from?: {
        location: AssetLocationLike;
        userAddress?: string;
        asset?: MovableAsset;
    };
    to?: {
        location: AssetLocationLike;
        userAddress?: string;
        asset?: MovableAsset;
    };
    transactions?: {
        location: AssetLocationLike;
        transaction: Partial<TransactionId>;
    }[] | undefined;
    pagination?: PaginationQuery;
};
export type KeetaAssetMovementAnchorlistTransactionsRequest = {
    account?: ToJSONSerializable<KeetaNetAccount> | undefined;
    signed?: HTTPSignedField | undefined;
    persistentAddresses?: ({
        location: AssetLocationCanonical;
    } & ({
        persistentAddress?: string | undefined;
        persistentAddressTemplate: string;
    } | {
        persistentAddress: string;
        persistentAddressTemplate?: string | undefined;
    }))[] | undefined;
    from?: {
        location: AssetLocationCanonical;
        userAddress?: string | undefined;
        asset?: MovableAsset | undefined;
    } | undefined;
    to?: {
        location: AssetLocationCanonical;
        userAddress?: string | undefined;
        asset?: MovableAsset | undefined;
    } | undefined;
    transactions?: {
        location: AssetLocationCanonical;
        transaction: Partial<TransactionId>;
    }[] | undefined;
    pagination?: PaginationQuery | undefined;
};
export declare function getKeetaAssetMovementAnchorlistTransactionsRequestSigningData(_ignore_input: KeetaAssetMovementAnchorlistTransactionsClientRequest | KeetaAssetMovementAnchorlistTransactionsRequest): Signable;
export type KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse = (({
    ok: true;
    transactions: KeetaAssetMovementTransaction[];
} & PaginationResponseInformation) | {
    ok: false;
    error: string;
});
export type KeetaAssetMovementAnchorShareKYCClientRequest = {
    account: KeetaNetAccount;
    attributes: string | SharableCertificateAttributes;
    tosAgreement?: {
        id: string;
    };
};
export type KeetaAssetMovementAnchorShareKYCRequest = ConvertToExternalRequest<KeetaAssetMovementAnchorShareKYCClientRequest, {
    attributes: string;
}, {
    signed: HTTPSignedField;
}>;
export declare function getKeetaAssetMovementAnchorShareKYCRequestSigningData(_ignore_input: KeetaAssetMovementAnchorShareKYCClientRequest | KeetaAssetMovementAnchorShareKYCRequest): Signable;
export type KeetaAssetMovementAnchorShareKYCResponse = (({
    ok: true;
} & ({
    isPending?: false;
} | {
    isPending: true;
    promiseURL?: string;
})) | {
    ok: false;
    error: string;
});
type Account = InstanceType<typeof KeetaNet.lib.Account<Exclude<AccountKeyAlgorithm, IdentifierKeyAlgorithm>>>;
type KeetaAssetMovementAnchorKYCExternalURLFlow = {
    type: 'url-flow';
    url: string;
};
export interface KeetaAssetMovementAnchorKYCShareNeededErrorJSONProperties {
    tosFlow: KeetaAssetMovementAnchorKYCExternalURLFlow | undefined;
    neededAttributes: string[] | undefined;
    shareWithPrincipals: ReturnType<Account['publicKeyString']['get']>[];
    acceptedIssuers: {
        name: string;
        value: string;
    }[][];
}
type KeetaAssetMovementAnchorKYCShareNeededErrorJSON = ReturnType<KeetaAnchorUserError['toJSON']> & KeetaAssetMovementAnchorKYCShareNeededErrorJSONProperties;
declare class KeetaAssetMovementAnchorKYCShareNeededError extends KeetaAnchorUserError {
    static readonly name: string;
    private readonly KeetaAssetMovementAnchorKYCShareNeededErrorObjectTypeID;
    private static readonly KeetaAssetMovementAnchorKYCShareNeededErrorObjectTypeID;
    readonly shareWithPrincipals: Account[];
    readonly neededAttributes: string[] | undefined;
    readonly tosFlow: KeetaAssetMovementAnchorKYCExternalURLFlow | undefined;
    readonly acceptedIssuers: {
        name: string;
        value: string;
    }[][];
    constructor(args: {
        neededAttributes?: string[] | undefined;
        shareWithPrincipals: Account[];
        tosFlow?: KeetaAssetMovementAnchorKYCExternalURLFlow | undefined;
        acceptedIssuers: {
            name: string;
            value: string;
        }[][];
    }, message?: string);
    static isInstance(input: unknown): input is KeetaAssetMovementAnchorKYCShareNeededError;
    asErrorResponse(contentType: 'text/plain' | 'application/json'): {
        error: string;
        statusCode: number;
        contentType: string;
    };
    toJSON(): KeetaAssetMovementAnchorKYCShareNeededErrorJSON;
    static fromJSON(input: unknown): Promise<KeetaAssetMovementAnchorKYCShareNeededError>;
}
export interface KeetaAssetMovementAnchorAdditionalKYCNeededErrorJSONProperties {
    toCompleteFlow: KeetaAssetMovementAnchorKYCExternalURLFlow | undefined;
}
type KeetaAssetMovementAnchorAdditionalKYCNeededErrorJSON = ReturnType<KeetaAnchorUserError['toJSON']> & KeetaAssetMovementAnchorAdditionalKYCNeededErrorJSONProperties;
declare class KeetaAssetMovementAnchorAdditionalKYCNeededError extends KeetaAnchorUserError {
    static readonly name: string;
    private readonly KeetaAssetMovementAnchorAdditionalKYCNeededErrorObjectTypeID;
    private static readonly KeetaAssetMovementAnchorAdditionalKYCNeededErrorObjectTypeID;
    readonly toCompleteFlow: KeetaAssetMovementAnchorKYCExternalURLFlow | undefined;
    constructor(args: KeetaAssetMovementAnchorAdditionalKYCNeededErrorJSONProperties, message?: string);
    static isInstance(input: unknown): input is KeetaAssetMovementAnchorAdditionalKYCNeededError;
    asErrorResponse(contentType: 'text/plain' | 'application/json'): {
        error: string;
        statusCode: number;
        contentType: string;
    };
    toJSON(): KeetaAssetMovementAnchorAdditionalKYCNeededErrorJSON;
    static fromJSON(input: unknown): Promise<KeetaAssetMovementAnchorAdditionalKYCNeededError>;
}
export interface KeetaAssetMovementAnchorOperationNotSupportedErrorJSONProperties {
    forAsset?: AssetOrPair | undefined;
    forRail?: Rail | undefined;
}
type KeetaAssetMovementAnchorOperationNotSupportedErrorJSON = ReturnType<KeetaAnchorUserError['toJSON']> & KeetaAssetMovementAnchorOperationNotSupportedErrorJSONProperties;
declare class KeetaAssetMovementAnchorOperationNotSupportedError extends KeetaAnchorUserError implements KeetaAssetMovementAnchorOperationNotSupportedErrorJSONProperties {
    static readonly name: string;
    private readonly KeetaAssetMovementAnchorOperationNotSupportedErrorObjectTypeID;
    private static readonly KeetaAssetMovementAnchorOperationNotSupportedErrorObjectTypeID;
    readonly forAsset: AssetOrPair | undefined;
    readonly forRail: Rail | undefined;
    constructor(args: KeetaAssetMovementAnchorOperationNotSupportedErrorJSONProperties, message?: string);
    static isInstance(input: unknown): input is KeetaAssetMovementAnchorOperationNotSupportedError;
    asErrorResponse(contentType: 'text/plain' | 'application/json'): {
        error: string;
        statusCode: number;
        contentType: string;
    };
    toJSON(): KeetaAssetMovementAnchorOperationNotSupportedErrorJSON;
    static fromJSON(input: unknown): Promise<KeetaAssetMovementAnchorOperationNotSupportedError>;
}
export type KeetaAssetMovementAnchorUserAction = ({
    type: 'add-certificate';
    account?: GenericAccount;
    certificate: Certificate;
    intermediates?: Certificate[];
} | {
    type: 'grant-permission';
    permissionToGrant: Omit<ACLPermissionRequirement, 'method' | 'entity'> & {
        entity?: GenericAccount;
    };
}) & {
    details?: ClientRenderableContent;
};
export type KeetaAssetMovementAnchorUserActionJSON = ToJSONSerializable<Exclude<KeetaAssetMovementAnchorUserAction, {
    type: 'add-certificate';
}> | (Omit<Extract<KeetaAssetMovementAnchorUserAction, {
    type: 'add-certificate';
}>, 'certificate' | 'intermediates'> & {
    certificate: string;
    intermediates?: string[];
})>;
export interface KeetaAssetMovementAnchorUserActionNeededErrorProperties {
    actionsNeeded: KeetaAssetMovementAnchorUserAction[];
}
export interface KeetaAssetMovementAnchorUserActionNeededErrorJSONProperties extends Omit<KeetaAssetMovementAnchorUserActionNeededErrorProperties, 'actionsNeeded'> {
    actionsNeeded: KeetaAssetMovementAnchorUserActionJSON[];
}
type KeetaAssetMovementAnchorUserActionNeededErrorJSON = ReturnType<KeetaAnchorUserError['toJSON']> & KeetaAssetMovementAnchorUserActionNeededErrorJSONProperties;
declare class KeetaAssetMovementAnchorUserActionNeededError extends KeetaAnchorUserError implements KeetaAssetMovementAnchorUserActionNeededErrorProperties {
    #private;
    static readonly name: string;
    private readonly KeetaAssetMovementAnchorUserActionNeededErrorObjectTypeID;
    private static readonly KeetaAssetMovementAnchorUserActionNeededErrorObjectTypeID;
    readonly actionsNeeded: KeetaAssetMovementAnchorUserAction[];
    constructor(args: KeetaAssetMovementAnchorUserActionNeededErrorProperties, message?: string);
    static isInstance(input: unknown): input is KeetaAssetMovementAnchorUserActionNeededError;
    asErrorResponse(contentType: 'text/plain' | 'application/json'): {
        error: string;
        statusCode: number;
        contentType: string;
    };
    static addOperationsToBuilder(actions: KeetaAssetMovementAnchorUserAction[], builder: UserClientBuilder): void;
    toJSON(): KeetaAssetMovementAnchorUserActionNeededErrorJSON;
    static fromJSON(input: unknown): Promise<KeetaAssetMovementAnchorUserActionNeededError>;
}
export declare const Errors: {
    KYCShareNeeded: typeof KeetaAssetMovementAnchorKYCShareNeededError;
    AdditionalKYCNeeded: typeof KeetaAssetMovementAnchorAdditionalKYCNeededError;
    OperationNotSupported: typeof KeetaAssetMovementAnchorOperationNotSupportedError;
    UserActionNeeded: typeof KeetaAssetMovementAnchorUserActionNeededError;
};
//# sourceMappingURL=common.d.ts.map