viem 2.44.2 → 2.45.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 (217) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/_cjs/account-abstraction/actions/bundler/prepareUserOperation.js +4 -2
  3. package/_cjs/account-abstraction/actions/bundler/prepareUserOperation.js.map +1 -1
  4. package/_cjs/account-abstraction/actions/bundler/sendUserOperation.js.map +1 -1
  5. package/_cjs/account-abstraction/clients/createBundlerClient.js +8 -2
  6. package/_cjs/account-abstraction/clients/createBundlerClient.js.map +1 -1
  7. package/_cjs/actions/public/estimateContractGas.js +3 -1
  8. package/_cjs/actions/public/estimateContractGas.js.map +1 -1
  9. package/_cjs/actions/public/simulateContract.js +3 -1
  10. package/_cjs/actions/public/simulateContract.js.map +1 -1
  11. package/_cjs/actions/wallet/sendCalls.js +17 -1
  12. package/_cjs/actions/wallet/sendCalls.js.map +1 -1
  13. package/_cjs/actions/wallet/sendTransaction.js +11 -7
  14. package/_cjs/actions/wallet/sendTransaction.js.map +1 -1
  15. package/_cjs/actions/wallet/sendTransactionSync.js +11 -7
  16. package/_cjs/actions/wallet/sendTransactionSync.js.map +1 -1
  17. package/_cjs/actions/wallet/writeContract.js +2 -2
  18. package/_cjs/actions/wallet/writeContract.js.map +1 -1
  19. package/_cjs/chains/definitions/megaeth.js +33 -0
  20. package/_cjs/chains/definitions/megaeth.js.map +1 -0
  21. package/_cjs/chains/definitions/megaethTestnet.js +6 -1
  22. package/_cjs/chains/definitions/megaethTestnet.js.map +1 -1
  23. package/_cjs/chains/definitions/rise.js +28 -0
  24. package/_cjs/chains/definitions/rise.js.map +1 -0
  25. package/_cjs/chains/definitions/stable.js +35 -0
  26. package/_cjs/chains/definitions/stable.js.map +1 -0
  27. package/_cjs/chains/definitions/stableTestnet.js +10 -3
  28. package/_cjs/chains/definitions/stableTestnet.js.map +1 -1
  29. package/_cjs/chains/index.js +13 -7
  30. package/_cjs/chains/index.js.map +1 -1
  31. package/_cjs/clients/createClient.js +2 -1
  32. package/_cjs/clients/createClient.js.map +1 -1
  33. package/_cjs/clients/createWalletClient.js.map +1 -1
  34. package/_cjs/errors/version.js +1 -1
  35. package/_cjs/index.js.map +1 -1
  36. package/_cjs/op-stack/index.js +9 -1
  37. package/_cjs/op-stack/index.js.map +1 -1
  38. package/_cjs/tempo/Abis.js +2 -2
  39. package/_cjs/tempo/Abis.js.map +1 -1
  40. package/_cjs/tempo/Addresses.js +2 -1
  41. package/_cjs/tempo/Addresses.js.map +1 -1
  42. package/_cjs/tempo/Decorator.js +19 -0
  43. package/_cjs/tempo/Decorator.js.map +1 -1
  44. package/_cjs/tempo/Transport.js +1 -1
  45. package/_cjs/tempo/Transport.js.map +1 -1
  46. package/_cjs/tempo/actions/fee.js +91 -0
  47. package/_cjs/tempo/actions/fee.js.map +1 -1
  48. package/_cjs/tempo/actions/index.js +2 -1
  49. package/_cjs/tempo/actions/index.js.map +1 -1
  50. package/_cjs/tempo/actions/validator.js +308 -0
  51. package/_cjs/tempo/actions/validator.js.map +1 -0
  52. package/_cjs/types/dataSuffix.js +3 -0
  53. package/_cjs/types/dataSuffix.js.map +1 -0
  54. package/_cjs/utils/abi/decodeEventLog.js +29 -12
  55. package/_cjs/utils/abi/decodeEventLog.js.map +1 -1
  56. package/_esm/account-abstraction/actions/bundler/prepareUserOperation.js +4 -2
  57. package/_esm/account-abstraction/actions/bundler/prepareUserOperation.js.map +1 -1
  58. package/_esm/account-abstraction/actions/bundler/sendUserOperation.js.map +1 -1
  59. package/_esm/account-abstraction/clients/createBundlerClient.js +8 -2
  60. package/_esm/account-abstraction/clients/createBundlerClient.js.map +1 -1
  61. package/_esm/actions/public/estimateContractGas.js +3 -1
  62. package/_esm/actions/public/estimateContractGas.js.map +1 -1
  63. package/_esm/actions/public/simulateContract.js +3 -1
  64. package/_esm/actions/public/simulateContract.js.map +1 -1
  65. package/_esm/actions/wallet/sendCalls.js +17 -1
  66. package/_esm/actions/wallet/sendCalls.js.map +1 -1
  67. package/_esm/actions/wallet/sendTransaction.js +11 -7
  68. package/_esm/actions/wallet/sendTransaction.js.map +1 -1
  69. package/_esm/actions/wallet/sendTransactionSync.js +11 -7
  70. package/_esm/actions/wallet/sendTransactionSync.js.map +1 -1
  71. package/_esm/actions/wallet/writeContract.js +2 -2
  72. package/_esm/actions/wallet/writeContract.js.map +1 -1
  73. package/_esm/chains/definitions/megaeth.js +30 -0
  74. package/_esm/chains/definitions/megaeth.js.map +1 -0
  75. package/_esm/chains/definitions/megaethTestnet.js +6 -1
  76. package/_esm/chains/definitions/megaethTestnet.js.map +1 -1
  77. package/_esm/chains/definitions/rise.js +25 -0
  78. package/_esm/chains/definitions/rise.js.map +1 -0
  79. package/_esm/chains/definitions/stable.js +32 -0
  80. package/_esm/chains/definitions/stable.js.map +1 -0
  81. package/_esm/chains/definitions/stableTestnet.js +10 -3
  82. package/_esm/chains/definitions/stableTestnet.js.map +1 -1
  83. package/_esm/chains/index.js +3 -0
  84. package/_esm/chains/index.js.map +1 -1
  85. package/_esm/clients/createClient.js +2 -1
  86. package/_esm/clients/createClient.js.map +1 -1
  87. package/_esm/clients/createWalletClient.js.map +1 -1
  88. package/_esm/errors/version.js +1 -1
  89. package/_esm/index.js.map +1 -1
  90. package/_esm/op-stack/index.js +4 -0
  91. package/_esm/op-stack/index.js.map +1 -1
  92. package/_esm/tempo/Abis.js +1 -1
  93. package/_esm/tempo/Abis.js.map +1 -1
  94. package/_esm/tempo/Account.js +6 -6
  95. package/_esm/tempo/Addresses.js +1 -0
  96. package/_esm/tempo/Addresses.js.map +1 -1
  97. package/_esm/tempo/Decorator.js +19 -0
  98. package/_esm/tempo/Decorator.js.map +1 -1
  99. package/_esm/tempo/Transport.js +1 -1
  100. package/_esm/tempo/Transport.js.map +1 -1
  101. package/_esm/tempo/WebAuthnP256.js +2 -2
  102. package/_esm/tempo/actions/amm.js +28 -28
  103. package/_esm/tempo/actions/dex.js +68 -68
  104. package/_esm/tempo/actions/faucet.js +4 -4
  105. package/_esm/tempo/actions/fee.js +236 -10
  106. package/_esm/tempo/actions/fee.js.map +1 -1
  107. package/_esm/tempo/actions/index.js +1 -0
  108. package/_esm/tempo/actions/index.js.map +1 -1
  109. package/_esm/tempo/actions/nonce.js +4 -4
  110. package/_esm/tempo/actions/policy.js +36 -36
  111. package/_esm/tempo/actions/reward.js +28 -28
  112. package/_esm/tempo/actions/token.js +122 -122
  113. package/_esm/tempo/actions/validator.js +1017 -0
  114. package/_esm/tempo/actions/validator.js.map +1 -0
  115. package/_esm/types/dataSuffix.js +2 -0
  116. package/_esm/types/dataSuffix.js.map +1 -0
  117. package/_esm/utils/abi/decodeEventLog.js +34 -13
  118. package/_esm/utils/abi/decodeEventLog.js.map +1 -1
  119. package/_types/account-abstraction/actions/bundler/prepareUserOperation.d.ts +2 -0
  120. package/_types/account-abstraction/actions/bundler/prepareUserOperation.d.ts.map +1 -1
  121. package/_types/account-abstraction/actions/bundler/sendUserOperation.d.ts +2 -0
  122. package/_types/account-abstraction/actions/bundler/sendUserOperation.d.ts.map +1 -1
  123. package/_types/account-abstraction/clients/createBundlerClient.d.ts +4 -0
  124. package/_types/account-abstraction/clients/createBundlerClient.d.ts.map +1 -1
  125. package/_types/actions/public/estimateContractGas.d.ts.map +1 -1
  126. package/_types/actions/public/simulateContract.d.ts.map +1 -1
  127. package/_types/actions/wallet/sendCalls.d.ts.map +1 -1
  128. package/_types/actions/wallet/sendTransaction.d.ts +7 -2
  129. package/_types/actions/wallet/sendTransaction.d.ts.map +1 -1
  130. package/_types/actions/wallet/sendTransactionSync.d.ts +5 -0
  131. package/_types/actions/wallet/sendTransactionSync.d.ts.map +1 -1
  132. package/_types/actions/wallet/writeContract.d.ts.map +1 -1
  133. package/_types/chains/definitions/megaeth.d.ts +46 -0
  134. package/_types/chains/definitions/megaeth.d.ts.map +1 -0
  135. package/_types/chains/definitions/megaethTestnet.d.ts +6 -1
  136. package/_types/chains/definitions/megaethTestnet.d.ts.map +1 -1
  137. package/_types/chains/definitions/rise.d.ts +46 -0
  138. package/_types/chains/definitions/rise.d.ts.map +1 -0
  139. package/_types/chains/definitions/stable.d.ts +47 -0
  140. package/_types/chains/definitions/stable.d.ts.map +1 -0
  141. package/_types/chains/definitions/stableTestnet.d.ts +10 -13
  142. package/_types/chains/definitions/stableTestnet.d.ts.map +1 -1
  143. package/_types/chains/index.d.ts +3 -0
  144. package/_types/chains/index.d.ts.map +1 -1
  145. package/_types/clients/createClient.d.ts +5 -0
  146. package/_types/clients/createClient.d.ts.map +1 -1
  147. package/_types/clients/createWalletClient.d.ts +1 -1
  148. package/_types/clients/createWalletClient.d.ts.map +1 -1
  149. package/_types/errors/version.d.ts +1 -1
  150. package/_types/index.d.ts +2 -1
  151. package/_types/index.d.ts.map +1 -1
  152. package/_types/op-stack/index.d.ts +4 -0
  153. package/_types/op-stack/index.d.ts.map +1 -1
  154. package/_types/tempo/Abis.d.ts +1 -1
  155. package/_types/tempo/Abis.d.ts.map +1 -1
  156. package/_types/tempo/Account.d.ts +6 -6
  157. package/_types/tempo/Addresses.d.ts +1 -0
  158. package/_types/tempo/Addresses.d.ts.map +1 -1
  159. package/_types/tempo/Decorator.d.ts +607 -208
  160. package/_types/tempo/Decorator.d.ts.map +1 -1
  161. package/_types/tempo/Transport.d.ts.map +1 -1
  162. package/_types/tempo/WebAuthnP256.d.ts +2 -2
  163. package/_types/tempo/actions/amm.d.ts +28 -28
  164. package/_types/tempo/actions/dex.d.ts +68 -68
  165. package/_types/tempo/actions/faucet.d.ts +4 -4
  166. package/_types/tempo/actions/fee.d.ts +380 -10
  167. package/_types/tempo/actions/fee.d.ts.map +1 -1
  168. package/_types/tempo/actions/index.d.ts +1 -0
  169. package/_types/tempo/actions/index.d.ts.map +1 -1
  170. package/_types/tempo/actions/nonce.d.ts +4 -4
  171. package/_types/tempo/actions/policy.d.ts +36 -36
  172. package/_types/tempo/actions/reward.d.ts +28 -28
  173. package/_types/tempo/actions/token.d.ts +122 -122
  174. package/_types/tempo/actions/validator.d.ts +1174 -0
  175. package/_types/tempo/actions/validator.d.ts.map +1 -0
  176. package/_types/types/dataSuffix.d.ts +16 -0
  177. package/_types/types/dataSuffix.d.ts.map +1 -0
  178. package/_types/utils/abi/decodeEventLog.d.ts.map +1 -1
  179. package/account-abstraction/actions/bundler/prepareUserOperation.ts +7 -1
  180. package/account-abstraction/actions/bundler/sendUserOperation.ts +2 -0
  181. package/account-abstraction/clients/createBundlerClient.ts +12 -1
  182. package/actions/public/estimateContractGas.ts +11 -2
  183. package/actions/public/simulateContract.ts +11 -2
  184. package/actions/wallet/sendCalls.ts +18 -1
  185. package/actions/wallet/sendTransaction.ts +19 -8
  186. package/actions/wallet/sendTransactionSync.ts +17 -7
  187. package/actions/wallet/writeContract.ts +1 -2
  188. package/chains/definitions/megaeth.ts +30 -0
  189. package/chains/definitions/megaethTestnet.ts +6 -1
  190. package/chains/definitions/rise.ts +25 -0
  191. package/chains/definitions/stable.ts +32 -0
  192. package/chains/definitions/stableTestnet.ts +10 -3
  193. package/chains/index.ts +3 -0
  194. package/clients/createClient.ts +7 -0
  195. package/clients/createWalletClient.ts +1 -0
  196. package/errors/version.ts +1 -1
  197. package/index.ts +2 -0
  198. package/op-stack/index.ts +24 -0
  199. package/package.json +1 -1
  200. package/tempo/Abis.ts +1 -1
  201. package/tempo/Account.ts +6 -6
  202. package/tempo/Addresses.ts +1 -0
  203. package/tempo/Decorator.ts +672 -208
  204. package/tempo/Transport.ts +4 -1
  205. package/tempo/WebAuthnP256.ts +2 -2
  206. package/tempo/actions/amm.ts +28 -28
  207. package/tempo/actions/dex.ts +68 -68
  208. package/tempo/actions/faucet.ts +4 -4
  209. package/tempo/actions/fee.ts +346 -10
  210. package/tempo/actions/index.ts +1 -0
  211. package/tempo/actions/nonce.ts +4 -4
  212. package/tempo/actions/policy.ts +36 -36
  213. package/tempo/actions/reward.ts +28 -28
  214. package/tempo/actions/token.ts +122 -122
  215. package/tempo/actions/validator.ts +1417 -0
  216. package/types/dataSuffix.ts +18 -0
  217. package/utils/abi/decodeEventLog.ts +38 -14
@@ -42,8 +42,8 @@ import { defineCall } from '../internal/utils.js'
42
42
  * @example
43
43
  * ```ts
44
44
  * import { createClient, http } from 'viem'
45
- * import { tempo } from 'tempo.ts/chains'
46
- * import { Actions } from 'tempo.ts/viem'
45
+ * import { tempo } from 'viem/chains'
46
+ * import { Actions } from 'viem/tempo'
47
47
  * import { privateKeyToAccount } from 'viem/accounts'
48
48
  *
49
49
  * const client = createClient({
@@ -116,8 +116,8 @@ export namespace claim {
116
116
  * @example
117
117
  * ```ts
118
118
  * import { createClient, http, walletActions } from 'viem'
119
- * import { tempo } from 'tempo.ts/chains'
120
- * import { Actions } from 'tempo.ts/viem'
119
+ * import { tempo } from 'viem/chains'
120
+ * import { Actions } from 'viem/tempo'
121
121
  *
122
122
  * const client = createClient({
123
123
  * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
@@ -165,8 +165,8 @@ export namespace claim {
165
165
  * @example
166
166
  * ```ts
167
167
  * import { createClient, http } from 'viem'
168
- * import { tempo } from 'tempo.ts/chains'
169
- * import { Actions } from 'tempo.ts/viem'
168
+ * import { tempo } from 'viem/chains'
169
+ * import { Actions } from 'viem/tempo'
170
170
  * import { privateKeyToAccount } from 'viem/accounts'
171
171
  *
172
172
  * const client = createClient({
@@ -229,8 +229,8 @@ export namespace claimSync {
229
229
  * @example
230
230
  * ```ts
231
231
  * import { createClient, http } from 'viem'
232
- * import { tempo } from 'tempo.ts/chains'
233
- * import { Actions } from 'tempo.ts/viem'
232
+ * import { tempo } from 'viem/chains'
233
+ * import { Actions } from 'viem/tempo'
234
234
  * import { privateKeyToAccount } from 'viem/accounts'
235
235
  *
236
236
  * const client = createClient({
@@ -273,8 +273,8 @@ export async function distribute<
273
273
  * @example
274
274
  * ```ts
275
275
  * import { createClient, http } from 'viem'
276
- * import { tempo } from 'tempo.ts/chains'
277
- * import { Actions } from 'tempo.ts/viem'
276
+ * import { tempo } from 'viem/chains'
277
+ * import { Actions } from 'viem/tempo'
278
278
  * import { privateKeyToAccount } from 'viem/accounts'
279
279
  *
280
280
  * const client = createClient({
@@ -359,8 +359,8 @@ export namespace distribute {
359
359
  * @example
360
360
  * ```ts
361
361
  * import { createClient, http, walletActions } from 'viem'
362
- * import { tempo } from 'tempo.ts/chains'
363
- * import { Actions } from 'tempo.ts/viem'
362
+ * import { tempo } from 'viem/chains'
363
+ * import { Actions } from 'viem/tempo'
364
364
  *
365
365
  * const client = createClient({
366
366
  * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
@@ -433,8 +433,8 @@ export declare namespace distributeSync {
433
433
  * @example
434
434
  * ```ts
435
435
  * import { createClient, http } from 'viem'
436
- * import { tempo } from 'tempo.ts/chains'
437
- * import { Actions } from 'tempo.ts/viem'
436
+ * import { tempo } from 'viem/chains'
437
+ * import { Actions } from 'viem/tempo'
438
438
  *
439
439
  * const client = createClient({
440
440
  * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
@@ -499,8 +499,8 @@ export namespace getGlobalRewardPerToken {
499
499
  * @example
500
500
  * ```ts
501
501
  * import { createClient, http } from 'viem'
502
- * import { tempo } from 'tempo.ts/chains'
503
- * import { Actions } from 'tempo.ts/viem'
502
+ * import { tempo } from 'viem/chains'
503
+ * import { Actions } from 'viem/tempo'
504
504
  *
505
505
  * const client = createClient({
506
506
  * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
@@ -572,8 +572,8 @@ export namespace getPendingRewards {
572
572
  * @example
573
573
  * ```ts
574
574
  * import { createClient, http } from 'viem'
575
- * import { tempo } from 'tempo.ts/chains'
576
- * import { Actions } from 'tempo.ts/viem'
575
+ * import { tempo } from 'viem/chains'
576
+ * import { Actions } from 'viem/tempo'
577
577
  *
578
578
  * const client = createClient({
579
579
  * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
@@ -648,8 +648,8 @@ export namespace getUserRewardInfo {
648
648
  * @example
649
649
  * ```ts
650
650
  * import { createClient, http } from 'viem'
651
- * import { tempo } from 'tempo.ts/chains'
652
- * import { Actions } from 'tempo.ts/viem'
651
+ * import { tempo } from 'viem/chains'
652
+ * import { Actions } from 'viem/tempo'
653
653
  * import { privateKeyToAccount } from 'viem/accounts'
654
654
  *
655
655
  * const client = createClient({
@@ -693,8 +693,8 @@ export async function setRecipient<
693
693
  * @example
694
694
  * ```ts
695
695
  * import { createClient, http } from 'viem'
696
- * import { tempo } from 'tempo.ts/chains'
697
- * import { Actions } from 'tempo.ts/viem'
696
+ * import { tempo } from 'viem/chains'
697
+ * import { Actions } from 'viem/tempo'
698
698
  * import { privateKeyToAccount } from 'viem/accounts'
699
699
  *
700
700
  * const client = createClient({
@@ -779,8 +779,8 @@ export namespace setRecipient {
779
779
  * @example
780
780
  * ```ts
781
781
  * import { createClient, http, walletActions } from 'viem'
782
- * import { tempo } from 'tempo.ts/chains'
783
- * import { Actions } from 'tempo.ts/viem'
782
+ * import { tempo } from 'viem/chains'
783
+ * import { Actions } from 'viem/tempo'
784
784
  *
785
785
  * const client = createClient({
786
786
  * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
@@ -850,8 +850,8 @@ export declare namespace setRecipientSync {
850
850
  * @example
851
851
  * ```ts
852
852
  * import { createClient, http } from 'viem'
853
- * import { tempo } from 'tempo.ts/chains'
854
- * import { Actions } from 'tempo.ts/viem'
853
+ * import { tempo } from 'viem/chains'
854
+ * import { Actions } from 'viem/tempo'
855
855
  *
856
856
  * const client = createClient({
857
857
  * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
@@ -924,8 +924,8 @@ export declare namespace watchRewardDistributed {
924
924
  * @example
925
925
  * ```ts
926
926
  * import { createClient, http } from 'viem'
927
- * import { tempo } from 'tempo.ts/chains'
928
- * import { Actions } from 'tempo.ts/viem'
927
+ * import { tempo } from 'viem/chains'
928
+ * import { Actions } from 'viem/tempo'
929
929
  *
930
930
  * const client = createClient({
931
931
  * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })