UNPKG

@biconomy-devx/ethers-lib

Version:

Ethers library adapter to be used by Biconomy SDK

25 lines (24 loc) 1.52 kB
import { BigNumber } from '@ethersproject/bignumber'; import { SmartAccountVersion, SmartWalletContract, IWalletTransaction, ExecTransaction, IFeeRefundV1_0_1, ITransactionResult } from '@biconomy-devx/core-types'; import { SmartWalletContract_v1_0_0 as SmartWalletContract_TypeChain } from '../../../../typechain/src/ethers-v5/v1.0.0/SmartWalletContract_v1_0_0'; import { SmartWalletContract_v1_0_0Interface as SmartWalletContractV100Interface } from '../../../../typechain/src/ethers-v5/v1.0.0/SmartWalletContract_v1_0_0'; import { Interface } from 'ethers/lib/utils'; import { Contract } from '@ethersproject/contracts'; import { BytesLike } from 'ethers'; declare class SmartWalletContractEthers implements SmartWalletContract { contract: SmartWalletContract_TypeChain; constructor(contract: SmartWalletContract_TypeChain); getInterface(): Interface; getContract(): Contract; getAddress(): string; setAddress(address: string): void; getOwner(): Promise<string>; getVersion(): Promise<SmartAccountVersion>; getNonce(batchId: number): Promise<BigNumber>; nonce(): Promise<BigNumber>; isValidSignature(_dataHash: string, _signature: string): Promise<BytesLike>; getTransactionHash(smartAccountTrxData: IWalletTransaction): Promise<string>; execTransaction(_tx: ExecTransaction, refundInfo: IFeeRefundV1_0_1, signatures: string): Promise<ITransactionResult>; encode: SmartWalletContractV100Interface['encodeFunctionData']; } export default SmartWalletContractEthers;