import { type QueryParams } from "@dfinity/utils";
import type { Principal } from "@icp-sdk/core/principal";
import type { SnsGovernanceDid, SnsSwapDid } from "../declarations";
import type { BalanceParams, GetIndexAccountTransactionsParams, IcrcAccount, IcrcIndexCanister, IcrcIndexDid, IcrcLedgerCanister, IcrcLedgerDid, IcrcTokenMetadataResponse, TransferParams } from "../ledger/icrc";
import type { SnsGovernanceCanister } from "./governance.canister";
import type { SnsRootCanister } from "./root.canister";
import type { SnsSwapCanister } from "./swap.canister";
import type { SnsClaimNeuronParams, SnsDisburseNeuronParams, SnsGetNeuronParams, SnsGetProposalParams, SnsIncreaseDissolveDelayParams, SnsIncreaseStakeNeuronParams, SnsListNeuronsParams, SnsListProposalsParams, SnsNeuronAutoStakeMaturityParams, SnsNeuronDisburseMaturityParams, SnsNeuronPermissionsParams, SnsNeuronStakeMaturityParams, SnsRegisterVoteParams, SnsSetDissolveTimestampParams, SnsSetFollowingParams, SnsSetTopicFollowees, SnsSplitNeuronParams, SnsStakeNeuronParams } from "./types/governance.params";
import type { NewSaleTicketParams } from "./types/swap.params";
interface SnsWrapperOptions {
    /** The wrapper for the "root" canister of the particular Sns */
    root: SnsRootCanister;
    /** The wrapper for the "governance" canister of the particular Sns */
    governance: SnsGovernanceCanister;
    /** The wrapper for the "ledger" canister of the particular Sns */
    ledger: IcrcLedgerCanister;
    /** The wrapper for the "swap" canister of the particular Sns */
    swap: SnsSwapCanister;
    /** The wrapper for the "index" canister of the particular Sns */
    index: IcrcIndexCanister;
    /** The wrapper has been instantiated and should perform query or update calls */
    certified: boolean;
}
/**
 * Sns wrapper - notably used by NNS-dapp - ease the access to a particular Sns.
 * It knows all the Sns' canisters, wrap and enhance their available features.
 * A wrapper either performs query or update calls.
 */
export declare class SnsWrapper {
    private readonly root;
    private readonly governance;
    private readonly ledger;
    private readonly swap;
    private readonly index;
    private readonly certified;
    /**
     * Constructor to instantiate a Sns
     */
    constructor({ root, governance, ledger, swap, index, certified, }: SnsWrapperOptions);
    /**
     * Binds the list of canister ids of the Sns.
     */
    get canisterIds(): {
        rootCanisterId: Principal;
        ledgerCanisterId: Principal;
        governanceCanisterId: Principal;
        swapCanisterId: Principal;
        indexCanisterId: Principal;
    };
    listNeurons: (params: Omit<SnsListNeuronsParams, "certified">) => Promise<SnsGovernanceDid.Neuron[]>;
    listProposals: (params: Omit<SnsListProposalsParams, "certified">) => Promise<SnsGovernanceDid.ListProposalsResponse>;
    getProposal: (params: Omit<SnsGetProposalParams, "certified">) => Promise<SnsGovernanceDid.ProposalData>;
    listNervousSystemFunctions: (params: Omit<QueryParams, "certified">) => Promise<SnsGovernanceDid.ListNervousSystemFunctionsResponse>;
    metadata: (params: Omit<QueryParams, "certified">) => Promise<[SnsGovernanceDid.GetMetadataResponse, IcrcTokenMetadataResponse]>;
    nervousSystemParameters: (params: Omit<QueryParams, "certified">) => Promise<SnsGovernanceDid.NervousSystemParameters>;
    ledgerMetadata: (params: Omit<QueryParams, "certified">) => Promise<IcrcTokenMetadataResponse>;
    transactionFee: (params: Omit<QueryParams, "certified">) => Promise<IcrcLedgerDid.Tokens>;
    totalTokensSupply: (params: Omit<QueryParams, "certified">) => Promise<IcrcLedgerDid.Tokens>;
    balance: (params: Omit<BalanceParams, "certified">) => Promise<IcrcLedgerDid.Tokens>;
    transfer: (params: TransferParams) => Promise<IcrcLedgerDid.BlockIndex>;
    getNeuron: (params: Omit<SnsGetNeuronParams, "certified">) => Promise<SnsGovernanceDid.Neuron>;
    queryNeuron: (params: Omit<SnsGetNeuronParams, "certified">) => Promise<SnsGovernanceDid.Neuron | undefined>;
    /**
     * Returns the subaccount of the next neuron to be created.
     *
     * The neuron account is a subaccount of the governance canister.
     * The subaccount is derived from the controller and an ascending index.
     *
     * ‼️ The id of the neuron is the subaccount (neuron ID = subaccount) ‼️.
     *
     * If the neuron does not exist for that subaccount, then we use it for the next neuron.
     *
     * The index is used in the memo of the transfer and when claiming the neuron.
     * This is how the backend can identify which neuron is being claimed.
     *
     * @param controller
     * @returns
     */
    nextNeuronAccount: (controller: Principal) => Promise<{
        account: IcrcAccount;
        index: bigint;
    }>;
    /**
     * Stakes a neuron.
     *
     * This is a convenient method that transfers the stake to the neuron subaccount and then claims the neuron.
     *
     * ⚠️ This feature is provided as it without warranty. It does not implement any additional checks of the validity of the payment flow - e.g. it does not handle refund nor retries claiming the neuron in case of errors.
     *
     * @param {SnsStakeNeuronParams} params
     * @param {Principal} params.controller
     * @param {bigint} params.stakeE8s
     * @param {source} params.source
     * @returns {NeuronId}
     */
    stakeNeuron: ({ stakeE8s, source, controller, createdAt, fee, }: SnsStakeNeuronParams) => Promise<SnsGovernanceDid.NeuronId>;
    /**
     * Increase the stake of a neuron.
     *
     * This is a convenient method that transfers the stake to the neuron subaccount and then refresh the neuron.
     *
     * ⚠️ This feature is provided as it without warranty. It does not implement any additional checks of the validity of the payment flow - e.g. it does not handle refund nor calls refresh again in case of errors.
     *
     * @param {SnsStakeNeuronParams} params
     * @param {Principal} params.controller
     * @param {bigint} params.stakeE8s
     * @param {source} params.source
     * @returns {NeuronId}
     */
    increaseStakeNeuron: ({ stakeE8s, source, neuronId, }: SnsIncreaseStakeNeuronParams) => Promise<void>;
    getNeuronBalance: (neuronId: SnsGovernanceDid.NeuronId) => Promise<IcrcLedgerDid.Tokens>;
    addNeuronPermissions: (params: SnsNeuronPermissionsParams) => Promise<void>;
    refreshNeuron: (neuronId: SnsGovernanceDid.NeuronId) => Promise<void>;
    claimNeuron: (params: SnsClaimNeuronParams) => Promise<SnsGovernanceDid.NeuronId>;
    removeNeuronPermissions: (params: SnsNeuronPermissionsParams) => Promise<void>;
    splitNeuron: (params: SnsSplitNeuronParams) => Promise<SnsGovernanceDid.NeuronId | undefined>;
    disburse: (params: SnsDisburseNeuronParams) => Promise<void>;
    startDissolving: (neuronId: SnsGovernanceDid.NeuronId) => Promise<void>;
    stopDissolving: (neuronId: SnsGovernanceDid.NeuronId) => Promise<void>;
    setDissolveTimestamp: (params: SnsSetDissolveTimestampParams) => Promise<void>;
    increaseDissolveDelay: (params: SnsIncreaseDissolveDelayParams) => Promise<void>;
    setTopicFollowees: (params: SnsSetTopicFollowees) => Promise<void>;
    setFollowing: (params: SnsSetFollowingParams) => Promise<void>;
    registerVote: (params: SnsRegisterVoteParams) => Promise<void>;
    swapState: (params: Omit<QueryParams, "certified">) => Promise<SnsSwapDid.GetStateResponse>;
    /**
     * Returns the ticket if a ticket was found for the caller and the ticket
     * was removed successfully. Returns None if no ticket was found for the caller.
     * Only the owner of a ticket can remove it.
     *
     * Always certified
     *
     * @param params
     */
    notifyPaymentFailure: () => Promise<SnsSwapDid.Ticket | undefined>;
    notifyParticipation: (params: SnsSwapDid.RefreshBuyerTokensRequest) => Promise<SnsSwapDid.RefreshBuyerTokensResponse>;
    getUserCommitment: (params: SnsSwapDid.GetBuyerStateRequest) => Promise<SnsSwapDid.BuyerState | undefined>;
    getOpenTicket: (params: Omit<QueryParams, "certified">) => Promise<SnsSwapDid.Ticket | undefined>;
    newSaleTicket: (params: NewSaleTicketParams) => Promise<SnsSwapDid.Ticket>;
    getLifecycle: (params: Omit<QueryParams, "certified">) => Promise<SnsSwapDid.GetLifecycleResponse | undefined>;
    getFinalizationStatus: (params: Omit<QueryParams, "certified">) => Promise<SnsSwapDid.GetAutoFinalizationStatusResponse | undefined>;
    getSaleParameters: (params: Omit<QueryParams, "certified">) => Promise<SnsSwapDid.GetSaleParametersResponse | undefined>;
    getDerivedState: (params: Omit<QueryParams, "certified">) => Promise<SnsSwapDid.GetDerivedStateResponse | undefined>;
    getTransactions: (params: GetIndexAccountTransactionsParams) => Promise<IcrcIndexDid.GetTransactions>;
    stakeMaturity: (params: SnsNeuronStakeMaturityParams) => Promise<void>;
    disburseMaturity: (params: SnsNeuronDisburseMaturityParams) => Promise<void>;
    autoStakeMaturity: (params: SnsNeuronAutoStakeMaturityParams) => Promise<void>;
    private mergeParams;
    private assertCertified;
    /**
     * Each Sns neuron id is a subaccount of the related Sns ledger account of the Sns governance canister.
     *
     * In other words, the Sns governance canister is the owner. It has an account in the related Sns ledger and each neuron is both a child of the Sns governance canister and a subaccount in the Sns ledger.
     *
     * @private
     */
    private get owner();
}
export {};
