decentralcardgame-cardchain-client-ts 0.0.2 → 0.0.4
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/DecentralCardGame.cardchain.cardchain/module.js +1044 -0
- package/DecentralCardGame.cardchain.cardchain/module.ts +493 -458
- package/DecentralCardGame.cardchain.cardchain/registry.js +72 -70
- package/DecentralCardGame.cardchain.cardchain/registry.ts +71 -69
- package/DecentralCardGame.cardchain.cardchain/rest.js +1 -1
- package/DecentralCardGame.cardchain.cardchain/rest.ts +11 -1
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +30 -6
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +33 -6
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.js +11 -17
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.ts +11 -17
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +1 -217
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +1 -252
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.js +166 -8
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.ts +203 -11
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.js +7 -65
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.ts +8 -77
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/params.js +30 -10
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/tx.js +4137 -0
- package/DecentralCardGame.cardchain.cardchain/types.js +22 -21
- package/DecentralCardGame.cardchain.cardchain/types.ts +22 -20
- package/client.js +2 -1
- package/cosmos.authz.v1beta1/module.js +19 -19
- package/cosmos.authz.v1beta1/registry.js +2 -2
- package/cosmos.distribution.v1beta1/module.js +24 -24
- package/cosmos.distribution.v1beta1/registry.js +4 -4
- package/cosmos.gov.v1/module.js +31 -31
- package/cosmos.gov.v1/registry.js +4 -4
- package/cosmos.gov.v1beta1/module.js +22 -22
- package/cosmos.gov.v1beta1/registry.js +2 -2
- package/cosmos.group.v1/module.js +102 -102
- package/cosmos.group.v1/registry.js +14 -14
- package/cosmos.group.v1/rest.js +15 -0
- package/cosmos.group.v1/types/cosmos/group/v1/query.js +110 -0
- package/cosmos.staking.v1beta1/module.js +40 -40
- package/cosmos.staking.v1beta1/registry.js +8 -8
- package/cosmos.vesting.v1beta1/module.js +16 -16
- package/cosmos.vesting.v1beta1/registry.js +2 -2
- package/ibc.applications.interchain_accounts.controller.v1/rest.js +9 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/google/protobuf/any.js +99 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.js +266 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/v1/packet.js +192 -0
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/tx.js +24 -6
- package/ibc.core.client.v1/rest.js +14 -14
- package/ibc.core.connection.v1/rest.js +14 -0
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/query.js +83 -1
- package/package.json +2 -2
- package/tsconfig.json +0 -1
|
@@ -3,7 +3,7 @@ import Long from "long";
|
|
|
3
3
|
import _m0 from "protobufjs/minimal";
|
|
4
4
|
import { OutpCard } from "./card";
|
|
5
5
|
import { CStatus, cStatusFromJSON, cStatusToJSON, OutpCollection } from "./collection";
|
|
6
|
-
import {
|
|
6
|
+
import { Council } from "./council";
|
|
7
7
|
import { Match } from "./match";
|
|
8
8
|
import { Params } from "./params";
|
|
9
9
|
import { SellOffer, SellOfferStatus, sellOfferStatusFromJSON, sellOfferStatusToJSON } from "./sell_offer";
|
|
@@ -256,24 +256,6 @@ export interface QueryRarityDistributionResponse {
|
|
|
256
256
|
wanted: number[];
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
export interface QueryQCouncilsRequest {
|
|
260
|
-
status: CouncelingStatus;
|
|
261
|
-
voters: string[];
|
|
262
|
-
card: number;
|
|
263
|
-
creator: string;
|
|
264
|
-
ignore: IgnoreCouncils | undefined;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
export interface IgnoreCouncils {
|
|
268
|
-
status: boolean;
|
|
269
|
-
card: boolean;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
export interface QueryQCouncilsResponse {
|
|
273
|
-
councilssIds: number[];
|
|
274
|
-
councils: Council[];
|
|
275
|
-
}
|
|
276
|
-
|
|
277
259
|
function createBaseQueryParamsRequest(): QueryParamsRequest {
|
|
278
260
|
return {};
|
|
279
261
|
}
|
|
@@ -2170,230 +2152,6 @@ export const QueryRarityDistributionResponse = {
|
|
|
2170
2152
|
},
|
|
2171
2153
|
};
|
|
2172
2154
|
|
|
2173
|
-
function createBaseQueryQCouncilsRequest(): QueryQCouncilsRequest {
|
|
2174
|
-
return { status: 0, voters: [], card: 0, creator: "", ignore: undefined };
|
|
2175
|
-
}
|
|
2176
|
-
|
|
2177
|
-
export const QueryQCouncilsRequest = {
|
|
2178
|
-
encode(message: QueryQCouncilsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2179
|
-
if (message.status !== 0) {
|
|
2180
|
-
writer.uint32(8).int32(message.status);
|
|
2181
|
-
}
|
|
2182
|
-
for (const v of message.voters) {
|
|
2183
|
-
writer.uint32(26).string(v!);
|
|
2184
|
-
}
|
|
2185
|
-
if (message.card !== 0) {
|
|
2186
|
-
writer.uint32(32).uint64(message.card);
|
|
2187
|
-
}
|
|
2188
|
-
if (message.creator !== "") {
|
|
2189
|
-
writer.uint32(42).string(message.creator);
|
|
2190
|
-
}
|
|
2191
|
-
if (message.ignore !== undefined) {
|
|
2192
|
-
IgnoreCouncils.encode(message.ignore, writer.uint32(18).fork()).ldelim();
|
|
2193
|
-
}
|
|
2194
|
-
return writer;
|
|
2195
|
-
},
|
|
2196
|
-
|
|
2197
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): QueryQCouncilsRequest {
|
|
2198
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
2199
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2200
|
-
const message = createBaseQueryQCouncilsRequest();
|
|
2201
|
-
while (reader.pos < end) {
|
|
2202
|
-
const tag = reader.uint32();
|
|
2203
|
-
switch (tag >>> 3) {
|
|
2204
|
-
case 1:
|
|
2205
|
-
message.status = reader.int32() as any;
|
|
2206
|
-
break;
|
|
2207
|
-
case 3:
|
|
2208
|
-
message.voters.push(reader.string());
|
|
2209
|
-
break;
|
|
2210
|
-
case 4:
|
|
2211
|
-
message.card = longToNumber(reader.uint64() as Long);
|
|
2212
|
-
break;
|
|
2213
|
-
case 5:
|
|
2214
|
-
message.creator = reader.string();
|
|
2215
|
-
break;
|
|
2216
|
-
case 2:
|
|
2217
|
-
message.ignore = IgnoreCouncils.decode(reader, reader.uint32());
|
|
2218
|
-
break;
|
|
2219
|
-
default:
|
|
2220
|
-
reader.skipType(tag & 7);
|
|
2221
|
-
break;
|
|
2222
|
-
}
|
|
2223
|
-
}
|
|
2224
|
-
return message;
|
|
2225
|
-
},
|
|
2226
|
-
|
|
2227
|
-
fromJSON(object: any): QueryQCouncilsRequest {
|
|
2228
|
-
return {
|
|
2229
|
-
status: isSet(object.status) ? councelingStatusFromJSON(object.status) : 0,
|
|
2230
|
-
voters: Array.isArray(object?.voters) ? object.voters.map((e: any) => String(e)) : [],
|
|
2231
|
-
card: isSet(object.card) ? Number(object.card) : 0,
|
|
2232
|
-
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
2233
|
-
ignore: isSet(object.ignore) ? IgnoreCouncils.fromJSON(object.ignore) : undefined,
|
|
2234
|
-
};
|
|
2235
|
-
},
|
|
2236
|
-
|
|
2237
|
-
toJSON(message: QueryQCouncilsRequest): unknown {
|
|
2238
|
-
const obj: any = {};
|
|
2239
|
-
message.status !== undefined && (obj.status = councelingStatusToJSON(message.status));
|
|
2240
|
-
if (message.voters) {
|
|
2241
|
-
obj.voters = message.voters.map((e) => e);
|
|
2242
|
-
} else {
|
|
2243
|
-
obj.voters = [];
|
|
2244
|
-
}
|
|
2245
|
-
message.card !== undefined && (obj.card = Math.round(message.card));
|
|
2246
|
-
message.creator !== undefined && (obj.creator = message.creator);
|
|
2247
|
-
message.ignore !== undefined && (obj.ignore = message.ignore ? IgnoreCouncils.toJSON(message.ignore) : undefined);
|
|
2248
|
-
return obj;
|
|
2249
|
-
},
|
|
2250
|
-
|
|
2251
|
-
fromPartial<I extends Exact<DeepPartial<QueryQCouncilsRequest>, I>>(object: I): QueryQCouncilsRequest {
|
|
2252
|
-
const message = createBaseQueryQCouncilsRequest();
|
|
2253
|
-
message.status = object.status ?? 0;
|
|
2254
|
-
message.voters = object.voters?.map((e) => e) || [];
|
|
2255
|
-
message.card = object.card ?? 0;
|
|
2256
|
-
message.creator = object.creator ?? "";
|
|
2257
|
-
message.ignore = (object.ignore !== undefined && object.ignore !== null)
|
|
2258
|
-
? IgnoreCouncils.fromPartial(object.ignore)
|
|
2259
|
-
: undefined;
|
|
2260
|
-
return message;
|
|
2261
|
-
},
|
|
2262
|
-
};
|
|
2263
|
-
|
|
2264
|
-
function createBaseIgnoreCouncils(): IgnoreCouncils {
|
|
2265
|
-
return { status: false, card: false };
|
|
2266
|
-
}
|
|
2267
|
-
|
|
2268
|
-
export const IgnoreCouncils = {
|
|
2269
|
-
encode(message: IgnoreCouncils, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2270
|
-
if (message.status === true) {
|
|
2271
|
-
writer.uint32(8).bool(message.status);
|
|
2272
|
-
}
|
|
2273
|
-
if (message.card === true) {
|
|
2274
|
-
writer.uint32(16).bool(message.card);
|
|
2275
|
-
}
|
|
2276
|
-
return writer;
|
|
2277
|
-
},
|
|
2278
|
-
|
|
2279
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): IgnoreCouncils {
|
|
2280
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
2281
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2282
|
-
const message = createBaseIgnoreCouncils();
|
|
2283
|
-
while (reader.pos < end) {
|
|
2284
|
-
const tag = reader.uint32();
|
|
2285
|
-
switch (tag >>> 3) {
|
|
2286
|
-
case 1:
|
|
2287
|
-
message.status = reader.bool();
|
|
2288
|
-
break;
|
|
2289
|
-
case 2:
|
|
2290
|
-
message.card = reader.bool();
|
|
2291
|
-
break;
|
|
2292
|
-
default:
|
|
2293
|
-
reader.skipType(tag & 7);
|
|
2294
|
-
break;
|
|
2295
|
-
}
|
|
2296
|
-
}
|
|
2297
|
-
return message;
|
|
2298
|
-
},
|
|
2299
|
-
|
|
2300
|
-
fromJSON(object: any): IgnoreCouncils {
|
|
2301
|
-
return {
|
|
2302
|
-
status: isSet(object.status) ? Boolean(object.status) : false,
|
|
2303
|
-
card: isSet(object.card) ? Boolean(object.card) : false,
|
|
2304
|
-
};
|
|
2305
|
-
},
|
|
2306
|
-
|
|
2307
|
-
toJSON(message: IgnoreCouncils): unknown {
|
|
2308
|
-
const obj: any = {};
|
|
2309
|
-
message.status !== undefined && (obj.status = message.status);
|
|
2310
|
-
message.card !== undefined && (obj.card = message.card);
|
|
2311
|
-
return obj;
|
|
2312
|
-
},
|
|
2313
|
-
|
|
2314
|
-
fromPartial<I extends Exact<DeepPartial<IgnoreCouncils>, I>>(object: I): IgnoreCouncils {
|
|
2315
|
-
const message = createBaseIgnoreCouncils();
|
|
2316
|
-
message.status = object.status ?? false;
|
|
2317
|
-
message.card = object.card ?? false;
|
|
2318
|
-
return message;
|
|
2319
|
-
},
|
|
2320
|
-
};
|
|
2321
|
-
|
|
2322
|
-
function createBaseQueryQCouncilsResponse(): QueryQCouncilsResponse {
|
|
2323
|
-
return { councilssIds: [], councils: [] };
|
|
2324
|
-
}
|
|
2325
|
-
|
|
2326
|
-
export const QueryQCouncilsResponse = {
|
|
2327
|
-
encode(message: QueryQCouncilsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
2328
|
-
writer.uint32(10).fork();
|
|
2329
|
-
for (const v of message.councilssIds) {
|
|
2330
|
-
writer.uint64(v);
|
|
2331
|
-
}
|
|
2332
|
-
writer.ldelim();
|
|
2333
|
-
for (const v of message.councils) {
|
|
2334
|
-
Council.encode(v!, writer.uint32(18).fork()).ldelim();
|
|
2335
|
-
}
|
|
2336
|
-
return writer;
|
|
2337
|
-
},
|
|
2338
|
-
|
|
2339
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): QueryQCouncilsResponse {
|
|
2340
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
2341
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2342
|
-
const message = createBaseQueryQCouncilsResponse();
|
|
2343
|
-
while (reader.pos < end) {
|
|
2344
|
-
const tag = reader.uint32();
|
|
2345
|
-
switch (tag >>> 3) {
|
|
2346
|
-
case 1:
|
|
2347
|
-
if ((tag & 7) === 2) {
|
|
2348
|
-
const end2 = reader.uint32() + reader.pos;
|
|
2349
|
-
while (reader.pos < end2) {
|
|
2350
|
-
message.councilssIds.push(longToNumber(reader.uint64() as Long));
|
|
2351
|
-
}
|
|
2352
|
-
} else {
|
|
2353
|
-
message.councilssIds.push(longToNumber(reader.uint64() as Long));
|
|
2354
|
-
}
|
|
2355
|
-
break;
|
|
2356
|
-
case 2:
|
|
2357
|
-
message.councils.push(Council.decode(reader, reader.uint32()));
|
|
2358
|
-
break;
|
|
2359
|
-
default:
|
|
2360
|
-
reader.skipType(tag & 7);
|
|
2361
|
-
break;
|
|
2362
|
-
}
|
|
2363
|
-
}
|
|
2364
|
-
return message;
|
|
2365
|
-
},
|
|
2366
|
-
|
|
2367
|
-
fromJSON(object: any): QueryQCouncilsResponse {
|
|
2368
|
-
return {
|
|
2369
|
-
councilssIds: Array.isArray(object?.councilssIds) ? object.councilssIds.map((e: any) => Number(e)) : [],
|
|
2370
|
-
councils: Array.isArray(object?.councils) ? object.councils.map((e: any) => Council.fromJSON(e)) : [],
|
|
2371
|
-
};
|
|
2372
|
-
},
|
|
2373
|
-
|
|
2374
|
-
toJSON(message: QueryQCouncilsResponse): unknown {
|
|
2375
|
-
const obj: any = {};
|
|
2376
|
-
if (message.councilssIds) {
|
|
2377
|
-
obj.councilssIds = message.councilssIds.map((e) => Math.round(e));
|
|
2378
|
-
} else {
|
|
2379
|
-
obj.councilssIds = [];
|
|
2380
|
-
}
|
|
2381
|
-
if (message.councils) {
|
|
2382
|
-
obj.councils = message.councils.map((e) => e ? Council.toJSON(e) : undefined);
|
|
2383
|
-
} else {
|
|
2384
|
-
obj.councils = [];
|
|
2385
|
-
}
|
|
2386
|
-
return obj;
|
|
2387
|
-
},
|
|
2388
|
-
|
|
2389
|
-
fromPartial<I extends Exact<DeepPartial<QueryQCouncilsResponse>, I>>(object: I): QueryQCouncilsResponse {
|
|
2390
|
-
const message = createBaseQueryQCouncilsResponse();
|
|
2391
|
-
message.councilssIds = object.councilssIds?.map((e) => e) || [];
|
|
2392
|
-
message.councils = object.councils?.map((e) => Council.fromPartial(e)) || [];
|
|
2393
|
-
return message;
|
|
2394
|
-
},
|
|
2395
|
-
};
|
|
2396
|
-
|
|
2397
2155
|
/** Query defines the gRPC querier service. */
|
|
2398
2156
|
export interface Query {
|
|
2399
2157
|
/** Parameters queries the parameters of the module. */
|
|
@@ -2430,8 +2188,6 @@ export interface Query {
|
|
|
2430
2188
|
QCollections(request: QueryQCollectionsRequest): Promise<QueryQCollectionsResponse>;
|
|
2431
2189
|
/** Queries a list of RarityDistribution items. */
|
|
2432
2190
|
RarityDistribution(request: QueryRarityDistributionRequest): Promise<QueryRarityDistributionResponse>;
|
|
2433
|
-
/** Queries a list of QCouncils items. */
|
|
2434
|
-
QCouncils(request: QueryQCouncilsRequest): Promise<QueryQCouncilsResponse>;
|
|
2435
2191
|
}
|
|
2436
2192
|
|
|
2437
2193
|
export class QueryClientImpl implements Query {
|
|
@@ -2455,7 +2211,6 @@ export class QueryClientImpl implements Query {
|
|
|
2455
2211
|
this.QServer = this.QServer.bind(this);
|
|
2456
2212
|
this.QCollections = this.QCollections.bind(this);
|
|
2457
2213
|
this.RarityDistribution = this.RarityDistribution.bind(this);
|
|
2458
|
-
this.QCouncils = this.QCouncils.bind(this);
|
|
2459
2214
|
}
|
|
2460
2215
|
Params(request: QueryParamsRequest): Promise<QueryParamsResponse> {
|
|
2461
2216
|
const data = QueryParamsRequest.encode(request).finish();
|
|
@@ -2558,12 +2313,6 @@ export class QueryClientImpl implements Query {
|
|
|
2558
2313
|
const promise = this.rpc.request("DecentralCardGame.cardchain.cardchain.Query", "RarityDistribution", data);
|
|
2559
2314
|
return promise.then((data) => QueryRarityDistributionResponse.decode(new _m0.Reader(data)));
|
|
2560
2315
|
}
|
|
2561
|
-
|
|
2562
|
-
QCouncils(request: QueryQCouncilsRequest): Promise<QueryQCouncilsResponse> {
|
|
2563
|
-
const data = QueryQCouncilsRequest.encode(request).finish();
|
|
2564
|
-
const promise = this.rpc.request("DecentralCardGame.cardchain.cardchain.Query", "QCouncils", data);
|
|
2565
|
-
return promise.then((data) => QueryQCouncilsResponse.decode(new _m0.Reader(data)));
|
|
2566
|
-
}
|
|
2567
2316
|
}
|
|
2568
2317
|
|
|
2569
2318
|
interface Rpc {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import Long from "long";
|
|
3
3
|
import _m0 from "protobufjs/minimal";
|
|
4
|
+
import { Coin } from "../../cosmos/base/v1beta1/coin";
|
|
4
5
|
import { responseFromJSON, responseToJSON } from "./council";
|
|
5
6
|
export const protobufPackage = "DecentralCardGame.cardchain.cardchain";
|
|
6
7
|
export var Outcome;
|
|
@@ -141,15 +142,15 @@ export const MsgCreateuserResponse = {
|
|
|
141
142
|
},
|
|
142
143
|
};
|
|
143
144
|
function createBaseMsgBuyCardScheme() {
|
|
144
|
-
return { creator: "", bid:
|
|
145
|
+
return { creator: "", bid: undefined };
|
|
145
146
|
}
|
|
146
147
|
export const MsgBuyCardScheme = {
|
|
147
148
|
encode(message, writer = _m0.Writer.create()) {
|
|
148
149
|
if (message.creator !== "") {
|
|
149
150
|
writer.uint32(10).string(message.creator);
|
|
150
151
|
}
|
|
151
|
-
if (message.bid !==
|
|
152
|
-
writer.uint32(18).
|
|
152
|
+
if (message.bid !== undefined) {
|
|
153
|
+
Coin.encode(message.bid, writer.uint32(18).fork()).ldelim();
|
|
153
154
|
}
|
|
154
155
|
return writer;
|
|
155
156
|
},
|
|
@@ -164,7 +165,7 @@ export const MsgBuyCardScheme = {
|
|
|
164
165
|
message.creator = reader.string();
|
|
165
166
|
break;
|
|
166
167
|
case 2:
|
|
167
|
-
message.bid = reader.
|
|
168
|
+
message.bid = Coin.decode(reader, reader.uint32());
|
|
168
169
|
break;
|
|
169
170
|
default:
|
|
170
171
|
reader.skipType(tag & 7);
|
|
@@ -176,19 +177,19 @@ export const MsgBuyCardScheme = {
|
|
|
176
177
|
fromJSON(object) {
|
|
177
178
|
return {
|
|
178
179
|
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
179
|
-
bid: isSet(object.bid) ?
|
|
180
|
+
bid: isSet(object.bid) ? Coin.fromJSON(object.bid) : undefined,
|
|
180
181
|
};
|
|
181
182
|
},
|
|
182
183
|
toJSON(message) {
|
|
183
184
|
const obj = {};
|
|
184
185
|
message.creator !== undefined && (obj.creator = message.creator);
|
|
185
|
-
message.bid !== undefined && (obj.bid = message.bid);
|
|
186
|
+
message.bid !== undefined && (obj.bid = message.bid ? Coin.toJSON(message.bid) : undefined);
|
|
186
187
|
return obj;
|
|
187
188
|
},
|
|
188
189
|
fromPartial(object) {
|
|
189
190
|
const message = createBaseMsgBuyCardScheme();
|
|
190
191
|
message.creator = object.creator ?? "";
|
|
191
|
-
message.bid = object.bid
|
|
192
|
+
message.bid = (object.bid !== undefined && object.bid !== null) ? Coin.fromPartial(object.bid) : undefined;
|
|
192
193
|
return message;
|
|
193
194
|
},
|
|
194
195
|
};
|
|
@@ -328,7 +329,7 @@ export const MsgVoteCardResponse = {
|
|
|
328
329
|
},
|
|
329
330
|
};
|
|
330
331
|
function createBaseMsgSaveCardContent() {
|
|
331
|
-
return { creator: "", cardId: 0, content: new Uint8Array(), notes: "", artist: "" };
|
|
332
|
+
return { creator: "", cardId: 0, content: new Uint8Array(), notes: "", artist: "", balanceAnchor: false };
|
|
332
333
|
}
|
|
333
334
|
export const MsgSaveCardContent = {
|
|
334
335
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -347,6 +348,9 @@ export const MsgSaveCardContent = {
|
|
|
347
348
|
if (message.artist !== "") {
|
|
348
349
|
writer.uint32(42).string(message.artist);
|
|
349
350
|
}
|
|
351
|
+
if (message.balanceAnchor === true) {
|
|
352
|
+
writer.uint32(48).bool(message.balanceAnchor);
|
|
353
|
+
}
|
|
350
354
|
return writer;
|
|
351
355
|
},
|
|
352
356
|
decode(input, length) {
|
|
@@ -371,6 +375,9 @@ export const MsgSaveCardContent = {
|
|
|
371
375
|
case 5:
|
|
372
376
|
message.artist = reader.string();
|
|
373
377
|
break;
|
|
378
|
+
case 6:
|
|
379
|
+
message.balanceAnchor = reader.bool();
|
|
380
|
+
break;
|
|
374
381
|
default:
|
|
375
382
|
reader.skipType(tag & 7);
|
|
376
383
|
break;
|
|
@@ -385,6 +392,7 @@ export const MsgSaveCardContent = {
|
|
|
385
392
|
content: isSet(object.content) ? bytesFromBase64(object.content) : new Uint8Array(),
|
|
386
393
|
notes: isSet(object.notes) ? String(object.notes) : "",
|
|
387
394
|
artist: isSet(object.artist) ? String(object.artist) : "",
|
|
395
|
+
balanceAnchor: isSet(object.balanceAnchor) ? Boolean(object.balanceAnchor) : false,
|
|
388
396
|
};
|
|
389
397
|
},
|
|
390
398
|
toJSON(message) {
|
|
@@ -395,6 +403,7 @@ export const MsgSaveCardContent = {
|
|
|
395
403
|
&& (obj.content = base64FromBytes(message.content !== undefined ? message.content : new Uint8Array()));
|
|
396
404
|
message.notes !== undefined && (obj.notes = message.notes);
|
|
397
405
|
message.artist !== undefined && (obj.artist = message.artist);
|
|
406
|
+
message.balanceAnchor !== undefined && (obj.balanceAnchor = message.balanceAnchor);
|
|
398
407
|
return obj;
|
|
399
408
|
},
|
|
400
409
|
fromPartial(object) {
|
|
@@ -404,6 +413,7 @@ export const MsgSaveCardContent = {
|
|
|
404
413
|
message.content = object.content ?? new Uint8Array();
|
|
405
414
|
message.notes = object.notes ?? "";
|
|
406
415
|
message.artist = object.artist ?? "";
|
|
416
|
+
message.balanceAnchor = object.balanceAnchor ?? false;
|
|
407
417
|
return message;
|
|
408
418
|
},
|
|
409
419
|
};
|
|
@@ -3836,6 +3846,148 @@ export const MsgSetUserBiographyResponse = {
|
|
|
3836
3846
|
return message;
|
|
3837
3847
|
},
|
|
3838
3848
|
};
|
|
3849
|
+
function createBaseSingleVote() {
|
|
3850
|
+
return { cardId: 0, voteType: "" };
|
|
3851
|
+
}
|
|
3852
|
+
export const SingleVote = {
|
|
3853
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
3854
|
+
if (message.cardId !== 0) {
|
|
3855
|
+
writer.uint32(8).uint64(message.cardId);
|
|
3856
|
+
}
|
|
3857
|
+
if (message.voteType !== "") {
|
|
3858
|
+
writer.uint32(18).string(message.voteType);
|
|
3859
|
+
}
|
|
3860
|
+
return writer;
|
|
3861
|
+
},
|
|
3862
|
+
decode(input, length) {
|
|
3863
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
3864
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3865
|
+
const message = createBaseSingleVote();
|
|
3866
|
+
while (reader.pos < end) {
|
|
3867
|
+
const tag = reader.uint32();
|
|
3868
|
+
switch (tag >>> 3) {
|
|
3869
|
+
case 1:
|
|
3870
|
+
message.cardId = longToNumber(reader.uint64());
|
|
3871
|
+
break;
|
|
3872
|
+
case 2:
|
|
3873
|
+
message.voteType = reader.string();
|
|
3874
|
+
break;
|
|
3875
|
+
default:
|
|
3876
|
+
reader.skipType(tag & 7);
|
|
3877
|
+
break;
|
|
3878
|
+
}
|
|
3879
|
+
}
|
|
3880
|
+
return message;
|
|
3881
|
+
},
|
|
3882
|
+
fromJSON(object) {
|
|
3883
|
+
return {
|
|
3884
|
+
cardId: isSet(object.cardId) ? Number(object.cardId) : 0,
|
|
3885
|
+
voteType: isSet(object.voteType) ? String(object.voteType) : "",
|
|
3886
|
+
};
|
|
3887
|
+
},
|
|
3888
|
+
toJSON(message) {
|
|
3889
|
+
const obj = {};
|
|
3890
|
+
message.cardId !== undefined && (obj.cardId = Math.round(message.cardId));
|
|
3891
|
+
message.voteType !== undefined && (obj.voteType = message.voteType);
|
|
3892
|
+
return obj;
|
|
3893
|
+
},
|
|
3894
|
+
fromPartial(object) {
|
|
3895
|
+
const message = createBaseSingleVote();
|
|
3896
|
+
message.cardId = object.cardId ?? 0;
|
|
3897
|
+
message.voteType = object.voteType ?? "";
|
|
3898
|
+
return message;
|
|
3899
|
+
},
|
|
3900
|
+
};
|
|
3901
|
+
function createBaseMsgMultiVoteCard() {
|
|
3902
|
+
return { creator: "", votes: [] };
|
|
3903
|
+
}
|
|
3904
|
+
export const MsgMultiVoteCard = {
|
|
3905
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
3906
|
+
if (message.creator !== "") {
|
|
3907
|
+
writer.uint32(10).string(message.creator);
|
|
3908
|
+
}
|
|
3909
|
+
for (const v of message.votes) {
|
|
3910
|
+
SingleVote.encode(v, writer.uint32(18).fork()).ldelim();
|
|
3911
|
+
}
|
|
3912
|
+
return writer;
|
|
3913
|
+
},
|
|
3914
|
+
decode(input, length) {
|
|
3915
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
3916
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3917
|
+
const message = createBaseMsgMultiVoteCard();
|
|
3918
|
+
while (reader.pos < end) {
|
|
3919
|
+
const tag = reader.uint32();
|
|
3920
|
+
switch (tag >>> 3) {
|
|
3921
|
+
case 1:
|
|
3922
|
+
message.creator = reader.string();
|
|
3923
|
+
break;
|
|
3924
|
+
case 2:
|
|
3925
|
+
message.votes.push(SingleVote.decode(reader, reader.uint32()));
|
|
3926
|
+
break;
|
|
3927
|
+
default:
|
|
3928
|
+
reader.skipType(tag & 7);
|
|
3929
|
+
break;
|
|
3930
|
+
}
|
|
3931
|
+
}
|
|
3932
|
+
return message;
|
|
3933
|
+
},
|
|
3934
|
+
fromJSON(object) {
|
|
3935
|
+
return {
|
|
3936
|
+
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
3937
|
+
votes: Array.isArray(object?.votes) ? object.votes.map((e) => SingleVote.fromJSON(e)) : [],
|
|
3938
|
+
};
|
|
3939
|
+
},
|
|
3940
|
+
toJSON(message) {
|
|
3941
|
+
const obj = {};
|
|
3942
|
+
message.creator !== undefined && (obj.creator = message.creator);
|
|
3943
|
+
if (message.votes) {
|
|
3944
|
+
obj.votes = message.votes.map((e) => e ? SingleVote.toJSON(e) : undefined);
|
|
3945
|
+
}
|
|
3946
|
+
else {
|
|
3947
|
+
obj.votes = [];
|
|
3948
|
+
}
|
|
3949
|
+
return obj;
|
|
3950
|
+
},
|
|
3951
|
+
fromPartial(object) {
|
|
3952
|
+
const message = createBaseMsgMultiVoteCard();
|
|
3953
|
+
message.creator = object.creator ?? "";
|
|
3954
|
+
message.votes = object.votes?.map((e) => SingleVote.fromPartial(e)) || [];
|
|
3955
|
+
return message;
|
|
3956
|
+
},
|
|
3957
|
+
};
|
|
3958
|
+
function createBaseMsgMultiVoteCardResponse() {
|
|
3959
|
+
return {};
|
|
3960
|
+
}
|
|
3961
|
+
export const MsgMultiVoteCardResponse = {
|
|
3962
|
+
encode(_, writer = _m0.Writer.create()) {
|
|
3963
|
+
return writer;
|
|
3964
|
+
},
|
|
3965
|
+
decode(input, length) {
|
|
3966
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
3967
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3968
|
+
const message = createBaseMsgMultiVoteCardResponse();
|
|
3969
|
+
while (reader.pos < end) {
|
|
3970
|
+
const tag = reader.uint32();
|
|
3971
|
+
switch (tag >>> 3) {
|
|
3972
|
+
default:
|
|
3973
|
+
reader.skipType(tag & 7);
|
|
3974
|
+
break;
|
|
3975
|
+
}
|
|
3976
|
+
}
|
|
3977
|
+
return message;
|
|
3978
|
+
},
|
|
3979
|
+
fromJSON(_) {
|
|
3980
|
+
return {};
|
|
3981
|
+
},
|
|
3982
|
+
toJSON(_) {
|
|
3983
|
+
const obj = {};
|
|
3984
|
+
return obj;
|
|
3985
|
+
},
|
|
3986
|
+
fromPartial(_) {
|
|
3987
|
+
const message = createBaseMsgMultiVoteCardResponse();
|
|
3988
|
+
return message;
|
|
3989
|
+
},
|
|
3990
|
+
};
|
|
3839
3991
|
export class MsgClientImpl {
|
|
3840
3992
|
constructor(rpc) {
|
|
3841
3993
|
this.rpc = rpc;
|
|
@@ -3879,6 +4031,7 @@ export class MsgClientImpl {
|
|
|
3879
4031
|
this.SetCollectionArtist = this.SetCollectionArtist.bind(this);
|
|
3880
4032
|
this.SetUserWebsite = this.SetUserWebsite.bind(this);
|
|
3881
4033
|
this.SetUserBiography = this.SetUserBiography.bind(this);
|
|
4034
|
+
this.MultiVoteCard = this.MultiVoteCard.bind(this);
|
|
3882
4035
|
}
|
|
3883
4036
|
Createuser(request) {
|
|
3884
4037
|
const data = MsgCreateuser.encode(request).finish();
|
|
@@ -4080,6 +4233,11 @@ export class MsgClientImpl {
|
|
|
4080
4233
|
const promise = this.rpc.request("DecentralCardGame.cardchain.cardchain.Msg", "SetUserBiography", data);
|
|
4081
4234
|
return promise.then((data) => MsgSetUserBiographyResponse.decode(new _m0.Reader(data)));
|
|
4082
4235
|
}
|
|
4236
|
+
MultiVoteCard(request) {
|
|
4237
|
+
const data = MsgMultiVoteCard.encode(request).finish();
|
|
4238
|
+
const promise = this.rpc.request("DecentralCardGame.cardchain.cardchain.Msg", "MultiVoteCard", data);
|
|
4239
|
+
return promise.then((data) => MsgMultiVoteCardResponse.decode(new _m0.Reader(data)));
|
|
4240
|
+
}
|
|
4083
4241
|
}
|
|
4084
4242
|
var globalThis = (() => {
|
|
4085
4243
|
if (typeof globalThis !== "undefined") {
|