import type { Multiaddr } from '@multiformats/multiaddr'; import { providers, type ContractTransaction } from 'ethers'; import { Address, Balance, PublicKey, type AcknowledgedTicket, type DeferType, type Hash } from '@hoprnet/hopr-utils'; import { type TransactionPayload } from './transaction-manager.js'; import { HoprChannels, HoprNetworkRegistry, HoprToken, DeploymentExtract } from './utils/index.js'; export type Receipt = string; export type ChainWrapper = Awaited>; export declare enum SendTransactionStatus { SUCCESS = "SUCCESS", DUPLICATE = "DUPLICATE" } export type SendTransactionReturn = { code: SendTransactionStatus.SUCCESS; tx: Partial; } | { code: SendTransactionStatus.DUPLICATE; }; export declare function createChainWrapper(deploymentExtract: DeploymentExtract, networkInfo: { provider: string; chainId: number; maxFeePerGas: string; maxPriorityFeePerGas: string; network: string; environment: string; }, privateKey: Uint8Array, checkDuplicate?: Boolean, txTimeout?: number): Promise<{ getBalance: (accountAddress: Address) => Promise; getNativeBalance: (accountAddress: Address) => Promise; getTransactionsInBlock: (blockNumber: number) => Promise; getTimestamp: (blockNumber: number) => Promise; announce: (multiaddr: Multiaddr, txHandler: (tx: string) => DeferType) => Promise; withdraw: (currency: 'NATIVE' | 'HOPR', recipient: string, amount: string, txHandler: (tx: string) => DeferType) => Promise; fundChannel: (partyA: Address, partyB: Address, fundsA: Balance, fundsB: Balance, txHandler: (tx: string) => DeferType) => Promise; finalizeChannelClosure: (counterparty: Address, txHandler: (tx: string) => DeferType) => Promise; initiateChannelClosure: (counterparty: Address, txHandler: (tx: string) => DeferType) => Promise; redeemTicket: (counterparty: Address, ackTicket: AcknowledgedTicket, txHandler: (tx: string) => DeferType) => Promise; getGenesisBlock: () => number; setCommitment: (counterparty: Address, commitment: Hash, txHandler: (tx: string) => DeferType) => Promise; sendTransaction: (checkDuplicate: Boolean, essentialTxPayload: TransactionPayload, handleTxListener: (tx: string) => DeferType) => Promise; waitUntilReady: () => Promise; getLatestBlockNumber: () => Promise; subscribeBlock: (cb: (blockNumber: number) => void | Promise) => (() => void); subscribeError: (cb: (err: any) => void | Promise) => (() => void); unsubscribe: () => void; getChannels: () => HoprChannels; getToken: () => HoprToken; getNetworkRegistry: () => HoprNetworkRegistry; getPrivateKey: () => Uint8Array; getPublicKey: () => PublicKey; getInfo: () => { network: string; hoprTokenAddress: string; hoprChannelsAddress: string; hoprNetworkRegistryAddress: string; channelClosureSecs: number; }; updateConfirmedTransaction: (hash: string) => void; getAllUnconfirmedHash: () => string[]; getAllQueuingTransactionRequests: () => providers.TransactionRequest[]; }>; //# sourceMappingURL=ethereum.d.ts.map