tempo.ts 0.1.4 → 0.2.0

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 (277) 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 +18 -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 +5 -0
  47. package/dist/prool/Instance.d.ts.map +1 -1
  48. package/dist/prool/Instance.js +32 -8
  49. package/dist/prool/Instance.js.map +1 -1
  50. package/dist/viem/Abis.d.ts +1469 -1082
  51. package/dist/viem/Abis.d.ts.map +1 -1
  52. package/dist/viem/Abis.js +932 -671
  53. package/dist/viem/Abis.js.map +1 -1
  54. package/dist/viem/Account.d.ts +150 -0
  55. package/dist/viem/Account.d.ts.map +1 -0
  56. package/dist/viem/Account.js +221 -0
  57. package/dist/viem/Account.js.map +1 -0
  58. package/dist/viem/Actions/amm.d.ts +80 -118
  59. package/dist/viem/Actions/amm.d.ts.map +1 -1
  60. package/dist/viem/Actions/amm.js +47 -116
  61. package/dist/viem/Actions/amm.js.map +1 -1
  62. package/dist/viem/Actions/dex.d.ts +889 -633
  63. package/dist/viem/Actions/dex.d.ts.map +1 -1
  64. package/dist/viem/Actions/dex.js +99 -0
  65. package/dist/viem/Actions/dex.js.map +1 -1
  66. package/dist/viem/Actions/fee.d.ts +3 -17
  67. package/dist/viem/Actions/fee.d.ts.map +1 -1
  68. package/dist/viem/Actions/fee.js.map +1 -1
  69. package/dist/viem/Actions/index.d.ts +1 -0
  70. package/dist/viem/Actions/index.d.ts.map +1 -1
  71. package/dist/viem/Actions/index.js +1 -0
  72. package/dist/viem/Actions/index.js.map +1 -1
  73. package/dist/viem/Actions/reward.d.ts +3236 -0
  74. package/dist/viem/Actions/reward.d.ts.map +1 -0
  75. package/dist/viem/Actions/reward.js +725 -0
  76. package/dist/viem/Actions/reward.js.map +1 -0
  77. package/dist/viem/Actions/token.d.ts +4295 -2646
  78. package/dist/viem/Actions/token.d.ts.map +1 -1
  79. package/dist/viem/Actions/token.js +214 -335
  80. package/dist/viem/Actions/token.js.map +1 -1
  81. package/dist/viem/Addresses.d.ts +1 -2
  82. package/dist/viem/Addresses.d.ts.map +1 -1
  83. package/dist/viem/Addresses.js +1 -2
  84. package/dist/viem/Addresses.js.map +1 -1
  85. package/dist/viem/Chain.d.ts +38 -12
  86. package/dist/viem/Chain.d.ts.map +1 -1
  87. package/dist/viem/Chain.js +27 -18
  88. package/dist/viem/Chain.js.map +1 -1
  89. package/dist/viem/Decorator.d.ts +959 -405
  90. package/dist/viem/Decorator.d.ts.map +1 -1
  91. package/dist/viem/Decorator.js +13 -5
  92. package/dist/viem/Decorator.js.map +1 -1
  93. package/dist/viem/Formatters.d.ts +8 -1
  94. package/dist/viem/Formatters.d.ts.map +1 -1
  95. package/dist/viem/Formatters.js +17 -0
  96. package/dist/viem/Formatters.js.map +1 -1
  97. package/dist/viem/P256.d.ts +2 -0
  98. package/dist/viem/P256.d.ts.map +1 -0
  99. package/dist/viem/P256.js +2 -0
  100. package/dist/viem/P256.js.map +1 -0
  101. package/dist/viem/Secp256k1.d.ts +2 -0
  102. package/dist/viem/Secp256k1.d.ts.map +1 -0
  103. package/dist/viem/Secp256k1.js +2 -0
  104. package/dist/viem/Secp256k1.js.map +1 -0
  105. package/dist/viem/TokenIds.d.ts +1 -2
  106. package/dist/viem/TokenIds.d.ts.map +1 -1
  107. package/dist/viem/TokenIds.js +1 -2
  108. package/dist/viem/TokenIds.js.map +1 -1
  109. package/dist/viem/Transaction.d.ts +1 -1
  110. package/dist/viem/Transaction.d.ts.map +1 -1
  111. package/dist/viem/Transaction.js +46 -5
  112. package/dist/viem/Transaction.js.map +1 -1
  113. package/dist/viem/WebAuthnP256.d.ts +79 -0
  114. package/dist/viem/WebAuthnP256.d.ts.map +1 -0
  115. package/dist/viem/WebAuthnP256.js +95 -0
  116. package/dist/viem/WebAuthnP256.js.map +1 -0
  117. package/dist/viem/WebCryptoP256.d.ts +2 -0
  118. package/dist/viem/WebCryptoP256.d.ts.map +1 -0
  119. package/dist/viem/WebCryptoP256.js +2 -0
  120. package/dist/viem/WebCryptoP256.js.map +1 -0
  121. package/dist/viem/index.d.ts +6 -3
  122. package/dist/viem/index.d.ts.map +1 -1
  123. package/dist/viem/index.js +6 -3
  124. package/dist/viem/index.js.map +1 -1
  125. package/dist/viem/internal/account.d.ts +24 -0
  126. package/dist/viem/internal/account.d.ts.map +1 -0
  127. package/dist/viem/internal/account.js +68 -0
  128. package/dist/viem/internal/account.js.map +1 -0
  129. package/dist/viem/internal/types.d.ts +10 -0
  130. package/dist/viem/internal/types.d.ts.map +1 -1
  131. package/dist/wagmi/Actions/amm.d.ts +428 -0
  132. package/dist/wagmi/Actions/amm.d.ts.map +1 -0
  133. package/dist/wagmi/Actions/amm.js +472 -0
  134. package/dist/wagmi/Actions/amm.js.map +1 -0
  135. package/dist/wagmi/Actions/dex.d.ts +908 -0
  136. package/dist/wagmi/Actions/dex.d.ts.map +1 -0
  137. package/dist/wagmi/Actions/dex.js +1023 -0
  138. package/dist/wagmi/Actions/dex.js.map +1 -0
  139. package/dist/wagmi/Actions/fee.d.ts +111 -0
  140. package/dist/wagmi/Actions/fee.d.ts.map +1 -0
  141. package/dist/wagmi/Actions/fee.js +126 -0
  142. package/dist/wagmi/Actions/fee.js.map +1 -0
  143. package/dist/wagmi/Actions/index.d.ts +6 -0
  144. package/dist/wagmi/Actions/index.d.ts.map +1 -0
  145. package/dist/wagmi/Actions/index.js +6 -0
  146. package/dist/wagmi/Actions/index.js.map +1 -0
  147. package/dist/wagmi/Actions/reward.d.ts +348 -0
  148. package/dist/wagmi/Actions/reward.d.ts.map +1 -0
  149. package/dist/wagmi/Actions/reward.js +388 -0
  150. package/dist/wagmi/Actions/reward.js.map +1 -0
  151. package/dist/wagmi/Actions/token.d.ts +1546 -0
  152. package/dist/wagmi/Actions/token.d.ts.map +1 -0
  153. package/dist/wagmi/Actions/token.js +1712 -0
  154. package/dist/wagmi/Actions/token.js.map +1 -0
  155. package/dist/wagmi/Connector.d.ts +73 -0
  156. package/dist/wagmi/Connector.d.ts.map +1 -0
  157. package/dist/wagmi/Connector.js +249 -0
  158. package/dist/wagmi/Connector.js.map +1 -0
  159. package/dist/wagmi/Hooks/amm.d.ts +421 -0
  160. package/dist/wagmi/Hooks/amm.d.ts.map +1 -0
  161. package/dist/wagmi/Hooks/amm.js +504 -0
  162. package/dist/wagmi/Hooks/amm.js.map +1 -0
  163. package/dist/wagmi/Hooks/dex.d.ts +816 -0
  164. package/dist/wagmi/Hooks/dex.d.ts.map +1 -0
  165. package/dist/wagmi/Hooks/dex.js +973 -0
  166. package/dist/wagmi/Hooks/dex.js.map +1 -0
  167. package/dist/wagmi/Hooks/fee.d.ts +97 -0
  168. package/dist/wagmi/Hooks/fee.d.ts.map +1 -0
  169. package/dist/wagmi/Hooks/fee.js +109 -0
  170. package/dist/wagmi/Hooks/fee.js.map +1 -0
  171. package/dist/wagmi/Hooks/index.d.ts +6 -0
  172. package/dist/wagmi/Hooks/index.d.ts.map +1 -0
  173. package/dist/wagmi/Hooks/index.js +6 -0
  174. package/dist/wagmi/Hooks/index.js.map +1 -0
  175. package/dist/wagmi/Hooks/reward.d.ts +307 -0
  176. package/dist/wagmi/Hooks/reward.d.ts.map +1 -0
  177. package/dist/wagmi/Hooks/reward.js +349 -0
  178. package/dist/wagmi/Hooks/reward.js.map +1 -0
  179. package/dist/wagmi/Hooks/token.d.ts +1388 -0
  180. package/dist/wagmi/Hooks/token.d.ts.map +1 -0
  181. package/dist/wagmi/Hooks/token.js +1657 -0
  182. package/dist/wagmi/Hooks/token.js.map +1 -0
  183. package/dist/wagmi/index.d.ts +4 -0
  184. package/dist/wagmi/index.d.ts.map +1 -0
  185. package/dist/wagmi/index.js +4 -0
  186. package/dist/wagmi/index.js.map +1 -0
  187. package/package.json +54 -10
  188. package/src/chains.ts +19 -9
  189. package/src/ox/Order.test.ts +78 -0
  190. package/src/ox/Order.ts +125 -0
  191. package/src/ox/OrdersFilters.test.ts +182 -0
  192. package/src/ox/OrdersFilters.ts +125 -0
  193. package/src/ox/Pagination.test.ts +162 -0
  194. package/src/ox/Pagination.ts +164 -0
  195. package/src/ox/PoolId.test.ts +33 -0
  196. package/src/ox/PoolId.ts +27 -0
  197. package/src/ox/RpcSchema.ts +35 -0
  198. package/src/ox/SignatureEnvelope.ts +3 -1
  199. package/src/{viem → ox}/Tick.test.ts +1 -1
  200. package/src/{viem → ox}/Tick.ts +5 -0
  201. package/src/ox/Transaction.test.ts +1 -1
  202. package/src/ox/Transaction.ts +2 -1
  203. package/src/ox/TransactionEnvelopeAA.test.ts +239 -96
  204. package/src/ox/TransactionEnvelopeAA.ts +9 -7
  205. package/src/ox/TransactionRequest.ts +4 -0
  206. package/src/ox/index.ts +6 -0
  207. package/src/prool/Instance.ts +75 -38
  208. package/src/prool/internal/chain.json +104 -52
  209. package/src/tsconfig.json +9 -0
  210. package/src/viem/Abis.ts +972 -710
  211. package/src/viem/Account.ts +279 -0
  212. package/src/viem/Actions/__snapshots__/dex.test.ts.snap +850 -0
  213. package/src/viem/Actions/amm.test.ts +98 -169
  214. package/src/viem/Actions/amm.ts +68 -155
  215. package/src/viem/Actions/dex.test.ts +563 -484
  216. package/src/viem/Actions/dex.ts +173 -0
  217. package/src/viem/Actions/fee.test.ts +23 -34
  218. package/src/viem/Actions/fee.ts +7 -0
  219. package/src/viem/Actions/index.ts +1 -0
  220. package/src/viem/Actions/policy.test.ts +19 -33
  221. package/src/viem/Actions/reward.test.ts +457 -0
  222. package/src/viem/Actions/reward.ts +999 -0
  223. package/src/viem/Actions/token.test.ts +453 -287
  224. package/src/viem/Actions/token.ts +452 -540
  225. package/src/viem/Addresses.ts +1 -2
  226. package/src/viem/Chain.ts +70 -20
  227. package/src/viem/Decorator.test.ts +2 -1
  228. package/src/viem/Decorator.ts +996 -421
  229. package/src/viem/Formatters.ts +31 -5
  230. package/src/viem/P256.ts +1 -0
  231. package/src/viem/Secp256k1.ts +1 -0
  232. package/src/viem/TokenIds.ts +1 -2
  233. package/src/viem/Transaction.ts +53 -7
  234. package/src/viem/WebAuthnP256.ts +140 -0
  235. package/src/viem/WebCryptoP256.ts +1 -0
  236. package/src/viem/e2e.test.ts +1126 -297
  237. package/src/viem/index.ts +6 -3
  238. package/src/viem/internal/account.ts +107 -0
  239. package/src/viem/internal/types.ts +9 -0
  240. package/src/wagmi/Actions/__snapshots__/dex.test.ts.snap +310 -0
  241. package/src/wagmi/Actions/amm.test.ts +198 -0
  242. package/src/wagmi/Actions/amm.ts +691 -0
  243. package/src/wagmi/Actions/dex.test.ts +1507 -0
  244. package/src/wagmi/Actions/dex.ts +1640 -0
  245. package/src/wagmi/Actions/fee.test.ts +63 -0
  246. package/src/wagmi/Actions/fee.ts +208 -0
  247. package/src/wagmi/Actions/index.ts +5 -0
  248. package/src/wagmi/Actions/reward.test.ts +210 -0
  249. package/src/wagmi/Actions/reward.ts +632 -0
  250. package/src/wagmi/Actions/token.test.ts +1308 -0
  251. package/src/wagmi/Actions/token.ts +2613 -0
  252. package/src/wagmi/Connector.test.ts +53 -0
  253. package/src/wagmi/Connector.ts +367 -0
  254. package/src/wagmi/Hooks/__snapshots__/dex.test.ts.snap +457 -0
  255. package/src/wagmi/Hooks/amm.test.ts +424 -0
  256. package/src/wagmi/Hooks/amm.ts +806 -0
  257. package/src/wagmi/Hooks/dex.test.ts +1017 -0
  258. package/src/wagmi/Hooks/dex.ts +1685 -0
  259. package/src/wagmi/Hooks/fee.test.ts +166 -0
  260. package/src/wagmi/Hooks/fee.ts +206 -0
  261. package/src/wagmi/Hooks/index.ts +5 -0
  262. package/src/wagmi/Hooks/reward.test.ts +219 -0
  263. package/src/wagmi/Hooks/reward.ts +672 -0
  264. package/src/wagmi/Hooks/token.test.ts +1670 -0
  265. package/src/wagmi/Hooks/token.ts +2906 -0
  266. package/src/wagmi/index.ts +3 -0
  267. package/src/wagmi/internal/types.ts +16 -0
  268. package/dist/viem/Client.d.ts +0 -27
  269. package/dist/viem/Client.d.ts.map +0 -1
  270. package/dist/viem/Client.js +0 -28
  271. package/dist/viem/Client.js.map +0 -1
  272. package/dist/viem/Tick.d.ts.map +0 -1
  273. package/dist/viem/Tick.js.map +0 -1
  274. package/src/viem/Client.bench-d.ts +0 -8
  275. package/src/viem/Client.test.ts +0 -178
  276. package/src/viem/Client.ts +0 -91
  277. /package/dist/{viem → ox}/Tick.js +0 -0
@@ -3,36 +3,23 @@ import * as ammActions from './Actions/amm.js';
3
3
  import * as dexActions from './Actions/dex.js';
4
4
  import * as feeActions from './Actions/fee.js';
5
5
  import * as policyActions from './Actions/policy.js';
6
+ import * as rewardActions from './Actions/reward.js';
6
7
  import * as tokenActions from './Actions/token.js';
7
8
  export type Decorator<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = {
8
9
  amm: {
9
- /**
10
- * Gets the pool ID for a token pair.
11
- *
12
- * @example
13
- * ```ts
14
- * import { createTempoClient } from 'tempo.ts/viem'
15
- *
16
- * const client = createTempoClient()
17
- *
18
- * const poolId = await client.amm.getPoolId({
19
- * userToken: '0x...',
20
- * validatorToken: '0x...',
21
- * })
22
- * ```
23
- *
24
- * @param parameters - Parameters.
25
- * @returns The pool ID.
26
- */
27
- getPoolId: (parameters: ammActions.getPoolId.Parameters) => Promise<ammActions.getPoolId.ReturnValue>;
28
10
  /**
29
11
  * Gets the reserves for a liquidity pool.
30
12
  *
31
13
  * @example
32
14
  * ```ts
33
- * import { createTempoClient } from 'tempo.ts/viem'
15
+ * import { createClient, http } from 'viem'
16
+ * import { tempo } from 'tempo.ts/chains'
17
+ * import { tempoActions } from 'tempo.ts/viem'
34
18
  *
35
- * const client = createTempoClient()
19
+ * const client = createClient({
20
+ * chain: tempo({ feeToken: '0x20c...001' }),
21
+ * transport: http(),
22
+ * }).extend(tempoActions())
36
23
  *
37
24
  * const pool = await client.amm.getPool({
38
25
  * userToken: '0x...',
@@ -44,35 +31,19 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
44
31
  * @returns The pool reserves.
45
32
  */
46
33
  getPool: (parameters: ammActions.getPool.Parameters) => Promise<ammActions.getPool.ReturnValue>;
47
- /**
48
- * Gets the total supply of LP tokens for a pool.
49
- *
50
- * @example
51
- * ```ts
52
- * import { createTempoClient } from 'tempo.ts/viem'
53
- *
54
- * const client = createTempoClient()
55
- *
56
- * const poolId = await client.amm.getPoolId({
57
- * userToken: '0x...',
58
- * validatorToken: '0x...',
59
- * })
60
- *
61
- * const totalSupply = await client.amm.getTotalSupply({ poolId })
62
- * ```
63
- *
64
- * @param parameters - Parameters.
65
- * @returns The total supply of LP tokens.
66
- */
67
- getTotalSupply: (parameters: ammActions.getTotalSupply.Parameters) => Promise<ammActions.getTotalSupply.ReturnValue>;
68
34
  /**
69
35
  * Gets the LP token balance for an account in a specific pool.
70
36
  *
71
37
  * @example
72
38
  * ```ts
73
- * import { createTempoClient } from 'tempo.ts/viem'
39
+ * import { createClient, http } from 'viem'
40
+ * import { tempo } from 'tempo.ts/chains'
41
+ * import { tempoActions } from 'tempo.ts/viem'
74
42
  *
75
- * const client = createTempoClient()
43
+ * const client = createClient({
44
+ * chain: tempo,
45
+ * transport: http(),
46
+ * }).extend(tempoActions())
76
47
  *
77
48
  * const poolId = await client.amm.getPoolId({
78
49
  * userToken: '0x...',
@@ -94,12 +65,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
94
65
  *
95
66
  * @example
96
67
  * ```ts
97
- * import { createTempoClient } from 'tempo.ts/viem'
68
+ * import { createClient, http } from 'viem'
98
69
  * import { privateKeyToAccount } from 'viem/accounts'
70
+ * import { tempo } from 'tempo.ts/chains'
71
+ * import { tempoActions } from 'tempo.ts/viem'
99
72
  *
100
- * const client = createTempoClient({
101
- * account: privateKeyToAccount('0x...')
102
- * })
73
+ * const client = createClient({
74
+ * account: privateKeyToAccount('0x...'),
75
+ * chain: tempo,
76
+ * transport: http(),
77
+ * }).extend(tempoActions())
103
78
  *
104
79
  * const hash = await client.amm.rebalanceSwap({
105
80
  * userToken: '0x...',
@@ -118,12 +93,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
118
93
  *
119
94
  * @example
120
95
  * ```ts
121
- * import { createTempoClient } from 'tempo.ts/viem'
96
+ * import { createClient, http } from 'viem'
122
97
  * import { privateKeyToAccount } from 'viem/accounts'
98
+ * import { tempo } from 'tempo.ts/chains'
99
+ * import { tempoActions } from 'tempo.ts/viem'
123
100
  *
124
- * const client = createTempoClient({
125
- * account: privateKeyToAccount('0x...')
126
- * })
101
+ * const client = createClient({
102
+ * account: privateKeyToAccount('0x...'),
103
+ * chain: tempo,
104
+ * transport: http(),
105
+ * }).extend(tempoActions())
127
106
  *
128
107
  * const result = await client.amm.rebalanceSwapSync({
129
108
  * userToken: '0x...',
@@ -142,12 +121,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
142
121
  *
143
122
  * @example
144
123
  * ```ts
145
- * import { createTempoClient } from 'tempo.ts/viem'
124
+ * import { createClient, http } from 'viem'
146
125
  * import { privateKeyToAccount } from 'viem/accounts'
126
+ * import { tempo } from 'tempo.ts/chains'
127
+ * import { tempoActions } from 'tempo.ts/viem'
147
128
  *
148
- * const client = createTempoClient({
149
- * account: privateKeyToAccount('0x...')
150
- * })
129
+ * const client = createClient({
130
+ * account: privateKeyToAccount('0x...'),
131
+ * chain: tempo,
132
+ * transport: http(),
133
+ * }).extend(tempoActions())
151
134
  *
152
135
  * const hash = await client.amm.mint({
153
136
  * userToken: {
@@ -171,12 +154,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
171
154
  *
172
155
  * @example
173
156
  * ```ts
174
- * import { createTempoClient } from 'tempo.ts/viem'
157
+ * import { createClient, http } from 'viem'
175
158
  * import { privateKeyToAccount } from 'viem/accounts'
159
+ * import { tempo } from 'tempo.ts/chains'
160
+ * import { tempoActions } from 'tempo.ts/viem'
176
161
  *
177
- * const client = createTempoClient({
178
- * account: privateKeyToAccount('0x...')
179
- * })
162
+ * const client = createClient({
163
+ * account: privateKeyToAccount('0x...'),
164
+ * chain: tempo,
165
+ * transport: http(),
166
+ * }).extend(tempoActions())
180
167
  *
181
168
  * const result = await client.amm.mintSync({
182
169
  * userToken: {
@@ -200,12 +187,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
200
187
  *
201
188
  * @example
202
189
  * ```ts
203
- * import { createTempoClient } from 'tempo.ts/viem'
190
+ * import { createClient, http } from 'viem'
204
191
  * import { privateKeyToAccount } from 'viem/accounts'
192
+ * import { tempo } from 'tempo.ts/chains'
193
+ * import { tempoActions } from 'tempo.ts/viem'
205
194
  *
206
- * const client = createTempoClient({
207
- * account: privateKeyToAccount('0x...')
208
- * })
195
+ * const client = createClient({
196
+ * account: privateKeyToAccount('0x...'),
197
+ * chain: tempo,
198
+ * transport: http(),
199
+ * }).extend(tempoActions())
209
200
  *
210
201
  * const hash = await client.amm.burn({
211
202
  * userToken: '0x...',
@@ -224,12 +215,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
224
215
  *
225
216
  * @example
226
217
  * ```ts
227
- * import { createTempoClient } from 'tempo.ts/viem'
218
+ * import { createClient, http } from 'viem'
228
219
  * import { privateKeyToAccount } from 'viem/accounts'
220
+ * import { tempo } from 'tempo.ts/chains'
221
+ * import { tempoActions } from 'tempo.ts/viem'
229
222
  *
230
- * const client = createTempoClient({
231
- * account: privateKeyToAccount('0x...')
232
- * })
223
+ * const client = createClient({
224
+ * account: privateKeyToAccount('0x...'),
225
+ * chain: tempo,
226
+ * transport: http(),
227
+ * }).extend(tempoActions())
233
228
  *
234
229
  * const result = await client.amm.burnSync({
235
230
  * userToken: '0x...',
@@ -248,9 +243,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
248
243
  *
249
244
  * @example
250
245
  * ```ts
251
- * import { createTempoClient } from 'tempo.ts/viem'
246
+ * import { createClient, http } from 'viem'
247
+ * import { tempo } from 'tempo.ts/chains'
248
+ * import { tempoActions } from 'tempo.ts/viem'
252
249
  *
253
- * const client = createTempoClient()
250
+ * const client = createClient({
251
+ * chain: tempo,
252
+ * transport: http(),
253
+ * }).extend(tempoActions())
254
254
  *
255
255
  * const unwatch = client.amm.watchRebalanceSwap({
256
256
  * onRebalanceSwap: (args, log) => {
@@ -268,9 +268,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
268
268
  *
269
269
  * @example
270
270
  * ```ts
271
- * import { createTempoClient } from 'tempo.ts/viem'
271
+ * import { createClient, http } from 'viem'
272
+ * import { tempo } from 'tempo.ts/chains'
273
+ * import { tempoActions } from 'tempo.ts/viem'
272
274
  *
273
- * const client = createTempoClient()
275
+ * const client = createClient({
276
+ * chain: tempo,
277
+ * transport: http(),
278
+ * }).extend(tempoActions())
274
279
  *
275
280
  * const unwatch = client.amm.watchFeeSwap({
276
281
  * onFeeSwap: (args, log) => {
@@ -288,9 +293,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
288
293
  *
289
294
  * @example
290
295
  * ```ts
291
- * import { createTempoClient } from 'tempo.ts/viem'
296
+ * import { createClient, http } from 'viem'
297
+ * import { tempo } from 'tempo.ts/chains'
298
+ * import { tempoActions } from 'tempo.ts/viem'
292
299
  *
293
- * const client = createTempoClient()
300
+ * const client = createClient({
301
+ * chain: tempo,
302
+ * transport: http(),
303
+ * }).extend(tempoActions())
294
304
  *
295
305
  * const unwatch = client.amm.watchMint({
296
306
  * onMint: (args, log) => {
@@ -308,9 +318,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
308
318
  *
309
319
  * @example
310
320
  * ```ts
311
- * import { createTempoClient } from 'tempo.ts/viem'
321
+ * import { createClient, http } from 'viem'
322
+ * import { tempo } from 'tempo.ts/chains'
323
+ * import { tempoActions } from 'tempo.ts/viem'
312
324
  *
313
- * const client = createTempoClient()
325
+ * const client = createClient({
326
+ * chain: tempo,
327
+ * transport: http(),
328
+ * }).extend(tempoActions())
314
329
  *
315
330
  * const unwatch = client.amm.watchBurn({
316
331
  * onBurn: (args, log) => {
@@ -330,12 +345,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
330
345
  *
331
346
  * @example
332
347
  * ```ts
333
- * import { createTempoClient } from 'tempo.ts/viem'
348
+ * import { createClient, http } from 'viem'
334
349
  * import { privateKeyToAccount } from 'viem/accounts'
350
+ * import { tempo } from 'tempo.ts/chains'
351
+ * import { tempoActions } from 'tempo.ts/viem'
335
352
  *
336
- * const client = createTempoClient({
337
- * account: privateKeyToAccount('0x...')
338
- * })
353
+ * const client = createClient({
354
+ * account: privateKeyToAccount('0x...'),
355
+ * chain: tempo,
356
+ * transport: http(),
357
+ * }).extend(tempoActions())
339
358
  *
340
359
  * const hash = await client.dex.buy({
341
360
  * tokenIn: '0x20c...11',
@@ -354,12 +373,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
354
373
  *
355
374
  * @example
356
375
  * ```ts
357
- * import { createTempoClient } from 'tempo.ts/viem'
376
+ * import { createClient, http } from 'viem'
358
377
  * import { privateKeyToAccount } from 'viem/accounts'
378
+ * import { tempo } from 'tempo.ts/chains'
379
+ * import { tempoActions } from 'tempo.ts/viem'
359
380
  *
360
- * const client = createTempoClient({
361
- * account: privateKeyToAccount('0x...')
362
- * })
381
+ * const client = createClient({
382
+ * account: privateKeyToAccount('0x...'),
383
+ * chain: tempo,
384
+ * transport: http(),
385
+ * }).extend(tempoActions())
363
386
  *
364
387
  * const result = await client.dex.buySync({
365
388
  * tokenIn: '0x20c...11',
@@ -378,12 +401,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
378
401
  *
379
402
  * @example
380
403
  * ```ts
381
- * import { createTempoClient } from 'tempo.ts/viem'
404
+ * import { createClient, http } from 'viem'
382
405
  * import { privateKeyToAccount } from 'viem/accounts'
406
+ * import { tempo } from 'tempo.ts/chains'
407
+ * import { tempoActions } from 'tempo.ts/viem'
383
408
  *
384
- * const client = createTempoClient({
385
- * account: privateKeyToAccount('0x...')
386
- * })
409
+ * const client = createClient({
410
+ * account: privateKeyToAccount('0x...'),
411
+ * chain: tempo,
412
+ * transport: http(),
413
+ * }).extend(tempoActions())
387
414
  *
388
415
  * const hash = await client.dex.cancel({
389
416
  * orderId: 123n,
@@ -399,12 +426,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
399
426
  *
400
427
  * @example
401
428
  * ```ts
402
- * import { createTempoClient } from 'tempo.ts/viem'
429
+ * import { createClient, http } from 'viem'
403
430
  * import { privateKeyToAccount } from 'viem/accounts'
431
+ * import { tempo } from 'tempo.ts/chains'
432
+ * import { tempoActions } from 'tempo.ts/viem'
404
433
  *
405
- * const client = createTempoClient({
406
- * account: privateKeyToAccount('0x...')
407
- * })
434
+ * const client = createClient({
435
+ * account: privateKeyToAccount('0x...'),
436
+ * chain: tempo,
437
+ * transport: http(),
438
+ * }).extend(tempoActions())
408
439
  *
409
440
  * const result = await client.dex.cancelSync({
410
441
  * orderId: 123n,
@@ -420,12 +451,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
420
451
  *
421
452
  * @example
422
453
  * ```ts
423
- * import { createTempoClient } from 'tempo.ts/viem'
454
+ * import { createClient, http } from 'viem'
424
455
  * import { privateKeyToAccount } from 'viem/accounts'
456
+ * import { tempo } from 'tempo.ts/chains'
457
+ * import { tempoActions } from 'tempo.ts/viem'
425
458
  *
426
- * const client = createTempoClient({
427
- * account: privateKeyToAccount('0x...')
428
- * })
459
+ * const client = createClient({
460
+ * account: privateKeyToAccount('0x...'),
461
+ * chain: tempo,
462
+ * transport: http(),
463
+ * }).extend(tempoActions())
429
464
  *
430
465
  * const hash = await client.dex.createPair({
431
466
  * base: '0x20c...11',
@@ -441,12 +476,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
441
476
  *
442
477
  * @example
443
478
  * ```ts
444
- * import { createTempoClient } from 'tempo.ts/viem'
479
+ * import { createClient, http } from 'viem'
445
480
  * import { privateKeyToAccount } from 'viem/accounts'
481
+ * import { tempo } from 'tempo.ts/chains'
482
+ * import { tempoActions } from 'tempo.ts/viem'
446
483
  *
447
- * const client = createTempoClient({
448
- * account: privateKeyToAccount('0x...')
449
- * })
484
+ * const client = createClient({
485
+ * account: privateKeyToAccount('0x...'),
486
+ * chain: tempo,
487
+ * transport: http(),
488
+ * }).extend(tempoActions())
450
489
  *
451
490
  * const result = await client.dex.createPairSync({
452
491
  * base: '0x20c...11',
@@ -462,9 +501,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
462
501
  *
463
502
  * @example
464
503
  * ```ts
465
- * import { createTempoClient } from 'tempo.ts/viem'
504
+ * import { createClient, http } from 'viem'
505
+ * import { tempo } from 'tempo.ts/chains'
506
+ * import { tempoActions } from 'tempo.ts/viem'
466
507
  *
467
- * const client = createTempoClient()
508
+ * const client = createClient({
509
+ * chain: tempo,
510
+ * transport: http(),
511
+ * }).extend(tempoActions())
468
512
  *
469
513
  * const balance = await client.dex.getBalance({
470
514
  * account: '0x...',
@@ -481,9 +525,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
481
525
  *
482
526
  * @example
483
527
  * ```ts
484
- * import { createTempoClient } from 'tempo.ts/viem'
528
+ * import { createClient, http } from 'viem'
529
+ * import { tempo } from 'tempo.ts/chains'
530
+ * import { tempoActions } from 'tempo.ts/viem'
485
531
  *
486
- * const client = createTempoClient()
532
+ * const client = createClient({
533
+ * chain: tempo,
534
+ * transport: http(),
535
+ * }).extend(tempoActions())
487
536
  *
488
537
  * const amountIn = await client.dex.getBuyQuote({
489
538
  * tokenIn: '0x20c...11',
@@ -501,9 +550,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
501
550
  *
502
551
  * @example
503
552
  * ```ts
504
- * import { createTempoClient } from 'tempo.ts/viem'
553
+ * import { createClient, http } from 'viem'
554
+ * import { tempo } from 'tempo.ts/chains'
555
+ * import { tempoActions } from 'tempo.ts/viem'
505
556
  *
506
- * const client = createTempoClient()
557
+ * const client = createClient({
558
+ * chain: tempo,
559
+ * transport: http(),
560
+ * }).extend(tempoActions())
507
561
  *
508
562
  * const order = await client.dex.getOrder({
509
563
  * orderId: 123n,
@@ -514,14 +568,46 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
514
568
  * @returns The order details.
515
569
  */
516
570
  getOrder: (parameters: dexActions.getOrder.Parameters) => Promise<dexActions.getOrder.ReturnValue>;
571
+ /**
572
+ * Gets paginated orders from the orderbook.
573
+ *
574
+ * @example
575
+ * ```ts
576
+ * import { createClient, http } from 'viem'
577
+ * import { tempo } from 'tempo.ts/chains'
578
+ * import { tempoActions } from 'tempo.ts/viem'
579
+ *
580
+ * const client = createClient({
581
+ * chain: tempo,
582
+ * transport: http(),
583
+ * }).extend(tempoActions())
584
+ *
585
+ * const { orders, nextCursor } = await client.dex.getOrders({
586
+ * limit: 100,
587
+ * filters: {
588
+ * baseToken: '0x20c0...',
589
+ * isBid: true,
590
+ * }
591
+ * })
592
+ * ```
593
+ *
594
+ * @param parameters - Parameters.
595
+ * @returns Paginated orders and next cursor.
596
+ */
597
+ getOrders: (parameters?: dexActions.getOrders.Parameters) => Promise<dexActions.getOrders.ReturnValue>;
517
598
  /**
518
599
  * Gets the price level information at a specific tick.
519
600
  *
520
601
  * @example
521
602
  * ```ts
522
- * import { createTempoClient, Tick } from 'tempo.ts/viem'
603
+ * import { createClient, http } from 'viem'
604
+ * import { tempo } from 'tempo.ts/chains'
605
+ * import { tempoActions, Tick } from 'tempo.ts/viem'
523
606
  *
524
- * const client = createTempoClient()
607
+ * const client = createClient({
608
+ * chain: tempo,
609
+ * transport: http(),
610
+ * }).extend(tempoActions())
525
611
  *
526
612
  * const level = await client.dex.getPriceLevel({
527
613
  * base: '0x20c...11',
@@ -539,9 +625,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
539
625
  *
540
626
  * @example
541
627
  * ```ts
542
- * import { createTempoClient } from 'tempo.ts/viem'
628
+ * import { createClient, http } from 'viem'
629
+ * import { tempo } from 'tempo.ts/chains'
630
+ * import { tempoActions } from 'tempo.ts/viem'
543
631
  *
544
- * const client = createTempoClient()
632
+ * const client = createClient({
633
+ * chain: tempo,
634
+ * transport: http(),
635
+ * }).extend(tempoActions())
545
636
  *
546
637
  * const amountOut = await client.dex.getSellQuote({
547
638
  * tokenIn: '0x20c...11',
@@ -559,12 +650,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
559
650
  *
560
651
  * @example
561
652
  * ```ts
562
- * import { createTempoClient, Tick } from 'tempo.ts/viem'
653
+ * import { createClient, http } from 'viem'
563
654
  * import { privateKeyToAccount } from 'viem/accounts'
655
+ * import { tempo } from 'tempo.ts/chains'
656
+ * import { tempoActions, Tick } from 'tempo.ts/viem'
564
657
  *
565
- * const client = createTempoClient({
566
- * account: privateKeyToAccount('0x...')
567
- * })
658
+ * const client = createClient({
659
+ * account: privateKeyToAccount('0x...'),
660
+ * chain: tempo,
661
+ * transport: http(),
662
+ * }).extend(tempoActions())
568
663
  *
569
664
  * const hash = await client.dex.place({
570
665
  * token: '0x20c...11',
@@ -583,12 +678,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
583
678
  *
584
679
  * @example
585
680
  * ```ts
586
- * import { createTempoClient, Tick } from 'tempo.ts/viem'
681
+ * import { createClient, http } from 'viem'
587
682
  * import { privateKeyToAccount } from 'viem/accounts'
683
+ * import { tempo } from 'tempo.ts/chains'
684
+ * import { tempoActions, Tick } from 'tempo.ts/viem'
588
685
  *
589
- * const client = createTempoClient({
590
- * account: privateKeyToAccount('0x...')
591
- * })
686
+ * const client = createClient({
687
+ * account: privateKeyToAccount('0x...'),
688
+ * chain: tempo,
689
+ * transport: http(),
690
+ * }).extend(tempoActions())
592
691
  *
593
692
  * const result = await client.dex.placeSync({
594
693
  * token: '0x20c...11',
@@ -607,12 +706,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
607
706
  *
608
707
  * @example
609
708
  * ```ts
610
- * import { createTempoClient, Tick } from 'tempo.ts/viem'
709
+ * import { createClient, http } from 'viem'
611
710
  * import { privateKeyToAccount } from 'viem/accounts'
711
+ * import { tempo } from 'tempo.ts/chains'
712
+ * import { tempoActions, Tick } from 'tempo.ts/viem'
612
713
  *
613
- * const client = createTempoClient({
614
- * account: privateKeyToAccount('0x...')
615
- * })
714
+ * const client = createClient({
715
+ * account: privateKeyToAccount('0x...'),
716
+ * chain: tempo,
717
+ * transport: http(),
718
+ * }).extend(tempoActions())
616
719
  *
617
720
  * const hash = await client.dex.placeFlip({
618
721
  * token: '0x20c...11',
@@ -632,12 +735,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
632
735
  *
633
736
  * @example
634
737
  * ```ts
635
- * import { createTempoClient, Tick } from 'tempo.ts/viem'
738
+ * import { createClient, http } from 'viem'
636
739
  * import { privateKeyToAccount } from 'viem/accounts'
740
+ * import { tempo } from 'tempo.ts/chains'
741
+ * import { tempoActions, Tick } from 'tempo.ts/viem'
637
742
  *
638
- * const client = createTempoClient({
639
- * account: privateKeyToAccount('0x...')
640
- * })
743
+ * const client = createClient({
744
+ * account: privateKeyToAccount('0x...'),
745
+ * chain: tempo,
746
+ * transport: http(),
747
+ * }).extend(tempoActions())
641
748
  *
642
749
  * const result = await client.dex.placeFlipSync({
643
750
  * token: '0x20c...11',
@@ -657,12 +764,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
657
764
  *
658
765
  * @example
659
766
  * ```ts
660
- * import { createTempoClient } from 'tempo.ts/viem'
767
+ * import { createClient, http } from 'viem'
661
768
  * import { privateKeyToAccount } from 'viem/accounts'
769
+ * import { tempo } from 'tempo.ts/chains'
770
+ * import { tempoActions } from 'tempo.ts/viem'
662
771
  *
663
- * const client = createTempoClient({
664
- * account: privateKeyToAccount('0x...')
665
- * })
772
+ * const client = createClient({
773
+ * account: privateKeyToAccount('0x...'),
774
+ * chain: tempo,
775
+ * transport: http(),
776
+ * }).extend(tempoActions())
666
777
  *
667
778
  * const hash = await client.dex.sell({
668
779
  * tokenIn: '0x20c...11',
@@ -681,12 +792,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
681
792
  *
682
793
  * @example
683
794
  * ```ts
684
- * import { createTempoClient } from 'tempo.ts/viem'
795
+ * import { createClient, http } from 'viem'
685
796
  * import { privateKeyToAccount } from 'viem/accounts'
797
+ * import { tempo } from 'tempo.ts/chains'
798
+ * import { tempoActions } from 'tempo.ts/viem'
686
799
  *
687
- * const client = createTempoClient({
688
- * account: privateKeyToAccount('0x...')
689
- * })
800
+ * const client = createClient({
801
+ * account: privateKeyToAccount('0x...'),
802
+ * chain: tempo,
803
+ * transport: http(),
804
+ * }).extend(tempoActions())
690
805
  *
691
806
  * const result = await client.dex.sellSync({
692
807
  * tokenIn: '0x20c...11',
@@ -705,12 +820,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
705
820
  *
706
821
  * @example
707
822
  * ```ts
708
- * import { createTempoClient } from 'tempo.ts/viem'
823
+ * import { createClient, http } from 'viem'
709
824
  * import { privateKeyToAccount } from 'viem/accounts'
825
+ * import { tempo } from 'tempo.ts/chains'
826
+ * import { tempoActions } from 'tempo.ts/viem'
710
827
  *
711
- * const client = createTempoClient({
712
- * account: privateKeyToAccount('0x...')
713
- * })
828
+ * const client = createClient({
829
+ * account: privateKeyToAccount('0x...'),
830
+ * chain: tempo,
831
+ * transport: http(),
832
+ * }).extend(tempoActions())
714
833
  *
715
834
  * const hash = await client.dex.withdraw({
716
835
  * token: '0x20c...11',
@@ -727,12 +846,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
727
846
  *
728
847
  * @example
729
848
  * ```ts
730
- * import { createTempoClient } from 'tempo.ts/viem'
849
+ * import { createClient, http } from 'viem'
731
850
  * import { privateKeyToAccount } from 'viem/accounts'
851
+ * import { tempo } from 'tempo.ts/chains'
852
+ * import { tempoActions } from 'tempo.ts/viem'
732
853
  *
733
- * const client = createTempoClient({
734
- * account: privateKeyToAccount('0x...')
735
- * })
854
+ * const client = createClient({
855
+ * account: privateKeyToAccount('0x...'),
856
+ * chain: tempo,
857
+ * transport: http(),
858
+ * }).extend(tempoActions())
736
859
  *
737
860
  * const result = await client.dex.withdrawSync({
738
861
  * token: '0x20c...11',
@@ -749,9 +872,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
749
872
  *
750
873
  * @example
751
874
  * ```ts
752
- * import { createTempoClient } from 'tempo.ts/viem'
875
+ * import { createClient, http } from 'viem'
876
+ * import { tempo } from 'tempo.ts/chains'
877
+ * import { tempoActions } from 'tempo.ts/viem'
753
878
  *
754
- * const client = createTempoClient()
879
+ * const client = createClient({
880
+ * chain: tempo,
881
+ * transport: http(),
882
+ * }).extend(tempoActions())
755
883
  *
756
884
  * const unwatch = client.dex.watchFlipOrderPlaced({
757
885
  * onFlipOrderPlaced: (args, log) => {
@@ -769,9 +897,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
769
897
  *
770
898
  * @example
771
899
  * ```ts
772
- * import { createTempoClient } from 'tempo.ts/viem'
900
+ * import { createClient, http } from 'viem'
901
+ * import { tempo } from 'tempo.ts/chains'
902
+ * import { tempoActions } from 'tempo.ts/viem'
773
903
  *
774
- * const client = createTempoClient()
904
+ * const client = createClient({
905
+ * chain: tempo,
906
+ * transport: http(),
907
+ * }).extend(tempoActions())
775
908
  *
776
909
  * const unwatch = client.dex.watchOrderCancelled({
777
910
  * onOrderCancelled: (args, log) => {
@@ -789,9 +922,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
789
922
  *
790
923
  * @example
791
924
  * ```ts
792
- * import { createTempoClient } from 'tempo.ts/viem'
925
+ * import { createClient, http } from 'viem'
926
+ * import { tempo } from 'tempo.ts/chains'
927
+ * import { tempoActions } from 'tempo.ts/viem'
793
928
  *
794
- * const client = createTempoClient()
929
+ * const client = createClient({
930
+ * chain: tempo,
931
+ * transport: http(),
932
+ * }).extend(tempoActions())
795
933
  *
796
934
  * const unwatch = client.dex.watchOrderFilled({
797
935
  * onOrderFilled: (args, log) => {
@@ -809,9 +947,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
809
947
  *
810
948
  * @example
811
949
  * ```ts
812
- * import { createTempoClient } from 'tempo.ts/viem'
950
+ * import { createClient, http } from 'viem'
951
+ * import { tempo } from 'tempo.ts/chains'
952
+ * import { tempoActions } from 'tempo.ts/viem'
813
953
  *
814
- * const client = createTempoClient()
954
+ * const client = createClient({
955
+ * chain: tempo,
956
+ * transport: http(),
957
+ * }).extend(tempoActions())
815
958
  *
816
959
  * const unwatch = client.dex.watchOrderPlaced({
817
960
  * onOrderPlaced: (args, log) => {
@@ -831,12 +974,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
831
974
  *
832
975
  * @example
833
976
  * ```ts
834
- * import { createTempoClient } from 'tempo.ts/viem'
977
+ * import { createClient, http } from 'viem'
835
978
  * import { privateKeyToAccount } from 'viem/accounts'
979
+ * import { tempo } from 'tempo.ts/chains'
980
+ * import { tempoActions } from 'tempo.ts/viem'
836
981
  *
837
- * const client = createTempoClient({
838
- * account: privateKeyToAccount('0x...')
839
- * })
982
+ * const client = createClient({
983
+ * account: privateKeyToAccount('0x...'),
984
+ * chain: tempo,
985
+ * transport: http(),
986
+ * }).extend(tempoActions())
840
987
  *
841
988
  * const { address, id } = await client.token.getUserToken()
842
989
  * ```
@@ -851,12 +998,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
851
998
  *
852
999
  * @example
853
1000
  * ```ts
854
- * import { createTempoClient } from 'tempo.ts/viem'
1001
+ * import { createClient, http } from 'viem'
855
1002
  * import { privateKeyToAccount } from 'viem/accounts'
1003
+ * import { tempo } from 'tempo.ts/chains'
1004
+ * import { tempoActions } from 'tempo.ts/viem'
856
1005
  *
857
- * const client = createTempoClient({
858
- * account: privateKeyToAccount('0x...')
859
- * })
1006
+ * const client = createClient({
1007
+ * account: privateKeyToAccount('0x...'),
1008
+ * chain: tempo,
1009
+ * transport: http(),
1010
+ * }).extend(tempoActions())
860
1011
  *
861
1012
  * const hash = await client.token.setUserToken({
862
1013
  * token: '0x...',
@@ -873,12 +1024,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
873
1024
  *
874
1025
  * @example
875
1026
  * ```ts
876
- * import { createTempoClient } from 'tempo.ts/viem'
1027
+ * import { createClient, http } from 'viem'
877
1028
  * import { privateKeyToAccount } from 'viem/accounts'
1029
+ * import { tempo } from 'tempo.ts/chains'
1030
+ * import { tempoActions } from 'tempo.ts/viem'
878
1031
  *
879
- * const client = createTempoClient({
880
- * account: privateKeyToAccount('0x...')
881
- * })
1032
+ * const client = createClient({
1033
+ * account: privateKeyToAccount('0x...'),
1034
+ * chain: tempo,
1035
+ * transport: http(),
1036
+ * }).extend(tempoActions())
882
1037
  *
883
1038
  * const result = await client.fee.setUserTokenSync({
884
1039
  * token: '0x...',
@@ -894,9 +1049,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
894
1049
  *
895
1050
  * @example
896
1051
  * ```ts
897
- * import { createTempoClient } from 'tempo.ts/viem'
1052
+ * import { createClient, http } from 'viem'
1053
+ * import { tempo } from 'tempo.ts/chains'
1054
+ * import { tempoActions } from 'tempo.ts/viem'
898
1055
  *
899
- * const client = createTempoClient()
1056
+ * const client = createClient({
1057
+ * chain: tempo,
1058
+ * transport: http(),
1059
+ * }).extend(tempoActions())
900
1060
  *
901
1061
  * const unwatch = client.token.watchSetUserToken({
902
1062
  * onUserTokenSet: (args, log) => {
@@ -917,12 +1077,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
917
1077
  *
918
1078
  * @example
919
1079
  * ```ts
920
- * import { createTempoClient } from 'tempo.ts/viem'
1080
+ * import { createClient, http } from 'viem'
921
1081
  * import { privateKeyToAccount } from 'viem/accounts'
1082
+ * import { tempo } from 'tempo.ts/chains'
1083
+ * import { tempoActions } from 'tempo.ts/viem'
922
1084
  *
923
- * const client = createTempoClient({
924
- * account: privateKeyToAccount('0x...')
925
- * })
1085
+ * const client = createClient({
1086
+ * account: privateKeyToAccount('0x...'),
1087
+ * chain: tempo,
1088
+ * transport: http(),
1089
+ * }).extend(tempoActions())
926
1090
  *
927
1091
  * const hash = await client.policy.create({
928
1092
  * admin: '0x...',
@@ -939,12 +1103,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
939
1103
  *
940
1104
  * @example
941
1105
  * ```ts
942
- * import { createTempoClient } from 'tempo.ts/viem'
1106
+ * import { createClient, http } from 'viem'
943
1107
  * import { privateKeyToAccount } from 'viem/accounts'
1108
+ * import { tempo } from 'tempo.ts/chains'
1109
+ * import { tempoActions } from 'tempo.ts/viem'
944
1110
  *
945
- * const client = createTempoClient({
946
- * account: privateKeyToAccount('0x...')
947
- * })
1111
+ * const client = createClient({
1112
+ * account: privateKeyToAccount('0x...'),
1113
+ * chain: tempo,
1114
+ * transport: http(),
1115
+ * }).extend(tempoActions())
948
1116
  *
949
1117
  * const result = await client.policy.createSync({
950
1118
  * admin: '0x...',
@@ -961,12 +1129,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
961
1129
  *
962
1130
  * @example
963
1131
  * ```ts
964
- * import { createTempoClient } from 'tempo.ts/viem'
1132
+ * import { createClient, http } from 'viem'
965
1133
  * import { privateKeyToAccount } from 'viem/accounts'
1134
+ * import { tempo } from 'tempo.ts/chains'
1135
+ * import { tempoActions } from 'tempo.ts/viem'
966
1136
  *
967
- * const client = createTempoClient({
968
- * account: privateKeyToAccount('0x...')
969
- * })
1137
+ * const client = createClient({
1138
+ * account: privateKeyToAccount('0x...'),
1139
+ * chain: tempo,
1140
+ * transport: http(),
1141
+ * }).extend(tempoActions())
970
1142
  *
971
1143
  * const hash = await client.policy.setAdmin({
972
1144
  * policyId: 2n,
@@ -983,12 +1155,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
983
1155
  *
984
1156
  * @example
985
1157
  * ```ts
986
- * import { createTempoClient } from 'tempo.ts/viem'
1158
+ * import { createClient, http } from 'viem'
987
1159
  * import { privateKeyToAccount } from 'viem/accounts'
1160
+ * import { tempo } from 'tempo.ts/chains'
1161
+ * import { tempoActions } from 'tempo.ts/viem'
988
1162
  *
989
- * const client = createTempoClient({
990
- * account: privateKeyToAccount('0x...')
991
- * })
1163
+ * const client = createClient({
1164
+ * account: privateKeyToAccount('0x...'),
1165
+ * chain: tempo,
1166
+ * transport: http(),
1167
+ * }).extend(tempoActions())
992
1168
  *
993
1169
  * const result = await client.policy.setAdminSync({
994
1170
  * policyId: 2n,
@@ -1005,12 +1181,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1005
1181
  *
1006
1182
  * @example
1007
1183
  * ```ts
1008
- * import { createTempoClient } from 'tempo.ts/viem'
1184
+ * import { createClient, http } from 'viem'
1009
1185
  * import { privateKeyToAccount } from 'viem/accounts'
1186
+ * import { tempo } from 'tempo.ts/chains'
1187
+ * import { tempoActions } from 'tempo.ts/viem'
1010
1188
  *
1011
- * const client = createTempoClient({
1012
- * account: privateKeyToAccount('0x...')
1013
- * })
1189
+ * const client = createClient({
1190
+ * account: privateKeyToAccount('0x...'),
1191
+ * chain: tempo,
1192
+ * transport: http(),
1193
+ * }).extend(tempoActions())
1014
1194
  *
1015
1195
  * const hash = await client.policy.modifyWhitelist({
1016
1196
  * policyId: 2n,
@@ -1028,12 +1208,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1028
1208
  *
1029
1209
  * @example
1030
1210
  * ```ts
1031
- * import { createTempoClient } from 'tempo.ts/viem'
1211
+ * import { createClient, http } from 'viem'
1032
1212
  * import { privateKeyToAccount } from 'viem/accounts'
1213
+ * import { tempo } from 'tempo.ts/chains'
1214
+ * import { tempoActions } from 'tempo.ts/viem'
1033
1215
  *
1034
- * const client = createTempoClient({
1035
- * account: privateKeyToAccount('0x...')
1036
- * })
1216
+ * const client = createClient({
1217
+ * account: privateKeyToAccount('0x...'),
1218
+ * chain: tempo,
1219
+ * transport: http(),
1220
+ * }).extend(tempoActions())
1037
1221
  *
1038
1222
  * const result = await client.policy.modifyWhitelistSync({
1039
1223
  * policyId: 2n,
@@ -1051,12 +1235,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1051
1235
  *
1052
1236
  * @example
1053
1237
  * ```ts
1054
- * import { createTempoClient } from 'tempo.ts/viem'
1238
+ * import { createClient, http } from 'viem'
1055
1239
  * import { privateKeyToAccount } from 'viem/accounts'
1240
+ * import { tempo } from 'tempo.ts/chains'
1241
+ * import { tempoActions } from 'tempo.ts/viem'
1056
1242
  *
1057
- * const client = createTempoClient({
1058
- * account: privateKeyToAccount('0x...')
1059
- * })
1243
+ * const client = createClient({
1244
+ * account: privateKeyToAccount('0x...'),
1245
+ * chain: tempo,
1246
+ * transport: http(),
1247
+ * }).extend(tempoActions())
1060
1248
  *
1061
1249
  * const hash = await client.policy.modifyBlacklist({
1062
1250
  * policyId: 2n,
@@ -1074,12 +1262,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1074
1262
  *
1075
1263
  * @example
1076
1264
  * ```ts
1077
- * import { createTempoClient } from 'tempo.ts/viem'
1265
+ * import { createClient, http } from 'viem'
1078
1266
  * import { privateKeyToAccount } from 'viem/accounts'
1267
+ * import { tempo } from 'tempo.ts/chains'
1268
+ * import { tempoActions } from 'tempo.ts/viem'
1079
1269
  *
1080
- * const client = createTempoClient({
1081
- * account: privateKeyToAccount('0x...')
1082
- * })
1270
+ * const client = createClient({
1271
+ * account: privateKeyToAccount('0x...'),
1272
+ * chain: tempo,
1273
+ * transport: http(),
1274
+ * }).extend(tempoActions())
1083
1275
  *
1084
1276
  * const result = await client.policy.modifyBlacklistSync({
1085
1277
  * policyId: 2n,
@@ -1097,9 +1289,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1097
1289
  *
1098
1290
  * @example
1099
1291
  * ```ts
1100
- * import { createTempoClient } from 'tempo.ts/viem'
1292
+ * import { createClient, http } from 'viem'
1293
+ * import { tempo } from 'tempo.ts/chains'
1294
+ * import { tempoActions } from 'tempo.ts/viem'
1101
1295
  *
1102
- * const client = createTempoClient()
1296
+ * const client = createClient({
1297
+ * chain: tempo,
1298
+ * transport: http(),
1299
+ * }).extend(tempoActions())
1103
1300
  *
1104
1301
  * const data = await client.policy.getData({
1105
1302
  * policyId: 2n,
@@ -1115,9 +1312,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1115
1312
  *
1116
1313
  * @example
1117
1314
  * ```ts
1118
- * import { createTempoClient } from 'tempo.ts/viem'
1315
+ * import { createClient, http } from 'viem'
1316
+ * import { tempo } from 'tempo.ts/chains'
1317
+ * import { tempoActions } from 'tempo.ts/viem'
1119
1318
  *
1120
- * const client = createTempoClient()
1319
+ * const client = createClient({
1320
+ * chain: tempo,
1321
+ * transport: http(),
1322
+ * }).extend(tempoActions())
1121
1323
  *
1122
1324
  * const authorized = await client.policy.isAuthorized({
1123
1325
  * policyId: 2n,
@@ -1134,9 +1336,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1134
1336
  *
1135
1337
  * @example
1136
1338
  * ```ts
1137
- * import { createTempoClient } from 'tempo.ts/viem'
1339
+ * import { createClient, http } from 'viem'
1340
+ * import { tempo } from 'tempo.ts/chains'
1341
+ * import { tempoActions } from 'tempo.ts/viem'
1138
1342
  *
1139
- * const client = createTempoClient()
1343
+ * const client = createClient({
1344
+ * chain: tempo,
1345
+ * transport: http(),
1346
+ * }).extend(tempoActions())
1140
1347
  *
1141
1348
  * const unwatch = client.policy.watchCreate({
1142
1349
  * onPolicyCreated: (args, log) => {
@@ -1154,9 +1361,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1154
1361
  *
1155
1362
  * @example
1156
1363
  * ```ts
1157
- * import { createTempoClient } from 'tempo.ts/viem'
1158
- *
1159
- * const client = createTempoClient()
1364
+ * import { createClient, http } from 'viem'
1365
+ * import { tempo } from 'tempo.ts/chains'
1366
+ * import { tempoActions } from 'tempo.ts/viem'
1367
+ *
1368
+ * const client = createClient({
1369
+ * chain: tempo,
1370
+ * transport: http(),
1371
+ * }).extend(tempoActions())
1160
1372
  *
1161
1373
  * const unwatch = client.policy.watchAdminUpdated({
1162
1374
  * onAdminUpdated: (args, log) => {
@@ -1174,9 +1386,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1174
1386
  *
1175
1387
  * @example
1176
1388
  * ```ts
1177
- * import { createTempoClient } from 'tempo.ts/viem'
1389
+ * import { createClient, http } from 'viem'
1390
+ * import { tempo } from 'tempo.ts/chains'
1391
+ * import { tempoActions } from 'tempo.ts/viem'
1178
1392
  *
1179
- * const client = createTempoClient()
1393
+ * const client = createClient({
1394
+ * chain: tempo,
1395
+ * transport: http(),
1396
+ * }).extend(tempoActions())
1180
1397
  *
1181
1398
  * const unwatch = client.policy.watchWhitelistUpdated({
1182
1399
  * onWhitelistUpdated: (args, log) => {
@@ -1194,9 +1411,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1194
1411
  *
1195
1412
  * @example
1196
1413
  * ```ts
1197
- * import { createTempoClient } from 'tempo.ts/viem'
1414
+ * import { createClient, http } from 'viem'
1415
+ * import { tempo } from 'tempo.ts/chains'
1416
+ * import { tempoActions } from 'tempo.ts/viem'
1198
1417
  *
1199
- * const client = createTempoClient()
1418
+ * const client = createClient({
1419
+ * chain: tempo,
1420
+ * transport: http(),
1421
+ * }).extend(tempoActions())
1200
1422
  *
1201
1423
  * const unwatch = client.policy.watchBlacklistUpdated({
1202
1424
  * onBlacklistUpdated: (args, log) => {
@@ -1210,18 +1432,229 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1210
1432
  */
1211
1433
  watchBlacklistUpdated: (parameters: policyActions.watchBlacklistUpdated.Parameters) => () => void;
1212
1434
  };
1435
+ reward: {
1436
+ /**
1437
+ * Cancels an active reward stream and refunds remaining tokens.
1438
+ *
1439
+ * @example
1440
+ * ```ts
1441
+ * import { createClient, http } from 'viem'
1442
+ * import { privateKeyToAccount } from 'viem/accounts'
1443
+ * import { tempo } from 'tempo.ts/chains'
1444
+ * import { tempoActions } from 'tempo.ts/viem'
1445
+ *
1446
+ * const client = createClient({
1447
+ * account: privateKeyToAccount('0x...'),
1448
+ * chain: tempo,
1449
+ * transport: http(),
1450
+ * }).extend(tempoActions())
1451
+ *
1452
+ * const hash = await client.reward.cancel({
1453
+ * id: 1n,
1454
+ * token: '0x20c0000000000000000000000000000000000001',
1455
+ * })
1456
+ * ```
1457
+ *
1458
+ * @param parameters - Parameters.
1459
+ * @returns The transaction hash.
1460
+ */
1461
+ cancel: (parameters: rewardActions.cancel.Parameters<chain, account>) => Promise<rewardActions.cancel.ReturnValue>;
1462
+ /**
1463
+ * Cancels an active reward stream and waits for confirmation.
1464
+ *
1465
+ * @example
1466
+ * ```ts
1467
+ * import { createClient, http } from 'viem'
1468
+ * import { privateKeyToAccount } from 'viem/accounts'
1469
+ * import { tempo } from 'tempo.ts/chains'
1470
+ * import { tempoActions } from 'tempo.ts/viem'
1471
+ *
1472
+ * const client = createClient({
1473
+ * account: privateKeyToAccount('0x...'),
1474
+ * chain: tempo,
1475
+ * transport: http(),
1476
+ * }).extend(tempoActions())
1477
+ *
1478
+ * const result = await client.reward.cancelSync({
1479
+ * id: 1n,
1480
+ * token: '0x20c0000000000000000000000000000000000001',
1481
+ * })
1482
+ * ```
1483
+ *
1484
+ * @param parameters - Parameters.
1485
+ * @returns The transaction receipt and event data.
1486
+ */
1487
+ cancelSync: (parameters: rewardActions.cancelSync.Parameters<chain, account>) => Promise<rewardActions.cancelSync.ReturnValue>;
1488
+ /**
1489
+ * Gets a reward stream by its ID.
1490
+ *
1491
+ * @example
1492
+ * ```ts
1493
+ * import { createClient, http } from 'viem'
1494
+ * import { tempo } from 'tempo.ts/chains'
1495
+ * import { tempoActions } from 'tempo.ts/viem'
1496
+ *
1497
+ * const client = createClient({
1498
+ * chain: tempo,
1499
+ * transport: http(),
1500
+ * }).extend(tempoActions())
1501
+ *
1502
+ * const stream = await client.reward.getStream({
1503
+ * id: 1n,
1504
+ * token: '0x20c0000000000000000000000000000000000001',
1505
+ * })
1506
+ * ```
1507
+ *
1508
+ * @param parameters - Parameters.
1509
+ * @returns The reward stream details.
1510
+ */
1511
+ getStream: (parameters: rewardActions.getStream.Parameters) => Promise<rewardActions.getStream.ReturnValue>;
1512
+ /**
1513
+ * Gets the total reward per second rate for all active streams.
1514
+ *
1515
+ * @example
1516
+ * ```ts
1517
+ * import { createClient, http } from 'viem'
1518
+ * import { tempo } from 'tempo.ts/chains'
1519
+ * import { tempoActions } from 'tempo.ts/viem'
1520
+ *
1521
+ * const client = createClient({
1522
+ * chain: tempo,
1523
+ * transport: http(),
1524
+ * }).extend(tempoActions())
1525
+ *
1526
+ * const rate = await client.reward.getTotalPerSecond({
1527
+ * token: '0x20c0000000000000000000000000000000000001',
1528
+ * })
1529
+ * ```
1530
+ *
1531
+ * @param parameters - Parameters.
1532
+ * @returns The total reward per second (scaled by 1e18).
1533
+ */
1534
+ getTotalPerSecond: (parameters: rewardActions.getTotalPerSecond.Parameters) => Promise<rewardActions.getTotalPerSecond.ReturnValue>;
1535
+ /**
1536
+ * Sets or changes the reward recipient for a token holder.
1537
+ *
1538
+ * @example
1539
+ * ```ts
1540
+ * import { createClient, http } from 'viem'
1541
+ * import { privateKeyToAccount } from 'viem/accounts'
1542
+ * import { tempo } from 'tempo.ts/chains'
1543
+ * import { tempoActions } from 'tempo.ts/viem'
1544
+ *
1545
+ * const client = createClient({
1546
+ * account: privateKeyToAccount('0x...'),
1547
+ * chain: tempo,
1548
+ * transport: http(),
1549
+ * }).extend(tempoActions())
1550
+ *
1551
+ * const hash = await client.reward.setRecipient({
1552
+ * recipient: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
1553
+ * token: '0x20c0000000000000000000000000000000000001',
1554
+ * })
1555
+ * ```
1556
+ *
1557
+ * @param parameters - Parameters.
1558
+ * @returns The transaction hash.
1559
+ */
1560
+ setRecipient: (parameters: rewardActions.setRecipient.Parameters<chain, account>) => Promise<rewardActions.setRecipient.ReturnValue>;
1561
+ /**
1562
+ * Sets or changes the reward recipient for a token holder and waits for confirmation.
1563
+ *
1564
+ * @example
1565
+ * ```ts
1566
+ * import { createClient, http } from 'viem'
1567
+ * import { privateKeyToAccount } from 'viem/accounts'
1568
+ * import { tempo } from 'tempo.ts/chains'
1569
+ * import { tempoActions } from 'tempo.ts/viem'
1570
+ *
1571
+ * const client = createClient({
1572
+ * account: privateKeyToAccount('0x...'),
1573
+ * chain: tempo,
1574
+ * transport: http(),
1575
+ * }).extend(tempoActions())
1576
+ *
1577
+ * const result = await client.reward.setRecipientSync({
1578
+ * recipient: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
1579
+ * token: '0x20c0000000000000000000000000000000000001',
1580
+ * })
1581
+ * ```
1582
+ *
1583
+ * @param parameters - Parameters.
1584
+ * @returns The transaction receipt and event data.
1585
+ */
1586
+ setRecipientSync: (parameters: rewardActions.setRecipientSync.Parameters<chain, account>) => Promise<rewardActions.setRecipientSync.ReturnValue>;
1587
+ /**
1588
+ * Starts a new reward stream that distributes tokens to opted-in holders.
1589
+ *
1590
+ * @example
1591
+ * ```ts
1592
+ * import { createClient, http } from 'viem'
1593
+ * import { privateKeyToAccount } from 'viem/accounts'
1594
+ * import { tempo } from 'tempo.ts/chains'
1595
+ * import { tempoActions } from 'tempo.ts/viem'
1596
+ *
1597
+ * const client = createClient({
1598
+ * account: privateKeyToAccount('0x...'),
1599
+ * chain: tempo,
1600
+ * transport: http(),
1601
+ * }).extend(tempoActions())
1602
+ *
1603
+ * const hash = await client.reward.start({
1604
+ * amount: 100000000000000000000n,
1605
+ * seconds: 86400,
1606
+ * token: '0x20c0000000000000000000000000000000000001',
1607
+ * })
1608
+ * ```
1609
+ *
1610
+ * @param parameters - Parameters.
1611
+ * @returns The transaction hash.
1612
+ */
1613
+ start: (parameters: rewardActions.start.Parameters<chain, account>) => Promise<rewardActions.start.ReturnValue>;
1614
+ /**
1615
+ * Starts a new reward stream that distributes tokens to opted-in holders and waits for confirmation.
1616
+ *
1617
+ * @example
1618
+ * ```ts
1619
+ * import { createClient, http } from 'viem'
1620
+ * import { privateKeyToAccount } from 'viem/accounts'
1621
+ * import { tempo } from 'tempo.ts/chains'
1622
+ * import { tempoActions } from 'tempo.ts/viem'
1623
+ *
1624
+ * const client = createClient({
1625
+ * account: privateKeyToAccount('0x...'),
1626
+ * chain: tempo,
1627
+ * transport: http(),
1628
+ * }).extend(tempoActions())
1629
+ *
1630
+ * const result = await client.reward.startSync({
1631
+ * amount: 100000000000000000000n,
1632
+ * seconds: 86400,
1633
+ * token: '0x20c0000000000000000000000000000000000001',
1634
+ * })
1635
+ * ```
1636
+ *
1637
+ * @param parameters - Parameters.
1638
+ * @returns The transaction receipt and event data.
1639
+ */
1640
+ startSync: (parameters: rewardActions.startSync.Parameters<chain, account>) => Promise<rewardActions.startSync.ReturnValue>;
1641
+ };
1213
1642
  token: {
1214
1643
  /**
1215
1644
  * Approves a spender to transfer TIP20 tokens on behalf of the caller.
1216
1645
  *
1217
1646
  * @example
1218
1647
  * ```ts
1219
- * import { createTempoClient } from 'tempo.ts/viem'
1648
+ * import { createClient, http } from 'viem'
1220
1649
  * import { privateKeyToAccount } from 'viem/accounts'
1650
+ * import { tempo } from 'tempo.ts/chains'
1651
+ * import { tempoActions } from 'tempo.ts/viem'
1221
1652
  *
1222
- * const client = createTempoClient({
1223
- * account: privateKeyToAccount('0x...')
1224
- * })
1653
+ * const client = createClient({
1654
+ * account: privateKeyToAccount('0x...'),
1655
+ * chain: tempo,
1656
+ * transport: http(),
1657
+ * }).extend(tempoActions())
1225
1658
  *
1226
1659
  * const hash = await client.token.approve({
1227
1660
  * spender: '0x...',
@@ -1239,12 +1672,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1239
1672
  *
1240
1673
  * @example
1241
1674
  * ```ts
1242
- * import { createTempoClient } from 'tempo.ts/viem'
1675
+ * import { createClient, http } from 'viem'
1243
1676
  * import { privateKeyToAccount } from 'viem/accounts'
1677
+ * import { tempo } from 'tempo.ts/chains'
1678
+ * import { tempoActions } from 'tempo.ts/viem'
1244
1679
  *
1245
- * const client = createTempoClient({
1246
- * account: privateKeyToAccount('0x...')
1247
- * })
1680
+ * const client = createClient({
1681
+ * account: privateKeyToAccount('0x...'),
1682
+ * chain: tempo,
1683
+ * transport: http(),
1684
+ * }).extend(tempoActions())
1248
1685
  *
1249
1686
  * const result = await client.token.approveSync({
1250
1687
  * spender: '0x...',
@@ -1262,12 +1699,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1262
1699
  *
1263
1700
  * @example
1264
1701
  * ```ts
1265
- * import { createTempoClient } from 'tempo.ts/viem'
1702
+ * import { createClient, http } from 'viem'
1266
1703
  * import { privateKeyToAccount } from 'viem/accounts'
1704
+ * import { tempo } from 'tempo.ts/chains'
1705
+ * import { tempoActions } from 'tempo.ts/viem'
1267
1706
  *
1268
- * const client = createTempoClient({
1269
- * account: privateKeyToAccount('0x...')
1270
- * })
1707
+ * const client = createClient({
1708
+ * account: privateKeyToAccount('0x...'),
1709
+ * chain: tempo,
1710
+ * transport: http(),
1711
+ * }).extend(tempoActions())
1271
1712
  *
1272
1713
  * const hash = await client.token.burnBlocked({
1273
1714
  * from: '0x...',
@@ -1286,12 +1727,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1286
1727
  *
1287
1728
  * @example
1288
1729
  * ```ts
1289
- * import { createTempoClient } from 'tempo.ts/viem'
1730
+ * import { createClient, http } from 'viem'
1290
1731
  * import { privateKeyToAccount } from 'viem/accounts'
1732
+ * import { tempo } from 'tempo.ts/chains'
1733
+ * import { tempoActions } from 'tempo.ts/viem'
1291
1734
  *
1292
- * const client = createTempoClient({
1293
- * account: privateKeyToAccount('0x...')
1294
- * })
1735
+ * const client = createClient({
1736
+ * account: privateKeyToAccount('0x...'),
1737
+ * chain: tempo,
1738
+ * transport: http(),
1739
+ * }).extend(tempoActions())
1295
1740
  *
1296
1741
  * const result = await client.token.burnBlockedSync({
1297
1742
  * from: '0x...',
@@ -1310,12 +1755,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1310
1755
  *
1311
1756
  * @example
1312
1757
  * ```ts
1313
- * import { createTempoClient } from 'tempo.ts/viem'
1758
+ * import { createClient, http } from 'viem'
1314
1759
  * import { privateKeyToAccount } from 'viem/accounts'
1760
+ * import { tempo } from 'tempo.ts/chains'
1761
+ * import { tempoActions } from 'tempo.ts/viem'
1315
1762
  *
1316
- * const client = createTempoClient({
1317
- * account: privateKeyToAccount('0x...')
1318
- * })
1763
+ * const client = createClient({
1764
+ * account: privateKeyToAccount('0x...'),
1765
+ * chain: tempo,
1766
+ * transport: http(),
1767
+ * }).extend(tempoActions())
1319
1768
  *
1320
1769
  * const hash = await client.token.burn({
1321
1770
  * amount: 100n,
@@ -1333,12 +1782,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1333
1782
  *
1334
1783
  * @example
1335
1784
  * ```ts
1336
- * import { createTempoClient } from 'tempo.ts/viem'
1785
+ * import { createClient, http } from 'viem'
1337
1786
  * import { privateKeyToAccount } from 'viem/accounts'
1787
+ * import { tempo } from 'tempo.ts/chains'
1788
+ * import { tempoActions } from 'tempo.ts/viem'
1338
1789
  *
1339
- * const client = createTempoClient({
1340
- * account: privateKeyToAccount('0x...')
1341
- * })
1790
+ * const client = createClient({
1791
+ * account: privateKeyToAccount('0x...'),
1792
+ * chain: tempo,
1793
+ * transport: http(),
1794
+ * }).extend(tempoActions())
1342
1795
  *
1343
1796
  * const result = await client.token.burnSync({
1344
1797
  * amount: 100n,
@@ -1356,12 +1809,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1356
1809
  *
1357
1810
  * @example
1358
1811
  * ```ts
1359
- * import { createTempoClient } from 'tempo.ts/viem'
1812
+ * import { createClient, http } from 'viem'
1360
1813
  * import { privateKeyToAccount } from 'viem/accounts'
1814
+ * import { tempo } from 'tempo.ts/chains'
1815
+ * import { tempoActions } from 'tempo.ts/viem'
1361
1816
  *
1362
- * const client = createTempoClient({
1363
- * account: privateKeyToAccount('0x...')
1364
- * })
1817
+ * const client = createClient({
1818
+ * account: privateKeyToAccount('0x...'),
1819
+ * chain: tempo,
1820
+ * transport: http(),
1821
+ * }).extend(tempoActions())
1365
1822
  *
1366
1823
  * const hash = await client.token.changeTransferPolicy({
1367
1824
  * token: '0x...',
@@ -1379,12 +1836,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1379
1836
  *
1380
1837
  * @example
1381
1838
  * ```ts
1382
- * import { createTempoClient } from 'tempo.ts/viem'
1839
+ * import { createClient, http } from 'viem'
1383
1840
  * import { privateKeyToAccount } from 'viem/accounts'
1841
+ * import { tempo } from 'tempo.ts/chains'
1842
+ * import { tempoActions } from 'tempo.ts/viem'
1384
1843
  *
1385
- * const client = createTempoClient({
1386
- * account: privateKeyToAccount('0x...')
1387
- * })
1844
+ * const client = createClient({
1845
+ * account: privateKeyToAccount('0x...'),
1846
+ * chain: tempo,
1847
+ * transport: http(),
1848
+ * }).extend(tempoActions())
1388
1849
  *
1389
1850
  * const result = await client.token.changeTransferPolicySync({
1390
1851
  * token: '0x...',
@@ -1402,12 +1863,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1402
1863
  *
1403
1864
  * @example
1404
1865
  * ```ts
1405
- * import { createTempoClient } from 'tempo.ts/viem'
1866
+ * import { createClient, http } from 'viem'
1406
1867
  * import { privateKeyToAccount } from 'viem/accounts'
1868
+ * import { tempo } from 'tempo.ts/chains'
1869
+ * import { tempoActions } from 'tempo.ts/viem'
1407
1870
  *
1408
- * const client = createTempoClient({
1409
- * account: privateKeyToAccount('0x...')
1410
- * })
1871
+ * const client = createClient({
1872
+ * account: privateKeyToAccount('0x...'),
1873
+ * chain: tempo,
1874
+ * transport: http(),
1875
+ * }).extend(tempoActions())
1411
1876
  *
1412
1877
  * const { hash, id, address } = await client.token.create({
1413
1878
  * name: 'My Token',
@@ -1426,12 +1891,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1426
1891
  *
1427
1892
  * @example
1428
1893
  * ```ts
1429
- * import { createTempoClient } from 'tempo.ts/viem'
1894
+ * import { createClient, http } from 'viem'
1430
1895
  * import { privateKeyToAccount } from 'viem/accounts'
1896
+ * import { tempo } from 'tempo.ts/chains'
1897
+ * import { tempoActions } from 'tempo.ts/viem'
1431
1898
  *
1432
- * const client = createTempoClient({
1433
- * account: privateKeyToAccount('0x...')
1434
- * })
1899
+ * const client = createClient({
1900
+ * account: privateKeyToAccount('0x...'),
1901
+ * chain: tempo,
1902
+ * transport: http(),
1903
+ * }).extend(tempoActions())
1435
1904
  *
1436
1905
  * const result = await client.token.createSync({
1437
1906
  * name: 'My Token',
@@ -1450,12 +1919,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1450
1919
  *
1451
1920
  * @example
1452
1921
  * ```ts
1453
- * import { createTempoClient } from 'tempo.ts/viem'
1922
+ * import { createClient, http } from 'viem'
1454
1923
  * import { privateKeyToAccount } from 'viem/accounts'
1924
+ * import { tempo } from 'tempo.ts/chains'
1925
+ * import { tempoActions } from 'tempo.ts/viem'
1455
1926
  *
1456
- * const client = createTempoClient({
1457
- * account: privateKeyToAccount('0x...')
1458
- * })
1927
+ * const client = createClient({
1928
+ * account: privateKeyToAccount('0x...'),
1929
+ * chain: tempo,
1930
+ * transport: http(),
1931
+ * }).extend(tempoActions())
1459
1932
  *
1460
1933
  * const allowance = await client.token.getAllowance({
1461
1934
  * spender: '0x...',
@@ -1472,12 +1945,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1472
1945
  *
1473
1946
  * @example
1474
1947
  * ```ts
1475
- * import { createTempoClient } from 'tempo.ts/viem'
1948
+ * import { createClient, http } from 'viem'
1476
1949
  * import { privateKeyToAccount } from 'viem/accounts'
1950
+ * import { tempo } from 'tempo.ts/chains'
1951
+ * import { tempoActions } from 'tempo.ts/viem'
1477
1952
  *
1478
- * const client = createTempoClient({
1479
- * account: privateKeyToAccount('0x...')
1480
- * })
1953
+ * const client = createClient({
1954
+ * account: privateKeyToAccount('0x...'),
1955
+ * chain: tempo,
1956
+ * transport: http(),
1957
+ * }).extend(tempoActions())
1481
1958
  *
1482
1959
  * const balance = await client.token.getBalance()
1483
1960
  * ```
@@ -1486,15 +1963,20 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1486
1963
  * @param parameters - Parameters.
1487
1964
  * @returns The token balance.
1488
1965
  */
1489
- getBalance: (...parameters: account extends Account ? [tokenActions.getBalance.Parameters<account>] | [] : [tokenActions.getBalance.Parameters<account>]) => Promise<tokenActions.getBalance.ReturnValue>;
1966
+ getBalance: (parameters: tokenActions.getBalance.Parameters<account>) => Promise<tokenActions.getBalance.ReturnValue>;
1490
1967
  /**
1491
1968
  * Gets TIP20 token metadata including name, symbol, currency, decimals, and total supply.
1492
1969
  *
1493
1970
  * @example
1494
1971
  * ```ts
1495
- * import { createTempoClient } from 'tempo.ts/viem'
1972
+ * import { createClient, http } from 'viem'
1973
+ * import { tempo } from 'tempo.ts/chains'
1974
+ * import { tempoActions } from 'tempo.ts/viem'
1496
1975
  *
1497
- * const client = createTempoClient()
1976
+ * const client = createClient({
1977
+ * chain: tempo,
1978
+ * transport: http(),
1979
+ * }).extend(tempoActions())
1498
1980
  *
1499
1981
  * const metadata = await client.token.getMetadata({
1500
1982
  * token: '0x...',
@@ -1506,17 +1988,46 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1506
1988
  * @returns The token metadata.
1507
1989
  */
1508
1990
  getMetadata: (parameters: tokenActions.getMetadata.Parameters) => Promise<tokenActions.getMetadata.ReturnValue>;
1991
+ /**
1992
+ * Gets the admin role for a specific role in a TIP20 token.
1993
+ *
1994
+ * @example
1995
+ * ```ts
1996
+ * import { createClient, http } from 'viem'
1997
+ * import { tempo } from 'tempo.ts/chains'
1998
+ * import { tempoActions } from 'tempo.ts/viem'
1999
+ *
2000
+ * const client = createClient({
2001
+ * chain: tempo,
2002
+ * transport: http(),
2003
+ * }).extend(tempoActions())
2004
+ *
2005
+ * const adminRole = await client.token.getRoleAdmin({
2006
+ * role: 'minter',
2007
+ * token: '0x...',
2008
+ * })
2009
+ * ```
2010
+ *
2011
+ * @param client - Client.
2012
+ * @param parameters - Parameters.
2013
+ * @returns The admin role hash.
2014
+ */
2015
+ getRoleAdmin: (parameters: tokenActions.getRoleAdmin.Parameters) => Promise<tokenActions.getRoleAdmin.ReturnValue>;
1509
2016
  /**
1510
2017
  * Checks if an account has a specific role for a TIP20 token.
1511
2018
  *
1512
2019
  * @example
1513
2020
  * ```ts
1514
- * import { createTempoClient } from 'tempo.ts/viem'
2021
+ * import { createClient, http } from 'viem'
1515
2022
  * import { privateKeyToAccount } from 'viem/accounts'
2023
+ * import { tempo } from 'tempo.ts/chains'
2024
+ * import { tempoActions } from 'tempo.ts/viem'
1516
2025
  *
1517
- * const client = createTempoClient({
1518
- * account: privateKeyToAccount('0x...')
1519
- * })
2026
+ * const client = createClient({
2027
+ * account: privateKeyToAccount('0x...'),
2028
+ * chain: tempo,
2029
+ * transport: http(),
2030
+ * }).extend(tempoActions())
1520
2031
  *
1521
2032
  * const hasRole = await client.token.hasRole({
1522
2033
  * token: '0x...',
@@ -1534,12 +2045,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1534
2045
  *
1535
2046
  * @example
1536
2047
  * ```ts
1537
- * import { createTempoClient } from 'tempo.ts/viem'
2048
+ * import { createClient, http } from 'viem'
1538
2049
  * import { privateKeyToAccount } from 'viem/accounts'
2050
+ * import { tempo } from 'tempo.ts/chains'
2051
+ * import { tempoActions } from 'tempo.ts/viem'
1539
2052
  *
1540
- * const client = createTempoClient({
1541
- * account: privateKeyToAccount('0x...')
1542
- * })
2053
+ * const client = createClient({
2054
+ * account: privateKeyToAccount('0x...'),
2055
+ * chain: tempo,
2056
+ * transport: http(),
2057
+ * }).extend(tempoActions())
1543
2058
  *
1544
2059
  * const hash = await client.token.grantRoles({
1545
2060
  * token: '0x...',
@@ -1558,16 +2073,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1558
2073
  *
1559
2074
  * @example
1560
2075
  * ```ts
1561
- * import { createTempoClient } from 'tempo.ts/viem'
1562
- * import { tempo } from 'tempo.ts/chains'
1563
- * import { http } from 'viem'
2076
+ * import { createClient, http } from 'viem'
1564
2077
  * import { privateKeyToAccount } from 'viem/accounts'
2078
+ * import { tempo } from 'tempo.ts/chains'
2079
+ * import { tempoActions } from 'tempo.ts/viem'
1565
2080
  *
1566
- * const client = createTempoClient({
2081
+ * const client = createClient({
1567
2082
  * account: privateKeyToAccount('0x...'),
1568
2083
  * chain: tempo,
1569
2084
  * transport: http(),
1570
- * })
2085
+ * }).extend(tempoActions())
1571
2086
  *
1572
2087
  * const result = await client.token.grantRolesSync({
1573
2088
  * token: '0x...',
@@ -1585,12 +2100,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1585
2100
  *
1586
2101
  * @example
1587
2102
  * ```ts
1588
- * import { createTempoClient } from 'tempo.ts/viem'
2103
+ * import { createClient, http } from 'viem'
1589
2104
  * import { privateKeyToAccount } from 'viem/accounts'
2105
+ * import { tempo } from 'tempo.ts/chains'
2106
+ * import { tempoActions } from 'tempo.ts/viem'
1590
2107
  *
1591
- * const client = createTempoClient({
1592
- * account: privateKeyToAccount('0x...')
1593
- * })
2108
+ * const client = createClient({
2109
+ * account: privateKeyToAccount('0x...'),
2110
+ * chain: tempo,
2111
+ * transport: http(),
2112
+ * }).extend(tempoActions())
1594
2113
  *
1595
2114
  * const hash = await client.token.mint({
1596
2115
  * to: '0x...',
@@ -1609,12 +2128,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1609
2128
  *
1610
2129
  * @example
1611
2130
  * ```ts
1612
- * import { createTempoClient } from 'tempo.ts/viem'
2131
+ * import { createClient, http } from 'viem'
1613
2132
  * import { privateKeyToAccount } from 'viem/accounts'
2133
+ * import { tempo } from 'tempo.ts/chains'
2134
+ * import { tempoActions } from 'tempo.ts/viem'
1614
2135
  *
1615
- * const client = createTempoClient({
1616
- * account: privateKeyToAccount('0x...')
1617
- * })
2136
+ * const client = createClient({
2137
+ * account: privateKeyToAccount('0x...'),
2138
+ * chain: tempo,
2139
+ * transport: http(),
2140
+ * }).extend(tempoActions())
1618
2141
  *
1619
2142
  * const result = await client.token.mintSync({
1620
2143
  * to: '0x...',
@@ -1633,12 +2156,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1633
2156
  *
1634
2157
  * @example
1635
2158
  * ```ts
1636
- * import { createTempoClient } from 'tempo.ts/viem'
2159
+ * import { createClient, http } from 'viem'
1637
2160
  * import { privateKeyToAccount } from 'viem/accounts'
2161
+ * import { tempo } from 'tempo.ts/chains'
2162
+ * import { tempoActions } from 'tempo.ts/viem'
1638
2163
  *
1639
- * const client = createTempoClient({
1640
- * account: privateKeyToAccount('0x...')
1641
- * })
2164
+ * const client = createClient({
2165
+ * account: privateKeyToAccount('0x...'),
2166
+ * chain: tempo,
2167
+ * transport: http(),
2168
+ * }).extend(tempoActions())
1642
2169
  *
1643
2170
  * const hash = await client.token.pause({
1644
2171
  * token: '0x...',
@@ -1655,12 +2182,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1655
2182
  *
1656
2183
  * @example
1657
2184
  * ```ts
1658
- * import { createTempoClient } from 'tempo.ts/viem'
2185
+ * import { createClient, http } from 'viem'
1659
2186
  * import { privateKeyToAccount } from 'viem/accounts'
2187
+ * import { tempo } from 'tempo.ts/chains'
2188
+ * import { tempoActions } from 'tempo.ts/viem'
1660
2189
  *
1661
- * const client = createTempoClient({
1662
- * account: privateKeyToAccount('0x...')
1663
- * })
2190
+ * const client = createClient({
2191
+ * account: privateKeyToAccount('0x...'),
2192
+ * chain: tempo,
2193
+ * transport: http(),
2194
+ * }).extend(tempoActions())
1664
2195
  *
1665
2196
  * const result = await client.token.pauseSync({
1666
2197
  * token: '0x...',
@@ -1672,69 +2203,21 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1672
2203
  * @returns The transaction receipt and event data.
1673
2204
  */
1674
2205
  pauseSync: (parameters: tokenActions.pauseSync.Parameters<chain, account>) => Promise<tokenActions.pauseSync.ReturnValue>;
1675
- /**
1676
- * Approves a spender using a signed permit.
1677
- *
1678
- * @example
1679
- * ```ts
1680
- * import { createTempoClient } from 'tempo.ts/viem'
1681
- * import { privateKeyToAccount } from 'viem/accounts'
1682
- *
1683
- * const client = createTempoClient({
1684
- * account: privateKeyToAccount('0x...')
1685
- * })
1686
- *
1687
- * const hash = await client.token.permit({
1688
- * owner: '0x...',
1689
- * spender: '0x...',
1690
- * value: 100n,
1691
- * deadline: 1234567890n,
1692
- * signature: { r: 0n, s: 0n, yParity: 0 },
1693
- * })
1694
- * ```
1695
- *
1696
- * @param client - Client.
1697
- * @param parameters - Parameters.
1698
- * @returns The transaction hash.
1699
- */
1700
- permit: (parameters: tokenActions.permit.Parameters<chain, account>) => Promise<tokenActions.permit.ReturnValue>;
1701
- /**
1702
- * Approves a spender using a signed permit.
1703
- *
1704
- * @example
1705
- * ```ts
1706
- * import { createTempoClient } from 'tempo.ts/viem'
1707
- * import { privateKeyToAccount } from 'viem/accounts'
1708
- *
1709
- * const client = createTempoClient({
1710
- * account: privateKeyToAccount('0x...')
1711
- * })
1712
- *
1713
- * const result = await client.token.permitSync({
1714
- * owner: '0x...',
1715
- * spender: '0x...',
1716
- * value: 100n,
1717
- * deadline: 1234567890n,
1718
- * signature: { r: 0n, s: 0n, yParity: 0 },
1719
- * })
1720
- * ```
1721
- *
1722
- * @param client - Client.
1723
- * @param parameters - Parameters.
1724
- * @returns The transaction receipt and event data.
1725
- */
1726
- permitSync: (parameters: tokenActions.permitSync.Parameters<chain, account>) => Promise<tokenActions.permitSync.ReturnValue>;
1727
2206
  /**
1728
2207
  * Renounces a role for a TIP20 token.
1729
2208
  *
1730
2209
  * @example
1731
2210
  * ```ts
1732
- * import { createTempoClient } from 'tempo.ts/viem'
2211
+ * import { createClient, http } from 'viem'
1733
2212
  * import { privateKeyToAccount } from 'viem/accounts'
2213
+ * import { tempo } from 'tempo.ts/chains'
2214
+ * import { tempoActions } from 'tempo.ts/viem'
1734
2215
  *
1735
- * const client = createTempoClient({
1736
- * account: privateKeyToAccount('0x...')
1737
- * })
2216
+ * const client = createClient({
2217
+ * account: privateKeyToAccount('0x...'),
2218
+ * chain: tempo,
2219
+ * transport: http(),
2220
+ * }).extend(tempoActions())
1738
2221
  *
1739
2222
  * const hash = await client.token.renounceRoles({
1740
2223
  * token: '0x...',
@@ -1752,16 +2235,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1752
2235
  *
1753
2236
  * @example
1754
2237
  * ```ts
1755
- * import { createTempoClient } from 'tempo.ts/viem'
1756
- * import { tempo } from 'tempo.ts/chains'
1757
- * import { http } from 'viem'
2238
+ * import { createClient, http } from 'viem'
1758
2239
  * import { privateKeyToAccount } from 'viem/accounts'
2240
+ * import { tempo } from 'tempo.ts/chains'
2241
+ * import { tempoActions } from 'tempo.ts/viem'
1759
2242
  *
1760
- * const client = createTempoClient({
2243
+ * const client = createClient({
1761
2244
  * account: privateKeyToAccount('0x...'),
1762
2245
  * chain: tempo,
1763
2246
  * transport: http(),
1764
- * })
2247
+ * }).extend(tempoActions())
1765
2248
  *
1766
2249
  * const result = await client.token.renounceRolesSync({
1767
2250
  * token: '0x...',
@@ -1778,12 +2261,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1778
2261
  *
1779
2262
  * @example
1780
2263
  * ```ts
1781
- * import { createTempoClient } from 'tempo.ts/viem'
2264
+ * import { createClient, http } from 'viem'
1782
2265
  * import { privateKeyToAccount } from 'viem/accounts'
2266
+ * import { tempo } from 'tempo.ts/chains'
2267
+ * import { tempoActions } from 'tempo.ts/viem'
1783
2268
  *
1784
- * const client = createTempoClient({
1785
- * account: privateKeyToAccount('0x...')
1786
- * })
2269
+ * const client = createClient({
2270
+ * account: privateKeyToAccount('0x...'),
2271
+ * chain: tempo,
2272
+ * transport: http(),
2273
+ * }).extend(tempoActions())
1787
2274
  *
1788
2275
  * const hash = await client.token.revokeRoles({
1789
2276
  * token: '0x...',
@@ -1802,16 +2289,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1802
2289
  *
1803
2290
  * @example
1804
2291
  * ```ts
1805
- * import { createTempoClient } from 'tempo.ts/viem'
1806
- * import { tempo } from 'tempo.ts/chains'
1807
- * import { http } from 'viem'
2292
+ * import { createClient, http } from 'viem'
1808
2293
  * import { privateKeyToAccount } from 'viem/accounts'
2294
+ * import { tempo } from 'tempo.ts/chains'
2295
+ * import { tempoActions } from 'tempo.ts/viem'
1809
2296
  *
1810
- * const client = createTempoClient({
2297
+ * const client = createClient({
1811
2298
  * account: privateKeyToAccount('0x...'),
1812
2299
  * chain: tempo,
1813
2300
  * transport: http(),
1814
- * })
2301
+ * }).extend(tempoActions())
1815
2302
  *
1816
2303
  * const result = await client.token.revokeRolesSync({
1817
2304
  * token: '0x...',
@@ -1829,12 +2316,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1829
2316
  *
1830
2317
  * @example
1831
2318
  * ```ts
1832
- * import { createTempoClient } from 'tempo.ts/viem'
2319
+ * import { createClient, http } from 'viem'
1833
2320
  * import { privateKeyToAccount } from 'viem/accounts'
2321
+ * import { tempo } from 'tempo.ts/chains'
2322
+ * import { tempoActions } from 'tempo.ts/viem'
1834
2323
  *
1835
- * const client = createTempoClient({
1836
- * account: privateKeyToAccount('0x...')
1837
- * })
2324
+ * const client = createClient({
2325
+ * account: privateKeyToAccount('0x...'),
2326
+ * chain: tempo,
2327
+ * transport: http(),
2328
+ * }).extend(tempoActions())
1838
2329
  *
1839
2330
  * const hash = await client.token.setSupplyCap({
1840
2331
  * token: '0x...',
@@ -1852,12 +2343,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1852
2343
  *
1853
2344
  * @example
1854
2345
  * ```ts
1855
- * import { createTempoClient } from 'tempo.ts/viem'
2346
+ * import { createClient, http } from 'viem'
1856
2347
  * import { privateKeyToAccount } from 'viem/accounts'
2348
+ * import { tempo } from 'tempo.ts/chains'
2349
+ * import { tempoActions } from 'tempo.ts/viem'
1857
2350
  *
1858
- * const client = createTempoClient({
1859
- * account: privateKeyToAccount('0x...')
1860
- * })
2351
+ * const client = createClient({
2352
+ * account: privateKeyToAccount('0x...'),
2353
+ * chain: tempo,
2354
+ * transport: http(),
2355
+ * }).extend(tempoActions())
1861
2356
  *
1862
2357
  * const result = await client.token.setSupplyCapSync({
1863
2358
  * token: '0x...',
@@ -1875,12 +2370,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1875
2370
  *
1876
2371
  * @example
1877
2372
  * ```ts
1878
- * import { createTempoClient } from 'tempo.ts/viem'
2373
+ * import { createClient, http } from 'viem'
1879
2374
  * import { privateKeyToAccount } from 'viem/accounts'
2375
+ * import { tempo } from 'tempo.ts/chains'
2376
+ * import { tempoActions } from 'tempo.ts/viem'
1880
2377
  *
1881
- * const client = createTempoClient({
1882
- * account: privateKeyToAccount('0x...')
1883
- * })
2378
+ * const client = createClient({
2379
+ * account: privateKeyToAccount('0x...'),
2380
+ * chain: tempo,
2381
+ * transport: http(),
2382
+ * }).extend(tempoActions())
1884
2383
  *
1885
2384
  * const hash = await client.token.setRoleAdmin({
1886
2385
  * token: '0x...',
@@ -1899,12 +2398,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1899
2398
  *
1900
2399
  * @example
1901
2400
  * ```ts
1902
- * import { createTempoClient } from 'tempo.ts/viem'
2401
+ * import { createClient, http } from 'viem'
1903
2402
  * import { privateKeyToAccount } from 'viem/accounts'
2403
+ * import { tempo } from 'tempo.ts/chains'
2404
+ * import { tempoActions } from 'tempo.ts/viem'
1904
2405
  *
1905
- * const client = createTempoClient({
1906
- * account: privateKeyToAccount('0x...')
1907
- * })
2406
+ * const client = createClient({
2407
+ * account: privateKeyToAccount('0x...'),
2408
+ * chain: tempo,
2409
+ * transport: http(),
2410
+ * }).extend(tempoActions())
1908
2411
  *
1909
2412
  * const result = await client.token.setRoleAdminSync({
1910
2413
  * token: '0x...',
@@ -1923,12 +2426,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1923
2426
  *
1924
2427
  * @example
1925
2428
  * ```ts
1926
- * import { createTempoClient } from 'tempo.ts/viem'
2429
+ * import { createClient, http } from 'viem'
1927
2430
  * import { privateKeyToAccount } from 'viem/accounts'
2431
+ * import { tempo } from 'tempo.ts/chains'
2432
+ * import { tempoActions } from 'tempo.ts/viem'
1928
2433
  *
1929
- * const client = createTempoClient({
1930
- * account: privateKeyToAccount('0x...')
1931
- * })
2434
+ * const client = createClient({
2435
+ * account: privateKeyToAccount('0x...'),
2436
+ * chain: tempo,
2437
+ * transport: http(),
2438
+ * }).extend(tempoActions())
1932
2439
  *
1933
2440
  * const hash = await client.token.transfer({
1934
2441
  * to: '0x...',
@@ -1946,12 +2453,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1946
2453
  *
1947
2454
  * @example
1948
2455
  * ```ts
1949
- * import { createTempoClient } from 'tempo.ts/viem'
2456
+ * import { createClient, http } from 'viem'
1950
2457
  * import { privateKeyToAccount } from 'viem/accounts'
2458
+ * import { tempo } from 'tempo.ts/chains'
2459
+ * import { tempoActions } from 'tempo.ts/viem'
1951
2460
  *
1952
- * const client = createTempoClient({
1953
- * account: privateKeyToAccount('0x...')
1954
- * })
2461
+ * const client = createClient({
2462
+ * account: privateKeyToAccount('0x...'),
2463
+ * chain: tempo,
2464
+ * transport: http(),
2465
+ * }).extend(tempoActions())
1955
2466
  *
1956
2467
  * const result = await client.token.transferSync({
1957
2468
  * to: '0x...',
@@ -1969,12 +2480,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1969
2480
  *
1970
2481
  * @example
1971
2482
  * ```ts
1972
- * import { createTempoClient } from 'tempo.ts/viem'
2483
+ * import { createClient, http } from 'viem'
1973
2484
  * import { privateKeyToAccount } from 'viem/accounts'
2485
+ * import { tempo } from 'tempo.ts/chains'
2486
+ * import { tempoActions } from 'tempo.ts/viem'
1974
2487
  *
1975
- * const client = createTempoClient({
1976
- * account: privateKeyToAccount('0x...')
1977
- * })
2488
+ * const client = createClient({
2489
+ * account: privateKeyToAccount('0x...'),
2490
+ * chain: tempo,
2491
+ * transport: http(),
2492
+ * }).extend(tempoActions())
1978
2493
  *
1979
2494
  * const hash = await client.token.unpause({
1980
2495
  * token: '0x...',
@@ -1991,12 +2506,16 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
1991
2506
  *
1992
2507
  * @example
1993
2508
  * ```ts
1994
- * import { createTempoClient } from 'tempo.ts/viem'
2509
+ * import { createClient, http } from 'viem'
1995
2510
  * import { privateKeyToAccount } from 'viem/accounts'
2511
+ * import { tempo } from 'tempo.ts/chains'
2512
+ * import { tempoActions } from 'tempo.ts/viem'
1996
2513
  *
1997
- * const client = createTempoClient({
1998
- * account: privateKeyToAccount('0x...')
1999
- * })
2514
+ * const client = createClient({
2515
+ * account: privateKeyToAccount('0x...'),
2516
+ * chain: tempo,
2517
+ * transport: http(),
2518
+ * }).extend(tempoActions())
2000
2519
  *
2001
2520
  * const result = await client.token.unpauseSync({
2002
2521
  * token: '0x...',
@@ -2013,9 +2532,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
2013
2532
  *
2014
2533
  * @example
2015
2534
  * ```ts
2016
- * import { createTempoClient } from 'tempo.ts/viem'
2535
+ * import { createClient, http } from 'viem'
2536
+ * import { tempo } from 'tempo.ts/chains'
2537
+ * import { tempoActions } from 'tempo.ts/viem'
2017
2538
  *
2018
- * const client = createTempoClient()
2539
+ * const client = createClient({
2540
+ * chain: tempo,
2541
+ * transport: http(),
2542
+ * }).extend(tempoActions())
2019
2543
  *
2020
2544
  * const unwatch = client.token.watchApprove({
2021
2545
  * onApproval: (args, log) => {
@@ -2034,9 +2558,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
2034
2558
  *
2035
2559
  * @example
2036
2560
  * ```ts
2037
- * import { createTempoClient } from 'tempo.ts/viem'
2561
+ * import { createClient, http } from 'viem'
2562
+ * import { tempo } from 'tempo.ts/chains'
2563
+ * import { tempoActions } from 'tempo.ts/viem'
2038
2564
  *
2039
- * const client = createTempoClient()
2565
+ * const client = createClient({
2566
+ * chain: tempo,
2567
+ * transport: http(),
2568
+ * }).extend(tempoActions())
2040
2569
  *
2041
2570
  * const unwatch = client.token.watchBurn({
2042
2571
  * onBurn: (args, log) => {
@@ -2055,9 +2584,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
2055
2584
  *
2056
2585
  * @example
2057
2586
  * ```ts
2058
- * import { createTempoClient } from 'tempo.ts/viem'
2587
+ * import { createClient, http } from 'viem'
2588
+ * import { tempo } from 'tempo.ts/chains'
2589
+ * import { tempoActions } from 'tempo.ts/viem'
2059
2590
  *
2060
- * const client = createTempoClient()
2591
+ * const client = createClient({
2592
+ * chain: tempo,
2593
+ * transport: http(),
2594
+ * }).extend(tempoActions())
2061
2595
  *
2062
2596
  * const unwatch = client.token.watchCreate({
2063
2597
  * onTokenCreated: (args, log) => {
@@ -2076,9 +2610,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
2076
2610
  *
2077
2611
  * @example
2078
2612
  * ```ts
2079
- * import { createTempoClient } from 'tempo.ts/viem'
2613
+ * import { createClient, http } from 'viem'
2614
+ * import { tempo } from 'tempo.ts/chains'
2615
+ * import { tempoActions } from 'tempo.ts/viem'
2080
2616
  *
2081
- * const client = createTempoClient()
2617
+ * const client = createClient({
2618
+ * chain: tempo,
2619
+ * transport: http(),
2620
+ * }).extend(tempoActions())
2082
2621
  *
2083
2622
  * const unwatch = client.token.watchMint({
2084
2623
  * onMint: (args, log) => {
@@ -2097,9 +2636,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
2097
2636
  *
2098
2637
  * @example
2099
2638
  * ```ts
2100
- * import { createTempoClient } from 'tempo.ts/viem'
2639
+ * import { createClient, http } from 'viem'
2640
+ * import { tempo } from 'tempo.ts/chains'
2641
+ * import { tempoActions } from 'tempo.ts/viem'
2101
2642
  *
2102
- * const client = createTempoClient()
2643
+ * const client = createClient({
2644
+ * chain: tempo,
2645
+ * transport: http(),
2646
+ * }).extend(tempoActions())
2103
2647
  *
2104
2648
  * const unwatch = client.token.watchAdminRole({
2105
2649
  * onRoleAdminUpdated: (args, log) => {
@@ -2118,9 +2662,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
2118
2662
  *
2119
2663
  * @example
2120
2664
  * ```ts
2121
- * import { createTempoClient } from 'tempo.ts/viem'
2665
+ * import { createClient, http } from 'viem'
2666
+ * import { tempo } from 'tempo.ts/chains'
2667
+ * import { tempoActions } from 'tempo.ts/viem'
2122
2668
  *
2123
- * const client = createTempoClient()
2669
+ * const client = createClient({
2670
+ * chain: tempo,
2671
+ * transport: http(),
2672
+ * }).extend(tempoActions())
2124
2673
  *
2125
2674
  * const unwatch = client.token.watchRole({
2126
2675
  * onRoleUpdated: (args, log) => {
@@ -2139,9 +2688,14 @@ export type Decorator<chain extends Chain | undefined = Chain | undefined, accou
2139
2688
  *
2140
2689
  * @example
2141
2690
  * ```ts
2142
- * import { createTempoClient } from 'tempo.ts/viem'
2691
+ * import { createClient, http } from 'viem'
2692
+ * import { tempo } from 'tempo.ts/chains'
2693
+ * import { tempoActions } from 'tempo.ts/viem'
2143
2694
  *
2144
- * const client = createTempoClient()
2695
+ * const client = createClient({
2696
+ * chain: tempo,
2697
+ * transport: http(),
2698
+ * }).extend(tempoActions())
2145
2699
  *
2146
2700
  * const unwatch = client.token.watchTransfer({
2147
2701
  * onTransfer: (args, log) => {