@sparkdreamnft/sparkdreamjs 0.0.33 → 0.0.34
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.
|
@@ -4479,9 +4479,7 @@ export const QueryStakesByStakerRequest = {
|
|
|
4479
4479
|
};
|
|
4480
4480
|
function createBaseQueryStakesByStakerResponse() {
|
|
4481
4481
|
return {
|
|
4482
|
-
|
|
4483
|
-
targetType: BigInt(0),
|
|
4484
|
-
amount: "",
|
|
4482
|
+
stakes: [],
|
|
4485
4483
|
pagination: undefined
|
|
4486
4484
|
};
|
|
4487
4485
|
}
|
|
@@ -4494,17 +4492,11 @@ function createBaseQueryStakesByStakerResponse() {
|
|
|
4494
4492
|
export const QueryStakesByStakerResponse = {
|
|
4495
4493
|
typeUrl: "/sparkdream.rep.v1.QueryStakesByStakerResponse",
|
|
4496
4494
|
encode(message, writer = BinaryWriter.create()) {
|
|
4497
|
-
|
|
4498
|
-
writer.uint32(
|
|
4499
|
-
}
|
|
4500
|
-
if (message.targetType !== BigInt(0)) {
|
|
4501
|
-
writer.uint32(16).uint64(message.targetType);
|
|
4502
|
-
}
|
|
4503
|
-
if (message.amount !== "") {
|
|
4504
|
-
writer.uint32(26).string(message.amount);
|
|
4495
|
+
for (const v of message.stakes) {
|
|
4496
|
+
Stake.encode(v, writer.uint32(10).fork()).ldelim();
|
|
4505
4497
|
}
|
|
4506
4498
|
if (message.pagination !== undefined) {
|
|
4507
|
-
PageResponse.encode(message.pagination, writer.uint32(
|
|
4499
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
4508
4500
|
}
|
|
4509
4501
|
return writer;
|
|
4510
4502
|
},
|
|
@@ -4516,15 +4508,9 @@ export const QueryStakesByStakerResponse = {
|
|
|
4516
4508
|
const tag = reader.uint32();
|
|
4517
4509
|
switch (tag >>> 3) {
|
|
4518
4510
|
case 1:
|
|
4519
|
-
message.
|
|
4511
|
+
message.stakes.push(Stake.decode(reader, reader.uint32()));
|
|
4520
4512
|
break;
|
|
4521
4513
|
case 2:
|
|
4522
|
-
message.targetType = reader.uint64();
|
|
4523
|
-
break;
|
|
4524
|
-
case 3:
|
|
4525
|
-
message.amount = reader.string();
|
|
4526
|
-
break;
|
|
4527
|
-
case 4:
|
|
4528
4514
|
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
4529
4515
|
break;
|
|
4530
4516
|
default:
|
|
@@ -4536,23 +4522,13 @@ export const QueryStakesByStakerResponse = {
|
|
|
4536
4522
|
},
|
|
4537
4523
|
fromPartial(object) {
|
|
4538
4524
|
const message = createBaseQueryStakesByStakerResponse();
|
|
4539
|
-
message.
|
|
4540
|
-
message.targetType = object.targetType !== undefined && object.targetType !== null ? BigInt(object.targetType.toString()) : BigInt(0);
|
|
4541
|
-
message.amount = object.amount ?? "";
|
|
4525
|
+
message.stakes = object.stakes?.map(e => Stake.fromPartial(e)) || [];
|
|
4542
4526
|
message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
|
|
4543
4527
|
return message;
|
|
4544
4528
|
},
|
|
4545
4529
|
fromAmino(object) {
|
|
4546
4530
|
const message = createBaseQueryStakesByStakerResponse();
|
|
4547
|
-
|
|
4548
|
-
message.stakeId = BigInt(object.stake_id);
|
|
4549
|
-
}
|
|
4550
|
-
if (object.target_type !== undefined && object.target_type !== null) {
|
|
4551
|
-
message.targetType = BigInt(object.target_type);
|
|
4552
|
-
}
|
|
4553
|
-
if (object.amount !== undefined && object.amount !== null) {
|
|
4554
|
-
message.amount = object.amount;
|
|
4555
|
-
}
|
|
4531
|
+
message.stakes = object.stakes?.map(e => Stake.fromAmino(e)) || [];
|
|
4556
4532
|
if (object.pagination !== undefined && object.pagination !== null) {
|
|
4557
4533
|
message.pagination = PageResponse.fromAmino(object.pagination);
|
|
4558
4534
|
}
|
|
@@ -4560,9 +4536,12 @@ export const QueryStakesByStakerResponse = {
|
|
|
4560
4536
|
},
|
|
4561
4537
|
toAmino(message) {
|
|
4562
4538
|
const obj = {};
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4539
|
+
if (message.stakes) {
|
|
4540
|
+
obj.stakes = message.stakes.map(e => e ? Stake.toAmino(e) : undefined);
|
|
4541
|
+
}
|
|
4542
|
+
else {
|
|
4543
|
+
obj.stakes = message.stakes;
|
|
4544
|
+
}
|
|
4566
4545
|
obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
|
|
4567
4546
|
return obj;
|
|
4568
4547
|
},
|
package/package.json
CHANGED
|
@@ -1665,9 +1665,7 @@ export interface QueryStakesByStakerRequestAminoMsg {
|
|
|
1665
1665
|
* @see proto type: sparkdream.rep.v1.QueryStakesByStakerResponse
|
|
1666
1666
|
*/
|
|
1667
1667
|
export interface QueryStakesByStakerResponse {
|
|
1668
|
-
|
|
1669
|
-
targetType: bigint;
|
|
1670
|
-
amount: string;
|
|
1668
|
+
stakes: Stake[];
|
|
1671
1669
|
pagination?: PageResponse;
|
|
1672
1670
|
}
|
|
1673
1671
|
export interface QueryStakesByStakerResponseProtoMsg {
|
|
@@ -1681,9 +1679,7 @@ export interface QueryStakesByStakerResponseProtoMsg {
|
|
|
1681
1679
|
* @see proto type: sparkdream.rep.v1.QueryStakesByStakerResponse
|
|
1682
1680
|
*/
|
|
1683
1681
|
export interface QueryStakesByStakerResponseAmino {
|
|
1684
|
-
|
|
1685
|
-
target_type?: string;
|
|
1686
|
-
amount?: string;
|
|
1682
|
+
stakes?: StakeAmino[];
|
|
1687
1683
|
pagination?: PageResponseAmino;
|
|
1688
1684
|
}
|
|
1689
1685
|
export interface QueryStakesByStakerResponseAminoMsg {
|
|
@@ -4485,9 +4485,7 @@ exports.QueryStakesByStakerRequest = {
|
|
|
4485
4485
|
};
|
|
4486
4486
|
function createBaseQueryStakesByStakerResponse() {
|
|
4487
4487
|
return {
|
|
4488
|
-
|
|
4489
|
-
targetType: BigInt(0),
|
|
4490
|
-
amount: "",
|
|
4488
|
+
stakes: [],
|
|
4491
4489
|
pagination: undefined
|
|
4492
4490
|
};
|
|
4493
4491
|
}
|
|
@@ -4500,17 +4498,11 @@ function createBaseQueryStakesByStakerResponse() {
|
|
|
4500
4498
|
exports.QueryStakesByStakerResponse = {
|
|
4501
4499
|
typeUrl: "/sparkdream.rep.v1.QueryStakesByStakerResponse",
|
|
4502
4500
|
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
4503
|
-
|
|
4504
|
-
writer.uint32(
|
|
4505
|
-
}
|
|
4506
|
-
if (message.targetType !== BigInt(0)) {
|
|
4507
|
-
writer.uint32(16).uint64(message.targetType);
|
|
4508
|
-
}
|
|
4509
|
-
if (message.amount !== "") {
|
|
4510
|
-
writer.uint32(26).string(message.amount);
|
|
4501
|
+
for (const v of message.stakes) {
|
|
4502
|
+
stake_1.Stake.encode(v, writer.uint32(10).fork()).ldelim();
|
|
4511
4503
|
}
|
|
4512
4504
|
if (message.pagination !== undefined) {
|
|
4513
|
-
pagination_1.PageResponse.encode(message.pagination, writer.uint32(
|
|
4505
|
+
pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
4514
4506
|
}
|
|
4515
4507
|
return writer;
|
|
4516
4508
|
},
|
|
@@ -4522,15 +4514,9 @@ exports.QueryStakesByStakerResponse = {
|
|
|
4522
4514
|
const tag = reader.uint32();
|
|
4523
4515
|
switch (tag >>> 3) {
|
|
4524
4516
|
case 1:
|
|
4525
|
-
message.
|
|
4517
|
+
message.stakes.push(stake_1.Stake.decode(reader, reader.uint32()));
|
|
4526
4518
|
break;
|
|
4527
4519
|
case 2:
|
|
4528
|
-
message.targetType = reader.uint64();
|
|
4529
|
-
break;
|
|
4530
|
-
case 3:
|
|
4531
|
-
message.amount = reader.string();
|
|
4532
|
-
break;
|
|
4533
|
-
case 4:
|
|
4534
4520
|
message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
|
|
4535
4521
|
break;
|
|
4536
4522
|
default:
|
|
@@ -4542,23 +4528,13 @@ exports.QueryStakesByStakerResponse = {
|
|
|
4542
4528
|
},
|
|
4543
4529
|
fromPartial(object) {
|
|
4544
4530
|
const message = createBaseQueryStakesByStakerResponse();
|
|
4545
|
-
message.
|
|
4546
|
-
message.targetType = object.targetType !== undefined && object.targetType !== null ? BigInt(object.targetType.toString()) : BigInt(0);
|
|
4547
|
-
message.amount = object.amount ?? "";
|
|
4531
|
+
message.stakes = object.stakes?.map(e => stake_1.Stake.fromPartial(e)) || [];
|
|
4548
4532
|
message.pagination = object.pagination !== undefined && object.pagination !== null ? pagination_1.PageResponse.fromPartial(object.pagination) : undefined;
|
|
4549
4533
|
return message;
|
|
4550
4534
|
},
|
|
4551
4535
|
fromAmino(object) {
|
|
4552
4536
|
const message = createBaseQueryStakesByStakerResponse();
|
|
4553
|
-
|
|
4554
|
-
message.stakeId = BigInt(object.stake_id);
|
|
4555
|
-
}
|
|
4556
|
-
if (object.target_type !== undefined && object.target_type !== null) {
|
|
4557
|
-
message.targetType = BigInt(object.target_type);
|
|
4558
|
-
}
|
|
4559
|
-
if (object.amount !== undefined && object.amount !== null) {
|
|
4560
|
-
message.amount = object.amount;
|
|
4561
|
-
}
|
|
4537
|
+
message.stakes = object.stakes?.map(e => stake_1.Stake.fromAmino(e)) || [];
|
|
4562
4538
|
if (object.pagination !== undefined && object.pagination !== null) {
|
|
4563
4539
|
message.pagination = pagination_1.PageResponse.fromAmino(object.pagination);
|
|
4564
4540
|
}
|
|
@@ -4566,9 +4542,12 @@ exports.QueryStakesByStakerResponse = {
|
|
|
4566
4542
|
},
|
|
4567
4543
|
toAmino(message) {
|
|
4568
4544
|
const obj = {};
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4545
|
+
if (message.stakes) {
|
|
4546
|
+
obj.stakes = message.stakes.map(e => e ? stake_1.Stake.toAmino(e) : undefined);
|
|
4547
|
+
}
|
|
4548
|
+
else {
|
|
4549
|
+
obj.stakes = message.stakes;
|
|
4550
|
+
}
|
|
4572
4551
|
obj.pagination = message.pagination ? pagination_1.PageResponse.toAmino(message.pagination) : undefined;
|
|
4573
4552
|
return obj;
|
|
4574
4553
|
},
|