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 { AccountManagement } from "./AccountManagement";
import { Assets } from "./Assets";
import { Identities } from "./Identities";
import { Account, Identity } from "./internal";
import { Settlements } from "./Settlements";
import { CommonKeyring, MiddlewareConfig, UiKeyring } from "./types";
import { Claims } from './Claims';
import { Network } from './Network';
interface ConnectParamsBase {
    nodeUrl: string;
    signer?: PolkadotSigner;
    middleware?: MiddlewareConfig;
}
/**
 * Main entry point of the Polymesh SDK
 */
export declare class Polymesh {
    private context;
    /**
     * A set of methods to deal with Claims
     */
    claims: Claims;
    /**
     * A set of methods to interact with the Polymesh network. This includes transferring POLYX, reading network properties and querying for historical events
     */
    network: Network;
    /**
     * A set of methods for exchanging Assets
     */
    settlements: Settlements;
    /**
     * A set of methods for managing a Polymesh Identity's Accounts and their permissions
     */
    accountManagement: AccountManagement;
    /**
     * A set of methods for interacting with Polymesh Identities.
     */
    identities: Identities;
    /**
     * A set of methods for interacting with Assets
     */
    assets: Assets;
    /**
     * @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>;
    /**
     * Retrieve the Identity associated to the current Account (null if there is none)
     */
    getCurrentIdentity(): Promise<Identity | null>;
    /**
     * 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;
    /**
     * 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;
    /**
     * Polkadot client
     */
    get _polkadotApi(): ApiPromise;
    /**
     * Middleware client
     */
    get _middlewareApi(): ApolloClient<NormalizedCacheObject>;
}
export {};
//# sourceMappingURL=Polymesh.d.ts.map