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