@tetherto/wdk-wallet-evm 1.0.0-beta.21 → 1.0.0-beta.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -21,7 +21,6 @@
21
21
  /** @typedef {import('ethers').TransactionReceipt} EvmTransactionReceipt */
22
22
  /** @typedef {import('ethers').TransactionResponse} EvmTransactionResponse */
23
23
  /** @typedef {import('ethers').TransactionRequest} EvmTransactionRequest */
24
- /** @typedef {import('ethers').BlobLike} BlobLike */
25
24
 
26
25
  /** @typedef {import('@tetherto/wdk-wallet').FeeRates} FeeRates */
27
26
  /** @typedef {import('@tetherto/wdk-wallet').KeyPair} KeyPair */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tetherto/wdk-wallet-evm",
3
- "version": "1.0.0-beta.21",
3
+ "version": "1.0.0-beta.22",
4
4
  "description": "EVM wallet module for WDK (Wallet Development Kit) by Tether.",
5
5
  "homepage": "https://docs.wdk.tether.io/sdk/wallet-modules/wallet-evm/",
6
6
  "keywords": [
@@ -21,6 +21,9 @@ import {
21
21
 
22
22
  import * as secp256k1 from '@noble/secp256k1'
23
23
 
24
+ // eslint-disable-next-line camelcase
25
+ import { sodium_memzero } from 'sodium-universal'
26
+
24
27
  import MemorySafeSigningKey from './signing-key.js'
25
28
 
26
29
  const MasterSecret = new Uint8Array([66, 105, 116, 99, 111, 105, 110, 32, 115, 101, 101, 100])
@@ -191,7 +194,11 @@ export default class MemorySafeHDNodeWallet extends BaseWallet {
191
194
  const I = getBytes(computeHmac('sha512', MasterSecret, seed))
192
195
  const signingKey = new MemorySafeSigningKey(I.slice(0, 32))
193
196
 
194
- return new MemorySafeHDNodeWallet(_guard, signingKey, '0x00000000', hexlify(I.slice(32)),
197
+ const root = new MemorySafeHDNodeWallet(_guard, signingKey, '0x00000000', hexlify(I.slice(32)),
195
198
  'm', 0, 0, mnemonic, null)
199
+
200
+ sodium_memzero(I)
201
+
202
+ return root
196
203
  }
197
204
  }
@@ -17,6 +17,9 @@ import * as bip39 from 'bip39'
17
17
 
18
18
  import { ValueError } from '@tetherto/wdk-wallet'
19
19
 
20
+ // eslint-disable-next-line camelcase
21
+ import { sodium_memzero } from 'sodium-universal'
22
+
20
23
  import MemorySafeHDNodeWallet from '../memory-safe/hd-node-wallet.js'
21
24
 
22
25
  /** @typedef {import('./signer-evm.js').ISignerEvm} ISignerEvm */
@@ -54,7 +57,8 @@ export default class SeedSignerEvm {
54
57
  * @throws {ValueError} If the given seed phrase is invalid.
55
58
  */
56
59
  constructor (seed, path = BIP_44_ETH_DERIVATION_PATH_PREFIX) {
57
- if (typeof seed === 'string') {
60
+ const ownsSeed = typeof seed === 'string'
61
+ if (ownsSeed) {
58
62
  if (!bip39.validateMnemonic(seed)) {
59
63
  throw new ValueError('The seed phrase is invalid.')
60
64
  }
@@ -63,8 +67,14 @@ export default class SeedSignerEvm {
63
67
  }
64
68
 
65
69
  const root = MemorySafeHDNodeWallet.fromSeed(seed)
66
- const account = root.derivePath(path)
67
- if (account !== root) root.dispose()
70
+ if (ownsSeed) sodium_memzero(seed)
71
+
72
+ let account
73
+ try {
74
+ account = root.derivePath(path)
75
+ } finally {
76
+ if (account !== root) root.dispose()
77
+ }
68
78
 
69
79
  /** @private */
70
80
  this._account = account
@@ -16,7 +16,7 @@
16
16
 
17
17
  import { Contract, VoidSigner, Transaction, ZeroAddress } from 'ethers'
18
18
 
19
- import { MaximumFeeExceededError, ProviderRequiredError, ValueError } from '@tetherto/wdk-wallet'
19
+ import { AssertionError, MaximumFeeExceededError, ProviderRequiredError, ValueError } from '@tetherto/wdk-wallet'
20
20
 
21
21
  import WalletAccountReadOnlyEvm from './wallet-account-read-only-evm.js'
22
22
 
@@ -200,9 +200,14 @@ export default class WalletAccountEvm extends WalletAccountReadOnlyEvm {
200
200
  *
201
201
  * @param {EvmTransaction} tx - The transaction to sign.
202
202
  * @returns {Promise<string>} The signed transaction as a hex string.
203
+ * @throws {ValueError} If the transaction is an EIP-4844 (type 3) blob transaction.
203
204
  * @throws {MaximumFeeExceededError} If a provider is set, and the transaction's cost surpasses the transaction max. fee option.
204
205
  */
205
206
  async signTransaction (tx) {
207
+ if (WalletAccountReadOnlyEvm._isBlobTransaction(tx)) {
208
+ throw new ValueError('eip-4844 blob transactions are not supported')
209
+ }
210
+
206
211
  if (this._provider && this._config.transactionMaxFee !== undefined) {
207
212
  const { fee } = await this.quoteSendTransaction(tx)
208
213
 
@@ -223,7 +228,7 @@ export default class WalletAccountEvm extends WalletAccountReadOnlyEvm {
223
228
  * @returns {Promise<TransactionResult>} The transaction's result.
224
229
  * @throws {ProviderRequiredError} If the wallet is not connected to a provider.
225
230
  * @throws {MaximumFeeExceededError} If the transaction's cost exceeds the maximum transaction fee option.
226
- * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or a type 3 transaction omits `maxFeePerBlobGas`.
231
+ * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or if it is an EIP-4844 (type 3) blob transaction.
227
232
  */
228
233
  async sendTransaction (tx) {
229
234
  if (!this._provider) {
@@ -261,7 +266,7 @@ export default class WalletAccountEvm extends WalletAccountReadOnlyEvm {
261
266
  * @param {EvmTransaction | string} tx - The transaction, or a signed raw transaction as a hex string.
262
267
  * @returns {Promise<Omit<TransactionResult, 'hash'>>} The transaction's quotes.
263
268
  * @throws {ProviderRequiredError} If the wallet is not connected to a provider.
264
- * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or a type 3 transaction omits `maxFeePerBlobGas`.
269
+ * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or if it is an EIP-4844 (type 3) blob transaction.
265
270
  * @throws {Error} If the simulation of the transaction reverts, as an ethers error with code `CALL_EXCEPTION`.
266
271
  */
267
272
  async quoteSendTransaction (tx) {
@@ -270,7 +275,13 @@ export default class WalletAccountEvm extends WalletAccountReadOnlyEvm {
270
275
  throw new ProviderRequiredError('The wallet must be connected to a provider to quote send transaction operations.')
271
276
  }
272
277
 
273
- const { from, to, value, data, gasLimit, gasPrice, maxFeePerGas, maxPriorityFeePerGas, type, nonce, chainId, authorizationList } = Transaction.from(tx)
278
+ const parsedTx = Transaction.from(tx)
279
+
280
+ if (WalletAccountReadOnlyEvm._isBlobTransaction(parsedTx)) {
281
+ throw new ValueError('eip-4844 blob transactions are not supported')
282
+ }
283
+
284
+ const { from, to, value, data, gasLimit, gasPrice, maxFeePerGas, maxPriorityFeePerGas, type, nonce, chainId, authorizationList } = parsedTx
274
285
 
275
286
  await this._estimateGas({ from, to, value, data, gasLimit, gasPrice, maxFeePerGas, maxPriorityFeePerGas, type, nonce, chainId, authorizationList })
276
287
 
@@ -362,18 +373,26 @@ export default class WalletAccountEvm extends WalletAccountReadOnlyEvm {
362
373
  *
363
374
  * The chainId and nonce are populated from the provider when not explicitly provided.
364
375
  *
376
+ * A chainId of 0 makes the authorization valid on every chain, so it is only signed when given explicitly, never
377
+ * when reported by the provider.
378
+ *
379
+ * @see https://eips.ethereum.org/EIPS/eip-7702
365
380
  * @param {AuthorizationRequest} auth - The authorization request.
366
381
  * @returns {Promise<Authorization>} The signed authorization.
367
382
  * @throws {ProviderRequiredError} If the chainId or nonce are not provided and the wallet is not connected to a provider.
383
+ * @throws {AssertionError} If the chainId is not provided and the provider reports a chain id of 0.
368
384
  */
369
385
  async signAuthorization (auth) {
370
386
  const populated = { ...auth }
371
- if (populated.chainId === undefined || populated.nonce === undefined) {
387
+ if (populated.chainId == null || populated.nonce == null) {
372
388
  if (!this._provider) {
373
389
  throw new ProviderRequiredError('The wallet must be connected to a provider to populate the authorization chainId and nonce. Provide them explicitly to sign offline.')
374
390
  }
375
391
  if (populated.chainId == null) {
376
392
  const { chainId } = await this._provider.getNetwork()
393
+ if (chainId === 0n) {
394
+ throw new AssertionError('The provider reported chain id 0, which would make the authorization valid on every chain.')
395
+ }
377
396
  populated.chainId = chainId
378
397
  }
379
398
  if (populated.nonce == null) {
@@ -394,6 +413,7 @@ export default class WalletAccountEvm extends WalletAccountReadOnlyEvm {
394
413
  * @param {string} delegateAddress - The address of the contract to delegate to.
395
414
  * @returns {Promise<TransactionResult>} The transaction result.
396
415
  * @throws {ProviderRequiredError} If the wallet is not connected to a provider.
416
+ * @throws {AssertionError} If the provider reports a chain id of 0.
397
417
  */
398
418
  async delegate (delegateAddress) {
399
419
  if (!this._provider) {
@@ -423,6 +443,8 @@ export default class WalletAccountEvm extends WalletAccountReadOnlyEvm {
423
443
  * Revokes any active ERC-7702 delegation by delegating to the zero address.
424
444
  *
425
445
  * @returns {Promise<TransactionResult>} The transaction result.
446
+ * @throws {ProviderRequiredError} If the wallet is not connected to a provider.
447
+ * @throws {AssertionError} If the provider reports a chain id of 0.
426
448
  */
427
449
  async revokeDelegation () {
428
450
  return await this.delegate(ZeroAddress)
@@ -27,10 +27,10 @@ import FailoverProvider from '@tetherto/wdk-failover-provider'
27
27
  /** @typedef {import('ethers').TypedDataDomain} TypedDataDomain */
28
28
  /** @typedef {import('ethers').TypedDataField} TypedDataField */
29
29
  /** @typedef {import('ethers').AuthorizationLike} AuthorizationLike */
30
- /** @typedef {import('ethers').BlobLike} BlobLike */
31
30
  /** @typedef {import('ethers').TransactionReceipt} EvmTransactionReceipt */
32
31
  /** @typedef {import('ethers').TransactionResponse} EvmTransactionResponse */
33
32
  /** @typedef {import('ethers').TransactionRequest} EvmTransactionRequest */
33
+ /** @typedef {import('ethers').Transaction} Transaction */
34
34
 
35
35
  /** @typedef {import('@tetherto/wdk-wallet').TransactionResult} TransactionResult */
36
36
  /** @typedef {import('@tetherto/wdk-wallet').TransferResult} TransferResult */
@@ -68,12 +68,9 @@ import FailoverProvider from '@tetherto/wdk-failover-provider'
68
68
  * @property {number | bigint} [gasPrice] - The price (in wei) per unit of gas this transaction will pay.
69
69
  * @property {number | bigint} [maxFeePerGas] - The maximum price (in wei) per unit of gas this transaction will pay for the combined [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) block's base fee and this transaction's priority fee.
70
70
  * @property {number | bigint} [maxPriorityFeePerGas] - The price (in wei) per unit of gas this transaction will allow in addition to the [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) block's base fee to bribe miners into giving this transaction priority. This is included in the maxFeePerGas, so this will not affect the total maximum cost set with maxFeePerGas.
71
- * @property {number} [type] - The transaction type (e.g. 4 for ERC-7702).
71
+ * @property {number} [type] - The [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) transaction type: 0 for legacy, 1 for [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930) access-list, 2 for [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559), 4 for ERC-7702. Type 3 ([EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) blob transactions) is not supported and is rejected. Omit to have the type inferred from the transaction's fields and the network's fee data.
72
72
  * @property {number} [nonce] - The transaction nonce.
73
73
  * @property {number | bigint} [chainId] - The chain ID of the network.
74
- * @property {number | bigint} [maxFeePerBlobGas] - The maximum price (in wei) per unit of blob gas this transaction will pay for [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) blob data. Required for type 3 (blob) transactions.
75
- * @property {BlobLike[]} [blobs] - The blobs of an [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) type 3 transaction.
76
- * @property {string[]} [blobVersionedHashes] - The versioned hashes of the blobs of an [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) type 3 transaction.
77
74
  * @property {AuthorizationLike[]} [authorizationList] - An optional list of ERC-7702 signed authorizations for type 4 transactions.
78
75
  */
79
76
 
@@ -279,17 +276,37 @@ export default class WalletAccountReadOnlyEvm extends WalletAccountReadOnly {
279
276
  }, {})
280
277
  }
281
278
 
279
+ /**
280
+ * Whether the given transaction is an EIP-4844 (type 3) blob transaction.
281
+ *
282
+ * @protected
283
+ * @param {EvmTransaction | Transaction} tx - The transaction to inspect.
284
+ * @returns {boolean} True if the transaction explicitly targets type 3, or carries any blob field.
285
+ */
286
+ static _isBlobTransaction (tx) {
287
+ const hasBlobs = (
288
+ ('blobs' in tx && tx.blobs != null) ||
289
+ ('blobVersionedHashes' in tx && tx.blobVersionedHashes != null) ||
290
+ ('maxFeePerBlobGas' in tx && tx.maxFeePerBlobGas != null)
291
+ )
292
+
293
+ return Number(tx.type) === 3 || hasBlobs
294
+ }
295
+
282
296
  /**
283
297
  * Validates that a transaction does not mix fee fields its type doesn't support.
284
298
  *
285
299
  * @protected
286
300
  * @param {EvmTransaction} tx - The transaction to validate.
287
- * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or a type 3 transaction omits `maxFeePerBlobGas`.
301
+ * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or if it is an EIP-4844 (type 3) blob transaction.
288
302
  */
289
303
  static _validateFeeFields (tx) {
304
+ if (WalletAccountReadOnlyEvm._isBlobTransaction(tx)) {
305
+ throw new ValueError('eip-4844 blob transactions are not supported')
306
+ }
307
+
290
308
  const has1559 = tx.maxFeePerGas !== undefined || tx.maxPriorityFeePerGas !== undefined
291
309
  const hasLegacy = tx.gasPrice !== undefined
292
- const hasBlobs = tx.blobs !== undefined || tx.blobVersionedHashes !== undefined || tx.maxFeePerBlobGas !== undefined
293
310
  const hasAuthList = tx.authorizationList !== undefined
294
311
  const explicitType = (tx.type !== undefined) ? Number(tx.type) : null
295
312
 
@@ -299,12 +316,6 @@ export default class WalletAccountReadOnlyEvm extends WalletAccountReadOnly {
299
316
  if ((explicitType === 0 || explicitType === 1) && has1559) {
300
317
  throw new ValueError('pre-eip-1559 transaction does not support maxFeePerGas/maxPriorityFeePerGas')
301
318
  }
302
- if ((explicitType === 3 || hasBlobs) && hasLegacy) {
303
- throw new ValueError('blob transaction does not support gasPrice')
304
- }
305
- if ((explicitType === 3 || hasBlobs) && tx.maxFeePerBlobGas === undefined) {
306
- throw new ValueError('maxFeePerBlobGas is required for type 3 transactions')
307
- }
308
319
  if ((explicitType === 4 || (explicitType === null && hasAuthList)) && hasLegacy) {
309
320
  throw new ValueError('eip-7702 transaction does not support gasPrice')
310
321
  }
@@ -321,7 +332,7 @@ export default class WalletAccountReadOnlyEvm extends WalletAccountReadOnly {
321
332
  * @param {EvmTransaction} tx - The transaction.
322
333
  * @returns {Promise<Omit<TransactionResult, 'hash'>>} The transaction's quotes.
323
334
  * @throws {ProviderRequiredError} If the wallet is not connected to a provider.
324
- * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or a type 3 transaction omits `maxFeePerBlobGas`.
335
+ * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or if it is an EIP-4844 (type 3) blob transaction.
325
336
  * @throws {Error} If the simulation of the transaction reverts, as an ethers error with code `CALL_EXCEPTION`.
326
337
  */
327
338
  async quoteSendTransaction (tx) {
@@ -94,6 +94,7 @@ export default class WalletAccountEvm extends WalletAccountReadOnlyEvm implement
94
94
  *
95
95
  * @param {EvmTransaction} tx - The transaction to sign.
96
96
  * @returns {Promise<string>} The signed transaction as a hex string.
97
+ * @throws {ValueError} If the transaction is an EIP-4844 (type 3) blob transaction.
97
98
  * @throws {MaximumFeeExceededError} If a provider is set, and the transaction's cost surpasses the transaction max. fee option.
98
99
  */
99
100
  signTransaction(tx: EvmTransaction): Promise<string>;
@@ -104,7 +105,7 @@ export default class WalletAccountEvm extends WalletAccountReadOnlyEvm implement
104
105
  * @returns {Promise<TransactionResult>} The transaction's result.
105
106
  * @throws {ProviderRequiredError} If the wallet is not connected to a provider.
106
107
  * @throws {MaximumFeeExceededError} If the transaction's cost exceeds the maximum transaction fee option.
107
- * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or a type 3 transaction omits `maxFeePerBlobGas`.
108
+ * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or if it is an EIP-4844 (type 3) blob transaction.
108
109
  */
109
110
  sendTransaction(tx: EvmTransaction | string): Promise<TransactionResult>;
110
111
  /**
@@ -119,7 +120,7 @@ export default class WalletAccountEvm extends WalletAccountReadOnlyEvm implement
119
120
  * @param {EvmTransaction | string} tx - The transaction, or a signed raw transaction as a hex string.
120
121
  * @returns {Promise<Omit<TransactionResult, 'hash'>>} The transaction's quotes.
121
122
  * @throws {ProviderRequiredError} If the wallet is not connected to a provider.
122
- * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or a type 3 transaction omits `maxFeePerBlobGas`.
123
+ * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or if it is an EIP-4844 (type 3) blob transaction.
123
124
  * @throws {Error} If the simulation of the transaction reverts, as an ethers error with code `CALL_EXCEPTION`.
124
125
  */
125
126
  quoteSendTransaction(tx: EvmTransaction | string): Promise<Omit<TransactionResult, "hash">>;
@@ -152,9 +153,14 @@ export default class WalletAccountEvm extends WalletAccountReadOnlyEvm implement
152
153
  *
153
154
  * The chainId and nonce are populated from the provider when not explicitly provided.
154
155
  *
156
+ * A chainId of 0 makes the authorization valid on every chain, so it is only signed when given explicitly, never
157
+ * when reported by the provider.
158
+ *
159
+ * @see https://eips.ethereum.org/EIPS/eip-7702
155
160
  * @param {AuthorizationRequest} auth - The authorization request.
156
161
  * @returns {Promise<Authorization>} The signed authorization.
157
162
  * @throws {ProviderRequiredError} If the chainId or nonce are not provided and the wallet is not connected to a provider.
163
+ * @throws {AssertionError} If the chainId is not provided and the provider reports a chain id of 0.
158
164
  */
159
165
  signAuthorization(auth: AuthorizationRequest): Promise<Authorization>;
160
166
  /**
@@ -167,12 +173,15 @@ export default class WalletAccountEvm extends WalletAccountReadOnlyEvm implement
167
173
  * @param {string} delegateAddress - The address of the contract to delegate to.
168
174
  * @returns {Promise<TransactionResult>} The transaction result.
169
175
  * @throws {ProviderRequiredError} If the wallet is not connected to a provider.
176
+ * @throws {AssertionError} If the provider reports a chain id of 0.
170
177
  */
171
178
  delegate(delegateAddress: string): Promise<TransactionResult>;
172
179
  /**
173
180
  * Revokes any active ERC-7702 delegation by delegating to the zero address.
174
181
  *
175
182
  * @returns {Promise<TransactionResult>} The transaction result.
183
+ * @throws {ProviderRequiredError} If the wallet is not connected to a provider.
184
+ * @throws {AssertionError} If the provider reports a chain id of 0.
176
185
  */
177
186
  revokeDelegation(): Promise<TransactionResult>;
178
187
  /**
@@ -27,12 +27,20 @@ export default class WalletAccountReadOnlyEvm extends WalletAccountReadOnly {
27
27
  * @returns {Provider | undefined} The provider, or undefined if none is configured.
28
28
  */
29
29
  protected static _buildProvider(config?: Omit<EvmWalletConfig, "transferMaxFee" | "transactionMaxFee">): Provider | undefined;
30
+ /**
31
+ * Whether the given transaction is an EIP-4844 (type 3) blob transaction.
32
+ *
33
+ * @protected
34
+ * @param {EvmTransaction | Transaction} tx - The transaction to inspect.
35
+ * @returns {boolean} True if the transaction explicitly targets type 3, or carries any blob field.
36
+ */
37
+ protected static _isBlobTransaction(tx: EvmTransaction | Transaction): boolean;
30
38
  /**
31
39
  * Validates that a transaction does not mix fee fields its type doesn't support.
32
40
  *
33
41
  * @protected
34
42
  * @param {EvmTransaction} tx - The transaction to validate.
35
- * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or a type 3 transaction omits `maxFeePerBlobGas`.
43
+ * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or if it is an EIP-4844 (type 3) blob transaction.
36
44
  */
37
45
  protected static _validateFeeFields(tx: EvmTransaction): void;
38
46
  /**
@@ -107,7 +115,7 @@ export default class WalletAccountReadOnlyEvm extends WalletAccountReadOnly {
107
115
  * @param {EvmTransaction} tx - The transaction.
108
116
  * @returns {Promise<Omit<TransactionResult, 'hash'>>} The transaction's quotes.
109
117
  * @throws {ProviderRequiredError} If the wallet is not connected to a provider.
110
- * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or a type 3 transaction omits `maxFeePerBlobGas`.
118
+ * @throws {ValueError} If the transaction mixes fee fields that its type doesn't support, or if it is an EIP-4844 (type 3) blob transaction.
111
119
  * @throws {Error} If the simulation of the transaction reverts, as an ethers error with code `CALL_EXCEPTION`.
112
120
  */
113
121
  quoteSendTransaction(tx: EvmTransaction): Promise<Omit<TransactionResult, "hash">>;
@@ -219,11 +227,11 @@ export type Provider = import("ethers").Provider;
219
227
  export type Eip1193Provider = import("ethers").Eip1193Provider;
220
228
  export type TypedDataDomain = import("ethers").TypedDataDomain;
221
229
  export type TypedDataField = import("ethers").TypedDataField;
222
- export type BlobLike = import("ethers").BlobLike;
223
230
  export type AuthorizationLike = import("ethers").AuthorizationLike;
224
231
  export type EvmTransactionReceipt = import("ethers").TransactionReceipt;
225
232
  export type EvmTransactionResponse = import("ethers").TransactionResponse;
226
233
  export type EvmTransactionRequest = import("ethers").TransactionRequest;
234
+ export type Transaction = import("ethers").Transaction;
227
235
  export type TransactionResult = import("@tetherto/wdk-wallet").TransactionResult;
228
236
  export type TransferResult = import("@tetherto/wdk-wallet").TransferResult;
229
237
  export type TransactionReceipt = import("@tetherto/wdk-wallet").TransactionReceipt;
@@ -296,7 +304,7 @@ export type EvmTransaction = {
296
304
  */
297
305
  maxPriorityFeePerGas?: number | bigint;
298
306
  /**
299
- * - The transaction type (e.g. 4 for ERC-7702).
307
+ * - The [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) transaction type: 0 for legacy, 1 for [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930) access-list, 2 for [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559), 4 for ERC-7702. Type 3 ([EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) blob transactions) is not supported and is rejected. Omit to have the type inferred from the transaction's fields and the network's fee data.
300
308
  */
301
309
  type?: number;
302
310
  /**
@@ -307,18 +315,6 @@ export type EvmTransaction = {
307
315
  * - The chain ID of the network.
308
316
  */
309
317
  chainId?: number | bigint;
310
- /**
311
- * - The maximum price (in wei) per unit of blob gas this transaction will pay for [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) blob data. Required for type 3 (blob) transactions.
312
- */
313
- maxFeePerBlobGas?: number | bigint;
314
- /**
315
- * - The blobs of an [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) type 3 transaction.
316
- */
317
- blobs?: BlobLike[];
318
- /**
319
- * - The versioned hashes of the blobs of an [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) type 3 transaction.
320
- */
321
- blobVersionedHashes?: string[];
322
318
  /**
323
319
  * - An optional list of ERC-7702 signed authorizations for type 4 transactions.
324
320
  */