import { BigNumber } from '@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber'; import { Address, AirGapProtocol, AirGapTransaction, AirGapTransactionStatus, AirGapTransactionsWithCursor, Amount, Balance, CryptoDerivative, ExtendedKeyPair, ExtendedPublicKey, ExtendedSecretKey, FeeDefaults, KeyPair, ProtocolMetadata, ProtocolUnitsMetadata, PublicKey, SecretKey, Signature, TokenDetails, TransactionFullConfiguration, TransactionDetails, TransactionSimpleConfiguration, WalletConnectRequest } from '@airgap/module-kit'; import { EthereumCryptoClient } from '../clients/crypto/EthereumCryptoClient'; import { EthereumInfoClient } from '../clients/info/EthereumInfoClient'; import { EthereumNodeClient } from '../clients/node/EthereumNodeClient'; import { EthereumCryptoConfiguration } from '../types/crypto'; import { EthereumBaseProtocolOptions, EthereumProtocolNetwork, EthereumProtocolOptions, EthereumUnits } from '../types/protocol'; import { EthereumRawUnsignedTransaction, EthereumSignedTransaction, EthereumTransactionCursor, EthereumTypedUnsignedTransaction, EthereumUnsignedTransaction } from '../types/transaction'; export interface EthereumBaseProtocol<_Units extends string = EthereumUnits, _ProtocolNetwork extends EthereumProtocolNetwork = EthereumProtocolNetwork> extends AirGapProtocol<{ AddressResult: Address; ProtocolNetwork: _ProtocolNetwork; CryptoConfiguration: EthereumCryptoConfiguration; Units: _Units; FeeUnits: EthereumUnits; FeeEstimation: FeeDefaults; SignedTransaction: EthereumSignedTransaction; UnsignedTransaction: EthereumUnsignedTransaction; TransactionCursor: EthereumTransactionCursor; }, 'Bip32', 'Crypto', 'FetchDataForAddress', 'FetchDataForMultipleAddresses', 'GetTokenBalances', 'TransactionStatusChecker', 'WalletConnect'> { } export declare const DEFAULT_ETHEREUM_UNITS_METADATA: ProtocolUnitsMetadata; export declare class EthereumBaseProtocolImpl<_Units extends string = EthereumUnits, _ProtocolNetwork extends EthereumProtocolNetwork = EthereumProtocolNetwork> implements EthereumBaseProtocol<_Units, _ProtocolNetwork> { protected readonly options: EthereumProtocolOptions<_ProtocolNetwork>; protected readonly nodeClient: EthereumNodeClient; protected readonly infoClient: EthereumInfoClient; protected readonly cryptoClient: EthereumCryptoClient; protected readonly bitcoinJS: { lib: any; config: { network: any; }; }; constructor(nodeClient: EthereumNodeClient, infoClient: EthereumInfoClient, options: EthereumBaseProtocolOptions<_Units, _ProtocolNetwork>); readonly units: ProtocolUnitsMetadata<_Units>; readonly feeUnits: ProtocolUnitsMetadata; protected readonly feeDefaults: FeeDefaults; protected readonly metadata: ProtocolMetadata<_Units, EthereumUnits>; getMetadata(): Promise>; getAddressFromPublicKey(publicKey: PublicKey | ExtendedPublicKey): Promise; deriveFromExtendedPublicKey(extendedPublicKey: ExtendedPublicKey, visibilityIndex: number, addressIndex: number): Promise; getDetailsFromTransaction(transaction: EthereumSignedTransaction | EthereumUnsignedTransaction, publicKey: PublicKey | ExtendedPublicKey): Promise[]>; private getDetailsFromTransactionWithPublicKey; private getDetailsFromTransactionWithExtendedPublicKey; protected getDetailsFromSignedTransaction(transaction: EthereumSignedTransaction): Promise[]>; protected getDetailsFromTypedUnsignedTransaction(transaction: EthereumTypedUnsignedTransaction, ownAddress: string): Promise[]>; protected getDetailsFromRawUnsignedTransaction(transaction: EthereumRawUnsignedTransaction, ownAddress: string): Promise[]>; verifyMessageWithPublicKey(message: string, signature: Signature, publicKey: PublicKey | ExtendedPublicKey): Promise; encryptAsymmetricWithPublicKey(payload: string, publicKey: PublicKey | ExtendedPublicKey): Promise; private readonly cryptoConfiguration; getCryptoConfiguration(): Promise; getKeyPairFromDerivative(derivative: CryptoDerivative): Promise; getExtendedKeyPairFromDerivative(derivative: CryptoDerivative): Promise; deriveFromExtendedSecretKey(extendedSecretKey: ExtendedSecretKey, visibilityIndex: number, addressIndex: number): Promise; signTransactionWithSecretKey(transaction: EthereumUnsignedTransaction, secretKey: SecretKey | ExtendedSecretKey): Promise; private signTypedUnsignedTransactionWithSecretKey; private signRawUnsignedTransactionWithSecretKey; private signTypedTransactionWithSecretKey; signMessageWithKeyPair(message: string, keyPair: KeyPair | ExtendedKeyPair): Promise; decryptAsymmetricWithKeyPair(payload: string, keyPair: KeyPair | ExtendedKeyPair): Promise; encryptAESWithSecretKey(payload: string, secretKey: SecretKey | ExtendedSecretKey): Promise; decryptAESWithSecretKey(payload: string, secretKey: SecretKey | ExtendedSecretKey): Promise; getNetwork(): Promise<_ProtocolNetwork>; getTransactionsForPublicKey(publicKey: PublicKey | ExtendedPublicKey, limit: number, cursor?: EthereumTransactionCursor): Promise>; getTransactionsForAddress(address: string, limit: number, cursor?: EthereumTransactionCursor): Promise>; getTransactionsForAddresses(addresses: string[], limit: number, cursor?: EthereumTransactionCursor): Promise>; getTransactionStatus(transactionIds: string[]): Promise>; getBalanceOfPublicKey(publicKey: PublicKey | ExtendedPublicKey): Promise>; getBalanceOfAddress(address: string): Promise>; getBalanceOfAddresses(addresses: string[]): Promise>; getTokenBalancesOfPublicKey(publicKey: PublicKey | ExtendedPublicKey, tokens: TokenDetails[]): Promise>; getTransactionMaxAmountWithPublicKey(publicKey: PublicKey | ExtendedPublicKey, to: string[], configuration?: TransactionFullConfiguration): Promise>; getTransactionFeeWithPublicKey(publicKey: PublicKey | ExtendedPublicKey, details: TransactionDetails<_Units>[], configuration?: TransactionSimpleConfiguration): Promise>; prepareTransactionWithPublicKey(publicKey: PublicKey | ExtendedPublicKey, details: TransactionDetails<_Units>[], configuration?: TransactionFullConfiguration): Promise; getWalletConnectChain(): Promise; prepareWalletConnectTransactionWithPublicKey(publicKey: PublicKey | ExtendedPublicKey, request: WalletConnectRequest): Promise; broadcastTransaction(transaction: EthereumSignedTransaction): Promise; private nonExtendedPublicKey; private nonExtendedSecretKey; private getPublicKeyFromExtendedPublicKey; private getSecretKeyFromExtendedSecretKey; private deriveNode; protected estimateGas(fromAddress: string, toAddress: string, amount: string | number | BigNumber | Amount<_Units>, data?: string): Promise; private derivativeToBip32Node; } export declare abstract class DefaultEthereumBaseProtocolImpl extends EthereumBaseProtocolImpl { protected constructor(nodeClient: EthereumNodeClient, infoClient: EthereumInfoClient, options: EthereumProtocolOptions & Partial); }