import { ApiPromise } from "@polkadot/api";
import { AccountId } from "@polkadot/types/interfaces";
import { Currency, MonetaryAmount } from "@interlay/monetary-js";
import type { InterbtcPrimitivesVaultId } from "@polkadot/types/lookup";
import { VaultsAPI } from "./vaults";
import { TransactionAPI } from "./transaction";
import { CollateralCurrencyExt, NominationStatus, WrappedCurrency } from "../types";
import { RewardsAPI } from "./rewards";
import { AssetRegistryAPI } from "../parachain/asset-registry";
import { LoansAPI } from "./loans";
export declare enum NominationAmountType {
    Raw = "raw",
    Parsed = "parsed"
}
export declare type NominationData = {
    nonce: number;
    vaultId: InterbtcPrimitivesVaultId;
    nominatorId: AccountId;
    amount: MonetaryAmount<Currency>;
};
export declare type RawNomination = NominationData & {
    type: NominationAmountType.Raw;
};
export declare type Nomination = NominationData & {
    type: NominationAmountType.Parsed;
};
export declare type NominationReward = NominationData;
/**
 * @category BTC Bridge
 */
export interface NominationAPI {
    /**
     * @param vaultAccountId Vault to nominate collateral to
     * @param amount Amount to deposit, as a `Monetary.js` object or `ForeignAsset`
     */
    depositCollateral(vaultAccountId: AccountId, amount: MonetaryAmount<CollateralCurrencyExt>): Promise<void>;
    /**
     * @param vaultAccountId Vault that collateral was nominated to
     * @param amount Amount to withdraw, as a `Monetary.js` object or `ForeignAsset`
     */
    withdrawCollateral(vaultAccountId: AccountId, amount: MonetaryAmount<CollateralCurrencyExt>): Promise<void>;
    /**
     * @param collateralCurrency Currency to accept as nomination
     * @remarks Function callable by vaults to opt in to the nomination feature
     */
    optIn(collateralCurrency: CollateralCurrencyExt): Promise<void>;
    /**
     * @param collateralCurrency Currency to stop accepting as nomination
     * @remarks Function callable by vaults to opt out of the nomination feature
     */
    optOut(collateralCurrency: CollateralCurrencyExt): Promise<void>;
    /**
     * @remarks Testnet utility function
     */
    setNominationEnabled(enabled: boolean): Promise<void>;
    /**
     * @returns A boolean value representing whether the vault nomination feature is enabled
     */
    isNominationEnabled(): Promise<boolean>;
    /**
     * @returns All nominations for the wrapped currency set in the API
     */
    list(): Promise<Nomination[]>;
    /**
     * @param currency The currency of the nominations
     * @returns The rewards a nominator has accumulated, in wrapped token (e.g. interBTC, kBTC)
     */
    listNominatorRewards(): Promise<NominationReward[]>;
    /**
     * @returns A list of all vaults that opted in to the nomination feature.
     */
    listVaults(): Promise<InterbtcPrimitivesVaultId[]>;
    /**
     * @param A string representing the vault's account ID
     * @returns A boolean value
     */
    isVaultOptedIn(accountId: AccountId, collateralCurrency: CollateralCurrencyExt): Promise<boolean>;
    /**
     * @remarks At least one of the parameters must be specified
     * @param vaultAccountId Id of vault who is opted in to nomination
     * @param collateralCurrencyId The collateral currency of the nominations
     * @param nominatorId Id of user who nominated to one or more vaults
     */
    getFilteredNominations(vaultAccountId?: AccountId, collateralCurrency?: CollateralCurrencyExt, nominatorId?: AccountId): Promise<Nomination[]>;
    /**
     * @remarks At least one of the parameters must be specified
     * @param vaultAccountId Id of vault who is opted in to nomination
     * @param collateralCurrency The collateral currency of the nominations
     * @param nominatorId Id of user who nominated to one or more vaults
     * @returns The total nominated amount, filtered using the given parameters
     */
    getTotalNomination(vaultAccountId?: AccountId, collateralCurrency?: CollateralCurrencyExt, nominatorId?: AccountId): Promise<MonetaryAmount<CollateralCurrencyExt>>;
    /**
     *
     * @param nominatorId Id of user who nominated to one or more vaults
     * @returns The rewards a currently active nominator has accumulated
     */
    getActiveNominatorRewards(nominatorId: AccountId): Promise<NominationReward[]>;
    /**
     * @param vaultAccountId Id of nominated vault
     * @param collateralCurrency The currency towards whose issuance the nomination was made
     * @param rewardCurrency The reward currency, e.g. kBTC, KINT, interBTC, INTR
     * @param nominatorId Id of user who nominated to one or more vaults
     * @returns The rewards a (possibly inactive) nominator has accumulated
     */
    getNominatorReward(vaultId: AccountId, collateralCurrency: CollateralCurrencyExt, rewardCurrency: Currency, nominatorId: AccountId): Promise<MonetaryAmount<Currency>>;
    /**
     * @returns A map (vaultId => nonce), representing the nonces for each reward pool with the given currency
     */
    getNonces(): Promise<Map<InterbtcPrimitivesVaultId, number>>;
}
export declare class DefaultNominationAPI implements NominationAPI {
    private api;
    private wrappedCurrency;
    private vaultsAPI;
    private rewardsAPI;
    private transactionAPI;
    private assetRegistryAPI;
    private loansAPI;
    constructor(api: ApiPromise, wrappedCurrency: WrappedCurrency, vaultsAPI: VaultsAPI, rewardsAPI: RewardsAPI, transactionAPI: TransactionAPI, assetRegistryAPI: AssetRegistryAPI, loansAPI: LoansAPI);
    depositCollateral(vaultAccountId: AccountId, amount: MonetaryAmount<CollateralCurrencyExt>): Promise<void>;
    withdrawCollateral(vaultAccountId: AccountId, amount: MonetaryAmount<CollateralCurrencyExt>, nonce?: number): Promise<void>;
    optIn(collateralCurrency: CollateralCurrencyExt): Promise<void>;
    optOut(collateralCurrency: CollateralCurrencyExt): Promise<void>;
    setNominationEnabled(enabled: boolean): Promise<void>;
    isNominationEnabled(): Promise<boolean>;
    getNonces(): Promise<Map<InterbtcPrimitivesVaultId, number>>;
    listAllNominations(): Promise<RawNomination[]>;
    listNominatorRewards(): Promise<NominationReward[]>;
    getActiveNominatorRewards(nominatorId: AccountId): Promise<NominationReward[]>;
    getNominatorReward(vaultId: AccountId, collateralCurrency: CollateralCurrencyExt, rewardCurrency: Currency, nominatorId: AccountId): Promise<MonetaryAmount<Currency>>;
    list(): Promise<Nomination[]>;
    getFilteredNominations(vaultId?: AccountId, collateralCurrency?: CollateralCurrencyExt, nominatorId?: AccountId): Promise<Nomination[]>;
    getNominationStatus(vaultId: AccountId, collateralCurrency: CollateralCurrencyExt, nominatorId: AccountId): Promise<NominationStatus>;
    getTotalNomination(vaultId?: AccountId, collateralCurrency?: CollateralCurrencyExt, nominatorId?: AccountId): Promise<MonetaryAmount<CollateralCurrencyExt>>;
    listVaults(): Promise<InterbtcPrimitivesVaultId[]>;
    isVaultOptedIn(accountId: AccountId, collateralCurrency: CollateralCurrencyExt): Promise<boolean>;
}
