@wagmi/core 3.0.2 → 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/internal.js.map +1 -1
- package/dist/esm/exports/query.js +1 -1
- package/dist/esm/exports/query.js.map +1 -1
- package/dist/esm/exports/tempo.js +9 -0
- package/dist/esm/exports/tempo.js.map +1 -0
- package/dist/esm/tempo/Connectors.js +534 -0
- package/dist/esm/tempo/Connectors.js.map +1 -0
- package/dist/esm/tempo/KeyManager.js +106 -0
- package/dist/esm/tempo/KeyManager.js.map +1 -0
- package/dist/esm/tempo/actions/amm.js +437 -0
- package/dist/esm/tempo/actions/amm.js.map +1 -0
- package/dist/esm/tempo/actions/dex.js +1059 -0
- package/dist/esm/tempo/actions/dex.js.map +1 -0
- package/dist/esm/tempo/actions/faucet.js +64 -0
- package/dist/esm/tempo/actions/faucet.js.map +1 -0
- package/dist/esm/tempo/actions/fee.js +160 -0
- package/dist/esm/tempo/actions/fee.js.map +1 -0
- package/dist/esm/tempo/actions/index.js +11 -0
- package/dist/esm/tempo/actions/index.js.map +1 -0
- package/dist/esm/tempo/actions/nonce.js +91 -0
- package/dist/esm/tempo/actions/nonce.js.map +1 -0
- package/dist/esm/tempo/actions/policy.js +532 -0
- package/dist/esm/tempo/actions/policy.js.map +1 -0
- package/dist/esm/tempo/actions/reward.js +384 -0
- package/dist/esm/tempo/actions/reward.js.map +1 -0
- package/dist/esm/tempo/actions/token.js +1717 -0
- package/dist/esm/tempo/actions/token.js.map +1 -0
- package/dist/esm/tempo/actions/utils.js +2 -0
- package/dist/esm/tempo/actions/utils.js.map +1 -0
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/exports/internal.d.ts +1 -1
- package/dist/types/exports/internal.d.ts.map +1 -1
- package/dist/types/exports/query.d.ts +1 -1
- package/dist/types/exports/query.d.ts.map +1 -1
- package/dist/types/exports/tempo.d.ts +5 -0
- package/dist/types/exports/tempo.d.ts.map +1 -0
- package/dist/types/tempo/Connectors.d.ts +99 -0
- package/dist/types/tempo/Connectors.d.ts.map +1 -0
- package/dist/types/tempo/KeyManager.d.ts +71 -0
- package/dist/types/tempo/KeyManager.d.ts.map +1 -0
- package/dist/types/tempo/actions/amm.d.ts +387 -0
- package/dist/types/tempo/actions/amm.d.ts.map +1 -0
- package/dist/types/tempo/actions/dex.d.ts +926 -0
- package/dist/types/tempo/actions/dex.d.ts.map +1 -0
- package/dist/types/tempo/actions/faucet.d.ts +70 -0
- package/dist/types/tempo/actions/faucet.d.ts.map +1 -0
- package/dist/types/tempo/actions/fee.d.ts +141 -0
- package/dist/types/tempo/actions/fee.d.ts.map +1 -0
- package/dist/types/tempo/actions/index.d.ts +10 -0
- package/dist/types/tempo/actions/index.d.ts.map +1 -0
- package/dist/types/tempo/actions/nonce.d.ts +79 -0
- package/dist/types/tempo/actions/nonce.d.ts.map +1 -0
- package/dist/types/tempo/actions/policy.d.ts +478 -0
- package/dist/types/tempo/actions/policy.d.ts.map +1 -0
- package/dist/types/tempo/actions/reward.d.ts +340 -0
- package/dist/types/tempo/actions/reward.d.ts.map +1 -0
- package/dist/types/tempo/actions/token.d.ts +1531 -0
- package/dist/types/tempo/actions/token.d.ts.map +1 -0
- package/dist/types/tempo/actions/utils.d.ts +9 -0
- package/dist/types/tempo/actions/utils.d.ts.map +1 -0
- package/dist/types/types/utils.d.ts +16 -0
- package/dist/types/types/utils.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +14 -2
- package/src/exports/internal.ts +3 -0
- package/src/exports/query.ts +4 -1
- package/src/exports/tempo.ts +14 -0
- package/src/tempo/Connectors.ts +762 -0
- package/src/tempo/KeyManager.ts +176 -0
- package/src/tempo/actions/amm.ts +678 -0
- package/src/tempo/actions/dex.ts +1685 -0
- package/src/tempo/actions/faucet.ts +95 -0
- package/src/tempo/actions/fee.ts +259 -0
- package/src/tempo/actions/index.ts +10 -0
- package/src/tempo/actions/nonce.ts +147 -0
- package/src/tempo/actions/policy.ts +827 -0
- package/src/tempo/actions/reward.ts +624 -0
- package/src/tempo/actions/token.ts +2598 -0
- package/src/tempo/actions/utils.ts +26 -0
- package/src/types/utils.ts +19 -0
- package/src/version.ts +1 -1
- package/tempo/package.json +5 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import type { Account, BaseErrorType } from 'viem';
|
|
2
|
+
import { Actions } from 'viem/tempo';
|
|
3
|
+
import type { Config } from '../../createConfig.js';
|
|
4
|
+
import type { ChainIdParameter, ConnectorParameter } from '../../types/properties.js';
|
|
5
|
+
import type { UnionLooseOmit } from '../../types/utils.js';
|
|
6
|
+
import type { QueryOptions, QueryParameter } from './utils.js';
|
|
7
|
+
/**
|
|
8
|
+
* Claims accumulated rewards for a recipient.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { createConfig, http } from '@wagmi/core'
|
|
13
|
+
* import { tempo } from '@wagmi/core/chains'
|
|
14
|
+
* import { Actions } from '@wagmi/core/tempo'
|
|
15
|
+
*
|
|
16
|
+
* const config = createConfig({
|
|
17
|
+
* chains: [tempoTestnet],
|
|
18
|
+
* transports: {
|
|
19
|
+
* [tempo.id]: http(),
|
|
20
|
+
* },
|
|
21
|
+
* })
|
|
22
|
+
*
|
|
23
|
+
* const hash = await Actions.reward.claim(config, {
|
|
24
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
25
|
+
* })
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param config - Config.
|
|
29
|
+
* @param parameters - Parameters.
|
|
30
|
+
* @returns The transaction hash.
|
|
31
|
+
*/
|
|
32
|
+
export declare function claim<config extends Config>(config: config, parameters: claim.Parameters<config>): Promise<Actions.reward.claim.ReturnValue>;
|
|
33
|
+
export declare namespace claim {
|
|
34
|
+
type Parameters<config extends Config = Config> = ChainIdParameter<config> & ConnectorParameter & UnionLooseOmit<Actions.reward.claim.Parameters<config['chains'][number], Account>, 'chain'>;
|
|
35
|
+
type ReturnValue = Actions.reward.claim.ReturnValue;
|
|
36
|
+
type ErrorType = BaseErrorType;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Claims accumulated rewards for a recipient and waits for confirmation.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* import { createConfig, http } from '@wagmi/core'
|
|
44
|
+
* import { tempo } from '@wagmi/core/chains'
|
|
45
|
+
* import { Actions } from '@wagmi/core/tempo'
|
|
46
|
+
*
|
|
47
|
+
* const config = createConfig({
|
|
48
|
+
* chains: [tempoTestnet],
|
|
49
|
+
* transports: {
|
|
50
|
+
* [tempo.id]: http(),
|
|
51
|
+
* },
|
|
52
|
+
* })
|
|
53
|
+
*
|
|
54
|
+
* const result = await Actions.reward.claimSync(config, {
|
|
55
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
56
|
+
* })
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @param config - Config.
|
|
60
|
+
* @param parameters - Parameters.
|
|
61
|
+
* @returns The transaction receipt.
|
|
62
|
+
*/
|
|
63
|
+
export declare function claimSync<config extends Config>(config: config, parameters: claimSync.Parameters<config>): Promise<Actions.reward.claimSync.ReturnValue>;
|
|
64
|
+
export declare namespace claimSync {
|
|
65
|
+
type Parameters<config extends Config = Config> = ChainIdParameter<config> & ConnectorParameter & UnionLooseOmit<Actions.reward.claimSync.Parameters<config['chains'][number], Account>, 'chain'>;
|
|
66
|
+
type ReturnValue = Actions.reward.claimSync.ReturnValue;
|
|
67
|
+
type ErrorType = BaseErrorType;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Gets the global reward per token value for a token.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* import { createConfig, http } from '@wagmi/core'
|
|
75
|
+
* import { tempo } from '@wagmi/core/chains'
|
|
76
|
+
* import { Actions } from '@wagmi/core/tempo'
|
|
77
|
+
*
|
|
78
|
+
* const config = createConfig({
|
|
79
|
+
* chains: [tempoModerato],
|
|
80
|
+
* transports: {
|
|
81
|
+
* [tempo.id]: http(),
|
|
82
|
+
* },
|
|
83
|
+
* })
|
|
84
|
+
*
|
|
85
|
+
* const value = await Actions.reward.getGlobalRewardPerToken(config, {
|
|
86
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
87
|
+
* })
|
|
88
|
+
* ```
|
|
89
|
+
*
|
|
90
|
+
* @param config - Config.
|
|
91
|
+
* @param parameters - Parameters.
|
|
92
|
+
* @returns The global reward per token value (scaled by 1e18).
|
|
93
|
+
*/
|
|
94
|
+
export declare function getGlobalRewardPerToken<config extends Config>(config: config, parameters: getGlobalRewardPerToken.Parameters<config>): Promise<getGlobalRewardPerToken.ReturnValue>;
|
|
95
|
+
export declare namespace getGlobalRewardPerToken {
|
|
96
|
+
type Parameters<config extends Config> = ChainIdParameter<config> & Actions.reward.getGlobalRewardPerToken.Parameters;
|
|
97
|
+
type ReturnValue = Actions.reward.getGlobalRewardPerToken.ReturnValue;
|
|
98
|
+
type ErrorType = BaseErrorType;
|
|
99
|
+
function queryKey<config extends Config>(parameters: Parameters<config>): readonly ["getGlobalRewardPerToken", Parameters<config>];
|
|
100
|
+
type QueryKey<config extends Config> = ReturnType<typeof queryKey<config>>;
|
|
101
|
+
function queryOptions<config extends Config, selectData = ReturnValue>(config: Config, parameters: queryOptions.Parameters<config, selectData>): queryOptions.ReturnValue<config, selectData>;
|
|
102
|
+
namespace queryOptions {
|
|
103
|
+
type Parameters<config extends Config, selectData = getGlobalRewardPerToken.ReturnValue> = getGlobalRewardPerToken.Parameters<config> & QueryParameter<getGlobalRewardPerToken.ReturnValue, getGlobalRewardPerToken.ErrorType, selectData, getGlobalRewardPerToken.QueryKey<config>>;
|
|
104
|
+
type ReturnValue<config extends Config, selectData = getGlobalRewardPerToken.ReturnValue> = QueryOptions<getGlobalRewardPerToken.ReturnValue, getGlobalRewardPerToken.ErrorType, selectData, getGlobalRewardPerToken.QueryKey<config>>;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Gets the reward information for a specific account.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```ts
|
|
112
|
+
* import { createConfig, http } from '@wagmi/core'
|
|
113
|
+
* import { tempo } from '@wagmi/core/chains'
|
|
114
|
+
* import { Actions } from '@wagmi/core/tempo'
|
|
115
|
+
*
|
|
116
|
+
* const config = createConfig({
|
|
117
|
+
* chains: [tempoTestnet],
|
|
118
|
+
* transports: {
|
|
119
|
+
* [tempo.id]: http(),
|
|
120
|
+
* },
|
|
121
|
+
* })
|
|
122
|
+
*
|
|
123
|
+
* const info = await Actions.reward.getUserRewardInfo(config, {
|
|
124
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
125
|
+
* account: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
|
|
126
|
+
* })
|
|
127
|
+
* ```
|
|
128
|
+
*
|
|
129
|
+
* @param config - Config.
|
|
130
|
+
* @param parameters - Parameters.
|
|
131
|
+
* @returns The user's reward information (recipient, rewardPerToken, rewardBalance).
|
|
132
|
+
*/
|
|
133
|
+
export declare function getUserRewardInfo<config extends Config>(config: config, parameters: getUserRewardInfo.Parameters<config>): Promise<getUserRewardInfo.ReturnValue>;
|
|
134
|
+
export declare namespace getUserRewardInfo {
|
|
135
|
+
type Parameters<config extends Config> = ChainIdParameter<config> & Actions.reward.getUserRewardInfo.Parameters;
|
|
136
|
+
type ReturnValue = Actions.reward.getUserRewardInfo.ReturnValue;
|
|
137
|
+
type ErrorType = BaseErrorType;
|
|
138
|
+
function queryKey<config extends Config>(parameters: Parameters<config>): readonly ["getUserRewardInfo", Parameters<config>];
|
|
139
|
+
type QueryKey<config extends Config> = ReturnType<typeof queryKey<config>>;
|
|
140
|
+
function queryOptions<config extends Config, selectData = ReturnValue>(config: Config, parameters: queryOptions.Parameters<config, selectData>): queryOptions.ReturnValue<config, selectData>;
|
|
141
|
+
namespace queryOptions {
|
|
142
|
+
type Parameters<config extends Config, selectData = getUserRewardInfo.ReturnValue> = getUserRewardInfo.Parameters<config> & QueryParameter<getUserRewardInfo.ReturnValue, getUserRewardInfo.ErrorType, selectData, getUserRewardInfo.QueryKey<config>>;
|
|
143
|
+
type ReturnValue<config extends Config, selectData = getUserRewardInfo.ReturnValue> = QueryOptions<getUserRewardInfo.ReturnValue, getUserRewardInfo.ErrorType, selectData, getUserRewardInfo.QueryKey<config>>;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Sets or changes the reward recipient for a token holder.
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```ts
|
|
151
|
+
* import { createConfig, http } from '@wagmi/core'
|
|
152
|
+
* import { tempo } from '@wagmi/core/chains'
|
|
153
|
+
* import { Actions } from '@wagmi/core/tempo'
|
|
154
|
+
*
|
|
155
|
+
* const config = createConfig({
|
|
156
|
+
* chains: [tempoTestnet],
|
|
157
|
+
* transports: {
|
|
158
|
+
* [tempo.id]: http(),
|
|
159
|
+
* },
|
|
160
|
+
* })
|
|
161
|
+
*
|
|
162
|
+
* const hash = await Actions.reward.setRecipient(config, {
|
|
163
|
+
* recipient: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
|
|
164
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
165
|
+
* })
|
|
166
|
+
* ```
|
|
167
|
+
*
|
|
168
|
+
* @param config - Config.
|
|
169
|
+
* @param parameters - Parameters.
|
|
170
|
+
* @returns The transaction hash.
|
|
171
|
+
*/
|
|
172
|
+
export declare function setRecipient<config extends Config>(config: config, parameters: setRecipient.Parameters<config>): Promise<Actions.reward.setRecipient.ReturnValue>;
|
|
173
|
+
export declare namespace setRecipient {
|
|
174
|
+
type Parameters<config extends Config = Config> = ChainIdParameter<config> & ConnectorParameter & UnionLooseOmit<Actions.reward.setRecipient.Parameters<config['chains'][number], Account>, 'chain'>;
|
|
175
|
+
type ReturnValue = Actions.reward.setRecipient.ReturnValue;
|
|
176
|
+
type ErrorType = BaseErrorType;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Sets or changes the reward recipient for a token holder and waits for confirmation.
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```ts
|
|
183
|
+
* import { createConfig, http } from '@wagmi/core'
|
|
184
|
+
* import { tempo } from '@wagmi/core/chains'
|
|
185
|
+
* import { Actions } from '@wagmi/core/tempo'
|
|
186
|
+
*
|
|
187
|
+
* const config = createConfig({
|
|
188
|
+
* chains: [tempoTestnet],
|
|
189
|
+
* transports: {
|
|
190
|
+
* [tempo.id]: http(),
|
|
191
|
+
* },
|
|
192
|
+
* })
|
|
193
|
+
*
|
|
194
|
+
* const result = await Actions.reward.setRecipientSync(config, {
|
|
195
|
+
* recipient: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
|
|
196
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
197
|
+
* })
|
|
198
|
+
* ```
|
|
199
|
+
*
|
|
200
|
+
* @param config - Config.
|
|
201
|
+
* @param parameters - Parameters.
|
|
202
|
+
* @returns The transaction receipt and event data.
|
|
203
|
+
*/
|
|
204
|
+
export declare function setRecipientSync<config extends Config>(config: config, parameters: setRecipientSync.Parameters<config>): Promise<Actions.reward.setRecipientSync.ReturnValue>;
|
|
205
|
+
export declare namespace setRecipientSync {
|
|
206
|
+
type Parameters<config extends Config = Config> = ChainIdParameter<config> & ConnectorParameter & UnionLooseOmit<Actions.reward.setRecipientSync.Parameters<config['chains'][number], Account>, 'chain'>;
|
|
207
|
+
type ReturnValue = Actions.reward.setRecipientSync.ReturnValue;
|
|
208
|
+
type ErrorType = BaseErrorType;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Distributes tokens to opted-in holders.
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* ```ts
|
|
215
|
+
* import { createConfig, http } from '@wagmi/core'
|
|
216
|
+
* import { tempo } from '@wagmi/core/chains'
|
|
217
|
+
* import { Actions } from '@wagmi/core/tempo'
|
|
218
|
+
*
|
|
219
|
+
* const config = createConfig({
|
|
220
|
+
* chains: [tempoTestnet],
|
|
221
|
+
* transports: {
|
|
222
|
+
* [tempo.id]: http(),
|
|
223
|
+
* },
|
|
224
|
+
* })
|
|
225
|
+
*
|
|
226
|
+
* const hash = await Actions.reward.distribute(config, {
|
|
227
|
+
* amount: 100000000000000000000n,
|
|
228
|
+
* seconds: 86400,
|
|
229
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
230
|
+
* })
|
|
231
|
+
* ```
|
|
232
|
+
*
|
|
233
|
+
* @param config - Config.
|
|
234
|
+
* @param parameters - Parameters.
|
|
235
|
+
* @returns The transaction hash.
|
|
236
|
+
*/
|
|
237
|
+
export declare function distribute<config extends Config>(config: config, parameters: distribute.Parameters<config>): Promise<Actions.reward.distribute.ReturnValue>;
|
|
238
|
+
export declare namespace distribute {
|
|
239
|
+
type Parameters<config extends Config = Config> = ChainIdParameter<config> & ConnectorParameter & UnionLooseOmit<Actions.reward.distribute.Parameters<config['chains'][number], Account>, 'chain'>;
|
|
240
|
+
type ReturnValue = Actions.reward.distribute.ReturnValue;
|
|
241
|
+
type ErrorType = BaseErrorType;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Distributes tokens to opted-in holders and waits for confirmation.
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```ts
|
|
248
|
+
* import { createConfig, http } from '@wagmi/core'
|
|
249
|
+
* import { tempo } from '@wagmi/core/chains'
|
|
250
|
+
* import { Actions } from '@wagmi/core/tempo'
|
|
251
|
+
*
|
|
252
|
+
* const config = createConfig({
|
|
253
|
+
* chains: [tempoTestnet],
|
|
254
|
+
* transports: {
|
|
255
|
+
* [tempo.id]: http(),
|
|
256
|
+
* },
|
|
257
|
+
* })
|
|
258
|
+
*
|
|
259
|
+
* const result = await Actions.reward.distributeSync(config, {
|
|
260
|
+
* amount: 100000000000000000000n,
|
|
261
|
+
* seconds: 86400,
|
|
262
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
263
|
+
* })
|
|
264
|
+
* ```
|
|
265
|
+
*
|
|
266
|
+
* @param config - Config.
|
|
267
|
+
* @param parameters - Parameters.
|
|
268
|
+
* @returns The transaction receipt and event data.
|
|
269
|
+
*/
|
|
270
|
+
export declare function distributeSync<config extends Config>(config: config, parameters: distributeSync.Parameters<config>): Promise<Actions.reward.distributeSync.ReturnValue>;
|
|
271
|
+
export declare namespace distributeSync {
|
|
272
|
+
type Parameters<config extends Config = Config> = ChainIdParameter<config> & ConnectorParameter & UnionLooseOmit<Actions.reward.distributeSync.Parameters<config['chains'][number], Account>, 'chain'>;
|
|
273
|
+
type ReturnValue = Actions.reward.distributeSync.ReturnValue;
|
|
274
|
+
type ErrorType = BaseErrorType;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Watches for reward distributed events.
|
|
278
|
+
*
|
|
279
|
+
* @example
|
|
280
|
+
* ```ts
|
|
281
|
+
* import { createConfig, http } from '@wagmi/core'
|
|
282
|
+
* import { tempo } from '@wagmi/core/chains'
|
|
283
|
+
* import { Actions } from '@wagmi/core/tempo'
|
|
284
|
+
*
|
|
285
|
+
* const config = createConfig({
|
|
286
|
+
* chains: [tempoTestnet],
|
|
287
|
+
* transports: {
|
|
288
|
+
* [tempo.id]: http(),
|
|
289
|
+
* },
|
|
290
|
+
* })
|
|
291
|
+
*
|
|
292
|
+
* const unwatch = Actions.reward.watchRewardDistributed(config, {
|
|
293
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
294
|
+
* onRewardDistributed: (args, log) => {
|
|
295
|
+
* console.log('Reward distributed:', args)
|
|
296
|
+
* },
|
|
297
|
+
* })
|
|
298
|
+
* ```
|
|
299
|
+
*
|
|
300
|
+
* @param config - Config.
|
|
301
|
+
* @param parameters - Parameters.
|
|
302
|
+
* @returns A function to unsubscribe from the event.
|
|
303
|
+
*/
|
|
304
|
+
export declare function watchRewardDistributed<config extends Config>(config: config, parameters: watchRewardDistributed.Parameters<config>): import("viem").WatchContractEventReturnType;
|
|
305
|
+
export declare namespace watchRewardDistributed {
|
|
306
|
+
type Parameters<config extends Config> = ChainIdParameter<config> & Actions.reward.watchRewardDistributed.Parameters;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Watches for reward recipient set events.
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* ```ts
|
|
313
|
+
* import { createConfig, http } from '@wagmi/core'
|
|
314
|
+
* import { tempo } from '@wagmi/core/chains'
|
|
315
|
+
* import { Actions } from '@wagmi/core/tempo'
|
|
316
|
+
*
|
|
317
|
+
* const config = createConfig({
|
|
318
|
+
* chains: [tempoTestnet],
|
|
319
|
+
* transports: {
|
|
320
|
+
* [tempo.id]: http(),
|
|
321
|
+
* },
|
|
322
|
+
* })
|
|
323
|
+
*
|
|
324
|
+
* const unwatch = Actions.reward.watchRewardRecipientSet(config, {
|
|
325
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
326
|
+
* onRewardRecipientSet: (args, log) => {
|
|
327
|
+
* console.log('Reward recipient set:', args)
|
|
328
|
+
* },
|
|
329
|
+
* })
|
|
330
|
+
* ```
|
|
331
|
+
*
|
|
332
|
+
* @param config - Config.
|
|
333
|
+
* @param parameters - Parameters.
|
|
334
|
+
* @returns A function to unsubscribe from the event.
|
|
335
|
+
*/
|
|
336
|
+
export declare function watchRewardRecipientSet<config extends Config>(config: config, parameters: watchRewardRecipientSet.Parameters<config>): import("viem").WatchContractEventReturnType;
|
|
337
|
+
export declare namespace watchRewardRecipientSet {
|
|
338
|
+
type Parameters<config extends Config> = ChainIdParameter<config> & Actions.reward.watchRewardRecipientSet.Parameters;
|
|
339
|
+
}
|
|
340
|
+
//# sourceMappingURL=reward.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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