/** * @prettier */ import type * as EthLikeCommon from '@ethereumjs/common'; import { CoinFamily, BaseCoin as StaticsBaseCoin } from '@bitgo/statics'; import { AuditDecryptedKeyParams, 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; protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly); getChain(): string; /** * Get the base chain that the coin exists on. */ getBaseChain(): string; getFamily(): CoinFamily; getFullName(): string; getBaseFactor(): number; getChainId(): 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; isWalletAddress(params: VerifyEthAddressOptions): Promise; verifyTransaction(params: VerifyTransactionOptions): Promise; signTransaction(params: EthSignTransactionOptions): Promise; 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; /** * Explain a transaction from txHex * @param params The options with which to explain the transaction */ explainTransaction(params: ExplainTransactionOptions): Promise; /** @inheritDoc */ getSignablePayload(serializedTx: string): Promise; /** * Create a new transaction builder for the current chain * @return a new transaction builder */ protected abstract getTransactionBuilder(common?: EthLikeCommon.default): TransactionBuilder; /** @inheritDoc */ auditDecryptedKey({ multiSigType, publicKey, prv }: AuditDecryptedKeyParams): void; } export {}; //# sourceMappingURL=abstractEthLikeCoin.d.ts.map