tempo.ts 0.1.5 → 0.2.1

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 (297) hide show
  1. package/README.md +33 -2
  2. package/dist/chains.d.ts +509 -115
  3. package/dist/chains.d.ts.map +1 -1
  4. package/dist/chains.js +20 -9
  5. package/dist/chains.js.map +1 -1
  6. package/dist/ox/Order.d.ts +92 -0
  7. package/dist/ox/Order.d.ts.map +1 -0
  8. package/dist/ox/Order.js +88 -0
  9. package/dist/ox/Order.js.map +1 -0
  10. package/dist/ox/OrdersFilters.d.ts +72 -0
  11. package/dist/ox/OrdersFilters.d.ts.map +1 -0
  12. package/dist/ox/OrdersFilters.js +100 -0
  13. package/dist/ox/OrdersFilters.js.map +1 -0
  14. package/dist/ox/Pagination.d.ts +128 -0
  15. package/dist/ox/Pagination.d.ts.map +1 -0
  16. package/dist/ox/Pagination.js +78 -0
  17. package/dist/ox/Pagination.js.map +1 -0
  18. package/dist/ox/PoolId.d.ts +18 -0
  19. package/dist/ox/PoolId.d.ts.map +1 -0
  20. package/dist/ox/PoolId.js +13 -0
  21. package/dist/ox/PoolId.js.map +1 -0
  22. package/dist/ox/RpcSchema.d.ts +32 -0
  23. package/dist/ox/RpcSchema.d.ts.map +1 -0
  24. package/dist/ox/RpcSchema.js +2 -0
  25. package/dist/ox/RpcSchema.js.map +1 -0
  26. package/dist/ox/SignatureEnvelope.d.ts +1 -1
  27. package/dist/ox/SignatureEnvelope.d.ts.map +1 -1
  28. package/dist/ox/SignatureEnvelope.js.map +1 -1
  29. package/dist/{viem → ox}/Tick.d.ts +4 -0
  30. package/dist/ox/Tick.d.ts.map +1 -0
  31. package/dist/ox/Tick.js.map +1 -0
  32. package/dist/ox/Transaction.d.ts.map +1 -1
  33. package/dist/ox/Transaction.js +2 -1
  34. package/dist/ox/Transaction.js.map +1 -1
  35. package/dist/ox/TransactionEnvelopeAA.d.ts +6 -6
  36. package/dist/ox/TransactionEnvelopeAA.d.ts.map +1 -1
  37. package/dist/ox/TransactionEnvelopeAA.js +4 -2
  38. package/dist/ox/TransactionEnvelopeAA.js.map +1 -1
  39. package/dist/ox/TransactionRequest.d.ts +4 -0
  40. package/dist/ox/TransactionRequest.d.ts.map +1 -1
  41. package/dist/ox/TransactionRequest.js.map +1 -1
  42. package/dist/ox/index.d.ts +6 -0
  43. package/dist/ox/index.d.ts.map +1 -1
  44. package/dist/ox/index.js +6 -0
  45. package/dist/ox/index.js.map +1 -1
  46. package/dist/prool/Instance.d.ts.map +1 -1
  47. package/dist/prool/Instance.js +20 -4
  48. package/dist/prool/Instance.js.map +1 -1
  49. package/dist/viem/Abis.d.ts +1469 -1082
  50. package/dist/viem/Abis.d.ts.map +1 -1
  51. package/dist/viem/Abis.js +932 -671
  52. package/dist/viem/Abis.js.map +1 -1
  53. package/dist/viem/Account.d.ts +150 -0
  54. package/dist/viem/Account.d.ts.map +1 -0
  55. package/dist/viem/Account.js +221 -0
  56. package/dist/viem/Account.js.map +1 -0
  57. package/dist/viem/Actions/amm.d.ts +144 -161
  58. package/dist/viem/Actions/amm.d.ts.map +1 -1
  59. package/dist/viem/Actions/amm.js +109 -163
  60. package/dist/viem/Actions/amm.js.map +1 -1
  61. package/dist/viem/Actions/dex.d.ts +920 -664
  62. package/dist/viem/Actions/dex.d.ts.map +1 -1
  63. package/dist/viem/Actions/dex.js +129 -30
  64. package/dist/viem/Actions/dex.js.map +1 -1
  65. package/dist/viem/Actions/faucet.d.ts +34 -0
  66. package/dist/viem/Actions/faucet.d.ts.map +1 -0
  67. package/dist/viem/Actions/faucet.js +33 -0
  68. package/dist/viem/Actions/faucet.js.map +1 -0
  69. package/dist/viem/Actions/fee.d.ts +16 -30
  70. package/dist/viem/Actions/fee.d.ts.map +1 -1
  71. package/dist/viem/Actions/fee.js +13 -13
  72. package/dist/viem/Actions/fee.js.map +1 -1
  73. package/dist/viem/Actions/index.d.ts +2 -0
  74. package/dist/viem/Actions/index.d.ts.map +1 -1
  75. package/dist/viem/Actions/index.js +2 -0
  76. package/dist/viem/Actions/index.js.map +1 -1
  77. package/dist/viem/Actions/policy.d.ts +46 -46
  78. package/dist/viem/Actions/policy.js +46 -46
  79. package/dist/viem/Actions/reward.d.ts +3236 -0
  80. package/dist/viem/Actions/reward.d.ts.map +1 -0
  81. package/dist/viem/Actions/reward.js +725 -0
  82. package/dist/viem/Actions/reward.js.map +1 -0
  83. package/dist/viem/Actions/token.d.ts +4399 -2750
  84. package/dist/viem/Actions/token.d.ts.map +1 -1
  85. package/dist/viem/Actions/token.js +361 -482
  86. package/dist/viem/Actions/token.js.map +1 -1
  87. package/dist/viem/Addresses.d.ts +1 -2
  88. package/dist/viem/Addresses.d.ts.map +1 -1
  89. package/dist/viem/Addresses.js +1 -2
  90. package/dist/viem/Addresses.js.map +1 -1
  91. package/dist/viem/Chain.d.ts +38 -12
  92. package/dist/viem/Chain.d.ts.map +1 -1
  93. package/dist/viem/Chain.js +27 -18
  94. package/dist/viem/Chain.js.map +1 -1
  95. package/dist/viem/Decorator.d.ts +1009 -428
  96. package/dist/viem/Decorator.d.ts.map +1 -1
  97. package/dist/viem/Decorator.js +17 -5
  98. package/dist/viem/Decorator.js.map +1 -1
  99. package/dist/viem/Formatters.d.ts +8 -1
  100. package/dist/viem/Formatters.d.ts.map +1 -1
  101. package/dist/viem/Formatters.js +17 -0
  102. package/dist/viem/Formatters.js.map +1 -1
  103. package/dist/viem/P256.d.ts +2 -0
  104. package/dist/viem/P256.d.ts.map +1 -0
  105. package/dist/viem/P256.js +2 -0
  106. package/dist/viem/P256.js.map +1 -0
  107. package/dist/viem/Secp256k1.d.ts +2 -0
  108. package/dist/viem/Secp256k1.d.ts.map +1 -0
  109. package/dist/viem/Secp256k1.js +2 -0
  110. package/dist/viem/Secp256k1.js.map +1 -0
  111. package/dist/viem/TokenIds.d.ts +1 -2
  112. package/dist/viem/TokenIds.d.ts.map +1 -1
  113. package/dist/viem/TokenIds.js +1 -2
  114. package/dist/viem/TokenIds.js.map +1 -1
  115. package/dist/viem/Transaction.d.ts +1 -1
  116. package/dist/viem/Transaction.d.ts.map +1 -1
  117. package/dist/viem/Transaction.js +46 -5
  118. package/dist/viem/Transaction.js.map +1 -1
  119. package/dist/viem/WebAuthnP256.d.ts +79 -0
  120. package/dist/viem/WebAuthnP256.d.ts.map +1 -0
  121. package/dist/viem/WebAuthnP256.js +95 -0
  122. package/dist/viem/WebAuthnP256.js.map +1 -0
  123. package/dist/viem/WebCryptoP256.d.ts +2 -0
  124. package/dist/viem/WebCryptoP256.d.ts.map +1 -0
  125. package/dist/viem/WebCryptoP256.js +2 -0
  126. package/dist/viem/WebCryptoP256.js.map +1 -0
  127. package/dist/viem/index.d.ts +6 -3
  128. package/dist/viem/index.d.ts.map +1 -1
  129. package/dist/viem/index.js +6 -3
  130. package/dist/viem/index.js.map +1 -1
  131. package/dist/viem/internal/account.d.ts +24 -0
  132. package/dist/viem/internal/account.d.ts.map +1 -0
  133. package/dist/viem/internal/account.js +68 -0
  134. package/dist/viem/internal/account.js.map +1 -0
  135. package/dist/viem/internal/types.d.ts +10 -0
  136. package/dist/viem/internal/types.d.ts.map +1 -1
  137. package/dist/wagmi/Actions/amm.d.ts +428 -0
  138. package/dist/wagmi/Actions/amm.d.ts.map +1 -0
  139. package/dist/wagmi/Actions/amm.js +472 -0
  140. package/dist/wagmi/Actions/amm.js.map +1 -0
  141. package/dist/wagmi/Actions/dex.d.ts +908 -0
  142. package/dist/wagmi/Actions/dex.d.ts.map +1 -0
  143. package/dist/wagmi/Actions/dex.js +1023 -0
  144. package/dist/wagmi/Actions/dex.js.map +1 -0
  145. package/dist/wagmi/Actions/faucet.d.ts +35 -0
  146. package/dist/wagmi/Actions/faucet.d.ts.map +1 -0
  147. package/dist/wagmi/Actions/faucet.js +33 -0
  148. package/dist/wagmi/Actions/faucet.js.map +1 -0
  149. package/dist/wagmi/Actions/fee.d.ts +111 -0
  150. package/dist/wagmi/Actions/fee.d.ts.map +1 -0
  151. package/dist/wagmi/Actions/fee.js +126 -0
  152. package/dist/wagmi/Actions/fee.js.map +1 -0
  153. package/dist/wagmi/Actions/index.d.ts +7 -0
  154. package/dist/wagmi/Actions/index.d.ts.map +1 -0
  155. package/dist/wagmi/Actions/index.js +7 -0
  156. package/dist/wagmi/Actions/index.js.map +1 -0
  157. package/dist/wagmi/Actions/reward.d.ts +348 -0
  158. package/dist/wagmi/Actions/reward.d.ts.map +1 -0
  159. package/dist/wagmi/Actions/reward.js +388 -0
  160. package/dist/wagmi/Actions/reward.js.map +1 -0
  161. package/dist/wagmi/Actions/token.d.ts +1546 -0
  162. package/dist/wagmi/Actions/token.d.ts.map +1 -0
  163. package/dist/wagmi/Actions/token.js +1712 -0
  164. package/dist/wagmi/Actions/token.js.map +1 -0
  165. package/dist/wagmi/Connector.d.ts +81 -0
  166. package/dist/wagmi/Connector.d.ts.map +1 -0
  167. package/dist/wagmi/Connector.js +261 -0
  168. package/dist/wagmi/Connector.js.map +1 -0
  169. package/dist/wagmi/Hooks/amm.d.ts +421 -0
  170. package/dist/wagmi/Hooks/amm.d.ts.map +1 -0
  171. package/dist/wagmi/Hooks/amm.js +504 -0
  172. package/dist/wagmi/Hooks/amm.js.map +1 -0
  173. package/dist/wagmi/Hooks/dex.d.ts +816 -0
  174. package/dist/wagmi/Hooks/dex.d.ts.map +1 -0
  175. package/dist/wagmi/Hooks/dex.js +973 -0
  176. package/dist/wagmi/Hooks/dex.js.map +1 -0
  177. package/dist/wagmi/Hooks/faucet.d.ts +39 -0
  178. package/dist/wagmi/Hooks/faucet.d.ts.map +1 -0
  179. package/dist/wagmi/Hooks/faucet.js +40 -0
  180. package/dist/wagmi/Hooks/faucet.js.map +1 -0
  181. package/dist/wagmi/Hooks/fee.d.ts +97 -0
  182. package/dist/wagmi/Hooks/fee.d.ts.map +1 -0
  183. package/dist/wagmi/Hooks/fee.js +109 -0
  184. package/dist/wagmi/Hooks/fee.js.map +1 -0
  185. package/dist/wagmi/Hooks/index.d.ts +7 -0
  186. package/dist/wagmi/Hooks/index.d.ts.map +1 -0
  187. package/dist/wagmi/Hooks/index.js +7 -0
  188. package/dist/wagmi/Hooks/index.js.map +1 -0
  189. package/dist/wagmi/Hooks/reward.d.ts +307 -0
  190. package/dist/wagmi/Hooks/reward.d.ts.map +1 -0
  191. package/dist/wagmi/Hooks/reward.js +349 -0
  192. package/dist/wagmi/Hooks/reward.js.map +1 -0
  193. package/dist/wagmi/Hooks/token.d.ts +1388 -0
  194. package/dist/wagmi/Hooks/token.d.ts.map +1 -0
  195. package/dist/wagmi/Hooks/token.js +1657 -0
  196. package/dist/wagmi/Hooks/token.js.map +1 -0
  197. package/dist/wagmi/index.d.ts +4 -0
  198. package/dist/wagmi/index.d.ts.map +1 -0
  199. package/dist/wagmi/index.js +4 -0
  200. package/dist/wagmi/index.js.map +1 -0
  201. package/package.json +54 -10
  202. package/src/chains.ts +21 -9
  203. package/src/ox/Order.test.ts +78 -0
  204. package/src/ox/Order.ts +125 -0
  205. package/src/ox/OrdersFilters.test.ts +182 -0
  206. package/src/ox/OrdersFilters.ts +125 -0
  207. package/src/ox/Pagination.test.ts +162 -0
  208. package/src/ox/Pagination.ts +164 -0
  209. package/src/ox/PoolId.test.ts +33 -0
  210. package/src/ox/PoolId.ts +27 -0
  211. package/src/ox/RpcSchema.ts +35 -0
  212. package/src/ox/SignatureEnvelope.ts +3 -1
  213. package/src/{viem → ox}/Tick.test.ts +1 -1
  214. package/src/{viem → ox}/Tick.ts +5 -0
  215. package/src/ox/Transaction.test.ts +1 -1
  216. package/src/ox/Transaction.ts +2 -1
  217. package/src/ox/TransactionEnvelopeAA.test.ts +239 -96
  218. package/src/ox/TransactionEnvelopeAA.ts +9 -7
  219. package/src/ox/TransactionRequest.ts +4 -0
  220. package/src/ox/index.ts +6 -0
  221. package/src/prool/Instance.ts +51 -37
  222. package/src/prool/internal/chain.json +104 -52
  223. package/src/tsconfig.json +9 -0
  224. package/src/viem/Abis.ts +972 -710
  225. package/src/viem/Account.ts +279 -0
  226. package/src/viem/Actions/__snapshots__/dex.test.ts.snap +850 -0
  227. package/src/viem/Actions/amm.test.ts +173 -169
  228. package/src/viem/Actions/amm.ts +131 -203
  229. package/src/viem/Actions/dex.test.ts +563 -484
  230. package/src/viem/Actions/dex.ts +203 -30
  231. package/src/viem/Actions/faucet.ts +50 -0
  232. package/src/viem/Actions/fee.test.ts +23 -34
  233. package/src/viem/Actions/fee.ts +20 -13
  234. package/src/viem/Actions/index.ts +2 -0
  235. package/src/viem/Actions/policy.test.ts +19 -33
  236. package/src/viem/Actions/policy.ts +46 -46
  237. package/src/viem/Actions/reward.test.ts +457 -0
  238. package/src/viem/Actions/reward.ts +999 -0
  239. package/src/viem/Actions/token.test.ts +453 -287
  240. package/src/viem/Actions/token.ts +605 -693
  241. package/src/viem/Addresses.ts +1 -2
  242. package/src/viem/Chain.bench-d.ts +12 -0
  243. package/src/viem/Chain.ts +70 -20
  244. package/src/viem/Decorator.bench-d.ts +1 -1
  245. package/src/viem/Decorator.test.ts +3 -1
  246. package/src/viem/Decorator.ts +1049 -442
  247. package/src/viem/Formatters.ts +31 -5
  248. package/src/viem/P256.ts +1 -0
  249. package/src/viem/Secp256k1.ts +1 -0
  250. package/src/viem/TokenIds.ts +1 -2
  251. package/src/viem/Transaction.ts +53 -7
  252. package/src/viem/WebAuthnP256.ts +140 -0
  253. package/src/viem/WebCryptoP256.ts +1 -0
  254. package/src/viem/e2e.test.ts +1126 -297
  255. package/src/viem/index.ts +6 -3
  256. package/src/viem/internal/account.ts +107 -0
  257. package/src/viem/internal/types.ts +9 -0
  258. package/src/wagmi/Actions/__snapshots__/dex.test.ts.snap +310 -0
  259. package/src/wagmi/Actions/amm.test.ts +198 -0
  260. package/src/wagmi/Actions/amm.ts +691 -0
  261. package/src/wagmi/Actions/dex.test.ts +1507 -0
  262. package/src/wagmi/Actions/dex.ts +1640 -0
  263. package/src/wagmi/Actions/faucet.ts +46 -0
  264. package/src/wagmi/Actions/fee.test.ts +63 -0
  265. package/src/wagmi/Actions/fee.ts +208 -0
  266. package/src/wagmi/Actions/index.ts +6 -0
  267. package/src/wagmi/Actions/reward.test.ts +210 -0
  268. package/src/wagmi/Actions/reward.ts +632 -0
  269. package/src/wagmi/Actions/token.test.ts +1308 -0
  270. package/src/wagmi/Actions/token.ts +2613 -0
  271. package/src/wagmi/Connector.test.ts +53 -0
  272. package/src/wagmi/Connector.ts +390 -0
  273. package/src/wagmi/Hooks/__snapshots__/dex.test.ts.snap +457 -0
  274. package/src/wagmi/Hooks/amm.test.ts +424 -0
  275. package/src/wagmi/Hooks/amm.ts +806 -0
  276. package/src/wagmi/Hooks/dex.test.ts +1017 -0
  277. package/src/wagmi/Hooks/dex.ts +1685 -0
  278. package/src/wagmi/Hooks/faucet.ts +76 -0
  279. package/src/wagmi/Hooks/fee.test.ts +166 -0
  280. package/src/wagmi/Hooks/fee.ts +206 -0
  281. package/src/wagmi/Hooks/index.ts +6 -0
  282. package/src/wagmi/Hooks/reward.test.ts +219 -0
  283. package/src/wagmi/Hooks/reward.ts +672 -0
  284. package/src/wagmi/Hooks/token.test.ts +1670 -0
  285. package/src/wagmi/Hooks/token.ts +2906 -0
  286. package/src/wagmi/index.ts +3 -0
  287. package/src/wagmi/internal/types.ts +16 -0
  288. package/dist/viem/Client.d.ts +0 -27
  289. package/dist/viem/Client.d.ts.map +0 -1
  290. package/dist/viem/Client.js +0 -28
  291. package/dist/viem/Client.js.map +0 -1
  292. package/dist/viem/Tick.d.ts.map +0 -1
  293. package/dist/viem/Tick.js.map +0 -1
  294. package/src/viem/Client.bench-d.ts +0 -8
  295. package/src/viem/Client.test.ts +0 -178
  296. package/src/viem/Client.ts +0 -91
  297. /package/dist/{viem → ox}/Tick.js +0 -0
@@ -0,0 +1,1712 @@
1
+ import { getConnectorClient } from '@wagmi/core';
2
+ import * as viem_Actions from '../../viem/Actions/token.js';
3
+ /**
4
+ * Approves a spender to transfer TIP20 tokens on behalf of the caller.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * import { createConfig, http } from '@wagmi/core'
9
+ * import { tempo } from 'tempo.ts/chains'
10
+ * import { Actions } from 'tempo.ts/wagmi'
11
+ *
12
+ * const config = createConfig({
13
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
14
+ * transports: {
15
+ * [tempo.id]: http(),
16
+ * },
17
+ * })
18
+ *
19
+ * const hash = await Actions.token.approve(config, {
20
+ * spender: '0x...',
21
+ * amount: 100n,
22
+ * })
23
+ * ```
24
+ *
25
+ * @param config - Config.
26
+ * @param parameters - Parameters.
27
+ * @returns Transaction hash.
28
+ */
29
+ export async function approve(config, parameters) {
30
+ const { account, chainId, connector } = parameters;
31
+ const client = await getConnectorClient(config, {
32
+ account,
33
+ assertChainId: false,
34
+ chainId,
35
+ connector,
36
+ });
37
+ return viem_Actions.approve(client, parameters);
38
+ }
39
+ /**
40
+ * Approves a spender to transfer TIP20 tokens on behalf of the caller.
41
+ *
42
+ * Note: This is a synchronous action that waits for the transaction to
43
+ * be included on a block before returning a response.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * import { createConfig, http } from '@wagmi/core'
48
+ * import { tempo } from 'tempo.ts/chains'
49
+ * import { Actions } from 'tempo.ts/wagmi'
50
+ *
51
+ * const config = createConfig({
52
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
53
+ * transports: {
54
+ * [tempo.id]: http(),
55
+ * },
56
+ * })
57
+ *
58
+ * const result = await Actions.token.approveSync(config, {
59
+ * spender: '0x...',
60
+ * amount: 100n,
61
+ * })
62
+ * ```
63
+ *
64
+ * @param config - Config.
65
+ * @param parameters - Parameters.
66
+ * @returns The transaction receipt and event data.
67
+ */
68
+ export async function approveSync(config, parameters) {
69
+ const { account, chainId, connector } = parameters;
70
+ const client = await getConnectorClient(config, {
71
+ account,
72
+ assertChainId: false,
73
+ chainId,
74
+ connector,
75
+ });
76
+ return viem_Actions.approveSync(client, parameters);
77
+ }
78
+ /**
79
+ * Burns TIP20 tokens from the caller's balance.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * import { createConfig, http } from '@wagmi/core'
84
+ * import { tempo } from 'tempo.ts/chains'
85
+ * import { Actions } from 'tempo.ts/wagmi'
86
+ *
87
+ * const config = createConfig({
88
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
89
+ * transports: {
90
+ * [tempo.id]: http(),
91
+ * },
92
+ * })
93
+ *
94
+ * const hash = await Actions.token.burn(config, {
95
+ * amount: 100n,
96
+ * token: '0x...',
97
+ * })
98
+ * ```
99
+ *
100
+ * @param config - Config.
101
+ * @param parameters - Parameters.
102
+ * @returns Transaction hash.
103
+ */
104
+ export async function burn(config, parameters) {
105
+ const { account, chainId, connector } = parameters;
106
+ const client = await getConnectorClient(config, {
107
+ account,
108
+ assertChainId: false,
109
+ chainId,
110
+ connector,
111
+ });
112
+ return viem_Actions.burn(client, parameters);
113
+ }
114
+ /**
115
+ * Burns TIP20 tokens from a blocked address.
116
+ *
117
+ * @example
118
+ * ```ts
119
+ * import { createConfig, http } from '@wagmi/core'
120
+ * import { tempo } from 'tempo.ts/chains'
121
+ * import { Actions } from 'tempo.ts/wagmi'
122
+ *
123
+ * const config = createConfig({
124
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
125
+ * transports: {
126
+ * [tempo.id]: http(),
127
+ * },
128
+ * })
129
+ *
130
+ * const hash = await Actions.token.burnBlocked(config, {
131
+ * from: '0x...',
132
+ * amount: 100n,
133
+ * token: '0x...',
134
+ * })
135
+ * ```
136
+ *
137
+ * @param config - Config.
138
+ * @param parameters - Parameters.
139
+ * @returns Transaction hash.
140
+ */
141
+ export async function burnBlocked(config, parameters) {
142
+ const { account, chainId, connector } = parameters;
143
+ const client = await getConnectorClient(config, {
144
+ account,
145
+ assertChainId: false,
146
+ chainId,
147
+ connector,
148
+ });
149
+ return await viem_Actions.burnBlocked(client, parameters);
150
+ }
151
+ /**
152
+ * Burns TIP20 tokens from a blocked address.
153
+ *
154
+ * Note: This is a synchronous action that waits for the transaction to
155
+ * be included on a block before returning a response.
156
+ *
157
+ * @example
158
+ * ```ts
159
+ * import { createConfig, http } from '@wagmi/core'
160
+ * import { tempo } from 'tempo.ts/chains'
161
+ * import { Actions } from 'tempo.ts/wagmi'
162
+ *
163
+ * const config = createConfig({
164
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
165
+ * transports: {
166
+ * [tempo.id]: http(),
167
+ * },
168
+ * })
169
+ *
170
+ * const result = await Actions.token.burnBlockedSync(config, {
171
+ * from: '0x...',
172
+ * amount: 100n,
173
+ * token: '0x...',
174
+ * })
175
+ * ```
176
+ *
177
+ * @param config - Config.
178
+ * @param parameters - Parameters.
179
+ * @returns The transaction receipt and event data.
180
+ */
181
+ export async function burnBlockedSync(config, parameters) {
182
+ const { account, chainId, connector } = parameters;
183
+ const client = await getConnectorClient(config, {
184
+ account,
185
+ assertChainId: false,
186
+ chainId,
187
+ connector,
188
+ });
189
+ return viem_Actions.burnBlockedSync(client, parameters);
190
+ }
191
+ /**
192
+ * Burns TIP20 tokens from the caller's balance.
193
+ *
194
+ * Note: This is a synchronous action that waits for the transaction to
195
+ * be included on a block before returning a response.
196
+ *
197
+ * @example
198
+ * ```ts
199
+ * import { createConfig, http } from '@wagmi/core'
200
+ * import { tempo } from 'tempo.ts/chains'
201
+ * import { Actions } from 'tempo.ts/wagmi'
202
+ *
203
+ * const config = createConfig({
204
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
205
+ * transports: {
206
+ * [tempo.id]: http(),
207
+ * },
208
+ * })
209
+ *
210
+ * const result = await Actions.token.burnSync(config, {
211
+ * amount: 100n,
212
+ * token: '0x...',
213
+ * })
214
+ * ```
215
+ *
216
+ * @param config - Config.
217
+ * @param parameters - Parameters.
218
+ * @returns The transaction receipt and event data.
219
+ */
220
+ export async function burnSync(config, parameters) {
221
+ const { account, chainId, connector } = parameters;
222
+ const client = await getConnectorClient(config, {
223
+ account,
224
+ assertChainId: false,
225
+ chainId,
226
+ connector,
227
+ });
228
+ return viem_Actions.burnSync(client, parameters);
229
+ }
230
+ /**
231
+ * Changes the transfer policy ID for a TIP20 token.
232
+ *
233
+ * @example
234
+ * ```ts
235
+ * import { createConfig, http } from '@wagmi/core'
236
+ * import { tempo } from 'tempo.ts/chains'
237
+ * import { Actions } from 'tempo.ts/wagmi'
238
+ *
239
+ * const config = createConfig({
240
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
241
+ * transports: {
242
+ * [tempo.id]: http(),
243
+ * },
244
+ * })
245
+ *
246
+ * const hash = await Actions.token.changeTransferPolicy(config, {
247
+ * token: '0x...',
248
+ * policyId: 1n,
249
+ * })
250
+ * ```
251
+ *
252
+ * @param config - Config.
253
+ * @param parameters - Parameters.
254
+ * @returns Transaction hash.
255
+ */
256
+ export async function changeTransferPolicy(config, parameters) {
257
+ const { account, chainId, connector } = parameters;
258
+ const client = await getConnectorClient(config, {
259
+ account,
260
+ assertChainId: false,
261
+ chainId,
262
+ connector,
263
+ });
264
+ return viem_Actions.changeTransferPolicy(client, parameters);
265
+ }
266
+ /**
267
+ * Changes the transfer policy ID for a TIP20 token.
268
+ *
269
+ * Note: This is a synchronous action that waits for the transaction to
270
+ * be included on a block before returning a response.
271
+ *
272
+ * @example
273
+ * ```ts
274
+ * import { createConfig, http } from '@wagmi/core'
275
+ * import { tempo } from 'tempo.ts/chains'
276
+ * import { Actions } from 'tempo.ts/wagmi'
277
+ *
278
+ * const config = createConfig({
279
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
280
+ * transports: {
281
+ * [tempo.id]: http(),
282
+ * },
283
+ * })
284
+ *
285
+ * const result = await Actions.token.changeTransferPolicySync(config, {
286
+ * token: '0x...',
287
+ * policyId: 1n,
288
+ * })
289
+ * ```
290
+ *
291
+ * @param config - Config.
292
+ * @param parameters - Parameters.
293
+ * @returns The transaction receipt and event data.
294
+ */
295
+ export async function changeTransferPolicySync(config, parameters) {
296
+ const { account, chainId, connector } = parameters;
297
+ const client = await getConnectorClient(config, {
298
+ account,
299
+ assertChainId: false,
300
+ chainId,
301
+ connector,
302
+ });
303
+ return viem_Actions.changeTransferPolicySync(client, parameters);
304
+ }
305
+ /**
306
+ * Creates a new TIP20 token.
307
+ *
308
+ * @example
309
+ * ```ts
310
+ * import { createConfig, http } from '@wagmi/core'
311
+ * import { tempo } from 'tempo.ts/chains'
312
+ * import { Actions } from 'tempo.ts/wagmi'
313
+ *
314
+ * const config = createConfig({
315
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
316
+ * transports: {
317
+ * [tempo.id]: http(),
318
+ * },
319
+ * })
320
+ *
321
+ * const hash = await Actions.token.create(config, {
322
+ * name: 'My Token',
323
+ * symbol: 'MTK',
324
+ * currency: 'USD',
325
+ * })
326
+ * ```
327
+ *
328
+ * @param config - Config.
329
+ * @param parameters - Parameters.
330
+ * @returns Transaction hash.
331
+ */
332
+ export async function create(config, parameters) {
333
+ const { account, chainId, connector } = parameters;
334
+ const client = await getConnectorClient(config, {
335
+ account,
336
+ assertChainId: false,
337
+ chainId,
338
+ connector,
339
+ });
340
+ return viem_Actions.create(client, parameters);
341
+ }
342
+ /**
343
+ * Creates a new TIP20 token.
344
+ *
345
+ * Note: This is a synchronous action that waits for the transaction to
346
+ * be included on a block before returning a response.
347
+ *
348
+ * @example
349
+ * ```ts
350
+ * import { createConfig, http } from '@wagmi/core'
351
+ * import { tempo } from 'tempo.ts/chains'
352
+ * import { Actions } from 'tempo.ts/wagmi'
353
+ *
354
+ * const config = createConfig({
355
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
356
+ * transports: {
357
+ * [tempo.id]: http(),
358
+ * },
359
+ * })
360
+ *
361
+ * const result = await Actions.token.createSync(config, {
362
+ * name: 'My Token',
363
+ * symbol: 'MTK',
364
+ * currency: 'USD',
365
+ * })
366
+ * ```
367
+ *
368
+ * @param config - Config.
369
+ * @param parameters - Parameters.
370
+ * @returns The transaction receipt and event data.
371
+ */
372
+ export async function createSync(config, parameters) {
373
+ const { account, chainId, connector } = parameters;
374
+ const client = await getConnectorClient(config, {
375
+ account,
376
+ assertChainId: false,
377
+ chainId,
378
+ connector,
379
+ });
380
+ return viem_Actions.createSync(client, parameters);
381
+ }
382
+ /**
383
+ * Updates the quote token for a TIP20 token.
384
+ *
385
+ * @example
386
+ * ```ts
387
+ * import { createConfig, http } from '@wagmi/core'
388
+ * import { tempo } from 'tempo.ts/chains'
389
+ * import { Actions } from 'tempo.ts/wagmi'
390
+ *
391
+ * const config = createConfig({
392
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
393
+ * transports: {
394
+ * [tempo.id]: http(),
395
+ * },
396
+ * })
397
+ *
398
+ * const hash = await Actions.token.updateQuoteToken(config, {
399
+ * token: '0x...',
400
+ * })
401
+ * ```
402
+ *
403
+ * @param config - Config.
404
+ * @param parameters - Parameters.
405
+ * @returns Transaction hash.
406
+ */
407
+ export async function updateQuoteToken(config, parameters) {
408
+ const { account, chainId, connector } = parameters;
409
+ const client = await getConnectorClient(config, {
410
+ account,
411
+ assertChainId: false,
412
+ chainId,
413
+ connector,
414
+ });
415
+ return viem_Actions.updateQuoteToken(client, parameters);
416
+ }
417
+ /**
418
+ * Updates the quote token for a TIP20 token.
419
+ *
420
+ * Note: This is a synchronous action that waits for the transaction to
421
+ * be included on a block before returning a response.
422
+ *
423
+ * @example
424
+ * ```ts
425
+ * import { createConfig, http } from '@wagmi/core'
426
+ * import { tempo } from 'tempo.ts/chains'
427
+ * import { Actions } from 'tempo.ts/wagmi'
428
+ *
429
+ * const config = createConfig({
430
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
431
+ * transports: {
432
+ * [tempo.id]: http(),
433
+ * },
434
+ * })
435
+ *
436
+ * const result = await Actions.token.updateQuoteTokenSync(config, {
437
+ * token: '0x...',
438
+ * })
439
+ * ```
440
+ *
441
+ * @param config - Config.
442
+ * @param parameters - Parameters.
443
+ * @returns The transaction receipt and event data.
444
+ */
445
+ export async function updateQuoteTokenSync(config, parameters) {
446
+ const { account, chainId, connector } = parameters;
447
+ const client = await getConnectorClient(config, {
448
+ account,
449
+ assertChainId: false,
450
+ chainId,
451
+ connector,
452
+ });
453
+ return viem_Actions.updateQuoteTokenSync(client, parameters);
454
+ }
455
+ /**
456
+ * Gets TIP20 token allowance.
457
+ *
458
+ * @example
459
+ * ```ts
460
+ * import { createConfig, http } from '@wagmi/core'
461
+ * import { tempo } from 'tempo.ts/chains'
462
+ * import { Actions } from 'tempo.ts/wagmi'
463
+ *
464
+ * const config = createConfig({
465
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
466
+ * transports: {
467
+ * [tempo.id]: http(),
468
+ * },
469
+ * })
470
+ *
471
+ * const allowance = await Actions.token.getAllowance(config, {
472
+ * account: '0x...',
473
+ * spender: '0x...',
474
+ * })
475
+ * ```
476
+ *
477
+ * @param config - Config.
478
+ * @param parameters - Parameters.
479
+ * @returns The token allowance.
480
+ */
481
+ export function getAllowance(config, parameters) {
482
+ const { chainId, ...rest } = parameters;
483
+ const client = config.getClient({ chainId });
484
+ return viem_Actions.getAllowance(client, rest);
485
+ }
486
+ (function (getAllowance) {
487
+ function queryKey(parameters) {
488
+ return ['getAllowance', parameters];
489
+ }
490
+ getAllowance.queryKey = queryKey;
491
+ function queryOptions(config, parameters) {
492
+ const { query, ...rest } = parameters;
493
+ return {
494
+ ...query,
495
+ queryKey: queryKey(rest),
496
+ async queryFn({ queryKey }) {
497
+ const [, parameters] = queryKey;
498
+ return await getAllowance(config, parameters);
499
+ },
500
+ };
501
+ }
502
+ getAllowance.queryOptions = queryOptions;
503
+ })(getAllowance || (getAllowance = {}));
504
+ /**
505
+ * Gets TIP20 token balance for an address.
506
+ *
507
+ * @example
508
+ * ```ts
509
+ * import { createConfig, http } from '@wagmi/core'
510
+ * import { tempo } from 'tempo.ts/chains'
511
+ * import { Actions } from 'tempo.ts/wagmi'
512
+ *
513
+ * const config = createConfig({
514
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
515
+ * transports: {
516
+ * [tempo.id]: http(),
517
+ * },
518
+ * })
519
+ *
520
+ * const balance = await Actions.token.getBalance(config, {
521
+ * account: '0x...',
522
+ * })
523
+ * ```
524
+ *
525
+ * @param config - Config.
526
+ * @param parameters - Parameters.
527
+ * @returns The token balance.
528
+ */
529
+ export function getBalance(config, parameters) {
530
+ const { chainId, ...rest } = parameters;
531
+ const client = config.getClient({ chainId });
532
+ return viem_Actions.getBalance(client, rest);
533
+ }
534
+ (function (getBalance) {
535
+ function queryKey(parameters) {
536
+ return ['getBalance', parameters];
537
+ }
538
+ getBalance.queryKey = queryKey;
539
+ function queryOptions(config, parameters) {
540
+ const { query, ...rest } = parameters;
541
+ return {
542
+ ...query,
543
+ queryKey: queryKey(rest),
544
+ async queryFn({ queryKey }) {
545
+ const [, parameters] = queryKey;
546
+ return (await getBalance(config, parameters)) ?? null;
547
+ },
548
+ };
549
+ }
550
+ getBalance.queryOptions = queryOptions;
551
+ })(getBalance || (getBalance = {}));
552
+ /**
553
+ * Gets TIP20 token metadata.
554
+ *
555
+ * @example
556
+ * ```ts
557
+ * import { createConfig, http } from '@wagmi/core'
558
+ * import { tempo } from 'tempo.ts/chains'
559
+ * import { Actions } from 'tempo.ts/wagmi'
560
+ *
561
+ * const config = createConfig({
562
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
563
+ * transports: {
564
+ * [tempo.id]: http(),
565
+ * },
566
+ * })
567
+ *
568
+ * const metadata = await Actions.token.getMetadata(config, {
569
+ * token: '0x...',
570
+ * })
571
+ * ```
572
+ *
573
+ * @param config - Config.
574
+ * @param parameters - Parameters.
575
+ * @returns The token metadata.
576
+ */
577
+ export function getMetadata(config, parameters) {
578
+ const { chainId, ...rest } = parameters;
579
+ const client = config.getClient({ chainId });
580
+ return viem_Actions.getMetadata(client, rest);
581
+ }
582
+ (function (getMetadata) {
583
+ function queryKey(parameters) {
584
+ return ['getMetadata', parameters];
585
+ }
586
+ getMetadata.queryKey = queryKey;
587
+ function queryOptions(config, parameters) {
588
+ const { query, ...rest } = parameters;
589
+ return {
590
+ ...query,
591
+ queryKey: queryKey(rest),
592
+ async queryFn({ queryKey }) {
593
+ const [, parameters] = queryKey;
594
+ return await getMetadata(config, parameters);
595
+ },
596
+ };
597
+ }
598
+ getMetadata.queryOptions = queryOptions;
599
+ })(getMetadata || (getMetadata = {}));
600
+ /**
601
+ * Gets the admin role for a specific role in a TIP20 token.
602
+ *
603
+ * @example
604
+ * ```ts
605
+ * import { createConfig, http } from '@wagmi/core'
606
+ * import { tempo } from 'tempo.ts/chains'
607
+ * import { Actions } from 'tempo.ts/wagmi'
608
+ *
609
+ * const config = createConfig({
610
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
611
+ * transports: {
612
+ * [tempo.id]: http(),
613
+ * },
614
+ * })
615
+ *
616
+ * const adminRole = await Actions.token.getRoleAdmin(config, {
617
+ * role: 'minter',
618
+ * token: '0x...',
619
+ * })
620
+ * ```
621
+ *
622
+ * @param config - Config.
623
+ * @param parameters - Parameters.
624
+ * @returns The admin role hash.
625
+ */
626
+ export function getRoleAdmin(config, parameters) {
627
+ const { chainId, ...rest } = parameters;
628
+ const client = config.getClient({ chainId });
629
+ return viem_Actions.getRoleAdmin(client, rest);
630
+ }
631
+ (function (getRoleAdmin) {
632
+ function queryKey(parameters) {
633
+ return ['getRoleAdmin', parameters];
634
+ }
635
+ getRoleAdmin.queryKey = queryKey;
636
+ function queryOptions(config, parameters) {
637
+ const { query, ...rest } = parameters;
638
+ return {
639
+ ...query,
640
+ queryKey: queryKey(rest),
641
+ async queryFn({ queryKey }) {
642
+ const [, parameters] = queryKey;
643
+ return await getRoleAdmin(config, parameters);
644
+ },
645
+ };
646
+ }
647
+ getRoleAdmin.queryOptions = queryOptions;
648
+ })(getRoleAdmin || (getRoleAdmin = {}));
649
+ /**
650
+ * Grants a role for a TIP20 token.
651
+ *
652
+ * @example
653
+ * ```ts
654
+ * import { createConfig, http } from '@wagmi/core'
655
+ * import { tempo } from 'tempo.ts/chains'
656
+ * import { Actions } from 'tempo.ts/wagmi'
657
+ *
658
+ * const config = createConfig({
659
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
660
+ * transports: {
661
+ * [tempo.id]: http(),
662
+ * },
663
+ * })
664
+ *
665
+ * const hash = await Actions.token.grantRoles(config, {
666
+ * token: '0x...',
667
+ * to: '0x...',
668
+ * roles: ['issuer'],
669
+ * })
670
+ * ```
671
+ *
672
+ * @param config - Config.
673
+ * @param parameters - Parameters.
674
+ * @returns Transaction hash.
675
+ */
676
+ export async function grantRoles(config, parameters) {
677
+ const { account, chainId, connector } = parameters;
678
+ const client = await getConnectorClient(config, {
679
+ account,
680
+ assertChainId: false,
681
+ chainId,
682
+ connector,
683
+ });
684
+ return viem_Actions.grantRoles(client, parameters);
685
+ }
686
+ /**
687
+ * Grants a role for a TIP20 token.
688
+ *
689
+ * Note: This is a synchronous action that waits for the transaction to
690
+ * be included on a block before returning a response.
691
+ *
692
+ * @example
693
+ * ```ts
694
+ * import { createConfig, http } from '@wagmi/core'
695
+ * import { tempo } from 'tempo.ts/chains'
696
+ * import { Actions } from 'tempo.ts/wagmi'
697
+ *
698
+ * const config = createConfig({
699
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
700
+ * transports: {
701
+ * [tempo.id]: http(),
702
+ * },
703
+ * })
704
+ *
705
+ * const result = await Actions.token.grantRolesSync(config, {
706
+ * token: '0x...',
707
+ * to: '0x...',
708
+ * roles: ['issuer'],
709
+ * })
710
+ * ```
711
+ *
712
+ * @param config - Config.
713
+ * @param parameters - Parameters.
714
+ * @returns The transaction receipt and event data.
715
+ */
716
+ export async function grantRolesSync(config, parameters) {
717
+ const { account, chainId, connector } = parameters;
718
+ const client = await getConnectorClient(config, {
719
+ account,
720
+ assertChainId: false,
721
+ chainId,
722
+ connector,
723
+ });
724
+ return viem_Actions.grantRolesSync(client, parameters);
725
+ }
726
+ /**
727
+ * Checks if an account has a specific role for a TIP20 token.
728
+ *
729
+ * @example
730
+ * ```ts
731
+ * import { createConfig, http } from '@wagmi/core'
732
+ * import { tempo } from 'tempo.ts/chains'
733
+ * import { Actions } from 'tempo.ts/wagmi'
734
+ *
735
+ * const config = createConfig({
736
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
737
+ * transports: {
738
+ * [tempo.id]: http(),
739
+ * },
740
+ * })
741
+ *
742
+ * const hasRole = await Actions.token.hasRole(config, {
743
+ * account: '0x...',
744
+ * role: 'issuer',
745
+ * token: '0x...',
746
+ * })
747
+ * ```
748
+ *
749
+ * @param config - Config.
750
+ * @param parameters - Parameters.
751
+ * @returns Whether the account has the role.
752
+ */
753
+ export function hasRole(config, parameters) {
754
+ const { chainId, ...rest } = parameters;
755
+ const client = config.getClient({ chainId });
756
+ return viem_Actions.hasRole(client, rest);
757
+ }
758
+ (function (hasRole) {
759
+ function queryKey(parameters) {
760
+ return ['hasRole', parameters];
761
+ }
762
+ hasRole.queryKey = queryKey;
763
+ function queryOptions(config, parameters) {
764
+ const { query, ...rest } = parameters;
765
+ return {
766
+ ...query,
767
+ queryKey: queryKey(rest),
768
+ async queryFn({ queryKey }) {
769
+ const [, parameters] = queryKey;
770
+ return await hasRole(config, parameters);
771
+ },
772
+ };
773
+ }
774
+ hasRole.queryOptions = queryOptions;
775
+ })(hasRole || (hasRole = {}));
776
+ /**
777
+ * Mints TIP20 tokens to an address.
778
+ *
779
+ * @example
780
+ * ```ts
781
+ * import { createConfig, http } from '@wagmi/core'
782
+ * import { tempo } from 'tempo.ts/chains'
783
+ * import { Actions } from 'tempo.ts/wagmi'
784
+ *
785
+ * const config = createConfig({
786
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
787
+ * transports: {
788
+ * [tempo.id]: http(),
789
+ * },
790
+ * })
791
+ *
792
+ * const hash = await Actions.token.mint(config, {
793
+ * to: '0x...',
794
+ * amount: 100n,
795
+ * token: '0x...',
796
+ * })
797
+ * ```
798
+ *
799
+ * @param config - Config.
800
+ * @param parameters - Parameters.
801
+ * @returns Transaction hash.
802
+ */
803
+ export async function mint(config, parameters) {
804
+ const { account, chainId, connector } = parameters;
805
+ const client = await getConnectorClient(config, {
806
+ account,
807
+ assertChainId: false,
808
+ chainId,
809
+ connector,
810
+ });
811
+ return viem_Actions.mint(client, parameters);
812
+ }
813
+ /**
814
+ * Mints TIP20 tokens to an address.
815
+ *
816
+ * Note: This is a synchronous action that waits for the transaction to
817
+ * be included on a block before returning a response.
818
+ *
819
+ * @example
820
+ * ```ts
821
+ * import { createConfig, http } from '@wagmi/core'
822
+ * import { tempo } from 'tempo.ts/chains'
823
+ * import { Actions } from 'tempo.ts/wagmi'
824
+ *
825
+ * const config = createConfig({
826
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
827
+ * transports: {
828
+ * [tempo.id]: http(),
829
+ * },
830
+ * })
831
+ *
832
+ * const result = await Actions.token.mintSync(config, {
833
+ * to: '0x...',
834
+ * amount: 100n,
835
+ * token: '0x...',
836
+ * })
837
+ * ```
838
+ *
839
+ * @param config - Config.
840
+ * @param parameters - Parameters.
841
+ * @returns The transaction receipt and event data.
842
+ */
843
+ export async function mintSync(config, parameters) {
844
+ const { account, chainId, connector } = parameters;
845
+ const client = await getConnectorClient(config, {
846
+ account,
847
+ assertChainId: false,
848
+ chainId,
849
+ connector,
850
+ });
851
+ return viem_Actions.mintSync(client, parameters);
852
+ }
853
+ /**
854
+ * Pauses a TIP20 token.
855
+ *
856
+ * @example
857
+ * ```ts
858
+ * import { createConfig, http } from '@wagmi/core'
859
+ * import { tempo } from 'tempo.ts/chains'
860
+ * import { Actions } from 'tempo.ts/wagmi'
861
+ *
862
+ * const config = createConfig({
863
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
864
+ * transports: {
865
+ * [tempo.id]: http(),
866
+ * },
867
+ * })
868
+ *
869
+ * const hash = await Actions.token.pause(config, {
870
+ * token: '0x...',
871
+ * })
872
+ * ```
873
+ *
874
+ * @param config - Config.
875
+ * @param parameters - Parameters.
876
+ * @returns Transaction hash.
877
+ */
878
+ export async function pause(config, parameters) {
879
+ const { account, chainId, connector } = parameters;
880
+ const client = await getConnectorClient(config, {
881
+ account,
882
+ assertChainId: false,
883
+ chainId,
884
+ connector,
885
+ });
886
+ return viem_Actions.pause(client, parameters);
887
+ }
888
+ /**
889
+ * Pauses a TIP20 token.
890
+ *
891
+ * Note: This is a synchronous action that waits for the transaction to
892
+ * be included on a block before returning a response.
893
+ *
894
+ * @example
895
+ * ```ts
896
+ * import { createConfig, http } from '@wagmi/core'
897
+ * import { tempo } from 'tempo.ts/chains'
898
+ * import { Actions } from 'tempo.ts/wagmi'
899
+ *
900
+ * const config = createConfig({
901
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
902
+ * transports: {
903
+ * [tempo.id]: http(),
904
+ * },
905
+ * })
906
+ *
907
+ * const result = await Actions.token.pauseSync(config, {
908
+ * token: '0x...',
909
+ * })
910
+ * ```
911
+ *
912
+ * @param config - Config.
913
+ * @param parameters - Parameters.
914
+ * @returns The transaction receipt and event data.
915
+ */
916
+ export async function pauseSync(config, parameters) {
917
+ const { account, chainId, connector } = parameters;
918
+ const client = await getConnectorClient(config, {
919
+ account,
920
+ assertChainId: false,
921
+ chainId,
922
+ connector,
923
+ });
924
+ return viem_Actions.pauseSync(client, parameters);
925
+ }
926
+ /**
927
+ * Renounces a role for a TIP20 token.
928
+ *
929
+ * @example
930
+ * ```ts
931
+ * import { createConfig, http } from '@wagmi/core'
932
+ * import { tempo } from 'tempo.ts/chains'
933
+ * import { Actions } from 'tempo.ts/wagmi'
934
+ *
935
+ * const config = createConfig({
936
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
937
+ * transports: {
938
+ * [tempo.id]: http(),
939
+ * },
940
+ * })
941
+ *
942
+ * const hash = await Actions.token.renounceRoles(config, {
943
+ * token: '0x...',
944
+ * roles: ['issuer'],
945
+ * })
946
+ * ```
947
+ *
948
+ * @param config - Config.
949
+ * @param parameters - Parameters.
950
+ * @returns Transaction hash.
951
+ */
952
+ export async function renounceRoles(config, parameters) {
953
+ const { account, chainId, connector } = parameters;
954
+ const client = await getConnectorClient(config, {
955
+ account,
956
+ assertChainId: false,
957
+ chainId,
958
+ connector,
959
+ });
960
+ return viem_Actions.renounceRoles(client, parameters);
961
+ }
962
+ /**
963
+ * Renounces a role for a TIP20 token.
964
+ *
965
+ * Note: This is a synchronous action that waits for the transaction to
966
+ * be included on a block before returning a response.
967
+ *
968
+ * @example
969
+ * ```ts
970
+ * import { createConfig, http } from '@wagmi/core'
971
+ * import { tempo } from 'tempo.ts/chains'
972
+ * import { Actions } from 'tempo.ts/wagmi'
973
+ *
974
+ * const config = createConfig({
975
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
976
+ * transports: {
977
+ * [tempo.id]: http(),
978
+ * },
979
+ * })
980
+ *
981
+ * const result = await Actions.token.renounceRolesSync(config, {
982
+ * token: '0x...',
983
+ * roles: ['issuer'],
984
+ * })
985
+ * ```
986
+ *
987
+ * @param config - Config.
988
+ * @param parameters - Parameters.
989
+ * @returns The transaction receipt and event data.
990
+ */
991
+ export async function renounceRolesSync(config, parameters) {
992
+ const { account, chainId, connector } = parameters;
993
+ const client = await getConnectorClient(config, {
994
+ account,
995
+ assertChainId: false,
996
+ chainId,
997
+ connector,
998
+ });
999
+ return viem_Actions.renounceRolesSync(client, parameters);
1000
+ }
1001
+ /**
1002
+ * Revokes a role for a TIP20 token.
1003
+ *
1004
+ * @example
1005
+ * ```ts
1006
+ * import { createConfig, http } from '@wagmi/core'
1007
+ * import { tempo } from 'tempo.ts/chains'
1008
+ * import { Actions } from 'tempo.ts/wagmi'
1009
+ *
1010
+ * const config = createConfig({
1011
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1012
+ * transports: {
1013
+ * [tempo.id]: http(),
1014
+ * },
1015
+ * })
1016
+ *
1017
+ * const hash = await Actions.token.revokeRoles(config, {
1018
+ * token: '0x...',
1019
+ * from: '0x...',
1020
+ * roles: ['issuer'],
1021
+ * })
1022
+ * ```
1023
+ *
1024
+ * @param config - Config.
1025
+ * @param parameters - Parameters.
1026
+ * @returns Transaction hash.
1027
+ */
1028
+ export async function revokeRoles(config, parameters) {
1029
+ const { account, chainId, connector } = parameters;
1030
+ const client = await getConnectorClient(config, {
1031
+ account,
1032
+ assertChainId: false,
1033
+ chainId,
1034
+ connector,
1035
+ });
1036
+ return viem_Actions.revokeRoles(client, parameters);
1037
+ }
1038
+ /**
1039
+ * Revokes a role for a TIP20 token.
1040
+ *
1041
+ * Note: This is a synchronous action that waits for the transaction to
1042
+ * be included on a block before returning a response.
1043
+ *
1044
+ * @example
1045
+ * ```ts
1046
+ * import { createConfig, http } from '@wagmi/core'
1047
+ * import { tempo } from 'tempo.ts/chains'
1048
+ * import { Actions } from 'tempo.ts/wagmi'
1049
+ *
1050
+ * const config = createConfig({
1051
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1052
+ * transports: {
1053
+ * [tempo.id]: http(),
1054
+ * },
1055
+ * })
1056
+ *
1057
+ * const result = await Actions.token.revokeRolesSync(config, {
1058
+ * token: '0x...',
1059
+ * from: '0x...',
1060
+ * roles: ['issuer'],
1061
+ * })
1062
+ * ```
1063
+ *
1064
+ * @param config - Config.
1065
+ * @param parameters - Parameters.
1066
+ * @returns The transaction receipt and event data.
1067
+ */
1068
+ export async function revokeRolesSync(config, parameters) {
1069
+ const { account, chainId, connector } = parameters;
1070
+ const client = await getConnectorClient(config, {
1071
+ account,
1072
+ assertChainId: false,
1073
+ chainId,
1074
+ connector,
1075
+ });
1076
+ return viem_Actions.revokeRolesSync(client, parameters);
1077
+ }
1078
+ /**
1079
+ * Sets the admin role for a specific role in a TIP20 token.
1080
+ *
1081
+ * @example
1082
+ * ```ts
1083
+ * import { createConfig, http } from '@wagmi/core'
1084
+ * import { tempo } from 'tempo.ts/chains'
1085
+ * import { Actions } from 'tempo.ts/wagmi'
1086
+ *
1087
+ * const config = createConfig({
1088
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1089
+ * transports: {
1090
+ * [tempo.id]: http(),
1091
+ * },
1092
+ * })
1093
+ *
1094
+ * const hash = await Actions.token.setRoleAdmin(config, {
1095
+ * token: '0x...',
1096
+ * role: 'issuer',
1097
+ * adminRole: 'pause',
1098
+ * })
1099
+ * ```
1100
+ *
1101
+ * @param config - Config.
1102
+ * @param parameters - Parameters.
1103
+ * @returns Transaction hash.
1104
+ */
1105
+ export async function setRoleAdmin(config, parameters) {
1106
+ const { account, chainId, connector } = parameters;
1107
+ const client = await getConnectorClient(config, {
1108
+ account,
1109
+ assertChainId: false,
1110
+ chainId,
1111
+ connector,
1112
+ });
1113
+ return viem_Actions.setRoleAdmin(client, parameters);
1114
+ }
1115
+ /**
1116
+ * Sets the admin role for a specific role in a TIP20 token.
1117
+ *
1118
+ * Note: This is a synchronous action that waits for the transaction to
1119
+ * be included on a block before returning a response.
1120
+ *
1121
+ * @example
1122
+ * ```ts
1123
+ * import { createConfig, http } from '@wagmi/core'
1124
+ * import { tempo } from 'tempo.ts/chains'
1125
+ * import { Actions } from 'tempo.ts/wagmi'
1126
+ *
1127
+ * const config = createConfig({
1128
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1129
+ * transports: {
1130
+ * [tempo.id]: http(),
1131
+ * },
1132
+ * })
1133
+ *
1134
+ * const result = await Actions.token.setRoleAdminSync(config, {
1135
+ * token: '0x...',
1136
+ * role: 'issuer',
1137
+ * adminRole: 'pause',
1138
+ * })
1139
+ * ```
1140
+ *
1141
+ * @param config - Config.
1142
+ * @param parameters - Parameters.
1143
+ * @returns The transaction receipt and event data.
1144
+ */
1145
+ export async function setRoleAdminSync(config, parameters) {
1146
+ const { account, chainId, connector } = parameters;
1147
+ const client = await getConnectorClient(config, {
1148
+ account,
1149
+ assertChainId: false,
1150
+ chainId,
1151
+ connector,
1152
+ });
1153
+ return viem_Actions.setRoleAdminSync(client, parameters);
1154
+ }
1155
+ /**
1156
+ * Sets the supply cap for a TIP20 token.
1157
+ *
1158
+ * @example
1159
+ * ```ts
1160
+ * import { createConfig, http } from '@wagmi/core'
1161
+ * import { tempo } from 'tempo.ts/chains'
1162
+ * import { Actions } from 'tempo.ts/wagmi'
1163
+ *
1164
+ * const config = createConfig({
1165
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1166
+ * transports: {
1167
+ * [tempo.id]: http(),
1168
+ * },
1169
+ * })
1170
+ *
1171
+ * const hash = await Actions.token.setSupplyCap(config, {
1172
+ * token: '0x...',
1173
+ * supplyCap: 1000000n,
1174
+ * })
1175
+ * ```
1176
+ *
1177
+ * @param config - Config.
1178
+ * @param parameters - Parameters.
1179
+ * @returns Transaction hash.
1180
+ */
1181
+ export async function setSupplyCap(config, parameters) {
1182
+ const { account, chainId, connector } = parameters;
1183
+ const client = await getConnectorClient(config, {
1184
+ account,
1185
+ assertChainId: false,
1186
+ chainId,
1187
+ connector,
1188
+ });
1189
+ return viem_Actions.setSupplyCap(client, parameters);
1190
+ }
1191
+ /**
1192
+ * Sets the supply cap for a TIP20 token.
1193
+ *
1194
+ * Note: This is a synchronous action that waits for the transaction to
1195
+ * be included on a block before returning a response.
1196
+ *
1197
+ * @example
1198
+ * ```ts
1199
+ * import { createConfig, http } from '@wagmi/core'
1200
+ * import { tempo } from 'tempo.ts/chains'
1201
+ * import { Actions } from 'tempo.ts/wagmi'
1202
+ *
1203
+ * const config = createConfig({
1204
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1205
+ * transports: {
1206
+ * [tempo.id]: http(),
1207
+ * },
1208
+ * })
1209
+ *
1210
+ * const result = await Actions.token.setSupplyCapSync(config, {
1211
+ * token: '0x...',
1212
+ * supplyCap: 1000000n,
1213
+ * })
1214
+ * ```
1215
+ *
1216
+ * @param config - Config.
1217
+ * @param parameters - Parameters.
1218
+ * @returns The transaction receipt and event data.
1219
+ */
1220
+ export async function setSupplyCapSync(config, parameters) {
1221
+ const { account, chainId, connector } = parameters;
1222
+ const client = await getConnectorClient(config, {
1223
+ account,
1224
+ assertChainId: false,
1225
+ chainId,
1226
+ connector,
1227
+ });
1228
+ return viem_Actions.setSupplyCapSync(client, parameters);
1229
+ }
1230
+ /**
1231
+ * Transfers TIP20 tokens to another address.
1232
+ *
1233
+ * @example
1234
+ * ```ts
1235
+ * import { createConfig, http } from '@wagmi/core'
1236
+ * import { tempo } from 'tempo.ts/chains'
1237
+ * import { Actions } from 'tempo.ts/wagmi'
1238
+ *
1239
+ * const config = createConfig({
1240
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1241
+ * transports: {
1242
+ * [tempo.id]: http(),
1243
+ * },
1244
+ * })
1245
+ *
1246
+ * const hash = await Actions.token.transfer(config, {
1247
+ * to: '0x...',
1248
+ * amount: 100n,
1249
+ * })
1250
+ * ```
1251
+ *
1252
+ * @param config - Config.
1253
+ * @param parameters - Parameters.
1254
+ * @returns Transaction hash.
1255
+ */
1256
+ export async function transfer(config, parameters) {
1257
+ const { account, chainId, connector } = parameters;
1258
+ const client = await getConnectorClient(config, {
1259
+ account,
1260
+ assertChainId: false,
1261
+ chainId,
1262
+ connector,
1263
+ });
1264
+ return viem_Actions.transfer(client, parameters);
1265
+ }
1266
+ /**
1267
+ * Transfers TIP20 tokens to another address.
1268
+ *
1269
+ * Note: This is a synchronous action that waits for the transaction to
1270
+ * be included on a block before returning a response.
1271
+ *
1272
+ * @example
1273
+ * ```ts
1274
+ * import { createConfig, http } from '@wagmi/core'
1275
+ * import { tempo } from 'tempo.ts/chains'
1276
+ * import { Actions } from 'tempo.ts/wagmi'
1277
+ *
1278
+ * const config = createConfig({
1279
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1280
+ * transports: {
1281
+ * [tempo.id]: http(),
1282
+ * },
1283
+ * })
1284
+ *
1285
+ * const result = await Actions.token.transferSync(config, {
1286
+ * to: '0x...',
1287
+ * amount: 100n,
1288
+ * })
1289
+ * ```
1290
+ *
1291
+ * @param config - Config.
1292
+ * @param parameters - Parameters.
1293
+ * @returns The transaction receipt and event data.
1294
+ */
1295
+ export async function transferSync(config, parameters) {
1296
+ const { account, chainId, connector } = parameters;
1297
+ const client = await getConnectorClient(config, {
1298
+ account,
1299
+ assertChainId: false,
1300
+ chainId,
1301
+ connector,
1302
+ });
1303
+ return viem_Actions.transferSync(client, parameters);
1304
+ }
1305
+ /**
1306
+ * Unpauses a TIP20 token.
1307
+ *
1308
+ * @example
1309
+ * ```ts
1310
+ * import { createConfig, http } from '@wagmi/core'
1311
+ * import { tempo } from 'tempo.ts/chains'
1312
+ * import { Actions } from 'tempo.ts/wagmi'
1313
+ *
1314
+ * const config = createConfig({
1315
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1316
+ * transports: {
1317
+ * [tempo.id]: http(),
1318
+ * },
1319
+ * })
1320
+ *
1321
+ * const hash = await Actions.token.unpause(config, {
1322
+ * token: '0x...',
1323
+ * })
1324
+ * ```
1325
+ *
1326
+ * @param config - Config.
1327
+ * @param parameters - Parameters.
1328
+ * @returns Transaction hash.
1329
+ */
1330
+ export async function unpause(config, parameters) {
1331
+ const { account, chainId, connector } = parameters;
1332
+ const client = await getConnectorClient(config, {
1333
+ account,
1334
+ assertChainId: false,
1335
+ chainId,
1336
+ connector,
1337
+ });
1338
+ return viem_Actions.unpause(client, parameters);
1339
+ }
1340
+ /**
1341
+ * Unpauses a TIP20 token.
1342
+ *
1343
+ * Note: This is a synchronous action that waits for the transaction to
1344
+ * be included on a block before returning a response.
1345
+ *
1346
+ * @example
1347
+ * ```ts
1348
+ * import { createConfig, http } from '@wagmi/core'
1349
+ * import { tempo } from 'tempo.ts/chains'
1350
+ * import { Actions } from 'tempo.ts/wagmi'
1351
+ *
1352
+ * const config = createConfig({
1353
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1354
+ * transports: {
1355
+ * [tempo.id]: http(),
1356
+ * },
1357
+ * })
1358
+ *
1359
+ * const result = await Actions.token.unpauseSync(config, {
1360
+ * token: '0x...',
1361
+ * })
1362
+ * ```
1363
+ *
1364
+ * @param config - Config.
1365
+ * @param parameters - Parameters.
1366
+ * @returns The transaction receipt and event data.
1367
+ */
1368
+ export async function unpauseSync(config, parameters) {
1369
+ const { account, chainId, connector } = parameters;
1370
+ const client = await getConnectorClient(config, {
1371
+ account,
1372
+ assertChainId: false,
1373
+ chainId,
1374
+ connector,
1375
+ });
1376
+ return viem_Actions.unpauseSync(client, parameters);
1377
+ }
1378
+ /**
1379
+ * Prepares the quote token update for a TIP20 token.
1380
+ *
1381
+ * @example
1382
+ * ```ts
1383
+ * import { createConfig, http } from '@wagmi/core'
1384
+ * import { tempo } from 'tempo.ts/chains'
1385
+ * import { Actions } from 'tempo.ts/wagmi'
1386
+ *
1387
+ * const config = createConfig({
1388
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1389
+ * transports: {
1390
+ * [tempo.id]: http(),
1391
+ * },
1392
+ * })
1393
+ *
1394
+ * const hash = await Actions.token.prepareUpdateQuoteToken(config, {
1395
+ * token: '0x...',
1396
+ * quoteToken: '0x...',
1397
+ * })
1398
+ * ```
1399
+ *
1400
+ * @param config - Config.
1401
+ * @param parameters - Parameters.
1402
+ * @returns Transaction hash.
1403
+ */
1404
+ export async function prepareUpdateQuoteToken(config, parameters) {
1405
+ const { account, chainId, connector } = parameters;
1406
+ const client = await getConnectorClient(config, {
1407
+ account,
1408
+ assertChainId: false,
1409
+ chainId,
1410
+ connector,
1411
+ });
1412
+ return viem_Actions.prepareUpdateQuoteToken(client, parameters);
1413
+ }
1414
+ /**
1415
+ * Prepares the quote token update for a TIP20 token.
1416
+ *
1417
+ * Note: This is a synchronous action that waits for the transaction to
1418
+ * be included on a block before returning a response.
1419
+ *
1420
+ * @example
1421
+ * ```ts
1422
+ * import { createConfig, http } from '@wagmi/core'
1423
+ * import { tempo } from 'tempo.ts/chains'
1424
+ * import { Actions } from 'tempo.ts/wagmi'
1425
+ *
1426
+ * const config = createConfig({
1427
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1428
+ * transports: {
1429
+ * [tempo.id]: http(),
1430
+ * },
1431
+ * })
1432
+ *
1433
+ * const result = await Actions.token.prepareUpdateQuoteTokenSync(config, {
1434
+ * token: '0x...',
1435
+ * quoteToken: '0x...',
1436
+ * })
1437
+ * ```
1438
+ *
1439
+ * @param config - Config.
1440
+ * @param parameters - Parameters.
1441
+ * @returns The transaction receipt and event data.
1442
+ */
1443
+ export async function prepareUpdateQuoteTokenSync(config, parameters) {
1444
+ const { account, chainId, connector } = parameters;
1445
+ const client = await getConnectorClient(config, {
1446
+ account,
1447
+ assertChainId: false,
1448
+ chainId,
1449
+ connector,
1450
+ });
1451
+ return viem_Actions.prepareUpdateQuoteTokenSync(client, parameters);
1452
+ }
1453
+ /**
1454
+ * Watches for TIP20 token role admin updates.
1455
+ *
1456
+ * @example
1457
+ * ```ts
1458
+ * import { createConfig, http } from '@wagmi/core'
1459
+ * import { tempo } from 'tempo.ts/chains'
1460
+ * import { Actions } from 'tempo.ts/wagmi'
1461
+ *
1462
+ * const config = createConfig({
1463
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1464
+ * transports: {
1465
+ * [tempo.id]: http(),
1466
+ * },
1467
+ * })
1468
+ *
1469
+ * const unwatch = Actions.token.watchAdminRole(config, {
1470
+ * onRoleAdminUpdated: (args, log) => {
1471
+ * console.log('Role admin updated:', args)
1472
+ * },
1473
+ * })
1474
+ * ```
1475
+ *
1476
+ * @param config - Config.
1477
+ * @param parameters - Parameters.
1478
+ * @returns A function to unsubscribe from the event.
1479
+ */
1480
+ export function watchAdminRole(config, parameters) {
1481
+ const { chainId, ...rest } = parameters;
1482
+ const client = config.getClient({ chainId });
1483
+ return viem_Actions.watchAdminRole(client, rest);
1484
+ }
1485
+ /**
1486
+ * Watches for TIP20 token approval events.
1487
+ *
1488
+ * @example
1489
+ * ```ts
1490
+ * import { createConfig, http } from '@wagmi/core'
1491
+ * import { tempo } from 'tempo.ts/chains'
1492
+ * import { Actions } from 'tempo.ts/wagmi'
1493
+ *
1494
+ * const config = createConfig({
1495
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1496
+ * transports: {
1497
+ * [tempo.id]: http(),
1498
+ * },
1499
+ * })
1500
+ *
1501
+ * const unwatch = Actions.token.watchApprove(config, {
1502
+ * onApproval: (args, log) => {
1503
+ * console.log('Approval:', args)
1504
+ * },
1505
+ * })
1506
+ * ```
1507
+ *
1508
+ * @param config - Config.
1509
+ * @param parameters - Parameters.
1510
+ * @returns A function to unsubscribe from the event.
1511
+ */
1512
+ export function watchApprove(config, parameters) {
1513
+ const { chainId, ...rest } = parameters;
1514
+ const client = config.getClient({ chainId });
1515
+ return viem_Actions.watchApprove(client, rest);
1516
+ }
1517
+ /**
1518
+ * Watches for TIP20 token burn events.
1519
+ *
1520
+ * @example
1521
+ * ```ts
1522
+ * import { createConfig, http } from '@wagmi/core'
1523
+ * import { tempo } from 'tempo.ts/chains'
1524
+ * import { Actions } from 'tempo.ts/wagmi'
1525
+ *
1526
+ * const config = createConfig({
1527
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1528
+ * transports: {
1529
+ * [tempo.id]: http(),
1530
+ * },
1531
+ * })
1532
+ *
1533
+ * const unwatch = Actions.token.watchBurn(config, {
1534
+ * onBurn: (args, log) => {
1535
+ * console.log('Burn:', args)
1536
+ * },
1537
+ * })
1538
+ * ```
1539
+ *
1540
+ * @param config - Config.
1541
+ * @param parameters - Parameters.
1542
+ * @returns A function to unsubscribe from the event.
1543
+ */
1544
+ export function watchBurn(config, parameters) {
1545
+ const { chainId, ...rest } = parameters;
1546
+ const client = config.getClient({ chainId });
1547
+ return viem_Actions.watchBurn(client, rest);
1548
+ }
1549
+ /**
1550
+ * Watches for new TIP20 tokens created.
1551
+ *
1552
+ * @example
1553
+ * ```ts
1554
+ * import { createConfig, http } from '@wagmi/core'
1555
+ * import { tempo } from 'tempo.ts/chains'
1556
+ * import { Actions } from 'tempo.ts/wagmi'
1557
+ *
1558
+ * const config = createConfig({
1559
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1560
+ * transports: {
1561
+ * [tempo.id]: http(),
1562
+ * },
1563
+ * })
1564
+ *
1565
+ * const unwatch = Actions.token.watchCreate(config, {
1566
+ * onTokenCreated: (args, log) => {
1567
+ * console.log('Token created:', args)
1568
+ * },
1569
+ * })
1570
+ * ```
1571
+ *
1572
+ * @param config - Config.
1573
+ * @param parameters - Parameters.
1574
+ * @returns A function to unsubscribe from the event.
1575
+ */
1576
+ export function watchCreate(config, parameters) {
1577
+ const { chainId, ...rest } = parameters;
1578
+ const client = config.getClient({ chainId });
1579
+ return viem_Actions.watchCreate(client, rest);
1580
+ }
1581
+ /**
1582
+ * Watches for TIP20 token mint events.
1583
+ *
1584
+ * @example
1585
+ * ```ts
1586
+ * import { createConfig, http } from '@wagmi/core'
1587
+ * import { tempo } from 'tempo.ts/chains'
1588
+ * import { Actions } from 'tempo.ts/wagmi'
1589
+ *
1590
+ * const config = createConfig({
1591
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1592
+ * transports: {
1593
+ * [tempo.id]: http(),
1594
+ * },
1595
+ * })
1596
+ *
1597
+ * const unwatch = Actions.token.watchMint(config, {
1598
+ * onMint: (args, log) => {
1599
+ * console.log('Mint:', args)
1600
+ * },
1601
+ * })
1602
+ * ```
1603
+ *
1604
+ * @param config - Config.
1605
+ * @param parameters - Parameters.
1606
+ * @returns A function to unsubscribe from the event.
1607
+ */
1608
+ export function watchMint(config, parameters) {
1609
+ const { chainId, ...rest } = parameters;
1610
+ const client = config.getClient({ chainId });
1611
+ return viem_Actions.watchMint(client, rest);
1612
+ }
1613
+ /**
1614
+ * Watches for TIP20 token role membership updates.
1615
+ *
1616
+ * @example
1617
+ * ```ts
1618
+ * import { createConfig, http } from '@wagmi/core'
1619
+ * import { tempo } from 'tempo.ts/chains'
1620
+ * import { Actions } from 'tempo.ts/wagmi'
1621
+ *
1622
+ * const config = createConfig({
1623
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1624
+ * transports: {
1625
+ * [tempo.id]: http(),
1626
+ * },
1627
+ * })
1628
+ *
1629
+ * const unwatch = Actions.token.watchRole(config, {
1630
+ * onRoleUpdated: (args, log) => {
1631
+ * console.log('Role updated:', args)
1632
+ * },
1633
+ * })
1634
+ * ```
1635
+ *
1636
+ * @param config - Config.
1637
+ * @param parameters - Parameters.
1638
+ * @returns A function to unsubscribe from the event.
1639
+ */
1640
+ export function watchRole(config, parameters) {
1641
+ const { chainId, ...rest } = parameters;
1642
+ const client = config.getClient({ chainId });
1643
+ return viem_Actions.watchRole(client, rest);
1644
+ }
1645
+ /**
1646
+ * Watches for TIP20 token transfer events.
1647
+ *
1648
+ * @example
1649
+ * ```ts
1650
+ * import { createConfig, http } from '@wagmi/core'
1651
+ * import { tempo } from 'tempo.ts/chains'
1652
+ * import { Actions } from 'tempo.ts/wagmi'
1653
+ *
1654
+ * const config = createConfig({
1655
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1656
+ * transports: {
1657
+ * [tempo.id]: http(),
1658
+ * },
1659
+ * })
1660
+ *
1661
+ * const unwatch = Actions.token.watchTransfer(config, {
1662
+ * onTransfer: (args, log) => {
1663
+ * console.log('Transfer:', args)
1664
+ * },
1665
+ * })
1666
+ * ```
1667
+ *
1668
+ * @param config - Config.
1669
+ * @param parameters - Parameters.
1670
+ * @returns A function to unsubscribe from the event.
1671
+ */
1672
+ export function watchTransfer(config, parameters) {
1673
+ const { chainId, ...rest } = parameters;
1674
+ const client = config.getClient({ chainId });
1675
+ return viem_Actions.watchTransfer(client, rest);
1676
+ }
1677
+ /**
1678
+ * Watches for TIP20 token quote token update events.
1679
+ *
1680
+ * @example
1681
+ * ```ts
1682
+ * import { createConfig, http } from '@wagmi/core'
1683
+ * import { tempo } from 'tempo.ts/chains'
1684
+ * import { Actions } from 'tempo.ts/wagmi'
1685
+ *
1686
+ * const config = createConfig({
1687
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1688
+ * transports: {
1689
+ * [tempo.id]: http(),
1690
+ * },
1691
+ * })
1692
+ *
1693
+ * const unwatch = Actions.token.watchUpdateQuoteToken(config, {
1694
+ * onUpdateQuoteToken: (args, log) => {
1695
+ * if (args.completed)
1696
+ * console.log('quote token update completed:', args.newQuoteToken)
1697
+ * else
1698
+ * console.log('quote token update proposed:', args.newQuoteToken)
1699
+ * },
1700
+ * })
1701
+ * ```
1702
+ *
1703
+ * @param config - Config.
1704
+ * @param parameters - Parameters.
1705
+ * @returns A function to unsubscribe from the event.
1706
+ */
1707
+ export function watchUpdateQuoteToken(config, parameters) {
1708
+ const { chainId, ...rest } = parameters;
1709
+ const client = config.getClient({ chainId });
1710
+ return viem_Actions.watchUpdateQuoteToken(client, rest);
1711
+ }
1712
+ //# sourceMappingURL=token.js.map