UNPKG

@wormhole-foundation/sdk-evm

Version:

SDK for EVM chains, used in conjunction with @wormhole-foundation/sdk

24 lines 1.39 kB
import type { Network, SignOnlySigner, SignedTx, Signer, UnsignedTransaction } from '@wormhole-foundation/sdk-connect'; import { PlatformNativeSigner } from '@wormhole-foundation/sdk-connect'; import type { Signer as EthersSigner, Provider, TransactionRequest } from 'ethers'; import type { EvmChains } from './types.js'; export type EvmSignerOptions = { debug?: boolean; gasLimit?: bigint; maxGasLimit?: bigint; overrides?: Partial<TransactionRequest>; }; export declare function getEvmSigner(rpc: Provider, key: string | EthersSigner, opts?: EvmSignerOptions & { chain?: EvmChains; }): Promise<Signer>; export declare function getEvmSignerForKey(rpc: Provider, privateKey: string): Promise<Signer>; export declare function getEvmSignerForSigner(signer: EthersSigner): Promise<Signer>; export declare class EvmNativeSigner<N extends Network, C extends EvmChains = EvmChains> extends PlatformNativeSigner<EthersSigner, N, C> implements SignOnlySigner<N, C> { readonly opts?: EvmSignerOptions | undefined; constructor(_chain: C, _address: string, _signer: EthersSigner, opts?: EvmSignerOptions | undefined); chain(): C; address(): string; sign(tx: UnsignedTransaction<N, C>[]): Promise<SignedTx[]>; } export declare function isEvmNativeSigner<N extends Network>(signer: Signer<N>): signer is EvmNativeSigner<N>; //# sourceMappingURL=signer.d.ts.map