viem 2.28.0-entrypoint-0-8-20250417075822 → 2.28.0

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 (161) hide show
  1. package/CHANGELOG.md +19 -3
  2. package/_cjs/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js +7 -63
  3. package/_cjs/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js.map +1 -1
  4. package/_cjs/account-abstraction/index.js +3 -1
  5. package/_cjs/account-abstraction/index.js.map +1 -1
  6. package/_cjs/account-abstraction/utils/userOperation/getInitCode.js +18 -0
  7. package/_cjs/account-abstraction/utils/userOperation/getInitCode.js.map +1 -0
  8. package/_cjs/account-abstraction/utils/userOperation/getUserOperationHash.js +29 -108
  9. package/_cjs/account-abstraction/utils/userOperation/getUserOperationHash.js.map +1 -1
  10. package/_cjs/account-abstraction/utils/userOperation/getUserOperationTypedData.js +32 -0
  11. package/_cjs/account-abstraction/utils/userOperation/getUserOperationTypedData.js.map +1 -0
  12. package/_cjs/account-abstraction/utils/userOperation/toPackedUserOperation.js +3 -2
  13. package/_cjs/account-abstraction/utils/userOperation/toPackedUserOperation.js.map +1 -1
  14. package/_cjs/actions/index.js +12 -1
  15. package/_cjs/actions/index.js.map +1 -1
  16. package/_cjs/{experimental/eip5792/actions → actions/wallet}/getCallsStatus.js +3 -3
  17. package/_cjs/actions/wallet/getCallsStatus.js.map +1 -0
  18. package/_cjs/{experimental/eip5792/actions → actions/wallet}/getCapabilities.js +1 -1
  19. package/{_esm/experimental/eip5792/actions → _cjs/actions/wallet}/getCapabilities.js.map +1 -1
  20. package/_cjs/{experimental/eip5792/actions → actions/wallet}/sendCalls.js +6 -6
  21. package/_cjs/actions/wallet/sendCalls.js.map +1 -0
  22. package/_cjs/actions/wallet/showCallsStatus.js.map +1 -0
  23. package/_cjs/{experimental/eip5792/actions → actions/wallet}/waitForCallsStatus.js +5 -5
  24. package/_cjs/actions/wallet/waitForCallsStatus.js.map +1 -0
  25. package/_cjs/chains/definitions/gunz.js +29 -0
  26. package/_cjs/chains/definitions/gunz.js.map +1 -0
  27. package/_cjs/chains/index.js +10 -8
  28. package/_cjs/chains/index.js.map +1 -1
  29. package/_cjs/clients/decorators/wallet.js +10 -0
  30. package/_cjs/clients/decorators/wallet.js.map +1 -1
  31. package/_cjs/constants/abis.js +417 -1
  32. package/_cjs/constants/abis.js.map +1 -1
  33. package/_cjs/errors/version.js +1 -1
  34. package/_cjs/errors/version.js.map +1 -1
  35. package/_cjs/experimental/eip5792/actions/writeContracts.js +1 -1
  36. package/_cjs/experimental/eip5792/actions/writeContracts.js.map +1 -1
  37. package/_cjs/experimental/eip5792/decorators/eip5792.js +5 -5
  38. package/_cjs/experimental/eip5792/decorators/eip5792.js.map +1 -1
  39. package/_cjs/experimental/index.js +6 -7
  40. package/_cjs/experimental/index.js.map +1 -1
  41. package/_cjs/index.js +12 -9
  42. package/_cjs/index.js.map +1 -1
  43. package/_esm/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js +8 -64
  44. package/_esm/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js.map +1 -1
  45. package/_esm/account-abstraction/index.js +1 -0
  46. package/_esm/account-abstraction/index.js.map +1 -1
  47. package/_esm/account-abstraction/utils/userOperation/getInitCode.js +15 -0
  48. package/_esm/account-abstraction/utils/userOperation/getInitCode.js.map +1 -0
  49. package/_esm/account-abstraction/utils/userOperation/getUserOperationHash.js +29 -108
  50. package/_esm/account-abstraction/utils/userOperation/getUserOperationHash.js.map +1 -1
  51. package/_esm/account-abstraction/utils/userOperation/getUserOperationTypedData.js +29 -0
  52. package/_esm/account-abstraction/utils/userOperation/getUserOperationTypedData.js.map +1 -0
  53. package/_esm/account-abstraction/utils/userOperation/toPackedUserOperation.js +3 -2
  54. package/_esm/account-abstraction/utils/userOperation/toPackedUserOperation.js.map +1 -1
  55. package/_esm/actions/index.js +5 -0
  56. package/_esm/actions/index.js.map +1 -1
  57. package/_esm/{experimental/eip5792/actions → actions/wallet}/getCallsStatus.js +5 -5
  58. package/_esm/actions/wallet/getCallsStatus.js.map +1 -0
  59. package/_esm/{experimental/eip5792/actions → actions/wallet}/getCapabilities.js +3 -3
  60. package/_esm/actions/wallet/getCapabilities.js.map +1 -0
  61. package/_esm/{experimental/eip5792/actions → actions/wallet}/sendCalls.js +8 -8
  62. package/_esm/actions/wallet/sendCalls.js.map +1 -0
  63. package/_esm/{experimental/eip5792/actions → actions/wallet}/showCallsStatus.js +2 -2
  64. package/_esm/actions/wallet/showCallsStatus.js.map +1 -0
  65. package/_esm/{experimental/eip5792/actions → actions/wallet}/waitForCallsStatus.js +7 -7
  66. package/_esm/actions/wallet/waitForCallsStatus.js.map +1 -0
  67. package/_esm/chains/definitions/gunz.js +26 -0
  68. package/_esm/chains/definitions/gunz.js.map +1 -0
  69. package/_esm/chains/index.js +1 -0
  70. package/_esm/chains/index.js.map +1 -1
  71. package/_esm/clients/decorators/wallet.js +10 -0
  72. package/_esm/clients/decorators/wallet.js.map +1 -1
  73. package/_esm/constants/abis.js +417 -0
  74. package/_esm/constants/abis.js.map +1 -1
  75. package/_esm/errors/version.js +1 -1
  76. package/_esm/errors/version.js.map +1 -1
  77. package/_esm/experimental/eip5792/actions/writeContracts.js +2 -3
  78. package/_esm/experimental/eip5792/actions/writeContracts.js.map +1 -1
  79. package/_esm/experimental/eip5792/decorators/eip5792.js +6 -5
  80. package/_esm/experimental/eip5792/decorators/eip5792.js.map +1 -1
  81. package/_esm/experimental/index.js +21 -7
  82. package/_esm/experimental/index.js.map +1 -1
  83. package/_esm/index.js +2 -1
  84. package/_esm/index.js.map +1 -1
  85. package/_types/account-abstraction/accounts/implementations/toSimple7702SmartAccount.d.ts +1 -1
  86. package/_types/account-abstraction/accounts/implementations/toSimple7702SmartAccount.d.ts.map +1 -1
  87. package/_types/account-abstraction/index.d.ts +1 -0
  88. package/_types/account-abstraction/index.d.ts.map +1 -1
  89. package/_types/account-abstraction/utils/userOperation/getInitCode.d.ts +3 -0
  90. package/_types/account-abstraction/utils/userOperation/getInitCode.d.ts.map +1 -0
  91. package/_types/account-abstraction/utils/userOperation/getUserOperationHash.d.ts.map +1 -1
  92. package/_types/account-abstraction/utils/userOperation/getUserOperationTypedData.d.ts +39 -0
  93. package/_types/account-abstraction/utils/userOperation/getUserOperationTypedData.d.ts.map +1 -0
  94. package/_types/account-abstraction/utils/userOperation/toPackedUserOperation.d.ts.map +1 -1
  95. package/_types/actions/index.d.ts +5 -0
  96. package/_types/actions/index.d.ts.map +1 -1
  97. package/_types/{experimental/eip5792/actions → actions/wallet}/getCallsStatus.d.ts +10 -10
  98. package/_types/actions/wallet/getCallsStatus.d.ts.map +1 -0
  99. package/_types/{experimental/eip5792/actions → actions/wallet}/getCapabilities.d.ts +9 -9
  100. package/_types/actions/wallet/getCapabilities.d.ts.map +1 -0
  101. package/_types/{experimental/eip5792/actions → actions/wallet}/sendCalls.d.ts +10 -10
  102. package/_types/actions/wallet/sendCalls.d.ts.map +1 -0
  103. package/_types/{experimental/eip5792/actions → actions/wallet}/showCallsStatus.d.ts +8 -8
  104. package/_types/actions/wallet/showCallsStatus.d.ts.map +1 -0
  105. package/_types/{experimental/eip5792/actions → actions/wallet}/waitForCallsStatus.d.ts +9 -9
  106. package/_types/actions/wallet/waitForCallsStatus.d.ts.map +1 -0
  107. package/_types/chains/definitions/gunz.d.ts +34 -0
  108. package/_types/chains/definitions/gunz.d.ts.map +1 -0
  109. package/_types/chains/index.d.ts +1 -0
  110. package/_types/chains/index.d.ts.map +1 -1
  111. package/_types/clients/decorators/wallet.d.ts +126 -0
  112. package/_types/clients/decorators/wallet.d.ts.map +1 -1
  113. package/_types/constants/abis.d.ts +321 -0
  114. package/_types/constants/abis.d.ts.map +1 -1
  115. package/_types/errors/version.d.ts +1 -1
  116. package/_types/errors/version.d.ts.map +1 -1
  117. package/_types/experimental/eip5792/actions/writeContracts.d.ts +1 -3
  118. package/_types/experimental/eip5792/actions/writeContracts.d.ts.map +1 -1
  119. package/_types/experimental/eip5792/decorators/eip5792.d.ts +5 -5
  120. package/_types/experimental/eip5792/decorators/eip5792.d.ts.map +1 -1
  121. package/_types/experimental/index.d.ts +63 -7
  122. package/_types/experimental/index.d.ts.map +1 -1
  123. package/_types/index.d.ts +7 -1
  124. package/_types/index.d.ts.map +1 -1
  125. package/account-abstraction/accounts/implementations/toSimple7702SmartAccount.ts +8 -73
  126. package/account-abstraction/index.ts +5 -0
  127. package/account-abstraction/utils/userOperation/getInitCode.ts +21 -0
  128. package/account-abstraction/utils/userOperation/getUserOperationHash.ts +36 -128
  129. package/account-abstraction/utils/userOperation/getUserOperationTypedData.ts +49 -0
  130. package/account-abstraction/utils/userOperation/toPackedUserOperation.ts +2 -4
  131. package/actions/index.ts +31 -0
  132. package/{experimental/eip5792/actions → actions/wallet}/getCallsStatus.ts +13 -13
  133. package/{experimental/eip5792/actions → actions/wallet}/getCapabilities.ts +10 -10
  134. package/{experimental/eip5792/actions → actions/wallet}/sendCalls.ts +17 -17
  135. package/{experimental/eip5792/actions → actions/wallet}/showCallsStatus.ts +8 -8
  136. package/{experimental/eip5792/actions → actions/wallet}/waitForCallsStatus.ts +11 -11
  137. package/chains/definitions/gunz.ts +26 -0
  138. package/chains/index.ts +1 -0
  139. package/clients/decorators/wallet.ts +164 -0
  140. package/constants/abis.ts +418 -0
  141. package/errors/version.ts +1 -1
  142. package/experimental/eip5792/actions/writeContracts.ts +8 -8
  143. package/experimental/eip5792/decorators/eip5792.ts +11 -9
  144. package/experimental/index.ts +33 -6
  145. package/index.ts +28 -0
  146. package/package.json +3 -3
  147. package/_cjs/experimental/eip5792/actions/getCallsStatus.js.map +0 -1
  148. package/_cjs/experimental/eip5792/actions/getCapabilities.js.map +0 -1
  149. package/_cjs/experimental/eip5792/actions/sendCalls.js.map +0 -1
  150. package/_cjs/experimental/eip5792/actions/showCallsStatus.js.map +0 -1
  151. package/_cjs/experimental/eip5792/actions/waitForCallsStatus.js.map +0 -1
  152. package/_esm/experimental/eip5792/actions/getCallsStatus.js.map +0 -1
  153. package/_esm/experimental/eip5792/actions/sendCalls.js.map +0 -1
  154. package/_esm/experimental/eip5792/actions/showCallsStatus.js.map +0 -1
  155. package/_esm/experimental/eip5792/actions/waitForCallsStatus.js.map +0 -1
  156. package/_types/experimental/eip5792/actions/getCallsStatus.d.ts.map +0 -1
  157. package/_types/experimental/eip5792/actions/getCapabilities.d.ts.map +0 -1
  158. package/_types/experimental/eip5792/actions/sendCalls.d.ts.map +0 -1
  159. package/_types/experimental/eip5792/actions/showCallsStatus.d.ts.map +0 -1
  160. package/_types/experimental/eip5792/actions/waitForCallsStatus.d.ts.map +0 -1
  161. /package/_cjs/{experimental/eip5792/actions → actions/wallet}/showCallsStatus.js +0 -0
@@ -18,6 +18,16 @@ import {
18
18
  type GetAddressesReturnType,
19
19
  getAddresses,
20
20
  } from '../../actions/wallet/getAddresses.js'
21
+ import {
22
+ type GetCallsStatusParameters,
23
+ type GetCallsStatusReturnType,
24
+ getCallsStatus,
25
+ } from '../../actions/wallet/getCallsStatus.js'
26
+ import {
27
+ type GetCapabilitiesParameters,
28
+ type GetCapabilitiesReturnType,
29
+ getCapabilities,
30
+ } from '../../actions/wallet/getCapabilities.js'
21
31
  import {
22
32
  type GetPermissionsReturnType,
23
33
  getPermissions,
@@ -42,6 +52,11 @@ import {
42
52
  type RequestPermissionsReturnType,
43
53
  requestPermissions,
44
54
  } from '../../actions/wallet/requestPermissions.js'
55
+ import {
56
+ type SendCallsParameters,
57
+ type SendCallsReturnType,
58
+ sendCalls,
59
+ } from '../../actions/wallet/sendCalls.js'
45
60
  import {
46
61
  type SendRawTransactionParameters,
47
62
  type SendRawTransactionReturnType,
@@ -53,6 +68,11 @@ import {
53
68
  type SendTransactionReturnType,
54
69
  sendTransaction,
55
70
  } from '../../actions/wallet/sendTransaction.js'
71
+ import {
72
+ type ShowCallsStatusParameters,
73
+ type ShowCallsStatusReturnType,
74
+ showCallsStatus,
75
+ } from '../../actions/wallet/showCallsStatus.js'
56
76
  import {
57
77
  type SignAuthorizationParameters,
58
78
  type SignAuthorizationReturnType,
@@ -78,6 +98,11 @@ import {
78
98
  type SwitchChainParameters,
79
99
  switchChain,
80
100
  } from '../../actions/wallet/switchChain.js'
101
+ import {
102
+ type WaitForCallsStatusParameters,
103
+ type WaitForCallsStatusReturnType,
104
+ waitForCallsStatus,
105
+ } from '../../actions/wallet/waitForCallsStatus.js'
81
106
  import {
82
107
  type WatchAssetParameters,
83
108
  type WatchAssetReturnType,
@@ -168,6 +193,54 @@ export type WalletActions<
168
193
  * const accounts = await client.getAddresses()
169
194
  */
170
195
  getAddresses: () => Promise<GetAddressesReturnType>
196
+ /**
197
+ * Returns the status of a call batch that was sent via `sendCalls`.
198
+ *
199
+ * - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus
200
+ * - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792)
201
+ *
202
+ * @param client - Client to use
203
+ * @returns Status of the calls. {@link GetCallsStatusReturnType}
204
+ *
205
+ * @example
206
+ * import { createWalletClient, custom } from 'viem'
207
+ * import { mainnet } from 'viem/chains'
208
+ *
209
+ * const client = createWalletClient({
210
+ * chain: mainnet,
211
+ * transport: custom(window.ethereum),
212
+ * })
213
+ *
214
+ * const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })
215
+ */
216
+ getCallsStatus: (
217
+ parameters: GetCallsStatusParameters,
218
+ ) => Promise<GetCallsStatusReturnType>
219
+ /**
220
+ * Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc).
221
+ *
222
+ * - Docs: https://viem.sh/docs/actions/wallet/getCapabilities
223
+ * - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792)
224
+ *
225
+ * @param client - Client to use
226
+ * @returns The wallet's capabilities. {@link GetCapabilitiesReturnType}
227
+ *
228
+ * @example
229
+ * import { createWalletClient, custom } from 'viem'
230
+ * import { mainnet } from 'viem/chains'
231
+ *
232
+ * const client = createWalletClient({
233
+ * chain: mainnet,
234
+ * transport: custom(window.ethereum),
235
+ * })
236
+ *
237
+ * const capabilities = await client.getCapabilities({
238
+ * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
239
+ * })
240
+ */
241
+ getCapabilities: (
242
+ parameters?: GetCapabilitiesParameters,
243
+ ) => Promise<GetCapabilitiesReturnType>
171
244
  /**
172
245
  * Returns the chain ID associated with the current network.
173
246
  *
@@ -360,6 +433,44 @@ export type WalletActions<
360
433
  requestPermissions: (
361
434
  args: RequestPermissionsParameters,
362
435
  ) => Promise<RequestPermissionsReturnType>
436
+ /**
437
+ * Requests the connected wallet to send a batch of calls.
438
+ *
439
+ * - Docs: https://viem.sh/docs/actions/wallet/sendCalls
440
+ * - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792)
441
+ *
442
+ * @param client - Client to use
443
+ * @returns Transaction identifier. {@link SendCallsReturnType}
444
+ *
445
+ * @example
446
+ * import { createWalletClient, custom } from 'viem'
447
+ * import { mainnet } from 'viem/chains'
448
+ *
449
+ * const client = createWalletClient({
450
+ * chain: mainnet,
451
+ * transport: custom(window.ethereum),
452
+ * })
453
+ *
454
+ * const id = await client.sendCalls({
455
+ * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
456
+ * calls: [
457
+ * {
458
+ * data: '0xdeadbeef',
459
+ * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
460
+ * },
461
+ * {
462
+ * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
463
+ * value: 69420n,
464
+ * },
465
+ * ],
466
+ * })
467
+ */
468
+ sendCalls: <
469
+ const calls extends readonly unknown[],
470
+ chainOverride extends Chain | undefined = undefined,
471
+ >(
472
+ parameters: SendCallsParameters<chain, account, chainOverride, calls>,
473
+ ) => Promise<SendCallsReturnType>
363
474
  /**
364
475
  * Sends a **signed** transaction to the network
365
476
  *
@@ -435,6 +546,30 @@ export type WalletActions<
435
546
  >(
436
547
  args: SendTransactionParameters<chain, account, chainOverride, request>,
437
548
  ) => Promise<SendTransactionReturnType>
549
+ /**
550
+ * Requests for the wallet to show information about a call batch
551
+ * that was sent via `sendCalls`.
552
+ *
553
+ * - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus
554
+ * - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792)
555
+ *
556
+ * @param client - Client to use
557
+ * @returns Displays status of the calls in wallet. {@link ShowCallsStatusReturnType}
558
+ *
559
+ * @example
560
+ * import { createWalletClient, custom } from 'viem'
561
+ * import { mainnet } from 'viem/chains'
562
+ *
563
+ * const client = createWalletClient({
564
+ * chain: mainnet,
565
+ * transport: custom(window.ethereum),
566
+ * })
567
+ *
568
+ * await client.showCallsStatus({ id: '0xdeadbeef' })
569
+ */
570
+ showCallsStatus: (
571
+ parameters: ShowCallsStatusParameters,
572
+ ) => Promise<ShowCallsStatusReturnType>
438
573
  /**
439
574
  * Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object.
440
575
  *
@@ -699,6 +834,30 @@ export type WalletActions<
699
834
  * await client.switchChain({ id: optimism.id })
700
835
  */
701
836
  switchChain: (args: SwitchChainParameters) => Promise<void>
837
+ /**
838
+ * Waits for the status & receipts of a call bundle that was sent via `sendCalls`.
839
+ *
840
+ * - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus
841
+ * - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792)
842
+ *
843
+ * @param client - Client to use
844
+ * @param parameters - {@link WaitForCallsStatusParameters}
845
+ * @returns Status & receipts of the call bundle. {@link WaitForCallsStatusReturnType}
846
+ *
847
+ * @example
848
+ * import { createWalletClient, custom } from 'viem'
849
+ * import { mainnet } from 'viem/chains'
850
+ *
851
+ * const client = createWalletClient({
852
+ * chain: mainnet,
853
+ * transport: custom(window.ethereum),
854
+ * })
855
+ *
856
+ * const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })
857
+ */
858
+ waitForCallsStatus: (
859
+ parameters: WaitForCallsStatusParameters,
860
+ ) => Promise<WaitForCallsStatusReturnType>
702
861
  /**
703
862
  * Adds an EVM chain to the wallet.
704
863
  *
@@ -803,6 +962,8 @@ export function walletActions<
803
962
  addChain: (args) => addChain(client, args),
804
963
  deployContract: (args) => deployContract(client, args),
805
964
  getAddresses: () => getAddresses(client),
965
+ getCallsStatus: (args) => getCallsStatus(client, args),
966
+ getCapabilities: () => getCapabilities(client),
806
967
  getChainId: () => getChainId(client),
807
968
  getPermissions: () => getPermissions(client),
808
969
  prepareAuthorization: (args) => prepareAuthorization(client, args),
@@ -810,13 +971,16 @@ export function walletActions<
810
971
  prepareTransactionRequest(client as any, args as any) as any,
811
972
  requestAddresses: () => requestAddresses(client),
812
973
  requestPermissions: (args) => requestPermissions(client, args),
974
+ sendCalls: (args) => sendCalls(client, args),
813
975
  sendRawTransaction: (args) => sendRawTransaction(client, args),
814
976
  sendTransaction: (args) => sendTransaction(client, args),
977
+ showCallsStatus: (args) => showCallsStatus(client, args),
815
978
  signAuthorization: (args) => signAuthorization(client, args),
816
979
  signMessage: (args) => signMessage(client, args),
817
980
  signTransaction: (args) => signTransaction(client, args),
818
981
  signTypedData: (args) => signTypedData(client, args),
819
982
  switchChain: (args) => switchChain(client, args),
983
+ waitForCallsStatus: (args) => waitForCallsStatus(client, args),
820
984
  watchAsset: (args) => watchAsset(client, args),
821
985
  writeContract: (args) => writeContract(client, args as any),
822
986
  }
package/constants/abis.ts CHANGED
@@ -685,6 +685,424 @@ export const erc20Abi_bytes32 = [
685
685
  },
686
686
  ] as const
687
687
 
688
+ /** [ERC-1155 Multi Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-1155) */
689
+ export const erc1155Abi = [
690
+ {
691
+ inputs: [
692
+ {
693
+ internalType: 'address',
694
+ name: 'sender',
695
+ type: 'address',
696
+ },
697
+ {
698
+ internalType: 'uint256',
699
+ name: 'balance',
700
+ type: 'uint256',
701
+ },
702
+ {
703
+ internalType: 'uint256',
704
+ name: 'needed',
705
+ type: 'uint256',
706
+ },
707
+ {
708
+ internalType: 'uint256',
709
+ name: 'tokenId',
710
+ type: 'uint256',
711
+ },
712
+ ],
713
+ name: 'ERC1155InsufficientBalance',
714
+ type: 'error',
715
+ },
716
+ {
717
+ inputs: [
718
+ {
719
+ internalType: 'address',
720
+ name: 'approver',
721
+ type: 'address',
722
+ },
723
+ ],
724
+ name: 'ERC1155InvalidApprover',
725
+ type: 'error',
726
+ },
727
+ {
728
+ inputs: [
729
+ {
730
+ internalType: 'uint256',
731
+ name: 'idsLength',
732
+ type: 'uint256',
733
+ },
734
+ {
735
+ internalType: 'uint256',
736
+ name: 'valuesLength',
737
+ type: 'uint256',
738
+ },
739
+ ],
740
+ name: 'ERC1155InvalidArrayLength',
741
+ type: 'error',
742
+ },
743
+ {
744
+ inputs: [
745
+ {
746
+ internalType: 'address',
747
+ name: 'operator',
748
+ type: 'address',
749
+ },
750
+ ],
751
+ name: 'ERC1155InvalidOperator',
752
+ type: 'error',
753
+ },
754
+ {
755
+ inputs: [
756
+ {
757
+ internalType: 'address',
758
+ name: 'receiver',
759
+ type: 'address',
760
+ },
761
+ ],
762
+ name: 'ERC1155InvalidReceiver',
763
+ type: 'error',
764
+ },
765
+ {
766
+ inputs: [
767
+ {
768
+ internalType: 'address',
769
+ name: 'sender',
770
+ type: 'address',
771
+ },
772
+ ],
773
+ name: 'ERC1155InvalidSender',
774
+ type: 'error',
775
+ },
776
+ {
777
+ inputs: [
778
+ {
779
+ internalType: 'address',
780
+ name: 'operator',
781
+ type: 'address',
782
+ },
783
+ {
784
+ internalType: 'address',
785
+ name: 'owner',
786
+ type: 'address',
787
+ },
788
+ ],
789
+ name: 'ERC1155MissingApprovalForAll',
790
+ type: 'error',
791
+ },
792
+ {
793
+ anonymous: false,
794
+ inputs: [
795
+ {
796
+ indexed: true,
797
+ internalType: 'address',
798
+ name: 'account',
799
+ type: 'address',
800
+ },
801
+ {
802
+ indexed: true,
803
+ internalType: 'address',
804
+ name: 'operator',
805
+ type: 'address',
806
+ },
807
+ {
808
+ indexed: false,
809
+ internalType: 'bool',
810
+ name: 'approved',
811
+ type: 'bool',
812
+ },
813
+ ],
814
+ name: 'ApprovalForAll',
815
+ type: 'event',
816
+ },
817
+ {
818
+ anonymous: false,
819
+ inputs: [
820
+ {
821
+ indexed: true,
822
+ internalType: 'address',
823
+ name: 'operator',
824
+ type: 'address',
825
+ },
826
+ {
827
+ indexed: true,
828
+ internalType: 'address',
829
+ name: 'from',
830
+ type: 'address',
831
+ },
832
+ {
833
+ indexed: true,
834
+ internalType: 'address',
835
+ name: 'to',
836
+ type: 'address',
837
+ },
838
+ {
839
+ indexed: false,
840
+ internalType: 'uint256[]',
841
+ name: 'ids',
842
+ type: 'uint256[]',
843
+ },
844
+ {
845
+ indexed: false,
846
+ internalType: 'uint256[]',
847
+ name: 'values',
848
+ type: 'uint256[]',
849
+ },
850
+ ],
851
+ name: 'TransferBatch',
852
+ type: 'event',
853
+ },
854
+ {
855
+ anonymous: false,
856
+ inputs: [
857
+ {
858
+ indexed: true,
859
+ internalType: 'address',
860
+ name: 'operator',
861
+ type: 'address',
862
+ },
863
+ {
864
+ indexed: true,
865
+ internalType: 'address',
866
+ name: 'from',
867
+ type: 'address',
868
+ },
869
+ {
870
+ indexed: true,
871
+ internalType: 'address',
872
+ name: 'to',
873
+ type: 'address',
874
+ },
875
+ {
876
+ indexed: false,
877
+ internalType: 'uint256',
878
+ name: 'id',
879
+ type: 'uint256',
880
+ },
881
+ {
882
+ indexed: false,
883
+ internalType: 'uint256',
884
+ name: 'value',
885
+ type: 'uint256',
886
+ },
887
+ ],
888
+ name: 'TransferSingle',
889
+ type: 'event',
890
+ },
891
+ {
892
+ anonymous: false,
893
+ inputs: [
894
+ {
895
+ indexed: false,
896
+ internalType: 'string',
897
+ name: 'value',
898
+ type: 'string',
899
+ },
900
+ {
901
+ indexed: true,
902
+ internalType: 'uint256',
903
+ name: 'id',
904
+ type: 'uint256',
905
+ },
906
+ ],
907
+ name: 'URI',
908
+ type: 'event',
909
+ },
910
+ {
911
+ inputs: [
912
+ {
913
+ internalType: 'address',
914
+ name: 'account',
915
+ type: 'address',
916
+ },
917
+ {
918
+ internalType: 'uint256',
919
+ name: 'id',
920
+ type: 'uint256',
921
+ },
922
+ ],
923
+ name: 'balanceOf',
924
+ outputs: [
925
+ {
926
+ internalType: 'uint256',
927
+ name: '',
928
+ type: 'uint256',
929
+ },
930
+ ],
931
+ stateMutability: 'view',
932
+ type: 'function',
933
+ },
934
+ {
935
+ inputs: [
936
+ {
937
+ internalType: 'address[]',
938
+ name: 'accounts',
939
+ type: 'address[]',
940
+ },
941
+ {
942
+ internalType: 'uint256[]',
943
+ name: 'ids',
944
+ type: 'uint256[]',
945
+ },
946
+ ],
947
+ name: 'balanceOfBatch',
948
+ outputs: [
949
+ {
950
+ internalType: 'uint256[]',
951
+ name: '',
952
+ type: 'uint256[]',
953
+ },
954
+ ],
955
+ stateMutability: 'view',
956
+ type: 'function',
957
+ },
958
+ {
959
+ inputs: [
960
+ {
961
+ internalType: 'address',
962
+ name: 'account',
963
+ type: 'address',
964
+ },
965
+ {
966
+ internalType: 'address',
967
+ name: 'operator',
968
+ type: 'address',
969
+ },
970
+ ],
971
+ name: 'isApprovedForAll',
972
+ outputs: [
973
+ {
974
+ internalType: 'bool',
975
+ name: '',
976
+ type: 'bool',
977
+ },
978
+ ],
979
+ stateMutability: 'view',
980
+ type: 'function',
981
+ },
982
+ {
983
+ inputs: [
984
+ {
985
+ internalType: 'address',
986
+ name: 'from',
987
+ type: 'address',
988
+ },
989
+ {
990
+ internalType: 'address',
991
+ name: 'to',
992
+ type: 'address',
993
+ },
994
+ {
995
+ internalType: 'uint256[]',
996
+ name: 'ids',
997
+ type: 'uint256[]',
998
+ },
999
+ {
1000
+ internalType: 'uint256[]',
1001
+ name: 'values',
1002
+ type: 'uint256[]',
1003
+ },
1004
+ {
1005
+ internalType: 'bytes',
1006
+ name: 'data',
1007
+ type: 'bytes',
1008
+ },
1009
+ ],
1010
+ name: 'safeBatchTransferFrom',
1011
+ outputs: [],
1012
+ stateMutability: 'nonpayable',
1013
+ type: 'function',
1014
+ },
1015
+ {
1016
+ inputs: [
1017
+ {
1018
+ internalType: 'address',
1019
+ name: 'from',
1020
+ type: 'address',
1021
+ },
1022
+ {
1023
+ internalType: 'address',
1024
+ name: 'to',
1025
+ type: 'address',
1026
+ },
1027
+ {
1028
+ internalType: 'uint256',
1029
+ name: 'id',
1030
+ type: 'uint256',
1031
+ },
1032
+ {
1033
+ internalType: 'uint256',
1034
+ name: 'value',
1035
+ type: 'uint256',
1036
+ },
1037
+ {
1038
+ internalType: 'bytes',
1039
+ name: 'data',
1040
+ type: 'bytes',
1041
+ },
1042
+ ],
1043
+ name: 'safeTransferFrom',
1044
+ outputs: [],
1045
+ stateMutability: 'nonpayable',
1046
+ type: 'function',
1047
+ },
1048
+ {
1049
+ inputs: [
1050
+ {
1051
+ internalType: 'address',
1052
+ name: 'operator',
1053
+ type: 'address',
1054
+ },
1055
+ {
1056
+ internalType: 'bool',
1057
+ name: 'approved',
1058
+ type: 'bool',
1059
+ },
1060
+ ],
1061
+ name: 'setApprovalForAll',
1062
+ outputs: [],
1063
+ stateMutability: 'nonpayable',
1064
+ type: 'function',
1065
+ },
1066
+ {
1067
+ inputs: [
1068
+ {
1069
+ internalType: 'bytes4',
1070
+ name: 'interfaceId',
1071
+ type: 'bytes4',
1072
+ },
1073
+ ],
1074
+ name: 'supportsInterface',
1075
+ outputs: [
1076
+ {
1077
+ internalType: 'bool',
1078
+ name: '',
1079
+ type: 'bool',
1080
+ },
1081
+ ],
1082
+ stateMutability: 'view',
1083
+ type: 'function',
1084
+ },
1085
+ {
1086
+ inputs: [
1087
+ {
1088
+ internalType: 'uint256',
1089
+ name: '',
1090
+ type: 'uint256',
1091
+ },
1092
+ ],
1093
+ name: 'uri',
1094
+ outputs: [
1095
+ {
1096
+ internalType: 'string',
1097
+ name: '',
1098
+ type: 'string',
1099
+ },
1100
+ ],
1101
+ stateMutability: 'view',
1102
+ type: 'function',
1103
+ },
1104
+ ] as const
1105
+
688
1106
  /** [ERC-721 Non-Fungible Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-721) */
689
1107
  export const erc721Abi = [
690
1108
  {
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.28.0-entrypoint-0-8-20250417075822'
1
+ export const version = '2.28.0'
@@ -1,5 +1,13 @@
1
+ // TODO(v3): Remove this.
2
+
1
3
  import type { Abi, AbiStateMutability, Address, Narrow } from 'abitype'
2
4
 
5
+ import {
6
+ type SendCallsErrorType,
7
+ type SendCallsParameters,
8
+ type SendCallsReturnType,
9
+ sendCalls,
10
+ } from '../../../actions/wallet/sendCalls.js'
3
11
  import type { Client } from '../../../clients/createClient.js'
4
12
  import type { Transport } from '../../../clients/transports/createTransport.js'
5
13
  import type { ErrorType } from '../../../errors/utils.js'
@@ -18,12 +26,6 @@ import {
18
26
  encodeFunctionData,
19
27
  } from '../../../utils/abi/encodeFunctionData.js'
20
28
  import { getAction } from '../../../utils/getAction.js'
21
- import {
22
- type SendCallsErrorType,
23
- type SendCallsParameters,
24
- type SendCallsReturnType,
25
- sendCalls,
26
- } from './sendCalls.js'
27
29
 
28
30
  export type WriteContractsParameters<
29
31
  contracts extends
@@ -50,8 +52,6 @@ export type WriteContractsErrorType =
50
52
  | ErrorType
51
53
 
52
54
  /**
53
- * @deprecated Use {@link sendCalls} instead. See https://viem.sh/experimental/eip5792/sendCalls#contract-calls.
54
- *
55
55
  * Requests for the wallet to sign and broadcast a batch of write contract calls (transactions) to the network.
56
56
  *
57
57
  * - Docs: https://viem.sh/experimental/eip5792/writeContracts