import { TypedTransaction } from '@ethereumjs/tx'; import { PrefixedHexString } from 'ethereumjs-util'; import { Address } from '@opengsn/common'; export declare enum ServerAction { REGISTER_SERVER = 0, ADD_WORKER = 1, RELAY_CALL = 2, VALUE_TRANSFER = 3, DEPOSIT_WITHDRAWAL = 4, PENALIZATION = 5, SET_OWNER = 6, AUTHORIZE_HUB = 7 } export interface StoredTransactionMetadata { readonly from: Address; readonly attempts: number; readonly serverAction: ServerAction; readonly creationBlock: ShortBlockInfo; readonly boostBlock?: ShortBlockInfo; readonly minedBlock?: ShortBlockInfo; } export interface StoredTransactionSerialized { readonly to: Address; readonly gas: number; maxFeePerGas: number; maxPriorityFeePerGas: number; readonly data: PrefixedHexString; readonly nonce: number; readonly txId: PrefixedHexString; readonly value: PrefixedHexString; readonly rawSerializedTx: PrefixedHexString; } export interface NonceSigner { nonceSigner?: { nonce: number; signer: Address; }; } export interface ShortBlockInfo { hash: PrefixedHexString; number: number; timestamp: number | string; } export declare type StoredTransaction = StoredTransactionSerialized & StoredTransactionMetadata & NonceSigner; /** * Make sure not to pass {@link StoredTransaction} as {@param metadata}, as it will override fields from {@param tx}! * @param tx * @param metadata */ export declare function createStoredTransaction(tx: TypedTransaction, metadata: StoredTransactionMetadata): StoredTransaction;