import { ApiPromise } from '@polkadot/api';
import { Signer as PolkadotSigner } from '@polkadot/api/types';
import { NormalizedCacheObject } from 'apollo-cache-inmemory';
import { ApolloClient } from 'apollo-client';
import BigNumber from 'bignumber.js';
import { TxTag } from "./polkadot/types";
import { Account, ClaimClassicTickerParams, Identity, RegisterIdentityParams, SecurityToken, TickerReservation, TransferPolyxParams } from "./internal";
import { Settlements } from "./Settlements";
import { AccountBalance, CommonKeyring, MiddlewareConfig, NetworkProperties, ProcedureMethod, SubCallback, UiKeyring, UnsubCallback } from "./types";
import { Claims } from './Claims';
import { CurrentIdentity } from './CurrentIdentity';
import { Middleware } from './Middleware';
interface ConnectParamsBase {
    nodeUrl: string;
    signer?: PolkadotSigner;
    middleware?: MiddlewareConfig;
}
/**
 * Main entry point of the Polymesh SDK
 */
export declare class Polymesh {
    private context;
    claims: Claims;
    middleware: Middleware;
    settlements: Settlements;
    currentIdentity: CurrentIdentity;
    /**
     * @hidden
     */
    private constructor();
    /**
     * Create the instance and connect to the Polymesh node using an account seed
     *
     * @param params.nodeUrl - URL of the Polymesh node this instance will be connecting to
     * @param params.signer - injected signer object (optional, only relevant if using a wallet browser extension)
     * @param params.middleware - middleware API URL and key (optional, used for historic queries)
     * @param params.accountSeed - hex seed of the account
     */
    static connect(params: ConnectParamsBase & {
        accountSeed: string;
    }): Promise<Polymesh>;
    /**
     * Create the instance and connect to the Polymesh node using a keyring
     *
     * @param params.nodeUrl - URL of the Polymesh node this instance will be connecting to
     * @param params.signer - injected signer object (optional, only relevant if using a wallet browser extension)
     * @param params.middleware - middleware API URL and key (optional, used for historic queries)
     * @param params.keyring - object that holds several accounts (useful when using a wallet browser extension)
     */
    static connect(params: ConnectParamsBase & {
        keyring: CommonKeyring | UiKeyring;
    }): Promise<Polymesh>;
    /**
     * Create the instance and connect to the Polymesh node using an account URI
     *
     * @param params.nodeUrl - URL of the Polymesh node this instance will be connecting to
     * @param params.signer - injected signer object (optional, only relevant if using a wallet browser extension)
     * @param params.middleware - middleware API URL and key (optional, used for historic queries)
     */
    static connect(params: ConnectParamsBase & {
        accountUri: string;
    }): Promise<Polymesh>;
    /**
     * Create the instance and connect to the Polymesh node using an account mnemonic
     *
     * @param params.nodeUrl - URL of the Polymesh node this instance will be connecting to
     * @param params.signer - injected signer object (optional, only relevant if using a wallet browser extension)
     * @param params.middleware - middleware API URL and key (optional, used for historic queries)
     * @param params.accountMnemonic - account mnemonic
     */
    static connect(params: ConnectParamsBase & {
        accountMnemonic: string;
    }): Promise<Polymesh>;
    /**
     * Create the instance and connect to the Polymesh node without an account
     *
     * @param params.nodeUrl - URL of the Polymesh node this instance will be connecting to
     * @param params.signer - injected signer object (optional, only relevant if using a wallet browser extension)
     * @param params.middleware - middleware API URL and key (optional, used for historic queries)
     */
    static connect(params: ConnectParamsBase): Promise<Polymesh>;
    /**
     * Transfer an amount of POLYX to a specified Account
     */
    transferPolyx: ProcedureMethod<TransferPolyxParams, void>;
    /**
     * Get the free/locked POLYX balance of an Account
     *
     * @param args.account - defaults to the current Account
     *
     * @note can be subscribed to
     */
    getAccountBalance(args?: {
        account: string | Account;
    }): Promise<AccountBalance>;
    getAccountBalance(callback: SubCallback<AccountBalance>): Promise<UnsubCallback>;
    getAccountBalance(args: {
        account: string | Account;
    }, callback: SubCallback<AccountBalance>): Promise<UnsubCallback>;
    /**
     * Claim a ticker symbol that was reserved in Polymath Classic (Ethereum). The Ethereum account
     *   that owns the ticker must sign a special message that contains the DID of the Identity that will own the ticker
     *   in Polymesh, and provide the signed data to this call
     */
    claimClassicTicker: ProcedureMethod<ClaimClassicTickerParams, TickerReservation>;
    /**
     * Check if a ticker hasn't been reserved
     *
     * @note can be subscribed to
     */
    isTickerAvailable(args: {
        ticker: string;
    }): Promise<boolean>;
    isTickerAvailable(args: {
        ticker: string;
    }, callback: SubCallback<boolean>): Promise<UnsubCallback>;
    /**
     * Retrieve all the ticker reservations currently owned by an Identity. This doesn't include tokens that
     *   have already been launched
     *
     * @param args.owner - defaults to the current Identity
     *
     * @note reservations with unreadable characters in their tickers will be left out
     */
    getTickerReservations(args?: {
        owner: string | Identity;
    }): Promise<TickerReservation[]>;
    /**
     * Retrieve a Ticker Reservation
     *
     * @param args.ticker - Security Token ticker
     */
    getTickerReservation(args: {
        ticker: string;
    }): Promise<TickerReservation>;
    /**
     * Create an Identity instance from a DID
     *
     * @throws if there is no Identity with the passed DID
     */
    getIdentity(args: {
        did: string;
    }): Promise<Identity>;
    /**
     * Retrieve the Identity associated to the current Account (null if there is none)
     */
    getCurrentIdentity(): Promise<Identity | null>;
    /**
     * Create an Account instance from an address. If no address is passed, the current Account is returned
     */
    getAccount(args?: {
        address: string;
    }): Account;
    /**
     * Return a list that contains all the signing Accounts associated to the SDK instance
     *
     * @throws — if there is no current Account associated to the SDK instance
     */
    getAccounts(): Account[];
    /**
     * Return whether the supplied Identity/DID exists
     */
    isIdentityValid(args: {
        identity: Identity | string;
    }): Promise<boolean>;
    /**
     * Retrieve the protocol fees associated with running a specific transaction
     *
     * @param args.tag - transaction tag (i.e. TxTags.asset.CreateAsset or "asset.createAsset")
     */
    getTransactionFees(args: {
        tag: TxTag;
    }): Promise<BigNumber>;
    /**
     * Get the treasury wallet address
     */
    getTreasuryAccount(): Account;
    /**
     * Handle connection errors
     *
     * @returns an unsubscribe callback
     */
    onConnectionError(callback: (...args: unknown[]) => unknown): () => void;
    /**
     * Handle disconnection
     *
     * @returns an unsubscribe callback
     */
    onDisconnect(callback: (...args: unknown[]) => unknown): () => void;
    /**
     * Retrieve all the Security Tokens owned by an Identity
     *
     * @param args.owner - identity representation or Identity ID as stored in the blockchain
     *
     * @note tokens with unreadable characters in their tickers will be left out
     */
    getSecurityTokens(args?: {
        owner: string | Identity;
    }): Promise<SecurityToken[]>;
    /**
     * Retrieve a Security Token
     *
     * @param args.ticker - Security Token ticker
     */
    getSecurityToken(args: {
        ticker: string;
    }): Promise<SecurityToken>;
    /**
     * Retrieve information for the current network
     */
    getNetworkProperties(): Promise<NetworkProperties>;
    /**
     * Get the Treasury POLYX balance
     *
     * @note can be subscribed to
     */
    getTreasuryBalance(): Promise<BigNumber>;
    getTreasuryBalance(callback: SubCallback<BigNumber>): Promise<UnsubCallback>;
    /**
     * Register an Identity
     *
     * @note must be a CDD provider
     * @note this may create [[AuthorizationRequest | Authorization Requests]] which have to be accepted by
     *   the corresponding [[Account | Accounts]] and/or [[Identity | Identities]]. An Account or Identity can
     *   fetch its pending Authorization Requests by calling `authorizations.getReceived`
     *
     * @note required role:
     *   - Customer Due Diligence Provider
     */
    registerIdentity: ProcedureMethod<RegisterIdentityParams, Identity>;
    /**
     * Retrieve the number of the latest block in the chain
     */
    getLatestBlock(): Promise<BigNumber>;
    /**
     * Disconnect the client and close all open connections and subscriptions
     *
     * @note the SDK will become unusable after this operation. It will throw an error when attempting to
     *   access any chain or middleware data. If you wish to continue using the SDK, you must
     *   create a new instance by calling [[connect]]
     */
    disconnect(): Promise<void>;
    /**
     * Adds a new signing key to the SDK instance. This will not change the current signer. For that,
     *   you must explicitly call `setSigner`
     *
     * @param params.accountSeed - hex seed of the account
     */
    addSigner(params: {
        accountSeed: string;
    }): Account;
    /**
     * Adds a new signing key to the SDK instance. This will not change the current signer. For that,
     *   you must explicitly call `setSigner`
     *
     * @param params.accountMnemonic - account mnemonic
     */
    addSigner(params: {
        accountMnemonic: string;
    }): Account;
    /**
     * Adds a new signing key to the SDK instance. This will not change the current signer. For that,
     *   you must explicitly call [[setSigner]]
     *
     * @param params.accountUri - account URI
     */
    addSigner(params: {
        accountUri: string;
    }): Account;
    /**
     * Set the SDK's current signing key to the provided address
     *
     * @note the key must have been previously added via [[addSigner]]
     */
    setSigner(signer: string | Account): void;
    /**
     * Fetch the current network version (i.e. 3.1.0)
     */
    getNetworkVersion(): Promise<string>;
    /**
     * Polkadot client
     */
    get _polkadotApi(): ApiPromise;
    /**
     * Middleware client
     */
    get _middlewareApi(): ApolloClient<NormalizedCacheObject>;
}
export {};
//# sourceMappingURL=Polymesh.d.ts.map