@ottochain/sdk 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/dist/cjs/index.js +34 -15
- package/dist/cjs/ottochain/index.js +20 -1
- package/dist/cjs/ottochain/metagraph-client.js +7 -8
- package/dist/cjs/ottochain/snapshot.js +3 -3
- package/dist/cjs/{metakit → ottochain}/transaction.js +4 -5
- package/dist/cjs/verify.js +17 -0
- package/dist/esm/apps/contracts/index.js +28 -10
- package/dist/esm/apps/corporate/index.js +79 -24
- package/dist/esm/apps/governance/index.js +85 -36
- package/dist/esm/apps/identity/constants.js +27 -22
- package/dist/esm/apps/identity/index.js +35 -7
- package/dist/esm/apps/index.js +32 -6
- package/dist/esm/apps/markets/index.js +27 -6
- package/dist/esm/apps/oracles/index.js +27 -7
- package/dist/esm/errors.js +19 -9
- package/dist/esm/generated/google/protobuf/struct.js +39 -33
- package/dist/esm/generated/google/protobuf/timestamp.js +9 -6
- package/dist/esm/generated/index.js +134 -10
- package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +54 -48
- package/dist/esm/generated/ottochain/apps/corporate/v1/corporate.js +357 -335
- package/dist/esm/generated/ottochain/apps/governance/v1/governance.js +299 -284
- package/dist/esm/generated/ottochain/apps/identity/v1/agent.js +47 -38
- package/dist/esm/generated/ottochain/apps/identity/v1/attestation.js +50 -44
- package/dist/esm/generated/ottochain/apps/markets/v1/market.js +86 -77
- package/dist/esm/generated/ottochain/apps/oracles/v1/oracle.js +72 -66
- package/dist/esm/generated/ottochain/v1/common.js +4 -1
- package/dist/esm/generated/ottochain/v1/fiber.js +96 -90
- package/dist/esm/generated/ottochain/v1/messages.js +82 -79
- package/dist/esm/generated/ottochain/v1/records.js +140 -137
- package/dist/esm/index.js +86 -20
- package/dist/esm/{metakit → ottochain}/drop-nulls.js +5 -1
- package/dist/esm/ottochain/index.js +56 -3
- package/dist/esm/ottochain/metagraph-client.js +16 -13
- package/dist/esm/{metakit → ottochain}/normalize.js +11 -4
- package/dist/esm/ottochain/snapshot.js +20 -10
- package/dist/esm/{metakit → ottochain}/transaction.js +25 -14
- package/dist/esm/ottochain/types.js +2 -1
- package/dist/esm/types.js +7 -2
- package/dist/esm/validation.js +76 -65
- package/dist/esm/verify.js +17 -0
- package/dist/types/index.d.ts +14 -7
- package/dist/types/ottochain/index.d.ts +4 -0
- package/dist/types/ottochain/metagraph-client.d.ts +1 -1
- package/dist/types/{metakit → ottochain}/transaction.d.ts +1 -1
- package/dist/types/validation.d.ts +8 -8
- package/dist/types/verify.d.ts +9 -0
- package/package.json +5 -3
- package/dist/cjs/metakit/binary.js +0 -58
- package/dist/cjs/metakit/canonicalize.js +0 -40
- package/dist/cjs/metakit/codec.js +0 -45
- package/dist/cjs/metakit/currency-transaction.js +0 -319
- package/dist/cjs/metakit/currency-types.js +0 -13
- package/dist/cjs/metakit/hash.js +0 -84
- package/dist/cjs/metakit/index.js +0 -86
- package/dist/cjs/metakit/network/client.js +0 -78
- package/dist/cjs/metakit/network/currency-l1-client.js +0 -101
- package/dist/cjs/metakit/network/data-l1-client.js +0 -76
- package/dist/cjs/metakit/network/index.js +0 -16
- package/dist/cjs/metakit/network/types.js +0 -20
- package/dist/cjs/metakit/sign.js +0 -120
- package/dist/cjs/metakit/signed-object.js +0 -100
- package/dist/cjs/metakit/types.js +0 -14
- package/dist/cjs/metakit/verify.js +0 -217
- package/dist/cjs/metakit/wallet.js +0 -127
- package/dist/esm/metakit/binary.js +0 -53
- package/dist/esm/metakit/canonicalize.js +0 -33
- package/dist/esm/metakit/codec.js +0 -38
- package/dist/esm/metakit/currency-transaction.js +0 -306
- package/dist/esm/metakit/currency-types.js +0 -10
- package/dist/esm/metakit/hash.js +0 -77
- package/dist/esm/metakit/index.js +0 -33
- package/dist/esm/metakit/network/client.js +0 -74
- package/dist/esm/metakit/network/currency-l1-client.js +0 -97
- package/dist/esm/metakit/network/data-l1-client.js +0 -72
- package/dist/esm/metakit/network/index.js +0 -9
- package/dist/esm/metakit/network/types.js +0 -16
- package/dist/esm/metakit/sign.js +0 -114
- package/dist/esm/metakit/signed-object.js +0 -94
- package/dist/esm/metakit/types.js +0 -11
- package/dist/esm/metakit/verify.js +0 -210
- package/dist/esm/metakit/wallet.js +0 -117
- package/dist/types/metakit/binary.d.ts +0 -38
- package/dist/types/metakit/canonicalize.d.ts +0 -26
- package/dist/types/metakit/codec.d.ts +0 -16
- package/dist/types/metakit/currency-transaction.d.ts +0 -157
- package/dist/types/metakit/currency-types.d.ts +0 -55
- package/dist/types/metakit/hash.d.ts +0 -50
- package/dist/types/metakit/index.d.ts +0 -26
- package/dist/types/metakit/network/client.d.ts +0 -23
- package/dist/types/metakit/network/currency-l1-client.d.ts +0 -71
- package/dist/types/metakit/network/data-l1-client.d.ts +0 -57
- package/dist/types/metakit/network/index.d.ts +0 -10
- package/dist/types/metakit/network/types.d.ts +0 -74
- package/dist/types/metakit/sign.d.ts +0 -65
- package/dist/types/metakit/signed-object.d.ts +0 -66
- package/dist/types/metakit/types.d.ts +0 -67
- package/dist/types/metakit/verify.d.ts +0 -55
- package/dist/types/metakit/wallet.d.ts +0 -70
- /package/dist/cjs/{metakit → ottochain}/drop-nulls.js +0 -0
- /package/dist/cjs/{metakit → ottochain}/normalize.js +0 -0
- /package/dist/types/{metakit → ottochain}/drop-nulls.d.ts +0 -0
- /package/dist/types/{metakit → ottochain}/normalize.d.ts +0 -0
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
3
|
// versions:
|
|
3
4
|
// protoc-gen-ts_proto v2.11.2
|
|
4
5
|
// protoc unknown
|
|
5
6
|
// source: ottochain/apps/governance/v1/governance.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ExecuteRequest = exports.VoteRequest = exports.ProposeRequest = exports.CreateDAORequest = exports.ThresholdHistoryEntry = exports.ThresholdVotes = exports.ThresholdDAO_MemberJoinedAtEntry = exports.ThresholdDAO = exports.TokenProposalResult = exports.TokenDAO_DelegationsEntry = exports.TokenDAO_BalancesEntry = exports.TokenDAO = exports.MultisigAction_SignaturesEntry = exports.MultisigAction = exports.MultisigDAO_SignaturesEntry = exports.MultisigDAO = exports.OwnershipTransfer = exports.SingleOwnerAction = exports.SingleOwnerDAO = exports.VoteTally = exports.Vote = exports.Proposal = exports.DAOMetadata = exports.voteChoiceToNumber = exports.voteChoiceToJSON = exports.voteChoiceFromJSON = exports.VoteChoice = exports.proposalStatusToNumber = exports.proposalStatusToJSON = exports.proposalStatusFromJSON = exports.ProposalStatus = exports.dAOStatusToNumber = exports.dAOStatusToJSON = exports.dAOStatusFromJSON = exports.DAOStatus = exports.dAOTypeToNumber = exports.dAOTypeToJSON = exports.dAOTypeFromJSON = exports.DAOType = exports.protobufPackage = void 0;
|
|
6
9
|
/* eslint-disable */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
const struct_js_1 = require("../../../../google/protobuf/struct.js");
|
|
12
|
+
const timestamp_js_1 = require("../../../../google/protobuf/timestamp.js");
|
|
13
|
+
exports.protobufPackage = "ottochain.apps.governance.v1";
|
|
11
14
|
/** Type of DAO governance model */
|
|
12
|
-
|
|
15
|
+
var DAOType;
|
|
13
16
|
(function (DAOType) {
|
|
14
17
|
DAOType["DAO_TYPE_UNSPECIFIED"] = "DAO_TYPE_UNSPECIFIED";
|
|
15
18
|
/** DAO_TYPE_SINGLE - Single owner controls all actions */
|
|
@@ -21,8 +24,8 @@ export var DAOType;
|
|
|
21
24
|
/** DAO_TYPE_THRESHOLD - Reputation threshold for participation */
|
|
22
25
|
DAOType["DAO_TYPE_THRESHOLD"] = "DAO_TYPE_THRESHOLD";
|
|
23
26
|
DAOType["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
24
|
-
})(DAOType || (DAOType = {}));
|
|
25
|
-
|
|
27
|
+
})(DAOType || (exports.DAOType = DAOType = {}));
|
|
28
|
+
function dAOTypeFromJSON(object) {
|
|
26
29
|
switch (object) {
|
|
27
30
|
case 0:
|
|
28
31
|
case "DAO_TYPE_UNSPECIFIED":
|
|
@@ -45,7 +48,8 @@ export function dAOTypeFromJSON(object) {
|
|
|
45
48
|
return DAOType.UNRECOGNIZED;
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
|
-
|
|
51
|
+
exports.dAOTypeFromJSON = dAOTypeFromJSON;
|
|
52
|
+
function dAOTypeToJSON(object) {
|
|
49
53
|
switch (object) {
|
|
50
54
|
case DAOType.DAO_TYPE_UNSPECIFIED:
|
|
51
55
|
return "DAO_TYPE_UNSPECIFIED";
|
|
@@ -62,7 +66,8 @@ export function dAOTypeToJSON(object) {
|
|
|
62
66
|
return "UNRECOGNIZED";
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
|
-
|
|
69
|
+
exports.dAOTypeToJSON = dAOTypeToJSON;
|
|
70
|
+
function dAOTypeToNumber(object) {
|
|
66
71
|
switch (object) {
|
|
67
72
|
case DAOType.DAO_TYPE_UNSPECIFIED:
|
|
68
73
|
return 0;
|
|
@@ -79,15 +84,16 @@ export function dAOTypeToNumber(object) {
|
|
|
79
84
|
return -1;
|
|
80
85
|
}
|
|
81
86
|
}
|
|
87
|
+
exports.dAOTypeToNumber = dAOTypeToNumber;
|
|
82
88
|
/** DAO lifecycle status */
|
|
83
|
-
|
|
89
|
+
var DAOStatus;
|
|
84
90
|
(function (DAOStatus) {
|
|
85
91
|
DAOStatus["DAO_STATUS_UNSPECIFIED"] = "DAO_STATUS_UNSPECIFIED";
|
|
86
92
|
DAOStatus["DAO_STATUS_ACTIVE"] = "DAO_STATUS_ACTIVE";
|
|
87
93
|
DAOStatus["DAO_STATUS_DISSOLVED"] = "DAO_STATUS_DISSOLVED";
|
|
88
94
|
DAOStatus["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
89
|
-
})(DAOStatus || (DAOStatus = {}));
|
|
90
|
-
|
|
95
|
+
})(DAOStatus || (exports.DAOStatus = DAOStatus = {}));
|
|
96
|
+
function dAOStatusFromJSON(object) {
|
|
91
97
|
switch (object) {
|
|
92
98
|
case 0:
|
|
93
99
|
case "DAO_STATUS_UNSPECIFIED":
|
|
@@ -104,7 +110,8 @@ export function dAOStatusFromJSON(object) {
|
|
|
104
110
|
return DAOStatus.UNRECOGNIZED;
|
|
105
111
|
}
|
|
106
112
|
}
|
|
107
|
-
|
|
113
|
+
exports.dAOStatusFromJSON = dAOStatusFromJSON;
|
|
114
|
+
function dAOStatusToJSON(object) {
|
|
108
115
|
switch (object) {
|
|
109
116
|
case DAOStatus.DAO_STATUS_UNSPECIFIED:
|
|
110
117
|
return "DAO_STATUS_UNSPECIFIED";
|
|
@@ -117,7 +124,8 @@ export function dAOStatusToJSON(object) {
|
|
|
117
124
|
return "UNRECOGNIZED";
|
|
118
125
|
}
|
|
119
126
|
}
|
|
120
|
-
|
|
127
|
+
exports.dAOStatusToJSON = dAOStatusToJSON;
|
|
128
|
+
function dAOStatusToNumber(object) {
|
|
121
129
|
switch (object) {
|
|
122
130
|
case DAOStatus.DAO_STATUS_UNSPECIFIED:
|
|
123
131
|
return 0;
|
|
@@ -130,8 +138,9 @@ export function dAOStatusToNumber(object) {
|
|
|
130
138
|
return -1;
|
|
131
139
|
}
|
|
132
140
|
}
|
|
141
|
+
exports.dAOStatusToNumber = dAOStatusToNumber;
|
|
133
142
|
/** Proposal status for voting DAOs */
|
|
134
|
-
|
|
143
|
+
var ProposalStatus;
|
|
135
144
|
(function (ProposalStatus) {
|
|
136
145
|
ProposalStatus["PROPOSAL_STATUS_UNSPECIFIED"] = "PROPOSAL_STATUS_UNSPECIFIED";
|
|
137
146
|
ProposalStatus["PROPOSAL_STATUS_PENDING"] = "PROPOSAL_STATUS_PENDING";
|
|
@@ -141,8 +150,8 @@ export var ProposalStatus;
|
|
|
141
150
|
ProposalStatus["PROPOSAL_STATUS_REJECTED"] = "PROPOSAL_STATUS_REJECTED";
|
|
142
151
|
ProposalStatus["PROPOSAL_STATUS_CANCELLED"] = "PROPOSAL_STATUS_CANCELLED";
|
|
143
152
|
ProposalStatus["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
144
|
-
})(ProposalStatus || (ProposalStatus = {}));
|
|
145
|
-
|
|
153
|
+
})(ProposalStatus || (exports.ProposalStatus = ProposalStatus = {}));
|
|
154
|
+
function proposalStatusFromJSON(object) {
|
|
146
155
|
switch (object) {
|
|
147
156
|
case 0:
|
|
148
157
|
case "PROPOSAL_STATUS_UNSPECIFIED":
|
|
@@ -171,7 +180,8 @@ export function proposalStatusFromJSON(object) {
|
|
|
171
180
|
return ProposalStatus.UNRECOGNIZED;
|
|
172
181
|
}
|
|
173
182
|
}
|
|
174
|
-
|
|
183
|
+
exports.proposalStatusFromJSON = proposalStatusFromJSON;
|
|
184
|
+
function proposalStatusToJSON(object) {
|
|
175
185
|
switch (object) {
|
|
176
186
|
case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED:
|
|
177
187
|
return "PROPOSAL_STATUS_UNSPECIFIED";
|
|
@@ -192,7 +202,8 @@ export function proposalStatusToJSON(object) {
|
|
|
192
202
|
return "UNRECOGNIZED";
|
|
193
203
|
}
|
|
194
204
|
}
|
|
195
|
-
|
|
205
|
+
exports.proposalStatusToJSON = proposalStatusToJSON;
|
|
206
|
+
function proposalStatusToNumber(object) {
|
|
196
207
|
switch (object) {
|
|
197
208
|
case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED:
|
|
198
209
|
return 0;
|
|
@@ -213,16 +224,17 @@ export function proposalStatusToNumber(object) {
|
|
|
213
224
|
return -1;
|
|
214
225
|
}
|
|
215
226
|
}
|
|
227
|
+
exports.proposalStatusToNumber = proposalStatusToNumber;
|
|
216
228
|
/** Vote choice */
|
|
217
|
-
|
|
229
|
+
var VoteChoice;
|
|
218
230
|
(function (VoteChoice) {
|
|
219
231
|
VoteChoice["VOTE_CHOICE_UNSPECIFIED"] = "VOTE_CHOICE_UNSPECIFIED";
|
|
220
232
|
VoteChoice["VOTE_CHOICE_FOR"] = "VOTE_CHOICE_FOR";
|
|
221
233
|
VoteChoice["VOTE_CHOICE_AGAINST"] = "VOTE_CHOICE_AGAINST";
|
|
222
234
|
VoteChoice["VOTE_CHOICE_ABSTAIN"] = "VOTE_CHOICE_ABSTAIN";
|
|
223
235
|
VoteChoice["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
224
|
-
})(VoteChoice || (VoteChoice = {}));
|
|
225
|
-
|
|
236
|
+
})(VoteChoice || (exports.VoteChoice = VoteChoice = {}));
|
|
237
|
+
function voteChoiceFromJSON(object) {
|
|
226
238
|
switch (object) {
|
|
227
239
|
case 0:
|
|
228
240
|
case "VOTE_CHOICE_UNSPECIFIED":
|
|
@@ -242,7 +254,8 @@ export function voteChoiceFromJSON(object) {
|
|
|
242
254
|
return VoteChoice.UNRECOGNIZED;
|
|
243
255
|
}
|
|
244
256
|
}
|
|
245
|
-
|
|
257
|
+
exports.voteChoiceFromJSON = voteChoiceFromJSON;
|
|
258
|
+
function voteChoiceToJSON(object) {
|
|
246
259
|
switch (object) {
|
|
247
260
|
case VoteChoice.VOTE_CHOICE_UNSPECIFIED:
|
|
248
261
|
return "VOTE_CHOICE_UNSPECIFIED";
|
|
@@ -257,7 +270,8 @@ export function voteChoiceToJSON(object) {
|
|
|
257
270
|
return "UNRECOGNIZED";
|
|
258
271
|
}
|
|
259
272
|
}
|
|
260
|
-
|
|
273
|
+
exports.voteChoiceToJSON = voteChoiceToJSON;
|
|
274
|
+
function voteChoiceToNumber(object) {
|
|
261
275
|
switch (object) {
|
|
262
276
|
case VoteChoice.VOTE_CHOICE_UNSPECIFIED:
|
|
263
277
|
return 0;
|
|
@@ -272,11 +286,12 @@ export function voteChoiceToNumber(object) {
|
|
|
272
286
|
return -1;
|
|
273
287
|
}
|
|
274
288
|
}
|
|
289
|
+
exports.voteChoiceToNumber = voteChoiceToNumber;
|
|
275
290
|
function createBaseDAOMetadata() {
|
|
276
291
|
return { description: "", website: "", logo: "", extra: undefined };
|
|
277
292
|
}
|
|
278
|
-
|
|
279
|
-
encode(message, writer = new BinaryWriter()) {
|
|
293
|
+
exports.DAOMetadata = {
|
|
294
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
280
295
|
if (message.description !== "") {
|
|
281
296
|
writer.uint32(10).string(message.description);
|
|
282
297
|
}
|
|
@@ -287,12 +302,12 @@ export const DAOMetadata = {
|
|
|
287
302
|
writer.uint32(26).string(message.logo);
|
|
288
303
|
}
|
|
289
304
|
if (message.extra !== undefined) {
|
|
290
|
-
Struct.encode(Struct.wrap(message.extra), writer.uint32(34).fork()).join();
|
|
305
|
+
struct_js_1.Struct.encode(struct_js_1.Struct.wrap(message.extra), writer.uint32(34).fork()).join();
|
|
291
306
|
}
|
|
292
307
|
return writer;
|
|
293
308
|
},
|
|
294
309
|
decode(input, length) {
|
|
295
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
310
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
296
311
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
297
312
|
const message = createBaseDAOMetadata();
|
|
298
313
|
while (reader.pos < end) {
|
|
@@ -323,7 +338,7 @@ export const DAOMetadata = {
|
|
|
323
338
|
if (tag !== 34) {
|
|
324
339
|
break;
|
|
325
340
|
}
|
|
326
|
-
message.extra = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
341
|
+
message.extra = struct_js_1.Struct.unwrap(struct_js_1.Struct.decode(reader, reader.uint32()));
|
|
327
342
|
continue;
|
|
328
343
|
}
|
|
329
344
|
}
|
|
@@ -359,7 +374,7 @@ export const DAOMetadata = {
|
|
|
359
374
|
return obj;
|
|
360
375
|
},
|
|
361
376
|
create(base) {
|
|
362
|
-
return DAOMetadata.fromPartial(base ?? {});
|
|
377
|
+
return exports.DAOMetadata.fromPartial(base ?? {});
|
|
363
378
|
},
|
|
364
379
|
fromPartial(object) {
|
|
365
380
|
const message = createBaseDAOMetadata();
|
|
@@ -384,8 +399,8 @@ function createBaseProposal() {
|
|
|
384
399
|
executableAt: undefined,
|
|
385
400
|
};
|
|
386
401
|
}
|
|
387
|
-
|
|
388
|
-
encode(message, writer = new BinaryWriter()) {
|
|
402
|
+
exports.Proposal = {
|
|
403
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
389
404
|
if (message.id !== "") {
|
|
390
405
|
writer.uint32(10).string(message.id);
|
|
391
406
|
}
|
|
@@ -399,27 +414,27 @@ export const Proposal = {
|
|
|
399
414
|
writer.uint32(34).string(message.actionType);
|
|
400
415
|
}
|
|
401
416
|
if (message.payload !== undefined) {
|
|
402
|
-
Struct.encode(Struct.wrap(message.payload), writer.uint32(42).fork()).join();
|
|
417
|
+
struct_js_1.Struct.encode(struct_js_1.Struct.wrap(message.payload), writer.uint32(42).fork()).join();
|
|
403
418
|
}
|
|
404
419
|
if (message.proposer !== "") {
|
|
405
420
|
writer.uint32(50).string(message.proposer);
|
|
406
421
|
}
|
|
407
422
|
if (message.proposedAt !== undefined) {
|
|
408
|
-
Timestamp.encode(toTimestamp(message.proposedAt), writer.uint32(58).fork()).join();
|
|
423
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.proposedAt), writer.uint32(58).fork()).join();
|
|
409
424
|
}
|
|
410
425
|
if (message.deadline !== undefined) {
|
|
411
|
-
Timestamp.encode(toTimestamp(message.deadline), writer.uint32(66).fork()).join();
|
|
426
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.deadline), writer.uint32(66).fork()).join();
|
|
412
427
|
}
|
|
413
428
|
if (message.queuedAt !== undefined) {
|
|
414
|
-
Timestamp.encode(toTimestamp(message.queuedAt), writer.uint32(74).fork()).join();
|
|
429
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.queuedAt), writer.uint32(74).fork()).join();
|
|
415
430
|
}
|
|
416
431
|
if (message.executableAt !== undefined) {
|
|
417
|
-
Timestamp.encode(toTimestamp(message.executableAt), writer.uint32(82).fork()).join();
|
|
432
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.executableAt), writer.uint32(82).fork()).join();
|
|
418
433
|
}
|
|
419
434
|
return writer;
|
|
420
435
|
},
|
|
421
436
|
decode(input, length) {
|
|
422
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
437
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
423
438
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
424
439
|
const message = createBaseProposal();
|
|
425
440
|
while (reader.pos < end) {
|
|
@@ -457,7 +472,7 @@ export const Proposal = {
|
|
|
457
472
|
if (tag !== 42) {
|
|
458
473
|
break;
|
|
459
474
|
}
|
|
460
|
-
message.payload = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
475
|
+
message.payload = struct_js_1.Struct.unwrap(struct_js_1.Struct.decode(reader, reader.uint32()));
|
|
461
476
|
continue;
|
|
462
477
|
}
|
|
463
478
|
case 6: {
|
|
@@ -471,28 +486,28 @@ export const Proposal = {
|
|
|
471
486
|
if (tag !== 58) {
|
|
472
487
|
break;
|
|
473
488
|
}
|
|
474
|
-
message.proposedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
489
|
+
message.proposedAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
475
490
|
continue;
|
|
476
491
|
}
|
|
477
492
|
case 8: {
|
|
478
493
|
if (tag !== 66) {
|
|
479
494
|
break;
|
|
480
495
|
}
|
|
481
|
-
message.deadline = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
496
|
+
message.deadline = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
482
497
|
continue;
|
|
483
498
|
}
|
|
484
499
|
case 9: {
|
|
485
500
|
if (tag !== 74) {
|
|
486
501
|
break;
|
|
487
502
|
}
|
|
488
|
-
message.queuedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
503
|
+
message.queuedAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
489
504
|
continue;
|
|
490
505
|
}
|
|
491
506
|
case 10: {
|
|
492
507
|
if (tag !== 82) {
|
|
493
508
|
break;
|
|
494
509
|
}
|
|
495
|
-
message.executableAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
510
|
+
message.executableAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
496
511
|
continue;
|
|
497
512
|
}
|
|
498
513
|
}
|
|
@@ -568,7 +583,7 @@ export const Proposal = {
|
|
|
568
583
|
return obj;
|
|
569
584
|
},
|
|
570
585
|
create(base) {
|
|
571
|
-
return Proposal.fromPartial(base ?? {});
|
|
586
|
+
return exports.Proposal.fromPartial(base ?? {});
|
|
572
587
|
},
|
|
573
588
|
fromPartial(object) {
|
|
574
589
|
const message = createBaseProposal();
|
|
@@ -588,8 +603,8 @@ export const Proposal = {
|
|
|
588
603
|
function createBaseVote() {
|
|
589
604
|
return { voter: "", choice: VoteChoice.VOTE_CHOICE_UNSPECIFIED, weight: 0, votedAt: undefined };
|
|
590
605
|
}
|
|
591
|
-
|
|
592
|
-
encode(message, writer = new BinaryWriter()) {
|
|
606
|
+
exports.Vote = {
|
|
607
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
593
608
|
if (message.voter !== "") {
|
|
594
609
|
writer.uint32(10).string(message.voter);
|
|
595
610
|
}
|
|
@@ -600,12 +615,12 @@ export const Vote = {
|
|
|
600
615
|
writer.uint32(24).int64(message.weight);
|
|
601
616
|
}
|
|
602
617
|
if (message.votedAt !== undefined) {
|
|
603
|
-
Timestamp.encode(toTimestamp(message.votedAt), writer.uint32(34).fork()).join();
|
|
618
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.votedAt), writer.uint32(34).fork()).join();
|
|
604
619
|
}
|
|
605
620
|
return writer;
|
|
606
621
|
},
|
|
607
622
|
decode(input, length) {
|
|
608
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
623
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
609
624
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
610
625
|
const message = createBaseVote();
|
|
611
626
|
while (reader.pos < end) {
|
|
@@ -636,7 +651,7 @@ export const Vote = {
|
|
|
636
651
|
if (tag !== 34) {
|
|
637
652
|
break;
|
|
638
653
|
}
|
|
639
|
-
message.votedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
654
|
+
message.votedAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
640
655
|
continue;
|
|
641
656
|
}
|
|
642
657
|
}
|
|
@@ -676,7 +691,7 @@ export const Vote = {
|
|
|
676
691
|
return obj;
|
|
677
692
|
},
|
|
678
693
|
create(base) {
|
|
679
|
-
return Vote.fromPartial(base ?? {});
|
|
694
|
+
return exports.Vote.fromPartial(base ?? {});
|
|
680
695
|
},
|
|
681
696
|
fromPartial(object) {
|
|
682
697
|
const message = createBaseVote();
|
|
@@ -690,8 +705,8 @@ export const Vote = {
|
|
|
690
705
|
function createBaseVoteTally() {
|
|
691
706
|
return { votesFor: 0, votesAgainst: 0, votesAbstain: 0, votes: [] };
|
|
692
707
|
}
|
|
693
|
-
|
|
694
|
-
encode(message, writer = new BinaryWriter()) {
|
|
708
|
+
exports.VoteTally = {
|
|
709
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
695
710
|
if (message.votesFor !== 0) {
|
|
696
711
|
writer.uint32(8).int64(message.votesFor);
|
|
697
712
|
}
|
|
@@ -702,12 +717,12 @@ export const VoteTally = {
|
|
|
702
717
|
writer.uint32(24).int64(message.votesAbstain);
|
|
703
718
|
}
|
|
704
719
|
for (const v of message.votes) {
|
|
705
|
-
Vote.encode(v, writer.uint32(34).fork()).join();
|
|
720
|
+
exports.Vote.encode(v, writer.uint32(34).fork()).join();
|
|
706
721
|
}
|
|
707
722
|
return writer;
|
|
708
723
|
},
|
|
709
724
|
decode(input, length) {
|
|
710
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
725
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
711
726
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
712
727
|
const message = createBaseVoteTally();
|
|
713
728
|
while (reader.pos < end) {
|
|
@@ -738,7 +753,7 @@ export const VoteTally = {
|
|
|
738
753
|
if (tag !== 34) {
|
|
739
754
|
break;
|
|
740
755
|
}
|
|
741
|
-
message.votes.push(Vote.decode(reader, reader.uint32()));
|
|
756
|
+
message.votes.push(exports.Vote.decode(reader, reader.uint32()));
|
|
742
757
|
continue;
|
|
743
758
|
}
|
|
744
759
|
}
|
|
@@ -766,7 +781,7 @@ export const VoteTally = {
|
|
|
766
781
|
: isSet(object.votes_abstain)
|
|
767
782
|
? globalThis.Number(object.votes_abstain)
|
|
768
783
|
: 0,
|
|
769
|
-
votes: globalThis.Array.isArray(object?.votes) ? object.votes.map((e) => Vote.fromJSON(e)) : [],
|
|
784
|
+
votes: globalThis.Array.isArray(object?.votes) ? object.votes.map((e) => exports.Vote.fromJSON(e)) : [],
|
|
770
785
|
};
|
|
771
786
|
},
|
|
772
787
|
toJSON(message) {
|
|
@@ -781,19 +796,19 @@ export const VoteTally = {
|
|
|
781
796
|
obj.votesAbstain = Math.round(message.votesAbstain);
|
|
782
797
|
}
|
|
783
798
|
if (message.votes?.length) {
|
|
784
|
-
obj.votes = message.votes.map((e) => Vote.toJSON(e));
|
|
799
|
+
obj.votes = message.votes.map((e) => exports.Vote.toJSON(e));
|
|
785
800
|
}
|
|
786
801
|
return obj;
|
|
787
802
|
},
|
|
788
803
|
create(base) {
|
|
789
|
-
return VoteTally.fromPartial(base ?? {});
|
|
804
|
+
return exports.VoteTally.fromPartial(base ?? {});
|
|
790
805
|
},
|
|
791
806
|
fromPartial(object) {
|
|
792
807
|
const message = createBaseVoteTally();
|
|
793
808
|
message.votesFor = object.votesFor ?? 0;
|
|
794
809
|
message.votesAgainst = object.votesAgainst ?? 0;
|
|
795
810
|
message.votesAbstain = object.votesAbstain ?? 0;
|
|
796
|
-
message.votes = object.votes?.map((e) => Vote.fromPartial(e)) || [];
|
|
811
|
+
message.votes = object.votes?.map((e) => exports.Vote.fromPartial(e)) || [];
|
|
797
812
|
return message;
|
|
798
813
|
},
|
|
799
814
|
};
|
|
@@ -809,8 +824,8 @@ function createBaseSingleOwnerDAO() {
|
|
|
809
824
|
status: DAOStatus.DAO_STATUS_UNSPECIFIED,
|
|
810
825
|
};
|
|
811
826
|
}
|
|
812
|
-
|
|
813
|
-
encode(message, writer = new BinaryWriter()) {
|
|
827
|
+
exports.SingleOwnerDAO = {
|
|
828
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
814
829
|
if (message.name !== "") {
|
|
815
830
|
writer.uint32(10).string(message.name);
|
|
816
831
|
}
|
|
@@ -821,16 +836,16 @@ export const SingleOwnerDAO = {
|
|
|
821
836
|
writer.uint32(26).string(message.pendingOwner);
|
|
822
837
|
}
|
|
823
838
|
if (message.transferInitiatedAt !== undefined) {
|
|
824
|
-
Timestamp.encode(toTimestamp(message.transferInitiatedAt), writer.uint32(34).fork()).join();
|
|
839
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.transferInitiatedAt), writer.uint32(34).fork()).join();
|
|
825
840
|
}
|
|
826
841
|
for (const v of message.actions) {
|
|
827
|
-
SingleOwnerAction.encode(v, writer.uint32(42).fork()).join();
|
|
842
|
+
exports.SingleOwnerAction.encode(v, writer.uint32(42).fork()).join();
|
|
828
843
|
}
|
|
829
844
|
for (const v of message.ownershipHistory) {
|
|
830
|
-
OwnershipTransfer.encode(v, writer.uint32(50).fork()).join();
|
|
845
|
+
exports.OwnershipTransfer.encode(v, writer.uint32(50).fork()).join();
|
|
831
846
|
}
|
|
832
847
|
if (message.metadata !== undefined) {
|
|
833
|
-
DAOMetadata.encode(message.metadata, writer.uint32(58).fork()).join();
|
|
848
|
+
exports.DAOMetadata.encode(message.metadata, writer.uint32(58).fork()).join();
|
|
834
849
|
}
|
|
835
850
|
if (message.status !== DAOStatus.DAO_STATUS_UNSPECIFIED) {
|
|
836
851
|
writer.uint32(64).int32(dAOStatusToNumber(message.status));
|
|
@@ -838,7 +853,7 @@ export const SingleOwnerDAO = {
|
|
|
838
853
|
return writer;
|
|
839
854
|
},
|
|
840
855
|
decode(input, length) {
|
|
841
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
856
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
842
857
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
843
858
|
const message = createBaseSingleOwnerDAO();
|
|
844
859
|
while (reader.pos < end) {
|
|
@@ -869,28 +884,28 @@ export const SingleOwnerDAO = {
|
|
|
869
884
|
if (tag !== 34) {
|
|
870
885
|
break;
|
|
871
886
|
}
|
|
872
|
-
message.transferInitiatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
887
|
+
message.transferInitiatedAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
873
888
|
continue;
|
|
874
889
|
}
|
|
875
890
|
case 5: {
|
|
876
891
|
if (tag !== 42) {
|
|
877
892
|
break;
|
|
878
893
|
}
|
|
879
|
-
message.actions.push(SingleOwnerAction.decode(reader, reader.uint32()));
|
|
894
|
+
message.actions.push(exports.SingleOwnerAction.decode(reader, reader.uint32()));
|
|
880
895
|
continue;
|
|
881
896
|
}
|
|
882
897
|
case 6: {
|
|
883
898
|
if (tag !== 50) {
|
|
884
899
|
break;
|
|
885
900
|
}
|
|
886
|
-
message.ownershipHistory.push(OwnershipTransfer.decode(reader, reader.uint32()));
|
|
901
|
+
message.ownershipHistory.push(exports.OwnershipTransfer.decode(reader, reader.uint32()));
|
|
887
902
|
continue;
|
|
888
903
|
}
|
|
889
904
|
case 7: {
|
|
890
905
|
if (tag !== 58) {
|
|
891
906
|
break;
|
|
892
907
|
}
|
|
893
|
-
message.metadata = DAOMetadata.decode(reader, reader.uint32());
|
|
908
|
+
message.metadata = exports.DAOMetadata.decode(reader, reader.uint32());
|
|
894
909
|
continue;
|
|
895
910
|
}
|
|
896
911
|
case 8: {
|
|
@@ -923,14 +938,14 @@ export const SingleOwnerDAO = {
|
|
|
923
938
|
? fromJsonTimestamp(object.transfer_initiated_at)
|
|
924
939
|
: undefined,
|
|
925
940
|
actions: globalThis.Array.isArray(object?.actions)
|
|
926
|
-
? object.actions.map((e) => SingleOwnerAction.fromJSON(e))
|
|
941
|
+
? object.actions.map((e) => exports.SingleOwnerAction.fromJSON(e))
|
|
927
942
|
: [],
|
|
928
943
|
ownershipHistory: globalThis.Array.isArray(object?.ownershipHistory)
|
|
929
|
-
? object.ownershipHistory.map((e) => OwnershipTransfer.fromJSON(e))
|
|
944
|
+
? object.ownershipHistory.map((e) => exports.OwnershipTransfer.fromJSON(e))
|
|
930
945
|
: globalThis.Array.isArray(object?.ownership_history)
|
|
931
|
-
? object.ownership_history.map((e) => OwnershipTransfer.fromJSON(e))
|
|
946
|
+
? object.ownership_history.map((e) => exports.OwnershipTransfer.fromJSON(e))
|
|
932
947
|
: [],
|
|
933
|
-
metadata: isSet(object.metadata) ? DAOMetadata.fromJSON(object.metadata) : undefined,
|
|
948
|
+
metadata: isSet(object.metadata) ? exports.DAOMetadata.fromJSON(object.metadata) : undefined,
|
|
934
949
|
status: isSet(object.status) ? dAOStatusFromJSON(object.status) : DAOStatus.DAO_STATUS_UNSPECIFIED,
|
|
935
950
|
};
|
|
936
951
|
},
|
|
@@ -949,13 +964,13 @@ export const SingleOwnerDAO = {
|
|
|
949
964
|
obj.transferInitiatedAt = message.transferInitiatedAt.toISOString();
|
|
950
965
|
}
|
|
951
966
|
if (message.actions?.length) {
|
|
952
|
-
obj.actions = message.actions.map((e) => SingleOwnerAction.toJSON(e));
|
|
967
|
+
obj.actions = message.actions.map((e) => exports.SingleOwnerAction.toJSON(e));
|
|
953
968
|
}
|
|
954
969
|
if (message.ownershipHistory?.length) {
|
|
955
|
-
obj.ownershipHistory = message.ownershipHistory.map((e) => OwnershipTransfer.toJSON(e));
|
|
970
|
+
obj.ownershipHistory = message.ownershipHistory.map((e) => exports.OwnershipTransfer.toJSON(e));
|
|
956
971
|
}
|
|
957
972
|
if (message.metadata !== undefined) {
|
|
958
|
-
obj.metadata = DAOMetadata.toJSON(message.metadata);
|
|
973
|
+
obj.metadata = exports.DAOMetadata.toJSON(message.metadata);
|
|
959
974
|
}
|
|
960
975
|
if (message.status !== DAOStatus.DAO_STATUS_UNSPECIFIED) {
|
|
961
976
|
obj.status = dAOStatusToJSON(message.status);
|
|
@@ -963,7 +978,7 @@ export const SingleOwnerDAO = {
|
|
|
963
978
|
return obj;
|
|
964
979
|
},
|
|
965
980
|
create(base) {
|
|
966
|
-
return SingleOwnerDAO.fromPartial(base ?? {});
|
|
981
|
+
return exports.SingleOwnerDAO.fromPartial(base ?? {});
|
|
967
982
|
},
|
|
968
983
|
fromPartial(object) {
|
|
969
984
|
const message = createBaseSingleOwnerDAO();
|
|
@@ -971,10 +986,10 @@ export const SingleOwnerDAO = {
|
|
|
971
986
|
message.owner = object.owner ?? "";
|
|
972
987
|
message.pendingOwner = object.pendingOwner ?? "";
|
|
973
988
|
message.transferInitiatedAt = object.transferInitiatedAt ?? undefined;
|
|
974
|
-
message.actions = object.actions?.map((e) => SingleOwnerAction.fromPartial(e)) || [];
|
|
975
|
-
message.ownershipHistory = object.ownershipHistory?.map((e) => OwnershipTransfer.fromPartial(e)) || [];
|
|
989
|
+
message.actions = object.actions?.map((e) => exports.SingleOwnerAction.fromPartial(e)) || [];
|
|
990
|
+
message.ownershipHistory = object.ownershipHistory?.map((e) => exports.OwnershipTransfer.fromPartial(e)) || [];
|
|
976
991
|
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
977
|
-
? DAOMetadata.fromPartial(object.metadata)
|
|
992
|
+
? exports.DAOMetadata.fromPartial(object.metadata)
|
|
978
993
|
: undefined;
|
|
979
994
|
message.status = object.status ?? DAOStatus.DAO_STATUS_UNSPECIFIED;
|
|
980
995
|
return message;
|
|
@@ -983,8 +998,8 @@ export const SingleOwnerDAO = {
|
|
|
983
998
|
function createBaseSingleOwnerAction() {
|
|
984
999
|
return { id: "", actionType: "", payload: undefined, executedAt: undefined };
|
|
985
1000
|
}
|
|
986
|
-
|
|
987
|
-
encode(message, writer = new BinaryWriter()) {
|
|
1001
|
+
exports.SingleOwnerAction = {
|
|
1002
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
988
1003
|
if (message.id !== "") {
|
|
989
1004
|
writer.uint32(10).string(message.id);
|
|
990
1005
|
}
|
|
@@ -992,15 +1007,15 @@ export const SingleOwnerAction = {
|
|
|
992
1007
|
writer.uint32(18).string(message.actionType);
|
|
993
1008
|
}
|
|
994
1009
|
if (message.payload !== undefined) {
|
|
995
|
-
Struct.encode(Struct.wrap(message.payload), writer.uint32(26).fork()).join();
|
|
1010
|
+
struct_js_1.Struct.encode(struct_js_1.Struct.wrap(message.payload), writer.uint32(26).fork()).join();
|
|
996
1011
|
}
|
|
997
1012
|
if (message.executedAt !== undefined) {
|
|
998
|
-
Timestamp.encode(toTimestamp(message.executedAt), writer.uint32(34).fork()).join();
|
|
1013
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.executedAt), writer.uint32(34).fork()).join();
|
|
999
1014
|
}
|
|
1000
1015
|
return writer;
|
|
1001
1016
|
},
|
|
1002
1017
|
decode(input, length) {
|
|
1003
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1018
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1004
1019
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1005
1020
|
const message = createBaseSingleOwnerAction();
|
|
1006
1021
|
while (reader.pos < end) {
|
|
@@ -1024,14 +1039,14 @@ export const SingleOwnerAction = {
|
|
|
1024
1039
|
if (tag !== 26) {
|
|
1025
1040
|
break;
|
|
1026
1041
|
}
|
|
1027
|
-
message.payload = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
1042
|
+
message.payload = struct_js_1.Struct.unwrap(struct_js_1.Struct.decode(reader, reader.uint32()));
|
|
1028
1043
|
continue;
|
|
1029
1044
|
}
|
|
1030
1045
|
case 4: {
|
|
1031
1046
|
if (tag !== 34) {
|
|
1032
1047
|
break;
|
|
1033
1048
|
}
|
|
1034
|
-
message.executedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1049
|
+
message.executedAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
1035
1050
|
continue;
|
|
1036
1051
|
}
|
|
1037
1052
|
}
|
|
@@ -1075,7 +1090,7 @@ export const SingleOwnerAction = {
|
|
|
1075
1090
|
return obj;
|
|
1076
1091
|
},
|
|
1077
1092
|
create(base) {
|
|
1078
|
-
return SingleOwnerAction.fromPartial(base ?? {});
|
|
1093
|
+
return exports.SingleOwnerAction.fromPartial(base ?? {});
|
|
1079
1094
|
},
|
|
1080
1095
|
fromPartial(object) {
|
|
1081
1096
|
const message = createBaseSingleOwnerAction();
|
|
@@ -1089,8 +1104,8 @@ export const SingleOwnerAction = {
|
|
|
1089
1104
|
function createBaseOwnershipTransfer() {
|
|
1090
1105
|
return { from: "", to: "", at: undefined };
|
|
1091
1106
|
}
|
|
1092
|
-
|
|
1093
|
-
encode(message, writer = new BinaryWriter()) {
|
|
1107
|
+
exports.OwnershipTransfer = {
|
|
1108
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1094
1109
|
if (message.from !== "") {
|
|
1095
1110
|
writer.uint32(10).string(message.from);
|
|
1096
1111
|
}
|
|
@@ -1098,12 +1113,12 @@ export const OwnershipTransfer = {
|
|
|
1098
1113
|
writer.uint32(18).string(message.to);
|
|
1099
1114
|
}
|
|
1100
1115
|
if (message.at !== undefined) {
|
|
1101
|
-
Timestamp.encode(toTimestamp(message.at), writer.uint32(26).fork()).join();
|
|
1116
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.at), writer.uint32(26).fork()).join();
|
|
1102
1117
|
}
|
|
1103
1118
|
return writer;
|
|
1104
1119
|
},
|
|
1105
1120
|
decode(input, length) {
|
|
1106
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1121
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1107
1122
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1108
1123
|
const message = createBaseOwnershipTransfer();
|
|
1109
1124
|
while (reader.pos < end) {
|
|
@@ -1127,7 +1142,7 @@ export const OwnershipTransfer = {
|
|
|
1127
1142
|
if (tag !== 26) {
|
|
1128
1143
|
break;
|
|
1129
1144
|
}
|
|
1130
|
-
message.at = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1145
|
+
message.at = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
1131
1146
|
continue;
|
|
1132
1147
|
}
|
|
1133
1148
|
}
|
|
@@ -1159,7 +1174,7 @@ export const OwnershipTransfer = {
|
|
|
1159
1174
|
return obj;
|
|
1160
1175
|
},
|
|
1161
1176
|
create(base) {
|
|
1162
|
-
return OwnershipTransfer.fromPartial(base ?? {});
|
|
1177
|
+
return exports.OwnershipTransfer.fromPartial(base ?? {});
|
|
1163
1178
|
},
|
|
1164
1179
|
fromPartial(object) {
|
|
1165
1180
|
const message = createBaseOwnershipTransfer();
|
|
@@ -1183,8 +1198,8 @@ function createBaseMultisigDAO() {
|
|
|
1183
1198
|
status: DAOStatus.DAO_STATUS_UNSPECIFIED,
|
|
1184
1199
|
};
|
|
1185
1200
|
}
|
|
1186
|
-
|
|
1187
|
-
encode(message, writer = new BinaryWriter()) {
|
|
1201
|
+
exports.MultisigDAO = {
|
|
1202
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1188
1203
|
if (message.name !== "") {
|
|
1189
1204
|
writer.uint32(10).string(message.name);
|
|
1190
1205
|
}
|
|
@@ -1198,19 +1213,19 @@ export const MultisigDAO = {
|
|
|
1198
1213
|
writer.uint32(32).int64(message.proposalTtlMs);
|
|
1199
1214
|
}
|
|
1200
1215
|
if (message.proposal !== undefined) {
|
|
1201
|
-
Proposal.encode(message.proposal, writer.uint32(42).fork()).join();
|
|
1216
|
+
exports.Proposal.encode(message.proposal, writer.uint32(42).fork()).join();
|
|
1202
1217
|
}
|
|
1203
1218
|
globalThis.Object.entries(message.signatures).forEach(([key, value]) => {
|
|
1204
|
-
MultisigDAO_SignaturesEntry.encode({ key: key, value }, writer.uint32(50).fork()).join();
|
|
1219
|
+
exports.MultisigDAO_SignaturesEntry.encode({ key: key, value }, writer.uint32(50).fork()).join();
|
|
1205
1220
|
});
|
|
1206
1221
|
for (const v of message.actions) {
|
|
1207
|
-
MultisigAction.encode(v, writer.uint32(58).fork()).join();
|
|
1222
|
+
exports.MultisigAction.encode(v, writer.uint32(58).fork()).join();
|
|
1208
1223
|
}
|
|
1209
1224
|
for (const v of message.cancelledProposals) {
|
|
1210
|
-
Proposal.encode(v, writer.uint32(66).fork()).join();
|
|
1225
|
+
exports.Proposal.encode(v, writer.uint32(66).fork()).join();
|
|
1211
1226
|
}
|
|
1212
1227
|
if (message.metadata !== undefined) {
|
|
1213
|
-
DAOMetadata.encode(message.metadata, writer.uint32(74).fork()).join();
|
|
1228
|
+
exports.DAOMetadata.encode(message.metadata, writer.uint32(74).fork()).join();
|
|
1214
1229
|
}
|
|
1215
1230
|
if (message.status !== DAOStatus.DAO_STATUS_UNSPECIFIED) {
|
|
1216
1231
|
writer.uint32(80).int32(dAOStatusToNumber(message.status));
|
|
@@ -1218,7 +1233,7 @@ export const MultisigDAO = {
|
|
|
1218
1233
|
return writer;
|
|
1219
1234
|
},
|
|
1220
1235
|
decode(input, length) {
|
|
1221
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1236
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1222
1237
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1223
1238
|
const message = createBaseMultisigDAO();
|
|
1224
1239
|
while (reader.pos < end) {
|
|
@@ -1256,14 +1271,14 @@ export const MultisigDAO = {
|
|
|
1256
1271
|
if (tag !== 42) {
|
|
1257
1272
|
break;
|
|
1258
1273
|
}
|
|
1259
|
-
message.proposal = Proposal.decode(reader, reader.uint32());
|
|
1274
|
+
message.proposal = exports.Proposal.decode(reader, reader.uint32());
|
|
1260
1275
|
continue;
|
|
1261
1276
|
}
|
|
1262
1277
|
case 6: {
|
|
1263
1278
|
if (tag !== 50) {
|
|
1264
1279
|
break;
|
|
1265
1280
|
}
|
|
1266
|
-
const entry6 = MultisigDAO_SignaturesEntry.decode(reader, reader.uint32());
|
|
1281
|
+
const entry6 = exports.MultisigDAO_SignaturesEntry.decode(reader, reader.uint32());
|
|
1267
1282
|
if (entry6.value !== undefined) {
|
|
1268
1283
|
message.signatures[entry6.key] = entry6.value;
|
|
1269
1284
|
}
|
|
@@ -1273,21 +1288,21 @@ export const MultisigDAO = {
|
|
|
1273
1288
|
if (tag !== 58) {
|
|
1274
1289
|
break;
|
|
1275
1290
|
}
|
|
1276
|
-
message.actions.push(MultisigAction.decode(reader, reader.uint32()));
|
|
1291
|
+
message.actions.push(exports.MultisigAction.decode(reader, reader.uint32()));
|
|
1277
1292
|
continue;
|
|
1278
1293
|
}
|
|
1279
1294
|
case 8: {
|
|
1280
1295
|
if (tag !== 66) {
|
|
1281
1296
|
break;
|
|
1282
1297
|
}
|
|
1283
|
-
message.cancelledProposals.push(Proposal.decode(reader, reader.uint32()));
|
|
1298
|
+
message.cancelledProposals.push(exports.Proposal.decode(reader, reader.uint32()));
|
|
1284
1299
|
continue;
|
|
1285
1300
|
}
|
|
1286
1301
|
case 9: {
|
|
1287
1302
|
if (tag !== 74) {
|
|
1288
1303
|
break;
|
|
1289
1304
|
}
|
|
1290
|
-
message.metadata = DAOMetadata.decode(reader, reader.uint32());
|
|
1305
|
+
message.metadata = exports.DAOMetadata.decode(reader, reader.uint32());
|
|
1291
1306
|
continue;
|
|
1292
1307
|
}
|
|
1293
1308
|
case 10: {
|
|
@@ -1315,7 +1330,7 @@ export const MultisigDAO = {
|
|
|
1315
1330
|
: isSet(object.proposal_ttl_ms)
|
|
1316
1331
|
? globalThis.Number(object.proposal_ttl_ms)
|
|
1317
1332
|
: 0,
|
|
1318
|
-
proposal: isSet(object.proposal) ? Proposal.fromJSON(object.proposal) : undefined,
|
|
1333
|
+
proposal: isSet(object.proposal) ? exports.Proposal.fromJSON(object.proposal) : undefined,
|
|
1319
1334
|
signatures: isObject(object.signatures)
|
|
1320
1335
|
? globalThis.Object.entries(object.signatures).reduce((acc, [key, value]) => {
|
|
1321
1336
|
acc[key] = globalThis.Number(value);
|
|
@@ -1323,14 +1338,14 @@ export const MultisigDAO = {
|
|
|
1323
1338
|
}, {})
|
|
1324
1339
|
: {},
|
|
1325
1340
|
actions: globalThis.Array.isArray(object?.actions)
|
|
1326
|
-
? object.actions.map((e) => MultisigAction.fromJSON(e))
|
|
1341
|
+
? object.actions.map((e) => exports.MultisigAction.fromJSON(e))
|
|
1327
1342
|
: [],
|
|
1328
1343
|
cancelledProposals: globalThis.Array.isArray(object?.cancelledProposals)
|
|
1329
|
-
? object.cancelledProposals.map((e) => Proposal.fromJSON(e))
|
|
1344
|
+
? object.cancelledProposals.map((e) => exports.Proposal.fromJSON(e))
|
|
1330
1345
|
: globalThis.Array.isArray(object?.cancelled_proposals)
|
|
1331
|
-
? object.cancelled_proposals.map((e) => Proposal.fromJSON(e))
|
|
1346
|
+
? object.cancelled_proposals.map((e) => exports.Proposal.fromJSON(e))
|
|
1332
1347
|
: [],
|
|
1333
|
-
metadata: isSet(object.metadata) ? DAOMetadata.fromJSON(object.metadata) : undefined,
|
|
1348
|
+
metadata: isSet(object.metadata) ? exports.DAOMetadata.fromJSON(object.metadata) : undefined,
|
|
1334
1349
|
status: isSet(object.status) ? dAOStatusFromJSON(object.status) : DAOStatus.DAO_STATUS_UNSPECIFIED,
|
|
1335
1350
|
};
|
|
1336
1351
|
},
|
|
@@ -1349,7 +1364,7 @@ export const MultisigDAO = {
|
|
|
1349
1364
|
obj.proposalTtlMs = Math.round(message.proposalTtlMs);
|
|
1350
1365
|
}
|
|
1351
1366
|
if (message.proposal !== undefined) {
|
|
1352
|
-
obj.proposal = Proposal.toJSON(message.proposal);
|
|
1367
|
+
obj.proposal = exports.Proposal.toJSON(message.proposal);
|
|
1353
1368
|
}
|
|
1354
1369
|
if (message.signatures) {
|
|
1355
1370
|
const entries = globalThis.Object.entries(message.signatures);
|
|
@@ -1361,13 +1376,13 @@ export const MultisigDAO = {
|
|
|
1361
1376
|
}
|
|
1362
1377
|
}
|
|
1363
1378
|
if (message.actions?.length) {
|
|
1364
|
-
obj.actions = message.actions.map((e) => MultisigAction.toJSON(e));
|
|
1379
|
+
obj.actions = message.actions.map((e) => exports.MultisigAction.toJSON(e));
|
|
1365
1380
|
}
|
|
1366
1381
|
if (message.cancelledProposals?.length) {
|
|
1367
|
-
obj.cancelledProposals = message.cancelledProposals.map((e) => Proposal.toJSON(e));
|
|
1382
|
+
obj.cancelledProposals = message.cancelledProposals.map((e) => exports.Proposal.toJSON(e));
|
|
1368
1383
|
}
|
|
1369
1384
|
if (message.metadata !== undefined) {
|
|
1370
|
-
obj.metadata = DAOMetadata.toJSON(message.metadata);
|
|
1385
|
+
obj.metadata = exports.DAOMetadata.toJSON(message.metadata);
|
|
1371
1386
|
}
|
|
1372
1387
|
if (message.status !== DAOStatus.DAO_STATUS_UNSPECIFIED) {
|
|
1373
1388
|
obj.status = dAOStatusToJSON(message.status);
|
|
@@ -1375,7 +1390,7 @@ export const MultisigDAO = {
|
|
|
1375
1390
|
return obj;
|
|
1376
1391
|
},
|
|
1377
1392
|
create(base) {
|
|
1378
|
-
return MultisigDAO.fromPartial(base ?? {});
|
|
1393
|
+
return exports.MultisigDAO.fromPartial(base ?? {});
|
|
1379
1394
|
},
|
|
1380
1395
|
fromPartial(object) {
|
|
1381
1396
|
const message = createBaseMultisigDAO();
|
|
@@ -1384,7 +1399,7 @@ export const MultisigDAO = {
|
|
|
1384
1399
|
message.threshold = object.threshold ?? 0;
|
|
1385
1400
|
message.proposalTtlMs = object.proposalTtlMs ?? 0;
|
|
1386
1401
|
message.proposal = (object.proposal !== undefined && object.proposal !== null)
|
|
1387
|
-
? Proposal.fromPartial(object.proposal)
|
|
1402
|
+
? exports.Proposal.fromPartial(object.proposal)
|
|
1388
1403
|
: undefined;
|
|
1389
1404
|
message.signatures = globalThis.Object.entries(object.signatures ?? {}).reduce((acc, [key, value]) => {
|
|
1390
1405
|
if (value !== undefined) {
|
|
@@ -1392,10 +1407,10 @@ export const MultisigDAO = {
|
|
|
1392
1407
|
}
|
|
1393
1408
|
return acc;
|
|
1394
1409
|
}, {});
|
|
1395
|
-
message.actions = object.actions?.map((e) => MultisigAction.fromPartial(e)) || [];
|
|
1396
|
-
message.cancelledProposals = object.cancelledProposals?.map((e) => Proposal.fromPartial(e)) || [];
|
|
1410
|
+
message.actions = object.actions?.map((e) => exports.MultisigAction.fromPartial(e)) || [];
|
|
1411
|
+
message.cancelledProposals = object.cancelledProposals?.map((e) => exports.Proposal.fromPartial(e)) || [];
|
|
1397
1412
|
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
1398
|
-
? DAOMetadata.fromPartial(object.metadata)
|
|
1413
|
+
? exports.DAOMetadata.fromPartial(object.metadata)
|
|
1399
1414
|
: undefined;
|
|
1400
1415
|
message.status = object.status ?? DAOStatus.DAO_STATUS_UNSPECIFIED;
|
|
1401
1416
|
return message;
|
|
@@ -1404,8 +1419,8 @@ export const MultisigDAO = {
|
|
|
1404
1419
|
function createBaseMultisigDAO_SignaturesEntry() {
|
|
1405
1420
|
return { key: "", value: 0 };
|
|
1406
1421
|
}
|
|
1407
|
-
|
|
1408
|
-
encode(message, writer = new BinaryWriter()) {
|
|
1422
|
+
exports.MultisigDAO_SignaturesEntry = {
|
|
1423
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1409
1424
|
if (message.key !== "") {
|
|
1410
1425
|
writer.uint32(10).string(message.key);
|
|
1411
1426
|
}
|
|
@@ -1415,7 +1430,7 @@ export const MultisigDAO_SignaturesEntry = {
|
|
|
1415
1430
|
return writer;
|
|
1416
1431
|
},
|
|
1417
1432
|
decode(input, length) {
|
|
1418
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1433
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1419
1434
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1420
1435
|
const message = createBaseMultisigDAO_SignaturesEntry();
|
|
1421
1436
|
while (reader.pos < end) {
|
|
@@ -1460,7 +1475,7 @@ export const MultisigDAO_SignaturesEntry = {
|
|
|
1460
1475
|
return obj;
|
|
1461
1476
|
},
|
|
1462
1477
|
create(base) {
|
|
1463
|
-
return MultisigDAO_SignaturesEntry.fromPartial(base ?? {});
|
|
1478
|
+
return exports.MultisigDAO_SignaturesEntry.fromPartial(base ?? {});
|
|
1464
1479
|
},
|
|
1465
1480
|
fromPartial(object) {
|
|
1466
1481
|
const message = createBaseMultisigDAO_SignaturesEntry();
|
|
@@ -1472,21 +1487,21 @@ export const MultisigDAO_SignaturesEntry = {
|
|
|
1472
1487
|
function createBaseMultisigAction() {
|
|
1473
1488
|
return { proposal: undefined, signatures: {}, executedAt: undefined };
|
|
1474
1489
|
}
|
|
1475
|
-
|
|
1476
|
-
encode(message, writer = new BinaryWriter()) {
|
|
1490
|
+
exports.MultisigAction = {
|
|
1491
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1477
1492
|
if (message.proposal !== undefined) {
|
|
1478
|
-
Proposal.encode(message.proposal, writer.uint32(10).fork()).join();
|
|
1493
|
+
exports.Proposal.encode(message.proposal, writer.uint32(10).fork()).join();
|
|
1479
1494
|
}
|
|
1480
1495
|
globalThis.Object.entries(message.signatures).forEach(([key, value]) => {
|
|
1481
|
-
MultisigAction_SignaturesEntry.encode({ key: key, value }, writer.uint32(18).fork()).join();
|
|
1496
|
+
exports.MultisigAction_SignaturesEntry.encode({ key: key, value }, writer.uint32(18).fork()).join();
|
|
1482
1497
|
});
|
|
1483
1498
|
if (message.executedAt !== undefined) {
|
|
1484
|
-
Timestamp.encode(toTimestamp(message.executedAt), writer.uint32(26).fork()).join();
|
|
1499
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.executedAt), writer.uint32(26).fork()).join();
|
|
1485
1500
|
}
|
|
1486
1501
|
return writer;
|
|
1487
1502
|
},
|
|
1488
1503
|
decode(input, length) {
|
|
1489
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1504
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1490
1505
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1491
1506
|
const message = createBaseMultisigAction();
|
|
1492
1507
|
while (reader.pos < end) {
|
|
@@ -1496,14 +1511,14 @@ export const MultisigAction = {
|
|
|
1496
1511
|
if (tag !== 10) {
|
|
1497
1512
|
break;
|
|
1498
1513
|
}
|
|
1499
|
-
message.proposal = Proposal.decode(reader, reader.uint32());
|
|
1514
|
+
message.proposal = exports.Proposal.decode(reader, reader.uint32());
|
|
1500
1515
|
continue;
|
|
1501
1516
|
}
|
|
1502
1517
|
case 2: {
|
|
1503
1518
|
if (tag !== 18) {
|
|
1504
1519
|
break;
|
|
1505
1520
|
}
|
|
1506
|
-
const entry2 = MultisigAction_SignaturesEntry.decode(reader, reader.uint32());
|
|
1521
|
+
const entry2 = exports.MultisigAction_SignaturesEntry.decode(reader, reader.uint32());
|
|
1507
1522
|
if (entry2.value !== undefined) {
|
|
1508
1523
|
message.signatures[entry2.key] = entry2.value;
|
|
1509
1524
|
}
|
|
@@ -1513,7 +1528,7 @@ export const MultisigAction = {
|
|
|
1513
1528
|
if (tag !== 26) {
|
|
1514
1529
|
break;
|
|
1515
1530
|
}
|
|
1516
|
-
message.executedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1531
|
+
message.executedAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
1517
1532
|
continue;
|
|
1518
1533
|
}
|
|
1519
1534
|
}
|
|
@@ -1526,7 +1541,7 @@ export const MultisigAction = {
|
|
|
1526
1541
|
},
|
|
1527
1542
|
fromJSON(object) {
|
|
1528
1543
|
return {
|
|
1529
|
-
proposal: isSet(object.proposal) ? Proposal.fromJSON(object.proposal) : undefined,
|
|
1544
|
+
proposal: isSet(object.proposal) ? exports.Proposal.fromJSON(object.proposal) : undefined,
|
|
1530
1545
|
signatures: isObject(object.signatures)
|
|
1531
1546
|
? globalThis.Object.entries(object.signatures).reduce((acc, [key, value]) => {
|
|
1532
1547
|
acc[key] = globalThis.Number(value);
|
|
@@ -1543,7 +1558,7 @@ export const MultisigAction = {
|
|
|
1543
1558
|
toJSON(message) {
|
|
1544
1559
|
const obj = {};
|
|
1545
1560
|
if (message.proposal !== undefined) {
|
|
1546
|
-
obj.proposal = Proposal.toJSON(message.proposal);
|
|
1561
|
+
obj.proposal = exports.Proposal.toJSON(message.proposal);
|
|
1547
1562
|
}
|
|
1548
1563
|
if (message.signatures) {
|
|
1549
1564
|
const entries = globalThis.Object.entries(message.signatures);
|
|
@@ -1560,12 +1575,12 @@ export const MultisigAction = {
|
|
|
1560
1575
|
return obj;
|
|
1561
1576
|
},
|
|
1562
1577
|
create(base) {
|
|
1563
|
-
return MultisigAction.fromPartial(base ?? {});
|
|
1578
|
+
return exports.MultisigAction.fromPartial(base ?? {});
|
|
1564
1579
|
},
|
|
1565
1580
|
fromPartial(object) {
|
|
1566
1581
|
const message = createBaseMultisigAction();
|
|
1567
1582
|
message.proposal = (object.proposal !== undefined && object.proposal !== null)
|
|
1568
|
-
? Proposal.fromPartial(object.proposal)
|
|
1583
|
+
? exports.Proposal.fromPartial(object.proposal)
|
|
1569
1584
|
: undefined;
|
|
1570
1585
|
message.signatures = globalThis.Object.entries(object.signatures ?? {}).reduce((acc, [key, value]) => {
|
|
1571
1586
|
if (value !== undefined) {
|
|
@@ -1580,8 +1595,8 @@ export const MultisigAction = {
|
|
|
1580
1595
|
function createBaseMultisigAction_SignaturesEntry() {
|
|
1581
1596
|
return { key: "", value: 0 };
|
|
1582
1597
|
}
|
|
1583
|
-
|
|
1584
|
-
encode(message, writer = new BinaryWriter()) {
|
|
1598
|
+
exports.MultisigAction_SignaturesEntry = {
|
|
1599
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1585
1600
|
if (message.key !== "") {
|
|
1586
1601
|
writer.uint32(10).string(message.key);
|
|
1587
1602
|
}
|
|
@@ -1591,7 +1606,7 @@ export const MultisigAction_SignaturesEntry = {
|
|
|
1591
1606
|
return writer;
|
|
1592
1607
|
},
|
|
1593
1608
|
decode(input, length) {
|
|
1594
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1609
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1595
1610
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1596
1611
|
const message = createBaseMultisigAction_SignaturesEntry();
|
|
1597
1612
|
while (reader.pos < end) {
|
|
@@ -1636,7 +1651,7 @@ export const MultisigAction_SignaturesEntry = {
|
|
|
1636
1651
|
return obj;
|
|
1637
1652
|
},
|
|
1638
1653
|
create(base) {
|
|
1639
|
-
return MultisigAction_SignaturesEntry.fromPartial(base ?? {});
|
|
1654
|
+
return exports.MultisigAction_SignaturesEntry.fromPartial(base ?? {});
|
|
1640
1655
|
},
|
|
1641
1656
|
fromPartial(object) {
|
|
1642
1657
|
const message = createBaseMultisigAction_SignaturesEntry();
|
|
@@ -1664,8 +1679,8 @@ function createBaseTokenDAO() {
|
|
|
1664
1679
|
status: DAOStatus.DAO_STATUS_UNSPECIFIED,
|
|
1665
1680
|
};
|
|
1666
1681
|
}
|
|
1667
|
-
|
|
1668
|
-
encode(message, writer = new BinaryWriter()) {
|
|
1682
|
+
exports.TokenDAO = {
|
|
1683
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1669
1684
|
if (message.name !== "") {
|
|
1670
1685
|
writer.uint32(10).string(message.name);
|
|
1671
1686
|
}
|
|
@@ -1673,10 +1688,10 @@ export const TokenDAO = {
|
|
|
1673
1688
|
writer.uint32(18).string(message.tokenId);
|
|
1674
1689
|
}
|
|
1675
1690
|
globalThis.Object.entries(message.balances).forEach(([key, value]) => {
|
|
1676
|
-
TokenDAO_BalancesEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
|
|
1691
|
+
exports.TokenDAO_BalancesEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
|
|
1677
1692
|
});
|
|
1678
1693
|
globalThis.Object.entries(message.delegations).forEach(([key, value]) => {
|
|
1679
|
-
TokenDAO_DelegationsEntry.encode({ key: key, value }, writer.uint32(34).fork()).join();
|
|
1694
|
+
exports.TokenDAO_DelegationsEntry.encode({ key: key, value }, writer.uint32(34).fork()).join();
|
|
1680
1695
|
});
|
|
1681
1696
|
if (message.proposalThreshold !== 0) {
|
|
1682
1697
|
writer.uint32(40).int64(message.proposalThreshold);
|
|
@@ -1691,22 +1706,22 @@ export const TokenDAO = {
|
|
|
1691
1706
|
writer.uint32(64).int64(message.quorum);
|
|
1692
1707
|
}
|
|
1693
1708
|
if (message.proposal !== undefined) {
|
|
1694
|
-
Proposal.encode(message.proposal, writer.uint32(74).fork()).join();
|
|
1709
|
+
exports.Proposal.encode(message.proposal, writer.uint32(74).fork()).join();
|
|
1695
1710
|
}
|
|
1696
1711
|
if (message.votes !== undefined) {
|
|
1697
|
-
VoteTally.encode(message.votes, writer.uint32(82).fork()).join();
|
|
1712
|
+
exports.VoteTally.encode(message.votes, writer.uint32(82).fork()).join();
|
|
1698
1713
|
}
|
|
1699
1714
|
for (const v of message.executedProposals) {
|
|
1700
|
-
TokenProposalResult.encode(v, writer.uint32(90).fork()).join();
|
|
1715
|
+
exports.TokenProposalResult.encode(v, writer.uint32(90).fork()).join();
|
|
1701
1716
|
}
|
|
1702
1717
|
for (const v of message.rejectedProposals) {
|
|
1703
|
-
TokenProposalResult.encode(v, writer.uint32(98).fork()).join();
|
|
1718
|
+
exports.TokenProposalResult.encode(v, writer.uint32(98).fork()).join();
|
|
1704
1719
|
}
|
|
1705
1720
|
for (const v of message.cancelledProposals) {
|
|
1706
|
-
Proposal.encode(v, writer.uint32(106).fork()).join();
|
|
1721
|
+
exports.Proposal.encode(v, writer.uint32(106).fork()).join();
|
|
1707
1722
|
}
|
|
1708
1723
|
if (message.metadata !== undefined) {
|
|
1709
|
-
DAOMetadata.encode(message.metadata, writer.uint32(114).fork()).join();
|
|
1724
|
+
exports.DAOMetadata.encode(message.metadata, writer.uint32(114).fork()).join();
|
|
1710
1725
|
}
|
|
1711
1726
|
if (message.status !== DAOStatus.DAO_STATUS_UNSPECIFIED) {
|
|
1712
1727
|
writer.uint32(120).int32(dAOStatusToNumber(message.status));
|
|
@@ -1714,7 +1729,7 @@ export const TokenDAO = {
|
|
|
1714
1729
|
return writer;
|
|
1715
1730
|
},
|
|
1716
1731
|
decode(input, length) {
|
|
1717
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1732
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1718
1733
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1719
1734
|
const message = createBaseTokenDAO();
|
|
1720
1735
|
while (reader.pos < end) {
|
|
@@ -1738,7 +1753,7 @@ export const TokenDAO = {
|
|
|
1738
1753
|
if (tag !== 26) {
|
|
1739
1754
|
break;
|
|
1740
1755
|
}
|
|
1741
|
-
const entry3 = TokenDAO_BalancesEntry.decode(reader, reader.uint32());
|
|
1756
|
+
const entry3 = exports.TokenDAO_BalancesEntry.decode(reader, reader.uint32());
|
|
1742
1757
|
if (entry3.value !== undefined) {
|
|
1743
1758
|
message.balances[entry3.key] = entry3.value;
|
|
1744
1759
|
}
|
|
@@ -1748,7 +1763,7 @@ export const TokenDAO = {
|
|
|
1748
1763
|
if (tag !== 34) {
|
|
1749
1764
|
break;
|
|
1750
1765
|
}
|
|
1751
|
-
const entry4 = TokenDAO_DelegationsEntry.decode(reader, reader.uint32());
|
|
1766
|
+
const entry4 = exports.TokenDAO_DelegationsEntry.decode(reader, reader.uint32());
|
|
1752
1767
|
if (entry4.value !== undefined) {
|
|
1753
1768
|
message.delegations[entry4.key] = entry4.value;
|
|
1754
1769
|
}
|
|
@@ -1786,42 +1801,42 @@ export const TokenDAO = {
|
|
|
1786
1801
|
if (tag !== 74) {
|
|
1787
1802
|
break;
|
|
1788
1803
|
}
|
|
1789
|
-
message.proposal = Proposal.decode(reader, reader.uint32());
|
|
1804
|
+
message.proposal = exports.Proposal.decode(reader, reader.uint32());
|
|
1790
1805
|
continue;
|
|
1791
1806
|
}
|
|
1792
1807
|
case 10: {
|
|
1793
1808
|
if (tag !== 82) {
|
|
1794
1809
|
break;
|
|
1795
1810
|
}
|
|
1796
|
-
message.votes = VoteTally.decode(reader, reader.uint32());
|
|
1811
|
+
message.votes = exports.VoteTally.decode(reader, reader.uint32());
|
|
1797
1812
|
continue;
|
|
1798
1813
|
}
|
|
1799
1814
|
case 11: {
|
|
1800
1815
|
if (tag !== 90) {
|
|
1801
1816
|
break;
|
|
1802
1817
|
}
|
|
1803
|
-
message.executedProposals.push(TokenProposalResult.decode(reader, reader.uint32()));
|
|
1818
|
+
message.executedProposals.push(exports.TokenProposalResult.decode(reader, reader.uint32()));
|
|
1804
1819
|
continue;
|
|
1805
1820
|
}
|
|
1806
1821
|
case 12: {
|
|
1807
1822
|
if (tag !== 98) {
|
|
1808
1823
|
break;
|
|
1809
1824
|
}
|
|
1810
|
-
message.rejectedProposals.push(TokenProposalResult.decode(reader, reader.uint32()));
|
|
1825
|
+
message.rejectedProposals.push(exports.TokenProposalResult.decode(reader, reader.uint32()));
|
|
1811
1826
|
continue;
|
|
1812
1827
|
}
|
|
1813
1828
|
case 13: {
|
|
1814
1829
|
if (tag !== 106) {
|
|
1815
1830
|
break;
|
|
1816
1831
|
}
|
|
1817
|
-
message.cancelledProposals.push(Proposal.decode(reader, reader.uint32()));
|
|
1832
|
+
message.cancelledProposals.push(exports.Proposal.decode(reader, reader.uint32()));
|
|
1818
1833
|
continue;
|
|
1819
1834
|
}
|
|
1820
1835
|
case 14: {
|
|
1821
1836
|
if (tag !== 114) {
|
|
1822
1837
|
break;
|
|
1823
1838
|
}
|
|
1824
|
-
message.metadata = DAOMetadata.decode(reader, reader.uint32());
|
|
1839
|
+
message.metadata = exports.DAOMetadata.decode(reader, reader.uint32());
|
|
1825
1840
|
continue;
|
|
1826
1841
|
}
|
|
1827
1842
|
case 15: {
|
|
@@ -1875,24 +1890,24 @@ export const TokenDAO = {
|
|
|
1875
1890
|
? globalThis.Number(object.timelock_ms)
|
|
1876
1891
|
: 0,
|
|
1877
1892
|
quorum: isSet(object.quorum) ? globalThis.Number(object.quorum) : 0,
|
|
1878
|
-
proposal: isSet(object.proposal) ? Proposal.fromJSON(object.proposal) : undefined,
|
|
1879
|
-
votes: isSet(object.votes) ? VoteTally.fromJSON(object.votes) : undefined,
|
|
1893
|
+
proposal: isSet(object.proposal) ? exports.Proposal.fromJSON(object.proposal) : undefined,
|
|
1894
|
+
votes: isSet(object.votes) ? exports.VoteTally.fromJSON(object.votes) : undefined,
|
|
1880
1895
|
executedProposals: globalThis.Array.isArray(object?.executedProposals)
|
|
1881
|
-
? object.executedProposals.map((e) => TokenProposalResult.fromJSON(e))
|
|
1896
|
+
? object.executedProposals.map((e) => exports.TokenProposalResult.fromJSON(e))
|
|
1882
1897
|
: globalThis.Array.isArray(object?.executed_proposals)
|
|
1883
|
-
? object.executed_proposals.map((e) => TokenProposalResult.fromJSON(e))
|
|
1898
|
+
? object.executed_proposals.map((e) => exports.TokenProposalResult.fromJSON(e))
|
|
1884
1899
|
: [],
|
|
1885
1900
|
rejectedProposals: globalThis.Array.isArray(object?.rejectedProposals)
|
|
1886
|
-
? object.rejectedProposals.map((e) => TokenProposalResult.fromJSON(e))
|
|
1901
|
+
? object.rejectedProposals.map((e) => exports.TokenProposalResult.fromJSON(e))
|
|
1887
1902
|
: globalThis.Array.isArray(object?.rejected_proposals)
|
|
1888
|
-
? object.rejected_proposals.map((e) => TokenProposalResult.fromJSON(e))
|
|
1903
|
+
? object.rejected_proposals.map((e) => exports.TokenProposalResult.fromJSON(e))
|
|
1889
1904
|
: [],
|
|
1890
1905
|
cancelledProposals: globalThis.Array.isArray(object?.cancelledProposals)
|
|
1891
|
-
? object.cancelledProposals.map((e) => Proposal.fromJSON(e))
|
|
1906
|
+
? object.cancelledProposals.map((e) => exports.Proposal.fromJSON(e))
|
|
1892
1907
|
: globalThis.Array.isArray(object?.cancelled_proposals)
|
|
1893
|
-
? object.cancelled_proposals.map((e) => Proposal.fromJSON(e))
|
|
1908
|
+
? object.cancelled_proposals.map((e) => exports.Proposal.fromJSON(e))
|
|
1894
1909
|
: [],
|
|
1895
|
-
metadata: isSet(object.metadata) ? DAOMetadata.fromJSON(object.metadata) : undefined,
|
|
1910
|
+
metadata: isSet(object.metadata) ? exports.DAOMetadata.fromJSON(object.metadata) : undefined,
|
|
1896
1911
|
status: isSet(object.status) ? dAOStatusFromJSON(object.status) : DAOStatus.DAO_STATUS_UNSPECIFIED,
|
|
1897
1912
|
};
|
|
1898
1913
|
},
|
|
@@ -1935,22 +1950,22 @@ export const TokenDAO = {
|
|
|
1935
1950
|
obj.quorum = Math.round(message.quorum);
|
|
1936
1951
|
}
|
|
1937
1952
|
if (message.proposal !== undefined) {
|
|
1938
|
-
obj.proposal = Proposal.toJSON(message.proposal);
|
|
1953
|
+
obj.proposal = exports.Proposal.toJSON(message.proposal);
|
|
1939
1954
|
}
|
|
1940
1955
|
if (message.votes !== undefined) {
|
|
1941
|
-
obj.votes = VoteTally.toJSON(message.votes);
|
|
1956
|
+
obj.votes = exports.VoteTally.toJSON(message.votes);
|
|
1942
1957
|
}
|
|
1943
1958
|
if (message.executedProposals?.length) {
|
|
1944
|
-
obj.executedProposals = message.executedProposals.map((e) => TokenProposalResult.toJSON(e));
|
|
1959
|
+
obj.executedProposals = message.executedProposals.map((e) => exports.TokenProposalResult.toJSON(e));
|
|
1945
1960
|
}
|
|
1946
1961
|
if (message.rejectedProposals?.length) {
|
|
1947
|
-
obj.rejectedProposals = message.rejectedProposals.map((e) => TokenProposalResult.toJSON(e));
|
|
1962
|
+
obj.rejectedProposals = message.rejectedProposals.map((e) => exports.TokenProposalResult.toJSON(e));
|
|
1948
1963
|
}
|
|
1949
1964
|
if (message.cancelledProposals?.length) {
|
|
1950
|
-
obj.cancelledProposals = message.cancelledProposals.map((e) => Proposal.toJSON(e));
|
|
1965
|
+
obj.cancelledProposals = message.cancelledProposals.map((e) => exports.Proposal.toJSON(e));
|
|
1951
1966
|
}
|
|
1952
1967
|
if (message.metadata !== undefined) {
|
|
1953
|
-
obj.metadata = DAOMetadata.toJSON(message.metadata);
|
|
1968
|
+
obj.metadata = exports.DAOMetadata.toJSON(message.metadata);
|
|
1954
1969
|
}
|
|
1955
1970
|
if (message.status !== DAOStatus.DAO_STATUS_UNSPECIFIED) {
|
|
1956
1971
|
obj.status = dAOStatusToJSON(message.status);
|
|
@@ -1958,7 +1973,7 @@ export const TokenDAO = {
|
|
|
1958
1973
|
return obj;
|
|
1959
1974
|
},
|
|
1960
1975
|
create(base) {
|
|
1961
|
-
return TokenDAO.fromPartial(base ?? {});
|
|
1976
|
+
return exports.TokenDAO.fromPartial(base ?? {});
|
|
1962
1977
|
},
|
|
1963
1978
|
fromPartial(object) {
|
|
1964
1979
|
const message = createBaseTokenDAO();
|
|
@@ -1981,16 +1996,16 @@ export const TokenDAO = {
|
|
|
1981
1996
|
message.timelockMs = object.timelockMs ?? 0;
|
|
1982
1997
|
message.quorum = object.quorum ?? 0;
|
|
1983
1998
|
message.proposal = (object.proposal !== undefined && object.proposal !== null)
|
|
1984
|
-
? Proposal.fromPartial(object.proposal)
|
|
1999
|
+
? exports.Proposal.fromPartial(object.proposal)
|
|
1985
2000
|
: undefined;
|
|
1986
2001
|
message.votes = (object.votes !== undefined && object.votes !== null)
|
|
1987
|
-
? VoteTally.fromPartial(object.votes)
|
|
2002
|
+
? exports.VoteTally.fromPartial(object.votes)
|
|
1988
2003
|
: undefined;
|
|
1989
|
-
message.executedProposals = object.executedProposals?.map((e) => TokenProposalResult.fromPartial(e)) || [];
|
|
1990
|
-
message.rejectedProposals = object.rejectedProposals?.map((e) => TokenProposalResult.fromPartial(e)) || [];
|
|
1991
|
-
message.cancelledProposals = object.cancelledProposals?.map((e) => Proposal.fromPartial(e)) || [];
|
|
2004
|
+
message.executedProposals = object.executedProposals?.map((e) => exports.TokenProposalResult.fromPartial(e)) || [];
|
|
2005
|
+
message.rejectedProposals = object.rejectedProposals?.map((e) => exports.TokenProposalResult.fromPartial(e)) || [];
|
|
2006
|
+
message.cancelledProposals = object.cancelledProposals?.map((e) => exports.Proposal.fromPartial(e)) || [];
|
|
1992
2007
|
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
1993
|
-
? DAOMetadata.fromPartial(object.metadata)
|
|
2008
|
+
? exports.DAOMetadata.fromPartial(object.metadata)
|
|
1994
2009
|
: undefined;
|
|
1995
2010
|
message.status = object.status ?? DAOStatus.DAO_STATUS_UNSPECIFIED;
|
|
1996
2011
|
return message;
|
|
@@ -1999,8 +2014,8 @@ export const TokenDAO = {
|
|
|
1999
2014
|
function createBaseTokenDAO_BalancesEntry() {
|
|
2000
2015
|
return { key: "", value: 0 };
|
|
2001
2016
|
}
|
|
2002
|
-
|
|
2003
|
-
encode(message, writer = new BinaryWriter()) {
|
|
2017
|
+
exports.TokenDAO_BalancesEntry = {
|
|
2018
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2004
2019
|
if (message.key !== "") {
|
|
2005
2020
|
writer.uint32(10).string(message.key);
|
|
2006
2021
|
}
|
|
@@ -2010,7 +2025,7 @@ export const TokenDAO_BalancesEntry = {
|
|
|
2010
2025
|
return writer;
|
|
2011
2026
|
},
|
|
2012
2027
|
decode(input, length) {
|
|
2013
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2028
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2014
2029
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2015
2030
|
const message = createBaseTokenDAO_BalancesEntry();
|
|
2016
2031
|
while (reader.pos < end) {
|
|
@@ -2055,7 +2070,7 @@ export const TokenDAO_BalancesEntry = {
|
|
|
2055
2070
|
return obj;
|
|
2056
2071
|
},
|
|
2057
2072
|
create(base) {
|
|
2058
|
-
return TokenDAO_BalancesEntry.fromPartial(base ?? {});
|
|
2073
|
+
return exports.TokenDAO_BalancesEntry.fromPartial(base ?? {});
|
|
2059
2074
|
},
|
|
2060
2075
|
fromPartial(object) {
|
|
2061
2076
|
const message = createBaseTokenDAO_BalancesEntry();
|
|
@@ -2067,8 +2082,8 @@ export const TokenDAO_BalancesEntry = {
|
|
|
2067
2082
|
function createBaseTokenDAO_DelegationsEntry() {
|
|
2068
2083
|
return { key: "", value: "" };
|
|
2069
2084
|
}
|
|
2070
|
-
|
|
2071
|
-
encode(message, writer = new BinaryWriter()) {
|
|
2085
|
+
exports.TokenDAO_DelegationsEntry = {
|
|
2086
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2072
2087
|
if (message.key !== "") {
|
|
2073
2088
|
writer.uint32(10).string(message.key);
|
|
2074
2089
|
}
|
|
@@ -2078,7 +2093,7 @@ export const TokenDAO_DelegationsEntry = {
|
|
|
2078
2093
|
return writer;
|
|
2079
2094
|
},
|
|
2080
2095
|
decode(input, length) {
|
|
2081
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2096
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2082
2097
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2083
2098
|
const message = createBaseTokenDAO_DelegationsEntry();
|
|
2084
2099
|
while (reader.pos < end) {
|
|
@@ -2123,7 +2138,7 @@ export const TokenDAO_DelegationsEntry = {
|
|
|
2123
2138
|
return obj;
|
|
2124
2139
|
},
|
|
2125
2140
|
create(base) {
|
|
2126
|
-
return TokenDAO_DelegationsEntry.fromPartial(base ?? {});
|
|
2141
|
+
return exports.TokenDAO_DelegationsEntry.fromPartial(base ?? {});
|
|
2127
2142
|
},
|
|
2128
2143
|
fromPartial(object) {
|
|
2129
2144
|
const message = createBaseTokenDAO_DelegationsEntry();
|
|
@@ -2135,21 +2150,21 @@ export const TokenDAO_DelegationsEntry = {
|
|
|
2135
2150
|
function createBaseTokenProposalResult() {
|
|
2136
2151
|
return { proposal: undefined, votes: undefined, finalizedAt: undefined };
|
|
2137
2152
|
}
|
|
2138
|
-
|
|
2139
|
-
encode(message, writer = new BinaryWriter()) {
|
|
2153
|
+
exports.TokenProposalResult = {
|
|
2154
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2140
2155
|
if (message.proposal !== undefined) {
|
|
2141
|
-
Proposal.encode(message.proposal, writer.uint32(10).fork()).join();
|
|
2156
|
+
exports.Proposal.encode(message.proposal, writer.uint32(10).fork()).join();
|
|
2142
2157
|
}
|
|
2143
2158
|
if (message.votes !== undefined) {
|
|
2144
|
-
VoteTally.encode(message.votes, writer.uint32(18).fork()).join();
|
|
2159
|
+
exports.VoteTally.encode(message.votes, writer.uint32(18).fork()).join();
|
|
2145
2160
|
}
|
|
2146
2161
|
if (message.finalizedAt !== undefined) {
|
|
2147
|
-
Timestamp.encode(toTimestamp(message.finalizedAt), writer.uint32(26).fork()).join();
|
|
2162
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.finalizedAt), writer.uint32(26).fork()).join();
|
|
2148
2163
|
}
|
|
2149
2164
|
return writer;
|
|
2150
2165
|
},
|
|
2151
2166
|
decode(input, length) {
|
|
2152
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2167
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2153
2168
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2154
2169
|
const message = createBaseTokenProposalResult();
|
|
2155
2170
|
while (reader.pos < end) {
|
|
@@ -2159,21 +2174,21 @@ export const TokenProposalResult = {
|
|
|
2159
2174
|
if (tag !== 10) {
|
|
2160
2175
|
break;
|
|
2161
2176
|
}
|
|
2162
|
-
message.proposal = Proposal.decode(reader, reader.uint32());
|
|
2177
|
+
message.proposal = exports.Proposal.decode(reader, reader.uint32());
|
|
2163
2178
|
continue;
|
|
2164
2179
|
}
|
|
2165
2180
|
case 2: {
|
|
2166
2181
|
if (tag !== 18) {
|
|
2167
2182
|
break;
|
|
2168
2183
|
}
|
|
2169
|
-
message.votes = VoteTally.decode(reader, reader.uint32());
|
|
2184
|
+
message.votes = exports.VoteTally.decode(reader, reader.uint32());
|
|
2170
2185
|
continue;
|
|
2171
2186
|
}
|
|
2172
2187
|
case 3: {
|
|
2173
2188
|
if (tag !== 26) {
|
|
2174
2189
|
break;
|
|
2175
2190
|
}
|
|
2176
|
-
message.finalizedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2191
|
+
message.finalizedAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
2177
2192
|
continue;
|
|
2178
2193
|
}
|
|
2179
2194
|
}
|
|
@@ -2186,8 +2201,8 @@ export const TokenProposalResult = {
|
|
|
2186
2201
|
},
|
|
2187
2202
|
fromJSON(object) {
|
|
2188
2203
|
return {
|
|
2189
|
-
proposal: isSet(object.proposal) ? Proposal.fromJSON(object.proposal) : undefined,
|
|
2190
|
-
votes: isSet(object.votes) ? VoteTally.fromJSON(object.votes) : undefined,
|
|
2204
|
+
proposal: isSet(object.proposal) ? exports.Proposal.fromJSON(object.proposal) : undefined,
|
|
2205
|
+
votes: isSet(object.votes) ? exports.VoteTally.fromJSON(object.votes) : undefined,
|
|
2191
2206
|
finalizedAt: isSet(object.finalizedAt)
|
|
2192
2207
|
? fromJsonTimestamp(object.finalizedAt)
|
|
2193
2208
|
: isSet(object.finalized_at)
|
|
@@ -2198,10 +2213,10 @@ export const TokenProposalResult = {
|
|
|
2198
2213
|
toJSON(message) {
|
|
2199
2214
|
const obj = {};
|
|
2200
2215
|
if (message.proposal !== undefined) {
|
|
2201
|
-
obj.proposal = Proposal.toJSON(message.proposal);
|
|
2216
|
+
obj.proposal = exports.Proposal.toJSON(message.proposal);
|
|
2202
2217
|
}
|
|
2203
2218
|
if (message.votes !== undefined) {
|
|
2204
|
-
obj.votes = VoteTally.toJSON(message.votes);
|
|
2219
|
+
obj.votes = exports.VoteTally.toJSON(message.votes);
|
|
2205
2220
|
}
|
|
2206
2221
|
if (message.finalizedAt !== undefined) {
|
|
2207
2222
|
obj.finalizedAt = message.finalizedAt.toISOString();
|
|
@@ -2209,15 +2224,15 @@ export const TokenProposalResult = {
|
|
|
2209
2224
|
return obj;
|
|
2210
2225
|
},
|
|
2211
2226
|
create(base) {
|
|
2212
|
-
return TokenProposalResult.fromPartial(base ?? {});
|
|
2227
|
+
return exports.TokenProposalResult.fromPartial(base ?? {});
|
|
2213
2228
|
},
|
|
2214
2229
|
fromPartial(object) {
|
|
2215
2230
|
const message = createBaseTokenProposalResult();
|
|
2216
2231
|
message.proposal = (object.proposal !== undefined && object.proposal !== null)
|
|
2217
|
-
? Proposal.fromPartial(object.proposal)
|
|
2232
|
+
? exports.Proposal.fromPartial(object.proposal)
|
|
2218
2233
|
: undefined;
|
|
2219
2234
|
message.votes = (object.votes !== undefined && object.votes !== null)
|
|
2220
|
-
? VoteTally.fromPartial(object.votes)
|
|
2235
|
+
? exports.VoteTally.fromPartial(object.votes)
|
|
2221
2236
|
: undefined;
|
|
2222
2237
|
message.finalizedAt = object.finalizedAt ?? undefined;
|
|
2223
2238
|
return message;
|
|
@@ -2240,8 +2255,8 @@ function createBaseThresholdDAO() {
|
|
|
2240
2255
|
status: DAOStatus.DAO_STATUS_UNSPECIFIED,
|
|
2241
2256
|
};
|
|
2242
2257
|
}
|
|
2243
|
-
|
|
2244
|
-
encode(message, writer = new BinaryWriter()) {
|
|
2258
|
+
exports.ThresholdDAO = {
|
|
2259
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2245
2260
|
if (message.name !== "") {
|
|
2246
2261
|
writer.uint32(10).string(message.name);
|
|
2247
2262
|
}
|
|
@@ -2249,7 +2264,7 @@ export const ThresholdDAO = {
|
|
|
2249
2264
|
writer.uint32(18).string(v);
|
|
2250
2265
|
}
|
|
2251
2266
|
globalThis.Object.entries(message.memberJoinedAt).forEach(([key, value]) => {
|
|
2252
|
-
ThresholdDAO_MemberJoinedAtEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
|
|
2267
|
+
exports.ThresholdDAO_MemberJoinedAtEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
|
|
2253
2268
|
});
|
|
2254
2269
|
if (message.memberThreshold !== 0) {
|
|
2255
2270
|
writer.uint32(32).int64(message.memberThreshold);
|
|
@@ -2267,16 +2282,16 @@ export const ThresholdDAO = {
|
|
|
2267
2282
|
writer.uint32(64).int64(message.votingPeriodMs);
|
|
2268
2283
|
}
|
|
2269
2284
|
if (message.proposal !== undefined) {
|
|
2270
|
-
Proposal.encode(message.proposal, writer.uint32(74).fork()).join();
|
|
2285
|
+
exports.Proposal.encode(message.proposal, writer.uint32(74).fork()).join();
|
|
2271
2286
|
}
|
|
2272
2287
|
if (message.votes !== undefined) {
|
|
2273
|
-
ThresholdVotes.encode(message.votes, writer.uint32(82).fork()).join();
|
|
2288
|
+
exports.ThresholdVotes.encode(message.votes, writer.uint32(82).fork()).join();
|
|
2274
2289
|
}
|
|
2275
2290
|
for (const v of message.history) {
|
|
2276
|
-
ThresholdHistoryEntry.encode(v, writer.uint32(90).fork()).join();
|
|
2291
|
+
exports.ThresholdHistoryEntry.encode(v, writer.uint32(90).fork()).join();
|
|
2277
2292
|
}
|
|
2278
2293
|
if (message.metadata !== undefined) {
|
|
2279
|
-
DAOMetadata.encode(message.metadata, writer.uint32(98).fork()).join();
|
|
2294
|
+
exports.DAOMetadata.encode(message.metadata, writer.uint32(98).fork()).join();
|
|
2280
2295
|
}
|
|
2281
2296
|
if (message.status !== DAOStatus.DAO_STATUS_UNSPECIFIED) {
|
|
2282
2297
|
writer.uint32(104).int32(dAOStatusToNumber(message.status));
|
|
@@ -2284,7 +2299,7 @@ export const ThresholdDAO = {
|
|
|
2284
2299
|
return writer;
|
|
2285
2300
|
},
|
|
2286
2301
|
decode(input, length) {
|
|
2287
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2302
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2288
2303
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2289
2304
|
const message = createBaseThresholdDAO();
|
|
2290
2305
|
while (reader.pos < end) {
|
|
@@ -2308,7 +2323,7 @@ export const ThresholdDAO = {
|
|
|
2308
2323
|
if (tag !== 26) {
|
|
2309
2324
|
break;
|
|
2310
2325
|
}
|
|
2311
|
-
const entry3 = ThresholdDAO_MemberJoinedAtEntry.decode(reader, reader.uint32());
|
|
2326
|
+
const entry3 = exports.ThresholdDAO_MemberJoinedAtEntry.decode(reader, reader.uint32());
|
|
2312
2327
|
if (entry3.value !== undefined) {
|
|
2313
2328
|
message.memberJoinedAt[entry3.key] = entry3.value;
|
|
2314
2329
|
}
|
|
@@ -2353,28 +2368,28 @@ export const ThresholdDAO = {
|
|
|
2353
2368
|
if (tag !== 74) {
|
|
2354
2369
|
break;
|
|
2355
2370
|
}
|
|
2356
|
-
message.proposal = Proposal.decode(reader, reader.uint32());
|
|
2371
|
+
message.proposal = exports.Proposal.decode(reader, reader.uint32());
|
|
2357
2372
|
continue;
|
|
2358
2373
|
}
|
|
2359
2374
|
case 10: {
|
|
2360
2375
|
if (tag !== 82) {
|
|
2361
2376
|
break;
|
|
2362
2377
|
}
|
|
2363
|
-
message.votes = ThresholdVotes.decode(reader, reader.uint32());
|
|
2378
|
+
message.votes = exports.ThresholdVotes.decode(reader, reader.uint32());
|
|
2364
2379
|
continue;
|
|
2365
2380
|
}
|
|
2366
2381
|
case 11: {
|
|
2367
2382
|
if (tag !== 90) {
|
|
2368
2383
|
break;
|
|
2369
2384
|
}
|
|
2370
|
-
message.history.push(ThresholdHistoryEntry.decode(reader, reader.uint32()));
|
|
2385
|
+
message.history.push(exports.ThresholdHistoryEntry.decode(reader, reader.uint32()));
|
|
2371
2386
|
continue;
|
|
2372
2387
|
}
|
|
2373
2388
|
case 12: {
|
|
2374
2389
|
if (tag !== 98) {
|
|
2375
2390
|
break;
|
|
2376
2391
|
}
|
|
2377
|
-
message.metadata = DAOMetadata.decode(reader, reader.uint32());
|
|
2392
|
+
message.metadata = exports.DAOMetadata.decode(reader, reader.uint32());
|
|
2378
2393
|
continue;
|
|
2379
2394
|
}
|
|
2380
2395
|
case 13: {
|
|
@@ -2428,12 +2443,12 @@ export const ThresholdDAO = {
|
|
|
2428
2443
|
: isSet(object.voting_period_ms)
|
|
2429
2444
|
? globalThis.Number(object.voting_period_ms)
|
|
2430
2445
|
: 0,
|
|
2431
|
-
proposal: isSet(object.proposal) ? Proposal.fromJSON(object.proposal) : undefined,
|
|
2432
|
-
votes: isSet(object.votes) ? ThresholdVotes.fromJSON(object.votes) : undefined,
|
|
2446
|
+
proposal: isSet(object.proposal) ? exports.Proposal.fromJSON(object.proposal) : undefined,
|
|
2447
|
+
votes: isSet(object.votes) ? exports.ThresholdVotes.fromJSON(object.votes) : undefined,
|
|
2433
2448
|
history: globalThis.Array.isArray(object?.history)
|
|
2434
|
-
? object.history.map((e) => ThresholdHistoryEntry.fromJSON(e))
|
|
2449
|
+
? object.history.map((e) => exports.ThresholdHistoryEntry.fromJSON(e))
|
|
2435
2450
|
: [],
|
|
2436
|
-
metadata: isSet(object.metadata) ? DAOMetadata.fromJSON(object.metadata) : undefined,
|
|
2451
|
+
metadata: isSet(object.metadata) ? exports.DAOMetadata.fromJSON(object.metadata) : undefined,
|
|
2437
2452
|
status: isSet(object.status) ? dAOStatusFromJSON(object.status) : DAOStatus.DAO_STATUS_UNSPECIFIED,
|
|
2438
2453
|
};
|
|
2439
2454
|
},
|
|
@@ -2470,16 +2485,16 @@ export const ThresholdDAO = {
|
|
|
2470
2485
|
obj.votingPeriodMs = Math.round(message.votingPeriodMs);
|
|
2471
2486
|
}
|
|
2472
2487
|
if (message.proposal !== undefined) {
|
|
2473
|
-
obj.proposal = Proposal.toJSON(message.proposal);
|
|
2488
|
+
obj.proposal = exports.Proposal.toJSON(message.proposal);
|
|
2474
2489
|
}
|
|
2475
2490
|
if (message.votes !== undefined) {
|
|
2476
|
-
obj.votes = ThresholdVotes.toJSON(message.votes);
|
|
2491
|
+
obj.votes = exports.ThresholdVotes.toJSON(message.votes);
|
|
2477
2492
|
}
|
|
2478
2493
|
if (message.history?.length) {
|
|
2479
|
-
obj.history = message.history.map((e) => ThresholdHistoryEntry.toJSON(e));
|
|
2494
|
+
obj.history = message.history.map((e) => exports.ThresholdHistoryEntry.toJSON(e));
|
|
2480
2495
|
}
|
|
2481
2496
|
if (message.metadata !== undefined) {
|
|
2482
|
-
obj.metadata = DAOMetadata.toJSON(message.metadata);
|
|
2497
|
+
obj.metadata = exports.DAOMetadata.toJSON(message.metadata);
|
|
2483
2498
|
}
|
|
2484
2499
|
if (message.status !== DAOStatus.DAO_STATUS_UNSPECIFIED) {
|
|
2485
2500
|
obj.status = dAOStatusToJSON(message.status);
|
|
@@ -2487,7 +2502,7 @@ export const ThresholdDAO = {
|
|
|
2487
2502
|
return obj;
|
|
2488
2503
|
},
|
|
2489
2504
|
create(base) {
|
|
2490
|
-
return ThresholdDAO.fromPartial(base ?? {});
|
|
2505
|
+
return exports.ThresholdDAO.fromPartial(base ?? {});
|
|
2491
2506
|
},
|
|
2492
2507
|
fromPartial(object) {
|
|
2493
2508
|
const message = createBaseThresholdDAO();
|
|
@@ -2505,14 +2520,14 @@ export const ThresholdDAO = {
|
|
|
2505
2520
|
message.quorum = object.quorum ?? 0;
|
|
2506
2521
|
message.votingPeriodMs = object.votingPeriodMs ?? 0;
|
|
2507
2522
|
message.proposal = (object.proposal !== undefined && object.proposal !== null)
|
|
2508
|
-
? Proposal.fromPartial(object.proposal)
|
|
2523
|
+
? exports.Proposal.fromPartial(object.proposal)
|
|
2509
2524
|
: undefined;
|
|
2510
2525
|
message.votes = (object.votes !== undefined && object.votes !== null)
|
|
2511
|
-
? ThresholdVotes.fromPartial(object.votes)
|
|
2526
|
+
? exports.ThresholdVotes.fromPartial(object.votes)
|
|
2512
2527
|
: undefined;
|
|
2513
|
-
message.history = object.history?.map((e) => ThresholdHistoryEntry.fromPartial(e)) || [];
|
|
2528
|
+
message.history = object.history?.map((e) => exports.ThresholdHistoryEntry.fromPartial(e)) || [];
|
|
2514
2529
|
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
2515
|
-
? DAOMetadata.fromPartial(object.metadata)
|
|
2530
|
+
? exports.DAOMetadata.fromPartial(object.metadata)
|
|
2516
2531
|
: undefined;
|
|
2517
2532
|
message.status = object.status ?? DAOStatus.DAO_STATUS_UNSPECIFIED;
|
|
2518
2533
|
return message;
|
|
@@ -2521,8 +2536,8 @@ export const ThresholdDAO = {
|
|
|
2521
2536
|
function createBaseThresholdDAO_MemberJoinedAtEntry() {
|
|
2522
2537
|
return { key: "", value: 0 };
|
|
2523
2538
|
}
|
|
2524
|
-
|
|
2525
|
-
encode(message, writer = new BinaryWriter()) {
|
|
2539
|
+
exports.ThresholdDAO_MemberJoinedAtEntry = {
|
|
2540
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2526
2541
|
if (message.key !== "") {
|
|
2527
2542
|
writer.uint32(10).string(message.key);
|
|
2528
2543
|
}
|
|
@@ -2532,7 +2547,7 @@ export const ThresholdDAO_MemberJoinedAtEntry = {
|
|
|
2532
2547
|
return writer;
|
|
2533
2548
|
},
|
|
2534
2549
|
decode(input, length) {
|
|
2535
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2550
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2536
2551
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2537
2552
|
const message = createBaseThresholdDAO_MemberJoinedAtEntry();
|
|
2538
2553
|
while (reader.pos < end) {
|
|
@@ -2577,7 +2592,7 @@ export const ThresholdDAO_MemberJoinedAtEntry = {
|
|
|
2577
2592
|
return obj;
|
|
2578
2593
|
},
|
|
2579
2594
|
create(base) {
|
|
2580
|
-
return ThresholdDAO_MemberJoinedAtEntry.fromPartial(base ?? {});
|
|
2595
|
+
return exports.ThresholdDAO_MemberJoinedAtEntry.fromPartial(base ?? {});
|
|
2581
2596
|
},
|
|
2582
2597
|
fromPartial(object) {
|
|
2583
2598
|
const message = createBaseThresholdDAO_MemberJoinedAtEntry();
|
|
@@ -2589,8 +2604,8 @@ export const ThresholdDAO_MemberJoinedAtEntry = {
|
|
|
2589
2604
|
function createBaseThresholdVotes() {
|
|
2590
2605
|
return { votesFor: [], votesAgainst: [], votesAbstain: [] };
|
|
2591
2606
|
}
|
|
2592
|
-
|
|
2593
|
-
encode(message, writer = new BinaryWriter()) {
|
|
2607
|
+
exports.ThresholdVotes = {
|
|
2608
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2594
2609
|
for (const v of message.votesFor) {
|
|
2595
2610
|
writer.uint32(10).string(v);
|
|
2596
2611
|
}
|
|
@@ -2603,7 +2618,7 @@ export const ThresholdVotes = {
|
|
|
2603
2618
|
return writer;
|
|
2604
2619
|
},
|
|
2605
2620
|
decode(input, length) {
|
|
2606
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2621
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2607
2622
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2608
2623
|
const message = createBaseThresholdVotes();
|
|
2609
2624
|
while (reader.pos < end) {
|
|
@@ -2671,7 +2686,7 @@ export const ThresholdVotes = {
|
|
|
2671
2686
|
return obj;
|
|
2672
2687
|
},
|
|
2673
2688
|
create(base) {
|
|
2674
|
-
return ThresholdVotes.fromPartial(base ?? {});
|
|
2689
|
+
return exports.ThresholdVotes.fromPartial(base ?? {});
|
|
2675
2690
|
},
|
|
2676
2691
|
fromPartial(object) {
|
|
2677
2692
|
const message = createBaseThresholdVotes();
|
|
@@ -2684,24 +2699,24 @@ export const ThresholdVotes = {
|
|
|
2684
2699
|
function createBaseThresholdHistoryEntry() {
|
|
2685
2700
|
return { resultType: "", proposal: undefined, votes: undefined, at: undefined };
|
|
2686
2701
|
}
|
|
2687
|
-
|
|
2688
|
-
encode(message, writer = new BinaryWriter()) {
|
|
2702
|
+
exports.ThresholdHistoryEntry = {
|
|
2703
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2689
2704
|
if (message.resultType !== "") {
|
|
2690
2705
|
writer.uint32(10).string(message.resultType);
|
|
2691
2706
|
}
|
|
2692
2707
|
if (message.proposal !== undefined) {
|
|
2693
|
-
Proposal.encode(message.proposal, writer.uint32(18).fork()).join();
|
|
2708
|
+
exports.Proposal.encode(message.proposal, writer.uint32(18).fork()).join();
|
|
2694
2709
|
}
|
|
2695
2710
|
if (message.votes !== undefined) {
|
|
2696
|
-
ThresholdVotes.encode(message.votes, writer.uint32(26).fork()).join();
|
|
2711
|
+
exports.ThresholdVotes.encode(message.votes, writer.uint32(26).fork()).join();
|
|
2697
2712
|
}
|
|
2698
2713
|
if (message.at !== undefined) {
|
|
2699
|
-
Timestamp.encode(toTimestamp(message.at), writer.uint32(34).fork()).join();
|
|
2714
|
+
timestamp_js_1.Timestamp.encode(toTimestamp(message.at), writer.uint32(34).fork()).join();
|
|
2700
2715
|
}
|
|
2701
2716
|
return writer;
|
|
2702
2717
|
},
|
|
2703
2718
|
decode(input, length) {
|
|
2704
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2719
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2705
2720
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2706
2721
|
const message = createBaseThresholdHistoryEntry();
|
|
2707
2722
|
while (reader.pos < end) {
|
|
@@ -2718,21 +2733,21 @@ export const ThresholdHistoryEntry = {
|
|
|
2718
2733
|
if (tag !== 18) {
|
|
2719
2734
|
break;
|
|
2720
2735
|
}
|
|
2721
|
-
message.proposal = Proposal.decode(reader, reader.uint32());
|
|
2736
|
+
message.proposal = exports.Proposal.decode(reader, reader.uint32());
|
|
2722
2737
|
continue;
|
|
2723
2738
|
}
|
|
2724
2739
|
case 3: {
|
|
2725
2740
|
if (tag !== 26) {
|
|
2726
2741
|
break;
|
|
2727
2742
|
}
|
|
2728
|
-
message.votes = ThresholdVotes.decode(reader, reader.uint32());
|
|
2743
|
+
message.votes = exports.ThresholdVotes.decode(reader, reader.uint32());
|
|
2729
2744
|
continue;
|
|
2730
2745
|
}
|
|
2731
2746
|
case 4: {
|
|
2732
2747
|
if (tag !== 34) {
|
|
2733
2748
|
break;
|
|
2734
2749
|
}
|
|
2735
|
-
message.at = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2750
|
+
message.at = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
|
|
2736
2751
|
continue;
|
|
2737
2752
|
}
|
|
2738
2753
|
}
|
|
@@ -2750,8 +2765,8 @@ export const ThresholdHistoryEntry = {
|
|
|
2750
2765
|
: isSet(object.result_type)
|
|
2751
2766
|
? globalThis.String(object.result_type)
|
|
2752
2767
|
: "",
|
|
2753
|
-
proposal: isSet(object.proposal) ? Proposal.fromJSON(object.proposal) : undefined,
|
|
2754
|
-
votes: isSet(object.votes) ? ThresholdVotes.fromJSON(object.votes) : undefined,
|
|
2768
|
+
proposal: isSet(object.proposal) ? exports.Proposal.fromJSON(object.proposal) : undefined,
|
|
2769
|
+
votes: isSet(object.votes) ? exports.ThresholdVotes.fromJSON(object.votes) : undefined,
|
|
2755
2770
|
at: isSet(object.at) ? fromJsonTimestamp(object.at) : undefined,
|
|
2756
2771
|
};
|
|
2757
2772
|
},
|
|
@@ -2761,10 +2776,10 @@ export const ThresholdHistoryEntry = {
|
|
|
2761
2776
|
obj.resultType = message.resultType;
|
|
2762
2777
|
}
|
|
2763
2778
|
if (message.proposal !== undefined) {
|
|
2764
|
-
obj.proposal = Proposal.toJSON(message.proposal);
|
|
2779
|
+
obj.proposal = exports.Proposal.toJSON(message.proposal);
|
|
2765
2780
|
}
|
|
2766
2781
|
if (message.votes !== undefined) {
|
|
2767
|
-
obj.votes = ThresholdVotes.toJSON(message.votes);
|
|
2782
|
+
obj.votes = exports.ThresholdVotes.toJSON(message.votes);
|
|
2768
2783
|
}
|
|
2769
2784
|
if (message.at !== undefined) {
|
|
2770
2785
|
obj.at = message.at.toISOString();
|
|
@@ -2772,16 +2787,16 @@ export const ThresholdHistoryEntry = {
|
|
|
2772
2787
|
return obj;
|
|
2773
2788
|
},
|
|
2774
2789
|
create(base) {
|
|
2775
|
-
return ThresholdHistoryEntry.fromPartial(base ?? {});
|
|
2790
|
+
return exports.ThresholdHistoryEntry.fromPartial(base ?? {});
|
|
2776
2791
|
},
|
|
2777
2792
|
fromPartial(object) {
|
|
2778
2793
|
const message = createBaseThresholdHistoryEntry();
|
|
2779
2794
|
message.resultType = object.resultType ?? "";
|
|
2780
2795
|
message.proposal = (object.proposal !== undefined && object.proposal !== null)
|
|
2781
|
-
? Proposal.fromPartial(object.proposal)
|
|
2796
|
+
? exports.Proposal.fromPartial(object.proposal)
|
|
2782
2797
|
: undefined;
|
|
2783
2798
|
message.votes = (object.votes !== undefined && object.votes !== null)
|
|
2784
|
-
? ThresholdVotes.fromPartial(object.votes)
|
|
2799
|
+
? exports.ThresholdVotes.fromPartial(object.votes)
|
|
2785
2800
|
: undefined;
|
|
2786
2801
|
message.at = object.at ?? undefined;
|
|
2787
2802
|
return message;
|
|
@@ -2790,8 +2805,8 @@ export const ThresholdHistoryEntry = {
|
|
|
2790
2805
|
function createBaseCreateDAORequest() {
|
|
2791
2806
|
return { daoType: DAOType.DAO_TYPE_UNSPECIFIED, name: "", creator: "", metadata: undefined, config: undefined };
|
|
2792
2807
|
}
|
|
2793
|
-
|
|
2794
|
-
encode(message, writer = new BinaryWriter()) {
|
|
2808
|
+
exports.CreateDAORequest = {
|
|
2809
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2795
2810
|
if (message.daoType !== DAOType.DAO_TYPE_UNSPECIFIED) {
|
|
2796
2811
|
writer.uint32(8).int32(dAOTypeToNumber(message.daoType));
|
|
2797
2812
|
}
|
|
@@ -2802,15 +2817,15 @@ export const CreateDAORequest = {
|
|
|
2802
2817
|
writer.uint32(26).string(message.creator);
|
|
2803
2818
|
}
|
|
2804
2819
|
if (message.metadata !== undefined) {
|
|
2805
|
-
DAOMetadata.encode(message.metadata, writer.uint32(34).fork()).join();
|
|
2820
|
+
exports.DAOMetadata.encode(message.metadata, writer.uint32(34).fork()).join();
|
|
2806
2821
|
}
|
|
2807
2822
|
if (message.config !== undefined) {
|
|
2808
|
-
Struct.encode(Struct.wrap(message.config), writer.uint32(42).fork()).join();
|
|
2823
|
+
struct_js_1.Struct.encode(struct_js_1.Struct.wrap(message.config), writer.uint32(42).fork()).join();
|
|
2809
2824
|
}
|
|
2810
2825
|
return writer;
|
|
2811
2826
|
},
|
|
2812
2827
|
decode(input, length) {
|
|
2813
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2828
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2814
2829
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2815
2830
|
const message = createBaseCreateDAORequest();
|
|
2816
2831
|
while (reader.pos < end) {
|
|
@@ -2841,14 +2856,14 @@ export const CreateDAORequest = {
|
|
|
2841
2856
|
if (tag !== 34) {
|
|
2842
2857
|
break;
|
|
2843
2858
|
}
|
|
2844
|
-
message.metadata = DAOMetadata.decode(reader, reader.uint32());
|
|
2859
|
+
message.metadata = exports.DAOMetadata.decode(reader, reader.uint32());
|
|
2845
2860
|
continue;
|
|
2846
2861
|
}
|
|
2847
2862
|
case 5: {
|
|
2848
2863
|
if (tag !== 42) {
|
|
2849
2864
|
break;
|
|
2850
2865
|
}
|
|
2851
|
-
message.config = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
2866
|
+
message.config = struct_js_1.Struct.unwrap(struct_js_1.Struct.decode(reader, reader.uint32()));
|
|
2852
2867
|
continue;
|
|
2853
2868
|
}
|
|
2854
2869
|
}
|
|
@@ -2868,7 +2883,7 @@ export const CreateDAORequest = {
|
|
|
2868
2883
|
: DAOType.DAO_TYPE_UNSPECIFIED,
|
|
2869
2884
|
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
2870
2885
|
creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
|
|
2871
|
-
metadata: isSet(object.metadata) ? DAOMetadata.fromJSON(object.metadata) : undefined,
|
|
2886
|
+
metadata: isSet(object.metadata) ? exports.DAOMetadata.fromJSON(object.metadata) : undefined,
|
|
2872
2887
|
config: isObject(object.config) ? object.config : undefined,
|
|
2873
2888
|
};
|
|
2874
2889
|
},
|
|
@@ -2884,7 +2899,7 @@ export const CreateDAORequest = {
|
|
|
2884
2899
|
obj.creator = message.creator;
|
|
2885
2900
|
}
|
|
2886
2901
|
if (message.metadata !== undefined) {
|
|
2887
|
-
obj.metadata = DAOMetadata.toJSON(message.metadata);
|
|
2902
|
+
obj.metadata = exports.DAOMetadata.toJSON(message.metadata);
|
|
2888
2903
|
}
|
|
2889
2904
|
if (message.config !== undefined) {
|
|
2890
2905
|
obj.config = message.config;
|
|
@@ -2892,7 +2907,7 @@ export const CreateDAORequest = {
|
|
|
2892
2907
|
return obj;
|
|
2893
2908
|
},
|
|
2894
2909
|
create(base) {
|
|
2895
|
-
return CreateDAORequest.fromPartial(base ?? {});
|
|
2910
|
+
return exports.CreateDAORequest.fromPartial(base ?? {});
|
|
2896
2911
|
},
|
|
2897
2912
|
fromPartial(object) {
|
|
2898
2913
|
const message = createBaseCreateDAORequest();
|
|
@@ -2900,7 +2915,7 @@ export const CreateDAORequest = {
|
|
|
2900
2915
|
message.name = object.name ?? "";
|
|
2901
2916
|
message.creator = object.creator ?? "";
|
|
2902
2917
|
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
2903
|
-
? DAOMetadata.fromPartial(object.metadata)
|
|
2918
|
+
? exports.DAOMetadata.fromPartial(object.metadata)
|
|
2904
2919
|
: undefined;
|
|
2905
2920
|
message.config = object.config ?? undefined;
|
|
2906
2921
|
return message;
|
|
@@ -2909,8 +2924,8 @@ export const CreateDAORequest = {
|
|
|
2909
2924
|
function createBaseProposeRequest() {
|
|
2910
2925
|
return { daoId: "", proposer: "", title: "", description: "", actionType: "", payload: undefined };
|
|
2911
2926
|
}
|
|
2912
|
-
|
|
2913
|
-
encode(message, writer = new BinaryWriter()) {
|
|
2927
|
+
exports.ProposeRequest = {
|
|
2928
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2914
2929
|
if (message.daoId !== "") {
|
|
2915
2930
|
writer.uint32(10).string(message.daoId);
|
|
2916
2931
|
}
|
|
@@ -2927,12 +2942,12 @@ export const ProposeRequest = {
|
|
|
2927
2942
|
writer.uint32(42).string(message.actionType);
|
|
2928
2943
|
}
|
|
2929
2944
|
if (message.payload !== undefined) {
|
|
2930
|
-
Struct.encode(Struct.wrap(message.payload), writer.uint32(50).fork()).join();
|
|
2945
|
+
struct_js_1.Struct.encode(struct_js_1.Struct.wrap(message.payload), writer.uint32(50).fork()).join();
|
|
2931
2946
|
}
|
|
2932
2947
|
return writer;
|
|
2933
2948
|
},
|
|
2934
2949
|
decode(input, length) {
|
|
2935
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2950
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2936
2951
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2937
2952
|
const message = createBaseProposeRequest();
|
|
2938
2953
|
while (reader.pos < end) {
|
|
@@ -2977,7 +2992,7 @@ export const ProposeRequest = {
|
|
|
2977
2992
|
if (tag !== 50) {
|
|
2978
2993
|
break;
|
|
2979
2994
|
}
|
|
2980
|
-
message.payload = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
2995
|
+
message.payload = struct_js_1.Struct.unwrap(struct_js_1.Struct.decode(reader, reader.uint32()));
|
|
2981
2996
|
continue;
|
|
2982
2997
|
}
|
|
2983
2998
|
}
|
|
@@ -3029,7 +3044,7 @@ export const ProposeRequest = {
|
|
|
3029
3044
|
return obj;
|
|
3030
3045
|
},
|
|
3031
3046
|
create(base) {
|
|
3032
|
-
return ProposeRequest.fromPartial(base ?? {});
|
|
3047
|
+
return exports.ProposeRequest.fromPartial(base ?? {});
|
|
3033
3048
|
},
|
|
3034
3049
|
fromPartial(object) {
|
|
3035
3050
|
const message = createBaseProposeRequest();
|
|
@@ -3045,8 +3060,8 @@ export const ProposeRequest = {
|
|
|
3045
3060
|
function createBaseVoteRequest() {
|
|
3046
3061
|
return { daoId: "", voter: "", choice: VoteChoice.VOTE_CHOICE_UNSPECIFIED };
|
|
3047
3062
|
}
|
|
3048
|
-
|
|
3049
|
-
encode(message, writer = new BinaryWriter()) {
|
|
3063
|
+
exports.VoteRequest = {
|
|
3064
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
3050
3065
|
if (message.daoId !== "") {
|
|
3051
3066
|
writer.uint32(10).string(message.daoId);
|
|
3052
3067
|
}
|
|
@@ -3059,7 +3074,7 @@ export const VoteRequest = {
|
|
|
3059
3074
|
return writer;
|
|
3060
3075
|
},
|
|
3061
3076
|
decode(input, length) {
|
|
3062
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3077
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3063
3078
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3064
3079
|
const message = createBaseVoteRequest();
|
|
3065
3080
|
while (reader.pos < end) {
|
|
@@ -3119,7 +3134,7 @@ export const VoteRequest = {
|
|
|
3119
3134
|
return obj;
|
|
3120
3135
|
},
|
|
3121
3136
|
create(base) {
|
|
3122
|
-
return VoteRequest.fromPartial(base ?? {});
|
|
3137
|
+
return exports.VoteRequest.fromPartial(base ?? {});
|
|
3123
3138
|
},
|
|
3124
3139
|
fromPartial(object) {
|
|
3125
3140
|
const message = createBaseVoteRequest();
|
|
@@ -3132,8 +3147,8 @@ export const VoteRequest = {
|
|
|
3132
3147
|
function createBaseExecuteRequest() {
|
|
3133
3148
|
return { daoId: "", executor: "" };
|
|
3134
3149
|
}
|
|
3135
|
-
|
|
3136
|
-
encode(message, writer = new BinaryWriter()) {
|
|
3150
|
+
exports.ExecuteRequest = {
|
|
3151
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
3137
3152
|
if (message.daoId !== "") {
|
|
3138
3153
|
writer.uint32(10).string(message.daoId);
|
|
3139
3154
|
}
|
|
@@ -3143,7 +3158,7 @@ export const ExecuteRequest = {
|
|
|
3143
3158
|
return writer;
|
|
3144
3159
|
},
|
|
3145
3160
|
decode(input, length) {
|
|
3146
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3161
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3147
3162
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3148
3163
|
const message = createBaseExecuteRequest();
|
|
3149
3164
|
while (reader.pos < end) {
|
|
@@ -3192,7 +3207,7 @@ export const ExecuteRequest = {
|
|
|
3192
3207
|
return obj;
|
|
3193
3208
|
},
|
|
3194
3209
|
create(base) {
|
|
3195
|
-
return ExecuteRequest.fromPartial(base ?? {});
|
|
3210
|
+
return exports.ExecuteRequest.fromPartial(base ?? {});
|
|
3196
3211
|
},
|
|
3197
3212
|
fromPartial(object) {
|
|
3198
3213
|
const message = createBaseExecuteRequest();
|
|
@@ -3219,7 +3234,7 @@ function fromJsonTimestamp(o) {
|
|
|
3219
3234
|
return new globalThis.Date(o);
|
|
3220
3235
|
}
|
|
3221
3236
|
else {
|
|
3222
|
-
return fromTimestamp(Timestamp.fromJSON(o));
|
|
3237
|
+
return fromTimestamp(timestamp_js_1.Timestamp.fromJSON(o));
|
|
3223
3238
|
}
|
|
3224
3239
|
}
|
|
3225
3240
|
function longToNumber(int64) {
|