@verana-labs/verana-types 0.10.1-dev.2 → 0.10.1-dev.22

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.
Files changed (142) hide show
  1. package/README.md +1 -1
  2. package/dist/amino-converter/co.d.ts +3 -0
  3. package/dist/amino-converter/co.js +164 -0
  4. package/dist/amino-converter/cs.d.ts +7 -0
  5. package/dist/amino-converter/cs.js +169 -0
  6. package/dist/amino-converter/de.d.ts +3 -0
  7. package/dist/amino-converter/de.js +51 -0
  8. package/dist/amino-converter/di.d.ts +2 -0
  9. package/dist/amino-converter/di.js +23 -0
  10. package/dist/amino-converter/ec.d.ts +4 -0
  11. package/dist/amino-converter/ec.js +63 -0
  12. package/dist/amino-converter/gf.d.ts +3 -0
  13. package/dist/amino-converter/gf.js +48 -0
  14. package/dist/amino-converter/group.d.ts +3 -0
  15. package/dist/amino-converter/group.js +91 -0
  16. package/dist/amino-converter/pp.d.ts +13 -0
  17. package/dist/amino-converter/pp.js +347 -0
  18. package/dist/amino-converter/td.d.ts +4 -0
  19. package/dist/amino-converter/td.js +46 -0
  20. package/dist/amino-converter/util/helpers.d.ts +30 -0
  21. package/dist/amino-converter/util/helpers.js +88 -0
  22. package/dist/amino-converter/xr.d.ts +6 -0
  23. package/dist/amino-converter/xr.js +106 -0
  24. package/dist/codec/cosmos/base/v1beta1/coin.d.ts +1 -1
  25. package/dist/codec/google/protobuf/any.d.ts +143 -0
  26. package/dist/codec/{verana/dd/v1/params.js → google/protobuf/any.js} +46 -39
  27. package/dist/codec/google/protobuf/descriptor.d.ts +5 -0
  28. package/dist/codec/google/protobuf/descriptor.js +16 -2
  29. package/dist/codec/google/protobuf/timestamp.d.ts +3 -3
  30. package/dist/codec/verana/{perm/module → co/module/v1}/module.d.ts +5 -2
  31. package/dist/codec/verana/{perm/module → co/module/v1}/module.js +2 -2
  32. package/dist/codec/verana/co/v1/genesis.d.ts +29 -0
  33. package/dist/codec/verana/co/v1/genesis.js +149 -0
  34. package/dist/codec/verana/co/v1/params.d.ts +29 -0
  35. package/dist/codec/verana/co/v1/params.js +81 -0
  36. package/dist/codec/verana/co/v1/query.d.ts +111 -0
  37. package/dist/codec/verana/{dd → co}/v1/query.js +151 -117
  38. package/dist/codec/verana/co/v1/tx.d.ts +172 -0
  39. package/dist/codec/verana/co/v1/tx.js +639 -0
  40. package/dist/codec/verana/co/v1/types.d.ts +60 -0
  41. package/dist/codec/verana/co/v1/types.js +384 -0
  42. package/dist/codec/verana/cs/v1/genesis.d.ts +3 -1
  43. package/dist/codec/verana/cs/v1/genesis.js +42 -3
  44. package/dist/codec/verana/cs/v1/query.d.ts +57 -5
  45. package/dist/codec/verana/cs/v1/query.js +297 -38
  46. package/dist/codec/verana/cs/v1/tx.d.ts +107 -12
  47. package/dist/codec/verana/cs/v1/tx.js +548 -64
  48. package/dist/codec/verana/cs/v1/types.d.ts +75 -16
  49. package/dist/codec/verana/cs/v1/types.js +419 -82
  50. package/dist/codec/verana/de/v1/genesis.d.ts +7 -0
  51. package/dist/codec/verana/de/v1/genesis.js +57 -2
  52. package/dist/codec/verana/de/v1/query.d.ts +109 -3
  53. package/dist/codec/verana/de/v1/query.js +396 -10
  54. package/dist/codec/verana/de/v1/tx.d.ts +22 -10
  55. package/dist/codec/verana/de/v1/tx.js +16 -16
  56. package/dist/codec/verana/de/v1/types.d.ts +104 -21
  57. package/dist/codec/verana/de/v1/types.js +313 -83
  58. package/dist/codec/verana/di/module/v1/module.d.ts +29 -0
  59. package/dist/codec/verana/di/module/v1/module.js +98 -0
  60. package/dist/codec/verana/{dd → di}/v1/genesis.d.ts +5 -4
  61. package/dist/codec/verana/{dd → di}/v1/genesis.js +11 -13
  62. package/dist/codec/verana/di/v1/params.d.ts +24 -0
  63. package/dist/codec/verana/di/v1/params.js +81 -0
  64. package/dist/codec/verana/di/v1/query.d.ts +99 -0
  65. package/dist/codec/verana/di/v1/query.js +349 -0
  66. package/dist/codec/verana/di/v1/tx.d.ts +120 -0
  67. package/dist/codec/verana/di/v1/tx.js +409 -0
  68. package/dist/codec/verana/{dd → ec}/module/module.d.ts +1 -1
  69. package/dist/codec/verana/{dd → ec}/module/module.js +2 -2
  70. package/dist/codec/verana/{tr → ec}/v1/genesis.d.ts +10 -12
  71. package/dist/codec/verana/{tr → ec}/v1/genesis.js +16 -56
  72. package/dist/codec/verana/{tr → ec}/v1/params.d.ts +1 -1
  73. package/dist/codec/verana/{tr → ec}/v1/params.js +2 -2
  74. package/dist/codec/verana/ec/v1/query.d.ts +109 -0
  75. package/dist/codec/verana/{tr → ec}/v1/query.js +69 -71
  76. package/dist/codec/verana/ec/v1/tx.d.ts +152 -0
  77. package/dist/codec/verana/{dd → ec}/v1/tx.js +218 -216
  78. package/dist/codec/verana/ec/v1/types.d.ts +67 -0
  79. package/dist/codec/verana/ec/v1/types.js +422 -0
  80. package/dist/codec/verana/gf/module/v1/module.d.ts +29 -0
  81. package/dist/codec/verana/gf/module/v1/module.js +98 -0
  82. package/dist/codec/verana/gf/v1/genesis.d.ts +31 -0
  83. package/dist/codec/verana/gf/v1/genesis.js +179 -0
  84. package/dist/codec/verana/gf/v1/params.d.ts +28 -0
  85. package/dist/codec/verana/gf/v1/params.js +81 -0
  86. package/dist/codec/verana/gf/v1/query.d.ts +108 -0
  87. package/dist/codec/verana/gf/v1/query.js +462 -0
  88. package/dist/codec/verana/gf/v1/tx.d.ts +142 -0
  89. package/dist/codec/verana/gf/v1/tx.js +486 -0
  90. package/dist/codec/verana/{tr → gf}/v1/types.d.ts +18 -51
  91. package/dist/codec/verana/gf/v1/types.js +477 -0
  92. package/dist/codec/verana/{tr → pp}/module/module.d.ts +1 -1
  93. package/dist/codec/verana/{tr → pp}/module/module.js +2 -2
  94. package/dist/codec/verana/{perm → pp}/v1/genesis.d.ts +9 -9
  95. package/dist/codec/verana/{perm → pp}/v1/genesis.js +26 -26
  96. package/dist/codec/verana/{perm → pp}/v1/params.d.ts +1 -1
  97. package/dist/codec/verana/{perm → pp}/v1/params.js +2 -2
  98. package/dist/codec/verana/pp/v1/query.d.ts +220 -0
  99. package/dist/codec/verana/{perm → pp}/v1/query.js +305 -166
  100. package/dist/codec/verana/pp/v1/tx.d.ts +479 -0
  101. package/dist/codec/verana/pp/v1/tx.js +2574 -0
  102. package/dist/codec/verana/pp/v1/types.d.ts +137 -0
  103. package/dist/codec/verana/{perm → pp}/v1/types.js +312 -354
  104. package/dist/codec/verana/td/v1/genesis.d.ts +13 -3
  105. package/dist/codec/verana/td/v1/genesis.js +151 -35
  106. package/dist/codec/verana/td/v1/params.d.ts +2 -0
  107. package/dist/codec/verana/td/v1/params.js +18 -1
  108. package/dist/codec/verana/td/v1/query.d.ts +1 -1
  109. package/dist/codec/verana/td/v1/query.js +24 -10
  110. package/dist/codec/verana/td/v1/tx.d.ts +26 -40
  111. package/dist/codec/verana/td/v1/tx.js +80 -190
  112. package/dist/codec/verana/td/v1/types.d.ts +8 -8
  113. package/dist/codec/verana/td/v1/types.js +54 -69
  114. package/dist/codec/verana/xr/module/v1/module.d.ts +29 -0
  115. package/dist/codec/verana/xr/module/v1/module.js +98 -0
  116. package/dist/codec/verana/xr/v1/genesis.d.ts +34 -0
  117. package/dist/codec/verana/xr/v1/genesis.js +166 -0
  118. package/dist/codec/verana/{dd → xr}/v1/params.d.ts +4 -3
  119. package/dist/codec/verana/xr/v1/params.js +104 -0
  120. package/dist/codec/verana/xr/v1/query.d.ts +166 -0
  121. package/dist/codec/verana/xr/v1/query.js +817 -0
  122. package/dist/codec/verana/xr/v1/tx.d.ts +284 -0
  123. package/dist/codec/verana/xr/v1/tx.js +1298 -0
  124. package/dist/helpers/aminoConverters.d.ts +10 -32
  125. package/dist/helpers/aminoConverters.js +23 -589
  126. package/dist/index.d.ts +11 -1
  127. package/dist/index.js +11 -1
  128. package/dist/signing.d.ts +75 -0
  129. package/dist/signing.js +147 -0
  130. package/package.json +32 -6
  131. package/dist/codec/verana/dd/v1/query.d.ts +0 -108
  132. package/dist/codec/verana/dd/v1/tx.d.ts +0 -173
  133. package/dist/codec/verana/dd/v1/types.d.ts +0 -30
  134. package/dist/codec/verana/dd/v1/types.js +0 -206
  135. package/dist/codec/verana/perm/v1/query.d.ts +0 -209
  136. package/dist/codec/verana/perm/v1/tx.d.ts +0 -395
  137. package/dist/codec/verana/perm/v1/tx.js +0 -1995
  138. package/dist/codec/verana/perm/v1/types.d.ts +0 -134
  139. package/dist/codec/verana/tr/v1/query.d.ts +0 -118
  140. package/dist/codec/verana/tr/v1/tx.d.ts +0 -255
  141. package/dist/codec/verana/tr/v1/tx.js +0 -956
  142. package/dist/codec/verana/tr/v1/types.js +0 -839
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MsgRevokeExchangeRateAuthorizationAminoConverter = exports.MsgGrantExchangeRateAuthorizationAminoConverter = exports.MsgSetExchangeRateStateAminoConverter = exports.MsgUpdateExchangeRateAminoConverter = exports.MsgCreateExchangeRateAminoConverter = void 0;
4
+ const tx_1 = require("../codec/verana/xr/v1/tx");
5
+ const helpers_1 = require("./util/helpers");
6
+ exports.MsgCreateExchangeRateAminoConverter = {
7
+ aminoType: "verana/x/xr/MsgCreateExchangeRate",
8
+ toAmino: (m) => {
9
+ var _a, _b;
10
+ return (0, helpers_1.clean)({
11
+ authority: m.authority || undefined,
12
+ base_asset_type: (_a = m.baseAssetType) !== null && _a !== void 0 ? _a : 0,
13
+ base_asset: m.baseAsset || undefined,
14
+ quote_asset_type: (_b = m.quoteAssetType) !== null && _b !== void 0 ? _b : 0,
15
+ quote_asset: m.quoteAsset || undefined,
16
+ rate: m.rate || undefined,
17
+ rate_scale: (0, helpers_1.u32ToAmino)(m.rateScale),
18
+ validity_duration: (0, helpers_1.durationToAmino)(m.validityDuration),
19
+ state: m.state ? true : undefined,
20
+ });
21
+ },
22
+ fromAmino: (a) => {
23
+ var _a, _b, _c, _d, _e, _f, _g, _h;
24
+ return tx_1.MsgCreateExchangeRate.fromPartial({
25
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : "",
26
+ baseAssetType: (_b = a.base_asset_type) !== null && _b !== void 0 ? _b : 0,
27
+ baseAsset: (_c = a.base_asset) !== null && _c !== void 0 ? _c : "",
28
+ quoteAssetType: (_d = a.quote_asset_type) !== null && _d !== void 0 ? _d : 0,
29
+ quoteAsset: (_e = a.quote_asset) !== null && _e !== void 0 ? _e : "",
30
+ rate: (_f = a.rate) !== null && _f !== void 0 ? _f : "",
31
+ rateScale: (_g = a.rate_scale) !== null && _g !== void 0 ? _g : 0,
32
+ validityDuration: (0, helpers_1.aminoToDuration)(a.validity_duration),
33
+ state: (_h = a.state) !== null && _h !== void 0 ? _h : false,
34
+ });
35
+ },
36
+ };
37
+ exports.MsgUpdateExchangeRateAminoConverter = {
38
+ aminoType: "verana/x/xr/MsgUpdateExchangeRate",
39
+ toAmino: (m) => (0, helpers_1.clean)({
40
+ operator: m.operator || undefined,
41
+ id: (0, helpers_1.u64ToStr)(m.id),
42
+ rate: m.rate || undefined,
43
+ }),
44
+ fromAmino: (a) => {
45
+ var _a, _b;
46
+ return tx_1.MsgUpdateExchangeRate.fromPartial({
47
+ operator: (_a = a.operator) !== null && _a !== void 0 ? _a : "",
48
+ id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
49
+ rate: (_b = a.rate) !== null && _b !== void 0 ? _b : "",
50
+ });
51
+ },
52
+ };
53
+ exports.MsgSetExchangeRateStateAminoConverter = {
54
+ aminoType: "verana/x/xr/MsgSetExchangeRateState",
55
+ toAmino: (m) => (0, helpers_1.clean)({
56
+ authority: m.authority || undefined,
57
+ id: (0, helpers_1.u64ToStr)(m.id),
58
+ state: m.state ? true : undefined,
59
+ }),
60
+ fromAmino: (a) => {
61
+ var _a, _b;
62
+ return tx_1.MsgSetExchangeRateState.fromPartial({
63
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : "",
64
+ id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
65
+ state: (_b = a.state) !== null && _b !== void 0 ? _b : false,
66
+ });
67
+ },
68
+ };
69
+ exports.MsgGrantExchangeRateAuthorizationAminoConverter = {
70
+ aminoType: "verana/x/xr/MsgGrantXrAuthz",
71
+ toAmino: (m) => (0, helpers_1.clean)({
72
+ authority: m.authority || undefined,
73
+ xr_id: (0, helpers_1.u64ToStr)(m.xrId),
74
+ operator: m.operator || undefined,
75
+ expiration: (0, helpers_1.dateToIsoAmino)(m.expiration),
76
+ min_interval: (0, helpers_1.durationToAmino)(m.minInterval),
77
+ max_deviation_bps: (0, helpers_1.u32ToAmino)(m.maxDeviationBps),
78
+ }),
79
+ fromAmino: (a) => {
80
+ var _a, _b, _c;
81
+ return tx_1.MsgGrantExchangeRateAuthorization.fromPartial({
82
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : "",
83
+ xrId: (0, helpers_1.strToU64)(a.xr_id) != null ? Number((0, helpers_1.strToU64)(a.xr_id).toString()) : 0,
84
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
85
+ expiration: (0, helpers_1.isoToDate)(a.expiration),
86
+ minInterval: (0, helpers_1.aminoToDuration)(a.min_interval),
87
+ maxDeviationBps: (_c = a.max_deviation_bps) !== null && _c !== void 0 ? _c : 0,
88
+ });
89
+ },
90
+ };
91
+ exports.MsgRevokeExchangeRateAuthorizationAminoConverter = {
92
+ aminoType: "verana/x/xr/MsgRevokeXrAuthz",
93
+ toAmino: (m) => (0, helpers_1.clean)({
94
+ authority: m.authority || undefined,
95
+ xr_id: (0, helpers_1.u64ToStr)(m.xrId),
96
+ operator: m.operator || undefined,
97
+ }),
98
+ fromAmino: (a) => {
99
+ var _a, _b;
100
+ return tx_1.MsgRevokeExchangeRateAuthorization.fromPartial({
101
+ authority: (_a = a.authority) !== null && _a !== void 0 ? _a : "",
102
+ xrId: (0, helpers_1.strToU64)(a.xr_id) != null ? Number((0, helpers_1.strToU64)(a.xr_id).toString()) : 0,
103
+ operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
104
+ });
105
+ },
106
+ };
@@ -13,7 +13,7 @@ export interface Coin {
13
13
  /**
14
14
  * DecCoin defines a token with a denomination and a decimal amount.
15
15
  *
16
- * NOTE: The amount field is an Dec which implements the custom method
16
+ * NOTE: The amount field is a Dec which implements the custom method
17
17
  * signatures required by gogoproto.
18
18
  */
19
19
  export interface DecCoin {
@@ -0,0 +1,143 @@
1
+ import * as _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "google.protobuf";
3
+ /**
4
+ * `Any` contains an arbitrary serialized protocol buffer message along with a
5
+ * URL that describes the type of the serialized message.
6
+ *
7
+ * Protobuf library provides support to pack/unpack Any values in the form
8
+ * of utility functions or additional generated methods of the Any type.
9
+ *
10
+ * Example 1: Pack and unpack a message in C++.
11
+ *
12
+ * Foo foo = ...;
13
+ * Any any;
14
+ * any.PackFrom(foo);
15
+ * ...
16
+ * if (any.UnpackTo(&foo)) {
17
+ * ...
18
+ * }
19
+ *
20
+ * Example 2: Pack and unpack a message in Java.
21
+ *
22
+ * Foo foo = ...;
23
+ * Any any = Any.pack(foo);
24
+ * ...
25
+ * if (any.is(Foo.class)) {
26
+ * foo = any.unpack(Foo.class);
27
+ * }
28
+ * // or ...
29
+ * if (any.isSameTypeAs(Foo.getDefaultInstance())) {
30
+ * foo = any.unpack(Foo.getDefaultInstance());
31
+ * }
32
+ *
33
+ * Example 3: Pack and unpack a message in Python.
34
+ *
35
+ * foo = Foo(...)
36
+ * any = Any()
37
+ * any.Pack(foo)
38
+ * ...
39
+ * if any.Is(Foo.DESCRIPTOR):
40
+ * any.Unpack(foo)
41
+ * ...
42
+ *
43
+ * Example 4: Pack and unpack a message in Go
44
+ *
45
+ * foo := &pb.Foo{...}
46
+ * any, err := anypb.New(foo)
47
+ * if err != nil {
48
+ * ...
49
+ * }
50
+ * ...
51
+ * foo := &pb.Foo{}
52
+ * if err := any.UnmarshalTo(foo); err != nil {
53
+ * ...
54
+ * }
55
+ *
56
+ * The pack methods provided by protobuf library will by default use
57
+ * 'type.googleapis.com/full.type.name' as the type URL and the unpack
58
+ * methods only use the fully qualified type name after the last '/'
59
+ * in the type URL, for example "foo.bar.com/x/y.z" will yield type
60
+ * name "y.z".
61
+ *
62
+ * JSON
63
+ * ====
64
+ * The JSON representation of an `Any` value uses the regular
65
+ * representation of the deserialized, embedded message, with an
66
+ * additional field `@type` which contains the type URL. Example:
67
+ *
68
+ * package google.profile;
69
+ * message Person {
70
+ * string first_name = 1;
71
+ * string last_name = 2;
72
+ * }
73
+ *
74
+ * {
75
+ * "@type": "type.googleapis.com/google.profile.Person",
76
+ * "firstName": <string>,
77
+ * "lastName": <string>
78
+ * }
79
+ *
80
+ * If the embedded message type is well-known and has a custom JSON
81
+ * representation, that representation will be embedded adding a field
82
+ * `value` which holds the custom JSON in addition to the `@type`
83
+ * field. Example (for message [google.protobuf.Duration][]):
84
+ *
85
+ * {
86
+ * "@type": "type.googleapis.com/google.protobuf.Duration",
87
+ * "value": "1.212s"
88
+ * }
89
+ */
90
+ export interface Any {
91
+ /**
92
+ * A URL/resource name that uniquely identifies the type of the serialized
93
+ * protocol buffer message. This string must contain at least
94
+ * one "/" character. The last segment of the URL's path must represent
95
+ * the fully qualified name of the type (as in
96
+ * `path/google.protobuf.Duration`). The name should be in a canonical form
97
+ * (e.g., leading "." is not accepted).
98
+ *
99
+ * In practice, teams usually precompile into the binary all types that they
100
+ * expect it to use in the context of Any. However, for URLs which use the
101
+ * scheme `http`, `https`, or no scheme, one can optionally set up a type
102
+ * server that maps type URLs to message definitions as follows:
103
+ *
104
+ * * If no scheme is provided, `https` is assumed.
105
+ * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
106
+ * value in binary format, or produce an error.
107
+ * * Applications are allowed to cache lookup results based on the
108
+ * URL, or have them precompiled into a binary to avoid any
109
+ * lookup. Therefore, binary compatibility needs to be preserved
110
+ * on changes to types. (Use versioned type names to manage
111
+ * breaking changes.)
112
+ *
113
+ * Note: this functionality is not currently available in the official
114
+ * protobuf release, and it is not used for type URLs beginning with
115
+ * type.googleapis.com. As of May 2023, there are no widely used type server
116
+ * implementations and no plans to implement one.
117
+ *
118
+ * Schemes other than `http`, `https` (or the empty scheme) might be
119
+ * used with implementation specific semantics.
120
+ */
121
+ typeUrl: string;
122
+ /** Must be a valid serialized protocol buffer of the above specified type. */
123
+ value: Uint8Array;
124
+ }
125
+ export declare const Any: {
126
+ encode(message: Any, writer?: _m0.Writer): _m0.Writer;
127
+ decode(input: _m0.Reader | Uint8Array, length?: number): Any;
128
+ fromJSON(object: any): Any;
129
+ toJSON(message: Any): unknown;
130
+ create<I extends Exact<DeepPartial<Any>, I>>(base?: I): Any;
131
+ fromPartial<I extends Exact<DeepPartial<Any>, I>>(object: I): Any;
132
+ };
133
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
134
+ 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 {} ? {
135
+ [K in keyof T]?: DeepPartial<T[K]>;
136
+ } : Partial<T>;
137
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
138
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
139
+ [K in keyof P]: Exact<P[K], I[K]>;
140
+ } & {
141
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
142
+ };
143
+ export {};
@@ -3,7 +3,7 @@
3
3
  // versions:
4
4
  // protoc-gen-ts_proto v1.181.2
5
5
  // protoc unknown
6
- // source: verana/dd/v1/params.proto
6
+ // source: google/protobuf/any.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);
@@ -38,42 +38,41 @@ var __importStar = (this && this.__importStar) || (function () {
38
38
  };
39
39
  })();
40
40
  Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.Params = exports.protobufPackage = void 0;
41
+ exports.Any = exports.protobufPackage = void 0;
42
42
  /* eslint-disable */
43
43
  const _m0 = __importStar(require("protobufjs/minimal"));
44
- const Long = require("long");
45
- exports.protobufPackage = "verana.dd.v1";
46
- function createBaseParams() {
47
- return { didDirectoryTrustDeposit: 0, didDirectoryGracePeriod: 0 };
44
+ exports.protobufPackage = "google.protobuf";
45
+ function createBaseAny() {
46
+ return { typeUrl: "", value: new Uint8Array(0) };
48
47
  }
49
- exports.Params = {
48
+ exports.Any = {
50
49
  encode(message, writer = _m0.Writer.create()) {
51
- if (message.didDirectoryTrustDeposit !== 0) {
52
- writer.uint32(8).uint64(message.didDirectoryTrustDeposit);
50
+ if (message.typeUrl !== "") {
51
+ writer.uint32(10).string(message.typeUrl);
53
52
  }
54
- if (message.didDirectoryGracePeriod !== 0) {
55
- writer.uint32(16).uint64(message.didDirectoryGracePeriod);
53
+ if (message.value.length !== 0) {
54
+ writer.uint32(18).bytes(message.value);
56
55
  }
57
56
  return writer;
58
57
  },
59
58
  decode(input, length) {
60
59
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
61
60
  let end = length === undefined ? reader.len : reader.pos + length;
62
- const message = createBaseParams();
61
+ const message = createBaseAny();
63
62
  while (reader.pos < end) {
64
63
  const tag = reader.uint32();
65
64
  switch (tag >>> 3) {
66
65
  case 1:
67
- if (tag !== 8) {
66
+ if (tag !== 10) {
68
67
  break;
69
68
  }
70
- message.didDirectoryTrustDeposit = longToNumber(reader.uint64());
69
+ message.typeUrl = reader.string();
71
70
  continue;
72
71
  case 2:
73
- if (tag !== 16) {
72
+ if (tag !== 18) {
74
73
  break;
75
74
  }
76
- message.didDirectoryGracePeriod = longToNumber(reader.uint64());
75
+ message.value = reader.bytes();
77
76
  continue;
78
77
  }
79
78
  if ((tag & 7) === 4 || tag === 0) {
@@ -85,47 +84,55 @@ exports.Params = {
85
84
  },
86
85
  fromJSON(object) {
87
86
  return {
88
- didDirectoryTrustDeposit: isSet(object.didDirectoryTrustDeposit)
89
- ? globalThis.Number(object.didDirectoryTrustDeposit)
90
- : 0,
91
- didDirectoryGracePeriod: isSet(object.didDirectoryGracePeriod)
92
- ? globalThis.Number(object.didDirectoryGracePeriod)
93
- : 0,
87
+ typeUrl: isSet(object.typeUrl) ? globalThis.String(object.typeUrl) : "",
88
+ value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
94
89
  };
95
90
  },
96
91
  toJSON(message) {
97
92
  const obj = {};
98
- if (message.didDirectoryTrustDeposit !== 0) {
99
- obj.didDirectoryTrustDeposit = Math.round(message.didDirectoryTrustDeposit);
93
+ if (message.typeUrl !== "") {
94
+ obj.typeUrl = message.typeUrl;
100
95
  }
101
- if (message.didDirectoryGracePeriod !== 0) {
102
- obj.didDirectoryGracePeriod = Math.round(message.didDirectoryGracePeriod);
96
+ if (message.value.length !== 0) {
97
+ obj.value = base64FromBytes(message.value);
103
98
  }
104
99
  return obj;
105
100
  },
106
101
  create(base) {
107
- return exports.Params.fromPartial(base !== null && base !== void 0 ? base : {});
102
+ return exports.Any.fromPartial(base !== null && base !== void 0 ? base : {});
108
103
  },
109
104
  fromPartial(object) {
110
105
  var _a, _b;
111
- const message = createBaseParams();
112
- message.didDirectoryTrustDeposit = (_a = object.didDirectoryTrustDeposit) !== null && _a !== void 0 ? _a : 0;
113
- message.didDirectoryGracePeriod = (_b = object.didDirectoryGracePeriod) !== null && _b !== void 0 ? _b : 0;
106
+ const message = createBaseAny();
107
+ message.typeUrl = (_a = object.typeUrl) !== null && _a !== void 0 ? _a : "";
108
+ message.value = (_b = object.value) !== null && _b !== void 0 ? _b : new Uint8Array(0);
114
109
  return message;
115
110
  },
116
111
  };
117
- function longToNumber(long) {
118
- if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
119
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
112
+ function bytesFromBase64(b64) {
113
+ if (globalThis.Buffer) {
114
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
120
115
  }
121
- if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
122
- throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
116
+ else {
117
+ const bin = globalThis.atob(b64);
118
+ const arr = new Uint8Array(bin.length);
119
+ for (let i = 0; i < bin.length; ++i) {
120
+ arr[i] = bin.charCodeAt(i);
121
+ }
122
+ return arr;
123
123
  }
124
- return long.toNumber();
125
124
  }
126
- if (_m0.util.Long !== Long) {
127
- _m0.util.Long = Long;
128
- _m0.configure();
125
+ function base64FromBytes(arr) {
126
+ if (globalThis.Buffer) {
127
+ return globalThis.Buffer.from(arr).toString("base64");
128
+ }
129
+ else {
130
+ const bin = [];
131
+ arr.forEach((byte) => {
132
+ bin.push(globalThis.String.fromCharCode(byte));
133
+ });
134
+ return globalThis.btoa(bin.join(""));
135
+ }
129
136
  }
130
137
  function isSet(value) {
131
138
  return value !== null && value !== undefined;
@@ -812,6 +812,11 @@ export interface FieldOptions_FeatureSupport {
812
812
  * not be able to override it.
813
813
  */
814
814
  editionRemoved?: Edition | undefined;
815
+ /**
816
+ * The removal error text if this feature is used after the edition it was
817
+ * removed in.
818
+ */
819
+ removalError?: string | undefined;
815
820
  }
816
821
  export interface OneofOptions {
817
822
  /**
@@ -3702,7 +3702,7 @@ exports.FieldOptions_EditionDefault = {
3702
3702
  },
3703
3703
  };
3704
3704
  function createBaseFieldOptions_FeatureSupport() {
3705
- return { editionIntroduced: 0, editionDeprecated: 0, deprecationWarning: "", editionRemoved: 0 };
3705
+ return { editionIntroduced: 0, editionDeprecated: 0, deprecationWarning: "", editionRemoved: 0, removalError: "" };
3706
3706
  }
3707
3707
  exports.FieldOptions_FeatureSupport = {
3708
3708
  encode(message, writer = _m0.Writer.create()) {
@@ -3718,6 +3718,9 @@ exports.FieldOptions_FeatureSupport = {
3718
3718
  if (message.editionRemoved !== undefined && message.editionRemoved !== 0) {
3719
3719
  writer.uint32(32).int32(message.editionRemoved);
3720
3720
  }
3721
+ if (message.removalError !== undefined && message.removalError !== "") {
3722
+ writer.uint32(42).string(message.removalError);
3723
+ }
3721
3724
  return writer;
3722
3725
  },
3723
3726
  decode(input, length) {
@@ -3751,6 +3754,12 @@ exports.FieldOptions_FeatureSupport = {
3751
3754
  }
3752
3755
  message.editionRemoved = reader.int32();
3753
3756
  continue;
3757
+ case 5:
3758
+ if (tag !== 42) {
3759
+ break;
3760
+ }
3761
+ message.removalError = reader.string();
3762
+ continue;
3754
3763
  }
3755
3764
  if ((tag & 7) === 4 || tag === 0) {
3756
3765
  break;
@@ -3765,6 +3774,7 @@ exports.FieldOptions_FeatureSupport = {
3765
3774
  editionDeprecated: isSet(object.editionDeprecated) ? editionFromJSON(object.editionDeprecated) : 0,
3766
3775
  deprecationWarning: isSet(object.deprecationWarning) ? globalThis.String(object.deprecationWarning) : "",
3767
3776
  editionRemoved: isSet(object.editionRemoved) ? editionFromJSON(object.editionRemoved) : 0,
3777
+ removalError: isSet(object.removalError) ? globalThis.String(object.removalError) : "",
3768
3778
  };
3769
3779
  },
3770
3780
  toJSON(message) {
@@ -3781,18 +3791,22 @@ exports.FieldOptions_FeatureSupport = {
3781
3791
  if (message.editionRemoved !== undefined && message.editionRemoved !== 0) {
3782
3792
  obj.editionRemoved = editionToJSON(message.editionRemoved);
3783
3793
  }
3794
+ if (message.removalError !== undefined && message.removalError !== "") {
3795
+ obj.removalError = message.removalError;
3796
+ }
3784
3797
  return obj;
3785
3798
  },
3786
3799
  create(base) {
3787
3800
  return exports.FieldOptions_FeatureSupport.fromPartial(base !== null && base !== void 0 ? base : {});
3788
3801
  },
3789
3802
  fromPartial(object) {
3790
- var _a, _b, _c, _d;
3803
+ var _a, _b, _c, _d, _e;
3791
3804
  const message = createBaseFieldOptions_FeatureSupport();
3792
3805
  message.editionIntroduced = (_a = object.editionIntroduced) !== null && _a !== void 0 ? _a : 0;
3793
3806
  message.editionDeprecated = (_b = object.editionDeprecated) !== null && _b !== void 0 ? _b : 0;
3794
3807
  message.deprecationWarning = (_c = object.deprecationWarning) !== null && _c !== void 0 ? _c : "";
3795
3808
  message.editionRemoved = (_d = object.editionRemoved) !== null && _d !== void 0 ? _d : 0;
3809
+ message.removalError = (_e = object.removalError) !== null && _e !== void 0 ? _e : "";
3796
3810
  return message;
3797
3811
  },
3798
3812
  };
@@ -73,8 +73,8 @@ export declare const protobufPackage = "google.protobuf";
73
73
  * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
74
74
  * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
75
75
  * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
76
- * is required. A proto3 JSON serializer should always use UTC (as indicated by
77
- * "Z") when printing the Timestamp type and a proto3 JSON parser should be
76
+ * is required. A ProtoJSON serializer should always use UTC (as indicated by
77
+ * "Z") when printing the Timestamp type and a ProtoJSON parser should be
78
78
  * able to accept both UTC and other timezones (as indicated by an offset).
79
79
  *
80
80
  * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
@@ -94,7 +94,7 @@ export declare const protobufPackage = "google.protobuf";
94
94
  export interface Timestamp {
95
95
  /**
96
96
  * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
97
- * be between -315576000000 and 315576000000 inclusive (which corresponds to
97
+ * be between -62135596800 and 253402300799 inclusive (which corresponds to
98
98
  * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
99
99
  */
100
100
  seconds: number;
@@ -1,8 +1,11 @@
1
1
  import * as _m0 from "protobufjs/minimal";
2
- export declare const protobufPackage = "verana.perm.module";
2
+ export declare const protobufPackage = "verana.co.module.v1";
3
3
  /** Module is the config object for the module. */
4
4
  export interface Module {
5
- /** authority defines the custom module authority. If not set, defaults to the governance module. */
5
+ /**
6
+ * authority defines the custom module authority.
7
+ * If not set, defaults to the governance module.
8
+ */
6
9
  authority: string;
7
10
  }
8
11
  export declare const Module: {
@@ -3,7 +3,7 @@
3
3
  // versions:
4
4
  // protoc-gen-ts_proto v1.181.2
5
5
  // protoc unknown
6
- // source: verana/perm/module/module.proto
6
+ // source: verana/co/module/v1/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.perm.module";
44
+ exports.protobufPackage = "verana.co.module.v1";
45
45
  function createBaseModule() {
46
46
  return { authority: "" };
47
47
  }
@@ -0,0 +1,29 @@
1
+ import * as _m0 from "protobufjs/minimal";
2
+ import { Params } from "./params";
3
+ import { Corporation } from "./types";
4
+ export declare const protobufPackage = "verana.co.v1";
5
+ /** GenesisState defines the co module's genesis state. */
6
+ export interface GenesisState {
7
+ params: Params | undefined;
8
+ corporations: Corporation[];
9
+ corporationCounter: number;
10
+ }
11
+ export declare const GenesisState: {
12
+ encode(message: GenesisState, writer?: _m0.Writer): _m0.Writer;
13
+ decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState;
14
+ fromJSON(object: any): GenesisState;
15
+ toJSON(message: GenesisState): unknown;
16
+ create<I extends Exact<DeepPartial<GenesisState>, I>>(base?: I): GenesisState;
17
+ fromPartial<I extends Exact<DeepPartial<GenesisState>, I>>(object: I): GenesisState;
18
+ };
19
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
20
+ 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 {} ? {
21
+ [K in keyof T]?: DeepPartial<T[K]>;
22
+ } : Partial<T>;
23
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
24
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
25
+ [K in keyof P]: Exact<P[K], I[K]>;
26
+ } & {
27
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
28
+ };
29
+ export {};