import { AccountId } from "@polkadot/types/interfaces";
import { ApiPromise } from "@polkadot/api";
import { Currency, MonetaryAmount } from "@interlay/monetary-js";
import { TransactionAPI } from "./transaction";
import { ChainBalance, CurrencyUnit } from "../types";
import { OrmlTokensAccountData } from "@polkadot/types/lookup";
/**
 * @category BTC Bridge
 */
export interface TokensAPI {
    /**
     * @param currency The currency specification, a `Monetary.js` object
     * @returns The total amount in the system
     */
    total<U extends CurrencyUnit>(currency: Currency<U>): Promise<MonetaryAmount<Currency<U>, U>>;
    /**
     * @param currency The currency specification, a `Monetary.js` object
     * @param id The AccountId of a user
     * @returns The user's balance
     */
    balance<U extends CurrencyUnit>(currency: Currency<U>, id: AccountId): Promise<ChainBalance<U>>;
    /**
     * @param destination The address of a user
     * @param amount The amount to transfer, as a `Monetary.js` object
     */
    transfer<U extends CurrencyUnit>(destination: string, amount: MonetaryAmount<Currency<U>, U>): Promise<void>;
    /**
     * Subscribe to balance updates
     * @param currency The currency specification, a `Monetary.js` object
     * @param account AccountId string
     * @param callback Function to be called whenever the balance of an account is updated.
     * Its parameters are (accountIdString, freeBalance)
     */
    subscribeToBalance<U extends CurrencyUnit>(currency: Currency<U>, account: string, callback: (account: string, balance: ChainBalance<U>) => 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<U extends CurrencyUnit>(accountId: AccountId, freeBalance: MonetaryAmount<Currency<U>, U>, lockedBalance?: MonetaryAmount<Currency<U>, U>): Promise<void>;
}
export declare class DefaultTokensAPI implements TokensAPI {
    private api;
    private transactionAPI;
    constructor(api: ApiPromise, transactionAPI: TransactionAPI);
    total<U extends CurrencyUnit>(currency: Currency<U>): Promise<MonetaryAmount<Currency<U>, U>>;
    getAccountData<U extends CurrencyUnit>(currency: Currency<U>, id: AccountId): Promise<OrmlTokensAccountData>;
    balance<U extends CurrencyUnit>(currency: Currency<U>, id: AccountId): Promise<ChainBalance<U>>;
    subscribeToBalance<U extends CurrencyUnit>(currency: Currency<U>, account: string, callback: (account: string, accountData: ChainBalance<U>) => void): Promise<() => void>;
    transfer<U extends CurrencyUnit>(destination: string, amount: MonetaryAmount<Currency<U>, U>): Promise<void>;
    setBalance<U extends CurrencyUnit>(accountId: AccountId, freeBalance: MonetaryAmount<Currency<U>, U>, lockedBalance?: MonetaryAmount<Currency<U>, U>): Promise<void>;
}
