decentralcardgame-cardchain-client-ts 0.0.37 → 0.0.39
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.
- package/cardchain.cardchain/rest.d.ts +2 -3
- package/cardchain.cardchain/rest.js +3 -3
- package/client.js +2 -2
- package/index.d.ts +16 -16
- package/index.js +5 -5
- package/package.json +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from "axios";
|
|
2
2
|
import { QueryCardsRequest } from "../types/cardchain/cardchain/query";
|
|
3
|
-
import { QueryEncounterWithImageRequest } from "../types/cardchain/cardchain/query";
|
|
4
3
|
import { QueryMatchesRequest } from "../types/cardchain/cardchain/query";
|
|
5
4
|
import { QuerySetsRequest } from "../types/cardchain/cardchain/query";
|
|
6
5
|
import { QueryCardContentsRequest } from "../types/cardchain/cardchain/query";
|
|
@@ -403,9 +402,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
403
402
|
*
|
|
404
403
|
* @tags Query
|
|
405
404
|
* @name queryEncounterWithImage
|
|
406
|
-
* @request GET:/DecentralCardGame/cardchain/cardchain/encounter_with_image
|
|
405
|
+
* @request GET:/DecentralCardGame/cardchain/cardchain/encounter_with_image/{encounterId}
|
|
407
406
|
*/
|
|
408
|
-
queryEncounterWithImage: (query?:
|
|
407
|
+
queryEncounterWithImage: (encounterId: string, query?: Record<string, any>, params?: RequestParams) => Promise<AxiosResponse<{
|
|
409
408
|
encounter: {
|
|
410
409
|
encounter: {
|
|
411
410
|
id: number;
|
|
@@ -230,10 +230,10 @@ export class Api extends HttpClient {
|
|
|
230
230
|
*
|
|
231
231
|
* @tags Query
|
|
232
232
|
* @name queryEncounterWithImage
|
|
233
|
-
* @request GET:/DecentralCardGame/cardchain/cardchain/encounter_with_image
|
|
233
|
+
* @request GET:/DecentralCardGame/cardchain/cardchain/encounter_with_image/{encounterId}
|
|
234
234
|
*/
|
|
235
|
-
this.queryEncounterWithImage = (query, params = {}) => this.request({
|
|
236
|
-
path: `/DecentralCardGame/cardchain/cardchain/encounter_with_image`,
|
|
235
|
+
this.queryEncounterWithImage = (encounterId, query, params = {}) => this.request({
|
|
236
|
+
path: `/DecentralCardGame/cardchain/cardchain/encounter_with_image/${encounterId}`,
|
|
237
237
|
method: "GET",
|
|
238
238
|
query: query,
|
|
239
239
|
format: "json",
|
package/client.js
CHANGED
|
@@ -34,7 +34,7 @@ export class IgniteClient extends EventEmitter {
|
|
|
34
34
|
this.setMaxListeners(0);
|
|
35
35
|
this.signer = signer;
|
|
36
36
|
const classConstructor = this.constructor;
|
|
37
|
-
classConstructor.plugins.forEach(
|
|
37
|
+
classConstructor.plugins.forEach(plugin => {
|
|
38
38
|
const pluginInstance = plugin(this);
|
|
39
39
|
Object.assign(this, pluginInstance.module);
|
|
40
40
|
if (this.registry) {
|
|
@@ -122,7 +122,7 @@ export class IgniteClient extends EventEmitter {
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
await window.keplr.enable(chainId);
|
|
125
|
-
this.signer = window.keplr.
|
|
125
|
+
this.signer = await window.keplr.getOfflineSignerAuto(chainId);
|
|
126
126
|
this.emit("signer-changed", this.signer);
|
|
127
127
|
}
|
|
128
128
|
catch (e) {
|
package/index.d.ts
CHANGED
|
@@ -153,14 +153,6 @@ declare const Client: typeof IgniteClient & import("./helpers").Constructor<{
|
|
|
153
153
|
registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
|
|
154
154
|
updateTX(client: IgniteClient): void;
|
|
155
155
|
};
|
|
156
|
-
} & {
|
|
157
|
-
CosmosFeegrantV_1Beta_1: {
|
|
158
|
-
query: ReturnType<typeof import("./cosmos.feegrant.v1beta1").queryClient>;
|
|
159
|
-
tx: ReturnType<typeof import("./cosmos.feegrant.v1beta1").txClient>;
|
|
160
|
-
structure: Record<string, unknown>;
|
|
161
|
-
registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
|
|
162
|
-
updateTX(client: IgniteClient): void;
|
|
163
|
-
};
|
|
164
156
|
} & {
|
|
165
157
|
CosmosNftV_1Beta_1: {
|
|
166
158
|
query: ReturnType<typeof import("./cosmos.nft.v1beta1").queryClient>;
|
|
@@ -169,14 +161,6 @@ declare const Client: typeof IgniteClient & import("./helpers").Constructor<{
|
|
|
169
161
|
registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
|
|
170
162
|
updateTX(client: IgniteClient): void;
|
|
171
163
|
};
|
|
172
|
-
} & {
|
|
173
|
-
CosmosCircuitV_1: {
|
|
174
|
-
query: ReturnType<typeof import("./cosmos.circuit.v1").queryClient>;
|
|
175
|
-
tx: ReturnType<typeof import("./cosmos.circuit.v1").txClient>;
|
|
176
|
-
structure: Record<string, unknown>;
|
|
177
|
-
registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
|
|
178
|
-
updateTX(client: IgniteClient): void;
|
|
179
|
-
};
|
|
180
164
|
} & {
|
|
181
165
|
IbcApplicationsFeeV_1: {
|
|
182
166
|
query: ReturnType<typeof import("./ibc.applications.fee.v1").queryClient>;
|
|
@@ -233,6 +217,14 @@ declare const Client: typeof IgniteClient & import("./helpers").Constructor<{
|
|
|
233
217
|
registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
|
|
234
218
|
updateTX(client: IgniteClient): void;
|
|
235
219
|
};
|
|
220
|
+
} & {
|
|
221
|
+
CosmosFeegrantV_1Beta_1: {
|
|
222
|
+
query: ReturnType<typeof import("./cosmos.feegrant.v1beta1").queryClient>;
|
|
223
|
+
tx: ReturnType<typeof import("./cosmos.feegrant.v1beta1").txClient>;
|
|
224
|
+
structure: Record<string, unknown>;
|
|
225
|
+
registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
|
|
226
|
+
updateTX(client: IgniteClient): void;
|
|
227
|
+
};
|
|
236
228
|
} & {
|
|
237
229
|
CosmosUpgradeV_1Beta_1: {
|
|
238
230
|
query: ReturnType<typeof import("./cosmos.upgrade.v1beta1").queryClient>;
|
|
@@ -241,6 +233,14 @@ declare const Client: typeof IgniteClient & import("./helpers").Constructor<{
|
|
|
241
233
|
registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
|
|
242
234
|
updateTX(client: IgniteClient): void;
|
|
243
235
|
};
|
|
236
|
+
} & {
|
|
237
|
+
CosmosCircuitV_1: {
|
|
238
|
+
query: ReturnType<typeof import("./cosmos.circuit.v1").queryClient>;
|
|
239
|
+
tx: ReturnType<typeof import("./cosmos.circuit.v1").txClient>;
|
|
240
|
+
structure: Record<string, unknown>;
|
|
241
|
+
registry: Array<[string, import("@cosmjs/proto-signing").GeneratedType]>;
|
|
242
|
+
updateTX(client: IgniteClient): void;
|
|
243
|
+
};
|
|
244
244
|
} & {
|
|
245
245
|
CosmosEvidenceV_1Beta_1: {
|
|
246
246
|
query: ReturnType<typeof import("./cosmos.evidence.v1beta1").queryClient>;
|
package/index.js
CHANGED
|
@@ -21,9 +21,7 @@ import { IgntModule as CosmosSlashingV_1Beta_1, msgTypes as CosmosSlashingV_1Bet
|
|
|
21
21
|
import { IgntModule as CosmosStakingV_1Beta_1, msgTypes as CosmosStakingV_1Beta_1MsgTypes } from './cosmos.staking.v1beta1';
|
|
22
22
|
import { IgntModule as CosmosTxV_1Beta_1, msgTypes as CosmosTxV_1Beta_1MsgTypes } from './cosmos.tx.v1beta1';
|
|
23
23
|
import { IgntModule as CosmosVestingV_1Beta_1, msgTypes as CosmosVestingV_1Beta_1MsgTypes } from './cosmos.vesting.v1beta1';
|
|
24
|
-
import { IgntModule as CosmosFeegrantV_1Beta_1, msgTypes as CosmosFeegrantV_1Beta_1MsgTypes } from './cosmos.feegrant.v1beta1';
|
|
25
24
|
import { IgntModule as CosmosNftV_1Beta_1, msgTypes as CosmosNftV_1Beta_1MsgTypes } from './cosmos.nft.v1beta1';
|
|
26
|
-
import { IgntModule as CosmosCircuitV_1, msgTypes as CosmosCircuitV_1MsgTypes } from './cosmos.circuit.v1';
|
|
27
25
|
import { IgntModule as IbcApplicationsFeeV_1, msgTypes as IbcApplicationsFeeV_1MsgTypes } from './ibc.applications.fee.v1';
|
|
28
26
|
import { IgntModule as IbcApplicationsInterchainAccountsControllerV_1, msgTypes as IbcApplicationsInterchainAccountsControllerV_1MsgTypes } from './ibc.applications.interchain_accounts.controller.v1';
|
|
29
27
|
import { IgntModule as IbcApplicationsInterchainAccountsHostV_1, msgTypes as IbcApplicationsInterchainAccountsHostV_1MsgTypes } from './ibc.applications.interchain_accounts.host.v1';
|
|
@@ -31,10 +29,12 @@ import { IgntModule as IbcApplicationsTransferV_1, msgTypes as IbcApplicationsTr
|
|
|
31
29
|
import { IgntModule as IbcCoreChannelV_1, msgTypes as IbcCoreChannelV_1MsgTypes } from './ibc.core.channel.v1';
|
|
32
30
|
import { IgntModule as IbcCoreClientV_1, msgTypes as IbcCoreClientV_1MsgTypes } from './ibc.core.client.v1';
|
|
33
31
|
import { IgntModule as IbcCoreConnectionV_1, msgTypes as IbcCoreConnectionV_1MsgTypes } from './ibc.core.connection.v1';
|
|
32
|
+
import { IgntModule as CosmosFeegrantV_1Beta_1, msgTypes as CosmosFeegrantV_1Beta_1MsgTypes } from './cosmos.feegrant.v1beta1';
|
|
34
33
|
import { IgntModule as CosmosUpgradeV_1Beta_1, msgTypes as CosmosUpgradeV_1Beta_1MsgTypes } from './cosmos.upgrade.v1beta1';
|
|
34
|
+
import { IgntModule as CosmosCircuitV_1, msgTypes as CosmosCircuitV_1MsgTypes } from './cosmos.circuit.v1';
|
|
35
35
|
import { IgntModule as CosmosEvidenceV_1Beta_1, msgTypes as CosmosEvidenceV_1Beta_1MsgTypes } from './cosmos.evidence.v1beta1';
|
|
36
36
|
const Client = IgniteClient.plugin([
|
|
37
|
-
CardchainCardchain, CardchainFeatureflag, 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,
|
|
37
|
+
CardchainCardchain, CardchainFeatureflag, 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, CosmosNftV_1Beta_1, IbcApplicationsFeeV_1, IbcApplicationsInterchainAccountsControllerV_1, IbcApplicationsInterchainAccountsHostV_1, IbcApplicationsTransferV_1, IbcCoreChannelV_1, IbcCoreClientV_1, IbcCoreConnectionV_1, CosmosFeegrantV_1Beta_1, CosmosUpgradeV_1Beta_1, CosmosCircuitV_1, CosmosEvidenceV_1Beta_1
|
|
38
38
|
]);
|
|
39
39
|
const registry = new Registry([
|
|
40
40
|
...CardchainCardchainMsgTypes,
|
|
@@ -56,9 +56,7 @@ const registry = new Registry([
|
|
|
56
56
|
...CosmosStakingV_1Beta_1MsgTypes,
|
|
57
57
|
...CosmosTxV_1Beta_1MsgTypes,
|
|
58
58
|
...CosmosVestingV_1Beta_1MsgTypes,
|
|
59
|
-
...CosmosFeegrantV_1Beta_1MsgTypes,
|
|
60
59
|
...CosmosNftV_1Beta_1MsgTypes,
|
|
61
|
-
...CosmosCircuitV_1MsgTypes,
|
|
62
60
|
...IbcApplicationsFeeV_1MsgTypes,
|
|
63
61
|
...IbcApplicationsInterchainAccountsControllerV_1MsgTypes,
|
|
64
62
|
...IbcApplicationsInterchainAccountsHostV_1MsgTypes,
|
|
@@ -66,7 +64,9 @@ const registry = new Registry([
|
|
|
66
64
|
...IbcCoreChannelV_1MsgTypes,
|
|
67
65
|
...IbcCoreClientV_1MsgTypes,
|
|
68
66
|
...IbcCoreConnectionV_1MsgTypes,
|
|
67
|
+
...CosmosFeegrantV_1Beta_1MsgTypes,
|
|
69
68
|
...CosmosUpgradeV_1Beta_1MsgTypes,
|
|
69
|
+
...CosmosCircuitV_1MsgTypes,
|
|
70
70
|
...CosmosEvidenceV_1Beta_1MsgTypes,
|
|
71
71
|
]);
|
|
72
72
|
export { Client, registry, MissingWalletError };
|
package/package.json
CHANGED