@injectivelabs/indexer-proto-ts-v2 1.0.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/generated/event_provider_api_pb.client.d.ts +156 -0
- package/generated/event_provider_api_pb.client.js +76 -0
- package/generated/event_provider_api_pb.d.ts +1980 -0
- package/generated/event_provider_api_pb.js +1776 -0
- package/generated/health_pb.client.d.ts +53 -0
- package/generated/health_pb.client.js +22 -0
- package/generated/health_pb.d.ts +309 -0
- package/generated/health_pb.js +265 -0
- package/generated/injective_accounts_rpc_pb.client.d.ts +211 -0
- package/generated/injective_accounts_rpc_pb.client.js +105 -0
- package/generated/injective_accounts_rpc_pb.d.ts +5307 -0
- package/generated/injective_accounts_rpc_pb.js +4784 -0
- package/generated/injective_archiver_rpc_pb.client.d.ts +224 -0
- package/generated/injective_archiver_rpc_pb.client.js +112 -0
- package/generated/injective_archiver_rpc_pb.d.ts +2944 -0
- package/generated/injective_archiver_rpc_pb.js +2603 -0
- package/generated/injective_auction_rpc_pb.client.d.ts +190 -0
- package/generated/injective_auction_rpc_pb.client.js +94 -0
- package/generated/injective_auction_rpc_pb.d.ts +2131 -0
- package/generated/injective_auction_rpc_pb.js +1917 -0
- package/generated/injective_campaign_rpc_pb.client.d.ts +138 -0
- package/generated/injective_campaign_rpc_pb.client.js +67 -0
- package/generated/injective_campaign_rpc_pb.d.ts +2766 -0
- package/generated/injective_campaign_rpc_pb.js +2542 -0
- package/generated/injective_chart_rpc_pb.client.d.ts +159 -0
- package/generated/injective_chart_rpc_pb.client.js +78 -0
- package/generated/injective_chart_rpc_pb.d.ts +1840 -0
- package/generated/injective_chart_rpc_pb.js +1690 -0
- package/generated/injective_derivative_exchange_rpc_pb.client.d.ts +504 -0
- package/generated/injective_derivative_exchange_rpc_pb.client.js +259 -0
- package/generated/injective_derivative_exchange_rpc_pb.d.ts +9214 -0
- package/generated/injective_derivative_exchange_rpc_pb.js +8407 -0
- package/generated/injective_exchange_rpc_pb.client.d.ts +155 -0
- package/generated/injective_exchange_rpc_pb.client.js +76 -0
- package/generated/injective_exchange_rpc_pb.d.ts +1925 -0
- package/generated/injective_exchange_rpc_pb.js +1740 -0
- package/generated/injective_explorer_rpc_pb.client.d.ts +495 -0
- package/generated/injective_explorer_rpc_pb.client.js +255 -0
- package/generated/injective_explorer_rpc_pb.d.ts +9394 -0
- package/generated/injective_explorer_rpc_pb.js +8921 -0
- package/generated/injective_insurance_rpc_pb.client.d.ts +87 -0
- package/generated/injective_insurance_rpc_pb.client.js +40 -0
- package/generated/injective_insurance_rpc_pb.d.ts +904 -0
- package/generated/injective_insurance_rpc_pb.js +807 -0
- package/generated/injective_megavault_rpc_pb.client.d.ts +155 -0
- package/generated/injective_megavault_rpc_pb.client.js +76 -0
- package/generated/injective_megavault_rpc_pb.d.ts +3408 -0
- package/generated/injective_megavault_rpc_pb.js +3019 -0
- package/generated/injective_meta_rpc_pb.client.d.ts +124 -0
- package/generated/injective_meta_rpc_pb.client.js +59 -0
- package/generated/injective_meta_rpc_pb.d.ts +825 -0
- package/generated/injective_meta_rpc_pb.js +716 -0
- package/generated/injective_oracle_rpc_pb.client.d.ts +124 -0
- package/generated/injective_oracle_rpc_pb.client.js +59 -0
- package/generated/injective_oracle_rpc_pb.d.ts +1117 -0
- package/generated/injective_oracle_rpc_pb.js +987 -0
- package/generated/injective_portfolio_rpc_pb.client.d.ts +105 -0
- package/generated/injective_portfolio_rpc_pb.client.js +49 -0
- package/generated/injective_portfolio_rpc_pb.d.ts +1492 -0
- package/generated/injective_portfolio_rpc_pb.js +1314 -0
- package/generated/injective_referral_rpc_pb.client.d.ts +89 -0
- package/generated/injective_referral_rpc_pb.client.js +41 -0
- package/generated/injective_referral_rpc_pb.d.ts +575 -0
- package/generated/injective_referral_rpc_pb.js +497 -0
- package/generated/injective_rfqrpc_pb.client.d.ts +208 -0
- package/generated/injective_rfqrpc_pb.client.js +103 -0
- package/generated/injective_rfqrpc_pb.d.ts +2241 -0
- package/generated/injective_rfqrpc_pb.js +1940 -0
- package/generated/injective_spot_exchange_rpc_pb.client.d.ts +343 -0
- package/generated/injective_spot_exchange_rpc_pb.client.js +175 -0
- package/generated/injective_spot_exchange_rpc_pb.d.ts +5958 -0
- package/generated/injective_spot_exchange_rpc_pb.js +5426 -0
- package/generated/injective_trading_rpc_pb.client.d.ts +90 -0
- package/generated/injective_trading_rpc_pb.client.js +40 -0
- package/generated/injective_trading_rpc_pb.d.ts +1882 -0
- package/generated/injective_trading_rpc_pb.js +1754 -0
- package/index.d.ts +43 -0
- package/index.js +78 -0
- package/package.json +37 -0
|
@@ -0,0 +1,2766 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter add_pb_suffix
|
|
2
|
+
// @generated from protobuf file "injective_campaign_rpc.proto" (package "injective_campaign_rpc", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
//
|
|
5
|
+
// Code generated with goa v3.7.0, DO NOT EDIT.
|
|
6
|
+
//
|
|
7
|
+
// InjectiveCampaignRPC protocol buffer definition
|
|
8
|
+
//
|
|
9
|
+
// Command:
|
|
10
|
+
// $ goa gen github.com/InjectiveLabs/injective-indexer/api/design -o ../
|
|
11
|
+
//
|
|
12
|
+
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
13
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
14
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
15
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
16
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
17
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
18
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
19
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
20
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
21
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
22
|
+
/**
|
|
23
|
+
* @generated from protobuf message injective_campaign_rpc.RankingRequest
|
|
24
|
+
*/
|
|
25
|
+
export interface RankingRequest {
|
|
26
|
+
/**
|
|
27
|
+
* Campaign ID
|
|
28
|
+
*
|
|
29
|
+
* @generated from protobuf field: string campaign_id = 1
|
|
30
|
+
*/
|
|
31
|
+
campaignId: string;
|
|
32
|
+
/**
|
|
33
|
+
* MarketId of the campaign
|
|
34
|
+
*
|
|
35
|
+
* @generated from protobuf field: string market_id = 2
|
|
36
|
+
*/
|
|
37
|
+
marketId: string;
|
|
38
|
+
/**
|
|
39
|
+
* Account address
|
|
40
|
+
*
|
|
41
|
+
* @generated from protobuf field: string account_address = 3
|
|
42
|
+
*/
|
|
43
|
+
accountAddress: string;
|
|
44
|
+
/**
|
|
45
|
+
* @generated from protobuf field: sint32 limit = 4
|
|
46
|
+
*/
|
|
47
|
+
limit: number;
|
|
48
|
+
/**
|
|
49
|
+
* @generated from protobuf field: uint64 skip = 5
|
|
50
|
+
*/
|
|
51
|
+
skip: bigint;
|
|
52
|
+
/**
|
|
53
|
+
* Contract address that manages the round and reward
|
|
54
|
+
*
|
|
55
|
+
* @generated from protobuf field: string contract_address = 6
|
|
56
|
+
*/
|
|
57
|
+
contractAddress: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @generated from protobuf message injective_campaign_rpc.RankingResponse
|
|
61
|
+
*/
|
|
62
|
+
export interface RankingResponse {
|
|
63
|
+
/**
|
|
64
|
+
* The campaign information
|
|
65
|
+
*
|
|
66
|
+
* @generated from protobuf field: injective_campaign_rpc.Campaign campaign = 1
|
|
67
|
+
*/
|
|
68
|
+
campaign?: Campaign;
|
|
69
|
+
/**
|
|
70
|
+
* The campaign users
|
|
71
|
+
*
|
|
72
|
+
* @generated from protobuf field: repeated injective_campaign_rpc.CampaignUser users = 2
|
|
73
|
+
*/
|
|
74
|
+
users: CampaignUser[];
|
|
75
|
+
/**
|
|
76
|
+
* @generated from protobuf field: injective_campaign_rpc.Paging paging = 3
|
|
77
|
+
*/
|
|
78
|
+
paging?: Paging;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @generated from protobuf message injective_campaign_rpc.Campaign
|
|
82
|
+
*/
|
|
83
|
+
export interface Campaign {
|
|
84
|
+
/**
|
|
85
|
+
* @generated from protobuf field: string campaign_id = 1
|
|
86
|
+
*/
|
|
87
|
+
campaignId: string;
|
|
88
|
+
/**
|
|
89
|
+
* MarketId of the trading strategy
|
|
90
|
+
*
|
|
91
|
+
* @generated from protobuf field: string market_id = 2
|
|
92
|
+
*/
|
|
93
|
+
marketId: string;
|
|
94
|
+
/**
|
|
95
|
+
* Total campaign score
|
|
96
|
+
*
|
|
97
|
+
* @generated from protobuf field: string total_score = 4
|
|
98
|
+
*/
|
|
99
|
+
totalScore: string;
|
|
100
|
+
/**
|
|
101
|
+
* Last time the campaign score has been updated.
|
|
102
|
+
*
|
|
103
|
+
* @generated from protobuf field: sint64 last_updated = 5
|
|
104
|
+
*/
|
|
105
|
+
lastUpdated: bigint;
|
|
106
|
+
/**
|
|
107
|
+
* Campaign start date in UNIX millis.
|
|
108
|
+
*
|
|
109
|
+
* @generated from protobuf field: sint64 start_date = 6
|
|
110
|
+
*/
|
|
111
|
+
startDate: bigint;
|
|
112
|
+
/**
|
|
113
|
+
* Campaign end date in UNIX millis.
|
|
114
|
+
*
|
|
115
|
+
* @generated from protobuf field: sint64 end_date = 7
|
|
116
|
+
*/
|
|
117
|
+
endDate: bigint;
|
|
118
|
+
/**
|
|
119
|
+
* Whether the campaign rewards can be claimed.
|
|
120
|
+
*
|
|
121
|
+
* @generated from protobuf field: bool is_claimable = 8
|
|
122
|
+
*/
|
|
123
|
+
isClaimable: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Campaigns round ID
|
|
126
|
+
*
|
|
127
|
+
* @generated from protobuf field: sint32 round_id = 9
|
|
128
|
+
*/
|
|
129
|
+
roundId: number;
|
|
130
|
+
/**
|
|
131
|
+
* Contract address that controls this campaign
|
|
132
|
+
*
|
|
133
|
+
* @generated from protobuf field: string manager_contract = 10
|
|
134
|
+
*/
|
|
135
|
+
managerContract: string;
|
|
136
|
+
/**
|
|
137
|
+
* Reward tokens of this campaign
|
|
138
|
+
*
|
|
139
|
+
* @generated from protobuf field: repeated injective_campaign_rpc.Coin rewards = 11
|
|
140
|
+
*/
|
|
141
|
+
rewards: Coin[];
|
|
142
|
+
/**
|
|
143
|
+
* Total user score if accountAddress is passed, this is useful to estimate
|
|
144
|
+
* account's reward
|
|
145
|
+
*
|
|
146
|
+
* @generated from protobuf field: string user_score = 12
|
|
147
|
+
*/
|
|
148
|
+
userScore: string;
|
|
149
|
+
/**
|
|
150
|
+
* Return true if user claimed the reward of this campaign
|
|
151
|
+
*
|
|
152
|
+
* @generated from protobuf field: bool user_claimed = 13
|
|
153
|
+
*/
|
|
154
|
+
userClaimed: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Suffix of the subaccount that eligible for volume score
|
|
157
|
+
*
|
|
158
|
+
* @generated from protobuf field: string subaccount_id_suffix = 14
|
|
159
|
+
*/
|
|
160
|
+
subaccountIdSuffix: string;
|
|
161
|
+
/**
|
|
162
|
+
* Contract that manage users reward
|
|
163
|
+
*
|
|
164
|
+
* @generated from protobuf field: string reward_contract = 15
|
|
165
|
+
*/
|
|
166
|
+
rewardContract: string;
|
|
167
|
+
/**
|
|
168
|
+
* Version of reward contract, UI use this to determine the message that need
|
|
169
|
+
* to be sent
|
|
170
|
+
*
|
|
171
|
+
* @generated from protobuf field: string version = 16
|
|
172
|
+
*/
|
|
173
|
+
version: string;
|
|
174
|
+
/**
|
|
175
|
+
* Campaign type
|
|
176
|
+
*
|
|
177
|
+
* @generated from protobuf field: string type = 17
|
|
178
|
+
*/
|
|
179
|
+
type: string;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* @generated from protobuf message injective_campaign_rpc.Coin
|
|
183
|
+
*/
|
|
184
|
+
export interface Coin {
|
|
185
|
+
/**
|
|
186
|
+
* Denom of the coin
|
|
187
|
+
*
|
|
188
|
+
* @generated from protobuf field: string denom = 1
|
|
189
|
+
*/
|
|
190
|
+
denom: string;
|
|
191
|
+
/**
|
|
192
|
+
* @generated from protobuf field: string amount = 2
|
|
193
|
+
*/
|
|
194
|
+
amount: string;
|
|
195
|
+
/**
|
|
196
|
+
* @generated from protobuf field: string usd_value = 3
|
|
197
|
+
*/
|
|
198
|
+
usdValue: string;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* @generated from protobuf message injective_campaign_rpc.CampaignUser
|
|
202
|
+
*/
|
|
203
|
+
export interface CampaignUser {
|
|
204
|
+
/**
|
|
205
|
+
* @generated from protobuf field: string campaign_id = 1
|
|
206
|
+
*/
|
|
207
|
+
campaignId: string;
|
|
208
|
+
/**
|
|
209
|
+
* MarketId of the trading strategy
|
|
210
|
+
*
|
|
211
|
+
* @generated from protobuf field: string market_id = 2
|
|
212
|
+
*/
|
|
213
|
+
marketId: string;
|
|
214
|
+
/**
|
|
215
|
+
* Account address
|
|
216
|
+
*
|
|
217
|
+
* @generated from protobuf field: string account_address = 3
|
|
218
|
+
*/
|
|
219
|
+
accountAddress: string;
|
|
220
|
+
/**
|
|
221
|
+
* Campaign score
|
|
222
|
+
*
|
|
223
|
+
* @generated from protobuf field: string score = 4
|
|
224
|
+
*/
|
|
225
|
+
score: string;
|
|
226
|
+
/**
|
|
227
|
+
* Whether the distribution contract has been updated with the latest score
|
|
228
|
+
*
|
|
229
|
+
* @generated from protobuf field: bool contract_updated = 5
|
|
230
|
+
*/
|
|
231
|
+
contractUpdated: boolean;
|
|
232
|
+
/**
|
|
233
|
+
* Block height when the score has been updated.
|
|
234
|
+
*
|
|
235
|
+
* @generated from protobuf field: sint64 block_height = 6
|
|
236
|
+
*/
|
|
237
|
+
blockHeight: bigint;
|
|
238
|
+
/**
|
|
239
|
+
* Block time timestamp in UNIX millis.
|
|
240
|
+
*
|
|
241
|
+
* @generated from protobuf field: sint64 block_time = 7
|
|
242
|
+
*/
|
|
243
|
+
blockTime: bigint;
|
|
244
|
+
/**
|
|
245
|
+
* Amount swapped but only count base denom of the market
|
|
246
|
+
*
|
|
247
|
+
* @generated from protobuf field: string purchased_amount = 8
|
|
248
|
+
*/
|
|
249
|
+
purchasedAmount: string;
|
|
250
|
+
/**
|
|
251
|
+
* True if this user is updated to be in Galxe Campain list, only eligible
|
|
252
|
+
* address are added
|
|
253
|
+
*
|
|
254
|
+
* @generated from protobuf field: bool galxe_updated = 9
|
|
255
|
+
*/
|
|
256
|
+
galxeUpdated: boolean;
|
|
257
|
+
/**
|
|
258
|
+
* True if this user claimed the reward
|
|
259
|
+
*
|
|
260
|
+
* @generated from protobuf field: bool reward_claimed = 10
|
|
261
|
+
*/
|
|
262
|
+
rewardClaimed: boolean;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Paging defines the structure for required params for handling pagination
|
|
266
|
+
*
|
|
267
|
+
* @generated from protobuf message injective_campaign_rpc.Paging
|
|
268
|
+
*/
|
|
269
|
+
export interface Paging {
|
|
270
|
+
/**
|
|
271
|
+
* total number of txs saved in database
|
|
272
|
+
*
|
|
273
|
+
* @generated from protobuf field: sint64 total = 1
|
|
274
|
+
*/
|
|
275
|
+
total: bigint;
|
|
276
|
+
/**
|
|
277
|
+
* can be either block height or index num
|
|
278
|
+
*
|
|
279
|
+
* @generated from protobuf field: sint32 from = 2
|
|
280
|
+
*/
|
|
281
|
+
from: number;
|
|
282
|
+
/**
|
|
283
|
+
* can be either block height or index num
|
|
284
|
+
*
|
|
285
|
+
* @generated from protobuf field: sint32 to = 3
|
|
286
|
+
*/
|
|
287
|
+
to: number;
|
|
288
|
+
/**
|
|
289
|
+
* count entries by subaccount, serving some places on helix
|
|
290
|
+
*
|
|
291
|
+
* @generated from protobuf field: sint64 count_by_subaccount = 4
|
|
292
|
+
*/
|
|
293
|
+
countBySubaccount: bigint;
|
|
294
|
+
/**
|
|
295
|
+
* array of tokens to navigate to the next pages
|
|
296
|
+
*
|
|
297
|
+
* @generated from protobuf field: repeated string next = 5
|
|
298
|
+
*/
|
|
299
|
+
next: string[];
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* @generated from protobuf message injective_campaign_rpc.CampaignsRequest
|
|
303
|
+
*/
|
|
304
|
+
export interface CampaignsRequest {
|
|
305
|
+
/**
|
|
306
|
+
* Round ID, if not specified, it will return latest roundId
|
|
307
|
+
*
|
|
308
|
+
* @generated from protobuf field: sint64 round_id = 1
|
|
309
|
+
*/
|
|
310
|
+
roundId: bigint;
|
|
311
|
+
/**
|
|
312
|
+
* Address of login account, if not specified it will return no user rewards
|
|
313
|
+
*
|
|
314
|
+
* @generated from protobuf field: string account_address = 2
|
|
315
|
+
*/
|
|
316
|
+
accountAddress: string;
|
|
317
|
+
/**
|
|
318
|
+
* This will return campaign x where x.roundId <= toRoundId. Useful for listing
|
|
319
|
+
* multiple rounds
|
|
320
|
+
*
|
|
321
|
+
* @generated from protobuf field: sint32 to_round_id = 3
|
|
322
|
+
*/
|
|
323
|
+
toRoundId: number;
|
|
324
|
+
/**
|
|
325
|
+
* Contract address that manages the round and reward
|
|
326
|
+
*
|
|
327
|
+
* @generated from protobuf field: string contract_address = 4
|
|
328
|
+
*/
|
|
329
|
+
contractAddress: string;
|
|
330
|
+
/**
|
|
331
|
+
* Campaign type
|
|
332
|
+
*
|
|
333
|
+
* @generated from protobuf field: string type = 5
|
|
334
|
+
*/
|
|
335
|
+
type: string;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* @generated from protobuf message injective_campaign_rpc.CampaignsResponse
|
|
339
|
+
*/
|
|
340
|
+
export interface CampaignsResponse {
|
|
341
|
+
/**
|
|
342
|
+
* @generated from protobuf field: repeated injective_campaign_rpc.Campaign campaigns = 1
|
|
343
|
+
*/
|
|
344
|
+
campaigns: Campaign[];
|
|
345
|
+
/**
|
|
346
|
+
* @generated from protobuf field: repeated injective_campaign_rpc.Coin accumulated_rewards = 2
|
|
347
|
+
*/
|
|
348
|
+
accumulatedRewards: Coin[];
|
|
349
|
+
/**
|
|
350
|
+
* @generated from protobuf field: sint32 reward_count = 3
|
|
351
|
+
*/
|
|
352
|
+
rewardCount: number;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* @generated from protobuf message injective_campaign_rpc.CampaignsV2Request
|
|
356
|
+
*/
|
|
357
|
+
export interface CampaignsV2Request {
|
|
358
|
+
/**
|
|
359
|
+
* Campaign type
|
|
360
|
+
*
|
|
361
|
+
* @generated from protobuf field: string type = 1
|
|
362
|
+
*/
|
|
363
|
+
type: string;
|
|
364
|
+
/**
|
|
365
|
+
* Whether the campaign is active.
|
|
366
|
+
* Deprecated: use status instead.
|
|
367
|
+
*
|
|
368
|
+
* @generated from protobuf field: bool active = 2
|
|
369
|
+
*/
|
|
370
|
+
active: boolean;
|
|
371
|
+
/**
|
|
372
|
+
* Limit number of returned campaigns
|
|
373
|
+
*
|
|
374
|
+
* @generated from protobuf field: sint32 limit = 3
|
|
375
|
+
*/
|
|
376
|
+
limit: number;
|
|
377
|
+
/**
|
|
378
|
+
* Cursor for pagination
|
|
379
|
+
*
|
|
380
|
+
* @generated from protobuf field: string cursor = 4
|
|
381
|
+
*/
|
|
382
|
+
cursor: string;
|
|
383
|
+
/**
|
|
384
|
+
* Filter campaigns by start date greater than this value in milliseconds
|
|
385
|
+
*
|
|
386
|
+
* @generated from protobuf field: sint64 from_start_date = 5
|
|
387
|
+
*/
|
|
388
|
+
fromStartDate: bigint;
|
|
389
|
+
/**
|
|
390
|
+
* Filter campaigns by start date lower than this value in milliseconds
|
|
391
|
+
*
|
|
392
|
+
* @generated from protobuf field: sint64 to_start_date = 6
|
|
393
|
+
*/
|
|
394
|
+
toStartDate: bigint;
|
|
395
|
+
/**
|
|
396
|
+
* Filter campaigns by end date greater than this value in milliseconds
|
|
397
|
+
*
|
|
398
|
+
* @generated from protobuf field: sint64 from_end_date = 7
|
|
399
|
+
*/
|
|
400
|
+
fromEndDate: bigint;
|
|
401
|
+
/**
|
|
402
|
+
* Filter campaigns by end date lower than this value in milliseconds
|
|
403
|
+
*
|
|
404
|
+
* @generated from protobuf field: sint64 to_end_date = 8
|
|
405
|
+
*/
|
|
406
|
+
toEndDate: bigint;
|
|
407
|
+
/**
|
|
408
|
+
* Filter campaigns by status
|
|
409
|
+
*
|
|
410
|
+
* @generated from protobuf field: string status = 9
|
|
411
|
+
*/
|
|
412
|
+
status: string;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* @generated from protobuf message injective_campaign_rpc.CampaignsV2Response
|
|
416
|
+
*/
|
|
417
|
+
export interface CampaignsV2Response {
|
|
418
|
+
/**
|
|
419
|
+
* @generated from protobuf field: repeated injective_campaign_rpc.CampaignV2 campaigns = 1
|
|
420
|
+
*/
|
|
421
|
+
campaigns: CampaignV2[];
|
|
422
|
+
/**
|
|
423
|
+
* @generated from protobuf field: string cursor = 2
|
|
424
|
+
*/
|
|
425
|
+
cursor: string;
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* @generated from protobuf message injective_campaign_rpc.CampaignV2
|
|
429
|
+
*/
|
|
430
|
+
export interface CampaignV2 {
|
|
431
|
+
/**
|
|
432
|
+
* @generated from protobuf field: string campaign_id = 1
|
|
433
|
+
*/
|
|
434
|
+
campaignId: string;
|
|
435
|
+
/**
|
|
436
|
+
* MarketId of the trading strategy
|
|
437
|
+
*
|
|
438
|
+
* @generated from protobuf field: string market_id = 2
|
|
439
|
+
*/
|
|
440
|
+
marketId: string;
|
|
441
|
+
/**
|
|
442
|
+
* Total campaign score
|
|
443
|
+
*
|
|
444
|
+
* @generated from protobuf field: string total_score = 4
|
|
445
|
+
*/
|
|
446
|
+
totalScore: string;
|
|
447
|
+
/**
|
|
448
|
+
* Campaign creation date in UNIX millis.
|
|
449
|
+
*
|
|
450
|
+
* @generated from protobuf field: sint64 created_at = 5
|
|
451
|
+
*/
|
|
452
|
+
createdAt: bigint;
|
|
453
|
+
/**
|
|
454
|
+
* Campaign last update date in UNIX millis.
|
|
455
|
+
*
|
|
456
|
+
* @generated from protobuf field: sint64 updated_at = 6
|
|
457
|
+
*/
|
|
458
|
+
updatedAt: bigint;
|
|
459
|
+
/**
|
|
460
|
+
* Campaign start date in UNIX millis.
|
|
461
|
+
*
|
|
462
|
+
* @generated from protobuf field: sint64 start_date = 7
|
|
463
|
+
*/
|
|
464
|
+
startDate: bigint;
|
|
465
|
+
/**
|
|
466
|
+
* Campaign end date in UNIX millis.
|
|
467
|
+
*
|
|
468
|
+
* @generated from protobuf field: sint64 end_date = 8
|
|
469
|
+
*/
|
|
470
|
+
endDate: bigint;
|
|
471
|
+
/**
|
|
472
|
+
* Whether the campaign rewards can be claimed.
|
|
473
|
+
*
|
|
474
|
+
* @generated from protobuf field: bool is_claimable = 9
|
|
475
|
+
*/
|
|
476
|
+
isClaimable: boolean;
|
|
477
|
+
/**
|
|
478
|
+
* Campaigns round ID
|
|
479
|
+
*
|
|
480
|
+
* @generated from protobuf field: sint32 round_id = 10
|
|
481
|
+
*/
|
|
482
|
+
roundId: number;
|
|
483
|
+
/**
|
|
484
|
+
* Contract address that controls this campaign
|
|
485
|
+
*
|
|
486
|
+
* @generated from protobuf field: string manager_contract = 11
|
|
487
|
+
*/
|
|
488
|
+
managerContract: string;
|
|
489
|
+
/**
|
|
490
|
+
* Reward tokens of this campaign
|
|
491
|
+
*
|
|
492
|
+
* @generated from protobuf field: repeated injective_campaign_rpc.Coin rewards = 12
|
|
493
|
+
*/
|
|
494
|
+
rewards: Coin[];
|
|
495
|
+
/**
|
|
496
|
+
* Suffix of the subaccount that eligible for volume score
|
|
497
|
+
*
|
|
498
|
+
* @generated from protobuf field: string subaccount_id_suffix = 13
|
|
499
|
+
*/
|
|
500
|
+
subaccountIdSuffix: string;
|
|
501
|
+
/**
|
|
502
|
+
* Contract that manage users reward
|
|
503
|
+
*
|
|
504
|
+
* @generated from protobuf field: string reward_contract = 14
|
|
505
|
+
*/
|
|
506
|
+
rewardContract: string;
|
|
507
|
+
/**
|
|
508
|
+
* Campaign type
|
|
509
|
+
*
|
|
510
|
+
* @generated from protobuf field: string type = 15
|
|
511
|
+
*/
|
|
512
|
+
type: string;
|
|
513
|
+
/**
|
|
514
|
+
* Version of reward contract, UI use this to determine the message that need
|
|
515
|
+
* to be sent
|
|
516
|
+
*
|
|
517
|
+
* @generated from protobuf field: string version = 16
|
|
518
|
+
*/
|
|
519
|
+
version: string;
|
|
520
|
+
/**
|
|
521
|
+
* Campaign name
|
|
522
|
+
*
|
|
523
|
+
* @generated from protobuf field: string name = 17
|
|
524
|
+
*/
|
|
525
|
+
name: string;
|
|
526
|
+
/**
|
|
527
|
+
* Campaign description
|
|
528
|
+
*
|
|
529
|
+
* @generated from protobuf field: string description = 18
|
|
530
|
+
*/
|
|
531
|
+
description: string;
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* @generated from protobuf message injective_campaign_rpc.ListGuildsRequest
|
|
535
|
+
*/
|
|
536
|
+
export interface ListGuildsRequest {
|
|
537
|
+
/**
|
|
538
|
+
* Campaign contract address
|
|
539
|
+
*
|
|
540
|
+
* @generated from protobuf field: string campaign_contract = 1
|
|
541
|
+
*/
|
|
542
|
+
campaignContract: string;
|
|
543
|
+
/**
|
|
544
|
+
* Limit number of returned guilds
|
|
545
|
+
*
|
|
546
|
+
* @generated from protobuf field: sint32 limit = 2
|
|
547
|
+
*/
|
|
548
|
+
limit: number;
|
|
549
|
+
/**
|
|
550
|
+
* Skip some first guilds in the list for next page
|
|
551
|
+
*
|
|
552
|
+
* @generated from protobuf field: sint32 skip = 3
|
|
553
|
+
*/
|
|
554
|
+
skip: number;
|
|
555
|
+
/**
|
|
556
|
+
* Sort by some metrics
|
|
557
|
+
*
|
|
558
|
+
* @generated from protobuf field: string sort_by = 4
|
|
559
|
+
*/
|
|
560
|
+
sortBy: string;
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* @generated from protobuf message injective_campaign_rpc.ListGuildsResponse
|
|
564
|
+
*/
|
|
565
|
+
export interface ListGuildsResponse {
|
|
566
|
+
/**
|
|
567
|
+
* @generated from protobuf field: repeated injective_campaign_rpc.Guild guilds = 1
|
|
568
|
+
*/
|
|
569
|
+
guilds: Guild[];
|
|
570
|
+
/**
|
|
571
|
+
* @generated from protobuf field: injective_campaign_rpc.Paging paging = 2
|
|
572
|
+
*/
|
|
573
|
+
paging?: Paging;
|
|
574
|
+
/**
|
|
575
|
+
* Snapshot updated at time in UNIX milli
|
|
576
|
+
*
|
|
577
|
+
* @generated from protobuf field: sint64 updated_at = 3
|
|
578
|
+
*/
|
|
579
|
+
updatedAt: bigint;
|
|
580
|
+
/**
|
|
581
|
+
* Summary of the campaign
|
|
582
|
+
*
|
|
583
|
+
* @generated from protobuf field: injective_campaign_rpc.CampaignSummary campaign_summary = 4
|
|
584
|
+
*/
|
|
585
|
+
campaignSummary?: CampaignSummary;
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* @generated from protobuf message injective_campaign_rpc.Guild
|
|
589
|
+
*/
|
|
590
|
+
export interface Guild {
|
|
591
|
+
/**
|
|
592
|
+
* @generated from protobuf field: string campaign_contract = 1
|
|
593
|
+
*/
|
|
594
|
+
campaignContract: string;
|
|
595
|
+
/**
|
|
596
|
+
* Guild ID
|
|
597
|
+
*
|
|
598
|
+
* @generated from protobuf field: string guild_id = 2
|
|
599
|
+
*/
|
|
600
|
+
guildId: string;
|
|
601
|
+
/**
|
|
602
|
+
* Guild's master address
|
|
603
|
+
*
|
|
604
|
+
* @generated from protobuf field: string master_address = 3
|
|
605
|
+
*/
|
|
606
|
+
masterAddress: string;
|
|
607
|
+
/**
|
|
608
|
+
* Guild creation date (in UNIX milliseconds)
|
|
609
|
+
*
|
|
610
|
+
* @generated from protobuf field: sint64 created_at = 4
|
|
611
|
+
*/
|
|
612
|
+
createdAt: bigint;
|
|
613
|
+
/**
|
|
614
|
+
* Average TVL score
|
|
615
|
+
*
|
|
616
|
+
* @generated from protobuf field: string tvl_score = 5
|
|
617
|
+
*/
|
|
618
|
+
tvlScore: string;
|
|
619
|
+
/**
|
|
620
|
+
* Total volume score
|
|
621
|
+
*
|
|
622
|
+
* @generated from protobuf field: string volume_score = 6
|
|
623
|
+
*/
|
|
624
|
+
volumeScore: string;
|
|
625
|
+
/**
|
|
626
|
+
* guild's rank by volume
|
|
627
|
+
*
|
|
628
|
+
* @generated from protobuf field: sint32 rank_by_volume = 7
|
|
629
|
+
*/
|
|
630
|
+
rankByVolume: number;
|
|
631
|
+
/**
|
|
632
|
+
* guild's rank by TVL
|
|
633
|
+
*
|
|
634
|
+
* @generated from protobuf field: sint32 rank_by_tvl = 8
|
|
635
|
+
*/
|
|
636
|
+
rankByTvl: number;
|
|
637
|
+
/**
|
|
638
|
+
* guild's logo, at the moment it supports numberic string (i.e '1', '2' and so
|
|
639
|
+
* on) not a random URL because of front end limitation
|
|
640
|
+
*
|
|
641
|
+
* @generated from protobuf field: string logo = 9
|
|
642
|
+
*/
|
|
643
|
+
logo: string;
|
|
644
|
+
/**
|
|
645
|
+
* guild's total TVL
|
|
646
|
+
*
|
|
647
|
+
* @generated from protobuf field: string total_tvl = 10
|
|
648
|
+
*/
|
|
649
|
+
totalTvl: string;
|
|
650
|
+
/**
|
|
651
|
+
* Snapshot updated at time in UNIX milli
|
|
652
|
+
*
|
|
653
|
+
* @generated from protobuf field: sint64 updated_at = 11
|
|
654
|
+
*/
|
|
655
|
+
updatedAt: bigint;
|
|
656
|
+
/**
|
|
657
|
+
* Guild name
|
|
658
|
+
*
|
|
659
|
+
* @generated from protobuf field: string name = 14
|
|
660
|
+
*/
|
|
661
|
+
name: string;
|
|
662
|
+
/**
|
|
663
|
+
* Active status of guild, true when master total tvl meets the minimum
|
|
664
|
+
* requirements
|
|
665
|
+
*
|
|
666
|
+
* @generated from protobuf field: bool is_active = 13
|
|
667
|
+
*/
|
|
668
|
+
isActive: boolean;
|
|
669
|
+
/**
|
|
670
|
+
* Master balance (in current campaigns denom)
|
|
671
|
+
*
|
|
672
|
+
* @generated from protobuf field: string master_balance = 15
|
|
673
|
+
*/
|
|
674
|
+
masterBalance: string;
|
|
675
|
+
/**
|
|
676
|
+
* Guild description, set by master of the guild
|
|
677
|
+
*
|
|
678
|
+
* @generated from protobuf field: string description = 16
|
|
679
|
+
*/
|
|
680
|
+
description: string;
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* @generated from protobuf message injective_campaign_rpc.CampaignSummary
|
|
684
|
+
*/
|
|
685
|
+
export interface CampaignSummary {
|
|
686
|
+
/**
|
|
687
|
+
* Campaign id
|
|
688
|
+
*
|
|
689
|
+
* @generated from protobuf field: string campaign_id = 1
|
|
690
|
+
*/
|
|
691
|
+
campaignId: string;
|
|
692
|
+
/**
|
|
693
|
+
* Guild manager contract address
|
|
694
|
+
*
|
|
695
|
+
* @generated from protobuf field: string campaign_contract = 2
|
|
696
|
+
*/
|
|
697
|
+
campaignContract: string;
|
|
698
|
+
/**
|
|
699
|
+
* Number of guild in the campaign
|
|
700
|
+
*
|
|
701
|
+
* @generated from protobuf field: sint32 total_guilds_count = 3
|
|
702
|
+
*/
|
|
703
|
+
totalGuildsCount: number;
|
|
704
|
+
/**
|
|
705
|
+
* Total TVL
|
|
706
|
+
*
|
|
707
|
+
* @generated from protobuf field: string total_tvl = 4
|
|
708
|
+
*/
|
|
709
|
+
totalTvl: string;
|
|
710
|
+
/**
|
|
711
|
+
* Sum average TVL of all guilds
|
|
712
|
+
*
|
|
713
|
+
* @generated from protobuf field: string total_average_tvl = 5
|
|
714
|
+
*/
|
|
715
|
+
totalAverageTvl: string;
|
|
716
|
+
/**
|
|
717
|
+
* Total volume across all guilds (in market quote denom, often USDT)
|
|
718
|
+
*
|
|
719
|
+
* @generated from protobuf field: string total_volume = 6
|
|
720
|
+
*/
|
|
721
|
+
totalVolume: string;
|
|
722
|
+
/**
|
|
723
|
+
* Snapshot updated at time in UNIX milli
|
|
724
|
+
*
|
|
725
|
+
* @generated from protobuf field: sint64 updated_at = 7
|
|
726
|
+
*/
|
|
727
|
+
updatedAt: bigint;
|
|
728
|
+
/**
|
|
729
|
+
* Total member joined the campaign (include guild masters)
|
|
730
|
+
*
|
|
731
|
+
* @generated from protobuf field: sint32 total_members_count = 8
|
|
732
|
+
*/
|
|
733
|
+
totalMembersCount: number;
|
|
734
|
+
/**
|
|
735
|
+
* Campaign start time
|
|
736
|
+
*
|
|
737
|
+
* @generated from protobuf field: sint64 start_time = 9
|
|
738
|
+
*/
|
|
739
|
+
startTime: bigint;
|
|
740
|
+
/**
|
|
741
|
+
* Campaign end time
|
|
742
|
+
*
|
|
743
|
+
* @generated from protobuf field: sint64 end_time = 10
|
|
744
|
+
*/
|
|
745
|
+
endTime: bigint;
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* @generated from protobuf message injective_campaign_rpc.ListGuildMembersRequest
|
|
749
|
+
*/
|
|
750
|
+
export interface ListGuildMembersRequest {
|
|
751
|
+
/**
|
|
752
|
+
* Campaign contract address
|
|
753
|
+
*
|
|
754
|
+
* @generated from protobuf field: string campaign_contract = 1
|
|
755
|
+
*/
|
|
756
|
+
campaignContract: string;
|
|
757
|
+
/**
|
|
758
|
+
* ID of guild, inside campaign
|
|
759
|
+
*
|
|
760
|
+
* @generated from protobuf field: string guild_id = 2
|
|
761
|
+
*/
|
|
762
|
+
guildId: string;
|
|
763
|
+
/**
|
|
764
|
+
* Limit number of returned guild members
|
|
765
|
+
*
|
|
766
|
+
* @generated from protobuf field: sint32 limit = 3
|
|
767
|
+
*/
|
|
768
|
+
limit: number;
|
|
769
|
+
/**
|
|
770
|
+
* Skip some first guild members in the list for next page
|
|
771
|
+
*
|
|
772
|
+
* @generated from protobuf field: sint32 skip = 4
|
|
773
|
+
*/
|
|
774
|
+
skip: number;
|
|
775
|
+
/**
|
|
776
|
+
* whether to include guild summary info, it's better to use this in terms of
|
|
777
|
+
* latency, instead of sending 2 requests we just need once
|
|
778
|
+
*
|
|
779
|
+
* @generated from protobuf field: bool include_guild_info = 5
|
|
780
|
+
*/
|
|
781
|
+
includeGuildInfo: boolean;
|
|
782
|
+
/**
|
|
783
|
+
* Sort by some metrics
|
|
784
|
+
*
|
|
785
|
+
* @generated from protobuf field: string sort_by = 6
|
|
786
|
+
*/
|
|
787
|
+
sortBy: string;
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* @generated from protobuf message injective_campaign_rpc.ListGuildMembersResponse
|
|
791
|
+
*/
|
|
792
|
+
export interface ListGuildMembersResponse {
|
|
793
|
+
/**
|
|
794
|
+
* @generated from protobuf field: repeated injective_campaign_rpc.GuildMember members = 1
|
|
795
|
+
*/
|
|
796
|
+
members: GuildMember[];
|
|
797
|
+
/**
|
|
798
|
+
* @generated from protobuf field: injective_campaign_rpc.Paging paging = 2
|
|
799
|
+
*/
|
|
800
|
+
paging?: Paging;
|
|
801
|
+
/**
|
|
802
|
+
* @generated from protobuf field: injective_campaign_rpc.Guild guild_info = 3
|
|
803
|
+
*/
|
|
804
|
+
guildInfo?: Guild;
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* @generated from protobuf message injective_campaign_rpc.GuildMember
|
|
808
|
+
*/
|
|
809
|
+
export interface GuildMember {
|
|
810
|
+
/**
|
|
811
|
+
* Guild manager contract address
|
|
812
|
+
*
|
|
813
|
+
* @generated from protobuf field: string campaign_contract = 1
|
|
814
|
+
*/
|
|
815
|
+
campaignContract: string;
|
|
816
|
+
/**
|
|
817
|
+
* Guild ID
|
|
818
|
+
*
|
|
819
|
+
* @generated from protobuf field: string guild_id = 2
|
|
820
|
+
*/
|
|
821
|
+
guildId: string;
|
|
822
|
+
/**
|
|
823
|
+
* Guild member address
|
|
824
|
+
*
|
|
825
|
+
* @generated from protobuf field: string address = 3
|
|
826
|
+
*/
|
|
827
|
+
address: string;
|
|
828
|
+
/**
|
|
829
|
+
* Guild enrollment date (in UNIX milliseconds)
|
|
830
|
+
*
|
|
831
|
+
* @generated from protobuf field: sint64 joined_at = 4
|
|
832
|
+
*/
|
|
833
|
+
joinedAt: bigint;
|
|
834
|
+
/**
|
|
835
|
+
* Average TVL score
|
|
836
|
+
*
|
|
837
|
+
* @generated from protobuf field: string tvl_score = 5
|
|
838
|
+
*/
|
|
839
|
+
tvlScore: string;
|
|
840
|
+
/**
|
|
841
|
+
* Total volume score
|
|
842
|
+
*
|
|
843
|
+
* @generated from protobuf field: string volume_score = 6
|
|
844
|
+
*/
|
|
845
|
+
volumeScore: string;
|
|
846
|
+
/**
|
|
847
|
+
* Total volume score
|
|
848
|
+
*
|
|
849
|
+
* @generated from protobuf field: string total_tvl = 7
|
|
850
|
+
*/
|
|
851
|
+
totalTvl: string;
|
|
852
|
+
/**
|
|
853
|
+
* Volume percentage out of guilds total volume
|
|
854
|
+
*
|
|
855
|
+
* @generated from protobuf field: double volume_score_percentage = 8
|
|
856
|
+
*/
|
|
857
|
+
volumeScorePercentage: number;
|
|
858
|
+
/**
|
|
859
|
+
* TVL percentage out of guilds total TVL score
|
|
860
|
+
*
|
|
861
|
+
* @generated from protobuf field: double tvl_score_percentage = 9
|
|
862
|
+
*/
|
|
863
|
+
tvlScorePercentage: number;
|
|
864
|
+
/**
|
|
865
|
+
* Rewards for volume campaign (amount+denom)
|
|
866
|
+
*
|
|
867
|
+
* @generated from protobuf field: repeated injective_campaign_rpc.Coin tvl_reward = 10
|
|
868
|
+
*/
|
|
869
|
+
tvlReward: Coin[];
|
|
870
|
+
/**
|
|
871
|
+
* Rewards for TVL campaign (amount+denom)
|
|
872
|
+
*
|
|
873
|
+
* @generated from protobuf field: repeated injective_campaign_rpc.Coin volume_reward = 11
|
|
874
|
+
*/
|
|
875
|
+
volumeReward: Coin[];
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* @generated from protobuf message injective_campaign_rpc.GetGuildMemberRequest
|
|
879
|
+
*/
|
|
880
|
+
export interface GetGuildMemberRequest {
|
|
881
|
+
/**
|
|
882
|
+
* Campaign contract address
|
|
883
|
+
*
|
|
884
|
+
* @generated from protobuf field: string campaign_contract = 1
|
|
885
|
+
*/
|
|
886
|
+
campaignContract: string;
|
|
887
|
+
/**
|
|
888
|
+
* User address
|
|
889
|
+
*
|
|
890
|
+
* @generated from protobuf field: string address = 2
|
|
891
|
+
*/
|
|
892
|
+
address: string;
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* @generated from protobuf message injective_campaign_rpc.GetGuildMemberResponse
|
|
896
|
+
*/
|
|
897
|
+
export interface GetGuildMemberResponse {
|
|
898
|
+
/**
|
|
899
|
+
* @generated from protobuf field: injective_campaign_rpc.GuildMember info = 1
|
|
900
|
+
*/
|
|
901
|
+
info?: GuildMember;
|
|
902
|
+
}
|
|
903
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
904
|
+
class RankingRequest$Type extends MessageType<RankingRequest> {
|
|
905
|
+
constructor() {
|
|
906
|
+
super("injective_campaign_rpc.RankingRequest", [
|
|
907
|
+
{ no: 1, name: "campaign_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
908
|
+
{ no: 2, name: "market_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
909
|
+
{ no: 3, name: "account_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
910
|
+
{ no: 4, name: "limit", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
911
|
+
{ no: 5, name: "skip", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
912
|
+
{ no: 6, name: "contract_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
913
|
+
]);
|
|
914
|
+
}
|
|
915
|
+
create(value?: PartialMessage<RankingRequest>): RankingRequest {
|
|
916
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
917
|
+
message.campaignId = "";
|
|
918
|
+
message.marketId = "";
|
|
919
|
+
message.accountAddress = "";
|
|
920
|
+
message.limit = 0;
|
|
921
|
+
message.skip = 0n;
|
|
922
|
+
message.contractAddress = "";
|
|
923
|
+
if (value !== undefined)
|
|
924
|
+
reflectionMergePartial<RankingRequest>(this, message, value);
|
|
925
|
+
return message;
|
|
926
|
+
}
|
|
927
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RankingRequest): RankingRequest {
|
|
928
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
929
|
+
while (reader.pos < end) {
|
|
930
|
+
let [fieldNo, wireType] = reader.tag();
|
|
931
|
+
switch (fieldNo) {
|
|
932
|
+
case /* string campaign_id */ 1:
|
|
933
|
+
message.campaignId = reader.string();
|
|
934
|
+
break;
|
|
935
|
+
case /* string market_id */ 2:
|
|
936
|
+
message.marketId = reader.string();
|
|
937
|
+
break;
|
|
938
|
+
case /* string account_address */ 3:
|
|
939
|
+
message.accountAddress = reader.string();
|
|
940
|
+
break;
|
|
941
|
+
case /* sint32 limit */ 4:
|
|
942
|
+
message.limit = reader.sint32();
|
|
943
|
+
break;
|
|
944
|
+
case /* uint64 skip */ 5:
|
|
945
|
+
message.skip = reader.uint64().toBigInt();
|
|
946
|
+
break;
|
|
947
|
+
case /* string contract_address */ 6:
|
|
948
|
+
message.contractAddress = reader.string();
|
|
949
|
+
break;
|
|
950
|
+
default:
|
|
951
|
+
let u = options.readUnknownField;
|
|
952
|
+
if (u === "throw")
|
|
953
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
954
|
+
let d = reader.skip(wireType);
|
|
955
|
+
if (u !== false)
|
|
956
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
return message;
|
|
960
|
+
}
|
|
961
|
+
internalBinaryWrite(message: RankingRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
962
|
+
/* string campaign_id = 1; */
|
|
963
|
+
if (message.campaignId !== "")
|
|
964
|
+
writer.tag(1, WireType.LengthDelimited).string(message.campaignId);
|
|
965
|
+
/* string market_id = 2; */
|
|
966
|
+
if (message.marketId !== "")
|
|
967
|
+
writer.tag(2, WireType.LengthDelimited).string(message.marketId);
|
|
968
|
+
/* string account_address = 3; */
|
|
969
|
+
if (message.accountAddress !== "")
|
|
970
|
+
writer.tag(3, WireType.LengthDelimited).string(message.accountAddress);
|
|
971
|
+
/* sint32 limit = 4; */
|
|
972
|
+
if (message.limit !== 0)
|
|
973
|
+
writer.tag(4, WireType.Varint).sint32(message.limit);
|
|
974
|
+
/* uint64 skip = 5; */
|
|
975
|
+
if (message.skip !== 0n)
|
|
976
|
+
writer.tag(5, WireType.Varint).uint64(message.skip);
|
|
977
|
+
/* string contract_address = 6; */
|
|
978
|
+
if (message.contractAddress !== "")
|
|
979
|
+
writer.tag(6, WireType.LengthDelimited).string(message.contractAddress);
|
|
980
|
+
let u = options.writeUnknownFields;
|
|
981
|
+
if (u !== false)
|
|
982
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
983
|
+
return writer;
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.RankingRequest
|
|
988
|
+
*/
|
|
989
|
+
export const RankingRequest = new RankingRequest$Type();
|
|
990
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
991
|
+
class RankingResponse$Type extends MessageType<RankingResponse> {
|
|
992
|
+
constructor() {
|
|
993
|
+
super("injective_campaign_rpc.RankingResponse", [
|
|
994
|
+
{ no: 1, name: "campaign", kind: "message", T: () => Campaign },
|
|
995
|
+
{ no: 2, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CampaignUser },
|
|
996
|
+
{ no: 3, name: "paging", kind: "message", T: () => Paging }
|
|
997
|
+
]);
|
|
998
|
+
}
|
|
999
|
+
create(value?: PartialMessage<RankingResponse>): RankingResponse {
|
|
1000
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1001
|
+
message.users = [];
|
|
1002
|
+
if (value !== undefined)
|
|
1003
|
+
reflectionMergePartial<RankingResponse>(this, message, value);
|
|
1004
|
+
return message;
|
|
1005
|
+
}
|
|
1006
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RankingResponse): RankingResponse {
|
|
1007
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1008
|
+
while (reader.pos < end) {
|
|
1009
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1010
|
+
switch (fieldNo) {
|
|
1011
|
+
case /* injective_campaign_rpc.Campaign campaign */ 1:
|
|
1012
|
+
message.campaign = Campaign.internalBinaryRead(reader, reader.uint32(), options, message.campaign);
|
|
1013
|
+
break;
|
|
1014
|
+
case /* repeated injective_campaign_rpc.CampaignUser users */ 2:
|
|
1015
|
+
message.users.push(CampaignUser.internalBinaryRead(reader, reader.uint32(), options));
|
|
1016
|
+
break;
|
|
1017
|
+
case /* injective_campaign_rpc.Paging paging */ 3:
|
|
1018
|
+
message.paging = Paging.internalBinaryRead(reader, reader.uint32(), options, message.paging);
|
|
1019
|
+
break;
|
|
1020
|
+
default:
|
|
1021
|
+
let u = options.readUnknownField;
|
|
1022
|
+
if (u === "throw")
|
|
1023
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1024
|
+
let d = reader.skip(wireType);
|
|
1025
|
+
if (u !== false)
|
|
1026
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
return message;
|
|
1030
|
+
}
|
|
1031
|
+
internalBinaryWrite(message: RankingResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1032
|
+
/* injective_campaign_rpc.Campaign campaign = 1; */
|
|
1033
|
+
if (message.campaign)
|
|
1034
|
+
Campaign.internalBinaryWrite(message.campaign, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1035
|
+
/* repeated injective_campaign_rpc.CampaignUser users = 2; */
|
|
1036
|
+
for (let i = 0; i < message.users.length; i++)
|
|
1037
|
+
CampaignUser.internalBinaryWrite(message.users[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
1038
|
+
/* injective_campaign_rpc.Paging paging = 3; */
|
|
1039
|
+
if (message.paging)
|
|
1040
|
+
Paging.internalBinaryWrite(message.paging, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
1041
|
+
let u = options.writeUnknownFields;
|
|
1042
|
+
if (u !== false)
|
|
1043
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1044
|
+
return writer;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
/**
|
|
1048
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.RankingResponse
|
|
1049
|
+
*/
|
|
1050
|
+
export const RankingResponse = new RankingResponse$Type();
|
|
1051
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1052
|
+
class Campaign$Type extends MessageType<Campaign> {
|
|
1053
|
+
constructor() {
|
|
1054
|
+
super("injective_campaign_rpc.Campaign", [
|
|
1055
|
+
{ no: 1, name: "campaign_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1056
|
+
{ no: 2, name: "market_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1057
|
+
{ no: 4, name: "total_score", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1058
|
+
{ no: 5, name: "last_updated", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1059
|
+
{ no: 6, name: "start_date", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1060
|
+
{ no: 7, name: "end_date", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1061
|
+
{ no: 8, name: "is_claimable", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1062
|
+
{ no: 9, name: "round_id", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
1063
|
+
{ no: 10, name: "manager_contract", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1064
|
+
{ no: 11, name: "rewards", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Coin },
|
|
1065
|
+
{ no: 12, name: "user_score", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1066
|
+
{ no: 13, name: "user_claimed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1067
|
+
{ no: 14, name: "subaccount_id_suffix", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1068
|
+
{ no: 15, name: "reward_contract", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1069
|
+
{ no: 16, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1070
|
+
{ no: 17, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1071
|
+
]);
|
|
1072
|
+
}
|
|
1073
|
+
create(value?: PartialMessage<Campaign>): Campaign {
|
|
1074
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1075
|
+
message.campaignId = "";
|
|
1076
|
+
message.marketId = "";
|
|
1077
|
+
message.totalScore = "";
|
|
1078
|
+
message.lastUpdated = 0n;
|
|
1079
|
+
message.startDate = 0n;
|
|
1080
|
+
message.endDate = 0n;
|
|
1081
|
+
message.isClaimable = false;
|
|
1082
|
+
message.roundId = 0;
|
|
1083
|
+
message.managerContract = "";
|
|
1084
|
+
message.rewards = [];
|
|
1085
|
+
message.userScore = "";
|
|
1086
|
+
message.userClaimed = false;
|
|
1087
|
+
message.subaccountIdSuffix = "";
|
|
1088
|
+
message.rewardContract = "";
|
|
1089
|
+
message.version = "";
|
|
1090
|
+
message.type = "";
|
|
1091
|
+
if (value !== undefined)
|
|
1092
|
+
reflectionMergePartial<Campaign>(this, message, value);
|
|
1093
|
+
return message;
|
|
1094
|
+
}
|
|
1095
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Campaign): Campaign {
|
|
1096
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1097
|
+
while (reader.pos < end) {
|
|
1098
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1099
|
+
switch (fieldNo) {
|
|
1100
|
+
case /* string campaign_id */ 1:
|
|
1101
|
+
message.campaignId = reader.string();
|
|
1102
|
+
break;
|
|
1103
|
+
case /* string market_id */ 2:
|
|
1104
|
+
message.marketId = reader.string();
|
|
1105
|
+
break;
|
|
1106
|
+
case /* string total_score */ 4:
|
|
1107
|
+
message.totalScore = reader.string();
|
|
1108
|
+
break;
|
|
1109
|
+
case /* sint64 last_updated */ 5:
|
|
1110
|
+
message.lastUpdated = reader.sint64().toBigInt();
|
|
1111
|
+
break;
|
|
1112
|
+
case /* sint64 start_date */ 6:
|
|
1113
|
+
message.startDate = reader.sint64().toBigInt();
|
|
1114
|
+
break;
|
|
1115
|
+
case /* sint64 end_date */ 7:
|
|
1116
|
+
message.endDate = reader.sint64().toBigInt();
|
|
1117
|
+
break;
|
|
1118
|
+
case /* bool is_claimable */ 8:
|
|
1119
|
+
message.isClaimable = reader.bool();
|
|
1120
|
+
break;
|
|
1121
|
+
case /* sint32 round_id */ 9:
|
|
1122
|
+
message.roundId = reader.sint32();
|
|
1123
|
+
break;
|
|
1124
|
+
case /* string manager_contract */ 10:
|
|
1125
|
+
message.managerContract = reader.string();
|
|
1126
|
+
break;
|
|
1127
|
+
case /* repeated injective_campaign_rpc.Coin rewards */ 11:
|
|
1128
|
+
message.rewards.push(Coin.internalBinaryRead(reader, reader.uint32(), options));
|
|
1129
|
+
break;
|
|
1130
|
+
case /* string user_score */ 12:
|
|
1131
|
+
message.userScore = reader.string();
|
|
1132
|
+
break;
|
|
1133
|
+
case /* bool user_claimed */ 13:
|
|
1134
|
+
message.userClaimed = reader.bool();
|
|
1135
|
+
break;
|
|
1136
|
+
case /* string subaccount_id_suffix */ 14:
|
|
1137
|
+
message.subaccountIdSuffix = reader.string();
|
|
1138
|
+
break;
|
|
1139
|
+
case /* string reward_contract */ 15:
|
|
1140
|
+
message.rewardContract = reader.string();
|
|
1141
|
+
break;
|
|
1142
|
+
case /* string version */ 16:
|
|
1143
|
+
message.version = reader.string();
|
|
1144
|
+
break;
|
|
1145
|
+
case /* string type */ 17:
|
|
1146
|
+
message.type = reader.string();
|
|
1147
|
+
break;
|
|
1148
|
+
default:
|
|
1149
|
+
let u = options.readUnknownField;
|
|
1150
|
+
if (u === "throw")
|
|
1151
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1152
|
+
let d = reader.skip(wireType);
|
|
1153
|
+
if (u !== false)
|
|
1154
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
return message;
|
|
1158
|
+
}
|
|
1159
|
+
internalBinaryWrite(message: Campaign, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1160
|
+
/* string campaign_id = 1; */
|
|
1161
|
+
if (message.campaignId !== "")
|
|
1162
|
+
writer.tag(1, WireType.LengthDelimited).string(message.campaignId);
|
|
1163
|
+
/* string market_id = 2; */
|
|
1164
|
+
if (message.marketId !== "")
|
|
1165
|
+
writer.tag(2, WireType.LengthDelimited).string(message.marketId);
|
|
1166
|
+
/* string total_score = 4; */
|
|
1167
|
+
if (message.totalScore !== "")
|
|
1168
|
+
writer.tag(4, WireType.LengthDelimited).string(message.totalScore);
|
|
1169
|
+
/* sint64 last_updated = 5; */
|
|
1170
|
+
if (message.lastUpdated !== 0n)
|
|
1171
|
+
writer.tag(5, WireType.Varint).sint64(message.lastUpdated);
|
|
1172
|
+
/* sint64 start_date = 6; */
|
|
1173
|
+
if (message.startDate !== 0n)
|
|
1174
|
+
writer.tag(6, WireType.Varint).sint64(message.startDate);
|
|
1175
|
+
/* sint64 end_date = 7; */
|
|
1176
|
+
if (message.endDate !== 0n)
|
|
1177
|
+
writer.tag(7, WireType.Varint).sint64(message.endDate);
|
|
1178
|
+
/* bool is_claimable = 8; */
|
|
1179
|
+
if (message.isClaimable !== false)
|
|
1180
|
+
writer.tag(8, WireType.Varint).bool(message.isClaimable);
|
|
1181
|
+
/* sint32 round_id = 9; */
|
|
1182
|
+
if (message.roundId !== 0)
|
|
1183
|
+
writer.tag(9, WireType.Varint).sint32(message.roundId);
|
|
1184
|
+
/* string manager_contract = 10; */
|
|
1185
|
+
if (message.managerContract !== "")
|
|
1186
|
+
writer.tag(10, WireType.LengthDelimited).string(message.managerContract);
|
|
1187
|
+
/* repeated injective_campaign_rpc.Coin rewards = 11; */
|
|
1188
|
+
for (let i = 0; i < message.rewards.length; i++)
|
|
1189
|
+
Coin.internalBinaryWrite(message.rewards[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
1190
|
+
/* string user_score = 12; */
|
|
1191
|
+
if (message.userScore !== "")
|
|
1192
|
+
writer.tag(12, WireType.LengthDelimited).string(message.userScore);
|
|
1193
|
+
/* bool user_claimed = 13; */
|
|
1194
|
+
if (message.userClaimed !== false)
|
|
1195
|
+
writer.tag(13, WireType.Varint).bool(message.userClaimed);
|
|
1196
|
+
/* string subaccount_id_suffix = 14; */
|
|
1197
|
+
if (message.subaccountIdSuffix !== "")
|
|
1198
|
+
writer.tag(14, WireType.LengthDelimited).string(message.subaccountIdSuffix);
|
|
1199
|
+
/* string reward_contract = 15; */
|
|
1200
|
+
if (message.rewardContract !== "")
|
|
1201
|
+
writer.tag(15, WireType.LengthDelimited).string(message.rewardContract);
|
|
1202
|
+
/* string version = 16; */
|
|
1203
|
+
if (message.version !== "")
|
|
1204
|
+
writer.tag(16, WireType.LengthDelimited).string(message.version);
|
|
1205
|
+
/* string type = 17; */
|
|
1206
|
+
if (message.type !== "")
|
|
1207
|
+
writer.tag(17, WireType.LengthDelimited).string(message.type);
|
|
1208
|
+
let u = options.writeUnknownFields;
|
|
1209
|
+
if (u !== false)
|
|
1210
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1211
|
+
return writer;
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
/**
|
|
1215
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.Campaign
|
|
1216
|
+
*/
|
|
1217
|
+
export const Campaign = new Campaign$Type();
|
|
1218
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1219
|
+
class Coin$Type extends MessageType<Coin> {
|
|
1220
|
+
constructor() {
|
|
1221
|
+
super("injective_campaign_rpc.Coin", [
|
|
1222
|
+
{ no: 1, name: "denom", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1223
|
+
{ no: 2, name: "amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1224
|
+
{ no: 3, name: "usd_value", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1225
|
+
]);
|
|
1226
|
+
}
|
|
1227
|
+
create(value?: PartialMessage<Coin>): Coin {
|
|
1228
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1229
|
+
message.denom = "";
|
|
1230
|
+
message.amount = "";
|
|
1231
|
+
message.usdValue = "";
|
|
1232
|
+
if (value !== undefined)
|
|
1233
|
+
reflectionMergePartial<Coin>(this, message, value);
|
|
1234
|
+
return message;
|
|
1235
|
+
}
|
|
1236
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Coin): Coin {
|
|
1237
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1238
|
+
while (reader.pos < end) {
|
|
1239
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1240
|
+
switch (fieldNo) {
|
|
1241
|
+
case /* string denom */ 1:
|
|
1242
|
+
message.denom = reader.string();
|
|
1243
|
+
break;
|
|
1244
|
+
case /* string amount */ 2:
|
|
1245
|
+
message.amount = reader.string();
|
|
1246
|
+
break;
|
|
1247
|
+
case /* string usd_value */ 3:
|
|
1248
|
+
message.usdValue = reader.string();
|
|
1249
|
+
break;
|
|
1250
|
+
default:
|
|
1251
|
+
let u = options.readUnknownField;
|
|
1252
|
+
if (u === "throw")
|
|
1253
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1254
|
+
let d = reader.skip(wireType);
|
|
1255
|
+
if (u !== false)
|
|
1256
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
return message;
|
|
1260
|
+
}
|
|
1261
|
+
internalBinaryWrite(message: Coin, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1262
|
+
/* string denom = 1; */
|
|
1263
|
+
if (message.denom !== "")
|
|
1264
|
+
writer.tag(1, WireType.LengthDelimited).string(message.denom);
|
|
1265
|
+
/* string amount = 2; */
|
|
1266
|
+
if (message.amount !== "")
|
|
1267
|
+
writer.tag(2, WireType.LengthDelimited).string(message.amount);
|
|
1268
|
+
/* string usd_value = 3; */
|
|
1269
|
+
if (message.usdValue !== "")
|
|
1270
|
+
writer.tag(3, WireType.LengthDelimited).string(message.usdValue);
|
|
1271
|
+
let u = options.writeUnknownFields;
|
|
1272
|
+
if (u !== false)
|
|
1273
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1274
|
+
return writer;
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.Coin
|
|
1279
|
+
*/
|
|
1280
|
+
export const Coin = new Coin$Type();
|
|
1281
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1282
|
+
class CampaignUser$Type extends MessageType<CampaignUser> {
|
|
1283
|
+
constructor() {
|
|
1284
|
+
super("injective_campaign_rpc.CampaignUser", [
|
|
1285
|
+
{ no: 1, name: "campaign_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1286
|
+
{ no: 2, name: "market_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1287
|
+
{ no: 3, name: "account_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1288
|
+
{ no: 4, name: "score", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1289
|
+
{ no: 5, name: "contract_updated", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1290
|
+
{ no: 6, name: "block_height", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1291
|
+
{ no: 7, name: "block_time", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1292
|
+
{ no: 8, name: "purchased_amount", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1293
|
+
{ no: 9, name: "galxe_updated", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1294
|
+
{ no: 10, name: "reward_claimed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
1295
|
+
]);
|
|
1296
|
+
}
|
|
1297
|
+
create(value?: PartialMessage<CampaignUser>): CampaignUser {
|
|
1298
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1299
|
+
message.campaignId = "";
|
|
1300
|
+
message.marketId = "";
|
|
1301
|
+
message.accountAddress = "";
|
|
1302
|
+
message.score = "";
|
|
1303
|
+
message.contractUpdated = false;
|
|
1304
|
+
message.blockHeight = 0n;
|
|
1305
|
+
message.blockTime = 0n;
|
|
1306
|
+
message.purchasedAmount = "";
|
|
1307
|
+
message.galxeUpdated = false;
|
|
1308
|
+
message.rewardClaimed = false;
|
|
1309
|
+
if (value !== undefined)
|
|
1310
|
+
reflectionMergePartial<CampaignUser>(this, message, value);
|
|
1311
|
+
return message;
|
|
1312
|
+
}
|
|
1313
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CampaignUser): CampaignUser {
|
|
1314
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1315
|
+
while (reader.pos < end) {
|
|
1316
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1317
|
+
switch (fieldNo) {
|
|
1318
|
+
case /* string campaign_id */ 1:
|
|
1319
|
+
message.campaignId = reader.string();
|
|
1320
|
+
break;
|
|
1321
|
+
case /* string market_id */ 2:
|
|
1322
|
+
message.marketId = reader.string();
|
|
1323
|
+
break;
|
|
1324
|
+
case /* string account_address */ 3:
|
|
1325
|
+
message.accountAddress = reader.string();
|
|
1326
|
+
break;
|
|
1327
|
+
case /* string score */ 4:
|
|
1328
|
+
message.score = reader.string();
|
|
1329
|
+
break;
|
|
1330
|
+
case /* bool contract_updated */ 5:
|
|
1331
|
+
message.contractUpdated = reader.bool();
|
|
1332
|
+
break;
|
|
1333
|
+
case /* sint64 block_height */ 6:
|
|
1334
|
+
message.blockHeight = reader.sint64().toBigInt();
|
|
1335
|
+
break;
|
|
1336
|
+
case /* sint64 block_time */ 7:
|
|
1337
|
+
message.blockTime = reader.sint64().toBigInt();
|
|
1338
|
+
break;
|
|
1339
|
+
case /* string purchased_amount */ 8:
|
|
1340
|
+
message.purchasedAmount = reader.string();
|
|
1341
|
+
break;
|
|
1342
|
+
case /* bool galxe_updated */ 9:
|
|
1343
|
+
message.galxeUpdated = reader.bool();
|
|
1344
|
+
break;
|
|
1345
|
+
case /* bool reward_claimed */ 10:
|
|
1346
|
+
message.rewardClaimed = reader.bool();
|
|
1347
|
+
break;
|
|
1348
|
+
default:
|
|
1349
|
+
let u = options.readUnknownField;
|
|
1350
|
+
if (u === "throw")
|
|
1351
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1352
|
+
let d = reader.skip(wireType);
|
|
1353
|
+
if (u !== false)
|
|
1354
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
return message;
|
|
1358
|
+
}
|
|
1359
|
+
internalBinaryWrite(message: CampaignUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1360
|
+
/* string campaign_id = 1; */
|
|
1361
|
+
if (message.campaignId !== "")
|
|
1362
|
+
writer.tag(1, WireType.LengthDelimited).string(message.campaignId);
|
|
1363
|
+
/* string market_id = 2; */
|
|
1364
|
+
if (message.marketId !== "")
|
|
1365
|
+
writer.tag(2, WireType.LengthDelimited).string(message.marketId);
|
|
1366
|
+
/* string account_address = 3; */
|
|
1367
|
+
if (message.accountAddress !== "")
|
|
1368
|
+
writer.tag(3, WireType.LengthDelimited).string(message.accountAddress);
|
|
1369
|
+
/* string score = 4; */
|
|
1370
|
+
if (message.score !== "")
|
|
1371
|
+
writer.tag(4, WireType.LengthDelimited).string(message.score);
|
|
1372
|
+
/* bool contract_updated = 5; */
|
|
1373
|
+
if (message.contractUpdated !== false)
|
|
1374
|
+
writer.tag(5, WireType.Varint).bool(message.contractUpdated);
|
|
1375
|
+
/* sint64 block_height = 6; */
|
|
1376
|
+
if (message.blockHeight !== 0n)
|
|
1377
|
+
writer.tag(6, WireType.Varint).sint64(message.blockHeight);
|
|
1378
|
+
/* sint64 block_time = 7; */
|
|
1379
|
+
if (message.blockTime !== 0n)
|
|
1380
|
+
writer.tag(7, WireType.Varint).sint64(message.blockTime);
|
|
1381
|
+
/* string purchased_amount = 8; */
|
|
1382
|
+
if (message.purchasedAmount !== "")
|
|
1383
|
+
writer.tag(8, WireType.LengthDelimited).string(message.purchasedAmount);
|
|
1384
|
+
/* bool galxe_updated = 9; */
|
|
1385
|
+
if (message.galxeUpdated !== false)
|
|
1386
|
+
writer.tag(9, WireType.Varint).bool(message.galxeUpdated);
|
|
1387
|
+
/* bool reward_claimed = 10; */
|
|
1388
|
+
if (message.rewardClaimed !== false)
|
|
1389
|
+
writer.tag(10, WireType.Varint).bool(message.rewardClaimed);
|
|
1390
|
+
let u = options.writeUnknownFields;
|
|
1391
|
+
if (u !== false)
|
|
1392
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1393
|
+
return writer;
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
/**
|
|
1397
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.CampaignUser
|
|
1398
|
+
*/
|
|
1399
|
+
export const CampaignUser = new CampaignUser$Type();
|
|
1400
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1401
|
+
class Paging$Type extends MessageType<Paging> {
|
|
1402
|
+
constructor() {
|
|
1403
|
+
super("injective_campaign_rpc.Paging", [
|
|
1404
|
+
{ no: 1, name: "total", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1405
|
+
{ no: 2, name: "from", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
1406
|
+
{ no: 3, name: "to", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
1407
|
+
{ no: 4, name: "count_by_subaccount", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1408
|
+
{ no: 5, name: "next", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
|
|
1409
|
+
]);
|
|
1410
|
+
}
|
|
1411
|
+
create(value?: PartialMessage<Paging>): Paging {
|
|
1412
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1413
|
+
message.total = 0n;
|
|
1414
|
+
message.from = 0;
|
|
1415
|
+
message.to = 0;
|
|
1416
|
+
message.countBySubaccount = 0n;
|
|
1417
|
+
message.next = [];
|
|
1418
|
+
if (value !== undefined)
|
|
1419
|
+
reflectionMergePartial<Paging>(this, message, value);
|
|
1420
|
+
return message;
|
|
1421
|
+
}
|
|
1422
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Paging): Paging {
|
|
1423
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1424
|
+
while (reader.pos < end) {
|
|
1425
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1426
|
+
switch (fieldNo) {
|
|
1427
|
+
case /* sint64 total */ 1:
|
|
1428
|
+
message.total = reader.sint64().toBigInt();
|
|
1429
|
+
break;
|
|
1430
|
+
case /* sint32 from */ 2:
|
|
1431
|
+
message.from = reader.sint32();
|
|
1432
|
+
break;
|
|
1433
|
+
case /* sint32 to */ 3:
|
|
1434
|
+
message.to = reader.sint32();
|
|
1435
|
+
break;
|
|
1436
|
+
case /* sint64 count_by_subaccount */ 4:
|
|
1437
|
+
message.countBySubaccount = reader.sint64().toBigInt();
|
|
1438
|
+
break;
|
|
1439
|
+
case /* repeated string next */ 5:
|
|
1440
|
+
message.next.push(reader.string());
|
|
1441
|
+
break;
|
|
1442
|
+
default:
|
|
1443
|
+
let u = options.readUnknownField;
|
|
1444
|
+
if (u === "throw")
|
|
1445
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1446
|
+
let d = reader.skip(wireType);
|
|
1447
|
+
if (u !== false)
|
|
1448
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
return message;
|
|
1452
|
+
}
|
|
1453
|
+
internalBinaryWrite(message: Paging, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1454
|
+
/* sint64 total = 1; */
|
|
1455
|
+
if (message.total !== 0n)
|
|
1456
|
+
writer.tag(1, WireType.Varint).sint64(message.total);
|
|
1457
|
+
/* sint32 from = 2; */
|
|
1458
|
+
if (message.from !== 0)
|
|
1459
|
+
writer.tag(2, WireType.Varint).sint32(message.from);
|
|
1460
|
+
/* sint32 to = 3; */
|
|
1461
|
+
if (message.to !== 0)
|
|
1462
|
+
writer.tag(3, WireType.Varint).sint32(message.to);
|
|
1463
|
+
/* sint64 count_by_subaccount = 4; */
|
|
1464
|
+
if (message.countBySubaccount !== 0n)
|
|
1465
|
+
writer.tag(4, WireType.Varint).sint64(message.countBySubaccount);
|
|
1466
|
+
/* repeated string next = 5; */
|
|
1467
|
+
for (let i = 0; i < message.next.length; i++)
|
|
1468
|
+
writer.tag(5, WireType.LengthDelimited).string(message.next[i]);
|
|
1469
|
+
let u = options.writeUnknownFields;
|
|
1470
|
+
if (u !== false)
|
|
1471
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1472
|
+
return writer;
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
/**
|
|
1476
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.Paging
|
|
1477
|
+
*/
|
|
1478
|
+
export const Paging = new Paging$Type();
|
|
1479
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1480
|
+
class CampaignsRequest$Type extends MessageType<CampaignsRequest> {
|
|
1481
|
+
constructor() {
|
|
1482
|
+
super("injective_campaign_rpc.CampaignsRequest", [
|
|
1483
|
+
{ no: 1, name: "round_id", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1484
|
+
{ no: 2, name: "account_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1485
|
+
{ no: 3, name: "to_round_id", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
1486
|
+
{ no: 4, name: "contract_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1487
|
+
{ no: 5, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1488
|
+
]);
|
|
1489
|
+
}
|
|
1490
|
+
create(value?: PartialMessage<CampaignsRequest>): CampaignsRequest {
|
|
1491
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1492
|
+
message.roundId = 0n;
|
|
1493
|
+
message.accountAddress = "";
|
|
1494
|
+
message.toRoundId = 0;
|
|
1495
|
+
message.contractAddress = "";
|
|
1496
|
+
message.type = "";
|
|
1497
|
+
if (value !== undefined)
|
|
1498
|
+
reflectionMergePartial<CampaignsRequest>(this, message, value);
|
|
1499
|
+
return message;
|
|
1500
|
+
}
|
|
1501
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CampaignsRequest): CampaignsRequest {
|
|
1502
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1503
|
+
while (reader.pos < end) {
|
|
1504
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1505
|
+
switch (fieldNo) {
|
|
1506
|
+
case /* sint64 round_id */ 1:
|
|
1507
|
+
message.roundId = reader.sint64().toBigInt();
|
|
1508
|
+
break;
|
|
1509
|
+
case /* string account_address */ 2:
|
|
1510
|
+
message.accountAddress = reader.string();
|
|
1511
|
+
break;
|
|
1512
|
+
case /* sint32 to_round_id */ 3:
|
|
1513
|
+
message.toRoundId = reader.sint32();
|
|
1514
|
+
break;
|
|
1515
|
+
case /* string contract_address */ 4:
|
|
1516
|
+
message.contractAddress = reader.string();
|
|
1517
|
+
break;
|
|
1518
|
+
case /* string type */ 5:
|
|
1519
|
+
message.type = reader.string();
|
|
1520
|
+
break;
|
|
1521
|
+
default:
|
|
1522
|
+
let u = options.readUnknownField;
|
|
1523
|
+
if (u === "throw")
|
|
1524
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1525
|
+
let d = reader.skip(wireType);
|
|
1526
|
+
if (u !== false)
|
|
1527
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
return message;
|
|
1531
|
+
}
|
|
1532
|
+
internalBinaryWrite(message: CampaignsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1533
|
+
/* sint64 round_id = 1; */
|
|
1534
|
+
if (message.roundId !== 0n)
|
|
1535
|
+
writer.tag(1, WireType.Varint).sint64(message.roundId);
|
|
1536
|
+
/* string account_address = 2; */
|
|
1537
|
+
if (message.accountAddress !== "")
|
|
1538
|
+
writer.tag(2, WireType.LengthDelimited).string(message.accountAddress);
|
|
1539
|
+
/* sint32 to_round_id = 3; */
|
|
1540
|
+
if (message.toRoundId !== 0)
|
|
1541
|
+
writer.tag(3, WireType.Varint).sint32(message.toRoundId);
|
|
1542
|
+
/* string contract_address = 4; */
|
|
1543
|
+
if (message.contractAddress !== "")
|
|
1544
|
+
writer.tag(4, WireType.LengthDelimited).string(message.contractAddress);
|
|
1545
|
+
/* string type = 5; */
|
|
1546
|
+
if (message.type !== "")
|
|
1547
|
+
writer.tag(5, WireType.LengthDelimited).string(message.type);
|
|
1548
|
+
let u = options.writeUnknownFields;
|
|
1549
|
+
if (u !== false)
|
|
1550
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1551
|
+
return writer;
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
/**
|
|
1555
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.CampaignsRequest
|
|
1556
|
+
*/
|
|
1557
|
+
export const CampaignsRequest = new CampaignsRequest$Type();
|
|
1558
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1559
|
+
class CampaignsResponse$Type extends MessageType<CampaignsResponse> {
|
|
1560
|
+
constructor() {
|
|
1561
|
+
super("injective_campaign_rpc.CampaignsResponse", [
|
|
1562
|
+
{ no: 1, name: "campaigns", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Campaign },
|
|
1563
|
+
{ no: 2, name: "accumulated_rewards", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Coin },
|
|
1564
|
+
{ no: 3, name: "reward_count", kind: "scalar", T: 17 /*ScalarType.SINT32*/ }
|
|
1565
|
+
]);
|
|
1566
|
+
}
|
|
1567
|
+
create(value?: PartialMessage<CampaignsResponse>): CampaignsResponse {
|
|
1568
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1569
|
+
message.campaigns = [];
|
|
1570
|
+
message.accumulatedRewards = [];
|
|
1571
|
+
message.rewardCount = 0;
|
|
1572
|
+
if (value !== undefined)
|
|
1573
|
+
reflectionMergePartial<CampaignsResponse>(this, message, value);
|
|
1574
|
+
return message;
|
|
1575
|
+
}
|
|
1576
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CampaignsResponse): CampaignsResponse {
|
|
1577
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1578
|
+
while (reader.pos < end) {
|
|
1579
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1580
|
+
switch (fieldNo) {
|
|
1581
|
+
case /* repeated injective_campaign_rpc.Campaign campaigns */ 1:
|
|
1582
|
+
message.campaigns.push(Campaign.internalBinaryRead(reader, reader.uint32(), options));
|
|
1583
|
+
break;
|
|
1584
|
+
case /* repeated injective_campaign_rpc.Coin accumulated_rewards */ 2:
|
|
1585
|
+
message.accumulatedRewards.push(Coin.internalBinaryRead(reader, reader.uint32(), options));
|
|
1586
|
+
break;
|
|
1587
|
+
case /* sint32 reward_count */ 3:
|
|
1588
|
+
message.rewardCount = reader.sint32();
|
|
1589
|
+
break;
|
|
1590
|
+
default:
|
|
1591
|
+
let u = options.readUnknownField;
|
|
1592
|
+
if (u === "throw")
|
|
1593
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1594
|
+
let d = reader.skip(wireType);
|
|
1595
|
+
if (u !== false)
|
|
1596
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
return message;
|
|
1600
|
+
}
|
|
1601
|
+
internalBinaryWrite(message: CampaignsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1602
|
+
/* repeated injective_campaign_rpc.Campaign campaigns = 1; */
|
|
1603
|
+
for (let i = 0; i < message.campaigns.length; i++)
|
|
1604
|
+
Campaign.internalBinaryWrite(message.campaigns[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1605
|
+
/* repeated injective_campaign_rpc.Coin accumulated_rewards = 2; */
|
|
1606
|
+
for (let i = 0; i < message.accumulatedRewards.length; i++)
|
|
1607
|
+
Coin.internalBinaryWrite(message.accumulatedRewards[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
1608
|
+
/* sint32 reward_count = 3; */
|
|
1609
|
+
if (message.rewardCount !== 0)
|
|
1610
|
+
writer.tag(3, WireType.Varint).sint32(message.rewardCount);
|
|
1611
|
+
let u = options.writeUnknownFields;
|
|
1612
|
+
if (u !== false)
|
|
1613
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1614
|
+
return writer;
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
/**
|
|
1618
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.CampaignsResponse
|
|
1619
|
+
*/
|
|
1620
|
+
export const CampaignsResponse = new CampaignsResponse$Type();
|
|
1621
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1622
|
+
class CampaignsV2Request$Type extends MessageType<CampaignsV2Request> {
|
|
1623
|
+
constructor() {
|
|
1624
|
+
super("injective_campaign_rpc.CampaignsV2Request", [
|
|
1625
|
+
{ no: 1, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1626
|
+
{ no: 2, name: "active", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1627
|
+
{ no: 3, name: "limit", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
1628
|
+
{ no: 4, name: "cursor", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1629
|
+
{ no: 5, name: "from_start_date", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1630
|
+
{ no: 6, name: "to_start_date", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1631
|
+
{ no: 7, name: "from_end_date", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1632
|
+
{ no: 8, name: "to_end_date", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1633
|
+
{ no: 9, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1634
|
+
]);
|
|
1635
|
+
}
|
|
1636
|
+
create(value?: PartialMessage<CampaignsV2Request>): CampaignsV2Request {
|
|
1637
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1638
|
+
message.type = "";
|
|
1639
|
+
message.active = false;
|
|
1640
|
+
message.limit = 0;
|
|
1641
|
+
message.cursor = "";
|
|
1642
|
+
message.fromStartDate = 0n;
|
|
1643
|
+
message.toStartDate = 0n;
|
|
1644
|
+
message.fromEndDate = 0n;
|
|
1645
|
+
message.toEndDate = 0n;
|
|
1646
|
+
message.status = "";
|
|
1647
|
+
if (value !== undefined)
|
|
1648
|
+
reflectionMergePartial<CampaignsV2Request>(this, message, value);
|
|
1649
|
+
return message;
|
|
1650
|
+
}
|
|
1651
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CampaignsV2Request): CampaignsV2Request {
|
|
1652
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1653
|
+
while (reader.pos < end) {
|
|
1654
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1655
|
+
switch (fieldNo) {
|
|
1656
|
+
case /* string type */ 1:
|
|
1657
|
+
message.type = reader.string();
|
|
1658
|
+
break;
|
|
1659
|
+
case /* bool active */ 2:
|
|
1660
|
+
message.active = reader.bool();
|
|
1661
|
+
break;
|
|
1662
|
+
case /* sint32 limit */ 3:
|
|
1663
|
+
message.limit = reader.sint32();
|
|
1664
|
+
break;
|
|
1665
|
+
case /* string cursor */ 4:
|
|
1666
|
+
message.cursor = reader.string();
|
|
1667
|
+
break;
|
|
1668
|
+
case /* sint64 from_start_date */ 5:
|
|
1669
|
+
message.fromStartDate = reader.sint64().toBigInt();
|
|
1670
|
+
break;
|
|
1671
|
+
case /* sint64 to_start_date */ 6:
|
|
1672
|
+
message.toStartDate = reader.sint64().toBigInt();
|
|
1673
|
+
break;
|
|
1674
|
+
case /* sint64 from_end_date */ 7:
|
|
1675
|
+
message.fromEndDate = reader.sint64().toBigInt();
|
|
1676
|
+
break;
|
|
1677
|
+
case /* sint64 to_end_date */ 8:
|
|
1678
|
+
message.toEndDate = reader.sint64().toBigInt();
|
|
1679
|
+
break;
|
|
1680
|
+
case /* string status */ 9:
|
|
1681
|
+
message.status = reader.string();
|
|
1682
|
+
break;
|
|
1683
|
+
default:
|
|
1684
|
+
let u = options.readUnknownField;
|
|
1685
|
+
if (u === "throw")
|
|
1686
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1687
|
+
let d = reader.skip(wireType);
|
|
1688
|
+
if (u !== false)
|
|
1689
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
return message;
|
|
1693
|
+
}
|
|
1694
|
+
internalBinaryWrite(message: CampaignsV2Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1695
|
+
/* string type = 1; */
|
|
1696
|
+
if (message.type !== "")
|
|
1697
|
+
writer.tag(1, WireType.LengthDelimited).string(message.type);
|
|
1698
|
+
/* bool active = 2; */
|
|
1699
|
+
if (message.active !== false)
|
|
1700
|
+
writer.tag(2, WireType.Varint).bool(message.active);
|
|
1701
|
+
/* sint32 limit = 3; */
|
|
1702
|
+
if (message.limit !== 0)
|
|
1703
|
+
writer.tag(3, WireType.Varint).sint32(message.limit);
|
|
1704
|
+
/* string cursor = 4; */
|
|
1705
|
+
if (message.cursor !== "")
|
|
1706
|
+
writer.tag(4, WireType.LengthDelimited).string(message.cursor);
|
|
1707
|
+
/* sint64 from_start_date = 5; */
|
|
1708
|
+
if (message.fromStartDate !== 0n)
|
|
1709
|
+
writer.tag(5, WireType.Varint).sint64(message.fromStartDate);
|
|
1710
|
+
/* sint64 to_start_date = 6; */
|
|
1711
|
+
if (message.toStartDate !== 0n)
|
|
1712
|
+
writer.tag(6, WireType.Varint).sint64(message.toStartDate);
|
|
1713
|
+
/* sint64 from_end_date = 7; */
|
|
1714
|
+
if (message.fromEndDate !== 0n)
|
|
1715
|
+
writer.tag(7, WireType.Varint).sint64(message.fromEndDate);
|
|
1716
|
+
/* sint64 to_end_date = 8; */
|
|
1717
|
+
if (message.toEndDate !== 0n)
|
|
1718
|
+
writer.tag(8, WireType.Varint).sint64(message.toEndDate);
|
|
1719
|
+
/* string status = 9; */
|
|
1720
|
+
if (message.status !== "")
|
|
1721
|
+
writer.tag(9, WireType.LengthDelimited).string(message.status);
|
|
1722
|
+
let u = options.writeUnknownFields;
|
|
1723
|
+
if (u !== false)
|
|
1724
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1725
|
+
return writer;
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
/**
|
|
1729
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.CampaignsV2Request
|
|
1730
|
+
*/
|
|
1731
|
+
export const CampaignsV2Request = new CampaignsV2Request$Type();
|
|
1732
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1733
|
+
class CampaignsV2Response$Type extends MessageType<CampaignsV2Response> {
|
|
1734
|
+
constructor() {
|
|
1735
|
+
super("injective_campaign_rpc.CampaignsV2Response", [
|
|
1736
|
+
{ no: 1, name: "campaigns", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CampaignV2 },
|
|
1737
|
+
{ no: 2, name: "cursor", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1738
|
+
]);
|
|
1739
|
+
}
|
|
1740
|
+
create(value?: PartialMessage<CampaignsV2Response>): CampaignsV2Response {
|
|
1741
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1742
|
+
message.campaigns = [];
|
|
1743
|
+
message.cursor = "";
|
|
1744
|
+
if (value !== undefined)
|
|
1745
|
+
reflectionMergePartial<CampaignsV2Response>(this, message, value);
|
|
1746
|
+
return message;
|
|
1747
|
+
}
|
|
1748
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CampaignsV2Response): CampaignsV2Response {
|
|
1749
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1750
|
+
while (reader.pos < end) {
|
|
1751
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1752
|
+
switch (fieldNo) {
|
|
1753
|
+
case /* repeated injective_campaign_rpc.CampaignV2 campaigns */ 1:
|
|
1754
|
+
message.campaigns.push(CampaignV2.internalBinaryRead(reader, reader.uint32(), options));
|
|
1755
|
+
break;
|
|
1756
|
+
case /* string cursor */ 2:
|
|
1757
|
+
message.cursor = reader.string();
|
|
1758
|
+
break;
|
|
1759
|
+
default:
|
|
1760
|
+
let u = options.readUnknownField;
|
|
1761
|
+
if (u === "throw")
|
|
1762
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1763
|
+
let d = reader.skip(wireType);
|
|
1764
|
+
if (u !== false)
|
|
1765
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
return message;
|
|
1769
|
+
}
|
|
1770
|
+
internalBinaryWrite(message: CampaignsV2Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1771
|
+
/* repeated injective_campaign_rpc.CampaignV2 campaigns = 1; */
|
|
1772
|
+
for (let i = 0; i < message.campaigns.length; i++)
|
|
1773
|
+
CampaignV2.internalBinaryWrite(message.campaigns[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1774
|
+
/* string cursor = 2; */
|
|
1775
|
+
if (message.cursor !== "")
|
|
1776
|
+
writer.tag(2, WireType.LengthDelimited).string(message.cursor);
|
|
1777
|
+
let u = options.writeUnknownFields;
|
|
1778
|
+
if (u !== false)
|
|
1779
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1780
|
+
return writer;
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
/**
|
|
1784
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.CampaignsV2Response
|
|
1785
|
+
*/
|
|
1786
|
+
export const CampaignsV2Response = new CampaignsV2Response$Type();
|
|
1787
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1788
|
+
class CampaignV2$Type extends MessageType<CampaignV2> {
|
|
1789
|
+
constructor() {
|
|
1790
|
+
super("injective_campaign_rpc.CampaignV2", [
|
|
1791
|
+
{ no: 1, name: "campaign_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1792
|
+
{ no: 2, name: "market_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1793
|
+
{ no: 4, name: "total_score", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1794
|
+
{ no: 5, name: "created_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1795
|
+
{ no: 6, name: "updated_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1796
|
+
{ no: 7, name: "start_date", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1797
|
+
{ no: 8, name: "end_date", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
1798
|
+
{ no: 9, name: "is_claimable", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1799
|
+
{ no: 10, name: "round_id", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
1800
|
+
{ no: 11, name: "manager_contract", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1801
|
+
{ no: 12, name: "rewards", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Coin },
|
|
1802
|
+
{ no: 13, name: "subaccount_id_suffix", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1803
|
+
{ no: 14, name: "reward_contract", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1804
|
+
{ no: 15, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1805
|
+
{ no: 16, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1806
|
+
{ no: 17, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1807
|
+
{ no: 18, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1808
|
+
]);
|
|
1809
|
+
}
|
|
1810
|
+
create(value?: PartialMessage<CampaignV2>): CampaignV2 {
|
|
1811
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1812
|
+
message.campaignId = "";
|
|
1813
|
+
message.marketId = "";
|
|
1814
|
+
message.totalScore = "";
|
|
1815
|
+
message.createdAt = 0n;
|
|
1816
|
+
message.updatedAt = 0n;
|
|
1817
|
+
message.startDate = 0n;
|
|
1818
|
+
message.endDate = 0n;
|
|
1819
|
+
message.isClaimable = false;
|
|
1820
|
+
message.roundId = 0;
|
|
1821
|
+
message.managerContract = "";
|
|
1822
|
+
message.rewards = [];
|
|
1823
|
+
message.subaccountIdSuffix = "";
|
|
1824
|
+
message.rewardContract = "";
|
|
1825
|
+
message.type = "";
|
|
1826
|
+
message.version = "";
|
|
1827
|
+
message.name = "";
|
|
1828
|
+
message.description = "";
|
|
1829
|
+
if (value !== undefined)
|
|
1830
|
+
reflectionMergePartial<CampaignV2>(this, message, value);
|
|
1831
|
+
return message;
|
|
1832
|
+
}
|
|
1833
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CampaignV2): CampaignV2 {
|
|
1834
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1835
|
+
while (reader.pos < end) {
|
|
1836
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1837
|
+
switch (fieldNo) {
|
|
1838
|
+
case /* string campaign_id */ 1:
|
|
1839
|
+
message.campaignId = reader.string();
|
|
1840
|
+
break;
|
|
1841
|
+
case /* string market_id */ 2:
|
|
1842
|
+
message.marketId = reader.string();
|
|
1843
|
+
break;
|
|
1844
|
+
case /* string total_score */ 4:
|
|
1845
|
+
message.totalScore = reader.string();
|
|
1846
|
+
break;
|
|
1847
|
+
case /* sint64 created_at */ 5:
|
|
1848
|
+
message.createdAt = reader.sint64().toBigInt();
|
|
1849
|
+
break;
|
|
1850
|
+
case /* sint64 updated_at */ 6:
|
|
1851
|
+
message.updatedAt = reader.sint64().toBigInt();
|
|
1852
|
+
break;
|
|
1853
|
+
case /* sint64 start_date */ 7:
|
|
1854
|
+
message.startDate = reader.sint64().toBigInt();
|
|
1855
|
+
break;
|
|
1856
|
+
case /* sint64 end_date */ 8:
|
|
1857
|
+
message.endDate = reader.sint64().toBigInt();
|
|
1858
|
+
break;
|
|
1859
|
+
case /* bool is_claimable */ 9:
|
|
1860
|
+
message.isClaimable = reader.bool();
|
|
1861
|
+
break;
|
|
1862
|
+
case /* sint32 round_id */ 10:
|
|
1863
|
+
message.roundId = reader.sint32();
|
|
1864
|
+
break;
|
|
1865
|
+
case /* string manager_contract */ 11:
|
|
1866
|
+
message.managerContract = reader.string();
|
|
1867
|
+
break;
|
|
1868
|
+
case /* repeated injective_campaign_rpc.Coin rewards */ 12:
|
|
1869
|
+
message.rewards.push(Coin.internalBinaryRead(reader, reader.uint32(), options));
|
|
1870
|
+
break;
|
|
1871
|
+
case /* string subaccount_id_suffix */ 13:
|
|
1872
|
+
message.subaccountIdSuffix = reader.string();
|
|
1873
|
+
break;
|
|
1874
|
+
case /* string reward_contract */ 14:
|
|
1875
|
+
message.rewardContract = reader.string();
|
|
1876
|
+
break;
|
|
1877
|
+
case /* string type */ 15:
|
|
1878
|
+
message.type = reader.string();
|
|
1879
|
+
break;
|
|
1880
|
+
case /* string version */ 16:
|
|
1881
|
+
message.version = reader.string();
|
|
1882
|
+
break;
|
|
1883
|
+
case /* string name */ 17:
|
|
1884
|
+
message.name = reader.string();
|
|
1885
|
+
break;
|
|
1886
|
+
case /* string description */ 18:
|
|
1887
|
+
message.description = reader.string();
|
|
1888
|
+
break;
|
|
1889
|
+
default:
|
|
1890
|
+
let u = options.readUnknownField;
|
|
1891
|
+
if (u === "throw")
|
|
1892
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1893
|
+
let d = reader.skip(wireType);
|
|
1894
|
+
if (u !== false)
|
|
1895
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
return message;
|
|
1899
|
+
}
|
|
1900
|
+
internalBinaryWrite(message: CampaignV2, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1901
|
+
/* string campaign_id = 1; */
|
|
1902
|
+
if (message.campaignId !== "")
|
|
1903
|
+
writer.tag(1, WireType.LengthDelimited).string(message.campaignId);
|
|
1904
|
+
/* string market_id = 2; */
|
|
1905
|
+
if (message.marketId !== "")
|
|
1906
|
+
writer.tag(2, WireType.LengthDelimited).string(message.marketId);
|
|
1907
|
+
/* string total_score = 4; */
|
|
1908
|
+
if (message.totalScore !== "")
|
|
1909
|
+
writer.tag(4, WireType.LengthDelimited).string(message.totalScore);
|
|
1910
|
+
/* sint64 created_at = 5; */
|
|
1911
|
+
if (message.createdAt !== 0n)
|
|
1912
|
+
writer.tag(5, WireType.Varint).sint64(message.createdAt);
|
|
1913
|
+
/* sint64 updated_at = 6; */
|
|
1914
|
+
if (message.updatedAt !== 0n)
|
|
1915
|
+
writer.tag(6, WireType.Varint).sint64(message.updatedAt);
|
|
1916
|
+
/* sint64 start_date = 7; */
|
|
1917
|
+
if (message.startDate !== 0n)
|
|
1918
|
+
writer.tag(7, WireType.Varint).sint64(message.startDate);
|
|
1919
|
+
/* sint64 end_date = 8; */
|
|
1920
|
+
if (message.endDate !== 0n)
|
|
1921
|
+
writer.tag(8, WireType.Varint).sint64(message.endDate);
|
|
1922
|
+
/* bool is_claimable = 9; */
|
|
1923
|
+
if (message.isClaimable !== false)
|
|
1924
|
+
writer.tag(9, WireType.Varint).bool(message.isClaimable);
|
|
1925
|
+
/* sint32 round_id = 10; */
|
|
1926
|
+
if (message.roundId !== 0)
|
|
1927
|
+
writer.tag(10, WireType.Varint).sint32(message.roundId);
|
|
1928
|
+
/* string manager_contract = 11; */
|
|
1929
|
+
if (message.managerContract !== "")
|
|
1930
|
+
writer.tag(11, WireType.LengthDelimited).string(message.managerContract);
|
|
1931
|
+
/* repeated injective_campaign_rpc.Coin rewards = 12; */
|
|
1932
|
+
for (let i = 0; i < message.rewards.length; i++)
|
|
1933
|
+
Coin.internalBinaryWrite(message.rewards[i], writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
1934
|
+
/* string subaccount_id_suffix = 13; */
|
|
1935
|
+
if (message.subaccountIdSuffix !== "")
|
|
1936
|
+
writer.tag(13, WireType.LengthDelimited).string(message.subaccountIdSuffix);
|
|
1937
|
+
/* string reward_contract = 14; */
|
|
1938
|
+
if (message.rewardContract !== "")
|
|
1939
|
+
writer.tag(14, WireType.LengthDelimited).string(message.rewardContract);
|
|
1940
|
+
/* string type = 15; */
|
|
1941
|
+
if (message.type !== "")
|
|
1942
|
+
writer.tag(15, WireType.LengthDelimited).string(message.type);
|
|
1943
|
+
/* string version = 16; */
|
|
1944
|
+
if (message.version !== "")
|
|
1945
|
+
writer.tag(16, WireType.LengthDelimited).string(message.version);
|
|
1946
|
+
/* string name = 17; */
|
|
1947
|
+
if (message.name !== "")
|
|
1948
|
+
writer.tag(17, WireType.LengthDelimited).string(message.name);
|
|
1949
|
+
/* string description = 18; */
|
|
1950
|
+
if (message.description !== "")
|
|
1951
|
+
writer.tag(18, WireType.LengthDelimited).string(message.description);
|
|
1952
|
+
let u = options.writeUnknownFields;
|
|
1953
|
+
if (u !== false)
|
|
1954
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1955
|
+
return writer;
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
/**
|
|
1959
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.CampaignV2
|
|
1960
|
+
*/
|
|
1961
|
+
export const CampaignV2 = new CampaignV2$Type();
|
|
1962
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1963
|
+
class ListGuildsRequest$Type extends MessageType<ListGuildsRequest> {
|
|
1964
|
+
constructor() {
|
|
1965
|
+
super("injective_campaign_rpc.ListGuildsRequest", [
|
|
1966
|
+
{ no: 1, name: "campaign_contract", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1967
|
+
{ no: 2, name: "limit", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
1968
|
+
{ no: 3, name: "skip", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
1969
|
+
{ no: 4, name: "sort_by", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1970
|
+
]);
|
|
1971
|
+
}
|
|
1972
|
+
create(value?: PartialMessage<ListGuildsRequest>): ListGuildsRequest {
|
|
1973
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1974
|
+
message.campaignContract = "";
|
|
1975
|
+
message.limit = 0;
|
|
1976
|
+
message.skip = 0;
|
|
1977
|
+
message.sortBy = "";
|
|
1978
|
+
if (value !== undefined)
|
|
1979
|
+
reflectionMergePartial<ListGuildsRequest>(this, message, value);
|
|
1980
|
+
return message;
|
|
1981
|
+
}
|
|
1982
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListGuildsRequest): ListGuildsRequest {
|
|
1983
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1984
|
+
while (reader.pos < end) {
|
|
1985
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1986
|
+
switch (fieldNo) {
|
|
1987
|
+
case /* string campaign_contract */ 1:
|
|
1988
|
+
message.campaignContract = reader.string();
|
|
1989
|
+
break;
|
|
1990
|
+
case /* sint32 limit */ 2:
|
|
1991
|
+
message.limit = reader.sint32();
|
|
1992
|
+
break;
|
|
1993
|
+
case /* sint32 skip */ 3:
|
|
1994
|
+
message.skip = reader.sint32();
|
|
1995
|
+
break;
|
|
1996
|
+
case /* string sort_by */ 4:
|
|
1997
|
+
message.sortBy = reader.string();
|
|
1998
|
+
break;
|
|
1999
|
+
default:
|
|
2000
|
+
let u = options.readUnknownField;
|
|
2001
|
+
if (u === "throw")
|
|
2002
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
2003
|
+
let d = reader.skip(wireType);
|
|
2004
|
+
if (u !== false)
|
|
2005
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
return message;
|
|
2009
|
+
}
|
|
2010
|
+
internalBinaryWrite(message: ListGuildsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
2011
|
+
/* string campaign_contract = 1; */
|
|
2012
|
+
if (message.campaignContract !== "")
|
|
2013
|
+
writer.tag(1, WireType.LengthDelimited).string(message.campaignContract);
|
|
2014
|
+
/* sint32 limit = 2; */
|
|
2015
|
+
if (message.limit !== 0)
|
|
2016
|
+
writer.tag(2, WireType.Varint).sint32(message.limit);
|
|
2017
|
+
/* sint32 skip = 3; */
|
|
2018
|
+
if (message.skip !== 0)
|
|
2019
|
+
writer.tag(3, WireType.Varint).sint32(message.skip);
|
|
2020
|
+
/* string sort_by = 4; */
|
|
2021
|
+
if (message.sortBy !== "")
|
|
2022
|
+
writer.tag(4, WireType.LengthDelimited).string(message.sortBy);
|
|
2023
|
+
let u = options.writeUnknownFields;
|
|
2024
|
+
if (u !== false)
|
|
2025
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
2026
|
+
return writer;
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
/**
|
|
2030
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.ListGuildsRequest
|
|
2031
|
+
*/
|
|
2032
|
+
export const ListGuildsRequest = new ListGuildsRequest$Type();
|
|
2033
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
2034
|
+
class ListGuildsResponse$Type extends MessageType<ListGuildsResponse> {
|
|
2035
|
+
constructor() {
|
|
2036
|
+
super("injective_campaign_rpc.ListGuildsResponse", [
|
|
2037
|
+
{ no: 1, name: "guilds", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Guild },
|
|
2038
|
+
{ no: 2, name: "paging", kind: "message", T: () => Paging },
|
|
2039
|
+
{ no: 3, name: "updated_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
2040
|
+
{ no: 4, name: "campaign_summary", kind: "message", T: () => CampaignSummary }
|
|
2041
|
+
]);
|
|
2042
|
+
}
|
|
2043
|
+
create(value?: PartialMessage<ListGuildsResponse>): ListGuildsResponse {
|
|
2044
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
2045
|
+
message.guilds = [];
|
|
2046
|
+
message.updatedAt = 0n;
|
|
2047
|
+
if (value !== undefined)
|
|
2048
|
+
reflectionMergePartial<ListGuildsResponse>(this, message, value);
|
|
2049
|
+
return message;
|
|
2050
|
+
}
|
|
2051
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListGuildsResponse): ListGuildsResponse {
|
|
2052
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
2053
|
+
while (reader.pos < end) {
|
|
2054
|
+
let [fieldNo, wireType] = reader.tag();
|
|
2055
|
+
switch (fieldNo) {
|
|
2056
|
+
case /* repeated injective_campaign_rpc.Guild guilds */ 1:
|
|
2057
|
+
message.guilds.push(Guild.internalBinaryRead(reader, reader.uint32(), options));
|
|
2058
|
+
break;
|
|
2059
|
+
case /* injective_campaign_rpc.Paging paging */ 2:
|
|
2060
|
+
message.paging = Paging.internalBinaryRead(reader, reader.uint32(), options, message.paging);
|
|
2061
|
+
break;
|
|
2062
|
+
case /* sint64 updated_at */ 3:
|
|
2063
|
+
message.updatedAt = reader.sint64().toBigInt();
|
|
2064
|
+
break;
|
|
2065
|
+
case /* injective_campaign_rpc.CampaignSummary campaign_summary */ 4:
|
|
2066
|
+
message.campaignSummary = CampaignSummary.internalBinaryRead(reader, reader.uint32(), options, message.campaignSummary);
|
|
2067
|
+
break;
|
|
2068
|
+
default:
|
|
2069
|
+
let u = options.readUnknownField;
|
|
2070
|
+
if (u === "throw")
|
|
2071
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
2072
|
+
let d = reader.skip(wireType);
|
|
2073
|
+
if (u !== false)
|
|
2074
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
return message;
|
|
2078
|
+
}
|
|
2079
|
+
internalBinaryWrite(message: ListGuildsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
2080
|
+
/* repeated injective_campaign_rpc.Guild guilds = 1; */
|
|
2081
|
+
for (let i = 0; i < message.guilds.length; i++)
|
|
2082
|
+
Guild.internalBinaryWrite(message.guilds[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
2083
|
+
/* injective_campaign_rpc.Paging paging = 2; */
|
|
2084
|
+
if (message.paging)
|
|
2085
|
+
Paging.internalBinaryWrite(message.paging, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
2086
|
+
/* sint64 updated_at = 3; */
|
|
2087
|
+
if (message.updatedAt !== 0n)
|
|
2088
|
+
writer.tag(3, WireType.Varint).sint64(message.updatedAt);
|
|
2089
|
+
/* injective_campaign_rpc.CampaignSummary campaign_summary = 4; */
|
|
2090
|
+
if (message.campaignSummary)
|
|
2091
|
+
CampaignSummary.internalBinaryWrite(message.campaignSummary, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
2092
|
+
let u = options.writeUnknownFields;
|
|
2093
|
+
if (u !== false)
|
|
2094
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
2095
|
+
return writer;
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
/**
|
|
2099
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.ListGuildsResponse
|
|
2100
|
+
*/
|
|
2101
|
+
export const ListGuildsResponse = new ListGuildsResponse$Type();
|
|
2102
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
2103
|
+
class Guild$Type extends MessageType<Guild> {
|
|
2104
|
+
constructor() {
|
|
2105
|
+
super("injective_campaign_rpc.Guild", [
|
|
2106
|
+
{ no: 1, name: "campaign_contract", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2107
|
+
{ no: 2, name: "guild_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2108
|
+
{ no: 3, name: "master_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2109
|
+
{ no: 4, name: "created_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
2110
|
+
{ no: 5, name: "tvl_score", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2111
|
+
{ no: 6, name: "volume_score", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2112
|
+
{ no: 7, name: "rank_by_volume", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
2113
|
+
{ no: 8, name: "rank_by_tvl", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
2114
|
+
{ no: 9, name: "logo", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2115
|
+
{ no: 10, name: "total_tvl", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2116
|
+
{ no: 11, name: "updated_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
2117
|
+
{ no: 14, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2118
|
+
{ no: 13, name: "is_active", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
2119
|
+
{ no: 15, name: "master_balance", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2120
|
+
{ no: 16, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
2121
|
+
]);
|
|
2122
|
+
}
|
|
2123
|
+
create(value?: PartialMessage<Guild>): Guild {
|
|
2124
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
2125
|
+
message.campaignContract = "";
|
|
2126
|
+
message.guildId = "";
|
|
2127
|
+
message.masterAddress = "";
|
|
2128
|
+
message.createdAt = 0n;
|
|
2129
|
+
message.tvlScore = "";
|
|
2130
|
+
message.volumeScore = "";
|
|
2131
|
+
message.rankByVolume = 0;
|
|
2132
|
+
message.rankByTvl = 0;
|
|
2133
|
+
message.logo = "";
|
|
2134
|
+
message.totalTvl = "";
|
|
2135
|
+
message.updatedAt = 0n;
|
|
2136
|
+
message.name = "";
|
|
2137
|
+
message.isActive = false;
|
|
2138
|
+
message.masterBalance = "";
|
|
2139
|
+
message.description = "";
|
|
2140
|
+
if (value !== undefined)
|
|
2141
|
+
reflectionMergePartial<Guild>(this, message, value);
|
|
2142
|
+
return message;
|
|
2143
|
+
}
|
|
2144
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Guild): Guild {
|
|
2145
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
2146
|
+
while (reader.pos < end) {
|
|
2147
|
+
let [fieldNo, wireType] = reader.tag();
|
|
2148
|
+
switch (fieldNo) {
|
|
2149
|
+
case /* string campaign_contract */ 1:
|
|
2150
|
+
message.campaignContract = reader.string();
|
|
2151
|
+
break;
|
|
2152
|
+
case /* string guild_id */ 2:
|
|
2153
|
+
message.guildId = reader.string();
|
|
2154
|
+
break;
|
|
2155
|
+
case /* string master_address */ 3:
|
|
2156
|
+
message.masterAddress = reader.string();
|
|
2157
|
+
break;
|
|
2158
|
+
case /* sint64 created_at */ 4:
|
|
2159
|
+
message.createdAt = reader.sint64().toBigInt();
|
|
2160
|
+
break;
|
|
2161
|
+
case /* string tvl_score */ 5:
|
|
2162
|
+
message.tvlScore = reader.string();
|
|
2163
|
+
break;
|
|
2164
|
+
case /* string volume_score */ 6:
|
|
2165
|
+
message.volumeScore = reader.string();
|
|
2166
|
+
break;
|
|
2167
|
+
case /* sint32 rank_by_volume */ 7:
|
|
2168
|
+
message.rankByVolume = reader.sint32();
|
|
2169
|
+
break;
|
|
2170
|
+
case /* sint32 rank_by_tvl */ 8:
|
|
2171
|
+
message.rankByTvl = reader.sint32();
|
|
2172
|
+
break;
|
|
2173
|
+
case /* string logo */ 9:
|
|
2174
|
+
message.logo = reader.string();
|
|
2175
|
+
break;
|
|
2176
|
+
case /* string total_tvl */ 10:
|
|
2177
|
+
message.totalTvl = reader.string();
|
|
2178
|
+
break;
|
|
2179
|
+
case /* sint64 updated_at */ 11:
|
|
2180
|
+
message.updatedAt = reader.sint64().toBigInt();
|
|
2181
|
+
break;
|
|
2182
|
+
case /* string name */ 14:
|
|
2183
|
+
message.name = reader.string();
|
|
2184
|
+
break;
|
|
2185
|
+
case /* bool is_active */ 13:
|
|
2186
|
+
message.isActive = reader.bool();
|
|
2187
|
+
break;
|
|
2188
|
+
case /* string master_balance */ 15:
|
|
2189
|
+
message.masterBalance = reader.string();
|
|
2190
|
+
break;
|
|
2191
|
+
case /* string description */ 16:
|
|
2192
|
+
message.description = reader.string();
|
|
2193
|
+
break;
|
|
2194
|
+
default:
|
|
2195
|
+
let u = options.readUnknownField;
|
|
2196
|
+
if (u === "throw")
|
|
2197
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
2198
|
+
let d = reader.skip(wireType);
|
|
2199
|
+
if (u !== false)
|
|
2200
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
return message;
|
|
2204
|
+
}
|
|
2205
|
+
internalBinaryWrite(message: Guild, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
2206
|
+
/* string campaign_contract = 1; */
|
|
2207
|
+
if (message.campaignContract !== "")
|
|
2208
|
+
writer.tag(1, WireType.LengthDelimited).string(message.campaignContract);
|
|
2209
|
+
/* string guild_id = 2; */
|
|
2210
|
+
if (message.guildId !== "")
|
|
2211
|
+
writer.tag(2, WireType.LengthDelimited).string(message.guildId);
|
|
2212
|
+
/* string master_address = 3; */
|
|
2213
|
+
if (message.masterAddress !== "")
|
|
2214
|
+
writer.tag(3, WireType.LengthDelimited).string(message.masterAddress);
|
|
2215
|
+
/* sint64 created_at = 4; */
|
|
2216
|
+
if (message.createdAt !== 0n)
|
|
2217
|
+
writer.tag(4, WireType.Varint).sint64(message.createdAt);
|
|
2218
|
+
/* string tvl_score = 5; */
|
|
2219
|
+
if (message.tvlScore !== "")
|
|
2220
|
+
writer.tag(5, WireType.LengthDelimited).string(message.tvlScore);
|
|
2221
|
+
/* string volume_score = 6; */
|
|
2222
|
+
if (message.volumeScore !== "")
|
|
2223
|
+
writer.tag(6, WireType.LengthDelimited).string(message.volumeScore);
|
|
2224
|
+
/* sint32 rank_by_volume = 7; */
|
|
2225
|
+
if (message.rankByVolume !== 0)
|
|
2226
|
+
writer.tag(7, WireType.Varint).sint32(message.rankByVolume);
|
|
2227
|
+
/* sint32 rank_by_tvl = 8; */
|
|
2228
|
+
if (message.rankByTvl !== 0)
|
|
2229
|
+
writer.tag(8, WireType.Varint).sint32(message.rankByTvl);
|
|
2230
|
+
/* string logo = 9; */
|
|
2231
|
+
if (message.logo !== "")
|
|
2232
|
+
writer.tag(9, WireType.LengthDelimited).string(message.logo);
|
|
2233
|
+
/* string total_tvl = 10; */
|
|
2234
|
+
if (message.totalTvl !== "")
|
|
2235
|
+
writer.tag(10, WireType.LengthDelimited).string(message.totalTvl);
|
|
2236
|
+
/* sint64 updated_at = 11; */
|
|
2237
|
+
if (message.updatedAt !== 0n)
|
|
2238
|
+
writer.tag(11, WireType.Varint).sint64(message.updatedAt);
|
|
2239
|
+
/* bool is_active = 13; */
|
|
2240
|
+
if (message.isActive !== false)
|
|
2241
|
+
writer.tag(13, WireType.Varint).bool(message.isActive);
|
|
2242
|
+
/* string name = 14; */
|
|
2243
|
+
if (message.name !== "")
|
|
2244
|
+
writer.tag(14, WireType.LengthDelimited).string(message.name);
|
|
2245
|
+
/* string master_balance = 15; */
|
|
2246
|
+
if (message.masterBalance !== "")
|
|
2247
|
+
writer.tag(15, WireType.LengthDelimited).string(message.masterBalance);
|
|
2248
|
+
/* string description = 16; */
|
|
2249
|
+
if (message.description !== "")
|
|
2250
|
+
writer.tag(16, WireType.LengthDelimited).string(message.description);
|
|
2251
|
+
let u = options.writeUnknownFields;
|
|
2252
|
+
if (u !== false)
|
|
2253
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
2254
|
+
return writer;
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
/**
|
|
2258
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.Guild
|
|
2259
|
+
*/
|
|
2260
|
+
export const Guild = new Guild$Type();
|
|
2261
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
2262
|
+
class CampaignSummary$Type extends MessageType<CampaignSummary> {
|
|
2263
|
+
constructor() {
|
|
2264
|
+
super("injective_campaign_rpc.CampaignSummary", [
|
|
2265
|
+
{ no: 1, name: "campaign_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2266
|
+
{ no: 2, name: "campaign_contract", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2267
|
+
{ no: 3, name: "total_guilds_count", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
2268
|
+
{ no: 4, name: "total_tvl", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2269
|
+
{ no: 5, name: "total_average_tvl", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2270
|
+
{ no: 6, name: "total_volume", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2271
|
+
{ no: 7, name: "updated_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
2272
|
+
{ no: 8, name: "total_members_count", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
2273
|
+
{ no: 9, name: "start_time", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
2274
|
+
{ no: 10, name: "end_time", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }
|
|
2275
|
+
]);
|
|
2276
|
+
}
|
|
2277
|
+
create(value?: PartialMessage<CampaignSummary>): CampaignSummary {
|
|
2278
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
2279
|
+
message.campaignId = "";
|
|
2280
|
+
message.campaignContract = "";
|
|
2281
|
+
message.totalGuildsCount = 0;
|
|
2282
|
+
message.totalTvl = "";
|
|
2283
|
+
message.totalAverageTvl = "";
|
|
2284
|
+
message.totalVolume = "";
|
|
2285
|
+
message.updatedAt = 0n;
|
|
2286
|
+
message.totalMembersCount = 0;
|
|
2287
|
+
message.startTime = 0n;
|
|
2288
|
+
message.endTime = 0n;
|
|
2289
|
+
if (value !== undefined)
|
|
2290
|
+
reflectionMergePartial<CampaignSummary>(this, message, value);
|
|
2291
|
+
return message;
|
|
2292
|
+
}
|
|
2293
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CampaignSummary): CampaignSummary {
|
|
2294
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
2295
|
+
while (reader.pos < end) {
|
|
2296
|
+
let [fieldNo, wireType] = reader.tag();
|
|
2297
|
+
switch (fieldNo) {
|
|
2298
|
+
case /* string campaign_id */ 1:
|
|
2299
|
+
message.campaignId = reader.string();
|
|
2300
|
+
break;
|
|
2301
|
+
case /* string campaign_contract */ 2:
|
|
2302
|
+
message.campaignContract = reader.string();
|
|
2303
|
+
break;
|
|
2304
|
+
case /* sint32 total_guilds_count */ 3:
|
|
2305
|
+
message.totalGuildsCount = reader.sint32();
|
|
2306
|
+
break;
|
|
2307
|
+
case /* string total_tvl */ 4:
|
|
2308
|
+
message.totalTvl = reader.string();
|
|
2309
|
+
break;
|
|
2310
|
+
case /* string total_average_tvl */ 5:
|
|
2311
|
+
message.totalAverageTvl = reader.string();
|
|
2312
|
+
break;
|
|
2313
|
+
case /* string total_volume */ 6:
|
|
2314
|
+
message.totalVolume = reader.string();
|
|
2315
|
+
break;
|
|
2316
|
+
case /* sint64 updated_at */ 7:
|
|
2317
|
+
message.updatedAt = reader.sint64().toBigInt();
|
|
2318
|
+
break;
|
|
2319
|
+
case /* sint32 total_members_count */ 8:
|
|
2320
|
+
message.totalMembersCount = reader.sint32();
|
|
2321
|
+
break;
|
|
2322
|
+
case /* sint64 start_time */ 9:
|
|
2323
|
+
message.startTime = reader.sint64().toBigInt();
|
|
2324
|
+
break;
|
|
2325
|
+
case /* sint64 end_time */ 10:
|
|
2326
|
+
message.endTime = reader.sint64().toBigInt();
|
|
2327
|
+
break;
|
|
2328
|
+
default:
|
|
2329
|
+
let u = options.readUnknownField;
|
|
2330
|
+
if (u === "throw")
|
|
2331
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
2332
|
+
let d = reader.skip(wireType);
|
|
2333
|
+
if (u !== false)
|
|
2334
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
return message;
|
|
2338
|
+
}
|
|
2339
|
+
internalBinaryWrite(message: CampaignSummary, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
2340
|
+
/* string campaign_id = 1; */
|
|
2341
|
+
if (message.campaignId !== "")
|
|
2342
|
+
writer.tag(1, WireType.LengthDelimited).string(message.campaignId);
|
|
2343
|
+
/* string campaign_contract = 2; */
|
|
2344
|
+
if (message.campaignContract !== "")
|
|
2345
|
+
writer.tag(2, WireType.LengthDelimited).string(message.campaignContract);
|
|
2346
|
+
/* sint32 total_guilds_count = 3; */
|
|
2347
|
+
if (message.totalGuildsCount !== 0)
|
|
2348
|
+
writer.tag(3, WireType.Varint).sint32(message.totalGuildsCount);
|
|
2349
|
+
/* string total_tvl = 4; */
|
|
2350
|
+
if (message.totalTvl !== "")
|
|
2351
|
+
writer.tag(4, WireType.LengthDelimited).string(message.totalTvl);
|
|
2352
|
+
/* string total_average_tvl = 5; */
|
|
2353
|
+
if (message.totalAverageTvl !== "")
|
|
2354
|
+
writer.tag(5, WireType.LengthDelimited).string(message.totalAverageTvl);
|
|
2355
|
+
/* string total_volume = 6; */
|
|
2356
|
+
if (message.totalVolume !== "")
|
|
2357
|
+
writer.tag(6, WireType.LengthDelimited).string(message.totalVolume);
|
|
2358
|
+
/* sint64 updated_at = 7; */
|
|
2359
|
+
if (message.updatedAt !== 0n)
|
|
2360
|
+
writer.tag(7, WireType.Varint).sint64(message.updatedAt);
|
|
2361
|
+
/* sint32 total_members_count = 8; */
|
|
2362
|
+
if (message.totalMembersCount !== 0)
|
|
2363
|
+
writer.tag(8, WireType.Varint).sint32(message.totalMembersCount);
|
|
2364
|
+
/* sint64 start_time = 9; */
|
|
2365
|
+
if (message.startTime !== 0n)
|
|
2366
|
+
writer.tag(9, WireType.Varint).sint64(message.startTime);
|
|
2367
|
+
/* sint64 end_time = 10; */
|
|
2368
|
+
if (message.endTime !== 0n)
|
|
2369
|
+
writer.tag(10, WireType.Varint).sint64(message.endTime);
|
|
2370
|
+
let u = options.writeUnknownFields;
|
|
2371
|
+
if (u !== false)
|
|
2372
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
2373
|
+
return writer;
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
/**
|
|
2377
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.CampaignSummary
|
|
2378
|
+
*/
|
|
2379
|
+
export const CampaignSummary = new CampaignSummary$Type();
|
|
2380
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
2381
|
+
class ListGuildMembersRequest$Type extends MessageType<ListGuildMembersRequest> {
|
|
2382
|
+
constructor() {
|
|
2383
|
+
super("injective_campaign_rpc.ListGuildMembersRequest", [
|
|
2384
|
+
{ no: 1, name: "campaign_contract", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2385
|
+
{ no: 2, name: "guild_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2386
|
+
{ no: 3, name: "limit", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
2387
|
+
{ no: 4, name: "skip", kind: "scalar", T: 17 /*ScalarType.SINT32*/ },
|
|
2388
|
+
{ no: 5, name: "include_guild_info", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
2389
|
+
{ no: 6, name: "sort_by", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
2390
|
+
]);
|
|
2391
|
+
}
|
|
2392
|
+
create(value?: PartialMessage<ListGuildMembersRequest>): ListGuildMembersRequest {
|
|
2393
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
2394
|
+
message.campaignContract = "";
|
|
2395
|
+
message.guildId = "";
|
|
2396
|
+
message.limit = 0;
|
|
2397
|
+
message.skip = 0;
|
|
2398
|
+
message.includeGuildInfo = false;
|
|
2399
|
+
message.sortBy = "";
|
|
2400
|
+
if (value !== undefined)
|
|
2401
|
+
reflectionMergePartial<ListGuildMembersRequest>(this, message, value);
|
|
2402
|
+
return message;
|
|
2403
|
+
}
|
|
2404
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListGuildMembersRequest): ListGuildMembersRequest {
|
|
2405
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
2406
|
+
while (reader.pos < end) {
|
|
2407
|
+
let [fieldNo, wireType] = reader.tag();
|
|
2408
|
+
switch (fieldNo) {
|
|
2409
|
+
case /* string campaign_contract */ 1:
|
|
2410
|
+
message.campaignContract = reader.string();
|
|
2411
|
+
break;
|
|
2412
|
+
case /* string guild_id */ 2:
|
|
2413
|
+
message.guildId = reader.string();
|
|
2414
|
+
break;
|
|
2415
|
+
case /* sint32 limit */ 3:
|
|
2416
|
+
message.limit = reader.sint32();
|
|
2417
|
+
break;
|
|
2418
|
+
case /* sint32 skip */ 4:
|
|
2419
|
+
message.skip = reader.sint32();
|
|
2420
|
+
break;
|
|
2421
|
+
case /* bool include_guild_info */ 5:
|
|
2422
|
+
message.includeGuildInfo = reader.bool();
|
|
2423
|
+
break;
|
|
2424
|
+
case /* string sort_by */ 6:
|
|
2425
|
+
message.sortBy = reader.string();
|
|
2426
|
+
break;
|
|
2427
|
+
default:
|
|
2428
|
+
let u = options.readUnknownField;
|
|
2429
|
+
if (u === "throw")
|
|
2430
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
2431
|
+
let d = reader.skip(wireType);
|
|
2432
|
+
if (u !== false)
|
|
2433
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
return message;
|
|
2437
|
+
}
|
|
2438
|
+
internalBinaryWrite(message: ListGuildMembersRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
2439
|
+
/* string campaign_contract = 1; */
|
|
2440
|
+
if (message.campaignContract !== "")
|
|
2441
|
+
writer.tag(1, WireType.LengthDelimited).string(message.campaignContract);
|
|
2442
|
+
/* string guild_id = 2; */
|
|
2443
|
+
if (message.guildId !== "")
|
|
2444
|
+
writer.tag(2, WireType.LengthDelimited).string(message.guildId);
|
|
2445
|
+
/* sint32 limit = 3; */
|
|
2446
|
+
if (message.limit !== 0)
|
|
2447
|
+
writer.tag(3, WireType.Varint).sint32(message.limit);
|
|
2448
|
+
/* sint32 skip = 4; */
|
|
2449
|
+
if (message.skip !== 0)
|
|
2450
|
+
writer.tag(4, WireType.Varint).sint32(message.skip);
|
|
2451
|
+
/* bool include_guild_info = 5; */
|
|
2452
|
+
if (message.includeGuildInfo !== false)
|
|
2453
|
+
writer.tag(5, WireType.Varint).bool(message.includeGuildInfo);
|
|
2454
|
+
/* string sort_by = 6; */
|
|
2455
|
+
if (message.sortBy !== "")
|
|
2456
|
+
writer.tag(6, WireType.LengthDelimited).string(message.sortBy);
|
|
2457
|
+
let u = options.writeUnknownFields;
|
|
2458
|
+
if (u !== false)
|
|
2459
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
2460
|
+
return writer;
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
/**
|
|
2464
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.ListGuildMembersRequest
|
|
2465
|
+
*/
|
|
2466
|
+
export const ListGuildMembersRequest = new ListGuildMembersRequest$Type();
|
|
2467
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
2468
|
+
class ListGuildMembersResponse$Type extends MessageType<ListGuildMembersResponse> {
|
|
2469
|
+
constructor() {
|
|
2470
|
+
super("injective_campaign_rpc.ListGuildMembersResponse", [
|
|
2471
|
+
{ no: 1, name: "members", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => GuildMember },
|
|
2472
|
+
{ no: 2, name: "paging", kind: "message", T: () => Paging },
|
|
2473
|
+
{ no: 3, name: "guild_info", kind: "message", T: () => Guild }
|
|
2474
|
+
]);
|
|
2475
|
+
}
|
|
2476
|
+
create(value?: PartialMessage<ListGuildMembersResponse>): ListGuildMembersResponse {
|
|
2477
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
2478
|
+
message.members = [];
|
|
2479
|
+
if (value !== undefined)
|
|
2480
|
+
reflectionMergePartial<ListGuildMembersResponse>(this, message, value);
|
|
2481
|
+
return message;
|
|
2482
|
+
}
|
|
2483
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListGuildMembersResponse): ListGuildMembersResponse {
|
|
2484
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
2485
|
+
while (reader.pos < end) {
|
|
2486
|
+
let [fieldNo, wireType] = reader.tag();
|
|
2487
|
+
switch (fieldNo) {
|
|
2488
|
+
case /* repeated injective_campaign_rpc.GuildMember members */ 1:
|
|
2489
|
+
message.members.push(GuildMember.internalBinaryRead(reader, reader.uint32(), options));
|
|
2490
|
+
break;
|
|
2491
|
+
case /* injective_campaign_rpc.Paging paging */ 2:
|
|
2492
|
+
message.paging = Paging.internalBinaryRead(reader, reader.uint32(), options, message.paging);
|
|
2493
|
+
break;
|
|
2494
|
+
case /* injective_campaign_rpc.Guild guild_info */ 3:
|
|
2495
|
+
message.guildInfo = Guild.internalBinaryRead(reader, reader.uint32(), options, message.guildInfo);
|
|
2496
|
+
break;
|
|
2497
|
+
default:
|
|
2498
|
+
let u = options.readUnknownField;
|
|
2499
|
+
if (u === "throw")
|
|
2500
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
2501
|
+
let d = reader.skip(wireType);
|
|
2502
|
+
if (u !== false)
|
|
2503
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
return message;
|
|
2507
|
+
}
|
|
2508
|
+
internalBinaryWrite(message: ListGuildMembersResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
2509
|
+
/* repeated injective_campaign_rpc.GuildMember members = 1; */
|
|
2510
|
+
for (let i = 0; i < message.members.length; i++)
|
|
2511
|
+
GuildMember.internalBinaryWrite(message.members[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
2512
|
+
/* injective_campaign_rpc.Paging paging = 2; */
|
|
2513
|
+
if (message.paging)
|
|
2514
|
+
Paging.internalBinaryWrite(message.paging, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
2515
|
+
/* injective_campaign_rpc.Guild guild_info = 3; */
|
|
2516
|
+
if (message.guildInfo)
|
|
2517
|
+
Guild.internalBinaryWrite(message.guildInfo, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
2518
|
+
let u = options.writeUnknownFields;
|
|
2519
|
+
if (u !== false)
|
|
2520
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
2521
|
+
return writer;
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
/**
|
|
2525
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.ListGuildMembersResponse
|
|
2526
|
+
*/
|
|
2527
|
+
export const ListGuildMembersResponse = new ListGuildMembersResponse$Type();
|
|
2528
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
2529
|
+
class GuildMember$Type extends MessageType<GuildMember> {
|
|
2530
|
+
constructor() {
|
|
2531
|
+
super("injective_campaign_rpc.GuildMember", [
|
|
2532
|
+
{ no: 1, name: "campaign_contract", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2533
|
+
{ no: 2, name: "guild_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2534
|
+
{ no: 3, name: "address", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2535
|
+
{ no: 4, name: "joined_at", kind: "scalar", T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
2536
|
+
{ no: 5, name: "tvl_score", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2537
|
+
{ no: 6, name: "volume_score", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2538
|
+
{ no: 7, name: "total_tvl", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2539
|
+
{ no: 8, name: "volume_score_percentage", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ },
|
|
2540
|
+
{ no: 9, name: "tvl_score_percentage", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ },
|
|
2541
|
+
{ no: 10, name: "tvl_reward", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Coin },
|
|
2542
|
+
{ no: 11, name: "volume_reward", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Coin }
|
|
2543
|
+
]);
|
|
2544
|
+
}
|
|
2545
|
+
create(value?: PartialMessage<GuildMember>): GuildMember {
|
|
2546
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
2547
|
+
message.campaignContract = "";
|
|
2548
|
+
message.guildId = "";
|
|
2549
|
+
message.address = "";
|
|
2550
|
+
message.joinedAt = 0n;
|
|
2551
|
+
message.tvlScore = "";
|
|
2552
|
+
message.volumeScore = "";
|
|
2553
|
+
message.totalTvl = "";
|
|
2554
|
+
message.volumeScorePercentage = 0;
|
|
2555
|
+
message.tvlScorePercentage = 0;
|
|
2556
|
+
message.tvlReward = [];
|
|
2557
|
+
message.volumeReward = [];
|
|
2558
|
+
if (value !== undefined)
|
|
2559
|
+
reflectionMergePartial<GuildMember>(this, message, value);
|
|
2560
|
+
return message;
|
|
2561
|
+
}
|
|
2562
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GuildMember): GuildMember {
|
|
2563
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
2564
|
+
while (reader.pos < end) {
|
|
2565
|
+
let [fieldNo, wireType] = reader.tag();
|
|
2566
|
+
switch (fieldNo) {
|
|
2567
|
+
case /* string campaign_contract */ 1:
|
|
2568
|
+
message.campaignContract = reader.string();
|
|
2569
|
+
break;
|
|
2570
|
+
case /* string guild_id */ 2:
|
|
2571
|
+
message.guildId = reader.string();
|
|
2572
|
+
break;
|
|
2573
|
+
case /* string address */ 3:
|
|
2574
|
+
message.address = reader.string();
|
|
2575
|
+
break;
|
|
2576
|
+
case /* sint64 joined_at */ 4:
|
|
2577
|
+
message.joinedAt = reader.sint64().toBigInt();
|
|
2578
|
+
break;
|
|
2579
|
+
case /* string tvl_score */ 5:
|
|
2580
|
+
message.tvlScore = reader.string();
|
|
2581
|
+
break;
|
|
2582
|
+
case /* string volume_score */ 6:
|
|
2583
|
+
message.volumeScore = reader.string();
|
|
2584
|
+
break;
|
|
2585
|
+
case /* string total_tvl */ 7:
|
|
2586
|
+
message.totalTvl = reader.string();
|
|
2587
|
+
break;
|
|
2588
|
+
case /* double volume_score_percentage */ 8:
|
|
2589
|
+
message.volumeScorePercentage = reader.double();
|
|
2590
|
+
break;
|
|
2591
|
+
case /* double tvl_score_percentage */ 9:
|
|
2592
|
+
message.tvlScorePercentage = reader.double();
|
|
2593
|
+
break;
|
|
2594
|
+
case /* repeated injective_campaign_rpc.Coin tvl_reward */ 10:
|
|
2595
|
+
message.tvlReward.push(Coin.internalBinaryRead(reader, reader.uint32(), options));
|
|
2596
|
+
break;
|
|
2597
|
+
case /* repeated injective_campaign_rpc.Coin volume_reward */ 11:
|
|
2598
|
+
message.volumeReward.push(Coin.internalBinaryRead(reader, reader.uint32(), options));
|
|
2599
|
+
break;
|
|
2600
|
+
default:
|
|
2601
|
+
let u = options.readUnknownField;
|
|
2602
|
+
if (u === "throw")
|
|
2603
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
2604
|
+
let d = reader.skip(wireType);
|
|
2605
|
+
if (u !== false)
|
|
2606
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2609
|
+
return message;
|
|
2610
|
+
}
|
|
2611
|
+
internalBinaryWrite(message: GuildMember, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
2612
|
+
/* string campaign_contract = 1; */
|
|
2613
|
+
if (message.campaignContract !== "")
|
|
2614
|
+
writer.tag(1, WireType.LengthDelimited).string(message.campaignContract);
|
|
2615
|
+
/* string guild_id = 2; */
|
|
2616
|
+
if (message.guildId !== "")
|
|
2617
|
+
writer.tag(2, WireType.LengthDelimited).string(message.guildId);
|
|
2618
|
+
/* string address = 3; */
|
|
2619
|
+
if (message.address !== "")
|
|
2620
|
+
writer.tag(3, WireType.LengthDelimited).string(message.address);
|
|
2621
|
+
/* sint64 joined_at = 4; */
|
|
2622
|
+
if (message.joinedAt !== 0n)
|
|
2623
|
+
writer.tag(4, WireType.Varint).sint64(message.joinedAt);
|
|
2624
|
+
/* string tvl_score = 5; */
|
|
2625
|
+
if (message.tvlScore !== "")
|
|
2626
|
+
writer.tag(5, WireType.LengthDelimited).string(message.tvlScore);
|
|
2627
|
+
/* string volume_score = 6; */
|
|
2628
|
+
if (message.volumeScore !== "")
|
|
2629
|
+
writer.tag(6, WireType.LengthDelimited).string(message.volumeScore);
|
|
2630
|
+
/* string total_tvl = 7; */
|
|
2631
|
+
if (message.totalTvl !== "")
|
|
2632
|
+
writer.tag(7, WireType.LengthDelimited).string(message.totalTvl);
|
|
2633
|
+
/* double volume_score_percentage = 8; */
|
|
2634
|
+
if (message.volumeScorePercentage !== 0)
|
|
2635
|
+
writer.tag(8, WireType.Bit64).double(message.volumeScorePercentage);
|
|
2636
|
+
/* double tvl_score_percentage = 9; */
|
|
2637
|
+
if (message.tvlScorePercentage !== 0)
|
|
2638
|
+
writer.tag(9, WireType.Bit64).double(message.tvlScorePercentage);
|
|
2639
|
+
/* repeated injective_campaign_rpc.Coin tvl_reward = 10; */
|
|
2640
|
+
for (let i = 0; i < message.tvlReward.length; i++)
|
|
2641
|
+
Coin.internalBinaryWrite(message.tvlReward[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
2642
|
+
/* repeated injective_campaign_rpc.Coin volume_reward = 11; */
|
|
2643
|
+
for (let i = 0; i < message.volumeReward.length; i++)
|
|
2644
|
+
Coin.internalBinaryWrite(message.volumeReward[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
2645
|
+
let u = options.writeUnknownFields;
|
|
2646
|
+
if (u !== false)
|
|
2647
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
2648
|
+
return writer;
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
/**
|
|
2652
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.GuildMember
|
|
2653
|
+
*/
|
|
2654
|
+
export const GuildMember = new GuildMember$Type();
|
|
2655
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
2656
|
+
class GetGuildMemberRequest$Type extends MessageType<GetGuildMemberRequest> {
|
|
2657
|
+
constructor() {
|
|
2658
|
+
super("injective_campaign_rpc.GetGuildMemberRequest", [
|
|
2659
|
+
{ no: 1, name: "campaign_contract", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
2660
|
+
{ no: 2, name: "address", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
2661
|
+
]);
|
|
2662
|
+
}
|
|
2663
|
+
create(value?: PartialMessage<GetGuildMemberRequest>): GetGuildMemberRequest {
|
|
2664
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
2665
|
+
message.campaignContract = "";
|
|
2666
|
+
message.address = "";
|
|
2667
|
+
if (value !== undefined)
|
|
2668
|
+
reflectionMergePartial<GetGuildMemberRequest>(this, message, value);
|
|
2669
|
+
return message;
|
|
2670
|
+
}
|
|
2671
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetGuildMemberRequest): GetGuildMemberRequest {
|
|
2672
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
2673
|
+
while (reader.pos < end) {
|
|
2674
|
+
let [fieldNo, wireType] = reader.tag();
|
|
2675
|
+
switch (fieldNo) {
|
|
2676
|
+
case /* string campaign_contract */ 1:
|
|
2677
|
+
message.campaignContract = reader.string();
|
|
2678
|
+
break;
|
|
2679
|
+
case /* string address */ 2:
|
|
2680
|
+
message.address = reader.string();
|
|
2681
|
+
break;
|
|
2682
|
+
default:
|
|
2683
|
+
let u = options.readUnknownField;
|
|
2684
|
+
if (u === "throw")
|
|
2685
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
2686
|
+
let d = reader.skip(wireType);
|
|
2687
|
+
if (u !== false)
|
|
2688
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2691
|
+
return message;
|
|
2692
|
+
}
|
|
2693
|
+
internalBinaryWrite(message: GetGuildMemberRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
2694
|
+
/* string campaign_contract = 1; */
|
|
2695
|
+
if (message.campaignContract !== "")
|
|
2696
|
+
writer.tag(1, WireType.LengthDelimited).string(message.campaignContract);
|
|
2697
|
+
/* string address = 2; */
|
|
2698
|
+
if (message.address !== "")
|
|
2699
|
+
writer.tag(2, WireType.LengthDelimited).string(message.address);
|
|
2700
|
+
let u = options.writeUnknownFields;
|
|
2701
|
+
if (u !== false)
|
|
2702
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
2703
|
+
return writer;
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
/**
|
|
2707
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.GetGuildMemberRequest
|
|
2708
|
+
*/
|
|
2709
|
+
export const GetGuildMemberRequest = new GetGuildMemberRequest$Type();
|
|
2710
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
2711
|
+
class GetGuildMemberResponse$Type extends MessageType<GetGuildMemberResponse> {
|
|
2712
|
+
constructor() {
|
|
2713
|
+
super("injective_campaign_rpc.GetGuildMemberResponse", [
|
|
2714
|
+
{ no: 1, name: "info", kind: "message", T: () => GuildMember }
|
|
2715
|
+
]);
|
|
2716
|
+
}
|
|
2717
|
+
create(value?: PartialMessage<GetGuildMemberResponse>): GetGuildMemberResponse {
|
|
2718
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
2719
|
+
if (value !== undefined)
|
|
2720
|
+
reflectionMergePartial<GetGuildMemberResponse>(this, message, value);
|
|
2721
|
+
return message;
|
|
2722
|
+
}
|
|
2723
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetGuildMemberResponse): GetGuildMemberResponse {
|
|
2724
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
2725
|
+
while (reader.pos < end) {
|
|
2726
|
+
let [fieldNo, wireType] = reader.tag();
|
|
2727
|
+
switch (fieldNo) {
|
|
2728
|
+
case /* injective_campaign_rpc.GuildMember info */ 1:
|
|
2729
|
+
message.info = GuildMember.internalBinaryRead(reader, reader.uint32(), options, message.info);
|
|
2730
|
+
break;
|
|
2731
|
+
default:
|
|
2732
|
+
let u = options.readUnknownField;
|
|
2733
|
+
if (u === "throw")
|
|
2734
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
2735
|
+
let d = reader.skip(wireType);
|
|
2736
|
+
if (u !== false)
|
|
2737
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
2738
|
+
}
|
|
2739
|
+
}
|
|
2740
|
+
return message;
|
|
2741
|
+
}
|
|
2742
|
+
internalBinaryWrite(message: GetGuildMemberResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
2743
|
+
/* injective_campaign_rpc.GuildMember info = 1; */
|
|
2744
|
+
if (message.info)
|
|
2745
|
+
GuildMember.internalBinaryWrite(message.info, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
2746
|
+
let u = options.writeUnknownFields;
|
|
2747
|
+
if (u !== false)
|
|
2748
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
2749
|
+
return writer;
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
/**
|
|
2753
|
+
* @generated MessageType for protobuf message injective_campaign_rpc.GetGuildMemberResponse
|
|
2754
|
+
*/
|
|
2755
|
+
export const GetGuildMemberResponse = new GetGuildMemberResponse$Type();
|
|
2756
|
+
/**
|
|
2757
|
+
* @generated ServiceType for protobuf service injective_campaign_rpc.InjectiveCampaignRPC
|
|
2758
|
+
*/
|
|
2759
|
+
export const InjectiveCampaignRPC = new ServiceType("injective_campaign_rpc.InjectiveCampaignRPC", [
|
|
2760
|
+
{ name: "Ranking", options: {}, I: RankingRequest, O: RankingResponse },
|
|
2761
|
+
{ name: "Campaigns", options: {}, I: CampaignsRequest, O: CampaignsResponse },
|
|
2762
|
+
{ name: "CampaignsV2", options: {}, I: CampaignsV2Request, O: CampaignsV2Response },
|
|
2763
|
+
{ name: "ListGuilds", options: {}, I: ListGuildsRequest, O: ListGuildsResponse },
|
|
2764
|
+
{ name: "ListGuildMembers", options: {}, I: ListGuildMembersRequest, O: ListGuildMembersResponse },
|
|
2765
|
+
{ name: "GetGuildMember", options: {}, I: GetGuildMemberRequest, O: GetGuildMemberResponse }
|
|
2766
|
+
]);
|