PHP WebShell

Текущая директория: /var/www/bitcardoApp/node_modules/tronweb/lib/esm/lib/contract

Просмотр файла: method.d.ts

import { TronWeb } from '../../tronweb.js';
import { Contract } from './index.js';
export interface CallOptions {
    feeLimit?: number;
    callValue?: number;
    tokenValue?: number;
    tokenId?: string;
    from?: string | false;
}
interface _CallOptions extends CallOptions {
    rawParameter?: string;
    _isConstant?: boolean;
}
export interface SendOptions {
    from?: string | false;
    feeLimit?: number;
    callValue?: number;
    tokenValue?: number;
    tokenId?: string;
    shouldPollResponse?: boolean;
    pollTimes?: number;
    rawResponse?: boolean;
    keepTxID?: boolean;
}
interface _SendOptions extends SendOptions {
    rawParameter?: string;
}
import type { FunctionFragment, FallbackFragment, ReceiveFragment, EventFragment, AbiInputsType, AbiOutputsType, GetParamsType, GetOutputsType, AbiParamsCommon } from '../../types/ABI.js';
import { TransactionInfo } from '../../types/Trx.js';
export type AbiFragmentNoErrConstructor = FunctionFragment | EventFragment | FallbackFragment | ReceiveFragment;
type OutputType<T extends Readonly<AbiFragmentNoErrConstructor>> = T extends FunctionFragment ? GetOutputsType<T['outputs']> : any;
type _CallAndSendReturn<AbiFrag> = AbiFrag extends FunctionFragment ? AbiFrag['outputs'] extends ReadonlyArray<AbiParamsCommon> ? AbiFrag['outputs']['length'] extends 1 ? AbiFrag['outputs'][0]['name'] extends '' ? OutputType<AbiFrag>[0] : AbiFrag['outputs'][0]['name'] extends 'length' ? OutputType<AbiFrag>[0] : OutputType<AbiFrag> : OutputType<AbiFrag> : [] : any;
export declare class Method<AbiFrag extends Readonly<AbiFragmentNoErrConstructor>> {
    tronWeb: TronWeb;
    contract: Contract;
    abi: AbiFrag;
    name: string;
    inputs: AbiInputsType;
    outputs: AbiOutputsType;
    functionSelector: string | null;
    signature: string;
    defaultOptions: {
        feeLimit: number;
        callValue: number;
        shouldPollResponse: boolean;
    };
    constructor(contract: Contract, abi: AbiFrag);
    decodeInput(data: string): any;
    onMethod(...args: GetParamsType<AbiFrag['inputs']>): {
        call: (options?: CallOptions) => Promise<_CallAndSendReturn<AbiFrag>>;
        send: <__SendOptions extends Readonly<SendOptions>>(options?: __SendOptions, privateKey?: string | false) => Promise<__SendOptions["shouldPollResponse"] extends true ? __SendOptions["rawResponse"] extends true ? TransactionInfo : __SendOptions["keepTxID"] extends true ? [string, _CallAndSendReturn<AbiFrag>] : _CallAndSendReturn<AbiFrag> : string>;
    };
    _call(types: [], args: [], options?: _CallOptions): Promise<OutputType<AbiFrag>>;
    _send(types: [], args: [], options?: _SendOptions, privateKey?: string | false): Promise<any>;
}
export {};

Выполнить команду


Для локальной разработки. Не используйте в интернете!