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,2613 @@
1
+ import type * as Query from '@tanstack/query-core'
2
+ import { type Config, getConnectorClient } from '@wagmi/core'
3
+ import type { ChainIdParameter, ConnectorParameter } from '@wagmi/core/internal'
4
+ import type { Account } from 'viem'
5
+ import type { RequiredBy } from '../../internal/types.js'
6
+ import * as viem_Actions from '../../viem/Actions/token.js'
7
+
8
+ /**
9
+ * Approves a spender to transfer TIP20 tokens on behalf of the caller.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * import { createConfig, http } from '@wagmi/core'
14
+ * import { tempo } from 'tempo.ts/chains'
15
+ * import { Actions } from 'tempo.ts/wagmi'
16
+ *
17
+ * const config = createConfig({
18
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
19
+ * transports: {
20
+ * [tempo.id]: http(),
21
+ * },
22
+ * })
23
+ *
24
+ * const hash = await Actions.token.approve(config, {
25
+ * spender: '0x...',
26
+ * amount: 100n,
27
+ * })
28
+ * ```
29
+ *
30
+ * @param config - Config.
31
+ * @param parameters - Parameters.
32
+ * @returns Transaction hash.
33
+ */
34
+ export async function approve<config extends Config>(
35
+ config: config,
36
+ parameters: approve.Parameters<config>,
37
+ ): Promise<viem_Actions.approve.ReturnValue> {
38
+ const { account, chainId, connector } = parameters
39
+
40
+ const client = await getConnectorClient(config, {
41
+ account,
42
+ assertChainId: false,
43
+ chainId,
44
+ connector,
45
+ })
46
+
47
+ return viem_Actions.approve(
48
+ client,
49
+ parameters as viem_Actions.approve.Parameters,
50
+ )
51
+ }
52
+
53
+ export declare namespace approve {
54
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
55
+ ConnectorParameter &
56
+ Omit<viem_Actions.approve.Parameters<undefined, Account>, 'chain'>
57
+
58
+ export type ReturnValue = viem_Actions.approve.ReturnValue
59
+
60
+ export type ErrorType = viem_Actions.approve.ErrorType
61
+ }
62
+
63
+ /**
64
+ * Approves a spender to transfer TIP20 tokens on behalf of the caller.
65
+ *
66
+ * Note: This is a synchronous action that waits for the transaction to
67
+ * be included on a block before returning a response.
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * import { createConfig, http } from '@wagmi/core'
72
+ * import { tempo } from 'tempo.ts/chains'
73
+ * import { Actions } from 'tempo.ts/wagmi'
74
+ *
75
+ * const config = createConfig({
76
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
77
+ * transports: {
78
+ * [tempo.id]: http(),
79
+ * },
80
+ * })
81
+ *
82
+ * const result = await Actions.token.approveSync(config, {
83
+ * spender: '0x...',
84
+ * amount: 100n,
85
+ * })
86
+ * ```
87
+ *
88
+ * @param config - Config.
89
+ * @param parameters - Parameters.
90
+ * @returns The transaction receipt and event data.
91
+ */
92
+ export async function approveSync<config extends Config>(
93
+ config: config,
94
+ parameters: approveSync.Parameters<config>,
95
+ ): Promise<viem_Actions.approveSync.ReturnValue> {
96
+ const { account, chainId, connector } = parameters
97
+
98
+ const client = await getConnectorClient(config, {
99
+ account,
100
+ assertChainId: false,
101
+ chainId,
102
+ connector,
103
+ })
104
+
105
+ return viem_Actions.approveSync(
106
+ client,
107
+ parameters as viem_Actions.approveSync.Parameters,
108
+ )
109
+ }
110
+
111
+ export declare namespace approveSync {
112
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
113
+ ConnectorParameter &
114
+ Omit<viem_Actions.approveSync.Parameters<undefined, Account>, 'chain'>
115
+
116
+ export type ReturnValue = viem_Actions.approveSync.ReturnValue
117
+
118
+ export type ErrorType = viem_Actions.approveSync.ErrorType
119
+ }
120
+
121
+ /**
122
+ * Burns TIP20 tokens from the caller's balance.
123
+ *
124
+ * @example
125
+ * ```ts
126
+ * import { createConfig, http } from '@wagmi/core'
127
+ * import { tempo } from 'tempo.ts/chains'
128
+ * import { Actions } from 'tempo.ts/wagmi'
129
+ *
130
+ * const config = createConfig({
131
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
132
+ * transports: {
133
+ * [tempo.id]: http(),
134
+ * },
135
+ * })
136
+ *
137
+ * const hash = await Actions.token.burn(config, {
138
+ * amount: 100n,
139
+ * token: '0x...',
140
+ * })
141
+ * ```
142
+ *
143
+ * @param config - Config.
144
+ * @param parameters - Parameters.
145
+ * @returns Transaction hash.
146
+ */
147
+ export async function burn<config extends Config>(
148
+ config: config,
149
+ parameters: burn.Parameters<config>,
150
+ ): Promise<viem_Actions.burn.ReturnValue> {
151
+ const { account, chainId, connector } = parameters
152
+
153
+ const client = await getConnectorClient(config, {
154
+ account,
155
+ assertChainId: false,
156
+ chainId,
157
+ connector,
158
+ })
159
+
160
+ return viem_Actions.burn(client, parameters as viem_Actions.burn.Parameters)
161
+ }
162
+
163
+ export declare namespace burn {
164
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
165
+ ConnectorParameter &
166
+ Omit<viem_Actions.burn.Parameters<undefined, Account>, 'chain'>
167
+
168
+ export type ReturnValue = viem_Actions.burn.ReturnValue
169
+
170
+ export type ErrorType = viem_Actions.burn.ErrorType
171
+ }
172
+
173
+ /**
174
+ * Burns TIP20 tokens from a blocked address.
175
+ *
176
+ * @example
177
+ * ```ts
178
+ * import { createConfig, http } from '@wagmi/core'
179
+ * import { tempo } from 'tempo.ts/chains'
180
+ * import { Actions } from 'tempo.ts/wagmi'
181
+ *
182
+ * const config = createConfig({
183
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
184
+ * transports: {
185
+ * [tempo.id]: http(),
186
+ * },
187
+ * })
188
+ *
189
+ * const hash = await Actions.token.burnBlocked(config, {
190
+ * from: '0x...',
191
+ * amount: 100n,
192
+ * token: '0x...',
193
+ * })
194
+ * ```
195
+ *
196
+ * @param config - Config.
197
+ * @param parameters - Parameters.
198
+ * @returns Transaction hash.
199
+ */
200
+ export async function burnBlocked<config extends Config>(
201
+ config: config,
202
+ parameters: burnBlocked.Parameters<config>,
203
+ ): Promise<viem_Actions.burnBlocked.ReturnValue> {
204
+ const { account, chainId, connector } = parameters
205
+
206
+ const client = await getConnectorClient(config, {
207
+ account,
208
+ assertChainId: false,
209
+ chainId,
210
+ connector,
211
+ })
212
+
213
+ return await viem_Actions.burnBlocked(
214
+ client,
215
+ parameters as viem_Actions.burnBlocked.Parameters,
216
+ )
217
+ }
218
+
219
+ export declare namespace burnBlocked {
220
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
221
+ ConnectorParameter &
222
+ Omit<viem_Actions.burnBlocked.Parameters<undefined, Account>, 'chain'>
223
+
224
+ export type ReturnValue = viem_Actions.burnBlocked.ReturnValue
225
+
226
+ export type ErrorType = viem_Actions.burnBlocked.ErrorType
227
+ }
228
+
229
+ /**
230
+ * Burns TIP20 tokens from a blocked address.
231
+ *
232
+ * Note: This is a synchronous action that waits for the transaction to
233
+ * be included on a block before returning a response.
234
+ *
235
+ * @example
236
+ * ```ts
237
+ * import { createConfig, http } from '@wagmi/core'
238
+ * import { tempo } from 'tempo.ts/chains'
239
+ * import { Actions } from 'tempo.ts/wagmi'
240
+ *
241
+ * const config = createConfig({
242
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
243
+ * transports: {
244
+ * [tempo.id]: http(),
245
+ * },
246
+ * })
247
+ *
248
+ * const result = await Actions.token.burnBlockedSync(config, {
249
+ * from: '0x...',
250
+ * amount: 100n,
251
+ * token: '0x...',
252
+ * })
253
+ * ```
254
+ *
255
+ * @param config - Config.
256
+ * @param parameters - Parameters.
257
+ * @returns The transaction receipt and event data.
258
+ */
259
+ export async function burnBlockedSync<config extends Config>(
260
+ config: config,
261
+ parameters: burnBlockedSync.Parameters<config>,
262
+ ): Promise<viem_Actions.burnBlockedSync.ReturnValue> {
263
+ const { account, chainId, connector } = parameters
264
+
265
+ const client = await getConnectorClient(config, {
266
+ account,
267
+ assertChainId: false,
268
+ chainId,
269
+ connector,
270
+ })
271
+
272
+ return viem_Actions.burnBlockedSync(
273
+ client,
274
+ parameters as viem_Actions.burnBlockedSync.Parameters,
275
+ )
276
+ }
277
+
278
+ export declare namespace burnBlockedSync {
279
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
280
+ ConnectorParameter &
281
+ Omit<viem_Actions.burnBlockedSync.Parameters<undefined, Account>, 'chain'>
282
+
283
+ export type ReturnValue = viem_Actions.burnBlockedSync.ReturnValue
284
+
285
+ export type ErrorType = viem_Actions.burnBlockedSync.ErrorType
286
+ }
287
+
288
+ /**
289
+ * Burns TIP20 tokens from the caller's balance.
290
+ *
291
+ * Note: This is a synchronous action that waits for the transaction to
292
+ * be included on a block before returning a response.
293
+ *
294
+ * @example
295
+ * ```ts
296
+ * import { createConfig, http } from '@wagmi/core'
297
+ * import { tempo } from 'tempo.ts/chains'
298
+ * import { Actions } from 'tempo.ts/wagmi'
299
+ *
300
+ * const config = createConfig({
301
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
302
+ * transports: {
303
+ * [tempo.id]: http(),
304
+ * },
305
+ * })
306
+ *
307
+ * const result = await Actions.token.burnSync(config, {
308
+ * amount: 100n,
309
+ * token: '0x...',
310
+ * })
311
+ * ```
312
+ *
313
+ * @param config - Config.
314
+ * @param parameters - Parameters.
315
+ * @returns The transaction receipt and event data.
316
+ */
317
+ export async function burnSync<config extends Config>(
318
+ config: config,
319
+ parameters: burnSync.Parameters<config>,
320
+ ): Promise<viem_Actions.burnSync.ReturnValue> {
321
+ const { account, chainId, connector } = parameters
322
+
323
+ const client = await getConnectorClient(config, {
324
+ account,
325
+ assertChainId: false,
326
+ chainId,
327
+ connector,
328
+ })
329
+
330
+ return viem_Actions.burnSync(
331
+ client,
332
+ parameters as viem_Actions.burnSync.Parameters,
333
+ )
334
+ }
335
+
336
+ export declare namespace burnSync {
337
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
338
+ ConnectorParameter &
339
+ Omit<viem_Actions.burnSync.Parameters<undefined, Account>, 'chain'>
340
+
341
+ export type ReturnValue = viem_Actions.burnSync.ReturnValue
342
+
343
+ export type ErrorType = viem_Actions.burnSync.ErrorType
344
+ }
345
+
346
+ /**
347
+ * Changes the transfer policy ID for a TIP20 token.
348
+ *
349
+ * @example
350
+ * ```ts
351
+ * import { createConfig, http } from '@wagmi/core'
352
+ * import { tempo } from 'tempo.ts/chains'
353
+ * import { Actions } from 'tempo.ts/wagmi'
354
+ *
355
+ * const config = createConfig({
356
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
357
+ * transports: {
358
+ * [tempo.id]: http(),
359
+ * },
360
+ * })
361
+ *
362
+ * const hash = await Actions.token.changeTransferPolicy(config, {
363
+ * token: '0x...',
364
+ * policyId: 1n,
365
+ * })
366
+ * ```
367
+ *
368
+ * @param config - Config.
369
+ * @param parameters - Parameters.
370
+ * @returns Transaction hash.
371
+ */
372
+ export async function changeTransferPolicy<config extends Config>(
373
+ config: config,
374
+ parameters: changeTransferPolicy.Parameters<config>,
375
+ ): Promise<viem_Actions.changeTransferPolicy.ReturnValue> {
376
+ const { account, chainId, connector } = parameters
377
+
378
+ const client = await getConnectorClient(config, {
379
+ account,
380
+ assertChainId: false,
381
+ chainId,
382
+ connector,
383
+ })
384
+
385
+ return viem_Actions.changeTransferPolicy(
386
+ client,
387
+ parameters as viem_Actions.changeTransferPolicy.Parameters,
388
+ )
389
+ }
390
+
391
+ export declare namespace changeTransferPolicy {
392
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
393
+ ConnectorParameter &
394
+ Omit<
395
+ viem_Actions.changeTransferPolicy.Parameters<undefined, Account>,
396
+ 'chain'
397
+ >
398
+
399
+ export type ReturnValue = viem_Actions.changeTransferPolicy.ReturnValue
400
+
401
+ export type ErrorType = viem_Actions.changeTransferPolicy.ErrorType
402
+ }
403
+
404
+ /**
405
+ * Changes the transfer policy ID for a TIP20 token.
406
+ *
407
+ * Note: This is a synchronous action that waits for the transaction to
408
+ * be included on a block before returning a response.
409
+ *
410
+ * @example
411
+ * ```ts
412
+ * import { createConfig, http } from '@wagmi/core'
413
+ * import { tempo } from 'tempo.ts/chains'
414
+ * import { Actions } from 'tempo.ts/wagmi'
415
+ *
416
+ * const config = createConfig({
417
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
418
+ * transports: {
419
+ * [tempo.id]: http(),
420
+ * },
421
+ * })
422
+ *
423
+ * const result = await Actions.token.changeTransferPolicySync(config, {
424
+ * token: '0x...',
425
+ * policyId: 1n,
426
+ * })
427
+ * ```
428
+ *
429
+ * @param config - Config.
430
+ * @param parameters - Parameters.
431
+ * @returns The transaction receipt and event data.
432
+ */
433
+ export async function changeTransferPolicySync<config extends Config>(
434
+ config: config,
435
+ parameters: changeTransferPolicySync.Parameters<config>,
436
+ ): Promise<viem_Actions.changeTransferPolicySync.ReturnValue> {
437
+ const { account, chainId, connector } = parameters
438
+
439
+ const client = await getConnectorClient(config, {
440
+ account,
441
+ assertChainId: false,
442
+ chainId,
443
+ connector,
444
+ })
445
+
446
+ return viem_Actions.changeTransferPolicySync(
447
+ client,
448
+ parameters as viem_Actions.changeTransferPolicySync.Parameters,
449
+ )
450
+ }
451
+
452
+ export declare namespace changeTransferPolicySync {
453
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
454
+ ConnectorParameter &
455
+ Omit<
456
+ viem_Actions.changeTransferPolicySync.Parameters<undefined, Account>,
457
+ 'chain'
458
+ >
459
+
460
+ export type ReturnValue = viem_Actions.changeTransferPolicySync.ReturnValue
461
+
462
+ export type ErrorType = viem_Actions.changeTransferPolicySync.ErrorType
463
+ }
464
+
465
+ /**
466
+ * Creates a new TIP20 token.
467
+ *
468
+ * @example
469
+ * ```ts
470
+ * import { createConfig, http } from '@wagmi/core'
471
+ * import { tempo } from 'tempo.ts/chains'
472
+ * import { Actions } from 'tempo.ts/wagmi'
473
+ *
474
+ * const config = createConfig({
475
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
476
+ * transports: {
477
+ * [tempo.id]: http(),
478
+ * },
479
+ * })
480
+ *
481
+ * const hash = await Actions.token.create(config, {
482
+ * name: 'My Token',
483
+ * symbol: 'MTK',
484
+ * currency: 'USD',
485
+ * })
486
+ * ```
487
+ *
488
+ * @param config - Config.
489
+ * @param parameters - Parameters.
490
+ * @returns Transaction hash.
491
+ */
492
+ export async function create<config extends Config>(
493
+ config: config,
494
+ parameters: create.Parameters<config>,
495
+ ): Promise<viem_Actions.create.ReturnValue> {
496
+ const { account, chainId, connector } = parameters
497
+
498
+ const client = await getConnectorClient(config, {
499
+ account,
500
+ assertChainId: false,
501
+ chainId,
502
+ connector,
503
+ })
504
+
505
+ return viem_Actions.create(
506
+ client,
507
+ parameters as viem_Actions.create.Parameters,
508
+ )
509
+ }
510
+
511
+ export declare namespace create {
512
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
513
+ ConnectorParameter &
514
+ Omit<viem_Actions.create.Parameters<undefined, Account>, 'chain'>
515
+
516
+ export type ReturnValue = viem_Actions.create.ReturnValue
517
+
518
+ export type ErrorType = viem_Actions.create.ErrorType
519
+ }
520
+
521
+ /**
522
+ * Creates a new TIP20 token.
523
+ *
524
+ * Note: This is a synchronous action that waits for the transaction to
525
+ * be included on a block before returning a response.
526
+ *
527
+ * @example
528
+ * ```ts
529
+ * import { createConfig, http } from '@wagmi/core'
530
+ * import { tempo } from 'tempo.ts/chains'
531
+ * import { Actions } from 'tempo.ts/wagmi'
532
+ *
533
+ * const config = createConfig({
534
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
535
+ * transports: {
536
+ * [tempo.id]: http(),
537
+ * },
538
+ * })
539
+ *
540
+ * const result = await Actions.token.createSync(config, {
541
+ * name: 'My Token',
542
+ * symbol: 'MTK',
543
+ * currency: 'USD',
544
+ * })
545
+ * ```
546
+ *
547
+ * @param config - Config.
548
+ * @param parameters - Parameters.
549
+ * @returns The transaction receipt and event data.
550
+ */
551
+ export async function createSync<config extends Config>(
552
+ config: config,
553
+ parameters: createSync.Parameters<config>,
554
+ ): Promise<viem_Actions.createSync.ReturnValue> {
555
+ const { account, chainId, connector } = parameters
556
+
557
+ const client = await getConnectorClient(config, {
558
+ account,
559
+ assertChainId: false,
560
+ chainId,
561
+ connector,
562
+ })
563
+
564
+ return viem_Actions.createSync(
565
+ client,
566
+ parameters as viem_Actions.createSync.Parameters,
567
+ )
568
+ }
569
+
570
+ export declare namespace createSync {
571
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
572
+ ConnectorParameter &
573
+ Omit<viem_Actions.createSync.Parameters<undefined, Account>, 'chain'>
574
+
575
+ export type ReturnValue = viem_Actions.createSync.ReturnValue
576
+
577
+ export type ErrorType = viem_Actions.createSync.ErrorType
578
+ }
579
+
580
+ /**
581
+ * Updates the quote token for a TIP20 token.
582
+ *
583
+ * @example
584
+ * ```ts
585
+ * import { createConfig, http } from '@wagmi/core'
586
+ * import { tempo } from 'tempo.ts/chains'
587
+ * import { Actions } from 'tempo.ts/wagmi'
588
+ *
589
+ * const config = createConfig({
590
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
591
+ * transports: {
592
+ * [tempo.id]: http(),
593
+ * },
594
+ * })
595
+ *
596
+ * const hash = await Actions.token.updateQuoteToken(config, {
597
+ * token: '0x...',
598
+ * })
599
+ * ```
600
+ *
601
+ * @param config - Config.
602
+ * @param parameters - Parameters.
603
+ * @returns Transaction hash.
604
+ */
605
+ export async function updateQuoteToken<config extends Config>(
606
+ config: config,
607
+ parameters: updateQuoteToken.Parameters<config>,
608
+ ): Promise<viem_Actions.updateQuoteToken.ReturnValue> {
609
+ const { account, chainId, connector } = parameters
610
+
611
+ const client = await getConnectorClient(config, {
612
+ account,
613
+ assertChainId: false,
614
+ chainId,
615
+ connector,
616
+ })
617
+
618
+ return viem_Actions.updateQuoteToken(
619
+ client,
620
+ parameters as viem_Actions.updateQuoteToken.Parameters,
621
+ )
622
+ }
623
+
624
+ export declare namespace updateQuoteToken {
625
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
626
+ ConnectorParameter &
627
+ Omit<viem_Actions.updateQuoteToken.Parameters<undefined, Account>, 'chain'>
628
+
629
+ export type ReturnValue = viem_Actions.updateQuoteToken.ReturnValue
630
+
631
+ export type ErrorType = viem_Actions.updateQuoteToken.ErrorType
632
+ }
633
+
634
+ /**
635
+ * Updates the quote token for a TIP20 token.
636
+ *
637
+ * Note: This is a synchronous action that waits for the transaction to
638
+ * be included on a block before returning a response.
639
+ *
640
+ * @example
641
+ * ```ts
642
+ * import { createConfig, http } from '@wagmi/core'
643
+ * import { tempo } from 'tempo.ts/chains'
644
+ * import { Actions } from 'tempo.ts/wagmi'
645
+ *
646
+ * const config = createConfig({
647
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
648
+ * transports: {
649
+ * [tempo.id]: http(),
650
+ * },
651
+ * })
652
+ *
653
+ * const result = await Actions.token.updateQuoteTokenSync(config, {
654
+ * token: '0x...',
655
+ * })
656
+ * ```
657
+ *
658
+ * @param config - Config.
659
+ * @param parameters - Parameters.
660
+ * @returns The transaction receipt and event data.
661
+ */
662
+ export async function updateQuoteTokenSync<config extends Config>(
663
+ config: config,
664
+ parameters: updateQuoteTokenSync.Parameters<config>,
665
+ ): Promise<viem_Actions.updateQuoteTokenSync.ReturnValue> {
666
+ const { account, chainId, connector } = parameters
667
+
668
+ const client = await getConnectorClient(config, {
669
+ account,
670
+ assertChainId: false,
671
+ chainId,
672
+ connector,
673
+ })
674
+
675
+ return viem_Actions.updateQuoteTokenSync(
676
+ client,
677
+ parameters as viem_Actions.updateQuoteTokenSync.Parameters,
678
+ )
679
+ }
680
+
681
+ export declare namespace updateQuoteTokenSync {
682
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
683
+ ConnectorParameter &
684
+ Omit<
685
+ viem_Actions.updateQuoteTokenSync.Parameters<undefined, Account>,
686
+ 'chain'
687
+ >
688
+
689
+ export type ReturnValue = viem_Actions.updateQuoteTokenSync.ReturnValue
690
+
691
+ export type ErrorType = viem_Actions.updateQuoteTokenSync.ErrorType
692
+ }
693
+
694
+ /**
695
+ * Gets TIP20 token allowance.
696
+ *
697
+ * @example
698
+ * ```ts
699
+ * import { createConfig, http } from '@wagmi/core'
700
+ * import { tempo } from 'tempo.ts/chains'
701
+ * import { Actions } from 'tempo.ts/wagmi'
702
+ *
703
+ * const config = createConfig({
704
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
705
+ * transports: {
706
+ * [tempo.id]: http(),
707
+ * },
708
+ * })
709
+ *
710
+ * const allowance = await Actions.token.getAllowance(config, {
711
+ * account: '0x...',
712
+ * spender: '0x...',
713
+ * })
714
+ * ```
715
+ *
716
+ * @param config - Config.
717
+ * @param parameters - Parameters.
718
+ * @returns The token allowance.
719
+ */
720
+ export function getAllowance<config extends Config>(
721
+ config: config,
722
+ parameters: getAllowance.Parameters<config>,
723
+ ) {
724
+ const { chainId, ...rest } = parameters
725
+ const client = config.getClient({ chainId })
726
+ return viem_Actions.getAllowance(client, rest)
727
+ }
728
+
729
+ export namespace getAllowance {
730
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
731
+ viem_Actions.getAllowance.Parameters
732
+
733
+ export type ReturnValue = viem_Actions.getAllowance.ReturnValue
734
+
735
+ export function queryKey<config extends Config>(
736
+ parameters: Parameters<config>,
737
+ ) {
738
+ return ['getAllowance', parameters] as const
739
+ }
740
+
741
+ export type QueryKey<config extends Config> = ReturnType<
742
+ typeof queryKey<config>
743
+ >
744
+
745
+ export function queryOptions<config extends Config, selectData = ReturnValue>(
746
+ config: Config,
747
+ parameters: queryOptions.Parameters<config, selectData>,
748
+ ): queryOptions.ReturnValue<config, selectData> {
749
+ const { query, ...rest } = parameters
750
+ return {
751
+ ...query,
752
+ queryKey: queryKey(rest),
753
+ async queryFn({ queryKey }) {
754
+ const [, parameters] = queryKey
755
+ return await getAllowance(config, parameters)
756
+ },
757
+ }
758
+ }
759
+
760
+ export declare namespace queryOptions {
761
+ export type Parameters<
762
+ config extends Config,
763
+ selectData = getAllowance.ReturnValue,
764
+ > = getAllowance.Parameters<config> & {
765
+ query?:
766
+ | Omit<ReturnValue<config, selectData>, 'queryKey' | 'queryFn'>
767
+ | undefined
768
+ }
769
+
770
+ export type ReturnValue<
771
+ config extends Config,
772
+ selectData = getAllowance.ReturnValue,
773
+ > = RequiredBy<
774
+ Query.QueryOptions<
775
+ getAllowance.ReturnValue,
776
+ Query.DefaultError,
777
+ selectData,
778
+ getAllowance.QueryKey<config>
779
+ >,
780
+ 'queryKey' | 'queryFn'
781
+ >
782
+ }
783
+ }
784
+
785
+ /**
786
+ * Gets TIP20 token balance for an address.
787
+ *
788
+ * @example
789
+ * ```ts
790
+ * import { createConfig, http } from '@wagmi/core'
791
+ * import { tempo } from 'tempo.ts/chains'
792
+ * import { Actions } from 'tempo.ts/wagmi'
793
+ *
794
+ * const config = createConfig({
795
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
796
+ * transports: {
797
+ * [tempo.id]: http(),
798
+ * },
799
+ * })
800
+ *
801
+ * const balance = await Actions.token.getBalance(config, {
802
+ * account: '0x...',
803
+ * })
804
+ * ```
805
+ *
806
+ * @param config - Config.
807
+ * @param parameters - Parameters.
808
+ * @returns The token balance.
809
+ */
810
+ export function getBalance<config extends Config>(
811
+ config: config,
812
+ parameters: getBalance.Parameters<config>,
813
+ ) {
814
+ const { chainId, ...rest } = parameters
815
+ const client = config.getClient({ chainId })
816
+ return viem_Actions.getBalance(client, rest as never)
817
+ }
818
+
819
+ export namespace getBalance {
820
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
821
+ viem_Actions.getBalance.Parameters
822
+
823
+ export type ReturnValue = viem_Actions.getBalance.ReturnValue
824
+
825
+ export function queryKey<config extends Config>(
826
+ parameters: Parameters<config>,
827
+ ) {
828
+ return ['getBalance', parameters] as const
829
+ }
830
+
831
+ export type QueryKey<config extends Config> = ReturnType<
832
+ typeof queryKey<config>
833
+ >
834
+
835
+ export function queryOptions<config extends Config, selectData = ReturnValue>(
836
+ config: Config,
837
+ parameters: queryOptions.Parameters<config, selectData>,
838
+ ): queryOptions.ReturnValue<config, selectData> {
839
+ const { query, ...rest } = parameters
840
+ return {
841
+ ...query,
842
+ queryKey: queryKey(rest),
843
+ async queryFn({ queryKey }) {
844
+ const [, parameters] = queryKey
845
+ return (await getBalance(config, parameters)) ?? null
846
+ },
847
+ }
848
+ }
849
+
850
+ export declare namespace queryOptions {
851
+ export type Parameters<
852
+ config extends Config,
853
+ selectData = getBalance.ReturnValue,
854
+ > = getBalance.Parameters<config> & {
855
+ query?:
856
+ | Omit<ReturnValue<config, selectData>, 'queryKey' | 'queryFn'>
857
+ | undefined
858
+ }
859
+
860
+ export type ReturnValue<
861
+ config extends Config,
862
+ selectData = getBalance.ReturnValue,
863
+ > = RequiredBy<
864
+ Query.QueryOptions<
865
+ getBalance.ReturnValue,
866
+ Query.DefaultError,
867
+ selectData,
868
+ getBalance.QueryKey<config>
869
+ >,
870
+ 'queryKey' | 'queryFn'
871
+ >
872
+ }
873
+ }
874
+
875
+ /**
876
+ * Gets TIP20 token metadata.
877
+ *
878
+ * @example
879
+ * ```ts
880
+ * import { createConfig, http } from '@wagmi/core'
881
+ * import { tempo } from 'tempo.ts/chains'
882
+ * import { Actions } from 'tempo.ts/wagmi'
883
+ *
884
+ * const config = createConfig({
885
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
886
+ * transports: {
887
+ * [tempo.id]: http(),
888
+ * },
889
+ * })
890
+ *
891
+ * const metadata = await Actions.token.getMetadata(config, {
892
+ * token: '0x...',
893
+ * })
894
+ * ```
895
+ *
896
+ * @param config - Config.
897
+ * @param parameters - Parameters.
898
+ * @returns The token metadata.
899
+ */
900
+ export function getMetadata<config extends Config>(
901
+ config: config,
902
+ parameters: getMetadata.Parameters<config>,
903
+ ) {
904
+ const { chainId, ...rest } = parameters
905
+ const client = config.getClient({ chainId })
906
+ return viem_Actions.getMetadata(client, rest)
907
+ }
908
+
909
+ export namespace getMetadata {
910
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
911
+ viem_Actions.getMetadata.Parameters
912
+
913
+ export type ReturnValue = viem_Actions.getMetadata.ReturnValue
914
+
915
+ export function queryKey<config extends Config>(
916
+ parameters: Parameters<config>,
917
+ ) {
918
+ return ['getMetadata', parameters] as const
919
+ }
920
+
921
+ export type QueryKey<config extends Config> = ReturnType<
922
+ typeof queryKey<config>
923
+ >
924
+
925
+ export function queryOptions<config extends Config, selectData = ReturnValue>(
926
+ config: Config,
927
+ parameters: queryOptions.Parameters<config, selectData>,
928
+ ): queryOptions.ReturnValue<config, selectData> {
929
+ const { query, ...rest } = parameters
930
+ return {
931
+ ...query,
932
+ queryKey: queryKey(rest),
933
+ async queryFn({ queryKey }) {
934
+ const [, parameters] = queryKey
935
+ return await getMetadata(config, parameters)
936
+ },
937
+ }
938
+ }
939
+
940
+ export declare namespace queryOptions {
941
+ export type Parameters<
942
+ config extends Config,
943
+ selectData = getMetadata.ReturnValue,
944
+ > = getMetadata.Parameters<config> & {
945
+ query?:
946
+ | Omit<ReturnValue<config, selectData>, 'queryKey' | 'queryFn'>
947
+ | undefined
948
+ }
949
+
950
+ export type ReturnValue<
951
+ config extends Config,
952
+ selectData = getMetadata.ReturnValue,
953
+ > = RequiredBy<
954
+ Query.QueryOptions<
955
+ getMetadata.ReturnValue,
956
+ Query.DefaultError,
957
+ selectData,
958
+ getMetadata.QueryKey<config>
959
+ >,
960
+ 'queryKey' | 'queryFn'
961
+ >
962
+ }
963
+ }
964
+
965
+ /**
966
+ * Gets the admin role for a specific role in a TIP20 token.
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 adminRole = await Actions.token.getRoleAdmin(config, {
982
+ * role: 'minter',
983
+ * token: '0x...',
984
+ * })
985
+ * ```
986
+ *
987
+ * @param config - Config.
988
+ * @param parameters - Parameters.
989
+ * @returns The admin role hash.
990
+ */
991
+ export function getRoleAdmin<config extends Config>(
992
+ config: config,
993
+ parameters: getRoleAdmin.Parameters<config>,
994
+ ) {
995
+ const { chainId, ...rest } = parameters
996
+ const client = config.getClient({ chainId })
997
+ return viem_Actions.getRoleAdmin(client, rest)
998
+ }
999
+
1000
+ export namespace getRoleAdmin {
1001
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1002
+ viem_Actions.getRoleAdmin.Parameters
1003
+
1004
+ export type ReturnValue = viem_Actions.getRoleAdmin.ReturnValue
1005
+
1006
+ export function queryKey<config extends Config>(
1007
+ parameters: Parameters<config>,
1008
+ ) {
1009
+ return ['getRoleAdmin', parameters] as const
1010
+ }
1011
+
1012
+ export type QueryKey<config extends Config> = ReturnType<
1013
+ typeof queryKey<config>
1014
+ >
1015
+
1016
+ export function queryOptions<config extends Config, selectData = ReturnValue>(
1017
+ config: Config,
1018
+ parameters: queryOptions.Parameters<config, selectData>,
1019
+ ): queryOptions.ReturnValue<config, selectData> {
1020
+ const { query, ...rest } = parameters
1021
+ return {
1022
+ ...query,
1023
+ queryKey: queryKey(rest),
1024
+ async queryFn({ queryKey }) {
1025
+ const [, parameters] = queryKey
1026
+ return await getRoleAdmin(config, parameters)
1027
+ },
1028
+ }
1029
+ }
1030
+
1031
+ export declare namespace queryOptions {
1032
+ export type Parameters<
1033
+ config extends Config,
1034
+ selectData = getRoleAdmin.ReturnValue,
1035
+ > = getRoleAdmin.Parameters<config> & {
1036
+ query?:
1037
+ | Omit<ReturnValue<config, selectData>, 'queryKey' | 'queryFn'>
1038
+ | undefined
1039
+ }
1040
+
1041
+ export type ReturnValue<
1042
+ config extends Config,
1043
+ selectData = getRoleAdmin.ReturnValue,
1044
+ > = RequiredBy<
1045
+ Query.QueryOptions<
1046
+ getRoleAdmin.ReturnValue,
1047
+ Query.DefaultError,
1048
+ selectData,
1049
+ getRoleAdmin.QueryKey<config>
1050
+ >,
1051
+ 'queryKey' | 'queryFn'
1052
+ >
1053
+ }
1054
+ }
1055
+
1056
+ /**
1057
+ * Grants a role for a TIP20 token.
1058
+ *
1059
+ * @example
1060
+ * ```ts
1061
+ * import { createConfig, http } from '@wagmi/core'
1062
+ * import { tempo } from 'tempo.ts/chains'
1063
+ * import { Actions } from 'tempo.ts/wagmi'
1064
+ *
1065
+ * const config = createConfig({
1066
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1067
+ * transports: {
1068
+ * [tempo.id]: http(),
1069
+ * },
1070
+ * })
1071
+ *
1072
+ * const hash = await Actions.token.grantRoles(config, {
1073
+ * token: '0x...',
1074
+ * to: '0x...',
1075
+ * roles: ['issuer'],
1076
+ * })
1077
+ * ```
1078
+ *
1079
+ * @param config - Config.
1080
+ * @param parameters - Parameters.
1081
+ * @returns Transaction hash.
1082
+ */
1083
+ export async function grantRoles<config extends Config>(
1084
+ config: config,
1085
+ parameters: grantRoles.Parameters<config>,
1086
+ ): Promise<viem_Actions.grantRoles.ReturnValue> {
1087
+ const { account, chainId, connector } = parameters
1088
+
1089
+ const client = await getConnectorClient(config, {
1090
+ account,
1091
+ assertChainId: false,
1092
+ chainId,
1093
+ connector,
1094
+ })
1095
+
1096
+ return viem_Actions.grantRoles(
1097
+ client,
1098
+ parameters as viem_Actions.grantRoles.Parameters,
1099
+ )
1100
+ }
1101
+
1102
+ export declare namespace grantRoles {
1103
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1104
+ ConnectorParameter &
1105
+ Omit<viem_Actions.grantRoles.Parameters<undefined, Account>, 'chain'>
1106
+
1107
+ export type ReturnValue = viem_Actions.grantRoles.ReturnValue
1108
+
1109
+ export type ErrorType = viem_Actions.grantRoles.ErrorType
1110
+ }
1111
+
1112
+ /**
1113
+ * Grants a role for a TIP20 token.
1114
+ *
1115
+ * Note: This is a synchronous action that waits for the transaction to
1116
+ * be included on a block before returning a response.
1117
+ *
1118
+ * @example
1119
+ * ```ts
1120
+ * import { createConfig, http } from '@wagmi/core'
1121
+ * import { tempo } from 'tempo.ts/chains'
1122
+ * import { Actions } from 'tempo.ts/wagmi'
1123
+ *
1124
+ * const config = createConfig({
1125
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1126
+ * transports: {
1127
+ * [tempo.id]: http(),
1128
+ * },
1129
+ * })
1130
+ *
1131
+ * const result = await Actions.token.grantRolesSync(config, {
1132
+ * token: '0x...',
1133
+ * to: '0x...',
1134
+ * roles: ['issuer'],
1135
+ * })
1136
+ * ```
1137
+ *
1138
+ * @param config - Config.
1139
+ * @param parameters - Parameters.
1140
+ * @returns The transaction receipt and event data.
1141
+ */
1142
+ export async function grantRolesSync<config extends Config>(
1143
+ config: config,
1144
+ parameters: grantRolesSync.Parameters<config>,
1145
+ ): Promise<viem_Actions.grantRolesSync.ReturnValue> {
1146
+ const { account, chainId, connector } = parameters
1147
+
1148
+ const client = await getConnectorClient(config, {
1149
+ account,
1150
+ assertChainId: false,
1151
+ chainId,
1152
+ connector,
1153
+ })
1154
+
1155
+ return viem_Actions.grantRolesSync(
1156
+ client,
1157
+ parameters as viem_Actions.grantRolesSync.Parameters,
1158
+ )
1159
+ }
1160
+
1161
+ export declare namespace grantRolesSync {
1162
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1163
+ ConnectorParameter &
1164
+ Omit<viem_Actions.grantRolesSync.Parameters<undefined, Account>, 'chain'>
1165
+
1166
+ export type ReturnValue = viem_Actions.grantRolesSync.ReturnValue
1167
+
1168
+ export type ErrorType = viem_Actions.grantRolesSync.ErrorType
1169
+ }
1170
+
1171
+ /**
1172
+ * Checks if an account has a specific role for a TIP20 token.
1173
+ *
1174
+ * @example
1175
+ * ```ts
1176
+ * import { createConfig, http } from '@wagmi/core'
1177
+ * import { tempo } from 'tempo.ts/chains'
1178
+ * import { Actions } from 'tempo.ts/wagmi'
1179
+ *
1180
+ * const config = createConfig({
1181
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1182
+ * transports: {
1183
+ * [tempo.id]: http(),
1184
+ * },
1185
+ * })
1186
+ *
1187
+ * const hasRole = await Actions.token.hasRole(config, {
1188
+ * account: '0x...',
1189
+ * role: 'issuer',
1190
+ * token: '0x...',
1191
+ * })
1192
+ * ```
1193
+ *
1194
+ * @param config - Config.
1195
+ * @param parameters - Parameters.
1196
+ * @returns Whether the account has the role.
1197
+ */
1198
+ export function hasRole<config extends Config>(
1199
+ config: config,
1200
+ parameters: hasRole.Parameters<config>,
1201
+ ) {
1202
+ const { chainId, ...rest } = parameters
1203
+ const client = config.getClient({ chainId })
1204
+ return viem_Actions.hasRole(client, rest)
1205
+ }
1206
+
1207
+ export namespace hasRole {
1208
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1209
+ viem_Actions.hasRole.Parameters
1210
+
1211
+ export type ReturnValue = viem_Actions.hasRole.ReturnValue
1212
+
1213
+ export function queryKey<config extends Config>(
1214
+ parameters: Parameters<config>,
1215
+ ) {
1216
+ return ['hasRole', parameters] as const
1217
+ }
1218
+
1219
+ export type QueryKey<config extends Config> = ReturnType<
1220
+ typeof queryKey<config>
1221
+ >
1222
+
1223
+ export function queryOptions<config extends Config, selectData = ReturnValue>(
1224
+ config: Config,
1225
+ parameters: queryOptions.Parameters<config, selectData>,
1226
+ ): queryOptions.ReturnValue<config, selectData> {
1227
+ const { query, ...rest } = parameters
1228
+ return {
1229
+ ...query,
1230
+ queryKey: queryKey(rest),
1231
+ async queryFn({ queryKey }) {
1232
+ const [, parameters] = queryKey
1233
+ return await hasRole(config, parameters)
1234
+ },
1235
+ }
1236
+ }
1237
+
1238
+ export declare namespace queryOptions {
1239
+ export type Parameters<
1240
+ config extends Config,
1241
+ selectData = hasRole.ReturnValue,
1242
+ > = hasRole.Parameters<config> & {
1243
+ query?:
1244
+ | Omit<ReturnValue<config, selectData>, 'queryKey' | 'queryFn'>
1245
+ | undefined
1246
+ }
1247
+
1248
+ export type ReturnValue<
1249
+ config extends Config,
1250
+ selectData = hasRole.ReturnValue,
1251
+ > = RequiredBy<
1252
+ Query.QueryOptions<
1253
+ hasRole.ReturnValue,
1254
+ Query.DefaultError,
1255
+ selectData,
1256
+ hasRole.QueryKey<config>
1257
+ >,
1258
+ 'queryKey' | 'queryFn'
1259
+ >
1260
+ }
1261
+ }
1262
+
1263
+ /**
1264
+ * Mints TIP20 tokens to an address.
1265
+ *
1266
+ * @example
1267
+ * ```ts
1268
+ * import { createConfig, http } from '@wagmi/core'
1269
+ * import { tempo } from 'tempo.ts/chains'
1270
+ * import { Actions } from 'tempo.ts/wagmi'
1271
+ *
1272
+ * const config = createConfig({
1273
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1274
+ * transports: {
1275
+ * [tempo.id]: http(),
1276
+ * },
1277
+ * })
1278
+ *
1279
+ * const hash = await Actions.token.mint(config, {
1280
+ * to: '0x...',
1281
+ * amount: 100n,
1282
+ * token: '0x...',
1283
+ * })
1284
+ * ```
1285
+ *
1286
+ * @param config - Config.
1287
+ * @param parameters - Parameters.
1288
+ * @returns Transaction hash.
1289
+ */
1290
+ export async function mint<config extends Config>(
1291
+ config: config,
1292
+ parameters: mint.Parameters<config>,
1293
+ ): Promise<viem_Actions.mint.ReturnValue> {
1294
+ const { account, chainId, connector } = parameters
1295
+
1296
+ const client = await getConnectorClient(config, {
1297
+ account,
1298
+ assertChainId: false,
1299
+ chainId,
1300
+ connector,
1301
+ })
1302
+
1303
+ return viem_Actions.mint(client, parameters as viem_Actions.mint.Parameters)
1304
+ }
1305
+
1306
+ export declare namespace mint {
1307
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1308
+ ConnectorParameter &
1309
+ Omit<viem_Actions.mint.Parameters<undefined, Account>, 'chain'>
1310
+
1311
+ export type ReturnValue = viem_Actions.mint.ReturnValue
1312
+
1313
+ export type ErrorType = viem_Actions.mint.ErrorType
1314
+ }
1315
+
1316
+ /**
1317
+ * Mints TIP20 tokens to an address.
1318
+ *
1319
+ * Note: This is a synchronous action that waits for the transaction to
1320
+ * be included on a block before returning a response.
1321
+ *
1322
+ * @example
1323
+ * ```ts
1324
+ * import { createConfig, http } from '@wagmi/core'
1325
+ * import { tempo } from 'tempo.ts/chains'
1326
+ * import { Actions } from 'tempo.ts/wagmi'
1327
+ *
1328
+ * const config = createConfig({
1329
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1330
+ * transports: {
1331
+ * [tempo.id]: http(),
1332
+ * },
1333
+ * })
1334
+ *
1335
+ * const result = await Actions.token.mintSync(config, {
1336
+ * to: '0x...',
1337
+ * amount: 100n,
1338
+ * token: '0x...',
1339
+ * })
1340
+ * ```
1341
+ *
1342
+ * @param config - Config.
1343
+ * @param parameters - Parameters.
1344
+ * @returns The transaction receipt and event data.
1345
+ */
1346
+ export async function mintSync<config extends Config>(
1347
+ config: config,
1348
+ parameters: mintSync.Parameters<config>,
1349
+ ): Promise<viem_Actions.mintSync.ReturnValue> {
1350
+ const { account, chainId, connector } = parameters
1351
+
1352
+ const client = await getConnectorClient(config, {
1353
+ account,
1354
+ assertChainId: false,
1355
+ chainId,
1356
+ connector,
1357
+ })
1358
+
1359
+ return viem_Actions.mintSync(
1360
+ client,
1361
+ parameters as viem_Actions.mintSync.Parameters,
1362
+ )
1363
+ }
1364
+
1365
+ export declare namespace mintSync {
1366
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1367
+ ConnectorParameter &
1368
+ Omit<viem_Actions.mintSync.Parameters<undefined, Account>, 'chain'>
1369
+
1370
+ export type ReturnValue = viem_Actions.mintSync.ReturnValue
1371
+
1372
+ export type ErrorType = viem_Actions.mintSync.ErrorType
1373
+ }
1374
+
1375
+ /**
1376
+ * Pauses a TIP20 token.
1377
+ *
1378
+ * @example
1379
+ * ```ts
1380
+ * import { createConfig, http } from '@wagmi/core'
1381
+ * import { tempo } from 'tempo.ts/chains'
1382
+ * import { Actions } from 'tempo.ts/wagmi'
1383
+ *
1384
+ * const config = createConfig({
1385
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1386
+ * transports: {
1387
+ * [tempo.id]: http(),
1388
+ * },
1389
+ * })
1390
+ *
1391
+ * const hash = await Actions.token.pause(config, {
1392
+ * token: '0x...',
1393
+ * })
1394
+ * ```
1395
+ *
1396
+ * @param config - Config.
1397
+ * @param parameters - Parameters.
1398
+ * @returns Transaction hash.
1399
+ */
1400
+ export async function pause<config extends Config>(
1401
+ config: config,
1402
+ parameters: pause.Parameters<config>,
1403
+ ): Promise<viem_Actions.pause.ReturnValue> {
1404
+ const { account, chainId, connector } = parameters
1405
+
1406
+ const client = await getConnectorClient(config, {
1407
+ account,
1408
+ assertChainId: false,
1409
+ chainId,
1410
+ connector,
1411
+ })
1412
+
1413
+ return viem_Actions.pause(client, parameters as viem_Actions.pause.Parameters)
1414
+ }
1415
+
1416
+ export declare namespace pause {
1417
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1418
+ ConnectorParameter &
1419
+ Omit<viem_Actions.pause.Parameters<undefined, Account>, 'chain'>
1420
+
1421
+ export type ReturnValue = viem_Actions.pause.ReturnValue
1422
+
1423
+ export type ErrorType = viem_Actions.pause.ErrorType
1424
+ }
1425
+
1426
+ /**
1427
+ * Pauses a TIP20 token.
1428
+ *
1429
+ * Note: This is a synchronous action that waits for the transaction to
1430
+ * be included on a block before returning a response.
1431
+ *
1432
+ * @example
1433
+ * ```ts
1434
+ * import { createConfig, http } from '@wagmi/core'
1435
+ * import { tempo } from 'tempo.ts/chains'
1436
+ * import { Actions } from 'tempo.ts/wagmi'
1437
+ *
1438
+ * const config = createConfig({
1439
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1440
+ * transports: {
1441
+ * [tempo.id]: http(),
1442
+ * },
1443
+ * })
1444
+ *
1445
+ * const result = await Actions.token.pauseSync(config, {
1446
+ * token: '0x...',
1447
+ * })
1448
+ * ```
1449
+ *
1450
+ * @param config - Config.
1451
+ * @param parameters - Parameters.
1452
+ * @returns The transaction receipt and event data.
1453
+ */
1454
+ export async function pauseSync<config extends Config>(
1455
+ config: config,
1456
+ parameters: pauseSync.Parameters<config>,
1457
+ ): Promise<viem_Actions.pauseSync.ReturnValue> {
1458
+ const { account, chainId, connector } = parameters
1459
+
1460
+ const client = await getConnectorClient(config, {
1461
+ account,
1462
+ assertChainId: false,
1463
+ chainId,
1464
+ connector,
1465
+ })
1466
+
1467
+ return viem_Actions.pauseSync(
1468
+ client,
1469
+ parameters as viem_Actions.pauseSync.Parameters,
1470
+ )
1471
+ }
1472
+
1473
+ export declare namespace pauseSync {
1474
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1475
+ ConnectorParameter &
1476
+ Omit<viem_Actions.pauseSync.Parameters<undefined, Account>, 'chain'>
1477
+
1478
+ export type ReturnValue = viem_Actions.pauseSync.ReturnValue
1479
+
1480
+ export type ErrorType = viem_Actions.pauseSync.ErrorType
1481
+ }
1482
+
1483
+ /**
1484
+ * Renounces a role for a TIP20 token.
1485
+ *
1486
+ * @example
1487
+ * ```ts
1488
+ * import { createConfig, http } from '@wagmi/core'
1489
+ * import { tempo } from 'tempo.ts/chains'
1490
+ * import { Actions } from 'tempo.ts/wagmi'
1491
+ *
1492
+ * const config = createConfig({
1493
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1494
+ * transports: {
1495
+ * [tempo.id]: http(),
1496
+ * },
1497
+ * })
1498
+ *
1499
+ * const hash = await Actions.token.renounceRoles(config, {
1500
+ * token: '0x...',
1501
+ * roles: ['issuer'],
1502
+ * })
1503
+ * ```
1504
+ *
1505
+ * @param config - Config.
1506
+ * @param parameters - Parameters.
1507
+ * @returns Transaction hash.
1508
+ */
1509
+ export async function renounceRoles<config extends Config>(
1510
+ config: config,
1511
+ parameters: renounceRoles.Parameters<config>,
1512
+ ): Promise<viem_Actions.renounceRoles.ReturnValue> {
1513
+ const { account, chainId, connector } = parameters
1514
+
1515
+ const client = await getConnectorClient(config, {
1516
+ account,
1517
+ assertChainId: false,
1518
+ chainId,
1519
+ connector,
1520
+ })
1521
+
1522
+ return viem_Actions.renounceRoles(
1523
+ client,
1524
+ parameters as viem_Actions.renounceRoles.Parameters,
1525
+ )
1526
+ }
1527
+
1528
+ export declare namespace renounceRoles {
1529
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1530
+ ConnectorParameter &
1531
+ Omit<viem_Actions.renounceRoles.Parameters<undefined, Account>, 'chain'>
1532
+
1533
+ export type ReturnValue = viem_Actions.renounceRoles.ReturnValue
1534
+
1535
+ export type ErrorType = viem_Actions.renounceRoles.ErrorType
1536
+ }
1537
+
1538
+ /**
1539
+ * Renounces a role for a TIP20 token.
1540
+ *
1541
+ * Note: This is a synchronous action that waits for the transaction to
1542
+ * be included on a block before returning a response.
1543
+ *
1544
+ * @example
1545
+ * ```ts
1546
+ * import { createConfig, http } from '@wagmi/core'
1547
+ * import { tempo } from 'tempo.ts/chains'
1548
+ * import { Actions } from 'tempo.ts/wagmi'
1549
+ *
1550
+ * const config = createConfig({
1551
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1552
+ * transports: {
1553
+ * [tempo.id]: http(),
1554
+ * },
1555
+ * })
1556
+ *
1557
+ * const result = await Actions.token.renounceRolesSync(config, {
1558
+ * token: '0x...',
1559
+ * roles: ['issuer'],
1560
+ * })
1561
+ * ```
1562
+ *
1563
+ * @param config - Config.
1564
+ * @param parameters - Parameters.
1565
+ * @returns The transaction receipt and event data.
1566
+ */
1567
+ export async function renounceRolesSync<config extends Config>(
1568
+ config: config,
1569
+ parameters: renounceRolesSync.Parameters<config>,
1570
+ ): Promise<viem_Actions.renounceRolesSync.ReturnValue> {
1571
+ const { account, chainId, connector } = parameters
1572
+
1573
+ const client = await getConnectorClient(config, {
1574
+ account,
1575
+ assertChainId: false,
1576
+ chainId,
1577
+ connector,
1578
+ })
1579
+
1580
+ return viem_Actions.renounceRolesSync(
1581
+ client,
1582
+ parameters as viem_Actions.renounceRolesSync.Parameters,
1583
+ )
1584
+ }
1585
+
1586
+ export declare namespace renounceRolesSync {
1587
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1588
+ ConnectorParameter &
1589
+ Omit<viem_Actions.renounceRolesSync.Parameters<undefined, Account>, 'chain'>
1590
+
1591
+ export type ReturnValue = viem_Actions.renounceRolesSync.ReturnValue
1592
+
1593
+ export type ErrorType = viem_Actions.renounceRolesSync.ErrorType
1594
+ }
1595
+
1596
+ /**
1597
+ * Revokes a role for a TIP20 token.
1598
+ *
1599
+ * @example
1600
+ * ```ts
1601
+ * import { createConfig, http } from '@wagmi/core'
1602
+ * import { tempo } from 'tempo.ts/chains'
1603
+ * import { Actions } from 'tempo.ts/wagmi'
1604
+ *
1605
+ * const config = createConfig({
1606
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1607
+ * transports: {
1608
+ * [tempo.id]: http(),
1609
+ * },
1610
+ * })
1611
+ *
1612
+ * const hash = await Actions.token.revokeRoles(config, {
1613
+ * token: '0x...',
1614
+ * from: '0x...',
1615
+ * roles: ['issuer'],
1616
+ * })
1617
+ * ```
1618
+ *
1619
+ * @param config - Config.
1620
+ * @param parameters - Parameters.
1621
+ * @returns Transaction hash.
1622
+ */
1623
+ export async function revokeRoles<config extends Config>(
1624
+ config: config,
1625
+ parameters: revokeRoles.Parameters<config>,
1626
+ ): Promise<viem_Actions.revokeRoles.ReturnValue> {
1627
+ const { account, chainId, connector } = parameters
1628
+
1629
+ const client = await getConnectorClient(config, {
1630
+ account,
1631
+ assertChainId: false,
1632
+ chainId,
1633
+ connector,
1634
+ })
1635
+
1636
+ return viem_Actions.revokeRoles(
1637
+ client,
1638
+ parameters as viem_Actions.revokeRoles.Parameters,
1639
+ )
1640
+ }
1641
+
1642
+ export declare namespace revokeRoles {
1643
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1644
+ ConnectorParameter &
1645
+ Omit<viem_Actions.revokeRoles.Parameters<undefined, Account>, 'chain'>
1646
+
1647
+ export type ReturnValue = viem_Actions.revokeRoles.ReturnValue
1648
+
1649
+ export type ErrorType = viem_Actions.revokeRoles.ErrorType
1650
+ }
1651
+
1652
+ /**
1653
+ * Revokes a role for a TIP20 token.
1654
+ *
1655
+ * Note: This is a synchronous action that waits for the transaction to
1656
+ * be included on a block before returning a response.
1657
+ *
1658
+ * @example
1659
+ * ```ts
1660
+ * import { createConfig, http } from '@wagmi/core'
1661
+ * import { tempo } from 'tempo.ts/chains'
1662
+ * import { Actions } from 'tempo.ts/wagmi'
1663
+ *
1664
+ * const config = createConfig({
1665
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1666
+ * transports: {
1667
+ * [tempo.id]: http(),
1668
+ * },
1669
+ * })
1670
+ *
1671
+ * const result = await Actions.token.revokeRolesSync(config, {
1672
+ * token: '0x...',
1673
+ * from: '0x...',
1674
+ * roles: ['issuer'],
1675
+ * })
1676
+ * ```
1677
+ *
1678
+ * @param config - Config.
1679
+ * @param parameters - Parameters.
1680
+ * @returns The transaction receipt and event data.
1681
+ */
1682
+ export async function revokeRolesSync<config extends Config>(
1683
+ config: config,
1684
+ parameters: revokeRolesSync.Parameters<config>,
1685
+ ): Promise<viem_Actions.revokeRolesSync.ReturnValue> {
1686
+ const { account, chainId, connector } = parameters
1687
+
1688
+ const client = await getConnectorClient(config, {
1689
+ account,
1690
+ assertChainId: false,
1691
+ chainId,
1692
+ connector,
1693
+ })
1694
+
1695
+ return viem_Actions.revokeRolesSync(
1696
+ client,
1697
+ parameters as viem_Actions.revokeRolesSync.Parameters,
1698
+ )
1699
+ }
1700
+
1701
+ export declare namespace revokeRolesSync {
1702
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1703
+ ConnectorParameter &
1704
+ Omit<viem_Actions.revokeRolesSync.Parameters<undefined, Account>, 'chain'>
1705
+
1706
+ export type ReturnValue = viem_Actions.revokeRolesSync.ReturnValue
1707
+
1708
+ export type ErrorType = viem_Actions.revokeRolesSync.ErrorType
1709
+ }
1710
+
1711
+ /**
1712
+ * Sets the admin role for a specific role in a TIP20 token.
1713
+ *
1714
+ * @example
1715
+ * ```ts
1716
+ * import { createConfig, http } from '@wagmi/core'
1717
+ * import { tempo } from 'tempo.ts/chains'
1718
+ * import { Actions } from 'tempo.ts/wagmi'
1719
+ *
1720
+ * const config = createConfig({
1721
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1722
+ * transports: {
1723
+ * [tempo.id]: http(),
1724
+ * },
1725
+ * })
1726
+ *
1727
+ * const hash = await Actions.token.setRoleAdmin(config, {
1728
+ * token: '0x...',
1729
+ * role: 'issuer',
1730
+ * adminRole: 'pause',
1731
+ * })
1732
+ * ```
1733
+ *
1734
+ * @param config - Config.
1735
+ * @param parameters - Parameters.
1736
+ * @returns Transaction hash.
1737
+ */
1738
+ export async function setRoleAdmin<config extends Config>(
1739
+ config: config,
1740
+ parameters: setRoleAdmin.Parameters<config>,
1741
+ ): Promise<viem_Actions.setRoleAdmin.ReturnValue> {
1742
+ const { account, chainId, connector } = parameters
1743
+
1744
+ const client = await getConnectorClient(config, {
1745
+ account,
1746
+ assertChainId: false,
1747
+ chainId,
1748
+ connector,
1749
+ })
1750
+
1751
+ return viem_Actions.setRoleAdmin(
1752
+ client,
1753
+ parameters as viem_Actions.setRoleAdmin.Parameters,
1754
+ )
1755
+ }
1756
+
1757
+ export declare namespace setRoleAdmin {
1758
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1759
+ ConnectorParameter &
1760
+ Omit<viem_Actions.setRoleAdmin.Parameters<undefined, Account>, 'chain'>
1761
+
1762
+ export type ReturnValue = viem_Actions.setRoleAdmin.ReturnValue
1763
+
1764
+ export type ErrorType = viem_Actions.setRoleAdmin.ErrorType
1765
+ }
1766
+
1767
+ /**
1768
+ * Sets the admin role for a specific role in a TIP20 token.
1769
+ *
1770
+ * Note: This is a synchronous action that waits for the transaction to
1771
+ * be included on a block before returning a response.
1772
+ *
1773
+ * @example
1774
+ * ```ts
1775
+ * import { createConfig, http } from '@wagmi/core'
1776
+ * import { tempo } from 'tempo.ts/chains'
1777
+ * import { Actions } from 'tempo.ts/wagmi'
1778
+ *
1779
+ * const config = createConfig({
1780
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1781
+ * transports: {
1782
+ * [tempo.id]: http(),
1783
+ * },
1784
+ * })
1785
+ *
1786
+ * const result = await Actions.token.setRoleAdminSync(config, {
1787
+ * token: '0x...',
1788
+ * role: 'issuer',
1789
+ * adminRole: 'pause',
1790
+ * })
1791
+ * ```
1792
+ *
1793
+ * @param config - Config.
1794
+ * @param parameters - Parameters.
1795
+ * @returns The transaction receipt and event data.
1796
+ */
1797
+ export async function setRoleAdminSync<config extends Config>(
1798
+ config: config,
1799
+ parameters: setRoleAdminSync.Parameters<config>,
1800
+ ): Promise<viem_Actions.setRoleAdminSync.ReturnValue> {
1801
+ const { account, chainId, connector } = parameters
1802
+
1803
+ const client = await getConnectorClient(config, {
1804
+ account,
1805
+ assertChainId: false,
1806
+ chainId,
1807
+ connector,
1808
+ })
1809
+
1810
+ return viem_Actions.setRoleAdminSync(
1811
+ client,
1812
+ parameters as viem_Actions.setRoleAdminSync.Parameters,
1813
+ )
1814
+ }
1815
+
1816
+ export declare namespace setRoleAdminSync {
1817
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1818
+ ConnectorParameter &
1819
+ Omit<viem_Actions.setRoleAdminSync.Parameters<undefined, Account>, 'chain'>
1820
+
1821
+ export type ReturnValue = viem_Actions.setRoleAdminSync.ReturnValue
1822
+
1823
+ export type ErrorType = viem_Actions.setRoleAdminSync.ErrorType
1824
+ }
1825
+
1826
+ /**
1827
+ * Sets the supply cap for a TIP20 token.
1828
+ *
1829
+ * @example
1830
+ * ```ts
1831
+ * import { createConfig, http } from '@wagmi/core'
1832
+ * import { tempo } from 'tempo.ts/chains'
1833
+ * import { Actions } from 'tempo.ts/wagmi'
1834
+ *
1835
+ * const config = createConfig({
1836
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1837
+ * transports: {
1838
+ * [tempo.id]: http(),
1839
+ * },
1840
+ * })
1841
+ *
1842
+ * const hash = await Actions.token.setSupplyCap(config, {
1843
+ * token: '0x...',
1844
+ * supplyCap: 1000000n,
1845
+ * })
1846
+ * ```
1847
+ *
1848
+ * @param config - Config.
1849
+ * @param parameters - Parameters.
1850
+ * @returns Transaction hash.
1851
+ */
1852
+ export async function setSupplyCap<config extends Config>(
1853
+ config: config,
1854
+ parameters: setSupplyCap.Parameters<config>,
1855
+ ): Promise<viem_Actions.setSupplyCap.ReturnValue> {
1856
+ const { account, chainId, connector } = parameters
1857
+
1858
+ const client = await getConnectorClient(config, {
1859
+ account,
1860
+ assertChainId: false,
1861
+ chainId,
1862
+ connector,
1863
+ })
1864
+
1865
+ return viem_Actions.setSupplyCap(
1866
+ client,
1867
+ parameters as viem_Actions.setSupplyCap.Parameters,
1868
+ )
1869
+ }
1870
+
1871
+ export declare namespace setSupplyCap {
1872
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1873
+ ConnectorParameter &
1874
+ Omit<viem_Actions.setSupplyCap.Parameters<undefined, Account>, 'chain'>
1875
+
1876
+ export type ReturnValue = viem_Actions.setSupplyCap.ReturnValue
1877
+
1878
+ export type ErrorType = viem_Actions.setSupplyCap.ErrorType
1879
+ }
1880
+
1881
+ /**
1882
+ * Sets the supply cap for a TIP20 token.
1883
+ *
1884
+ * Note: This is a synchronous action that waits for the transaction to
1885
+ * be included on a block before returning a response.
1886
+ *
1887
+ * @example
1888
+ * ```ts
1889
+ * import { createConfig, http } from '@wagmi/core'
1890
+ * import { tempo } from 'tempo.ts/chains'
1891
+ * import { Actions } from 'tempo.ts/wagmi'
1892
+ *
1893
+ * const config = createConfig({
1894
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1895
+ * transports: {
1896
+ * [tempo.id]: http(),
1897
+ * },
1898
+ * })
1899
+ *
1900
+ * const result = await Actions.token.setSupplyCapSync(config, {
1901
+ * token: '0x...',
1902
+ * supplyCap: 1000000n,
1903
+ * })
1904
+ * ```
1905
+ *
1906
+ * @param config - Config.
1907
+ * @param parameters - Parameters.
1908
+ * @returns The transaction receipt and event data.
1909
+ */
1910
+ export async function setSupplyCapSync<config extends Config>(
1911
+ config: config,
1912
+ parameters: setSupplyCapSync.Parameters<config>,
1913
+ ): Promise<viem_Actions.setSupplyCapSync.ReturnValue> {
1914
+ const { account, chainId, connector } = parameters
1915
+
1916
+ const client = await getConnectorClient(config, {
1917
+ account,
1918
+ assertChainId: false,
1919
+ chainId,
1920
+ connector,
1921
+ })
1922
+
1923
+ return viem_Actions.setSupplyCapSync(
1924
+ client,
1925
+ parameters as viem_Actions.setSupplyCapSync.Parameters,
1926
+ )
1927
+ }
1928
+
1929
+ export declare namespace setSupplyCapSync {
1930
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1931
+ ConnectorParameter &
1932
+ Omit<viem_Actions.setSupplyCapSync.Parameters<undefined, Account>, 'chain'>
1933
+
1934
+ export type ReturnValue = viem_Actions.setSupplyCapSync.ReturnValue
1935
+
1936
+ export type ErrorType = viem_Actions.setSupplyCapSync.ErrorType
1937
+ }
1938
+
1939
+ /**
1940
+ * Transfers TIP20 tokens to another address.
1941
+ *
1942
+ * @example
1943
+ * ```ts
1944
+ * import { createConfig, http } from '@wagmi/core'
1945
+ * import { tempo } from 'tempo.ts/chains'
1946
+ * import { Actions } from 'tempo.ts/wagmi'
1947
+ *
1948
+ * const config = createConfig({
1949
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
1950
+ * transports: {
1951
+ * [tempo.id]: http(),
1952
+ * },
1953
+ * })
1954
+ *
1955
+ * const hash = await Actions.token.transfer(config, {
1956
+ * to: '0x...',
1957
+ * amount: 100n,
1958
+ * })
1959
+ * ```
1960
+ *
1961
+ * @param config - Config.
1962
+ * @param parameters - Parameters.
1963
+ * @returns Transaction hash.
1964
+ */
1965
+ export async function transfer<config extends Config>(
1966
+ config: config,
1967
+ parameters: transfer.Parameters<config>,
1968
+ ): Promise<viem_Actions.transfer.ReturnValue> {
1969
+ const { account, chainId, connector } = parameters
1970
+
1971
+ const client = await getConnectorClient(config, {
1972
+ account,
1973
+ assertChainId: false,
1974
+ chainId,
1975
+ connector,
1976
+ })
1977
+
1978
+ return viem_Actions.transfer(
1979
+ client,
1980
+ parameters as viem_Actions.transfer.Parameters,
1981
+ )
1982
+ }
1983
+
1984
+ export declare namespace transfer {
1985
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
1986
+ ConnectorParameter &
1987
+ Omit<viem_Actions.transfer.Parameters<undefined, Account>, 'chain'>
1988
+
1989
+ export type ReturnValue = viem_Actions.transfer.ReturnValue
1990
+
1991
+ export type ErrorType = viem_Actions.transfer.ErrorType
1992
+ }
1993
+
1994
+ /**
1995
+ * Transfers TIP20 tokens to another address.
1996
+ *
1997
+ * Note: This is a synchronous action that waits for the transaction to
1998
+ * be included on a block before returning a response.
1999
+ *
2000
+ * @example
2001
+ * ```ts
2002
+ * import { createConfig, http } from '@wagmi/core'
2003
+ * import { tempo } from 'tempo.ts/chains'
2004
+ * import { Actions } from 'tempo.ts/wagmi'
2005
+ *
2006
+ * const config = createConfig({
2007
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
2008
+ * transports: {
2009
+ * [tempo.id]: http(),
2010
+ * },
2011
+ * })
2012
+ *
2013
+ * const result = await Actions.token.transferSync(config, {
2014
+ * to: '0x...',
2015
+ * amount: 100n,
2016
+ * })
2017
+ * ```
2018
+ *
2019
+ * @param config - Config.
2020
+ * @param parameters - Parameters.
2021
+ * @returns The transaction receipt and event data.
2022
+ */
2023
+ export async function transferSync<config extends Config>(
2024
+ config: config,
2025
+ parameters: transferSync.Parameters<config>,
2026
+ ): Promise<viem_Actions.transferSync.ReturnValue> {
2027
+ const { account, chainId, connector } = parameters
2028
+
2029
+ const client = await getConnectorClient(config, {
2030
+ account,
2031
+ assertChainId: false,
2032
+ chainId,
2033
+ connector,
2034
+ })
2035
+
2036
+ return viem_Actions.transferSync(
2037
+ client,
2038
+ parameters as viem_Actions.transferSync.Parameters,
2039
+ )
2040
+ }
2041
+
2042
+ export declare namespace transferSync {
2043
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
2044
+ ConnectorParameter &
2045
+ Omit<viem_Actions.transferSync.Parameters<undefined, Account>, 'chain'>
2046
+
2047
+ export type ReturnValue = viem_Actions.transferSync.ReturnValue
2048
+
2049
+ export type ErrorType = viem_Actions.transferSync.ErrorType
2050
+ }
2051
+
2052
+ /**
2053
+ * Unpauses a TIP20 token.
2054
+ *
2055
+ * @example
2056
+ * ```ts
2057
+ * import { createConfig, http } from '@wagmi/core'
2058
+ * import { tempo } from 'tempo.ts/chains'
2059
+ * import { Actions } from 'tempo.ts/wagmi'
2060
+ *
2061
+ * const config = createConfig({
2062
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
2063
+ * transports: {
2064
+ * [tempo.id]: http(),
2065
+ * },
2066
+ * })
2067
+ *
2068
+ * const hash = await Actions.token.unpause(config, {
2069
+ * token: '0x...',
2070
+ * })
2071
+ * ```
2072
+ *
2073
+ * @param config - Config.
2074
+ * @param parameters - Parameters.
2075
+ * @returns Transaction hash.
2076
+ */
2077
+ export async function unpause<config extends Config>(
2078
+ config: config,
2079
+ parameters: unpause.Parameters<config>,
2080
+ ): Promise<viem_Actions.unpause.ReturnValue> {
2081
+ const { account, chainId, connector } = parameters
2082
+
2083
+ const client = await getConnectorClient(config, {
2084
+ account,
2085
+ assertChainId: false,
2086
+ chainId,
2087
+ connector,
2088
+ })
2089
+
2090
+ return viem_Actions.unpause(
2091
+ client,
2092
+ parameters as viem_Actions.unpause.Parameters,
2093
+ )
2094
+ }
2095
+
2096
+ export declare namespace unpause {
2097
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
2098
+ ConnectorParameter &
2099
+ Omit<viem_Actions.unpause.Parameters<undefined, Account>, 'chain'>
2100
+
2101
+ export type ReturnValue = viem_Actions.unpause.ReturnValue
2102
+
2103
+ export type ErrorType = viem_Actions.unpause.ErrorType
2104
+ }
2105
+
2106
+ /**
2107
+ * Unpauses a TIP20 token.
2108
+ *
2109
+ * Note: This is a synchronous action that waits for the transaction to
2110
+ * be included on a block before returning a response.
2111
+ *
2112
+ * @example
2113
+ * ```ts
2114
+ * import { createConfig, http } from '@wagmi/core'
2115
+ * import { tempo } from 'tempo.ts/chains'
2116
+ * import { Actions } from 'tempo.ts/wagmi'
2117
+ *
2118
+ * const config = createConfig({
2119
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
2120
+ * transports: {
2121
+ * [tempo.id]: http(),
2122
+ * },
2123
+ * })
2124
+ *
2125
+ * const result = await Actions.token.unpauseSync(config, {
2126
+ * token: '0x...',
2127
+ * })
2128
+ * ```
2129
+ *
2130
+ * @param config - Config.
2131
+ * @param parameters - Parameters.
2132
+ * @returns The transaction receipt and event data.
2133
+ */
2134
+ export async function unpauseSync<config extends Config>(
2135
+ config: config,
2136
+ parameters: unpauseSync.Parameters<config>,
2137
+ ): Promise<viem_Actions.unpauseSync.ReturnValue> {
2138
+ const { account, chainId, connector } = parameters
2139
+
2140
+ const client = await getConnectorClient(config, {
2141
+ account,
2142
+ assertChainId: false,
2143
+ chainId,
2144
+ connector,
2145
+ })
2146
+
2147
+ return viem_Actions.unpauseSync(
2148
+ client,
2149
+ parameters as viem_Actions.unpauseSync.Parameters,
2150
+ )
2151
+ }
2152
+
2153
+ export declare namespace unpauseSync {
2154
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
2155
+ ConnectorParameter &
2156
+ Omit<viem_Actions.unpauseSync.Parameters<undefined, Account>, 'chain'>
2157
+
2158
+ export type ReturnValue = viem_Actions.unpauseSync.ReturnValue
2159
+
2160
+ export type ErrorType = viem_Actions.unpauseSync.ErrorType
2161
+ }
2162
+
2163
+ /**
2164
+ * Prepares the quote token update for a TIP20 token.
2165
+ *
2166
+ * @example
2167
+ * ```ts
2168
+ * import { createConfig, http } from '@wagmi/core'
2169
+ * import { tempo } from 'tempo.ts/chains'
2170
+ * import { Actions } from 'tempo.ts/wagmi'
2171
+ *
2172
+ * const config = createConfig({
2173
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
2174
+ * transports: {
2175
+ * [tempo.id]: http(),
2176
+ * },
2177
+ * })
2178
+ *
2179
+ * const hash = await Actions.token.prepareUpdateQuoteToken(config, {
2180
+ * token: '0x...',
2181
+ * quoteToken: '0x...',
2182
+ * })
2183
+ * ```
2184
+ *
2185
+ * @param config - Config.
2186
+ * @param parameters - Parameters.
2187
+ * @returns Transaction hash.
2188
+ */
2189
+ export async function prepareUpdateQuoteToken<config extends Config>(
2190
+ config: config,
2191
+ parameters: prepareUpdateQuoteToken.Parameters<config>,
2192
+ ): Promise<viem_Actions.prepareUpdateQuoteToken.ReturnValue> {
2193
+ const { account, chainId, connector } = parameters
2194
+
2195
+ const client = await getConnectorClient(config, {
2196
+ account,
2197
+ assertChainId: false,
2198
+ chainId,
2199
+ connector,
2200
+ })
2201
+
2202
+ return viem_Actions.prepareUpdateQuoteToken(
2203
+ client,
2204
+ parameters as viem_Actions.prepareUpdateQuoteToken.Parameters,
2205
+ )
2206
+ }
2207
+
2208
+ export declare namespace prepareUpdateQuoteToken {
2209
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
2210
+ ConnectorParameter &
2211
+ Omit<
2212
+ viem_Actions.prepareUpdateQuoteToken.Parameters<undefined, Account>,
2213
+ 'chain'
2214
+ >
2215
+
2216
+ export type ReturnValue = viem_Actions.prepareUpdateQuoteToken.ReturnValue
2217
+
2218
+ export type ErrorType = viem_Actions.prepareUpdateQuoteToken.ErrorType
2219
+ }
2220
+
2221
+ /**
2222
+ * Prepares the quote token update for a TIP20 token.
2223
+ *
2224
+ * Note: This is a synchronous action that waits for the transaction to
2225
+ * be included on a block before returning a response.
2226
+ *
2227
+ * @example
2228
+ * ```ts
2229
+ * import { createConfig, http } from '@wagmi/core'
2230
+ * import { tempo } from 'tempo.ts/chains'
2231
+ * import { Actions } from 'tempo.ts/wagmi'
2232
+ *
2233
+ * const config = createConfig({
2234
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
2235
+ * transports: {
2236
+ * [tempo.id]: http(),
2237
+ * },
2238
+ * })
2239
+ *
2240
+ * const result = await Actions.token.prepareUpdateQuoteTokenSync(config, {
2241
+ * token: '0x...',
2242
+ * quoteToken: '0x...',
2243
+ * })
2244
+ * ```
2245
+ *
2246
+ * @param config - Config.
2247
+ * @param parameters - Parameters.
2248
+ * @returns The transaction receipt and event data.
2249
+ */
2250
+ export async function prepareUpdateQuoteTokenSync<config extends Config>(
2251
+ config: config,
2252
+ parameters: prepareUpdateQuoteTokenSync.Parameters<config>,
2253
+ ): Promise<viem_Actions.prepareUpdateQuoteTokenSync.ReturnValue> {
2254
+ const { account, chainId, connector } = parameters
2255
+
2256
+ const client = await getConnectorClient(config, {
2257
+ account,
2258
+ assertChainId: false,
2259
+ chainId,
2260
+ connector,
2261
+ })
2262
+
2263
+ return viem_Actions.prepareUpdateQuoteTokenSync(
2264
+ client,
2265
+ parameters as viem_Actions.prepareUpdateQuoteTokenSync.Parameters,
2266
+ )
2267
+ }
2268
+
2269
+ export declare namespace prepareUpdateQuoteTokenSync {
2270
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
2271
+ ConnectorParameter &
2272
+ Omit<
2273
+ viem_Actions.prepareUpdateQuoteTokenSync.Parameters<undefined, Account>,
2274
+ 'chain'
2275
+ >
2276
+
2277
+ export type ReturnValue = viem_Actions.prepareUpdateQuoteTokenSync.ReturnValue
2278
+
2279
+ export type ErrorType = viem_Actions.prepareUpdateQuoteTokenSync.ErrorType
2280
+ }
2281
+
2282
+ /**
2283
+ * Watches for TIP20 token role admin updates.
2284
+ *
2285
+ * @example
2286
+ * ```ts
2287
+ * import { createConfig, http } from '@wagmi/core'
2288
+ * import { tempo } from 'tempo.ts/chains'
2289
+ * import { Actions } from 'tempo.ts/wagmi'
2290
+ *
2291
+ * const config = createConfig({
2292
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
2293
+ * transports: {
2294
+ * [tempo.id]: http(),
2295
+ * },
2296
+ * })
2297
+ *
2298
+ * const unwatch = Actions.token.watchAdminRole(config, {
2299
+ * onRoleAdminUpdated: (args, log) => {
2300
+ * console.log('Role admin updated:', args)
2301
+ * },
2302
+ * })
2303
+ * ```
2304
+ *
2305
+ * @param config - Config.
2306
+ * @param parameters - Parameters.
2307
+ * @returns A function to unsubscribe from the event.
2308
+ */
2309
+ export function watchAdminRole<config extends Config>(
2310
+ config: config,
2311
+ parameters: watchAdminRole.Parameters<config>,
2312
+ ) {
2313
+ const { chainId, ...rest } = parameters
2314
+ const client = config.getClient({ chainId })
2315
+ return viem_Actions.watchAdminRole(client, rest)
2316
+ }
2317
+
2318
+ export declare namespace watchAdminRole {
2319
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
2320
+ viem_Actions.watchAdminRole.Parameters
2321
+ }
2322
+
2323
+ /**
2324
+ * Watches for TIP20 token approval events.
2325
+ *
2326
+ * @example
2327
+ * ```ts
2328
+ * import { createConfig, http } from '@wagmi/core'
2329
+ * import { tempo } from 'tempo.ts/chains'
2330
+ * import { Actions } from 'tempo.ts/wagmi'
2331
+ *
2332
+ * const config = createConfig({
2333
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
2334
+ * transports: {
2335
+ * [tempo.id]: http(),
2336
+ * },
2337
+ * })
2338
+ *
2339
+ * const unwatch = Actions.token.watchApprove(config, {
2340
+ * onApproval: (args, log) => {
2341
+ * console.log('Approval:', args)
2342
+ * },
2343
+ * })
2344
+ * ```
2345
+ *
2346
+ * @param config - Config.
2347
+ * @param parameters - Parameters.
2348
+ * @returns A function to unsubscribe from the event.
2349
+ */
2350
+ export function watchApprove<config extends Config>(
2351
+ config: config,
2352
+ parameters: watchApprove.Parameters<config>,
2353
+ ) {
2354
+ const { chainId, ...rest } = parameters
2355
+ const client = config.getClient({ chainId })
2356
+ return viem_Actions.watchApprove(client, rest)
2357
+ }
2358
+
2359
+ export declare namespace watchApprove {
2360
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
2361
+ viem_Actions.watchApprove.Parameters
2362
+ }
2363
+
2364
+ /**
2365
+ * Watches for TIP20 token burn events.
2366
+ *
2367
+ * @example
2368
+ * ```ts
2369
+ * import { createConfig, http } from '@wagmi/core'
2370
+ * import { tempo } from 'tempo.ts/chains'
2371
+ * import { Actions } from 'tempo.ts/wagmi'
2372
+ *
2373
+ * const config = createConfig({
2374
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
2375
+ * transports: {
2376
+ * [tempo.id]: http(),
2377
+ * },
2378
+ * })
2379
+ *
2380
+ * const unwatch = Actions.token.watchBurn(config, {
2381
+ * onBurn: (args, log) => {
2382
+ * console.log('Burn:', args)
2383
+ * },
2384
+ * })
2385
+ * ```
2386
+ *
2387
+ * @param config - Config.
2388
+ * @param parameters - Parameters.
2389
+ * @returns A function to unsubscribe from the event.
2390
+ */
2391
+ export function watchBurn<config extends Config>(
2392
+ config: config,
2393
+ parameters: watchBurn.Parameters<config>,
2394
+ ) {
2395
+ const { chainId, ...rest } = parameters
2396
+ const client = config.getClient({ chainId })
2397
+ return viem_Actions.watchBurn(client, rest)
2398
+ }
2399
+
2400
+ export declare namespace watchBurn {
2401
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
2402
+ viem_Actions.watchBurn.Parameters
2403
+ }
2404
+
2405
+ /**
2406
+ * Watches for new TIP20 tokens created.
2407
+ *
2408
+ * @example
2409
+ * ```ts
2410
+ * import { createConfig, http } from '@wagmi/core'
2411
+ * import { tempo } from 'tempo.ts/chains'
2412
+ * import { Actions } from 'tempo.ts/wagmi'
2413
+ *
2414
+ * const config = createConfig({
2415
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
2416
+ * transports: {
2417
+ * [tempo.id]: http(),
2418
+ * },
2419
+ * })
2420
+ *
2421
+ * const unwatch = Actions.token.watchCreate(config, {
2422
+ * onTokenCreated: (args, log) => {
2423
+ * console.log('Token created:', args)
2424
+ * },
2425
+ * })
2426
+ * ```
2427
+ *
2428
+ * @param config - Config.
2429
+ * @param parameters - Parameters.
2430
+ * @returns A function to unsubscribe from the event.
2431
+ */
2432
+ export function watchCreate<config extends Config>(
2433
+ config: config,
2434
+ parameters: watchCreate.Parameters<config>,
2435
+ ) {
2436
+ const { chainId, ...rest } = parameters
2437
+ const client = config.getClient({ chainId })
2438
+ return viem_Actions.watchCreate(client, rest)
2439
+ }
2440
+
2441
+ export declare namespace watchCreate {
2442
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
2443
+ viem_Actions.watchCreate.Parameters
2444
+ }
2445
+
2446
+ /**
2447
+ * Watches for TIP20 token mint events.
2448
+ *
2449
+ * @example
2450
+ * ```ts
2451
+ * import { createConfig, http } from '@wagmi/core'
2452
+ * import { tempo } from 'tempo.ts/chains'
2453
+ * import { Actions } from 'tempo.ts/wagmi'
2454
+ *
2455
+ * const config = createConfig({
2456
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
2457
+ * transports: {
2458
+ * [tempo.id]: http(),
2459
+ * },
2460
+ * })
2461
+ *
2462
+ * const unwatch = Actions.token.watchMint(config, {
2463
+ * onMint: (args, log) => {
2464
+ * console.log('Mint:', args)
2465
+ * },
2466
+ * })
2467
+ * ```
2468
+ *
2469
+ * @param config - Config.
2470
+ * @param parameters - Parameters.
2471
+ * @returns A function to unsubscribe from the event.
2472
+ */
2473
+ export function watchMint<config extends Config>(
2474
+ config: config,
2475
+ parameters: watchMint.Parameters<config>,
2476
+ ) {
2477
+ const { chainId, ...rest } = parameters
2478
+ const client = config.getClient({ chainId })
2479
+ return viem_Actions.watchMint(client, rest)
2480
+ }
2481
+
2482
+ export declare namespace watchMint {
2483
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
2484
+ viem_Actions.watchMint.Parameters
2485
+
2486
+ export type ReturnValue = viem_Actions.watchMint.ReturnValue
2487
+ }
2488
+
2489
+ /**
2490
+ * Watches for TIP20 token role membership updates.
2491
+ *
2492
+ * @example
2493
+ * ```ts
2494
+ * import { createConfig, http } from '@wagmi/core'
2495
+ * import { tempo } from 'tempo.ts/chains'
2496
+ * import { Actions } from 'tempo.ts/wagmi'
2497
+ *
2498
+ * const config = createConfig({
2499
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
2500
+ * transports: {
2501
+ * [tempo.id]: http(),
2502
+ * },
2503
+ * })
2504
+ *
2505
+ * const unwatch = Actions.token.watchRole(config, {
2506
+ * onRoleUpdated: (args, log) => {
2507
+ * console.log('Role updated:', args)
2508
+ * },
2509
+ * })
2510
+ * ```
2511
+ *
2512
+ * @param config - Config.
2513
+ * @param parameters - Parameters.
2514
+ * @returns A function to unsubscribe from the event.
2515
+ */
2516
+ export function watchRole<config extends Config>(
2517
+ config: config,
2518
+ parameters: watchRole.Parameters<config>,
2519
+ ) {
2520
+ const { chainId, ...rest } = parameters
2521
+ const client = config.getClient({ chainId })
2522
+ return viem_Actions.watchRole(client, rest)
2523
+ }
2524
+
2525
+ export declare namespace watchRole {
2526
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
2527
+ viem_Actions.watchRole.Parameters
2528
+ }
2529
+
2530
+ /**
2531
+ * Watches for TIP20 token transfer events.
2532
+ *
2533
+ * @example
2534
+ * ```ts
2535
+ * import { createConfig, http } from '@wagmi/core'
2536
+ * import { tempo } from 'tempo.ts/chains'
2537
+ * import { Actions } from 'tempo.ts/wagmi'
2538
+ *
2539
+ * const config = createConfig({
2540
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
2541
+ * transports: {
2542
+ * [tempo.id]: http(),
2543
+ * },
2544
+ * })
2545
+ *
2546
+ * const unwatch = Actions.token.watchTransfer(config, {
2547
+ * onTransfer: (args, log) => {
2548
+ * console.log('Transfer:', args)
2549
+ * },
2550
+ * })
2551
+ * ```
2552
+ *
2553
+ * @param config - Config.
2554
+ * @param parameters - Parameters.
2555
+ * @returns A function to unsubscribe from the event.
2556
+ */
2557
+ export function watchTransfer<config extends Config>(
2558
+ config: config,
2559
+ parameters: watchTransfer.Parameters<config>,
2560
+ ) {
2561
+ const { chainId, ...rest } = parameters
2562
+ const client = config.getClient({ chainId })
2563
+ return viem_Actions.watchTransfer(client, rest)
2564
+ }
2565
+
2566
+ export declare namespace watchTransfer {
2567
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
2568
+ viem_Actions.watchTransfer.Parameters
2569
+ }
2570
+
2571
+ /**
2572
+ * Watches for TIP20 token quote token update events.
2573
+ *
2574
+ * @example
2575
+ * ```ts
2576
+ * import { createConfig, http } from '@wagmi/core'
2577
+ * import { tempo } from 'tempo.ts/chains'
2578
+ * import { Actions } from 'tempo.ts/wagmi'
2579
+ *
2580
+ * const config = createConfig({
2581
+ * chains: [tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })],
2582
+ * transports: {
2583
+ * [tempo.id]: http(),
2584
+ * },
2585
+ * })
2586
+ *
2587
+ * const unwatch = Actions.token.watchUpdateQuoteToken(config, {
2588
+ * onUpdateQuoteToken: (args, log) => {
2589
+ * if (args.completed)
2590
+ * console.log('quote token update completed:', args.newQuoteToken)
2591
+ * else
2592
+ * console.log('quote token update proposed:', args.newQuoteToken)
2593
+ * },
2594
+ * })
2595
+ * ```
2596
+ *
2597
+ * @param config - Config.
2598
+ * @param parameters - Parameters.
2599
+ * @returns A function to unsubscribe from the event.
2600
+ */
2601
+ export function watchUpdateQuoteToken<config extends Config>(
2602
+ config: config,
2603
+ parameters: watchUpdateQuoteToken.Parameters<config>,
2604
+ ) {
2605
+ const { chainId, ...rest } = parameters
2606
+ const client = config.getClient({ chainId })
2607
+ return viem_Actions.watchUpdateQuoteToken(client, rest)
2608
+ }
2609
+
2610
+ export declare namespace watchUpdateQuoteToken {
2611
+ export type Parameters<config extends Config> = ChainIdParameter<config> &
2612
+ viem_Actions.watchUpdateQuoteToken.Parameters
2613
+ }