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
@@ -1,8 +1,10 @@
1
1
  import type { Account, Chain, Client, Transport } from 'viem'
2
2
  import * as ammActions from './Actions/amm.js'
3
3
  import * as dexActions from './Actions/dex.js'
4
+ import * as faucetActions from './Actions/faucet.js'
4
5
  import * as feeActions from './Actions/fee.js'
5
6
  import * as policyActions from './Actions/policy.js'
7
+ import * as rewardActions from './Actions/reward.js'
6
8
  import * as tokenActions from './Actions/token.js'
7
9
 
8
10
  export type Decorator<
@@ -10,35 +12,19 @@ export type Decorator<
10
12
  account extends Account | undefined = Account | undefined,
11
13
  > = {
12
14
  amm: {
13
- /**
14
- * Gets the pool ID for a token pair.
15
- *
16
- * @example
17
- * ```ts
18
- * import { createTempoClient } from 'tempo.ts/viem'
19
- *
20
- * const client = createTempoClient()
21
- *
22
- * const poolId = await client.amm.getPoolId({
23
- * userToken: '0x...',
24
- * validatorToken: '0x...',
25
- * })
26
- * ```
27
- *
28
- * @param parameters - Parameters.
29
- * @returns The pool ID.
30
- */
31
- getPoolId: (
32
- parameters: ammActions.getPoolId.Parameters,
33
- ) => Promise<ammActions.getPoolId.ReturnValue>
34
15
  /**
35
16
  * Gets the reserves for a liquidity pool.
36
17
  *
37
18
  * @example
38
19
  * ```ts
39
- * import { createTempoClient } from 'tempo.ts/viem'
20
+ * import { createClient, http } from 'viem'
21
+ * import { tempo } from 'tempo.ts/chains'
22
+ * import { tempoActions } from 'tempo.ts/viem'
40
23
  *
41
- * const client = createTempoClient()
24
+ * const client = createClient({
25
+ * chain: tempo({ feeToken: '0x20c...001' }),
26
+ * transport: http(),
27
+ * }).extend(tempoActions())
42
28
  *
43
29
  * const pool = await client.amm.getPool({
44
30
  * userToken: '0x...',
@@ -52,37 +38,19 @@ export type Decorator<
52
38
  getPool: (
53
39
  parameters: ammActions.getPool.Parameters,
54
40
  ) => Promise<ammActions.getPool.ReturnValue>
55
- /**
56
- * Gets the total supply of LP tokens for a pool.
57
- *
58
- * @example
59
- * ```ts
60
- * import { createTempoClient } from 'tempo.ts/viem'
61
- *
62
- * const client = createTempoClient()
63
- *
64
- * const poolId = await client.amm.getPoolId({
65
- * userToken: '0x...',
66
- * validatorToken: '0x...',
67
- * })
68
- *
69
- * const totalSupply = await client.amm.getTotalSupply({ poolId })
70
- * ```
71
- *
72
- * @param parameters - Parameters.
73
- * @returns The total supply of LP tokens.
74
- */
75
- getTotalSupply: (
76
- parameters: ammActions.getTotalSupply.Parameters,
77
- ) => Promise<ammActions.getTotalSupply.ReturnValue>
78
41
  /**
79
42
  * Gets the LP token balance for an account in a specific pool.
80
43
  *
81
44
  * @example
82
45
  * ```ts
83
- * import { createTempoClient } from 'tempo.ts/viem'
46
+ * import { createClient, http } from 'viem'
47
+ * import { tempo } from 'tempo.ts/chains'
48
+ * import { tempoActions } from 'tempo.ts/viem'
84
49
  *
85
- * const client = createTempoClient()
50
+ * const client = createClient({
51
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
52
+ * transport: http(),
53
+ * }).extend(tempoActions())
86
54
  *
87
55
  * const poolId = await client.amm.getPoolId({
88
56
  * userToken: '0x...',
@@ -106,12 +74,16 @@ export type Decorator<
106
74
  *
107
75
  * @example
108
76
  * ```ts
109
- * import { createTempoClient } from 'tempo.ts/viem'
77
+ * import { createClient, http } from 'viem'
110
78
  * import { privateKeyToAccount } from 'viem/accounts'
79
+ * import { tempo } from 'tempo.ts/chains'
80
+ * import { tempoActions } from 'tempo.ts/viem'
111
81
  *
112
- * const client = createTempoClient({
113
- * account: privateKeyToAccount('0x...')
114
- * })
82
+ * const client = createClient({
83
+ * account: privateKeyToAccount('0x...'),
84
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
85
+ * transport: http(),
86
+ * }).extend(tempoActions())
115
87
  *
116
88
  * const hash = await client.amm.rebalanceSwap({
117
89
  * userToken: '0x...',
@@ -132,12 +104,16 @@ export type Decorator<
132
104
  *
133
105
  * @example
134
106
  * ```ts
135
- * import { createTempoClient } from 'tempo.ts/viem'
107
+ * import { createClient, http } from 'viem'
136
108
  * import { privateKeyToAccount } from 'viem/accounts'
109
+ * import { tempo } from 'tempo.ts/chains'
110
+ * import { tempoActions } from 'tempo.ts/viem'
137
111
  *
138
- * const client = createTempoClient({
139
- * account: privateKeyToAccount('0x...')
140
- * })
112
+ * const client = createClient({
113
+ * account: privateKeyToAccount('0x...'),
114
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
115
+ * transport: http(),
116
+ * }).extend(tempoActions())
141
117
  *
142
118
  * const result = await client.amm.rebalanceSwapSync({
143
119
  * userToken: '0x...',
@@ -158,12 +134,16 @@ export type Decorator<
158
134
  *
159
135
  * @example
160
136
  * ```ts
161
- * import { createTempoClient } from 'tempo.ts/viem'
137
+ * import { createClient, http } from 'viem'
162
138
  * import { privateKeyToAccount } from 'viem/accounts'
139
+ * import { tempo } from 'tempo.ts/chains'
140
+ * import { tempoActions } from 'tempo.ts/viem'
163
141
  *
164
- * const client = createTempoClient({
165
- * account: privateKeyToAccount('0x...')
166
- * })
142
+ * const client = createClient({
143
+ * account: privateKeyToAccount('0x...'),
144
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
145
+ * transport: http(),
146
+ * }).extend(tempoActions())
167
147
  *
168
148
  * const hash = await client.amm.mint({
169
149
  * userToken: {
@@ -189,12 +169,16 @@ export type Decorator<
189
169
  *
190
170
  * @example
191
171
  * ```ts
192
- * import { createTempoClient } from 'tempo.ts/viem'
172
+ * import { createClient, http } from 'viem'
193
173
  * import { privateKeyToAccount } from 'viem/accounts'
174
+ * import { tempo } from 'tempo.ts/chains'
175
+ * import { tempoActions } from 'tempo.ts/viem'
194
176
  *
195
- * const client = createTempoClient({
196
- * account: privateKeyToAccount('0x...')
197
- * })
177
+ * const client = createClient({
178
+ * account: privateKeyToAccount('0x...'),
179
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
180
+ * transport: http(),
181
+ * }).extend(tempoActions())
198
182
  *
199
183
  * const result = await client.amm.mintSync({
200
184
  * userToken: {
@@ -220,12 +204,16 @@ export type Decorator<
220
204
  *
221
205
  * @example
222
206
  * ```ts
223
- * import { createTempoClient } from 'tempo.ts/viem'
207
+ * import { createClient, http } from 'viem'
224
208
  * import { privateKeyToAccount } from 'viem/accounts'
209
+ * import { tempo } from 'tempo.ts/chains'
210
+ * import { tempoActions } from 'tempo.ts/viem'
225
211
  *
226
- * const client = createTempoClient({
227
- * account: privateKeyToAccount('0x...')
228
- * })
212
+ * const client = createClient({
213
+ * account: privateKeyToAccount('0x...'),
214
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
215
+ * transport: http(),
216
+ * }).extend(tempoActions())
229
217
  *
230
218
  * const hash = await client.amm.burn({
231
219
  * userToken: '0x...',
@@ -246,12 +234,16 @@ export type Decorator<
246
234
  *
247
235
  * @example
248
236
  * ```ts
249
- * import { createTempoClient } from 'tempo.ts/viem'
237
+ * import { createClient, http } from 'viem'
250
238
  * import { privateKeyToAccount } from 'viem/accounts'
239
+ * import { tempo } from 'tempo.ts/chains'
240
+ * import { tempoActions } from 'tempo.ts/viem'
251
241
  *
252
- * const client = createTempoClient({
253
- * account: privateKeyToAccount('0x...')
254
- * })
242
+ * const client = createClient({
243
+ * account: privateKeyToAccount('0x...'),
244
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
245
+ * transport: http(),
246
+ * }).extend(tempoActions())
255
247
  *
256
248
  * const result = await client.amm.burnSync({
257
249
  * userToken: '0x...',
@@ -272,9 +264,14 @@ export type Decorator<
272
264
  *
273
265
  * @example
274
266
  * ```ts
275
- * import { createTempoClient } from 'tempo.ts/viem'
267
+ * import { createClient, http } from 'viem'
268
+ * import { tempo } from 'tempo.ts/chains'
269
+ * import { tempoActions } from 'tempo.ts/viem'
276
270
  *
277
- * const client = createTempoClient()
271
+ * const client = createClient({
272
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
273
+ * transport: http(),
274
+ * }).extend(tempoActions())
278
275
  *
279
276
  * const unwatch = client.amm.watchRebalanceSwap({
280
277
  * onRebalanceSwap: (args, log) => {
@@ -294,9 +291,14 @@ export type Decorator<
294
291
  *
295
292
  * @example
296
293
  * ```ts
297
- * import { createTempoClient } from 'tempo.ts/viem'
294
+ * import { createClient, http } from 'viem'
295
+ * import { tempo } from 'tempo.ts/chains'
296
+ * import { tempoActions } from 'tempo.ts/viem'
298
297
  *
299
- * const client = createTempoClient()
298
+ * const client = createClient({
299
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
300
+ * transport: http(),
301
+ * }).extend(tempoActions())
300
302
  *
301
303
  * const unwatch = client.amm.watchFeeSwap({
302
304
  * onFeeSwap: (args, log) => {
@@ -314,9 +316,14 @@ export type Decorator<
314
316
  *
315
317
  * @example
316
318
  * ```ts
317
- * import { createTempoClient } from 'tempo.ts/viem'
319
+ * import { createClient, http } from 'viem'
320
+ * import { tempo } from 'tempo.ts/chains'
321
+ * import { tempoActions } from 'tempo.ts/viem'
318
322
  *
319
- * const client = createTempoClient()
323
+ * const client = createClient({
324
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
325
+ * transport: http(),
326
+ * }).extend(tempoActions())
320
327
  *
321
328
  * const unwatch = client.amm.watchMint({
322
329
  * onMint: (args, log) => {
@@ -334,9 +341,14 @@ export type Decorator<
334
341
  *
335
342
  * @example
336
343
  * ```ts
337
- * import { createTempoClient } from 'tempo.ts/viem'
344
+ * import { createClient, http } from 'viem'
345
+ * import { tempo } from 'tempo.ts/chains'
346
+ * import { tempoActions } from 'tempo.ts/viem'
338
347
  *
339
- * const client = createTempoClient()
348
+ * const client = createClient({
349
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
350
+ * transport: http(),
351
+ * }).extend(tempoActions())
340
352
  *
341
353
  * const unwatch = client.amm.watchBurn({
342
354
  * onBurn: (args, log) => {
@@ -356,12 +368,16 @@ export type Decorator<
356
368
  *
357
369
  * @example
358
370
  * ```ts
359
- * import { createTempoClient } from 'tempo.ts/viem'
371
+ * import { createClient, http } from 'viem'
360
372
  * import { privateKeyToAccount } from 'viem/accounts'
373
+ * import { tempo } from 'tempo.ts/chains'
374
+ * import { tempoActions } from 'tempo.ts/viem'
361
375
  *
362
- * const client = createTempoClient({
363
- * account: privateKeyToAccount('0x...')
364
- * })
376
+ * const client = createClient({
377
+ * account: privateKeyToAccount('0x...'),
378
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
379
+ * transport: http(),
380
+ * }).extend(tempoActions())
365
381
  *
366
382
  * const hash = await client.dex.buy({
367
383
  * tokenIn: '0x20c...11',
@@ -382,12 +398,16 @@ export type Decorator<
382
398
  *
383
399
  * @example
384
400
  * ```ts
385
- * import { createTempoClient } from 'tempo.ts/viem'
401
+ * import { createClient, http } from 'viem'
386
402
  * import { privateKeyToAccount } from 'viem/accounts'
403
+ * import { tempo } from 'tempo.ts/chains'
404
+ * import { tempoActions } from 'tempo.ts/viem'
387
405
  *
388
- * const client = createTempoClient({
389
- * account: privateKeyToAccount('0x...')
390
- * })
406
+ * const client = createClient({
407
+ * account: privateKeyToAccount('0x...'),
408
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
409
+ * transport: http(),
410
+ * }).extend(tempoActions())
391
411
  *
392
412
  * const result = await client.dex.buySync({
393
413
  * tokenIn: '0x20c...11',
@@ -408,12 +428,16 @@ export type Decorator<
408
428
  *
409
429
  * @example
410
430
  * ```ts
411
- * import { createTempoClient } from 'tempo.ts/viem'
431
+ * import { createClient, http } from 'viem'
412
432
  * import { privateKeyToAccount } from 'viem/accounts'
433
+ * import { tempo } from 'tempo.ts/chains'
434
+ * import { tempoActions } from 'tempo.ts/viem'
413
435
  *
414
- * const client = createTempoClient({
415
- * account: privateKeyToAccount('0x...')
416
- * })
436
+ * const client = createClient({
437
+ * account: privateKeyToAccount('0x...'),
438
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
439
+ * transport: http(),
440
+ * }).extend(tempoActions())
417
441
  *
418
442
  * const hash = await client.dex.cancel({
419
443
  * orderId: 123n,
@@ -431,12 +455,16 @@ export type Decorator<
431
455
  *
432
456
  * @example
433
457
  * ```ts
434
- * import { createTempoClient } from 'tempo.ts/viem'
458
+ * import { createClient, http } from 'viem'
435
459
  * import { privateKeyToAccount } from 'viem/accounts'
460
+ * import { tempo } from 'tempo.ts/chains'
461
+ * import { tempoActions } from 'tempo.ts/viem'
436
462
  *
437
- * const client = createTempoClient({
438
- * account: privateKeyToAccount('0x...')
439
- * })
463
+ * const client = createClient({
464
+ * account: privateKeyToAccount('0x...'),
465
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
466
+ * transport: http(),
467
+ * }).extend(tempoActions())
440
468
  *
441
469
  * const result = await client.dex.cancelSync({
442
470
  * orderId: 123n,
@@ -454,12 +482,16 @@ export type Decorator<
454
482
  *
455
483
  * @example
456
484
  * ```ts
457
- * import { createTempoClient } from 'tempo.ts/viem'
485
+ * import { createClient, http } from 'viem'
458
486
  * import { privateKeyToAccount } from 'viem/accounts'
487
+ * import { tempo } from 'tempo.ts/chains'
488
+ * import { tempoActions } from 'tempo.ts/viem'
459
489
  *
460
- * const client = createTempoClient({
461
- * account: privateKeyToAccount('0x...')
462
- * })
490
+ * const client = createClient({
491
+ * account: privateKeyToAccount('0x...'),
492
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
493
+ * transport: http(),
494
+ * }).extend(tempoActions())
463
495
  *
464
496
  * const hash = await client.dex.createPair({
465
497
  * base: '0x20c...11',
@@ -477,12 +509,16 @@ export type Decorator<
477
509
  *
478
510
  * @example
479
511
  * ```ts
480
- * import { createTempoClient } from 'tempo.ts/viem'
512
+ * import { createClient, http } from 'viem'
481
513
  * import { privateKeyToAccount } from 'viem/accounts'
514
+ * import { tempo } from 'tempo.ts/chains'
515
+ * import { tempoActions } from 'tempo.ts/viem'
482
516
  *
483
- * const client = createTempoClient({
484
- * account: privateKeyToAccount('0x...')
485
- * })
517
+ * const client = createClient({
518
+ * account: privateKeyToAccount('0x...'),
519
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
520
+ * transport: http(),
521
+ * }).extend(tempoActions())
486
522
  *
487
523
  * const result = await client.dex.createPairSync({
488
524
  * base: '0x20c...11',
@@ -500,9 +536,14 @@ export type Decorator<
500
536
  *
501
537
  * @example
502
538
  * ```ts
503
- * import { createTempoClient } from 'tempo.ts/viem'
539
+ * import { createClient, http } from 'viem'
540
+ * import { tempo } from 'tempo.ts/chains'
541
+ * import { tempoActions } from 'tempo.ts/viem'
504
542
  *
505
- * const client = createTempoClient()
543
+ * const client = createClient({
544
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
545
+ * transport: http(),
546
+ * }).extend(tempoActions())
506
547
  *
507
548
  * const balance = await client.dex.getBalance({
508
549
  * account: '0x...',
@@ -521,9 +562,14 @@ export type Decorator<
521
562
  *
522
563
  * @example
523
564
  * ```ts
524
- * import { createTempoClient } from 'tempo.ts/viem'
565
+ * import { createClient, http } from 'viem'
566
+ * import { tempo } from 'tempo.ts/chains'
567
+ * import { tempoActions } from 'tempo.ts/viem'
525
568
  *
526
- * const client = createTempoClient()
569
+ * const client = createClient({
570
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
571
+ * transport: http(),
572
+ * }).extend(tempoActions())
527
573
  *
528
574
  * const amountIn = await client.dex.getBuyQuote({
529
575
  * tokenIn: '0x20c...11',
@@ -543,9 +589,14 @@ export type Decorator<
543
589
  *
544
590
  * @example
545
591
  * ```ts
546
- * import { createTempoClient } from 'tempo.ts/viem'
592
+ * import { createClient, http } from 'viem'
593
+ * import { tempo } from 'tempo.ts/chains'
594
+ * import { tempoActions } from 'tempo.ts/viem'
547
595
  *
548
- * const client = createTempoClient()
596
+ * const client = createClient({
597
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
598
+ * transport: http(),
599
+ * }).extend(tempoActions())
549
600
  *
550
601
  * const order = await client.dex.getOrder({
551
602
  * orderId: 123n,
@@ -558,14 +609,48 @@ export type Decorator<
558
609
  getOrder: (
559
610
  parameters: dexActions.getOrder.Parameters,
560
611
  ) => Promise<dexActions.getOrder.ReturnValue>
612
+ /**
613
+ * Gets paginated orders from the orderbook.
614
+ *
615
+ * @example
616
+ * ```ts
617
+ * import { createClient, http } from 'viem'
618
+ * import { tempo } from 'tempo.ts/chains'
619
+ * import { tempoActions } from 'tempo.ts/viem'
620
+ *
621
+ * const client = createClient({
622
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
623
+ * transport: http(),
624
+ * }).extend(tempoActions())
625
+ *
626
+ * const { orders, nextCursor } = await client.dex.getOrders({
627
+ * limit: 100,
628
+ * filters: {
629
+ * baseToken: '0x20c0...',
630
+ * isBid: true,
631
+ * }
632
+ * })
633
+ * ```
634
+ *
635
+ * @param parameters - Parameters.
636
+ * @returns Paginated orders and next cursor.
637
+ */
638
+ getOrders: (
639
+ parameters?: dexActions.getOrders.Parameters,
640
+ ) => Promise<dexActions.getOrders.ReturnValue>
561
641
  /**
562
642
  * Gets the price level information at a specific tick.
563
643
  *
564
644
  * @example
565
645
  * ```ts
566
- * import { createTempoClient, Tick } from 'tempo.ts/viem'
646
+ * import { createClient, http } from 'viem'
647
+ * import { tempo } from 'tempo.ts/chains'
648
+ * import { tempoActions, Tick } from 'tempo.ts/viem'
567
649
  *
568
- * const client = createTempoClient()
650
+ * const client = createClient({
651
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
652
+ * transport: http(),
653
+ * }).extend(tempoActions())
569
654
  *
570
655
  * const level = await client.dex.getPriceLevel({
571
656
  * base: '0x20c...11',
@@ -585,9 +670,14 @@ export type Decorator<
585
670
  *
586
671
  * @example
587
672
  * ```ts
588
- * import { createTempoClient } from 'tempo.ts/viem'
673
+ * import { createClient, http } from 'viem'
674
+ * import { tempo } from 'tempo.ts/chains'
675
+ * import { tempoActions } from 'tempo.ts/viem'
589
676
  *
590
- * const client = createTempoClient()
677
+ * const client = createClient({
678
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
679
+ * transport: http(),
680
+ * }).extend(tempoActions())
591
681
  *
592
682
  * const amountOut = await client.dex.getSellQuote({
593
683
  * tokenIn: '0x20c...11',
@@ -607,12 +697,16 @@ export type Decorator<
607
697
  *
608
698
  * @example
609
699
  * ```ts
610
- * import { createTempoClient, Tick } from 'tempo.ts/viem'
700
+ * import { createClient, http } from 'viem'
611
701
  * import { privateKeyToAccount } from 'viem/accounts'
702
+ * import { tempo } from 'tempo.ts/chains'
703
+ * import { tempoActions, Tick } from 'tempo.ts/viem'
612
704
  *
613
- * const client = createTempoClient({
614
- * account: privateKeyToAccount('0x...')
615
- * })
705
+ * const client = createClient({
706
+ * account: privateKeyToAccount('0x...'),
707
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
708
+ * transport: http(),
709
+ * }).extend(tempoActions())
616
710
  *
617
711
  * const hash = await client.dex.place({
618
712
  * token: '0x20c...11',
@@ -633,12 +727,16 @@ export type Decorator<
633
727
  *
634
728
  * @example
635
729
  * ```ts
636
- * import { createTempoClient, Tick } from 'tempo.ts/viem'
730
+ * import { createClient, http } from 'viem'
637
731
  * import { privateKeyToAccount } from 'viem/accounts'
732
+ * import { tempo } from 'tempo.ts/chains'
733
+ * import { tempoActions, Tick } from 'tempo.ts/viem'
638
734
  *
639
- * const client = createTempoClient({
640
- * account: privateKeyToAccount('0x...')
641
- * })
735
+ * const client = createClient({
736
+ * account: privateKeyToAccount('0x...'),
737
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
738
+ * transport: http(),
739
+ * }).extend(tempoActions())
642
740
  *
643
741
  * const result = await client.dex.placeSync({
644
742
  * token: '0x20c...11',
@@ -659,12 +757,16 @@ export type Decorator<
659
757
  *
660
758
  * @example
661
759
  * ```ts
662
- * import { createTempoClient, Tick } from 'tempo.ts/viem'
760
+ * import { createClient, http } from 'viem'
663
761
  * import { privateKeyToAccount } from 'viem/accounts'
762
+ * import { tempo } from 'tempo.ts/chains'
763
+ * import { tempoActions, Tick } from 'tempo.ts/viem'
664
764
  *
665
- * const client = createTempoClient({
666
- * account: privateKeyToAccount('0x...')
667
- * })
765
+ * const client = createClient({
766
+ * account: privateKeyToAccount('0x...'),
767
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
768
+ * transport: http(),
769
+ * }).extend(tempoActions())
668
770
  *
669
771
  * const hash = await client.dex.placeFlip({
670
772
  * token: '0x20c...11',
@@ -686,12 +788,16 @@ export type Decorator<
686
788
  *
687
789
  * @example
688
790
  * ```ts
689
- * import { createTempoClient, Tick } from 'tempo.ts/viem'
791
+ * import { createClient, http } from 'viem'
690
792
  * import { privateKeyToAccount } from 'viem/accounts'
793
+ * import { tempo } from 'tempo.ts/chains'
794
+ * import { tempoActions, Tick } from 'tempo.ts/viem'
691
795
  *
692
- * const client = createTempoClient({
693
- * account: privateKeyToAccount('0x...')
694
- * })
796
+ * const client = createClient({
797
+ * account: privateKeyToAccount('0x...'),
798
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
799
+ * transport: http(),
800
+ * }).extend(tempoActions())
695
801
  *
696
802
  * const result = await client.dex.placeFlipSync({
697
803
  * token: '0x20c...11',
@@ -713,12 +819,16 @@ export type Decorator<
713
819
  *
714
820
  * @example
715
821
  * ```ts
716
- * import { createTempoClient } from 'tempo.ts/viem'
822
+ * import { createClient, http } from 'viem'
717
823
  * import { privateKeyToAccount } from 'viem/accounts'
824
+ * import { tempo } from 'tempo.ts/chains'
825
+ * import { tempoActions } from 'tempo.ts/viem'
718
826
  *
719
- * const client = createTempoClient({
720
- * account: privateKeyToAccount('0x...')
721
- * })
827
+ * const client = createClient({
828
+ * account: privateKeyToAccount('0x...'),
829
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
830
+ * transport: http(),
831
+ * }).extend(tempoActions())
722
832
  *
723
833
  * const hash = await client.dex.sell({
724
834
  * tokenIn: '0x20c...11',
@@ -739,12 +849,16 @@ export type Decorator<
739
849
  *
740
850
  * @example
741
851
  * ```ts
742
- * import { createTempoClient } from 'tempo.ts/viem'
852
+ * import { createClient, http } from 'viem'
743
853
  * import { privateKeyToAccount } from 'viem/accounts'
854
+ * import { tempo } from 'tempo.ts/chains'
855
+ * import { tempoActions } from 'tempo.ts/viem'
744
856
  *
745
- * const client = createTempoClient({
746
- * account: privateKeyToAccount('0x...')
747
- * })
857
+ * const client = createClient({
858
+ * account: privateKeyToAccount('0x...'),
859
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
860
+ * transport: http(),
861
+ * }).extend(tempoActions())
748
862
  *
749
863
  * const result = await client.dex.sellSync({
750
864
  * tokenIn: '0x20c...11',
@@ -765,12 +879,16 @@ export type Decorator<
765
879
  *
766
880
  * @example
767
881
  * ```ts
768
- * import { createTempoClient } from 'tempo.ts/viem'
882
+ * import { createClient, http } from 'viem'
769
883
  * import { privateKeyToAccount } from 'viem/accounts'
884
+ * import { tempo } from 'tempo.ts/chains'
885
+ * import { tempoActions } from 'tempo.ts/viem'
770
886
  *
771
- * const client = createTempoClient({
772
- * account: privateKeyToAccount('0x...')
773
- * })
887
+ * const client = createClient({
888
+ * account: privateKeyToAccount('0x...'),
889
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
890
+ * transport: http(),
891
+ * }).extend(tempoActions())
774
892
  *
775
893
  * const hash = await client.dex.withdraw({
776
894
  * token: '0x20c...11',
@@ -789,12 +907,16 @@ export type Decorator<
789
907
  *
790
908
  * @example
791
909
  * ```ts
792
- * import { createTempoClient } from 'tempo.ts/viem'
910
+ * import { createClient, http } from 'viem'
793
911
  * import { privateKeyToAccount } from 'viem/accounts'
912
+ * import { tempo } from 'tempo.ts/chains'
913
+ * import { tempoActions } from 'tempo.ts/viem'
794
914
  *
795
- * const client = createTempoClient({
796
- * account: privateKeyToAccount('0x...')
797
- * })
915
+ * const client = createClient({
916
+ * account: privateKeyToAccount('0x...'),
917
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
918
+ * transport: http(),
919
+ * }).extend(tempoActions())
798
920
  *
799
921
  * const result = await client.dex.withdrawSync({
800
922
  * token: '0x20c...11',
@@ -813,9 +935,14 @@ export type Decorator<
813
935
  *
814
936
  * @example
815
937
  * ```ts
816
- * import { createTempoClient } from 'tempo.ts/viem'
938
+ * import { createClient, http } from 'viem'
939
+ * import { tempo } from 'tempo.ts/chains'
940
+ * import { tempoActions } from 'tempo.ts/viem'
817
941
  *
818
- * const client = createTempoClient()
942
+ * const client = createClient({
943
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
944
+ * transport: http(),
945
+ * }).extend(tempoActions())
819
946
  *
820
947
  * const unwatch = client.dex.watchFlipOrderPlaced({
821
948
  * onFlipOrderPlaced: (args, log) => {
@@ -835,9 +962,14 @@ export type Decorator<
835
962
  *
836
963
  * @example
837
964
  * ```ts
838
- * import { createTempoClient } from 'tempo.ts/viem'
965
+ * import { createClient, http } from 'viem'
966
+ * import { tempo } from 'tempo.ts/chains'
967
+ * import { tempoActions } from 'tempo.ts/viem'
839
968
  *
840
- * const client = createTempoClient()
969
+ * const client = createClient({
970
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
971
+ * transport: http(),
972
+ * }).extend(tempoActions())
841
973
  *
842
974
  * const unwatch = client.dex.watchOrderCancelled({
843
975
  * onOrderCancelled: (args, log) => {
@@ -857,9 +989,14 @@ export type Decorator<
857
989
  *
858
990
  * @example
859
991
  * ```ts
860
- * import { createTempoClient } from 'tempo.ts/viem'
992
+ * import { createClient, http } from 'viem'
993
+ * import { tempo } from 'tempo.ts/chains'
994
+ * import { tempoActions } from 'tempo.ts/viem'
861
995
  *
862
- * const client = createTempoClient()
996
+ * const client = createClient({
997
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
998
+ * transport: http(),
999
+ * }).extend(tempoActions())
863
1000
  *
864
1001
  * const unwatch = client.dex.watchOrderFilled({
865
1002
  * onOrderFilled: (args, log) => {
@@ -879,9 +1016,14 @@ export type Decorator<
879
1016
  *
880
1017
  * @example
881
1018
  * ```ts
882
- * import { createTempoClient } from 'tempo.ts/viem'
1019
+ * import { createClient, http } from 'viem'
1020
+ * import { tempo } from 'tempo.ts/chains'
1021
+ * import { tempoActions } from 'tempo.ts/viem'
883
1022
  *
884
- * const client = createTempoClient()
1023
+ * const client = createClient({
1024
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1025
+ * transport: http(),
1026
+ * }).extend(tempoActions())
885
1027
  *
886
1028
  * const unwatch = client.dex.watchOrderPlaced({
887
1029
  * onOrderPlaced: (args, log) => {
@@ -897,18 +1039,50 @@ export type Decorator<
897
1039
  parameters: dexActions.watchOrderPlaced.Parameters,
898
1040
  ) => () => void
899
1041
  }
1042
+ faucet: {
1043
+ /**
1044
+ * Funds an account with an initial amount of set token(s)
1045
+ * on Tempo's testnet.
1046
+ *
1047
+ * @example
1048
+ * ```ts
1049
+ * import { createClient, http } from 'viem'
1050
+ * import { tempo } from 'tempo.ts/chains'
1051
+ * import { tempoActions } from 'tempo.ts/viem'
1052
+ *
1053
+ * const client = createClient({
1054
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1055
+ * transport: http(),
1056
+ * }).extend(tempoActions())
1057
+ *
1058
+ * const hashes = await client.faucet.fund({
1059
+ * account: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',
1060
+ * })
1061
+ * ```
1062
+ *
1063
+ * @param parameters - Parameters.
1064
+ * @returns The transaction hashes.
1065
+ */
1066
+ fund: (
1067
+ parameters: faucetActions.fund.Parameters,
1068
+ ) => Promise<faucetActions.fund.ReturnValue>
1069
+ }
900
1070
  fee: {
901
1071
  /**
902
1072
  * Gets the user's default fee token.
903
1073
  *
904
1074
  * @example
905
1075
  * ```ts
906
- * import { createTempoClient } from 'tempo.ts/viem'
1076
+ * import { createClient, http } from 'viem'
907
1077
  * import { privateKeyToAccount } from 'viem/accounts'
1078
+ * import { tempo } from 'tempo.ts/chains'
1079
+ * import { tempoActions } from 'tempo.ts/viem'
908
1080
  *
909
- * const client = createTempoClient({
910
- * account: privateKeyToAccount('0x...')
911
- * })
1081
+ * const client = createClient({
1082
+ * account: privateKeyToAccount('0x...'),
1083
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1084
+ * transport: http(),
1085
+ * }).extend(tempoActions())
912
1086
  *
913
1087
  * const { address, id } = await client.token.getUserToken()
914
1088
  * ```
@@ -927,12 +1101,16 @@ export type Decorator<
927
1101
  *
928
1102
  * @example
929
1103
  * ```ts
930
- * import { createTempoClient } from 'tempo.ts/viem'
1104
+ * import { createClient, http } from 'viem'
931
1105
  * import { privateKeyToAccount } from 'viem/accounts'
1106
+ * import { tempo } from 'tempo.ts/chains'
1107
+ * import { tempoActions } from 'tempo.ts/viem'
932
1108
  *
933
- * const client = createTempoClient({
934
- * account: privateKeyToAccount('0x...')
935
- * })
1109
+ * const client = createClient({
1110
+ * account: privateKeyToAccount('0x...'),
1111
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1112
+ * transport: http(),
1113
+ * }).extend(tempoActions())
936
1114
  *
937
1115
  * const hash = await client.token.setUserToken({
938
1116
  * token: '0x...',
@@ -951,12 +1129,16 @@ export type Decorator<
951
1129
  *
952
1130
  * @example
953
1131
  * ```ts
954
- * import { createTempoClient } from 'tempo.ts/viem'
1132
+ * import { createClient, http } from 'viem'
955
1133
  * import { privateKeyToAccount } from 'viem/accounts'
1134
+ * import { tempo } from 'tempo.ts/chains'
1135
+ * import { tempoActions } from 'tempo.ts/viem'
956
1136
  *
957
- * const client = createTempoClient({
958
- * account: privateKeyToAccount('0x...')
959
- * })
1137
+ * const client = createClient({
1138
+ * account: privateKeyToAccount('0x...'),
1139
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1140
+ * transport: http(),
1141
+ * }).extend(tempoActions())
960
1142
  *
961
1143
  * const result = await client.fee.setUserTokenSync({
962
1144
  * token: '0x...',
@@ -974,9 +1156,14 @@ export type Decorator<
974
1156
  *
975
1157
  * @example
976
1158
  * ```ts
977
- * import { createTempoClient } from 'tempo.ts/viem'
1159
+ * import { createClient, http } from 'viem'
1160
+ * import { tempo } from 'tempo.ts/chains'
1161
+ * import { tempoActions } from 'tempo.ts/viem'
978
1162
  *
979
- * const client = createTempoClient()
1163
+ * const client = createClient({
1164
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1165
+ * transport: http(),
1166
+ * }).extend(tempoActions())
980
1167
  *
981
1168
  * const unwatch = client.token.watchSetUserToken({
982
1169
  * onUserTokenSet: (args, log) => {
@@ -999,12 +1186,16 @@ export type Decorator<
999
1186
  *
1000
1187
  * @example
1001
1188
  * ```ts
1002
- * import { createTempoClient } from 'tempo.ts/viem'
1189
+ * import { createClient, http } from 'viem'
1003
1190
  * import { privateKeyToAccount } from 'viem/accounts'
1191
+ * import { tempo } from 'tempo.ts/chains'
1192
+ * import { tempoActions } from 'tempo.ts/viem'
1004
1193
  *
1005
- * const client = createTempoClient({
1006
- * account: privateKeyToAccount('0x...')
1007
- * })
1194
+ * const client = createClient({
1195
+ * account: privateKeyToAccount('0x...'),
1196
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1197
+ * transport: http(),
1198
+ * }).extend(tempoActions())
1008
1199
  *
1009
1200
  * const hash = await client.policy.create({
1010
1201
  * admin: '0x...',
@@ -1023,12 +1214,16 @@ export type Decorator<
1023
1214
  *
1024
1215
  * @example
1025
1216
  * ```ts
1026
- * import { createTempoClient } from 'tempo.ts/viem'
1217
+ * import { createClient, http } from 'viem'
1027
1218
  * import { privateKeyToAccount } from 'viem/accounts'
1219
+ * import { tempo } from 'tempo.ts/chains'
1220
+ * import { tempoActions } from 'tempo.ts/viem'
1028
1221
  *
1029
- * const client = createTempoClient({
1030
- * account: privateKeyToAccount('0x...')
1031
- * })
1222
+ * const client = createClient({
1223
+ * account: privateKeyToAccount('0x...'),
1224
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1225
+ * transport: http(),
1226
+ * }).extend(tempoActions())
1032
1227
  *
1033
1228
  * const result = await client.policy.createSync({
1034
1229
  * admin: '0x...',
@@ -1047,12 +1242,16 @@ export type Decorator<
1047
1242
  *
1048
1243
  * @example
1049
1244
  * ```ts
1050
- * import { createTempoClient } from 'tempo.ts/viem'
1245
+ * import { createClient, http } from 'viem'
1051
1246
  * import { privateKeyToAccount } from 'viem/accounts'
1247
+ * import { tempo } from 'tempo.ts/chains'
1248
+ * import { tempoActions } from 'tempo.ts/viem'
1052
1249
  *
1053
- * const client = createTempoClient({
1054
- * account: privateKeyToAccount('0x...')
1055
- * })
1250
+ * const client = createClient({
1251
+ * account: privateKeyToAccount('0x...'),
1252
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1253
+ * transport: http(),
1254
+ * }).extend(tempoActions())
1056
1255
  *
1057
1256
  * const hash = await client.policy.setAdmin({
1058
1257
  * policyId: 2n,
@@ -1071,12 +1270,16 @@ export type Decorator<
1071
1270
  *
1072
1271
  * @example
1073
1272
  * ```ts
1074
- * import { createTempoClient } from 'tempo.ts/viem'
1273
+ * import { createClient, http } from 'viem'
1075
1274
  * import { privateKeyToAccount } from 'viem/accounts'
1275
+ * import { tempo } from 'tempo.ts/chains'
1276
+ * import { tempoActions } from 'tempo.ts/viem'
1076
1277
  *
1077
- * const client = createTempoClient({
1078
- * account: privateKeyToAccount('0x...')
1079
- * })
1278
+ * const client = createClient({
1279
+ * account: privateKeyToAccount('0x...'),
1280
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1281
+ * transport: http(),
1282
+ * }).extend(tempoActions())
1080
1283
  *
1081
1284
  * const result = await client.policy.setAdminSync({
1082
1285
  * policyId: 2n,
@@ -1095,12 +1298,16 @@ export type Decorator<
1095
1298
  *
1096
1299
  * @example
1097
1300
  * ```ts
1098
- * import { createTempoClient } from 'tempo.ts/viem'
1301
+ * import { createClient, http } from 'viem'
1099
1302
  * import { privateKeyToAccount } from 'viem/accounts'
1303
+ * import { tempo } from 'tempo.ts/chains'
1304
+ * import { tempoActions } from 'tempo.ts/viem'
1100
1305
  *
1101
- * const client = createTempoClient({
1102
- * account: privateKeyToAccount('0x...')
1103
- * })
1306
+ * const client = createClient({
1307
+ * account: privateKeyToAccount('0x...'),
1308
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1309
+ * transport: http(),
1310
+ * }).extend(tempoActions())
1104
1311
  *
1105
1312
  * const hash = await client.policy.modifyWhitelist({
1106
1313
  * policyId: 2n,
@@ -1120,12 +1327,16 @@ export type Decorator<
1120
1327
  *
1121
1328
  * @example
1122
1329
  * ```ts
1123
- * import { createTempoClient } from 'tempo.ts/viem'
1330
+ * import { createClient, http } from 'viem'
1124
1331
  * import { privateKeyToAccount } from 'viem/accounts'
1332
+ * import { tempo } from 'tempo.ts/chains'
1333
+ * import { tempoActions } from 'tempo.ts/viem'
1125
1334
  *
1126
- * const client = createTempoClient({
1127
- * account: privateKeyToAccount('0x...')
1128
- * })
1335
+ * const client = createClient({
1336
+ * account: privateKeyToAccount('0x...'),
1337
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1338
+ * transport: http(),
1339
+ * }).extend(tempoActions())
1129
1340
  *
1130
1341
  * const result = await client.policy.modifyWhitelistSync({
1131
1342
  * policyId: 2n,
@@ -1145,12 +1356,16 @@ export type Decorator<
1145
1356
  *
1146
1357
  * @example
1147
1358
  * ```ts
1148
- * import { createTempoClient } from 'tempo.ts/viem'
1359
+ * import { createClient, http } from 'viem'
1149
1360
  * import { privateKeyToAccount } from 'viem/accounts'
1361
+ * import { tempo } from 'tempo.ts/chains'
1362
+ * import { tempoActions } from 'tempo.ts/viem'
1150
1363
  *
1151
- * const client = createTempoClient({
1152
- * account: privateKeyToAccount('0x...')
1153
- * })
1364
+ * const client = createClient({
1365
+ * account: privateKeyToAccount('0x...'),
1366
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1367
+ * transport: http(),
1368
+ * }).extend(tempoActions())
1154
1369
  *
1155
1370
  * const hash = await client.policy.modifyBlacklist({
1156
1371
  * policyId: 2n,
@@ -1170,12 +1385,16 @@ export type Decorator<
1170
1385
  *
1171
1386
  * @example
1172
1387
  * ```ts
1173
- * import { createTempoClient } from 'tempo.ts/viem'
1388
+ * import { createClient, http } from 'viem'
1174
1389
  * import { privateKeyToAccount } from 'viem/accounts'
1390
+ * import { tempo } from 'tempo.ts/chains'
1391
+ * import { tempoActions } from 'tempo.ts/viem'
1175
1392
  *
1176
- * const client = createTempoClient({
1177
- * account: privateKeyToAccount('0x...')
1178
- * })
1393
+ * const client = createClient({
1394
+ * account: privateKeyToAccount('0x...'),
1395
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1396
+ * transport: http(),
1397
+ * }).extend(tempoActions())
1179
1398
  *
1180
1399
  * const result = await client.policy.modifyBlacklistSync({
1181
1400
  * policyId: 2n,
@@ -1195,9 +1414,14 @@ export type Decorator<
1195
1414
  *
1196
1415
  * @example
1197
1416
  * ```ts
1198
- * import { createTempoClient } from 'tempo.ts/viem'
1417
+ * import { createClient, http } from 'viem'
1418
+ * import { tempo } from 'tempo.ts/chains'
1419
+ * import { tempoActions } from 'tempo.ts/viem'
1199
1420
  *
1200
- * const client = createTempoClient()
1421
+ * const client = createClient({
1422
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1423
+ * transport: http(),
1424
+ * }).extend(tempoActions())
1201
1425
  *
1202
1426
  * const data = await client.policy.getData({
1203
1427
  * policyId: 2n,
@@ -1215,9 +1439,14 @@ export type Decorator<
1215
1439
  *
1216
1440
  * @example
1217
1441
  * ```ts
1218
- * import { createTempoClient } from 'tempo.ts/viem'
1442
+ * import { createClient, http } from 'viem'
1443
+ * import { tempo } from 'tempo.ts/chains'
1444
+ * import { tempoActions } from 'tempo.ts/viem'
1219
1445
  *
1220
- * const client = createTempoClient()
1446
+ * const client = createClient({
1447
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1448
+ * transport: http(),
1449
+ * }).extend(tempoActions())
1221
1450
  *
1222
1451
  * const authorized = await client.policy.isAuthorized({
1223
1452
  * policyId: 2n,
@@ -1236,9 +1465,14 @@ export type Decorator<
1236
1465
  *
1237
1466
  * @example
1238
1467
  * ```ts
1239
- * import { createTempoClient } from 'tempo.ts/viem'
1468
+ * import { createClient, http } from 'viem'
1469
+ * import { tempo } from 'tempo.ts/chains'
1470
+ * import { tempoActions } from 'tempo.ts/viem'
1240
1471
  *
1241
- * const client = createTempoClient()
1472
+ * const client = createClient({
1473
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1474
+ * transport: http(),
1475
+ * }).extend(tempoActions())
1242
1476
  *
1243
1477
  * const unwatch = client.policy.watchCreate({
1244
1478
  * onPolicyCreated: (args, log) => {
@@ -1258,9 +1492,14 @@ export type Decorator<
1258
1492
  *
1259
1493
  * @example
1260
1494
  * ```ts
1261
- * import { createTempoClient } from 'tempo.ts/viem'
1495
+ * import { createClient, http } from 'viem'
1496
+ * import { tempo } from 'tempo.ts/chains'
1497
+ * import { tempoActions } from 'tempo.ts/viem'
1262
1498
  *
1263
- * const client = createTempoClient()
1499
+ * const client = createClient({
1500
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1501
+ * transport: http(),
1502
+ * }).extend(tempoActions())
1264
1503
  *
1265
1504
  * const unwatch = client.policy.watchAdminUpdated({
1266
1505
  * onAdminUpdated: (args, log) => {
@@ -1280,9 +1519,14 @@ export type Decorator<
1280
1519
  *
1281
1520
  * @example
1282
1521
  * ```ts
1283
- * import { createTempoClient } from 'tempo.ts/viem'
1522
+ * import { createClient, http } from 'viem'
1523
+ * import { tempo } from 'tempo.ts/chains'
1524
+ * import { tempoActions } from 'tempo.ts/viem'
1284
1525
  *
1285
- * const client = createTempoClient()
1526
+ * const client = createClient({
1527
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1528
+ * transport: http(),
1529
+ * }).extend(tempoActions())
1286
1530
  *
1287
1531
  * const unwatch = client.policy.watchWhitelistUpdated({
1288
1532
  * onWhitelistUpdated: (args, log) => {
@@ -1302,9 +1546,14 @@ export type Decorator<
1302
1546
  *
1303
1547
  * @example
1304
1548
  * ```ts
1305
- * import { createTempoClient } from 'tempo.ts/viem'
1549
+ * import { createClient, http } from 'viem'
1550
+ * import { tempo } from 'tempo.ts/chains'
1551
+ * import { tempoActions } from 'tempo.ts/viem'
1306
1552
  *
1307
- * const client = createTempoClient()
1553
+ * const client = createClient({
1554
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1555
+ * transport: http(),
1556
+ * }).extend(tempoActions())
1308
1557
  *
1309
1558
  * const unwatch = client.policy.watchBlacklistUpdated({
1310
1559
  * onBlacklistUpdated: (args, log) => {
@@ -1320,68 +1569,303 @@ export type Decorator<
1320
1569
  parameters: policyActions.watchBlacklistUpdated.Parameters,
1321
1570
  ) => () => void
1322
1571
  }
1323
- token: {
1572
+ reward: {
1324
1573
  /**
1325
- * Approves a spender to transfer TIP20 tokens on behalf of the caller.
1574
+ * Cancels an active reward stream and refunds remaining tokens.
1326
1575
  *
1327
1576
  * @example
1328
1577
  * ```ts
1329
- * import { createTempoClient } from 'tempo.ts/viem'
1578
+ * import { createClient, http } from 'viem'
1330
1579
  * import { privateKeyToAccount } from 'viem/accounts'
1580
+ * import { tempo } from 'tempo.ts/chains'
1581
+ * import { tempoActions } from 'tempo.ts/viem'
1331
1582
  *
1332
- * const client = createTempoClient({
1333
- * account: privateKeyToAccount('0x...')
1334
- * })
1583
+ * const client = createClient({
1584
+ * account: privateKeyToAccount('0x...'),
1585
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1586
+ * transport: http(),
1587
+ * }).extend(tempoActions())
1335
1588
  *
1336
- * const hash = await client.token.approve({
1337
- * spender: '0x...',
1338
- * amount: 100n,
1589
+ * const hash = await client.reward.cancel({
1590
+ * id: 1n,
1591
+ * token: '0x20c0000000000000000000000000000000000001',
1339
1592
  * })
1340
1593
  * ```
1341
1594
  *
1342
- * @param client - Client.
1343
1595
  * @param parameters - Parameters.
1344
1596
  * @returns The transaction hash.
1345
1597
  */
1346
- approve: (
1347
- parameters: tokenActions.approve.Parameters<chain, account>,
1348
- ) => Promise<tokenActions.approve.ReturnValue>
1598
+ cancel: (
1599
+ parameters: rewardActions.cancel.Parameters<chain, account>,
1600
+ ) => Promise<rewardActions.cancel.ReturnValue>
1349
1601
  /**
1350
- * Approves a spender to transfer TIP20 tokens on behalf of the caller.
1602
+ * Cancels an active reward stream and waits for confirmation.
1351
1603
  *
1352
1604
  * @example
1353
1605
  * ```ts
1354
- * import { createTempoClient } from 'tempo.ts/viem'
1606
+ * import { createClient, http } from 'viem'
1355
1607
  * import { privateKeyToAccount } from 'viem/accounts'
1608
+ * import { tempo } from 'tempo.ts/chains'
1609
+ * import { tempoActions } from 'tempo.ts/viem'
1356
1610
  *
1357
- * const client = createTempoClient({
1358
- * account: privateKeyToAccount('0x...')
1359
- * })
1611
+ * const client = createClient({
1612
+ * account: privateKeyToAccount('0x...'),
1613
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1614
+ * transport: http(),
1615
+ * }).extend(tempoActions())
1360
1616
  *
1361
- * const result = await client.token.approveSync({
1362
- * spender: '0x...',
1363
- * amount: 100n,
1617
+ * const result = await client.reward.cancelSync({
1618
+ * id: 1n,
1619
+ * token: '0x20c0000000000000000000000000000000000001',
1364
1620
  * })
1365
1621
  * ```
1366
1622
  *
1367
- * @param client - Client.
1368
1623
  * @param parameters - Parameters.
1369
1624
  * @returns The transaction receipt and event data.
1370
1625
  */
1371
- approveSync: (
1372
- parameters: tokenActions.approveSync.Parameters<chain, account>,
1373
- ) => Promise<tokenActions.approveSync.ReturnValue>
1626
+ cancelSync: (
1627
+ parameters: rewardActions.cancelSync.Parameters<chain, account>,
1628
+ ) => Promise<rewardActions.cancelSync.ReturnValue>
1374
1629
  /**
1375
- * Burns TIP20 tokens from a blocked address.
1630
+ * Gets a reward stream by its ID.
1376
1631
  *
1377
1632
  * @example
1378
1633
  * ```ts
1379
- * import { createTempoClient } from 'tempo.ts/viem'
1380
- * import { privateKeyToAccount } from 'viem/accounts'
1634
+ * import { createClient, http } from 'viem'
1635
+ * import { tempo } from 'tempo.ts/chains'
1636
+ * import { tempoActions } from 'tempo.ts/viem'
1381
1637
  *
1382
- * const client = createTempoClient({
1383
- * account: privateKeyToAccount('0x...')
1384
- * })
1638
+ * const client = createClient({
1639
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1640
+ * transport: http(),
1641
+ * }).extend(tempoActions())
1642
+ *
1643
+ * const stream = await client.reward.getStream({
1644
+ * id: 1n,
1645
+ * token: '0x20c0000000000000000000000000000000000001',
1646
+ * })
1647
+ * ```
1648
+ *
1649
+ * @param parameters - Parameters.
1650
+ * @returns The reward stream details.
1651
+ */
1652
+ getStream: (
1653
+ parameters: rewardActions.getStream.Parameters,
1654
+ ) => Promise<rewardActions.getStream.ReturnValue>
1655
+ /**
1656
+ * Gets the total reward per second rate for all active streams.
1657
+ *
1658
+ * @example
1659
+ * ```ts
1660
+ * import { createClient, http } from 'viem'
1661
+ * import { tempo } from 'tempo.ts/chains'
1662
+ * import { tempoActions } from 'tempo.ts/viem'
1663
+ *
1664
+ * const client = createClient({
1665
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1666
+ * transport: http(),
1667
+ * }).extend(tempoActions())
1668
+ *
1669
+ * const rate = await client.reward.getTotalPerSecond({
1670
+ * token: '0x20c0000000000000000000000000000000000001',
1671
+ * })
1672
+ * ```
1673
+ *
1674
+ * @param parameters - Parameters.
1675
+ * @returns The total reward per second (scaled by 1e18).
1676
+ */
1677
+ getTotalPerSecond: (
1678
+ parameters: rewardActions.getTotalPerSecond.Parameters,
1679
+ ) => Promise<rewardActions.getTotalPerSecond.ReturnValue>
1680
+ /**
1681
+ * Sets or changes the reward recipient for a token holder.
1682
+ *
1683
+ * @example
1684
+ * ```ts
1685
+ * import { createClient, http } from 'viem'
1686
+ * import { privateKeyToAccount } from 'viem/accounts'
1687
+ * import { tempo } from 'tempo.ts/chains'
1688
+ * import { tempoActions } from 'tempo.ts/viem'
1689
+ *
1690
+ * const client = createClient({
1691
+ * account: privateKeyToAccount('0x...'),
1692
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1693
+ * transport: http(),
1694
+ * }).extend(tempoActions())
1695
+ *
1696
+ * const hash = await client.reward.setRecipient({
1697
+ * recipient: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
1698
+ * token: '0x20c0000000000000000000000000000000000001',
1699
+ * })
1700
+ * ```
1701
+ *
1702
+ * @param parameters - Parameters.
1703
+ * @returns The transaction hash.
1704
+ */
1705
+ setRecipient: (
1706
+ parameters: rewardActions.setRecipient.Parameters<chain, account>,
1707
+ ) => Promise<rewardActions.setRecipient.ReturnValue>
1708
+ /**
1709
+ * Sets or changes the reward recipient for a token holder and waits for confirmation.
1710
+ *
1711
+ * @example
1712
+ * ```ts
1713
+ * import { createClient, http } from 'viem'
1714
+ * import { privateKeyToAccount } from 'viem/accounts'
1715
+ * import { tempo } from 'tempo.ts/chains'
1716
+ * import { tempoActions } from 'tempo.ts/viem'
1717
+ *
1718
+ * const client = createClient({
1719
+ * account: privateKeyToAccount('0x...'),
1720
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1721
+ * transport: http(),
1722
+ * }).extend(tempoActions())
1723
+ *
1724
+ * const result = await client.reward.setRecipientSync({
1725
+ * recipient: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
1726
+ * token: '0x20c0000000000000000000000000000000000001',
1727
+ * })
1728
+ * ```
1729
+ *
1730
+ * @param parameters - Parameters.
1731
+ * @returns The transaction receipt and event data.
1732
+ */
1733
+ setRecipientSync: (
1734
+ parameters: rewardActions.setRecipientSync.Parameters<chain, account>,
1735
+ ) => Promise<rewardActions.setRecipientSync.ReturnValue>
1736
+ /**
1737
+ * Starts a new reward stream that distributes tokens to opted-in holders.
1738
+ *
1739
+ * @example
1740
+ * ```ts
1741
+ * import { createClient, http } from 'viem'
1742
+ * import { privateKeyToAccount } from 'viem/accounts'
1743
+ * import { tempo } from 'tempo.ts/chains'
1744
+ * import { tempoActions } from 'tempo.ts/viem'
1745
+ *
1746
+ * const client = createClient({
1747
+ * account: privateKeyToAccount('0x...'),
1748
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1749
+ * transport: http(),
1750
+ * }).extend(tempoActions())
1751
+ *
1752
+ * const hash = await client.reward.start({
1753
+ * amount: 100000000000000000000n,
1754
+ * seconds: 86400,
1755
+ * token: '0x20c0000000000000000000000000000000000001',
1756
+ * })
1757
+ * ```
1758
+ *
1759
+ * @param parameters - Parameters.
1760
+ * @returns The transaction hash.
1761
+ */
1762
+ start: (
1763
+ parameters: rewardActions.start.Parameters<chain, account>,
1764
+ ) => Promise<rewardActions.start.ReturnValue>
1765
+ /**
1766
+ * Starts a new reward stream that distributes tokens to opted-in holders and waits for confirmation.
1767
+ *
1768
+ * @example
1769
+ * ```ts
1770
+ * import { createClient, http } from 'viem'
1771
+ * import { privateKeyToAccount } from 'viem/accounts'
1772
+ * import { tempo } from 'tempo.ts/chains'
1773
+ * import { tempoActions } from 'tempo.ts/viem'
1774
+ *
1775
+ * const client = createClient({
1776
+ * account: privateKeyToAccount('0x...'),
1777
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1778
+ * transport: http(),
1779
+ * }).extend(tempoActions())
1780
+ *
1781
+ * const result = await client.reward.startSync({
1782
+ * amount: 100000000000000000000n,
1783
+ * seconds: 86400,
1784
+ * token: '0x20c0000000000000000000000000000000000001',
1785
+ * })
1786
+ * ```
1787
+ *
1788
+ * @param parameters - Parameters.
1789
+ * @returns The transaction receipt and event data.
1790
+ */
1791
+ startSync: (
1792
+ parameters: rewardActions.startSync.Parameters<chain, account>,
1793
+ ) => Promise<rewardActions.startSync.ReturnValue>
1794
+ }
1795
+ token: {
1796
+ /**
1797
+ * Approves a spender to transfer TIP20 tokens on behalf of the caller.
1798
+ *
1799
+ * @example
1800
+ * ```ts
1801
+ * import { createClient, http } from 'viem'
1802
+ * import { privateKeyToAccount } from 'viem/accounts'
1803
+ * import { tempo } from 'tempo.ts/chains'
1804
+ * import { tempoActions } from 'tempo.ts/viem'
1805
+ *
1806
+ * const client = createClient({
1807
+ * account: privateKeyToAccount('0x...'),
1808
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1809
+ * transport: http(),
1810
+ * }).extend(tempoActions())
1811
+ *
1812
+ * const hash = await client.token.approve({
1813
+ * spender: '0x...',
1814
+ * amount: 100n,
1815
+ * })
1816
+ * ```
1817
+ *
1818
+ * @param client - Client.
1819
+ * @param parameters - Parameters.
1820
+ * @returns The transaction hash.
1821
+ */
1822
+ approve: (
1823
+ parameters: tokenActions.approve.Parameters<chain, account>,
1824
+ ) => Promise<tokenActions.approve.ReturnValue>
1825
+ /**
1826
+ * Approves a spender to transfer TIP20 tokens on behalf of the caller.
1827
+ *
1828
+ * @example
1829
+ * ```ts
1830
+ * import { createClient, http } from 'viem'
1831
+ * import { privateKeyToAccount } from 'viem/accounts'
1832
+ * import { tempo } from 'tempo.ts/chains'
1833
+ * import { tempoActions } from 'tempo.ts/viem'
1834
+ *
1835
+ * const client = createClient({
1836
+ * account: privateKeyToAccount('0x...'),
1837
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1838
+ * transport: http(),
1839
+ * }).extend(tempoActions())
1840
+ *
1841
+ * const result = await client.token.approveSync({
1842
+ * spender: '0x...',
1843
+ * amount: 100n,
1844
+ * })
1845
+ * ```
1846
+ *
1847
+ * @param client - Client.
1848
+ * @param parameters - Parameters.
1849
+ * @returns The transaction receipt and event data.
1850
+ */
1851
+ approveSync: (
1852
+ parameters: tokenActions.approveSync.Parameters<chain, account>,
1853
+ ) => Promise<tokenActions.approveSync.ReturnValue>
1854
+ /**
1855
+ * Burns TIP20 tokens from a blocked address.
1856
+ *
1857
+ * @example
1858
+ * ```ts
1859
+ * import { createClient, http } from 'viem'
1860
+ * import { privateKeyToAccount } from 'viem/accounts'
1861
+ * import { tempo } from 'tempo.ts/chains'
1862
+ * import { tempoActions } from 'tempo.ts/viem'
1863
+ *
1864
+ * const client = createClient({
1865
+ * account: privateKeyToAccount('0x...'),
1866
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1867
+ * transport: http(),
1868
+ * }).extend(tempoActions())
1385
1869
  *
1386
1870
  * const hash = await client.token.burnBlocked({
1387
1871
  * from: '0x...',
@@ -1402,12 +1886,16 @@ export type Decorator<
1402
1886
  *
1403
1887
  * @example
1404
1888
  * ```ts
1405
- * import { createTempoClient } from 'tempo.ts/viem'
1889
+ * import { createClient, http } from 'viem'
1406
1890
  * import { privateKeyToAccount } from 'viem/accounts'
1891
+ * import { tempo } from 'tempo.ts/chains'
1892
+ * import { tempoActions } from 'tempo.ts/viem'
1407
1893
  *
1408
- * const client = createTempoClient({
1409
- * account: privateKeyToAccount('0x...')
1410
- * })
1894
+ * const client = createClient({
1895
+ * account: privateKeyToAccount('0x...'),
1896
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1897
+ * transport: http(),
1898
+ * }).extend(tempoActions())
1411
1899
  *
1412
1900
  * const result = await client.token.burnBlockedSync({
1413
1901
  * from: '0x...',
@@ -1428,12 +1916,16 @@ export type Decorator<
1428
1916
  *
1429
1917
  * @example
1430
1918
  * ```ts
1431
- * import { createTempoClient } from 'tempo.ts/viem'
1919
+ * import { createClient, http } from 'viem'
1432
1920
  * import { privateKeyToAccount } from 'viem/accounts'
1921
+ * import { tempo } from 'tempo.ts/chains'
1922
+ * import { tempoActions } from 'tempo.ts/viem'
1433
1923
  *
1434
- * const client = createTempoClient({
1435
- * account: privateKeyToAccount('0x...')
1436
- * })
1924
+ * const client = createClient({
1925
+ * account: privateKeyToAccount('0x...'),
1926
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1927
+ * transport: http(),
1928
+ * }).extend(tempoActions())
1437
1929
  *
1438
1930
  * const hash = await client.token.burn({
1439
1931
  * amount: 100n,
@@ -1453,12 +1945,16 @@ export type Decorator<
1453
1945
  *
1454
1946
  * @example
1455
1947
  * ```ts
1456
- * import { createTempoClient } from 'tempo.ts/viem'
1948
+ * import { createClient, http } from 'viem'
1457
1949
  * import { privateKeyToAccount } from 'viem/accounts'
1950
+ * import { tempo } from 'tempo.ts/chains'
1951
+ * import { tempoActions } from 'tempo.ts/viem'
1458
1952
  *
1459
- * const client = createTempoClient({
1460
- * account: privateKeyToAccount('0x...')
1461
- * })
1953
+ * const client = createClient({
1954
+ * account: privateKeyToAccount('0x...'),
1955
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1956
+ * transport: http(),
1957
+ * }).extend(tempoActions())
1462
1958
  *
1463
1959
  * const result = await client.token.burnSync({
1464
1960
  * amount: 100n,
@@ -1478,12 +1974,16 @@ export type Decorator<
1478
1974
  *
1479
1975
  * @example
1480
1976
  * ```ts
1481
- * import { createTempoClient } from 'tempo.ts/viem'
1977
+ * import { createClient, http } from 'viem'
1482
1978
  * import { privateKeyToAccount } from 'viem/accounts'
1979
+ * import { tempo } from 'tempo.ts/chains'
1980
+ * import { tempoActions } from 'tempo.ts/viem'
1483
1981
  *
1484
- * const client = createTempoClient({
1485
- * account: privateKeyToAccount('0x...')
1486
- * })
1982
+ * const client = createClient({
1983
+ * account: privateKeyToAccount('0x...'),
1984
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1985
+ * transport: http(),
1986
+ * }).extend(tempoActions())
1487
1987
  *
1488
1988
  * const hash = await client.token.changeTransferPolicy({
1489
1989
  * token: '0x...',
@@ -1503,12 +2003,16 @@ export type Decorator<
1503
2003
  *
1504
2004
  * @example
1505
2005
  * ```ts
1506
- * import { createTempoClient } from 'tempo.ts/viem'
2006
+ * import { createClient, http } from 'viem'
1507
2007
  * import { privateKeyToAccount } from 'viem/accounts'
2008
+ * import { tempo } from 'tempo.ts/chains'
2009
+ * import { tempoActions } from 'tempo.ts/viem'
1508
2010
  *
1509
- * const client = createTempoClient({
1510
- * account: privateKeyToAccount('0x...')
1511
- * })
2011
+ * const client = createClient({
2012
+ * account: privateKeyToAccount('0x...'),
2013
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2014
+ * transport: http(),
2015
+ * }).extend(tempoActions())
1512
2016
  *
1513
2017
  * const result = await client.token.changeTransferPolicySync({
1514
2018
  * token: '0x...',
@@ -1531,12 +2035,16 @@ export type Decorator<
1531
2035
  *
1532
2036
  * @example
1533
2037
  * ```ts
1534
- * import { createTempoClient } from 'tempo.ts/viem'
2038
+ * import { createClient, http } from 'viem'
1535
2039
  * import { privateKeyToAccount } from 'viem/accounts'
2040
+ * import { tempo } from 'tempo.ts/chains'
2041
+ * import { tempoActions } from 'tempo.ts/viem'
1536
2042
  *
1537
- * const client = createTempoClient({
1538
- * account: privateKeyToAccount('0x...')
1539
- * })
2043
+ * const client = createClient({
2044
+ * account: privateKeyToAccount('0x...'),
2045
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2046
+ * transport: http(),
2047
+ * }).extend(tempoActions())
1540
2048
  *
1541
2049
  * const { hash, id, address } = await client.token.create({
1542
2050
  * name: 'My Token',
@@ -1557,12 +2065,16 @@ export type Decorator<
1557
2065
  *
1558
2066
  * @example
1559
2067
  * ```ts
1560
- * import { createTempoClient } from 'tempo.ts/viem'
2068
+ * import { createClient, http } from 'viem'
1561
2069
  * import { privateKeyToAccount } from 'viem/accounts'
2070
+ * import { tempo } from 'tempo.ts/chains'
2071
+ * import { tempoActions } from 'tempo.ts/viem'
1562
2072
  *
1563
- * const client = createTempoClient({
1564
- * account: privateKeyToAccount('0x...')
1565
- * })
2073
+ * const client = createClient({
2074
+ * account: privateKeyToAccount('0x...'),
2075
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2076
+ * transport: http(),
2077
+ * }).extend(tempoActions())
1566
2078
  *
1567
2079
  * const result = await client.token.createSync({
1568
2080
  * name: 'My Token',
@@ -1583,12 +2095,16 @@ export type Decorator<
1583
2095
  *
1584
2096
  * @example
1585
2097
  * ```ts
1586
- * import { createTempoClient } from 'tempo.ts/viem'
2098
+ * import { createClient, http } from 'viem'
1587
2099
  * import { privateKeyToAccount } from 'viem/accounts'
2100
+ * import { tempo } from 'tempo.ts/chains'
2101
+ * import { tempoActions } from 'tempo.ts/viem'
1588
2102
  *
1589
- * const client = createTempoClient({
1590
- * account: privateKeyToAccount('0x...')
1591
- * })
2103
+ * const client = createClient({
2104
+ * account: privateKeyToAccount('0x...'),
2105
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2106
+ * transport: http(),
2107
+ * }).extend(tempoActions())
1592
2108
  *
1593
2109
  * const allowance = await client.token.getAllowance({
1594
2110
  * spender: '0x...',
@@ -1607,12 +2123,16 @@ export type Decorator<
1607
2123
  *
1608
2124
  * @example
1609
2125
  * ```ts
1610
- * import { createTempoClient } from 'tempo.ts/viem'
2126
+ * import { createClient, http } from 'viem'
1611
2127
  * import { privateKeyToAccount } from 'viem/accounts'
2128
+ * import { tempo } from 'tempo.ts/chains'
2129
+ * import { tempoActions } from 'tempo.ts/viem'
1612
2130
  *
1613
- * const client = createTempoClient({
1614
- * account: privateKeyToAccount('0x...')
1615
- * })
2131
+ * const client = createClient({
2132
+ * account: privateKeyToAccount('0x...'),
2133
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2134
+ * transport: http(),
2135
+ * }).extend(tempoActions())
1616
2136
  *
1617
2137
  * const balance = await client.token.getBalance()
1618
2138
  * ```
@@ -1622,18 +2142,21 @@ export type Decorator<
1622
2142
  * @returns The token balance.
1623
2143
  */
1624
2144
  getBalance: (
1625
- ...parameters: account extends Account
1626
- ? [tokenActions.getBalance.Parameters<account>] | []
1627
- : [tokenActions.getBalance.Parameters<account>]
2145
+ parameters: tokenActions.getBalance.Parameters<account>,
1628
2146
  ) => Promise<tokenActions.getBalance.ReturnValue>
1629
2147
  /**
1630
2148
  * Gets TIP20 token metadata including name, symbol, currency, decimals, and total supply.
1631
2149
  *
1632
2150
  * @example
1633
2151
  * ```ts
1634
- * import { createTempoClient } from 'tempo.ts/viem'
2152
+ * import { createClient, http } from 'viem'
2153
+ * import { tempo } from 'tempo.ts/chains'
2154
+ * import { tempoActions } from 'tempo.ts/viem'
1635
2155
  *
1636
- * const client = createTempoClient()
2156
+ * const client = createClient({
2157
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2158
+ * transport: http(),
2159
+ * }).extend(tempoActions())
1637
2160
  *
1638
2161
  * const metadata = await client.token.getMetadata({
1639
2162
  * token: '0x...',
@@ -1647,17 +2170,48 @@ export type Decorator<
1647
2170
  getMetadata: (
1648
2171
  parameters: tokenActions.getMetadata.Parameters,
1649
2172
  ) => Promise<tokenActions.getMetadata.ReturnValue>
2173
+ /**
2174
+ * Gets the admin role for a specific role in a TIP20 token.
2175
+ *
2176
+ * @example
2177
+ * ```ts
2178
+ * import { createClient, http } from 'viem'
2179
+ * import { tempo } from 'tempo.ts/chains'
2180
+ * import { tempoActions } from 'tempo.ts/viem'
2181
+ *
2182
+ * const client = createClient({
2183
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2184
+ * transport: http(),
2185
+ * }).extend(tempoActions())
2186
+ *
2187
+ * const adminRole = await client.token.getRoleAdmin({
2188
+ * role: 'minter',
2189
+ * token: '0x...',
2190
+ * })
2191
+ * ```
2192
+ *
2193
+ * @param client - Client.
2194
+ * @param parameters - Parameters.
2195
+ * @returns The admin role hash.
2196
+ */
2197
+ getRoleAdmin: (
2198
+ parameters: tokenActions.getRoleAdmin.Parameters,
2199
+ ) => Promise<tokenActions.getRoleAdmin.ReturnValue>
1650
2200
  /**
1651
2201
  * Checks if an account has a specific role for a TIP20 token.
1652
2202
  *
1653
2203
  * @example
1654
2204
  * ```ts
1655
- * import { createTempoClient } from 'tempo.ts/viem'
2205
+ * import { createClient, http } from 'viem'
1656
2206
  * import { privateKeyToAccount } from 'viem/accounts'
2207
+ * import { tempo } from 'tempo.ts/chains'
2208
+ * import { tempoActions } from 'tempo.ts/viem'
1657
2209
  *
1658
- * const client = createTempoClient({
1659
- * account: privateKeyToAccount('0x...')
1660
- * })
2210
+ * const client = createClient({
2211
+ * account: privateKeyToAccount('0x...'),
2212
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2213
+ * transport: http(),
2214
+ * }).extend(tempoActions())
1661
2215
  *
1662
2216
  * const hasRole = await client.token.hasRole({
1663
2217
  * token: '0x...',
@@ -1677,12 +2231,16 @@ export type Decorator<
1677
2231
  *
1678
2232
  * @example
1679
2233
  * ```ts
1680
- * import { createTempoClient } from 'tempo.ts/viem'
2234
+ * import { createClient, http } from 'viem'
1681
2235
  * import { privateKeyToAccount } from 'viem/accounts'
2236
+ * import { tempo } from 'tempo.ts/chains'
2237
+ * import { tempoActions } from 'tempo.ts/viem'
1682
2238
  *
1683
- * const client = createTempoClient({
1684
- * account: privateKeyToAccount('0x...')
1685
- * })
2239
+ * const client = createClient({
2240
+ * account: privateKeyToAccount('0x...'),
2241
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2242
+ * transport: http(),
2243
+ * }).extend(tempoActions())
1686
2244
  *
1687
2245
  * const hash = await client.token.grantRoles({
1688
2246
  * token: '0x...',
@@ -1703,16 +2261,16 @@ export type Decorator<
1703
2261
  *
1704
2262
  * @example
1705
2263
  * ```ts
1706
- * import { createTempoClient } from 'tempo.ts/viem'
1707
- * import { tempo } from 'tempo.ts/chains'
1708
- * import { http } from 'viem'
2264
+ * import { createClient, http } from 'viem'
1709
2265
  * import { privateKeyToAccount } from 'viem/accounts'
2266
+ * import { tempo } from 'tempo.ts/chains'
2267
+ * import { tempoActions } from 'tempo.ts/viem'
1710
2268
  *
1711
- * const client = createTempoClient({
2269
+ * const client = createClient({
1712
2270
  * account: privateKeyToAccount('0x...'),
1713
- * chain: tempo,
2271
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1714
2272
  * transport: http(),
1715
- * })
2273
+ * }).extend(tempoActions())
1716
2274
  *
1717
2275
  * const result = await client.token.grantRolesSync({
1718
2276
  * token: '0x...',
@@ -1732,12 +2290,16 @@ export type Decorator<
1732
2290
  *
1733
2291
  * @example
1734
2292
  * ```ts
1735
- * import { createTempoClient } from 'tempo.ts/viem'
2293
+ * import { createClient, http } from 'viem'
1736
2294
  * import { privateKeyToAccount } from 'viem/accounts'
2295
+ * import { tempo } from 'tempo.ts/chains'
2296
+ * import { tempoActions } from 'tempo.ts/viem'
1737
2297
  *
1738
- * const client = createTempoClient({
1739
- * account: privateKeyToAccount('0x...')
1740
- * })
2298
+ * const client = createClient({
2299
+ * account: privateKeyToAccount('0x...'),
2300
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2301
+ * transport: http(),
2302
+ * }).extend(tempoActions())
1741
2303
  *
1742
2304
  * const hash = await client.token.mint({
1743
2305
  * to: '0x...',
@@ -1758,12 +2320,16 @@ export type Decorator<
1758
2320
  *
1759
2321
  * @example
1760
2322
  * ```ts
1761
- * import { createTempoClient } from 'tempo.ts/viem'
2323
+ * import { createClient, http } from 'viem'
1762
2324
  * import { privateKeyToAccount } from 'viem/accounts'
2325
+ * import { tempo } from 'tempo.ts/chains'
2326
+ * import { tempoActions } from 'tempo.ts/viem'
1763
2327
  *
1764
- * const client = createTempoClient({
1765
- * account: privateKeyToAccount('0x...')
1766
- * })
2328
+ * const client = createClient({
2329
+ * account: privateKeyToAccount('0x...'),
2330
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2331
+ * transport: http(),
2332
+ * }).extend(tempoActions())
1767
2333
  *
1768
2334
  * const result = await client.token.mintSync({
1769
2335
  * to: '0x...',
@@ -1784,12 +2350,16 @@ export type Decorator<
1784
2350
  *
1785
2351
  * @example
1786
2352
  * ```ts
1787
- * import { createTempoClient } from 'tempo.ts/viem'
2353
+ * import { createClient, http } from 'viem'
1788
2354
  * import { privateKeyToAccount } from 'viem/accounts'
2355
+ * import { tempo } from 'tempo.ts/chains'
2356
+ * import { tempoActions } from 'tempo.ts/viem'
1789
2357
  *
1790
- * const client = createTempoClient({
1791
- * account: privateKeyToAccount('0x...')
1792
- * })
2358
+ * const client = createClient({
2359
+ * account: privateKeyToAccount('0x...'),
2360
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2361
+ * transport: http(),
2362
+ * }).extend(tempoActions())
1793
2363
  *
1794
2364
  * const hash = await client.token.pause({
1795
2365
  * token: '0x...',
@@ -1808,12 +2378,16 @@ export type Decorator<
1808
2378
  *
1809
2379
  * @example
1810
2380
  * ```ts
1811
- * import { createTempoClient } from 'tempo.ts/viem'
2381
+ * import { createClient, http } from 'viem'
1812
2382
  * import { privateKeyToAccount } from 'viem/accounts'
2383
+ * import { tempo } from 'tempo.ts/chains'
2384
+ * import { tempoActions } from 'tempo.ts/viem'
1813
2385
  *
1814
- * const client = createTempoClient({
1815
- * account: privateKeyToAccount('0x...')
1816
- * })
2386
+ * const client = createClient({
2387
+ * account: privateKeyToAccount('0x...'),
2388
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2389
+ * transport: http(),
2390
+ * }).extend(tempoActions())
1817
2391
  *
1818
2392
  * const result = await client.token.pauseSync({
1819
2393
  * token: '0x...',
@@ -1827,73 +2401,21 @@ export type Decorator<
1827
2401
  pauseSync: (
1828
2402
  parameters: tokenActions.pauseSync.Parameters<chain, account>,
1829
2403
  ) => Promise<tokenActions.pauseSync.ReturnValue>
1830
- /**
1831
- * Approves a spender using a signed permit.
1832
- *
1833
- * @example
1834
- * ```ts
1835
- * import { createTempoClient } from 'tempo.ts/viem'
1836
- * import { privateKeyToAccount } from 'viem/accounts'
1837
- *
1838
- * const client = createTempoClient({
1839
- * account: privateKeyToAccount('0x...')
1840
- * })
1841
- *
1842
- * const hash = await client.token.permit({
1843
- * owner: '0x...',
1844
- * spender: '0x...',
1845
- * value: 100n,
1846
- * deadline: 1234567890n,
1847
- * signature: { r: 0n, s: 0n, yParity: 0 },
1848
- * })
1849
- * ```
1850
- *
1851
- * @param client - Client.
1852
- * @param parameters - Parameters.
1853
- * @returns The transaction hash.
1854
- */
1855
- permit: (
1856
- parameters: tokenActions.permit.Parameters<chain, account>,
1857
- ) => Promise<tokenActions.permit.ReturnValue>
1858
- /**
1859
- * Approves a spender using a signed permit.
1860
- *
1861
- * @example
1862
- * ```ts
1863
- * import { createTempoClient } from 'tempo.ts/viem'
1864
- * import { privateKeyToAccount } from 'viem/accounts'
1865
- *
1866
- * const client = createTempoClient({
1867
- * account: privateKeyToAccount('0x...')
1868
- * })
1869
- *
1870
- * const result = await client.token.permitSync({
1871
- * owner: '0x...',
1872
- * spender: '0x...',
1873
- * value: 100n,
1874
- * deadline: 1234567890n,
1875
- * signature: { r: 0n, s: 0n, yParity: 0 },
1876
- * })
1877
- * ```
1878
- *
1879
- * @param client - Client.
1880
- * @param parameters - Parameters.
1881
- * @returns The transaction receipt and event data.
1882
- */
1883
- permitSync: (
1884
- parameters: tokenActions.permitSync.Parameters<chain, account>,
1885
- ) => Promise<tokenActions.permitSync.ReturnValue>
1886
2404
  /**
1887
2405
  * Renounces a role for a TIP20 token.
1888
2406
  *
1889
2407
  * @example
1890
2408
  * ```ts
1891
- * import { createTempoClient } from 'tempo.ts/viem'
2409
+ * import { createClient, http } from 'viem'
1892
2410
  * import { privateKeyToAccount } from 'viem/accounts'
2411
+ * import { tempo } from 'tempo.ts/chains'
2412
+ * import { tempoActions } from 'tempo.ts/viem'
1893
2413
  *
1894
- * const client = createTempoClient({
1895
- * account: privateKeyToAccount('0x...')
1896
- * })
2414
+ * const client = createClient({
2415
+ * account: privateKeyToAccount('0x...'),
2416
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2417
+ * transport: http(),
2418
+ * }).extend(tempoActions())
1897
2419
  *
1898
2420
  * const hash = await client.token.renounceRoles({
1899
2421
  * token: '0x...',
@@ -1913,16 +2435,16 @@ export type Decorator<
1913
2435
  *
1914
2436
  * @example
1915
2437
  * ```ts
1916
- * import { createTempoClient } from 'tempo.ts/viem'
1917
- * import { tempo } from 'tempo.ts/chains'
1918
- * import { http } from 'viem'
2438
+ * import { createClient, http } from 'viem'
1919
2439
  * import { privateKeyToAccount } from 'viem/accounts'
2440
+ * import { tempo } from 'tempo.ts/chains'
2441
+ * import { tempoActions } from 'tempo.ts/viem'
1920
2442
  *
1921
- * const client = createTempoClient({
2443
+ * const client = createClient({
1922
2444
  * account: privateKeyToAccount('0x...'),
1923
- * chain: tempo,
2445
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1924
2446
  * transport: http(),
1925
- * })
2447
+ * }).extend(tempoActions())
1926
2448
  *
1927
2449
  * const result = await client.token.renounceRolesSync({
1928
2450
  * token: '0x...',
@@ -1941,12 +2463,16 @@ export type Decorator<
1941
2463
  *
1942
2464
  * @example
1943
2465
  * ```ts
1944
- * import { createTempoClient } from 'tempo.ts/viem'
2466
+ * import { createClient, http } from 'viem'
1945
2467
  * import { privateKeyToAccount } from 'viem/accounts'
2468
+ * import { tempo } from 'tempo.ts/chains'
2469
+ * import { tempoActions } from 'tempo.ts/viem'
1946
2470
  *
1947
- * const client = createTempoClient({
1948
- * account: privateKeyToAccount('0x...')
1949
- * })
2471
+ * const client = createClient({
2472
+ * account: privateKeyToAccount('0x...'),
2473
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2474
+ * transport: http(),
2475
+ * }).extend(tempoActions())
1950
2476
  *
1951
2477
  * const hash = await client.token.revokeRoles({
1952
2478
  * token: '0x...',
@@ -1967,16 +2493,16 @@ export type Decorator<
1967
2493
  *
1968
2494
  * @example
1969
2495
  * ```ts
1970
- * import { createTempoClient } from 'tempo.ts/viem'
1971
- * import { tempo } from 'tempo.ts/chains'
1972
- * import { http } from 'viem'
2496
+ * import { createClient, http } from 'viem'
1973
2497
  * import { privateKeyToAccount } from 'viem/accounts'
2498
+ * import { tempo } from 'tempo.ts/chains'
2499
+ * import { tempoActions } from 'tempo.ts/viem'
1974
2500
  *
1975
- * const client = createTempoClient({
2501
+ * const client = createClient({
1976
2502
  * account: privateKeyToAccount('0x...'),
1977
- * chain: tempo,
2503
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
1978
2504
  * transport: http(),
1979
- * })
2505
+ * }).extend(tempoActions())
1980
2506
  *
1981
2507
  * const result = await client.token.revokeRolesSync({
1982
2508
  * token: '0x...',
@@ -1996,12 +2522,16 @@ export type Decorator<
1996
2522
  *
1997
2523
  * @example
1998
2524
  * ```ts
1999
- * import { createTempoClient } from 'tempo.ts/viem'
2525
+ * import { createClient, http } from 'viem'
2000
2526
  * import { privateKeyToAccount } from 'viem/accounts'
2527
+ * import { tempo } from 'tempo.ts/chains'
2528
+ * import { tempoActions } from 'tempo.ts/viem'
2001
2529
  *
2002
- * const client = createTempoClient({
2003
- * account: privateKeyToAccount('0x...')
2004
- * })
2530
+ * const client = createClient({
2531
+ * account: privateKeyToAccount('0x...'),
2532
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2533
+ * transport: http(),
2534
+ * }).extend(tempoActions())
2005
2535
  *
2006
2536
  * const hash = await client.token.setSupplyCap({
2007
2537
  * token: '0x...',
@@ -2021,12 +2551,16 @@ export type Decorator<
2021
2551
  *
2022
2552
  * @example
2023
2553
  * ```ts
2024
- * import { createTempoClient } from 'tempo.ts/viem'
2554
+ * import { createClient, http } from 'viem'
2025
2555
  * import { privateKeyToAccount } from 'viem/accounts'
2556
+ * import { tempo } from 'tempo.ts/chains'
2557
+ * import { tempoActions } from 'tempo.ts/viem'
2026
2558
  *
2027
- * const client = createTempoClient({
2028
- * account: privateKeyToAccount('0x...')
2029
- * })
2559
+ * const client = createClient({
2560
+ * account: privateKeyToAccount('0x...'),
2561
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2562
+ * transport: http(),
2563
+ * }).extend(tempoActions())
2030
2564
  *
2031
2565
  * const result = await client.token.setSupplyCapSync({
2032
2566
  * token: '0x...',
@@ -2046,12 +2580,16 @@ export type Decorator<
2046
2580
  *
2047
2581
  * @example
2048
2582
  * ```ts
2049
- * import { createTempoClient } from 'tempo.ts/viem'
2583
+ * import { createClient, http } from 'viem'
2050
2584
  * import { privateKeyToAccount } from 'viem/accounts'
2585
+ * import { tempo } from 'tempo.ts/chains'
2586
+ * import { tempoActions } from 'tempo.ts/viem'
2051
2587
  *
2052
- * const client = createTempoClient({
2053
- * account: privateKeyToAccount('0x...')
2054
- * })
2588
+ * const client = createClient({
2589
+ * account: privateKeyToAccount('0x...'),
2590
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2591
+ * transport: http(),
2592
+ * }).extend(tempoActions())
2055
2593
  *
2056
2594
  * const hash = await client.token.setRoleAdmin({
2057
2595
  * token: '0x...',
@@ -2072,12 +2610,16 @@ export type Decorator<
2072
2610
  *
2073
2611
  * @example
2074
2612
  * ```ts
2075
- * import { createTempoClient } from 'tempo.ts/viem'
2613
+ * import { createClient, http } from 'viem'
2076
2614
  * import { privateKeyToAccount } from 'viem/accounts'
2615
+ * import { tempo } from 'tempo.ts/chains'
2616
+ * import { tempoActions } from 'tempo.ts/viem'
2077
2617
  *
2078
- * const client = createTempoClient({
2079
- * account: privateKeyToAccount('0x...')
2080
- * })
2618
+ * const client = createClient({
2619
+ * account: privateKeyToAccount('0x...'),
2620
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2621
+ * transport: http(),
2622
+ * }).extend(tempoActions())
2081
2623
  *
2082
2624
  * const result = await client.token.setRoleAdminSync({
2083
2625
  * token: '0x...',
@@ -2098,12 +2640,16 @@ export type Decorator<
2098
2640
  *
2099
2641
  * @example
2100
2642
  * ```ts
2101
- * import { createTempoClient } from 'tempo.ts/viem'
2643
+ * import { createClient, http } from 'viem'
2102
2644
  * import { privateKeyToAccount } from 'viem/accounts'
2645
+ * import { tempo } from 'tempo.ts/chains'
2646
+ * import { tempoActions } from 'tempo.ts/viem'
2103
2647
  *
2104
- * const client = createTempoClient({
2105
- * account: privateKeyToAccount('0x...')
2106
- * })
2648
+ * const client = createClient({
2649
+ * account: privateKeyToAccount('0x...'),
2650
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2651
+ * transport: http(),
2652
+ * }).extend(tempoActions())
2107
2653
  *
2108
2654
  * const hash = await client.token.transfer({
2109
2655
  * to: '0x...',
@@ -2123,12 +2669,16 @@ export type Decorator<
2123
2669
  *
2124
2670
  * @example
2125
2671
  * ```ts
2126
- * import { createTempoClient } from 'tempo.ts/viem'
2672
+ * import { createClient, http } from 'viem'
2127
2673
  * import { privateKeyToAccount } from 'viem/accounts'
2674
+ * import { tempo } from 'tempo.ts/chains'
2675
+ * import { tempoActions } from 'tempo.ts/viem'
2128
2676
  *
2129
- * const client = createTempoClient({
2130
- * account: privateKeyToAccount('0x...')
2131
- * })
2677
+ * const client = createClient({
2678
+ * account: privateKeyToAccount('0x...'),
2679
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2680
+ * transport: http(),
2681
+ * }).extend(tempoActions())
2132
2682
  *
2133
2683
  * const result = await client.token.transferSync({
2134
2684
  * to: '0x...',
@@ -2148,12 +2698,16 @@ export type Decorator<
2148
2698
  *
2149
2699
  * @example
2150
2700
  * ```ts
2151
- * import { createTempoClient } from 'tempo.ts/viem'
2701
+ * import { createClient, http } from 'viem'
2152
2702
  * import { privateKeyToAccount } from 'viem/accounts'
2703
+ * import { tempo } from 'tempo.ts/chains'
2704
+ * import { tempoActions } from 'tempo.ts/viem'
2153
2705
  *
2154
- * const client = createTempoClient({
2155
- * account: privateKeyToAccount('0x...')
2156
- * })
2706
+ * const client = createClient({
2707
+ * account: privateKeyToAccount('0x...'),
2708
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2709
+ * transport: http(),
2710
+ * }).extend(tempoActions())
2157
2711
  *
2158
2712
  * const hash = await client.token.unpause({
2159
2713
  * token: '0x...',
@@ -2172,12 +2726,16 @@ export type Decorator<
2172
2726
  *
2173
2727
  * @example
2174
2728
  * ```ts
2175
- * import { createTempoClient } from 'tempo.ts/viem'
2729
+ * import { createClient, http } from 'viem'
2176
2730
  * import { privateKeyToAccount } from 'viem/accounts'
2731
+ * import { tempo } from 'tempo.ts/chains'
2732
+ * import { tempoActions } from 'tempo.ts/viem'
2177
2733
  *
2178
- * const client = createTempoClient({
2179
- * account: privateKeyToAccount('0x...')
2180
- * })
2734
+ * const client = createClient({
2735
+ * account: privateKeyToAccount('0x...'),
2736
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2737
+ * transport: http(),
2738
+ * }).extend(tempoActions())
2181
2739
  *
2182
2740
  * const result = await client.token.unpauseSync({
2183
2741
  * token: '0x...',
@@ -2196,9 +2754,14 @@ export type Decorator<
2196
2754
  *
2197
2755
  * @example
2198
2756
  * ```ts
2199
- * import { createTempoClient } from 'tempo.ts/viem'
2757
+ * import { createClient, http } from 'viem'
2758
+ * import { tempo } from 'tempo.ts/chains'
2759
+ * import { tempoActions } from 'tempo.ts/viem'
2200
2760
  *
2201
- * const client = createTempoClient()
2761
+ * const client = createClient({
2762
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2763
+ * transport: http(),
2764
+ * }).extend(tempoActions())
2202
2765
  *
2203
2766
  * const unwatch = client.token.watchApprove({
2204
2767
  * onApproval: (args, log) => {
@@ -2219,9 +2782,14 @@ export type Decorator<
2219
2782
  *
2220
2783
  * @example
2221
2784
  * ```ts
2222
- * import { createTempoClient } from 'tempo.ts/viem'
2785
+ * import { createClient, http } from 'viem'
2786
+ * import { tempo } from 'tempo.ts/chains'
2787
+ * import { tempoActions } from 'tempo.ts/viem'
2223
2788
  *
2224
- * const client = createTempoClient()
2789
+ * const client = createClient({
2790
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2791
+ * transport: http(),
2792
+ * }).extend(tempoActions())
2225
2793
  *
2226
2794
  * const unwatch = client.token.watchBurn({
2227
2795
  * onBurn: (args, log) => {
@@ -2240,9 +2808,14 @@ export type Decorator<
2240
2808
  *
2241
2809
  * @example
2242
2810
  * ```ts
2243
- * import { createTempoClient } from 'tempo.ts/viem'
2811
+ * import { createClient, http } from 'viem'
2812
+ * import { tempo } from 'tempo.ts/chains'
2813
+ * import { tempoActions } from 'tempo.ts/viem'
2244
2814
  *
2245
- * const client = createTempoClient()
2815
+ * const client = createClient({
2816
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2817
+ * transport: http(),
2818
+ * }).extend(tempoActions())
2246
2819
  *
2247
2820
  * const unwatch = client.token.watchCreate({
2248
2821
  * onTokenCreated: (args, log) => {
@@ -2261,9 +2834,14 @@ export type Decorator<
2261
2834
  *
2262
2835
  * @example
2263
2836
  * ```ts
2264
- * import { createTempoClient } from 'tempo.ts/viem'
2837
+ * import { createClient, http } from 'viem'
2838
+ * import { tempo } from 'tempo.ts/chains'
2839
+ * import { tempoActions } from 'tempo.ts/viem'
2265
2840
  *
2266
- * const client = createTempoClient()
2841
+ * const client = createClient({
2842
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2843
+ * transport: http(),
2844
+ * }).extend(tempoActions())
2267
2845
  *
2268
2846
  * const unwatch = client.token.watchMint({
2269
2847
  * onMint: (args, log) => {
@@ -2282,9 +2860,14 @@ export type Decorator<
2282
2860
  *
2283
2861
  * @example
2284
2862
  * ```ts
2285
- * import { createTempoClient } from 'tempo.ts/viem'
2863
+ * import { createClient, http } from 'viem'
2864
+ * import { tempo } from 'tempo.ts/chains'
2865
+ * import { tempoActions } from 'tempo.ts/viem'
2286
2866
  *
2287
- * const client = createTempoClient()
2867
+ * const client = createClient({
2868
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2869
+ * transport: http(),
2870
+ * }).extend(tempoActions())
2288
2871
  *
2289
2872
  * const unwatch = client.token.watchAdminRole({
2290
2873
  * onRoleAdminUpdated: (args, log) => {
@@ -2305,9 +2888,14 @@ export type Decorator<
2305
2888
  *
2306
2889
  * @example
2307
2890
  * ```ts
2308
- * import { createTempoClient } from 'tempo.ts/viem'
2891
+ * import { createClient, http } from 'viem'
2892
+ * import { tempo } from 'tempo.ts/chains'
2893
+ * import { tempoActions } from 'tempo.ts/viem'
2309
2894
  *
2310
- * const client = createTempoClient()
2895
+ * const client = createClient({
2896
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2897
+ * transport: http(),
2898
+ * }).extend(tempoActions())
2311
2899
  *
2312
2900
  * const unwatch = client.token.watchRole({
2313
2901
  * onRoleUpdated: (args, log) => {
@@ -2326,9 +2914,14 @@ export type Decorator<
2326
2914
  *
2327
2915
  * @example
2328
2916
  * ```ts
2329
- * import { createTempoClient } from 'tempo.ts/viem'
2917
+ * import { createClient, http } from 'viem'
2918
+ * import { tempo } from 'tempo.ts/chains'
2919
+ * import { tempoActions } from 'tempo.ts/viem'
2330
2920
  *
2331
- * const client = createTempoClient()
2921
+ * const client = createClient({
2922
+ * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
2923
+ * transport: http(),
2924
+ * }).extend(tempoActions())
2332
2925
  *
2333
2926
  * const unwatch = client.token.watchTransfer({
2334
2927
  * onTransfer: (args, log) => {
@@ -2357,10 +2950,7 @@ export function decorator() {
2357
2950
  ): Decorator<chain, account> => {
2358
2951
  return {
2359
2952
  amm: {
2360
- getPoolId: (parameters) => ammActions.getPoolId(client, parameters),
2361
2953
  getPool: (parameters) => ammActions.getPool(client, parameters),
2362
- getTotalSupply: (parameters) =>
2363
- ammActions.getTotalSupply(client, parameters),
2364
2954
  getLiquidityBalance: (parameters) =>
2365
2955
  ammActions.getLiquidityBalance(client, parameters),
2366
2956
  rebalanceSwap: (parameters) =>
@@ -2389,6 +2979,7 @@ export function decorator() {
2389
2979
  getBalance: (parameters) => dexActions.getBalance(client, parameters),
2390
2980
  getBuyQuote: (parameters) => dexActions.getBuyQuote(client, parameters),
2391
2981
  getOrder: (parameters) => dexActions.getOrder(client, parameters),
2982
+ getOrders: (parameters) => dexActions.getOrders(client, parameters),
2392
2983
  getPriceLevel: (parameters) =>
2393
2984
  dexActions.getPriceLevel(client, parameters),
2394
2985
  getSellQuote: (parameters) =>
@@ -2412,6 +3003,9 @@ export function decorator() {
2412
3003
  watchOrderPlaced: (parameters) =>
2413
3004
  dexActions.watchOrderPlaced(client, parameters),
2414
3005
  },
3006
+ faucet: {
3007
+ fund: (parameters) => faucetActions.fund(client, parameters),
3008
+ },
2415
3009
  fee: {
2416
3010
  // @ts-expect-error
2417
3011
  getUserToken: (parameters) =>
@@ -2451,6 +3045,20 @@ export function decorator() {
2451
3045
  watchBlacklistUpdated: (parameters) =>
2452
3046
  policyActions.watchBlacklistUpdated(client, parameters),
2453
3047
  },
3048
+ reward: {
3049
+ cancel: (parameters) => rewardActions.cancel(client, parameters),
3050
+ cancelSync: (parameters) =>
3051
+ rewardActions.cancelSync(client, parameters),
3052
+ getStream: (parameters) => rewardActions.getStream(client, parameters),
3053
+ getTotalPerSecond: (parameters) =>
3054
+ rewardActions.getTotalPerSecond(client, parameters),
3055
+ setRecipient: (parameters) =>
3056
+ rewardActions.setRecipient(client, parameters),
3057
+ setRecipientSync: (parameters) =>
3058
+ rewardActions.setRecipientSync(client, parameters),
3059
+ start: (parameters) => rewardActions.start(client, parameters),
3060
+ startSync: (parameters) => rewardActions.startSync(client, parameters),
3061
+ },
2454
3062
  token: {
2455
3063
  approve: (parameters) => tokenActions.approve(client, parameters),
2456
3064
  approveSync: (parameters) =>
@@ -2469,10 +3077,11 @@ export function decorator() {
2469
3077
  createSync: (parameters) => tokenActions.createSync(client, parameters),
2470
3078
  getAllowance: (parameters) =>
2471
3079
  tokenActions.getAllowance(client, parameters),
2472
- // @ts-expect-error
2473
3080
  getBalance: (parameters) => tokenActions.getBalance(client, parameters),
2474
3081
  getMetadata: (parameters) =>
2475
3082
  tokenActions.getMetadata(client, parameters),
3083
+ getRoleAdmin: (parameters) =>
3084
+ tokenActions.getRoleAdmin(client, parameters),
2476
3085
  hasRole: (parameters) => tokenActions.hasRole(client, parameters),
2477
3086
  grantRoles: (parameters) => tokenActions.grantRoles(client, parameters),
2478
3087
  grantRolesSync: (parameters) =>
@@ -2481,8 +3090,6 @@ export function decorator() {
2481
3090
  mintSync: (parameters) => tokenActions.mintSync(client, parameters),
2482
3091
  pause: (parameters) => tokenActions.pause(client, parameters),
2483
3092
  pauseSync: (parameters) => tokenActions.pauseSync(client, parameters),
2484
- permit: (parameters) => tokenActions.permit(client, parameters),
2485
- permitSync: (parameters) => tokenActions.permitSync(client, parameters),
2486
3093
  renounceRoles: (parameters) =>
2487
3094
  tokenActions.renounceRoles(client, parameters),
2488
3095
  renounceRolesSync: (parameters) =>