/// import { Account, AddressString, Attribute, AttributeModel, Block, ClaimTransaction, ContractTransaction, GetOptions, Hash256String, Input, InputModel, InputOutput, InvocationTransaction, InvocationTransactionModel, InvokeSendUnsafeReceiveTransactionOptions, IterOptions, NetworkType, Output, OutputModel, Param, ParamJSON, RawAction, RawCallReceipt, RawInvocationData, RawInvokeReceipt, ScriptBuilderParam, SourceMaps, Transaction, TransactionBaseModel, TransactionOptions, TransactionReceipt, TransactionResult, Transfer, UserAccount, UserAccountID, Witness, WitnessModel } from '@neo-one/client-common'; import BigNumber from 'bignumber.js'; import { Observable } from 'rxjs'; export interface InvokeMethodOptions { readonly contract: AddressString; readonly params: ReadonlyArray; readonly invokeMethod: string; } export interface InvokeRawOptions { readonly invokeMethodOptionsOrScript: InvokeMethodOptions | Buffer; readonly transfers?: readonly FullTransfer[]; readonly options?: TransactionOptions; readonly verify?: boolean; readonly onConfirm: (options: { readonly transaction: Transaction; readonly data: RawInvocationData; readonly receipt: TransactionReceipt; }) => Promise | T; readonly method: string; readonly scripts?: readonly WitnessModel[]; readonly labels?: Record; readonly rawInputs?: readonly Input[]; readonly rawOutputs?: readonly Output[]; readonly sourceMaps?: SourceMaps; readonly reorderOutputs?: (outputs: readonly Output[]) => readonly Output[]; } export interface ExecuteInvokeScriptOptions { readonly script: Buffer; readonly from: UserAccountID; readonly attributes: readonly Attribute[]; readonly inputs: readonly InputOutput[]; readonly outputs: readonly Output[]; readonly rawInputs: readonly Input[]; readonly rawOutputs: readonly Output[]; readonly gas: BigNumber; readonly scripts: readonly WitnessModel[]; readonly verify: boolean; readonly reorderOutputs: (outputs: readonly Output[]) => readonly Output[]; readonly onConfirm: (options: { readonly transaction: Transaction; readonly data: RawInvocationData; readonly receipt: TransactionReceipt; }) => Promise | T; readonly sourceMaps?: SourceMaps; } export interface ExecuteInvokeMethodOptions extends ExecuteInvokeScriptOptions { readonly invokeMethodOptions: InvokeMethodOptions; } export interface ExecuteInvokeClaimOptions { readonly contract: AddressString; readonly inputs: readonly InputOutput[]; readonly outputs: readonly Output[]; readonly unclaimed: readonly Input[]; readonly amount: BigNumber; readonly attributes: readonly Attribute[]; readonly method: string; readonly params: ReadonlyArray; readonly paramsZipped: ReadonlyArray; readonly from: UserAccountID; readonly sourceMaps?: SourceMaps; } export interface Provider { readonly networks$: Observable; readonly getNetworks: () => readonly NetworkType[]; readonly getUnclaimed: (network: NetworkType, address: AddressString) => Promise<{ readonly unclaimed: readonly Input[]; readonly amount: BigNumber; }>; readonly getUnspentOutputs: (network: NetworkType, address: AddressString) => Promise; readonly getTransactionReceipt: (network: NetworkType, hash: Hash256String, options?: GetOptions) => Promise; readonly getInvocationData: (network: NetworkType, hash: Hash256String) => Promise; readonly testInvoke: (network: NetworkType, transaction: InvocationTransactionModel) => Promise; readonly call: (network: NetworkType, contract: AddressString, method: string, params: ReadonlyArray) => Promise; readonly getBlockCount: (network: NetworkType) => Promise; readonly getTransaction: (network: NetworkType, hash: Hash256String) => Promise; readonly getOutput: (network: NetworkType, input: Input) => Promise; readonly iterBlocks: (network: NetworkType, options?: IterOptions) => AsyncIterable; readonly getAccount: (network: NetworkType, address: AddressString) => Promise; readonly iterActionsRaw?: (network: NetworkType, options?: IterOptions) => AsyncIterable; } interface TransactionOptionsFull { readonly from: UserAccountID; readonly attributes: readonly Attribute[]; readonly networkFee: BigNumber; readonly systemFee: BigNumber; readonly skipSysFeeCheck: boolean; } interface FullTransfer extends Transfer { readonly from: UserAccountID; } export declare abstract class UserAccountProviderBase { readonly provider: TProvider; readonly iterActionsRaw?: (network: NetworkType, options?: IterOptions) => AsyncIterable; protected readonly mutableUsedOutputs: Set; protected mutableBlockCount: number; constructor({ provider }: { readonly provider: TProvider; }); getCurrentUserAccount(): UserAccount | undefined; getUserAccounts(): readonly UserAccount[]; getNetworks(): readonly NetworkType[]; selectUserAccount(_id?: UserAccountID): Promise; iterBlocks(network: NetworkType, options?: IterOptions): AsyncIterable; getBlockCount(network: NetworkType): Promise; getAccount(network: NetworkType, address: AddressString): Promise; transfer(transfers: readonly Transfer[], options?: TransactionOptions): Promise>; claim(options?: TransactionOptions): Promise>; invoke(contract: AddressString, method: string, params: ReadonlyArray, paramsZipped: ReadonlyArray, verify: boolean, options?: InvokeSendUnsafeReceiveTransactionOptions, sourceMaps?: SourceMaps): Promise>; invokeSend(contract: AddressString, method: string, paramsIn: ReadonlyArray, paramsZipped: ReadonlyArray, transfer: Transfer, options?: TransactionOptions, sourceMaps?: SourceMaps): Promise>; invokeCompleteSend(contract: AddressString, method: string, params: ReadonlyArray, paramsZipped: ReadonlyArray, hash: Hash256String, options?: TransactionOptions, sourceMaps?: SourceMaps): Promise>; invokeRefundAssets(contract: AddressString, method: string, params: ReadonlyArray, paramsZipped: ReadonlyArray, hash: Hash256String, options?: TransactionOptions, sourceMaps?: SourceMaps): Promise>; invokeClaim(contract: AddressString, method: string, params: ReadonlyArray, paramsZipped: ReadonlyArray, options?: TransactionOptions, sourceMaps?: SourceMaps): Promise>; call(network: NetworkType, contract: AddressString, method: string, params: ReadonlyArray): Promise; protected getTransactionOptions(options?: TransactionOptions): TransactionOptionsFull; protected getInvokeAttributes(contract: AddressString, method: string, paramsZipped: ReadonlyArray, verify: boolean, from?: AddressString): readonly Attribute[]; protected getInvokeScripts(method: string, params: ReadonlyArray, verify: boolean): readonly WitnessModel[]; protected consolidate({ inputs, transactionUnsignedIn, from, byteLimit, }: { readonly transactionUnsignedIn: TransactionBaseModel; readonly inputs: readonly InputOutput[]; readonly from: UserAccountID; readonly byteLimit: number; }): Promise; protected addWitness({ transaction, inputOutputs, address, witness, }: { readonly transaction: TransactionBaseModel; readonly inputOutputs: readonly Output[]; readonly address: AddressString; readonly witness: WitnessModel; }): TransactionBaseModel; protected getUnspentOutputs({ from, }: { readonly from: UserAccountID; }): Promise<{ readonly unspentOutputs: readonly InputOutput[]; readonly wasFiltered: boolean; }>; protected getTransfersInputOutputs({ transfers, from, gas, }: { readonly transfers: readonly FullTransfer[]; readonly from: UserAccountID; readonly gas: BigNumber; }): Promise<{ readonly outputs: readonly Output[]; readonly inputs: readonly InputOutput[]; }>; protected getTransfersInputOutputsFrom({ transfers, from, }: { readonly transfers: readonly Transfer[]; readonly from: UserAccountID; }): Promise<{ readonly outputs: readonly Output[]; readonly inputs: readonly InputOutput[]; }>; protected getTransferInputOutputs({ to, amount: originalAmount, asset, remainingOutputs, remaining, wasFiltered, }: { readonly from: AddressString; readonly to?: AddressString; readonly amount: BigNumber; readonly asset: Hash256String; readonly remainingOutputs: readonly InputOutput[]; readonly remaining: BigNumber; readonly wasFiltered: boolean; }): { readonly inputs: readonly InputOutput[]; readonly outputs: readonly Output[]; readonly remainingOutputs: readonly InputOutput[]; readonly remaining: BigNumber; }; protected getInvokeAttributeTag(contract: AddressString, method: string, paramsZipped: ReadonlyArray): string; protected paramToJSON(param: Param): ParamJSON | undefined; protected convertAttributes(attributes: readonly Attribute[]): readonly AttributeModel[]; protected convertInputs(inputs: readonly Input[]): readonly InputModel[]; protected convertOutputs(outputs: readonly Output[]): readonly OutputModel[]; protected convertWitness(script: Witness): WitnessModel; protected capture(func: () => Promise, { name, labels, invoke, }: { readonly name: string; readonly labels?: Record; readonly invoke?: boolean; }): Promise; protected checkSystemFees({ script, transfers, from, networkFee, systemFee, attributes: attributesIn, rawInputs, rawOutputs, scripts, sourceMaps, reorderOutputs, skipSysFeeCheck, }: { readonly script: Buffer; readonly transfers?: ReadonlyArray; readonly from: UserAccountID; readonly networkFee: BigNumber; readonly systemFee: BigNumber; readonly attributes?: ReadonlyArray; readonly rawInputs?: ReadonlyArray; readonly rawOutputs?: ReadonlyArray; readonly scripts?: ReadonlyArray; readonly sourceMaps?: SourceMaps; readonly reorderOutputs?: (outputs: ReadonlyArray) => ReadonlyArray; readonly skipSysFeeCheck?: boolean; }): Promise<{ readonly gas: BigNumber; readonly attributes: ReadonlyArray; }>; protected abstract executeInvokeMethod(options: ExecuteInvokeMethodOptions): Promise>; protected abstract executeInvokeScript(options: ExecuteInvokeScriptOptions): Promise>; protected abstract executeInvokeClaim(options: ExecuteInvokeClaimOptions): Promise>; protected abstract executeTransfer(transfers: readonly Transfer[], from: UserAccountID, attributes: readonly Attribute[], networkFee: BigNumber): Promise>; protected abstract executeClaim(from: UserAccountID, attributes: readonly Attribute[], networkFee: BigNumber): Promise>; protected invokeRaw({ invokeMethodOptionsOrScript, transfers, options, onConfirm, method, verify, scripts, labels, rawInputs, rawOutputs, sourceMaps, reorderOutputs, }: InvokeRawOptions): Promise>; private getScriptAndInvokeMethodOptions; } export {};