@sparkdreamnft/sparkdreamjs 0.0.46 → 0.0.48

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 (92) hide show
  1. package/amino-schema.d.ts +5741 -0
  2. package/amino-schema.js +8 -0
  3. package/chain-amino.d.ts +61 -0
  4. package/chain-amino.js +670 -0
  5. package/esm/amino-schema.js +5 -0
  6. package/esm/chain-amino.js +665 -0
  7. package/esm/nested-amino.js +7 -1
  8. package/esm/sparkdream/artifact/v1/query.js +125 -0
  9. package/esm/sparkdream/artifact/v1/query.lcd.js +7 -0
  10. package/esm/sparkdream/artifact/v1/query.rpc.Query.js +12 -1
  11. package/esm/sparkdream/artifact/v1/tx.amino.js +12 -473
  12. package/esm/sparkdream/artifact/v1/tx.js +13 -1
  13. package/esm/sparkdream/blog/v1/tx.amino.js +15 -135
  14. package/esm/sparkdream/collect/v1/tx.amino.js +15 -254
  15. package/esm/sparkdream/commons/v1/tx.amino.js +12 -258
  16. package/esm/sparkdream/ecosystem/v1/tx.amino.js +15 -26
  17. package/esm/sparkdream/federation/v1/tx.amino.js +12 -174
  18. package/esm/sparkdream/forum/v1/tx.amino.js +15 -231
  19. package/esm/sparkdream/futarchy/v1/tx.amino.js +16 -38
  20. package/esm/sparkdream/guardian/v1/tx.amino.js +12 -33
  21. package/esm/sparkdream/name/v1/tx.amino.js +16 -63
  22. package/esm/sparkdream/rep/v1/query.js +304 -1
  23. package/esm/sparkdream/rep/v1/query.lcd.js +19 -0
  24. package/esm/sparkdream/rep/v1/query.rpc.Query.js +22 -1
  25. package/esm/sparkdream/rep/v1/tx.amino.js +12 -484
  26. package/esm/sparkdream/reveal/v1/tx.amino.js +15 -73
  27. package/esm/sparkdream/season/v1/tx.amino.js +12 -276
  28. package/esm/sparkdream/service/v1/tx.amino.js +16 -78
  29. package/esm/sparkdream/session/v1/tx.amino.js +16 -271
  30. package/esm/sparkdream/shield/v1/tx.amino.js +15 -80
  31. package/esm/sparkdream/sparkdream/v1/tx.amino.js +16 -8
  32. package/esm/sparkdream/split/v1/tx.amino.js +16 -8
  33. package/esm/sparkdream/vault/v1/tx.amino.js +12 -105
  34. package/nested-amino.d.ts +5 -1
  35. package/nested-amino.js +8 -1
  36. package/package.json +1 -1
  37. package/sparkdream/artifact/v1/query.d.ts +86 -0
  38. package/sparkdream/artifact/v1/query.js +126 -1
  39. package/sparkdream/artifact/v1/query.lcd.d.ts +2 -1
  40. package/sparkdream/artifact/v1/query.lcd.js +7 -0
  41. package/sparkdream/artifact/v1/query.rpc.Query.d.ts +9 -1
  42. package/sparkdream/artifact/v1/query.rpc.Query.js +11 -0
  43. package/sparkdream/artifact/v1/tx.amino.d.ts +1 -353
  44. package/sparkdream/artifact/v1/tx.amino.js +47 -475
  45. package/sparkdream/artifact/v1/tx.d.ts +14 -0
  46. package/sparkdream/artifact/v1/tx.js +13 -1
  47. package/sparkdream/blog/v1/tx.amino.d.ts +1 -103
  48. package/sparkdream/blog/v1/tx.amino.js +50 -137
  49. package/sparkdream/bundle.d.ts +97 -2047
  50. package/sparkdream/client.d.ts +1 -2009
  51. package/sparkdream/collect/v1/tx.amino.d.ts +1 -153
  52. package/sparkdream/collect/v1/tx.amino.js +50 -256
  53. package/sparkdream/commons/v1/tx.amino.d.ts +1 -123
  54. package/sparkdream/commons/v1/tx.amino.js +49 -262
  55. package/sparkdream/ecosystem/v1/tx.amino.d.ts +1 -13
  56. package/sparkdream/ecosystem/v1/tx.amino.js +50 -28
  57. package/sparkdream/federation/v1/tx.amino.d.ts +1 -128
  58. package/sparkdream/federation/v1/tx.amino.js +47 -176
  59. package/sparkdream/forum/v1/tx.amino.d.ts +1 -203
  60. package/sparkdream/forum/v1/tx.amino.js +50 -233
  61. package/sparkdream/futarchy/v1/tx.amino.d.ts +1 -38
  62. package/sparkdream/futarchy/v1/tx.amino.js +49 -38
  63. package/sparkdream/guardian/v1/tx.amino.d.ts +1 -7
  64. package/sparkdream/guardian/v1/tx.amino.js +49 -37
  65. package/sparkdream/name/v1/tx.amino.d.ts +1 -63
  66. package/sparkdream/name/v1/tx.amino.js +49 -63
  67. package/sparkdream/rep/v1/query.d.ts +187 -1
  68. package/sparkdream/rep/v1/query.js +304 -1
  69. package/sparkdream/rep/v1/query.lcd.d.ts +3 -1
  70. package/sparkdream/rep/v1/query.lcd.js +19 -0
  71. package/sparkdream/rep/v1/query.rpc.Query.d.ts +16 -1
  72. package/sparkdream/rep/v1/query.rpc.Query.js +21 -0
  73. package/sparkdream/rep/v1/tx.amino.d.ts +1 -353
  74. package/sparkdream/rep/v1/tx.amino.js +47 -486
  75. package/sparkdream/reveal/v1/tx.amino.d.ts +1 -53
  76. package/sparkdream/reveal/v1/tx.amino.js +50 -75
  77. package/sparkdream/rpc.query.d.ts +3 -0
  78. package/sparkdream/season/v1/tx.amino.d.ts +1 -218
  79. package/sparkdream/season/v1/tx.amino.js +47 -278
  80. package/sparkdream/service/v1/tx.amino.d.ts +1 -78
  81. package/sparkdream/service/v1/tx.amino.js +49 -78
  82. package/sparkdream/session/v1/tx.amino.d.ts +1 -93
  83. package/sparkdream/session/v1/tx.amino.js +48 -270
  84. package/sparkdream/shield/v1/tx.amino.d.ts +1 -28
  85. package/sparkdream/shield/v1/tx.amino.js +50 -82
  86. package/sparkdream/sparkdream/v1/tx.amino.d.ts +1 -8
  87. package/sparkdream/sparkdream/v1/tx.amino.js +49 -8
  88. package/sparkdream/split/v1/tx.amino.d.ts +1 -8
  89. package/sparkdream/split/v1/tx.amino.js +49 -8
  90. package/sparkdream/vault/v1/tx.amino.d.ts +1 -43
  91. package/sparkdream/vault/v1/tx.amino.js +49 -109
  92. package/varint.d.ts +1 -1
@@ -1,481 +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
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.AminoConverter = void 0;
2
37
  //@ts-nocheck
3
38
  // HAND-WRITTEN OVERRIDE — overlaid on top of the Telescope-generated tx.amino.ts
4
39
  // by scripts/codegen.ts after each codegen run. Do not let codegen wipe this.
5
40
  //
6
- // Why: Telescope's auto-generated toAmino emits `[]` for empty repeated fields
7
- // (the `if (message.field)` check is truthy for `[]` in JS), but
8
- // cosmossdk.io/x/tx/signing/aminojson on the chain side omits them per
9
- // `omitempty`. Whenever a repeated field happens to be empty, the JS side signs
10
- // `"field":[]` and the chain reconstructs without the key — sign bytes differ,
11
- // surfacing as "signature verification failed" / "unauthorized".
12
- //
13
- // Every artifact message with a repeated field not marked
14
- // `(amino.dont_omitempty) = true` is patched here to mirror aminojson's
15
- // omitempty (return `undefined` when empty). The rest of the converters pass
16
- // straight through to the auto-generated toAmino/fromAmino.
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/artifact 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.
17
47
  //
18
- // MAINTENANCE: this map REPLACES the generated one wholesale, so it must list
19
- // every message in tx.proto. A message added to the proto but not added here
20
- // ends up with no amino converter at all, and amino (Ledger) signing for it
21
- // fails at runtime. When syncing protos, diff the message list in
22
- // protos/sparkdream/artifact/v1/tx.proto against the keys below.
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.AminoConverter = void 0;
25
- const tx_1 = require("./tx");
26
- const types_1 = require("./types");
27
- exports.AminoConverter = {
28
- "/sparkdream.artifact.v1.MsgUpdateParams": {
29
- aminoType: "sparkdream/x/artifact/MsgUpdateParams",
30
- toAmino: tx_1.MsgUpdateParams.toAmino,
31
- fromAmino: tx_1.MsgUpdateParams.fromAmino
32
- },
33
- "/sparkdream.artifact.v1.MsgCreateClass": {
34
- aminoType: "sparkdream/x/artifact/MsgCreateClass",
35
- toAmino(message) {
36
- const obj = {};
37
- obj.creator = message.creator === "" ? undefined : message.creator;
38
- obj.name = message.name === "" ? undefined : message.name;
39
- obj.symbol = message.symbol === "" ? undefined : message.symbol;
40
- obj.description = message.description === "" ? undefined : message.description;
41
- obj.uri = message.uri === "" ? undefined : message.uri;
42
- obj.uri_hash = message.uriHash === "" ? undefined : message.uriHash;
43
- obj.token_uri_base = message.tokenUriBase === "" ? undefined : message.tokenUriBase;
44
- obj.flags = message.flags ? types_1.ClassFlags.toAmino(message.flags) : types_1.ClassFlags.toAmino(types_1.ClassFlags.fromPartial({}));
45
- obj.max_supply = message.maxSupply !== BigInt(0) ? message.maxSupply?.toString() : undefined;
46
- obj.mint_policy = message.mintPolicy ? types_1.MintPolicy.toAmino(message.mintPolicy) : types_1.MintPolicy.toAmino(types_1.MintPolicy.fromPartial({}));
47
- obj.payout_address = message.payoutAddress === "" ? undefined : message.payoutAddress;
48
- obj.royalty_bps = message.royaltyBps === 0 ? undefined : message.royaltyBps;
49
- obj.royalty_recipients = (message.royaltyRecipients?.length ?? 0) > 0
50
- ? message.royaltyRecipients.map((e) => e ? types_1.RoyaltyShare.toAmino(e) : undefined)
51
- : undefined;
52
- obj.minters = (message.minters?.length ?? 0) > 0
53
- ? message.minters.map((e) => e)
54
- : undefined;
55
- obj.accepted_content_license = message.acceptedContentLicense === "" ? undefined : message.acceptedContentLicense;
56
- obj.expiry = message.expiry ? types_1.ExpiryPolicy.toAmino(message.expiry) : types_1.ExpiryPolicy.toAmino(types_1.ExpiryPolicy.fromPartial({}));
57
- obj.reveal = message.reveal ? types_1.RevealPolicy.toAmino(message.reveal) : types_1.RevealPolicy.toAmino(types_1.RevealPolicy.fromPartial({}));
58
- obj.renderer = message.renderer ? types_1.Renderer.toAmino(message.renderer) : types_1.Renderer.toAmino(types_1.Renderer.fromPartial({}));
59
- obj.token_model = message.tokenModel === 0 ? undefined : message.tokenModel;
60
- obj.harberger = message.harberger ? types_1.HarbergerPolicy.toAmino(message.harberger) : types_1.HarbergerPolicy.toAmino(types_1.HarbergerPolicy.fromPartial({}));
61
- return obj;
62
- },
63
- fromAmino: tx_1.MsgCreateClass.fromAmino
64
- },
65
- "/sparkdream.artifact.v1.MsgUpdateClass": {
66
- aminoType: "sparkdream/x/artifact/MsgUpdateClass",
67
- toAmino(message) {
68
- const obj = {};
69
- obj.owner = message.owner === "" ? undefined : message.owner;
70
- obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
71
- obj.name = message.name === "" ? undefined : message.name;
72
- obj.description = message.description === "" ? undefined : message.description;
73
- obj.uri = message.uri === "" ? undefined : message.uri;
74
- obj.uri_hash = message.uriHash === "" ? undefined : message.uriHash;
75
- obj.token_uri_base = message.tokenUriBase === "" ? undefined : message.tokenUriBase;
76
- obj.payout_address = message.payoutAddress === "" ? undefined : message.payoutAddress;
77
- obj.royalty_recipients = (message.royaltyRecipients?.length ?? 0) > 0
78
- ? message.royaltyRecipients.map((e) => e ? types_1.RoyaltyShare.toAmino(e) : undefined)
79
- : undefined;
80
- obj.royalty_bps = message.royaltyBps === 0 ? undefined : message.royaltyBps;
81
- obj.update_mask = (message.updateMask?.length ?? 0) > 0
82
- ? message.updateMask.map((e) => e)
83
- : undefined;
84
- return obj;
85
- },
86
- fromAmino: tx_1.MsgUpdateClass.fromAmino
87
- },
88
- "/sparkdream.artifact.v1.MsgFreezeClassMetadata": {
89
- aminoType: "sparkdream/x/artifact/MsgFreezeClassMetadata",
90
- toAmino: tx_1.MsgFreezeClassMetadata.toAmino,
91
- fromAmino: tx_1.MsgFreezeClassMetadata.fromAmino
92
- },
93
- "/sparkdream.artifact.v1.MsgSetMintPolicy": {
94
- aminoType: "sparkdream/x/artifact/MsgSetMintPolicy",
95
- toAmino: tx_1.MsgSetMintPolicy.toAmino,
96
- fromAmino: tx_1.MsgSetMintPolicy.fromAmino
97
- },
98
- "/sparkdream.artifact.v1.MsgSetMinters": {
99
- aminoType: "sparkdream/x/artifact/MsgSetMinters",
100
- toAmino(message) {
101
- const obj = {};
102
- obj.owner = message.owner === "" ? undefined : message.owner;
103
- obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
104
- obj.add = (message.add?.length ?? 0) > 0
105
- ? message.add.map((e) => e)
106
- : undefined;
107
- obj.remove = (message.remove?.length ?? 0) > 0
108
- ? message.remove.map((e) => e)
109
- : undefined;
110
- return obj;
111
- },
112
- fromAmino: tx_1.MsgSetMinters.fromAmino
113
- },
114
- "/sparkdream.artifact.v1.MsgSetMaxSupply": {
115
- aminoType: "sparkdream/x/artifact/MsgSetMaxSupply",
116
- toAmino: tx_1.MsgSetMaxSupply.toAmino,
117
- fromAmino: tx_1.MsgSetMaxSupply.fromAmino
118
- },
119
- "/sparkdream.artifact.v1.MsgCloseMinting": {
120
- aminoType: "sparkdream/x/artifact/MsgCloseMinting",
121
- toAmino: tx_1.MsgCloseMinting.toAmino,
122
- fromAmino: tx_1.MsgCloseMinting.fromAmino
123
- },
124
- "/sparkdream.artifact.v1.MsgProposeClassOwner": {
125
- aminoType: "sparkdream/x/artifact/MsgProposeClassOwner",
126
- toAmino: tx_1.MsgProposeClassOwner.toAmino,
127
- fromAmino: tx_1.MsgProposeClassOwner.fromAmino
128
- },
129
- "/sparkdream.artifact.v1.MsgAcceptClassOwner": {
130
- aminoType: "sparkdream/x/artifact/MsgAcceptClassOwner",
131
- toAmino: tx_1.MsgAcceptClassOwner.toAmino,
132
- fromAmino: tx_1.MsgAcceptClassOwner.fromAmino
133
- },
134
- "/sparkdream.artifact.v1.MsgCancelClassOwner": {
135
- aminoType: "sparkdream/x/artifact/MsgCancelClassOwner",
136
- toAmino: tx_1.MsgCancelClassOwner.toAmino,
137
- fromAmino: tx_1.MsgCancelClassOwner.fromAmino
138
- },
139
- "/sparkdream.artifact.v1.MsgDeleteClass": {
140
- aminoType: "sparkdream/x/artifact/MsgDeleteClass",
141
- toAmino: tx_1.MsgDeleteClass.toAmino,
142
- fromAmino: tx_1.MsgDeleteClass.fromAmino
143
- },
144
- "/sparkdream.artifact.v1.MsgMint": {
145
- aminoType: "sparkdream/x/artifact/MsgMint",
146
- toAmino: tx_1.MsgMint.toAmino,
147
- fromAmino: tx_1.MsgMint.fromAmino
148
- },
149
- "/sparkdream.artifact.v1.MsgPublicMint": {
150
- aminoType: "sparkdream/x/artifact/MsgPublicMint",
151
- toAmino: tx_1.MsgPublicMint.toAmino,
152
- fromAmino: tx_1.MsgPublicMint.fromAmino
153
- },
154
- "/sparkdream.artifact.v1.MsgTransfer": {
155
- aminoType: "sparkdream/x/artifact/MsgTransfer",
156
- toAmino: tx_1.MsgTransfer.toAmino,
157
- fromAmino: tx_1.MsgTransfer.fromAmino
158
- },
159
- "/sparkdream.artifact.v1.MsgAcceptIncoming": {
160
- aminoType: "sparkdream/x/artifact/MsgAcceptIncoming",
161
- toAmino: tx_1.MsgAcceptIncoming.toAmino,
162
- fromAmino: tx_1.MsgAcceptIncoming.fromAmino
163
- },
164
- "/sparkdream.artifact.v1.MsgRejectIncoming": {
165
- aminoType: "sparkdream/x/artifact/MsgRejectIncoming",
166
- toAmino: tx_1.MsgRejectIncoming.toAmino,
167
- fromAmino: tx_1.MsgRejectIncoming.fromAmino
168
- },
169
- "/sparkdream.artifact.v1.MsgCancelOutgoing": {
170
- aminoType: "sparkdream/x/artifact/MsgCancelOutgoing",
171
- toAmino: tx_1.MsgCancelOutgoing.toAmino,
172
- fromAmino: tx_1.MsgCancelOutgoing.fromAmino
173
- },
174
- "/sparkdream.artifact.v1.MsgSetReceivePolicy": {
175
- aminoType: "sparkdream/x/artifact/MsgSetReceivePolicy",
176
- toAmino: tx_1.MsgSetReceivePolicy.toAmino,
177
- fromAmino: tx_1.MsgSetReceivePolicy.fromAmino
178
- },
179
- "/sparkdream.artifact.v1.MsgBurn": {
180
- aminoType: "sparkdream/x/artifact/MsgBurn",
181
- toAmino: tx_1.MsgBurn.toAmino,
182
- fromAmino: tx_1.MsgBurn.fromAmino
183
- },
184
- "/sparkdream.artifact.v1.MsgRevoke": {
185
- aminoType: "sparkdream/x/artifact/MsgRevoke",
186
- toAmino(message) {
187
- const obj = {};
188
- obj.owner = message.owner === "" ? undefined : message.owner;
189
- obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
190
- obj.token_ids = (message.tokenIds?.length ?? 0) > 0
191
- ? message.tokenIds.map((e) => e.toString())
192
- : undefined;
193
- obj.reason = message.reason === "" ? undefined : message.reason;
194
- return obj;
195
- },
196
- fromAmino: tx_1.MsgRevoke.fromAmino
197
- },
198
- "/sparkdream.artifact.v1.MsgUpdateToken": {
199
- aminoType: "sparkdream/x/artifact/MsgUpdateToken",
200
- toAmino: tx_1.MsgUpdateToken.toAmino,
201
- fromAmino: tx_1.MsgUpdateToken.fromAmino
202
- },
203
- "/sparkdream.artifact.v1.MsgFreezeTokenMetadata": {
204
- aminoType: "sparkdream/x/artifact/MsgFreezeTokenMetadata",
205
- toAmino: tx_1.MsgFreezeTokenMetadata.toAmino,
206
- fromAmino: tx_1.MsgFreezeTokenMetadata.fromAmino
207
- },
208
- "/sparkdream.artifact.v1.MsgList": {
209
- aminoType: "sparkdream/x/artifact/MsgList",
210
- toAmino: tx_1.MsgList.toAmino,
211
- fromAmino: tx_1.MsgList.fromAmino
212
- },
213
- "/sparkdream.artifact.v1.MsgUpdateListing": {
214
- aminoType: "sparkdream/x/artifact/MsgUpdateListing",
215
- toAmino: tx_1.MsgUpdateListing.toAmino,
216
- fromAmino: tx_1.MsgUpdateListing.fromAmino
217
- },
218
- "/sparkdream.artifact.v1.MsgDelist": {
219
- aminoType: "sparkdream/x/artifact/MsgDelist",
220
- toAmino: tx_1.MsgDelist.toAmino,
221
- fromAmino: tx_1.MsgDelist.fromAmino
222
- },
223
- "/sparkdream.artifact.v1.MsgBuy": {
224
- aminoType: "sparkdream/x/artifact/MsgBuy",
225
- toAmino: tx_1.MsgBuy.toAmino,
226
- fromAmino: tx_1.MsgBuy.fromAmino
227
- },
228
- "/sparkdream.artifact.v1.MsgHideContent": {
229
- aminoType: "sparkdream/x/artifact/MsgHideContent",
230
- toAmino: tx_1.MsgHideContent.toAmino,
231
- fromAmino: tx_1.MsgHideContent.fromAmino
232
- },
233
- "/sparkdream.artifact.v1.MsgUnhideContent": {
234
- aminoType: "sparkdream/x/artifact/MsgUnhideContent",
235
- toAmino: tx_1.MsgUnhideContent.toAmino,
236
- fromAmino: tx_1.MsgUnhideContent.fromAmino
237
- },
238
- "/sparkdream.artifact.v1.MsgAppealHide": {
239
- aminoType: "sparkdream/x/artifact/MsgAppealHide",
240
- toAmino: tx_1.MsgAppealHide.toAmino,
241
- fromAmino: tx_1.MsgAppealHide.fromAmino
242
- },
243
- "/sparkdream.artifact.v1.MsgUpdateOperationalParams": {
244
- aminoType: "sparkdream/x/artifact/MsgUpdateOperationalParams",
245
- toAmino: tx_1.MsgUpdateOperationalParams.toAmino,
246
- fromAmino: tx_1.MsgUpdateOperationalParams.fromAmino
247
- },
248
- "/sparkdream.artifact.v1.MsgIssue": {
249
- aminoType: "sparkdream/x/artifact/MsgIssue",
250
- toAmino(message) {
251
- const obj = {};
252
- obj.minter = message.minter === "" ? undefined : message.minter;
253
- obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
254
- obj.recipients = (message.recipients?.length ?? 0) > 0
255
- ? message.recipients.map((e) => e)
256
- : undefined;
257
- obj.metadata = message.metadata ? types_1.TokenMetadata.toAmino(message.metadata) : types_1.TokenMetadata.toAmino(types_1.TokenMetadata.fromPartial({}));
258
- obj.accepted_content_license = message.acceptedContentLicense === "" ? undefined : message.acceptedContentLicense;
259
- return obj;
260
- },
261
- fromAmino: tx_1.MsgIssue.fromAmino
262
- },
263
- "/sparkdream.artifact.v1.MsgRenew": {
264
- aminoType: "sparkdream/x/artifact/MsgRenew",
265
- toAmino: tx_1.MsgRenew.toAmino,
266
- fromAmino: tx_1.MsgRenew.fromAmino
267
- },
268
- "/sparkdream.artifact.v1.MsgRedeem": {
269
- aminoType: "sparkdream/x/artifact/MsgRedeem",
270
- toAmino(message) {
271
- const obj = {};
272
- obj.signer = message.signer === "" ? undefined : message.signer;
273
- obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
274
- obj.token_ids = (message.tokenIds?.length ?? 0) > 0
275
- ? message.tokenIds.map((e) => e.toString())
276
- : undefined;
277
- return obj;
278
- },
279
- fromAmino: tx_1.MsgRedeem.fromAmino
280
- },
281
- "/sparkdream.artifact.v1.MsgLockRoyalty": {
282
- aminoType: "sparkdream/x/artifact/MsgLockRoyalty",
283
- toAmino: tx_1.MsgLockRoyalty.toAmino,
284
- fromAmino: tx_1.MsgLockRoyalty.fromAmino
285
- },
286
- "/sparkdream.artifact.v1.MsgReveal": {
287
- aminoType: "sparkdream/x/artifact/MsgReveal",
288
- toAmino(message) {
289
- const obj = {};
290
- obj.signer = message.signer === "" ? undefined : message.signer;
291
- obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
292
- obj.token_id = message.tokenId !== BigInt(0) ? message.tokenId?.toString() : undefined;
293
- obj.metadata = message.metadata ? types_1.TokenMetadata.toAmino(message.metadata) : types_1.TokenMetadata.toAmino(types_1.TokenMetadata.fromPartial({}));
294
- obj.salt = message.salt === "" ? undefined : message.salt;
295
- obj.proof = (message.proof?.length ?? 0) > 0
296
- ? message.proof.map((e) => e)
297
- : undefined;
298
- return obj;
299
- },
300
- fromAmino: tx_1.MsgReveal.fromAmino
301
- },
302
- "/sparkdream.artifact.v1.MsgRevealSeed": {
303
- aminoType: "sparkdream/x/artifact/MsgRevealSeed",
304
- toAmino: tx_1.MsgRevealSeed.toAmino,
305
- fromAmino: tx_1.MsgRevealSeed.fromAmino
306
- },
307
- "/sparkdream.artifact.v1.MsgProposeMedia": {
308
- aminoType: "sparkdream/x/artifact/MsgProposeMedia",
309
- toAmino: tx_1.MsgProposeMedia.toAmino,
310
- fromAmino: tx_1.MsgProposeMedia.fromAmino
311
- },
312
- "/sparkdream.artifact.v1.MsgAcceptMedia": {
313
- aminoType: "sparkdream/x/artifact/MsgAcceptMedia",
314
- toAmino: tx_1.MsgAcceptMedia.toAmino,
315
- fromAmino: tx_1.MsgAcceptMedia.fromAmino
316
- },
317
- "/sparkdream.artifact.v1.MsgRejectMedia": {
318
- aminoType: "sparkdream/x/artifact/MsgRejectMedia",
319
- toAmino: tx_1.MsgRejectMedia.toAmino,
320
- fromAmino: tx_1.MsgRejectMedia.fromAmino
321
- },
322
- "/sparkdream.artifact.v1.MsgSetDisplayedMedia": {
323
- aminoType: "sparkdream/x/artifact/MsgSetDisplayedMedia",
324
- toAmino: tx_1.MsgSetDisplayedMedia.toAmino,
325
- fromAmino: tx_1.MsgSetDisplayedMedia.fromAmino
326
- },
327
- "/sparkdream.artifact.v1.MsgCreateEdition": {
328
- aminoType: "sparkdream/x/artifact/MsgCreateEdition",
329
- toAmino: tx_1.MsgCreateEdition.toAmino,
330
- fromAmino: tx_1.MsgCreateEdition.fromAmino
331
- },
332
- "/sparkdream.artifact.v1.MsgMintUnits": {
333
- aminoType: "sparkdream/x/artifact/MsgMintUnits",
334
- toAmino: tx_1.MsgMintUnits.toAmino,
335
- fromAmino: tx_1.MsgMintUnits.fromAmino
336
- },
337
- "/sparkdream.artifact.v1.MsgTransferUnits": {
338
- aminoType: "sparkdream/x/artifact/MsgTransferUnits",
339
- toAmino: tx_1.MsgTransferUnits.toAmino,
340
- fromAmino: tx_1.MsgTransferUnits.fromAmino
341
- },
342
- "/sparkdream.artifact.v1.MsgBurnUnits": {
343
- aminoType: "sparkdream/x/artifact/MsgBurnUnits",
344
- toAmino: tx_1.MsgBurnUnits.toAmino,
345
- fromAmino: tx_1.MsgBurnUnits.fromAmino
346
- },
347
- "/sparkdream.artifact.v1.MsgRevokeUnits": {
348
- aminoType: "sparkdream/x/artifact/MsgRevokeUnits",
349
- toAmino: tx_1.MsgRevokeUnits.toAmino,
350
- fromAmino: tx_1.MsgRevokeUnits.fromAmino
351
- },
352
- "/sparkdream.artifact.v1.MsgListUnits": {
353
- aminoType: "sparkdream/x/artifact/MsgListUnits",
354
- toAmino: tx_1.MsgListUnits.toAmino,
355
- fromAmino: tx_1.MsgListUnits.fromAmino
356
- },
357
- "/sparkdream.artifact.v1.MsgDelistUnits": {
358
- aminoType: "sparkdream/x/artifact/MsgDelistUnits",
359
- toAmino: tx_1.MsgDelistUnits.toAmino,
360
- fromAmino: tx_1.MsgDelistUnits.fromAmino
361
- },
362
- "/sparkdream.artifact.v1.MsgBuyUnits": {
363
- aminoType: "sparkdream/x/artifact/MsgBuyUnits",
364
- toAmino: tx_1.MsgBuyUnits.toAmino,
365
- fromAmino: tx_1.MsgBuyUnits.fromAmino
366
- },
367
- "/sparkdream.artifact.v1.MsgFundEdition": {
368
- aminoType: "sparkdream/x/artifact/MsgFundEdition",
369
- toAmino: tx_1.MsgFundEdition.toAmino,
370
- fromAmino: tx_1.MsgFundEdition.fromAmino
371
- },
372
- "/sparkdream.artifact.v1.MsgClaimEditionRewards": {
373
- aminoType: "sparkdream/x/artifact/MsgClaimEditionRewards",
374
- toAmino: tx_1.MsgClaimEditionRewards.toAmino,
375
- fromAmino: tx_1.MsgClaimEditionRewards.fromAmino
376
- },
377
- "/sparkdream.artifact.v1.MsgAddCraftRecipe": {
378
- aminoType: "sparkdream/x/artifact/MsgAddCraftRecipe",
379
- toAmino: tx_1.MsgAddCraftRecipe.toAmino,
380
- fromAmino: tx_1.MsgAddCraftRecipe.fromAmino
381
- },
382
- "/sparkdream.artifact.v1.MsgRemoveCraftRecipe": {
383
- aminoType: "sparkdream/x/artifact/MsgRemoveCraftRecipe",
384
- toAmino: tx_1.MsgRemoveCraftRecipe.toAmino,
385
- fromAmino: tx_1.MsgRemoveCraftRecipe.fromAmino
386
- },
387
- "/sparkdream.artifact.v1.MsgCraft": {
388
- aminoType: "sparkdream/x/artifact/MsgCraft",
389
- toAmino(message) {
390
- const obj = {};
391
- obj.crafter = message.crafter === "" ? undefined : message.crafter;
392
- obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
393
- obj.recipe_id = message.recipeId !== BigInt(0) ? message.recipeId?.toString() : undefined;
394
- obj.input_tokens = (message.inputTokens?.length ?? 0) > 0
395
- ? message.inputTokens.map((e) => e ? types_1.TokenRef.toAmino(e) : undefined)
396
- : undefined;
397
- return obj;
398
- },
399
- fromAmino: tx_1.MsgCraft.fromAmino
400
- },
401
- "/sparkdream.artifact.v1.MsgOfferRental": {
402
- aminoType: "sparkdream/x/artifact/MsgOfferRental",
403
- toAmino: tx_1.MsgOfferRental.toAmino,
404
- fromAmino: tx_1.MsgOfferRental.fromAmino
405
- },
406
- "/sparkdream.artifact.v1.MsgCancelRentalOffer": {
407
- aminoType: "sparkdream/x/artifact/MsgCancelRentalOffer",
408
- toAmino: tx_1.MsgCancelRentalOffer.toAmino,
409
- fromAmino: tx_1.MsgCancelRentalOffer.fromAmino
410
- },
411
- "/sparkdream.artifact.v1.MsgAcceptRental": {
412
- aminoType: "sparkdream/x/artifact/MsgAcceptRental",
413
- toAmino: tx_1.MsgAcceptRental.toAmino,
414
- fromAmino: tx_1.MsgAcceptRental.fromAmino
415
- },
416
- "/sparkdream.artifact.v1.MsgEndRental": {
417
- aminoType: "sparkdream/x/artifact/MsgEndRental",
418
- toAmino: tx_1.MsgEndRental.toAmino,
419
- fromAmino: tx_1.MsgEndRental.fromAmino
420
- },
421
- "/sparkdream.artifact.v1.MsgNest": {
422
- aminoType: "sparkdream/x/artifact/MsgNest",
423
- toAmino: tx_1.MsgNest.toAmino,
424
- fromAmino: tx_1.MsgNest.fromAmino
425
- },
426
- "/sparkdream.artifact.v1.MsgDetach": {
427
- aminoType: "sparkdream/x/artifact/MsgDetach",
428
- toAmino: tx_1.MsgDetach.toAmino,
429
- fromAmino: tx_1.MsgDetach.fromAmino
430
- },
431
- "/sparkdream.artifact.v1.MsgSetHarbergerPrice": {
432
- aminoType: "sparkdream/x/artifact/MsgSetHarbergerPrice",
433
- toAmino: tx_1.MsgSetHarbergerPrice.toAmino,
434
- fromAmino: tx_1.MsgSetHarbergerPrice.fromAmino
435
- },
436
- "/sparkdream.artifact.v1.MsgForceBuy": {
437
- aminoType: "sparkdream/x/artifact/MsgForceBuy",
438
- toAmino: tx_1.MsgForceBuy.toAmino,
439
- fromAmino: tx_1.MsgForceBuy.fromAmino
440
- },
441
- "/sparkdream.artifact.v1.MsgUpdateUnitListing": {
442
- aminoType: "sparkdream/x/artifact/MsgUpdateUnitListing",
443
- toAmino: tx_1.MsgUpdateUnitListing.toAmino,
444
- fromAmino: tx_1.MsgUpdateUnitListing.fromAmino
445
- },
446
- "/sparkdream.artifact.v1.MsgMakeOffer": {
447
- aminoType: "sparkdream/x/artifact/MsgMakeOffer",
448
- toAmino: tx_1.MsgMakeOffer.toAmino,
449
- fromAmino: tx_1.MsgMakeOffer.fromAmino
450
- },
451
- "/sparkdream.artifact.v1.MsgCancelOffer": {
452
- aminoType: "sparkdream/x/artifact/MsgCancelOffer",
453
- toAmino: tx_1.MsgCancelOffer.toAmino,
454
- fromAmino: tx_1.MsgCancelOffer.fromAmino
455
- },
456
- "/sparkdream.artifact.v1.MsgAcceptOffer": {
457
- aminoType: "sparkdream/x/artifact/MsgAcceptOffer",
458
- toAmino: tx_1.MsgAcceptOffer.toAmino,
459
- fromAmino: tx_1.MsgAcceptOffer.fromAmino
460
- },
461
- "/sparkdream.artifact.v1.MsgStartAuction": {
462
- aminoType: "sparkdream/x/artifact/MsgStartAuction",
463
- toAmino: tx_1.MsgStartAuction.toAmino,
464
- fromAmino: tx_1.MsgStartAuction.fromAmino
465
- },
466
- "/sparkdream.artifact.v1.MsgBid": {
467
- aminoType: "sparkdream/x/artifact/MsgBid",
468
- toAmino: tx_1.MsgBid.toAmino,
469
- fromAmino: tx_1.MsgBid.fromAmino
470
- },
471
- "/sparkdream.artifact.v1.MsgSettleAuction": {
472
- aminoType: "sparkdream/x/artifact/MsgSettleAuction",
473
- toAmino: tx_1.MsgSettleAuction.toAmino,
474
- fromAmino: tx_1.MsgSettleAuction.fromAmino
475
- },
476
- "/sparkdream.artifact.v1.MsgCancelAuction": {
477
- aminoType: "sparkdream/x/artifact/MsgCancelAuction",
478
- toAmino: tx_1.MsgCancelAuction.toAmino,
479
- fromAmino: tx_1.MsgCancelAuction.fromAmino
480
- }
481
- };
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.artifact.v1", tx);
@@ -122,6 +122,13 @@ export interface MsgCreateClass {
122
122
  * Harberger tokens; fixed at creation (tax_bps_per_year 0 = none).
123
123
  */
124
124
  harberger: HarbergerPolicy;
125
+ /**
126
+ * Optional: the id the client expects the class to get (NextClassId). When
127
+ * set, the tx fails unless the class gets exactly this id. A blind-mint
128
+ * commitment binds the class id into every leaf, so a class created under
129
+ * another id could never reveal; failing is the safe outcome. 0 = any id.
130
+ */
131
+ expectedClassId: bigint;
125
132
  }
126
133
  export interface MsgCreateClassProtoMsg {
127
134
  typeUrl: "/sparkdream.artifact.v1.MsgCreateClass";
@@ -179,6 +186,13 @@ export interface MsgCreateClassAmino {
179
186
  * Harberger tokens; fixed at creation (tax_bps_per_year 0 = none).
180
187
  */
181
188
  harberger: HarbergerPolicyAmino;
189
+ /**
190
+ * Optional: the id the client expects the class to get (NextClassId). When
191
+ * set, the tx fails unless the class gets exactly this id. A blind-mint
192
+ * commitment binds the class id into every leaf, so a class created under
193
+ * another id could never reveal; failing is the safe outcome. 0 = any id.
194
+ */
195
+ expected_class_id?: string;
182
196
  }
183
197
  export interface MsgCreateClassAminoMsg {
184
198
  type: "sparkdream/x/artifact/MsgCreateClass";
@@ -174,7 +174,8 @@ function createBaseMsgCreateClass() {
174
174
  reveal: types_1.RevealPolicy.fromPartial({}),
175
175
  renderer: types_1.Renderer.fromPartial({}),
176
176
  tokenModel: 0,
177
- harberger: types_1.HarbergerPolicy.fromPartial({})
177
+ harberger: types_1.HarbergerPolicy.fromPartial({}),
178
+ expectedClassId: BigInt(0)
178
179
  };
179
180
  }
180
181
  /**
@@ -247,6 +248,9 @@ exports.MsgCreateClass = {
247
248
  if (message.harberger !== undefined) {
248
249
  types_1.HarbergerPolicy.encode(message.harberger, writer.uint32(162).fork()).ldelim();
249
250
  }
251
+ if (message.expectedClassId !== BigInt(0)) {
252
+ writer.uint32(168).uint64(message.expectedClassId);
253
+ }
250
254
  return writer;
251
255
  },
252
256
  decode(input, length) {
@@ -316,6 +320,9 @@ exports.MsgCreateClass = {
316
320
  case 20:
317
321
  message.harberger = types_1.HarbergerPolicy.decode(reader, reader.uint32());
318
322
  break;
323
+ case 21:
324
+ message.expectedClassId = reader.uint64();
325
+ break;
319
326
  default:
320
327
  reader.skipType(tag & 7);
321
328
  break;
@@ -345,6 +352,7 @@ exports.MsgCreateClass = {
345
352
  message.renderer = object.renderer !== undefined && object.renderer !== null ? types_1.Renderer.fromPartial(object.renderer) : undefined;
346
353
  message.tokenModel = object.tokenModel ?? 0;
347
354
  message.harberger = object.harberger !== undefined && object.harberger !== null ? types_1.HarbergerPolicy.fromPartial(object.harberger) : undefined;
355
+ message.expectedClassId = object.expectedClassId !== undefined && object.expectedClassId !== null ? BigInt(object.expectedClassId.toString()) : BigInt(0);
348
356
  return message;
349
357
  },
350
358
  fromAmino(object) {
@@ -405,6 +413,9 @@ exports.MsgCreateClass = {
405
413
  if (object.harberger !== undefined && object.harberger !== null) {
406
414
  message.harberger = types_1.HarbergerPolicy.fromAmino(object.harberger);
407
415
  }
416
+ if (object.expected_class_id !== undefined && object.expected_class_id !== null) {
417
+ message.expectedClassId = BigInt(object.expected_class_id);
418
+ }
408
419
  return message;
409
420
  },
410
421
  toAmino(message) {
@@ -439,6 +450,7 @@ exports.MsgCreateClass = {
439
450
  obj.renderer = message.renderer ? types_1.Renderer.toAmino(message.renderer) : types_1.Renderer.toAmino(types_1.Renderer.fromPartial({}));
440
451
  obj.token_model = message.tokenModel === 0 ? undefined : message.tokenModel;
441
452
  obj.harberger = message.harberger ? types_1.HarbergerPolicy.toAmino(message.harberger) : types_1.HarbergerPolicy.toAmino(types_1.HarbergerPolicy.fromPartial({}));
453
+ obj.expected_class_id = message.expectedClassId !== BigInt(0) ? message.expectedClassId?.toString() : undefined;
442
454
  return obj;
443
455
  },
444
456
  fromAminoMsg(object) {