@verana-labs/verana-types 0.9.5 → 0.10.1-dev.10
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/README.md +1 -2
- package/dist/amino-converter/cs.d.ts +7 -88
- package/dist/amino-converter/cs.js +141 -70
- package/dist/amino-converter/de.d.ts +3 -0
- package/dist/amino-converter/de.js +53 -0
- package/dist/amino-converter/di.d.ts +2 -0
- package/dist/amino-converter/di.js +23 -0
- package/dist/amino-converter/perm.d.ts +12 -153
- package/dist/amino-converter/perm.js +299 -203
- package/dist/amino-converter/td.d.ts +2 -19
- package/dist/amino-converter/td.js +32 -35
- package/dist/amino-converter/tr.d.ts +6 -67
- package/dist/amino-converter/tr.js +89 -83
- package/dist/amino-converter/util/helpers.d.ts +16 -22
- package/dist/amino-converter/util/helpers.js +28 -33
- package/dist/amino-converter/xr.d.ts +4 -0
- package/dist/amino-converter/xr.js +74 -0
- package/dist/codec/cosmos/app/v1alpha1/module.d.ts +2 -3
- package/dist/codec/cosmos/app/v1alpha1/module.js +40 -15
- package/dist/codec/cosmos/base/query/v1beta1/pagination.d.ts +5 -6
- package/dist/codec/cosmos/base/query/v1beta1/pagination.js +75 -38
- package/dist/codec/cosmos/base/v1beta1/coin.d.ts +79 -0
- package/dist/codec/cosmos/base/v1beta1/coin.js +283 -0
- package/dist/codec/cosmos_proto/cosmos.d.ts +2 -3
- package/dist/codec/cosmos_proto/cosmos.js +38 -13
- package/dist/codec/google/api/http.d.ts +2 -3
- package/dist/codec/google/api/http.js +40 -15
- package/dist/codec/google/protobuf/descriptor.d.ts +11 -5
- package/dist/codec/google/protobuf/descriptor.js +156 -100
- package/dist/codec/google/protobuf/duration.d.ts +98 -0
- package/dist/codec/google/protobuf/duration.js +128 -0
- package/dist/codec/google/protobuf/timestamp.d.ts +12 -12
- package/dist/codec/google/protobuf/timestamp.js +58 -21
- package/dist/codec/verana/cs/module/module.d.ts +2 -3
- package/dist/codec/verana/cs/module/module.js +36 -11
- package/dist/codec/verana/cs/v1/genesis.d.ts +4 -5
- package/dist/codec/verana/cs/v1/genesis.js +57 -20
- package/dist/codec/verana/cs/v1/params.d.ts +3 -5
- package/dist/codec/verana/cs/v1/params.js +63 -47
- package/dist/codec/verana/cs/v1/query.d.ts +13 -10
- package/dist/codec/verana/cs/v1/query.js +164 -56
- package/dist/codec/verana/cs/v1/tx.d.ts +132 -24
- package/dist/codec/verana/cs/v1/tx.js +750 -137
- package/dist/codec/verana/cs/v1/types.d.ts +93 -23
- package/dist/codec/verana/cs/v1/types.js +560 -109
- package/dist/codec/verana/{dd/module → de/module/v1}/module.d.ts +7 -5
- package/dist/codec/verana/{dd/module → de/module/v1}/module.js +38 -13
- package/dist/codec/verana/de/v1/genesis.d.ts +36 -0
- package/dist/codec/verana/de/v1/genesis.js +178 -0
- package/dist/codec/verana/de/v1/params.d.ts +24 -0
- package/dist/codec/verana/de/v1/params.js +81 -0
- package/dist/codec/verana/de/v1/query.d.ts +132 -0
- package/dist/codec/verana/de/v1/query.js +440 -0
- package/dist/codec/verana/de/v1/tx.d.ts +192 -0
- package/dist/codec/verana/de/v1/tx.js +581 -0
- package/dist/codec/verana/de/v1/types.d.ts +133 -0
- package/dist/codec/verana/de/v1/types.js +554 -0
- package/dist/codec/verana/di/module/v1/module.d.ts +29 -0
- package/dist/codec/verana/di/module/v1/module.js +98 -0
- package/dist/codec/verana/{dd → di}/v1/genesis.d.ts +8 -8
- package/dist/codec/verana/di/v1/genesis.js +119 -0
- package/dist/codec/verana/di/v1/params.d.ts +24 -0
- package/dist/codec/verana/di/v1/params.js +81 -0
- package/dist/codec/verana/di/v1/query.d.ts +99 -0
- package/dist/codec/verana/di/v1/query.js +349 -0
- package/dist/codec/verana/di/v1/tx.d.ts +120 -0
- package/dist/codec/verana/di/v1/tx.js +409 -0
- package/dist/codec/verana/perm/module/module.d.ts +2 -3
- package/dist/codec/verana/perm/module/module.js +36 -11
- package/dist/codec/verana/perm/v1/genesis.d.ts +4 -5
- package/dist/codec/verana/perm/v1/genesis.js +57 -20
- package/dist/codec/verana/perm/v1/params.d.ts +3 -4
- package/dist/codec/verana/perm/v1/params.js +58 -21
- package/dist/codec/verana/perm/v1/query.d.ts +12 -14
- package/dist/codec/verana/perm/v1/query.js +112 -94
- package/dist/codec/verana/perm/v1/tx.d.ts +149 -98
- package/dist/codec/verana/perm/v1/tx.js +940 -544
- package/dist/codec/verana/perm/v1/types.d.ts +60 -61
- package/dist/codec/verana/perm/v1/types.js +402 -366
- package/dist/codec/verana/td/module/module.d.ts +2 -3
- package/dist/codec/verana/td/module/module.js +36 -11
- package/dist/codec/verana/td/v1/genesis.d.ts +8 -7
- package/dist/codec/verana/td/v1/genesis.js +89 -40
- package/dist/codec/verana/td/v1/params.d.ts +4 -3
- package/dist/codec/verana/td/v1/params.js +54 -12
- package/dist/codec/verana/td/v1/query.d.ts +5 -6
- package/dist/codec/verana/td/v1/query.js +52 -27
- package/dist/codec/verana/td/v1/tx.d.ts +30 -45
- package/dist/codec/verana/td/v1/tx.js +154 -233
- package/dist/codec/verana/td/v1/types.d.ts +13 -16
- package/dist/codec/verana/td/v1/types.js +114 -103
- package/dist/codec/verana/tr/module/module.d.ts +2 -3
- package/dist/codec/verana/tr/module/module.js +36 -11
- package/dist/codec/verana/tr/v1/genesis.d.ts +4 -5
- package/dist/codec/verana/tr/v1/genesis.js +59 -20
- package/dist/codec/verana/tr/v1/params.d.ts +3 -5
- package/dist/codec/verana/tr/v1/params.js +57 -40
- package/dist/codec/verana/tr/v1/query.d.ts +7 -9
- package/dist/codec/verana/tr/v1/query.js +81 -45
- package/dist/codec/verana/tr/v1/tx.d.ts +66 -22
- package/dist/codec/verana/tr/v1/tx.js +271 -162
- package/dist/codec/verana/tr/v1/types.d.ts +23 -27
- package/dist/codec/verana/tr/v1/types.js +158 -156
- package/dist/codec/verana/xr/module/v1/module.d.ts +29 -0
- package/dist/codec/verana/xr/module/v1/module.js +98 -0
- package/dist/codec/verana/xr/v1/genesis.d.ts +32 -0
- package/dist/codec/verana/xr/v1/genesis.js +149 -0
- package/dist/codec/verana/{dd → xr}/v1/params.d.ts +6 -6
- package/dist/codec/verana/xr/v1/params.js +104 -0
- package/dist/codec/verana/xr/v1/query.d.ts +162 -0
- package/dist/codec/verana/xr/v1/query.js +775 -0
- package/dist/codec/verana/xr/v1/tx.d.ts +195 -0
- package/dist/codec/verana/xr/v1/tx.js +939 -0
- package/dist/helpers/aminoConverters.d.ts +8 -0
- package/dist/helpers/aminoConverters.js +24 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/signing.d.ts +38 -7
- package/dist/signing.js +45 -36
- package/package.json +4 -2
- package/dist/amino-converter/dd.d.ts +0 -17
- package/dist/amino-converter/dd.js +0 -65
- package/dist/codec/verana/dd/v1/genesis.js +0 -96
- package/dist/codec/verana/dd/v1/params.js +0 -98
- package/dist/codec/verana/dd/v1/query.d.ts +0 -109
- package/dist/codec/verana/dd/v1/query.js +0 -428
- package/dist/codec/verana/dd/v1/tx.d.ts +0 -174
- package/dist/codec/verana/dd/v1/tx.js +0 -611
- package/dist/codec/verana/dd/v1/types.d.ts +0 -31
- package/dist/codec/verana/dd/v1/types.js +0 -172
|
@@ -0,0 +1,581 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v1.181.2
|
|
5
|
+
// protoc unknown
|
|
6
|
+
// source: verana/de/v1/tx.proto
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function(o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
+
var ownKeys = function(o) {
|
|
25
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
+
var ar = [];
|
|
27
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
+
return ar;
|
|
29
|
+
};
|
|
30
|
+
return ownKeys(o);
|
|
31
|
+
};
|
|
32
|
+
return function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.MsgClientImpl = exports.MsgServiceName = exports.MsgRevokeOperatorAuthorizationResponse = exports.MsgRevokeOperatorAuthorization = exports.MsgGrantOperatorAuthorizationResponse = exports.MsgGrantOperatorAuthorization = exports.MsgUpdateParamsResponse = exports.MsgUpdateParams = exports.protobufPackage = void 0;
|
|
42
|
+
/* eslint-disable */
|
|
43
|
+
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
44
|
+
const coin_1 = require("../../../cosmos/base/v1beta1/coin");
|
|
45
|
+
const duration_1 = require("../../../google/protobuf/duration");
|
|
46
|
+
const timestamp_1 = require("../../../google/protobuf/timestamp");
|
|
47
|
+
const params_1 = require("./params");
|
|
48
|
+
exports.protobufPackage = "verana.de.v1";
|
|
49
|
+
function createBaseMsgUpdateParams() {
|
|
50
|
+
return { authority: "", params: undefined };
|
|
51
|
+
}
|
|
52
|
+
exports.MsgUpdateParams = {
|
|
53
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
54
|
+
if (message.authority !== "") {
|
|
55
|
+
writer.uint32(10).string(message.authority);
|
|
56
|
+
}
|
|
57
|
+
if (message.params !== undefined) {
|
|
58
|
+
params_1.Params.encode(message.params, writer.uint32(18).fork()).ldelim();
|
|
59
|
+
}
|
|
60
|
+
return writer;
|
|
61
|
+
},
|
|
62
|
+
decode(input, length) {
|
|
63
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
64
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
65
|
+
const message = createBaseMsgUpdateParams();
|
|
66
|
+
while (reader.pos < end) {
|
|
67
|
+
const tag = reader.uint32();
|
|
68
|
+
switch (tag >>> 3) {
|
|
69
|
+
case 1:
|
|
70
|
+
if (tag !== 10) {
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
message.authority = reader.string();
|
|
74
|
+
continue;
|
|
75
|
+
case 2:
|
|
76
|
+
if (tag !== 18) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
message.params = params_1.Params.decode(reader, reader.uint32());
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
reader.skipType(tag & 7);
|
|
86
|
+
}
|
|
87
|
+
return message;
|
|
88
|
+
},
|
|
89
|
+
fromJSON(object) {
|
|
90
|
+
return {
|
|
91
|
+
authority: isSet(object.authority) ? globalThis.String(object.authority) : "",
|
|
92
|
+
params: isSet(object.params) ? params_1.Params.fromJSON(object.params) : undefined,
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
toJSON(message) {
|
|
96
|
+
const obj = {};
|
|
97
|
+
if (message.authority !== "") {
|
|
98
|
+
obj.authority = message.authority;
|
|
99
|
+
}
|
|
100
|
+
if (message.params !== undefined) {
|
|
101
|
+
obj.params = params_1.Params.toJSON(message.params);
|
|
102
|
+
}
|
|
103
|
+
return obj;
|
|
104
|
+
},
|
|
105
|
+
create(base) {
|
|
106
|
+
return exports.MsgUpdateParams.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
107
|
+
},
|
|
108
|
+
fromPartial(object) {
|
|
109
|
+
var _a;
|
|
110
|
+
const message = createBaseMsgUpdateParams();
|
|
111
|
+
message.authority = (_a = object.authority) !== null && _a !== void 0 ? _a : "";
|
|
112
|
+
message.params = (object.params !== undefined && object.params !== null)
|
|
113
|
+
? params_1.Params.fromPartial(object.params)
|
|
114
|
+
: undefined;
|
|
115
|
+
return message;
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
function createBaseMsgUpdateParamsResponse() {
|
|
119
|
+
return {};
|
|
120
|
+
}
|
|
121
|
+
exports.MsgUpdateParamsResponse = {
|
|
122
|
+
encode(_, writer = _m0.Writer.create()) {
|
|
123
|
+
return writer;
|
|
124
|
+
},
|
|
125
|
+
decode(input, length) {
|
|
126
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
127
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
128
|
+
const message = createBaseMsgUpdateParamsResponse();
|
|
129
|
+
while (reader.pos < end) {
|
|
130
|
+
const tag = reader.uint32();
|
|
131
|
+
switch (tag >>> 3) {
|
|
132
|
+
}
|
|
133
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
reader.skipType(tag & 7);
|
|
137
|
+
}
|
|
138
|
+
return message;
|
|
139
|
+
},
|
|
140
|
+
fromJSON(_) {
|
|
141
|
+
return {};
|
|
142
|
+
},
|
|
143
|
+
toJSON(_) {
|
|
144
|
+
const obj = {};
|
|
145
|
+
return obj;
|
|
146
|
+
},
|
|
147
|
+
create(base) {
|
|
148
|
+
return exports.MsgUpdateParamsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
149
|
+
},
|
|
150
|
+
fromPartial(_) {
|
|
151
|
+
const message = createBaseMsgUpdateParamsResponse();
|
|
152
|
+
return message;
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
function createBaseMsgGrantOperatorAuthorization() {
|
|
156
|
+
return {
|
|
157
|
+
corporation: "",
|
|
158
|
+
operator: "",
|
|
159
|
+
grantee: "",
|
|
160
|
+
msgTypes: [],
|
|
161
|
+
expiration: undefined,
|
|
162
|
+
authzSpendLimit: [],
|
|
163
|
+
authzSpendLimitPeriod: undefined,
|
|
164
|
+
withFeegrant: false,
|
|
165
|
+
feegrantSpendLimit: [],
|
|
166
|
+
feegrantSpendLimitPeriod: undefined,
|
|
167
|
+
feeSpendLimit: [],
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
exports.MsgGrantOperatorAuthorization = {
|
|
171
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
172
|
+
if (message.corporation !== "") {
|
|
173
|
+
writer.uint32(10).string(message.corporation);
|
|
174
|
+
}
|
|
175
|
+
if (message.operator !== "") {
|
|
176
|
+
writer.uint32(18).string(message.operator);
|
|
177
|
+
}
|
|
178
|
+
if (message.grantee !== "") {
|
|
179
|
+
writer.uint32(26).string(message.grantee);
|
|
180
|
+
}
|
|
181
|
+
for (const v of message.msgTypes) {
|
|
182
|
+
writer.uint32(34).string(v);
|
|
183
|
+
}
|
|
184
|
+
if (message.expiration !== undefined) {
|
|
185
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.expiration), writer.uint32(42).fork()).ldelim();
|
|
186
|
+
}
|
|
187
|
+
for (const v of message.authzSpendLimit) {
|
|
188
|
+
coin_1.Coin.encode(v, writer.uint32(50).fork()).ldelim();
|
|
189
|
+
}
|
|
190
|
+
if (message.authzSpendLimitPeriod !== undefined) {
|
|
191
|
+
duration_1.Duration.encode(message.authzSpendLimitPeriod, writer.uint32(58).fork()).ldelim();
|
|
192
|
+
}
|
|
193
|
+
if (message.withFeegrant !== false) {
|
|
194
|
+
writer.uint32(64).bool(message.withFeegrant);
|
|
195
|
+
}
|
|
196
|
+
for (const v of message.feegrantSpendLimit) {
|
|
197
|
+
coin_1.Coin.encode(v, writer.uint32(74).fork()).ldelim();
|
|
198
|
+
}
|
|
199
|
+
if (message.feegrantSpendLimitPeriod !== undefined) {
|
|
200
|
+
duration_1.Duration.encode(message.feegrantSpendLimitPeriod, writer.uint32(82).fork()).ldelim();
|
|
201
|
+
}
|
|
202
|
+
for (const v of message.feeSpendLimit) {
|
|
203
|
+
coin_1.Coin.encode(v, writer.uint32(90).fork()).ldelim();
|
|
204
|
+
}
|
|
205
|
+
return writer;
|
|
206
|
+
},
|
|
207
|
+
decode(input, length) {
|
|
208
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
209
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
210
|
+
const message = createBaseMsgGrantOperatorAuthorization();
|
|
211
|
+
while (reader.pos < end) {
|
|
212
|
+
const tag = reader.uint32();
|
|
213
|
+
switch (tag >>> 3) {
|
|
214
|
+
case 1:
|
|
215
|
+
if (tag !== 10) {
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
message.corporation = reader.string();
|
|
219
|
+
continue;
|
|
220
|
+
case 2:
|
|
221
|
+
if (tag !== 18) {
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
message.operator = reader.string();
|
|
225
|
+
continue;
|
|
226
|
+
case 3:
|
|
227
|
+
if (tag !== 26) {
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
message.grantee = reader.string();
|
|
231
|
+
continue;
|
|
232
|
+
case 4:
|
|
233
|
+
if (tag !== 34) {
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
message.msgTypes.push(reader.string());
|
|
237
|
+
continue;
|
|
238
|
+
case 5:
|
|
239
|
+
if (tag !== 42) {
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
message.expiration = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
243
|
+
continue;
|
|
244
|
+
case 6:
|
|
245
|
+
if (tag !== 50) {
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
message.authzSpendLimit.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
249
|
+
continue;
|
|
250
|
+
case 7:
|
|
251
|
+
if (tag !== 58) {
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
message.authzSpendLimitPeriod = duration_1.Duration.decode(reader, reader.uint32());
|
|
255
|
+
continue;
|
|
256
|
+
case 8:
|
|
257
|
+
if (tag !== 64) {
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
message.withFeegrant = reader.bool();
|
|
261
|
+
continue;
|
|
262
|
+
case 9:
|
|
263
|
+
if (tag !== 74) {
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
message.feegrantSpendLimit.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
267
|
+
continue;
|
|
268
|
+
case 10:
|
|
269
|
+
if (tag !== 82) {
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
message.feegrantSpendLimitPeriod = duration_1.Duration.decode(reader, reader.uint32());
|
|
273
|
+
continue;
|
|
274
|
+
case 11:
|
|
275
|
+
if (tag !== 90) {
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
message.feeSpendLimit.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
reader.skipType(tag & 7);
|
|
285
|
+
}
|
|
286
|
+
return message;
|
|
287
|
+
},
|
|
288
|
+
fromJSON(object) {
|
|
289
|
+
return {
|
|
290
|
+
corporation: isSet(object.corporation) ? globalThis.String(object.corporation) : "",
|
|
291
|
+
operator: isSet(object.operator) ? globalThis.String(object.operator) : "",
|
|
292
|
+
grantee: isSet(object.grantee) ? globalThis.String(object.grantee) : "",
|
|
293
|
+
msgTypes: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.msgTypes) ? object.msgTypes.map((e) => globalThis.String(e)) : [],
|
|
294
|
+
expiration: isSet(object.expiration) ? fromJsonTimestamp(object.expiration) : undefined,
|
|
295
|
+
authzSpendLimit: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.authzSpendLimit)
|
|
296
|
+
? object.authzSpendLimit.map((e) => coin_1.Coin.fromJSON(e))
|
|
297
|
+
: [],
|
|
298
|
+
authzSpendLimitPeriod: isSet(object.authzSpendLimitPeriod)
|
|
299
|
+
? duration_1.Duration.fromJSON(object.authzSpendLimitPeriod)
|
|
300
|
+
: undefined,
|
|
301
|
+
withFeegrant: isSet(object.withFeegrant) ? globalThis.Boolean(object.withFeegrant) : false,
|
|
302
|
+
feegrantSpendLimit: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.feegrantSpendLimit)
|
|
303
|
+
? object.feegrantSpendLimit.map((e) => coin_1.Coin.fromJSON(e))
|
|
304
|
+
: [],
|
|
305
|
+
feegrantSpendLimitPeriod: isSet(object.feegrantSpendLimitPeriod)
|
|
306
|
+
? duration_1.Duration.fromJSON(object.feegrantSpendLimitPeriod)
|
|
307
|
+
: undefined,
|
|
308
|
+
feeSpendLimit: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.feeSpendLimit)
|
|
309
|
+
? object.feeSpendLimit.map((e) => coin_1.Coin.fromJSON(e))
|
|
310
|
+
: [],
|
|
311
|
+
};
|
|
312
|
+
},
|
|
313
|
+
toJSON(message) {
|
|
314
|
+
var _a, _b, _c, _d;
|
|
315
|
+
const obj = {};
|
|
316
|
+
if (message.corporation !== "") {
|
|
317
|
+
obj.corporation = message.corporation;
|
|
318
|
+
}
|
|
319
|
+
if (message.operator !== "") {
|
|
320
|
+
obj.operator = message.operator;
|
|
321
|
+
}
|
|
322
|
+
if (message.grantee !== "") {
|
|
323
|
+
obj.grantee = message.grantee;
|
|
324
|
+
}
|
|
325
|
+
if ((_a = message.msgTypes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
326
|
+
obj.msgTypes = message.msgTypes;
|
|
327
|
+
}
|
|
328
|
+
if (message.expiration !== undefined) {
|
|
329
|
+
obj.expiration = message.expiration.toISOString();
|
|
330
|
+
}
|
|
331
|
+
if ((_b = message.authzSpendLimit) === null || _b === void 0 ? void 0 : _b.length) {
|
|
332
|
+
obj.authzSpendLimit = message.authzSpendLimit.map((e) => coin_1.Coin.toJSON(e));
|
|
333
|
+
}
|
|
334
|
+
if (message.authzSpendLimitPeriod !== undefined) {
|
|
335
|
+
obj.authzSpendLimitPeriod = duration_1.Duration.toJSON(message.authzSpendLimitPeriod);
|
|
336
|
+
}
|
|
337
|
+
if (message.withFeegrant !== false) {
|
|
338
|
+
obj.withFeegrant = message.withFeegrant;
|
|
339
|
+
}
|
|
340
|
+
if ((_c = message.feegrantSpendLimit) === null || _c === void 0 ? void 0 : _c.length) {
|
|
341
|
+
obj.feegrantSpendLimit = message.feegrantSpendLimit.map((e) => coin_1.Coin.toJSON(e));
|
|
342
|
+
}
|
|
343
|
+
if (message.feegrantSpendLimitPeriod !== undefined) {
|
|
344
|
+
obj.feegrantSpendLimitPeriod = duration_1.Duration.toJSON(message.feegrantSpendLimitPeriod);
|
|
345
|
+
}
|
|
346
|
+
if ((_d = message.feeSpendLimit) === null || _d === void 0 ? void 0 : _d.length) {
|
|
347
|
+
obj.feeSpendLimit = message.feeSpendLimit.map((e) => coin_1.Coin.toJSON(e));
|
|
348
|
+
}
|
|
349
|
+
return obj;
|
|
350
|
+
},
|
|
351
|
+
create(base) {
|
|
352
|
+
return exports.MsgGrantOperatorAuthorization.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
353
|
+
},
|
|
354
|
+
fromPartial(object) {
|
|
355
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
356
|
+
const message = createBaseMsgGrantOperatorAuthorization();
|
|
357
|
+
message.corporation = (_a = object.corporation) !== null && _a !== void 0 ? _a : "";
|
|
358
|
+
message.operator = (_b = object.operator) !== null && _b !== void 0 ? _b : "";
|
|
359
|
+
message.grantee = (_c = object.grantee) !== null && _c !== void 0 ? _c : "";
|
|
360
|
+
message.msgTypes = ((_d = object.msgTypes) === null || _d === void 0 ? void 0 : _d.map((e) => e)) || [];
|
|
361
|
+
message.expiration = (_e = object.expiration) !== null && _e !== void 0 ? _e : undefined;
|
|
362
|
+
message.authzSpendLimit = ((_f = object.authzSpendLimit) === null || _f === void 0 ? void 0 : _f.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
363
|
+
message.authzSpendLimitPeriod =
|
|
364
|
+
(object.authzSpendLimitPeriod !== undefined && object.authzSpendLimitPeriod !== null)
|
|
365
|
+
? duration_1.Duration.fromPartial(object.authzSpendLimitPeriod)
|
|
366
|
+
: undefined;
|
|
367
|
+
message.withFeegrant = (_g = object.withFeegrant) !== null && _g !== void 0 ? _g : false;
|
|
368
|
+
message.feegrantSpendLimit = ((_h = object.feegrantSpendLimit) === null || _h === void 0 ? void 0 : _h.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
369
|
+
message.feegrantSpendLimitPeriod =
|
|
370
|
+
(object.feegrantSpendLimitPeriod !== undefined && object.feegrantSpendLimitPeriod !== null)
|
|
371
|
+
? duration_1.Duration.fromPartial(object.feegrantSpendLimitPeriod)
|
|
372
|
+
: undefined;
|
|
373
|
+
message.feeSpendLimit = ((_j = object.feeSpendLimit) === null || _j === void 0 ? void 0 : _j.map((e) => coin_1.Coin.fromPartial(e))) || [];
|
|
374
|
+
return message;
|
|
375
|
+
},
|
|
376
|
+
};
|
|
377
|
+
function createBaseMsgGrantOperatorAuthorizationResponse() {
|
|
378
|
+
return {};
|
|
379
|
+
}
|
|
380
|
+
exports.MsgGrantOperatorAuthorizationResponse = {
|
|
381
|
+
encode(_, writer = _m0.Writer.create()) {
|
|
382
|
+
return writer;
|
|
383
|
+
},
|
|
384
|
+
decode(input, length) {
|
|
385
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
386
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
387
|
+
const message = createBaseMsgGrantOperatorAuthorizationResponse();
|
|
388
|
+
while (reader.pos < end) {
|
|
389
|
+
const tag = reader.uint32();
|
|
390
|
+
switch (tag >>> 3) {
|
|
391
|
+
}
|
|
392
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
393
|
+
break;
|
|
394
|
+
}
|
|
395
|
+
reader.skipType(tag & 7);
|
|
396
|
+
}
|
|
397
|
+
return message;
|
|
398
|
+
},
|
|
399
|
+
fromJSON(_) {
|
|
400
|
+
return {};
|
|
401
|
+
},
|
|
402
|
+
toJSON(_) {
|
|
403
|
+
const obj = {};
|
|
404
|
+
return obj;
|
|
405
|
+
},
|
|
406
|
+
create(base) {
|
|
407
|
+
return exports.MsgGrantOperatorAuthorizationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
408
|
+
},
|
|
409
|
+
fromPartial(_) {
|
|
410
|
+
const message = createBaseMsgGrantOperatorAuthorizationResponse();
|
|
411
|
+
return message;
|
|
412
|
+
},
|
|
413
|
+
};
|
|
414
|
+
function createBaseMsgRevokeOperatorAuthorization() {
|
|
415
|
+
return { corporation: "", operator: "", grantee: "" };
|
|
416
|
+
}
|
|
417
|
+
exports.MsgRevokeOperatorAuthorization = {
|
|
418
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
419
|
+
if (message.corporation !== "") {
|
|
420
|
+
writer.uint32(10).string(message.corporation);
|
|
421
|
+
}
|
|
422
|
+
if (message.operator !== "") {
|
|
423
|
+
writer.uint32(18).string(message.operator);
|
|
424
|
+
}
|
|
425
|
+
if (message.grantee !== "") {
|
|
426
|
+
writer.uint32(26).string(message.grantee);
|
|
427
|
+
}
|
|
428
|
+
return writer;
|
|
429
|
+
},
|
|
430
|
+
decode(input, length) {
|
|
431
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
432
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
433
|
+
const message = createBaseMsgRevokeOperatorAuthorization();
|
|
434
|
+
while (reader.pos < end) {
|
|
435
|
+
const tag = reader.uint32();
|
|
436
|
+
switch (tag >>> 3) {
|
|
437
|
+
case 1:
|
|
438
|
+
if (tag !== 10) {
|
|
439
|
+
break;
|
|
440
|
+
}
|
|
441
|
+
message.corporation = reader.string();
|
|
442
|
+
continue;
|
|
443
|
+
case 2:
|
|
444
|
+
if (tag !== 18) {
|
|
445
|
+
break;
|
|
446
|
+
}
|
|
447
|
+
message.operator = reader.string();
|
|
448
|
+
continue;
|
|
449
|
+
case 3:
|
|
450
|
+
if (tag !== 26) {
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
message.grantee = reader.string();
|
|
454
|
+
continue;
|
|
455
|
+
}
|
|
456
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
457
|
+
break;
|
|
458
|
+
}
|
|
459
|
+
reader.skipType(tag & 7);
|
|
460
|
+
}
|
|
461
|
+
return message;
|
|
462
|
+
},
|
|
463
|
+
fromJSON(object) {
|
|
464
|
+
return {
|
|
465
|
+
corporation: isSet(object.corporation) ? globalThis.String(object.corporation) : "",
|
|
466
|
+
operator: isSet(object.operator) ? globalThis.String(object.operator) : "",
|
|
467
|
+
grantee: isSet(object.grantee) ? globalThis.String(object.grantee) : "",
|
|
468
|
+
};
|
|
469
|
+
},
|
|
470
|
+
toJSON(message) {
|
|
471
|
+
const obj = {};
|
|
472
|
+
if (message.corporation !== "") {
|
|
473
|
+
obj.corporation = message.corporation;
|
|
474
|
+
}
|
|
475
|
+
if (message.operator !== "") {
|
|
476
|
+
obj.operator = message.operator;
|
|
477
|
+
}
|
|
478
|
+
if (message.grantee !== "") {
|
|
479
|
+
obj.grantee = message.grantee;
|
|
480
|
+
}
|
|
481
|
+
return obj;
|
|
482
|
+
},
|
|
483
|
+
create(base) {
|
|
484
|
+
return exports.MsgRevokeOperatorAuthorization.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
485
|
+
},
|
|
486
|
+
fromPartial(object) {
|
|
487
|
+
var _a, _b, _c;
|
|
488
|
+
const message = createBaseMsgRevokeOperatorAuthorization();
|
|
489
|
+
message.corporation = (_a = object.corporation) !== null && _a !== void 0 ? _a : "";
|
|
490
|
+
message.operator = (_b = object.operator) !== null && _b !== void 0 ? _b : "";
|
|
491
|
+
message.grantee = (_c = object.grantee) !== null && _c !== void 0 ? _c : "";
|
|
492
|
+
return message;
|
|
493
|
+
},
|
|
494
|
+
};
|
|
495
|
+
function createBaseMsgRevokeOperatorAuthorizationResponse() {
|
|
496
|
+
return {};
|
|
497
|
+
}
|
|
498
|
+
exports.MsgRevokeOperatorAuthorizationResponse = {
|
|
499
|
+
encode(_, writer = _m0.Writer.create()) {
|
|
500
|
+
return writer;
|
|
501
|
+
},
|
|
502
|
+
decode(input, length) {
|
|
503
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
504
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
505
|
+
const message = createBaseMsgRevokeOperatorAuthorizationResponse();
|
|
506
|
+
while (reader.pos < end) {
|
|
507
|
+
const tag = reader.uint32();
|
|
508
|
+
switch (tag >>> 3) {
|
|
509
|
+
}
|
|
510
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
reader.skipType(tag & 7);
|
|
514
|
+
}
|
|
515
|
+
return message;
|
|
516
|
+
},
|
|
517
|
+
fromJSON(_) {
|
|
518
|
+
return {};
|
|
519
|
+
},
|
|
520
|
+
toJSON(_) {
|
|
521
|
+
const obj = {};
|
|
522
|
+
return obj;
|
|
523
|
+
},
|
|
524
|
+
create(base) {
|
|
525
|
+
return exports.MsgRevokeOperatorAuthorizationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
526
|
+
},
|
|
527
|
+
fromPartial(_) {
|
|
528
|
+
const message = createBaseMsgRevokeOperatorAuthorizationResponse();
|
|
529
|
+
return message;
|
|
530
|
+
},
|
|
531
|
+
};
|
|
532
|
+
exports.MsgServiceName = "verana.de.v1.Msg";
|
|
533
|
+
class MsgClientImpl {
|
|
534
|
+
constructor(rpc, opts) {
|
|
535
|
+
this.service = (opts === null || opts === void 0 ? void 0 : opts.service) || exports.MsgServiceName;
|
|
536
|
+
this.rpc = rpc;
|
|
537
|
+
this.UpdateParams = this.UpdateParams.bind(this);
|
|
538
|
+
this.GrantOperatorAuthorization = this.GrantOperatorAuthorization.bind(this);
|
|
539
|
+
this.RevokeOperatorAuthorization = this.RevokeOperatorAuthorization.bind(this);
|
|
540
|
+
}
|
|
541
|
+
UpdateParams(request) {
|
|
542
|
+
const data = exports.MsgUpdateParams.encode(request).finish();
|
|
543
|
+
const promise = this.rpc.request(this.service, "UpdateParams", data);
|
|
544
|
+
return promise.then((data) => exports.MsgUpdateParamsResponse.decode(_m0.Reader.create(data)));
|
|
545
|
+
}
|
|
546
|
+
GrantOperatorAuthorization(request) {
|
|
547
|
+
const data = exports.MsgGrantOperatorAuthorization.encode(request).finish();
|
|
548
|
+
const promise = this.rpc.request(this.service, "GrantOperatorAuthorization", data);
|
|
549
|
+
return promise.then((data) => exports.MsgGrantOperatorAuthorizationResponse.decode(_m0.Reader.create(data)));
|
|
550
|
+
}
|
|
551
|
+
RevokeOperatorAuthorization(request) {
|
|
552
|
+
const data = exports.MsgRevokeOperatorAuthorization.encode(request).finish();
|
|
553
|
+
const promise = this.rpc.request(this.service, "RevokeOperatorAuthorization", data);
|
|
554
|
+
return promise.then((data) => exports.MsgRevokeOperatorAuthorizationResponse.decode(_m0.Reader.create(data)));
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
exports.MsgClientImpl = MsgClientImpl;
|
|
558
|
+
function toTimestamp(date) {
|
|
559
|
+
const seconds = Math.trunc(date.getTime() / 1000);
|
|
560
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
561
|
+
return { seconds, nanos };
|
|
562
|
+
}
|
|
563
|
+
function fromTimestamp(t) {
|
|
564
|
+
let millis = (t.seconds || 0) * 1000;
|
|
565
|
+
millis += (t.nanos || 0) / 1000000;
|
|
566
|
+
return new globalThis.Date(millis);
|
|
567
|
+
}
|
|
568
|
+
function fromJsonTimestamp(o) {
|
|
569
|
+
if (o instanceof globalThis.Date) {
|
|
570
|
+
return o;
|
|
571
|
+
}
|
|
572
|
+
else if (typeof o === "string") {
|
|
573
|
+
return new globalThis.Date(o);
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
function isSet(value) {
|
|
580
|
+
return value !== null && value !== undefined;
|
|
581
|
+
}
|