wagmi 3.1.4 → 3.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.
- package/dist/esm/exports/tempo.js +9 -0
- package/dist/esm/exports/tempo.js.map +1 -0
- package/dist/esm/tempo/Hooks/amm.js +534 -0
- package/dist/esm/tempo/Hooks/amm.js.map +1 -0
- package/dist/esm/tempo/Hooks/dex.js +944 -0
- package/dist/esm/tempo/Hooks/dex.js.map +1 -0
- package/dist/esm/tempo/Hooks/faucet.js +76 -0
- package/dist/esm/tempo/Hooks/faucet.js.map +1 -0
- package/dist/esm/tempo/Hooks/fee.js +155 -0
- package/dist/esm/tempo/Hooks/fee.js.map +1 -0
- package/dist/esm/tempo/Hooks/index.js +11 -0
- package/dist/esm/tempo/Hooks/index.js.map +1 -0
- package/dist/esm/tempo/Hooks/nonce.js +165 -0
- package/dist/esm/tempo/Hooks/nonce.js.map +1 -0
- package/dist/esm/tempo/Hooks/policy.js +545 -0
- package/dist/esm/tempo/Hooks/policy.js.map +1 -0
- package/dist/esm/tempo/Hooks/reward.js +385 -0
- package/dist/esm/tempo/Hooks/reward.js.map +1 -0
- package/dist/esm/tempo/Hooks/token.js +1730 -0
- package/dist/esm/tempo/Hooks/token.js.map +1 -0
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/exports/tempo.d.ts +4 -0
- package/dist/types/exports/tempo.d.ts.map +1 -0
- package/dist/types/tempo/Hooks/amm.d.ts +410 -0
- package/dist/types/tempo/Hooks/amm.d.ts.map +1 -0
- package/dist/types/tempo/Hooks/dex.d.ts +773 -0
- package/dist/types/tempo/Hooks/dex.d.ts.map +1 -0
- package/dist/types/tempo/Hooks/faucet.d.ts +70 -0
- package/dist/types/tempo/Hooks/faucet.d.ts.map +1 -0
- package/dist/types/tempo/Hooks/fee.d.ts +123 -0
- package/dist/types/tempo/Hooks/fee.d.ts.map +1 -0
- package/dist/types/tempo/Hooks/index.d.ts +10 -0
- package/dist/types/tempo/Hooks/index.d.ts.map +1 -0
- package/dist/types/tempo/Hooks/nonce.d.ts +115 -0
- package/dist/types/tempo/Hooks/nonce.d.ts.map +1 -0
- package/dist/types/tempo/Hooks/policy.d.ts +422 -0
- package/dist/types/tempo/Hooks/policy.d.ts.map +1 -0
- package/dist/types/tempo/Hooks/reward.d.ts +304 -0
- package/dist/types/tempo/Hooks/reward.d.ts.map +1 -0
- package/dist/types/tempo/Hooks/token.d.ts +1387 -0
- package/dist/types/tempo/Hooks/token.d.ts.map +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +12 -4
- package/src/exports/tempo.ts +17 -0
- package/src/tempo/Hooks/amm.ts +835 -0
- package/src/tempo/Hooks/dex.ts +1597 -0
- package/src/tempo/Hooks/faucet.ts +142 -0
- package/src/tempo/Hooks/fee.ts +264 -0
- package/src/tempo/Hooks/index.ts +10 -0
- package/src/tempo/Hooks/nonce.ts +248 -0
- package/src/tempo/Hooks/policy.ts +907 -0
- package/src/tempo/Hooks/reward.ts +668 -0
- package/src/tempo/Hooks/token.ts +2979 -0
- package/src/version.ts +1 -1
- package/tempo/package.json +5 -0
|
@@ -0,0 +1,1387 @@
|
|
|
1
|
+
import type { UseMutationResult } from '@tanstack/react-query';
|
|
2
|
+
import type { Config, ResolvedRegister } from '@wagmi/core';
|
|
3
|
+
import type { ExactPartial, UnionCompute } from '@wagmi/core/internal';
|
|
4
|
+
import { Actions } from '@wagmi/core/tempo';
|
|
5
|
+
import type { ConfigParameter, QueryParameter } from '../../types/properties.js';
|
|
6
|
+
import { type UseMutationParameters, type UseQueryReturnType } from '../../utils/query.js';
|
|
7
|
+
/**
|
|
8
|
+
* Hook for approving a spender to transfer TIP20 tokens.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
13
|
+
*
|
|
14
|
+
* function App() {
|
|
15
|
+
* const { mutate, isPending } = Hooks.token.useApprove()
|
|
16
|
+
*
|
|
17
|
+
* return (
|
|
18
|
+
* <button
|
|
19
|
+
* onClick={() => mutate({ spender: '0x...', amount: 100n })}
|
|
20
|
+
* disabled={isPending}
|
|
21
|
+
* >
|
|
22
|
+
* Approve
|
|
23
|
+
* </button>
|
|
24
|
+
* )
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param parameters - Parameters.
|
|
29
|
+
* @returns Mutation result.
|
|
30
|
+
*/
|
|
31
|
+
export declare function useApprove<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useApprove.Parameters<config, context>): useApprove.ReturnType<config, context>;
|
|
32
|
+
export declare namespace useApprove {
|
|
33
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
34
|
+
mutation?: UseMutationParameters<Actions.token.approve.ReturnValue, Actions.token.approve.ErrorType, Actions.token.approve.Parameters<config>, context> | undefined;
|
|
35
|
+
};
|
|
36
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.approve.ReturnValue, Actions.token.approve.ErrorType, Actions.token.approve.Parameters<config>, context>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Hook for approving a spender to transfer TIP20 tokens.
|
|
40
|
+
*
|
|
41
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
42
|
+
* to be included on a block before returning a response.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```tsx
|
|
46
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
47
|
+
*
|
|
48
|
+
* function App() {
|
|
49
|
+
* const { mutate, isPending } = Hooks.token.useApproveSync()
|
|
50
|
+
*
|
|
51
|
+
* return (
|
|
52
|
+
* <button
|
|
53
|
+
* onClick={() => mutate({ spender: '0x...', amount: 100n })}
|
|
54
|
+
* disabled={isPending}
|
|
55
|
+
* >
|
|
56
|
+
* Approve
|
|
57
|
+
* </button>
|
|
58
|
+
* )
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @param parameters - Parameters.
|
|
63
|
+
* @returns Mutation result.
|
|
64
|
+
*/
|
|
65
|
+
export declare function useApproveSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useApproveSync.Parameters<config, context>): useApproveSync.ReturnType<config, context>;
|
|
66
|
+
export declare namespace useApproveSync {
|
|
67
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
68
|
+
mutation?: UseMutationParameters<Actions.token.approveSync.ReturnValue, Actions.token.approveSync.ErrorType, Actions.token.approveSync.Parameters<config>, context> | undefined;
|
|
69
|
+
};
|
|
70
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.approveSync.ReturnValue, Actions.token.approveSync.ErrorType, Actions.token.approveSync.Parameters<config>, context>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Hook for burning TIP20 tokens from the caller's balance.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```tsx
|
|
77
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
78
|
+
*
|
|
79
|
+
* function App() {
|
|
80
|
+
* const { mutate, isPending } = Hooks.token.useBurn()
|
|
81
|
+
*
|
|
82
|
+
* return (
|
|
83
|
+
* <button
|
|
84
|
+
* onClick={() => mutate({ amount: 100n, token: '0x...' })}
|
|
85
|
+
* disabled={isPending}
|
|
86
|
+
* >
|
|
87
|
+
* Burn
|
|
88
|
+
* </button>
|
|
89
|
+
* )
|
|
90
|
+
* }
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* @param parameters - Parameters.
|
|
94
|
+
* @returns Mutation result.
|
|
95
|
+
*/
|
|
96
|
+
export declare function useBurn<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useBurn.Parameters<config, context>): useBurn.ReturnType<config, context>;
|
|
97
|
+
export declare namespace useBurn {
|
|
98
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
99
|
+
mutation?: UseMutationParameters<Actions.token.burn.ReturnValue, Actions.token.burn.ErrorType, Actions.token.burn.Parameters<config>, context> | undefined;
|
|
100
|
+
};
|
|
101
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.burn.ReturnValue, Actions.token.burn.ErrorType, Actions.token.burn.Parameters<config>, context>;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Hook for burning TIP20 tokens from the caller's balance.
|
|
105
|
+
*
|
|
106
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
107
|
+
* to be included on a block before returning a response.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```tsx
|
|
111
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
112
|
+
*
|
|
113
|
+
* function App() {
|
|
114
|
+
* const { mutate, isPending } = Hooks.token.useBurnSync()
|
|
115
|
+
*
|
|
116
|
+
* return (
|
|
117
|
+
* <button
|
|
118
|
+
* onClick={() => mutate({ amount: 100n, token: '0x...' })}
|
|
119
|
+
* disabled={isPending}
|
|
120
|
+
* >
|
|
121
|
+
* Burn
|
|
122
|
+
* </button>
|
|
123
|
+
* )
|
|
124
|
+
* }
|
|
125
|
+
* ```
|
|
126
|
+
*
|
|
127
|
+
* @param parameters - Parameters.
|
|
128
|
+
* @returns Mutation result.
|
|
129
|
+
*/
|
|
130
|
+
export declare function useBurnSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useBurnSync.Parameters<config, context>): useBurnSync.ReturnType<config, context>;
|
|
131
|
+
export declare namespace useBurnSync {
|
|
132
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
133
|
+
mutation?: UseMutationParameters<Actions.token.burnSync.ReturnValue, Actions.token.burnSync.ErrorType, Actions.token.burnSync.Parameters<config>, context> | undefined;
|
|
134
|
+
};
|
|
135
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.burnSync.ReturnValue, Actions.token.burnSync.ErrorType, Actions.token.burnSync.Parameters<config>, context>;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Hook for burning TIP20 tokens from a blocked address.
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```tsx
|
|
142
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
143
|
+
*
|
|
144
|
+
* function App() {
|
|
145
|
+
* const { mutate, isPending } = Hooks.token.useBurnBlocked()
|
|
146
|
+
*
|
|
147
|
+
* return (
|
|
148
|
+
* <button
|
|
149
|
+
* onClick={() => mutate({ from: '0x...', amount: 100n, token: '0x...' })}
|
|
150
|
+
* disabled={isPending}
|
|
151
|
+
* >
|
|
152
|
+
* Burn Blocked
|
|
153
|
+
* </button>
|
|
154
|
+
* )
|
|
155
|
+
* }
|
|
156
|
+
* ```
|
|
157
|
+
*
|
|
158
|
+
* @param parameters - Parameters.
|
|
159
|
+
* @returns Mutation result.
|
|
160
|
+
*/
|
|
161
|
+
export declare function useBurnBlocked<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useBurnBlocked.Parameters<config, context>): useBurnBlocked.ReturnType<config, context>;
|
|
162
|
+
export declare namespace useBurnBlocked {
|
|
163
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
164
|
+
mutation?: UseMutationParameters<Actions.token.burnBlocked.ReturnValue, Actions.token.burnBlocked.ErrorType, Actions.token.burnBlocked.Parameters<config>, context> | undefined;
|
|
165
|
+
};
|
|
166
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.burnBlocked.ReturnValue, Actions.token.burnBlocked.ErrorType, Actions.token.burnBlocked.Parameters<config>, context>;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Hook for burning TIP20 tokens from a blocked address.
|
|
170
|
+
*
|
|
171
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
172
|
+
* to be included on a block before returning a response.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```tsx
|
|
176
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
177
|
+
*
|
|
178
|
+
* function App() {
|
|
179
|
+
* const { mutate, isPending } = Hooks.token.useBurnBlockedSync()
|
|
180
|
+
*
|
|
181
|
+
* return (
|
|
182
|
+
* <button
|
|
183
|
+
* onClick={() => mutate({ from: '0x...', amount: 100n, token: '0x...' })}
|
|
184
|
+
* disabled={isPending}
|
|
185
|
+
* >
|
|
186
|
+
* Burn Blocked
|
|
187
|
+
* </button>
|
|
188
|
+
* )
|
|
189
|
+
* }
|
|
190
|
+
* ```
|
|
191
|
+
*
|
|
192
|
+
* @param parameters - Parameters.
|
|
193
|
+
* @returns Mutation result.
|
|
194
|
+
*/
|
|
195
|
+
export declare function useBurnBlockedSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useBurnBlockedSync.Parameters<config, context>): useBurnBlockedSync.ReturnType<config, context>;
|
|
196
|
+
export declare namespace useBurnBlockedSync {
|
|
197
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
198
|
+
mutation?: UseMutationParameters<Actions.token.burnBlockedSync.ReturnValue, Actions.token.burnBlockedSync.ErrorType, Actions.token.burnBlockedSync.Parameters<config>, context> | undefined;
|
|
199
|
+
};
|
|
200
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.burnBlockedSync.ReturnValue, Actions.token.burnBlockedSync.ErrorType, Actions.token.burnBlockedSync.Parameters<config>, context>;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Hook for changing the transfer policy ID for a TIP20 token.
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```tsx
|
|
207
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
208
|
+
*
|
|
209
|
+
* function App() {
|
|
210
|
+
* const { mutate, isPending } = Hooks.token.useChangeTransferPolicy()
|
|
211
|
+
*
|
|
212
|
+
* return (
|
|
213
|
+
* <button
|
|
214
|
+
* onClick={() => mutate({ token: '0x...', policyId: 1n })}
|
|
215
|
+
* disabled={isPending}
|
|
216
|
+
* >
|
|
217
|
+
* Change Policy
|
|
218
|
+
* </button>
|
|
219
|
+
* )
|
|
220
|
+
* }
|
|
221
|
+
* ```
|
|
222
|
+
*
|
|
223
|
+
* @param parameters - Parameters.
|
|
224
|
+
* @returns Mutation result.
|
|
225
|
+
*/
|
|
226
|
+
export declare function useChangeTransferPolicy<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useChangeTransferPolicy.Parameters<config, context>): useChangeTransferPolicy.ReturnType<config, context>;
|
|
227
|
+
export declare namespace useChangeTransferPolicy {
|
|
228
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
229
|
+
mutation?: UseMutationParameters<Actions.token.changeTransferPolicy.ReturnValue, Actions.token.changeTransferPolicy.ErrorType, Actions.token.changeTransferPolicy.Parameters<config>, context> | undefined;
|
|
230
|
+
};
|
|
231
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.changeTransferPolicy.ReturnValue, Actions.token.changeTransferPolicy.ErrorType, Actions.token.changeTransferPolicy.Parameters<config>, context>;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Hook for changing the transfer policy ID for a TIP20 token.
|
|
235
|
+
*
|
|
236
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
237
|
+
* to be included on a block before returning a response.
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```tsx
|
|
241
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
242
|
+
*
|
|
243
|
+
* function App() {
|
|
244
|
+
* const { mutate, isPending } = Hooks.token.useChangeTransferPolicySync()
|
|
245
|
+
*
|
|
246
|
+
* return (
|
|
247
|
+
* <button
|
|
248
|
+
* onClick={() => mutate({ token: '0x...', policyId: 1n })}
|
|
249
|
+
* disabled={isPending}
|
|
250
|
+
* >
|
|
251
|
+
* Change Policy
|
|
252
|
+
* </button>
|
|
253
|
+
* )
|
|
254
|
+
* }
|
|
255
|
+
* ```
|
|
256
|
+
*
|
|
257
|
+
* @param parameters - Parameters.
|
|
258
|
+
* @returns Mutation result.
|
|
259
|
+
*/
|
|
260
|
+
export declare function useChangeTransferPolicySync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useChangeTransferPolicySync.Parameters<config, context>): useChangeTransferPolicySync.ReturnType<config, context>;
|
|
261
|
+
export declare namespace useChangeTransferPolicySync {
|
|
262
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
263
|
+
mutation?: UseMutationParameters<Actions.token.changeTransferPolicySync.ReturnValue, Actions.token.changeTransferPolicySync.ErrorType, Actions.token.changeTransferPolicySync.Parameters<config>, context> | undefined;
|
|
264
|
+
};
|
|
265
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.changeTransferPolicySync.ReturnValue, Actions.token.changeTransferPolicySync.ErrorType, Actions.token.changeTransferPolicySync.Parameters<config>, context>;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Hook for creating a new TIP20 token.
|
|
269
|
+
*
|
|
270
|
+
* @example
|
|
271
|
+
* ```tsx
|
|
272
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
273
|
+
*
|
|
274
|
+
* function App() {
|
|
275
|
+
* const { mutate, isPending } = Hooks.token.useCreate()
|
|
276
|
+
*
|
|
277
|
+
* return (
|
|
278
|
+
* <button
|
|
279
|
+
* onClick={() => mutate({ name: 'My Token', symbol: 'MTK', currency: 'USD' })}
|
|
280
|
+
* disabled={isPending}
|
|
281
|
+
* >
|
|
282
|
+
* Create Token
|
|
283
|
+
* </button>
|
|
284
|
+
* )
|
|
285
|
+
* }
|
|
286
|
+
* ```
|
|
287
|
+
*
|
|
288
|
+
* @param parameters - Parameters.
|
|
289
|
+
* @returns Mutation result.
|
|
290
|
+
*/
|
|
291
|
+
export declare function useCreate<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useCreate.Parameters<config, context>): useCreate.ReturnType<config, context>;
|
|
292
|
+
export declare namespace useCreate {
|
|
293
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
294
|
+
mutation?: UseMutationParameters<Actions.token.create.ReturnValue, Actions.token.create.ErrorType, Actions.token.create.Parameters<config>, context> | undefined;
|
|
295
|
+
};
|
|
296
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.create.ReturnValue, Actions.token.create.ErrorType, Actions.token.create.Parameters<config>, context>;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Hook for creating a new TIP20 token.
|
|
300
|
+
*
|
|
301
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
302
|
+
* to be included on a block before returning a response.
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* ```tsx
|
|
306
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
307
|
+
*
|
|
308
|
+
* function App() {
|
|
309
|
+
* const { mutate, isPending } = Hooks.token.useCreateSync()
|
|
310
|
+
*
|
|
311
|
+
* return (
|
|
312
|
+
* <button
|
|
313
|
+
* onClick={() => mutate({ name: 'My Token', symbol: 'MTK', currency: 'USD' })}
|
|
314
|
+
* disabled={isPending}
|
|
315
|
+
* >
|
|
316
|
+
* Create Token
|
|
317
|
+
* </button>
|
|
318
|
+
* )
|
|
319
|
+
* }
|
|
320
|
+
* ```
|
|
321
|
+
*
|
|
322
|
+
* @param parameters - Parameters.
|
|
323
|
+
* @returns Mutation result.
|
|
324
|
+
*/
|
|
325
|
+
export declare function useCreateSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useCreateSync.Parameters<config, context>): useCreateSync.ReturnType<config, context>;
|
|
326
|
+
export declare namespace useCreateSync {
|
|
327
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
328
|
+
mutation?: UseMutationParameters<Actions.token.createSync.ReturnValue, Actions.token.createSync.ErrorType, Actions.token.createSync.Parameters<config>, context> | undefined;
|
|
329
|
+
};
|
|
330
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.createSync.ReturnValue, Actions.token.createSync.ErrorType, Actions.token.createSync.Parameters<config>, context>;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Hook for updating the quote token for a TIP20 token.
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* ```tsx
|
|
337
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
338
|
+
*
|
|
339
|
+
* function App() {
|
|
340
|
+
* const { mutate, isPending } = Hooks.token.useUpdateQuoteToken()
|
|
341
|
+
*
|
|
342
|
+
* return (
|
|
343
|
+
* <button
|
|
344
|
+
* onClick={() => mutate({ token: '0x...' })}
|
|
345
|
+
* disabled={isPending}
|
|
346
|
+
* >
|
|
347
|
+
* Update Quote Token
|
|
348
|
+
* </button>
|
|
349
|
+
* )
|
|
350
|
+
* }
|
|
351
|
+
* ```
|
|
352
|
+
*
|
|
353
|
+
* @param parameters - Parameters.
|
|
354
|
+
* @returns Mutation result.
|
|
355
|
+
*/
|
|
356
|
+
export declare function useUpdateQuoteToken<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useUpdateQuoteToken.Parameters<config, context>): useUpdateQuoteToken.ReturnType<config, context>;
|
|
357
|
+
export declare namespace useUpdateQuoteToken {
|
|
358
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
359
|
+
mutation?: UseMutationParameters<Actions.token.updateQuoteToken.ReturnValue, Actions.token.updateQuoteToken.ErrorType, Actions.token.updateQuoteToken.Parameters<config>, context> | undefined;
|
|
360
|
+
};
|
|
361
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.updateQuoteToken.ReturnValue, Actions.token.updateQuoteToken.ErrorType, Actions.token.updateQuoteToken.Parameters<config>, context>;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Hook for updating the quote token for a TIP20 token.
|
|
365
|
+
*
|
|
366
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
367
|
+
* to be included on a block before returning a response.
|
|
368
|
+
*
|
|
369
|
+
* @example
|
|
370
|
+
* ```tsx
|
|
371
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
372
|
+
*
|
|
373
|
+
* function App() {
|
|
374
|
+
* const { mutate, isPending } = Hooks.token.useUpdateQuoteTokenSync()
|
|
375
|
+
*
|
|
376
|
+
* return (
|
|
377
|
+
* <button
|
|
378
|
+
* onClick={() => mutate({ token: '0x...' })}
|
|
379
|
+
* disabled={isPending}
|
|
380
|
+
* >
|
|
381
|
+
* Update Quote Token
|
|
382
|
+
* </button>
|
|
383
|
+
* )
|
|
384
|
+
* }
|
|
385
|
+
* ```
|
|
386
|
+
*
|
|
387
|
+
* @param parameters - Parameters.
|
|
388
|
+
* @returns Mutation result.
|
|
389
|
+
*/
|
|
390
|
+
export declare function useUpdateQuoteTokenSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useUpdateQuoteTokenSync.Parameters<config, context>): useUpdateQuoteTokenSync.ReturnType<config, context>;
|
|
391
|
+
export declare namespace useUpdateQuoteTokenSync {
|
|
392
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
393
|
+
mutation?: UseMutationParameters<Actions.token.updateQuoteTokenSync.ReturnValue, Actions.token.updateQuoteTokenSync.ErrorType, Actions.token.updateQuoteTokenSync.Parameters<config>, context> | undefined;
|
|
394
|
+
};
|
|
395
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.updateQuoteTokenSync.ReturnValue, Actions.token.updateQuoteTokenSync.ErrorType, Actions.token.updateQuoteTokenSync.Parameters<config>, context>;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Hook for getting TIP20 token allowance.
|
|
399
|
+
*
|
|
400
|
+
* @example
|
|
401
|
+
* ```tsx
|
|
402
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
403
|
+
*
|
|
404
|
+
* function App() {
|
|
405
|
+
* const { data, isLoading } = Hooks.token.useGetAllowance({
|
|
406
|
+
* account: '0x...',
|
|
407
|
+
* spender: '0x...',
|
|
408
|
+
* })
|
|
409
|
+
*
|
|
410
|
+
* if (isLoading) return <div>Loading...</div>
|
|
411
|
+
* return <div>Allowance: {data?.toString()}</div>
|
|
412
|
+
* }
|
|
413
|
+
* ```
|
|
414
|
+
*
|
|
415
|
+
* @param parameters - Parameters.
|
|
416
|
+
* @returns Query result with token allowance.
|
|
417
|
+
*/
|
|
418
|
+
export declare function useGetAllowance<config extends Config = ResolvedRegister['config'], selectData = Actions.token.getAllowance.ReturnValue>(parameters?: useGetAllowance.Parameters<config, selectData>): useGetAllowance.ReturnValue<selectData>;
|
|
419
|
+
export declare namespace useGetAllowance {
|
|
420
|
+
type Parameters<config extends Config = ResolvedRegister['config'], selectData = Actions.token.getAllowance.ReturnValue> = ConfigParameter<config> & QueryParameter<Actions.token.getAllowance.ReturnValue, Actions.token.getAllowance.ErrorType, selectData, Actions.token.getAllowance.QueryKey<config>> & ExactPartial<Omit<Actions.token.getAllowance.queryOptions.Parameters<config, selectData>, 'query'>>;
|
|
421
|
+
type ReturnValue<selectData = Actions.token.getAllowance.ReturnValue> = UseQueryReturnType<selectData, Error>;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Hook for getting TIP20 token balance for an address.
|
|
425
|
+
*
|
|
426
|
+
* @example
|
|
427
|
+
* ```tsx
|
|
428
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
429
|
+
*
|
|
430
|
+
* function App() {
|
|
431
|
+
* const { data, isLoading } = Hooks.token.useGetBalance({
|
|
432
|
+
* account: '0x...',
|
|
433
|
+
* })
|
|
434
|
+
*
|
|
435
|
+
* if (isLoading) return <div>Loading...</div>
|
|
436
|
+
* return <div>Balance: {data?.toString()}</div>
|
|
437
|
+
* }
|
|
438
|
+
* ```
|
|
439
|
+
*
|
|
440
|
+
* @param parameters - Parameters.
|
|
441
|
+
* @returns Query result with token balance.
|
|
442
|
+
*/
|
|
443
|
+
export declare function useGetBalance<config extends Config = ResolvedRegister['config'], selectData = Actions.token.getBalance.ReturnValue>(parameters?: useGetBalance.Parameters<config, selectData>): useGetBalance.ReturnValue<selectData>;
|
|
444
|
+
export declare namespace useGetBalance {
|
|
445
|
+
type Parameters<config extends Config = ResolvedRegister['config'], selectData = Actions.token.getBalance.ReturnValue> = ConfigParameter<config> & QueryParameter<Actions.token.getBalance.ReturnValue, Actions.token.getBalance.ErrorType, selectData, Actions.token.getBalance.QueryKey<config>> & ExactPartial<Omit<Actions.token.getBalance.queryOptions.Parameters<config, selectData>, 'query'>>;
|
|
446
|
+
type ReturnValue<selectData = Actions.token.getBalance.ReturnValue> = UseQueryReturnType<selectData, Error>;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Hook for getting TIP20 token metadata.
|
|
450
|
+
*
|
|
451
|
+
* @example
|
|
452
|
+
* ```tsx
|
|
453
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
454
|
+
*
|
|
455
|
+
* function App() {
|
|
456
|
+
* const { data, isLoading } = Hooks.token.useGetMetadata({
|
|
457
|
+
* token: '0x...',
|
|
458
|
+
* })
|
|
459
|
+
*
|
|
460
|
+
* if (isLoading) return <div>Loading...</div>
|
|
461
|
+
* return <div>{data?.name} ({data?.symbol})</div>
|
|
462
|
+
* }
|
|
463
|
+
* ```
|
|
464
|
+
*
|
|
465
|
+
* @param parameters - Parameters.
|
|
466
|
+
* @returns Query result with token metadata.
|
|
467
|
+
*/
|
|
468
|
+
export declare function useGetMetadata<config extends Config = ResolvedRegister['config'], selectData = Actions.token.getMetadata.ReturnValue>(parameters?: useGetMetadata.Parameters<config, selectData>): useGetMetadata.ReturnValue<selectData>;
|
|
469
|
+
export declare namespace useGetMetadata {
|
|
470
|
+
type Parameters<config extends Config = ResolvedRegister['config'], selectData = Actions.token.getMetadata.ReturnValue> = ConfigParameter<config> & QueryParameter<Actions.token.getMetadata.ReturnValue, Actions.token.getMetadata.ErrorType, selectData, Actions.token.getMetadata.QueryKey<config>> & ExactPartial<Omit<Actions.token.getMetadata.queryOptions.Parameters<config, selectData>, 'query'>>;
|
|
471
|
+
type ReturnValue<selectData = Actions.token.getMetadata.ReturnValue> = UseQueryReturnType<selectData, Error>;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Hook for getting the admin role for a specific role in a TIP20 token.
|
|
475
|
+
*
|
|
476
|
+
* @example
|
|
477
|
+
* ```tsx
|
|
478
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
479
|
+
*
|
|
480
|
+
* function App() {
|
|
481
|
+
* const { data, isLoading } = Hooks.token.useGetRoleAdmin({
|
|
482
|
+
* role: 'issuer',
|
|
483
|
+
* token: '0x...',
|
|
484
|
+
* })
|
|
485
|
+
*
|
|
486
|
+
* if (isLoading) return <div>Loading...</div>
|
|
487
|
+
* return <div>Admin Role: {data}</div>
|
|
488
|
+
* }
|
|
489
|
+
* ```
|
|
490
|
+
*
|
|
491
|
+
* @param parameters - Parameters.
|
|
492
|
+
* @returns Query result with admin role hash.
|
|
493
|
+
*/
|
|
494
|
+
export declare function useGetRoleAdmin<config extends Config = ResolvedRegister['config'], selectData = Actions.token.getRoleAdmin.ReturnValue>(parameters: useGetRoleAdmin.Parameters<config, selectData>): useGetRoleAdmin.ReturnValue<selectData>;
|
|
495
|
+
export declare namespace useGetRoleAdmin {
|
|
496
|
+
type Parameters<config extends Config = ResolvedRegister['config'], selectData = Actions.token.getRoleAdmin.ReturnValue> = ConfigParameter<config> & QueryParameter<Actions.token.getRoleAdmin.ReturnValue, Actions.token.getRoleAdmin.ErrorType, selectData, Actions.token.getRoleAdmin.QueryKey<config>> & ExactPartial<Omit<Actions.token.getRoleAdmin.queryOptions.Parameters<config, selectData>, 'query'>>;
|
|
497
|
+
type ReturnValue<selectData = Actions.token.getRoleAdmin.ReturnValue> = UseQueryReturnType<selectData, Error>;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Hook for granting roles for a TIP20 token.
|
|
501
|
+
*
|
|
502
|
+
* @example
|
|
503
|
+
* ```tsx
|
|
504
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
505
|
+
*
|
|
506
|
+
* function App() {
|
|
507
|
+
* const { mutate, isPending } = Hooks.token.useGrantRoles()
|
|
508
|
+
*
|
|
509
|
+
* return (
|
|
510
|
+
* <button
|
|
511
|
+
* onClick={() => mutate({ token: '0x...', to: '0x...', roles: ['issuer'] })}
|
|
512
|
+
* disabled={isPending}
|
|
513
|
+
* >
|
|
514
|
+
* Grant Roles
|
|
515
|
+
* </button>
|
|
516
|
+
* )
|
|
517
|
+
* }
|
|
518
|
+
* ```
|
|
519
|
+
*
|
|
520
|
+
* @param parameters - Parameters.
|
|
521
|
+
* @returns Mutation result.
|
|
522
|
+
*/
|
|
523
|
+
export declare function useGrantRoles<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useGrantRoles.Parameters<config, context>): useGrantRoles.ReturnType<config, context>;
|
|
524
|
+
export declare namespace useGrantRoles {
|
|
525
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
526
|
+
mutation?: UseMutationParameters<Actions.token.grantRoles.ReturnValue, Actions.token.grantRoles.ErrorType, Actions.token.grantRoles.Parameters<config>, context> | undefined;
|
|
527
|
+
};
|
|
528
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.grantRoles.ReturnValue, Actions.token.grantRoles.ErrorType, Actions.token.grantRoles.Parameters<config>, context>;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Hook for granting roles for a TIP20 token.
|
|
532
|
+
*
|
|
533
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
534
|
+
* to be included on a block before returning a response.
|
|
535
|
+
*
|
|
536
|
+
* @example
|
|
537
|
+
* ```tsx
|
|
538
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
539
|
+
*
|
|
540
|
+
* function App() {
|
|
541
|
+
* const { mutate, isPending } = Hooks.token.useGrantRolesSync()
|
|
542
|
+
*
|
|
543
|
+
* return (
|
|
544
|
+
* <button
|
|
545
|
+
* onClick={() => mutate({ token: '0x...', to: '0x...', roles: ['issuer'] })}
|
|
546
|
+
* disabled={isPending}
|
|
547
|
+
* >
|
|
548
|
+
* Grant Roles
|
|
549
|
+
* </button>
|
|
550
|
+
* )
|
|
551
|
+
* }
|
|
552
|
+
* ```
|
|
553
|
+
*
|
|
554
|
+
* @param parameters - Parameters.
|
|
555
|
+
* @returns Mutation result.
|
|
556
|
+
*/
|
|
557
|
+
export declare function useGrantRolesSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useGrantRolesSync.Parameters<config, context>): useGrantRolesSync.ReturnType<config, context>;
|
|
558
|
+
export declare namespace useGrantRolesSync {
|
|
559
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
560
|
+
mutation?: UseMutationParameters<Actions.token.grantRolesSync.ReturnValue, Actions.token.grantRolesSync.ErrorType, Actions.token.grantRolesSync.Parameters<config>, context> | undefined;
|
|
561
|
+
};
|
|
562
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.grantRolesSync.ReturnValue, Actions.token.grantRolesSync.ErrorType, Actions.token.grantRolesSync.Parameters<config>, context>;
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Hook for checking if an account has a specific role for a TIP20 token.
|
|
566
|
+
*
|
|
567
|
+
* @example
|
|
568
|
+
* ```tsx
|
|
569
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
570
|
+
*
|
|
571
|
+
* function App() {
|
|
572
|
+
* const { data, isLoading } = Hooks.token.useHasRole({
|
|
573
|
+
* account: '0x...',
|
|
574
|
+
* role: 'issuer',
|
|
575
|
+
* token: '0x...',
|
|
576
|
+
* })
|
|
577
|
+
*
|
|
578
|
+
* if (isLoading) return <div>Loading...</div>
|
|
579
|
+
* return <div>Has Role: {data ? 'Yes' : 'No'}</div>
|
|
580
|
+
* }
|
|
581
|
+
* ```
|
|
582
|
+
*
|
|
583
|
+
* @param parameters - Parameters.
|
|
584
|
+
* @returns Query result with boolean indicating if account has role.
|
|
585
|
+
*/
|
|
586
|
+
export declare function useHasRole<config extends Config = ResolvedRegister['config'], selectData = Actions.token.hasRole.ReturnValue>(parameters: useHasRole.Parameters<config, selectData>): useHasRole.ReturnValue<selectData>;
|
|
587
|
+
export declare namespace useHasRole {
|
|
588
|
+
type Parameters<config extends Config = ResolvedRegister['config'], selectData = Actions.token.hasRole.ReturnValue> = ConfigParameter<config> & QueryParameter<Actions.token.hasRole.ReturnValue, Actions.token.hasRole.ErrorType, selectData, Actions.token.hasRole.QueryKey<config>> & ExactPartial<Omit<Actions.token.hasRole.queryOptions.Parameters<config, selectData>, 'query'>>;
|
|
589
|
+
type ReturnValue<selectData = Actions.token.hasRole.ReturnValue> = UseQueryReturnType<selectData, Error>;
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Hook for minting TIP20 tokens to an address.
|
|
593
|
+
*
|
|
594
|
+
* @example
|
|
595
|
+
* ```tsx
|
|
596
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
597
|
+
*
|
|
598
|
+
* function App() {
|
|
599
|
+
* const { mutate, isPending } = Hooks.token.useMint()
|
|
600
|
+
*
|
|
601
|
+
* return (
|
|
602
|
+
* <button
|
|
603
|
+
* onClick={() => mutate({ to: '0x...', amount: 100n, token: '0x...' })}
|
|
604
|
+
* disabled={isPending}
|
|
605
|
+
* >
|
|
606
|
+
* Mint
|
|
607
|
+
* </button>
|
|
608
|
+
* )
|
|
609
|
+
* }
|
|
610
|
+
* ```
|
|
611
|
+
*
|
|
612
|
+
* @param parameters - Parameters.
|
|
613
|
+
* @returns Mutation result.
|
|
614
|
+
*/
|
|
615
|
+
export declare function useMint<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useMint.Parameters<config, context>): useMint.ReturnType<config, context>;
|
|
616
|
+
export declare namespace useMint {
|
|
617
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
618
|
+
mutation?: UseMutationParameters<Actions.token.mint.ReturnValue, Actions.token.mint.ErrorType, Actions.token.mint.Parameters<config>, context> | undefined;
|
|
619
|
+
};
|
|
620
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.mint.ReturnValue, Actions.token.mint.ErrorType, Actions.token.mint.Parameters<config>, context>;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Hook for minting TIP20 tokens to an address.
|
|
624
|
+
*
|
|
625
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
626
|
+
* to be included on a block before returning a response.
|
|
627
|
+
*
|
|
628
|
+
* @example
|
|
629
|
+
* ```tsx
|
|
630
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
631
|
+
*
|
|
632
|
+
* function App() {
|
|
633
|
+
* const { mutate, isPending } = Hooks.token.useMintSync()
|
|
634
|
+
*
|
|
635
|
+
* return (
|
|
636
|
+
* <button
|
|
637
|
+
* onClick={() => mutate({ to: '0x...', amount: 100n, token: '0x...' })}
|
|
638
|
+
* disabled={isPending}
|
|
639
|
+
* >
|
|
640
|
+
* Mint
|
|
641
|
+
* </button>
|
|
642
|
+
* )
|
|
643
|
+
* }
|
|
644
|
+
* ```
|
|
645
|
+
*
|
|
646
|
+
* @param parameters - Parameters.
|
|
647
|
+
* @returns Mutation result.
|
|
648
|
+
*/
|
|
649
|
+
export declare function useMintSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useMintSync.Parameters<config, context>): useMintSync.ReturnType<config, context>;
|
|
650
|
+
export declare namespace useMintSync {
|
|
651
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
652
|
+
mutation?: UseMutationParameters<Actions.token.mintSync.ReturnValue, Actions.token.mintSync.ErrorType, Actions.token.mintSync.Parameters<config>, context> | undefined;
|
|
653
|
+
};
|
|
654
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.mintSync.ReturnValue, Actions.token.mintSync.ErrorType, Actions.token.mintSync.Parameters<config>, context>;
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Hook for pausing a TIP20 token.
|
|
658
|
+
*
|
|
659
|
+
* @example
|
|
660
|
+
* ```tsx
|
|
661
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
662
|
+
*
|
|
663
|
+
* function App() {
|
|
664
|
+
* const { mutate, isPending } = Hooks.token.usePause()
|
|
665
|
+
*
|
|
666
|
+
* return (
|
|
667
|
+
* <button
|
|
668
|
+
* onClick={() => mutate({ token: '0x...' })}
|
|
669
|
+
* disabled={isPending}
|
|
670
|
+
* >
|
|
671
|
+
* Pause
|
|
672
|
+
* </button>
|
|
673
|
+
* )
|
|
674
|
+
* }
|
|
675
|
+
* ```
|
|
676
|
+
*
|
|
677
|
+
* @param parameters - Parameters.
|
|
678
|
+
* @returns Mutation result.
|
|
679
|
+
*/
|
|
680
|
+
export declare function usePause<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: usePause.Parameters<config, context>): usePause.ReturnType<config, context>;
|
|
681
|
+
export declare namespace usePause {
|
|
682
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
683
|
+
mutation?: UseMutationParameters<Actions.token.pause.ReturnValue, Actions.token.pause.ErrorType, Actions.token.pause.Parameters<config>, context> | undefined;
|
|
684
|
+
};
|
|
685
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.pause.ReturnValue, Actions.token.pause.ErrorType, Actions.token.pause.Parameters<config>, context>;
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Hook for pausing a TIP20 token.
|
|
689
|
+
*
|
|
690
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
691
|
+
* to be included on a block before returning a response.
|
|
692
|
+
*
|
|
693
|
+
* @example
|
|
694
|
+
* ```tsx
|
|
695
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
696
|
+
*
|
|
697
|
+
* function App() {
|
|
698
|
+
* const { mutate, isPending } = Hooks.token.usePauseSync()
|
|
699
|
+
*
|
|
700
|
+
* return (
|
|
701
|
+
* <button
|
|
702
|
+
* onClick={() => mutate({ token: '0x...' })}
|
|
703
|
+
* disabled={isPending}
|
|
704
|
+
* >
|
|
705
|
+
* Pause
|
|
706
|
+
* </button>
|
|
707
|
+
* )
|
|
708
|
+
* }
|
|
709
|
+
* ```
|
|
710
|
+
*
|
|
711
|
+
* @param parameters - Parameters.
|
|
712
|
+
* @returns Mutation result.
|
|
713
|
+
*/
|
|
714
|
+
export declare function usePauseSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: usePauseSync.Parameters<config, context>): usePauseSync.ReturnType<config, context>;
|
|
715
|
+
export declare namespace usePauseSync {
|
|
716
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
717
|
+
mutation?: UseMutationParameters<Actions.token.pauseSync.ReturnValue, Actions.token.pauseSync.ErrorType, Actions.token.pauseSync.Parameters<config>, context> | undefined;
|
|
718
|
+
};
|
|
719
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.pauseSync.ReturnValue, Actions.token.pauseSync.ErrorType, Actions.token.pauseSync.Parameters<config>, context>;
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Hook for renouncing roles for a TIP20 token.
|
|
723
|
+
*
|
|
724
|
+
* @example
|
|
725
|
+
* ```tsx
|
|
726
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
727
|
+
*
|
|
728
|
+
* function App() {
|
|
729
|
+
* const { mutate, isPending } = Hooks.token.useRenounceRoles()
|
|
730
|
+
*
|
|
731
|
+
* return (
|
|
732
|
+
* <button
|
|
733
|
+
* onClick={() => mutate({ token: '0x...', roles: ['issuer'] })}
|
|
734
|
+
* disabled={isPending}
|
|
735
|
+
* >
|
|
736
|
+
* Renounce Roles
|
|
737
|
+
* </button>
|
|
738
|
+
* )
|
|
739
|
+
* }
|
|
740
|
+
* ```
|
|
741
|
+
*
|
|
742
|
+
* @param parameters - Parameters.
|
|
743
|
+
* @returns Mutation result.
|
|
744
|
+
*/
|
|
745
|
+
export declare function useRenounceRoles<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useRenounceRoles.Parameters<config, context>): useRenounceRoles.ReturnType<config, context>;
|
|
746
|
+
export declare namespace useRenounceRoles {
|
|
747
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
748
|
+
mutation?: UseMutationParameters<Actions.token.renounceRoles.ReturnValue, Actions.token.renounceRoles.ErrorType, Actions.token.renounceRoles.Parameters<config>, context> | undefined;
|
|
749
|
+
};
|
|
750
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.renounceRoles.ReturnValue, Actions.token.renounceRoles.ErrorType, Actions.token.renounceRoles.Parameters<config>, context>;
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Hook for renouncing roles for a TIP20 token.
|
|
754
|
+
*
|
|
755
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
756
|
+
* to be included on a block before returning a response.
|
|
757
|
+
*
|
|
758
|
+
* @example
|
|
759
|
+
* ```tsx
|
|
760
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
761
|
+
*
|
|
762
|
+
* function App() {
|
|
763
|
+
* const { mutate, isPending } = Hooks.token.useRenounceRolesSync()
|
|
764
|
+
*
|
|
765
|
+
* return (
|
|
766
|
+
* <button
|
|
767
|
+
* onClick={() => mutate({ token: '0x...', roles: ['issuer'] })}
|
|
768
|
+
* disabled={isPending}
|
|
769
|
+
* >
|
|
770
|
+
* Renounce Roles
|
|
771
|
+
* </button>
|
|
772
|
+
* )
|
|
773
|
+
* }
|
|
774
|
+
* ```
|
|
775
|
+
*
|
|
776
|
+
* @param parameters - Parameters.
|
|
777
|
+
* @returns Mutation result.
|
|
778
|
+
*/
|
|
779
|
+
export declare function useRenounceRolesSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useRenounceRolesSync.Parameters<config, context>): useRenounceRolesSync.ReturnType<config, context>;
|
|
780
|
+
export declare namespace useRenounceRolesSync {
|
|
781
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
782
|
+
mutation?: UseMutationParameters<Actions.token.renounceRolesSync.ReturnValue, Actions.token.renounceRolesSync.ErrorType, Actions.token.renounceRolesSync.Parameters<config>, context> | undefined;
|
|
783
|
+
};
|
|
784
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.renounceRolesSync.ReturnValue, Actions.token.renounceRolesSync.ErrorType, Actions.token.renounceRolesSync.Parameters<config>, context>;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* Hook for revoking roles for a TIP20 token.
|
|
788
|
+
*
|
|
789
|
+
* @example
|
|
790
|
+
* ```tsx
|
|
791
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
792
|
+
*
|
|
793
|
+
* function App() {
|
|
794
|
+
* const { mutate, isPending } = Hooks.token.useRevokeRoles()
|
|
795
|
+
*
|
|
796
|
+
* return (
|
|
797
|
+
* <button
|
|
798
|
+
* onClick={() => mutate({ token: '0x...', from: '0x...', roles: ['issuer'] })}
|
|
799
|
+
* disabled={isPending}
|
|
800
|
+
* >
|
|
801
|
+
* Revoke Roles
|
|
802
|
+
* </button>
|
|
803
|
+
* )
|
|
804
|
+
* }
|
|
805
|
+
* ```
|
|
806
|
+
*
|
|
807
|
+
* @param parameters - Parameters.
|
|
808
|
+
* @returns Mutation result.
|
|
809
|
+
*/
|
|
810
|
+
export declare function useRevokeRoles<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useRevokeRoles.Parameters<config, context>): useRevokeRoles.ReturnType<config, context>;
|
|
811
|
+
export declare namespace useRevokeRoles {
|
|
812
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
813
|
+
mutation?: UseMutationParameters<Actions.token.revokeRoles.ReturnValue, Actions.token.revokeRoles.ErrorType, Actions.token.revokeRoles.Parameters<config>, context> | undefined;
|
|
814
|
+
};
|
|
815
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.revokeRoles.ReturnValue, Actions.token.revokeRoles.ErrorType, Actions.token.revokeRoles.Parameters<config>, context>;
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* Hook for revoking roles for a TIP20 token.
|
|
819
|
+
*
|
|
820
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
821
|
+
* to be included on a block before returning a response.
|
|
822
|
+
*
|
|
823
|
+
* @example
|
|
824
|
+
* ```tsx
|
|
825
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
826
|
+
*
|
|
827
|
+
* function App() {
|
|
828
|
+
* const { mutate, isPending } = Hooks.token.useRevokeRolesSync()
|
|
829
|
+
*
|
|
830
|
+
* return (
|
|
831
|
+
* <button
|
|
832
|
+
* onClick={() => mutate({ token: '0x...', from: '0x...', roles: ['issuer'] })}
|
|
833
|
+
* disabled={isPending}
|
|
834
|
+
* >
|
|
835
|
+
* Revoke Roles
|
|
836
|
+
* </button>
|
|
837
|
+
* )
|
|
838
|
+
* }
|
|
839
|
+
* ```
|
|
840
|
+
*
|
|
841
|
+
* @param parameters - Parameters.
|
|
842
|
+
* @returns Mutation result.
|
|
843
|
+
*/
|
|
844
|
+
export declare function useRevokeRolesSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useRevokeRolesSync.Parameters<config, context>): useRevokeRolesSync.ReturnType<config, context>;
|
|
845
|
+
export declare namespace useRevokeRolesSync {
|
|
846
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
847
|
+
mutation?: UseMutationParameters<Actions.token.revokeRolesSync.ReturnValue, Actions.token.revokeRolesSync.ErrorType, Actions.token.revokeRolesSync.Parameters<config>, context> | undefined;
|
|
848
|
+
};
|
|
849
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.revokeRolesSync.ReturnValue, Actions.token.revokeRolesSync.ErrorType, Actions.token.revokeRolesSync.Parameters<config>, context>;
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Hook for setting the admin role for a specific role in a TIP20 token.
|
|
853
|
+
*
|
|
854
|
+
* @example
|
|
855
|
+
* ```tsx
|
|
856
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
857
|
+
*
|
|
858
|
+
* function App() {
|
|
859
|
+
* const { mutate, isPending } = Hooks.token.useSetRoleAdmin()
|
|
860
|
+
*
|
|
861
|
+
* return (
|
|
862
|
+
* <button
|
|
863
|
+
* onClick={() => mutate({ token: '0x...', role: 'issuer', adminRole: 'pause' })}
|
|
864
|
+
* disabled={isPending}
|
|
865
|
+
* >
|
|
866
|
+
* Set Role Admin
|
|
867
|
+
* </button>
|
|
868
|
+
* )
|
|
869
|
+
* }
|
|
870
|
+
* ```
|
|
871
|
+
*
|
|
872
|
+
* @param parameters - Parameters.
|
|
873
|
+
* @returns Mutation result.
|
|
874
|
+
*/
|
|
875
|
+
export declare function useSetRoleAdmin<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useSetRoleAdmin.Parameters<config, context>): useSetRoleAdmin.ReturnType<config, context>;
|
|
876
|
+
export declare namespace useSetRoleAdmin {
|
|
877
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
878
|
+
mutation?: UseMutationParameters<Actions.token.setRoleAdmin.ReturnValue, Actions.token.setRoleAdmin.ErrorType, Actions.token.setRoleAdmin.Parameters<config>, context> | undefined;
|
|
879
|
+
};
|
|
880
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.setRoleAdmin.ReturnValue, Actions.token.setRoleAdmin.ErrorType, Actions.token.setRoleAdmin.Parameters<config>, context>;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* Hook for setting the admin role for a specific role in a TIP20 token.
|
|
884
|
+
*
|
|
885
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
886
|
+
* to be included on a block before returning a response.
|
|
887
|
+
*
|
|
888
|
+
* @example
|
|
889
|
+
* ```tsx
|
|
890
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
891
|
+
*
|
|
892
|
+
* function App() {
|
|
893
|
+
* const { mutate, isPending } = Hooks.token.useSetRoleAdminSync()
|
|
894
|
+
*
|
|
895
|
+
* return (
|
|
896
|
+
* <button
|
|
897
|
+
* onClick={() => mutate({ token: '0x...', role: 'issuer', adminRole: 'pause' })}
|
|
898
|
+
* disabled={isPending}
|
|
899
|
+
* >
|
|
900
|
+
* Set Role Admin
|
|
901
|
+
* </button>
|
|
902
|
+
* )
|
|
903
|
+
* }
|
|
904
|
+
* ```
|
|
905
|
+
*
|
|
906
|
+
* @param parameters - Parameters.
|
|
907
|
+
* @returns Mutation result.
|
|
908
|
+
*/
|
|
909
|
+
export declare function useSetRoleAdminSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useSetRoleAdminSync.Parameters<config, context>): useSetRoleAdminSync.ReturnType<config, context>;
|
|
910
|
+
export declare namespace useSetRoleAdminSync {
|
|
911
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
912
|
+
mutation?: UseMutationParameters<Actions.token.setRoleAdminSync.ReturnValue, Actions.token.setRoleAdminSync.ErrorType, Actions.token.setRoleAdminSync.Parameters<config>, context> | undefined;
|
|
913
|
+
};
|
|
914
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.setRoleAdminSync.ReturnValue, Actions.token.setRoleAdminSync.ErrorType, Actions.token.setRoleAdminSync.Parameters<config>, context>;
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* Hook for setting the supply cap for a TIP20 token.
|
|
918
|
+
*
|
|
919
|
+
* @example
|
|
920
|
+
* ```tsx
|
|
921
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
922
|
+
*
|
|
923
|
+
* function App() {
|
|
924
|
+
* const { mutate, isPending } = Hooks.token.useSetSupplyCap()
|
|
925
|
+
*
|
|
926
|
+
* return (
|
|
927
|
+
* <button
|
|
928
|
+
* onClick={() => mutate({ token: '0x...', supplyCap: 1000000n })}
|
|
929
|
+
* disabled={isPending}
|
|
930
|
+
* >
|
|
931
|
+
* Set Supply Cap
|
|
932
|
+
* </button>
|
|
933
|
+
* )
|
|
934
|
+
* }
|
|
935
|
+
* ```
|
|
936
|
+
*
|
|
937
|
+
* @param parameters - Parameters.
|
|
938
|
+
* @returns Mutation result.
|
|
939
|
+
*/
|
|
940
|
+
export declare function useSetSupplyCap<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useSetSupplyCap.Parameters<config, context>): useSetSupplyCap.ReturnType<config, context>;
|
|
941
|
+
export declare namespace useSetSupplyCap {
|
|
942
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
943
|
+
mutation?: UseMutationParameters<Actions.token.setSupplyCap.ReturnValue, Actions.token.setSupplyCap.ErrorType, Actions.token.setSupplyCap.Parameters<config>, context> | undefined;
|
|
944
|
+
};
|
|
945
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.setSupplyCap.ReturnValue, Actions.token.setSupplyCap.ErrorType, Actions.token.setSupplyCap.Parameters<config>, context>;
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Hook for setting the supply cap for a TIP20 token.
|
|
949
|
+
*
|
|
950
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
951
|
+
* to be included on a block before returning a response.
|
|
952
|
+
*
|
|
953
|
+
* @example
|
|
954
|
+
* ```tsx
|
|
955
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
956
|
+
*
|
|
957
|
+
* function App() {
|
|
958
|
+
* const { mutate, isPending } = Hooks.token.useSetSupplyCapSync()
|
|
959
|
+
*
|
|
960
|
+
* return (
|
|
961
|
+
* <button
|
|
962
|
+
* onClick={() => mutate({ token: '0x...', supplyCap: 1000000n })}
|
|
963
|
+
* disabled={isPending}
|
|
964
|
+
* >
|
|
965
|
+
* Set Supply Cap
|
|
966
|
+
* </button>
|
|
967
|
+
* )
|
|
968
|
+
* }
|
|
969
|
+
* ```
|
|
970
|
+
*
|
|
971
|
+
* @param parameters - Parameters.
|
|
972
|
+
* @returns Mutation result.
|
|
973
|
+
*/
|
|
974
|
+
export declare function useSetSupplyCapSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useSetSupplyCapSync.Parameters<config, context>): useSetSupplyCapSync.ReturnType<config, context>;
|
|
975
|
+
export declare namespace useSetSupplyCapSync {
|
|
976
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
977
|
+
mutation?: UseMutationParameters<Actions.token.setSupplyCapSync.ReturnValue, Actions.token.setSupplyCapSync.ErrorType, Actions.token.setSupplyCapSync.Parameters<config>, context> | undefined;
|
|
978
|
+
};
|
|
979
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.setSupplyCapSync.ReturnValue, Actions.token.setSupplyCapSync.ErrorType, Actions.token.setSupplyCapSync.Parameters<config>, context>;
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* Hook for transferring TIP20 tokens to another address.
|
|
983
|
+
*
|
|
984
|
+
* @example
|
|
985
|
+
* ```tsx
|
|
986
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
987
|
+
*
|
|
988
|
+
* function App() {
|
|
989
|
+
* const { mutate, isPending } = Hooks.token.useTransfer()
|
|
990
|
+
*
|
|
991
|
+
* return (
|
|
992
|
+
* <button
|
|
993
|
+
* onClick={() => mutate({ to: '0x...', amount: 100n })}
|
|
994
|
+
* disabled={isPending}
|
|
995
|
+
* >
|
|
996
|
+
* Transfer
|
|
997
|
+
* </button>
|
|
998
|
+
* )
|
|
999
|
+
* }
|
|
1000
|
+
* ```
|
|
1001
|
+
*
|
|
1002
|
+
* @param parameters - Parameters.
|
|
1003
|
+
* @returns Mutation result.
|
|
1004
|
+
*/
|
|
1005
|
+
export declare function useTransfer<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useTransfer.Parameters<config, context>): useTransfer.ReturnType<config, context>;
|
|
1006
|
+
export declare namespace useTransfer {
|
|
1007
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
1008
|
+
mutation?: UseMutationParameters<Actions.token.transfer.ReturnValue, Actions.token.transfer.ErrorType, Actions.token.transfer.Parameters<config>, context> | undefined;
|
|
1009
|
+
};
|
|
1010
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.transfer.ReturnValue, Actions.token.transfer.ErrorType, Actions.token.transfer.Parameters<config>, context>;
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Hook for transferring TIP20 tokens to another address.
|
|
1014
|
+
*
|
|
1015
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
1016
|
+
* to be included on a block before returning a response.
|
|
1017
|
+
*
|
|
1018
|
+
* @example
|
|
1019
|
+
* ```tsx
|
|
1020
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
1021
|
+
*
|
|
1022
|
+
* function App() {
|
|
1023
|
+
* const { mutate, isPending } = Hooks.token.useTransferSync()
|
|
1024
|
+
*
|
|
1025
|
+
* return (
|
|
1026
|
+
* <button
|
|
1027
|
+
* onClick={() => mutate({ to: '0x...', amount: 100n })}
|
|
1028
|
+
* disabled={isPending}
|
|
1029
|
+
* >
|
|
1030
|
+
* Transfer
|
|
1031
|
+
* </button>
|
|
1032
|
+
* )
|
|
1033
|
+
* }
|
|
1034
|
+
* ```
|
|
1035
|
+
*
|
|
1036
|
+
* @param parameters - Parameters.
|
|
1037
|
+
* @returns Mutation result.
|
|
1038
|
+
*/
|
|
1039
|
+
export declare function useTransferSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useTransferSync.Parameters<config, context>): useTransferSync.ReturnType<config, context>;
|
|
1040
|
+
export declare namespace useTransferSync {
|
|
1041
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
1042
|
+
mutation?: UseMutationParameters<Actions.token.transferSync.ReturnValue, Actions.token.transferSync.ErrorType, Actions.token.transferSync.Parameters<config>, context> | undefined;
|
|
1043
|
+
};
|
|
1044
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.transferSync.ReturnValue, Actions.token.transferSync.ErrorType, Actions.token.transferSync.Parameters<config>, context>;
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Hook for unpausing a TIP20 token.
|
|
1048
|
+
*
|
|
1049
|
+
* @example
|
|
1050
|
+
* ```tsx
|
|
1051
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
1052
|
+
*
|
|
1053
|
+
* function App() {
|
|
1054
|
+
* const { mutate, isPending } = Hooks.token.useUnpause()
|
|
1055
|
+
*
|
|
1056
|
+
* return (
|
|
1057
|
+
* <button
|
|
1058
|
+
* onClick={() => mutate({ token: '0x...' })}
|
|
1059
|
+
* disabled={isPending}
|
|
1060
|
+
* >
|
|
1061
|
+
* Unpause
|
|
1062
|
+
* </button>
|
|
1063
|
+
* )
|
|
1064
|
+
* }
|
|
1065
|
+
* ```
|
|
1066
|
+
*
|
|
1067
|
+
* @param parameters - Parameters.
|
|
1068
|
+
* @returns Mutation result.
|
|
1069
|
+
*/
|
|
1070
|
+
export declare function useUnpause<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useUnpause.Parameters<config, context>): useUnpause.ReturnType<config, context>;
|
|
1071
|
+
export declare namespace useUnpause {
|
|
1072
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
1073
|
+
mutation?: UseMutationParameters<Actions.token.unpause.ReturnValue, Actions.token.unpause.ErrorType, Actions.token.unpause.Parameters<config>, context> | undefined;
|
|
1074
|
+
};
|
|
1075
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.unpause.ReturnValue, Actions.token.unpause.ErrorType, Actions.token.unpause.Parameters<config>, context>;
|
|
1076
|
+
}
|
|
1077
|
+
/**
|
|
1078
|
+
* Hook for unpausing a TIP20 token.
|
|
1079
|
+
*
|
|
1080
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
1081
|
+
* to be included on a block before returning a response.
|
|
1082
|
+
*
|
|
1083
|
+
* @example
|
|
1084
|
+
* ```tsx
|
|
1085
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
1086
|
+
*
|
|
1087
|
+
* function App() {
|
|
1088
|
+
* const { mutate, isPending } = Hooks.token.useUnpauseSync()
|
|
1089
|
+
*
|
|
1090
|
+
* return (
|
|
1091
|
+
* <button
|
|
1092
|
+
* onClick={() => mutate({ token: '0x...' })}
|
|
1093
|
+
* disabled={isPending}
|
|
1094
|
+
* >
|
|
1095
|
+
* Unpause
|
|
1096
|
+
* </button>
|
|
1097
|
+
* )
|
|
1098
|
+
* }
|
|
1099
|
+
* ```
|
|
1100
|
+
*
|
|
1101
|
+
* @param parameters - Parameters.
|
|
1102
|
+
* @returns Mutation result.
|
|
1103
|
+
*/
|
|
1104
|
+
export declare function useUnpauseSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: useUnpauseSync.Parameters<config, context>): useUnpauseSync.ReturnType<config, context>;
|
|
1105
|
+
export declare namespace useUnpauseSync {
|
|
1106
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
1107
|
+
mutation?: UseMutationParameters<Actions.token.unpauseSync.ReturnValue, Actions.token.unpauseSync.ErrorType, Actions.token.unpauseSync.Parameters<config>, context> | undefined;
|
|
1108
|
+
};
|
|
1109
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.unpauseSync.ReturnValue, Actions.token.unpauseSync.ErrorType, Actions.token.unpauseSync.Parameters<config>, context>;
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1112
|
+
* Hook for preparing the quote token update for a TIP20 token.
|
|
1113
|
+
*
|
|
1114
|
+
* @example
|
|
1115
|
+
* ```tsx
|
|
1116
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
1117
|
+
*
|
|
1118
|
+
* function App() {
|
|
1119
|
+
* const { mutate, isPending } = Hooks.token.usePrepareUpdateQuoteToken()
|
|
1120
|
+
*
|
|
1121
|
+
* return (
|
|
1122
|
+
* <button
|
|
1123
|
+
* onClick={() => mutate({ token: '0x...', quoteToken: '0x...' })}
|
|
1124
|
+
* disabled={isPending}
|
|
1125
|
+
* >
|
|
1126
|
+
* Prepare Update Quote Token
|
|
1127
|
+
* </button>
|
|
1128
|
+
* )
|
|
1129
|
+
* }
|
|
1130
|
+
* ```
|
|
1131
|
+
*
|
|
1132
|
+
* @param parameters - Parameters.
|
|
1133
|
+
* @returns Mutation result.
|
|
1134
|
+
*/
|
|
1135
|
+
export declare function usePrepareUpdateQuoteToken<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: usePrepareUpdateQuoteToken.Parameters<config, context>): usePrepareUpdateQuoteToken.ReturnType<config, context>;
|
|
1136
|
+
export declare namespace usePrepareUpdateQuoteToken {
|
|
1137
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
1138
|
+
mutation?: UseMutationParameters<Actions.token.prepareUpdateQuoteToken.ReturnValue, Actions.token.prepareUpdateQuoteToken.ErrorType, Actions.token.prepareUpdateQuoteToken.Parameters<config>, context> | undefined;
|
|
1139
|
+
};
|
|
1140
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.prepareUpdateQuoteToken.ReturnValue, Actions.token.prepareUpdateQuoteToken.ErrorType, Actions.token.prepareUpdateQuoteToken.Parameters<config>, context>;
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* Hook for preparing the quote token update for a TIP20 token.
|
|
1144
|
+
*
|
|
1145
|
+
* Note: This is a synchronous hook that waits for the transaction
|
|
1146
|
+
* to be included on a block before returning a response.
|
|
1147
|
+
*
|
|
1148
|
+
* @example
|
|
1149
|
+
* ```tsx
|
|
1150
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
1151
|
+
*
|
|
1152
|
+
* function App() {
|
|
1153
|
+
* const { mutate, isPending } = Hooks.token.usePrepareUpdateQuoteTokenSync()
|
|
1154
|
+
*
|
|
1155
|
+
* return (
|
|
1156
|
+
* <button
|
|
1157
|
+
* onClick={() => mutate({ token: '0x...', quoteToken: '0x...' })}
|
|
1158
|
+
* disabled={isPending}
|
|
1159
|
+
* >
|
|
1160
|
+
* Prepare Update Quote Token
|
|
1161
|
+
* </button>
|
|
1162
|
+
* )
|
|
1163
|
+
* }
|
|
1164
|
+
* ```
|
|
1165
|
+
*
|
|
1166
|
+
* @param parameters - Parameters.
|
|
1167
|
+
* @returns Mutation result.
|
|
1168
|
+
*/
|
|
1169
|
+
export declare function usePrepareUpdateQuoteTokenSync<config extends Config = ResolvedRegister['config'], context = unknown>(parameters?: usePrepareUpdateQuoteTokenSync.Parameters<config, context>): usePrepareUpdateQuoteTokenSync.ReturnType<config, context>;
|
|
1170
|
+
export declare namespace usePrepareUpdateQuoteTokenSync {
|
|
1171
|
+
type Parameters<config extends Config = Config, context = unknown> = ConfigParameter<config> & {
|
|
1172
|
+
mutation?: UseMutationParameters<Actions.token.prepareUpdateQuoteTokenSync.ReturnValue, Actions.token.prepareUpdateQuoteTokenSync.ErrorType, Actions.token.prepareUpdateQuoteTokenSync.Parameters<config>, context> | undefined;
|
|
1173
|
+
};
|
|
1174
|
+
type ReturnType<config extends Config = Config, context = unknown> = UseMutationResult<Actions.token.prepareUpdateQuoteTokenSync.ReturnValue, Actions.token.prepareUpdateQuoteTokenSync.ErrorType, Actions.token.prepareUpdateQuoteTokenSync.Parameters<config>, context>;
|
|
1175
|
+
}
|
|
1176
|
+
/**
|
|
1177
|
+
* Hook for watching TIP20 token role admin updates.
|
|
1178
|
+
*
|
|
1179
|
+
* @example
|
|
1180
|
+
* ```tsx
|
|
1181
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
1182
|
+
*
|
|
1183
|
+
* function App() {
|
|
1184
|
+
* Hooks.token.useWatchAdminRole({
|
|
1185
|
+
* onRoleAdminUpdated(args) {
|
|
1186
|
+
* console.log('Role admin updated:', args)
|
|
1187
|
+
* },
|
|
1188
|
+
* })
|
|
1189
|
+
*
|
|
1190
|
+
* return <div>Watching for role admin updates...</div>
|
|
1191
|
+
* }
|
|
1192
|
+
* ```
|
|
1193
|
+
*
|
|
1194
|
+
* @param parameters - Parameters.
|
|
1195
|
+
*/
|
|
1196
|
+
export declare function useWatchAdminRole<config extends Config = ResolvedRegister['config']>(parameters?: useWatchAdminRole.Parameters<config>): void;
|
|
1197
|
+
export declare namespace useWatchAdminRole {
|
|
1198
|
+
type Parameters<config extends Config = Config> = UnionCompute<ExactPartial<Actions.token.watchAdminRole.Parameters<config>> & ConfigParameter<config> & {
|
|
1199
|
+
enabled?: boolean | undefined;
|
|
1200
|
+
}>;
|
|
1201
|
+
}
|
|
1202
|
+
/**
|
|
1203
|
+
* Hook for watching TIP20 token approval events.
|
|
1204
|
+
*
|
|
1205
|
+
* @example
|
|
1206
|
+
* ```tsx
|
|
1207
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
1208
|
+
*
|
|
1209
|
+
* function App() {
|
|
1210
|
+
* Hooks.token.useWatchApprove({
|
|
1211
|
+
* onApproval(args) {
|
|
1212
|
+
* console.log('Approval:', args)
|
|
1213
|
+
* },
|
|
1214
|
+
* })
|
|
1215
|
+
*
|
|
1216
|
+
* return <div>Watching for approvals...</div>
|
|
1217
|
+
* }
|
|
1218
|
+
* ```
|
|
1219
|
+
*
|
|
1220
|
+
* @param parameters - Parameters.
|
|
1221
|
+
*/
|
|
1222
|
+
export declare function useWatchApprove<config extends Config = ResolvedRegister['config']>(parameters?: useWatchApprove.Parameters<config>): void;
|
|
1223
|
+
export declare namespace useWatchApprove {
|
|
1224
|
+
type Parameters<config extends Config = Config> = UnionCompute<ExactPartial<Actions.token.watchApprove.Parameters<config>> & ConfigParameter<config> & {
|
|
1225
|
+
enabled?: boolean | undefined;
|
|
1226
|
+
}>;
|
|
1227
|
+
}
|
|
1228
|
+
/**
|
|
1229
|
+
* Hook for watching TIP20 token burn events.
|
|
1230
|
+
*
|
|
1231
|
+
* @example
|
|
1232
|
+
* ```tsx
|
|
1233
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
1234
|
+
*
|
|
1235
|
+
* function App() {
|
|
1236
|
+
* Hooks.token.useWatchBurn({
|
|
1237
|
+
* onBurn(args) {
|
|
1238
|
+
* console.log('Burn:', args)
|
|
1239
|
+
* },
|
|
1240
|
+
* })
|
|
1241
|
+
*
|
|
1242
|
+
* return <div>Watching for burns...</div>
|
|
1243
|
+
* }
|
|
1244
|
+
* ```
|
|
1245
|
+
*
|
|
1246
|
+
* @param parameters - Parameters.
|
|
1247
|
+
*/
|
|
1248
|
+
export declare function useWatchBurn<config extends Config = ResolvedRegister['config']>(parameters?: useWatchBurn.Parameters<config>): void;
|
|
1249
|
+
export declare namespace useWatchBurn {
|
|
1250
|
+
type Parameters<config extends Config = Config> = UnionCompute<ExactPartial<Actions.token.watchBurn.Parameters<config>> & ConfigParameter<config> & {
|
|
1251
|
+
enabled?: boolean | undefined;
|
|
1252
|
+
}>;
|
|
1253
|
+
}
|
|
1254
|
+
/**
|
|
1255
|
+
* Hook for watching new TIP20 tokens created.
|
|
1256
|
+
*
|
|
1257
|
+
* @example
|
|
1258
|
+
* ```tsx
|
|
1259
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
1260
|
+
*
|
|
1261
|
+
* function App() {
|
|
1262
|
+
* Hooks.token.useWatchCreate({
|
|
1263
|
+
* onTokenCreated(args) {
|
|
1264
|
+
* console.log('Token created:', args)
|
|
1265
|
+
* },
|
|
1266
|
+
* })
|
|
1267
|
+
*
|
|
1268
|
+
* return <div>Watching for token creations...</div>
|
|
1269
|
+
* }
|
|
1270
|
+
* ```
|
|
1271
|
+
*
|
|
1272
|
+
* @param parameters - Parameters.
|
|
1273
|
+
*/
|
|
1274
|
+
export declare function useWatchCreate<config extends Config = ResolvedRegister['config']>(parameters?: useWatchCreate.Parameters<config>): void;
|
|
1275
|
+
export declare namespace useWatchCreate {
|
|
1276
|
+
type Parameters<config extends Config = Config> = UnionCompute<ExactPartial<Actions.token.watchCreate.Parameters<config>> & ConfigParameter<config> & {
|
|
1277
|
+
enabled?: boolean | undefined;
|
|
1278
|
+
}>;
|
|
1279
|
+
}
|
|
1280
|
+
/**
|
|
1281
|
+
* Hook for watching TIP20 token mint events.
|
|
1282
|
+
*
|
|
1283
|
+
* @example
|
|
1284
|
+
* ```tsx
|
|
1285
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
1286
|
+
*
|
|
1287
|
+
* function App() {
|
|
1288
|
+
* Hooks.token.useWatchMint({
|
|
1289
|
+
* onMint(args) {
|
|
1290
|
+
* console.log('Mint:', args)
|
|
1291
|
+
* },
|
|
1292
|
+
* })
|
|
1293
|
+
*
|
|
1294
|
+
* return <div>Watching for mints...</div>
|
|
1295
|
+
* }
|
|
1296
|
+
* ```
|
|
1297
|
+
*
|
|
1298
|
+
* @param parameters - Parameters.
|
|
1299
|
+
*/
|
|
1300
|
+
export declare function useWatchMint<config extends Config = ResolvedRegister['config']>(parameters?: useWatchMint.Parameters<config>): void;
|
|
1301
|
+
export declare namespace useWatchMint {
|
|
1302
|
+
type Parameters<config extends Config = Config> = UnionCompute<ExactPartial<Actions.token.watchMint.Parameters<config>> & ConfigParameter<config> & {
|
|
1303
|
+
enabled?: boolean | undefined;
|
|
1304
|
+
}>;
|
|
1305
|
+
}
|
|
1306
|
+
/**
|
|
1307
|
+
* Hook for watching TIP20 token role membership updates.
|
|
1308
|
+
*
|
|
1309
|
+
* @example
|
|
1310
|
+
* ```tsx
|
|
1311
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
1312
|
+
*
|
|
1313
|
+
* function App() {
|
|
1314
|
+
* Hooks.token.useWatchRole({
|
|
1315
|
+
* onRoleUpdated(args) {
|
|
1316
|
+
* console.log('Role updated:', args)
|
|
1317
|
+
* },
|
|
1318
|
+
* })
|
|
1319
|
+
*
|
|
1320
|
+
* return <div>Watching for role updates...</div>
|
|
1321
|
+
* }
|
|
1322
|
+
* ```
|
|
1323
|
+
*
|
|
1324
|
+
* @param parameters - Parameters.
|
|
1325
|
+
*/
|
|
1326
|
+
export declare function useWatchRole<config extends Config = ResolvedRegister['config']>(parameters?: useWatchRole.Parameters<config>): void;
|
|
1327
|
+
export declare namespace useWatchRole {
|
|
1328
|
+
type Parameters<config extends Config = Config> = UnionCompute<ExactPartial<Actions.token.watchRole.Parameters<config>> & ConfigParameter<config> & {
|
|
1329
|
+
enabled?: boolean | undefined;
|
|
1330
|
+
}>;
|
|
1331
|
+
}
|
|
1332
|
+
/**
|
|
1333
|
+
* Hook for watching TIP20 token transfer events.
|
|
1334
|
+
*
|
|
1335
|
+
* @example
|
|
1336
|
+
* ```tsx
|
|
1337
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
1338
|
+
*
|
|
1339
|
+
* function App() {
|
|
1340
|
+
* Hooks.token.useWatchTransfer({
|
|
1341
|
+
* onTransfer(args) {
|
|
1342
|
+
* console.log('Transfer:', args)
|
|
1343
|
+
* },
|
|
1344
|
+
* })
|
|
1345
|
+
*
|
|
1346
|
+
* return <div>Watching for transfers...</div>
|
|
1347
|
+
* }
|
|
1348
|
+
* ```
|
|
1349
|
+
*
|
|
1350
|
+
* @param parameters - Parameters.
|
|
1351
|
+
*/
|
|
1352
|
+
export declare function useWatchTransfer<config extends Config = ResolvedRegister['config']>(parameters?: useWatchTransfer.Parameters<config>): void;
|
|
1353
|
+
export declare namespace useWatchTransfer {
|
|
1354
|
+
type Parameters<config extends Config = Config> = UnionCompute<ExactPartial<Actions.token.watchTransfer.Parameters<config>> & ConfigParameter<config> & {
|
|
1355
|
+
enabled?: boolean | undefined;
|
|
1356
|
+
}>;
|
|
1357
|
+
}
|
|
1358
|
+
/**
|
|
1359
|
+
* Hook for watching TIP20 token quote token update events.
|
|
1360
|
+
*
|
|
1361
|
+
* @example
|
|
1362
|
+
* ```tsx
|
|
1363
|
+
* import { Hooks } from 'wagmi/tempo'
|
|
1364
|
+
*
|
|
1365
|
+
* function App() {
|
|
1366
|
+
* Hooks.token.useWatchUpdateQuoteToken({
|
|
1367
|
+
* onUpdateQuoteToken(args) {
|
|
1368
|
+
* if (args.completed)
|
|
1369
|
+
* console.log('quote token update completed:', args.newQuoteToken)
|
|
1370
|
+
* else
|
|
1371
|
+
* console.log('quote token update proposed:', args.newQuoteToken)
|
|
1372
|
+
* },
|
|
1373
|
+
* })
|
|
1374
|
+
*
|
|
1375
|
+
* return <div>Watching for quote token updates...</div>
|
|
1376
|
+
* }
|
|
1377
|
+
* ```
|
|
1378
|
+
*
|
|
1379
|
+
* @param parameters - Parameters.
|
|
1380
|
+
*/
|
|
1381
|
+
export declare function useWatchUpdateQuoteToken<config extends Config = ResolvedRegister['config']>(parameters?: useWatchUpdateQuoteToken.Parameters<config>): void;
|
|
1382
|
+
export declare namespace useWatchUpdateQuoteToken {
|
|
1383
|
+
type Parameters<config extends Config = Config> = UnionCompute<ExactPartial<Actions.token.watchUpdateQuoteToken.Parameters<config>> & ConfigParameter<config> & {
|
|
1384
|
+
enabled?: boolean | undefined;
|
|
1385
|
+
}>;
|
|
1386
|
+
}
|
|
1387
|
+
//# sourceMappingURL=token.d.ts.map
|