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