import { IRequestTracer } from '../../api';
import { CreateLightningInvoiceParams, LightningInvoiceResponse } from '../../lightning';
import { IBaseCoin, ITransactionRecipient, Message, SignedMessage, SignedTransaction, TransactionParams, TransactionPrebuild, VerificationOptions, TypedData, NFTTransferOptions } from '../baseCoin';
import { BitGoBase } from '../bitgoBase';
import { Keychain, KeychainWithEncryptedPrv } from '../keychain';
import { IPendingApproval, PendingApprovalData } from '../pendingApproval';
import { IGoStakingWallet, IStakingWallet } from '../staking';
import { ITradingAccount } from '../trading';
import { CustomCommitmentGeneratingFunction, CustomEddsaMPCv2SigningRound1GeneratingFunction, CustomEddsaMPCv2SigningRound2GeneratingFunction, CustomEddsaMPCv2SigningRound3GeneratingFunction, CustomGShareGeneratingFunction, CustomKShareGeneratingFunction, CustomMPCv2SigningRound1GeneratingFunction, CustomMPCv2SigningRound2GeneratingFunction, CustomMPCv2SigningRound3GeneratingFunction, CustomMuDeltaShareGeneratingFunction, CustomPaillierModulusGetterFunction, CustomRShareGeneratingFunction, CustomSShareGeneratingFunction, TokenEnablement, TokenTransferRecipientParams, TxRequest } from '../utils';
import { SerializedNtilde } from '../../account-lib/mpc/tss/ecdsa/types';
import { IAddressBook } from '../address-book';
import { WalletUser, AddressQueryResult } from '@bitgo/public-types';
import { SubmitTransactionResponse } from '../inscriptionBuilder';
export interface MaximumSpendableOptions {
    minValue?: number | string;
    maxValue?: number | string;
    minHeight?: number;
    minConfirms?: number;
    enforceMinConfirmsForChange?: boolean;
    feeRate?: number;
    maxFeeRate?: number;
    recipientAddress?: string;
    limit?: number;
    target?: number | string;
    plainTarget?: number;
}
export interface MaximumSpendable {
    maximumSpendable: number;
    coin: string;
}
export interface Memo {
    value: string;
    type: string;
}
export interface BuildConsolidationTransactionOptions extends PrebuildTransactionOptions, WalletSignTransactionOptions {
    consolidateAddresses?: string[];
}
export interface ResourceDelegationEntry {
    receiverAddress: string;
    amount: string;
    /** Resource type to delegate (e.g. 'ENERGY', 'BANDWIDTH'). */
    resource: string;
}
export interface BuildResourceDelegationTransactionOptions extends PrebuildTransactionOptions, WalletSignTransactionOptions {
    delegations: ResourceDelegationEntry[];
}
export interface BuildResourceUndelegationTransactionOptions extends PrebuildTransactionOptions, WalletSignTransactionOptions {
    undelegations: ResourceDelegationEntry[];
}
export interface ResourceManagementSendResult {
    txid?: string;
    status?: string;
    tx?: string;
    txRequestId?: string;
    pendingApprovalId?: string;
}
export interface BuildResourceManagementTransactionResult {
    prebuilds: PrebuildTransactionResult[];
    buildFailures: {
        message: string;
        receiverAddress?: string;
    }[];
}
export interface BuildTokenEnablementOptions extends PrebuildTransactionOptions {
    enableTokens: TokenEnablement[];
}
type BaseBalance = {
    balanceString: string;
    confirmedBalanceString: string;
    spendableBalanceString: string;
};
export type NftBalance = BaseBalance & {
    type: string;
    metadata: {
        name: string;
        tokenContractAddress: string;
    };
    collections: {
        [tokenId: string]: number;
    };
};
export type ApiVersion = 'lite' | 'full';
export interface PrebuildTransactionOptions {
    reqId?: IRequestTracer;
    recipients?: {
        address: string;
        amount: string | number;
        tokenName?: string;
        tokenData?: TokenTransferRecipientParams;
    }[];
    numBlocks?: number;
    maxFeeRate?: number;
    minConfirms?: number;
    enforceMinConfirmsForChange?: boolean;
    targetWalletUnspents?: number;
    minValue?: number | string;
    maxValue?: number | string;
    sequenceId?: string;
    lastLedgerSequence?: number;
    ledgerSequenceDelta?: number;
    gasPrice?: number;
    noSplitChange?: boolean;
    unspents?: any[];
    /**
     * The receive address from which funds will be withdrawn.
     * This feature is supported only for specific coins, like ADA.
     */
    senderAddress?: string;
    /**
     * The wallet ID of the sender wallet when sender wallet is different from current wallet id.
     * @type {string}
     * @default {undefined}
     * @description For BTC unstaking, the sender wallet(a descriptor wallet) is different from original wallet
     * */
    senderWalletId?: string;
    messages?: {
        address: string;
        message: string;
    }[];
    changeAddress?: string;
    allowExternalChangeAddress?: boolean;
    type?: string;
    closeRemainderTo?: string;
    nonParticipation?: boolean;
    validFromBlock?: number;
    validToBlock?: number;
    instant?: boolean;
    memo?: Memo;
    addressType?: string;
    changeAddressType?: string;
    hop?: boolean;
    walletPassphrase?: string;
    reservation?: {
        expireTime?: string;
        pendingApprovalId?: string;
    };
    offlineVerification?: boolean;
    walletContractAddress?: string;
    idfSignedTimestamp?: string;
    idfUserId?: string;
    idfVersion?: number;
    comment?: string;
    [index: string]: unknown;
    tokenName?: string;
    nftCollectionId?: string;
    nftId?: string;
    enableTokens?: TokenEnablement[];
    nonce?: string;
    preview?: boolean;
    eip1559?: EIP1559;
    gasLimit?: number;
    lowFeeTxid?: string;
    receiveAddress?: string;
    isTss?: boolean;
    custodianTransactionId?: string;
    apiVersion?: ApiVersion;
    stakingParams?: unknown;
    /**
     * If set to false, sweep all funds including the required minimums for address(es). E.g. Polkadot (DOT) requires 1 DOT minimum.
     */
    keepAlive?: boolean;
    /**
     * This comment applies to UTXO coins. It's asking which transaction format to use:
     * the legacy format defined by bitcoinjs-lib, or the 'psbt' format, which follows the BIP-174.
     */
    txFormat?: 'legacy' | 'psbt' | 'psbt-lite';
    /**
     * Custom Solana instructions to include in the transaction.
     * Each instruction contains a program ID, accounts array, and data buffer.
     */
    solInstructions?: {
        programId: string;
        keys: {
            pubkey: string;
            isSigner: boolean;
            isWritable: boolean;
        }[];
        data: string;
    }[];
    /**
     * Solana versioned transaction data for building transactions with Address Lookup Tables.
     * Contains compiled instructions, address lookup tables, static account keys, and message header.
     */
    solVersionedTransactionData?: {
        versionedInstructions: {
            programIdIndex: number;
            accountKeyIndexes: number[];
            data: string;
        }[];
        addressLookupTables: {
            accountKey: string;
            writableIndexes: number[];
            readonlyIndexes: number[];
        }[];
        staticAccountKeys: string[];
        messageHeader: {
            numRequiredSignatures: number;
            numReadonlySignedAccounts: number;
            numReadonlyUnsignedAccounts: number;
        };
        recentBlockhash?: string;
    };
    /**
     * Custom transaction parameters for Aptos entry function calls.
     * Used with the customTx intent type for Aptos smart contract interactions.
     */
    aptosCustomTransactionParams?: {
        moduleName: string;
        functionName: string;
        typeArguments?: string[];
        functionArguments?: any[];
        abi?: any;
    };
    txRequestId?: string;
    isTestTransaction?: boolean;
    transferOfferId?: string;
    /**
     * Amount for intents that use a top-level amount instead of recipients (e.g. bridgeFunds).
     * Named intentAmount to avoid collision with SendOptions.amount which is string | number.
     */
    intentAmount?: {
        value: string;
        symbol: string;
    };
    /**
     * TIP-20 token address to use for paying transaction fees (Tempo only).
     * When specified, fees will be deducted in this token instead of the native currency.
     */
    feeToken?: string;
}
export interface PrebuildAndSignTransactionOptions extends PrebuildTransactionOptions, WalletSignTransactionOptions {
    prebuildTx?: string | PrebuildTransactionResult;
    verification?: VerificationOptions;
}
export interface PrebuildTransactionResult extends TransactionPrebuild {
    walletId: string;
    consolidateId?: string;
    consolidationDetails?: {
        senderAddressIndex: number;
    };
    feeInfo?: {
        fee?: number;
        feeString?: string;
    };
    pendingApprovalId?: string;
    reqId?: IRequestTracer;
    payload?: string;
    stakingParams?: unknown;
    recipients?: ITransactionRecipient[];
}
export interface CustomSigningFunction {
    (params: {
        coin: IBaseCoin;
        txPrebuild: TransactionPrebuild;
        pubs?: string[];
        derivationSeed?: string;
        signingStep?: 'signerNonce' | 'signerSignature' | 'cosignerNonce';
    }): Promise<SignedTransaction>;
}
export interface WalletSignBaseOptions {
    reqId?: IRequestTracer;
    prv?: string;
    pubs?: string[];
    txRequestId?: string;
    cosignerPub?: string;
    isLastSignature?: boolean;
    customSigningFunction?: CustomSigningFunction;
    bulk?: boolean;
}
export interface WalletSignTransactionOptions extends WalletSignBaseOptions {
    txPrebuild?: TransactionPrebuild;
    customCommitmentGeneratingFunction?: CustomCommitmentGeneratingFunction;
    customRShareGeneratingFunction?: CustomRShareGeneratingFunction;
    customGShareGeneratingFunction?: CustomGShareGeneratingFunction;
    customPaillierModulusGeneratingFunction?: CustomPaillierModulusGetterFunction;
    customKShareGeneratingFunction?: CustomKShareGeneratingFunction;
    customMuDeltaShareGeneratingFunction?: CustomMuDeltaShareGeneratingFunction;
    customSShareGeneratingFunction?: CustomSShareGeneratingFunction;
    customMPCv2SigningRound1GenerationFunction?: CustomMPCv2SigningRound1GeneratingFunction;
    customMPCv2SigningRound2GenerationFunction?: CustomMPCv2SigningRound2GeneratingFunction;
    customMPCv2SigningRound3GenerationFunction?: CustomMPCv2SigningRound3GeneratingFunction;
    customEddsaMPCv2SigningRound1GenerationFunction?: CustomEddsaMPCv2SigningRound1GeneratingFunction;
    customEddsaMPCv2SigningRound2GenerationFunction?: CustomEddsaMPCv2SigningRound2GeneratingFunction;
    customEddsaMPCv2SigningRound3GenerationFunction?: CustomEddsaMPCv2SigningRound3GeneratingFunction;
    apiVersion?: ApiVersion;
    multisigTypeVersion?: 'MPCv2';
    walletPassphrase?: string;
    /**
     * Optional transaction verification parameters. When provided, the transaction will be verified
     * using verifyTransaction before signing.
     */
    verifyTxParams?: {
        txParams: TransactionParams;
        verification?: VerificationOptions;
    };
    [index: string]: unknown;
}
interface WalletSignMessageBase extends WalletSignBaseOptions {
    walletPassphrase?: string;
    custodianMessageId?: string;
    customPaillierModulusGeneratingFunction?: CustomPaillierModulusGetterFunction;
    customKShareGeneratingFunction?: CustomKShareGeneratingFunction;
    customMuDeltaShareGeneratingFunction?: CustomMuDeltaShareGeneratingFunction;
    customSShareGeneratingFunction?: CustomSShareGeneratingFunction;
}
export interface WalletSignMessageOptions extends WalletSignMessageBase {
    message?: Message;
}
export interface WalletSignTypedDataOptions extends WalletSignMessageBase {
    typedData: TypedData;
}
export interface SignAndSendTxRequestOptions {
    txRequestId: string;
    walletPassphrase: string;
    isTxRequestFull: boolean;
}
export interface GetUserPrvOptions {
    keychain?: Keychain;
    key?: Keychain;
    prv?: string;
    coldDerivationSeed?: string;
    walletPassphrase?: string;
}
export interface WalletCoinSpecific {
    tokenFlushThresholds?: any;
    addressVersion?: number;
    baseAddress?: string;
    rootAddress?: string;
    customChangeWalletId: string;
    walletVersion?: number;
    hashAlgorithm?: string;
    pendingEcdsaTssInitialization?: boolean;
    features?: string[];
    freezeDepositsFromShielded?: boolean;
    userKeySigningRequired?: boolean;
    /**
     * Lightning coin specific data starts
     */
    keys?: string[];
    encryptedSignerAdminMacaroon?: string | null;
    encryptedSignerMacaroon?: string | null;
    watchOnlyExternalIp?: string | null;
    signerHost?: string | null;
    encryptedSignerTlsKey?: string | null;
    signerTlsCert?: string | null;
    watchOnlyAccounts?: Record<string, unknown> | null;
    signedUserAuthKey?: string;
}
export interface PaginationOptions {
    page?: number;
    prevId?: string;
    limit?: number;
}
export interface GetTransactionOptions extends PaginationOptions {
    txHash?: string;
    includeRbf?: boolean;
}
export interface TransfersOptions extends PaginationOptions {
    txHash?: string;
    allTokens?: boolean;
    searchLabel?: string;
    address?: string[] | string;
    dateGte?: string;
    dateLt?: string;
    valueGte?: number;
    valueLt?: number;
    includeHex?: boolean;
    state?: string[] | string;
    type?: string;
    decorateUtxoSpecificFields?: boolean;
}
export interface GetTransferOptions {
    id?: string;
}
export interface TransferBySequenceIdOptions {
    sequenceId?: string;
}
export interface UnspentsOptions extends PaginationOptions {
    minValue?: number | string;
    maxValue?: number | string;
    minHeight?: number;
    minConfirms?: number;
    target?: number | string;
    segwit?: boolean;
    chains?: number[];
    unspentIds?: string[];
}
export interface ManageUnspentReservationOptions {
    create?: {
        unspentIds: string[];
        expireTime: string;
    };
    modify?: {
        unspentIds: string[];
        changes: {
            expireTime: string;
        };
    };
    delete?: {
        id: string;
    };
}
export interface ConsolidateUnspentsOptions extends WalletSignTransactionOptions {
    walletPassphrase?: string;
    xprv?: string;
    minValue?: number | string;
    maxValue?: number | string;
    minHeight?: number;
    numUnspentsToMake?: number;
    feeTxConfirmTarget?: number;
    limit?: number;
    minConfirms?: number;
    enforceMinConfirmsForChange?: boolean;
    feeRate?: number;
    maxFeeRate?: number;
    maxFeePercentage?: number;
    comment?: string;
    otp?: string;
    targetAddress?: string;
    bulk?: boolean;
    [index: string]: unknown;
}
export interface FanoutUnspentsOptions extends WalletSignTransactionOptions {
    walletPassphrase?: string;
    xprv?: string;
    minValue?: number | string;
    maxValue?: number | string;
    minHeight?: number;
    maxNumInputsToUse?: number;
    unspents?: string[];
    numUnspentsToMake?: number;
    minConfirms?: number;
    enforceMinConfirmsForChange?: boolean;
    feeRate?: number;
    maxFeeRate?: number;
    maxFeePercentage?: number;
    feeTxConfirmTarget?: number;
    comment?: string;
    otp?: string;
    targetAddress?: string;
    [index: string]: unknown;
}
export interface SweepOptions {
    address?: string;
    walletPassphrase?: string;
    xprv?: string;
    otp?: string;
    feeRate?: number;
    maxFeeRate?: number;
    feeTxConfirmTarget?: number;
    allowPartialSweep?: boolean;
    [index: string]: unknown;
}
export interface FreezeOptions {
    duration?: number;
}
export interface TransferCommentOptions {
    id?: string;
    comment?: string;
}
export interface AddressesOptions extends PaginationOptions {
    mine?: boolean;
    sort?: number;
    labelContains?: string;
    segwit?: boolean;
    chains?: number[];
    includeBalances?: boolean;
    includeTokens?: boolean;
    includeTotalAddressCount?: boolean;
    returnBalancesForToken?: string;
    pendingDeployment?: boolean;
}
export interface AddressesByBalanceOptions extends PaginationOptions {
    token?: string;
    nftCollectionId?: string;
    nftId?: string;
    sort?: number;
}
export interface GetAddressOptions {
    address?: string;
    id?: string;
    reqId?: IRequestTracer;
}
export interface DeployForwardersOptions {
    address?: string;
    id?: string;
}
export interface FundForwardersOptions {
    forwarderAddress: string;
    amount?: string;
}
export interface FundForwarderParams {
    forwarders: FundForwardersOptions[];
}
export interface FlushForwarderTokenOptions {
    address?: string;
    id?: string;
    tokenName: string;
    gasPrice?: number;
    eip1559?: {
        maxPriorityFeePerGas: number;
        maxFeePerGas: number;
    };
}
export interface ForwarderBalance {
    address: string;
    balance: string;
}
export interface ForwarderBalanceOptions {
    minimumBalance?: number;
    maximumBalance?: number;
}
export interface GetAccountResourcesOptions {
    addresses: string[];
    destinationAddress?: string;
}
export interface AccountResourceInfo {
    address: string;
    freeBandwidthAvailable: number;
    freeBandwidthUsed: number;
    stakedBandwidthAvailable: number;
    stakedBandwidthUsed: number;
    energyAvailable: number;
    energyUsed: number;
    resourceDeficitForAssetTransfer?: {
        bandwidthDeficit: number;
        bandwidthSunRequired: string;
        energyDeficit?: number;
        energySunRequired?: string;
    };
    maxResourcesDelegatable?: {
        bandwidthSun: string;
        energySun: string;
    };
}
export interface FailedAddressInfo {
    address: string;
    error: string;
}
export interface GetAccountResourcesResponse {
    resources: AccountResourceInfo[];
    failedAddresses: FailedAddressInfo[];
}
export interface GetResourceDelegationsOptions {
    type?: 'outgoing' | 'incoming';
    resource?: string;
    limit?: number;
    nextBatchPrevId?: string;
}
export interface DelegationRecord {
    id: string;
    coin: string;
    ownerAddress: string;
    receiverAddress: string;
    resource: 'ENERGY' | 'BANDWIDTH';
    balance: string;
    updatedAt: string;
}
export interface GetResourceDelegationsResponse {
    address: string;
    coin: string;
    delegations: {
        outgoing: DelegationRecord[];
        incoming: DelegationRecord[];
        nextBatchPrevId?: string;
    };
}
export type CreateAddressFormat = 'base58' | 'cashaddr';
export interface CreateAddressOptions {
    chain?: number;
    gasPrice?: number | string;
    count?: number;
    label?: string;
    lowPriority?: boolean;
    forwarderVersion?: number;
    format?: CreateAddressFormat;
    baseAddress?: string;
    allowSkipVerifyAddress?: boolean;
    derivedAddress?: string;
    index?: number;
    onToken?: string;
    evmKeyRingReferenceAddress?: string;
}
export interface UpdateAddressOptions {
    label?: string;
    address?: string;
}
export interface UpdateBuildDefaultOptions {
    minFeeRate?: number;
    changeAddressType?: string;
    txFormat?: 'legacy' | 'psbt' | 'psbt-lite';
}
export interface UpdateWalletOptions {
    coinSpecific?: WalletCoinSpecific;
    buildDefaults?: UpdateBuildDefaultOptions;
    label?: string;
}
export interface SimulateWebhookOptions {
    webhookId?: string;
    transferId?: string;
    pendingApprovalId?: string;
}
export interface ModifyWebhookOptions {
    url?: string;
    type?: string;
}
export interface GetPrvOptions {
    prv?: string;
    walletPassphrase?: string;
}
export interface SharedKeyChain {
    pub?: string;
    encryptedPrv?: string;
    fromPubKey?: string;
    toPubKey?: string;
    path?: string;
}
export interface CreateShareOptions {
    user?: string;
    permissions?: string;
    keychain?: {
        pub?: string;
        encryptedPrv?: string;
        fromPubKey?: string;
        toPubKey?: string;
        path?: string;
    };
    reshare?: boolean;
    message?: string;
    disableEmail?: boolean;
    /**
     * If true, allows sharing without a keychain.
     * A falsy value is expected to throw an API error if an empty or undefined `keychain` is provided.
     */
    skipKeychain?: boolean;
}
export interface ShareWalletOptions {
    email?: string;
    permissions?: string;
    walletPassphrase?: string;
    message?: string;
    reshare?: boolean;
    /**
     * If true, skips sharing the wallet keychain with the recipient.
     */
    skipKeychain?: boolean;
    disableEmail?: boolean;
}
export interface BulkCreateShareOption {
    user: string;
    permissions: string[];
    keychain: BulkWalletShareKeychain;
}
export interface BulkWalletShareOptions {
    walletPassphrase: string;
    keyShareOptions: Array<{
        userId: string;
        pubKey: string;
        path: string;
        permissions: string[];
    }>;
}
export type WalletShareState = 'active' | 'accepted' | 'canceled' | 'rejected' | 'pendingapproval';
export interface DecryptedKeychainData {
    prv: string;
    pub: string;
}
export interface BulkWalletShareKeychain {
    pub: string;
    encryptedPrv: string;
    fromPubKey: string;
    toPubKey: string;
    path: string;
}
export interface WalletShare {
    id: string;
    coin: string;
    wallet: string;
    walletLabel?: string;
    fromUser: string;
    toUser: string;
    permissions: string[];
    state?: WalletShareState;
    enterprise?: string;
    message?: string;
    pendingApprovalId?: string;
    /**
     * If true, the wallet share requires the user to provide a new keychain.
     * When accepted, the wallet will be re-shared with all other spenders.
     */
    keychainOverrideRequired?: boolean;
    /**
     * If true, the wallet share requires the user to to generate a new key-pair.
     * In addition to the encrypted private key, the user must provide the public key.
     * */
    userMultiKeyRotationRequired?: boolean;
    isUMSInitiated?: boolean;
    keychain?: BulkWalletShareKeychain;
}
export interface CreateBulkWalletShareListResponse {
    shares: WalletShare[];
}
export interface RemoveUserOptions {
    userId?: string;
}
export interface AccelerateTransactionOptions {
    cpfpTxIds?: string[];
    rbfTxIds?: string[];
    cpfpFeeRate?: number;
    noCpfpFeeRate?: boolean;
    maxFee?: number;
    noMaxFee?: boolean;
    feeMultiplier?: number;
    recipients?: {
        address: string;
        amount: string;
    }[];
    [index: string]: unknown;
}
export interface SubmitTransactionOptions {
    otp?: string;
    txHex?: string;
    halfSigned?: {
        txHex?: string;
        payload?: string;
        txBase64?: string;
        signedChildPsbt?: string;
    };
    comment?: string;
    txRequestId?: string;
}
export interface SendOptions {
    address?: string;
    amount?: number | string;
    data?: string;
    feeLimit?: string;
    message?: string;
    walletPassphrase?: string;
    prv?: string;
    minConfirms?: number;
    enforceMinConfirmsForChange?: boolean;
    custodianTransactionId?: string;
    [index: string]: unknown;
    tokenName?: string;
}
export interface SendManyOptions extends PrebuildAndSignTransactionOptions {
    reqId?: IRequestTracer;
    recipients?: {
        address: string;
        amount: string | number;
        feeLimit?: string;
        data?: string | TokenTransferRecipientParams;
        tokenName?: string;
        tokenData?: TokenTransferRecipientParams;
    }[];
    numBlocks?: number;
    feeRate?: number;
    feeMultiplier?: number;
    maxFeeRate?: number;
    minConfirms?: number;
    enforceMinConfirmsForChange?: boolean;
    targetWalletUnspents?: number;
    message?: string;
    minValue?: number | string;
    maxValue?: number | string;
    sequenceId?: string;
    lastLedgerSequence?: number;
    ledgerSequenceDelta?: number;
    gasPrice?: number;
    noSplitChange?: boolean;
    unspents?: string[];
    comment?: string;
    otp?: string;
    changeAddress?: string;
    allowExternalChangeAddress?: boolean;
    instant?: boolean;
    memo?: Memo;
    transferId?: number;
    [index: string]: unknown;
    eip1559?: EIP1559;
    gasLimit?: number;
    custodianTransactionId?: string;
}
export interface FetchCrossChainUTXOsOptions {
    sourceChain?: 'P' | 'C';
}
export type Unspent = {
    outputID: number;
    amount: string;
    txid: string;
    threshold: number;
    addresses: string[];
    outputidx: string;
    locktime: string;
};
export interface CrossChainUTXO {
    unspent: Unspent;
    fromWallet: string;
    toWallet: string;
    toAddress: string;
}
export type WalletType = 'backing' | 'cold' | 'custodial' | 'custodialPaired' | 'hot' | 'trading' | 'advanced';
export type SubWalletType = 'distributedCustody' | 'lightningCustody' | 'lightningSelfCustody' | 'onPrem';
export interface WalletData {
    id: string;
    approvalsRequired: number;
    balance: number;
    confirmedBalance: number;
    spendableBalance: number;
    balanceString: string;
    confirmedBalanceString: string;
    spendableBalanceString: string;
    coin: string;
    label: string;
    keys: string[];
    receiveAddress?: {
        address: string;
    };
    walletFlags?: {
        name: string;
        value: string;
    }[];
    migratedFrom?: string;
    coinSpecific: WalletCoinSpecific;
    pendingApprovals: PendingApprovalData[];
    enterprise: string;
    customChangeKeySignatures?: {
        user?: string;
        backup?: string;
        bitgo?: string;
    };
    multisigType: 'onchain' | 'tss';
    multisigTypeVersion?: 'MPCv2';
    type?: WalletType;
    subType?: SubWalletType;
    tokens?: Record<string, any>[];
    nfts?: {
        [contractAddressOrToken: string]: NftBalance;
    };
    unsupportedNfts?: {
        [contractAddress: string]: NftBalance;
    };
    users?: WalletUser[];
    evmKeyRingReferenceWalletId?: string;
    isParent?: boolean;
    enabledChildChains?: string[];
    /**
     * @deprecated Read from `coinSpecific.userKeySigningRequired` instead. Retained
     * temporarily as a fallback while the field migrates from the top level to the OFC
     * coinSpecific subdocument; will be removed in a follow-up major release.
     */
    userKeySigningRequired?: boolean;
}
export interface RecoverTokenOptions {
    tokenContractAddress?: string;
    recipient?: string;
    broadcast?: boolean;
    walletPassphrase?: string;
    prv?: string;
}
interface EIP1559 {
    maxPriorityFeePerGas: string;
    maxFeePerGas: string;
}
export interface ChangeFeeOptions {
    txid?: string;
    fee?: string;
    eip1559?: EIP1559;
}
/**
 * Response from the token approval build endpoint
 */
export interface BuildTokenApprovalResponse {
    txHex: string;
    txInfo: {
        amount: string;
        contractAddress: string;
        spender: string;
    };
    recipients: {
        address: string;
        amount: string;
        data: string;
    }[];
    eip1559?: {
        maxFeePerGas: string;
        maxPriorityFeePerGas: string;
    };
    nextContractSequenceId: number;
    coin: string;
    walletId: string;
}
export interface CreatePolicyRuleOptions {
    id?: string;
    type?: string;
    message?: string;
    condition?: unknown;
    action?: unknown;
}
export interface RemovePolicyRuleOptions {
    id?: string;
    message?: string;
}
export interface DownloadKeycardOptions {
    jsPDF?: any;
    QRCode?: any;
    userKeychain?: Keychain;
    backupKeychain?: Keychain;
    bitgoKeychain?: Keychain;
    passphrase?: string;
    passcodeEncryptionCode?: string;
    activationCode?: string;
    walletKeyID?: string;
    backupKeyID?: string;
}
export interface ChallengeVerifiers {
    verifiers: {
        adminSignature: string;
    };
}
export interface WalletEcdsaChallenges {
    enterpriseChallenge: SerializedNtilde & ChallengeVerifiers;
    bitgoChallenge: SerializedNtilde & ChallengeVerifiers;
    createdBy: string;
}
export type SendNFTOptions = Omit<SendManyOptions, 'recipients' | 'enableTokens' | 'tokenName' | 'txFormat' | 'receiveAddress'>;
export type SendNFTResult = {
    pendingApproval: PendingApprovalData;
};
export type WalletInitResult = {
    success: PrebuildTransactionResult[];
    failure: Error[];
};
export interface IWallet {
    bitgo: BitGoBase;
    baseCoin: IBaseCoin;
    url(extra?: string): string;
    id(): string;
    approvalsRequired(): number;
    balance(): number;
    prebuildWhitelistedParams(): string[];
    prebuildConsolidateAccountParams(): string[];
    confirmedBalance(): number;
    spendableBalance(): number;
    balanceString(): string;
    confirmedBalanceString(): string;
    spendableBalanceString(): string;
    nftBalances(): NftBalance[] | undefined;
    unsupportedNftBalances(): NftBalance[] | undefined;
    coin(): string;
    type(): WalletType;
    subType(): SubWalletType | undefined;
    multisigType(): 'onchain' | 'tss';
    multisigTypeVersion(): 'MPCv2' | undefined;
    label(): string;
    keyIds(): string[];
    receiveAddress(): string | undefined;
    migratedFrom(): string | undefined;
    tokenFlushThresholds(): any;
    coinSpecific(): WalletCoinSpecific | undefined;
    pendingApprovals(): IPendingApproval[];
    refresh(params?: Record<string, never>): Promise<IWallet>;
    transactions(params?: PaginationOptions): Promise<any>;
    getTransaction(params?: GetTransactionOptions): Promise<any>;
    transfers(params?: TransfersOptions): Promise<any>;
    getTransfer(params?: GetTransferOptions): Promise<any>;
    transferBySequenceId(params?: TransferBySequenceIdOptions): Promise<any>;
    maximumSpendable(params?: MaximumSpendableOptions): Promise<MaximumSpendable>;
    unspents(params?: UnspentsOptions): Promise<any>;
    consolidateUnspents(params?: ConsolidateUnspentsOptions): Promise<unknown>;
    fanoutUnspents(params?: FanoutUnspentsOptions): Promise<unknown>;
    updateTokenFlushThresholds(thresholds?: any): Promise<any>;
    updateForwarders(forwarderFlags?: any): Promise<any>;
    deployForwarders(params: DeployForwardersOptions): Promise<any>;
    flushForwarderToken(params: FlushForwarderTokenOptions): Promise<any>;
    getForwarderBalance(params?: ForwarderBalanceOptions): Promise<ForwarderBalance[]>;
    sweep(params?: SweepOptions): Promise<any>;
    freeze(params?: FreezeOptions): Promise<any>;
    transferComment(params?: TransferCommentOptions): Promise<any>;
    addresses(params?: AddressesOptions): Promise<AddressQueryResult>;
    getAddress(params?: GetAddressOptions): Promise<any>;
    createAddress(params?: CreateAddressOptions): Promise<any>;
    updateAddress(params?: UpdateAddressOptions): Promise<any>;
    getAccountResources(params: GetAccountResourcesOptions): Promise<GetAccountResourcesResponse>;
    getResourceDelegations(params?: GetResourceDelegationsOptions): Promise<GetResourceDelegationsResponse>;
    listWebhooks(params?: PaginationOptions): Promise<any>;
    simulateWebhook(params?: SimulateWebhookOptions): Promise<any>;
    addWebhook(params?: ModifyWebhookOptions): Promise<any>;
    removeWebhook(params?: ModifyWebhookOptions): Promise<any>;
    getEncryptedUserKeychain(): Promise<KeychainWithEncryptedPrv>;
    getPrv(params?: GetPrvOptions): Promise<any>;
    createShare(params?: CreateShareOptions): Promise<any>;
    shareWallet(params?: ShareWalletOptions): Promise<any>;
    createBulkKeyShares(params?: BulkCreateShareOption[]): Promise<CreateBulkWalletShareListResponse>;
    createBulkWalletShare(params?: BulkWalletShareOptions): Promise<CreateBulkWalletShareListResponse>;
    removeUser(params?: RemoveUserOptions): Promise<any>;
    prebuildTransaction(params?: PrebuildTransactionOptions): Promise<PrebuildTransactionResult>;
    signTransaction(params?: WalletSignTransactionOptions): Promise<SignedTransaction>;
    getUserPrv(params?: GetUserPrvOptions): string;
    getUserPrvAsync(params?: GetUserPrvOptions): Promise<string>;
    prebuildAndSignTransaction(params?: PrebuildAndSignTransactionOptions): Promise<SignedTransaction>;
    signAndSendTxRequest(params?: SignAndSendTxRequestOptions): Promise<SignedTransaction>;
    accelerateTransaction(params?: AccelerateTransactionOptions): Promise<any>;
    submitTransaction(params?: SubmitTransactionOptions): Promise<any>;
    send(params?: SendOptions): Promise<any>;
    sendMany(params?: SendManyOptions): Promise<any>;
    sendNft(sendOptions: SendNFTOptions, sendNftOptions: Omit<NFTTransferOptions, 'fromAddress'>): Promise<SendNFTResult>;
    recoverToken(params?: RecoverTokenOptions): Promise<any>;
    getFirstPendingTransaction(params?: Record<string, never>): Promise<any>;
    changeFee(params?: ChangeFeeOptions): Promise<any>;
    getPaymentInfo(params?: {
        url?: string;
    }): Promise<any>;
    sendPaymentResponse(params?: any): Promise<any>;
    createPolicyRule(params?: CreatePolicyRuleOptions): Promise<any>;
    setPolicyRule(params?: any): any;
    removePolicyRule(params?: RemovePolicyRuleOptions): Promise<any>;
    remove(params?: Record<string, never>): Promise<any>;
    toJSON(): WalletData;
    createLightningInvoice(params: CreateLightningInvoiceParams): Promise<LightningInvoiceResponse>;
    toTradingAccount(): ITradingAccount;
    toStakingWallet(): IStakingWallet;
    toGoStakingWallet(): IGoStakingWallet;
    toAddressBook(): IAddressBook;
    downloadKeycard(params?: DownloadKeycardOptions): void;
    buildAccountConsolidations(params?: BuildConsolidationTransactionOptions): Promise<PrebuildTransactionResult[]>;
    sendAccountConsolidation(params?: PrebuildAndSignTransactionOptions): Promise<any>;
    sendAccountConsolidations(params?: BuildConsolidationTransactionOptions): Promise<any>;
    buildResourceDelegations(params: BuildResourceDelegationTransactionOptions): Promise<BuildResourceManagementTransactionResult>;
    sendResourceDelegation(params: PrebuildAndSignTransactionOptions): Promise<ResourceManagementSendResult>;
    sendResourceDelegations(params: BuildResourceDelegationTransactionOptions): Promise<{
        success: ResourceManagementSendResult[];
        failure: {
            message: string;
            receiverAddress?: string;
        }[];
    }>;
    buildResourceUndelegations(params: BuildResourceUndelegationTransactionOptions): Promise<BuildResourceManagementTransactionResult>;
    sendResourceUndelegation(params: PrebuildAndSignTransactionOptions): Promise<ResourceManagementSendResult>;
    sendResourceUndelegations(params: BuildResourceUndelegationTransactionOptions): Promise<{
        success: ResourceManagementSendResult[];
        failure: {
            message: string;
            receiverAddress?: string;
        }[];
    }>;
    buildTokenEnablements(params?: BuildTokenEnablementOptions): Promise<PrebuildTransactionResult[]>;
    sendTokenEnablement(params?: PrebuildAndSignTransactionOptions): Promise<any>;
    sendTokenEnablements(params?: BuildTokenEnablementOptions): Promise<any>;
    buildWalletInitialization(params?: PrebuildTransactionOptions): Promise<PrebuildTransactionResult>;
    sendWalletInitialization(params?: PrebuildTransactionOptions): Promise<WalletInitResult>;
    signMessage(params: WalletSignMessageOptions): Promise<SignedMessage>;
    buildSignMessageRequest(params: WalletSignMessageOptions): Promise<TxRequest>;
    signTypedData(params: WalletSignTypedDataOptions): Promise<SignedMessage>;
    fetchCrossChainUTXOs(params: FetchCrossChainUTXOsOptions): Promise<CrossChainUTXO[]>;
    getChallengesForEcdsaSigning(): Promise<WalletEcdsaChallenges>;
    getNftBalances(): Promise<NftBalance[]>;
    approveErc20Token(walletPassphrase: string, tokenName: string): Promise<SubmitTransactionResponse>;
    buildErc20TokenApproval(tokenName: string, walletPassphrase?: string): Promise<BuildTokenApprovalResponse | SubmitTransactionResponse>;
}
export {};
//# sourceMappingURL=iWallet.d.ts.map