decentralcardgame-cardchain-client-ts 0.0.40 → 0.0.42

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.
@@ -47,6 +47,7 @@ import { MsgProfileAliasSet } from "../types/cardchain/cardchain/tx";
47
47
  import { MsgEarlyAccessInvite } from "../types/cardchain/cardchain/tx";
48
48
  import { MsgZealyConnect } from "../types/cardchain/cardchain/tx";
49
49
  import { MsgEncounterCreate } from "../types/cardchain/cardchain/tx";
50
+ import { MsgEncounterEdit } from "../types/cardchain/cardchain/tx";
50
51
  import { MsgEncounterDo } from "../types/cardchain/cardchain/tx";
51
52
  import { MsgEncounterClose } from "../types/cardchain/cardchain/tx";
52
53
  import { MsgEarlyAccessDisinvite } from "../types/cardchain/cardchain/tx";
@@ -54,7 +55,7 @@ import { MsgCardBan } from "../types/cardchain/cardchain/tx";
54
55
  import { MsgEarlyAccessGrant } from "../types/cardchain/cardchain/tx";
55
56
  import { MsgSetActivate } from "../types/cardchain/cardchain/tx";
56
57
  import { MsgCardCopyrightClaim } from "../types/cardchain/cardchain/tx";
57
- export { MsgUpdateParams, MsgUserCreate, MsgCardSchemeBuy, MsgCardSaveContent, MsgCardVote, MsgCardTransfer, MsgCardDonate, MsgCardArtworkAdd, MsgCardArtistChange, MsgCouncilRegister, MsgCouncilDeregister, MsgMatchReport, MsgCouncilCreate, MsgMatchReporterAppoint, MsgSetCreate, MsgSetCardAdd, MsgSetCardRemove, MsgSetContributorAdd, MsgSetContributorRemove, MsgSetFinalize, MsgSetArtworkAdd, MsgSetStoryAdd, MsgBoosterPackBuy, MsgSellOfferCreate, MsgSellOfferBuy, MsgSellOfferRemove, MsgCardRaritySet, MsgCouncilResponseCommit, MsgCouncilResponseReveal, MsgCouncilRestart, MsgMatchConfirm, MsgProfileCardSet, MsgProfileWebsiteSet, MsgProfileBioSet, MsgBoosterPackOpen, MsgBoosterPackTransfer, MsgSetStoryWriterSet, MsgSetArtistSet, MsgCardVoteMulti, MsgMatchOpen, MsgSetNameSet, MsgProfileAliasSet, MsgEarlyAccessInvite, MsgZealyConnect, MsgEncounterCreate, MsgEncounterDo, MsgEncounterClose, MsgEarlyAccessDisinvite, MsgCardBan, MsgEarlyAccessGrant, MsgSetActivate, MsgCardCopyrightClaim };
58
+ export { MsgUpdateParams, MsgUserCreate, MsgCardSchemeBuy, MsgCardSaveContent, MsgCardVote, MsgCardTransfer, MsgCardDonate, MsgCardArtworkAdd, MsgCardArtistChange, MsgCouncilRegister, MsgCouncilDeregister, MsgMatchReport, MsgCouncilCreate, MsgMatchReporterAppoint, MsgSetCreate, MsgSetCardAdd, MsgSetCardRemove, MsgSetContributorAdd, MsgSetContributorRemove, MsgSetFinalize, MsgSetArtworkAdd, MsgSetStoryAdd, MsgBoosterPackBuy, MsgSellOfferCreate, MsgSellOfferBuy, MsgSellOfferRemove, MsgCardRaritySet, MsgCouncilResponseCommit, MsgCouncilResponseReveal, MsgCouncilRestart, MsgMatchConfirm, MsgProfileCardSet, MsgProfileWebsiteSet, MsgProfileBioSet, MsgBoosterPackOpen, MsgBoosterPackTransfer, MsgSetStoryWriterSet, MsgSetArtistSet, MsgCardVoteMulti, MsgMatchOpen, MsgSetNameSet, MsgProfileAliasSet, MsgEarlyAccessInvite, MsgZealyConnect, MsgEncounterCreate, MsgEncounterEdit, MsgEncounterDo, MsgEncounterClose, MsgEarlyAccessDisinvite, MsgCardBan, MsgEarlyAccessGrant, MsgSetActivate, MsgCardCopyrightClaim };
58
59
  type sendMsgUpdateParamsParams = {
59
60
  value: MsgUpdateParams;
60
61
  fee?: StdFee;
@@ -280,6 +281,11 @@ type sendMsgEncounterCreateParams = {
280
281
  fee?: StdFee;
281
282
  memo?: string;
282
283
  };
284
+ type sendMsgEncounterEditParams = {
285
+ value: MsgEncounterEdit;
286
+ fee?: StdFee;
287
+ memo?: string;
288
+ };
283
289
  type sendMsgEncounterDoParams = {
284
290
  value: MsgEncounterDo;
285
291
  fee?: StdFee;
@@ -450,6 +456,9 @@ type msgZealyConnectParams = {
450
456
  type msgEncounterCreateParams = {
451
457
  value: MsgEncounterCreate;
452
458
  };
459
+ type msgEncounterEditParams = {
460
+ value: MsgEncounterEdit;
461
+ };
453
462
  type msgEncounterDoParams = {
454
463
  value: MsgEncounterDo;
455
464
  };
@@ -523,6 +532,7 @@ export declare const txClient: ({ signer, prefix, addr }?: TxClientOptions) => {
523
532
  sendMsgEarlyAccessInvite({ value, fee, memo }: sendMsgEarlyAccessInviteParams): Promise<DeliverTxResponse>;
524
533
  sendMsgZealyConnect({ value, fee, memo }: sendMsgZealyConnectParams): Promise<DeliverTxResponse>;
525
534
  sendMsgEncounterCreate({ value, fee, memo }: sendMsgEncounterCreateParams): Promise<DeliverTxResponse>;
535
+ sendMsgEncounterEdit({ value, fee, memo }: sendMsgEncounterEditParams): Promise<DeliverTxResponse>;
526
536
  sendMsgEncounterDo({ value, fee, memo }: sendMsgEncounterDoParams): Promise<DeliverTxResponse>;
527
537
  sendMsgEncounterClose({ value, fee, memo }: sendMsgEncounterCloseParams): Promise<DeliverTxResponse>;
528
538
  sendMsgEarlyAccessDisinvite({ value, fee, memo }: sendMsgEarlyAccessDisinviteParams): Promise<DeliverTxResponse>;
@@ -575,6 +585,7 @@ export declare const txClient: ({ signer, prefix, addr }?: TxClientOptions) => {
575
585
  msgEarlyAccessInvite({ value }: msgEarlyAccessInviteParams): EncodeObject;
576
586
  msgZealyConnect({ value }: msgZealyConnectParams): EncodeObject;
577
587
  msgEncounterCreate({ value }: msgEncounterCreateParams): EncodeObject;
588
+ msgEncounterEdit({ value }: msgEncounterEditParams): EncodeObject;
578
589
  msgEncounterDo({ value }: msgEncounterDoParams): EncodeObject;
579
590
  msgEncounterClose({ value }: msgEncounterCloseParams): EncodeObject;
580
591
  msgEarlyAccessDisinvite({ value }: msgEarlyAccessDisinviteParams): EncodeObject;
@@ -49,6 +49,7 @@ import { MsgProfileAliasSet } from "../types/cardchain/cardchain/tx";
49
49
  import { MsgEarlyAccessInvite } from "../types/cardchain/cardchain/tx";
50
50
  import { MsgZealyConnect } from "../types/cardchain/cardchain/tx";
51
51
  import { MsgEncounterCreate } from "../types/cardchain/cardchain/tx";
52
+ import { MsgEncounterEdit } from "../types/cardchain/cardchain/tx";
52
53
  import { MsgEncounterDo } from "../types/cardchain/cardchain/tx";
53
54
  import { MsgEncounterClose } from "../types/cardchain/cardchain/tx";
54
55
  import { MsgEarlyAccessDisinvite } from "../types/cardchain/cardchain/tx";
@@ -63,12 +64,12 @@ import { CardWithImage as typeCardWithImage } from "./types";
63
64
  import { Council as typeCouncil } from "./types";
64
65
  import { WrapClearResponse as typeWrapClearResponse } from "./types";
65
66
  import { WrapHashResponse as typeWrapHashResponse } from "./types";
66
- import { Parameter as typeParameter } from "./types";
67
67
  import { Encounter as typeEncounter } from "./types";
68
68
  import { EncounterWithImage as typeEncounterWithImage } from "./types";
69
69
  import { Image as typeImage } from "./types";
70
70
  import { Match as typeMatch } from "./types";
71
71
  import { MatchPlayer as typeMatchPlayer } from "./types";
72
+ import { Parameter as typeParameter } from "./types";
72
73
  import { Params as typeParams } from "./types";
73
74
  import { RunningAverage as typeRunningAverage } from "./types";
74
75
  import { SellOffer as typeSellOffer } from "./types";
@@ -85,7 +86,7 @@ import { VotingResult as typeVotingResult } from "./types";
85
86
  import { SingleVote as typeSingleVote } from "./types";
86
87
  import { VotingResults as typeVotingResults } from "./types";
87
88
  import { Zealy as typeZealy } from "./types";
88
- export { MsgUpdateParams, MsgUserCreate, MsgCardSchemeBuy, MsgCardSaveContent, MsgCardVote, MsgCardTransfer, MsgCardDonate, MsgCardArtworkAdd, MsgCardArtistChange, MsgCouncilRegister, MsgCouncilDeregister, MsgMatchReport, MsgCouncilCreate, MsgMatchReporterAppoint, MsgSetCreate, MsgSetCardAdd, MsgSetCardRemove, MsgSetContributorAdd, MsgSetContributorRemove, MsgSetFinalize, MsgSetArtworkAdd, MsgSetStoryAdd, MsgBoosterPackBuy, MsgSellOfferCreate, MsgSellOfferBuy, MsgSellOfferRemove, MsgCardRaritySet, MsgCouncilResponseCommit, MsgCouncilResponseReveal, MsgCouncilRestart, MsgMatchConfirm, MsgProfileCardSet, MsgProfileWebsiteSet, MsgProfileBioSet, MsgBoosterPackOpen, MsgBoosterPackTransfer, MsgSetStoryWriterSet, MsgSetArtistSet, MsgCardVoteMulti, MsgMatchOpen, MsgSetNameSet, MsgProfileAliasSet, MsgEarlyAccessInvite, MsgZealyConnect, MsgEncounterCreate, MsgEncounterDo, MsgEncounterClose, MsgEarlyAccessDisinvite, MsgCardBan, MsgEarlyAccessGrant, MsgSetActivate, MsgCardCopyrightClaim };
89
+ export { MsgUpdateParams, MsgUserCreate, MsgCardSchemeBuy, MsgCardSaveContent, MsgCardVote, MsgCardTransfer, MsgCardDonate, MsgCardArtworkAdd, MsgCardArtistChange, MsgCouncilRegister, MsgCouncilDeregister, MsgMatchReport, MsgCouncilCreate, MsgMatchReporterAppoint, MsgSetCreate, MsgSetCardAdd, MsgSetCardRemove, MsgSetContributorAdd, MsgSetContributorRemove, MsgSetFinalize, MsgSetArtworkAdd, MsgSetStoryAdd, MsgBoosterPackBuy, MsgSellOfferCreate, MsgSellOfferBuy, MsgSellOfferRemove, MsgCardRaritySet, MsgCouncilResponseCommit, MsgCouncilResponseReveal, MsgCouncilRestart, MsgMatchConfirm, MsgProfileCardSet, MsgProfileWebsiteSet, MsgProfileBioSet, MsgBoosterPackOpen, MsgBoosterPackTransfer, MsgSetStoryWriterSet, MsgSetArtistSet, MsgCardVoteMulti, MsgMatchOpen, MsgSetNameSet, MsgProfileAliasSet, MsgEarlyAccessInvite, MsgZealyConnect, MsgEncounterCreate, MsgEncounterEdit, MsgEncounterDo, MsgEncounterClose, MsgEarlyAccessDisinvite, MsgCardBan, MsgEarlyAccessGrant, MsgSetActivate, MsgCardCopyrightClaim };
89
90
  export const registry = new Registry(msgTypes);
90
91
  function getStructure(template) {
91
92
  const structure = { fields: [] };
@@ -731,6 +732,20 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
731
732
  throw new Error('TxClient:sendMsgEncounterCreate: Could not broadcast Tx: ' + e.message);
732
733
  }
733
734
  },
735
+ async sendMsgEncounterEdit({ value, fee, memo }) {
736
+ if (!signer) {
737
+ throw new Error('TxClient:sendMsgEncounterEdit: Unable to sign Tx. Signer is not present.');
738
+ }
739
+ try {
740
+ const { address } = (await signer.getAccounts())[0];
741
+ const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, aminoTypes: new AminoAdapter(registry) });
742
+ let msg = this.msgEncounterEdit({ value: MsgEncounterEdit.fromPartial(value) });
743
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
744
+ }
745
+ catch (e) {
746
+ throw new Error('TxClient:sendMsgEncounterEdit: Could not broadcast Tx: ' + e.message);
747
+ }
748
+ },
734
749
  async sendMsgEncounterDo({ value, fee, memo }) {
735
750
  if (!signer) {
736
751
  throw new Error('TxClient:sendMsgEncounterDo: Unable to sign Tx. Signer is not present.');
@@ -1189,6 +1204,14 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
1189
1204
  throw new Error('TxClient:MsgEncounterCreate: Could not create message: ' + e.message);
1190
1205
  }
1191
1206
  },
1207
+ msgEncounterEdit({ value }) {
1208
+ try {
1209
+ return { typeUrl: "/cardchain.cardchain.MsgEncounterEdit", value: MsgEncounterEdit.fromPartial(value) };
1210
+ }
1211
+ catch (e) {
1212
+ throw new Error('TxClient:MsgEncounterEdit: Could not create message: ' + e.message);
1213
+ }
1214
+ },
1192
1215
  msgEncounterDo({ value }) {
1193
1216
  try {
1194
1217
  return { typeUrl: "/cardchain.cardchain.MsgEncounterDo", value: MsgEncounterDo.fromPartial(value) };
@@ -1263,12 +1286,12 @@ class SDKModule {
1263
1286
  Council: getStructure(typeCouncil.fromPartial({})),
1264
1287
  WrapClearResponse: getStructure(typeWrapClearResponse.fromPartial({})),
1265
1288
  WrapHashResponse: getStructure(typeWrapHashResponse.fromPartial({})),
1266
- Parameter: getStructure(typeParameter.fromPartial({})),
1267
1289
  Encounter: getStructure(typeEncounter.fromPartial({})),
1268
1290
  EncounterWithImage: getStructure(typeEncounterWithImage.fromPartial({})),
1269
1291
  Image: getStructure(typeImage.fromPartial({})),
1270
1292
  Match: getStructure(typeMatch.fromPartial({})),
1271
1293
  MatchPlayer: getStructure(typeMatchPlayer.fromPartial({})),
1294
+ Parameter: getStructure(typeParameter.fromPartial({})),
1272
1295
  Params: getStructure(typeParams.fromPartial({})),
1273
1296
  RunningAverage: getStructure(typeRunningAverage.fromPartial({})),
1274
1297
  SellOffer: getStructure(typeSellOffer.fromPartial({})),
@@ -43,6 +43,7 @@ import { MsgProfileAliasSet } from "../types/cardchain/cardchain/tx";
43
43
  import { MsgEarlyAccessInvite } from "../types/cardchain/cardchain/tx";
44
44
  import { MsgZealyConnect } from "../types/cardchain/cardchain/tx";
45
45
  import { MsgEncounterCreate } from "../types/cardchain/cardchain/tx";
46
+ import { MsgEncounterEdit } from "../types/cardchain/cardchain/tx";
46
47
  import { MsgEncounterDo } from "../types/cardchain/cardchain/tx";
47
48
  import { MsgEncounterClose } from "../types/cardchain/cardchain/tx";
48
49
  import { MsgEarlyAccessDisinvite } from "../types/cardchain/cardchain/tx";
@@ -96,6 +97,7 @@ const msgTypes = [
96
97
  ["/cardchain.cardchain.MsgEarlyAccessInvite", MsgEarlyAccessInvite],
97
98
  ["/cardchain.cardchain.MsgZealyConnect", MsgZealyConnect],
98
99
  ["/cardchain.cardchain.MsgEncounterCreate", MsgEncounterCreate],
100
+ ["/cardchain.cardchain.MsgEncounterEdit", MsgEncounterEdit],
99
101
  ["/cardchain.cardchain.MsgEncounterDo", MsgEncounterDo],
100
102
  ["/cardchain.cardchain.MsgEncounterClose", MsgEncounterClose],
101
103
  ["/cardchain.cardchain.MsgEarlyAccessDisinvite", MsgEarlyAccessDisinvite],
@@ -1,5 +1,7 @@
1
1
  import { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from "axios";
2
2
  import { QueryCardsRequest } from "../types/cardchain/cardchain/query";
3
+ import { QueryEncountersRequest } from "../types/cardchain/cardchain/query";
4
+ import { QueryEncountersWithImageRequest } from "../types/cardchain/cardchain/query";
3
5
  import { QueryMatchesRequest } from "../types/cardchain/cardchain/query";
4
6
  import { QuerySetsRequest } from "../types/cardchain/cardchain/query";
5
7
  import { QueryCardContentsRequest } from "../types/cardchain/cardchain/query";
@@ -165,6 +167,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
165
167
  balance_anchor: boolean;
166
168
  starter_card: boolean;
167
169
  rarity: import("../types/cardchain/cardchain/card").CardRarity;
170
+ parameters: {
171
+ key: string;
172
+ value: string;
173
+ }[];
168
174
  };
169
175
  image: string;
170
176
  hash: string;
@@ -383,7 +389,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
383
389
  * @name queryEncounters
384
390
  * @request GET:/DecentralCardGame/cardchain/cardchain/encounters
385
391
  */
386
- queryEncounters: (query?: Record<string, any>, params?: RequestParams) => Promise<AxiosResponse<{
392
+ queryEncounters: (query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryEncountersRequest>>>, "">, params?: RequestParams) => Promise<AxiosResponse<{
387
393
  encounters: {
388
394
  id: number;
389
395
  drawlist: number[];
@@ -428,7 +434,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
428
434
  * @name queryEncountersWithImage
429
435
  * @request GET:/DecentralCardGame/cardchain/cardchain/encounters_with_image
430
436
  */
431
- queryEncountersWithImage: (query?: Record<string, any>, params?: RequestParams) => Promise<AxiosResponse<{
437
+ queryEncountersWithImage: (query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryEncountersWithImageRequest>>>, "">, params?: RequestParams) => Promise<AxiosResponse<{
432
438
  encounters: {
433
439
  encounter: {
434
440
  id: number;
@@ -5,12 +5,12 @@ import { CardWithImage } from "../types/cardchain/cardchain/card_with_image";
5
5
  import { Council } from "../types/cardchain/cardchain/council";
6
6
  import { WrapClearResponse } from "../types/cardchain/cardchain/council";
7
7
  import { WrapHashResponse } from "../types/cardchain/cardchain/council";
8
- import { Parameter } from "../types/cardchain/cardchain/encounter";
9
8
  import { Encounter } from "../types/cardchain/cardchain/encounter";
10
9
  import { EncounterWithImage } from "../types/cardchain/cardchain/encounter_with_image";
11
10
  import { Image } from "../types/cardchain/cardchain/image";
12
11
  import { Match } from "../types/cardchain/cardchain/match";
13
12
  import { MatchPlayer } from "../types/cardchain/cardchain/match";
13
+ import { Parameter } from "../types/cardchain/cardchain/parameter";
14
14
  import { Params } from "../types/cardchain/cardchain/params";
15
15
  import { RunningAverage } from "../types/cardchain/cardchain/running_average";
16
16
  import { SellOffer } from "../types/cardchain/cardchain/sell_offer";
@@ -27,4 +27,4 @@ import { VotingResult } from "../types/cardchain/cardchain/voting";
27
27
  import { SingleVote } from "../types/cardchain/cardchain/voting";
28
28
  import { VotingResults } from "../types/cardchain/cardchain/voting_results";
29
29
  import { Zealy } from "../types/cardchain/cardchain/zealy";
30
- export { Card, TimeStamp, CardContent, CardWithImage, Council, WrapClearResponse, WrapHashResponse, Parameter, Encounter, EncounterWithImage, Image, Match, MatchPlayer, Params, RunningAverage, SellOffer, Server, Set, InnerRarities, AddrWithQuantity, SetWithArtwork, User, EarlyAccess, BoosterPack, AirDrops, VotingResult, SingleVote, VotingResults, Zealy, };
30
+ export { Card, TimeStamp, CardContent, CardWithImage, Council, WrapClearResponse, WrapHashResponse, Encounter, EncounterWithImage, Image, Match, MatchPlayer, Parameter, Params, RunningAverage, SellOffer, Server, Set, InnerRarities, AddrWithQuantity, SetWithArtwork, User, EarlyAccess, BoosterPack, AirDrops, VotingResult, SingleVote, VotingResults, Zealy, };
@@ -5,12 +5,12 @@ import { CardWithImage } from "../types/cardchain/cardchain/card_with_image";
5
5
  import { Council } from "../types/cardchain/cardchain/council";
6
6
  import { WrapClearResponse } from "../types/cardchain/cardchain/council";
7
7
  import { WrapHashResponse } from "../types/cardchain/cardchain/council";
8
- import { Parameter } from "../types/cardchain/cardchain/encounter";
9
8
  import { Encounter } from "../types/cardchain/cardchain/encounter";
10
9
  import { EncounterWithImage } from "../types/cardchain/cardchain/encounter_with_image";
11
10
  import { Image } from "../types/cardchain/cardchain/image";
12
11
  import { Match } from "../types/cardchain/cardchain/match";
13
12
  import { MatchPlayer } from "../types/cardchain/cardchain/match";
13
+ import { Parameter } from "../types/cardchain/cardchain/parameter";
14
14
  import { Params } from "../types/cardchain/cardchain/params";
15
15
  import { RunningAverage } from "../types/cardchain/cardchain/running_average";
16
16
  import { SellOffer } from "../types/cardchain/cardchain/sell_offer";
@@ -27,4 +27,4 @@ import { VotingResult } from "../types/cardchain/cardchain/voting";
27
27
  import { SingleVote } from "../types/cardchain/cardchain/voting";
28
28
  import { VotingResults } from "../types/cardchain/cardchain/voting_results";
29
29
  import { Zealy } from "../types/cardchain/cardchain/zealy";
30
- export { Card, TimeStamp, CardContent, CardWithImage, Council, WrapClearResponse, WrapHashResponse, Parameter, Encounter, EncounterWithImage, Image, Match, MatchPlayer, Params, RunningAverage, SellOffer, Server, Set, InnerRarities, AddrWithQuantity, SetWithArtwork, User, EarlyAccess, BoosterPack, AirDrops, VotingResult, SingleVote, VotingResults, Zealy, };
30
+ export { Card, TimeStamp, CardContent, CardWithImage, Council, WrapClearResponse, WrapHashResponse, Encounter, EncounterWithImage, Image, Match, MatchPlayer, Parameter, Params, RunningAverage, SellOffer, Server, Set, InnerRarities, AddrWithQuantity, SetWithArtwork, User, EarlyAccess, BoosterPack, AirDrops, VotingResult, SingleVote, VotingResults, Zealy, };
package/lib/index.d.ts CHANGED
@@ -42,17 +42,17 @@ declare const Client: typeof IgniteClient & import("./helpers").Constructor<{
42
42
  updateTX(client: IgniteClient): void;
43
43
  };
44
44
  } & {
45
- CosmosCircuitV_1: {
46
- query: ReturnType<typeof import("./cosmos.circuit.v1").queryClient>;
47
- tx: ReturnType<typeof import("./cosmos.circuit.v1").txClient>;
45
+ CosmosFeegrantV_1Beta_1: {
46
+ query: ReturnType<typeof import("./cosmos.feegrant.v1beta1").queryClient>;
47
+ tx: ReturnType<typeof import("./cosmos.feegrant.v1beta1").txClient>;
48
48
  structure: Record<string, unknown>;
49
49
  registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
50
50
  updateTX(client: IgniteClient): void;
51
51
  };
52
52
  } & {
53
- CosmosNftV_1Beta_1: {
54
- query: ReturnType<typeof import("./cosmos.nft.v1beta1").queryClient>;
55
- tx: ReturnType<typeof import("./cosmos.nft.v1beta1").txClient>;
53
+ CosmosUpgradeV_1Beta_1: {
54
+ query: ReturnType<typeof import("./cosmos.upgrade.v1beta1").queryClient>;
55
+ tx: ReturnType<typeof import("./cosmos.upgrade.v1beta1").txClient>;
56
56
  structure: Record<string, unknown>;
57
57
  registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
58
58
  updateTX(client: IgniteClient): void;
@@ -169,30 +169,6 @@ declare const Client: typeof IgniteClient & import("./helpers").Constructor<{
169
169
  registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
170
170
  updateTX(client: IgniteClient): void;
171
171
  };
172
- } & {
173
- CosmosEvidenceV_1Beta_1: {
174
- query: ReturnType<typeof import("./cosmos.evidence.v1beta1").queryClient>;
175
- tx: ReturnType<typeof import("./cosmos.evidence.v1beta1").txClient>;
176
- structure: Record<string, unknown>;
177
- registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
178
- updateTX(client: IgniteClient): void;
179
- };
180
- } & {
181
- CosmosFeegrantV_1Beta_1: {
182
- query: ReturnType<typeof import("./cosmos.feegrant.v1beta1").queryClient>;
183
- tx: ReturnType<typeof import("./cosmos.feegrant.v1beta1").txClient>;
184
- structure: Record<string, unknown>;
185
- registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
186
- updateTX(client: IgniteClient): void;
187
- };
188
- } & {
189
- CosmosUpgradeV_1Beta_1: {
190
- query: ReturnType<typeof import("./cosmos.upgrade.v1beta1").queryClient>;
191
- tx: ReturnType<typeof import("./cosmos.upgrade.v1beta1").txClient>;
192
- structure: Record<string, unknown>;
193
- registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
194
- updateTX(client: IgniteClient): void;
195
- };
196
172
  } & {
197
173
  IbcApplicationsFeeV_1: {
198
174
  query: ReturnType<typeof import("./ibc.applications.fee.v1").queryClient>;
@@ -249,6 +225,30 @@ declare const Client: typeof IgniteClient & import("./helpers").Constructor<{
249
225
  registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
250
226
  updateTX(client: IgniteClient): void;
251
227
  };
228
+ } & {
229
+ CosmosCircuitV_1: {
230
+ query: ReturnType<typeof import("./cosmos.circuit.v1").queryClient>;
231
+ tx: ReturnType<typeof import("./cosmos.circuit.v1").txClient>;
232
+ structure: Record<string, unknown>;
233
+ registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
234
+ updateTX(client: IgniteClient): void;
235
+ };
236
+ } & {
237
+ CosmosEvidenceV_1Beta_1: {
238
+ query: ReturnType<typeof import("./cosmos.evidence.v1beta1").queryClient>;
239
+ tx: ReturnType<typeof import("./cosmos.evidence.v1beta1").txClient>;
240
+ structure: Record<string, unknown>;
241
+ registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
242
+ updateTX(client: IgniteClient): void;
243
+ };
244
+ } & {
245
+ CosmosNftV_1Beta_1: {
246
+ query: ReturnType<typeof import("./cosmos.nft.v1beta1").queryClient>;
247
+ tx: ReturnType<typeof import("./cosmos.nft.v1beta1").txClient>;
248
+ structure: Record<string, unknown>;
249
+ registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
250
+ updateTX(client: IgniteClient): void;
251
+ };
252
252
  }>;
253
253
  declare const registry: Registry;
254
254
  export { Client, registry, MissingWalletError };
package/lib/index.js CHANGED
@@ -4,8 +4,8 @@ import { IgniteClient } from "./client";
4
4
  import { MissingWalletError } from "./helpers";
5
5
  import { IgntModule as CardchainCardchain, msgTypes as CardchainCardchainMsgTypes } from './cardchain.cardchain';
6
6
  import { IgntModule as CardchainFeatureflag, msgTypes as CardchainFeatureflagMsgTypes } from './cardchain.featureflag';
7
- import { IgntModule as CosmosCircuitV_1, msgTypes as CosmosCircuitV_1MsgTypes } from './cosmos.circuit.v1';
8
- import { IgntModule as CosmosNftV_1Beta_1, msgTypes as CosmosNftV_1Beta_1MsgTypes } from './cosmos.nft.v1beta1';
7
+ import { IgntModule as CosmosFeegrantV_1Beta_1, msgTypes as CosmosFeegrantV_1Beta_1MsgTypes } from './cosmos.feegrant.v1beta1';
8
+ import { IgntModule as CosmosUpgradeV_1Beta_1, msgTypes as CosmosUpgradeV_1Beta_1MsgTypes } from './cosmos.upgrade.v1beta1';
9
9
  import { IgntModule as CosmosAuthV_1Beta_1, msgTypes as CosmosAuthV_1Beta_1MsgTypes } from './cosmos.auth.v1beta1';
10
10
  import { IgntModule as CosmosAuthzV_1Beta_1, msgTypes as CosmosAuthzV_1Beta_1MsgTypes } from './cosmos.authz.v1beta1';
11
11
  import { IgntModule as CosmosBankV_1Beta_1, msgTypes as CosmosBankV_1Beta_1MsgTypes } from './cosmos.bank.v1beta1';
@@ -23,9 +23,6 @@ import { IgntModule as CosmosSlashingV_1Beta_1, msgTypes as CosmosSlashingV_1Bet
23
23
  import { IgntModule as CosmosStakingV_1Beta_1, msgTypes as CosmosStakingV_1Beta_1MsgTypes } from './cosmos.staking.v1beta1';
24
24
  import { IgntModule as CosmosTxV_1Beta_1, msgTypes as CosmosTxV_1Beta_1MsgTypes } from './cosmos.tx.v1beta1';
25
25
  import { IgntModule as CosmosVestingV_1Beta_1, msgTypes as CosmosVestingV_1Beta_1MsgTypes } from './cosmos.vesting.v1beta1';
26
- import { IgntModule as CosmosEvidenceV_1Beta_1, msgTypes as CosmosEvidenceV_1Beta_1MsgTypes } from './cosmos.evidence.v1beta1';
27
- import { IgntModule as CosmosFeegrantV_1Beta_1, msgTypes as CosmosFeegrantV_1Beta_1MsgTypes } from './cosmos.feegrant.v1beta1';
28
- import { IgntModule as CosmosUpgradeV_1Beta_1, msgTypes as CosmosUpgradeV_1Beta_1MsgTypes } from './cosmos.upgrade.v1beta1';
29
26
  import { IgntModule as IbcApplicationsFeeV_1, msgTypes as IbcApplicationsFeeV_1MsgTypes } from './ibc.applications.fee.v1';
30
27
  import { IgntModule as IbcApplicationsInterchainAccountsControllerV_1, msgTypes as IbcApplicationsInterchainAccountsControllerV_1MsgTypes } from './ibc.applications.interchain_accounts.controller.v1';
31
28
  import { IgntModule as IbcApplicationsInterchainAccountsHostV_1, msgTypes as IbcApplicationsInterchainAccountsHostV_1MsgTypes } from './ibc.applications.interchain_accounts.host.v1';
@@ -33,14 +30,17 @@ import { IgntModule as IbcApplicationsTransferV_1, msgTypes as IbcApplicationsTr
33
30
  import { IgntModule as IbcCoreChannelV_1, msgTypes as IbcCoreChannelV_1MsgTypes } from './ibc.core.channel.v1';
34
31
  import { IgntModule as IbcCoreClientV_1, msgTypes as IbcCoreClientV_1MsgTypes } from './ibc.core.client.v1';
35
32
  import { IgntModule as IbcCoreConnectionV_1, msgTypes as IbcCoreConnectionV_1MsgTypes } from './ibc.core.connection.v1';
33
+ import { IgntModule as CosmosCircuitV_1, msgTypes as CosmosCircuitV_1MsgTypes } from './cosmos.circuit.v1';
34
+ import { IgntModule as CosmosEvidenceV_1Beta_1, msgTypes as CosmosEvidenceV_1Beta_1MsgTypes } from './cosmos.evidence.v1beta1';
35
+ import { IgntModule as CosmosNftV_1Beta_1, msgTypes as CosmosNftV_1Beta_1MsgTypes } from './cosmos.nft.v1beta1';
36
36
  const Client = IgniteClient.plugin([
37
- CardchainCardchain, CardchainFeatureflag, CosmosCircuitV_1, CosmosNftV_1Beta_1, CosmosAuthV_1Beta_1, CosmosAuthzV_1Beta_1, CosmosBankV_1Beta_1, CosmosBaseNodeV_1Beta_1, CosmosBaseTendermintV_1Beta_1, CosmosConsensusV_1, CosmosCrisisV_1Beta_1, CosmosDistributionV_1Beta_1, CosmosGovV_1, CosmosGovV_1Beta_1, CosmosGroupV_1, CosmosMintV_1Beta_1, CosmosParamsV_1Beta_1, CosmosSlashingV_1Beta_1, CosmosStakingV_1Beta_1, CosmosTxV_1Beta_1, CosmosVestingV_1Beta_1, CosmosEvidenceV_1Beta_1, CosmosFeegrantV_1Beta_1, CosmosUpgradeV_1Beta_1, IbcApplicationsFeeV_1, IbcApplicationsInterchainAccountsControllerV_1, IbcApplicationsInterchainAccountsHostV_1, IbcApplicationsTransferV_1, IbcCoreChannelV_1, IbcCoreClientV_1, IbcCoreConnectionV_1
37
+ CardchainCardchain, CardchainFeatureflag, CosmosFeegrantV_1Beta_1, CosmosUpgradeV_1Beta_1, CosmosAuthV_1Beta_1, CosmosAuthzV_1Beta_1, CosmosBankV_1Beta_1, CosmosBaseNodeV_1Beta_1, CosmosBaseTendermintV_1Beta_1, CosmosConsensusV_1, CosmosCrisisV_1Beta_1, CosmosDistributionV_1Beta_1, CosmosGovV_1, CosmosGovV_1Beta_1, CosmosGroupV_1, CosmosMintV_1Beta_1, CosmosParamsV_1Beta_1, CosmosSlashingV_1Beta_1, CosmosStakingV_1Beta_1, CosmosTxV_1Beta_1, CosmosVestingV_1Beta_1, IbcApplicationsFeeV_1, IbcApplicationsInterchainAccountsControllerV_1, IbcApplicationsInterchainAccountsHostV_1, IbcApplicationsTransferV_1, IbcCoreChannelV_1, IbcCoreClientV_1, IbcCoreConnectionV_1, CosmosCircuitV_1, CosmosEvidenceV_1Beta_1, CosmosNftV_1Beta_1
38
38
  ]);
39
39
  const registry = new Registry([
40
40
  ...CardchainCardchainMsgTypes,
41
41
  ...CardchainFeatureflagMsgTypes,
42
- ...CosmosCircuitV_1MsgTypes,
43
- ...CosmosNftV_1Beta_1MsgTypes,
42
+ ...CosmosFeegrantV_1Beta_1MsgTypes,
43
+ ...CosmosUpgradeV_1Beta_1MsgTypes,
44
44
  ...CosmosAuthV_1Beta_1MsgTypes,
45
45
  ...CosmosAuthzV_1Beta_1MsgTypes,
46
46
  ...CosmosBankV_1Beta_1MsgTypes,
@@ -58,9 +58,6 @@ const registry = new Registry([
58
58
  ...CosmosStakingV_1Beta_1MsgTypes,
59
59
  ...CosmosTxV_1Beta_1MsgTypes,
60
60
  ...CosmosVestingV_1Beta_1MsgTypes,
61
- ...CosmosEvidenceV_1Beta_1MsgTypes,
62
- ...CosmosFeegrantV_1Beta_1MsgTypes,
63
- ...CosmosUpgradeV_1Beta_1MsgTypes,
64
61
  ...IbcApplicationsFeeV_1MsgTypes,
65
62
  ...IbcApplicationsInterchainAccountsControllerV_1MsgTypes,
66
63
  ...IbcApplicationsInterchainAccountsHostV_1MsgTypes,
@@ -68,5 +65,8 @@ const registry = new Registry([
68
65
  ...IbcCoreChannelV_1MsgTypes,
69
66
  ...IbcCoreClientV_1MsgTypes,
70
67
  ...IbcCoreConnectionV_1MsgTypes,
68
+ ...CosmosCircuitV_1MsgTypes,
69
+ ...CosmosEvidenceV_1Beta_1MsgTypes,
70
+ ...CosmosNftV_1Beta_1MsgTypes,
71
71
  ]);
72
72
  export { Client, registry, MissingWalletError };
@@ -1,5 +1,6 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { Coin } from "../../cosmos/base/v1beta1/coin";
3
+ import { Parameter } from "./parameter";
3
4
  export declare const protobufPackage = "cardchain.cardchain";
4
5
  export declare enum CardStatus {
5
6
  none = 0,
@@ -62,6 +63,7 @@ export interface Card {
62
63
  balanceAnchor: boolean;
63
64
  starterCard: boolean;
64
65
  rarity: CardRarity;
66
+ parameters: Parameter[];
65
67
  }
66
68
  export interface TimeStamp {
67
69
  timeStamp: number;
@@ -6,6 +6,7 @@
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
8
  import { Coin } from "../../cosmos/base/v1beta1/coin";
9
+ import { Parameter } from "./parameter";
9
10
  export const protobufPackage = "cardchain.cardchain";
10
11
  export var CardStatus;
11
12
  (function (CardStatus) {
@@ -240,6 +241,7 @@ function createBaseCard() {
240
241
  balanceAnchor: false,
241
242
  starterCard: false,
242
243
  rarity: 0,
244
+ parameters: [],
243
245
  };
244
246
  }
245
247
  export const Card = {
@@ -295,6 +297,9 @@ export const Card = {
295
297
  if (message.rarity !== 0) {
296
298
  writer.uint32(136).int32(message.rarity);
297
299
  }
300
+ for (const v of message.parameters) {
301
+ Parameter.encode(v, writer.uint32(146).fork()).join();
302
+ }
298
303
  return writer;
299
304
  },
300
305
  decode(input, length) {
@@ -423,6 +428,13 @@ export const Card = {
423
428
  message.rarity = reader.int32();
424
429
  continue;
425
430
  }
431
+ case 18: {
432
+ if (tag !== 146) {
433
+ break;
434
+ }
435
+ message.parameters.push(Parameter.decode(reader, reader.uint32()));
436
+ continue;
437
+ }
426
438
  }
427
439
  if ((tag & 7) === 4 || tag === 0) {
428
440
  break;
@@ -450,6 +462,9 @@ export const Card = {
450
462
  balanceAnchor: isSet(object.balanceAnchor) ? globalThis.Boolean(object.balanceAnchor) : false,
451
463
  starterCard: isSet(object.starterCard) ? globalThis.Boolean(object.starterCard) : false,
452
464
  rarity: isSet(object.rarity) ? cardRarityFromJSON(object.rarity) : 0,
465
+ parameters: globalThis.Array.isArray(object?.parameters)
466
+ ? object.parameters.map((e) => Parameter.fromJSON(e))
467
+ : [],
453
468
  };
454
469
  },
455
470
  toJSON(message) {
@@ -505,6 +520,9 @@ export const Card = {
505
520
  if (message.rarity !== 0) {
506
521
  obj.rarity = cardRarityToJSON(message.rarity);
507
522
  }
523
+ if (message.parameters?.length) {
524
+ obj.parameters = message.parameters.map((e) => Parameter.toJSON(e));
525
+ }
508
526
  return obj;
509
527
  },
510
528
  create(base) {
@@ -531,6 +549,7 @@ export const Card = {
531
549
  message.balanceAnchor = object.balanceAnchor ?? false;
532
550
  message.starterCard = object.starterCard ?? false;
533
551
  message.rarity = object.rarity ?? 0;
552
+ message.parameters = object.parameters?.map((e) => Parameter.fromPartial(e)) || [];
534
553
  return message;
535
554
  },
536
555
  };
@@ -1,9 +1,6 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Parameter } from "./parameter";
2
3
  export declare const protobufPackage = "cardchain.cardchain";
3
- export interface Parameter {
4
- key: string;
5
- value: string;
6
- }
7
4
  export interface Encounter {
8
5
  id: number;
9
6
  drawlist: number[];
@@ -13,7 +10,6 @@ export interface Encounter {
13
10
  imageId: number;
14
11
  name: string;
15
12
  }
16
- export declare const Parameter: MessageFns<Parameter>;
17
13
  export declare const Encounter: MessageFns<Encounter>;
18
14
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
19
15
  export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
@@ -5,75 +5,8 @@
5
5
  // source: cardchain/cardchain/encounter.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ import { Parameter } from "./parameter";
8
9
  export const protobufPackage = "cardchain.cardchain";
9
- function createBaseParameter() {
10
- return { key: "", value: "" };
11
- }
12
- export const Parameter = {
13
- encode(message, writer = new BinaryWriter()) {
14
- if (message.key !== "") {
15
- writer.uint32(10).string(message.key);
16
- }
17
- if (message.value !== "") {
18
- writer.uint32(18).string(message.value);
19
- }
20
- return writer;
21
- },
22
- decode(input, length) {
23
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24
- let end = length === undefined ? reader.len : reader.pos + length;
25
- const message = createBaseParameter();
26
- while (reader.pos < end) {
27
- const tag = reader.uint32();
28
- switch (tag >>> 3) {
29
- case 1: {
30
- if (tag !== 10) {
31
- break;
32
- }
33
- message.key = reader.string();
34
- continue;
35
- }
36
- case 2: {
37
- if (tag !== 18) {
38
- break;
39
- }
40
- message.value = reader.string();
41
- continue;
42
- }
43
- }
44
- if ((tag & 7) === 4 || tag === 0) {
45
- break;
46
- }
47
- reader.skip(tag & 7);
48
- }
49
- return message;
50
- },
51
- fromJSON(object) {
52
- return {
53
- key: isSet(object.key) ? globalThis.String(object.key) : "",
54
- value: isSet(object.value) ? globalThis.String(object.value) : "",
55
- };
56
- },
57
- toJSON(message) {
58
- const obj = {};
59
- if (message.key !== "") {
60
- obj.key = message.key;
61
- }
62
- if (message.value !== "") {
63
- obj.value = message.value;
64
- }
65
- return obj;
66
- },
67
- create(base) {
68
- return Parameter.fromPartial(base ?? {});
69
- },
70
- fromPartial(object) {
71
- const message = createBaseParameter();
72
- message.key = object.key ?? "";
73
- message.value = object.value ?? "";
74
- return message;
75
- },
76
- };
77
10
  function createBaseEncounter() {
78
11
  return { id: 0, drawlist: [], proven: false, owner: "", parameters: [], imageId: 0, name: "" };
79
12
  }
@@ -0,0 +1,26 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "cardchain.cardchain";
3
+ export interface Parameter {
4
+ key: string;
5
+ value: string;
6
+ }
7
+ export declare const Parameter: MessageFns<Parameter>;
8
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
9
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
10
+ [K in keyof T]?: DeepPartial<T[K]>;
11
+ } : Partial<T>;
12
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
13
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
14
+ [K in keyof P]: Exact<P[K], I[K]>;
15
+ } & {
16
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
17
+ };
18
+ export interface MessageFns<T> {
19
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
20
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
21
+ fromJSON(object: any): T;
22
+ toJSON(message: T): unknown;
23
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
24
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
25
+ }
26
+ export {};
@@ -0,0 +1,79 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.6.1
4
+ // protoc unknown
5
+ // source: cardchain/cardchain/parameter.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ export const protobufPackage = "cardchain.cardchain";
9
+ function createBaseParameter() {
10
+ return { key: "", value: "" };
11
+ }
12
+ export const Parameter = {
13
+ encode(message, writer = new BinaryWriter()) {
14
+ if (message.key !== "") {
15
+ writer.uint32(10).string(message.key);
16
+ }
17
+ if (message.value !== "") {
18
+ writer.uint32(18).string(message.value);
19
+ }
20
+ return writer;
21
+ },
22
+ decode(input, length) {
23
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24
+ let end = length === undefined ? reader.len : reader.pos + length;
25
+ const message = createBaseParameter();
26
+ while (reader.pos < end) {
27
+ const tag = reader.uint32();
28
+ switch (tag >>> 3) {
29
+ case 1: {
30
+ if (tag !== 10) {
31
+ break;
32
+ }
33
+ message.key = reader.string();
34
+ continue;
35
+ }
36
+ case 2: {
37
+ if (tag !== 18) {
38
+ break;
39
+ }
40
+ message.value = reader.string();
41
+ continue;
42
+ }
43
+ }
44
+ if ((tag & 7) === 4 || tag === 0) {
45
+ break;
46
+ }
47
+ reader.skip(tag & 7);
48
+ }
49
+ return message;
50
+ },
51
+ fromJSON(object) {
52
+ return {
53
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
54
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
55
+ };
56
+ },
57
+ toJSON(message) {
58
+ const obj = {};
59
+ if (message.key !== "") {
60
+ obj.key = message.key;
61
+ }
62
+ if (message.value !== "") {
63
+ obj.value = message.value;
64
+ }
65
+ return obj;
66
+ },
67
+ create(base) {
68
+ return Parameter.fromPartial(base ?? {});
69
+ },
70
+ fromPartial(object) {
71
+ const message = createBaseParameter();
72
+ message.key = object.key ?? "";
73
+ message.value = object.value ?? "";
74
+ return message;
75
+ },
76
+ };
77
+ function isSet(value) {
78
+ return value !== null && value !== undefined;
79
+ }
@@ -89,6 +89,7 @@ export interface QueryEncounterResponse {
89
89
  encounter: Encounter | undefined;
90
90
  }
91
91
  export interface QueryEncountersRequest {
92
+ owner: string;
92
93
  }
93
94
  export interface QueryEncountersResponse {
94
95
  encounters: Encounter[];
@@ -100,6 +101,7 @@ export interface QueryEncounterWithImageResponse {
100
101
  encounter: EncounterWithImage | undefined;
101
102
  }
102
103
  export interface QueryEncountersWithImageRequest {
104
+ owner: string;
103
105
  }
104
106
  export interface QueryEncountersWithImageResponse {
105
107
  encounters: EncounterWithImage[];
@@ -1271,10 +1271,13 @@ export const QueryEncounterResponse = {
1271
1271
  },
1272
1272
  };
1273
1273
  function createBaseQueryEncountersRequest() {
1274
- return {};
1274
+ return { owner: "" };
1275
1275
  }
1276
1276
  export const QueryEncountersRequest = {
1277
- encode(_, writer = new BinaryWriter()) {
1277
+ encode(message, writer = new BinaryWriter()) {
1278
+ if (message.owner !== "") {
1279
+ writer.uint32(10).string(message.owner);
1280
+ }
1278
1281
  return writer;
1279
1282
  },
1280
1283
  decode(input, length) {
@@ -1284,6 +1287,13 @@ export const QueryEncountersRequest = {
1284
1287
  while (reader.pos < end) {
1285
1288
  const tag = reader.uint32();
1286
1289
  switch (tag >>> 3) {
1290
+ case 1: {
1291
+ if (tag !== 10) {
1292
+ break;
1293
+ }
1294
+ message.owner = reader.string();
1295
+ continue;
1296
+ }
1287
1297
  }
1288
1298
  if ((tag & 7) === 4 || tag === 0) {
1289
1299
  break;
@@ -1292,18 +1302,22 @@ export const QueryEncountersRequest = {
1292
1302
  }
1293
1303
  return message;
1294
1304
  },
1295
- fromJSON(_) {
1296
- return {};
1305
+ fromJSON(object) {
1306
+ return { owner: isSet(object.owner) ? globalThis.String(object.owner) : "" };
1297
1307
  },
1298
- toJSON(_) {
1308
+ toJSON(message) {
1299
1309
  const obj = {};
1310
+ if (message.owner !== "") {
1311
+ obj.owner = message.owner;
1312
+ }
1300
1313
  return obj;
1301
1314
  },
1302
1315
  create(base) {
1303
1316
  return QueryEncountersRequest.fromPartial(base ?? {});
1304
1317
  },
1305
- fromPartial(_) {
1318
+ fromPartial(object) {
1306
1319
  const message = createBaseQueryEncountersRequest();
1320
+ message.owner = object.owner ?? "";
1307
1321
  return message;
1308
1322
  },
1309
1323
  };
@@ -1467,10 +1481,13 @@ export const QueryEncounterWithImageResponse = {
1467
1481
  },
1468
1482
  };
1469
1483
  function createBaseQueryEncountersWithImageRequest() {
1470
- return {};
1484
+ return { owner: "" };
1471
1485
  }
1472
1486
  export const QueryEncountersWithImageRequest = {
1473
- encode(_, writer = new BinaryWriter()) {
1487
+ encode(message, writer = new BinaryWriter()) {
1488
+ if (message.owner !== "") {
1489
+ writer.uint32(10).string(message.owner);
1490
+ }
1474
1491
  return writer;
1475
1492
  },
1476
1493
  decode(input, length) {
@@ -1480,6 +1497,13 @@ export const QueryEncountersWithImageRequest = {
1480
1497
  while (reader.pos < end) {
1481
1498
  const tag = reader.uint32();
1482
1499
  switch (tag >>> 3) {
1500
+ case 1: {
1501
+ if (tag !== 10) {
1502
+ break;
1503
+ }
1504
+ message.owner = reader.string();
1505
+ continue;
1506
+ }
1483
1507
  }
1484
1508
  if ((tag & 7) === 4 || tag === 0) {
1485
1509
  break;
@@ -1488,18 +1512,22 @@ export const QueryEncountersWithImageRequest = {
1488
1512
  }
1489
1513
  return message;
1490
1514
  },
1491
- fromJSON(_) {
1492
- return {};
1515
+ fromJSON(object) {
1516
+ return { owner: isSet(object.owner) ? globalThis.String(object.owner) : "" };
1493
1517
  },
1494
- toJSON(_) {
1518
+ toJSON(message) {
1495
1519
  const obj = {};
1520
+ if (message.owner !== "") {
1521
+ obj.owner = message.owner;
1522
+ }
1496
1523
  return obj;
1497
1524
  },
1498
1525
  create(base) {
1499
1526
  return QueryEncountersWithImageRequest.fromPartial(base ?? {});
1500
1527
  },
1501
- fromPartial(_) {
1528
+ fromPartial(object) {
1502
1529
  const message = createBaseQueryEncountersWithImageRequest();
1530
+ message.owner = object.owner ?? "";
1503
1531
  return message;
1504
1532
  },
1505
1533
  };
@@ -2,8 +2,8 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { Coin } from "../../cosmos/base/v1beta1/coin";
3
3
  import { CardRarity } from "./card";
4
4
  import { Response } from "./council";
5
- import { Parameter } from "./encounter";
6
5
  import { Outcome } from "./match";
6
+ import { Parameter } from "./parameter";
7
7
  import { Params } from "./params";
8
8
  import { SingleVote } from "./voting";
9
9
  export declare const protobufPackage = "cardchain.cardchain";
@@ -44,6 +44,7 @@ export interface MsgCardSaveContent {
44
44
  notes: string;
45
45
  artist: string;
46
46
  balanceAnchor: boolean;
47
+ parameters: Parameter[];
47
48
  }
48
49
  export interface MsgCardSaveContentResponse {
49
50
  airdropClaimed: boolean;
@@ -333,6 +334,18 @@ export interface MsgEncounterCreate {
333
334
  }
334
335
  export interface MsgEncounterCreateResponse {
335
336
  }
337
+ /** MsgEncounterEdit defines the MsgEncounterEdit message. */
338
+ export interface MsgEncounterEdit {
339
+ creator: string;
340
+ id: number;
341
+ name: string;
342
+ drawlist: number[];
343
+ parameters: Parameter[];
344
+ image: Uint8Array;
345
+ }
346
+ /** MsgEncounterEditResponse defines the MsgEncounterEditResponse message. */
347
+ export interface MsgEncounterEditResponse {
348
+ }
336
349
  export interface MsgEncounterDo {
337
350
  creator: string;
338
351
  encounterId: number;
@@ -468,6 +481,8 @@ export declare const MsgZealyConnect: MessageFns<MsgZealyConnect>;
468
481
  export declare const MsgZealyConnectResponse: MessageFns<MsgZealyConnectResponse>;
469
482
  export declare const MsgEncounterCreate: MessageFns<MsgEncounterCreate>;
470
483
  export declare const MsgEncounterCreateResponse: MessageFns<MsgEncounterCreateResponse>;
484
+ export declare const MsgEncounterEdit: MessageFns<MsgEncounterEdit>;
485
+ export declare const MsgEncounterEditResponse: MessageFns<MsgEncounterEditResponse>;
471
486
  export declare const MsgEncounterDo: MessageFns<MsgEncounterDo>;
472
487
  export declare const MsgEncounterDoResponse: MessageFns<MsgEncounterDoResponse>;
473
488
  export declare const MsgEncounterClose: MessageFns<MsgEncounterClose>;
@@ -533,6 +548,7 @@ export interface Msg {
533
548
  EarlyAccessInvite(request: MsgEarlyAccessInvite): Promise<MsgEarlyAccessInviteResponse>;
534
549
  ZealyConnect(request: MsgZealyConnect): Promise<MsgZealyConnectResponse>;
535
550
  EncounterCreate(request: MsgEncounterCreate): Promise<MsgEncounterCreateResponse>;
551
+ EncounterEdit(request: MsgEncounterEdit): Promise<MsgEncounterEditResponse>;
536
552
  EncounterDo(request: MsgEncounterDo): Promise<MsgEncounterDoResponse>;
537
553
  EncounterClose(request: MsgEncounterClose): Promise<MsgEncounterCloseResponse>;
538
554
  EarlyAccessDisinvite(request: MsgEarlyAccessDisinvite): Promise<MsgEarlyAccessDisinviteResponse>;
@@ -593,6 +609,7 @@ export declare class MsgClientImpl implements Msg {
593
609
  EarlyAccessInvite(request: MsgEarlyAccessInvite): Promise<MsgEarlyAccessInviteResponse>;
594
610
  ZealyConnect(request: MsgZealyConnect): Promise<MsgZealyConnectResponse>;
595
611
  EncounterCreate(request: MsgEncounterCreate): Promise<MsgEncounterCreateResponse>;
612
+ EncounterEdit(request: MsgEncounterEdit): Promise<MsgEncounterEditResponse>;
596
613
  EncounterDo(request: MsgEncounterDo): Promise<MsgEncounterDoResponse>;
597
614
  EncounterClose(request: MsgEncounterClose): Promise<MsgEncounterCloseResponse>;
598
615
  EarlyAccessDisinvite(request: MsgEarlyAccessDisinvite): Promise<MsgEarlyAccessDisinviteResponse>;
@@ -8,8 +8,8 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
8
  import { Coin } from "../../cosmos/base/v1beta1/coin";
9
9
  import { cardRarityFromJSON, cardRarityToJSON } from "./card";
10
10
  import { responseFromJSON, responseToJSON } from "./council";
11
- import { Parameter } from "./encounter";
12
11
  import { outcomeFromJSON, outcomeToJSON } from "./match";
12
+ import { Parameter } from "./parameter";
13
13
  import { Params } from "./params";
14
14
  import { SingleVote } from "./voting";
15
15
  export const protobufPackage = "cardchain.cardchain";
@@ -360,7 +360,15 @@ export const MsgCardSchemeBuyResponse = {
360
360
  },
361
361
  };
362
362
  function createBaseMsgCardSaveContent() {
363
- return { creator: "", cardId: 0, content: new Uint8Array(0), notes: "", artist: "", balanceAnchor: false };
363
+ return {
364
+ creator: "",
365
+ cardId: 0,
366
+ content: new Uint8Array(0),
367
+ notes: "",
368
+ artist: "",
369
+ balanceAnchor: false,
370
+ parameters: [],
371
+ };
364
372
  }
365
373
  export const MsgCardSaveContent = {
366
374
  encode(message, writer = new BinaryWriter()) {
@@ -382,6 +390,9 @@ export const MsgCardSaveContent = {
382
390
  if (message.balanceAnchor !== false) {
383
391
  writer.uint32(48).bool(message.balanceAnchor);
384
392
  }
393
+ for (const v of message.parameters) {
394
+ Parameter.encode(v, writer.uint32(58).fork()).join();
395
+ }
385
396
  return writer;
386
397
  },
387
398
  decode(input, length) {
@@ -433,6 +444,13 @@ export const MsgCardSaveContent = {
433
444
  message.balanceAnchor = reader.bool();
434
445
  continue;
435
446
  }
447
+ case 7: {
448
+ if (tag !== 58) {
449
+ break;
450
+ }
451
+ message.parameters.push(Parameter.decode(reader, reader.uint32()));
452
+ continue;
453
+ }
436
454
  }
437
455
  if ((tag & 7) === 4 || tag === 0) {
438
456
  break;
@@ -449,6 +467,9 @@ export const MsgCardSaveContent = {
449
467
  notes: isSet(object.notes) ? globalThis.String(object.notes) : "",
450
468
  artist: isSet(object.artist) ? globalThis.String(object.artist) : "",
451
469
  balanceAnchor: isSet(object.balanceAnchor) ? globalThis.Boolean(object.balanceAnchor) : false,
470
+ parameters: globalThis.Array.isArray(object?.parameters)
471
+ ? object.parameters.map((e) => Parameter.fromJSON(e))
472
+ : [],
452
473
  };
453
474
  },
454
475
  toJSON(message) {
@@ -471,6 +492,9 @@ export const MsgCardSaveContent = {
471
492
  if (message.balanceAnchor !== false) {
472
493
  obj.balanceAnchor = message.balanceAnchor;
473
494
  }
495
+ if (message.parameters?.length) {
496
+ obj.parameters = message.parameters.map((e) => Parameter.toJSON(e));
497
+ }
474
498
  return obj;
475
499
  },
476
500
  create(base) {
@@ -484,6 +508,7 @@ export const MsgCardSaveContent = {
484
508
  message.notes = object.notes ?? "";
485
509
  message.artist = object.artist ?? "";
486
510
  message.balanceAnchor = object.balanceAnchor ?? false;
511
+ message.parameters = object.parameters?.map((e) => Parameter.fromPartial(e)) || [];
487
512
  return message;
488
513
  },
489
514
  };
@@ -5493,6 +5518,182 @@ export const MsgEncounterCreateResponse = {
5493
5518
  return message;
5494
5519
  },
5495
5520
  };
5521
+ function createBaseMsgEncounterEdit() {
5522
+ return { creator: "", id: 0, name: "", drawlist: [], parameters: [], image: new Uint8Array(0) };
5523
+ }
5524
+ export const MsgEncounterEdit = {
5525
+ encode(message, writer = new BinaryWriter()) {
5526
+ if (message.creator !== "") {
5527
+ writer.uint32(10).string(message.creator);
5528
+ }
5529
+ if (message.id !== 0) {
5530
+ writer.uint32(16).uint64(message.id);
5531
+ }
5532
+ if (message.name !== "") {
5533
+ writer.uint32(26).string(message.name);
5534
+ }
5535
+ writer.uint32(34).fork();
5536
+ for (const v of message.drawlist) {
5537
+ writer.uint64(v);
5538
+ }
5539
+ writer.join();
5540
+ for (const v of message.parameters) {
5541
+ Parameter.encode(v, writer.uint32(42).fork()).join();
5542
+ }
5543
+ if (message.image.length !== 0) {
5544
+ writer.uint32(50).bytes(message.image);
5545
+ }
5546
+ return writer;
5547
+ },
5548
+ decode(input, length) {
5549
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5550
+ let end = length === undefined ? reader.len : reader.pos + length;
5551
+ const message = createBaseMsgEncounterEdit();
5552
+ while (reader.pos < end) {
5553
+ const tag = reader.uint32();
5554
+ switch (tag >>> 3) {
5555
+ case 1: {
5556
+ if (tag !== 10) {
5557
+ break;
5558
+ }
5559
+ message.creator = reader.string();
5560
+ continue;
5561
+ }
5562
+ case 2: {
5563
+ if (tag !== 16) {
5564
+ break;
5565
+ }
5566
+ message.id = longToNumber(reader.uint64());
5567
+ continue;
5568
+ }
5569
+ case 3: {
5570
+ if (tag !== 26) {
5571
+ break;
5572
+ }
5573
+ message.name = reader.string();
5574
+ continue;
5575
+ }
5576
+ case 4: {
5577
+ if (tag === 32) {
5578
+ message.drawlist.push(longToNumber(reader.uint64()));
5579
+ continue;
5580
+ }
5581
+ if (tag === 34) {
5582
+ const end2 = reader.uint32() + reader.pos;
5583
+ while (reader.pos < end2) {
5584
+ message.drawlist.push(longToNumber(reader.uint64()));
5585
+ }
5586
+ continue;
5587
+ }
5588
+ break;
5589
+ }
5590
+ case 5: {
5591
+ if (tag !== 42) {
5592
+ break;
5593
+ }
5594
+ message.parameters.push(Parameter.decode(reader, reader.uint32()));
5595
+ continue;
5596
+ }
5597
+ case 6: {
5598
+ if (tag !== 50) {
5599
+ break;
5600
+ }
5601
+ message.image = reader.bytes();
5602
+ continue;
5603
+ }
5604
+ }
5605
+ if ((tag & 7) === 4 || tag === 0) {
5606
+ break;
5607
+ }
5608
+ reader.skip(tag & 7);
5609
+ }
5610
+ return message;
5611
+ },
5612
+ fromJSON(object) {
5613
+ return {
5614
+ creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
5615
+ id: isSet(object.id) ? globalThis.Number(object.id) : 0,
5616
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
5617
+ drawlist: globalThis.Array.isArray(object?.drawlist) ? object.drawlist.map((e) => globalThis.Number(e)) : [],
5618
+ parameters: globalThis.Array.isArray(object?.parameters)
5619
+ ? object.parameters.map((e) => Parameter.fromJSON(e))
5620
+ : [],
5621
+ image: isSet(object.image) ? bytesFromBase64(object.image) : new Uint8Array(0),
5622
+ };
5623
+ },
5624
+ toJSON(message) {
5625
+ const obj = {};
5626
+ if (message.creator !== "") {
5627
+ obj.creator = message.creator;
5628
+ }
5629
+ if (message.id !== 0) {
5630
+ obj.id = Math.round(message.id);
5631
+ }
5632
+ if (message.name !== "") {
5633
+ obj.name = message.name;
5634
+ }
5635
+ if (message.drawlist?.length) {
5636
+ obj.drawlist = message.drawlist.map((e) => Math.round(e));
5637
+ }
5638
+ if (message.parameters?.length) {
5639
+ obj.parameters = message.parameters.map((e) => Parameter.toJSON(e));
5640
+ }
5641
+ if (message.image.length !== 0) {
5642
+ obj.image = base64FromBytes(message.image);
5643
+ }
5644
+ return obj;
5645
+ },
5646
+ create(base) {
5647
+ return MsgEncounterEdit.fromPartial(base ?? {});
5648
+ },
5649
+ fromPartial(object) {
5650
+ const message = createBaseMsgEncounterEdit();
5651
+ message.creator = object.creator ?? "";
5652
+ message.id = object.id ?? 0;
5653
+ message.name = object.name ?? "";
5654
+ message.drawlist = object.drawlist?.map((e) => e) || [];
5655
+ message.parameters = object.parameters?.map((e) => Parameter.fromPartial(e)) || [];
5656
+ message.image = object.image ?? new Uint8Array(0);
5657
+ return message;
5658
+ },
5659
+ };
5660
+ function createBaseMsgEncounterEditResponse() {
5661
+ return {};
5662
+ }
5663
+ export const MsgEncounterEditResponse = {
5664
+ encode(_, writer = new BinaryWriter()) {
5665
+ return writer;
5666
+ },
5667
+ decode(input, length) {
5668
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5669
+ let end = length === undefined ? reader.len : reader.pos + length;
5670
+ const message = createBaseMsgEncounterEditResponse();
5671
+ while (reader.pos < end) {
5672
+ const tag = reader.uint32();
5673
+ switch (tag >>> 3) {
5674
+ }
5675
+ if ((tag & 7) === 4 || tag === 0) {
5676
+ break;
5677
+ }
5678
+ reader.skip(tag & 7);
5679
+ }
5680
+ return message;
5681
+ },
5682
+ fromJSON(_) {
5683
+ return {};
5684
+ },
5685
+ toJSON(_) {
5686
+ const obj = {};
5687
+ return obj;
5688
+ },
5689
+ create(base) {
5690
+ return MsgEncounterEditResponse.fromPartial(base ?? {});
5691
+ },
5692
+ fromPartial(_) {
5693
+ const message = createBaseMsgEncounterEditResponse();
5694
+ return message;
5695
+ },
5696
+ };
5496
5697
  function createBaseMsgEncounterDo() {
5497
5698
  return { creator: "", encounterId: 0, user: "" };
5498
5699
  }
@@ -6323,6 +6524,7 @@ export class MsgClientImpl {
6323
6524
  this.EarlyAccessInvite = this.EarlyAccessInvite.bind(this);
6324
6525
  this.ZealyConnect = this.ZealyConnect.bind(this);
6325
6526
  this.EncounterCreate = this.EncounterCreate.bind(this);
6527
+ this.EncounterEdit = this.EncounterEdit.bind(this);
6326
6528
  this.EncounterDo = this.EncounterDo.bind(this);
6327
6529
  this.EncounterClose = this.EncounterClose.bind(this);
6328
6530
  this.EarlyAccessDisinvite = this.EarlyAccessDisinvite.bind(this);
@@ -6556,6 +6758,11 @@ export class MsgClientImpl {
6556
6758
  const promise = this.rpc.request(this.service, "EncounterCreate", data);
6557
6759
  return promise.then((data) => MsgEncounterCreateResponse.decode(new BinaryReader(data)));
6558
6760
  }
6761
+ EncounterEdit(request) {
6762
+ const data = MsgEncounterEdit.encode(request).finish();
6763
+ const promise = this.rpc.request(this.service, "EncounterEdit", data);
6764
+ return promise.then((data) => MsgEncounterEditResponse.decode(new BinaryReader(data)));
6765
+ }
6559
6766
  EncounterDo(request) {
6560
6767
  const data = MsgEncounterDo.encode(request).finish();
6561
6768
  const promise = this.rpc.request(this.service, "EncounterDo", data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decentralcardgame-cardchain-client-ts",
3
- "version": "0.0.40",
3
+ "version": "0.0.42",
4
4
  "description": "Autogenerated Typescript Client for crowdcontrol cardchain",
5
5
  "author": "Lxgr <lxgr@protonmail.com>",
6
6
  "license": "Apache-2.0",
@@ -9,7 +9,7 @@
9
9
  "type": "GPL-v3"
10
10
  }
11
11
  ],
12
- "main": "index.js",
12
+ "main": "lib/index.js",
13
13
  "publishConfig": {
14
14
  "access": "public"
15
15
  },
@@ -37,7 +37,7 @@
37
37
  "type-fest": "^4.41.0",
38
38
  "typescript": "^5.8.3"
39
39
  },
40
- "types": "index.d.ts",
40
+ "types": "lib/index.d.ts",
41
41
  "files": [
42
42
  "lib"
43
43
  ]