carbon-js-sdk 0.7.0 → 0.7.1-beta.1
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.
|
@@ -23,7 +23,6 @@ declare class HydrogenClient {
|
|
|
23
23
|
formatFeeQuoteV2: (value: any, blockchain: BlockchainUtils.BlockchainV2) => GetFeeQuoteResponse;
|
|
24
24
|
getStats(): Promise<GetStatsResponse>;
|
|
25
25
|
getTransfers(req: GetTransfersRequest, version?: string): Promise<GetTransfersResponse>;
|
|
26
|
-
/** @deprecated getDetailedTransfers function is deprecated, please use getTransfers instead */
|
|
27
26
|
getDetailedTransfers(req: GetTransfersRequest, version?: string): Promise<GetDetailedTransfersResponse>;
|
|
28
27
|
getRelaysTransfers(req: GetRelaysRequest, version?: string): Promise<GetRelaysResponse>;
|
|
29
28
|
getFeeQuote(req: GetFeeQuoteRequest, blockchain?: BlockchainUtils.Blockchain | BlockchainUtils.BlockchainV2 | undefined, version?: string): Promise<GetFeeQuoteResponse>;
|
|
@@ -144,7 +144,6 @@ class HydrogenClient {
|
|
|
144
144
|
return Object.assign(Object.assign({}, result), { data: result.data.map(version === "V1" ? formatCrossChainTransfer : this.formatCrossChainTransferV2) });
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
/** @deprecated getDetailedTransfers function is deprecated, please use getTransfers instead */
|
|
148
147
|
getDetailedTransfers(req, version = "V1") {
|
|
149
148
|
return __awaiter(this, void 0, void 0, function* () {
|
|
150
149
|
this.checkState();
|
package/lib/codec/index.js
CHANGED
|
@@ -24588,6 +24588,10 @@ exports.EIP712Types = {
|
|
|
24588
24588
|
}
|
|
24589
24589
|
],
|
|
24590
24590
|
"QueryPoolInfoResponse": [
|
|
24591
|
+
{
|
|
24592
|
+
"name": "pool_id",
|
|
24593
|
+
"type": "uint64"
|
|
24594
|
+
},
|
|
24591
24595
|
{
|
|
24592
24596
|
"name": "total_share_amount",
|
|
24593
24597
|
"type": "string"
|
|
@@ -842,6 +842,7 @@ exports.QueryPoolInfoRequest = {
|
|
|
842
842
|
},
|
|
843
843
|
};
|
|
844
844
|
const baseQueryPoolInfoResponse = {
|
|
845
|
+
poolId: long_1.default.UZERO,
|
|
845
846
|
totalShareAmount: "",
|
|
846
847
|
totalNavAmount: "",
|
|
847
848
|
availableAmount: "",
|
|
@@ -850,20 +851,23 @@ const baseQueryPoolInfoResponse = {
|
|
|
850
851
|
};
|
|
851
852
|
exports.QueryPoolInfoResponse = {
|
|
852
853
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
854
|
+
if (!message.poolId.isZero()) {
|
|
855
|
+
writer.uint32(8).uint64(message.poolId);
|
|
856
|
+
}
|
|
853
857
|
if (message.totalShareAmount !== "") {
|
|
854
|
-
writer.uint32(
|
|
858
|
+
writer.uint32(18).string(message.totalShareAmount);
|
|
855
859
|
}
|
|
856
860
|
if (message.totalNavAmount !== "") {
|
|
857
|
-
writer.uint32(
|
|
861
|
+
writer.uint32(26).string(message.totalNavAmount);
|
|
858
862
|
}
|
|
859
863
|
if (message.availableAmount !== "") {
|
|
860
|
-
writer.uint32(
|
|
864
|
+
writer.uint32(34).string(message.availableAmount);
|
|
861
865
|
}
|
|
862
866
|
if (message.totalInPositionAmount !== "") {
|
|
863
|
-
writer.uint32(
|
|
867
|
+
writer.uint32(42).string(message.totalInPositionAmount);
|
|
864
868
|
}
|
|
865
869
|
if (message.totalUpnlAmount !== "") {
|
|
866
|
-
writer.uint32(
|
|
870
|
+
writer.uint32(50).string(message.totalUpnlAmount);
|
|
867
871
|
}
|
|
868
872
|
return writer;
|
|
869
873
|
},
|
|
@@ -875,18 +879,21 @@ exports.QueryPoolInfoResponse = {
|
|
|
875
879
|
const tag = reader.uint32();
|
|
876
880
|
switch (tag >>> 3) {
|
|
877
881
|
case 1:
|
|
878
|
-
message.
|
|
882
|
+
message.poolId = reader.uint64();
|
|
879
883
|
break;
|
|
880
884
|
case 2:
|
|
881
|
-
message.
|
|
885
|
+
message.totalShareAmount = reader.string();
|
|
882
886
|
break;
|
|
883
887
|
case 3:
|
|
884
|
-
message.
|
|
888
|
+
message.totalNavAmount = reader.string();
|
|
885
889
|
break;
|
|
886
890
|
case 4:
|
|
887
|
-
message.
|
|
891
|
+
message.availableAmount = reader.string();
|
|
888
892
|
break;
|
|
889
893
|
case 5:
|
|
894
|
+
message.totalInPositionAmount = reader.string();
|
|
895
|
+
break;
|
|
896
|
+
case 6:
|
|
890
897
|
message.totalUpnlAmount = reader.string();
|
|
891
898
|
break;
|
|
892
899
|
default:
|
|
@@ -898,6 +905,10 @@ exports.QueryPoolInfoResponse = {
|
|
|
898
905
|
},
|
|
899
906
|
fromJSON(object) {
|
|
900
907
|
const message = Object.assign({}, baseQueryPoolInfoResponse);
|
|
908
|
+
message.poolId =
|
|
909
|
+
object.poolId !== undefined && object.poolId !== null
|
|
910
|
+
? long_1.default.fromString(object.poolId)
|
|
911
|
+
: long_1.default.UZERO;
|
|
901
912
|
message.totalShareAmount =
|
|
902
913
|
object.totalShareAmount !== undefined && object.totalShareAmount !== null
|
|
903
914
|
? String(object.totalShareAmount)
|
|
@@ -923,6 +934,8 @@ exports.QueryPoolInfoResponse = {
|
|
|
923
934
|
},
|
|
924
935
|
toJSON(message) {
|
|
925
936
|
const obj = {};
|
|
937
|
+
message.poolId !== undefined &&
|
|
938
|
+
(obj.poolId = (message.poolId || long_1.default.UZERO).toString());
|
|
926
939
|
message.totalShareAmount !== undefined &&
|
|
927
940
|
(obj.totalShareAmount = message.totalShareAmount);
|
|
928
941
|
message.totalNavAmount !== undefined &&
|
|
@@ -938,6 +951,10 @@ exports.QueryPoolInfoResponse = {
|
|
|
938
951
|
fromPartial(object) {
|
|
939
952
|
var _a, _b, _c, _d, _e;
|
|
940
953
|
const message = Object.assign({}, baseQueryPoolInfoResponse);
|
|
954
|
+
message.poolId =
|
|
955
|
+
object.poolId !== undefined && object.poolId !== null
|
|
956
|
+
? long_1.default.fromValue(object.poolId)
|
|
957
|
+
: long_1.default.UZERO;
|
|
941
958
|
message.totalShareAmount = (_a = object.totalShareAmount) !== null && _a !== void 0 ? _a : "";
|
|
942
959
|
message.totalNavAmount = (_b = object.totalNavAmount) !== null && _b !== void 0 ? _b : "";
|
|
943
960
|
message.availableAmount = (_c = object.availableAmount) !== null && _c !== void 0 ? _c : "";
|