@sparkdreamnft/sparkdreamjs 0.0.44 → 0.0.46

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 (202) hide show
  1. package/akash/bundle.d.ts +134 -134
  2. package/akash/bundle.js +150 -150
  3. package/cosmos/bundle.d.ts +160 -160
  4. package/cosmos/bundle.js +182 -182
  5. package/esm/akash/bundle.js +150 -150
  6. package/esm/cosmos/bundle.js +182 -182
  7. package/esm/ibc/bundle.js +116 -116
  8. package/esm/nested-amino.js +6 -4
  9. package/esm/sparkdream/artifact/v1/genesis.js +217 -3
  10. package/esm/sparkdream/artifact/v1/params.js +146 -2
  11. package/esm/sparkdream/artifact/v1/query.js +3767 -5
  12. package/esm/sparkdream/artifact/v1/query.lcd.js +173 -0
  13. package/esm/sparkdream/artifact/v1/query.rpc.Query.js +195 -1
  14. package/esm/sparkdream/artifact/v1/tx.amino.js +324 -5
  15. package/esm/sparkdream/artifact/v1/tx.js +7498 -5
  16. package/esm/sparkdream/artifact/v1/tx.registry.js +704 -2
  17. package/esm/sparkdream/artifact/v1/tx.rpc.msg.js +241 -1
  18. package/esm/sparkdream/artifact/v1/types.js +4312 -1120
  19. package/esm/sparkdream/blog/v1/tx.amino.js +21 -1
  20. package/esm/sparkdream/bundle.js +329 -291
  21. package/esm/sparkdream/client.js +5 -2
  22. package/esm/sparkdream/collect/v1/tx.amino.js +16 -1
  23. package/esm/sparkdream/commons/v1/tx.amino.js +33 -1
  24. package/esm/sparkdream/commons/v1/tx.js +25 -1
  25. package/esm/sparkdream/federation/v1/tx.amino.js +51 -1
  26. package/esm/sparkdream/forum/v1/tx.amino.js +21 -1
  27. package/esm/sparkdream/guardian/v1/tx.amino.js +33 -3
  28. package/esm/sparkdream/lcd.js +5 -0
  29. package/esm/sparkdream/name/v1/genesis.js +32 -2
  30. package/esm/sparkdream/rep/v1/genesis.js +74 -1
  31. package/esm/sparkdream/rep/v1/member.js +110 -1
  32. package/esm/sparkdream/rep/v1/migration.js +957 -0
  33. package/esm/sparkdream/rep/v1/params.js +193 -1
  34. package/esm/sparkdream/rep/v1/query.js +1060 -0
  35. package/esm/sparkdream/rep/v1/query.lcd.js +48 -0
  36. package/esm/sparkdream/rep/v1/query.rpc.Query.js +65 -1
  37. package/esm/sparkdream/rep/v1/tx.amino.js +71 -1
  38. package/esm/sparkdream/rep/v1/tx.js +1886 -1
  39. package/esm/sparkdream/rep/v1/tx.registry.js +218 -2
  40. package/esm/sparkdream/rep/v1/tx.rpc.msg.js +75 -1
  41. package/esm/sparkdream/rpc.query.js +3 -0
  42. package/esm/sparkdream/rpc.tx.js +3 -0
  43. package/esm/sparkdream/season/v1/tx.amino.js +64 -2
  44. package/esm/sparkdream/season/v1/tx.js +33 -2
  45. package/esm/sparkdream/service/v1/operator.js +25 -1
  46. package/esm/sparkdream/service/v1/tx.amino.js +6 -1
  47. package/esm/sparkdream/service/v1/tx.js +163 -0
  48. package/esm/sparkdream/service/v1/tx.registry.js +20 -2
  49. package/esm/sparkdream/service/v1/tx.rpc.msg.js +11 -1
  50. package/esm/sparkdream/session/v1/grant.js +98 -6
  51. package/esm/sparkdream/session/v1/tx.amino.js +3 -0
  52. package/esm/sparkdream/session/v1/tx.js +53 -5
  53. package/esm/sparkdream/session/v1/tx.rpc.msg.js +2 -2
  54. package/esm/sparkdream/shield/v1/genesis.js +32 -2
  55. package/esm/sparkdream/shield/v1/params.js +13 -1
  56. package/esm/sparkdream/shield/v1/query.js +13 -1
  57. package/esm/sparkdream/shield/v1/types.js +414 -15
  58. package/esm/sparkdream/vault/module/v1/module.js +71 -0
  59. package/esm/sparkdream/vault/v1/genesis.js +104 -0
  60. package/esm/sparkdream/vault/v1/params.js +90 -0
  61. package/esm/sparkdream/vault/v1/query.js +1535 -0
  62. package/esm/sparkdream/vault/v1/query.lcd.js +100 -0
  63. package/esm/sparkdream/vault/v1/query.rpc.Query.js +111 -0
  64. package/esm/sparkdream/vault/v1/tx.amino.js +111 -0
  65. package/esm/sparkdream/vault/v1/tx.js +1393 -0
  66. package/esm/sparkdream/vault/v1/tx.registry.js +159 -0
  67. package/esm/sparkdream/vault/v1/tx.rpc.msg.js +60 -0
  68. package/esm/sparkdream/vault/v1/vault.js +163 -0
  69. package/esm/sparkdream/vault/v1/vault_proposal.js +277 -0
  70. package/esm/sparkdream/vault/v1/vault_signer.js +85 -0
  71. package/esm/tendermint/bundle.js +20 -20
  72. package/ibc/bundle.d.ts +99 -99
  73. package/ibc/bundle.js +116 -116
  74. package/nested-amino.d.ts +3 -2
  75. package/nested-amino.js +6 -4
  76. package/package.json +1 -13
  77. package/sparkdream/artifact/v1/genesis.d.ts +37 -4
  78. package/sparkdream/artifact/v1/genesis.js +216 -2
  79. package/sparkdream/artifact/v1/params.d.ts +92 -0
  80. package/sparkdream/artifact/v1/params.js +146 -2
  81. package/sparkdream/artifact/v1/query.d.ts +2373 -168
  82. package/sparkdream/artifact/v1/query.js +3768 -5
  83. package/sparkdream/artifact/v1/query.lcd.d.ts +22 -1
  84. package/sparkdream/artifact/v1/query.lcd.js +173 -0
  85. package/sparkdream/artifact/v1/query.rpc.Query.d.ts +98 -1
  86. package/sparkdream/artifact/v1/query.rpc.Query.js +194 -0
  87. package/sparkdream/artifact/v1/tx.amino.d.ts +200 -5
  88. package/sparkdream/artifact/v1/tx.amino.js +324 -5
  89. package/sparkdream/artifact/v1/tx.d.ts +5188 -930
  90. package/sparkdream/artifact/v1/tx.js +7499 -5
  91. package/sparkdream/artifact/v1/tx.registry.d.ts +469 -1
  92. package/sparkdream/artifact/v1/tx.registry.js +703 -1
  93. package/sparkdream/artifact/v1/tx.rpc.msg.d.ts +136 -1
  94. package/sparkdream/artifact/v1/tx.rpc.msg.js +240 -0
  95. package/sparkdream/artifact/v1/types.d.ts +1797 -25
  96. package/sparkdream/artifact/v1/types.js +4322 -1121
  97. package/sparkdream/blog/v1/tx.amino.d.ts +21 -1
  98. package/sparkdream/blog/v1/tx.amino.js +20 -0
  99. package/sparkdream/bundle.d.ts +13721 -9493
  100. package/sparkdream/bundle.js +329 -291
  101. package/sparkdream/client.d.ts +394 -9
  102. package/sparkdream/client.js +5 -2
  103. package/sparkdream/collect/v1/tx.amino.d.ts +16 -1
  104. package/sparkdream/collect/v1/tx.amino.js +15 -0
  105. package/sparkdream/commons/v1/tx.amino.d.ts +21 -1
  106. package/sparkdream/commons/v1/tx.amino.js +32 -0
  107. package/sparkdream/commons/v1/tx.d.ts +18 -0
  108. package/sparkdream/commons/v1/tx.js +25 -1
  109. package/sparkdream/federation/v1/tx.amino.d.ts +1 -1
  110. package/sparkdream/federation/v1/tx.amino.js +52 -2
  111. package/sparkdream/forum/v1/tx.amino.d.ts +21 -1
  112. package/sparkdream/forum/v1/tx.amino.js +20 -0
  113. package/sparkdream/guardian/v1/tx.amino.d.ts +3 -3
  114. package/sparkdream/guardian/v1/tx.amino.js +36 -5
  115. package/sparkdream/lcd.d.ts +3 -0
  116. package/sparkdream/lcd.js +5 -0
  117. package/sparkdream/name/v1/genesis.d.ts +23 -1
  118. package/sparkdream/name/v1/genesis.js +31 -1
  119. package/sparkdream/rep/v1/genesis.d.ts +19 -0
  120. package/sparkdream/rep/v1/genesis.js +74 -1
  121. package/sparkdream/rep/v1/member.d.ts +92 -0
  122. package/sparkdream/rep/v1/member.js +110 -1
  123. package/sparkdream/rep/v1/migration.d.ts +587 -0
  124. package/sparkdream/rep/v1/migration.js +964 -0
  125. package/sparkdream/rep/v1/params.d.ts +190 -0
  126. package/sparkdream/rep/v1/params.js +193 -1
  127. package/sparkdream/rep/v1/query.d.ts +679 -0
  128. package/sparkdream/rep/v1/query.js +1061 -1
  129. package/sparkdream/rep/v1/query.lcd.d.ts +8 -1
  130. package/sparkdream/rep/v1/query.lcd.js +48 -0
  131. package/sparkdream/rep/v1/query.rpc.Query.d.ts +32 -1
  132. package/sparkdream/rep/v1/query.rpc.Query.js +64 -0
  133. package/sparkdream/rep/v1/tx.amino.d.ts +71 -1
  134. package/sparkdream/rep/v1/tx.amino.js +70 -0
  135. package/sparkdream/rep/v1/tx.d.ts +1278 -0
  136. package/sparkdream/rep/v1/tx.js +1887 -2
  137. package/sparkdream/rep/v1/tx.registry.d.ts +145 -1
  138. package/sparkdream/rep/v1/tx.registry.js +217 -1
  139. package/sparkdream/rep/v1/tx.rpc.msg.d.ts +41 -1
  140. package/sparkdream/rep/v1/tx.rpc.msg.js +74 -0
  141. package/sparkdream/rpc.query.d.ts +42 -0
  142. package/sparkdream/rpc.query.js +3 -0
  143. package/sparkdream/rpc.tx.d.ts +3 -0
  144. package/sparkdream/rpc.tx.js +3 -0
  145. package/sparkdream/season/v1/tx.amino.d.ts +2 -2
  146. package/sparkdream/season/v1/tx.amino.js +65 -3
  147. package/sparkdream/season/v1/tx.d.ts +19 -0
  148. package/sparkdream/season/v1/tx.js +33 -2
  149. package/sparkdream/service/v1/operator.d.ts +30 -0
  150. package/sparkdream/service/v1/operator.js +25 -1
  151. package/sparkdream/service/v1/tx.amino.d.ts +6 -1
  152. package/sparkdream/service/v1/tx.amino.js +5 -0
  153. package/sparkdream/service/v1/tx.d.ts +119 -0
  154. package/sparkdream/service/v1/tx.js +164 -1
  155. package/sparkdream/service/v1/tx.registry.d.ts +13 -1
  156. package/sparkdream/service/v1/tx.registry.js +19 -1
  157. package/sparkdream/service/v1/tx.rpc.msg.d.ts +10 -1
  158. package/sparkdream/service/v1/tx.rpc.msg.js +10 -0
  159. package/sparkdream/session/v1/grant.d.ts +75 -7
  160. package/sparkdream/session/v1/grant.js +99 -7
  161. package/sparkdream/session/v1/tx.amino.js +3 -0
  162. package/sparkdream/session/v1/tx.d.ts +36 -4
  163. package/sparkdream/session/v1/tx.js +52 -4
  164. package/sparkdream/session/v1/tx.rpc.msg.d.ts +2 -2
  165. package/sparkdream/session/v1/tx.rpc.msg.js +2 -2
  166. package/sparkdream/shield/v1/genesis.d.ts +17 -1
  167. package/sparkdream/shield/v1/genesis.js +31 -1
  168. package/sparkdream/shield/v1/params.d.ts +16 -4
  169. package/sparkdream/shield/v1/params.js +13 -1
  170. package/sparkdream/shield/v1/query.d.ts +8 -0
  171. package/sparkdream/shield/v1/query.js +13 -1
  172. package/sparkdream/shield/v1/tx.d.ts +36 -10
  173. package/sparkdream/shield/v1/types.d.ts +294 -13
  174. package/sparkdream/shield/v1/types.js +415 -16
  175. package/sparkdream/vault/module/v1/module.d.ts +54 -0
  176. package/sparkdream/vault/module/v1/module.js +74 -0
  177. package/sparkdream/vault/v1/genesis.d.ts +59 -0
  178. package/sparkdream/vault/v1/genesis.js +107 -0
  179. package/sparkdream/vault/v1/params.d.ts +68 -0
  180. package/sparkdream/vault/v1/params.js +93 -0
  181. package/sparkdream/vault/v1/query.d.ts +935 -0
  182. package/sparkdream/vault/v1/query.js +1538 -0
  183. package/sparkdream/vault/v1/query.lcd.d.ts +18 -0
  184. package/sparkdream/vault/v1/query.lcd.js +104 -0
  185. package/sparkdream/vault/v1/query.rpc.Query.d.ts +56 -0
  186. package/sparkdream/vault/v1/query.rpc.Query.js +116 -0
  187. package/sparkdream/vault/v1/tx.amino.d.ts +44 -0
  188. package/sparkdream/vault/v1/tx.amino.js +115 -0
  189. package/sparkdream/vault/v1/tx.d.ts +826 -0
  190. package/sparkdream/vault/v1/tx.js +1399 -0
  191. package/sparkdream/vault/v1/tx.registry.d.ts +109 -0
  192. package/sparkdream/vault/v1/tx.registry.js +163 -0
  193. package/sparkdream/vault/v1/tx.rpc.msg.d.ts +37 -0
  194. package/sparkdream/vault/v1/tx.rpc.msg.js +65 -0
  195. package/sparkdream/vault/v1/vault.d.ts +117 -0
  196. package/sparkdream/vault/v1/vault.js +166 -0
  197. package/sparkdream/vault/v1/vault_proposal.d.ts +158 -0
  198. package/sparkdream/vault/v1/vault_proposal.js +285 -0
  199. package/sparkdream/vault/v1/vault_signer.d.ts +54 -0
  200. package/sparkdream/vault/v1/vault_signer.js +88 -0
  201. package/tendermint/bundle.d.ts +844 -844
  202. package/tendermint/bundle.js +20 -20
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QueryPublicMintQuoteResponse = exports.QueryPublicMintQuoteRequest = exports.QueryHideRecordsByTargetResponse = exports.QueryHideRecordsByTargetRequest = exports.QueryHideRecordResponse = exports.QueryHideRecordRequest = exports.QueryPendingClassOwnerResponse = exports.QueryPendingClassOwnerRequest = exports.QueryReceivePolicyResponse = exports.QueryReceivePolicyRequest = exports.QueryOutboxResponse = exports.QueryOutboxRequest = exports.QueryInboxResponse = exports.QueryInboxRequest = exports.QueryListingsBySellerResponse = exports.QueryListingsBySellerRequest = exports.QueryListingsResponse = exports.QueryListingsRequest = exports.QueryListingResponse = exports.QueryListingRequest = exports.QuerySupplyResponse = exports.QuerySupplyRequest = exports.QueryOwnerResponse = exports.QueryOwnerRequest = exports.QueryTokensByOwnerResponse = exports.QueryTokensByOwnerRequest = exports.QueryTokensResponse = exports.QueryTokensRequest = exports.QueryTokenResponse = exports.QueryTokenRequest = exports.QueryClassesByOwnerResponse = exports.QueryClassesByOwnerRequest = exports.QueryClassesResponse = exports.QueryClassesRequest = exports.QueryClassResponse = exports.QueryClassRequest = exports.InboxItem = exports.TokenView = exports.ClassView = exports.QueryParamsResponse = exports.QueryParamsRequest = void 0;
3
+ exports.QueryBalanceRequest = exports.QueryEditionsResponse = exports.QueryEditionsRequest = exports.QueryEditionResponse = exports.QueryEditionRequest = exports.BalanceView = exports.EditionView = exports.QueryMediaProposalsResponse = exports.QueryMediaProposalsRequest = exports.QueryPublicMintQuoteResponse = exports.QueryPublicMintQuoteRequest = exports.QueryHideRecordsByTargetResponse = exports.QueryHideRecordsByTargetRequest = exports.QueryHideRecordResponse = exports.QueryHideRecordRequest = exports.QueryPendingClassOwnerResponse = exports.QueryPendingClassOwnerRequest = exports.QueryReceivePolicyResponse = exports.QueryReceivePolicyRequest = exports.QueryOutboxResponse = exports.QueryOutboxRequest = exports.QueryInboxResponse = exports.QueryInboxRequest = exports.QueryListingsBySellerResponse = exports.QueryListingsBySellerRequest = exports.QueryListingsResponse = exports.QueryListingsRequest = exports.QueryListingResponse = exports.QueryListingRequest = exports.QuerySupplyResponse = exports.QuerySupplyRequest = exports.QueryOwnerResponse = exports.QueryOwnerRequest = exports.QueryTokensByOwnerResponse = exports.QueryTokensByOwnerRequest = exports.QueryTokensResponse = exports.QueryTokensRequest = exports.QueryTokenResponse = exports.QueryTokenRequest = exports.QueryClassesByOwnerResponse = exports.QueryClassesByOwnerRequest = exports.QueryClassesResponse = exports.QueryClassesRequest = exports.QueryClassResponse = exports.QueryClassRequest = exports.InboxItem = exports.TokenView = exports.ClassView = exports.QueryParamsResponse = exports.QueryParamsRequest = void 0;
4
+ exports.QueryRentalOffersResponse = exports.QueryRentalOffersRequest = exports.QueryAuctionsBySellerResponse = exports.QueryAuctionsBySellerRequest = exports.QueryAuctionsResponse = exports.QueryAuctionsRequest = exports.QueryAuctionResponse = exports.QueryAuctionRequest = exports.QueryOffersByBidderResponse = exports.QueryOffersByBidderRequest = exports.QueryOffersResponse = exports.QueryOffersRequest = exports.QueryOfferResponse = exports.QueryOfferRequest = exports.QueryHarbergerQuoteResponse = exports.QueryHarbergerQuoteRequest = exports.QueryChildrenResponse = exports.QueryChildrenRequest = exports.QueryRentalsByUserResponse = exports.QueryRentalsByUserRequest = exports.QueryRentalOfferResponse = exports.QueryRentalOfferRequest = exports.QueryRentalResponse = exports.QueryRentalRequest = exports.QueryCraftRecipesResponse = exports.QueryCraftRecipesRequest = exports.QueryUnitListingsResponse = exports.QueryUnitListingsRequest = exports.QueryUnitListingResponse = exports.QueryUnitListingRequest = exports.QueryEditionHoldersResponse = exports.QueryEditionHoldersRequest = exports.QueryBalancesByOwnerResponse = exports.QueryBalancesByOwnerRequest = exports.QueryBalanceResponse = void 0;
4
5
  //@ts-nocheck
5
6
  const pagination_1 = require("../../../cosmos/base/query/v1beta1/pagination");
6
7
  const params_1 = require("./params");
@@ -219,7 +220,15 @@ function createBaseTokenView() {
219
220
  token: types_1.Token.fromPartial({}),
220
221
  withheld: false,
221
222
  metadataHash: "",
222
- classStatus: 0
223
+ classStatus: 0,
224
+ displayedMetadata: types_1.TokenMetadata.fromPartial({}),
225
+ displaySource: "",
226
+ renderError: "",
227
+ expired: false,
228
+ seed: "",
229
+ contentsHash: "",
230
+ user: "",
231
+ harbergerPrice: ""
223
232
  };
224
233
  }
225
234
  /**
@@ -244,6 +253,30 @@ exports.TokenView = {
244
253
  if (message.classStatus !== 0) {
245
254
  writer.uint32(32).int32(message.classStatus);
246
255
  }
256
+ if (message.displayedMetadata !== undefined) {
257
+ types_1.TokenMetadata.encode(message.displayedMetadata, writer.uint32(42).fork()).ldelim();
258
+ }
259
+ if (message.displaySource !== "") {
260
+ writer.uint32(50).string(message.displaySource);
261
+ }
262
+ if (message.renderError !== "") {
263
+ writer.uint32(58).string(message.renderError);
264
+ }
265
+ if (message.expired === true) {
266
+ writer.uint32(64).bool(message.expired);
267
+ }
268
+ if (message.seed !== "") {
269
+ writer.uint32(74).string(message.seed);
270
+ }
271
+ if (message.contentsHash !== "") {
272
+ writer.uint32(82).string(message.contentsHash);
273
+ }
274
+ if (message.user !== "") {
275
+ writer.uint32(90).string(message.user);
276
+ }
277
+ if (message.harbergerPrice !== "") {
278
+ writer.uint32(98).string(message.harbergerPrice);
279
+ }
247
280
  return writer;
248
281
  },
249
282
  decode(input, length) {
@@ -265,6 +298,30 @@ exports.TokenView = {
265
298
  case 4:
266
299
  message.classStatus = reader.int32();
267
300
  break;
301
+ case 5:
302
+ message.displayedMetadata = types_1.TokenMetadata.decode(reader, reader.uint32());
303
+ break;
304
+ case 6:
305
+ message.displaySource = reader.string();
306
+ break;
307
+ case 7:
308
+ message.renderError = reader.string();
309
+ break;
310
+ case 8:
311
+ message.expired = reader.bool();
312
+ break;
313
+ case 9:
314
+ message.seed = reader.string();
315
+ break;
316
+ case 10:
317
+ message.contentsHash = reader.string();
318
+ break;
319
+ case 11:
320
+ message.user = reader.string();
321
+ break;
322
+ case 12:
323
+ message.harbergerPrice = reader.string();
324
+ break;
268
325
  default:
269
326
  reader.skipType(tag & 7);
270
327
  break;
@@ -278,6 +335,14 @@ exports.TokenView = {
278
335
  message.withheld = object.withheld ?? false;
279
336
  message.metadataHash = object.metadataHash ?? "";
280
337
  message.classStatus = object.classStatus ?? 0;
338
+ message.displayedMetadata = object.displayedMetadata !== undefined && object.displayedMetadata !== null ? types_1.TokenMetadata.fromPartial(object.displayedMetadata) : undefined;
339
+ message.displaySource = object.displaySource ?? "";
340
+ message.renderError = object.renderError ?? "";
341
+ message.expired = object.expired ?? false;
342
+ message.seed = object.seed ?? "";
343
+ message.contentsHash = object.contentsHash ?? "";
344
+ message.user = object.user ?? "";
345
+ message.harbergerPrice = object.harbergerPrice ?? "";
281
346
  return message;
282
347
  },
283
348
  fromAmino(object) {
@@ -294,6 +359,30 @@ exports.TokenView = {
294
359
  if (object.class_status !== undefined && object.class_status !== null) {
295
360
  message.classStatus = object.class_status;
296
361
  }
362
+ if (object.displayed_metadata !== undefined && object.displayed_metadata !== null) {
363
+ message.displayedMetadata = types_1.TokenMetadata.fromAmino(object.displayed_metadata);
364
+ }
365
+ if (object.display_source !== undefined && object.display_source !== null) {
366
+ message.displaySource = object.display_source;
367
+ }
368
+ if (object.render_error !== undefined && object.render_error !== null) {
369
+ message.renderError = object.render_error;
370
+ }
371
+ if (object.expired !== undefined && object.expired !== null) {
372
+ message.expired = object.expired;
373
+ }
374
+ if (object.seed !== undefined && object.seed !== null) {
375
+ message.seed = object.seed;
376
+ }
377
+ if (object.contents_hash !== undefined && object.contents_hash !== null) {
378
+ message.contentsHash = object.contents_hash;
379
+ }
380
+ if (object.user !== undefined && object.user !== null) {
381
+ message.user = object.user;
382
+ }
383
+ if (object.harberger_price !== undefined && object.harberger_price !== null) {
384
+ message.harbergerPrice = object.harberger_price;
385
+ }
297
386
  return message;
298
387
  },
299
388
  toAmino(message) {
@@ -302,6 +391,14 @@ exports.TokenView = {
302
391
  obj.withheld = message.withheld === false ? undefined : message.withheld;
303
392
  obj.metadata_hash = message.metadataHash === "" ? undefined : message.metadataHash;
304
393
  obj.class_status = message.classStatus === 0 ? undefined : message.classStatus;
394
+ obj.displayed_metadata = message.displayedMetadata ? types_1.TokenMetadata.toAmino(message.displayedMetadata) : undefined;
395
+ obj.display_source = message.displaySource === "" ? undefined : message.displaySource;
396
+ obj.render_error = message.renderError === "" ? undefined : message.renderError;
397
+ obj.expired = message.expired === false ? undefined : message.expired;
398
+ obj.seed = message.seed === "" ? undefined : message.seed;
399
+ obj.contents_hash = message.contentsHash === "" ? undefined : message.contentsHash;
400
+ obj.user = message.user === "" ? undefined : message.user;
401
+ obj.harberger_price = message.harbergerPrice === "" ? undefined : message.harbergerPrice;
305
402
  return obj;
306
403
  },
307
404
  fromAminoMsg(object) {
@@ -331,7 +428,10 @@ function createBaseInboxItem() {
331
428
  expiresAt: BigInt(0),
332
429
  metadata: types_1.TokenMetadata.fromPartial({}),
333
430
  metadataHash: "",
334
- withheld: false
431
+ withheld: false,
432
+ unitClassId: BigInt(0),
433
+ editionId: BigInt(0),
434
+ amount: BigInt(0)
335
435
  };
336
436
  }
337
437
  /**
@@ -373,6 +473,15 @@ exports.InboxItem = {
373
473
  if (message.withheld === true) {
374
474
  writer.uint32(80).bool(message.withheld);
375
475
  }
476
+ if (message.unitClassId !== BigInt(0)) {
477
+ writer.uint32(88).uint64(message.unitClassId);
478
+ }
479
+ if (message.editionId !== BigInt(0)) {
480
+ writer.uint32(96).uint64(message.editionId);
481
+ }
482
+ if (message.amount !== BigInt(0)) {
483
+ writer.uint32(104).uint64(message.amount);
484
+ }
376
485
  return writer;
377
486
  },
378
487
  decode(input, length) {
@@ -412,6 +521,15 @@ exports.InboxItem = {
412
521
  case 10:
413
522
  message.withheld = reader.bool();
414
523
  break;
524
+ case 11:
525
+ message.unitClassId = reader.uint64();
526
+ break;
527
+ case 12:
528
+ message.editionId = reader.uint64();
529
+ break;
530
+ case 13:
531
+ message.amount = reader.uint64();
532
+ break;
415
533
  default:
416
534
  reader.skipType(tag & 7);
417
535
  break;
@@ -431,6 +549,9 @@ exports.InboxItem = {
431
549
  message.metadata = object.metadata !== undefined && object.metadata !== null ? types_1.TokenMetadata.fromPartial(object.metadata) : undefined;
432
550
  message.metadataHash = object.metadataHash ?? "";
433
551
  message.withheld = object.withheld ?? false;
552
+ message.unitClassId = object.unitClassId !== undefined && object.unitClassId !== null ? BigInt(object.unitClassId.toString()) : BigInt(0);
553
+ message.editionId = object.editionId !== undefined && object.editionId !== null ? BigInt(object.editionId.toString()) : BigInt(0);
554
+ message.amount = object.amount !== undefined && object.amount !== null ? BigInt(object.amount.toString()) : BigInt(0);
434
555
  return message;
435
556
  },
436
557
  fromAmino(object) {
@@ -465,6 +586,15 @@ exports.InboxItem = {
465
586
  if (object.withheld !== undefined && object.withheld !== null) {
466
587
  message.withheld = object.withheld;
467
588
  }
589
+ if (object.unit_class_id !== undefined && object.unit_class_id !== null) {
590
+ message.unitClassId = BigInt(object.unit_class_id);
591
+ }
592
+ if (object.edition_id !== undefined && object.edition_id !== null) {
593
+ message.editionId = BigInt(object.edition_id);
594
+ }
595
+ if (object.amount !== undefined && object.amount !== null) {
596
+ message.amount = BigInt(object.amount);
597
+ }
468
598
  return message;
469
599
  },
470
600
  toAmino(message) {
@@ -479,6 +609,9 @@ exports.InboxItem = {
479
609
  obj.metadata = message.metadata ? types_1.TokenMetadata.toAmino(message.metadata) : undefined;
480
610
  obj.metadata_hash = message.metadataHash === "" ? undefined : message.metadataHash;
481
611
  obj.withheld = message.withheld === false ? undefined : message.withheld;
612
+ obj.unit_class_id = message.unitClassId !== BigInt(0) ? message.unitClassId?.toString() : undefined;
613
+ obj.edition_id = message.editionId !== BigInt(0) ? message.editionId?.toString() : undefined;
614
+ obj.amount = message.amount !== BigInt(0) ? message.amount?.toString() : undefined;
482
615
  return obj;
483
616
  },
484
617
  fromAminoMsg(object) {
@@ -1037,7 +1170,8 @@ exports.QueryTokenRequest = {
1037
1170
  function createBaseQueryTokenResponse() {
1038
1171
  return {
1039
1172
  token: exports.TokenView.fromPartial({}),
1040
- listing: undefined
1173
+ listing: undefined,
1174
+ auction: undefined
1041
1175
  };
1042
1176
  }
1043
1177
  /**
@@ -1055,6 +1189,9 @@ exports.QueryTokenResponse = {
1055
1189
  if (message.listing !== undefined) {
1056
1190
  types_1.Listing.encode(message.listing, writer.uint32(18).fork()).ldelim();
1057
1191
  }
1192
+ if (message.auction !== undefined) {
1193
+ types_1.Auction.encode(message.auction, writer.uint32(26).fork()).ldelim();
1194
+ }
1058
1195
  return writer;
1059
1196
  },
1060
1197
  decode(input, length) {
@@ -1070,6 +1207,9 @@ exports.QueryTokenResponse = {
1070
1207
  case 2:
1071
1208
  message.listing = types_1.Listing.decode(reader, reader.uint32());
1072
1209
  break;
1210
+ case 3:
1211
+ message.auction = types_1.Auction.decode(reader, reader.uint32());
1212
+ break;
1073
1213
  default:
1074
1214
  reader.skipType(tag & 7);
1075
1215
  break;
@@ -1081,6 +1221,7 @@ exports.QueryTokenResponse = {
1081
1221
  const message = createBaseQueryTokenResponse();
1082
1222
  message.token = object.token !== undefined && object.token !== null ? exports.TokenView.fromPartial(object.token) : undefined;
1083
1223
  message.listing = object.listing !== undefined && object.listing !== null ? types_1.Listing.fromPartial(object.listing) : undefined;
1224
+ message.auction = object.auction !== undefined && object.auction !== null ? types_1.Auction.fromPartial(object.auction) : undefined;
1084
1225
  return message;
1085
1226
  },
1086
1227
  fromAmino(object) {
@@ -1091,12 +1232,16 @@ exports.QueryTokenResponse = {
1091
1232
  if (object.listing !== undefined && object.listing !== null) {
1092
1233
  message.listing = types_1.Listing.fromAmino(object.listing);
1093
1234
  }
1235
+ if (object.auction !== undefined && object.auction !== null) {
1236
+ message.auction = types_1.Auction.fromAmino(object.auction);
1237
+ }
1094
1238
  return message;
1095
1239
  },
1096
1240
  toAmino(message) {
1097
1241
  const obj = {};
1098
1242
  obj.token = message.token ? exports.TokenView.toAmino(message.token) : undefined;
1099
1243
  obj.listing = message.listing ? types_1.Listing.toAmino(message.listing) : undefined;
1244
+ obj.auction = message.auction ? types_1.Auction.toAmino(message.auction) : undefined;
1100
1245
  return obj;
1101
1246
  },
1102
1247
  fromAminoMsg(object) {
@@ -3294,7 +3439,9 @@ function createBaseQueryPublicMintQuoteResponse() {
3294
3439
  deposit: coin_1.Coin.fromPartial({}),
3295
3440
  remainingAllowance: BigInt(0),
3296
3441
  available: false,
3297
- reason: ""
3442
+ reason: "",
3443
+ unitPrice: coin_1.Coin.fromPartial({}),
3444
+ maxUnitPrice: coin_1.Coin.fromPartial({})
3298
3445
  };
3299
3446
  }
3300
3447
  /**
@@ -3324,6 +3471,12 @@ exports.QueryPublicMintQuoteResponse = {
3324
3471
  if (message.reason !== "") {
3325
3472
  writer.uint32(50).string(message.reason);
3326
3473
  }
3474
+ if (message.unitPrice !== undefined) {
3475
+ coin_1.Coin.encode(message.unitPrice, writer.uint32(58).fork()).ldelim();
3476
+ }
3477
+ if (message.maxUnitPrice !== undefined) {
3478
+ coin_1.Coin.encode(message.maxUnitPrice, writer.uint32(66).fork()).ldelim();
3479
+ }
3327
3480
  return writer;
3328
3481
  },
3329
3482
  decode(input, length) {
@@ -3351,6 +3504,12 @@ exports.QueryPublicMintQuoteResponse = {
3351
3504
  case 6:
3352
3505
  message.reason = reader.string();
3353
3506
  break;
3507
+ case 7:
3508
+ message.unitPrice = coin_1.Coin.decode(reader, reader.uint32());
3509
+ break;
3510
+ case 8:
3511
+ message.maxUnitPrice = coin_1.Coin.decode(reader, reader.uint32());
3512
+ break;
3354
3513
  default:
3355
3514
  reader.skipType(tag & 7);
3356
3515
  break;
@@ -3366,6 +3525,8 @@ exports.QueryPublicMintQuoteResponse = {
3366
3525
  message.remainingAllowance = object.remainingAllowance !== undefined && object.remainingAllowance !== null ? BigInt(object.remainingAllowance.toString()) : BigInt(0);
3367
3526
  message.available = object.available ?? false;
3368
3527
  message.reason = object.reason ?? "";
3528
+ message.unitPrice = object.unitPrice !== undefined && object.unitPrice !== null ? coin_1.Coin.fromPartial(object.unitPrice) : undefined;
3529
+ message.maxUnitPrice = object.maxUnitPrice !== undefined && object.maxUnitPrice !== null ? coin_1.Coin.fromPartial(object.maxUnitPrice) : undefined;
3369
3530
  return message;
3370
3531
  },
3371
3532
  fromAmino(object) {
@@ -3388,6 +3549,12 @@ exports.QueryPublicMintQuoteResponse = {
3388
3549
  if (object.reason !== undefined && object.reason !== null) {
3389
3550
  message.reason = object.reason;
3390
3551
  }
3552
+ if (object.unit_price !== undefined && object.unit_price !== null) {
3553
+ message.unitPrice = coin_1.Coin.fromAmino(object.unit_price);
3554
+ }
3555
+ if (object.max_unit_price !== undefined && object.max_unit_price !== null) {
3556
+ message.maxUnitPrice = coin_1.Coin.fromAmino(object.max_unit_price);
3557
+ }
3391
3558
  return message;
3392
3559
  },
3393
3560
  toAmino(message) {
@@ -3398,6 +3565,8 @@ exports.QueryPublicMintQuoteResponse = {
3398
3565
  obj.remaining_allowance = message.remainingAllowance !== BigInt(0) ? message.remainingAllowance?.toString() : undefined;
3399
3566
  obj.available = message.available === false ? undefined : message.available;
3400
3567
  obj.reason = message.reason === "" ? undefined : message.reason;
3568
+ obj.unit_price = message.unitPrice ? coin_1.Coin.toAmino(message.unitPrice) : undefined;
3569
+ obj.max_unit_price = message.maxUnitPrice ? coin_1.Coin.toAmino(message.maxUnitPrice) : undefined;
3401
3570
  return obj;
3402
3571
  },
3403
3572
  fromAminoMsg(object) {
@@ -3416,3 +3585,3597 @@ exports.QueryPublicMintQuoteResponse = {
3416
3585
  };
3417
3586
  }
3418
3587
  };
3588
+ function createBaseQueryMediaProposalsRequest() {
3589
+ return {
3590
+ classId: BigInt(0),
3591
+ tokenId: BigInt(0)
3592
+ };
3593
+ }
3594
+ /**
3595
+ * QueryMediaProposalsRequest defines the QueryMediaProposalsRequest message.
3596
+ * @name QueryMediaProposalsRequest
3597
+ * @package sparkdream.artifact.v1
3598
+ * @see proto type: sparkdream.artifact.v1.QueryMediaProposalsRequest
3599
+ */
3600
+ exports.QueryMediaProposalsRequest = {
3601
+ typeUrl: "/sparkdream.artifact.v1.QueryMediaProposalsRequest",
3602
+ encode(message, writer = binary_1.BinaryWriter.create()) {
3603
+ if (message.classId !== BigInt(0)) {
3604
+ writer.uint32(8).uint64(message.classId);
3605
+ }
3606
+ if (message.tokenId !== BigInt(0)) {
3607
+ writer.uint32(16).uint64(message.tokenId);
3608
+ }
3609
+ return writer;
3610
+ },
3611
+ decode(input, length) {
3612
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
3613
+ let end = length === undefined ? reader.len : reader.pos + length;
3614
+ const message = createBaseQueryMediaProposalsRequest();
3615
+ while (reader.pos < end) {
3616
+ const tag = reader.uint32();
3617
+ switch (tag >>> 3) {
3618
+ case 1:
3619
+ message.classId = reader.uint64();
3620
+ break;
3621
+ case 2:
3622
+ message.tokenId = reader.uint64();
3623
+ break;
3624
+ default:
3625
+ reader.skipType(tag & 7);
3626
+ break;
3627
+ }
3628
+ }
3629
+ return message;
3630
+ },
3631
+ fromPartial(object) {
3632
+ const message = createBaseQueryMediaProposalsRequest();
3633
+ message.classId = object.classId !== undefined && object.classId !== null ? BigInt(object.classId.toString()) : BigInt(0);
3634
+ message.tokenId = object.tokenId !== undefined && object.tokenId !== null ? BigInt(object.tokenId.toString()) : BigInt(0);
3635
+ return message;
3636
+ },
3637
+ fromAmino(object) {
3638
+ const message = createBaseQueryMediaProposalsRequest();
3639
+ if (object.class_id !== undefined && object.class_id !== null) {
3640
+ message.classId = BigInt(object.class_id);
3641
+ }
3642
+ if (object.token_id !== undefined && object.token_id !== null) {
3643
+ message.tokenId = BigInt(object.token_id);
3644
+ }
3645
+ return message;
3646
+ },
3647
+ toAmino(message) {
3648
+ const obj = {};
3649
+ obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
3650
+ obj.token_id = message.tokenId !== BigInt(0) ? message.tokenId?.toString() : undefined;
3651
+ return obj;
3652
+ },
3653
+ fromAminoMsg(object) {
3654
+ return exports.QueryMediaProposalsRequest.fromAmino(object.value);
3655
+ },
3656
+ fromProtoMsg(message) {
3657
+ return exports.QueryMediaProposalsRequest.decode(message.value);
3658
+ },
3659
+ toProto(message) {
3660
+ return exports.QueryMediaProposalsRequest.encode(message).finish();
3661
+ },
3662
+ toProtoMsg(message) {
3663
+ return {
3664
+ typeUrl: "/sparkdream.artifact.v1.QueryMediaProposalsRequest",
3665
+ value: exports.QueryMediaProposalsRequest.encode(message).finish()
3666
+ };
3667
+ }
3668
+ };
3669
+ function createBaseQueryMediaProposalsResponse() {
3670
+ return {
3671
+ proposals: []
3672
+ };
3673
+ }
3674
+ /**
3675
+ * QueryMediaProposalsResponse defines the QueryMediaProposalsResponse message.
3676
+ * @name QueryMediaProposalsResponse
3677
+ * @package sparkdream.artifact.v1
3678
+ * @see proto type: sparkdream.artifact.v1.QueryMediaProposalsResponse
3679
+ */
3680
+ exports.QueryMediaProposalsResponse = {
3681
+ typeUrl: "/sparkdream.artifact.v1.QueryMediaProposalsResponse",
3682
+ encode(message, writer = binary_1.BinaryWriter.create()) {
3683
+ for (const v of message.proposals) {
3684
+ types_1.MediaProposal.encode(v, writer.uint32(10).fork()).ldelim();
3685
+ }
3686
+ return writer;
3687
+ },
3688
+ decode(input, length) {
3689
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
3690
+ let end = length === undefined ? reader.len : reader.pos + length;
3691
+ const message = createBaseQueryMediaProposalsResponse();
3692
+ while (reader.pos < end) {
3693
+ const tag = reader.uint32();
3694
+ switch (tag >>> 3) {
3695
+ case 1:
3696
+ message.proposals.push(types_1.MediaProposal.decode(reader, reader.uint32()));
3697
+ break;
3698
+ default:
3699
+ reader.skipType(tag & 7);
3700
+ break;
3701
+ }
3702
+ }
3703
+ return message;
3704
+ },
3705
+ fromPartial(object) {
3706
+ const message = createBaseQueryMediaProposalsResponse();
3707
+ message.proposals = object.proposals?.map(e => types_1.MediaProposal.fromPartial(e)) || [];
3708
+ return message;
3709
+ },
3710
+ fromAmino(object) {
3711
+ const message = createBaseQueryMediaProposalsResponse();
3712
+ message.proposals = object.proposals?.map(e => types_1.MediaProposal.fromAmino(e)) || [];
3713
+ return message;
3714
+ },
3715
+ toAmino(message) {
3716
+ const obj = {};
3717
+ if (message.proposals) {
3718
+ obj.proposals = message.proposals.map(e => e ? types_1.MediaProposal.toAmino(e) : undefined);
3719
+ }
3720
+ else {
3721
+ obj.proposals = message.proposals;
3722
+ }
3723
+ return obj;
3724
+ },
3725
+ fromAminoMsg(object) {
3726
+ return exports.QueryMediaProposalsResponse.fromAmino(object.value);
3727
+ },
3728
+ fromProtoMsg(message) {
3729
+ return exports.QueryMediaProposalsResponse.decode(message.value);
3730
+ },
3731
+ toProto(message) {
3732
+ return exports.QueryMediaProposalsResponse.encode(message).finish();
3733
+ },
3734
+ toProtoMsg(message) {
3735
+ return {
3736
+ typeUrl: "/sparkdream.artifact.v1.QueryMediaProposalsResponse",
3737
+ value: exports.QueryMediaProposalsResponse.encode(message).finish()
3738
+ };
3739
+ }
3740
+ };
3741
+ function createBaseEditionView() {
3742
+ return {
3743
+ edition: types_1.Edition.fromPartial({}),
3744
+ withheld: false,
3745
+ metadataHash: "",
3746
+ classStatus: 0
3747
+ };
3748
+ }
3749
+ /**
3750
+ * EditionView is an edition as served to clients. When withheld is true the
3751
+ * metadata and claim scope are blanked because the edition or its class is
3752
+ * hidden.
3753
+ * @name EditionView
3754
+ * @package sparkdream.artifact.v1
3755
+ * @see proto type: sparkdream.artifact.v1.EditionView
3756
+ */
3757
+ exports.EditionView = {
3758
+ typeUrl: "/sparkdream.artifact.v1.EditionView",
3759
+ encode(message, writer = binary_1.BinaryWriter.create()) {
3760
+ if (message.edition !== undefined) {
3761
+ types_1.Edition.encode(message.edition, writer.uint32(10).fork()).ldelim();
3762
+ }
3763
+ if (message.withheld === true) {
3764
+ writer.uint32(16).bool(message.withheld);
3765
+ }
3766
+ if (message.metadataHash !== "") {
3767
+ writer.uint32(26).string(message.metadataHash);
3768
+ }
3769
+ if (message.classStatus !== 0) {
3770
+ writer.uint32(32).int32(message.classStatus);
3771
+ }
3772
+ return writer;
3773
+ },
3774
+ decode(input, length) {
3775
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
3776
+ let end = length === undefined ? reader.len : reader.pos + length;
3777
+ const message = createBaseEditionView();
3778
+ while (reader.pos < end) {
3779
+ const tag = reader.uint32();
3780
+ switch (tag >>> 3) {
3781
+ case 1:
3782
+ message.edition = types_1.Edition.decode(reader, reader.uint32());
3783
+ break;
3784
+ case 2:
3785
+ message.withheld = reader.bool();
3786
+ break;
3787
+ case 3:
3788
+ message.metadataHash = reader.string();
3789
+ break;
3790
+ case 4:
3791
+ message.classStatus = reader.int32();
3792
+ break;
3793
+ default:
3794
+ reader.skipType(tag & 7);
3795
+ break;
3796
+ }
3797
+ }
3798
+ return message;
3799
+ },
3800
+ fromPartial(object) {
3801
+ const message = createBaseEditionView();
3802
+ message.edition = object.edition !== undefined && object.edition !== null ? types_1.Edition.fromPartial(object.edition) : undefined;
3803
+ message.withheld = object.withheld ?? false;
3804
+ message.metadataHash = object.metadataHash ?? "";
3805
+ message.classStatus = object.classStatus ?? 0;
3806
+ return message;
3807
+ },
3808
+ fromAmino(object) {
3809
+ const message = createBaseEditionView();
3810
+ if (object.edition !== undefined && object.edition !== null) {
3811
+ message.edition = types_1.Edition.fromAmino(object.edition);
3812
+ }
3813
+ if (object.withheld !== undefined && object.withheld !== null) {
3814
+ message.withheld = object.withheld;
3815
+ }
3816
+ if (object.metadata_hash !== undefined && object.metadata_hash !== null) {
3817
+ message.metadataHash = object.metadata_hash;
3818
+ }
3819
+ if (object.class_status !== undefined && object.class_status !== null) {
3820
+ message.classStatus = object.class_status;
3821
+ }
3822
+ return message;
3823
+ },
3824
+ toAmino(message) {
3825
+ const obj = {};
3826
+ obj.edition = message.edition ? types_1.Edition.toAmino(message.edition) : undefined;
3827
+ obj.withheld = message.withheld === false ? undefined : message.withheld;
3828
+ obj.metadata_hash = message.metadataHash === "" ? undefined : message.metadataHash;
3829
+ obj.class_status = message.classStatus === 0 ? undefined : message.classStatus;
3830
+ return obj;
3831
+ },
3832
+ fromAminoMsg(object) {
3833
+ return exports.EditionView.fromAmino(object.value);
3834
+ },
3835
+ fromProtoMsg(message) {
3836
+ return exports.EditionView.decode(message.value);
3837
+ },
3838
+ toProto(message) {
3839
+ return exports.EditionView.encode(message).finish();
3840
+ },
3841
+ toProtoMsg(message) {
3842
+ return {
3843
+ typeUrl: "/sparkdream.artifact.v1.EditionView",
3844
+ value: exports.EditionView.encode(message).finish()
3845
+ };
3846
+ }
3847
+ };
3848
+ function createBaseBalanceView() {
3849
+ return {
3850
+ balance: types_1.Balance.fromPartial({}),
3851
+ claimable: ""
3852
+ };
3853
+ }
3854
+ /**
3855
+ * BalanceView is a balance with what its holder could claim now.
3856
+ * @name BalanceView
3857
+ * @package sparkdream.artifact.v1
3858
+ * @see proto type: sparkdream.artifact.v1.BalanceView
3859
+ */
3860
+ exports.BalanceView = {
3861
+ typeUrl: "/sparkdream.artifact.v1.BalanceView",
3862
+ encode(message, writer = binary_1.BinaryWriter.create()) {
3863
+ if (message.balance !== undefined) {
3864
+ types_1.Balance.encode(message.balance, writer.uint32(10).fork()).ldelim();
3865
+ }
3866
+ if (message.claimable !== "") {
3867
+ writer.uint32(18).string(message.claimable);
3868
+ }
3869
+ return writer;
3870
+ },
3871
+ decode(input, length) {
3872
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
3873
+ let end = length === undefined ? reader.len : reader.pos + length;
3874
+ const message = createBaseBalanceView();
3875
+ while (reader.pos < end) {
3876
+ const tag = reader.uint32();
3877
+ switch (tag >>> 3) {
3878
+ case 1:
3879
+ message.balance = types_1.Balance.decode(reader, reader.uint32());
3880
+ break;
3881
+ case 2:
3882
+ message.claimable = reader.string();
3883
+ break;
3884
+ default:
3885
+ reader.skipType(tag & 7);
3886
+ break;
3887
+ }
3888
+ }
3889
+ return message;
3890
+ },
3891
+ fromPartial(object) {
3892
+ const message = createBaseBalanceView();
3893
+ message.balance = object.balance !== undefined && object.balance !== null ? types_1.Balance.fromPartial(object.balance) : undefined;
3894
+ message.claimable = object.claimable ?? "";
3895
+ return message;
3896
+ },
3897
+ fromAmino(object) {
3898
+ const message = createBaseBalanceView();
3899
+ if (object.balance !== undefined && object.balance !== null) {
3900
+ message.balance = types_1.Balance.fromAmino(object.balance);
3901
+ }
3902
+ if (object.claimable !== undefined && object.claimable !== null) {
3903
+ message.claimable = object.claimable;
3904
+ }
3905
+ return message;
3906
+ },
3907
+ toAmino(message) {
3908
+ const obj = {};
3909
+ obj.balance = message.balance ? types_1.Balance.toAmino(message.balance) : undefined;
3910
+ obj.claimable = message.claimable === "" ? undefined : message.claimable;
3911
+ return obj;
3912
+ },
3913
+ fromAminoMsg(object) {
3914
+ return exports.BalanceView.fromAmino(object.value);
3915
+ },
3916
+ fromProtoMsg(message) {
3917
+ return exports.BalanceView.decode(message.value);
3918
+ },
3919
+ toProto(message) {
3920
+ return exports.BalanceView.encode(message).finish();
3921
+ },
3922
+ toProtoMsg(message) {
3923
+ return {
3924
+ typeUrl: "/sparkdream.artifact.v1.BalanceView",
3925
+ value: exports.BalanceView.encode(message).finish()
3926
+ };
3927
+ }
3928
+ };
3929
+ function createBaseQueryEditionRequest() {
3930
+ return {
3931
+ classId: BigInt(0),
3932
+ editionId: BigInt(0)
3933
+ };
3934
+ }
3935
+ /**
3936
+ * QueryEditionRequest defines the QueryEditionRequest message.
3937
+ * @name QueryEditionRequest
3938
+ * @package sparkdream.artifact.v1
3939
+ * @see proto type: sparkdream.artifact.v1.QueryEditionRequest
3940
+ */
3941
+ exports.QueryEditionRequest = {
3942
+ typeUrl: "/sparkdream.artifact.v1.QueryEditionRequest",
3943
+ encode(message, writer = binary_1.BinaryWriter.create()) {
3944
+ if (message.classId !== BigInt(0)) {
3945
+ writer.uint32(8).uint64(message.classId);
3946
+ }
3947
+ if (message.editionId !== BigInt(0)) {
3948
+ writer.uint32(16).uint64(message.editionId);
3949
+ }
3950
+ return writer;
3951
+ },
3952
+ decode(input, length) {
3953
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
3954
+ let end = length === undefined ? reader.len : reader.pos + length;
3955
+ const message = createBaseQueryEditionRequest();
3956
+ while (reader.pos < end) {
3957
+ const tag = reader.uint32();
3958
+ switch (tag >>> 3) {
3959
+ case 1:
3960
+ message.classId = reader.uint64();
3961
+ break;
3962
+ case 2:
3963
+ message.editionId = reader.uint64();
3964
+ break;
3965
+ default:
3966
+ reader.skipType(tag & 7);
3967
+ break;
3968
+ }
3969
+ }
3970
+ return message;
3971
+ },
3972
+ fromPartial(object) {
3973
+ const message = createBaseQueryEditionRequest();
3974
+ message.classId = object.classId !== undefined && object.classId !== null ? BigInt(object.classId.toString()) : BigInt(0);
3975
+ message.editionId = object.editionId !== undefined && object.editionId !== null ? BigInt(object.editionId.toString()) : BigInt(0);
3976
+ return message;
3977
+ },
3978
+ fromAmino(object) {
3979
+ const message = createBaseQueryEditionRequest();
3980
+ if (object.class_id !== undefined && object.class_id !== null) {
3981
+ message.classId = BigInt(object.class_id);
3982
+ }
3983
+ if (object.edition_id !== undefined && object.edition_id !== null) {
3984
+ message.editionId = BigInt(object.edition_id);
3985
+ }
3986
+ return message;
3987
+ },
3988
+ toAmino(message) {
3989
+ const obj = {};
3990
+ obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
3991
+ obj.edition_id = message.editionId !== BigInt(0) ? message.editionId?.toString() : undefined;
3992
+ return obj;
3993
+ },
3994
+ fromAminoMsg(object) {
3995
+ return exports.QueryEditionRequest.fromAmino(object.value);
3996
+ },
3997
+ fromProtoMsg(message) {
3998
+ return exports.QueryEditionRequest.decode(message.value);
3999
+ },
4000
+ toProto(message) {
4001
+ return exports.QueryEditionRequest.encode(message).finish();
4002
+ },
4003
+ toProtoMsg(message) {
4004
+ return {
4005
+ typeUrl: "/sparkdream.artifact.v1.QueryEditionRequest",
4006
+ value: exports.QueryEditionRequest.encode(message).finish()
4007
+ };
4008
+ }
4009
+ };
4010
+ function createBaseQueryEditionResponse() {
4011
+ return {
4012
+ edition: exports.EditionView.fromPartial({})
4013
+ };
4014
+ }
4015
+ /**
4016
+ * QueryEditionResponse defines the QueryEditionResponse message.
4017
+ * @name QueryEditionResponse
4018
+ * @package sparkdream.artifact.v1
4019
+ * @see proto type: sparkdream.artifact.v1.QueryEditionResponse
4020
+ */
4021
+ exports.QueryEditionResponse = {
4022
+ typeUrl: "/sparkdream.artifact.v1.QueryEditionResponse",
4023
+ encode(message, writer = binary_1.BinaryWriter.create()) {
4024
+ if (message.edition !== undefined) {
4025
+ exports.EditionView.encode(message.edition, writer.uint32(10).fork()).ldelim();
4026
+ }
4027
+ return writer;
4028
+ },
4029
+ decode(input, length) {
4030
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
4031
+ let end = length === undefined ? reader.len : reader.pos + length;
4032
+ const message = createBaseQueryEditionResponse();
4033
+ while (reader.pos < end) {
4034
+ const tag = reader.uint32();
4035
+ switch (tag >>> 3) {
4036
+ case 1:
4037
+ message.edition = exports.EditionView.decode(reader, reader.uint32());
4038
+ break;
4039
+ default:
4040
+ reader.skipType(tag & 7);
4041
+ break;
4042
+ }
4043
+ }
4044
+ return message;
4045
+ },
4046
+ fromPartial(object) {
4047
+ const message = createBaseQueryEditionResponse();
4048
+ message.edition = object.edition !== undefined && object.edition !== null ? exports.EditionView.fromPartial(object.edition) : undefined;
4049
+ return message;
4050
+ },
4051
+ fromAmino(object) {
4052
+ const message = createBaseQueryEditionResponse();
4053
+ if (object.edition !== undefined && object.edition !== null) {
4054
+ message.edition = exports.EditionView.fromAmino(object.edition);
4055
+ }
4056
+ return message;
4057
+ },
4058
+ toAmino(message) {
4059
+ const obj = {};
4060
+ obj.edition = message.edition ? exports.EditionView.toAmino(message.edition) : undefined;
4061
+ return obj;
4062
+ },
4063
+ fromAminoMsg(object) {
4064
+ return exports.QueryEditionResponse.fromAmino(object.value);
4065
+ },
4066
+ fromProtoMsg(message) {
4067
+ return exports.QueryEditionResponse.decode(message.value);
4068
+ },
4069
+ toProto(message) {
4070
+ return exports.QueryEditionResponse.encode(message).finish();
4071
+ },
4072
+ toProtoMsg(message) {
4073
+ return {
4074
+ typeUrl: "/sparkdream.artifact.v1.QueryEditionResponse",
4075
+ value: exports.QueryEditionResponse.encode(message).finish()
4076
+ };
4077
+ }
4078
+ };
4079
+ function createBaseQueryEditionsRequest() {
4080
+ return {
4081
+ classId: BigInt(0),
4082
+ pagination: undefined
4083
+ };
4084
+ }
4085
+ /**
4086
+ * QueryEditionsRequest defines the QueryEditionsRequest message.
4087
+ * @name QueryEditionsRequest
4088
+ * @package sparkdream.artifact.v1
4089
+ * @see proto type: sparkdream.artifact.v1.QueryEditionsRequest
4090
+ */
4091
+ exports.QueryEditionsRequest = {
4092
+ typeUrl: "/sparkdream.artifact.v1.QueryEditionsRequest",
4093
+ encode(message, writer = binary_1.BinaryWriter.create()) {
4094
+ if (message.classId !== BigInt(0)) {
4095
+ writer.uint32(8).uint64(message.classId);
4096
+ }
4097
+ if (message.pagination !== undefined) {
4098
+ pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4099
+ }
4100
+ return writer;
4101
+ },
4102
+ decode(input, length) {
4103
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
4104
+ let end = length === undefined ? reader.len : reader.pos + length;
4105
+ const message = createBaseQueryEditionsRequest();
4106
+ while (reader.pos < end) {
4107
+ const tag = reader.uint32();
4108
+ switch (tag >>> 3) {
4109
+ case 1:
4110
+ message.classId = reader.uint64();
4111
+ break;
4112
+ case 2:
4113
+ message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
4114
+ break;
4115
+ default:
4116
+ reader.skipType(tag & 7);
4117
+ break;
4118
+ }
4119
+ }
4120
+ return message;
4121
+ },
4122
+ fromPartial(object) {
4123
+ const message = createBaseQueryEditionsRequest();
4124
+ message.classId = object.classId !== undefined && object.classId !== null ? BigInt(object.classId.toString()) : BigInt(0);
4125
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
4126
+ return message;
4127
+ },
4128
+ fromAmino(object) {
4129
+ const message = createBaseQueryEditionsRequest();
4130
+ if (object.class_id !== undefined && object.class_id !== null) {
4131
+ message.classId = BigInt(object.class_id);
4132
+ }
4133
+ if (object.pagination !== undefined && object.pagination !== null) {
4134
+ message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
4135
+ }
4136
+ return message;
4137
+ },
4138
+ toAmino(message) {
4139
+ const obj = {};
4140
+ obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
4141
+ obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
4142
+ return obj;
4143
+ },
4144
+ fromAminoMsg(object) {
4145
+ return exports.QueryEditionsRequest.fromAmino(object.value);
4146
+ },
4147
+ fromProtoMsg(message) {
4148
+ return exports.QueryEditionsRequest.decode(message.value);
4149
+ },
4150
+ toProto(message) {
4151
+ return exports.QueryEditionsRequest.encode(message).finish();
4152
+ },
4153
+ toProtoMsg(message) {
4154
+ return {
4155
+ typeUrl: "/sparkdream.artifact.v1.QueryEditionsRequest",
4156
+ value: exports.QueryEditionsRequest.encode(message).finish()
4157
+ };
4158
+ }
4159
+ };
4160
+ function createBaseQueryEditionsResponse() {
4161
+ return {
4162
+ editions: [],
4163
+ pagination: undefined
4164
+ };
4165
+ }
4166
+ /**
4167
+ * QueryEditionsResponse defines the QueryEditionsResponse message.
4168
+ * @name QueryEditionsResponse
4169
+ * @package sparkdream.artifact.v1
4170
+ * @see proto type: sparkdream.artifact.v1.QueryEditionsResponse
4171
+ */
4172
+ exports.QueryEditionsResponse = {
4173
+ typeUrl: "/sparkdream.artifact.v1.QueryEditionsResponse",
4174
+ encode(message, writer = binary_1.BinaryWriter.create()) {
4175
+ for (const v of message.editions) {
4176
+ exports.EditionView.encode(v, writer.uint32(10).fork()).ldelim();
4177
+ }
4178
+ if (message.pagination !== undefined) {
4179
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4180
+ }
4181
+ return writer;
4182
+ },
4183
+ decode(input, length) {
4184
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
4185
+ let end = length === undefined ? reader.len : reader.pos + length;
4186
+ const message = createBaseQueryEditionsResponse();
4187
+ while (reader.pos < end) {
4188
+ const tag = reader.uint32();
4189
+ switch (tag >>> 3) {
4190
+ case 1:
4191
+ message.editions.push(exports.EditionView.decode(reader, reader.uint32()));
4192
+ break;
4193
+ case 2:
4194
+ message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
4195
+ break;
4196
+ default:
4197
+ reader.skipType(tag & 7);
4198
+ break;
4199
+ }
4200
+ }
4201
+ return message;
4202
+ },
4203
+ fromPartial(object) {
4204
+ const message = createBaseQueryEditionsResponse();
4205
+ message.editions = object.editions?.map(e => exports.EditionView.fromPartial(e)) || [];
4206
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
4207
+ return message;
4208
+ },
4209
+ fromAmino(object) {
4210
+ const message = createBaseQueryEditionsResponse();
4211
+ message.editions = object.editions?.map(e => exports.EditionView.fromAmino(e)) || [];
4212
+ if (object.pagination !== undefined && object.pagination !== null) {
4213
+ message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
4214
+ }
4215
+ return message;
4216
+ },
4217
+ toAmino(message) {
4218
+ const obj = {};
4219
+ if (message.editions) {
4220
+ obj.editions = message.editions.map(e => e ? exports.EditionView.toAmino(e) : undefined);
4221
+ }
4222
+ else {
4223
+ obj.editions = message.editions;
4224
+ }
4225
+ obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
4226
+ return obj;
4227
+ },
4228
+ fromAminoMsg(object) {
4229
+ return exports.QueryEditionsResponse.fromAmino(object.value);
4230
+ },
4231
+ fromProtoMsg(message) {
4232
+ return exports.QueryEditionsResponse.decode(message.value);
4233
+ },
4234
+ toProto(message) {
4235
+ return exports.QueryEditionsResponse.encode(message).finish();
4236
+ },
4237
+ toProtoMsg(message) {
4238
+ return {
4239
+ typeUrl: "/sparkdream.artifact.v1.QueryEditionsResponse",
4240
+ value: exports.QueryEditionsResponse.encode(message).finish()
4241
+ };
4242
+ }
4243
+ };
4244
+ function createBaseQueryBalanceRequest() {
4245
+ return {
4246
+ classId: BigInt(0),
4247
+ editionId: BigInt(0),
4248
+ owner: ""
4249
+ };
4250
+ }
4251
+ /**
4252
+ * QueryBalanceRequest defines the QueryBalanceRequest message.
4253
+ * @name QueryBalanceRequest
4254
+ * @package sparkdream.artifact.v1
4255
+ * @see proto type: sparkdream.artifact.v1.QueryBalanceRequest
4256
+ */
4257
+ exports.QueryBalanceRequest = {
4258
+ typeUrl: "/sparkdream.artifact.v1.QueryBalanceRequest",
4259
+ encode(message, writer = binary_1.BinaryWriter.create()) {
4260
+ if (message.classId !== BigInt(0)) {
4261
+ writer.uint32(8).uint64(message.classId);
4262
+ }
4263
+ if (message.editionId !== BigInt(0)) {
4264
+ writer.uint32(16).uint64(message.editionId);
4265
+ }
4266
+ if (message.owner !== "") {
4267
+ writer.uint32(26).string(message.owner);
4268
+ }
4269
+ return writer;
4270
+ },
4271
+ decode(input, length) {
4272
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
4273
+ let end = length === undefined ? reader.len : reader.pos + length;
4274
+ const message = createBaseQueryBalanceRequest();
4275
+ while (reader.pos < end) {
4276
+ const tag = reader.uint32();
4277
+ switch (tag >>> 3) {
4278
+ case 1:
4279
+ message.classId = reader.uint64();
4280
+ break;
4281
+ case 2:
4282
+ message.editionId = reader.uint64();
4283
+ break;
4284
+ case 3:
4285
+ message.owner = reader.string();
4286
+ break;
4287
+ default:
4288
+ reader.skipType(tag & 7);
4289
+ break;
4290
+ }
4291
+ }
4292
+ return message;
4293
+ },
4294
+ fromPartial(object) {
4295
+ const message = createBaseQueryBalanceRequest();
4296
+ message.classId = object.classId !== undefined && object.classId !== null ? BigInt(object.classId.toString()) : BigInt(0);
4297
+ message.editionId = object.editionId !== undefined && object.editionId !== null ? BigInt(object.editionId.toString()) : BigInt(0);
4298
+ message.owner = object.owner ?? "";
4299
+ return message;
4300
+ },
4301
+ fromAmino(object) {
4302
+ const message = createBaseQueryBalanceRequest();
4303
+ if (object.class_id !== undefined && object.class_id !== null) {
4304
+ message.classId = BigInt(object.class_id);
4305
+ }
4306
+ if (object.edition_id !== undefined && object.edition_id !== null) {
4307
+ message.editionId = BigInt(object.edition_id);
4308
+ }
4309
+ if (object.owner !== undefined && object.owner !== null) {
4310
+ message.owner = object.owner;
4311
+ }
4312
+ return message;
4313
+ },
4314
+ toAmino(message) {
4315
+ const obj = {};
4316
+ obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
4317
+ obj.edition_id = message.editionId !== BigInt(0) ? message.editionId?.toString() : undefined;
4318
+ obj.owner = message.owner === "" ? undefined : message.owner;
4319
+ return obj;
4320
+ },
4321
+ fromAminoMsg(object) {
4322
+ return exports.QueryBalanceRequest.fromAmino(object.value);
4323
+ },
4324
+ fromProtoMsg(message) {
4325
+ return exports.QueryBalanceRequest.decode(message.value);
4326
+ },
4327
+ toProto(message) {
4328
+ return exports.QueryBalanceRequest.encode(message).finish();
4329
+ },
4330
+ toProtoMsg(message) {
4331
+ return {
4332
+ typeUrl: "/sparkdream.artifact.v1.QueryBalanceRequest",
4333
+ value: exports.QueryBalanceRequest.encode(message).finish()
4334
+ };
4335
+ }
4336
+ };
4337
+ function createBaseQueryBalanceResponse() {
4338
+ return {
4339
+ balance: exports.BalanceView.fromPartial({})
4340
+ };
4341
+ }
4342
+ /**
4343
+ * QueryBalanceResponse defines the QueryBalanceResponse message.
4344
+ * @name QueryBalanceResponse
4345
+ * @package sparkdream.artifact.v1
4346
+ * @see proto type: sparkdream.artifact.v1.QueryBalanceResponse
4347
+ */
4348
+ exports.QueryBalanceResponse = {
4349
+ typeUrl: "/sparkdream.artifact.v1.QueryBalanceResponse",
4350
+ encode(message, writer = binary_1.BinaryWriter.create()) {
4351
+ if (message.balance !== undefined) {
4352
+ exports.BalanceView.encode(message.balance, writer.uint32(10).fork()).ldelim();
4353
+ }
4354
+ return writer;
4355
+ },
4356
+ decode(input, length) {
4357
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
4358
+ let end = length === undefined ? reader.len : reader.pos + length;
4359
+ const message = createBaseQueryBalanceResponse();
4360
+ while (reader.pos < end) {
4361
+ const tag = reader.uint32();
4362
+ switch (tag >>> 3) {
4363
+ case 1:
4364
+ message.balance = exports.BalanceView.decode(reader, reader.uint32());
4365
+ break;
4366
+ default:
4367
+ reader.skipType(tag & 7);
4368
+ break;
4369
+ }
4370
+ }
4371
+ return message;
4372
+ },
4373
+ fromPartial(object) {
4374
+ const message = createBaseQueryBalanceResponse();
4375
+ message.balance = object.balance !== undefined && object.balance !== null ? exports.BalanceView.fromPartial(object.balance) : undefined;
4376
+ return message;
4377
+ },
4378
+ fromAmino(object) {
4379
+ const message = createBaseQueryBalanceResponse();
4380
+ if (object.balance !== undefined && object.balance !== null) {
4381
+ message.balance = exports.BalanceView.fromAmino(object.balance);
4382
+ }
4383
+ return message;
4384
+ },
4385
+ toAmino(message) {
4386
+ const obj = {};
4387
+ obj.balance = message.balance ? exports.BalanceView.toAmino(message.balance) : undefined;
4388
+ return obj;
4389
+ },
4390
+ fromAminoMsg(object) {
4391
+ return exports.QueryBalanceResponse.fromAmino(object.value);
4392
+ },
4393
+ fromProtoMsg(message) {
4394
+ return exports.QueryBalanceResponse.decode(message.value);
4395
+ },
4396
+ toProto(message) {
4397
+ return exports.QueryBalanceResponse.encode(message).finish();
4398
+ },
4399
+ toProtoMsg(message) {
4400
+ return {
4401
+ typeUrl: "/sparkdream.artifact.v1.QueryBalanceResponse",
4402
+ value: exports.QueryBalanceResponse.encode(message).finish()
4403
+ };
4404
+ }
4405
+ };
4406
+ function createBaseQueryBalancesByOwnerRequest() {
4407
+ return {
4408
+ owner: "",
4409
+ pagination: undefined
4410
+ };
4411
+ }
4412
+ /**
4413
+ * QueryBalancesByOwnerRequest defines the QueryBalancesByOwnerRequest message.
4414
+ * @name QueryBalancesByOwnerRequest
4415
+ * @package sparkdream.artifact.v1
4416
+ * @see proto type: sparkdream.artifact.v1.QueryBalancesByOwnerRequest
4417
+ */
4418
+ exports.QueryBalancesByOwnerRequest = {
4419
+ typeUrl: "/sparkdream.artifact.v1.QueryBalancesByOwnerRequest",
4420
+ encode(message, writer = binary_1.BinaryWriter.create()) {
4421
+ if (message.owner !== "") {
4422
+ writer.uint32(10).string(message.owner);
4423
+ }
4424
+ if (message.pagination !== undefined) {
4425
+ pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4426
+ }
4427
+ return writer;
4428
+ },
4429
+ decode(input, length) {
4430
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
4431
+ let end = length === undefined ? reader.len : reader.pos + length;
4432
+ const message = createBaseQueryBalancesByOwnerRequest();
4433
+ while (reader.pos < end) {
4434
+ const tag = reader.uint32();
4435
+ switch (tag >>> 3) {
4436
+ case 1:
4437
+ message.owner = reader.string();
4438
+ break;
4439
+ case 2:
4440
+ message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
4441
+ break;
4442
+ default:
4443
+ reader.skipType(tag & 7);
4444
+ break;
4445
+ }
4446
+ }
4447
+ return message;
4448
+ },
4449
+ fromPartial(object) {
4450
+ const message = createBaseQueryBalancesByOwnerRequest();
4451
+ message.owner = object.owner ?? "";
4452
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
4453
+ return message;
4454
+ },
4455
+ fromAmino(object) {
4456
+ const message = createBaseQueryBalancesByOwnerRequest();
4457
+ if (object.owner !== undefined && object.owner !== null) {
4458
+ message.owner = object.owner;
4459
+ }
4460
+ if (object.pagination !== undefined && object.pagination !== null) {
4461
+ message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
4462
+ }
4463
+ return message;
4464
+ },
4465
+ toAmino(message) {
4466
+ const obj = {};
4467
+ obj.owner = message.owner === "" ? undefined : message.owner;
4468
+ obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
4469
+ return obj;
4470
+ },
4471
+ fromAminoMsg(object) {
4472
+ return exports.QueryBalancesByOwnerRequest.fromAmino(object.value);
4473
+ },
4474
+ fromProtoMsg(message) {
4475
+ return exports.QueryBalancesByOwnerRequest.decode(message.value);
4476
+ },
4477
+ toProto(message) {
4478
+ return exports.QueryBalancesByOwnerRequest.encode(message).finish();
4479
+ },
4480
+ toProtoMsg(message) {
4481
+ return {
4482
+ typeUrl: "/sparkdream.artifact.v1.QueryBalancesByOwnerRequest",
4483
+ value: exports.QueryBalancesByOwnerRequest.encode(message).finish()
4484
+ };
4485
+ }
4486
+ };
4487
+ function createBaseQueryBalancesByOwnerResponse() {
4488
+ return {
4489
+ balances: [],
4490
+ pagination: undefined
4491
+ };
4492
+ }
4493
+ /**
4494
+ * QueryBalancesByOwnerResponse defines the QueryBalancesByOwnerResponse message.
4495
+ * @name QueryBalancesByOwnerResponse
4496
+ * @package sparkdream.artifact.v1
4497
+ * @see proto type: sparkdream.artifact.v1.QueryBalancesByOwnerResponse
4498
+ */
4499
+ exports.QueryBalancesByOwnerResponse = {
4500
+ typeUrl: "/sparkdream.artifact.v1.QueryBalancesByOwnerResponse",
4501
+ encode(message, writer = binary_1.BinaryWriter.create()) {
4502
+ for (const v of message.balances) {
4503
+ exports.BalanceView.encode(v, writer.uint32(10).fork()).ldelim();
4504
+ }
4505
+ if (message.pagination !== undefined) {
4506
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4507
+ }
4508
+ return writer;
4509
+ },
4510
+ decode(input, length) {
4511
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
4512
+ let end = length === undefined ? reader.len : reader.pos + length;
4513
+ const message = createBaseQueryBalancesByOwnerResponse();
4514
+ while (reader.pos < end) {
4515
+ const tag = reader.uint32();
4516
+ switch (tag >>> 3) {
4517
+ case 1:
4518
+ message.balances.push(exports.BalanceView.decode(reader, reader.uint32()));
4519
+ break;
4520
+ case 2:
4521
+ message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
4522
+ break;
4523
+ default:
4524
+ reader.skipType(tag & 7);
4525
+ break;
4526
+ }
4527
+ }
4528
+ return message;
4529
+ },
4530
+ fromPartial(object) {
4531
+ const message = createBaseQueryBalancesByOwnerResponse();
4532
+ message.balances = object.balances?.map(e => exports.BalanceView.fromPartial(e)) || [];
4533
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
4534
+ return message;
4535
+ },
4536
+ fromAmino(object) {
4537
+ const message = createBaseQueryBalancesByOwnerResponse();
4538
+ message.balances = object.balances?.map(e => exports.BalanceView.fromAmino(e)) || [];
4539
+ if (object.pagination !== undefined && object.pagination !== null) {
4540
+ message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
4541
+ }
4542
+ return message;
4543
+ },
4544
+ toAmino(message) {
4545
+ const obj = {};
4546
+ if (message.balances) {
4547
+ obj.balances = message.balances.map(e => e ? exports.BalanceView.toAmino(e) : undefined);
4548
+ }
4549
+ else {
4550
+ obj.balances = message.balances;
4551
+ }
4552
+ obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
4553
+ return obj;
4554
+ },
4555
+ fromAminoMsg(object) {
4556
+ return exports.QueryBalancesByOwnerResponse.fromAmino(object.value);
4557
+ },
4558
+ fromProtoMsg(message) {
4559
+ return exports.QueryBalancesByOwnerResponse.decode(message.value);
4560
+ },
4561
+ toProto(message) {
4562
+ return exports.QueryBalancesByOwnerResponse.encode(message).finish();
4563
+ },
4564
+ toProtoMsg(message) {
4565
+ return {
4566
+ typeUrl: "/sparkdream.artifact.v1.QueryBalancesByOwnerResponse",
4567
+ value: exports.QueryBalancesByOwnerResponse.encode(message).finish()
4568
+ };
4569
+ }
4570
+ };
4571
+ function createBaseQueryEditionHoldersRequest() {
4572
+ return {
4573
+ classId: BigInt(0),
4574
+ editionId: BigInt(0),
4575
+ pagination: undefined
4576
+ };
4577
+ }
4578
+ /**
4579
+ * QueryEditionHoldersRequest defines the QueryEditionHoldersRequest message.
4580
+ * @name QueryEditionHoldersRequest
4581
+ * @package sparkdream.artifact.v1
4582
+ * @see proto type: sparkdream.artifact.v1.QueryEditionHoldersRequest
4583
+ */
4584
+ exports.QueryEditionHoldersRequest = {
4585
+ typeUrl: "/sparkdream.artifact.v1.QueryEditionHoldersRequest",
4586
+ encode(message, writer = binary_1.BinaryWriter.create()) {
4587
+ if (message.classId !== BigInt(0)) {
4588
+ writer.uint32(8).uint64(message.classId);
4589
+ }
4590
+ if (message.editionId !== BigInt(0)) {
4591
+ writer.uint32(16).uint64(message.editionId);
4592
+ }
4593
+ if (message.pagination !== undefined) {
4594
+ pagination_1.PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim();
4595
+ }
4596
+ return writer;
4597
+ },
4598
+ decode(input, length) {
4599
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
4600
+ let end = length === undefined ? reader.len : reader.pos + length;
4601
+ const message = createBaseQueryEditionHoldersRequest();
4602
+ while (reader.pos < end) {
4603
+ const tag = reader.uint32();
4604
+ switch (tag >>> 3) {
4605
+ case 1:
4606
+ message.classId = reader.uint64();
4607
+ break;
4608
+ case 2:
4609
+ message.editionId = reader.uint64();
4610
+ break;
4611
+ case 3:
4612
+ message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
4613
+ break;
4614
+ default:
4615
+ reader.skipType(tag & 7);
4616
+ break;
4617
+ }
4618
+ }
4619
+ return message;
4620
+ },
4621
+ fromPartial(object) {
4622
+ const message = createBaseQueryEditionHoldersRequest();
4623
+ message.classId = object.classId !== undefined && object.classId !== null ? BigInt(object.classId.toString()) : BigInt(0);
4624
+ message.editionId = object.editionId !== undefined && object.editionId !== null ? BigInt(object.editionId.toString()) : BigInt(0);
4625
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
4626
+ return message;
4627
+ },
4628
+ fromAmino(object) {
4629
+ const message = createBaseQueryEditionHoldersRequest();
4630
+ if (object.class_id !== undefined && object.class_id !== null) {
4631
+ message.classId = BigInt(object.class_id);
4632
+ }
4633
+ if (object.edition_id !== undefined && object.edition_id !== null) {
4634
+ message.editionId = BigInt(object.edition_id);
4635
+ }
4636
+ if (object.pagination !== undefined && object.pagination !== null) {
4637
+ message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
4638
+ }
4639
+ return message;
4640
+ },
4641
+ toAmino(message) {
4642
+ const obj = {};
4643
+ obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
4644
+ obj.edition_id = message.editionId !== BigInt(0) ? message.editionId?.toString() : undefined;
4645
+ obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
4646
+ return obj;
4647
+ },
4648
+ fromAminoMsg(object) {
4649
+ return exports.QueryEditionHoldersRequest.fromAmino(object.value);
4650
+ },
4651
+ fromProtoMsg(message) {
4652
+ return exports.QueryEditionHoldersRequest.decode(message.value);
4653
+ },
4654
+ toProto(message) {
4655
+ return exports.QueryEditionHoldersRequest.encode(message).finish();
4656
+ },
4657
+ toProtoMsg(message) {
4658
+ return {
4659
+ typeUrl: "/sparkdream.artifact.v1.QueryEditionHoldersRequest",
4660
+ value: exports.QueryEditionHoldersRequest.encode(message).finish()
4661
+ };
4662
+ }
4663
+ };
4664
+ function createBaseQueryEditionHoldersResponse() {
4665
+ return {
4666
+ balances: [],
4667
+ pagination: undefined
4668
+ };
4669
+ }
4670
+ /**
4671
+ * QueryEditionHoldersResponse defines the QueryEditionHoldersResponse message.
4672
+ * @name QueryEditionHoldersResponse
4673
+ * @package sparkdream.artifact.v1
4674
+ * @see proto type: sparkdream.artifact.v1.QueryEditionHoldersResponse
4675
+ */
4676
+ exports.QueryEditionHoldersResponse = {
4677
+ typeUrl: "/sparkdream.artifact.v1.QueryEditionHoldersResponse",
4678
+ encode(message, writer = binary_1.BinaryWriter.create()) {
4679
+ for (const v of message.balances) {
4680
+ exports.BalanceView.encode(v, writer.uint32(10).fork()).ldelim();
4681
+ }
4682
+ if (message.pagination !== undefined) {
4683
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4684
+ }
4685
+ return writer;
4686
+ },
4687
+ decode(input, length) {
4688
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
4689
+ let end = length === undefined ? reader.len : reader.pos + length;
4690
+ const message = createBaseQueryEditionHoldersResponse();
4691
+ while (reader.pos < end) {
4692
+ const tag = reader.uint32();
4693
+ switch (tag >>> 3) {
4694
+ case 1:
4695
+ message.balances.push(exports.BalanceView.decode(reader, reader.uint32()));
4696
+ break;
4697
+ case 2:
4698
+ message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
4699
+ break;
4700
+ default:
4701
+ reader.skipType(tag & 7);
4702
+ break;
4703
+ }
4704
+ }
4705
+ return message;
4706
+ },
4707
+ fromPartial(object) {
4708
+ const message = createBaseQueryEditionHoldersResponse();
4709
+ message.balances = object.balances?.map(e => exports.BalanceView.fromPartial(e)) || [];
4710
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
4711
+ return message;
4712
+ },
4713
+ fromAmino(object) {
4714
+ const message = createBaseQueryEditionHoldersResponse();
4715
+ message.balances = object.balances?.map(e => exports.BalanceView.fromAmino(e)) || [];
4716
+ if (object.pagination !== undefined && object.pagination !== null) {
4717
+ message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
4718
+ }
4719
+ return message;
4720
+ },
4721
+ toAmino(message) {
4722
+ const obj = {};
4723
+ if (message.balances) {
4724
+ obj.balances = message.balances.map(e => e ? exports.BalanceView.toAmino(e) : undefined);
4725
+ }
4726
+ else {
4727
+ obj.balances = message.balances;
4728
+ }
4729
+ obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
4730
+ return obj;
4731
+ },
4732
+ fromAminoMsg(object) {
4733
+ return exports.QueryEditionHoldersResponse.fromAmino(object.value);
4734
+ },
4735
+ fromProtoMsg(message) {
4736
+ return exports.QueryEditionHoldersResponse.decode(message.value);
4737
+ },
4738
+ toProto(message) {
4739
+ return exports.QueryEditionHoldersResponse.encode(message).finish();
4740
+ },
4741
+ toProtoMsg(message) {
4742
+ return {
4743
+ typeUrl: "/sparkdream.artifact.v1.QueryEditionHoldersResponse",
4744
+ value: exports.QueryEditionHoldersResponse.encode(message).finish()
4745
+ };
4746
+ }
4747
+ };
4748
+ function createBaseQueryUnitListingRequest() {
4749
+ return {
4750
+ listingId: BigInt(0)
4751
+ };
4752
+ }
4753
+ /**
4754
+ * QueryUnitListingRequest defines the QueryUnitListingRequest message.
4755
+ * @name QueryUnitListingRequest
4756
+ * @package sparkdream.artifact.v1
4757
+ * @see proto type: sparkdream.artifact.v1.QueryUnitListingRequest
4758
+ */
4759
+ exports.QueryUnitListingRequest = {
4760
+ typeUrl: "/sparkdream.artifact.v1.QueryUnitListingRequest",
4761
+ encode(message, writer = binary_1.BinaryWriter.create()) {
4762
+ if (message.listingId !== BigInt(0)) {
4763
+ writer.uint32(8).uint64(message.listingId);
4764
+ }
4765
+ return writer;
4766
+ },
4767
+ decode(input, length) {
4768
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
4769
+ let end = length === undefined ? reader.len : reader.pos + length;
4770
+ const message = createBaseQueryUnitListingRequest();
4771
+ while (reader.pos < end) {
4772
+ const tag = reader.uint32();
4773
+ switch (tag >>> 3) {
4774
+ case 1:
4775
+ message.listingId = reader.uint64();
4776
+ break;
4777
+ default:
4778
+ reader.skipType(tag & 7);
4779
+ break;
4780
+ }
4781
+ }
4782
+ return message;
4783
+ },
4784
+ fromPartial(object) {
4785
+ const message = createBaseQueryUnitListingRequest();
4786
+ message.listingId = object.listingId !== undefined && object.listingId !== null ? BigInt(object.listingId.toString()) : BigInt(0);
4787
+ return message;
4788
+ },
4789
+ fromAmino(object) {
4790
+ const message = createBaseQueryUnitListingRequest();
4791
+ if (object.listing_id !== undefined && object.listing_id !== null) {
4792
+ message.listingId = BigInt(object.listing_id);
4793
+ }
4794
+ return message;
4795
+ },
4796
+ toAmino(message) {
4797
+ const obj = {};
4798
+ obj.listing_id = message.listingId !== BigInt(0) ? message.listingId?.toString() : undefined;
4799
+ return obj;
4800
+ },
4801
+ fromAminoMsg(object) {
4802
+ return exports.QueryUnitListingRequest.fromAmino(object.value);
4803
+ },
4804
+ fromProtoMsg(message) {
4805
+ return exports.QueryUnitListingRequest.decode(message.value);
4806
+ },
4807
+ toProto(message) {
4808
+ return exports.QueryUnitListingRequest.encode(message).finish();
4809
+ },
4810
+ toProtoMsg(message) {
4811
+ return {
4812
+ typeUrl: "/sparkdream.artifact.v1.QueryUnitListingRequest",
4813
+ value: exports.QueryUnitListingRequest.encode(message).finish()
4814
+ };
4815
+ }
4816
+ };
4817
+ function createBaseQueryUnitListingResponse() {
4818
+ return {
4819
+ listing: types_1.UnitListing.fromPartial({})
4820
+ };
4821
+ }
4822
+ /**
4823
+ * QueryUnitListingResponse defines the QueryUnitListingResponse message.
4824
+ * @name QueryUnitListingResponse
4825
+ * @package sparkdream.artifact.v1
4826
+ * @see proto type: sparkdream.artifact.v1.QueryUnitListingResponse
4827
+ */
4828
+ exports.QueryUnitListingResponse = {
4829
+ typeUrl: "/sparkdream.artifact.v1.QueryUnitListingResponse",
4830
+ encode(message, writer = binary_1.BinaryWriter.create()) {
4831
+ if (message.listing !== undefined) {
4832
+ types_1.UnitListing.encode(message.listing, writer.uint32(10).fork()).ldelim();
4833
+ }
4834
+ return writer;
4835
+ },
4836
+ decode(input, length) {
4837
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
4838
+ let end = length === undefined ? reader.len : reader.pos + length;
4839
+ const message = createBaseQueryUnitListingResponse();
4840
+ while (reader.pos < end) {
4841
+ const tag = reader.uint32();
4842
+ switch (tag >>> 3) {
4843
+ case 1:
4844
+ message.listing = types_1.UnitListing.decode(reader, reader.uint32());
4845
+ break;
4846
+ default:
4847
+ reader.skipType(tag & 7);
4848
+ break;
4849
+ }
4850
+ }
4851
+ return message;
4852
+ },
4853
+ fromPartial(object) {
4854
+ const message = createBaseQueryUnitListingResponse();
4855
+ message.listing = object.listing !== undefined && object.listing !== null ? types_1.UnitListing.fromPartial(object.listing) : undefined;
4856
+ return message;
4857
+ },
4858
+ fromAmino(object) {
4859
+ const message = createBaseQueryUnitListingResponse();
4860
+ if (object.listing !== undefined && object.listing !== null) {
4861
+ message.listing = types_1.UnitListing.fromAmino(object.listing);
4862
+ }
4863
+ return message;
4864
+ },
4865
+ toAmino(message) {
4866
+ const obj = {};
4867
+ obj.listing = message.listing ? types_1.UnitListing.toAmino(message.listing) : undefined;
4868
+ return obj;
4869
+ },
4870
+ fromAminoMsg(object) {
4871
+ return exports.QueryUnitListingResponse.fromAmino(object.value);
4872
+ },
4873
+ fromProtoMsg(message) {
4874
+ return exports.QueryUnitListingResponse.decode(message.value);
4875
+ },
4876
+ toProto(message) {
4877
+ return exports.QueryUnitListingResponse.encode(message).finish();
4878
+ },
4879
+ toProtoMsg(message) {
4880
+ return {
4881
+ typeUrl: "/sparkdream.artifact.v1.QueryUnitListingResponse",
4882
+ value: exports.QueryUnitListingResponse.encode(message).finish()
4883
+ };
4884
+ }
4885
+ };
4886
+ function createBaseQueryUnitListingsRequest() {
4887
+ return {
4888
+ classId: BigInt(0),
4889
+ editionId: BigInt(0),
4890
+ pagination: undefined
4891
+ };
4892
+ }
4893
+ /**
4894
+ * QueryUnitListingsRequest defines the QueryUnitListingsRequest message.
4895
+ * @name QueryUnitListingsRequest
4896
+ * @package sparkdream.artifact.v1
4897
+ * @see proto type: sparkdream.artifact.v1.QueryUnitListingsRequest
4898
+ */
4899
+ exports.QueryUnitListingsRequest = {
4900
+ typeUrl: "/sparkdream.artifact.v1.QueryUnitListingsRequest",
4901
+ encode(message, writer = binary_1.BinaryWriter.create()) {
4902
+ if (message.classId !== BigInt(0)) {
4903
+ writer.uint32(8).uint64(message.classId);
4904
+ }
4905
+ if (message.editionId !== BigInt(0)) {
4906
+ writer.uint32(16).uint64(message.editionId);
4907
+ }
4908
+ if (message.pagination !== undefined) {
4909
+ pagination_1.PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim();
4910
+ }
4911
+ return writer;
4912
+ },
4913
+ decode(input, length) {
4914
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
4915
+ let end = length === undefined ? reader.len : reader.pos + length;
4916
+ const message = createBaseQueryUnitListingsRequest();
4917
+ while (reader.pos < end) {
4918
+ const tag = reader.uint32();
4919
+ switch (tag >>> 3) {
4920
+ case 1:
4921
+ message.classId = reader.uint64();
4922
+ break;
4923
+ case 2:
4924
+ message.editionId = reader.uint64();
4925
+ break;
4926
+ case 3:
4927
+ message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
4928
+ break;
4929
+ default:
4930
+ reader.skipType(tag & 7);
4931
+ break;
4932
+ }
4933
+ }
4934
+ return message;
4935
+ },
4936
+ fromPartial(object) {
4937
+ const message = createBaseQueryUnitListingsRequest();
4938
+ message.classId = object.classId !== undefined && object.classId !== null ? BigInt(object.classId.toString()) : BigInt(0);
4939
+ message.editionId = object.editionId !== undefined && object.editionId !== null ? BigInt(object.editionId.toString()) : BigInt(0);
4940
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
4941
+ return message;
4942
+ },
4943
+ fromAmino(object) {
4944
+ const message = createBaseQueryUnitListingsRequest();
4945
+ if (object.class_id !== undefined && object.class_id !== null) {
4946
+ message.classId = BigInt(object.class_id);
4947
+ }
4948
+ if (object.edition_id !== undefined && object.edition_id !== null) {
4949
+ message.editionId = BigInt(object.edition_id);
4950
+ }
4951
+ if (object.pagination !== undefined && object.pagination !== null) {
4952
+ message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
4953
+ }
4954
+ return message;
4955
+ },
4956
+ toAmino(message) {
4957
+ const obj = {};
4958
+ obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
4959
+ obj.edition_id = message.editionId !== BigInt(0) ? message.editionId?.toString() : undefined;
4960
+ obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
4961
+ return obj;
4962
+ },
4963
+ fromAminoMsg(object) {
4964
+ return exports.QueryUnitListingsRequest.fromAmino(object.value);
4965
+ },
4966
+ fromProtoMsg(message) {
4967
+ return exports.QueryUnitListingsRequest.decode(message.value);
4968
+ },
4969
+ toProto(message) {
4970
+ return exports.QueryUnitListingsRequest.encode(message).finish();
4971
+ },
4972
+ toProtoMsg(message) {
4973
+ return {
4974
+ typeUrl: "/sparkdream.artifact.v1.QueryUnitListingsRequest",
4975
+ value: exports.QueryUnitListingsRequest.encode(message).finish()
4976
+ };
4977
+ }
4978
+ };
4979
+ function createBaseQueryUnitListingsResponse() {
4980
+ return {
4981
+ listings: [],
4982
+ pagination: undefined
4983
+ };
4984
+ }
4985
+ /**
4986
+ * QueryUnitListingsResponse defines the QueryUnitListingsResponse message.
4987
+ * @name QueryUnitListingsResponse
4988
+ * @package sparkdream.artifact.v1
4989
+ * @see proto type: sparkdream.artifact.v1.QueryUnitListingsResponse
4990
+ */
4991
+ exports.QueryUnitListingsResponse = {
4992
+ typeUrl: "/sparkdream.artifact.v1.QueryUnitListingsResponse",
4993
+ encode(message, writer = binary_1.BinaryWriter.create()) {
4994
+ for (const v of message.listings) {
4995
+ types_1.UnitListing.encode(v, writer.uint32(10).fork()).ldelim();
4996
+ }
4997
+ if (message.pagination !== undefined) {
4998
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
4999
+ }
5000
+ return writer;
5001
+ },
5002
+ decode(input, length) {
5003
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
5004
+ let end = length === undefined ? reader.len : reader.pos + length;
5005
+ const message = createBaseQueryUnitListingsResponse();
5006
+ while (reader.pos < end) {
5007
+ const tag = reader.uint32();
5008
+ switch (tag >>> 3) {
5009
+ case 1:
5010
+ message.listings.push(types_1.UnitListing.decode(reader, reader.uint32()));
5011
+ break;
5012
+ case 2:
5013
+ message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
5014
+ break;
5015
+ default:
5016
+ reader.skipType(tag & 7);
5017
+ break;
5018
+ }
5019
+ }
5020
+ return message;
5021
+ },
5022
+ fromPartial(object) {
5023
+ const message = createBaseQueryUnitListingsResponse();
5024
+ message.listings = object.listings?.map(e => types_1.UnitListing.fromPartial(e)) || [];
5025
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
5026
+ return message;
5027
+ },
5028
+ fromAmino(object) {
5029
+ const message = createBaseQueryUnitListingsResponse();
5030
+ message.listings = object.listings?.map(e => types_1.UnitListing.fromAmino(e)) || [];
5031
+ if (object.pagination !== undefined && object.pagination !== null) {
5032
+ message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
5033
+ }
5034
+ return message;
5035
+ },
5036
+ toAmino(message) {
5037
+ const obj = {};
5038
+ if (message.listings) {
5039
+ obj.listings = message.listings.map(e => e ? types_1.UnitListing.toAmino(e) : undefined);
5040
+ }
5041
+ else {
5042
+ obj.listings = message.listings;
5043
+ }
5044
+ obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
5045
+ return obj;
5046
+ },
5047
+ fromAminoMsg(object) {
5048
+ return exports.QueryUnitListingsResponse.fromAmino(object.value);
5049
+ },
5050
+ fromProtoMsg(message) {
5051
+ return exports.QueryUnitListingsResponse.decode(message.value);
5052
+ },
5053
+ toProto(message) {
5054
+ return exports.QueryUnitListingsResponse.encode(message).finish();
5055
+ },
5056
+ toProtoMsg(message) {
5057
+ return {
5058
+ typeUrl: "/sparkdream.artifact.v1.QueryUnitListingsResponse",
5059
+ value: exports.QueryUnitListingsResponse.encode(message).finish()
5060
+ };
5061
+ }
5062
+ };
5063
+ function createBaseQueryCraftRecipesRequest() {
5064
+ return {
5065
+ classId: BigInt(0)
5066
+ };
5067
+ }
5068
+ /**
5069
+ * QueryCraftRecipesRequest defines the QueryCraftRecipesRequest message.
5070
+ * @name QueryCraftRecipesRequest
5071
+ * @package sparkdream.artifact.v1
5072
+ * @see proto type: sparkdream.artifact.v1.QueryCraftRecipesRequest
5073
+ */
5074
+ exports.QueryCraftRecipesRequest = {
5075
+ typeUrl: "/sparkdream.artifact.v1.QueryCraftRecipesRequest",
5076
+ encode(message, writer = binary_1.BinaryWriter.create()) {
5077
+ if (message.classId !== BigInt(0)) {
5078
+ writer.uint32(8).uint64(message.classId);
5079
+ }
5080
+ return writer;
5081
+ },
5082
+ decode(input, length) {
5083
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
5084
+ let end = length === undefined ? reader.len : reader.pos + length;
5085
+ const message = createBaseQueryCraftRecipesRequest();
5086
+ while (reader.pos < end) {
5087
+ const tag = reader.uint32();
5088
+ switch (tag >>> 3) {
5089
+ case 1:
5090
+ message.classId = reader.uint64();
5091
+ break;
5092
+ default:
5093
+ reader.skipType(tag & 7);
5094
+ break;
5095
+ }
5096
+ }
5097
+ return message;
5098
+ },
5099
+ fromPartial(object) {
5100
+ const message = createBaseQueryCraftRecipesRequest();
5101
+ message.classId = object.classId !== undefined && object.classId !== null ? BigInt(object.classId.toString()) : BigInt(0);
5102
+ return message;
5103
+ },
5104
+ fromAmino(object) {
5105
+ const message = createBaseQueryCraftRecipesRequest();
5106
+ if (object.class_id !== undefined && object.class_id !== null) {
5107
+ message.classId = BigInt(object.class_id);
5108
+ }
5109
+ return message;
5110
+ },
5111
+ toAmino(message) {
5112
+ const obj = {};
5113
+ obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
5114
+ return obj;
5115
+ },
5116
+ fromAminoMsg(object) {
5117
+ return exports.QueryCraftRecipesRequest.fromAmino(object.value);
5118
+ },
5119
+ fromProtoMsg(message) {
5120
+ return exports.QueryCraftRecipesRequest.decode(message.value);
5121
+ },
5122
+ toProto(message) {
5123
+ return exports.QueryCraftRecipesRequest.encode(message).finish();
5124
+ },
5125
+ toProtoMsg(message) {
5126
+ return {
5127
+ typeUrl: "/sparkdream.artifact.v1.QueryCraftRecipesRequest",
5128
+ value: exports.QueryCraftRecipesRequest.encode(message).finish()
5129
+ };
5130
+ }
5131
+ };
5132
+ function createBaseQueryCraftRecipesResponse() {
5133
+ return {
5134
+ recipes: [],
5135
+ locked: false
5136
+ };
5137
+ }
5138
+ /**
5139
+ * QueryCraftRecipesResponse defines the QueryCraftRecipesResponse message.
5140
+ * @name QueryCraftRecipesResponse
5141
+ * @package sparkdream.artifact.v1
5142
+ * @see proto type: sparkdream.artifact.v1.QueryCraftRecipesResponse
5143
+ */
5144
+ exports.QueryCraftRecipesResponse = {
5145
+ typeUrl: "/sparkdream.artifact.v1.QueryCraftRecipesResponse",
5146
+ encode(message, writer = binary_1.BinaryWriter.create()) {
5147
+ for (const v of message.recipes) {
5148
+ types_1.CraftRecipe.encode(v, writer.uint32(10).fork()).ldelim();
5149
+ }
5150
+ if (message.locked === true) {
5151
+ writer.uint32(16).bool(message.locked);
5152
+ }
5153
+ return writer;
5154
+ },
5155
+ decode(input, length) {
5156
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
5157
+ let end = length === undefined ? reader.len : reader.pos + length;
5158
+ const message = createBaseQueryCraftRecipesResponse();
5159
+ while (reader.pos < end) {
5160
+ const tag = reader.uint32();
5161
+ switch (tag >>> 3) {
5162
+ case 1:
5163
+ message.recipes.push(types_1.CraftRecipe.decode(reader, reader.uint32()));
5164
+ break;
5165
+ case 2:
5166
+ message.locked = reader.bool();
5167
+ break;
5168
+ default:
5169
+ reader.skipType(tag & 7);
5170
+ break;
5171
+ }
5172
+ }
5173
+ return message;
5174
+ },
5175
+ fromPartial(object) {
5176
+ const message = createBaseQueryCraftRecipesResponse();
5177
+ message.recipes = object.recipes?.map(e => types_1.CraftRecipe.fromPartial(e)) || [];
5178
+ message.locked = object.locked ?? false;
5179
+ return message;
5180
+ },
5181
+ fromAmino(object) {
5182
+ const message = createBaseQueryCraftRecipesResponse();
5183
+ message.recipes = object.recipes?.map(e => types_1.CraftRecipe.fromAmino(e)) || [];
5184
+ if (object.locked !== undefined && object.locked !== null) {
5185
+ message.locked = object.locked;
5186
+ }
5187
+ return message;
5188
+ },
5189
+ toAmino(message) {
5190
+ const obj = {};
5191
+ if (message.recipes) {
5192
+ obj.recipes = message.recipes.map(e => e ? types_1.CraftRecipe.toAmino(e) : undefined);
5193
+ }
5194
+ else {
5195
+ obj.recipes = message.recipes;
5196
+ }
5197
+ obj.locked = message.locked === false ? undefined : message.locked;
5198
+ return obj;
5199
+ },
5200
+ fromAminoMsg(object) {
5201
+ return exports.QueryCraftRecipesResponse.fromAmino(object.value);
5202
+ },
5203
+ fromProtoMsg(message) {
5204
+ return exports.QueryCraftRecipesResponse.decode(message.value);
5205
+ },
5206
+ toProto(message) {
5207
+ return exports.QueryCraftRecipesResponse.encode(message).finish();
5208
+ },
5209
+ toProtoMsg(message) {
5210
+ return {
5211
+ typeUrl: "/sparkdream.artifact.v1.QueryCraftRecipesResponse",
5212
+ value: exports.QueryCraftRecipesResponse.encode(message).finish()
5213
+ };
5214
+ }
5215
+ };
5216
+ function createBaseQueryRentalRequest() {
5217
+ return {
5218
+ classId: BigInt(0),
5219
+ tokenId: BigInt(0)
5220
+ };
5221
+ }
5222
+ /**
5223
+ * QueryRentalRequest defines the QueryRentalRequest message.
5224
+ * @name QueryRentalRequest
5225
+ * @package sparkdream.artifact.v1
5226
+ * @see proto type: sparkdream.artifact.v1.QueryRentalRequest
5227
+ */
5228
+ exports.QueryRentalRequest = {
5229
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalRequest",
5230
+ encode(message, writer = binary_1.BinaryWriter.create()) {
5231
+ if (message.classId !== BigInt(0)) {
5232
+ writer.uint32(8).uint64(message.classId);
5233
+ }
5234
+ if (message.tokenId !== BigInt(0)) {
5235
+ writer.uint32(16).uint64(message.tokenId);
5236
+ }
5237
+ return writer;
5238
+ },
5239
+ decode(input, length) {
5240
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
5241
+ let end = length === undefined ? reader.len : reader.pos + length;
5242
+ const message = createBaseQueryRentalRequest();
5243
+ while (reader.pos < end) {
5244
+ const tag = reader.uint32();
5245
+ switch (tag >>> 3) {
5246
+ case 1:
5247
+ message.classId = reader.uint64();
5248
+ break;
5249
+ case 2:
5250
+ message.tokenId = reader.uint64();
5251
+ break;
5252
+ default:
5253
+ reader.skipType(tag & 7);
5254
+ break;
5255
+ }
5256
+ }
5257
+ return message;
5258
+ },
5259
+ fromPartial(object) {
5260
+ const message = createBaseQueryRentalRequest();
5261
+ message.classId = object.classId !== undefined && object.classId !== null ? BigInt(object.classId.toString()) : BigInt(0);
5262
+ message.tokenId = object.tokenId !== undefined && object.tokenId !== null ? BigInt(object.tokenId.toString()) : BigInt(0);
5263
+ return message;
5264
+ },
5265
+ fromAmino(object) {
5266
+ const message = createBaseQueryRentalRequest();
5267
+ if (object.class_id !== undefined && object.class_id !== null) {
5268
+ message.classId = BigInt(object.class_id);
5269
+ }
5270
+ if (object.token_id !== undefined && object.token_id !== null) {
5271
+ message.tokenId = BigInt(object.token_id);
5272
+ }
5273
+ return message;
5274
+ },
5275
+ toAmino(message) {
5276
+ const obj = {};
5277
+ obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
5278
+ obj.token_id = message.tokenId !== BigInt(0) ? message.tokenId?.toString() : undefined;
5279
+ return obj;
5280
+ },
5281
+ fromAminoMsg(object) {
5282
+ return exports.QueryRentalRequest.fromAmino(object.value);
5283
+ },
5284
+ fromProtoMsg(message) {
5285
+ return exports.QueryRentalRequest.decode(message.value);
5286
+ },
5287
+ toProto(message) {
5288
+ return exports.QueryRentalRequest.encode(message).finish();
5289
+ },
5290
+ toProtoMsg(message) {
5291
+ return {
5292
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalRequest",
5293
+ value: exports.QueryRentalRequest.encode(message).finish()
5294
+ };
5295
+ }
5296
+ };
5297
+ function createBaseQueryRentalResponse() {
5298
+ return {
5299
+ rental: types_1.Rental.fromPartial({})
5300
+ };
5301
+ }
5302
+ /**
5303
+ * QueryRentalResponse defines the QueryRentalResponse message.
5304
+ * @name QueryRentalResponse
5305
+ * @package sparkdream.artifact.v1
5306
+ * @see proto type: sparkdream.artifact.v1.QueryRentalResponse
5307
+ */
5308
+ exports.QueryRentalResponse = {
5309
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalResponse",
5310
+ encode(message, writer = binary_1.BinaryWriter.create()) {
5311
+ if (message.rental !== undefined) {
5312
+ types_1.Rental.encode(message.rental, writer.uint32(10).fork()).ldelim();
5313
+ }
5314
+ return writer;
5315
+ },
5316
+ decode(input, length) {
5317
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
5318
+ let end = length === undefined ? reader.len : reader.pos + length;
5319
+ const message = createBaseQueryRentalResponse();
5320
+ while (reader.pos < end) {
5321
+ const tag = reader.uint32();
5322
+ switch (tag >>> 3) {
5323
+ case 1:
5324
+ message.rental = types_1.Rental.decode(reader, reader.uint32());
5325
+ break;
5326
+ default:
5327
+ reader.skipType(tag & 7);
5328
+ break;
5329
+ }
5330
+ }
5331
+ return message;
5332
+ },
5333
+ fromPartial(object) {
5334
+ const message = createBaseQueryRentalResponse();
5335
+ message.rental = object.rental !== undefined && object.rental !== null ? types_1.Rental.fromPartial(object.rental) : undefined;
5336
+ return message;
5337
+ },
5338
+ fromAmino(object) {
5339
+ const message = createBaseQueryRentalResponse();
5340
+ if (object.rental !== undefined && object.rental !== null) {
5341
+ message.rental = types_1.Rental.fromAmino(object.rental);
5342
+ }
5343
+ return message;
5344
+ },
5345
+ toAmino(message) {
5346
+ const obj = {};
5347
+ obj.rental = message.rental ? types_1.Rental.toAmino(message.rental) : undefined;
5348
+ return obj;
5349
+ },
5350
+ fromAminoMsg(object) {
5351
+ return exports.QueryRentalResponse.fromAmino(object.value);
5352
+ },
5353
+ fromProtoMsg(message) {
5354
+ return exports.QueryRentalResponse.decode(message.value);
5355
+ },
5356
+ toProto(message) {
5357
+ return exports.QueryRentalResponse.encode(message).finish();
5358
+ },
5359
+ toProtoMsg(message) {
5360
+ return {
5361
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalResponse",
5362
+ value: exports.QueryRentalResponse.encode(message).finish()
5363
+ };
5364
+ }
5365
+ };
5366
+ function createBaseQueryRentalOfferRequest() {
5367
+ return {
5368
+ classId: BigInt(0),
5369
+ tokenId: BigInt(0)
5370
+ };
5371
+ }
5372
+ /**
5373
+ * QueryRentalOfferRequest defines the QueryRentalOfferRequest message.
5374
+ * @name QueryRentalOfferRequest
5375
+ * @package sparkdream.artifact.v1
5376
+ * @see proto type: sparkdream.artifact.v1.QueryRentalOfferRequest
5377
+ */
5378
+ exports.QueryRentalOfferRequest = {
5379
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalOfferRequest",
5380
+ encode(message, writer = binary_1.BinaryWriter.create()) {
5381
+ if (message.classId !== BigInt(0)) {
5382
+ writer.uint32(8).uint64(message.classId);
5383
+ }
5384
+ if (message.tokenId !== BigInt(0)) {
5385
+ writer.uint32(16).uint64(message.tokenId);
5386
+ }
5387
+ return writer;
5388
+ },
5389
+ decode(input, length) {
5390
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
5391
+ let end = length === undefined ? reader.len : reader.pos + length;
5392
+ const message = createBaseQueryRentalOfferRequest();
5393
+ while (reader.pos < end) {
5394
+ const tag = reader.uint32();
5395
+ switch (tag >>> 3) {
5396
+ case 1:
5397
+ message.classId = reader.uint64();
5398
+ break;
5399
+ case 2:
5400
+ message.tokenId = reader.uint64();
5401
+ break;
5402
+ default:
5403
+ reader.skipType(tag & 7);
5404
+ break;
5405
+ }
5406
+ }
5407
+ return message;
5408
+ },
5409
+ fromPartial(object) {
5410
+ const message = createBaseQueryRentalOfferRequest();
5411
+ message.classId = object.classId !== undefined && object.classId !== null ? BigInt(object.classId.toString()) : BigInt(0);
5412
+ message.tokenId = object.tokenId !== undefined && object.tokenId !== null ? BigInt(object.tokenId.toString()) : BigInt(0);
5413
+ return message;
5414
+ },
5415
+ fromAmino(object) {
5416
+ const message = createBaseQueryRentalOfferRequest();
5417
+ if (object.class_id !== undefined && object.class_id !== null) {
5418
+ message.classId = BigInt(object.class_id);
5419
+ }
5420
+ if (object.token_id !== undefined && object.token_id !== null) {
5421
+ message.tokenId = BigInt(object.token_id);
5422
+ }
5423
+ return message;
5424
+ },
5425
+ toAmino(message) {
5426
+ const obj = {};
5427
+ obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
5428
+ obj.token_id = message.tokenId !== BigInt(0) ? message.tokenId?.toString() : undefined;
5429
+ return obj;
5430
+ },
5431
+ fromAminoMsg(object) {
5432
+ return exports.QueryRentalOfferRequest.fromAmino(object.value);
5433
+ },
5434
+ fromProtoMsg(message) {
5435
+ return exports.QueryRentalOfferRequest.decode(message.value);
5436
+ },
5437
+ toProto(message) {
5438
+ return exports.QueryRentalOfferRequest.encode(message).finish();
5439
+ },
5440
+ toProtoMsg(message) {
5441
+ return {
5442
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalOfferRequest",
5443
+ value: exports.QueryRentalOfferRequest.encode(message).finish()
5444
+ };
5445
+ }
5446
+ };
5447
+ function createBaseQueryRentalOfferResponse() {
5448
+ return {
5449
+ offer: types_1.RentalOffer.fromPartial({})
5450
+ };
5451
+ }
5452
+ /**
5453
+ * QueryRentalOfferResponse defines the QueryRentalOfferResponse message.
5454
+ * @name QueryRentalOfferResponse
5455
+ * @package sparkdream.artifact.v1
5456
+ * @see proto type: sparkdream.artifact.v1.QueryRentalOfferResponse
5457
+ */
5458
+ exports.QueryRentalOfferResponse = {
5459
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalOfferResponse",
5460
+ encode(message, writer = binary_1.BinaryWriter.create()) {
5461
+ if (message.offer !== undefined) {
5462
+ types_1.RentalOffer.encode(message.offer, writer.uint32(10).fork()).ldelim();
5463
+ }
5464
+ return writer;
5465
+ },
5466
+ decode(input, length) {
5467
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
5468
+ let end = length === undefined ? reader.len : reader.pos + length;
5469
+ const message = createBaseQueryRentalOfferResponse();
5470
+ while (reader.pos < end) {
5471
+ const tag = reader.uint32();
5472
+ switch (tag >>> 3) {
5473
+ case 1:
5474
+ message.offer = types_1.RentalOffer.decode(reader, reader.uint32());
5475
+ break;
5476
+ default:
5477
+ reader.skipType(tag & 7);
5478
+ break;
5479
+ }
5480
+ }
5481
+ return message;
5482
+ },
5483
+ fromPartial(object) {
5484
+ const message = createBaseQueryRentalOfferResponse();
5485
+ message.offer = object.offer !== undefined && object.offer !== null ? types_1.RentalOffer.fromPartial(object.offer) : undefined;
5486
+ return message;
5487
+ },
5488
+ fromAmino(object) {
5489
+ const message = createBaseQueryRentalOfferResponse();
5490
+ if (object.offer !== undefined && object.offer !== null) {
5491
+ message.offer = types_1.RentalOffer.fromAmino(object.offer);
5492
+ }
5493
+ return message;
5494
+ },
5495
+ toAmino(message) {
5496
+ const obj = {};
5497
+ obj.offer = message.offer ? types_1.RentalOffer.toAmino(message.offer) : undefined;
5498
+ return obj;
5499
+ },
5500
+ fromAminoMsg(object) {
5501
+ return exports.QueryRentalOfferResponse.fromAmino(object.value);
5502
+ },
5503
+ fromProtoMsg(message) {
5504
+ return exports.QueryRentalOfferResponse.decode(message.value);
5505
+ },
5506
+ toProto(message) {
5507
+ return exports.QueryRentalOfferResponse.encode(message).finish();
5508
+ },
5509
+ toProtoMsg(message) {
5510
+ return {
5511
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalOfferResponse",
5512
+ value: exports.QueryRentalOfferResponse.encode(message).finish()
5513
+ };
5514
+ }
5515
+ };
5516
+ function createBaseQueryRentalsByUserRequest() {
5517
+ return {
5518
+ user: "",
5519
+ pagination: undefined
5520
+ };
5521
+ }
5522
+ /**
5523
+ * QueryRentalsByUserRequest defines the QueryRentalsByUserRequest message.
5524
+ * @name QueryRentalsByUserRequest
5525
+ * @package sparkdream.artifact.v1
5526
+ * @see proto type: sparkdream.artifact.v1.QueryRentalsByUserRequest
5527
+ */
5528
+ exports.QueryRentalsByUserRequest = {
5529
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalsByUserRequest",
5530
+ encode(message, writer = binary_1.BinaryWriter.create()) {
5531
+ if (message.user !== "") {
5532
+ writer.uint32(10).string(message.user);
5533
+ }
5534
+ if (message.pagination !== undefined) {
5535
+ pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
5536
+ }
5537
+ return writer;
5538
+ },
5539
+ decode(input, length) {
5540
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
5541
+ let end = length === undefined ? reader.len : reader.pos + length;
5542
+ const message = createBaseQueryRentalsByUserRequest();
5543
+ while (reader.pos < end) {
5544
+ const tag = reader.uint32();
5545
+ switch (tag >>> 3) {
5546
+ case 1:
5547
+ message.user = reader.string();
5548
+ break;
5549
+ case 2:
5550
+ message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
5551
+ break;
5552
+ default:
5553
+ reader.skipType(tag & 7);
5554
+ break;
5555
+ }
5556
+ }
5557
+ return message;
5558
+ },
5559
+ fromPartial(object) {
5560
+ const message = createBaseQueryRentalsByUserRequest();
5561
+ message.user = object.user ?? "";
5562
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
5563
+ return message;
5564
+ },
5565
+ fromAmino(object) {
5566
+ const message = createBaseQueryRentalsByUserRequest();
5567
+ if (object.user !== undefined && object.user !== null) {
5568
+ message.user = object.user;
5569
+ }
5570
+ if (object.pagination !== undefined && object.pagination !== null) {
5571
+ message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
5572
+ }
5573
+ return message;
5574
+ },
5575
+ toAmino(message) {
5576
+ const obj = {};
5577
+ obj.user = message.user === "" ? undefined : message.user;
5578
+ obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
5579
+ return obj;
5580
+ },
5581
+ fromAminoMsg(object) {
5582
+ return exports.QueryRentalsByUserRequest.fromAmino(object.value);
5583
+ },
5584
+ fromProtoMsg(message) {
5585
+ return exports.QueryRentalsByUserRequest.decode(message.value);
5586
+ },
5587
+ toProto(message) {
5588
+ return exports.QueryRentalsByUserRequest.encode(message).finish();
5589
+ },
5590
+ toProtoMsg(message) {
5591
+ return {
5592
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalsByUserRequest",
5593
+ value: exports.QueryRentalsByUserRequest.encode(message).finish()
5594
+ };
5595
+ }
5596
+ };
5597
+ function createBaseQueryRentalsByUserResponse() {
5598
+ return {
5599
+ rentals: [],
5600
+ pagination: undefined
5601
+ };
5602
+ }
5603
+ /**
5604
+ * QueryRentalsByUserResponse defines the QueryRentalsByUserResponse message.
5605
+ * @name QueryRentalsByUserResponse
5606
+ * @package sparkdream.artifact.v1
5607
+ * @see proto type: sparkdream.artifact.v1.QueryRentalsByUserResponse
5608
+ */
5609
+ exports.QueryRentalsByUserResponse = {
5610
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalsByUserResponse",
5611
+ encode(message, writer = binary_1.BinaryWriter.create()) {
5612
+ for (const v of message.rentals) {
5613
+ types_1.Rental.encode(v, writer.uint32(10).fork()).ldelim();
5614
+ }
5615
+ if (message.pagination !== undefined) {
5616
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
5617
+ }
5618
+ return writer;
5619
+ },
5620
+ decode(input, length) {
5621
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
5622
+ let end = length === undefined ? reader.len : reader.pos + length;
5623
+ const message = createBaseQueryRentalsByUserResponse();
5624
+ while (reader.pos < end) {
5625
+ const tag = reader.uint32();
5626
+ switch (tag >>> 3) {
5627
+ case 1:
5628
+ message.rentals.push(types_1.Rental.decode(reader, reader.uint32()));
5629
+ break;
5630
+ case 2:
5631
+ message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
5632
+ break;
5633
+ default:
5634
+ reader.skipType(tag & 7);
5635
+ break;
5636
+ }
5637
+ }
5638
+ return message;
5639
+ },
5640
+ fromPartial(object) {
5641
+ const message = createBaseQueryRentalsByUserResponse();
5642
+ message.rentals = object.rentals?.map(e => types_1.Rental.fromPartial(e)) || [];
5643
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
5644
+ return message;
5645
+ },
5646
+ fromAmino(object) {
5647
+ const message = createBaseQueryRentalsByUserResponse();
5648
+ message.rentals = object.rentals?.map(e => types_1.Rental.fromAmino(e)) || [];
5649
+ if (object.pagination !== undefined && object.pagination !== null) {
5650
+ message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
5651
+ }
5652
+ return message;
5653
+ },
5654
+ toAmino(message) {
5655
+ const obj = {};
5656
+ if (message.rentals) {
5657
+ obj.rentals = message.rentals.map(e => e ? types_1.Rental.toAmino(e) : undefined);
5658
+ }
5659
+ else {
5660
+ obj.rentals = message.rentals;
5661
+ }
5662
+ obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
5663
+ return obj;
5664
+ },
5665
+ fromAminoMsg(object) {
5666
+ return exports.QueryRentalsByUserResponse.fromAmino(object.value);
5667
+ },
5668
+ fromProtoMsg(message) {
5669
+ return exports.QueryRentalsByUserResponse.decode(message.value);
5670
+ },
5671
+ toProto(message) {
5672
+ return exports.QueryRentalsByUserResponse.encode(message).finish();
5673
+ },
5674
+ toProtoMsg(message) {
5675
+ return {
5676
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalsByUserResponse",
5677
+ value: exports.QueryRentalsByUserResponse.encode(message).finish()
5678
+ };
5679
+ }
5680
+ };
5681
+ function createBaseQueryChildrenRequest() {
5682
+ return {
5683
+ classId: BigInt(0),
5684
+ tokenId: BigInt(0)
5685
+ };
5686
+ }
5687
+ /**
5688
+ * QueryChildrenRequest defines the QueryChildrenRequest message.
5689
+ * @name QueryChildrenRequest
5690
+ * @package sparkdream.artifact.v1
5691
+ * @see proto type: sparkdream.artifact.v1.QueryChildrenRequest
5692
+ */
5693
+ exports.QueryChildrenRequest = {
5694
+ typeUrl: "/sparkdream.artifact.v1.QueryChildrenRequest",
5695
+ encode(message, writer = binary_1.BinaryWriter.create()) {
5696
+ if (message.classId !== BigInt(0)) {
5697
+ writer.uint32(8).uint64(message.classId);
5698
+ }
5699
+ if (message.tokenId !== BigInt(0)) {
5700
+ writer.uint32(16).uint64(message.tokenId);
5701
+ }
5702
+ return writer;
5703
+ },
5704
+ decode(input, length) {
5705
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
5706
+ let end = length === undefined ? reader.len : reader.pos + length;
5707
+ const message = createBaseQueryChildrenRequest();
5708
+ while (reader.pos < end) {
5709
+ const tag = reader.uint32();
5710
+ switch (tag >>> 3) {
5711
+ case 1:
5712
+ message.classId = reader.uint64();
5713
+ break;
5714
+ case 2:
5715
+ message.tokenId = reader.uint64();
5716
+ break;
5717
+ default:
5718
+ reader.skipType(tag & 7);
5719
+ break;
5720
+ }
5721
+ }
5722
+ return message;
5723
+ },
5724
+ fromPartial(object) {
5725
+ const message = createBaseQueryChildrenRequest();
5726
+ message.classId = object.classId !== undefined && object.classId !== null ? BigInt(object.classId.toString()) : BigInt(0);
5727
+ message.tokenId = object.tokenId !== undefined && object.tokenId !== null ? BigInt(object.tokenId.toString()) : BigInt(0);
5728
+ return message;
5729
+ },
5730
+ fromAmino(object) {
5731
+ const message = createBaseQueryChildrenRequest();
5732
+ if (object.class_id !== undefined && object.class_id !== null) {
5733
+ message.classId = BigInt(object.class_id);
5734
+ }
5735
+ if (object.token_id !== undefined && object.token_id !== null) {
5736
+ message.tokenId = BigInt(object.token_id);
5737
+ }
5738
+ return message;
5739
+ },
5740
+ toAmino(message) {
5741
+ const obj = {};
5742
+ obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
5743
+ obj.token_id = message.tokenId !== BigInt(0) ? message.tokenId?.toString() : undefined;
5744
+ return obj;
5745
+ },
5746
+ fromAminoMsg(object) {
5747
+ return exports.QueryChildrenRequest.fromAmino(object.value);
5748
+ },
5749
+ fromProtoMsg(message) {
5750
+ return exports.QueryChildrenRequest.decode(message.value);
5751
+ },
5752
+ toProto(message) {
5753
+ return exports.QueryChildrenRequest.encode(message).finish();
5754
+ },
5755
+ toProtoMsg(message) {
5756
+ return {
5757
+ typeUrl: "/sparkdream.artifact.v1.QueryChildrenRequest",
5758
+ value: exports.QueryChildrenRequest.encode(message).finish()
5759
+ };
5760
+ }
5761
+ };
5762
+ function createBaseQueryChildrenResponse() {
5763
+ return {
5764
+ children: [],
5765
+ contentsHash: "",
5766
+ descendants: 0
5767
+ };
5768
+ }
5769
+ /**
5770
+ * QueryChildrenResponse defines the QueryChildrenResponse message.
5771
+ * @name QueryChildrenResponse
5772
+ * @package sparkdream.artifact.v1
5773
+ * @see proto type: sparkdream.artifact.v1.QueryChildrenResponse
5774
+ */
5775
+ exports.QueryChildrenResponse = {
5776
+ typeUrl: "/sparkdream.artifact.v1.QueryChildrenResponse",
5777
+ encode(message, writer = binary_1.BinaryWriter.create()) {
5778
+ for (const v of message.children) {
5779
+ types_1.TokenRef.encode(v, writer.uint32(10).fork()).ldelim();
5780
+ }
5781
+ if (message.contentsHash !== "") {
5782
+ writer.uint32(18).string(message.contentsHash);
5783
+ }
5784
+ if (message.descendants !== 0) {
5785
+ writer.uint32(24).uint32(message.descendants);
5786
+ }
5787
+ return writer;
5788
+ },
5789
+ decode(input, length) {
5790
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
5791
+ let end = length === undefined ? reader.len : reader.pos + length;
5792
+ const message = createBaseQueryChildrenResponse();
5793
+ while (reader.pos < end) {
5794
+ const tag = reader.uint32();
5795
+ switch (tag >>> 3) {
5796
+ case 1:
5797
+ message.children.push(types_1.TokenRef.decode(reader, reader.uint32()));
5798
+ break;
5799
+ case 2:
5800
+ message.contentsHash = reader.string();
5801
+ break;
5802
+ case 3:
5803
+ message.descendants = reader.uint32();
5804
+ break;
5805
+ default:
5806
+ reader.skipType(tag & 7);
5807
+ break;
5808
+ }
5809
+ }
5810
+ return message;
5811
+ },
5812
+ fromPartial(object) {
5813
+ const message = createBaseQueryChildrenResponse();
5814
+ message.children = object.children?.map(e => types_1.TokenRef.fromPartial(e)) || [];
5815
+ message.contentsHash = object.contentsHash ?? "";
5816
+ message.descendants = object.descendants ?? 0;
5817
+ return message;
5818
+ },
5819
+ fromAmino(object) {
5820
+ const message = createBaseQueryChildrenResponse();
5821
+ message.children = object.children?.map(e => types_1.TokenRef.fromAmino(e)) || [];
5822
+ if (object.contents_hash !== undefined && object.contents_hash !== null) {
5823
+ message.contentsHash = object.contents_hash;
5824
+ }
5825
+ if (object.descendants !== undefined && object.descendants !== null) {
5826
+ message.descendants = object.descendants;
5827
+ }
5828
+ return message;
5829
+ },
5830
+ toAmino(message) {
5831
+ const obj = {};
5832
+ if (message.children) {
5833
+ obj.children = message.children.map(e => e ? types_1.TokenRef.toAmino(e) : undefined);
5834
+ }
5835
+ else {
5836
+ obj.children = message.children;
5837
+ }
5838
+ obj.contents_hash = message.contentsHash === "" ? undefined : message.contentsHash;
5839
+ obj.descendants = message.descendants === 0 ? undefined : message.descendants;
5840
+ return obj;
5841
+ },
5842
+ fromAminoMsg(object) {
5843
+ return exports.QueryChildrenResponse.fromAmino(object.value);
5844
+ },
5845
+ fromProtoMsg(message) {
5846
+ return exports.QueryChildrenResponse.decode(message.value);
5847
+ },
5848
+ toProto(message) {
5849
+ return exports.QueryChildrenResponse.encode(message).finish();
5850
+ },
5851
+ toProtoMsg(message) {
5852
+ return {
5853
+ typeUrl: "/sparkdream.artifact.v1.QueryChildrenResponse",
5854
+ value: exports.QueryChildrenResponse.encode(message).finish()
5855
+ };
5856
+ }
5857
+ };
5858
+ function createBaseQueryHarbergerQuoteRequest() {
5859
+ return {
5860
+ classId: BigInt(0),
5861
+ tokenId: BigInt(0)
5862
+ };
5863
+ }
5864
+ /**
5865
+ * QueryHarbergerQuoteRequest defines the QueryHarbergerQuoteRequest message.
5866
+ * @name QueryHarbergerQuoteRequest
5867
+ * @package sparkdream.artifact.v1
5868
+ * @see proto type: sparkdream.artifact.v1.QueryHarbergerQuoteRequest
5869
+ */
5870
+ exports.QueryHarbergerQuoteRequest = {
5871
+ typeUrl: "/sparkdream.artifact.v1.QueryHarbergerQuoteRequest",
5872
+ encode(message, writer = binary_1.BinaryWriter.create()) {
5873
+ if (message.classId !== BigInt(0)) {
5874
+ writer.uint32(8).uint64(message.classId);
5875
+ }
5876
+ if (message.tokenId !== BigInt(0)) {
5877
+ writer.uint32(16).uint64(message.tokenId);
5878
+ }
5879
+ return writer;
5880
+ },
5881
+ decode(input, length) {
5882
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
5883
+ let end = length === undefined ? reader.len : reader.pos + length;
5884
+ const message = createBaseQueryHarbergerQuoteRequest();
5885
+ while (reader.pos < end) {
5886
+ const tag = reader.uint32();
5887
+ switch (tag >>> 3) {
5888
+ case 1:
5889
+ message.classId = reader.uint64();
5890
+ break;
5891
+ case 2:
5892
+ message.tokenId = reader.uint64();
5893
+ break;
5894
+ default:
5895
+ reader.skipType(tag & 7);
5896
+ break;
5897
+ }
5898
+ }
5899
+ return message;
5900
+ },
5901
+ fromPartial(object) {
5902
+ const message = createBaseQueryHarbergerQuoteRequest();
5903
+ message.classId = object.classId !== undefined && object.classId !== null ? BigInt(object.classId.toString()) : BigInt(0);
5904
+ message.tokenId = object.tokenId !== undefined && object.tokenId !== null ? BigInt(object.tokenId.toString()) : BigInt(0);
5905
+ return message;
5906
+ },
5907
+ fromAmino(object) {
5908
+ const message = createBaseQueryHarbergerQuoteRequest();
5909
+ if (object.class_id !== undefined && object.class_id !== null) {
5910
+ message.classId = BigInt(object.class_id);
5911
+ }
5912
+ if (object.token_id !== undefined && object.token_id !== null) {
5913
+ message.tokenId = BigInt(object.token_id);
5914
+ }
5915
+ return message;
5916
+ },
5917
+ toAmino(message) {
5918
+ const obj = {};
5919
+ obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
5920
+ obj.token_id = message.tokenId !== BigInt(0) ? message.tokenId?.toString() : undefined;
5921
+ return obj;
5922
+ },
5923
+ fromAminoMsg(object) {
5924
+ return exports.QueryHarbergerQuoteRequest.fromAmino(object.value);
5925
+ },
5926
+ fromProtoMsg(message) {
5927
+ return exports.QueryHarbergerQuoteRequest.decode(message.value);
5928
+ },
5929
+ toProto(message) {
5930
+ return exports.QueryHarbergerQuoteRequest.encode(message).finish();
5931
+ },
5932
+ toProtoMsg(message) {
5933
+ return {
5934
+ typeUrl: "/sparkdream.artifact.v1.QueryHarbergerQuoteRequest",
5935
+ value: exports.QueryHarbergerQuoteRequest.encode(message).finish()
5936
+ };
5937
+ }
5938
+ };
5939
+ function createBaseQueryHarbergerQuoteResponse() {
5940
+ return {
5941
+ state: types_1.HarbergerState.fromPartial({}),
5942
+ currentPrice: "",
5943
+ taxPerPeriod: "",
5944
+ foreclosed: false,
5945
+ forSale: false
5946
+ };
5947
+ }
5948
+ /**
5949
+ * QueryHarbergerQuoteResponse defines the QueryHarbergerQuoteResponse message.
5950
+ * @name QueryHarbergerQuoteResponse
5951
+ * @package sparkdream.artifact.v1
5952
+ * @see proto type: sparkdream.artifact.v1.QueryHarbergerQuoteResponse
5953
+ */
5954
+ exports.QueryHarbergerQuoteResponse = {
5955
+ typeUrl: "/sparkdream.artifact.v1.QueryHarbergerQuoteResponse",
5956
+ encode(message, writer = binary_1.BinaryWriter.create()) {
5957
+ if (message.state !== undefined) {
5958
+ types_1.HarbergerState.encode(message.state, writer.uint32(10).fork()).ldelim();
5959
+ }
5960
+ if (message.currentPrice !== "") {
5961
+ writer.uint32(18).string(message.currentPrice);
5962
+ }
5963
+ if (message.taxPerPeriod !== "") {
5964
+ writer.uint32(26).string(message.taxPerPeriod);
5965
+ }
5966
+ if (message.foreclosed === true) {
5967
+ writer.uint32(32).bool(message.foreclosed);
5968
+ }
5969
+ if (message.forSale === true) {
5970
+ writer.uint32(40).bool(message.forSale);
5971
+ }
5972
+ return writer;
5973
+ },
5974
+ decode(input, length) {
5975
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
5976
+ let end = length === undefined ? reader.len : reader.pos + length;
5977
+ const message = createBaseQueryHarbergerQuoteResponse();
5978
+ while (reader.pos < end) {
5979
+ const tag = reader.uint32();
5980
+ switch (tag >>> 3) {
5981
+ case 1:
5982
+ message.state = types_1.HarbergerState.decode(reader, reader.uint32());
5983
+ break;
5984
+ case 2:
5985
+ message.currentPrice = reader.string();
5986
+ break;
5987
+ case 3:
5988
+ message.taxPerPeriod = reader.string();
5989
+ break;
5990
+ case 4:
5991
+ message.foreclosed = reader.bool();
5992
+ break;
5993
+ case 5:
5994
+ message.forSale = reader.bool();
5995
+ break;
5996
+ default:
5997
+ reader.skipType(tag & 7);
5998
+ break;
5999
+ }
6000
+ }
6001
+ return message;
6002
+ },
6003
+ fromPartial(object) {
6004
+ const message = createBaseQueryHarbergerQuoteResponse();
6005
+ message.state = object.state !== undefined && object.state !== null ? types_1.HarbergerState.fromPartial(object.state) : undefined;
6006
+ message.currentPrice = object.currentPrice ?? "";
6007
+ message.taxPerPeriod = object.taxPerPeriod ?? "";
6008
+ message.foreclosed = object.foreclosed ?? false;
6009
+ message.forSale = object.forSale ?? false;
6010
+ return message;
6011
+ },
6012
+ fromAmino(object) {
6013
+ const message = createBaseQueryHarbergerQuoteResponse();
6014
+ if (object.state !== undefined && object.state !== null) {
6015
+ message.state = types_1.HarbergerState.fromAmino(object.state);
6016
+ }
6017
+ if (object.current_price !== undefined && object.current_price !== null) {
6018
+ message.currentPrice = object.current_price;
6019
+ }
6020
+ if (object.tax_per_period !== undefined && object.tax_per_period !== null) {
6021
+ message.taxPerPeriod = object.tax_per_period;
6022
+ }
6023
+ if (object.foreclosed !== undefined && object.foreclosed !== null) {
6024
+ message.foreclosed = object.foreclosed;
6025
+ }
6026
+ if (object.for_sale !== undefined && object.for_sale !== null) {
6027
+ message.forSale = object.for_sale;
6028
+ }
6029
+ return message;
6030
+ },
6031
+ toAmino(message) {
6032
+ const obj = {};
6033
+ obj.state = message.state ? types_1.HarbergerState.toAmino(message.state) : undefined;
6034
+ obj.current_price = message.currentPrice === "" ? undefined : message.currentPrice;
6035
+ obj.tax_per_period = message.taxPerPeriod === "" ? undefined : message.taxPerPeriod;
6036
+ obj.foreclosed = message.foreclosed === false ? undefined : message.foreclosed;
6037
+ obj.for_sale = message.forSale === false ? undefined : message.forSale;
6038
+ return obj;
6039
+ },
6040
+ fromAminoMsg(object) {
6041
+ return exports.QueryHarbergerQuoteResponse.fromAmino(object.value);
6042
+ },
6043
+ fromProtoMsg(message) {
6044
+ return exports.QueryHarbergerQuoteResponse.decode(message.value);
6045
+ },
6046
+ toProto(message) {
6047
+ return exports.QueryHarbergerQuoteResponse.encode(message).finish();
6048
+ },
6049
+ toProtoMsg(message) {
6050
+ return {
6051
+ typeUrl: "/sparkdream.artifact.v1.QueryHarbergerQuoteResponse",
6052
+ value: exports.QueryHarbergerQuoteResponse.encode(message).finish()
6053
+ };
6054
+ }
6055
+ };
6056
+ function createBaseQueryOfferRequest() {
6057
+ return {
6058
+ offerId: BigInt(0)
6059
+ };
6060
+ }
6061
+ /**
6062
+ * QueryOfferRequest defines the QueryOfferRequest message.
6063
+ * @name QueryOfferRequest
6064
+ * @package sparkdream.artifact.v1
6065
+ * @see proto type: sparkdream.artifact.v1.QueryOfferRequest
6066
+ */
6067
+ exports.QueryOfferRequest = {
6068
+ typeUrl: "/sparkdream.artifact.v1.QueryOfferRequest",
6069
+ encode(message, writer = binary_1.BinaryWriter.create()) {
6070
+ if (message.offerId !== BigInt(0)) {
6071
+ writer.uint32(8).uint64(message.offerId);
6072
+ }
6073
+ return writer;
6074
+ },
6075
+ decode(input, length) {
6076
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
6077
+ let end = length === undefined ? reader.len : reader.pos + length;
6078
+ const message = createBaseQueryOfferRequest();
6079
+ while (reader.pos < end) {
6080
+ const tag = reader.uint32();
6081
+ switch (tag >>> 3) {
6082
+ case 1:
6083
+ message.offerId = reader.uint64();
6084
+ break;
6085
+ default:
6086
+ reader.skipType(tag & 7);
6087
+ break;
6088
+ }
6089
+ }
6090
+ return message;
6091
+ },
6092
+ fromPartial(object) {
6093
+ const message = createBaseQueryOfferRequest();
6094
+ message.offerId = object.offerId !== undefined && object.offerId !== null ? BigInt(object.offerId.toString()) : BigInt(0);
6095
+ return message;
6096
+ },
6097
+ fromAmino(object) {
6098
+ const message = createBaseQueryOfferRequest();
6099
+ if (object.offer_id !== undefined && object.offer_id !== null) {
6100
+ message.offerId = BigInt(object.offer_id);
6101
+ }
6102
+ return message;
6103
+ },
6104
+ toAmino(message) {
6105
+ const obj = {};
6106
+ obj.offer_id = message.offerId !== BigInt(0) ? message.offerId?.toString() : undefined;
6107
+ return obj;
6108
+ },
6109
+ fromAminoMsg(object) {
6110
+ return exports.QueryOfferRequest.fromAmino(object.value);
6111
+ },
6112
+ fromProtoMsg(message) {
6113
+ return exports.QueryOfferRequest.decode(message.value);
6114
+ },
6115
+ toProto(message) {
6116
+ return exports.QueryOfferRequest.encode(message).finish();
6117
+ },
6118
+ toProtoMsg(message) {
6119
+ return {
6120
+ typeUrl: "/sparkdream.artifact.v1.QueryOfferRequest",
6121
+ value: exports.QueryOfferRequest.encode(message).finish()
6122
+ };
6123
+ }
6124
+ };
6125
+ function createBaseQueryOfferResponse() {
6126
+ return {
6127
+ offer: types_1.Offer.fromPartial({})
6128
+ };
6129
+ }
6130
+ /**
6131
+ * QueryOfferResponse defines the QueryOfferResponse message.
6132
+ * @name QueryOfferResponse
6133
+ * @package sparkdream.artifact.v1
6134
+ * @see proto type: sparkdream.artifact.v1.QueryOfferResponse
6135
+ */
6136
+ exports.QueryOfferResponse = {
6137
+ typeUrl: "/sparkdream.artifact.v1.QueryOfferResponse",
6138
+ encode(message, writer = binary_1.BinaryWriter.create()) {
6139
+ if (message.offer !== undefined) {
6140
+ types_1.Offer.encode(message.offer, writer.uint32(10).fork()).ldelim();
6141
+ }
6142
+ return writer;
6143
+ },
6144
+ decode(input, length) {
6145
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
6146
+ let end = length === undefined ? reader.len : reader.pos + length;
6147
+ const message = createBaseQueryOfferResponse();
6148
+ while (reader.pos < end) {
6149
+ const tag = reader.uint32();
6150
+ switch (tag >>> 3) {
6151
+ case 1:
6152
+ message.offer = types_1.Offer.decode(reader, reader.uint32());
6153
+ break;
6154
+ default:
6155
+ reader.skipType(tag & 7);
6156
+ break;
6157
+ }
6158
+ }
6159
+ return message;
6160
+ },
6161
+ fromPartial(object) {
6162
+ const message = createBaseQueryOfferResponse();
6163
+ message.offer = object.offer !== undefined && object.offer !== null ? types_1.Offer.fromPartial(object.offer) : undefined;
6164
+ return message;
6165
+ },
6166
+ fromAmino(object) {
6167
+ const message = createBaseQueryOfferResponse();
6168
+ if (object.offer !== undefined && object.offer !== null) {
6169
+ message.offer = types_1.Offer.fromAmino(object.offer);
6170
+ }
6171
+ return message;
6172
+ },
6173
+ toAmino(message) {
6174
+ const obj = {};
6175
+ obj.offer = message.offer ? types_1.Offer.toAmino(message.offer) : undefined;
6176
+ return obj;
6177
+ },
6178
+ fromAminoMsg(object) {
6179
+ return exports.QueryOfferResponse.fromAmino(object.value);
6180
+ },
6181
+ fromProtoMsg(message) {
6182
+ return exports.QueryOfferResponse.decode(message.value);
6183
+ },
6184
+ toProto(message) {
6185
+ return exports.QueryOfferResponse.encode(message).finish();
6186
+ },
6187
+ toProtoMsg(message) {
6188
+ return {
6189
+ typeUrl: "/sparkdream.artifact.v1.QueryOfferResponse",
6190
+ value: exports.QueryOfferResponse.encode(message).finish()
6191
+ };
6192
+ }
6193
+ };
6194
+ function createBaseQueryOffersRequest() {
6195
+ return {
6196
+ classId: BigInt(0),
6197
+ tokenId: BigInt(0),
6198
+ pagination: undefined
6199
+ };
6200
+ }
6201
+ /**
6202
+ * QueryOffersRequest lists the open offers on a token, or (token_id 0) the
6203
+ * collection offers on a class.
6204
+ * @name QueryOffersRequest
6205
+ * @package sparkdream.artifact.v1
6206
+ * @see proto type: sparkdream.artifact.v1.QueryOffersRequest
6207
+ */
6208
+ exports.QueryOffersRequest = {
6209
+ typeUrl: "/sparkdream.artifact.v1.QueryOffersRequest",
6210
+ encode(message, writer = binary_1.BinaryWriter.create()) {
6211
+ if (message.classId !== BigInt(0)) {
6212
+ writer.uint32(8).uint64(message.classId);
6213
+ }
6214
+ if (message.tokenId !== BigInt(0)) {
6215
+ writer.uint32(16).uint64(message.tokenId);
6216
+ }
6217
+ if (message.pagination !== undefined) {
6218
+ pagination_1.PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim();
6219
+ }
6220
+ return writer;
6221
+ },
6222
+ decode(input, length) {
6223
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
6224
+ let end = length === undefined ? reader.len : reader.pos + length;
6225
+ const message = createBaseQueryOffersRequest();
6226
+ while (reader.pos < end) {
6227
+ const tag = reader.uint32();
6228
+ switch (tag >>> 3) {
6229
+ case 1:
6230
+ message.classId = reader.uint64();
6231
+ break;
6232
+ case 2:
6233
+ message.tokenId = reader.uint64();
6234
+ break;
6235
+ case 3:
6236
+ message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
6237
+ break;
6238
+ default:
6239
+ reader.skipType(tag & 7);
6240
+ break;
6241
+ }
6242
+ }
6243
+ return message;
6244
+ },
6245
+ fromPartial(object) {
6246
+ const message = createBaseQueryOffersRequest();
6247
+ message.classId = object.classId !== undefined && object.classId !== null ? BigInt(object.classId.toString()) : BigInt(0);
6248
+ message.tokenId = object.tokenId !== undefined && object.tokenId !== null ? BigInt(object.tokenId.toString()) : BigInt(0);
6249
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
6250
+ return message;
6251
+ },
6252
+ fromAmino(object) {
6253
+ const message = createBaseQueryOffersRequest();
6254
+ if (object.class_id !== undefined && object.class_id !== null) {
6255
+ message.classId = BigInt(object.class_id);
6256
+ }
6257
+ if (object.token_id !== undefined && object.token_id !== null) {
6258
+ message.tokenId = BigInt(object.token_id);
6259
+ }
6260
+ if (object.pagination !== undefined && object.pagination !== null) {
6261
+ message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
6262
+ }
6263
+ return message;
6264
+ },
6265
+ toAmino(message) {
6266
+ const obj = {};
6267
+ obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
6268
+ obj.token_id = message.tokenId !== BigInt(0) ? message.tokenId?.toString() : undefined;
6269
+ obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
6270
+ return obj;
6271
+ },
6272
+ fromAminoMsg(object) {
6273
+ return exports.QueryOffersRequest.fromAmino(object.value);
6274
+ },
6275
+ fromProtoMsg(message) {
6276
+ return exports.QueryOffersRequest.decode(message.value);
6277
+ },
6278
+ toProto(message) {
6279
+ return exports.QueryOffersRequest.encode(message).finish();
6280
+ },
6281
+ toProtoMsg(message) {
6282
+ return {
6283
+ typeUrl: "/sparkdream.artifact.v1.QueryOffersRequest",
6284
+ value: exports.QueryOffersRequest.encode(message).finish()
6285
+ };
6286
+ }
6287
+ };
6288
+ function createBaseQueryOffersResponse() {
6289
+ return {
6290
+ offers: [],
6291
+ pagination: undefined
6292
+ };
6293
+ }
6294
+ /**
6295
+ * QueryOffersResponse defines the QueryOffersResponse message.
6296
+ * @name QueryOffersResponse
6297
+ * @package sparkdream.artifact.v1
6298
+ * @see proto type: sparkdream.artifact.v1.QueryOffersResponse
6299
+ */
6300
+ exports.QueryOffersResponse = {
6301
+ typeUrl: "/sparkdream.artifact.v1.QueryOffersResponse",
6302
+ encode(message, writer = binary_1.BinaryWriter.create()) {
6303
+ for (const v of message.offers) {
6304
+ types_1.Offer.encode(v, writer.uint32(10).fork()).ldelim();
6305
+ }
6306
+ if (message.pagination !== undefined) {
6307
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
6308
+ }
6309
+ return writer;
6310
+ },
6311
+ decode(input, length) {
6312
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
6313
+ let end = length === undefined ? reader.len : reader.pos + length;
6314
+ const message = createBaseQueryOffersResponse();
6315
+ while (reader.pos < end) {
6316
+ const tag = reader.uint32();
6317
+ switch (tag >>> 3) {
6318
+ case 1:
6319
+ message.offers.push(types_1.Offer.decode(reader, reader.uint32()));
6320
+ break;
6321
+ case 2:
6322
+ message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
6323
+ break;
6324
+ default:
6325
+ reader.skipType(tag & 7);
6326
+ break;
6327
+ }
6328
+ }
6329
+ return message;
6330
+ },
6331
+ fromPartial(object) {
6332
+ const message = createBaseQueryOffersResponse();
6333
+ message.offers = object.offers?.map(e => types_1.Offer.fromPartial(e)) || [];
6334
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
6335
+ return message;
6336
+ },
6337
+ fromAmino(object) {
6338
+ const message = createBaseQueryOffersResponse();
6339
+ message.offers = object.offers?.map(e => types_1.Offer.fromAmino(e)) || [];
6340
+ if (object.pagination !== undefined && object.pagination !== null) {
6341
+ message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
6342
+ }
6343
+ return message;
6344
+ },
6345
+ toAmino(message) {
6346
+ const obj = {};
6347
+ if (message.offers) {
6348
+ obj.offers = message.offers.map(e => e ? types_1.Offer.toAmino(e) : undefined);
6349
+ }
6350
+ else {
6351
+ obj.offers = message.offers;
6352
+ }
6353
+ obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
6354
+ return obj;
6355
+ },
6356
+ fromAminoMsg(object) {
6357
+ return exports.QueryOffersResponse.fromAmino(object.value);
6358
+ },
6359
+ fromProtoMsg(message) {
6360
+ return exports.QueryOffersResponse.decode(message.value);
6361
+ },
6362
+ toProto(message) {
6363
+ return exports.QueryOffersResponse.encode(message).finish();
6364
+ },
6365
+ toProtoMsg(message) {
6366
+ return {
6367
+ typeUrl: "/sparkdream.artifact.v1.QueryOffersResponse",
6368
+ value: exports.QueryOffersResponse.encode(message).finish()
6369
+ };
6370
+ }
6371
+ };
6372
+ function createBaseQueryOffersByBidderRequest() {
6373
+ return {
6374
+ bidder: "",
6375
+ pagination: undefined
6376
+ };
6377
+ }
6378
+ /**
6379
+ * QueryOffersByBidderRequest defines the QueryOffersByBidderRequest message.
6380
+ * @name QueryOffersByBidderRequest
6381
+ * @package sparkdream.artifact.v1
6382
+ * @see proto type: sparkdream.artifact.v1.QueryOffersByBidderRequest
6383
+ */
6384
+ exports.QueryOffersByBidderRequest = {
6385
+ typeUrl: "/sparkdream.artifact.v1.QueryOffersByBidderRequest",
6386
+ encode(message, writer = binary_1.BinaryWriter.create()) {
6387
+ if (message.bidder !== "") {
6388
+ writer.uint32(10).string(message.bidder);
6389
+ }
6390
+ if (message.pagination !== undefined) {
6391
+ pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
6392
+ }
6393
+ return writer;
6394
+ },
6395
+ decode(input, length) {
6396
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
6397
+ let end = length === undefined ? reader.len : reader.pos + length;
6398
+ const message = createBaseQueryOffersByBidderRequest();
6399
+ while (reader.pos < end) {
6400
+ const tag = reader.uint32();
6401
+ switch (tag >>> 3) {
6402
+ case 1:
6403
+ message.bidder = reader.string();
6404
+ break;
6405
+ case 2:
6406
+ message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
6407
+ break;
6408
+ default:
6409
+ reader.skipType(tag & 7);
6410
+ break;
6411
+ }
6412
+ }
6413
+ return message;
6414
+ },
6415
+ fromPartial(object) {
6416
+ const message = createBaseQueryOffersByBidderRequest();
6417
+ message.bidder = object.bidder ?? "";
6418
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
6419
+ return message;
6420
+ },
6421
+ fromAmino(object) {
6422
+ const message = createBaseQueryOffersByBidderRequest();
6423
+ if (object.bidder !== undefined && object.bidder !== null) {
6424
+ message.bidder = object.bidder;
6425
+ }
6426
+ if (object.pagination !== undefined && object.pagination !== null) {
6427
+ message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
6428
+ }
6429
+ return message;
6430
+ },
6431
+ toAmino(message) {
6432
+ const obj = {};
6433
+ obj.bidder = message.bidder === "" ? undefined : message.bidder;
6434
+ obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
6435
+ return obj;
6436
+ },
6437
+ fromAminoMsg(object) {
6438
+ return exports.QueryOffersByBidderRequest.fromAmino(object.value);
6439
+ },
6440
+ fromProtoMsg(message) {
6441
+ return exports.QueryOffersByBidderRequest.decode(message.value);
6442
+ },
6443
+ toProto(message) {
6444
+ return exports.QueryOffersByBidderRequest.encode(message).finish();
6445
+ },
6446
+ toProtoMsg(message) {
6447
+ return {
6448
+ typeUrl: "/sparkdream.artifact.v1.QueryOffersByBidderRequest",
6449
+ value: exports.QueryOffersByBidderRequest.encode(message).finish()
6450
+ };
6451
+ }
6452
+ };
6453
+ function createBaseQueryOffersByBidderResponse() {
6454
+ return {
6455
+ offers: [],
6456
+ pagination: undefined
6457
+ };
6458
+ }
6459
+ /**
6460
+ * QueryOffersByBidderResponse defines the QueryOffersByBidderResponse message.
6461
+ * @name QueryOffersByBidderResponse
6462
+ * @package sparkdream.artifact.v1
6463
+ * @see proto type: sparkdream.artifact.v1.QueryOffersByBidderResponse
6464
+ */
6465
+ exports.QueryOffersByBidderResponse = {
6466
+ typeUrl: "/sparkdream.artifact.v1.QueryOffersByBidderResponse",
6467
+ encode(message, writer = binary_1.BinaryWriter.create()) {
6468
+ for (const v of message.offers) {
6469
+ types_1.Offer.encode(v, writer.uint32(10).fork()).ldelim();
6470
+ }
6471
+ if (message.pagination !== undefined) {
6472
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
6473
+ }
6474
+ return writer;
6475
+ },
6476
+ decode(input, length) {
6477
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
6478
+ let end = length === undefined ? reader.len : reader.pos + length;
6479
+ const message = createBaseQueryOffersByBidderResponse();
6480
+ while (reader.pos < end) {
6481
+ const tag = reader.uint32();
6482
+ switch (tag >>> 3) {
6483
+ case 1:
6484
+ message.offers.push(types_1.Offer.decode(reader, reader.uint32()));
6485
+ break;
6486
+ case 2:
6487
+ message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
6488
+ break;
6489
+ default:
6490
+ reader.skipType(tag & 7);
6491
+ break;
6492
+ }
6493
+ }
6494
+ return message;
6495
+ },
6496
+ fromPartial(object) {
6497
+ const message = createBaseQueryOffersByBidderResponse();
6498
+ message.offers = object.offers?.map(e => types_1.Offer.fromPartial(e)) || [];
6499
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
6500
+ return message;
6501
+ },
6502
+ fromAmino(object) {
6503
+ const message = createBaseQueryOffersByBidderResponse();
6504
+ message.offers = object.offers?.map(e => types_1.Offer.fromAmino(e)) || [];
6505
+ if (object.pagination !== undefined && object.pagination !== null) {
6506
+ message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
6507
+ }
6508
+ return message;
6509
+ },
6510
+ toAmino(message) {
6511
+ const obj = {};
6512
+ if (message.offers) {
6513
+ obj.offers = message.offers.map(e => e ? types_1.Offer.toAmino(e) : undefined);
6514
+ }
6515
+ else {
6516
+ obj.offers = message.offers;
6517
+ }
6518
+ obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
6519
+ return obj;
6520
+ },
6521
+ fromAminoMsg(object) {
6522
+ return exports.QueryOffersByBidderResponse.fromAmino(object.value);
6523
+ },
6524
+ fromProtoMsg(message) {
6525
+ return exports.QueryOffersByBidderResponse.decode(message.value);
6526
+ },
6527
+ toProto(message) {
6528
+ return exports.QueryOffersByBidderResponse.encode(message).finish();
6529
+ },
6530
+ toProtoMsg(message) {
6531
+ return {
6532
+ typeUrl: "/sparkdream.artifact.v1.QueryOffersByBidderResponse",
6533
+ value: exports.QueryOffersByBidderResponse.encode(message).finish()
6534
+ };
6535
+ }
6536
+ };
6537
+ function createBaseQueryAuctionRequest() {
6538
+ return {
6539
+ auctionId: BigInt(0)
6540
+ };
6541
+ }
6542
+ /**
6543
+ * QueryAuctionRequest defines the QueryAuctionRequest message.
6544
+ * @name QueryAuctionRequest
6545
+ * @package sparkdream.artifact.v1
6546
+ * @see proto type: sparkdream.artifact.v1.QueryAuctionRequest
6547
+ */
6548
+ exports.QueryAuctionRequest = {
6549
+ typeUrl: "/sparkdream.artifact.v1.QueryAuctionRequest",
6550
+ encode(message, writer = binary_1.BinaryWriter.create()) {
6551
+ if (message.auctionId !== BigInt(0)) {
6552
+ writer.uint32(8).uint64(message.auctionId);
6553
+ }
6554
+ return writer;
6555
+ },
6556
+ decode(input, length) {
6557
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
6558
+ let end = length === undefined ? reader.len : reader.pos + length;
6559
+ const message = createBaseQueryAuctionRequest();
6560
+ while (reader.pos < end) {
6561
+ const tag = reader.uint32();
6562
+ switch (tag >>> 3) {
6563
+ case 1:
6564
+ message.auctionId = reader.uint64();
6565
+ break;
6566
+ default:
6567
+ reader.skipType(tag & 7);
6568
+ break;
6569
+ }
6570
+ }
6571
+ return message;
6572
+ },
6573
+ fromPartial(object) {
6574
+ const message = createBaseQueryAuctionRequest();
6575
+ message.auctionId = object.auctionId !== undefined && object.auctionId !== null ? BigInt(object.auctionId.toString()) : BigInt(0);
6576
+ return message;
6577
+ },
6578
+ fromAmino(object) {
6579
+ const message = createBaseQueryAuctionRequest();
6580
+ if (object.auction_id !== undefined && object.auction_id !== null) {
6581
+ message.auctionId = BigInt(object.auction_id);
6582
+ }
6583
+ return message;
6584
+ },
6585
+ toAmino(message) {
6586
+ const obj = {};
6587
+ obj.auction_id = message.auctionId !== BigInt(0) ? message.auctionId?.toString() : undefined;
6588
+ return obj;
6589
+ },
6590
+ fromAminoMsg(object) {
6591
+ return exports.QueryAuctionRequest.fromAmino(object.value);
6592
+ },
6593
+ fromProtoMsg(message) {
6594
+ return exports.QueryAuctionRequest.decode(message.value);
6595
+ },
6596
+ toProto(message) {
6597
+ return exports.QueryAuctionRequest.encode(message).finish();
6598
+ },
6599
+ toProtoMsg(message) {
6600
+ return {
6601
+ typeUrl: "/sparkdream.artifact.v1.QueryAuctionRequest",
6602
+ value: exports.QueryAuctionRequest.encode(message).finish()
6603
+ };
6604
+ }
6605
+ };
6606
+ function createBaseQueryAuctionResponse() {
6607
+ return {
6608
+ auction: types_1.Auction.fromPartial({}),
6609
+ minNextBid: ""
6610
+ };
6611
+ }
6612
+ /**
6613
+ * QueryAuctionResponse defines the QueryAuctionResponse message.
6614
+ * @name QueryAuctionResponse
6615
+ * @package sparkdream.artifact.v1
6616
+ * @see proto type: sparkdream.artifact.v1.QueryAuctionResponse
6617
+ */
6618
+ exports.QueryAuctionResponse = {
6619
+ typeUrl: "/sparkdream.artifact.v1.QueryAuctionResponse",
6620
+ encode(message, writer = binary_1.BinaryWriter.create()) {
6621
+ if (message.auction !== undefined) {
6622
+ types_1.Auction.encode(message.auction, writer.uint32(10).fork()).ldelim();
6623
+ }
6624
+ if (message.minNextBid !== "") {
6625
+ writer.uint32(18).string(message.minNextBid);
6626
+ }
6627
+ return writer;
6628
+ },
6629
+ decode(input, length) {
6630
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
6631
+ let end = length === undefined ? reader.len : reader.pos + length;
6632
+ const message = createBaseQueryAuctionResponse();
6633
+ while (reader.pos < end) {
6634
+ const tag = reader.uint32();
6635
+ switch (tag >>> 3) {
6636
+ case 1:
6637
+ message.auction = types_1.Auction.decode(reader, reader.uint32());
6638
+ break;
6639
+ case 2:
6640
+ message.minNextBid = reader.string();
6641
+ break;
6642
+ default:
6643
+ reader.skipType(tag & 7);
6644
+ break;
6645
+ }
6646
+ }
6647
+ return message;
6648
+ },
6649
+ fromPartial(object) {
6650
+ const message = createBaseQueryAuctionResponse();
6651
+ message.auction = object.auction !== undefined && object.auction !== null ? types_1.Auction.fromPartial(object.auction) : undefined;
6652
+ message.minNextBid = object.minNextBid ?? "";
6653
+ return message;
6654
+ },
6655
+ fromAmino(object) {
6656
+ const message = createBaseQueryAuctionResponse();
6657
+ if (object.auction !== undefined && object.auction !== null) {
6658
+ message.auction = types_1.Auction.fromAmino(object.auction);
6659
+ }
6660
+ if (object.min_next_bid !== undefined && object.min_next_bid !== null) {
6661
+ message.minNextBid = object.min_next_bid;
6662
+ }
6663
+ return message;
6664
+ },
6665
+ toAmino(message) {
6666
+ const obj = {};
6667
+ obj.auction = message.auction ? types_1.Auction.toAmino(message.auction) : undefined;
6668
+ obj.min_next_bid = message.minNextBid === "" ? undefined : message.minNextBid;
6669
+ return obj;
6670
+ },
6671
+ fromAminoMsg(object) {
6672
+ return exports.QueryAuctionResponse.fromAmino(object.value);
6673
+ },
6674
+ fromProtoMsg(message) {
6675
+ return exports.QueryAuctionResponse.decode(message.value);
6676
+ },
6677
+ toProto(message) {
6678
+ return exports.QueryAuctionResponse.encode(message).finish();
6679
+ },
6680
+ toProtoMsg(message) {
6681
+ return {
6682
+ typeUrl: "/sparkdream.artifact.v1.QueryAuctionResponse",
6683
+ value: exports.QueryAuctionResponse.encode(message).finish()
6684
+ };
6685
+ }
6686
+ };
6687
+ function createBaseQueryAuctionsRequest() {
6688
+ return {
6689
+ classId: BigInt(0),
6690
+ pagination: undefined
6691
+ };
6692
+ }
6693
+ /**
6694
+ * QueryAuctionsRequest lists open auctions (class_id 0 = every class).
6695
+ * @name QueryAuctionsRequest
6696
+ * @package sparkdream.artifact.v1
6697
+ * @see proto type: sparkdream.artifact.v1.QueryAuctionsRequest
6698
+ */
6699
+ exports.QueryAuctionsRequest = {
6700
+ typeUrl: "/sparkdream.artifact.v1.QueryAuctionsRequest",
6701
+ encode(message, writer = binary_1.BinaryWriter.create()) {
6702
+ if (message.classId !== BigInt(0)) {
6703
+ writer.uint32(8).uint64(message.classId);
6704
+ }
6705
+ if (message.pagination !== undefined) {
6706
+ pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
6707
+ }
6708
+ return writer;
6709
+ },
6710
+ decode(input, length) {
6711
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
6712
+ let end = length === undefined ? reader.len : reader.pos + length;
6713
+ const message = createBaseQueryAuctionsRequest();
6714
+ while (reader.pos < end) {
6715
+ const tag = reader.uint32();
6716
+ switch (tag >>> 3) {
6717
+ case 1:
6718
+ message.classId = reader.uint64();
6719
+ break;
6720
+ case 2:
6721
+ message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
6722
+ break;
6723
+ default:
6724
+ reader.skipType(tag & 7);
6725
+ break;
6726
+ }
6727
+ }
6728
+ return message;
6729
+ },
6730
+ fromPartial(object) {
6731
+ const message = createBaseQueryAuctionsRequest();
6732
+ message.classId = object.classId !== undefined && object.classId !== null ? BigInt(object.classId.toString()) : BigInt(0);
6733
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
6734
+ return message;
6735
+ },
6736
+ fromAmino(object) {
6737
+ const message = createBaseQueryAuctionsRequest();
6738
+ if (object.class_id !== undefined && object.class_id !== null) {
6739
+ message.classId = BigInt(object.class_id);
6740
+ }
6741
+ if (object.pagination !== undefined && object.pagination !== null) {
6742
+ message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
6743
+ }
6744
+ return message;
6745
+ },
6746
+ toAmino(message) {
6747
+ const obj = {};
6748
+ obj.class_id = message.classId !== BigInt(0) ? message.classId?.toString() : undefined;
6749
+ obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
6750
+ return obj;
6751
+ },
6752
+ fromAminoMsg(object) {
6753
+ return exports.QueryAuctionsRequest.fromAmino(object.value);
6754
+ },
6755
+ fromProtoMsg(message) {
6756
+ return exports.QueryAuctionsRequest.decode(message.value);
6757
+ },
6758
+ toProto(message) {
6759
+ return exports.QueryAuctionsRequest.encode(message).finish();
6760
+ },
6761
+ toProtoMsg(message) {
6762
+ return {
6763
+ typeUrl: "/sparkdream.artifact.v1.QueryAuctionsRequest",
6764
+ value: exports.QueryAuctionsRequest.encode(message).finish()
6765
+ };
6766
+ }
6767
+ };
6768
+ function createBaseQueryAuctionsResponse() {
6769
+ return {
6770
+ auctions: [],
6771
+ pagination: undefined
6772
+ };
6773
+ }
6774
+ /**
6775
+ * QueryAuctionsResponse defines the QueryAuctionsResponse message.
6776
+ * @name QueryAuctionsResponse
6777
+ * @package sparkdream.artifact.v1
6778
+ * @see proto type: sparkdream.artifact.v1.QueryAuctionsResponse
6779
+ */
6780
+ exports.QueryAuctionsResponse = {
6781
+ typeUrl: "/sparkdream.artifact.v1.QueryAuctionsResponse",
6782
+ encode(message, writer = binary_1.BinaryWriter.create()) {
6783
+ for (const v of message.auctions) {
6784
+ types_1.Auction.encode(v, writer.uint32(10).fork()).ldelim();
6785
+ }
6786
+ if (message.pagination !== undefined) {
6787
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
6788
+ }
6789
+ return writer;
6790
+ },
6791
+ decode(input, length) {
6792
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
6793
+ let end = length === undefined ? reader.len : reader.pos + length;
6794
+ const message = createBaseQueryAuctionsResponse();
6795
+ while (reader.pos < end) {
6796
+ const tag = reader.uint32();
6797
+ switch (tag >>> 3) {
6798
+ case 1:
6799
+ message.auctions.push(types_1.Auction.decode(reader, reader.uint32()));
6800
+ break;
6801
+ case 2:
6802
+ message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
6803
+ break;
6804
+ default:
6805
+ reader.skipType(tag & 7);
6806
+ break;
6807
+ }
6808
+ }
6809
+ return message;
6810
+ },
6811
+ fromPartial(object) {
6812
+ const message = createBaseQueryAuctionsResponse();
6813
+ message.auctions = object.auctions?.map(e => types_1.Auction.fromPartial(e)) || [];
6814
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
6815
+ return message;
6816
+ },
6817
+ fromAmino(object) {
6818
+ const message = createBaseQueryAuctionsResponse();
6819
+ message.auctions = object.auctions?.map(e => types_1.Auction.fromAmino(e)) || [];
6820
+ if (object.pagination !== undefined && object.pagination !== null) {
6821
+ message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
6822
+ }
6823
+ return message;
6824
+ },
6825
+ toAmino(message) {
6826
+ const obj = {};
6827
+ if (message.auctions) {
6828
+ obj.auctions = message.auctions.map(e => e ? types_1.Auction.toAmino(e) : undefined);
6829
+ }
6830
+ else {
6831
+ obj.auctions = message.auctions;
6832
+ }
6833
+ obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
6834
+ return obj;
6835
+ },
6836
+ fromAminoMsg(object) {
6837
+ return exports.QueryAuctionsResponse.fromAmino(object.value);
6838
+ },
6839
+ fromProtoMsg(message) {
6840
+ return exports.QueryAuctionsResponse.decode(message.value);
6841
+ },
6842
+ toProto(message) {
6843
+ return exports.QueryAuctionsResponse.encode(message).finish();
6844
+ },
6845
+ toProtoMsg(message) {
6846
+ return {
6847
+ typeUrl: "/sparkdream.artifact.v1.QueryAuctionsResponse",
6848
+ value: exports.QueryAuctionsResponse.encode(message).finish()
6849
+ };
6850
+ }
6851
+ };
6852
+ function createBaseQueryAuctionsBySellerRequest() {
6853
+ return {
6854
+ seller: "",
6855
+ pagination: undefined
6856
+ };
6857
+ }
6858
+ /**
6859
+ * QueryAuctionsBySellerRequest defines the QueryAuctionsBySellerRequest message.
6860
+ * @name QueryAuctionsBySellerRequest
6861
+ * @package sparkdream.artifact.v1
6862
+ * @see proto type: sparkdream.artifact.v1.QueryAuctionsBySellerRequest
6863
+ */
6864
+ exports.QueryAuctionsBySellerRequest = {
6865
+ typeUrl: "/sparkdream.artifact.v1.QueryAuctionsBySellerRequest",
6866
+ encode(message, writer = binary_1.BinaryWriter.create()) {
6867
+ if (message.seller !== "") {
6868
+ writer.uint32(10).string(message.seller);
6869
+ }
6870
+ if (message.pagination !== undefined) {
6871
+ pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
6872
+ }
6873
+ return writer;
6874
+ },
6875
+ decode(input, length) {
6876
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
6877
+ let end = length === undefined ? reader.len : reader.pos + length;
6878
+ const message = createBaseQueryAuctionsBySellerRequest();
6879
+ while (reader.pos < end) {
6880
+ const tag = reader.uint32();
6881
+ switch (tag >>> 3) {
6882
+ case 1:
6883
+ message.seller = reader.string();
6884
+ break;
6885
+ case 2:
6886
+ message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
6887
+ break;
6888
+ default:
6889
+ reader.skipType(tag & 7);
6890
+ break;
6891
+ }
6892
+ }
6893
+ return message;
6894
+ },
6895
+ fromPartial(object) {
6896
+ const message = createBaseQueryAuctionsBySellerRequest();
6897
+ message.seller = object.seller ?? "";
6898
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
6899
+ return message;
6900
+ },
6901
+ fromAmino(object) {
6902
+ const message = createBaseQueryAuctionsBySellerRequest();
6903
+ if (object.seller !== undefined && object.seller !== null) {
6904
+ message.seller = object.seller;
6905
+ }
6906
+ if (object.pagination !== undefined && object.pagination !== null) {
6907
+ message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
6908
+ }
6909
+ return message;
6910
+ },
6911
+ toAmino(message) {
6912
+ const obj = {};
6913
+ obj.seller = message.seller === "" ? undefined : message.seller;
6914
+ obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
6915
+ return obj;
6916
+ },
6917
+ fromAminoMsg(object) {
6918
+ return exports.QueryAuctionsBySellerRequest.fromAmino(object.value);
6919
+ },
6920
+ fromProtoMsg(message) {
6921
+ return exports.QueryAuctionsBySellerRequest.decode(message.value);
6922
+ },
6923
+ toProto(message) {
6924
+ return exports.QueryAuctionsBySellerRequest.encode(message).finish();
6925
+ },
6926
+ toProtoMsg(message) {
6927
+ return {
6928
+ typeUrl: "/sparkdream.artifact.v1.QueryAuctionsBySellerRequest",
6929
+ value: exports.QueryAuctionsBySellerRequest.encode(message).finish()
6930
+ };
6931
+ }
6932
+ };
6933
+ function createBaseQueryAuctionsBySellerResponse() {
6934
+ return {
6935
+ auctions: [],
6936
+ pagination: undefined
6937
+ };
6938
+ }
6939
+ /**
6940
+ * QueryAuctionsBySellerResponse defines the QueryAuctionsBySellerResponse message.
6941
+ * @name QueryAuctionsBySellerResponse
6942
+ * @package sparkdream.artifact.v1
6943
+ * @see proto type: sparkdream.artifact.v1.QueryAuctionsBySellerResponse
6944
+ */
6945
+ exports.QueryAuctionsBySellerResponse = {
6946
+ typeUrl: "/sparkdream.artifact.v1.QueryAuctionsBySellerResponse",
6947
+ encode(message, writer = binary_1.BinaryWriter.create()) {
6948
+ for (const v of message.auctions) {
6949
+ types_1.Auction.encode(v, writer.uint32(10).fork()).ldelim();
6950
+ }
6951
+ if (message.pagination !== undefined) {
6952
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
6953
+ }
6954
+ return writer;
6955
+ },
6956
+ decode(input, length) {
6957
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
6958
+ let end = length === undefined ? reader.len : reader.pos + length;
6959
+ const message = createBaseQueryAuctionsBySellerResponse();
6960
+ while (reader.pos < end) {
6961
+ const tag = reader.uint32();
6962
+ switch (tag >>> 3) {
6963
+ case 1:
6964
+ message.auctions.push(types_1.Auction.decode(reader, reader.uint32()));
6965
+ break;
6966
+ case 2:
6967
+ message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
6968
+ break;
6969
+ default:
6970
+ reader.skipType(tag & 7);
6971
+ break;
6972
+ }
6973
+ }
6974
+ return message;
6975
+ },
6976
+ fromPartial(object) {
6977
+ const message = createBaseQueryAuctionsBySellerResponse();
6978
+ message.auctions = object.auctions?.map(e => types_1.Auction.fromPartial(e)) || [];
6979
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
6980
+ return message;
6981
+ },
6982
+ fromAmino(object) {
6983
+ const message = createBaseQueryAuctionsBySellerResponse();
6984
+ message.auctions = object.auctions?.map(e => types_1.Auction.fromAmino(e)) || [];
6985
+ if (object.pagination !== undefined && object.pagination !== null) {
6986
+ message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
6987
+ }
6988
+ return message;
6989
+ },
6990
+ toAmino(message) {
6991
+ const obj = {};
6992
+ if (message.auctions) {
6993
+ obj.auctions = message.auctions.map(e => e ? types_1.Auction.toAmino(e) : undefined);
6994
+ }
6995
+ else {
6996
+ obj.auctions = message.auctions;
6997
+ }
6998
+ obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
6999
+ return obj;
7000
+ },
7001
+ fromAminoMsg(object) {
7002
+ return exports.QueryAuctionsBySellerResponse.fromAmino(object.value);
7003
+ },
7004
+ fromProtoMsg(message) {
7005
+ return exports.QueryAuctionsBySellerResponse.decode(message.value);
7006
+ },
7007
+ toProto(message) {
7008
+ return exports.QueryAuctionsBySellerResponse.encode(message).finish();
7009
+ },
7010
+ toProtoMsg(message) {
7011
+ return {
7012
+ typeUrl: "/sparkdream.artifact.v1.QueryAuctionsBySellerResponse",
7013
+ value: exports.QueryAuctionsBySellerResponse.encode(message).finish()
7014
+ };
7015
+ }
7016
+ };
7017
+ function createBaseQueryRentalOffersRequest() {
7018
+ return {
7019
+ user: "",
7020
+ pagination: undefined
7021
+ };
7022
+ }
7023
+ /**
7024
+ * QueryRentalOffersRequest defines the QueryRentalOffersRequest message.
7025
+ * @name QueryRentalOffersRequest
7026
+ * @package sparkdream.artifact.v1
7027
+ * @see proto type: sparkdream.artifact.v1.QueryRentalOffersRequest
7028
+ */
7029
+ exports.QueryRentalOffersRequest = {
7030
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalOffersRequest",
7031
+ encode(message, writer = binary_1.BinaryWriter.create()) {
7032
+ if (message.user !== "") {
7033
+ writer.uint32(10).string(message.user);
7034
+ }
7035
+ if (message.pagination !== undefined) {
7036
+ pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
7037
+ }
7038
+ return writer;
7039
+ },
7040
+ decode(input, length) {
7041
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
7042
+ let end = length === undefined ? reader.len : reader.pos + length;
7043
+ const message = createBaseQueryRentalOffersRequest();
7044
+ while (reader.pos < end) {
7045
+ const tag = reader.uint32();
7046
+ switch (tag >>> 3) {
7047
+ case 1:
7048
+ message.user = reader.string();
7049
+ break;
7050
+ case 2:
7051
+ message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
7052
+ break;
7053
+ default:
7054
+ reader.skipType(tag & 7);
7055
+ break;
7056
+ }
7057
+ }
7058
+ return message;
7059
+ },
7060
+ fromPartial(object) {
7061
+ const message = createBaseQueryRentalOffersRequest();
7062
+ message.user = object.user ?? "";
7063
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageRequest.fromPartial(object.pagination) : undefined;
7064
+ return message;
7065
+ },
7066
+ fromAmino(object) {
7067
+ const message = createBaseQueryRentalOffersRequest();
7068
+ if (object.user !== undefined && object.user !== null) {
7069
+ message.user = object.user;
7070
+ }
7071
+ if (object.pagination !== undefined && object.pagination !== null) {
7072
+ message.pagination = pagination_1.PageRequest.fromAmino(object.pagination);
7073
+ }
7074
+ return message;
7075
+ },
7076
+ toAmino(message) {
7077
+ const obj = {};
7078
+ obj.user = message.user === "" ? undefined : message.user;
7079
+ obj.pagination = message.pagination ? pagination_1.PageRequest.toAmino(message.pagination) : undefined;
7080
+ return obj;
7081
+ },
7082
+ fromAminoMsg(object) {
7083
+ return exports.QueryRentalOffersRequest.fromAmino(object.value);
7084
+ },
7085
+ fromProtoMsg(message) {
7086
+ return exports.QueryRentalOffersRequest.decode(message.value);
7087
+ },
7088
+ toProto(message) {
7089
+ return exports.QueryRentalOffersRequest.encode(message).finish();
7090
+ },
7091
+ toProtoMsg(message) {
7092
+ return {
7093
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalOffersRequest",
7094
+ value: exports.QueryRentalOffersRequest.encode(message).finish()
7095
+ };
7096
+ }
7097
+ };
7098
+ function createBaseQueryRentalOffersResponse() {
7099
+ return {
7100
+ offers: [],
7101
+ pagination: undefined
7102
+ };
7103
+ }
7104
+ /**
7105
+ * QueryRentalOffersResponse defines the QueryRentalOffersResponse message.
7106
+ * @name QueryRentalOffersResponse
7107
+ * @package sparkdream.artifact.v1
7108
+ * @see proto type: sparkdream.artifact.v1.QueryRentalOffersResponse
7109
+ */
7110
+ exports.QueryRentalOffersResponse = {
7111
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalOffersResponse",
7112
+ encode(message, writer = binary_1.BinaryWriter.create()) {
7113
+ for (const v of message.offers) {
7114
+ types_1.RentalOffer.encode(v, writer.uint32(10).fork()).ldelim();
7115
+ }
7116
+ if (message.pagination !== undefined) {
7117
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
7118
+ }
7119
+ return writer;
7120
+ },
7121
+ decode(input, length) {
7122
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
7123
+ let end = length === undefined ? reader.len : reader.pos + length;
7124
+ const message = createBaseQueryRentalOffersResponse();
7125
+ while (reader.pos < end) {
7126
+ const tag = reader.uint32();
7127
+ switch (tag >>> 3) {
7128
+ case 1:
7129
+ message.offers.push(types_1.RentalOffer.decode(reader, reader.uint32()));
7130
+ break;
7131
+ case 2:
7132
+ message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
7133
+ break;
7134
+ default:
7135
+ reader.skipType(tag & 7);
7136
+ break;
7137
+ }
7138
+ }
7139
+ return message;
7140
+ },
7141
+ fromPartial(object) {
7142
+ const message = createBaseQueryRentalOffersResponse();
7143
+ message.offers = object.offers?.map(e => types_1.RentalOffer.fromPartial(e)) || [];
7144
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
7145
+ return message;
7146
+ },
7147
+ fromAmino(object) {
7148
+ const message = createBaseQueryRentalOffersResponse();
7149
+ message.offers = object.offers?.map(e => types_1.RentalOffer.fromAmino(e)) || [];
7150
+ if (object.pagination !== undefined && object.pagination !== null) {
7151
+ message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
7152
+ }
7153
+ return message;
7154
+ },
7155
+ toAmino(message) {
7156
+ const obj = {};
7157
+ if (message.offers) {
7158
+ obj.offers = message.offers.map(e => e ? types_1.RentalOffer.toAmino(e) : undefined);
7159
+ }
7160
+ else {
7161
+ obj.offers = message.offers;
7162
+ }
7163
+ obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
7164
+ return obj;
7165
+ },
7166
+ fromAminoMsg(object) {
7167
+ return exports.QueryRentalOffersResponse.fromAmino(object.value);
7168
+ },
7169
+ fromProtoMsg(message) {
7170
+ return exports.QueryRentalOffersResponse.decode(message.value);
7171
+ },
7172
+ toProto(message) {
7173
+ return exports.QueryRentalOffersResponse.encode(message).finish();
7174
+ },
7175
+ toProtoMsg(message) {
7176
+ return {
7177
+ typeUrl: "/sparkdream.artifact.v1.QueryRentalOffersResponse",
7178
+ value: exports.QueryRentalOffersResponse.encode(message).finish()
7179
+ };
7180
+ }
7181
+ };