viem 2.28.0-entrypoint-0-8-20250417075822 → 2.28.1-canary-20250426072350

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 (178) hide show
  1. package/CHANGELOG.md +25 -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 +7 -7
  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/definitions/memecore.js +36 -0
  28. package/_cjs/chains/definitions/memecore.js.map +1 -0
  29. package/_cjs/chains/definitions/memecoreFormicariumTestnet.js +36 -0
  30. package/_cjs/chains/definitions/memecoreFormicariumTestnet.js.map +1 -0
  31. package/_cjs/chains/index.js +15 -9
  32. package/_cjs/chains/index.js.map +1 -1
  33. package/_cjs/clients/decorators/wallet.js +10 -0
  34. package/_cjs/clients/decorators/wallet.js.map +1 -1
  35. package/_cjs/constants/abis.js +417 -1
  36. package/_cjs/constants/abis.js.map +1 -1
  37. package/_cjs/errors/version.js +1 -1
  38. package/_cjs/errors/version.js.map +1 -1
  39. package/_cjs/experimental/eip5792/actions/writeContracts.js +1 -1
  40. package/_cjs/experimental/eip5792/actions/writeContracts.js.map +1 -1
  41. package/_cjs/experimental/eip5792/decorators/eip5792.js +5 -5
  42. package/_cjs/experimental/eip5792/decorators/eip5792.js.map +1 -1
  43. package/_cjs/experimental/index.js +6 -7
  44. package/_cjs/experimental/index.js.map +1 -1
  45. package/_cjs/index.js +12 -9
  46. package/_cjs/index.js.map +1 -1
  47. package/_esm/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js +8 -64
  48. package/_esm/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js.map +1 -1
  49. package/_esm/account-abstraction/index.js +1 -0
  50. package/_esm/account-abstraction/index.js.map +1 -1
  51. package/_esm/account-abstraction/utils/userOperation/getInitCode.js +15 -0
  52. package/_esm/account-abstraction/utils/userOperation/getInitCode.js.map +1 -0
  53. package/_esm/account-abstraction/utils/userOperation/getUserOperationHash.js +29 -108
  54. package/_esm/account-abstraction/utils/userOperation/getUserOperationHash.js.map +1 -1
  55. package/_esm/account-abstraction/utils/userOperation/getUserOperationTypedData.js +29 -0
  56. package/_esm/account-abstraction/utils/userOperation/getUserOperationTypedData.js.map +1 -0
  57. package/_esm/account-abstraction/utils/userOperation/toPackedUserOperation.js +3 -2
  58. package/_esm/account-abstraction/utils/userOperation/toPackedUserOperation.js.map +1 -1
  59. package/_esm/actions/index.js +5 -0
  60. package/_esm/actions/index.js.map +1 -1
  61. package/_esm/{experimental/eip5792/actions → actions/wallet}/getCallsStatus.js +5 -5
  62. package/_esm/actions/wallet/getCallsStatus.js.map +1 -0
  63. package/_esm/{experimental/eip5792/actions → actions/wallet}/getCapabilities.js +3 -3
  64. package/_esm/actions/wallet/getCapabilities.js.map +1 -0
  65. package/_esm/{experimental/eip5792/actions → actions/wallet}/sendCalls.js +9 -9
  66. package/_esm/actions/wallet/sendCalls.js.map +1 -0
  67. package/_esm/{experimental/eip5792/actions → actions/wallet}/showCallsStatus.js +2 -2
  68. package/_esm/actions/wallet/showCallsStatus.js.map +1 -0
  69. package/_esm/actions/wallet/switchChain.js +1 -1
  70. package/_esm/{experimental/eip5792/actions → actions/wallet}/waitForCallsStatus.js +7 -7
  71. package/_esm/actions/wallet/waitForCallsStatus.js.map +1 -0
  72. package/_esm/chains/definitions/gunz.js +26 -0
  73. package/_esm/chains/definitions/gunz.js.map +1 -0
  74. package/_esm/chains/definitions/memecore.js +33 -0
  75. package/_esm/chains/definitions/memecore.js.map +1 -0
  76. package/_esm/chains/definitions/memecoreFormicariumTestnet.js +33 -0
  77. package/_esm/chains/definitions/memecoreFormicariumTestnet.js.map +1 -0
  78. package/_esm/chains/index.js +3 -0
  79. package/_esm/chains/index.js.map +1 -1
  80. package/_esm/clients/decorators/wallet.js +10 -0
  81. package/_esm/clients/decorators/wallet.js.map +1 -1
  82. package/_esm/constants/abis.js +417 -0
  83. package/_esm/constants/abis.js.map +1 -1
  84. package/_esm/errors/version.js +1 -1
  85. package/_esm/errors/version.js.map +1 -1
  86. package/_esm/experimental/eip5792/actions/writeContracts.js +2 -3
  87. package/_esm/experimental/eip5792/actions/writeContracts.js.map +1 -1
  88. package/_esm/experimental/eip5792/decorators/eip5792.js +6 -5
  89. package/_esm/experimental/eip5792/decorators/eip5792.js.map +1 -1
  90. package/_esm/experimental/index.js +21 -7
  91. package/_esm/experimental/index.js.map +1 -1
  92. package/_esm/index.js +2 -1
  93. package/_esm/index.js.map +1 -1
  94. package/_types/account-abstraction/accounts/implementations/toSimple7702SmartAccount.d.ts +1 -1
  95. package/_types/account-abstraction/accounts/implementations/toSimple7702SmartAccount.d.ts.map +1 -1
  96. package/_types/account-abstraction/index.d.ts +1 -0
  97. package/_types/account-abstraction/index.d.ts.map +1 -1
  98. package/_types/account-abstraction/utils/userOperation/getInitCode.d.ts +3 -0
  99. package/_types/account-abstraction/utils/userOperation/getInitCode.d.ts.map +1 -0
  100. package/_types/account-abstraction/utils/userOperation/getUserOperationHash.d.ts.map +1 -1
  101. package/_types/account-abstraction/utils/userOperation/getUserOperationTypedData.d.ts +39 -0
  102. package/_types/account-abstraction/utils/userOperation/getUserOperationTypedData.d.ts.map +1 -0
  103. package/_types/account-abstraction/utils/userOperation/toPackedUserOperation.d.ts.map +1 -1
  104. package/_types/actions/index.d.ts +5 -0
  105. package/_types/actions/index.d.ts.map +1 -1
  106. package/_types/{experimental/eip5792/actions → actions/wallet}/getCallsStatus.d.ts +10 -10
  107. package/_types/actions/wallet/getCallsStatus.d.ts.map +1 -0
  108. package/_types/{experimental/eip5792/actions → actions/wallet}/getCapabilities.d.ts +9 -9
  109. package/_types/actions/wallet/getCapabilities.d.ts.map +1 -0
  110. package/_types/{experimental/eip5792/actions → actions/wallet}/sendCalls.d.ts +10 -10
  111. package/_types/actions/wallet/sendCalls.d.ts.map +1 -0
  112. package/_types/{experimental/eip5792/actions → actions/wallet}/showCallsStatus.d.ts +8 -8
  113. package/_types/actions/wallet/showCallsStatus.d.ts.map +1 -0
  114. package/_types/actions/wallet/switchChain.d.ts +1 -1
  115. package/_types/{experimental/eip5792/actions → actions/wallet}/waitForCallsStatus.d.ts +9 -9
  116. package/_types/actions/wallet/waitForCallsStatus.d.ts.map +1 -0
  117. package/_types/chains/definitions/gunz.d.ts +34 -0
  118. package/_types/chains/definitions/gunz.d.ts.map +1 -0
  119. package/_types/chains/definitions/memecore.d.ts +48 -0
  120. package/_types/chains/definitions/memecore.d.ts.map +1 -0
  121. package/_types/chains/definitions/memecoreFormicariumTestnet.d.ts +47 -0
  122. package/_types/chains/definitions/memecoreFormicariumTestnet.d.ts.map +1 -0
  123. package/_types/chains/index.d.ts +3 -0
  124. package/_types/chains/index.d.ts.map +1 -1
  125. package/_types/clients/decorators/wallet.d.ts +126 -0
  126. package/_types/clients/decorators/wallet.d.ts.map +1 -1
  127. package/_types/constants/abis.d.ts +321 -0
  128. package/_types/constants/abis.d.ts.map +1 -1
  129. package/_types/errors/version.d.ts +1 -1
  130. package/_types/errors/version.d.ts.map +1 -1
  131. package/_types/experimental/eip5792/actions/writeContracts.d.ts +1 -3
  132. package/_types/experimental/eip5792/actions/writeContracts.d.ts.map +1 -1
  133. package/_types/experimental/eip5792/decorators/eip5792.d.ts +6 -6
  134. package/_types/experimental/eip5792/decorators/eip5792.d.ts.map +1 -1
  135. package/_types/experimental/index.d.ts +63 -7
  136. package/_types/experimental/index.d.ts.map +1 -1
  137. package/_types/index.d.ts +7 -1
  138. package/_types/index.d.ts.map +1 -1
  139. package/account-abstraction/accounts/implementations/toSimple7702SmartAccount.ts +8 -73
  140. package/account-abstraction/index.ts +5 -0
  141. package/account-abstraction/utils/userOperation/getInitCode.ts +21 -0
  142. package/account-abstraction/utils/userOperation/getUserOperationHash.ts +36 -128
  143. package/account-abstraction/utils/userOperation/getUserOperationTypedData.ts +49 -0
  144. package/account-abstraction/utils/userOperation/toPackedUserOperation.ts +2 -4
  145. package/actions/index.ts +31 -0
  146. package/{experimental/eip5792/actions → actions/wallet}/getCallsStatus.ts +13 -13
  147. package/{experimental/eip5792/actions → actions/wallet}/getCapabilities.ts +10 -10
  148. package/{experimental/eip5792/actions → actions/wallet}/sendCalls.ts +18 -18
  149. package/{experimental/eip5792/actions → actions/wallet}/showCallsStatus.ts +8 -8
  150. package/actions/wallet/switchChain.ts +1 -1
  151. package/{experimental/eip5792/actions → actions/wallet}/waitForCallsStatus.ts +11 -11
  152. package/chains/definitions/gunz.ts +26 -0
  153. package/chains/definitions/memecore.ts +33 -0
  154. package/chains/definitions/memecoreFormicariumTestnet.ts +33 -0
  155. package/chains/index.ts +3 -0
  156. package/clients/decorators/wallet.ts +164 -0
  157. package/constants/abis.ts +418 -0
  158. package/errors/version.ts +1 -1
  159. package/experimental/eip5792/actions/writeContracts.ts +8 -8
  160. package/experimental/eip5792/decorators/eip5792.ts +12 -10
  161. package/experimental/index.ts +33 -6
  162. package/index.ts +28 -0
  163. package/package.json +3 -3
  164. package/_cjs/experimental/eip5792/actions/getCallsStatus.js.map +0 -1
  165. package/_cjs/experimental/eip5792/actions/getCapabilities.js.map +0 -1
  166. package/_cjs/experimental/eip5792/actions/sendCalls.js.map +0 -1
  167. package/_cjs/experimental/eip5792/actions/showCallsStatus.js.map +0 -1
  168. package/_cjs/experimental/eip5792/actions/waitForCallsStatus.js.map +0 -1
  169. package/_esm/experimental/eip5792/actions/getCallsStatus.js.map +0 -1
  170. package/_esm/experimental/eip5792/actions/sendCalls.js.map +0 -1
  171. package/_esm/experimental/eip5792/actions/showCallsStatus.js.map +0 -1
  172. package/_esm/experimental/eip5792/actions/waitForCallsStatus.js.map +0 -1
  173. package/_types/experimental/eip5792/actions/getCallsStatus.d.ts.map +0 -1
  174. package/_types/experimental/eip5792/actions/getCapabilities.d.ts.map +0 -1
  175. package/_types/experimental/eip5792/actions/sendCalls.d.ts.map +0 -1
  176. package/_types/experimental/eip5792/actions/showCallsStatus.d.ts.map +0 -1
  177. package/_types/experimental/eip5792/actions/waitForCallsStatus.d.ts.map +0 -1
  178. /package/_cjs/{experimental/eip5792/actions → actions/wallet}/showCallsStatus.js +0 -0
@@ -1,16 +1,16 @@
1
1
  import type { Address } from 'abitype'
2
2
 
3
- import { parseAccount } from '../../../accounts/utils/parseAccount.js'
4
- import type { Client } from '../../../clients/createClient.js'
5
- import type { Transport } from '../../../clients/transports/createTransport.js'
6
- import type { ErrorType } from '../../../errors/utils.js'
7
- import type { Account } from '../../../types/account.js'
3
+ import { parseAccount } from '../../accounts/utils/parseAccount.js'
4
+ import type { Client } from '../../clients/createClient.js'
5
+ import type { Transport } from '../../clients/transports/createTransport.js'
6
+ import type { ErrorType } from '../../errors/utils.js'
7
+ import type { Account } from '../../types/account.js'
8
8
  import type {
9
9
  WalletCapabilities,
10
10
  WalletCapabilitiesRecord,
11
- } from '../../../types/eip1193.js'
12
- import type { Prettify } from '../../../types/utils.js'
13
- import type { RequestErrorType } from '../../../utils/buildRequest.js'
11
+ } from '../../types/eip1193.js'
12
+ import type { Prettify } from '../../types/utils.js'
13
+ import type { RequestErrorType } from '../../utils/buildRequest.js'
14
14
 
15
15
  export type GetCapabilitiesParameters<
16
16
  chainId extends number | undefined = undefined,
@@ -32,7 +32,7 @@ export type GetCapabilitiesErrorType = RequestErrorType | ErrorType
32
32
  /**
33
33
  * Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc).
34
34
  *
35
- * - Docs: https://viem.sh/experimental/eip5792/getCapabilities
35
+ * - Docs: https://viem.sh/docs/actions/wallet/getCapabilities
36
36
  * - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792)
37
37
  *
38
38
  * @param client - Client to use
@@ -41,7 +41,7 @@ export type GetCapabilitiesErrorType = RequestErrorType | ErrorType
41
41
  * @example
42
42
  * import { createWalletClient, custom } from 'viem'
43
43
  * import { mainnet } from 'viem/chains'
44
- * import { getCapabilities } from 'viem/experimental'
44
+ * import { getCapabilities } from 'viem/actions'
45
45
  *
46
46
  * const client = createWalletClient({
47
47
  * chain: mainnet,
@@ -1,21 +1,21 @@
1
1
  import type { Address, Narrow } from 'abitype'
2
- import { parseAccount } from '../../../accounts/utils/parseAccount.js'
3
- import type { Client } from '../../../clients/createClient.js'
4
- import type { Transport } from '../../../clients/transports/createTransport.js'
5
- import { AccountNotFoundError } from '../../../errors/account.js'
6
- import type { BaseError } from '../../../errors/base.js'
7
- import type { ErrorType } from '../../../errors/utils.js'
8
- import type { Account, GetAccountParameter } from '../../../types/account.js'
9
- import type { Call, Calls } from '../../../types/calls.js'
10
- import type { Chain, DeriveChain } from '../../../types/chain.js'
2
+ import { parseAccount } from '../../accounts/utils/parseAccount.js'
3
+ import type { Client } from '../../clients/createClient.js'
4
+ import type { Transport } from '../../clients/transports/createTransport.js'
5
+ import { AccountNotFoundError } from '../../errors/account.js'
6
+ import type { BaseError } from '../../errors/base.js'
7
+ import type { ErrorType } from '../../errors/utils.js'
8
+ import type { Account, GetAccountParameter } from '../../types/account.js'
9
+ import type { Call, Calls } from '../../types/calls.js'
10
+ import type { Chain, DeriveChain } from '../../types/chain.js'
11
11
  import type {
12
12
  WalletCapabilities,
13
13
  WalletSendCallsParameters,
14
- } from '../../../types/eip1193.js'
15
- import { encodeFunctionData } from '../../../utils/abi/encodeFunctionData.js'
16
- import type { RequestErrorType } from '../../../utils/buildRequest.js'
17
- import { numberToHex } from '../../../utils/encoding/toHex.js'
18
- import { getTransactionError } from '../../../utils/errors/getTransactionError.js'
14
+ } from '../../types/eip1193.js'
15
+ import { encodeFunctionData } from '../../utils/abi/encodeFunctionData.js'
16
+ import type { RequestErrorType } from '../../utils/buildRequest.js'
17
+ import { numberToHex } from '../../utils/encoding/toHex.js'
18
+ import { getTransactionError } from '../../utils/errors/getTransactionError.js'
19
19
 
20
20
  export type SendCallsParameters<
21
21
  chain extends Chain | undefined = Chain | undefined,
@@ -43,7 +43,7 @@ export type SendCallsErrorType = RequestErrorType | ErrorType
43
43
  /**
44
44
  * Requests the connected wallet to send a batch of calls.
45
45
  *
46
- * - Docs: https://viem.sh/experimental/eip5792/sendCalls
46
+ * - Docs: https://viem.sh/docs/actions/wallet/sendCalls
47
47
  * - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792)
48
48
  *
49
49
  * @param client - Client to use
@@ -52,7 +52,7 @@ export type SendCallsErrorType = RequestErrorType | ErrorType
52
52
  * @example
53
53
  * import { createWalletClient, custom } from 'viem'
54
54
  * import { mainnet } from 'viem/chains'
55
- * import { sendCalls } from 'viem/experimental'
55
+ * import { sendCalls } from 'viem/actions'
56
56
  *
57
57
  * const client = createWalletClient({
58
58
  * chain: mainnet,
@@ -87,12 +87,12 @@ export async function sendCalls<
87
87
  chain = client.chain,
88
88
  forceAtomic = false,
89
89
  id,
90
- version = '1.0',
90
+ version = '2.0.0',
91
91
  } = parameters
92
92
 
93
93
  if (typeof account_ === 'undefined')
94
94
  throw new AccountNotFoundError({
95
- docsPath: '/experimental/eip5792/sendCalls',
95
+ docsPath: '/docs/actions/wallet/sendCalls',
96
96
  })
97
97
  const account = account_ ? parseAccount(account_) : null
98
98
 
@@ -1,9 +1,9 @@
1
- import type { Client } from '../../../clients/createClient.js'
2
- import type { Transport } from '../../../clients/transports/createTransport.js'
3
- import type { ErrorType } from '../../../errors/utils.js'
4
- import type { Account } from '../../../types/account.js'
5
- import type { Chain } from '../../../types/chain.js'
6
- import type { RequestErrorType } from '../../../utils/buildRequest.js'
1
+ import type { Client } from '../../clients/createClient.js'
2
+ import type { Transport } from '../../clients/transports/createTransport.js'
3
+ import type { ErrorType } from '../../errors/utils.js'
4
+ import type { Account } from '../../types/account.js'
5
+ import type { Chain } from '../../types/chain.js'
6
+ import type { RequestErrorType } from '../../utils/buildRequest.js'
7
7
 
8
8
  export type ShowCallsStatusParameters = { id: string }
9
9
 
@@ -15,7 +15,7 @@ export type ShowCallsStatusErrorType = RequestErrorType | ErrorType
15
15
  * Requests for the wallet to show information about a call batch
16
16
  * that was sent via `sendCalls`.
17
17
  *
18
- * - Docs: https://viem.sh/experimental/eip5792/showCallsStatus
18
+ * - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus
19
19
  * - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792)
20
20
  *
21
21
  * @param client - Client to use
@@ -24,7 +24,7 @@ export type ShowCallsStatusErrorType = RequestErrorType | ErrorType
24
24
  * @example
25
25
  * import { createWalletClient, custom } from 'viem'
26
26
  * import { mainnet } from 'viem/chains'
27
- * import { showCallsStatus } from 'viem/experimental'
27
+ * import { showCallsStatus } from 'viem/actions'
28
28
  *
29
29
  * const client = createWalletClient({
30
30
  * chain: mainnet,
@@ -23,7 +23,7 @@ export type SwitchChainErrorType =
23
23
  * Switch the target chain in a wallet.
24
24
  *
25
25
  * - Docs: https://viem.sh/docs/actions/wallet/switchChain
26
- * - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326)
26
+ * - JSON-RPC Methods: [`wallet_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326)
27
27
  *
28
28
  * @param client - Client to use
29
29
  * @param parameters - {@link SwitchChainParameters}
@@ -1,12 +1,12 @@
1
- import type { Client } from '../../../clients/createClient.js'
2
- import type { Transport } from '../../../clients/transports/createTransport.js'
3
- import { BaseError } from '../../../errors/base.js'
4
- import type { ErrorType } from '../../../errors/utils.js'
5
- import type { Chain } from '../../../types/chain.js'
6
- import { type ObserveErrorType, observe } from '../../../utils/observe.js'
7
- import { type PollErrorType, poll } from '../../../utils/poll.js'
8
- import { withResolvers } from '../../../utils/promise/withResolvers.js'
9
- import { stringify } from '../../../utils/stringify.js'
1
+ import type { Client } from '../../clients/createClient.js'
2
+ import type { Transport } from '../../clients/transports/createTransport.js'
3
+ import { BaseError } from '../../errors/base.js'
4
+ import type { ErrorType } from '../../errors/utils.js'
5
+ import type { Chain } from '../../types/chain.js'
6
+ import { type ObserveErrorType, observe } from '../../utils/observe.js'
7
+ import { type PollErrorType, poll } from '../../utils/poll.js'
8
+ import { withResolvers } from '../../utils/promise/withResolvers.js'
9
+ import { stringify } from '../../utils/stringify.js'
10
10
  import {
11
11
  type GetCallsStatusErrorType,
12
12
  type GetCallsStatusReturnType,
@@ -50,7 +50,7 @@ export type WaitForCallsStatusErrorType =
50
50
  /**
51
51
  * Waits for the status & receipts of a call bundle that was sent via `sendCalls`.
52
52
  *
53
- * - Docs: https://viem.sh/experimental/eip5792/waitForCallsStatus
53
+ * - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus
54
54
  * - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792)
55
55
  *
56
56
  * @param client - Client to use
@@ -60,7 +60,7 @@ export type WaitForCallsStatusErrorType =
60
60
  * @example
61
61
  * import { createWalletClient, custom } from 'viem'
62
62
  * import { mainnet } from 'viem/chains'
63
- * import { waitForCallsStatus } from 'viem/experimental'
63
+ * import { waitForCallsStatus } from 'viem/actions'
64
64
  *
65
65
  * const client = createWalletClient({
66
66
  * chain: mainnet,
@@ -0,0 +1,26 @@
1
+ import { defineChain } from '../../utils/chain/defineChain.js'
2
+
3
+ export const gunz = /*#__PURE__*/ defineChain({
4
+ id: 43_419,
5
+ name: 'Gunz Mainnet',
6
+ nativeCurrency: { name: 'GUN', symbol: 'GUN', decimals: 18 },
7
+ rpcUrls: {
8
+ default: {
9
+ http: [
10
+ 'https://rpc.gunzchain.io/ext/bc/2M47TxWHGnhNtq6pM5zPXdATBtuqubxn5EPFgFmEawCQr9WFML/rpc',
11
+ ],
12
+ },
13
+ },
14
+ blockExplorers: {
15
+ default: {
16
+ name: 'Gunz Explorer',
17
+ url: 'https://gunzscan.io/',
18
+ },
19
+ },
20
+ contracts: {
21
+ multicall3: {
22
+ address: '0xcA11bde05977b3631167028862bE2a173976CA11',
23
+ blockCreated: 70502,
24
+ },
25
+ },
26
+ })
@@ -0,0 +1,33 @@
1
+ import { defineChain } from '../../utils/chain/defineChain.js'
2
+
3
+ export const memecore = /*#__PURE__*/ defineChain({
4
+ id: 4352,
5
+ name: 'MemeCore',
6
+ nativeCurrency: {
7
+ decimals: 18,
8
+ name: 'M',
9
+ symbol: 'M',
10
+ },
11
+ rpcUrls: {
12
+ default: {
13
+ http: ['https://rpc.memecore.net'],
14
+ webSocket: ['wss://ws.memecore.net'],
15
+ },
16
+ },
17
+ blockExplorers: {
18
+ default: {
19
+ name: 'MemeCore Explorer',
20
+ url: 'https://memecorescan.io',
21
+ apiUrl: 'https://api.memecorescan.io/api',
22
+ },
23
+ okx: {
24
+ name: 'MemeCore Explorer',
25
+ url: 'https://web3.okx.com/explorer/memecore',
26
+ },
27
+ memecore: {
28
+ name: 'MemeCore Explorer',
29
+ url: 'https://blockscout.memecore.com',
30
+ apiUrl: 'https://blockscout.memecore.com/api',
31
+ },
32
+ },
33
+ })
@@ -0,0 +1,33 @@
1
+ import { defineChain } from '../../utils/chain/defineChain.js'
2
+
3
+ export const formicarium = /*#__PURE__*/ defineChain({
4
+ id: 43521,
5
+ name: 'Formicarium',
6
+ nativeCurrency: {
7
+ decimals: 18,
8
+ name: 'M',
9
+ symbol: 'M',
10
+ },
11
+ rpcUrls: {
12
+ default: {
13
+ http: ['https://rpc.formicarium.memecore.net'],
14
+ webSocket: ['wss://ws.formicarium.memecore.net'],
15
+ },
16
+ },
17
+ blockExplorers: {
18
+ default: {
19
+ name: 'MemeCore Testnet Explorer',
20
+ url: 'https://formicarium.memecorescan.io',
21
+ },
22
+ okx: {
23
+ name: 'MemeCore Testnet Explorer',
24
+ url: 'https://web3.okx.com/explorer/formicarium-testnet',
25
+ },
26
+ memecore: {
27
+ name: 'MemeCore Testnet Explorer',
28
+ url: 'https://formicarium.blockscout.memecore.com',
29
+ apiUrl: 'https://formicarium.blockscout.memecore.com/api',
30
+ },
31
+ },
32
+ testnet: true,
33
+ })
package/chains/index.ts CHANGED
@@ -186,6 +186,7 @@ export { fluenceTestnet } from './definitions/fluenceTestnet.js'
186
186
  export { fluentTestnet } from './definitions/fluentTestnet.js'
187
187
  export { forma } from './definitions/forma.js'
188
188
  export { form } from './definitions/form.js'
189
+ export { formicarium } from './definitions/memecoreFormicariumTestnet.js'
189
190
  export { formTestnet } from './definitions/formTestnet.js'
190
191
  export { forta } from './definitions/forta.js'
191
192
  /** @deprecated Use `anvil` instead. */
@@ -211,6 +212,7 @@ export { goChain } from './definitions/goChain.js'
211
212
  export { godwoken } from './definitions/godwoken.js'
212
213
  export { goerli } from './definitions/goerli.js'
213
214
  export { gravity } from './definitions/gravity.js'
215
+ export { gunz } from './definitions/gunz.js'
214
216
  export { guruNetwork } from './definitions/guruNetwork.js'
215
217
  export { guruTestnet } from './definitions/guruTestnet.js'
216
218
  export { ham } from './definitions/ham.js'
@@ -324,6 +326,7 @@ export { mchVerse } from './definitions/mchVerse.js'
324
326
  export { megaethTestnet } from './definitions/megaethTestnet.js'
325
327
  export { mekong } from './definitions/mekong.js'
326
328
  export { meld } from './definitions/meld.js'
329
+ export { memecore } from './definitions/memecore.js'
327
330
  export { merlin } from './definitions/merlin.js'
328
331
  export { merlinErigonTestnet } from './definitions/merlinErigonTestnet.js'
329
332
  export { metachain } from './definitions/metachain.js'
@@ -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
  }