@sparkdreamnft/sparkdreamjs 0.0.45 → 0.0.47

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 (194) hide show
  1. package/akash/bundle.d.ts +134 -134
  2. package/akash/bundle.js +150 -150
  3. package/amino-schema.d.ts +5741 -0
  4. package/amino-schema.js +8 -0
  5. package/chain-amino.d.ts +61 -0
  6. package/chain-amino.js +670 -0
  7. package/cosmos/bundle.d.ts +160 -160
  8. package/cosmos/bundle.js +182 -182
  9. package/esm/akash/bundle.js +150 -150
  10. package/esm/amino-schema.js +5 -0
  11. package/esm/chain-amino.js +665 -0
  12. package/esm/cosmos/bundle.js +182 -182
  13. package/esm/ibc/bundle.js +116 -116
  14. package/esm/nested-amino.js +12 -4
  15. package/esm/sparkdream/artifact/v1/genesis.js +217 -3
  16. package/esm/sparkdream/artifact/v1/params.js +146 -2
  17. package/esm/sparkdream/artifact/v1/query.js +3767 -5
  18. package/esm/sparkdream/artifact/v1/query.lcd.js +173 -0
  19. package/esm/sparkdream/artifact/v1/query.rpc.Query.js +195 -1
  20. package/esm/sparkdream/artifact/v1/tx.amino.js +16 -158
  21. package/esm/sparkdream/artifact/v1/tx.js +7498 -5
  22. package/esm/sparkdream/artifact/v1/tx.registry.js +704 -2
  23. package/esm/sparkdream/artifact/v1/tx.rpc.msg.js +241 -1
  24. package/esm/sparkdream/artifact/v1/types.js +4312 -1120
  25. package/esm/sparkdream/blog/v1/tx.amino.js +15 -115
  26. package/esm/sparkdream/bundle.js +329 -291
  27. package/esm/sparkdream/client.js +5 -2
  28. package/esm/sparkdream/collect/v1/tx.amino.js +15 -239
  29. package/esm/sparkdream/commons/v1/tx.amino.js +12 -226
  30. package/esm/sparkdream/commons/v1/tx.js +25 -1
  31. package/esm/sparkdream/ecosystem/v1/tx.amino.js +15 -26
  32. package/esm/sparkdream/federation/v1/tx.amino.js +16 -128
  33. package/esm/sparkdream/forum/v1/tx.amino.js +15 -211
  34. package/esm/sparkdream/futarchy/v1/tx.amino.js +16 -38
  35. package/esm/sparkdream/guardian/v1/tx.amino.js +17 -8
  36. package/esm/sparkdream/lcd.js +5 -0
  37. package/esm/sparkdream/name/v1/tx.amino.js +16 -63
  38. package/esm/sparkdream/rep/v1/genesis.js +74 -1
  39. package/esm/sparkdream/rep/v1/member.js +110 -1
  40. package/esm/sparkdream/rep/v1/migration.js +957 -0
  41. package/esm/sparkdream/rep/v1/params.js +181 -1
  42. package/esm/sparkdream/rep/v1/query.js +1060 -0
  43. package/esm/sparkdream/rep/v1/query.lcd.js +48 -0
  44. package/esm/sparkdream/rep/v1/query.rpc.Query.js +65 -1
  45. package/esm/sparkdream/rep/v1/tx.amino.js +12 -414
  46. package/esm/sparkdream/rep/v1/tx.js +1741 -1
  47. package/esm/sparkdream/rep/v1/tx.registry.js +200 -2
  48. package/esm/sparkdream/rep/v1/tx.rpc.msg.js +67 -1
  49. package/esm/sparkdream/reveal/v1/tx.amino.js +15 -73
  50. package/esm/sparkdream/rpc.query.js +3 -0
  51. package/esm/sparkdream/rpc.tx.js +3 -0
  52. package/esm/sparkdream/season/v1/tx.amino.js +16 -218
  53. package/esm/sparkdream/service/v1/tx.amino.js +16 -78
  54. package/esm/sparkdream/session/v1/tx.amino.js +16 -271
  55. package/esm/sparkdream/session/v1/tx.js +38 -2
  56. package/esm/sparkdream/shield/v1/tx.amino.js +15 -80
  57. package/esm/sparkdream/sparkdream/v1/tx.amino.js +16 -8
  58. package/esm/sparkdream/split/v1/tx.amino.js +16 -8
  59. package/esm/sparkdream/vault/module/v1/module.js +71 -0
  60. package/esm/sparkdream/vault/v1/genesis.js +104 -0
  61. package/esm/sparkdream/vault/v1/params.js +90 -0
  62. package/esm/sparkdream/vault/v1/query.js +1535 -0
  63. package/esm/sparkdream/vault/v1/query.lcd.js +100 -0
  64. package/esm/sparkdream/vault/v1/query.rpc.Query.js +111 -0
  65. package/esm/sparkdream/vault/v1/tx.amino.js +18 -0
  66. package/esm/sparkdream/vault/v1/tx.js +1393 -0
  67. package/esm/sparkdream/vault/v1/tx.registry.js +159 -0
  68. package/esm/sparkdream/vault/v1/tx.rpc.msg.js +60 -0
  69. package/esm/sparkdream/vault/v1/vault.js +163 -0
  70. package/esm/sparkdream/vault/v1/vault_proposal.js +277 -0
  71. package/esm/sparkdream/vault/v1/vault_signer.js +85 -0
  72. package/esm/tendermint/bundle.js +20 -20
  73. package/ibc/bundle.d.ts +99 -99
  74. package/ibc/bundle.js +116 -116
  75. package/nested-amino.d.ts +7 -2
  76. package/nested-amino.js +13 -4
  77. package/package.json +1 -13
  78. package/sparkdream/artifact/v1/genesis.d.ts +37 -4
  79. package/sparkdream/artifact/v1/genesis.js +216 -2
  80. package/sparkdream/artifact/v1/params.d.ts +92 -0
  81. package/sparkdream/artifact/v1/params.js +146 -2
  82. package/sparkdream/artifact/v1/query.d.ts +2373 -168
  83. package/sparkdream/artifact/v1/query.js +3768 -5
  84. package/sparkdream/artifact/v1/query.lcd.d.ts +22 -1
  85. package/sparkdream/artifact/v1/query.lcd.js +173 -0
  86. package/sparkdream/artifact/v1/query.rpc.Query.d.ts +98 -1
  87. package/sparkdream/artifact/v1/query.rpc.Query.js +194 -0
  88. package/sparkdream/artifact/v1/tx.amino.d.ts +1 -158
  89. package/sparkdream/artifact/v1/tx.amino.js +49 -158
  90. package/sparkdream/artifact/v1/tx.d.ts +5188 -930
  91. package/sparkdream/artifact/v1/tx.js +7499 -5
  92. package/sparkdream/artifact/v1/tx.registry.d.ts +469 -1
  93. package/sparkdream/artifact/v1/tx.registry.js +703 -1
  94. package/sparkdream/artifact/v1/tx.rpc.msg.d.ts +136 -1
  95. package/sparkdream/artifact/v1/tx.rpc.msg.js +240 -0
  96. package/sparkdream/artifact/v1/types.d.ts +1797 -25
  97. package/sparkdream/artifact/v1/types.js +4322 -1121
  98. package/sparkdream/blog/v1/tx.amino.d.ts +1 -83
  99. package/sparkdream/blog/v1/tx.amino.js +50 -117
  100. package/sparkdream/bundle.d.ts +12983 -10912
  101. package/sparkdream/bundle.js +329 -291
  102. package/sparkdream/client.d.ts +1 -1629
  103. package/sparkdream/client.js +5 -2
  104. package/sparkdream/collect/v1/tx.amino.d.ts +1 -138
  105. package/sparkdream/collect/v1/tx.amino.js +50 -241
  106. package/sparkdream/commons/v1/tx.amino.d.ts +1 -103
  107. package/sparkdream/commons/v1/tx.amino.js +49 -230
  108. package/sparkdream/commons/v1/tx.d.ts +18 -0
  109. package/sparkdream/commons/v1/tx.js +25 -1
  110. package/sparkdream/ecosystem/v1/tx.amino.d.ts +1 -13
  111. package/sparkdream/ecosystem/v1/tx.amino.js +50 -28
  112. package/sparkdream/federation/v1/tx.amino.d.ts +1 -128
  113. package/sparkdream/federation/v1/tx.amino.js +49 -128
  114. package/sparkdream/forum/v1/tx.amino.d.ts +1 -183
  115. package/sparkdream/forum/v1/tx.amino.js +50 -213
  116. package/sparkdream/futarchy/v1/tx.amino.d.ts +1 -38
  117. package/sparkdream/futarchy/v1/tx.amino.js +49 -38
  118. package/sparkdream/guardian/v1/tx.amino.d.ts +2 -8
  119. package/sparkdream/guardian/v1/tx.amino.js +52 -9
  120. package/sparkdream/lcd.d.ts +3 -0
  121. package/sparkdream/lcd.js +5 -0
  122. package/sparkdream/name/v1/tx.amino.d.ts +1 -63
  123. package/sparkdream/name/v1/tx.amino.js +49 -63
  124. package/sparkdream/rep/v1/genesis.d.ts +19 -0
  125. package/sparkdream/rep/v1/genesis.js +74 -1
  126. package/sparkdream/rep/v1/member.d.ts +92 -0
  127. package/sparkdream/rep/v1/member.js +110 -1
  128. package/sparkdream/rep/v1/migration.d.ts +587 -0
  129. package/sparkdream/rep/v1/migration.js +964 -0
  130. package/sparkdream/rep/v1/params.d.ts +174 -0
  131. package/sparkdream/rep/v1/params.js +181 -1
  132. package/sparkdream/rep/v1/query.d.ts +679 -0
  133. package/sparkdream/rep/v1/query.js +1061 -1
  134. package/sparkdream/rep/v1/query.lcd.d.ts +8 -1
  135. package/sparkdream/rep/v1/query.lcd.js +48 -0
  136. package/sparkdream/rep/v1/query.rpc.Query.d.ts +32 -1
  137. package/sparkdream/rep/v1/query.rpc.Query.js +64 -0
  138. package/sparkdream/rep/v1/tx.amino.d.ts +1 -283
  139. package/sparkdream/rep/v1/tx.amino.js +47 -416
  140. package/sparkdream/rep/v1/tx.d.ts +1185 -0
  141. package/sparkdream/rep/v1/tx.js +1742 -2
  142. package/sparkdream/rep/v1/tx.registry.d.ts +133 -1
  143. package/sparkdream/rep/v1/tx.registry.js +199 -1
  144. package/sparkdream/rep/v1/tx.rpc.msg.d.ts +34 -1
  145. package/sparkdream/rep/v1/tx.rpc.msg.js +66 -0
  146. package/sparkdream/reveal/v1/tx.amino.d.ts +1 -53
  147. package/sparkdream/reveal/v1/tx.amino.js +50 -75
  148. package/sparkdream/rpc.query.d.ts +42 -0
  149. package/sparkdream/rpc.query.js +3 -0
  150. package/sparkdream/rpc.tx.d.ts +3 -0
  151. package/sparkdream/rpc.tx.js +3 -0
  152. package/sparkdream/season/v1/tx.amino.d.ts +1 -218
  153. package/sparkdream/season/v1/tx.amino.js +49 -218
  154. package/sparkdream/service/v1/tx.amino.d.ts +1 -78
  155. package/sparkdream/service/v1/tx.amino.js +49 -78
  156. package/sparkdream/session/v1/tx.amino.d.ts +1 -93
  157. package/sparkdream/session/v1/tx.amino.js +48 -270
  158. package/sparkdream/session/v1/tx.d.ts +30 -0
  159. package/sparkdream/session/v1/tx.js +38 -2
  160. package/sparkdream/shield/v1/tx.amino.d.ts +1 -28
  161. package/sparkdream/shield/v1/tx.amino.js +50 -82
  162. package/sparkdream/sparkdream/v1/tx.amino.d.ts +1 -8
  163. package/sparkdream/sparkdream/v1/tx.amino.js +49 -8
  164. package/sparkdream/split/v1/tx.amino.d.ts +1 -8
  165. package/sparkdream/split/v1/tx.amino.js +49 -8
  166. package/sparkdream/vault/module/v1/module.d.ts +54 -0
  167. package/sparkdream/vault/module/v1/module.js +74 -0
  168. package/sparkdream/vault/v1/genesis.d.ts +59 -0
  169. package/sparkdream/vault/v1/genesis.js +107 -0
  170. package/sparkdream/vault/v1/params.d.ts +68 -0
  171. package/sparkdream/vault/v1/params.js +93 -0
  172. package/sparkdream/vault/v1/query.d.ts +935 -0
  173. package/sparkdream/vault/v1/query.js +1538 -0
  174. package/sparkdream/vault/v1/query.lcd.d.ts +18 -0
  175. package/sparkdream/vault/v1/query.lcd.js +104 -0
  176. package/sparkdream/vault/v1/query.rpc.Query.d.ts +56 -0
  177. package/sparkdream/vault/v1/query.rpc.Query.js +116 -0
  178. package/sparkdream/vault/v1/tx.amino.d.ts +2 -0
  179. package/sparkdream/vault/v1/tx.amino.js +55 -0
  180. package/sparkdream/vault/v1/tx.d.ts +826 -0
  181. package/sparkdream/vault/v1/tx.js +1399 -0
  182. package/sparkdream/vault/v1/tx.registry.d.ts +109 -0
  183. package/sparkdream/vault/v1/tx.registry.js +163 -0
  184. package/sparkdream/vault/v1/tx.rpc.msg.d.ts +37 -0
  185. package/sparkdream/vault/v1/tx.rpc.msg.js +65 -0
  186. package/sparkdream/vault/v1/vault.d.ts +117 -0
  187. package/sparkdream/vault/v1/vault.js +166 -0
  188. package/sparkdream/vault/v1/vault_proposal.d.ts +158 -0
  189. package/sparkdream/vault/v1/vault_proposal.js +285 -0
  190. package/sparkdream/vault/v1/vault_signer.d.ts +54 -0
  191. package/sparkdream/vault/v1/vault_signer.js +88 -0
  192. package/tendermint/bundle.d.ts +844 -844
  193. package/tendermint/bundle.js +20 -20
  194. package/varint.d.ts +1 -1
@@ -1,85 +1,53 @@
1
1
  "use strict";
2
- //@ts-nocheck
3
- // HAND-WRITTEN OVERRIDE — overlaid by scripts/codegen.ts after telescope.
4
- // See ../../commons/v1/tx.amino.ts for the broader rationale.
5
- //
6
- // MsgShieldedExec wraps a single `google.protobuf.Any inner_message`. The
7
- // auto-generated toAmino calls Any.toAmino directly, which attaches raw
8
- // `{type, value: Uint8Array}` — JSON.stringify renders the Uint8Array as
9
- // `{"0":N,"1":N,…}` (numeric, unsorted keys), breaking Ledger's amino-JSON
10
- // validator and producing sign bytes the chain can't reconstruct. Same root
11
- // cause as MsgSubmitProposal in commons; here we route the inner Any through
12
- // the consumer-provided AminoTypes so it's expanded into the proper
13
- // `{type: "<aminoType>", value: <amino-encoded fields>}` shape.
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
14
35
  Object.defineProperty(exports, "__esModule", { value: true });
15
36
  exports.AminoConverter = void 0;
16
- const tx_1 = require("./tx");
17
- const helpers_1 = require("../../../helpers");
18
- const nested_amino_1 = require("../../../nested-amino");
19
- exports.AminoConverter = {
20
- "/sparkdream.shield.v1.MsgUpdateParams": {
21
- aminoType: "sparkdream/x/shield/MsgUpdateParams",
22
- toAmino: tx_1.MsgUpdateParams.toAmino,
23
- fromAmino: tx_1.MsgUpdateParams.fromAmino,
24
- },
25
- "/sparkdream.shield.v1.MsgShieldedExec": {
26
- aminoType: "sparkdream/x/shield/MsgShieldedExec",
27
- toAmino(message) {
28
- const obj = {};
29
- obj.submitter = message.submitter === "" ? undefined : message.submitter;
30
- obj.inner_message = message.innerMessage ? (0, nested_amino_1.anyToAmino)(message.innerMessage) : undefined;
31
- obj.proof = message.proof ? (0, helpers_1.base64FromBytes)(message.proof) : undefined;
32
- obj.nullifier = message.nullifier ? (0, helpers_1.base64FromBytes)(message.nullifier) : undefined;
33
- obj.rate_limit_nullifier = message.rateLimitNullifier ? (0, helpers_1.base64FromBytes)(message.rateLimitNullifier) : undefined;
34
- obj.merkle_root = message.merkleRoot ? (0, helpers_1.base64FromBytes)(message.merkleRoot) : undefined;
35
- obj.proof_domain = message.proofDomain === 0 ? undefined : message.proofDomain;
36
- obj.min_trust_level = message.minTrustLevel === 0 ? undefined : message.minTrustLevel;
37
- obj.exec_mode = message.execMode === 0 ? undefined : message.execMode;
38
- obj.encrypted_payload = message.encryptedPayload ? (0, helpers_1.base64FromBytes)(message.encryptedPayload) : undefined;
39
- obj.target_epoch = message.targetEpoch !== BigInt(0) ? message.targetEpoch?.toString() : undefined;
40
- return obj;
41
- },
42
- fromAmino(object) {
43
- return {
44
- submitter: object.submitter ?? "",
45
- innerMessage: object.inner_message ? (0, nested_amino_1.aminoToAny)(object.inner_message) : undefined,
46
- proof: object.proof !== undefined && object.proof !== null
47
- ? (0, helpers_1.bytesFromBase64)(object.proof)
48
- : new Uint8Array(),
49
- nullifier: object.nullifier !== undefined && object.nullifier !== null
50
- ? (0, helpers_1.bytesFromBase64)(object.nullifier)
51
- : new Uint8Array(),
52
- rateLimitNullifier: object.rate_limit_nullifier !== undefined && object.rate_limit_nullifier !== null
53
- ? (0, helpers_1.bytesFromBase64)(object.rate_limit_nullifier)
54
- : new Uint8Array(),
55
- merkleRoot: object.merkle_root !== undefined && object.merkle_root !== null
56
- ? (0, helpers_1.bytesFromBase64)(object.merkle_root)
57
- : new Uint8Array(),
58
- proofDomain: object.proof_domain ?? 0,
59
- minTrustLevel: object.min_trust_level ?? 0,
60
- execMode: object.exec_mode ?? 0,
61
- encryptedPayload: object.encrypted_payload !== undefined && object.encrypted_payload !== null
62
- ? (0, helpers_1.bytesFromBase64)(object.encrypted_payload)
63
- : new Uint8Array(),
64
- targetEpoch: object.target_epoch !== undefined && object.target_epoch !== null
65
- ? BigInt(object.target_epoch)
66
- : BigInt(0),
67
- };
68
- },
69
- },
70
- "/sparkdream.shield.v1.MsgTriggerDkg": {
71
- aminoType: "sparkdream/x/shield/MsgTriggerDkg",
72
- toAmino: tx_1.MsgTriggerDkg.toAmino,
73
- fromAmino: tx_1.MsgTriggerDkg.fromAmino,
74
- },
75
- "/sparkdream.shield.v1.MsgRegisterShieldedOp": {
76
- aminoType: "sparkdream/x/shield/MsgRegisterShieldedOp",
77
- toAmino: tx_1.MsgRegisterShieldedOp.toAmino,
78
- fromAmino: tx_1.MsgRegisterShieldedOp.fromAmino,
79
- },
80
- "/sparkdream.shield.v1.MsgDeregisterShieldedOp": {
81
- aminoType: "sparkdream/x/shield/MsgDeregisterShieldedOp",
82
- toAmino: tx_1.MsgDeregisterShieldedOp.toAmino,
83
- fromAmino: tx_1.MsgDeregisterShieldedOp.fromAmino,
84
- },
85
- };
37
+ //@ts-nocheck
38
+ // HAND-WRITTEN OVERRIDE — overlaid on top of the Telescope-generated tx.amino.ts
39
+ // by scripts/codegen.ts after each codegen run. Do not let codegen wipe this.
40
+ //
41
+ // Why: Telescope's generated converters (and the per-message overrides that
42
+ // used to patch them) disagree with the chain's aminojson on empty lists,
43
+ // empty bytes, Dec strings, oneofs and non-nullable messages, and went stale
44
+ // whenever a proto changed. Every Msg of x/shield is converted by the
45
+ // schema-driven engine in chain-amino.ts instead, which renders amino JSON
46
+ // from the protobuf bytes exactly as the chain does.
47
+ //
48
+ // MAINTENANCE: none per message. The schema (amino-schema.ts, regenerated from
49
+ // the chain on every proto sync) lists every Msg; __tests__/amino-golden.test.ts
50
+ // checks them all against the chain's encoder.
51
+ const tx = __importStar(require("./tx"));
52
+ const chain_amino_1 = require("../../../chain-amino");
53
+ exports.AminoConverter = (0, chain_amino_1.chainAminoConverters)("sparkdream.shield.v1", tx);
@@ -1,8 +1 @@
1
- import { MsgUpdateParams } from "./tx";
2
- export declare const AminoConverter: {
3
- "/sparkdream.sparkdream.v1.MsgUpdateParams": {
4
- aminoType: string;
5
- toAmino: (message: MsgUpdateParams) => import("./tx").MsgUpdateParamsAmino;
6
- fromAmino: (object: import("./tx").MsgUpdateParamsAmino) => MsgUpdateParams;
7
- };
8
- };
1
+ export declare const AminoConverter: Record<string, import("../../../chain-amino").ChainAminoConverter>;
@@ -1,12 +1,53 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.AminoConverter = void 0;
4
37
  //@ts-nocheck
5
- const tx_1 = require("./tx");
6
- exports.AminoConverter = {
7
- "/sparkdream.sparkdream.v1.MsgUpdateParams": {
8
- aminoType: "sparkdream/x/sparkdream/MsgUpdateParams",
9
- toAmino: tx_1.MsgUpdateParams.toAmino,
10
- fromAmino: tx_1.MsgUpdateParams.fromAmino
11
- }
12
- };
38
+ // HAND-WRITTEN OVERRIDE — overlaid on top of the Telescope-generated tx.amino.ts
39
+ // by scripts/codegen.ts after each codegen run. Do not let codegen wipe this.
40
+ //
41
+ // Why: Telescope's generated converters (and the per-message overrides that
42
+ // used to patch them) disagree with the chain's aminojson on empty lists,
43
+ // empty bytes, Dec strings, oneofs and non-nullable messages, and went stale
44
+ // whenever a proto changed. Every Msg of x/sparkdream is converted by the
45
+ // schema-driven engine in chain-amino.ts instead, which renders amino JSON
46
+ // from the protobuf bytes exactly as the chain does.
47
+ //
48
+ // MAINTENANCE: none per message. The schema (amino-schema.ts, regenerated from
49
+ // the chain on every proto sync) lists every Msg; __tests__/amino-golden.test.ts
50
+ // checks them all against the chain's encoder.
51
+ const tx = __importStar(require("./tx"));
52
+ const chain_amino_1 = require("../../../chain-amino");
53
+ exports.AminoConverter = (0, chain_amino_1.chainAminoConverters)("sparkdream.sparkdream.v1", tx);
@@ -1,8 +1 @@
1
- import { MsgUpdateParams } from "./tx";
2
- export declare const AminoConverter: {
3
- "/sparkdream.split.v1.MsgUpdateParams": {
4
- aminoType: string;
5
- toAmino: (message: MsgUpdateParams) => import("./tx").MsgUpdateParamsAmino;
6
- fromAmino: (object: import("./tx").MsgUpdateParamsAmino) => MsgUpdateParams;
7
- };
8
- };
1
+ export declare const AminoConverter: Record<string, import("../../../chain-amino").ChainAminoConverter>;
@@ -1,12 +1,53 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.AminoConverter = void 0;
4
37
  //@ts-nocheck
5
- const tx_1 = require("./tx");
6
- exports.AminoConverter = {
7
- "/sparkdream.split.v1.MsgUpdateParams": {
8
- aminoType: "sparkdream/x/split/MsgUpdateParams",
9
- toAmino: tx_1.MsgUpdateParams.toAmino,
10
- fromAmino: tx_1.MsgUpdateParams.fromAmino
11
- }
12
- };
38
+ // HAND-WRITTEN OVERRIDE — overlaid on top of the Telescope-generated tx.amino.ts
39
+ // by scripts/codegen.ts after each codegen run. Do not let codegen wipe this.
40
+ //
41
+ // Why: Telescope's generated converters (and the per-message overrides that
42
+ // used to patch them) disagree with the chain's aminojson on empty lists,
43
+ // empty bytes, Dec strings, oneofs and non-nullable messages, and went stale
44
+ // whenever a proto changed. Every Msg of x/split is converted by the
45
+ // schema-driven engine in chain-amino.ts instead, which renders amino JSON
46
+ // from the protobuf bytes exactly as the chain does.
47
+ //
48
+ // MAINTENANCE: none per message. The schema (amino-schema.ts, regenerated from
49
+ // the chain on every proto sync) lists every Msg; __tests__/amino-golden.test.ts
50
+ // checks them all against the chain's encoder.
51
+ const tx = __importStar(require("./tx"));
52
+ const chain_amino_1 = require("../../../chain-amino");
53
+ exports.AminoConverter = (0, chain_amino_1.chainAminoConverters)("sparkdream.split.v1", tx);
@@ -0,0 +1,54 @@
1
+ import { BinaryReader, BinaryWriter } from "../../../../binary";
2
+ import { DeepPartial } from "../../../../helpers";
3
+ /**
4
+ * Module is the config object for the module.
5
+ * @name Module
6
+ * @package sparkdream.vault.module.v1
7
+ * @see proto type: sparkdream.vault.module.v1.Module
8
+ */
9
+ export interface Module {
10
+ /**
11
+ * authority defines the custom module authority.
12
+ * If not set, defaults to the governance module.
13
+ */
14
+ authority: string;
15
+ }
16
+ export interface ModuleProtoMsg {
17
+ typeUrl: "/sparkdream.vault.module.v1.Module";
18
+ value: Uint8Array;
19
+ }
20
+ /**
21
+ * Module is the config object for the module.
22
+ * @name ModuleAmino
23
+ * @package sparkdream.vault.module.v1
24
+ * @see proto type: sparkdream.vault.module.v1.Module
25
+ */
26
+ export interface ModuleAmino {
27
+ /**
28
+ * authority defines the custom module authority.
29
+ * If not set, defaults to the governance module.
30
+ */
31
+ authority?: string;
32
+ }
33
+ export interface ModuleAminoMsg {
34
+ type: "/sparkdream.vault.module.v1.Module";
35
+ value: ModuleAmino;
36
+ }
37
+ /**
38
+ * Module is the config object for the module.
39
+ * @name Module
40
+ * @package sparkdream.vault.module.v1
41
+ * @see proto type: sparkdream.vault.module.v1.Module
42
+ */
43
+ export declare const Module: {
44
+ typeUrl: string;
45
+ encode(message: Module, writer?: BinaryWriter): BinaryWriter;
46
+ decode(input: BinaryReader | Uint8Array, length?: number): Module;
47
+ fromPartial(object: DeepPartial<Module>): Module;
48
+ fromAmino(object: ModuleAmino): Module;
49
+ toAmino(message: Module): ModuleAmino;
50
+ fromAminoMsg(object: ModuleAminoMsg): Module;
51
+ fromProtoMsg(message: ModuleProtoMsg): Module;
52
+ toProto(message: Module): Uint8Array;
53
+ toProtoMsg(message: Module): ModuleProtoMsg;
54
+ };
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Module = void 0;
4
+ //@ts-nocheck
5
+ const binary_1 = require("../../../../binary");
6
+ function createBaseModule() {
7
+ return {
8
+ authority: ""
9
+ };
10
+ }
11
+ /**
12
+ * Module is the config object for the module.
13
+ * @name Module
14
+ * @package sparkdream.vault.module.v1
15
+ * @see proto type: sparkdream.vault.module.v1.Module
16
+ */
17
+ exports.Module = {
18
+ typeUrl: "/sparkdream.vault.module.v1.Module",
19
+ encode(message, writer = binary_1.BinaryWriter.create()) {
20
+ if (message.authority !== "") {
21
+ writer.uint32(10).string(message.authority);
22
+ }
23
+ return writer;
24
+ },
25
+ decode(input, length) {
26
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
27
+ let end = length === undefined ? reader.len : reader.pos + length;
28
+ const message = createBaseModule();
29
+ while (reader.pos < end) {
30
+ const tag = reader.uint32();
31
+ switch (tag >>> 3) {
32
+ case 1:
33
+ message.authority = reader.string();
34
+ break;
35
+ default:
36
+ reader.skipType(tag & 7);
37
+ break;
38
+ }
39
+ }
40
+ return message;
41
+ },
42
+ fromPartial(object) {
43
+ const message = createBaseModule();
44
+ message.authority = object.authority ?? "";
45
+ return message;
46
+ },
47
+ fromAmino(object) {
48
+ const message = createBaseModule();
49
+ if (object.authority !== undefined && object.authority !== null) {
50
+ message.authority = object.authority;
51
+ }
52
+ return message;
53
+ },
54
+ toAmino(message) {
55
+ const obj = {};
56
+ obj.authority = message.authority === "" ? undefined : message.authority;
57
+ return obj;
58
+ },
59
+ fromAminoMsg(object) {
60
+ return exports.Module.fromAmino(object.value);
61
+ },
62
+ fromProtoMsg(message) {
63
+ return exports.Module.decode(message.value);
64
+ },
65
+ toProto(message) {
66
+ return exports.Module.encode(message).finish();
67
+ },
68
+ toProtoMsg(message) {
69
+ return {
70
+ typeUrl: "/sparkdream.vault.module.v1.Module",
71
+ value: exports.Module.encode(message).finish()
72
+ };
73
+ }
74
+ };
@@ -0,0 +1,59 @@
1
+ import { Params, ParamsAmino } from "./params";
2
+ import { Vault, VaultAmino } from "./vault";
3
+ import { VaultProposal, VaultProposalAmino } from "./vault_proposal";
4
+ import { BinaryReader, BinaryWriter } from "../../../binary";
5
+ import { DeepPartial } from "../../../helpers";
6
+ /**
7
+ * GenesisState defines the vault module's genesis state.
8
+ * @name GenesisState
9
+ * @package sparkdream.vault.v1
10
+ * @see proto type: sparkdream.vault.v1.GenesisState
11
+ */
12
+ export interface GenesisState {
13
+ /**
14
+ * params defines all the parameters of the module.
15
+ */
16
+ params: Params;
17
+ vaultMap: Vault[];
18
+ vaultProposalMap: VaultProposal[];
19
+ }
20
+ export interface GenesisStateProtoMsg {
21
+ typeUrl: "/sparkdream.vault.v1.GenesisState";
22
+ value: Uint8Array;
23
+ }
24
+ /**
25
+ * GenesisState defines the vault module's genesis state.
26
+ * @name GenesisStateAmino
27
+ * @package sparkdream.vault.v1
28
+ * @see proto type: sparkdream.vault.v1.GenesisState
29
+ */
30
+ export interface GenesisStateAmino {
31
+ /**
32
+ * params defines all the parameters of the module.
33
+ */
34
+ params: ParamsAmino;
35
+ vault_map?: VaultAmino[];
36
+ vault_proposal_map?: VaultProposalAmino[];
37
+ }
38
+ export interface GenesisStateAminoMsg {
39
+ type: "/sparkdream.vault.v1.GenesisState";
40
+ value: GenesisStateAmino;
41
+ }
42
+ /**
43
+ * GenesisState defines the vault module's genesis state.
44
+ * @name GenesisState
45
+ * @package sparkdream.vault.v1
46
+ * @see proto type: sparkdream.vault.v1.GenesisState
47
+ */
48
+ export declare const GenesisState: {
49
+ typeUrl: string;
50
+ encode(message: GenesisState, writer?: BinaryWriter): BinaryWriter;
51
+ decode(input: BinaryReader | Uint8Array, length?: number): GenesisState;
52
+ fromPartial(object: DeepPartial<GenesisState>): GenesisState;
53
+ fromAmino(object: GenesisStateAmino): GenesisState;
54
+ toAmino(message: GenesisState): GenesisStateAmino;
55
+ fromAminoMsg(object: GenesisStateAminoMsg): GenesisState;
56
+ fromProtoMsg(message: GenesisStateProtoMsg): GenesisState;
57
+ toProto(message: GenesisState): Uint8Array;
58
+ toProtoMsg(message: GenesisState): GenesisStateProtoMsg;
59
+ };
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GenesisState = void 0;
4
+ //@ts-nocheck
5
+ const params_1 = require("./params");
6
+ const vault_1 = require("./vault");
7
+ const vault_proposal_1 = require("./vault_proposal");
8
+ const binary_1 = require("../../../binary");
9
+ function createBaseGenesisState() {
10
+ return {
11
+ params: params_1.Params.fromPartial({}),
12
+ vaultMap: [],
13
+ vaultProposalMap: []
14
+ };
15
+ }
16
+ /**
17
+ * GenesisState defines the vault module's genesis state.
18
+ * @name GenesisState
19
+ * @package sparkdream.vault.v1
20
+ * @see proto type: sparkdream.vault.v1.GenesisState
21
+ */
22
+ exports.GenesisState = {
23
+ typeUrl: "/sparkdream.vault.v1.GenesisState",
24
+ encode(message, writer = binary_1.BinaryWriter.create()) {
25
+ if (message.params !== undefined) {
26
+ params_1.Params.encode(message.params, writer.uint32(10).fork()).ldelim();
27
+ }
28
+ for (const v of message.vaultMap) {
29
+ vault_1.Vault.encode(v, writer.uint32(18).fork()).ldelim();
30
+ }
31
+ for (const v of message.vaultProposalMap) {
32
+ vault_proposal_1.VaultProposal.encode(v, writer.uint32(26).fork()).ldelim();
33
+ }
34
+ return writer;
35
+ },
36
+ decode(input, length) {
37
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
38
+ let end = length === undefined ? reader.len : reader.pos + length;
39
+ const message = createBaseGenesisState();
40
+ while (reader.pos < end) {
41
+ const tag = reader.uint32();
42
+ switch (tag >>> 3) {
43
+ case 1:
44
+ message.params = params_1.Params.decode(reader, reader.uint32());
45
+ break;
46
+ case 2:
47
+ message.vaultMap.push(vault_1.Vault.decode(reader, reader.uint32()));
48
+ break;
49
+ case 3:
50
+ message.vaultProposalMap.push(vault_proposal_1.VaultProposal.decode(reader, reader.uint32()));
51
+ break;
52
+ default:
53
+ reader.skipType(tag & 7);
54
+ break;
55
+ }
56
+ }
57
+ return message;
58
+ },
59
+ fromPartial(object) {
60
+ const message = createBaseGenesisState();
61
+ message.params = object.params !== undefined && object.params !== null ? params_1.Params.fromPartial(object.params) : undefined;
62
+ message.vaultMap = object.vaultMap?.map(e => vault_1.Vault.fromPartial(e)) || [];
63
+ message.vaultProposalMap = object.vaultProposalMap?.map(e => vault_proposal_1.VaultProposal.fromPartial(e)) || [];
64
+ return message;
65
+ },
66
+ fromAmino(object) {
67
+ const message = createBaseGenesisState();
68
+ if (object.params !== undefined && object.params !== null) {
69
+ message.params = params_1.Params.fromAmino(object.params);
70
+ }
71
+ message.vaultMap = object.vault_map?.map(e => vault_1.Vault.fromAmino(e)) || [];
72
+ message.vaultProposalMap = object.vault_proposal_map?.map(e => vault_proposal_1.VaultProposal.fromAmino(e)) || [];
73
+ return message;
74
+ },
75
+ toAmino(message) {
76
+ const obj = {};
77
+ obj.params = message.params ? params_1.Params.toAmino(message.params) : params_1.Params.toAmino(params_1.Params.fromPartial({}));
78
+ if (message.vaultMap) {
79
+ obj.vault_map = message.vaultMap.map(e => e ? vault_1.Vault.toAmino(e) : undefined);
80
+ }
81
+ else {
82
+ obj.vault_map = message.vaultMap;
83
+ }
84
+ if (message.vaultProposalMap) {
85
+ obj.vault_proposal_map = message.vaultProposalMap.map(e => e ? vault_proposal_1.VaultProposal.toAmino(e) : undefined);
86
+ }
87
+ else {
88
+ obj.vault_proposal_map = message.vaultProposalMap;
89
+ }
90
+ return obj;
91
+ },
92
+ fromAminoMsg(object) {
93
+ return exports.GenesisState.fromAmino(object.value);
94
+ },
95
+ fromProtoMsg(message) {
96
+ return exports.GenesisState.decode(message.value);
97
+ },
98
+ toProto(message) {
99
+ return exports.GenesisState.encode(message).finish();
100
+ },
101
+ toProtoMsg(message) {
102
+ return {
103
+ typeUrl: "/sparkdream.vault.v1.GenesisState",
104
+ value: exports.GenesisState.encode(message).finish()
105
+ };
106
+ }
107
+ };
@@ -0,0 +1,68 @@
1
+ import { BinaryReader, BinaryWriter } from "../../../binary";
2
+ import { DeepPartial } from "../../../helpers";
3
+ /**
4
+ * Params defines the parameters for the module.
5
+ * @name Params
6
+ * @package sparkdream.vault.v1
7
+ * @see proto type: sparkdream.vault.v1.Params
8
+ */
9
+ export interface Params {
10
+ /**
11
+ * creation_enabled gates MsgCreateVault only. Approve, revoke-approval,
12
+ * execute, cancel and update keep working for existing vaults whatever its
13
+ * value, so governance can never freeze funds already held in a vault.
14
+ */
15
+ creationEnabled: boolean;
16
+ /**
17
+ * creation_fee_amount is burned by MsgCreateVault, in bond-denom micro-units
18
+ * (SPARK; spam pricing like tag creation). Default 10 SPARK.
19
+ */
20
+ creationFeeAmount: string;
21
+ }
22
+ export interface ParamsProtoMsg {
23
+ typeUrl: "/sparkdream.vault.v1.Params";
24
+ value: Uint8Array;
25
+ }
26
+ /**
27
+ * Params defines the parameters for the module.
28
+ * @name ParamsAmino
29
+ * @package sparkdream.vault.v1
30
+ * @see proto type: sparkdream.vault.v1.Params
31
+ */
32
+ export interface ParamsAmino {
33
+ /**
34
+ * creation_enabled gates MsgCreateVault only. Approve, revoke-approval,
35
+ * execute, cancel and update keep working for existing vaults whatever its
36
+ * value, so governance can never freeze funds already held in a vault.
37
+ */
38
+ creation_enabled?: boolean;
39
+ /**
40
+ * creation_fee_amount is burned by MsgCreateVault, in bond-denom micro-units
41
+ * (SPARK; spam pricing like tag creation). Default 10 SPARK.
42
+ */
43
+ creation_fee_amount?: string;
44
+ }
45
+ export interface ParamsAminoMsg {
46
+ type: "sparkdream/x/vault/Params";
47
+ value: ParamsAmino;
48
+ }
49
+ /**
50
+ * Params defines the parameters for the module.
51
+ * @name Params
52
+ * @package sparkdream.vault.v1
53
+ * @see proto type: sparkdream.vault.v1.Params
54
+ */
55
+ export declare const Params: {
56
+ typeUrl: string;
57
+ aminoType: string;
58
+ encode(message: Params, writer?: BinaryWriter): BinaryWriter;
59
+ decode(input: BinaryReader | Uint8Array, length?: number): Params;
60
+ fromPartial(object: DeepPartial<Params>): Params;
61
+ fromAmino(object: ParamsAmino): Params;
62
+ toAmino(message: Params): ParamsAmino;
63
+ fromAminoMsg(object: ParamsAminoMsg): Params;
64
+ toAminoMsg(message: Params): ParamsAminoMsg;
65
+ fromProtoMsg(message: ParamsProtoMsg): Params;
66
+ toProto(message: Params): Uint8Array;
67
+ toProtoMsg(message: Params): ParamsProtoMsg;
68
+ };