@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,1314 @@
|
|
|
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 TokenHoldersRequest$Type extends MessageType {
|
|
7
|
+
constructor() {
|
|
8
|
+
super("injective_portfolio_rpc.TokenHoldersRequest", [
|
|
9
|
+
{
|
|
10
|
+
no: 1,
|
|
11
|
+
name: "denom",
|
|
12
|
+
kind: "scalar",
|
|
13
|
+
T: 9
|
|
14
|
+
/*ScalarType.STRING*/
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
no: 2,
|
|
18
|
+
name: "cursor",
|
|
19
|
+
kind: "scalar",
|
|
20
|
+
T: 9
|
|
21
|
+
/*ScalarType.STRING*/
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
no: 3,
|
|
25
|
+
name: "limit",
|
|
26
|
+
kind: "scalar",
|
|
27
|
+
T: 17
|
|
28
|
+
/*ScalarType.SINT32*/
|
|
29
|
+
}
|
|
30
|
+
]);
|
|
31
|
+
}
|
|
32
|
+
create(value) {
|
|
33
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
34
|
+
message.denom = "";
|
|
35
|
+
message.cursor = "";
|
|
36
|
+
message.limit = 0;
|
|
37
|
+
if (value !== void 0)
|
|
38
|
+
reflectionMergePartial(this, message, value);
|
|
39
|
+
return message;
|
|
40
|
+
}
|
|
41
|
+
internalBinaryRead(reader, length, options, target) {
|
|
42
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
43
|
+
while (reader.pos < end) {
|
|
44
|
+
let [fieldNo, wireType] = reader.tag();
|
|
45
|
+
switch (fieldNo) {
|
|
46
|
+
case /* string denom */
|
|
47
|
+
1:
|
|
48
|
+
message.denom = reader.string();
|
|
49
|
+
break;
|
|
50
|
+
case /* string cursor */
|
|
51
|
+
2:
|
|
52
|
+
message.cursor = reader.string();
|
|
53
|
+
break;
|
|
54
|
+
case /* sint32 limit */
|
|
55
|
+
3:
|
|
56
|
+
message.limit = reader.sint32();
|
|
57
|
+
break;
|
|
58
|
+
default:
|
|
59
|
+
let u = options.readUnknownField;
|
|
60
|
+
if (u === "throw")
|
|
61
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
62
|
+
let d = reader.skip(wireType);
|
|
63
|
+
if (u !== false)
|
|
64
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return message;
|
|
68
|
+
}
|
|
69
|
+
internalBinaryWrite(message, writer, options) {
|
|
70
|
+
if (message.denom !== "")
|
|
71
|
+
writer.tag(1, WireType.LengthDelimited).string(message.denom);
|
|
72
|
+
if (message.cursor !== "")
|
|
73
|
+
writer.tag(2, WireType.LengthDelimited).string(message.cursor);
|
|
74
|
+
if (message.limit !== 0)
|
|
75
|
+
writer.tag(3, WireType.Varint).sint32(message.limit);
|
|
76
|
+
let u = options.writeUnknownFields;
|
|
77
|
+
if (u !== false)
|
|
78
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
79
|
+
return writer;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const TokenHoldersRequest = new TokenHoldersRequest$Type();
|
|
83
|
+
class TokenHoldersResponse$Type extends MessageType {
|
|
84
|
+
constructor() {
|
|
85
|
+
super("injective_portfolio_rpc.TokenHoldersResponse", [
|
|
86
|
+
{ no: 1, name: "holders", kind: "message", repeat: 2, T: () => Holder },
|
|
87
|
+
{
|
|
88
|
+
no: 2,
|
|
89
|
+
name: "next_cursors",
|
|
90
|
+
kind: "scalar",
|
|
91
|
+
repeat: 2,
|
|
92
|
+
T: 9
|
|
93
|
+
/*ScalarType.STRING*/
|
|
94
|
+
}
|
|
95
|
+
]);
|
|
96
|
+
}
|
|
97
|
+
create(value) {
|
|
98
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
99
|
+
message.holders = [];
|
|
100
|
+
message.nextCursors = [];
|
|
101
|
+
if (value !== void 0)
|
|
102
|
+
reflectionMergePartial(this, message, value);
|
|
103
|
+
return message;
|
|
104
|
+
}
|
|
105
|
+
internalBinaryRead(reader, length, options, target) {
|
|
106
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
107
|
+
while (reader.pos < end) {
|
|
108
|
+
let [fieldNo, wireType] = reader.tag();
|
|
109
|
+
switch (fieldNo) {
|
|
110
|
+
case /* repeated injective_portfolio_rpc.Holder holders */
|
|
111
|
+
1:
|
|
112
|
+
message.holders.push(Holder.internalBinaryRead(reader, reader.uint32(), options));
|
|
113
|
+
break;
|
|
114
|
+
case /* repeated string next_cursors */
|
|
115
|
+
2:
|
|
116
|
+
message.nextCursors.push(reader.string());
|
|
117
|
+
break;
|
|
118
|
+
default:
|
|
119
|
+
let u = options.readUnknownField;
|
|
120
|
+
if (u === "throw")
|
|
121
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
122
|
+
let d = reader.skip(wireType);
|
|
123
|
+
if (u !== false)
|
|
124
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return message;
|
|
128
|
+
}
|
|
129
|
+
internalBinaryWrite(message, writer, options) {
|
|
130
|
+
for (let i = 0; i < message.holders.length; i++)
|
|
131
|
+
Holder.internalBinaryWrite(message.holders[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
132
|
+
for (let i = 0; i < message.nextCursors.length; i++)
|
|
133
|
+
writer.tag(2, WireType.LengthDelimited).string(message.nextCursors[i]);
|
|
134
|
+
let u = options.writeUnknownFields;
|
|
135
|
+
if (u !== false)
|
|
136
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
137
|
+
return writer;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const TokenHoldersResponse = new TokenHoldersResponse$Type();
|
|
141
|
+
class Holder$Type extends MessageType {
|
|
142
|
+
constructor() {
|
|
143
|
+
super("injective_portfolio_rpc.Holder", [
|
|
144
|
+
{
|
|
145
|
+
no: 1,
|
|
146
|
+
name: "account_address",
|
|
147
|
+
kind: "scalar",
|
|
148
|
+
T: 9
|
|
149
|
+
/*ScalarType.STRING*/
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
no: 2,
|
|
153
|
+
name: "balance",
|
|
154
|
+
kind: "scalar",
|
|
155
|
+
T: 9
|
|
156
|
+
/*ScalarType.STRING*/
|
|
157
|
+
}
|
|
158
|
+
]);
|
|
159
|
+
}
|
|
160
|
+
create(value) {
|
|
161
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
162
|
+
message.accountAddress = "";
|
|
163
|
+
message.balance = "";
|
|
164
|
+
if (value !== void 0)
|
|
165
|
+
reflectionMergePartial(this, message, value);
|
|
166
|
+
return message;
|
|
167
|
+
}
|
|
168
|
+
internalBinaryRead(reader, length, options, target) {
|
|
169
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
170
|
+
while (reader.pos < end) {
|
|
171
|
+
let [fieldNo, wireType] = reader.tag();
|
|
172
|
+
switch (fieldNo) {
|
|
173
|
+
case /* string account_address */
|
|
174
|
+
1:
|
|
175
|
+
message.accountAddress = reader.string();
|
|
176
|
+
break;
|
|
177
|
+
case /* string balance */
|
|
178
|
+
2:
|
|
179
|
+
message.balance = reader.string();
|
|
180
|
+
break;
|
|
181
|
+
default:
|
|
182
|
+
let u = options.readUnknownField;
|
|
183
|
+
if (u === "throw")
|
|
184
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
185
|
+
let d = reader.skip(wireType);
|
|
186
|
+
if (u !== false)
|
|
187
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return message;
|
|
191
|
+
}
|
|
192
|
+
internalBinaryWrite(message, writer, options) {
|
|
193
|
+
if (message.accountAddress !== "")
|
|
194
|
+
writer.tag(1, WireType.LengthDelimited).string(message.accountAddress);
|
|
195
|
+
if (message.balance !== "")
|
|
196
|
+
writer.tag(2, WireType.LengthDelimited).string(message.balance);
|
|
197
|
+
let u = options.writeUnknownFields;
|
|
198
|
+
if (u !== false)
|
|
199
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
200
|
+
return writer;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
const Holder = new Holder$Type();
|
|
204
|
+
class AccountPortfolioRequest$Type extends MessageType {
|
|
205
|
+
constructor() {
|
|
206
|
+
super("injective_portfolio_rpc.AccountPortfolioRequest", [
|
|
207
|
+
{
|
|
208
|
+
no: 1,
|
|
209
|
+
name: "account_address",
|
|
210
|
+
kind: "scalar",
|
|
211
|
+
T: 9
|
|
212
|
+
/*ScalarType.STRING*/
|
|
213
|
+
}
|
|
214
|
+
]);
|
|
215
|
+
}
|
|
216
|
+
create(value) {
|
|
217
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
218
|
+
message.accountAddress = "";
|
|
219
|
+
if (value !== void 0)
|
|
220
|
+
reflectionMergePartial(this, message, value);
|
|
221
|
+
return message;
|
|
222
|
+
}
|
|
223
|
+
internalBinaryRead(reader, length, options, target) {
|
|
224
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
225
|
+
while (reader.pos < end) {
|
|
226
|
+
let [fieldNo, wireType] = reader.tag();
|
|
227
|
+
switch (fieldNo) {
|
|
228
|
+
case /* string account_address */
|
|
229
|
+
1:
|
|
230
|
+
message.accountAddress = reader.string();
|
|
231
|
+
break;
|
|
232
|
+
default:
|
|
233
|
+
let u = options.readUnknownField;
|
|
234
|
+
if (u === "throw")
|
|
235
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
236
|
+
let d = reader.skip(wireType);
|
|
237
|
+
if (u !== false)
|
|
238
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return message;
|
|
242
|
+
}
|
|
243
|
+
internalBinaryWrite(message, writer, options) {
|
|
244
|
+
if (message.accountAddress !== "")
|
|
245
|
+
writer.tag(1, WireType.LengthDelimited).string(message.accountAddress);
|
|
246
|
+
let u = options.writeUnknownFields;
|
|
247
|
+
if (u !== false)
|
|
248
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
249
|
+
return writer;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
const AccountPortfolioRequest = new AccountPortfolioRequest$Type();
|
|
253
|
+
class AccountPortfolioResponse$Type extends MessageType {
|
|
254
|
+
constructor() {
|
|
255
|
+
super("injective_portfolio_rpc.AccountPortfolioResponse", [
|
|
256
|
+
{ no: 1, name: "portfolio", kind: "message", T: () => Portfolio }
|
|
257
|
+
]);
|
|
258
|
+
}
|
|
259
|
+
create(value) {
|
|
260
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
261
|
+
if (value !== void 0)
|
|
262
|
+
reflectionMergePartial(this, message, value);
|
|
263
|
+
return message;
|
|
264
|
+
}
|
|
265
|
+
internalBinaryRead(reader, length, options, target) {
|
|
266
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
267
|
+
while (reader.pos < end) {
|
|
268
|
+
let [fieldNo, wireType] = reader.tag();
|
|
269
|
+
switch (fieldNo) {
|
|
270
|
+
case /* injective_portfolio_rpc.Portfolio portfolio */
|
|
271
|
+
1:
|
|
272
|
+
message.portfolio = Portfolio.internalBinaryRead(reader, reader.uint32(), options, message.portfolio);
|
|
273
|
+
break;
|
|
274
|
+
default:
|
|
275
|
+
let u = options.readUnknownField;
|
|
276
|
+
if (u === "throw")
|
|
277
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
278
|
+
let d = reader.skip(wireType);
|
|
279
|
+
if (u !== false)
|
|
280
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return message;
|
|
284
|
+
}
|
|
285
|
+
internalBinaryWrite(message, writer, options) {
|
|
286
|
+
if (message.portfolio)
|
|
287
|
+
Portfolio.internalBinaryWrite(message.portfolio, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
288
|
+
let u = options.writeUnknownFields;
|
|
289
|
+
if (u !== false)
|
|
290
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
291
|
+
return writer;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
const AccountPortfolioResponse = new AccountPortfolioResponse$Type();
|
|
295
|
+
class Portfolio$Type extends MessageType {
|
|
296
|
+
constructor() {
|
|
297
|
+
super("injective_portfolio_rpc.Portfolio", [
|
|
298
|
+
{
|
|
299
|
+
no: 1,
|
|
300
|
+
name: "account_address",
|
|
301
|
+
kind: "scalar",
|
|
302
|
+
T: 9
|
|
303
|
+
/*ScalarType.STRING*/
|
|
304
|
+
},
|
|
305
|
+
{ no: 2, name: "bank_balances", kind: "message", repeat: 2, T: () => Coin },
|
|
306
|
+
{ no: 3, name: "subaccounts", kind: "message", repeat: 2, T: () => SubaccountBalanceV2 },
|
|
307
|
+
{ no: 4, name: "positions_with_upnl", kind: "message", repeat: 2, T: () => PositionsWithUPNL }
|
|
308
|
+
]);
|
|
309
|
+
}
|
|
310
|
+
create(value) {
|
|
311
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
312
|
+
message.accountAddress = "";
|
|
313
|
+
message.bankBalances = [];
|
|
314
|
+
message.subaccounts = [];
|
|
315
|
+
message.positionsWithUpnl = [];
|
|
316
|
+
if (value !== void 0)
|
|
317
|
+
reflectionMergePartial(this, message, value);
|
|
318
|
+
return message;
|
|
319
|
+
}
|
|
320
|
+
internalBinaryRead(reader, length, options, target) {
|
|
321
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
322
|
+
while (reader.pos < end) {
|
|
323
|
+
let [fieldNo, wireType] = reader.tag();
|
|
324
|
+
switch (fieldNo) {
|
|
325
|
+
case /* string account_address */
|
|
326
|
+
1:
|
|
327
|
+
message.accountAddress = reader.string();
|
|
328
|
+
break;
|
|
329
|
+
case /* repeated injective_portfolio_rpc.Coin bank_balances */
|
|
330
|
+
2:
|
|
331
|
+
message.bankBalances.push(Coin.internalBinaryRead(reader, reader.uint32(), options));
|
|
332
|
+
break;
|
|
333
|
+
case /* repeated injective_portfolio_rpc.SubaccountBalanceV2 subaccounts */
|
|
334
|
+
3:
|
|
335
|
+
message.subaccounts.push(SubaccountBalanceV2.internalBinaryRead(reader, reader.uint32(), options));
|
|
336
|
+
break;
|
|
337
|
+
case /* repeated injective_portfolio_rpc.PositionsWithUPNL positions_with_upnl */
|
|
338
|
+
4:
|
|
339
|
+
message.positionsWithUpnl.push(PositionsWithUPNL.internalBinaryRead(reader, reader.uint32(), options));
|
|
340
|
+
break;
|
|
341
|
+
default:
|
|
342
|
+
let u = options.readUnknownField;
|
|
343
|
+
if (u === "throw")
|
|
344
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
345
|
+
let d = reader.skip(wireType);
|
|
346
|
+
if (u !== false)
|
|
347
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return message;
|
|
351
|
+
}
|
|
352
|
+
internalBinaryWrite(message, writer, options) {
|
|
353
|
+
if (message.accountAddress !== "")
|
|
354
|
+
writer.tag(1, WireType.LengthDelimited).string(message.accountAddress);
|
|
355
|
+
for (let i = 0; i < message.bankBalances.length; i++)
|
|
356
|
+
Coin.internalBinaryWrite(message.bankBalances[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
357
|
+
for (let i = 0; i < message.subaccounts.length; i++)
|
|
358
|
+
SubaccountBalanceV2.internalBinaryWrite(message.subaccounts[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
359
|
+
for (let i = 0; i < message.positionsWithUpnl.length; i++)
|
|
360
|
+
PositionsWithUPNL.internalBinaryWrite(message.positionsWithUpnl[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
361
|
+
let u = options.writeUnknownFields;
|
|
362
|
+
if (u !== false)
|
|
363
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
364
|
+
return writer;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
const Portfolio = new Portfolio$Type();
|
|
368
|
+
class Coin$Type extends MessageType {
|
|
369
|
+
constructor() {
|
|
370
|
+
super("injective_portfolio_rpc.Coin", [
|
|
371
|
+
{
|
|
372
|
+
no: 1,
|
|
373
|
+
name: "denom",
|
|
374
|
+
kind: "scalar",
|
|
375
|
+
T: 9
|
|
376
|
+
/*ScalarType.STRING*/
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
no: 2,
|
|
380
|
+
name: "amount",
|
|
381
|
+
kind: "scalar",
|
|
382
|
+
T: 9
|
|
383
|
+
/*ScalarType.STRING*/
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
no: 3,
|
|
387
|
+
name: "usd_value",
|
|
388
|
+
kind: "scalar",
|
|
389
|
+
T: 9
|
|
390
|
+
/*ScalarType.STRING*/
|
|
391
|
+
}
|
|
392
|
+
]);
|
|
393
|
+
}
|
|
394
|
+
create(value) {
|
|
395
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
396
|
+
message.denom = "";
|
|
397
|
+
message.amount = "";
|
|
398
|
+
message.usdValue = "";
|
|
399
|
+
if (value !== void 0)
|
|
400
|
+
reflectionMergePartial(this, message, value);
|
|
401
|
+
return message;
|
|
402
|
+
}
|
|
403
|
+
internalBinaryRead(reader, length, options, target) {
|
|
404
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
405
|
+
while (reader.pos < end) {
|
|
406
|
+
let [fieldNo, wireType] = reader.tag();
|
|
407
|
+
switch (fieldNo) {
|
|
408
|
+
case /* string denom */
|
|
409
|
+
1:
|
|
410
|
+
message.denom = reader.string();
|
|
411
|
+
break;
|
|
412
|
+
case /* string amount */
|
|
413
|
+
2:
|
|
414
|
+
message.amount = reader.string();
|
|
415
|
+
break;
|
|
416
|
+
case /* string usd_value */
|
|
417
|
+
3:
|
|
418
|
+
message.usdValue = reader.string();
|
|
419
|
+
break;
|
|
420
|
+
default:
|
|
421
|
+
let u = options.readUnknownField;
|
|
422
|
+
if (u === "throw")
|
|
423
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
424
|
+
let d = reader.skip(wireType);
|
|
425
|
+
if (u !== false)
|
|
426
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
return message;
|
|
430
|
+
}
|
|
431
|
+
internalBinaryWrite(message, writer, options) {
|
|
432
|
+
if (message.denom !== "")
|
|
433
|
+
writer.tag(1, WireType.LengthDelimited).string(message.denom);
|
|
434
|
+
if (message.amount !== "")
|
|
435
|
+
writer.tag(2, WireType.LengthDelimited).string(message.amount);
|
|
436
|
+
if (message.usdValue !== "")
|
|
437
|
+
writer.tag(3, WireType.LengthDelimited).string(message.usdValue);
|
|
438
|
+
let u = options.writeUnknownFields;
|
|
439
|
+
if (u !== false)
|
|
440
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
441
|
+
return writer;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
const Coin = new Coin$Type();
|
|
445
|
+
class SubaccountBalanceV2$Type extends MessageType {
|
|
446
|
+
constructor() {
|
|
447
|
+
super("injective_portfolio_rpc.SubaccountBalanceV2", [
|
|
448
|
+
{
|
|
449
|
+
no: 1,
|
|
450
|
+
name: "subaccount_id",
|
|
451
|
+
kind: "scalar",
|
|
452
|
+
T: 9
|
|
453
|
+
/*ScalarType.STRING*/
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
no: 2,
|
|
457
|
+
name: "denom",
|
|
458
|
+
kind: "scalar",
|
|
459
|
+
T: 9
|
|
460
|
+
/*ScalarType.STRING*/
|
|
461
|
+
},
|
|
462
|
+
{ no: 3, name: "deposit", kind: "message", T: () => SubaccountDeposit }
|
|
463
|
+
]);
|
|
464
|
+
}
|
|
465
|
+
create(value) {
|
|
466
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
467
|
+
message.subaccountId = "";
|
|
468
|
+
message.denom = "";
|
|
469
|
+
if (value !== void 0)
|
|
470
|
+
reflectionMergePartial(this, message, value);
|
|
471
|
+
return message;
|
|
472
|
+
}
|
|
473
|
+
internalBinaryRead(reader, length, options, target) {
|
|
474
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
475
|
+
while (reader.pos < end) {
|
|
476
|
+
let [fieldNo, wireType] = reader.tag();
|
|
477
|
+
switch (fieldNo) {
|
|
478
|
+
case /* string subaccount_id */
|
|
479
|
+
1:
|
|
480
|
+
message.subaccountId = reader.string();
|
|
481
|
+
break;
|
|
482
|
+
case /* string denom */
|
|
483
|
+
2:
|
|
484
|
+
message.denom = reader.string();
|
|
485
|
+
break;
|
|
486
|
+
case /* injective_portfolio_rpc.SubaccountDeposit deposit */
|
|
487
|
+
3:
|
|
488
|
+
message.deposit = SubaccountDeposit.internalBinaryRead(reader, reader.uint32(), options, message.deposit);
|
|
489
|
+
break;
|
|
490
|
+
default:
|
|
491
|
+
let u = options.readUnknownField;
|
|
492
|
+
if (u === "throw")
|
|
493
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
494
|
+
let d = reader.skip(wireType);
|
|
495
|
+
if (u !== false)
|
|
496
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
return message;
|
|
500
|
+
}
|
|
501
|
+
internalBinaryWrite(message, writer, options) {
|
|
502
|
+
if (message.subaccountId !== "")
|
|
503
|
+
writer.tag(1, WireType.LengthDelimited).string(message.subaccountId);
|
|
504
|
+
if (message.denom !== "")
|
|
505
|
+
writer.tag(2, WireType.LengthDelimited).string(message.denom);
|
|
506
|
+
if (message.deposit)
|
|
507
|
+
SubaccountDeposit.internalBinaryWrite(message.deposit, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
508
|
+
let u = options.writeUnknownFields;
|
|
509
|
+
if (u !== false)
|
|
510
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
511
|
+
return writer;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
const SubaccountBalanceV2 = new SubaccountBalanceV2$Type();
|
|
515
|
+
class SubaccountDeposit$Type extends MessageType {
|
|
516
|
+
constructor() {
|
|
517
|
+
super("injective_portfolio_rpc.SubaccountDeposit", [
|
|
518
|
+
{
|
|
519
|
+
no: 1,
|
|
520
|
+
name: "total_balance",
|
|
521
|
+
kind: "scalar",
|
|
522
|
+
T: 9
|
|
523
|
+
/*ScalarType.STRING*/
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
no: 2,
|
|
527
|
+
name: "available_balance",
|
|
528
|
+
kind: "scalar",
|
|
529
|
+
T: 9
|
|
530
|
+
/*ScalarType.STRING*/
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
no: 3,
|
|
534
|
+
name: "total_balance_usd",
|
|
535
|
+
kind: "scalar",
|
|
536
|
+
T: 9
|
|
537
|
+
/*ScalarType.STRING*/
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
no: 4,
|
|
541
|
+
name: "available_balance_usd",
|
|
542
|
+
kind: "scalar",
|
|
543
|
+
T: 9
|
|
544
|
+
/*ScalarType.STRING*/
|
|
545
|
+
}
|
|
546
|
+
]);
|
|
547
|
+
}
|
|
548
|
+
create(value) {
|
|
549
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
550
|
+
message.totalBalance = "";
|
|
551
|
+
message.availableBalance = "";
|
|
552
|
+
message.totalBalanceUsd = "";
|
|
553
|
+
message.availableBalanceUsd = "";
|
|
554
|
+
if (value !== void 0)
|
|
555
|
+
reflectionMergePartial(this, message, value);
|
|
556
|
+
return message;
|
|
557
|
+
}
|
|
558
|
+
internalBinaryRead(reader, length, options, target) {
|
|
559
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
560
|
+
while (reader.pos < end) {
|
|
561
|
+
let [fieldNo, wireType] = reader.tag();
|
|
562
|
+
switch (fieldNo) {
|
|
563
|
+
case /* string total_balance */
|
|
564
|
+
1:
|
|
565
|
+
message.totalBalance = reader.string();
|
|
566
|
+
break;
|
|
567
|
+
case /* string available_balance */
|
|
568
|
+
2:
|
|
569
|
+
message.availableBalance = reader.string();
|
|
570
|
+
break;
|
|
571
|
+
case /* string total_balance_usd */
|
|
572
|
+
3:
|
|
573
|
+
message.totalBalanceUsd = reader.string();
|
|
574
|
+
break;
|
|
575
|
+
case /* string available_balance_usd */
|
|
576
|
+
4:
|
|
577
|
+
message.availableBalanceUsd = reader.string();
|
|
578
|
+
break;
|
|
579
|
+
default:
|
|
580
|
+
let u = options.readUnknownField;
|
|
581
|
+
if (u === "throw")
|
|
582
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
583
|
+
let d = reader.skip(wireType);
|
|
584
|
+
if (u !== false)
|
|
585
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
return message;
|
|
589
|
+
}
|
|
590
|
+
internalBinaryWrite(message, writer, options) {
|
|
591
|
+
if (message.totalBalance !== "")
|
|
592
|
+
writer.tag(1, WireType.LengthDelimited).string(message.totalBalance);
|
|
593
|
+
if (message.availableBalance !== "")
|
|
594
|
+
writer.tag(2, WireType.LengthDelimited).string(message.availableBalance);
|
|
595
|
+
if (message.totalBalanceUsd !== "")
|
|
596
|
+
writer.tag(3, WireType.LengthDelimited).string(message.totalBalanceUsd);
|
|
597
|
+
if (message.availableBalanceUsd !== "")
|
|
598
|
+
writer.tag(4, WireType.LengthDelimited).string(message.availableBalanceUsd);
|
|
599
|
+
let u = options.writeUnknownFields;
|
|
600
|
+
if (u !== false)
|
|
601
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
602
|
+
return writer;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
const SubaccountDeposit = new SubaccountDeposit$Type();
|
|
606
|
+
class PositionsWithUPNL$Type extends MessageType {
|
|
607
|
+
constructor() {
|
|
608
|
+
super("injective_portfolio_rpc.PositionsWithUPNL", [
|
|
609
|
+
{ no: 1, name: "position", kind: "message", T: () => DerivativePosition },
|
|
610
|
+
{
|
|
611
|
+
no: 2,
|
|
612
|
+
name: "unrealized_pnl",
|
|
613
|
+
kind: "scalar",
|
|
614
|
+
T: 9
|
|
615
|
+
/*ScalarType.STRING*/
|
|
616
|
+
}
|
|
617
|
+
]);
|
|
618
|
+
}
|
|
619
|
+
create(value) {
|
|
620
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
621
|
+
message.unrealizedPnl = "";
|
|
622
|
+
if (value !== void 0)
|
|
623
|
+
reflectionMergePartial(this, message, value);
|
|
624
|
+
return message;
|
|
625
|
+
}
|
|
626
|
+
internalBinaryRead(reader, length, options, target) {
|
|
627
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
628
|
+
while (reader.pos < end) {
|
|
629
|
+
let [fieldNo, wireType] = reader.tag();
|
|
630
|
+
switch (fieldNo) {
|
|
631
|
+
case /* injective_portfolio_rpc.DerivativePosition position */
|
|
632
|
+
1:
|
|
633
|
+
message.position = DerivativePosition.internalBinaryRead(reader, reader.uint32(), options, message.position);
|
|
634
|
+
break;
|
|
635
|
+
case /* string unrealized_pnl */
|
|
636
|
+
2:
|
|
637
|
+
message.unrealizedPnl = reader.string();
|
|
638
|
+
break;
|
|
639
|
+
default:
|
|
640
|
+
let u = options.readUnknownField;
|
|
641
|
+
if (u === "throw")
|
|
642
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
643
|
+
let d = reader.skip(wireType);
|
|
644
|
+
if (u !== false)
|
|
645
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
return message;
|
|
649
|
+
}
|
|
650
|
+
internalBinaryWrite(message, writer, options) {
|
|
651
|
+
if (message.position)
|
|
652
|
+
DerivativePosition.internalBinaryWrite(message.position, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
653
|
+
if (message.unrealizedPnl !== "")
|
|
654
|
+
writer.tag(2, WireType.LengthDelimited).string(message.unrealizedPnl);
|
|
655
|
+
let u = options.writeUnknownFields;
|
|
656
|
+
if (u !== false)
|
|
657
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
658
|
+
return writer;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
const PositionsWithUPNL = new PositionsWithUPNL$Type();
|
|
662
|
+
class DerivativePosition$Type extends MessageType {
|
|
663
|
+
constructor() {
|
|
664
|
+
super("injective_portfolio_rpc.DerivativePosition", [
|
|
665
|
+
{
|
|
666
|
+
no: 1,
|
|
667
|
+
name: "ticker",
|
|
668
|
+
kind: "scalar",
|
|
669
|
+
T: 9
|
|
670
|
+
/*ScalarType.STRING*/
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
no: 2,
|
|
674
|
+
name: "market_id",
|
|
675
|
+
kind: "scalar",
|
|
676
|
+
T: 9
|
|
677
|
+
/*ScalarType.STRING*/
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
no: 3,
|
|
681
|
+
name: "subaccount_id",
|
|
682
|
+
kind: "scalar",
|
|
683
|
+
T: 9
|
|
684
|
+
/*ScalarType.STRING*/
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
no: 4,
|
|
688
|
+
name: "direction",
|
|
689
|
+
kind: "scalar",
|
|
690
|
+
T: 9
|
|
691
|
+
/*ScalarType.STRING*/
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
no: 5,
|
|
695
|
+
name: "quantity",
|
|
696
|
+
kind: "scalar",
|
|
697
|
+
T: 9
|
|
698
|
+
/*ScalarType.STRING*/
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
no: 6,
|
|
702
|
+
name: "entry_price",
|
|
703
|
+
kind: "scalar",
|
|
704
|
+
T: 9
|
|
705
|
+
/*ScalarType.STRING*/
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
no: 7,
|
|
709
|
+
name: "margin",
|
|
710
|
+
kind: "scalar",
|
|
711
|
+
T: 9
|
|
712
|
+
/*ScalarType.STRING*/
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
no: 8,
|
|
716
|
+
name: "liquidation_price",
|
|
717
|
+
kind: "scalar",
|
|
718
|
+
T: 9
|
|
719
|
+
/*ScalarType.STRING*/
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
no: 9,
|
|
723
|
+
name: "mark_price",
|
|
724
|
+
kind: "scalar",
|
|
725
|
+
T: 9
|
|
726
|
+
/*ScalarType.STRING*/
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
no: 11,
|
|
730
|
+
name: "aggregate_reduce_only_quantity",
|
|
731
|
+
kind: "scalar",
|
|
732
|
+
T: 9
|
|
733
|
+
/*ScalarType.STRING*/
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
no: 12,
|
|
737
|
+
name: "updated_at",
|
|
738
|
+
kind: "scalar",
|
|
739
|
+
T: 18,
|
|
740
|
+
L: 0
|
|
741
|
+
/*LongType.BIGINT*/
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
no: 13,
|
|
745
|
+
name: "created_at",
|
|
746
|
+
kind: "scalar",
|
|
747
|
+
T: 18,
|
|
748
|
+
L: 0
|
|
749
|
+
/*LongType.BIGINT*/
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
no: 14,
|
|
753
|
+
name: "funding_last",
|
|
754
|
+
kind: "scalar",
|
|
755
|
+
T: 9
|
|
756
|
+
/*ScalarType.STRING*/
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
no: 15,
|
|
760
|
+
name: "funding_sum",
|
|
761
|
+
kind: "scalar",
|
|
762
|
+
T: 9
|
|
763
|
+
/*ScalarType.STRING*/
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
no: 16,
|
|
767
|
+
name: "cumulative_funding_entry",
|
|
768
|
+
kind: "scalar",
|
|
769
|
+
T: 9
|
|
770
|
+
/*ScalarType.STRING*/
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
no: 17,
|
|
774
|
+
name: "effective_cumulative_funding_entry",
|
|
775
|
+
kind: "scalar",
|
|
776
|
+
T: 9
|
|
777
|
+
/*ScalarType.STRING*/
|
|
778
|
+
}
|
|
779
|
+
]);
|
|
780
|
+
}
|
|
781
|
+
create(value) {
|
|
782
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
783
|
+
message.ticker = "";
|
|
784
|
+
message.marketId = "";
|
|
785
|
+
message.subaccountId = "";
|
|
786
|
+
message.direction = "";
|
|
787
|
+
message.quantity = "";
|
|
788
|
+
message.entryPrice = "";
|
|
789
|
+
message.margin = "";
|
|
790
|
+
message.liquidationPrice = "";
|
|
791
|
+
message.markPrice = "";
|
|
792
|
+
message.aggregateReduceOnlyQuantity = "";
|
|
793
|
+
message.updatedAt = 0n;
|
|
794
|
+
message.createdAt = 0n;
|
|
795
|
+
message.fundingLast = "";
|
|
796
|
+
message.fundingSum = "";
|
|
797
|
+
message.cumulativeFundingEntry = "";
|
|
798
|
+
message.effectiveCumulativeFundingEntry = "";
|
|
799
|
+
if (value !== void 0)
|
|
800
|
+
reflectionMergePartial(this, message, value);
|
|
801
|
+
return message;
|
|
802
|
+
}
|
|
803
|
+
internalBinaryRead(reader, length, options, target) {
|
|
804
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
805
|
+
while (reader.pos < end) {
|
|
806
|
+
let [fieldNo, wireType] = reader.tag();
|
|
807
|
+
switch (fieldNo) {
|
|
808
|
+
case /* string ticker */
|
|
809
|
+
1:
|
|
810
|
+
message.ticker = reader.string();
|
|
811
|
+
break;
|
|
812
|
+
case /* string market_id */
|
|
813
|
+
2:
|
|
814
|
+
message.marketId = reader.string();
|
|
815
|
+
break;
|
|
816
|
+
case /* string subaccount_id */
|
|
817
|
+
3:
|
|
818
|
+
message.subaccountId = reader.string();
|
|
819
|
+
break;
|
|
820
|
+
case /* string direction */
|
|
821
|
+
4:
|
|
822
|
+
message.direction = reader.string();
|
|
823
|
+
break;
|
|
824
|
+
case /* string quantity */
|
|
825
|
+
5:
|
|
826
|
+
message.quantity = reader.string();
|
|
827
|
+
break;
|
|
828
|
+
case /* string entry_price */
|
|
829
|
+
6:
|
|
830
|
+
message.entryPrice = reader.string();
|
|
831
|
+
break;
|
|
832
|
+
case /* string margin */
|
|
833
|
+
7:
|
|
834
|
+
message.margin = reader.string();
|
|
835
|
+
break;
|
|
836
|
+
case /* string liquidation_price */
|
|
837
|
+
8:
|
|
838
|
+
message.liquidationPrice = reader.string();
|
|
839
|
+
break;
|
|
840
|
+
case /* string mark_price */
|
|
841
|
+
9:
|
|
842
|
+
message.markPrice = reader.string();
|
|
843
|
+
break;
|
|
844
|
+
case /* string aggregate_reduce_only_quantity */
|
|
845
|
+
11:
|
|
846
|
+
message.aggregateReduceOnlyQuantity = reader.string();
|
|
847
|
+
break;
|
|
848
|
+
case /* sint64 updated_at */
|
|
849
|
+
12:
|
|
850
|
+
message.updatedAt = reader.sint64().toBigInt();
|
|
851
|
+
break;
|
|
852
|
+
case /* sint64 created_at */
|
|
853
|
+
13:
|
|
854
|
+
message.createdAt = reader.sint64().toBigInt();
|
|
855
|
+
break;
|
|
856
|
+
case /* string funding_last */
|
|
857
|
+
14:
|
|
858
|
+
message.fundingLast = reader.string();
|
|
859
|
+
break;
|
|
860
|
+
case /* string funding_sum */
|
|
861
|
+
15:
|
|
862
|
+
message.fundingSum = reader.string();
|
|
863
|
+
break;
|
|
864
|
+
case /* string cumulative_funding_entry */
|
|
865
|
+
16:
|
|
866
|
+
message.cumulativeFundingEntry = reader.string();
|
|
867
|
+
break;
|
|
868
|
+
case /* string effective_cumulative_funding_entry */
|
|
869
|
+
17:
|
|
870
|
+
message.effectiveCumulativeFundingEntry = reader.string();
|
|
871
|
+
break;
|
|
872
|
+
default:
|
|
873
|
+
let u = options.readUnknownField;
|
|
874
|
+
if (u === "throw")
|
|
875
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
876
|
+
let d = reader.skip(wireType);
|
|
877
|
+
if (u !== false)
|
|
878
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
return message;
|
|
882
|
+
}
|
|
883
|
+
internalBinaryWrite(message, writer, options) {
|
|
884
|
+
if (message.ticker !== "")
|
|
885
|
+
writer.tag(1, WireType.LengthDelimited).string(message.ticker);
|
|
886
|
+
if (message.marketId !== "")
|
|
887
|
+
writer.tag(2, WireType.LengthDelimited).string(message.marketId);
|
|
888
|
+
if (message.subaccountId !== "")
|
|
889
|
+
writer.tag(3, WireType.LengthDelimited).string(message.subaccountId);
|
|
890
|
+
if (message.direction !== "")
|
|
891
|
+
writer.tag(4, WireType.LengthDelimited).string(message.direction);
|
|
892
|
+
if (message.quantity !== "")
|
|
893
|
+
writer.tag(5, WireType.LengthDelimited).string(message.quantity);
|
|
894
|
+
if (message.entryPrice !== "")
|
|
895
|
+
writer.tag(6, WireType.LengthDelimited).string(message.entryPrice);
|
|
896
|
+
if (message.margin !== "")
|
|
897
|
+
writer.tag(7, WireType.LengthDelimited).string(message.margin);
|
|
898
|
+
if (message.liquidationPrice !== "")
|
|
899
|
+
writer.tag(8, WireType.LengthDelimited).string(message.liquidationPrice);
|
|
900
|
+
if (message.markPrice !== "")
|
|
901
|
+
writer.tag(9, WireType.LengthDelimited).string(message.markPrice);
|
|
902
|
+
if (message.aggregateReduceOnlyQuantity !== "")
|
|
903
|
+
writer.tag(11, WireType.LengthDelimited).string(message.aggregateReduceOnlyQuantity);
|
|
904
|
+
if (message.updatedAt !== 0n)
|
|
905
|
+
writer.tag(12, WireType.Varint).sint64(message.updatedAt);
|
|
906
|
+
if (message.createdAt !== 0n)
|
|
907
|
+
writer.tag(13, WireType.Varint).sint64(message.createdAt);
|
|
908
|
+
if (message.fundingLast !== "")
|
|
909
|
+
writer.tag(14, WireType.LengthDelimited).string(message.fundingLast);
|
|
910
|
+
if (message.fundingSum !== "")
|
|
911
|
+
writer.tag(15, WireType.LengthDelimited).string(message.fundingSum);
|
|
912
|
+
if (message.cumulativeFundingEntry !== "")
|
|
913
|
+
writer.tag(16, WireType.LengthDelimited).string(message.cumulativeFundingEntry);
|
|
914
|
+
if (message.effectiveCumulativeFundingEntry !== "")
|
|
915
|
+
writer.tag(17, WireType.LengthDelimited).string(message.effectiveCumulativeFundingEntry);
|
|
916
|
+
let u = options.writeUnknownFields;
|
|
917
|
+
if (u !== false)
|
|
918
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
919
|
+
return writer;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
const DerivativePosition = new DerivativePosition$Type();
|
|
923
|
+
class AccountPortfolioBalancesRequest$Type extends MessageType {
|
|
924
|
+
constructor() {
|
|
925
|
+
super("injective_portfolio_rpc.AccountPortfolioBalancesRequest", [
|
|
926
|
+
{
|
|
927
|
+
no: 1,
|
|
928
|
+
name: "account_address",
|
|
929
|
+
kind: "scalar",
|
|
930
|
+
T: 9
|
|
931
|
+
/*ScalarType.STRING*/
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
no: 2,
|
|
935
|
+
name: "usd",
|
|
936
|
+
kind: "scalar",
|
|
937
|
+
T: 8
|
|
938
|
+
/*ScalarType.BOOL*/
|
|
939
|
+
}
|
|
940
|
+
]);
|
|
941
|
+
}
|
|
942
|
+
create(value) {
|
|
943
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
944
|
+
message.accountAddress = "";
|
|
945
|
+
message.usd = false;
|
|
946
|
+
if (value !== void 0)
|
|
947
|
+
reflectionMergePartial(this, message, value);
|
|
948
|
+
return message;
|
|
949
|
+
}
|
|
950
|
+
internalBinaryRead(reader, length, options, target) {
|
|
951
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
952
|
+
while (reader.pos < end) {
|
|
953
|
+
let [fieldNo, wireType] = reader.tag();
|
|
954
|
+
switch (fieldNo) {
|
|
955
|
+
case /* string account_address */
|
|
956
|
+
1:
|
|
957
|
+
message.accountAddress = reader.string();
|
|
958
|
+
break;
|
|
959
|
+
case /* bool usd */
|
|
960
|
+
2:
|
|
961
|
+
message.usd = reader.bool();
|
|
962
|
+
break;
|
|
963
|
+
default:
|
|
964
|
+
let u = options.readUnknownField;
|
|
965
|
+
if (u === "throw")
|
|
966
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
967
|
+
let d = reader.skip(wireType);
|
|
968
|
+
if (u !== false)
|
|
969
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
return message;
|
|
973
|
+
}
|
|
974
|
+
internalBinaryWrite(message, writer, options) {
|
|
975
|
+
if (message.accountAddress !== "")
|
|
976
|
+
writer.tag(1, WireType.LengthDelimited).string(message.accountAddress);
|
|
977
|
+
if (message.usd !== false)
|
|
978
|
+
writer.tag(2, WireType.Varint).bool(message.usd);
|
|
979
|
+
let u = options.writeUnknownFields;
|
|
980
|
+
if (u !== false)
|
|
981
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
982
|
+
return writer;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
const AccountPortfolioBalancesRequest = new AccountPortfolioBalancesRequest$Type();
|
|
986
|
+
class AccountPortfolioBalancesResponse$Type extends MessageType {
|
|
987
|
+
constructor() {
|
|
988
|
+
super("injective_portfolio_rpc.AccountPortfolioBalancesResponse", [
|
|
989
|
+
{ no: 1, name: "portfolio", kind: "message", T: () => PortfolioBalances }
|
|
990
|
+
]);
|
|
991
|
+
}
|
|
992
|
+
create(value) {
|
|
993
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
994
|
+
if (value !== void 0)
|
|
995
|
+
reflectionMergePartial(this, message, value);
|
|
996
|
+
return message;
|
|
997
|
+
}
|
|
998
|
+
internalBinaryRead(reader, length, options, target) {
|
|
999
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1000
|
+
while (reader.pos < end) {
|
|
1001
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1002
|
+
switch (fieldNo) {
|
|
1003
|
+
case /* injective_portfolio_rpc.PortfolioBalances portfolio */
|
|
1004
|
+
1:
|
|
1005
|
+
message.portfolio = PortfolioBalances.internalBinaryRead(reader, reader.uint32(), options, message.portfolio);
|
|
1006
|
+
break;
|
|
1007
|
+
default:
|
|
1008
|
+
let u = options.readUnknownField;
|
|
1009
|
+
if (u === "throw")
|
|
1010
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1011
|
+
let d = reader.skip(wireType);
|
|
1012
|
+
if (u !== false)
|
|
1013
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
return message;
|
|
1017
|
+
}
|
|
1018
|
+
internalBinaryWrite(message, writer, options) {
|
|
1019
|
+
if (message.portfolio)
|
|
1020
|
+
PortfolioBalances.internalBinaryWrite(message.portfolio, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1021
|
+
let u = options.writeUnknownFields;
|
|
1022
|
+
if (u !== false)
|
|
1023
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1024
|
+
return writer;
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
const AccountPortfolioBalancesResponse = new AccountPortfolioBalancesResponse$Type();
|
|
1028
|
+
class PortfolioBalances$Type extends MessageType {
|
|
1029
|
+
constructor() {
|
|
1030
|
+
super("injective_portfolio_rpc.PortfolioBalances", [
|
|
1031
|
+
{
|
|
1032
|
+
no: 1,
|
|
1033
|
+
name: "account_address",
|
|
1034
|
+
kind: "scalar",
|
|
1035
|
+
T: 9
|
|
1036
|
+
/*ScalarType.STRING*/
|
|
1037
|
+
},
|
|
1038
|
+
{ no: 2, name: "bank_balances", kind: "message", repeat: 2, T: () => Coin },
|
|
1039
|
+
{ no: 3, name: "subaccounts", kind: "message", repeat: 2, T: () => SubaccountBalanceV2 },
|
|
1040
|
+
{
|
|
1041
|
+
no: 4,
|
|
1042
|
+
name: "total_usd",
|
|
1043
|
+
kind: "scalar",
|
|
1044
|
+
T: 9
|
|
1045
|
+
/*ScalarType.STRING*/
|
|
1046
|
+
}
|
|
1047
|
+
]);
|
|
1048
|
+
}
|
|
1049
|
+
create(value) {
|
|
1050
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1051
|
+
message.accountAddress = "";
|
|
1052
|
+
message.bankBalances = [];
|
|
1053
|
+
message.subaccounts = [];
|
|
1054
|
+
message.totalUsd = "";
|
|
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 account_address */
|
|
1065
|
+
1:
|
|
1066
|
+
message.accountAddress = reader.string();
|
|
1067
|
+
break;
|
|
1068
|
+
case /* repeated injective_portfolio_rpc.Coin bank_balances */
|
|
1069
|
+
2:
|
|
1070
|
+
message.bankBalances.push(Coin.internalBinaryRead(reader, reader.uint32(), options));
|
|
1071
|
+
break;
|
|
1072
|
+
case /* repeated injective_portfolio_rpc.SubaccountBalanceV2 subaccounts */
|
|
1073
|
+
3:
|
|
1074
|
+
message.subaccounts.push(SubaccountBalanceV2.internalBinaryRead(reader, reader.uint32(), options));
|
|
1075
|
+
break;
|
|
1076
|
+
case /* string total_usd */
|
|
1077
|
+
4:
|
|
1078
|
+
message.totalUsd = reader.string();
|
|
1079
|
+
break;
|
|
1080
|
+
default:
|
|
1081
|
+
let u = options.readUnknownField;
|
|
1082
|
+
if (u === "throw")
|
|
1083
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1084
|
+
let d = reader.skip(wireType);
|
|
1085
|
+
if (u !== false)
|
|
1086
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
return message;
|
|
1090
|
+
}
|
|
1091
|
+
internalBinaryWrite(message, writer, options) {
|
|
1092
|
+
if (message.accountAddress !== "")
|
|
1093
|
+
writer.tag(1, WireType.LengthDelimited).string(message.accountAddress);
|
|
1094
|
+
for (let i = 0; i < message.bankBalances.length; i++)
|
|
1095
|
+
Coin.internalBinaryWrite(message.bankBalances[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
1096
|
+
for (let i = 0; i < message.subaccounts.length; i++)
|
|
1097
|
+
SubaccountBalanceV2.internalBinaryWrite(message.subaccounts[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
1098
|
+
if (message.totalUsd !== "")
|
|
1099
|
+
writer.tag(4, WireType.LengthDelimited).string(message.totalUsd);
|
|
1100
|
+
let u = options.writeUnknownFields;
|
|
1101
|
+
if (u !== false)
|
|
1102
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1103
|
+
return writer;
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
const PortfolioBalances = new PortfolioBalances$Type();
|
|
1107
|
+
class StreamAccountPortfolioRequest$Type extends MessageType {
|
|
1108
|
+
constructor() {
|
|
1109
|
+
super("injective_portfolio_rpc.StreamAccountPortfolioRequest", [
|
|
1110
|
+
{
|
|
1111
|
+
no: 1,
|
|
1112
|
+
name: "account_address",
|
|
1113
|
+
kind: "scalar",
|
|
1114
|
+
T: 9
|
|
1115
|
+
/*ScalarType.STRING*/
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
no: 2,
|
|
1119
|
+
name: "subaccount_id",
|
|
1120
|
+
kind: "scalar",
|
|
1121
|
+
T: 9
|
|
1122
|
+
/*ScalarType.STRING*/
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
no: 3,
|
|
1126
|
+
name: "type",
|
|
1127
|
+
kind: "scalar",
|
|
1128
|
+
T: 9
|
|
1129
|
+
/*ScalarType.STRING*/
|
|
1130
|
+
}
|
|
1131
|
+
]);
|
|
1132
|
+
}
|
|
1133
|
+
create(value) {
|
|
1134
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1135
|
+
message.accountAddress = "";
|
|
1136
|
+
message.subaccountId = "";
|
|
1137
|
+
message.type = "";
|
|
1138
|
+
if (value !== void 0)
|
|
1139
|
+
reflectionMergePartial(this, message, value);
|
|
1140
|
+
return message;
|
|
1141
|
+
}
|
|
1142
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1143
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1144
|
+
while (reader.pos < end) {
|
|
1145
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1146
|
+
switch (fieldNo) {
|
|
1147
|
+
case /* string account_address */
|
|
1148
|
+
1:
|
|
1149
|
+
message.accountAddress = reader.string();
|
|
1150
|
+
break;
|
|
1151
|
+
case /* string subaccount_id */
|
|
1152
|
+
2:
|
|
1153
|
+
message.subaccountId = reader.string();
|
|
1154
|
+
break;
|
|
1155
|
+
case /* string type */
|
|
1156
|
+
3:
|
|
1157
|
+
message.type = reader.string();
|
|
1158
|
+
break;
|
|
1159
|
+
default:
|
|
1160
|
+
let u = options.readUnknownField;
|
|
1161
|
+
if (u === "throw")
|
|
1162
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1163
|
+
let d = reader.skip(wireType);
|
|
1164
|
+
if (u !== false)
|
|
1165
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
return message;
|
|
1169
|
+
}
|
|
1170
|
+
internalBinaryWrite(message, writer, options) {
|
|
1171
|
+
if (message.accountAddress !== "")
|
|
1172
|
+
writer.tag(1, WireType.LengthDelimited).string(message.accountAddress);
|
|
1173
|
+
if (message.subaccountId !== "")
|
|
1174
|
+
writer.tag(2, WireType.LengthDelimited).string(message.subaccountId);
|
|
1175
|
+
if (message.type !== "")
|
|
1176
|
+
writer.tag(3, WireType.LengthDelimited).string(message.type);
|
|
1177
|
+
let u = options.writeUnknownFields;
|
|
1178
|
+
if (u !== false)
|
|
1179
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1180
|
+
return writer;
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
const StreamAccountPortfolioRequest = new StreamAccountPortfolioRequest$Type();
|
|
1184
|
+
class StreamAccountPortfolioResponse$Type extends MessageType {
|
|
1185
|
+
constructor() {
|
|
1186
|
+
super("injective_portfolio_rpc.StreamAccountPortfolioResponse", [
|
|
1187
|
+
{
|
|
1188
|
+
no: 1,
|
|
1189
|
+
name: "type",
|
|
1190
|
+
kind: "scalar",
|
|
1191
|
+
T: 9
|
|
1192
|
+
/*ScalarType.STRING*/
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
no: 2,
|
|
1196
|
+
name: "denom",
|
|
1197
|
+
kind: "scalar",
|
|
1198
|
+
T: 9
|
|
1199
|
+
/*ScalarType.STRING*/
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
no: 3,
|
|
1203
|
+
name: "amount",
|
|
1204
|
+
kind: "scalar",
|
|
1205
|
+
T: 9
|
|
1206
|
+
/*ScalarType.STRING*/
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
no: 4,
|
|
1210
|
+
name: "subaccount_id",
|
|
1211
|
+
kind: "scalar",
|
|
1212
|
+
T: 9
|
|
1213
|
+
/*ScalarType.STRING*/
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
no: 5,
|
|
1217
|
+
name: "timestamp",
|
|
1218
|
+
kind: "scalar",
|
|
1219
|
+
T: 18,
|
|
1220
|
+
L: 0
|
|
1221
|
+
/*LongType.BIGINT*/
|
|
1222
|
+
}
|
|
1223
|
+
]);
|
|
1224
|
+
}
|
|
1225
|
+
create(value) {
|
|
1226
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1227
|
+
message.type = "";
|
|
1228
|
+
message.denom = "";
|
|
1229
|
+
message.amount = "";
|
|
1230
|
+
message.subaccountId = "";
|
|
1231
|
+
message.timestamp = 0n;
|
|
1232
|
+
if (value !== void 0)
|
|
1233
|
+
reflectionMergePartial(this, message, value);
|
|
1234
|
+
return message;
|
|
1235
|
+
}
|
|
1236
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1237
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1238
|
+
while (reader.pos < end) {
|
|
1239
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1240
|
+
switch (fieldNo) {
|
|
1241
|
+
case /* string type */
|
|
1242
|
+
1:
|
|
1243
|
+
message.type = reader.string();
|
|
1244
|
+
break;
|
|
1245
|
+
case /* string denom */
|
|
1246
|
+
2:
|
|
1247
|
+
message.denom = reader.string();
|
|
1248
|
+
break;
|
|
1249
|
+
case /* string amount */
|
|
1250
|
+
3:
|
|
1251
|
+
message.amount = reader.string();
|
|
1252
|
+
break;
|
|
1253
|
+
case /* string subaccount_id */
|
|
1254
|
+
4:
|
|
1255
|
+
message.subaccountId = reader.string();
|
|
1256
|
+
break;
|
|
1257
|
+
case /* sint64 timestamp */
|
|
1258
|
+
5:
|
|
1259
|
+
message.timestamp = reader.sint64().toBigInt();
|
|
1260
|
+
break;
|
|
1261
|
+
default:
|
|
1262
|
+
let u = options.readUnknownField;
|
|
1263
|
+
if (u === "throw")
|
|
1264
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1265
|
+
let d = reader.skip(wireType);
|
|
1266
|
+
if (u !== false)
|
|
1267
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
return message;
|
|
1271
|
+
}
|
|
1272
|
+
internalBinaryWrite(message, writer, options) {
|
|
1273
|
+
if (message.type !== "")
|
|
1274
|
+
writer.tag(1, WireType.LengthDelimited).string(message.type);
|
|
1275
|
+
if (message.denom !== "")
|
|
1276
|
+
writer.tag(2, WireType.LengthDelimited).string(message.denom);
|
|
1277
|
+
if (message.amount !== "")
|
|
1278
|
+
writer.tag(3, WireType.LengthDelimited).string(message.amount);
|
|
1279
|
+
if (message.subaccountId !== "")
|
|
1280
|
+
writer.tag(4, WireType.LengthDelimited).string(message.subaccountId);
|
|
1281
|
+
if (message.timestamp !== 0n)
|
|
1282
|
+
writer.tag(5, WireType.Varint).sint64(message.timestamp);
|
|
1283
|
+
let u = options.writeUnknownFields;
|
|
1284
|
+
if (u !== false)
|
|
1285
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1286
|
+
return writer;
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
const StreamAccountPortfolioResponse = new StreamAccountPortfolioResponse$Type();
|
|
1290
|
+
const InjectivePortfolioRPC = new ServiceType("injective_portfolio_rpc.InjectivePortfolioRPC", [
|
|
1291
|
+
{ name: "TokenHolders", options: {}, I: TokenHoldersRequest, O: TokenHoldersResponse },
|
|
1292
|
+
{ name: "AccountPortfolio", options: {}, I: AccountPortfolioRequest, O: AccountPortfolioResponse },
|
|
1293
|
+
{ name: "AccountPortfolioBalances", options: {}, I: AccountPortfolioBalancesRequest, O: AccountPortfolioBalancesResponse },
|
|
1294
|
+
{ name: "StreamAccountPortfolio", serverStreaming: true, options: {}, I: StreamAccountPortfolioRequest, O: StreamAccountPortfolioResponse }
|
|
1295
|
+
]);
|
|
1296
|
+
export {
|
|
1297
|
+
AccountPortfolioBalancesRequest,
|
|
1298
|
+
AccountPortfolioBalancesResponse,
|
|
1299
|
+
AccountPortfolioRequest,
|
|
1300
|
+
AccountPortfolioResponse,
|
|
1301
|
+
Coin,
|
|
1302
|
+
DerivativePosition,
|
|
1303
|
+
Holder,
|
|
1304
|
+
InjectivePortfolioRPC,
|
|
1305
|
+
Portfolio,
|
|
1306
|
+
PortfolioBalances,
|
|
1307
|
+
PositionsWithUPNL,
|
|
1308
|
+
StreamAccountPortfolioRequest,
|
|
1309
|
+
StreamAccountPortfolioResponse,
|
|
1310
|
+
SubaccountBalanceV2,
|
|
1311
|
+
SubaccountDeposit,
|
|
1312
|
+
TokenHoldersRequest,
|
|
1313
|
+
TokenHoldersResponse
|
|
1314
|
+
};
|