@verana-labs/verana-types 0.9.1 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,18 +2,139 @@
2
2
 
3
3
  TypeScript protobuf codecs generated from the Verana blockchain protobufs with `ts-proto`.
4
4
 
5
- ## Generate locally
5
+ ## Overview
6
+
7
+ This package contains TypeScript type definitions and codecs generated from Verana's protobuf definitions. All files in `src/codec/` are **auto-generated** and should not be edited manually.
8
+
9
+ ### Generated Files Location
10
+
11
+ - **Source**: Proto definitions in `proto/verana/**/*.proto`
12
+ - **Generated Output**: `ts-proto/src/codec/**/*.ts`
13
+ - **Generator**: `buf` with `ts-proto` plugin (v1.181.2)
14
+
15
+ All generated files include this header:
16
+ ```typescript
17
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
18
+ ```
19
+
20
+ ## Generating TypeScript Files
21
+
22
+ ### Quick Start (Recommended)
23
+
6
24
  From the repository root:
7
25
 
8
26
  ```bash
27
+ make proto-ts
28
+ ```
29
+
30
+ This command:
31
+ 1. Generates TypeScript files from `.proto` definitions
32
+ 2. Outputs to `ts-proto/src/codec/`
33
+ 3. Builds the TypeScript package
34
+
35
+ ### Manual Generation
36
+
37
+ If you prefer to run the steps manually:
38
+
39
+ ```bash
40
+ # From repository root
9
41
  cd proto
10
- buf generate --template buf.gen.ts.yaml # writes to ../ts-proto/src/codec
42
+ buf generate --template buf.gen.ts.yaml # Generates to ../ts-proto/src/codec
11
43
  cd ../ts-proto
12
- npm install
13
- npm run build # emits dist/ for publishing
44
+ npm install # Install dependencies if needed
45
+ npm run build # Build the package (emits dist/)
46
+ ```
47
+
48
+ ### What Gets Generated
49
+
50
+ The generator creates TypeScript files for:
51
+ - **Verana modules**: `tr`, `cs`, `dd`, `perm`, `td` (Trust Registry, Credential Schema, DID Directory, Permission, Trust Deposit)
52
+ - **Cosmos SDK types**: Base types, queries, messages
53
+ - **Google protobuf types**: Timestamps, durations, etc.
54
+
55
+ Each module includes:
56
+ - `tx.ts` - Transaction messages
57
+ - `query.ts` - Query messages and responses
58
+ - `types.ts` - Type definitions
59
+ - `params.ts` - Parameter types
60
+ - `genesis.ts` - Genesis state types
61
+
62
+ ## When to Regenerate
63
+
64
+ **Always regenerate TypeScript files after:**
65
+
66
+ 1. ✅ Modifying any `.proto` files in `proto/verana/`
67
+ 2. ✅ Adding new message types
68
+ 3. ✅ Changing field types or names
69
+ 4. ✅ Adding new modules
70
+ 5. ✅ Updating proto dependencies
71
+
72
+ **Example workflow:**
73
+
74
+ ```bash
75
+ # 1. Make changes to proto files
76
+ vim proto/verana/tr/v1/tx.proto
77
+
78
+ # 2. Regenerate TypeScript files
79
+ make proto-ts
80
+
81
+ # 3. Verify the changes
82
+ cd ts-proto
83
+ npm run build
84
+
85
+ # 4. Test with the test harness
86
+ cd test
87
+ npm run test:create-tr
88
+ ```
89
+
90
+ ## Configuration
91
+
92
+ The generation is configured in `proto/buf.gen.ts.yaml`:
93
+
94
+ ```yaml
95
+ plugins:
96
+ - plugin: buf.build/community/stephenh-ts-proto:v1.181.2
97
+ out: ../ts-proto/src/codec
98
+ opt:
99
+ - ts_proto_opt=esModuleInterop=true
100
+ - ts_proto_opt=forceLong=long
101
+ - ts_proto_opt=useOptionals=messages
102
+ - ts_proto_opt=snakeToCamel=true
103
+ ```
104
+
105
+ **Options explained:**
106
+ - `esModuleInterop=true` - Enables ES module interop
107
+ - `forceLong=long` - Uses `long` library for 64-bit integers
108
+ - `useOptionals=messages` - Makes message fields optional
109
+ - `snakeToCamel=true` - Converts snake_case to camelCase
110
+
111
+ ## Using Generated Types
112
+
113
+ ### In Tests
114
+
115
+ The test harness in `ts-proto/test/` demonstrates how to use the generated types:
116
+
117
+ ```typescript
118
+ import { MsgCreateTrustRegistry } from "../../../src/codec/verana/tr/v1/tx";
119
+ import { typeUrls } from "../helpers/registry";
120
+
121
+ const msg = {
122
+ typeUrl: typeUrls.MsgCreateTrustRegistry,
123
+ value: MsgCreateTrustRegistry.fromPartial({
124
+ creator: address,
125
+ did: "did:verana:example",
126
+ // ...
127
+ }),
128
+ };
129
+ ```
130
+
131
+ ### In Frontend Applications
132
+
133
+ ```typescript
134
+ import { MsgCreateTrustRegistry } from "@verana-labs/verana-types/codec/verana/tr/v1/tx";
14
135
  ```
15
136
 
16
- You can also use `make proto-ts` once dependencies are installed.
137
+ See `ts-proto/test/README.md` for complete examples.
17
138
 
18
139
  ## Publish
19
140
  1. Bump the version in `package.json` to match the chain tag you are releasing (e.g. `v0.7.0` -> `0.7.0`).
@@ -1,6 +1,6 @@
1
1
  import * as _m0 from "protobufjs/minimal";
2
2
  import { Params } from "./params";
3
- import { PermissionType } from "./types";
3
+ import { OptionalUInt64, PermissionType } from "./types";
4
4
  export declare const protobufPackage = "verana.perm.v1";
5
5
  /** MsgUpdateParams is the Msg/UpdateParams request type. */
6
6
  export interface MsgUpdateParams {
@@ -24,6 +24,12 @@ export interface MsgStartPermissionVP {
24
24
  creator: string;
25
25
  type: PermissionType;
26
26
  validatorPermId: number;
27
+ /** optional: Requested validation_fees for this permission (can be modified by validator) */
28
+ validationFees: OptionalUInt64 | undefined;
29
+ /** optional: Requested issuance_fees for this permission (can be modified by validator) */
30
+ issuanceFees: OptionalUInt64 | undefined;
31
+ /** optional: Requested verification_fees for this permission (can be modified by validator) */
32
+ verificationFees: OptionalUInt64 | undefined;
27
33
  country: string;
28
34
  /** optional */
29
35
  did: string;
@@ -51,6 +57,13 @@ export interface MsgSetPermissionVPToValidated {
51
57
  verificationFees: number;
52
58
  country: string;
53
59
  vpSummaryDigestSri: string;
60
+ /**
61
+ * Fee discount fields (scaled: 0 = 0.0, 10000 = 1.0, range 0-10000)
62
+ * Default to 0 (no discount), maximum 10000 (100% discount)
63
+ */
64
+ issuanceFeeDiscount: number;
65
+ /** Verification fee discount (mandatory, default 0) */
66
+ verificationFeeDiscount: number;
54
67
  }
55
68
  /** MsgSetPermissionVPToValidatedResponse defines the Msg/SetPermissionVPToValidated response type */
56
69
  export interface MsgSetPermissionVPToValidatedResponse {
@@ -153,7 +153,16 @@ exports.MsgUpdateParamsResponse = {
153
153
  },
154
154
  };
155
155
  function createBaseMsgStartPermissionVP() {
156
- return { creator: "", type: 0, validatorPermId: 0, country: "", did: "" };
156
+ return {
157
+ creator: "",
158
+ type: 0,
159
+ validatorPermId: 0,
160
+ validationFees: undefined,
161
+ issuanceFees: undefined,
162
+ verificationFees: undefined,
163
+ country: "",
164
+ did: "",
165
+ };
157
166
  }
158
167
  exports.MsgStartPermissionVP = {
159
168
  encode(message, writer = _m0.Writer.create()) {
@@ -166,6 +175,15 @@ exports.MsgStartPermissionVP = {
166
175
  if (message.validatorPermId !== 0) {
167
176
  writer.uint32(24).uint64(message.validatorPermId);
168
177
  }
178
+ if (message.validationFees !== undefined) {
179
+ types_1.OptionalUInt64.encode(message.validationFees, writer.uint32(50).fork()).ldelim();
180
+ }
181
+ if (message.issuanceFees !== undefined) {
182
+ types_1.OptionalUInt64.encode(message.issuanceFees, writer.uint32(58).fork()).ldelim();
183
+ }
184
+ if (message.verificationFees !== undefined) {
185
+ types_1.OptionalUInt64.encode(message.verificationFees, writer.uint32(66).fork()).ldelim();
186
+ }
169
187
  if (message.country !== "") {
170
188
  writer.uint32(34).string(message.country);
171
189
  }
@@ -199,6 +217,24 @@ exports.MsgStartPermissionVP = {
199
217
  }
200
218
  message.validatorPermId = longToNumber(reader.uint64());
201
219
  continue;
220
+ case 6:
221
+ if (tag !== 50) {
222
+ break;
223
+ }
224
+ message.validationFees = types_1.OptionalUInt64.decode(reader, reader.uint32());
225
+ continue;
226
+ case 7:
227
+ if (tag !== 58) {
228
+ break;
229
+ }
230
+ message.issuanceFees = types_1.OptionalUInt64.decode(reader, reader.uint32());
231
+ continue;
232
+ case 8:
233
+ if (tag !== 66) {
234
+ break;
235
+ }
236
+ message.verificationFees = types_1.OptionalUInt64.decode(reader, reader.uint32());
237
+ continue;
202
238
  case 4:
203
239
  if (tag !== 34) {
204
240
  break;
@@ -224,6 +260,9 @@ exports.MsgStartPermissionVP = {
224
260
  creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
225
261
  type: isSet(object.type) ? (0, types_1.permissionTypeFromJSON)(object.type) : 0,
226
262
  validatorPermId: isSet(object.validatorPermId) ? globalThis.Number(object.validatorPermId) : 0,
263
+ validationFees: isSet(object.validationFees) ? types_1.OptionalUInt64.fromJSON(object.validationFees) : undefined,
264
+ issuanceFees: isSet(object.issuanceFees) ? types_1.OptionalUInt64.fromJSON(object.issuanceFees) : undefined,
265
+ verificationFees: isSet(object.verificationFees) ? types_1.OptionalUInt64.fromJSON(object.verificationFees) : undefined,
227
266
  country: isSet(object.country) ? globalThis.String(object.country) : "",
228
267
  did: isSet(object.did) ? globalThis.String(object.did) : "",
229
268
  };
@@ -239,6 +278,15 @@ exports.MsgStartPermissionVP = {
239
278
  if (message.validatorPermId !== 0) {
240
279
  obj.validatorPermId = Math.round(message.validatorPermId);
241
280
  }
281
+ if (message.validationFees !== undefined) {
282
+ obj.validationFees = types_1.OptionalUInt64.toJSON(message.validationFees);
283
+ }
284
+ if (message.issuanceFees !== undefined) {
285
+ obj.issuanceFees = types_1.OptionalUInt64.toJSON(message.issuanceFees);
286
+ }
287
+ if (message.verificationFees !== undefined) {
288
+ obj.verificationFees = types_1.OptionalUInt64.toJSON(message.verificationFees);
289
+ }
242
290
  if (message.country !== "") {
243
291
  obj.country = message.country;
244
292
  }
@@ -256,6 +304,15 @@ exports.MsgStartPermissionVP = {
256
304
  message.creator = (_a = object.creator) !== null && _a !== void 0 ? _a : "";
257
305
  message.type = (_b = object.type) !== null && _b !== void 0 ? _b : 0;
258
306
  message.validatorPermId = (_c = object.validatorPermId) !== null && _c !== void 0 ? _c : 0;
307
+ message.validationFees = (object.validationFees !== undefined && object.validationFees !== null)
308
+ ? types_1.OptionalUInt64.fromPartial(object.validationFees)
309
+ : undefined;
310
+ message.issuanceFees = (object.issuanceFees !== undefined && object.issuanceFees !== null)
311
+ ? types_1.OptionalUInt64.fromPartial(object.issuanceFees)
312
+ : undefined;
313
+ message.verificationFees = (object.verificationFees !== undefined && object.verificationFees !== null)
314
+ ? types_1.OptionalUInt64.fromPartial(object.verificationFees)
315
+ : undefined;
259
316
  message.country = (_d = object.country) !== null && _d !== void 0 ? _d : "";
260
317
  message.did = (_e = object.did) !== null && _e !== void 0 ? _e : "";
261
318
  return message;
@@ -426,6 +483,8 @@ function createBaseMsgSetPermissionVPToValidated() {
426
483
  verificationFees: 0,
427
484
  country: "",
428
485
  vpSummaryDigestSri: "",
486
+ issuanceFeeDiscount: 0,
487
+ verificationFeeDiscount: 0,
429
488
  };
430
489
  }
431
490
  exports.MsgSetPermissionVPToValidated = {
@@ -454,6 +513,12 @@ exports.MsgSetPermissionVPToValidated = {
454
513
  if (message.vpSummaryDigestSri !== "") {
455
514
  writer.uint32(66).string(message.vpSummaryDigestSri);
456
515
  }
516
+ if (message.issuanceFeeDiscount !== 0) {
517
+ writer.uint32(72).uint64(message.issuanceFeeDiscount);
518
+ }
519
+ if (message.verificationFeeDiscount !== 0) {
520
+ writer.uint32(80).uint64(message.verificationFeeDiscount);
521
+ }
457
522
  return writer;
458
523
  },
459
524
  decode(input, length) {
@@ -511,6 +576,18 @@ exports.MsgSetPermissionVPToValidated = {
511
576
  }
512
577
  message.vpSummaryDigestSri = reader.string();
513
578
  continue;
579
+ case 9:
580
+ if (tag !== 72) {
581
+ break;
582
+ }
583
+ message.issuanceFeeDiscount = longToNumber(reader.uint64());
584
+ continue;
585
+ case 10:
586
+ if (tag !== 80) {
587
+ break;
588
+ }
589
+ message.verificationFeeDiscount = longToNumber(reader.uint64());
590
+ continue;
514
591
  }
515
592
  if ((tag & 7) === 4 || tag === 0) {
516
593
  break;
@@ -529,6 +606,10 @@ exports.MsgSetPermissionVPToValidated = {
529
606
  verificationFees: isSet(object.verificationFees) ? globalThis.Number(object.verificationFees) : 0,
530
607
  country: isSet(object.country) ? globalThis.String(object.country) : "",
531
608
  vpSummaryDigestSri: isSet(object.vpSummaryDigestSri) ? globalThis.String(object.vpSummaryDigestSri) : "",
609
+ issuanceFeeDiscount: isSet(object.issuanceFeeDiscount) ? globalThis.Number(object.issuanceFeeDiscount) : 0,
610
+ verificationFeeDiscount: isSet(object.verificationFeeDiscount)
611
+ ? globalThis.Number(object.verificationFeeDiscount)
612
+ : 0,
532
613
  };
533
614
  },
534
615
  toJSON(message) {
@@ -557,13 +638,19 @@ exports.MsgSetPermissionVPToValidated = {
557
638
  if (message.vpSummaryDigestSri !== "") {
558
639
  obj.vpSummaryDigestSri = message.vpSummaryDigestSri;
559
640
  }
641
+ if (message.issuanceFeeDiscount !== 0) {
642
+ obj.issuanceFeeDiscount = Math.round(message.issuanceFeeDiscount);
643
+ }
644
+ if (message.verificationFeeDiscount !== 0) {
645
+ obj.verificationFeeDiscount = Math.round(message.verificationFeeDiscount);
646
+ }
560
647
  return obj;
561
648
  },
562
649
  create(base) {
563
650
  return exports.MsgSetPermissionVPToValidated.fromPartial(base !== null && base !== void 0 ? base : {});
564
651
  },
565
652
  fromPartial(object) {
566
- var _a, _b, _c, _d, _e, _f, _g, _h;
653
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
567
654
  const message = createBaseMsgSetPermissionVPToValidated();
568
655
  message.creator = (_a = object.creator) !== null && _a !== void 0 ? _a : "";
569
656
  message.id = (_b = object.id) !== null && _b !== void 0 ? _b : 0;
@@ -573,6 +660,8 @@ exports.MsgSetPermissionVPToValidated = {
573
660
  message.verificationFees = (_f = object.verificationFees) !== null && _f !== void 0 ? _f : 0;
574
661
  message.country = (_g = object.country) !== null && _g !== void 0 ? _g : "";
575
662
  message.vpSummaryDigestSri = (_h = object.vpSummaryDigestSri) !== null && _h !== void 0 ? _h : "";
663
+ message.issuanceFeeDiscount = (_j = object.issuanceFeeDiscount) !== null && _j !== void 0 ? _j : 0;
664
+ message.verificationFeeDiscount = (_k = object.verificationFeeDiscount) !== null && _k !== void 0 ? _k : 0;
576
665
  return message;
577
666
  },
578
667
  };
@@ -64,6 +64,13 @@ export interface Permission {
64
64
  vpCurrentDeposit: number;
65
65
  vpSummaryDigestSri: string;
66
66
  vpTermRequested: Date | undefined;
67
+ /**
68
+ * Fee discount fields (scaled: 0 = 0.0, 10000 = 1.0, range 0-10000)
69
+ * Per Issue #94: spec merged exemption and discount into single *_fee_discount field
70
+ */
71
+ issuanceFeeDiscount: number;
72
+ /** Verification fee discount (0-10000, where 10000 = 100% discount) */
73
+ verificationFeeDiscount: number;
67
74
  }
68
75
  export interface PermissionSession {
69
76
  id: string;
@@ -78,6 +85,10 @@ export interface SessionAuthz {
78
85
  beneficiaryPermId: number;
79
86
  walletAgentPermId: number;
80
87
  }
88
+ /** OptionalUInt64 is a wrapper for optional uint64 values */
89
+ export interface OptionalUInt64 {
90
+ value: number;
91
+ }
81
92
  export declare const Permission: {
82
93
  encode(message: Permission, writer?: _m0.Writer): _m0.Writer;
83
94
  decode(input: _m0.Reader | Uint8Array, length?: number): Permission;
@@ -102,6 +113,14 @@ export declare const SessionAuthz: {
102
113
  create<I extends Exact<DeepPartial<SessionAuthz>, I>>(base?: I): SessionAuthz;
103
114
  fromPartial<I extends Exact<DeepPartial<SessionAuthz>, I>>(object: I): SessionAuthz;
104
115
  };
116
+ export declare const OptionalUInt64: {
117
+ encode(message: OptionalUInt64, writer?: _m0.Writer): _m0.Writer;
118
+ decode(input: _m0.Reader | Uint8Array, length?: number): OptionalUInt64;
119
+ fromJSON(object: any): OptionalUInt64;
120
+ toJSON(message: OptionalUInt64): unknown;
121
+ create<I extends Exact<DeepPartial<OptionalUInt64>, I>>(base?: I): OptionalUInt64;
122
+ fromPartial<I extends Exact<DeepPartial<OptionalUInt64>, I>>(object: I): OptionalUInt64;
123
+ };
105
124
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
106
125
  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 {} ? {
107
126
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -38,7 +38,7 @@ var __importStar = (this && this.__importStar) || (function () {
38
38
  };
39
39
  })();
40
40
  Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.SessionAuthz = exports.PermissionSession = exports.Permission = exports.ValidationState = exports.PermissionType = exports.protobufPackage = void 0;
41
+ exports.OptionalUInt64 = exports.SessionAuthz = exports.PermissionSession = exports.Permission = exports.ValidationState = exports.PermissionType = exports.protobufPackage = void 0;
42
42
  exports.permissionTypeFromJSON = permissionTypeFromJSON;
43
43
  exports.permissionTypeToJSON = permissionTypeToJSON;
44
44
  exports.validationStateFromJSON = validationStateFromJSON;
@@ -197,6 +197,8 @@ function createBasePermission() {
197
197
  vpCurrentDeposit: 0,
198
198
  vpSummaryDigestSri: "",
199
199
  vpTermRequested: undefined,
200
+ issuanceFeeDiscount: 0,
201
+ verificationFeeDiscount: 0,
200
202
  };
201
203
  }
202
204
  exports.Permission = {
@@ -303,6 +305,12 @@ exports.Permission = {
303
305
  if (message.vpTermRequested !== undefined) {
304
306
  timestamp_1.Timestamp.encode(toTimestamp(message.vpTermRequested), writer.uint32(274).fork()).ldelim();
305
307
  }
308
+ if (message.issuanceFeeDiscount !== 0) {
309
+ writer.uint32(280).uint64(message.issuanceFeeDiscount);
310
+ }
311
+ if (message.verificationFeeDiscount !== 0) {
312
+ writer.uint32(288).uint64(message.verificationFeeDiscount);
313
+ }
306
314
  return writer;
307
315
  },
308
316
  decode(input, length) {
@@ -516,6 +524,18 @@ exports.Permission = {
516
524
  }
517
525
  message.vpTermRequested = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
518
526
  continue;
527
+ case 35:
528
+ if (tag !== 280) {
529
+ break;
530
+ }
531
+ message.issuanceFeeDiscount = longToNumber(reader.uint64());
532
+ continue;
533
+ case 36:
534
+ if (tag !== 288) {
535
+ break;
536
+ }
537
+ message.verificationFeeDiscount = longToNumber(reader.uint64());
538
+ continue;
519
539
  }
520
540
  if ((tag & 7) === 4 || tag === 0) {
521
541
  break;
@@ -560,6 +580,10 @@ exports.Permission = {
560
580
  vpCurrentDeposit: isSet(object.vpCurrentDeposit) ? globalThis.Number(object.vpCurrentDeposit) : 0,
561
581
  vpSummaryDigestSri: isSet(object.vpSummaryDigestSri) ? globalThis.String(object.vpSummaryDigestSri) : "",
562
582
  vpTermRequested: isSet(object.vpTermRequested) ? fromJsonTimestamp(object.vpTermRequested) : undefined,
583
+ issuanceFeeDiscount: isSet(object.issuanceFeeDiscount) ? globalThis.Number(object.issuanceFeeDiscount) : 0,
584
+ verificationFeeDiscount: isSet(object.verificationFeeDiscount)
585
+ ? globalThis.Number(object.verificationFeeDiscount)
586
+ : 0,
563
587
  };
564
588
  },
565
589
  toJSON(message) {
@@ -666,13 +690,19 @@ exports.Permission = {
666
690
  if (message.vpTermRequested !== undefined) {
667
691
  obj.vpTermRequested = message.vpTermRequested.toISOString();
668
692
  }
693
+ if (message.issuanceFeeDiscount !== 0) {
694
+ obj.issuanceFeeDiscount = Math.round(message.issuanceFeeDiscount);
695
+ }
696
+ if (message.verificationFeeDiscount !== 0) {
697
+ obj.verificationFeeDiscount = Math.round(message.verificationFeeDiscount);
698
+ }
669
699
  return obj;
670
700
  },
671
701
  create(base) {
672
702
  return exports.Permission.fromPartial(base !== null && base !== void 0 ? base : {});
673
703
  },
674
704
  fromPartial(object) {
675
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
705
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
676
706
  const message = createBasePermission();
677
707
  message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
678
708
  message.schemaId = (_b = object.schemaId) !== null && _b !== void 0 ? _b : 0;
@@ -708,6 +738,8 @@ exports.Permission = {
708
738
  message.vpCurrentDeposit = (_7 = object.vpCurrentDeposit) !== null && _7 !== void 0 ? _7 : 0;
709
739
  message.vpSummaryDigestSri = (_8 = object.vpSummaryDigestSri) !== null && _8 !== void 0 ? _8 : "";
710
740
  message.vpTermRequested = (_9 = object.vpTermRequested) !== null && _9 !== void 0 ? _9 : undefined;
741
+ message.issuanceFeeDiscount = (_10 = object.issuanceFeeDiscount) !== null && _10 !== void 0 ? _10 : 0;
742
+ message.verificationFeeDiscount = (_11 = object.verificationFeeDiscount) !== null && _11 !== void 0 ? _11 : 0;
711
743
  return message;
712
744
  },
713
745
  };
@@ -916,6 +948,57 @@ exports.SessionAuthz = {
916
948
  return message;
917
949
  },
918
950
  };
951
+ function createBaseOptionalUInt64() {
952
+ return { value: 0 };
953
+ }
954
+ exports.OptionalUInt64 = {
955
+ encode(message, writer = _m0.Writer.create()) {
956
+ if (message.value !== 0) {
957
+ writer.uint32(8).uint64(message.value);
958
+ }
959
+ return writer;
960
+ },
961
+ decode(input, length) {
962
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
963
+ let end = length === undefined ? reader.len : reader.pos + length;
964
+ const message = createBaseOptionalUInt64();
965
+ while (reader.pos < end) {
966
+ const tag = reader.uint32();
967
+ switch (tag >>> 3) {
968
+ case 1:
969
+ if (tag !== 8) {
970
+ break;
971
+ }
972
+ message.value = longToNumber(reader.uint64());
973
+ continue;
974
+ }
975
+ if ((tag & 7) === 4 || tag === 0) {
976
+ break;
977
+ }
978
+ reader.skipType(tag & 7);
979
+ }
980
+ return message;
981
+ },
982
+ fromJSON(object) {
983
+ return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
984
+ },
985
+ toJSON(message) {
986
+ const obj = {};
987
+ if (message.value !== 0) {
988
+ obj.value = Math.round(message.value);
989
+ }
990
+ return obj;
991
+ },
992
+ create(base) {
993
+ return exports.OptionalUInt64.fromPartial(base !== null && base !== void 0 ? base : {});
994
+ },
995
+ fromPartial(object) {
996
+ var _a;
997
+ const message = createBaseOptionalUInt64();
998
+ message.value = (_a = object.value) !== null && _a !== void 0 ? _a : 0;
999
+ return message;
1000
+ },
1001
+ };
919
1002
  function toTimestamp(date) {
920
1003
  const seconds = Math.trunc(date.getTime() / 1000);
921
1004
  const nanos = (date.getTime() % 1000) * 1000000;
@@ -7,6 +7,10 @@ export interface Params {
7
7
  trustDepositRate: string;
8
8
  walletUserAgentRewardRate: string;
9
9
  userAgentRewardRate: string;
10
+ /** trust_deposit_max_yield_rate is the maximum annualized yield rate (e.g. 0.15 for 15%) */
11
+ trustDepositMaxYieldRate: string;
12
+ /** yield_intermediate_pool is the Bech32 string for the Yield Intermediate Pool module account */
13
+ yieldIntermediatePool: string;
10
14
  }
11
15
  export declare const Params: {
12
16
  encode(message: Params, writer?: _m0.Writer): _m0.Writer;
@@ -49,6 +49,8 @@ function createBaseParams() {
49
49
  trustDepositRate: "",
50
50
  walletUserAgentRewardRate: "",
51
51
  userAgentRewardRate: "",
52
+ trustDepositMaxYieldRate: "",
53
+ yieldIntermediatePool: "",
52
54
  };
53
55
  }
54
56
  exports.Params = {
@@ -68,6 +70,12 @@ exports.Params = {
68
70
  if (message.userAgentRewardRate !== "") {
69
71
  writer.uint32(42).string(message.userAgentRewardRate);
70
72
  }
73
+ if (message.trustDepositMaxYieldRate !== "") {
74
+ writer.uint32(50).string(message.trustDepositMaxYieldRate);
75
+ }
76
+ if (message.yieldIntermediatePool !== "") {
77
+ writer.uint32(58).string(message.yieldIntermediatePool);
78
+ }
71
79
  return writer;
72
80
  },
73
81
  decode(input, length) {
@@ -107,6 +115,18 @@ exports.Params = {
107
115
  }
108
116
  message.userAgentRewardRate = reader.string();
109
117
  continue;
118
+ case 6:
119
+ if (tag !== 50) {
120
+ break;
121
+ }
122
+ message.trustDepositMaxYieldRate = reader.string();
123
+ continue;
124
+ case 7:
125
+ if (tag !== 58) {
126
+ break;
127
+ }
128
+ message.yieldIntermediatePool = reader.string();
129
+ continue;
110
130
  }
111
131
  if ((tag & 7) === 4 || tag === 0) {
112
132
  break;
@@ -128,6 +148,10 @@ exports.Params = {
128
148
  ? globalThis.String(object.walletUserAgentRewardRate)
129
149
  : "",
130
150
  userAgentRewardRate: isSet(object.userAgentRewardRate) ? globalThis.String(object.userAgentRewardRate) : "",
151
+ trustDepositMaxYieldRate: isSet(object.trustDepositMaxYieldRate)
152
+ ? globalThis.String(object.trustDepositMaxYieldRate)
153
+ : "",
154
+ yieldIntermediatePool: isSet(object.yieldIntermediatePool) ? globalThis.String(object.yieldIntermediatePool) : "",
131
155
  };
132
156
  },
133
157
  toJSON(message) {
@@ -147,19 +171,27 @@ exports.Params = {
147
171
  if (message.userAgentRewardRate !== "") {
148
172
  obj.userAgentRewardRate = message.userAgentRewardRate;
149
173
  }
174
+ if (message.trustDepositMaxYieldRate !== "") {
175
+ obj.trustDepositMaxYieldRate = message.trustDepositMaxYieldRate;
176
+ }
177
+ if (message.yieldIntermediatePool !== "") {
178
+ obj.yieldIntermediatePool = message.yieldIntermediatePool;
179
+ }
150
180
  return obj;
151
181
  },
152
182
  create(base) {
153
183
  return exports.Params.fromPartial(base !== null && base !== void 0 ? base : {});
154
184
  },
155
185
  fromPartial(object) {
156
- var _a, _b, _c, _d, _e;
186
+ var _a, _b, _c, _d, _e, _f, _g;
157
187
  const message = createBaseParams();
158
188
  message.trustDepositReclaimBurnRate = (_a = object.trustDepositReclaimBurnRate) !== null && _a !== void 0 ? _a : "";
159
189
  message.trustDepositShareValue = (_b = object.trustDepositShareValue) !== null && _b !== void 0 ? _b : "";
160
190
  message.trustDepositRate = (_c = object.trustDepositRate) !== null && _c !== void 0 ? _c : "";
161
191
  message.walletUserAgentRewardRate = (_d = object.walletUserAgentRewardRate) !== null && _d !== void 0 ? _d : "";
162
192
  message.userAgentRewardRate = (_e = object.userAgentRewardRate) !== null && _e !== void 0 ? _e : "";
193
+ message.trustDepositMaxYieldRate = (_f = object.trustDepositMaxYieldRate) !== null && _f !== void 0 ? _f : "";
194
+ message.yieldIntermediatePool = (_g = object.yieldIntermediatePool) !== null && _g !== void 0 ? _g : "";
163
195
  return message;
164
196
  },
165
197
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verana-labs/verana-types",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "description": "Generated TypeScript protobuf codecs for the Verana blockchain.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "main": "dist/index.js",