tempo.ts 0.0.0 → 0.0.2

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