viem 2.43.2 → 2.43.4

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.
Files changed (114) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/_cjs/account-abstraction/index.js +3 -1
  3. package/_cjs/account-abstraction/index.js.map +1 -1
  4. package/_cjs/account-abstraction/utils/userOperation/getInitCode.js +6 -5
  5. package/_cjs/account-abstraction/utils/userOperation/getInitCode.js.map +1 -1
  6. package/_cjs/account-abstraction/utils/userOperation/getUserOperationHash.js +4 -2
  7. package/_cjs/account-abstraction/utils/userOperation/getUserOperationHash.js.map +1 -1
  8. package/_cjs/account-abstraction/utils/userOperation/getUserOperationTypedData.js +1 -1
  9. package/_cjs/account-abstraction/utils/userOperation/getUserOperationTypedData.js.map +1 -1
  10. package/_cjs/account-abstraction/utils/userOperation/toPackedUserOperation.js +2 -2
  11. package/_cjs/account-abstraction/utils/userOperation/toPackedUserOperation.js.map +1 -1
  12. package/_cjs/actions/wallet/prepareTransactionRequest.js +4 -5
  13. package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
  14. package/_cjs/chains/definitions/cpchain.js +24 -0
  15. package/_cjs/chains/definitions/cpchain.js.map +1 -0
  16. package/_cjs/chains/definitions/tempoDevnet.js +3 -3
  17. package/_cjs/chains/definitions/tempoDevnet.js.map +1 -1
  18. package/_cjs/chains/index.js +14 -12
  19. package/_cjs/chains/index.js.map +1 -1
  20. package/_cjs/errors/version.js +1 -1
  21. package/_cjs/tempo/Capabilities.js +3 -0
  22. package/_cjs/tempo/Capabilities.js.map +1 -0
  23. package/_cjs/tempo/Formatters.js +5 -1
  24. package/_cjs/tempo/Formatters.js.map +1 -1
  25. package/_cjs/tempo/Transport.js +3 -1
  26. package/_cjs/tempo/Transport.js.map +1 -1
  27. package/_cjs/tempo/actions/nonce.js.map +1 -1
  28. package/_cjs/tempo/chainConfig.js +37 -28
  29. package/_cjs/tempo/chainConfig.js.map +1 -1
  30. package/_cjs/tempo/index.js +3 -1
  31. package/_cjs/tempo/index.js.map +1 -1
  32. package/_cjs/utils/abi/getAbiItem.js +2 -1
  33. package/_cjs/utils/abi/getAbiItem.js.map +1 -1
  34. package/_esm/account-abstraction/index.js +2 -1
  35. package/_esm/account-abstraction/index.js.map +1 -1
  36. package/_esm/account-abstraction/utils/userOperation/getInitCode.js +6 -5
  37. package/_esm/account-abstraction/utils/userOperation/getInitCode.js.map +1 -1
  38. package/_esm/account-abstraction/utils/userOperation/getUserOperationHash.js +4 -2
  39. package/_esm/account-abstraction/utils/userOperation/getUserOperationHash.js.map +1 -1
  40. package/_esm/account-abstraction/utils/userOperation/getUserOperationTypedData.js +1 -1
  41. package/_esm/account-abstraction/utils/userOperation/getUserOperationTypedData.js.map +1 -1
  42. package/_esm/account-abstraction/utils/userOperation/toPackedUserOperation.js +2 -2
  43. package/_esm/account-abstraction/utils/userOperation/toPackedUserOperation.js.map +1 -1
  44. package/_esm/actions/wallet/prepareTransactionRequest.js +4 -5
  45. package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
  46. package/_esm/chains/definitions/cpchain.js +21 -0
  47. package/_esm/chains/definitions/cpchain.js.map +1 -0
  48. package/_esm/chains/definitions/tempoDevnet.js +3 -3
  49. package/_esm/chains/definitions/tempoDevnet.js.map +1 -1
  50. package/_esm/chains/index.js +1 -0
  51. package/_esm/chains/index.js.map +1 -1
  52. package/_esm/errors/version.js +1 -1
  53. package/_esm/tempo/Capabilities.js +2 -0
  54. package/_esm/tempo/Capabilities.js.map +1 -0
  55. package/_esm/tempo/Formatters.js +5 -1
  56. package/_esm/tempo/Formatters.js.map +1 -1
  57. package/_esm/tempo/Transport.js +3 -1
  58. package/_esm/tempo/Transport.js.map +1 -1
  59. package/_esm/tempo/actions/nonce.js +2 -44
  60. package/_esm/tempo/actions/nonce.js.map +1 -1
  61. package/_esm/tempo/chainConfig.js +38 -29
  62. package/_esm/tempo/chainConfig.js.map +1 -1
  63. package/_esm/tempo/index.js +2 -1
  64. package/_esm/tempo/index.js.map +1 -1
  65. package/_esm/utils/abi/getAbiItem.js +2 -1
  66. package/_esm/utils/abi/getAbiItem.js.map +1 -1
  67. package/_types/account-abstraction/index.d.ts +2 -1
  68. package/_types/account-abstraction/index.d.ts.map +1 -1
  69. package/_types/account-abstraction/utils/userOperation/getInitCode.d.ts +5 -1
  70. package/_types/account-abstraction/utils/userOperation/getInitCode.d.ts.map +1 -1
  71. package/_types/account-abstraction/utils/userOperation/getUserOperationHash.d.ts.map +1 -1
  72. package/_types/account-abstraction/utils/userOperation/toPackedUserOperation.d.ts +5 -1
  73. package/_types/account-abstraction/utils/userOperation/toPackedUserOperation.d.ts.map +1 -1
  74. package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
  75. package/_types/chains/definitions/cpchain.d.ts +48 -0
  76. package/_types/chains/definitions/cpchain.d.ts.map +1 -0
  77. package/_types/chains/definitions/tempoDevnet.d.ts +16 -8
  78. package/_types/chains/definitions/tempoDevnet.d.ts.map +1 -1
  79. package/_types/chains/definitions/tempoLocalnet.d.ts +10 -2
  80. package/_types/chains/definitions/tempoLocalnet.d.ts.map +1 -1
  81. package/_types/chains/definitions/tempoTestnet.d.ts +10 -2
  82. package/_types/chains/definitions/tempoTestnet.d.ts.map +1 -1
  83. package/_types/chains/index.d.ts +1 -0
  84. package/_types/chains/index.d.ts.map +1 -1
  85. package/_types/errors/version.d.ts +1 -1
  86. package/_types/tempo/Capabilities.d.ts +9 -0
  87. package/_types/tempo/Capabilities.d.ts.map +1 -0
  88. package/_types/tempo/Formatters.d.ts.map +1 -1
  89. package/_types/tempo/Transport.d.ts.map +1 -1
  90. package/_types/tempo/actions/nonce.d.ts +2 -44
  91. package/_types/tempo/actions/nonce.d.ts.map +1 -1
  92. package/_types/tempo/chainConfig.d.ts +5 -1
  93. package/_types/tempo/chainConfig.d.ts.map +1 -1
  94. package/_types/tempo/index.d.ts +2 -1
  95. package/_types/tempo/index.d.ts.map +1 -1
  96. package/_types/utils/abi/getAbiItem.d.ts.map +1 -1
  97. package/account-abstraction/index.ts +8 -1
  98. package/account-abstraction/utils/userOperation/getInitCode.ts +11 -4
  99. package/account-abstraction/utils/userOperation/getUserOperationHash.ts +11 -6
  100. package/account-abstraction/utils/userOperation/getUserOperationTypedData.ts +1 -1
  101. package/account-abstraction/utils/userOperation/toPackedUserOperation.ts +8 -1
  102. package/actions/wallet/prepareTransactionRequest.ts +24 -11
  103. package/chains/definitions/cpchain.ts +21 -0
  104. package/chains/definitions/tempoDevnet.ts +3 -3
  105. package/chains/index.ts +1 -0
  106. package/errors/version.ts +1 -1
  107. package/package.json +2 -2
  108. package/tempo/Capabilities.ts +9 -0
  109. package/tempo/Formatters.ts +7 -1
  110. package/tempo/Transport.ts +3 -1
  111. package/tempo/actions/nonce.ts +2 -44
  112. package/tempo/chainConfig.ts +42 -29
  113. package/tempo/index.ts +2 -1
  114. package/utils/abi/getAbiItem.ts +8 -3
@@ -54,11 +54,14 @@ export function getUserOperationHash<
54
54
  if (entryPointVersion === '0.6') {
55
55
  const factory = userOperation.initCode?.slice(0, 42) as Hex
56
56
  const factoryData = userOperation.initCode?.slice(42) as Hex | undefined
57
- const initCode = getInitCode({
58
- authorization,
59
- factory,
60
- factoryData,
61
- })
57
+ const initCode = getInitCode(
58
+ {
59
+ authorization,
60
+ factory,
61
+ factoryData,
62
+ },
63
+ { forHash: true },
64
+ )
62
65
  return encodeAbiParameters(
63
66
  [
64
67
  { type: 'address' },
@@ -88,7 +91,9 @@ export function getUserOperationHash<
88
91
  }
89
92
 
90
93
  if (entryPointVersion === '0.7') {
91
- const packedUserOp = toPackedUserOperation(userOperation)
94
+ const packedUserOp = toPackedUserOperation(userOperation, {
95
+ forHash: true,
96
+ })
92
97
  return encodeAbiParameters(
93
98
  [
94
99
  { type: 'address' },
@@ -33,7 +33,7 @@ export function getUserOperationTypedData(
33
33
  ): GetUserOperationTypedDataReturnType {
34
34
  const { chainId, entryPointAddress, userOperation } = parameters
35
35
 
36
- const packedUserOp = toPackedUserOperation(userOperation)
36
+ const packedUserOp = toPackedUserOperation(userOperation, { forHash: true })
37
37
 
38
38
  return {
39
39
  types,
@@ -7,8 +7,14 @@ import type {
7
7
  } from '../../types/userOperation.js'
8
8
  import { getInitCode } from './getInitCode.js'
9
9
 
10
+ export type ToPackedUserOperationOptions = {
11
+ /** Prepare the packed user operation for hashing. */
12
+ forHash?: boolean | undefined
13
+ }
14
+
10
15
  export function toPackedUserOperation(
11
16
  userOperation: UserOperation,
17
+ options: ToPackedUserOperationOptions = {},
12
18
  ): PackedUserOperation {
13
19
  const {
14
20
  callGasLimit,
@@ -29,7 +35,8 @@ export function toPackedUserOperation(
29
35
  pad(numberToHex(verificationGasLimit || 0n), { size: 16 }),
30
36
  pad(numberToHex(callGasLimit || 0n), { size: 16 }),
31
37
  ])
32
- const initCode = getInitCode(userOperation)
38
+ const initCode = getInitCode(userOperation, options)
39
+
33
40
  const gasFees = concat([
34
41
  pad(numberToHex(maxPriorityFeePerGas || 0n), { size: 16 }),
35
42
  pad(numberToHex(maxFeePerGas || 0n), { size: 16 }),
@@ -270,10 +270,14 @@ export async function prepareTransactionRequest<
270
270
  let request = args as PrepareTransactionRequestParameters
271
271
 
272
272
  request.account ??= client.account
273
- request.chain ??= client.chain
274
273
  request.parameters ??= defaultParameters
275
274
 
276
- const { account: account_, chain, nonceManager, parameters } = request
275
+ const {
276
+ account: account_,
277
+ chain = client.chain,
278
+ nonceManager,
279
+ parameters,
280
+ } = request
277
281
 
278
282
  const prepareTransactionRequest = (() => {
279
283
  if (typeof chain?.prepareTransactionRequest === 'function')
@@ -320,9 +324,12 @@ export async function prepareTransactionRequest<
320
324
  prepareTransactionRequest?.fn &&
321
325
  prepareTransactionRequest.runAt?.includes('beforeFillTransaction')
322
326
  ) {
323
- request = await prepareTransactionRequest.fn(request, {
324
- phase: 'beforeFillTransaction',
325
- })
327
+ request = await prepareTransactionRequest.fn(
328
+ { ...request, chain },
329
+ {
330
+ phase: 'beforeFillTransaction',
331
+ },
332
+ )
326
333
  nonce ??= request.nonce
327
334
  }
328
335
 
@@ -433,9 +440,12 @@ export async function prepareTransactionRequest<
433
440
  prepareTransactionRequest?.fn &&
434
441
  prepareTransactionRequest.runAt?.includes('beforeFillParameters')
435
442
  ) {
436
- request = await prepareTransactionRequest.fn(request, {
437
- phase: 'beforeFillParameters',
438
- })
443
+ request = await prepareTransactionRequest.fn(
444
+ { ...request, chain },
445
+ {
446
+ phase: 'beforeFillParameters',
447
+ },
448
+ )
439
449
  }
440
450
 
441
451
  let block: Block | undefined
@@ -580,9 +590,12 @@ export async function prepareTransactionRequest<
580
590
  prepareTransactionRequest?.fn &&
581
591
  prepareTransactionRequest.runAt?.includes('afterFillParameters')
582
592
  )
583
- request = await prepareTransactionRequest.fn(request, {
584
- phase: 'afterFillParameters',
585
- })
593
+ request = await prepareTransactionRequest.fn(
594
+ { ...request, chain },
595
+ {
596
+ phase: 'afterFillParameters',
597
+ },
598
+ )
586
599
 
587
600
  assertRequest(request as AssertRequestParameters)
588
601
 
@@ -0,0 +1,21 @@
1
+ import { defineChain } from '../../utils/chain/defineChain.js'
2
+
3
+ export const cpchain = /*#__PURE__*/ defineChain({
4
+ id: 86608,
5
+ name: 'CpChain',
6
+ nativeCurrency: {
7
+ decimals: 18,
8
+ name: 'CpChain',
9
+ symbol: 'CP',
10
+ },
11
+ rpcUrls: {
12
+ default: { http: ['https://rpc.cpchain.com'] },
13
+ },
14
+ blockExplorers: {
15
+ default: {
16
+ name: 'CpChain Explorer',
17
+ url: 'https://explorer.cpchain.com',
18
+ },
19
+ },
20
+ testnet: false,
21
+ })
@@ -3,7 +3,7 @@ import { defineChain } from '../../utils/chain/defineChain.js'
3
3
 
4
4
  export const tempoDevnet = /*#__PURE__*/ defineChain({
5
5
  ...chainConfig,
6
- id: 1337,
6
+ id: 42429,
7
7
  name: 'Tempo Devnet',
8
8
  nativeCurrency: {
9
9
  name: 'USD',
@@ -12,8 +12,8 @@ export const tempoDevnet = /*#__PURE__*/ defineChain({
12
12
  },
13
13
  rpcUrls: {
14
14
  default: {
15
- http: ['https://rpc.devnet.tempo.xyz'],
16
- webSocket: ['wss://rpc.devnet.tempo.xyz'],
15
+ http: ['https://rpc.devnet.tempoxyz.dev'],
16
+ webSocket: ['wss://rpc.devnet.tempoxyz.dev'],
17
17
  },
18
18
  },
19
19
  })
package/chains/index.ts CHANGED
@@ -121,6 +121,7 @@ export { coreTestnet1 } from './definitions/coreTestnet1.js'
121
121
  export { coreTestnet2 } from './definitions/coreTestnet2.js'
122
122
  export { corn } from './definitions/corn.js'
123
123
  export { cornTestnet } from './definitions/cornTestnet.js'
124
+ export { cpchain } from './definitions/cpchain.js'
124
125
  export { crab } from './definitions/crab.js'
125
126
  export { creatorTestnet } from './definitions/creatorTestnet.js'
126
127
  export { creditCoin3Devnet } from './definitions/creditCoin3Devnet.js'
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.43.2'
1
+ export const version = '2.43.4'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "2.43.2",
4
+ "version": "2.43.4",
5
5
  "main": "./_cjs/index.js",
6
6
  "module": "./_esm/index.js",
7
7
  "types": "./_types/index.d.ts",
@@ -217,7 +217,7 @@
217
217
  "@scure/bip39": "1.6.0",
218
218
  "abitype": "1.2.3",
219
219
  "isows": "1.0.7",
220
- "ox": "0.10.6",
220
+ "ox": "0.11.1",
221
221
  "ws": "8.18.3"
222
222
  },
223
223
  "license": "MIT",
@@ -0,0 +1,9 @@
1
+ import type { DefaultCapabilitiesSchema } from '../types/capabilities.js'
2
+ import type { ExactPartial } from '../types/utils.js'
3
+ import type { TransactionRequestTempo } from './Transaction.js'
4
+
5
+ export type Schema = Omit<DefaultCapabilitiesSchema, 'sendCalls'> & {
6
+ sendCalls: {
7
+ Request: ExactPartial<TransactionRequestTempo>
8
+ }
9
+ }
@@ -121,10 +121,16 @@ export function formatTransactionRequest(
121
121
  return [undefined, undefined]
122
122
  })()
123
123
 
124
+ const keyId =
125
+ account && 'accessKeyAddress' in account
126
+ ? account.accessKeyAddress
127
+ : undefined
128
+
124
129
  return {
125
130
  ...rpc,
126
- ...(keyType ? { keyType } : {}),
127
131
  ...(keyData ? { keyData } : {}),
132
+ ...(keyId ? { keyId } : {}),
133
+ ...(keyType ? { keyType } : {}),
128
134
  ...(request.feePayer
129
135
  ? {
130
136
  feePayer:
@@ -132,7 +132,7 @@ export function walletNamespaceCompat(
132
132
  if (request.method === 'wallet_sendCalls') {
133
133
  const params = request.params[0] ?? {}
134
134
  const { capabilities, chainId, from } = params
135
- const { sync } = capabilities ?? {}
135
+ const { sync, ...properties } = capabilities ?? {}
136
136
 
137
137
  if (!chainId) throw new Provider.UnsupportedChainIdError()
138
138
  if (Number(chainId) !== client.chain.id)
@@ -150,11 +150,13 @@ export function walletNamespaceCompat(
150
150
  if (!sync)
151
151
  return sendTransaction(client, {
152
152
  account,
153
+ ...(properties ? properties : {}),
153
154
  calls,
154
155
  })
155
156
 
156
157
  const { transactionHash } = await sendTransactionSync(client, {
157
158
  account,
159
+ ...(properties ? properties : {}),
158
160
  calls,
159
161
  })
160
162
  return transactionHash
@@ -111,27 +111,7 @@ export namespace getNonce {
111
111
  }
112
112
 
113
113
  /**
114
- * Gets the number of active nonce keys for an account.
115
- *
116
- * @example
117
- * ```ts
118
- * import { createClient, http } from 'viem'
119
- * import { tempo } from 'tempo.ts/chains'
120
- * import { Actions } from 'tempo.ts/viem'
121
- *
122
- * const client = createClient({
123
- * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
124
- * transport: http(),
125
- * })
126
- *
127
- * const count = await Actions.nonce.getNonceKeyCount(client, {
128
- * account: '0x...',
129
- * })
130
- * ```
131
- *
132
- * @param client - Client.
133
- * @param parameters - Parameters.
134
- * @returns The number of active nonce keys.
114
+ * @deprecated This function has been deprecated post-AllegroModerato. It will be removed in a future version.
135
115
  */
136
116
  export async function getNonceKeyCount<
137
117
  chain extends Chain | undefined,
@@ -203,29 +183,7 @@ export namespace getNonceKeyCount {
203
183
  }
204
184
 
205
185
  /**
206
- * Watches for nonce incremented events.
207
- *
208
- * @example
209
- * ```ts
210
- * import { createClient, http } from 'viem'
211
- * import { tempo } from 'tempo.ts/chains'
212
- * import { Actions } from 'tempo.ts/viem'
213
- *
214
- * const client = createClient({
215
- * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }),
216
- * transport: http(),
217
- * })
218
- *
219
- * const unwatch = Actions.nonce.watchNonceIncremented(client, {
220
- * onNonceIncremented: (args, log) => {
221
- * console.log('Nonce incremented:', args)
222
- * },
223
- * })
224
- * ```
225
- *
226
- * @param client - Client.
227
- * @param parameters - Parameters.
228
- * @returns A function to unsubscribe from the event.
186
+ * @deprecated This function has been deprecated post-AllegroModerato. It will be removed in a future version.
229
187
  */
230
188
  export function watchNonceIncremented<
231
189
  chain extends Chain | undefined,
@@ -31,41 +31,54 @@ export const chainConfig = {
31
31
  format: Formatters.formatTransactionRequest,
32
32
  }),
33
33
  },
34
- async prepareTransactionRequest(r) {
35
- const request = r as Transaction.TransactionRequest & {
36
- account?: Account | undefined
37
- chain?:
38
- | (Chain & { feeToken?: TokenId.TokenIdOrAddress | undefined })
39
- | undefined
40
- }
34
+ prepareTransactionRequest: [
35
+ async (r, { phase }) => {
36
+ const request = r as Transaction.TransactionRequest & {
37
+ account?: Account | undefined
38
+ chain?:
39
+ | (Chain & { feeToken?: TokenId.TokenIdOrAddress | undefined })
40
+ | undefined
41
+ }
42
+
43
+ if (phase === 'afterFillParameters') {
44
+ if (typeof request.nonceKey === 'bigint' && request.nonceKey > 0n)
45
+ request.gas = (request.gas ?? 0n) + 40_000n
46
+ return request as unknown as typeof r
47
+ }
41
48
 
42
- request.nonceKey = (() => {
43
- if (typeof request.nonceKey !== 'undefined') return request.nonceKey
49
+ request.nonceKey = (() => {
50
+ if (
51
+ typeof request.nonceKey !== 'undefined' &&
52
+ request.nonceKey !== 'random'
53
+ )
54
+ return request.nonceKey
44
55
 
45
- const address = request.account?.address ?? request.from
46
- if (!address) return undefined
47
- if (!request.chain) return undefined
48
- const nonceKey = NonceKeyStore.getNonceKey(NonceKeyStore.store, {
49
- address,
50
- chainId: request.chain.id,
51
- })
56
+ const address = request.account?.address ?? request.from
57
+ if (!address) return undefined
58
+ if (!request.chain) return undefined
59
+ const nonceKey = NonceKeyStore.getNonceKey(NonceKeyStore.store, {
60
+ address,
61
+ chainId: request.chain.id,
62
+ })
52
63
 
53
- if (nonceKey === 0n) return undefined
54
- return nonceKey
55
- })()
64
+ if (nonceKey === 0n) return undefined
65
+ return nonceKey
66
+ })()
56
67
 
57
- request.nonce = (() => {
58
- if (typeof request.nonce === 'number') return request.nonce
59
- // TODO: remove this line once `eth_fillTransaction` supports nonce keys.
60
- if (request.nonceKey) return 0
61
- return undefined
62
- })()
68
+ request.nonce = (() => {
69
+ if (typeof request.nonce === 'number') return request.nonce
70
+ // TODO: remove this line once `eth_fillTransaction` supports nonce keys.
71
+ if (request.nonceKey) return 0
72
+ return undefined
73
+ })()
63
74
 
64
- if (!request.feeToken && request.chain?.feeToken)
65
- request.feeToken = request.chain.feeToken
75
+ if (!request.feeToken && request.chain?.feeToken)
76
+ request.feeToken = request.chain.feeToken
66
77
 
67
- return request as unknown as typeof r
68
- },
78
+ return request as unknown as typeof r
79
+ },
80
+ { runAt: ['beforeFillTransaction', 'afterFillParameters'] },
81
+ ],
69
82
  serializers: {
70
83
  // TODO: casting to satisfy viem – viem v3 to have more flexible serializer type.
71
84
  transaction: ((transaction, signature) =>
package/tempo/index.ts CHANGED
@@ -15,6 +15,7 @@ export * as Abis from './Abis.js'
15
15
  export * as Account from './Account.js'
16
16
  export * as Addresses from './Addresses.js'
17
17
  export * as Actions from './actions/index.js'
18
+ export * as Capabilities from './Capabilities.js'
18
19
  export {
19
20
  type Decorator as TempoActions,
20
21
  decorator as tempoActions,
@@ -54,6 +55,6 @@ export type {
54
55
  } from './Transaction.js'
55
56
  export * as Transaction from './Transaction.js'
56
57
  export * as Transport from './Transport.js'
57
- export { withFeePayer } from './Transport.js'
58
+ export { walletNamespaceCompat, withFeePayer } from './Transport.js'
58
59
  export * as WebAuthnP256 from './WebAuthnP256.js'
59
60
  export * as WebCryptoP256 from './WebCryptoP256.js'
@@ -171,9 +171,14 @@ export function isArgOfType(arg: unknown, abiParameter: AbiParameter): boolean {
171
171
  if (abiParameterType === 'tuple' && 'components' in abiParameter)
172
172
  return Object.values(abiParameter.components).every(
173
173
  (component, index) => {
174
- return isArgOfType(
175
- Object.values(arg as unknown[] | Record<string, unknown>)[index],
176
- component as AbiParameter,
174
+ return (
175
+ argType === 'object' &&
176
+ isArgOfType(
177
+ Object.values(arg as unknown[] | Record<string, unknown>)[
178
+ index
179
+ ],
180
+ component as AbiParameter,
181
+ )
177
182
  )
178
183
  },
179
184
  )