@verana-labs/verana-types 0.10.1-dev.12 → 0.10.1-dev.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/amino-converter/co.d.ts +3 -0
- package/dist/amino-converter/co.js +164 -0
- package/dist/amino-converter/cs.js +2 -2
- package/dist/amino-converter/ec.d.ts +4 -0
- package/dist/amino-converter/ec.js +63 -0
- package/dist/amino-converter/{tr.d.ts → gf.d.ts} +0 -3
- package/dist/amino-converter/gf.js +48 -0
- package/dist/amino-converter/group.d.ts +3 -0
- package/dist/amino-converter/group.js +91 -0
- package/dist/amino-converter/pp.d.ts +12 -0
- package/dist/amino-converter/{perm.js → pp.js} +95 -79
- package/dist/codec/verana/cs/v1/query.d.ts +2 -2
- package/dist/codec/verana/cs/v1/query.js +21 -21
- package/dist/codec/verana/cs/v1/tx.d.ts +1 -1
- package/dist/codec/verana/cs/v1/tx.js +22 -22
- package/dist/codec/verana/cs/v1/types.d.ts +6 -2
- package/dist/codec/verana/cs/v1/types.js +30 -30
- package/dist/codec/verana/de/v1/query.d.ts +72 -4
- package/dist/codec/verana/de/v1/query.js +261 -19
- package/dist/codec/verana/de/v1/types.d.ts +124 -34
- package/dist/codec/verana/de/v1/types.js +361 -109
- package/dist/codec/verana/{tr → ec}/module/module.d.ts +1 -1
- package/dist/codec/verana/{tr → ec}/module/module.js +2 -2
- package/dist/codec/verana/{tr → ec}/v1/genesis.d.ts +10 -12
- package/dist/codec/verana/{tr → ec}/v1/genesis.js +16 -56
- package/dist/codec/verana/{tr → ec}/v1/params.d.ts +1 -1
- package/dist/codec/verana/{tr → ec}/v1/params.js +2 -2
- package/dist/codec/verana/ec/v1/query.d.ts +109 -0
- package/dist/codec/verana/{tr → ec}/v1/query.js +69 -71
- package/dist/codec/verana/ec/v1/tx.d.ts +152 -0
- package/dist/codec/verana/{tr → ec}/v1/tx.js +85 -403
- package/dist/codec/verana/ec/v1/types.d.ts +67 -0
- package/dist/codec/verana/ec/v1/types.js +422 -0
- package/dist/codec/verana/{perm → pp}/module/module.d.ts +1 -1
- package/dist/codec/verana/{perm → pp}/module/module.js +2 -2
- package/dist/codec/verana/{perm → pp}/v1/genesis.d.ts +9 -9
- package/dist/codec/verana/{perm → pp}/v1/genesis.js +26 -26
- package/dist/codec/verana/{perm → pp}/v1/params.d.ts +1 -1
- package/dist/codec/verana/{perm → pp}/v1/params.js +2 -2
- package/dist/codec/verana/pp/v1/query.d.ts +208 -0
- package/dist/codec/verana/{perm → pp}/v1/query.js +148 -148
- package/dist/codec/verana/pp/v1/tx.d.ts +447 -0
- package/dist/codec/verana/{perm → pp}/v1/tx.js +412 -302
- package/dist/codec/verana/pp/v1/types.d.ts +137 -0
- package/dist/codec/verana/{perm → pp}/v1/types.js +270 -345
- package/dist/helpers/aminoConverters.d.ts +6 -4
- package/dist/helpers/aminoConverters.js +6 -4
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/signing.d.ts +36 -32
- package/dist/signing.js +85 -68
- package/package.json +1 -1
- package/dist/amino-converter/perm.d.ts +0 -12
- package/dist/amino-converter/tr.js +0 -107
- package/dist/codec/verana/perm/v1/query.d.ts +0 -208
- package/dist/codec/verana/perm/v1/tx.d.ts +0 -441
- package/dist/codec/verana/perm/v1/types.d.ts +0 -134
- package/dist/codec/verana/tr/v1/query.d.ts +0 -117
- package/dist/codec/verana/tr/v1/tx.d.ts +0 -255
- package/dist/codec/verana/tr/v1/types.d.ts +0 -105
- package/dist/codec/verana/tr/v1/types.js +0 -809
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as _m0 from "protobufjs/minimal";
|
|
2
|
+
import { GovernanceFrameworkVersionWithDocs } from "../../gf/v1/types";
|
|
3
|
+
export declare const protobufPackage = "verana.ec.v1";
|
|
4
|
+
/**
|
|
5
|
+
* Ecosystem is the VPR-level entity introduced in spec v4-rc2 as the
|
|
6
|
+
* replacement for the legacy Trust Registry concept. An Ecosystem is
|
|
7
|
+
* identified by its uint64 `id` and controlled by the Corporation referenced
|
|
8
|
+
* via `corporation_id`. Per-Ecosystem DID uniqueness is NOT enforced; the
|
|
9
|
+
* `(did, corporation_id)` consistency invariant is enforced instead — see
|
|
10
|
+
* MOD-ES-MSG-1-2-1 and MOD-ES-MSG-2-2-1.
|
|
11
|
+
*
|
|
12
|
+
* active_version is uint32 (spec literally says "int"); version numbers are
|
|
13
|
+
* always >= 1 and this matches the MOD-GF version type.
|
|
14
|
+
*/
|
|
15
|
+
export interface Ecosystem {
|
|
16
|
+
id: number;
|
|
17
|
+
did: string;
|
|
18
|
+
corporationId: number;
|
|
19
|
+
created: Date | undefined;
|
|
20
|
+
modified: Date | undefined;
|
|
21
|
+
archived: boolean;
|
|
22
|
+
language: string;
|
|
23
|
+
activeVersion: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* EcosystemWithVersions is the query response shape (MOD-ES-QRY-1 /
|
|
27
|
+
* MOD-ES-QRY-2) including nested governance framework versions and documents
|
|
28
|
+
* pulled from the x/gf module.
|
|
29
|
+
*/
|
|
30
|
+
export interface EcosystemWithVersions {
|
|
31
|
+
id: number;
|
|
32
|
+
did: string;
|
|
33
|
+
corporationId: number;
|
|
34
|
+
created: Date | undefined;
|
|
35
|
+
modified: Date | undefined;
|
|
36
|
+
archived: boolean;
|
|
37
|
+
language: string;
|
|
38
|
+
activeVersion: number;
|
|
39
|
+
versions: GovernanceFrameworkVersionWithDocs[];
|
|
40
|
+
}
|
|
41
|
+
export declare const Ecosystem: {
|
|
42
|
+
encode(message: Ecosystem, writer?: _m0.Writer): _m0.Writer;
|
|
43
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Ecosystem;
|
|
44
|
+
fromJSON(object: any): Ecosystem;
|
|
45
|
+
toJSON(message: Ecosystem): unknown;
|
|
46
|
+
create<I extends Exact<DeepPartial<Ecosystem>, I>>(base?: I): Ecosystem;
|
|
47
|
+
fromPartial<I extends Exact<DeepPartial<Ecosystem>, I>>(object: I): Ecosystem;
|
|
48
|
+
};
|
|
49
|
+
export declare const EcosystemWithVersions: {
|
|
50
|
+
encode(message: EcosystemWithVersions, writer?: _m0.Writer): _m0.Writer;
|
|
51
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): EcosystemWithVersions;
|
|
52
|
+
fromJSON(object: any): EcosystemWithVersions;
|
|
53
|
+
toJSON(message: EcosystemWithVersions): unknown;
|
|
54
|
+
create<I extends Exact<DeepPartial<EcosystemWithVersions>, I>>(base?: I): EcosystemWithVersions;
|
|
55
|
+
fromPartial<I extends Exact<DeepPartial<EcosystemWithVersions>, I>>(object: I): EcosystemWithVersions;
|
|
56
|
+
};
|
|
57
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
58
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
59
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
60
|
+
} : Partial<T>;
|
|
61
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
62
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
63
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
64
|
+
} & {
|
|
65
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
66
|
+
};
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v1.181.2
|
|
5
|
+
// protoc unknown
|
|
6
|
+
// source: verana/ec/v1/types.proto
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function(o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
+
var ownKeys = function(o) {
|
|
25
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
+
var ar = [];
|
|
27
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
+
return ar;
|
|
29
|
+
};
|
|
30
|
+
return ownKeys(o);
|
|
31
|
+
};
|
|
32
|
+
return function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.EcosystemWithVersions = exports.Ecosystem = exports.protobufPackage = void 0;
|
|
42
|
+
/* eslint-disable */
|
|
43
|
+
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
44
|
+
const timestamp_1 = require("../../../google/protobuf/timestamp");
|
|
45
|
+
const types_1 = require("../../gf/v1/types");
|
|
46
|
+
const Long = require("long");
|
|
47
|
+
exports.protobufPackage = "verana.ec.v1";
|
|
48
|
+
function createBaseEcosystem() {
|
|
49
|
+
return {
|
|
50
|
+
id: 0,
|
|
51
|
+
did: "",
|
|
52
|
+
corporationId: 0,
|
|
53
|
+
created: undefined,
|
|
54
|
+
modified: undefined,
|
|
55
|
+
archived: false,
|
|
56
|
+
language: "",
|
|
57
|
+
activeVersion: 0,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
exports.Ecosystem = {
|
|
61
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
62
|
+
if (message.id !== 0) {
|
|
63
|
+
writer.uint32(8).uint64(message.id);
|
|
64
|
+
}
|
|
65
|
+
if (message.did !== "") {
|
|
66
|
+
writer.uint32(18).string(message.did);
|
|
67
|
+
}
|
|
68
|
+
if (message.corporationId !== 0) {
|
|
69
|
+
writer.uint32(24).uint64(message.corporationId);
|
|
70
|
+
}
|
|
71
|
+
if (message.created !== undefined) {
|
|
72
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.created), writer.uint32(34).fork()).ldelim();
|
|
73
|
+
}
|
|
74
|
+
if (message.modified !== undefined) {
|
|
75
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.modified), writer.uint32(42).fork()).ldelim();
|
|
76
|
+
}
|
|
77
|
+
if (message.archived !== false) {
|
|
78
|
+
writer.uint32(48).bool(message.archived);
|
|
79
|
+
}
|
|
80
|
+
if (message.language !== "") {
|
|
81
|
+
writer.uint32(58).string(message.language);
|
|
82
|
+
}
|
|
83
|
+
if (message.activeVersion !== 0) {
|
|
84
|
+
writer.uint32(64).uint32(message.activeVersion);
|
|
85
|
+
}
|
|
86
|
+
return writer;
|
|
87
|
+
},
|
|
88
|
+
decode(input, length) {
|
|
89
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
90
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
91
|
+
const message = createBaseEcosystem();
|
|
92
|
+
while (reader.pos < end) {
|
|
93
|
+
const tag = reader.uint32();
|
|
94
|
+
switch (tag >>> 3) {
|
|
95
|
+
case 1:
|
|
96
|
+
if (tag !== 8) {
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
message.id = longToNumber(reader.uint64());
|
|
100
|
+
continue;
|
|
101
|
+
case 2:
|
|
102
|
+
if (tag !== 18) {
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
message.did = reader.string();
|
|
106
|
+
continue;
|
|
107
|
+
case 3:
|
|
108
|
+
if (tag !== 24) {
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
message.corporationId = longToNumber(reader.uint64());
|
|
112
|
+
continue;
|
|
113
|
+
case 4:
|
|
114
|
+
if (tag !== 34) {
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
message.created = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
118
|
+
continue;
|
|
119
|
+
case 5:
|
|
120
|
+
if (tag !== 42) {
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
message.modified = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
124
|
+
continue;
|
|
125
|
+
case 6:
|
|
126
|
+
if (tag !== 48) {
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
message.archived = reader.bool();
|
|
130
|
+
continue;
|
|
131
|
+
case 7:
|
|
132
|
+
if (tag !== 58) {
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
message.language = reader.string();
|
|
136
|
+
continue;
|
|
137
|
+
case 8:
|
|
138
|
+
if (tag !== 64) {
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
message.activeVersion = reader.uint32();
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
reader.skipType(tag & 7);
|
|
148
|
+
}
|
|
149
|
+
return message;
|
|
150
|
+
},
|
|
151
|
+
fromJSON(object) {
|
|
152
|
+
return {
|
|
153
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
154
|
+
did: isSet(object.did) ? globalThis.String(object.did) : "",
|
|
155
|
+
corporationId: isSet(object.corporationId) ? globalThis.Number(object.corporationId) : 0,
|
|
156
|
+
created: isSet(object.created) ? fromJsonTimestamp(object.created) : undefined,
|
|
157
|
+
modified: isSet(object.modified) ? fromJsonTimestamp(object.modified) : undefined,
|
|
158
|
+
archived: isSet(object.archived) ? globalThis.Boolean(object.archived) : false,
|
|
159
|
+
language: isSet(object.language) ? globalThis.String(object.language) : "",
|
|
160
|
+
activeVersion: isSet(object.activeVersion) ? globalThis.Number(object.activeVersion) : 0,
|
|
161
|
+
};
|
|
162
|
+
},
|
|
163
|
+
toJSON(message) {
|
|
164
|
+
const obj = {};
|
|
165
|
+
if (message.id !== 0) {
|
|
166
|
+
obj.id = Math.round(message.id);
|
|
167
|
+
}
|
|
168
|
+
if (message.did !== "") {
|
|
169
|
+
obj.did = message.did;
|
|
170
|
+
}
|
|
171
|
+
if (message.corporationId !== 0) {
|
|
172
|
+
obj.corporationId = Math.round(message.corporationId);
|
|
173
|
+
}
|
|
174
|
+
if (message.created !== undefined) {
|
|
175
|
+
obj.created = message.created.toISOString();
|
|
176
|
+
}
|
|
177
|
+
if (message.modified !== undefined) {
|
|
178
|
+
obj.modified = message.modified.toISOString();
|
|
179
|
+
}
|
|
180
|
+
if (message.archived !== false) {
|
|
181
|
+
obj.archived = message.archived;
|
|
182
|
+
}
|
|
183
|
+
if (message.language !== "") {
|
|
184
|
+
obj.language = message.language;
|
|
185
|
+
}
|
|
186
|
+
if (message.activeVersion !== 0) {
|
|
187
|
+
obj.activeVersion = Math.round(message.activeVersion);
|
|
188
|
+
}
|
|
189
|
+
return obj;
|
|
190
|
+
},
|
|
191
|
+
create(base) {
|
|
192
|
+
return exports.Ecosystem.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
193
|
+
},
|
|
194
|
+
fromPartial(object) {
|
|
195
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
196
|
+
const message = createBaseEcosystem();
|
|
197
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
|
|
198
|
+
message.did = (_b = object.did) !== null && _b !== void 0 ? _b : "";
|
|
199
|
+
message.corporationId = (_c = object.corporationId) !== null && _c !== void 0 ? _c : 0;
|
|
200
|
+
message.created = (_d = object.created) !== null && _d !== void 0 ? _d : undefined;
|
|
201
|
+
message.modified = (_e = object.modified) !== null && _e !== void 0 ? _e : undefined;
|
|
202
|
+
message.archived = (_f = object.archived) !== null && _f !== void 0 ? _f : false;
|
|
203
|
+
message.language = (_g = object.language) !== null && _g !== void 0 ? _g : "";
|
|
204
|
+
message.activeVersion = (_h = object.activeVersion) !== null && _h !== void 0 ? _h : 0;
|
|
205
|
+
return message;
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
function createBaseEcosystemWithVersions() {
|
|
209
|
+
return {
|
|
210
|
+
id: 0,
|
|
211
|
+
did: "",
|
|
212
|
+
corporationId: 0,
|
|
213
|
+
created: undefined,
|
|
214
|
+
modified: undefined,
|
|
215
|
+
archived: false,
|
|
216
|
+
language: "",
|
|
217
|
+
activeVersion: 0,
|
|
218
|
+
versions: [],
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
exports.EcosystemWithVersions = {
|
|
222
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
223
|
+
if (message.id !== 0) {
|
|
224
|
+
writer.uint32(8).uint64(message.id);
|
|
225
|
+
}
|
|
226
|
+
if (message.did !== "") {
|
|
227
|
+
writer.uint32(18).string(message.did);
|
|
228
|
+
}
|
|
229
|
+
if (message.corporationId !== 0) {
|
|
230
|
+
writer.uint32(24).uint64(message.corporationId);
|
|
231
|
+
}
|
|
232
|
+
if (message.created !== undefined) {
|
|
233
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.created), writer.uint32(34).fork()).ldelim();
|
|
234
|
+
}
|
|
235
|
+
if (message.modified !== undefined) {
|
|
236
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.modified), writer.uint32(42).fork()).ldelim();
|
|
237
|
+
}
|
|
238
|
+
if (message.archived !== false) {
|
|
239
|
+
writer.uint32(48).bool(message.archived);
|
|
240
|
+
}
|
|
241
|
+
if (message.language !== "") {
|
|
242
|
+
writer.uint32(58).string(message.language);
|
|
243
|
+
}
|
|
244
|
+
if (message.activeVersion !== 0) {
|
|
245
|
+
writer.uint32(64).uint32(message.activeVersion);
|
|
246
|
+
}
|
|
247
|
+
for (const v of message.versions) {
|
|
248
|
+
types_1.GovernanceFrameworkVersionWithDocs.encode(v, writer.uint32(74).fork()).ldelim();
|
|
249
|
+
}
|
|
250
|
+
return writer;
|
|
251
|
+
},
|
|
252
|
+
decode(input, length) {
|
|
253
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
254
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
255
|
+
const message = createBaseEcosystemWithVersions();
|
|
256
|
+
while (reader.pos < end) {
|
|
257
|
+
const tag = reader.uint32();
|
|
258
|
+
switch (tag >>> 3) {
|
|
259
|
+
case 1:
|
|
260
|
+
if (tag !== 8) {
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
message.id = longToNumber(reader.uint64());
|
|
264
|
+
continue;
|
|
265
|
+
case 2:
|
|
266
|
+
if (tag !== 18) {
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
message.did = reader.string();
|
|
270
|
+
continue;
|
|
271
|
+
case 3:
|
|
272
|
+
if (tag !== 24) {
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
message.corporationId = longToNumber(reader.uint64());
|
|
276
|
+
continue;
|
|
277
|
+
case 4:
|
|
278
|
+
if (tag !== 34) {
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
message.created = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
282
|
+
continue;
|
|
283
|
+
case 5:
|
|
284
|
+
if (tag !== 42) {
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
message.modified = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
288
|
+
continue;
|
|
289
|
+
case 6:
|
|
290
|
+
if (tag !== 48) {
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
message.archived = reader.bool();
|
|
294
|
+
continue;
|
|
295
|
+
case 7:
|
|
296
|
+
if (tag !== 58) {
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
message.language = reader.string();
|
|
300
|
+
continue;
|
|
301
|
+
case 8:
|
|
302
|
+
if (tag !== 64) {
|
|
303
|
+
break;
|
|
304
|
+
}
|
|
305
|
+
message.activeVersion = reader.uint32();
|
|
306
|
+
continue;
|
|
307
|
+
case 9:
|
|
308
|
+
if (tag !== 74) {
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
message.versions.push(types_1.GovernanceFrameworkVersionWithDocs.decode(reader, reader.uint32()));
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
314
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
reader.skipType(tag & 7);
|
|
318
|
+
}
|
|
319
|
+
return message;
|
|
320
|
+
},
|
|
321
|
+
fromJSON(object) {
|
|
322
|
+
return {
|
|
323
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
324
|
+
did: isSet(object.did) ? globalThis.String(object.did) : "",
|
|
325
|
+
corporationId: isSet(object.corporationId) ? globalThis.Number(object.corporationId) : 0,
|
|
326
|
+
created: isSet(object.created) ? fromJsonTimestamp(object.created) : undefined,
|
|
327
|
+
modified: isSet(object.modified) ? fromJsonTimestamp(object.modified) : undefined,
|
|
328
|
+
archived: isSet(object.archived) ? globalThis.Boolean(object.archived) : false,
|
|
329
|
+
language: isSet(object.language) ? globalThis.String(object.language) : "",
|
|
330
|
+
activeVersion: isSet(object.activeVersion) ? globalThis.Number(object.activeVersion) : 0,
|
|
331
|
+
versions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.versions)
|
|
332
|
+
? object.versions.map((e) => types_1.GovernanceFrameworkVersionWithDocs.fromJSON(e))
|
|
333
|
+
: [],
|
|
334
|
+
};
|
|
335
|
+
},
|
|
336
|
+
toJSON(message) {
|
|
337
|
+
var _a;
|
|
338
|
+
const obj = {};
|
|
339
|
+
if (message.id !== 0) {
|
|
340
|
+
obj.id = Math.round(message.id);
|
|
341
|
+
}
|
|
342
|
+
if (message.did !== "") {
|
|
343
|
+
obj.did = message.did;
|
|
344
|
+
}
|
|
345
|
+
if (message.corporationId !== 0) {
|
|
346
|
+
obj.corporationId = Math.round(message.corporationId);
|
|
347
|
+
}
|
|
348
|
+
if (message.created !== undefined) {
|
|
349
|
+
obj.created = message.created.toISOString();
|
|
350
|
+
}
|
|
351
|
+
if (message.modified !== undefined) {
|
|
352
|
+
obj.modified = message.modified.toISOString();
|
|
353
|
+
}
|
|
354
|
+
if (message.archived !== false) {
|
|
355
|
+
obj.archived = message.archived;
|
|
356
|
+
}
|
|
357
|
+
if (message.language !== "") {
|
|
358
|
+
obj.language = message.language;
|
|
359
|
+
}
|
|
360
|
+
if (message.activeVersion !== 0) {
|
|
361
|
+
obj.activeVersion = Math.round(message.activeVersion);
|
|
362
|
+
}
|
|
363
|
+
if ((_a = message.versions) === null || _a === void 0 ? void 0 : _a.length) {
|
|
364
|
+
obj.versions = message.versions.map((e) => types_1.GovernanceFrameworkVersionWithDocs.toJSON(e));
|
|
365
|
+
}
|
|
366
|
+
return obj;
|
|
367
|
+
},
|
|
368
|
+
create(base) {
|
|
369
|
+
return exports.EcosystemWithVersions.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
370
|
+
},
|
|
371
|
+
fromPartial(object) {
|
|
372
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
373
|
+
const message = createBaseEcosystemWithVersions();
|
|
374
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
|
|
375
|
+
message.did = (_b = object.did) !== null && _b !== void 0 ? _b : "";
|
|
376
|
+
message.corporationId = (_c = object.corporationId) !== null && _c !== void 0 ? _c : 0;
|
|
377
|
+
message.created = (_d = object.created) !== null && _d !== void 0 ? _d : undefined;
|
|
378
|
+
message.modified = (_e = object.modified) !== null && _e !== void 0 ? _e : undefined;
|
|
379
|
+
message.archived = (_f = object.archived) !== null && _f !== void 0 ? _f : false;
|
|
380
|
+
message.language = (_g = object.language) !== null && _g !== void 0 ? _g : "";
|
|
381
|
+
message.activeVersion = (_h = object.activeVersion) !== null && _h !== void 0 ? _h : 0;
|
|
382
|
+
message.versions = ((_j = object.versions) === null || _j === void 0 ? void 0 : _j.map((e) => types_1.GovernanceFrameworkVersionWithDocs.fromPartial(e))) || [];
|
|
383
|
+
return message;
|
|
384
|
+
},
|
|
385
|
+
};
|
|
386
|
+
function toTimestamp(date) {
|
|
387
|
+
const seconds = Math.trunc(date.getTime() / 1000);
|
|
388
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
389
|
+
return { seconds, nanos };
|
|
390
|
+
}
|
|
391
|
+
function fromTimestamp(t) {
|
|
392
|
+
let millis = (t.seconds || 0) * 1000;
|
|
393
|
+
millis += (t.nanos || 0) / 1000000;
|
|
394
|
+
return new globalThis.Date(millis);
|
|
395
|
+
}
|
|
396
|
+
function fromJsonTimestamp(o) {
|
|
397
|
+
if (o instanceof globalThis.Date) {
|
|
398
|
+
return o;
|
|
399
|
+
}
|
|
400
|
+
else if (typeof o === "string") {
|
|
401
|
+
return new globalThis.Date(o);
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
function longToNumber(long) {
|
|
408
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
409
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
410
|
+
}
|
|
411
|
+
if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
|
|
412
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
413
|
+
}
|
|
414
|
+
return long.toNumber();
|
|
415
|
+
}
|
|
416
|
+
if (_m0.util.Long !== Long) {
|
|
417
|
+
_m0.util.Long = Long;
|
|
418
|
+
_m0.configure();
|
|
419
|
+
}
|
|
420
|
+
function isSet(value) {
|
|
421
|
+
return value !== null && value !== undefined;
|
|
422
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _m0 from "protobufjs/minimal";
|
|
2
|
-
export declare const protobufPackage = "verana.
|
|
2
|
+
export declare const protobufPackage = "verana.pp.module";
|
|
3
3
|
/** Module is the config object for the module. */
|
|
4
4
|
export interface Module {
|
|
5
5
|
/** authority defines the custom module authority. If not set, defaults to the governance module. */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// versions:
|
|
4
4
|
// protoc-gen-ts_proto v1.181.2
|
|
5
5
|
// protoc unknown
|
|
6
|
-
// source: verana/
|
|
6
|
+
// source: verana/pp/module/module.proto
|
|
7
7
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
8
|
if (k2 === undefined) k2 = k;
|
|
9
9
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -41,7 +41,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.Module = exports.protobufPackage = void 0;
|
|
42
42
|
/* eslint-disable */
|
|
43
43
|
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
44
|
-
exports.protobufPackage = "verana.
|
|
44
|
+
exports.protobufPackage = "verana.pp.module";
|
|
45
45
|
function createBaseModule() {
|
|
46
46
|
return { authority: "" };
|
|
47
47
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as _m0 from "protobufjs/minimal";
|
|
2
2
|
import { Params } from "./params";
|
|
3
|
-
import {
|
|
4
|
-
export declare const protobufPackage = "verana.
|
|
5
|
-
/** GenesisState defines the
|
|
3
|
+
import { Participant, ParticipantSession } from "./types";
|
|
4
|
+
export declare const protobufPackage = "verana.pp.v1";
|
|
5
|
+
/** GenesisState defines the participant module's genesis state. */
|
|
6
6
|
export interface GenesisState {
|
|
7
7
|
/** params defines all the parameters of the module. */
|
|
8
8
|
params: Params | undefined;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
|
|
9
|
+
/** participants is a list of all Participant objects */
|
|
10
|
+
participants: Participant[];
|
|
11
|
+
/** participant_sessions is a list of all ParticipantSession objects */
|
|
12
|
+
participantSessions: ParticipantSession[];
|
|
13
|
+
/** next_participant_id is the next auto-increment ID to be assigned to a new participant */
|
|
14
|
+
nextParticipantId: number;
|
|
15
15
|
}
|
|
16
16
|
export declare const GenesisState: {
|
|
17
17
|
encode(message: GenesisState, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// versions:
|
|
4
4
|
// protoc-gen-ts_proto v1.181.2
|
|
5
5
|
// protoc unknown
|
|
6
|
-
// source: verana/
|
|
6
|
+
// source: verana/pp/v1/genesis.proto
|
|
7
7
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
8
|
if (k2 === undefined) k2 = k;
|
|
9
9
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -44,23 +44,23 @@ const _m0 = __importStar(require("protobufjs/minimal"));
|
|
|
44
44
|
const params_1 = require("./params");
|
|
45
45
|
const types_1 = require("./types");
|
|
46
46
|
const Long = require("long");
|
|
47
|
-
exports.protobufPackage = "verana.
|
|
47
|
+
exports.protobufPackage = "verana.pp.v1";
|
|
48
48
|
function createBaseGenesisState() {
|
|
49
|
-
return { params: undefined,
|
|
49
|
+
return { params: undefined, participants: [], participantSessions: [], nextParticipantId: 0 };
|
|
50
50
|
}
|
|
51
51
|
exports.GenesisState = {
|
|
52
52
|
encode(message, writer = _m0.Writer.create()) {
|
|
53
53
|
if (message.params !== undefined) {
|
|
54
54
|
params_1.Params.encode(message.params, writer.uint32(10).fork()).ldelim();
|
|
55
55
|
}
|
|
56
|
-
for (const v of message.
|
|
57
|
-
types_1.
|
|
56
|
+
for (const v of message.participants) {
|
|
57
|
+
types_1.Participant.encode(v, writer.uint32(18).fork()).ldelim();
|
|
58
58
|
}
|
|
59
|
-
for (const v of message.
|
|
60
|
-
types_1.
|
|
59
|
+
for (const v of message.participantSessions) {
|
|
60
|
+
types_1.ParticipantSession.encode(v, writer.uint32(26).fork()).ldelim();
|
|
61
61
|
}
|
|
62
|
-
if (message.
|
|
63
|
-
writer.uint32(32).uint64(message.
|
|
62
|
+
if (message.nextParticipantId !== 0) {
|
|
63
|
+
writer.uint32(32).uint64(message.nextParticipantId);
|
|
64
64
|
}
|
|
65
65
|
return writer;
|
|
66
66
|
},
|
|
@@ -81,19 +81,19 @@ exports.GenesisState = {
|
|
|
81
81
|
if (tag !== 18) {
|
|
82
82
|
break;
|
|
83
83
|
}
|
|
84
|
-
message.
|
|
84
|
+
message.participants.push(types_1.Participant.decode(reader, reader.uint32()));
|
|
85
85
|
continue;
|
|
86
86
|
case 3:
|
|
87
87
|
if (tag !== 26) {
|
|
88
88
|
break;
|
|
89
89
|
}
|
|
90
|
-
message.
|
|
90
|
+
message.participantSessions.push(types_1.ParticipantSession.decode(reader, reader.uint32()));
|
|
91
91
|
continue;
|
|
92
92
|
case 4:
|
|
93
93
|
if (tag !== 32) {
|
|
94
94
|
break;
|
|
95
95
|
}
|
|
96
|
-
message.
|
|
96
|
+
message.nextParticipantId = longToNumber(reader.uint64());
|
|
97
97
|
continue;
|
|
98
98
|
}
|
|
99
99
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -106,13 +106,13 @@ exports.GenesisState = {
|
|
|
106
106
|
fromJSON(object) {
|
|
107
107
|
return {
|
|
108
108
|
params: isSet(object.params) ? params_1.Params.fromJSON(object.params) : undefined,
|
|
109
|
-
|
|
110
|
-
? object.
|
|
109
|
+
participants: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.participants)
|
|
110
|
+
? object.participants.map((e) => types_1.Participant.fromJSON(e))
|
|
111
111
|
: [],
|
|
112
|
-
|
|
113
|
-
? object.
|
|
112
|
+
participantSessions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.participantSessions)
|
|
113
|
+
? object.participantSessions.map((e) => types_1.ParticipantSession.fromJSON(e))
|
|
114
114
|
: [],
|
|
115
|
-
|
|
115
|
+
nextParticipantId: isSet(object.nextParticipantId) ? globalThis.Number(object.nextParticipantId) : 0,
|
|
116
116
|
};
|
|
117
117
|
},
|
|
118
118
|
toJSON(message) {
|
|
@@ -121,14 +121,14 @@ exports.GenesisState = {
|
|
|
121
121
|
if (message.params !== undefined) {
|
|
122
122
|
obj.params = params_1.Params.toJSON(message.params);
|
|
123
123
|
}
|
|
124
|
-
if ((_a = message.
|
|
125
|
-
obj.
|
|
124
|
+
if ((_a = message.participants) === null || _a === void 0 ? void 0 : _a.length) {
|
|
125
|
+
obj.participants = message.participants.map((e) => types_1.Participant.toJSON(e));
|
|
126
126
|
}
|
|
127
|
-
if ((_b = message.
|
|
128
|
-
obj.
|
|
127
|
+
if ((_b = message.participantSessions) === null || _b === void 0 ? void 0 : _b.length) {
|
|
128
|
+
obj.participantSessions = message.participantSessions.map((e) => types_1.ParticipantSession.toJSON(e));
|
|
129
129
|
}
|
|
130
|
-
if (message.
|
|
131
|
-
obj.
|
|
130
|
+
if (message.nextParticipantId !== 0) {
|
|
131
|
+
obj.nextParticipantId = Math.round(message.nextParticipantId);
|
|
132
132
|
}
|
|
133
133
|
return obj;
|
|
134
134
|
},
|
|
@@ -141,9 +141,9 @@ exports.GenesisState = {
|
|
|
141
141
|
message.params = (object.params !== undefined && object.params !== null)
|
|
142
142
|
? params_1.Params.fromPartial(object.params)
|
|
143
143
|
: undefined;
|
|
144
|
-
message.
|
|
145
|
-
message.
|
|
146
|
-
message.
|
|
144
|
+
message.participants = ((_a = object.participants) === null || _a === void 0 ? void 0 : _a.map((e) => types_1.Participant.fromPartial(e))) || [];
|
|
145
|
+
message.participantSessions = ((_b = object.participantSessions) === null || _b === void 0 ? void 0 : _b.map((e) => types_1.ParticipantSession.fromPartial(e))) || [];
|
|
146
|
+
message.nextParticipantId = (_c = object.nextParticipantId) !== null && _c !== void 0 ? _c : 0;
|
|
147
147
|
return message;
|
|
148
148
|
},
|
|
149
149
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _m0 from "protobufjs/minimal";
|
|
2
|
-
export declare const protobufPackage = "verana.
|
|
2
|
+
export declare const protobufPackage = "verana.pp.v1";
|
|
3
3
|
/** Params defines the parameters for the module. */
|
|
4
4
|
export interface Params {
|
|
5
5
|
validationTermRequestedTimeoutDays: number;
|