PHP WebShell

Текущая директория: /opt/BitGoJS/modules/abstract-eth/dist/src

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

/**
 * @prettier
 */
import type * as EthLikeCommon from '@ethereumjs/common';
import { CoinFamily, BaseCoin as StaticsBaseCoin } from '@bitgo/statics';
import { BaseCoin, BitGoBase, FullySignedTransaction, HalfSignedAccountTransaction, KeyPair, ParsedTransaction, ParseTransactionOptions, SignTransactionOptions, TransactionExplanation, TransactionFee, TransactionPrebuild as BaseTransactionPrebuild, TransactionRecipient as Recipient, VerifyTransactionOptions } from '@bitgo/sdk-core';
import { TransactionBuilder } from './lib';
import { VerifyEthAddressOptions } from './abstractEthLikeNewCoins';
export interface EthSignTransactionOptions extends SignTransactionOptions {
    txPrebuild: TransactionPrebuild;
    prv: string;
}
export interface TxInfo {
    recipients: Recipient[];
    from: string;
    txid: string;
}
interface TransactionPrebuild extends BaseTransactionPrebuild {
    txHex?: string;
    txInfo: TxInfo;
    feeInfo: EthTransactionFee;
    source: string;
    dataToSign: string;
    nextContractSequenceId?: number;
    expireTime?: number;
}
export interface EthTransactionFee {
    fee: string;
    gasLimit?: string;
}
export interface ExplainTransactionOptions {
    txHex?: string;
    halfSigned?: {
        txHex: string;
    };
    feeInfo: TransactionFee;
    common?: EthLikeCommon.default;
}
export interface HalfSignedEthLikeTransaction extends HalfSignedAccountTransaction {
    halfSigned?: {
        txHex?: never;
        recipients: Recipient[];
        expiration?: number;
    };
}
export type SignedEthLikeTransaction = HalfSignedEthLikeTransaction | FullySignedTransaction;
export declare abstract class AbstractEthLikeCoin extends BaseCoin {
    protected readonly _staticsCoin: Readonly<StaticsBaseCoin>;
    protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
    getChain(): string;
    /**
     * Get the base chain that the coin exists on.
     */
    getBaseChain(): string;
    getFamily(): CoinFamily;
    getFullName(): string;
    getBaseFactor(): number;
    /** @inheritDoc */
    isEVM(): boolean;
    valuelessTransferAllowed(): boolean;
    /**
     * Check if the address is a valid eth address.
     */
    isValidAddress(address: string): boolean;
    generateKeyPair(seed?: Buffer): KeyPair;
    parseTransaction(params: ParseTransactionOptions): Promise<ParsedTransaction>;
    isWalletAddress(params: VerifyEthAddressOptions): Promise<boolean>;
    verifyTransaction(params: VerifyTransactionOptions): Promise<boolean>;
    signTransaction(params: EthSignTransactionOptions): Promise<SignedEthLikeTransaction>;
    isValidPub(pub: string): boolean;
    /**
     * Builds a funds recovery transaction without BitGo.
     * We need to do three queries during this:
     * 1) Node query - how much money is in the account
     * 2) Build transaction - build our transaction for the amount
     * 3) Send signed build - send our signed build to a public node
     * @param params The options with which to recover
     */
    recover(params: any): Promise<any>;
    /**
     * Explain a transaction from txHex
     * @param params The options with which to explain the transaction
     */
    explainTransaction(params: ExplainTransactionOptions): Promise<TransactionExplanation>;
    /**
     * Create a new transaction builder for the current chain
     * @return a new transaction builder
     */
    protected abstract getTransactionBuilder(common?: EthLikeCommon.default): TransactionBuilder;
}
export {};
//# sourceMappingURL=abstractEthLikeCoin.d.ts.map

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


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