@verana-labs/verana-types 0.10.1-dev.13 → 0.10.1-dev.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/amino-converter/pp.js +42 -26
- package/dist/codec/verana/de/v1/query.d.ts +72 -4
- package/dist/codec/verana/de/v1/query.js +261 -19
- package/dist/codec/verana/de/v1/types.d.ts +124 -34
- package/dist/codec/verana/de/v1/types.js +361 -109
- package/dist/codec/verana/pp/v1/tx.d.ts +17 -7
- package/dist/codec/verana/pp/v1/tx.js +157 -53
- package/dist/codec/verana/pp/v1/types.d.ts +5 -8
- package/dist/codec/verana/pp/v1/types.js +2 -93
- package/package.json +1 -1
|
@@ -38,7 +38,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
};
|
|
39
39
|
})();
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.VSOperatorAuthorization = exports.FeeGrant = exports.OperatorAuthorizationUsage = exports.OperatorAuthorization = exports.protobufPackage = void 0;
|
|
41
|
+
exports.VSOperatorAuthorization = exports.ParticipantAuthorizationRecord = exports.FeeGrant = exports.OperatorAuthorizationUsage = exports.OperatorAuthorization = exports.protobufPackage = void 0;
|
|
42
42
|
/* eslint-disable */
|
|
43
43
|
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
44
44
|
const coin_1 = require("../../../cosmos/base/v1beta1/coin");
|
|
@@ -48,37 +48,49 @@ const Long = require("long");
|
|
|
48
48
|
exports.protobufPackage = "verana.de.v1";
|
|
49
49
|
function createBaseOperatorAuthorization() {
|
|
50
50
|
return {
|
|
51
|
-
|
|
51
|
+
id: 0,
|
|
52
|
+
corporationId: 0,
|
|
52
53
|
operator: "",
|
|
53
54
|
msgTypes: [],
|
|
54
55
|
spendLimit: [],
|
|
56
|
+
remainingSpend: [],
|
|
55
57
|
feeSpendLimit: [],
|
|
58
|
+
remainingFeeSpend: [],
|
|
56
59
|
expiration: undefined,
|
|
57
60
|
period: undefined,
|
|
58
61
|
};
|
|
59
62
|
}
|
|
60
63
|
exports.OperatorAuthorization = {
|
|
61
64
|
encode(message, writer = _m0.Writer.create()) {
|
|
62
|
-
if (message.
|
|
63
|
-
writer.uint32(
|
|
65
|
+
if (message.id !== 0) {
|
|
66
|
+
writer.uint32(8).uint64(message.id);
|
|
67
|
+
}
|
|
68
|
+
if (message.corporationId !== 0) {
|
|
69
|
+
writer.uint32(16).uint64(message.corporationId);
|
|
64
70
|
}
|
|
65
71
|
if (message.operator !== "") {
|
|
66
|
-
writer.uint32(
|
|
72
|
+
writer.uint32(26).string(message.operator);
|
|
67
73
|
}
|
|
68
74
|
for (const v of message.msgTypes) {
|
|
69
|
-
writer.uint32(
|
|
75
|
+
writer.uint32(34).string(v);
|
|
70
76
|
}
|
|
71
77
|
for (const v of message.spendLimit) {
|
|
72
|
-
coin_1.Coin.encode(v, writer.uint32(
|
|
78
|
+
coin_1.Coin.encode(v, writer.uint32(42).fork()).ldelim();
|
|
79
|
+
}
|
|
80
|
+
for (const v of message.remainingSpend) {
|
|
81
|
+
coin_1.Coin.encode(v, writer.uint32(50).fork()).ldelim();
|
|
73
82
|
}
|
|
74
83
|
for (const v of message.feeSpendLimit) {
|
|
75
|
-
coin_1.Coin.encode(v, writer.uint32(
|
|
84
|
+
coin_1.Coin.encode(v, writer.uint32(58).fork()).ldelim();
|
|
85
|
+
}
|
|
86
|
+
for (const v of message.remainingFeeSpend) {
|
|
87
|
+
coin_1.Coin.encode(v, writer.uint32(66).fork()).ldelim();
|
|
76
88
|
}
|
|
77
89
|
if (message.expiration !== undefined) {
|
|
78
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.expiration), writer.uint32(
|
|
90
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.expiration), writer.uint32(74).fork()).ldelim();
|
|
79
91
|
}
|
|
80
92
|
if (message.period !== undefined) {
|
|
81
|
-
duration_1.Duration.encode(message.period, writer.uint32(
|
|
93
|
+
duration_1.Duration.encode(message.period, writer.uint32(82).fork()).ldelim();
|
|
82
94
|
}
|
|
83
95
|
return writer;
|
|
84
96
|
},
|
|
@@ -90,45 +102,63 @@ exports.OperatorAuthorization = {
|
|
|
90
102
|
const tag = reader.uint32();
|
|
91
103
|
switch (tag >>> 3) {
|
|
92
104
|
case 1:
|
|
93
|
-
if (tag !==
|
|
105
|
+
if (tag !== 8) {
|
|
94
106
|
break;
|
|
95
107
|
}
|
|
96
|
-
message.
|
|
108
|
+
message.id = longToNumber(reader.uint64());
|
|
97
109
|
continue;
|
|
98
110
|
case 2:
|
|
99
|
-
if (tag !==
|
|
111
|
+
if (tag !== 16) {
|
|
100
112
|
break;
|
|
101
113
|
}
|
|
102
|
-
message.
|
|
114
|
+
message.corporationId = longToNumber(reader.uint64());
|
|
103
115
|
continue;
|
|
104
116
|
case 3:
|
|
105
117
|
if (tag !== 26) {
|
|
106
118
|
break;
|
|
107
119
|
}
|
|
108
|
-
message.
|
|
120
|
+
message.operator = reader.string();
|
|
109
121
|
continue;
|
|
110
122
|
case 4:
|
|
111
123
|
if (tag !== 34) {
|
|
112
124
|
break;
|
|
113
125
|
}
|
|
114
|
-
message.
|
|
126
|
+
message.msgTypes.push(reader.string());
|
|
115
127
|
continue;
|
|
116
128
|
case 5:
|
|
117
129
|
if (tag !== 42) {
|
|
118
130
|
break;
|
|
119
131
|
}
|
|
120
|
-
message.
|
|
132
|
+
message.spendLimit.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
121
133
|
continue;
|
|
122
134
|
case 6:
|
|
123
135
|
if (tag !== 50) {
|
|
124
136
|
break;
|
|
125
137
|
}
|
|
126
|
-
message.
|
|
138
|
+
message.remainingSpend.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
127
139
|
continue;
|
|
128
140
|
case 7:
|
|
129
141
|
if (tag !== 58) {
|
|
130
142
|
break;
|
|
131
143
|
}
|
|
144
|
+
message.feeSpendLimit.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
145
|
+
continue;
|
|
146
|
+
case 8:
|
|
147
|
+
if (tag !== 66) {
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
message.remainingFeeSpend.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
151
|
+
continue;
|
|
152
|
+
case 9:
|
|
153
|
+
if (tag !== 74) {
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
message.expiration = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
157
|
+
continue;
|
|
158
|
+
case 10:
|
|
159
|
+
if (tag !== 82) {
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
132
162
|
message.period = duration_1.Duration.decode(reader, reader.uint32());
|
|
133
163
|
continue;
|
|
134
164
|
}
|
|
@@ -141,24 +171,34 @@ exports.OperatorAuthorization = {
|
|
|
141
171
|
},
|
|
142
172
|
fromJSON(object) {
|
|
143
173
|
return {
|
|
144
|
-
|
|
174
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
175
|
+
corporationId: isSet(object.corporationId) ? globalThis.Number(object.corporationId) : 0,
|
|
145
176
|
operator: isSet(object.operator) ? globalThis.String(object.operator) : "",
|
|
146
177
|
msgTypes: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.msgTypes) ? object.msgTypes.map((e) => globalThis.String(e)) : [],
|
|
147
178
|
spendLimit: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.spendLimit)
|
|
148
179
|
? object.spendLimit.map((e) => coin_1.Coin.fromJSON(e))
|
|
149
180
|
: [],
|
|
181
|
+
remainingSpend: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.remainingSpend)
|
|
182
|
+
? object.remainingSpend.map((e) => coin_1.Coin.fromJSON(e))
|
|
183
|
+
: [],
|
|
150
184
|
feeSpendLimit: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.feeSpendLimit)
|
|
151
185
|
? object.feeSpendLimit.map((e) => coin_1.Coin.fromJSON(e))
|
|
152
186
|
: [],
|
|
187
|
+
remainingFeeSpend: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.remainingFeeSpend)
|
|
188
|
+
? object.remainingFeeSpend.map((e) => coin_1.Coin.fromJSON(e))
|
|
189
|
+
: [],
|
|
153
190
|
expiration: isSet(object.expiration) ? fromJsonTimestamp(object.expiration) : undefined,
|
|
154
191
|
period: isSet(object.period) ? duration_1.Duration.fromJSON(object.period) : undefined,
|
|
155
192
|
};
|
|
156
193
|
},
|
|
157
194
|
toJSON(message) {
|
|
158
|
-
var _a, _b, _c;
|
|
195
|
+
var _a, _b, _c, _d, _e;
|
|
159
196
|
const obj = {};
|
|
160
|
-
if (message.
|
|
161
|
-
obj.
|
|
197
|
+
if (message.id !== 0) {
|
|
198
|
+
obj.id = Math.round(message.id);
|
|
199
|
+
}
|
|
200
|
+
if (message.corporationId !== 0) {
|
|
201
|
+
obj.corporationId = Math.round(message.corporationId);
|
|
162
202
|
}
|
|
163
203
|
if (message.operator !== "") {
|
|
164
204
|
obj.operator = message.operator;
|
|
@@ -169,9 +209,15 @@ exports.OperatorAuthorization = {
|
|
|
169
209
|
if ((_b = message.spendLimit) === null || _b === void 0 ? void 0 : _b.length) {
|
|
170
210
|
obj.spendLimit = message.spendLimit.map((e) => coin_1.Coin.toJSON(e));
|
|
171
211
|
}
|
|
172
|
-
if ((_c = message.
|
|
212
|
+
if ((_c = message.remainingSpend) === null || _c === void 0 ? void 0 : _c.length) {
|
|
213
|
+
obj.remainingSpend = message.remainingSpend.map((e) => coin_1.Coin.toJSON(e));
|
|
214
|
+
}
|
|
215
|
+
if ((_d = message.feeSpendLimit) === null || _d === void 0 ? void 0 : _d.length) {
|
|
173
216
|
obj.feeSpendLimit = message.feeSpendLimit.map((e) => coin_1.Coin.toJSON(e));
|
|
174
217
|
}
|
|
218
|
+
if ((_e = message.remainingFeeSpend) === null || _e === void 0 ? void 0 : _e.length) {
|
|
219
|
+
obj.remainingFeeSpend = message.remainingFeeSpend.map((e) => coin_1.Coin.toJSON(e));
|
|
220
|
+
}
|
|
175
221
|
if (message.expiration !== undefined) {
|
|
176
222
|
obj.expiration = message.expiration.toISOString();
|
|
177
223
|
}
|
|
@@ -184,14 +230,17 @@ exports.OperatorAuthorization = {
|
|
|
184
230
|
return exports.OperatorAuthorization.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
185
231
|
},
|
|
186
232
|
fromPartial(object) {
|
|
187
|
-
var _a, _b, _c, _d, _e, _f;
|
|
233
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
188
234
|
const message = createBaseOperatorAuthorization();
|
|
189
|
-
message.
|
|
190
|
-
message.
|
|
191
|
-
message.
|
|
192
|
-
message.
|
|
193
|
-
message.
|
|
194
|
-
message.
|
|
235
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
|
|
236
|
+
message.corporationId = (_b = object.corporationId) !== null && _b !== void 0 ? _b : 0;
|
|
237
|
+
message.operator = (_c = object.operator) !== null && _c !== void 0 ? _c : "";
|
|
238
|
+
message.msgTypes = ((_d = object.msgTypes) === null || _d === void 0 ? void 0 : _d.map((e) => e)) || [];
|
|
239
|
+
message.spendLimit = ((_e = object.spendLimit) === null || _e === void 0 ? void 0 : _e.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
240
|
+
message.remainingSpend = ((_f = object.remainingSpend) === null || _f === void 0 ? void 0 : _f.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
241
|
+
message.feeSpendLimit = ((_g = object.feeSpendLimit) === null || _g === void 0 ? void 0 : _g.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
242
|
+
message.remainingFeeSpend = ((_h = object.remainingFeeSpend) === null || _h === void 0 ? void 0 : _h.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
243
|
+
message.expiration = (_j = object.expiration) !== null && _j !== void 0 ? _j : undefined;
|
|
195
244
|
message.period = (object.period !== undefined && object.period !== null)
|
|
196
245
|
? duration_1.Duration.fromPartial(object.period)
|
|
197
246
|
: undefined;
|
|
@@ -199,21 +248,18 @@ exports.OperatorAuthorization = {
|
|
|
199
248
|
},
|
|
200
249
|
};
|
|
201
250
|
function createBaseOperatorAuthorizationUsage() {
|
|
202
|
-
return {
|
|
251
|
+
return { operatorAuthorizationId: 0, remaining: [], lastReset: undefined };
|
|
203
252
|
}
|
|
204
253
|
exports.OperatorAuthorizationUsage = {
|
|
205
254
|
encode(message, writer = _m0.Writer.create()) {
|
|
206
|
-
if (message.
|
|
207
|
-
writer.uint32(
|
|
208
|
-
}
|
|
209
|
-
if (message.operator !== "") {
|
|
210
|
-
writer.uint32(18).string(message.operator);
|
|
255
|
+
if (message.operatorAuthorizationId !== 0) {
|
|
256
|
+
writer.uint32(8).uint64(message.operatorAuthorizationId);
|
|
211
257
|
}
|
|
212
258
|
for (const v of message.remaining) {
|
|
213
|
-
coin_1.Coin.encode(v, writer.uint32(
|
|
259
|
+
coin_1.Coin.encode(v, writer.uint32(18).fork()).ldelim();
|
|
214
260
|
}
|
|
215
261
|
if (message.lastReset !== undefined) {
|
|
216
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.lastReset), writer.uint32(
|
|
262
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.lastReset), writer.uint32(26).fork()).ldelim();
|
|
217
263
|
}
|
|
218
264
|
return writer;
|
|
219
265
|
},
|
|
@@ -225,27 +271,21 @@ exports.OperatorAuthorizationUsage = {
|
|
|
225
271
|
const tag = reader.uint32();
|
|
226
272
|
switch (tag >>> 3) {
|
|
227
273
|
case 1:
|
|
228
|
-
if (tag !==
|
|
274
|
+
if (tag !== 8) {
|
|
229
275
|
break;
|
|
230
276
|
}
|
|
231
|
-
message.
|
|
277
|
+
message.operatorAuthorizationId = longToNumber(reader.uint64());
|
|
232
278
|
continue;
|
|
233
279
|
case 2:
|
|
234
280
|
if (tag !== 18) {
|
|
235
281
|
break;
|
|
236
282
|
}
|
|
237
|
-
message.
|
|
283
|
+
message.remaining.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
238
284
|
continue;
|
|
239
285
|
case 3:
|
|
240
286
|
if (tag !== 26) {
|
|
241
287
|
break;
|
|
242
288
|
}
|
|
243
|
-
message.remaining.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
244
|
-
continue;
|
|
245
|
-
case 4:
|
|
246
|
-
if (tag !== 34) {
|
|
247
|
-
break;
|
|
248
|
-
}
|
|
249
289
|
message.lastReset = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
250
290
|
continue;
|
|
251
291
|
}
|
|
@@ -258,8 +298,9 @@ exports.OperatorAuthorizationUsage = {
|
|
|
258
298
|
},
|
|
259
299
|
fromJSON(object) {
|
|
260
300
|
return {
|
|
261
|
-
|
|
262
|
-
|
|
301
|
+
operatorAuthorizationId: isSet(object.operatorAuthorizationId)
|
|
302
|
+
? globalThis.Number(object.operatorAuthorizationId)
|
|
303
|
+
: 0,
|
|
263
304
|
remaining: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.remaining) ? object.remaining.map((e) => coin_1.Coin.fromJSON(e)) : [],
|
|
264
305
|
lastReset: isSet(object.lastReset) ? fromJsonTimestamp(object.lastReset) : undefined,
|
|
265
306
|
};
|
|
@@ -267,11 +308,8 @@ exports.OperatorAuthorizationUsage = {
|
|
|
267
308
|
toJSON(message) {
|
|
268
309
|
var _a;
|
|
269
310
|
const obj = {};
|
|
270
|
-
if (message.
|
|
271
|
-
obj.
|
|
272
|
-
}
|
|
273
|
-
if (message.operator !== "") {
|
|
274
|
-
obj.operator = message.operator;
|
|
311
|
+
if (message.operatorAuthorizationId !== 0) {
|
|
312
|
+
obj.operatorAuthorizationId = Math.round(message.operatorAuthorizationId);
|
|
275
313
|
}
|
|
276
314
|
if ((_a = message.remaining) === null || _a === void 0 ? void 0 : _a.length) {
|
|
277
315
|
obj.remaining = message.remaining.map((e) => coin_1.Coin.toJSON(e));
|
|
@@ -285,22 +323,29 @@ exports.OperatorAuthorizationUsage = {
|
|
|
285
323
|
return exports.OperatorAuthorizationUsage.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
286
324
|
},
|
|
287
325
|
fromPartial(object) {
|
|
288
|
-
var _a, _b, _c
|
|
326
|
+
var _a, _b, _c;
|
|
289
327
|
const message = createBaseOperatorAuthorizationUsage();
|
|
290
|
-
message.
|
|
291
|
-
message.
|
|
292
|
-
message.
|
|
293
|
-
message.lastReset = (_d = object.lastReset) !== null && _d !== void 0 ? _d : undefined;
|
|
328
|
+
message.operatorAuthorizationId = (_a = object.operatorAuthorizationId) !== null && _a !== void 0 ? _a : 0;
|
|
329
|
+
message.remaining = ((_b = object.remaining) === null || _b === void 0 ? void 0 : _b.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
330
|
+
message.lastReset = (_c = object.lastReset) !== null && _c !== void 0 ? _c : undefined;
|
|
294
331
|
return message;
|
|
295
332
|
},
|
|
296
333
|
};
|
|
297
334
|
function createBaseFeeGrant() {
|
|
298
|
-
return {
|
|
335
|
+
return {
|
|
336
|
+
grantorCorporationId: 0,
|
|
337
|
+
grantee: "",
|
|
338
|
+
msgTypes: [],
|
|
339
|
+
spendLimit: [],
|
|
340
|
+
remainingSpend: [],
|
|
341
|
+
expiration: undefined,
|
|
342
|
+
period: undefined,
|
|
343
|
+
};
|
|
299
344
|
}
|
|
300
345
|
exports.FeeGrant = {
|
|
301
346
|
encode(message, writer = _m0.Writer.create()) {
|
|
302
|
-
if (message.
|
|
303
|
-
writer.uint32(
|
|
347
|
+
if (message.grantorCorporationId !== 0) {
|
|
348
|
+
writer.uint32(8).uint64(message.grantorCorporationId);
|
|
304
349
|
}
|
|
305
350
|
if (message.grantee !== "") {
|
|
306
351
|
writer.uint32(18).string(message.grantee);
|
|
@@ -311,11 +356,14 @@ exports.FeeGrant = {
|
|
|
311
356
|
for (const v of message.spendLimit) {
|
|
312
357
|
coin_1.Coin.encode(v, writer.uint32(34).fork()).ldelim();
|
|
313
358
|
}
|
|
359
|
+
for (const v of message.remainingSpend) {
|
|
360
|
+
coin_1.Coin.encode(v, writer.uint32(42).fork()).ldelim();
|
|
361
|
+
}
|
|
314
362
|
if (message.expiration !== undefined) {
|
|
315
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.expiration), writer.uint32(
|
|
363
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.expiration), writer.uint32(50).fork()).ldelim();
|
|
316
364
|
}
|
|
317
365
|
if (message.period !== undefined) {
|
|
318
|
-
duration_1.Duration.encode(message.period, writer.uint32(
|
|
366
|
+
duration_1.Duration.encode(message.period, writer.uint32(58).fork()).ldelim();
|
|
319
367
|
}
|
|
320
368
|
return writer;
|
|
321
369
|
},
|
|
@@ -327,10 +375,10 @@ exports.FeeGrant = {
|
|
|
327
375
|
const tag = reader.uint32();
|
|
328
376
|
switch (tag >>> 3) {
|
|
329
377
|
case 1:
|
|
330
|
-
if (tag !==
|
|
378
|
+
if (tag !== 8) {
|
|
331
379
|
break;
|
|
332
380
|
}
|
|
333
|
-
message.
|
|
381
|
+
message.grantorCorporationId = longToNumber(reader.uint64());
|
|
334
382
|
continue;
|
|
335
383
|
case 2:
|
|
336
384
|
if (tag !== 18) {
|
|
@@ -354,12 +402,18 @@ exports.FeeGrant = {
|
|
|
354
402
|
if (tag !== 42) {
|
|
355
403
|
break;
|
|
356
404
|
}
|
|
357
|
-
message.
|
|
405
|
+
message.remainingSpend.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
358
406
|
continue;
|
|
359
407
|
case 6:
|
|
360
408
|
if (tag !== 50) {
|
|
361
409
|
break;
|
|
362
410
|
}
|
|
411
|
+
message.expiration = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
412
|
+
continue;
|
|
413
|
+
case 7:
|
|
414
|
+
if (tag !== 58) {
|
|
415
|
+
break;
|
|
416
|
+
}
|
|
363
417
|
message.period = duration_1.Duration.decode(reader, reader.uint32());
|
|
364
418
|
continue;
|
|
365
419
|
}
|
|
@@ -372,21 +426,24 @@ exports.FeeGrant = {
|
|
|
372
426
|
},
|
|
373
427
|
fromJSON(object) {
|
|
374
428
|
return {
|
|
375
|
-
|
|
429
|
+
grantorCorporationId: isSet(object.grantorCorporationId) ? globalThis.Number(object.grantorCorporationId) : 0,
|
|
376
430
|
grantee: isSet(object.grantee) ? globalThis.String(object.grantee) : "",
|
|
377
431
|
msgTypes: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.msgTypes) ? object.msgTypes.map((e) => globalThis.String(e)) : [],
|
|
378
432
|
spendLimit: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.spendLimit)
|
|
379
433
|
? object.spendLimit.map((e) => coin_1.Coin.fromJSON(e))
|
|
380
434
|
: [],
|
|
435
|
+
remainingSpend: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.remainingSpend)
|
|
436
|
+
? object.remainingSpend.map((e) => coin_1.Coin.fromJSON(e))
|
|
437
|
+
: [],
|
|
381
438
|
expiration: isSet(object.expiration) ? fromJsonTimestamp(object.expiration) : undefined,
|
|
382
439
|
period: isSet(object.period) ? duration_1.Duration.fromJSON(object.period) : undefined,
|
|
383
440
|
};
|
|
384
441
|
},
|
|
385
442
|
toJSON(message) {
|
|
386
|
-
var _a, _b;
|
|
443
|
+
var _a, _b, _c;
|
|
387
444
|
const obj = {};
|
|
388
|
-
if (message.
|
|
389
|
-
obj.
|
|
445
|
+
if (message.grantorCorporationId !== 0) {
|
|
446
|
+
obj.grantorCorporationId = Math.round(message.grantorCorporationId);
|
|
390
447
|
}
|
|
391
448
|
if (message.grantee !== "") {
|
|
392
449
|
obj.grantee = message.grantee;
|
|
@@ -397,6 +454,9 @@ exports.FeeGrant = {
|
|
|
397
454
|
if ((_b = message.spendLimit) === null || _b === void 0 ? void 0 : _b.length) {
|
|
398
455
|
obj.spendLimit = message.spendLimit.map((e) => coin_1.Coin.toJSON(e));
|
|
399
456
|
}
|
|
457
|
+
if ((_c = message.remainingSpend) === null || _c === void 0 ? void 0 : _c.length) {
|
|
458
|
+
obj.remainingSpend = message.remainingSpend.map((e) => coin_1.Coin.toJSON(e));
|
|
459
|
+
}
|
|
400
460
|
if (message.expiration !== undefined) {
|
|
401
461
|
obj.expiration = message.expiration.toISOString();
|
|
402
462
|
}
|
|
@@ -409,13 +469,200 @@ exports.FeeGrant = {
|
|
|
409
469
|
return exports.FeeGrant.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
410
470
|
},
|
|
411
471
|
fromPartial(object) {
|
|
412
|
-
var _a, _b, _c, _d, _e;
|
|
472
|
+
var _a, _b, _c, _d, _e, _f;
|
|
413
473
|
const message = createBaseFeeGrant();
|
|
414
|
-
message.
|
|
474
|
+
message.grantorCorporationId = (_a = object.grantorCorporationId) !== null && _a !== void 0 ? _a : 0;
|
|
415
475
|
message.grantee = (_b = object.grantee) !== null && _b !== void 0 ? _b : "";
|
|
416
476
|
message.msgTypes = ((_c = object.msgTypes) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
|
|
417
477
|
message.spendLimit = ((_d = object.spendLimit) === null || _d === void 0 ? void 0 : _d.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
418
|
-
message.
|
|
478
|
+
message.remainingSpend = ((_e = object.remainingSpend) === null || _e === void 0 ? void 0 : _e.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
479
|
+
message.expiration = (_f = object.expiration) !== null && _f !== void 0 ? _f : undefined;
|
|
480
|
+
message.period = (object.period !== undefined && object.period !== null)
|
|
481
|
+
? duration_1.Duration.fromPartial(object.period)
|
|
482
|
+
: undefined;
|
|
483
|
+
return message;
|
|
484
|
+
},
|
|
485
|
+
};
|
|
486
|
+
function createBaseParticipantAuthorizationRecord() {
|
|
487
|
+
return {
|
|
488
|
+
participantId: 0,
|
|
489
|
+
msgTypes: [],
|
|
490
|
+
spendLimit: [],
|
|
491
|
+
remainingSpend: [],
|
|
492
|
+
feeSpendLimit: [],
|
|
493
|
+
remainingFeeSpend: [],
|
|
494
|
+
withFeegrant: false,
|
|
495
|
+
expiration: undefined,
|
|
496
|
+
period: undefined,
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
exports.ParticipantAuthorizationRecord = {
|
|
500
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
501
|
+
if (message.participantId !== 0) {
|
|
502
|
+
writer.uint32(8).uint64(message.participantId);
|
|
503
|
+
}
|
|
504
|
+
for (const v of message.msgTypes) {
|
|
505
|
+
writer.uint32(18).string(v);
|
|
506
|
+
}
|
|
507
|
+
for (const v of message.spendLimit) {
|
|
508
|
+
coin_1.Coin.encode(v, writer.uint32(26).fork()).ldelim();
|
|
509
|
+
}
|
|
510
|
+
for (const v of message.remainingSpend) {
|
|
511
|
+
coin_1.Coin.encode(v, writer.uint32(34).fork()).ldelim();
|
|
512
|
+
}
|
|
513
|
+
for (const v of message.feeSpendLimit) {
|
|
514
|
+
coin_1.Coin.encode(v, writer.uint32(42).fork()).ldelim();
|
|
515
|
+
}
|
|
516
|
+
for (const v of message.remainingFeeSpend) {
|
|
517
|
+
coin_1.Coin.encode(v, writer.uint32(50).fork()).ldelim();
|
|
518
|
+
}
|
|
519
|
+
if (message.withFeegrant !== false) {
|
|
520
|
+
writer.uint32(56).bool(message.withFeegrant);
|
|
521
|
+
}
|
|
522
|
+
if (message.expiration !== undefined) {
|
|
523
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.expiration), writer.uint32(66).fork()).ldelim();
|
|
524
|
+
}
|
|
525
|
+
if (message.period !== undefined) {
|
|
526
|
+
duration_1.Duration.encode(message.period, writer.uint32(74).fork()).ldelim();
|
|
527
|
+
}
|
|
528
|
+
return writer;
|
|
529
|
+
},
|
|
530
|
+
decode(input, length) {
|
|
531
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
532
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
533
|
+
const message = createBaseParticipantAuthorizationRecord();
|
|
534
|
+
while (reader.pos < end) {
|
|
535
|
+
const tag = reader.uint32();
|
|
536
|
+
switch (tag >>> 3) {
|
|
537
|
+
case 1:
|
|
538
|
+
if (tag !== 8) {
|
|
539
|
+
break;
|
|
540
|
+
}
|
|
541
|
+
message.participantId = longToNumber(reader.uint64());
|
|
542
|
+
continue;
|
|
543
|
+
case 2:
|
|
544
|
+
if (tag !== 18) {
|
|
545
|
+
break;
|
|
546
|
+
}
|
|
547
|
+
message.msgTypes.push(reader.string());
|
|
548
|
+
continue;
|
|
549
|
+
case 3:
|
|
550
|
+
if (tag !== 26) {
|
|
551
|
+
break;
|
|
552
|
+
}
|
|
553
|
+
message.spendLimit.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
554
|
+
continue;
|
|
555
|
+
case 4:
|
|
556
|
+
if (tag !== 34) {
|
|
557
|
+
break;
|
|
558
|
+
}
|
|
559
|
+
message.remainingSpend.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
560
|
+
continue;
|
|
561
|
+
case 5:
|
|
562
|
+
if (tag !== 42) {
|
|
563
|
+
break;
|
|
564
|
+
}
|
|
565
|
+
message.feeSpendLimit.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
566
|
+
continue;
|
|
567
|
+
case 6:
|
|
568
|
+
if (tag !== 50) {
|
|
569
|
+
break;
|
|
570
|
+
}
|
|
571
|
+
message.remainingFeeSpend.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
572
|
+
continue;
|
|
573
|
+
case 7:
|
|
574
|
+
if (tag !== 56) {
|
|
575
|
+
break;
|
|
576
|
+
}
|
|
577
|
+
message.withFeegrant = reader.bool();
|
|
578
|
+
continue;
|
|
579
|
+
case 8:
|
|
580
|
+
if (tag !== 66) {
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
message.expiration = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
584
|
+
continue;
|
|
585
|
+
case 9:
|
|
586
|
+
if (tag !== 74) {
|
|
587
|
+
break;
|
|
588
|
+
}
|
|
589
|
+
message.period = duration_1.Duration.decode(reader, reader.uint32());
|
|
590
|
+
continue;
|
|
591
|
+
}
|
|
592
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
593
|
+
break;
|
|
594
|
+
}
|
|
595
|
+
reader.skipType(tag & 7);
|
|
596
|
+
}
|
|
597
|
+
return message;
|
|
598
|
+
},
|
|
599
|
+
fromJSON(object) {
|
|
600
|
+
return {
|
|
601
|
+
participantId: isSet(object.participantId) ? globalThis.Number(object.participantId) : 0,
|
|
602
|
+
msgTypes: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.msgTypes) ? object.msgTypes.map((e) => globalThis.String(e)) : [],
|
|
603
|
+
spendLimit: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.spendLimit)
|
|
604
|
+
? object.spendLimit.map((e) => coin_1.Coin.fromJSON(e))
|
|
605
|
+
: [],
|
|
606
|
+
remainingSpend: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.remainingSpend)
|
|
607
|
+
? object.remainingSpend.map((e) => coin_1.Coin.fromJSON(e))
|
|
608
|
+
: [],
|
|
609
|
+
feeSpendLimit: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.feeSpendLimit)
|
|
610
|
+
? object.feeSpendLimit.map((e) => coin_1.Coin.fromJSON(e))
|
|
611
|
+
: [],
|
|
612
|
+
remainingFeeSpend: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.remainingFeeSpend)
|
|
613
|
+
? object.remainingFeeSpend.map((e) => coin_1.Coin.fromJSON(e))
|
|
614
|
+
: [],
|
|
615
|
+
withFeegrant: isSet(object.withFeegrant) ? globalThis.Boolean(object.withFeegrant) : false,
|
|
616
|
+
expiration: isSet(object.expiration) ? fromJsonTimestamp(object.expiration) : undefined,
|
|
617
|
+
period: isSet(object.period) ? duration_1.Duration.fromJSON(object.period) : undefined,
|
|
618
|
+
};
|
|
619
|
+
},
|
|
620
|
+
toJSON(message) {
|
|
621
|
+
var _a, _b, _c, _d, _e;
|
|
622
|
+
const obj = {};
|
|
623
|
+
if (message.participantId !== 0) {
|
|
624
|
+
obj.participantId = Math.round(message.participantId);
|
|
625
|
+
}
|
|
626
|
+
if ((_a = message.msgTypes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
627
|
+
obj.msgTypes = message.msgTypes;
|
|
628
|
+
}
|
|
629
|
+
if ((_b = message.spendLimit) === null || _b === void 0 ? void 0 : _b.length) {
|
|
630
|
+
obj.spendLimit = message.spendLimit.map((e) => coin_1.Coin.toJSON(e));
|
|
631
|
+
}
|
|
632
|
+
if ((_c = message.remainingSpend) === null || _c === void 0 ? void 0 : _c.length) {
|
|
633
|
+
obj.remainingSpend = message.remainingSpend.map((e) => coin_1.Coin.toJSON(e));
|
|
634
|
+
}
|
|
635
|
+
if ((_d = message.feeSpendLimit) === null || _d === void 0 ? void 0 : _d.length) {
|
|
636
|
+
obj.feeSpendLimit = message.feeSpendLimit.map((e) => coin_1.Coin.toJSON(e));
|
|
637
|
+
}
|
|
638
|
+
if ((_e = message.remainingFeeSpend) === null || _e === void 0 ? void 0 : _e.length) {
|
|
639
|
+
obj.remainingFeeSpend = message.remainingFeeSpend.map((e) => coin_1.Coin.toJSON(e));
|
|
640
|
+
}
|
|
641
|
+
if (message.withFeegrant !== false) {
|
|
642
|
+
obj.withFeegrant = message.withFeegrant;
|
|
643
|
+
}
|
|
644
|
+
if (message.expiration !== undefined) {
|
|
645
|
+
obj.expiration = message.expiration.toISOString();
|
|
646
|
+
}
|
|
647
|
+
if (message.period !== undefined) {
|
|
648
|
+
obj.period = duration_1.Duration.toJSON(message.period);
|
|
649
|
+
}
|
|
650
|
+
return obj;
|
|
651
|
+
},
|
|
652
|
+
create(base) {
|
|
653
|
+
return exports.ParticipantAuthorizationRecord.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
654
|
+
},
|
|
655
|
+
fromPartial(object) {
|
|
656
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
657
|
+
const message = createBaseParticipantAuthorizationRecord();
|
|
658
|
+
message.participantId = (_a = object.participantId) !== null && _a !== void 0 ? _a : 0;
|
|
659
|
+
message.msgTypes = ((_b = object.msgTypes) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
660
|
+
message.spendLimit = ((_c = object.spendLimit) === null || _c === void 0 ? void 0 : _c.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
661
|
+
message.remainingSpend = ((_d = object.remainingSpend) === null || _d === void 0 ? void 0 : _d.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
662
|
+
message.feeSpendLimit = ((_e = object.feeSpendLimit) === null || _e === void 0 ? void 0 : _e.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
663
|
+
message.remainingFeeSpend = ((_f = object.remainingFeeSpend) === null || _f === void 0 ? void 0 : _f.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
664
|
+
message.withFeegrant = (_g = object.withFeegrant) !== null && _g !== void 0 ? _g : false;
|
|
665
|
+
message.expiration = (_h = object.expiration) !== null && _h !== void 0 ? _h : undefined;
|
|
419
666
|
message.period = (object.period !== undefined && object.period !== null)
|
|
420
667
|
? duration_1.Duration.fromPartial(object.period)
|
|
421
668
|
: undefined;
|
|
@@ -423,21 +670,22 @@ exports.FeeGrant = {
|
|
|
423
670
|
},
|
|
424
671
|
};
|
|
425
672
|
function createBaseVSOperatorAuthorization() {
|
|
426
|
-
return {
|
|
673
|
+
return { id: 0, corporationId: 0, vsOperator: "", records: [] };
|
|
427
674
|
}
|
|
428
675
|
exports.VSOperatorAuthorization = {
|
|
429
676
|
encode(message, writer = _m0.Writer.create()) {
|
|
430
|
-
if (message.
|
|
431
|
-
writer.uint32(
|
|
677
|
+
if (message.id !== 0) {
|
|
678
|
+
writer.uint32(8).uint64(message.id);
|
|
679
|
+
}
|
|
680
|
+
if (message.corporationId !== 0) {
|
|
681
|
+
writer.uint32(16).uint64(message.corporationId);
|
|
432
682
|
}
|
|
433
683
|
if (message.vsOperator !== "") {
|
|
434
|
-
writer.uint32(
|
|
684
|
+
writer.uint32(26).string(message.vsOperator);
|
|
435
685
|
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
writer.uint64(v);
|
|
686
|
+
for (const v of message.records) {
|
|
687
|
+
exports.ParticipantAuthorizationRecord.encode(v, writer.uint32(34).fork()).ldelim();
|
|
439
688
|
}
|
|
440
|
-
writer.ldelim();
|
|
441
689
|
return writer;
|
|
442
690
|
},
|
|
443
691
|
decode(input, length) {
|
|
@@ -448,30 +696,29 @@ exports.VSOperatorAuthorization = {
|
|
|
448
696
|
const tag = reader.uint32();
|
|
449
697
|
switch (tag >>> 3) {
|
|
450
698
|
case 1:
|
|
451
|
-
if (tag !==
|
|
699
|
+
if (tag !== 8) {
|
|
452
700
|
break;
|
|
453
701
|
}
|
|
454
|
-
message.
|
|
702
|
+
message.id = longToNumber(reader.uint64());
|
|
455
703
|
continue;
|
|
456
704
|
case 2:
|
|
457
|
-
if (tag !==
|
|
705
|
+
if (tag !== 16) {
|
|
458
706
|
break;
|
|
459
707
|
}
|
|
460
|
-
message.
|
|
708
|
+
message.corporationId = longToNumber(reader.uint64());
|
|
461
709
|
continue;
|
|
462
710
|
case 3:
|
|
463
|
-
if (tag
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
break;
|
|
711
|
+
if (tag !== 26) {
|
|
712
|
+
break;
|
|
713
|
+
}
|
|
714
|
+
message.vsOperator = reader.string();
|
|
715
|
+
continue;
|
|
716
|
+
case 4:
|
|
717
|
+
if (tag !== 34) {
|
|
718
|
+
break;
|
|
719
|
+
}
|
|
720
|
+
message.records.push(exports.ParticipantAuthorizationRecord.decode(reader, reader.uint32()));
|
|
721
|
+
continue;
|
|
475
722
|
}
|
|
476
723
|
if ((tag & 7) === 4 || tag === 0) {
|
|
477
724
|
break;
|
|
@@ -482,24 +729,28 @@ exports.VSOperatorAuthorization = {
|
|
|
482
729
|
},
|
|
483
730
|
fromJSON(object) {
|
|
484
731
|
return {
|
|
485
|
-
|
|
732
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
733
|
+
corporationId: isSet(object.corporationId) ? globalThis.Number(object.corporationId) : 0,
|
|
486
734
|
vsOperator: isSet(object.vsOperator) ? globalThis.String(object.vsOperator) : "",
|
|
487
|
-
|
|
488
|
-
? object.
|
|
735
|
+
records: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.records)
|
|
736
|
+
? object.records.map((e) => exports.ParticipantAuthorizationRecord.fromJSON(e))
|
|
489
737
|
: [],
|
|
490
738
|
};
|
|
491
739
|
},
|
|
492
740
|
toJSON(message) {
|
|
493
741
|
var _a;
|
|
494
742
|
const obj = {};
|
|
495
|
-
if (message.
|
|
496
|
-
obj.
|
|
743
|
+
if (message.id !== 0) {
|
|
744
|
+
obj.id = Math.round(message.id);
|
|
745
|
+
}
|
|
746
|
+
if (message.corporationId !== 0) {
|
|
747
|
+
obj.corporationId = Math.round(message.corporationId);
|
|
497
748
|
}
|
|
498
749
|
if (message.vsOperator !== "") {
|
|
499
750
|
obj.vsOperator = message.vsOperator;
|
|
500
751
|
}
|
|
501
|
-
if ((_a = message.
|
|
502
|
-
obj.
|
|
752
|
+
if ((_a = message.records) === null || _a === void 0 ? void 0 : _a.length) {
|
|
753
|
+
obj.records = message.records.map((e) => exports.ParticipantAuthorizationRecord.toJSON(e));
|
|
503
754
|
}
|
|
504
755
|
return obj;
|
|
505
756
|
},
|
|
@@ -507,11 +758,12 @@ exports.VSOperatorAuthorization = {
|
|
|
507
758
|
return exports.VSOperatorAuthorization.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
508
759
|
},
|
|
509
760
|
fromPartial(object) {
|
|
510
|
-
var _a, _b, _c;
|
|
761
|
+
var _a, _b, _c, _d;
|
|
511
762
|
const message = createBaseVSOperatorAuthorization();
|
|
512
|
-
message.
|
|
513
|
-
message.
|
|
514
|
-
message.
|
|
763
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
|
|
764
|
+
message.corporationId = (_b = object.corporationId) !== null && _b !== void 0 ? _b : 0;
|
|
765
|
+
message.vsOperator = (_c = object.vsOperator) !== null && _c !== void 0 ? _c : "";
|
|
766
|
+
message.records = ((_d = object.records) === null || _d === void 0 ? void 0 : _d.map((e) => exports.ParticipantAuthorizationRecord.fromPartial(e))) || [];
|
|
515
767
|
return message;
|
|
516
768
|
},
|
|
517
769
|
};
|