@verana-labs/verana-types 0.10.1-dev.13 → 0.10.1-dev.15
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.d.ts +1 -0
- package/dist/amino-converter/pp.js +63 -27
- package/dist/codec/verana/de/v1/genesis.d.ts +1 -3
- package/dist/codec/verana/de/v1/genesis.js +3 -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 +110 -52
- package/dist/codec/verana/de/v1/types.js +302 -134
- package/dist/codec/verana/pp/v1/tx.d.ts +50 -7
- package/dist/codec/verana/pp/v1/tx.js +282 -54
- package/dist/codec/verana/pp/v1/types.d.ts +5 -8
- package/dist/codec/verana/pp/v1/types.js +2 -93
- package/dist/signing.d.ts +2 -0
- package/dist/signing.js +3 -0
- 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.
|
|
41
|
+
exports.VSOperatorAuthorization = exports.ParticipantAuthorizationRecord = exports.FeeGrant = 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,69 +230,107 @@ 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;
|
|
198
247
|
return message;
|
|
199
248
|
},
|
|
200
249
|
};
|
|
201
|
-
function
|
|
202
|
-
return {
|
|
250
|
+
function createBaseFeeGrant() {
|
|
251
|
+
return {
|
|
252
|
+
grantorCorporationId: 0,
|
|
253
|
+
grantee: "",
|
|
254
|
+
msgTypes: [],
|
|
255
|
+
spendLimit: [],
|
|
256
|
+
remainingSpend: [],
|
|
257
|
+
expiration: undefined,
|
|
258
|
+
period: undefined,
|
|
259
|
+
};
|
|
203
260
|
}
|
|
204
|
-
exports.
|
|
261
|
+
exports.FeeGrant = {
|
|
205
262
|
encode(message, writer = _m0.Writer.create()) {
|
|
206
|
-
if (message.
|
|
207
|
-
writer.uint32(
|
|
263
|
+
if (message.grantorCorporationId !== 0) {
|
|
264
|
+
writer.uint32(8).uint64(message.grantorCorporationId);
|
|
208
265
|
}
|
|
209
|
-
if (message.
|
|
210
|
-
writer.uint32(18).string(message.
|
|
266
|
+
if (message.grantee !== "") {
|
|
267
|
+
writer.uint32(18).string(message.grantee);
|
|
211
268
|
}
|
|
212
|
-
for (const v of message.
|
|
213
|
-
|
|
269
|
+
for (const v of message.msgTypes) {
|
|
270
|
+
writer.uint32(26).string(v);
|
|
214
271
|
}
|
|
215
|
-
|
|
216
|
-
|
|
272
|
+
for (const v of message.spendLimit) {
|
|
273
|
+
coin_1.Coin.encode(v, writer.uint32(34).fork()).ldelim();
|
|
274
|
+
}
|
|
275
|
+
for (const v of message.remainingSpend) {
|
|
276
|
+
coin_1.Coin.encode(v, writer.uint32(42).fork()).ldelim();
|
|
277
|
+
}
|
|
278
|
+
if (message.expiration !== undefined) {
|
|
279
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.expiration), writer.uint32(50).fork()).ldelim();
|
|
280
|
+
}
|
|
281
|
+
if (message.period !== undefined) {
|
|
282
|
+
duration_1.Duration.encode(message.period, writer.uint32(58).fork()).ldelim();
|
|
217
283
|
}
|
|
218
284
|
return writer;
|
|
219
285
|
},
|
|
220
286
|
decode(input, length) {
|
|
221
287
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
222
288
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
223
|
-
const message =
|
|
289
|
+
const message = createBaseFeeGrant();
|
|
224
290
|
while (reader.pos < end) {
|
|
225
291
|
const tag = reader.uint32();
|
|
226
292
|
switch (tag >>> 3) {
|
|
227
293
|
case 1:
|
|
228
|
-
if (tag !==
|
|
294
|
+
if (tag !== 8) {
|
|
229
295
|
break;
|
|
230
296
|
}
|
|
231
|
-
message.
|
|
297
|
+
message.grantorCorporationId = longToNumber(reader.uint64());
|
|
232
298
|
continue;
|
|
233
299
|
case 2:
|
|
234
300
|
if (tag !== 18) {
|
|
235
301
|
break;
|
|
236
302
|
}
|
|
237
|
-
message.
|
|
303
|
+
message.grantee = reader.string();
|
|
238
304
|
continue;
|
|
239
305
|
case 3:
|
|
240
306
|
if (tag !== 26) {
|
|
241
307
|
break;
|
|
242
308
|
}
|
|
243
|
-
message.
|
|
309
|
+
message.msgTypes.push(reader.string());
|
|
244
310
|
continue;
|
|
245
311
|
case 4:
|
|
246
312
|
if (tag !== 34) {
|
|
247
313
|
break;
|
|
248
314
|
}
|
|
249
|
-
message.
|
|
315
|
+
message.spendLimit.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
316
|
+
continue;
|
|
317
|
+
case 5:
|
|
318
|
+
if (tag !== 42) {
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
message.remainingSpend.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
322
|
+
continue;
|
|
323
|
+
case 6:
|
|
324
|
+
if (tag !== 50) {
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
message.expiration = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
328
|
+
continue;
|
|
329
|
+
case 7:
|
|
330
|
+
if (tag !== 58) {
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
message.period = duration_1.Duration.decode(reader, reader.uint32());
|
|
250
334
|
continue;
|
|
251
335
|
}
|
|
252
336
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -258,108 +342,166 @@ exports.OperatorAuthorizationUsage = {
|
|
|
258
342
|
},
|
|
259
343
|
fromJSON(object) {
|
|
260
344
|
return {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
345
|
+
grantorCorporationId: isSet(object.grantorCorporationId) ? globalThis.Number(object.grantorCorporationId) : 0,
|
|
346
|
+
grantee: isSet(object.grantee) ? globalThis.String(object.grantee) : "",
|
|
347
|
+
msgTypes: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.msgTypes) ? object.msgTypes.map((e) => globalThis.String(e)) : [],
|
|
348
|
+
spendLimit: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.spendLimit)
|
|
349
|
+
? object.spendLimit.map((e) => coin_1.Coin.fromJSON(e))
|
|
350
|
+
: [],
|
|
351
|
+
remainingSpend: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.remainingSpend)
|
|
352
|
+
? object.remainingSpend.map((e) => coin_1.Coin.fromJSON(e))
|
|
353
|
+
: [],
|
|
354
|
+
expiration: isSet(object.expiration) ? fromJsonTimestamp(object.expiration) : undefined,
|
|
355
|
+
period: isSet(object.period) ? duration_1.Duration.fromJSON(object.period) : undefined,
|
|
265
356
|
};
|
|
266
357
|
},
|
|
267
358
|
toJSON(message) {
|
|
268
|
-
var _a;
|
|
359
|
+
var _a, _b, _c;
|
|
269
360
|
const obj = {};
|
|
270
|
-
if (message.
|
|
271
|
-
obj.
|
|
361
|
+
if (message.grantorCorporationId !== 0) {
|
|
362
|
+
obj.grantorCorporationId = Math.round(message.grantorCorporationId);
|
|
272
363
|
}
|
|
273
|
-
if (message.
|
|
274
|
-
obj.
|
|
364
|
+
if (message.grantee !== "") {
|
|
365
|
+
obj.grantee = message.grantee;
|
|
275
366
|
}
|
|
276
|
-
if ((_a = message.
|
|
277
|
-
obj.
|
|
367
|
+
if ((_a = message.msgTypes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
368
|
+
obj.msgTypes = message.msgTypes;
|
|
369
|
+
}
|
|
370
|
+
if ((_b = message.spendLimit) === null || _b === void 0 ? void 0 : _b.length) {
|
|
371
|
+
obj.spendLimit = message.spendLimit.map((e) => coin_1.Coin.toJSON(e));
|
|
278
372
|
}
|
|
279
|
-
if (message.
|
|
280
|
-
obj.
|
|
373
|
+
if ((_c = message.remainingSpend) === null || _c === void 0 ? void 0 : _c.length) {
|
|
374
|
+
obj.remainingSpend = message.remainingSpend.map((e) => coin_1.Coin.toJSON(e));
|
|
375
|
+
}
|
|
376
|
+
if (message.expiration !== undefined) {
|
|
377
|
+
obj.expiration = message.expiration.toISOString();
|
|
378
|
+
}
|
|
379
|
+
if (message.period !== undefined) {
|
|
380
|
+
obj.period = duration_1.Duration.toJSON(message.period);
|
|
281
381
|
}
|
|
282
382
|
return obj;
|
|
283
383
|
},
|
|
284
384
|
create(base) {
|
|
285
|
-
return exports.
|
|
385
|
+
return exports.FeeGrant.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
286
386
|
},
|
|
287
387
|
fromPartial(object) {
|
|
288
|
-
var _a, _b, _c, _d;
|
|
289
|
-
const message =
|
|
290
|
-
message.
|
|
291
|
-
message.
|
|
292
|
-
message.
|
|
293
|
-
message.
|
|
388
|
+
var _a, _b, _c, _d, _e, _f;
|
|
389
|
+
const message = createBaseFeeGrant();
|
|
390
|
+
message.grantorCorporationId = (_a = object.grantorCorporationId) !== null && _a !== void 0 ? _a : 0;
|
|
391
|
+
message.grantee = (_b = object.grantee) !== null && _b !== void 0 ? _b : "";
|
|
392
|
+
message.msgTypes = ((_c = object.msgTypes) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
|
|
393
|
+
message.spendLimit = ((_d = object.spendLimit) === null || _d === void 0 ? void 0 : _d.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
394
|
+
message.remainingSpend = ((_e = object.remainingSpend) === null || _e === void 0 ? void 0 : _e.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
395
|
+
message.expiration = (_f = object.expiration) !== null && _f !== void 0 ? _f : undefined;
|
|
396
|
+
message.period = (object.period !== undefined && object.period !== null)
|
|
397
|
+
? duration_1.Duration.fromPartial(object.period)
|
|
398
|
+
: undefined;
|
|
294
399
|
return message;
|
|
295
400
|
},
|
|
296
401
|
};
|
|
297
|
-
function
|
|
298
|
-
return {
|
|
402
|
+
function createBaseParticipantAuthorizationRecord() {
|
|
403
|
+
return {
|
|
404
|
+
participantId: 0,
|
|
405
|
+
msgTypes: [],
|
|
406
|
+
spendLimit: [],
|
|
407
|
+
remainingSpend: [],
|
|
408
|
+
feeSpendLimit: [],
|
|
409
|
+
remainingFeeSpend: [],
|
|
410
|
+
withFeegrant: false,
|
|
411
|
+
expiration: undefined,
|
|
412
|
+
period: undefined,
|
|
413
|
+
};
|
|
299
414
|
}
|
|
300
|
-
exports.
|
|
415
|
+
exports.ParticipantAuthorizationRecord = {
|
|
301
416
|
encode(message, writer = _m0.Writer.create()) {
|
|
302
|
-
if (message.
|
|
303
|
-
writer.uint32(
|
|
304
|
-
}
|
|
305
|
-
if (message.grantee !== "") {
|
|
306
|
-
writer.uint32(18).string(message.grantee);
|
|
417
|
+
if (message.participantId !== 0) {
|
|
418
|
+
writer.uint32(8).uint64(message.participantId);
|
|
307
419
|
}
|
|
308
420
|
for (const v of message.msgTypes) {
|
|
309
|
-
writer.uint32(
|
|
421
|
+
writer.uint32(18).string(v);
|
|
310
422
|
}
|
|
311
423
|
for (const v of message.spendLimit) {
|
|
424
|
+
coin_1.Coin.encode(v, writer.uint32(26).fork()).ldelim();
|
|
425
|
+
}
|
|
426
|
+
for (const v of message.remainingSpend) {
|
|
312
427
|
coin_1.Coin.encode(v, writer.uint32(34).fork()).ldelim();
|
|
313
428
|
}
|
|
429
|
+
for (const v of message.feeSpendLimit) {
|
|
430
|
+
coin_1.Coin.encode(v, writer.uint32(42).fork()).ldelim();
|
|
431
|
+
}
|
|
432
|
+
for (const v of message.remainingFeeSpend) {
|
|
433
|
+
coin_1.Coin.encode(v, writer.uint32(50).fork()).ldelim();
|
|
434
|
+
}
|
|
435
|
+
if (message.withFeegrant !== false) {
|
|
436
|
+
writer.uint32(56).bool(message.withFeegrant);
|
|
437
|
+
}
|
|
314
438
|
if (message.expiration !== undefined) {
|
|
315
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.expiration), writer.uint32(
|
|
439
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.expiration), writer.uint32(66).fork()).ldelim();
|
|
316
440
|
}
|
|
317
441
|
if (message.period !== undefined) {
|
|
318
|
-
duration_1.Duration.encode(message.period, writer.uint32(
|
|
442
|
+
duration_1.Duration.encode(message.period, writer.uint32(74).fork()).ldelim();
|
|
319
443
|
}
|
|
320
444
|
return writer;
|
|
321
445
|
},
|
|
322
446
|
decode(input, length) {
|
|
323
447
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
324
448
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
325
|
-
const message =
|
|
449
|
+
const message = createBaseParticipantAuthorizationRecord();
|
|
326
450
|
while (reader.pos < end) {
|
|
327
451
|
const tag = reader.uint32();
|
|
328
452
|
switch (tag >>> 3) {
|
|
329
453
|
case 1:
|
|
330
|
-
if (tag !==
|
|
454
|
+
if (tag !== 8) {
|
|
331
455
|
break;
|
|
332
456
|
}
|
|
333
|
-
message.
|
|
457
|
+
message.participantId = longToNumber(reader.uint64());
|
|
334
458
|
continue;
|
|
335
459
|
case 2:
|
|
336
460
|
if (tag !== 18) {
|
|
337
461
|
break;
|
|
338
462
|
}
|
|
339
|
-
message.
|
|
463
|
+
message.msgTypes.push(reader.string());
|
|
340
464
|
continue;
|
|
341
465
|
case 3:
|
|
342
466
|
if (tag !== 26) {
|
|
343
467
|
break;
|
|
344
468
|
}
|
|
345
|
-
message.
|
|
469
|
+
message.spendLimit.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
346
470
|
continue;
|
|
347
471
|
case 4:
|
|
348
472
|
if (tag !== 34) {
|
|
349
473
|
break;
|
|
350
474
|
}
|
|
351
|
-
message.
|
|
475
|
+
message.remainingSpend.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
352
476
|
continue;
|
|
353
477
|
case 5:
|
|
354
478
|
if (tag !== 42) {
|
|
355
479
|
break;
|
|
356
480
|
}
|
|
357
|
-
message.
|
|
481
|
+
message.feeSpendLimit.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
358
482
|
continue;
|
|
359
483
|
case 6:
|
|
360
484
|
if (tag !== 50) {
|
|
361
485
|
break;
|
|
362
486
|
}
|
|
487
|
+
message.remainingFeeSpend.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
488
|
+
continue;
|
|
489
|
+
case 7:
|
|
490
|
+
if (tag !== 56) {
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
message.withFeegrant = reader.bool();
|
|
494
|
+
continue;
|
|
495
|
+
case 8:
|
|
496
|
+
if (tag !== 66) {
|
|
497
|
+
break;
|
|
498
|
+
}
|
|
499
|
+
message.expiration = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
500
|
+
continue;
|
|
501
|
+
case 9:
|
|
502
|
+
if (tag !== 74) {
|
|
503
|
+
break;
|
|
504
|
+
}
|
|
363
505
|
message.period = duration_1.Duration.decode(reader, reader.uint32());
|
|
364
506
|
continue;
|
|
365
507
|
}
|
|
@@ -372,24 +514,30 @@ exports.FeeGrant = {
|
|
|
372
514
|
},
|
|
373
515
|
fromJSON(object) {
|
|
374
516
|
return {
|
|
375
|
-
|
|
376
|
-
grantee: isSet(object.grantee) ? globalThis.String(object.grantee) : "",
|
|
517
|
+
participantId: isSet(object.participantId) ? globalThis.Number(object.participantId) : 0,
|
|
377
518
|
msgTypes: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.msgTypes) ? object.msgTypes.map((e) => globalThis.String(e)) : [],
|
|
378
519
|
spendLimit: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.spendLimit)
|
|
379
520
|
? object.spendLimit.map((e) => coin_1.Coin.fromJSON(e))
|
|
380
521
|
: [],
|
|
522
|
+
remainingSpend: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.remainingSpend)
|
|
523
|
+
? object.remainingSpend.map((e) => coin_1.Coin.fromJSON(e))
|
|
524
|
+
: [],
|
|
525
|
+
feeSpendLimit: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.feeSpendLimit)
|
|
526
|
+
? object.feeSpendLimit.map((e) => coin_1.Coin.fromJSON(e))
|
|
527
|
+
: [],
|
|
528
|
+
remainingFeeSpend: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.remainingFeeSpend)
|
|
529
|
+
? object.remainingFeeSpend.map((e) => coin_1.Coin.fromJSON(e))
|
|
530
|
+
: [],
|
|
531
|
+
withFeegrant: isSet(object.withFeegrant) ? globalThis.Boolean(object.withFeegrant) : false,
|
|
381
532
|
expiration: isSet(object.expiration) ? fromJsonTimestamp(object.expiration) : undefined,
|
|
382
533
|
period: isSet(object.period) ? duration_1.Duration.fromJSON(object.period) : undefined,
|
|
383
534
|
};
|
|
384
535
|
},
|
|
385
536
|
toJSON(message) {
|
|
386
|
-
var _a, _b;
|
|
537
|
+
var _a, _b, _c, _d, _e;
|
|
387
538
|
const obj = {};
|
|
388
|
-
if (message.
|
|
389
|
-
obj.
|
|
390
|
-
}
|
|
391
|
-
if (message.grantee !== "") {
|
|
392
|
-
obj.grantee = message.grantee;
|
|
539
|
+
if (message.participantId !== 0) {
|
|
540
|
+
obj.participantId = Math.round(message.participantId);
|
|
393
541
|
}
|
|
394
542
|
if ((_a = message.msgTypes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
395
543
|
obj.msgTypes = message.msgTypes;
|
|
@@ -397,6 +545,18 @@ exports.FeeGrant = {
|
|
|
397
545
|
if ((_b = message.spendLimit) === null || _b === void 0 ? void 0 : _b.length) {
|
|
398
546
|
obj.spendLimit = message.spendLimit.map((e) => coin_1.Coin.toJSON(e));
|
|
399
547
|
}
|
|
548
|
+
if ((_c = message.remainingSpend) === null || _c === void 0 ? void 0 : _c.length) {
|
|
549
|
+
obj.remainingSpend = message.remainingSpend.map((e) => coin_1.Coin.toJSON(e));
|
|
550
|
+
}
|
|
551
|
+
if ((_d = message.feeSpendLimit) === null || _d === void 0 ? void 0 : _d.length) {
|
|
552
|
+
obj.feeSpendLimit = message.feeSpendLimit.map((e) => coin_1.Coin.toJSON(e));
|
|
553
|
+
}
|
|
554
|
+
if ((_e = message.remainingFeeSpend) === null || _e === void 0 ? void 0 : _e.length) {
|
|
555
|
+
obj.remainingFeeSpend = message.remainingFeeSpend.map((e) => coin_1.Coin.toJSON(e));
|
|
556
|
+
}
|
|
557
|
+
if (message.withFeegrant !== false) {
|
|
558
|
+
obj.withFeegrant = message.withFeegrant;
|
|
559
|
+
}
|
|
400
560
|
if (message.expiration !== undefined) {
|
|
401
561
|
obj.expiration = message.expiration.toISOString();
|
|
402
562
|
}
|
|
@@ -406,16 +566,19 @@ exports.FeeGrant = {
|
|
|
406
566
|
return obj;
|
|
407
567
|
},
|
|
408
568
|
create(base) {
|
|
409
|
-
return exports.
|
|
569
|
+
return exports.ParticipantAuthorizationRecord.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
410
570
|
},
|
|
411
571
|
fromPartial(object) {
|
|
412
|
-
var _a, _b, _c, _d, _e;
|
|
413
|
-
const message =
|
|
414
|
-
message.
|
|
415
|
-
message.
|
|
416
|
-
message.
|
|
417
|
-
message.
|
|
418
|
-
message.
|
|
572
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
573
|
+
const message = createBaseParticipantAuthorizationRecord();
|
|
574
|
+
message.participantId = (_a = object.participantId) !== null && _a !== void 0 ? _a : 0;
|
|
575
|
+
message.msgTypes = ((_b = object.msgTypes) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
576
|
+
message.spendLimit = ((_c = object.spendLimit) === null || _c === void 0 ? void 0 : _c.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
577
|
+
message.remainingSpend = ((_d = object.remainingSpend) === null || _d === void 0 ? void 0 : _d.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
578
|
+
message.feeSpendLimit = ((_e = object.feeSpendLimit) === null || _e === void 0 ? void 0 : _e.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
579
|
+
message.remainingFeeSpend = ((_f = object.remainingFeeSpend) === null || _f === void 0 ? void 0 : _f.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
580
|
+
message.withFeegrant = (_g = object.withFeegrant) !== null && _g !== void 0 ? _g : false;
|
|
581
|
+
message.expiration = (_h = object.expiration) !== null && _h !== void 0 ? _h : undefined;
|
|
419
582
|
message.period = (object.period !== undefined && object.period !== null)
|
|
420
583
|
? duration_1.Duration.fromPartial(object.period)
|
|
421
584
|
: undefined;
|
|
@@ -423,21 +586,22 @@ exports.FeeGrant = {
|
|
|
423
586
|
},
|
|
424
587
|
};
|
|
425
588
|
function createBaseVSOperatorAuthorization() {
|
|
426
|
-
return {
|
|
589
|
+
return { id: 0, corporationId: 0, vsOperator: "", records: [] };
|
|
427
590
|
}
|
|
428
591
|
exports.VSOperatorAuthorization = {
|
|
429
592
|
encode(message, writer = _m0.Writer.create()) {
|
|
430
|
-
if (message.
|
|
431
|
-
writer.uint32(
|
|
593
|
+
if (message.id !== 0) {
|
|
594
|
+
writer.uint32(8).uint64(message.id);
|
|
595
|
+
}
|
|
596
|
+
if (message.corporationId !== 0) {
|
|
597
|
+
writer.uint32(16).uint64(message.corporationId);
|
|
432
598
|
}
|
|
433
599
|
if (message.vsOperator !== "") {
|
|
434
|
-
writer.uint32(
|
|
600
|
+
writer.uint32(26).string(message.vsOperator);
|
|
435
601
|
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
writer.uint64(v);
|
|
602
|
+
for (const v of message.records) {
|
|
603
|
+
exports.ParticipantAuthorizationRecord.encode(v, writer.uint32(34).fork()).ldelim();
|
|
439
604
|
}
|
|
440
|
-
writer.ldelim();
|
|
441
605
|
return writer;
|
|
442
606
|
},
|
|
443
607
|
decode(input, length) {
|
|
@@ -448,30 +612,29 @@ exports.VSOperatorAuthorization = {
|
|
|
448
612
|
const tag = reader.uint32();
|
|
449
613
|
switch (tag >>> 3) {
|
|
450
614
|
case 1:
|
|
451
|
-
if (tag !==
|
|
615
|
+
if (tag !== 8) {
|
|
452
616
|
break;
|
|
453
617
|
}
|
|
454
|
-
message.
|
|
618
|
+
message.id = longToNumber(reader.uint64());
|
|
455
619
|
continue;
|
|
456
620
|
case 2:
|
|
457
|
-
if (tag !==
|
|
621
|
+
if (tag !== 16) {
|
|
458
622
|
break;
|
|
459
623
|
}
|
|
460
|
-
message.
|
|
624
|
+
message.corporationId = longToNumber(reader.uint64());
|
|
461
625
|
continue;
|
|
462
626
|
case 3:
|
|
463
|
-
if (tag
|
|
464
|
-
|
|
465
|
-
continue;
|
|
627
|
+
if (tag !== 26) {
|
|
628
|
+
break;
|
|
466
629
|
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
continue;
|
|
630
|
+
message.vsOperator = reader.string();
|
|
631
|
+
continue;
|
|
632
|
+
case 4:
|
|
633
|
+
if (tag !== 34) {
|
|
634
|
+
break;
|
|
473
635
|
}
|
|
474
|
-
|
|
636
|
+
message.records.push(exports.ParticipantAuthorizationRecord.decode(reader, reader.uint32()));
|
|
637
|
+
continue;
|
|
475
638
|
}
|
|
476
639
|
if ((tag & 7) === 4 || tag === 0) {
|
|
477
640
|
break;
|
|
@@ -482,24 +645,28 @@ exports.VSOperatorAuthorization = {
|
|
|
482
645
|
},
|
|
483
646
|
fromJSON(object) {
|
|
484
647
|
return {
|
|
485
|
-
|
|
648
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
649
|
+
corporationId: isSet(object.corporationId) ? globalThis.Number(object.corporationId) : 0,
|
|
486
650
|
vsOperator: isSet(object.vsOperator) ? globalThis.String(object.vsOperator) : "",
|
|
487
|
-
|
|
488
|
-
? object.
|
|
651
|
+
records: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.records)
|
|
652
|
+
? object.records.map((e) => exports.ParticipantAuthorizationRecord.fromJSON(e))
|
|
489
653
|
: [],
|
|
490
654
|
};
|
|
491
655
|
},
|
|
492
656
|
toJSON(message) {
|
|
493
657
|
var _a;
|
|
494
658
|
const obj = {};
|
|
495
|
-
if (message.
|
|
496
|
-
obj.
|
|
659
|
+
if (message.id !== 0) {
|
|
660
|
+
obj.id = Math.round(message.id);
|
|
661
|
+
}
|
|
662
|
+
if (message.corporationId !== 0) {
|
|
663
|
+
obj.corporationId = Math.round(message.corporationId);
|
|
497
664
|
}
|
|
498
665
|
if (message.vsOperator !== "") {
|
|
499
666
|
obj.vsOperator = message.vsOperator;
|
|
500
667
|
}
|
|
501
|
-
if ((_a = message.
|
|
502
|
-
obj.
|
|
668
|
+
if ((_a = message.records) === null || _a === void 0 ? void 0 : _a.length) {
|
|
669
|
+
obj.records = message.records.map((e) => exports.ParticipantAuthorizationRecord.toJSON(e));
|
|
503
670
|
}
|
|
504
671
|
return obj;
|
|
505
672
|
},
|
|
@@ -507,11 +674,12 @@ exports.VSOperatorAuthorization = {
|
|
|
507
674
|
return exports.VSOperatorAuthorization.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
508
675
|
},
|
|
509
676
|
fromPartial(object) {
|
|
510
|
-
var _a, _b, _c;
|
|
677
|
+
var _a, _b, _c, _d;
|
|
511
678
|
const message = createBaseVSOperatorAuthorization();
|
|
512
|
-
message.
|
|
513
|
-
message.
|
|
514
|
-
message.
|
|
679
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
|
|
680
|
+
message.corporationId = (_b = object.corporationId) !== null && _b !== void 0 ? _b : 0;
|
|
681
|
+
message.vsOperator = (_c = object.vsOperator) !== null && _c !== void 0 ? _c : "";
|
|
682
|
+
message.records = ((_d = object.records) === null || _d === void 0 ? void 0 : _d.map((e) => exports.ParticipantAuthorizationRecord.fromPartial(e))) || [];
|
|
515
683
|
return message;
|
|
516
684
|
},
|
|
517
685
|
};
|