import { AccountId } from "@polkadot/types/interfaces";
import { ApiPromise } from "@polkadot/api";
import { MonetaryAmount } from "@interlay/monetary-js";
import { TransactionAPI } from "./transaction";
import { ChainBalance, CurrencyExt } from "../types";
import { OrmlTokensAccountData } from "@polkadot/types/lookup";
/**
 * @category BTC Bridge
 */
export interface TokensAPI {
    /**
     * @param currency The currency specification, a `Monetary.js` object or `ForeignAsset`
     * @returns The total amount in the system
     */
    total(currency: CurrencyExt): Promise<MonetaryAmount<CurrencyExt>>;
    /**
     * @param currency The currency specification, `Monetary.js` object or `ForeignAsset`
     * @param id The AccountId of a user
     * @returns The user's balance
     */
    balance(currency: CurrencyExt, id: AccountId): Promise<ChainBalance>;
    /**
     * @param destination The address of a user
     * @param amount The amount to transfer, as `Monetary.js` object or `ForeignAsset`
     */
    transfer(destination: string, amount: MonetaryAmount<CurrencyExt>): Promise<void>;
    /**
     * Subscribe to balance updates
     * @param currency The currency specification, `Monetary.js` object or `ForeignAsset`
     * @param account AccountId string
     * @param callback Function to be called whenever the balance of an account is updated.
     * Its parameters are (accountIdString, freeBalance)
     */
    subscribeToBalance(currency: CurrencyExt, account: string, callback: (account: string, balance: ChainBalance) => void): Promise<() => void>;
    /**
     * @param accountId Account whose balance to set
     * @param freeBalance Free balance to set, as a Monetary.js object
     * @param lockedBalance Locked balance to set, as a Monetary.js object
     * @remarks This extrinsic is only valid if submitted by a sudo account
     */
    setBalance(accountId: AccountId, freeBalance: MonetaryAmount<CurrencyExt>, lockedBalance?: MonetaryAmount<CurrencyExt>): Promise<void>;
}
export declare class DefaultTokensAPI implements TokensAPI {
    private api;
    private transactionAPI;
    constructor(api: ApiPromise, transactionAPI: TransactionAPI);
    total(currency: CurrencyExt): Promise<MonetaryAmount<CurrencyExt>>;
    getAccountData(currency: CurrencyExt, id: AccountId): Promise<OrmlTokensAccountData>;
    balance(currency: CurrencyExt, id: AccountId): Promise<ChainBalance>;
    subscribeToBalance(currency: CurrencyExt, account: string, callback: (account: string, accountData: ChainBalance) => void): Promise<() => void>;
    transfer(destination: string, amount: MonetaryAmount<CurrencyExt>): Promise<void>;
    setBalance(accountId: AccountId, freeBalance: MonetaryAmount<CurrencyExt>, lockedBalance?: MonetaryAmount<CurrencyExt>): Promise<void>;
}
