import { ApiPromise } from '@polkadot/api';
import { AddressOrPair } from '@polkadot/api/types';
import { NormalizedCacheObject } from 'apollo-cache-inmemory';
import ApolloClient, { ApolloQueryResult } from 'apollo-client';
import BigNumber from 'bignumber.js';
import { TxTag } from "../polkadot/types";
import { Account, Identity, SecurityToken } from "../internal";
import { Query } from "../middleware/types";
import { AccountBalance, ClaimData, ClaimType, CommonKeyring, DistributionWithDetails, KeyringPair, ResultSet, SubCallback, Subsidy, TransactionArgument, UiKeyring, UnsubCallback } from "../types";
import { GraphqlQuery } from "../types/internal";
declare type AddPairParams = {
    accountSeed?: string;
    accountUri?: string;
    accountMnemonic?: string;
    pair?: KeyringPair;
};
/**
 * Context in which the SDK is being used
 *
 * - Holds the current low level API
 * - Holds the current keyring pair
 * - Holds the current Identity
 */
export declare class Context {
    private keyring;
    private isDisconnected;
    polymeshApi: ApiPromise;
    currentPair?: KeyringPair;
    /**
     * Whether the current node is an archive node (contains a full history from genesis onward) or not
     */
    isArchiveNode: boolean;
    ss58Format: number;
    private _middlewareApi;
    private _polymeshApi;
    /**
     * @hidden
     */
    private constructor();
    /**
     * @hidden
     */
    static createPolymeshApiProxy(ctx: Context): ApiPromise;
    /**
     * Create the Context instance
     */
    static create(params: {
        polymeshApi: ApiPromise;
        middlewareApi: ApolloClient<NormalizedCacheObject> | null;
        accountSeed?: string;
        keyring?: CommonKeyring | UiKeyring;
        accountUri?: string;
        accountMnemonic?: string;
    }): Promise<Context>;
    /**
     * @hidden
     */
    private isCurrentNodeArchive;
    /**
     * Retrieve a list of Accounts that can act as signers. The first Account in the array is the current Account (default signer)
     */
    getAccounts(): Account[];
    /**
     * Add a signing pair to the Keyring
     */
    addPair(params: AddPairParams): KeyringPair;
    /**
     * @hidden
     */
    private static _addPair;
    /**
     * Set a pair as the current Account keyring pair
     */
    setPair(address: string): void;
    /**
     * Retrieve the account level POLYX balance
     *
     * @note can be subscribed to
     */
    accountBalance(account?: string | Account): Promise<AccountBalance>;
    accountBalance(account: string | Account | undefined, callback: SubCallback<AccountBalance>): Promise<UnsubCallback>;
    /**
     * Retrieve the account level subsidizer relationship. If there is no such relationship, return null
     *
     * @note can be subscribed to
     */
    accountSubsidy(account?: string | Account): Promise<Omit<Subsidy, 'beneficiary'> | null>;
    accountSubsidy(account: string | Account | undefined, callback: SubCallback<Omit<Subsidy, 'beneficiary'> | null>): Promise<UnsubCallback>;
    /**
     * Retrieve current Account
     *
     * @throws if there is no current account associated to the SDK instance
     */
    getCurrentAccount(): Account;
    /**
     * Retrieve current Identity
     *
     * @throws if there is no Identity associated to the current Account (or there is no current Account associated to the SDK instance)
     */
    getCurrentIdentity(): Promise<Identity>;
    /**
     * Retrieve current Keyring Pair
     *
     * @throws if there is no Account associated to the SDK instance
     */
    getCurrentPair(): KeyringPair;
    /**
     * Retrieve the signer address (or keyring pair)
     */
    getSigner(): AddressOrPair;
    /**
     * Check whether Identities exist
     */
    getInvalidDids(identities: (string | Identity)[]): Promise<string[]>;
    /**
     * Retrieve the protocol fees associated with running a specific transaction
     *
     * @param tag - transaction tag (i.e. TxTags.asset.CreateAsset or "asset.createAsset")
     */
    getTransactionFees(tag: TxTag): Promise<BigNumber>;
    /**
     * Retrieve the types of arguments that a certain transaction requires to be run
     *
     * @param args.tag - tag associated with the transaction that will be executed if the proposal passes
     */
    getTransactionArguments(args: {
        tag: TxTag;
    }): TransactionArgument[];
    /**
     * @hidden
     */
    getDividendDistributionsForTokens(args: {
        tokens: SecurityToken[];
    }): Promise<DistributionWithDetails[]>;
    /**
     * @hidden
     *
     * @note no claimTypes value means ALL claim types
     */
    getIdentityClaimsFromChain(args: {
        targets: (string | Identity)[];
        claimTypes?: ClaimType[];
        trustedClaimIssuers?: (string | Identity)[];
        includeExpired: boolean;
    }): Promise<ClaimData[]>;
    /**
     * @hidden
     */
    getIdentityClaimsFromMiddleware(args: {
        targets?: (string | Identity)[];
        trustedClaimIssuers?: (string | Identity)[];
        claimTypes?: Exclude<ClaimType, ClaimType.InvestorUniquenessV2>[];
        includeExpired?: boolean;
        size?: number;
        start?: number;
    }): Promise<ResultSet<ClaimData>>;
    /**
     * Retrieve a list of claims. Can be filtered using parameters
     *
     * @param opts.targets - identities (or Identity IDs) for which to fetch claims (targets). Defaults to all targets
     * @param opts.trustedClaimIssuers - identity IDs of claim issuers. Defaults to all claim issuers
     * @param opts.claimTypes - types of the claims to fetch. Defaults to any type
     * @param opts.includeExpired - whether to include expired claims. Defaults to true
     * @param opts.size - page size
     * @param opts.start - page offset
     *
     * @note uses the middleware (optional)
     */
    issuedClaims(opts?: {
        targets?: (string | Identity)[];
        trustedClaimIssuers?: (string | Identity)[];
        claimTypes?: Exclude<ClaimType, ClaimType.InvestorUniquenessV2>[];
        includeExpired?: boolean;
        size?: number;
        start?: number;
    }): Promise<ResultSet<ClaimData>>;
    /**
     * Retrieve the middleware client
     *
     * @throws if the middleware is not enabled
     */
    get middlewareApi(): ApolloClient<NormalizedCacheObject>;
    /**
     * Make a query to the middleware server using the apollo client
     */
    queryMiddleware<Result extends Partial<Query>>(query: GraphqlQuery<unknown>): Promise<ApolloQueryResult<Result>>;
    /**
     * Return whether the middleware was enabled at startup
     */
    isMiddlewareEnabled(): boolean;
    /**
     * Return whether the middleware is enabled and online
     */
    isMiddlewareAvailable(): Promise<boolean>;
    /**
     * Retrieve the latest block number
     */
    getLatestBlock(): Promise<BigNumber>;
    /**
     * Retrieve the network version
     */
    getNetworkVersion(): Promise<string>;
    /**
     * Disconnect the Polkadot API, middleware, and render this instance unusable
     *
     * @note after disconnecting, trying to access any property in this objecct will result
     *   in an error
     */
    disconnect(): Promise<void>;
    /**
     * Returns a (shallow) clone of this instance. Useful for providing a separate
     *   Context to Procedures with different signers
     */
    clone(): Context;
}
export {};
//# sourceMappingURL=Context.d.ts.map