carbon-js-sdk 0.3.42 → 0.3.43-dev.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.
- package/lib/clients/CarbonQueryClient.js +2 -2
- package/lib/clients/ETHClient.js +15 -15
- package/lib/clients/HydrogenClient.js +1 -1
- package/lib/clients/NEOClient.js +7 -7
- package/lib/clients/TokenClient.js +1 -1
- package/lib/clients/ZILClient.js +17 -17
- package/lib/codec/broker/amm.d.ts +1 -1
- package/lib/codec/broker/amm.js +16 -18
- package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/tx/v1beta1/tx.js +2 -2
- package/lib/codec/index.d.ts +14 -11
- package/lib/codec/index.js +49 -34
- package/lib/codec/liquiditypool/genesis.d.ts +2 -1
- package/lib/codec/liquiditypool/genesis.js +17 -2
- package/lib/codec/liquiditypool/legacy.d.ts +18 -0
- package/lib/codec/liquiditypool/legacy.js +64 -0
- package/lib/codec/liquiditypool/liquiditypool.d.ts +40 -0
- package/lib/codec/liquiditypool/liquiditypool.js +320 -2
- package/lib/codec/liquiditypool/proposal.d.ts +37 -25
- package/lib/codec/liquiditypool/proposal.js +139 -61
- package/lib/codec/liquiditypool/query.d.ts +25 -1
- package/lib/codec/liquiditypool/query.js +124 -1
- package/lib/codec/liquiditypool/tx.d.ts +101 -66
- package/lib/codec/liquiditypool/tx.js +570 -333
- package/lib/codec/order/order.d.ts +1 -0
- package/lib/codec/order/order.js +45 -1
- package/lib/constant/generic.js +1 -1
- package/lib/modules/admin.d.ts +0 -2
- package/lib/modules/admin.js +0 -26
- package/lib/modules/cdp.js +43 -43
- package/lib/modules/coin.d.ts +19 -0
- package/lib/modules/coin.js +39 -0
- package/lib/modules/gov.js +12 -26
- package/lib/modules/liquiditypool.d.ts +11 -1
- package/lib/modules/liquiditypool.js +34 -2
- package/lib/modules/market.d.ts +11 -0
- package/lib/modules/market.js +19 -0
- package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +8 -8
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +3 -3
- package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +1 -1
- package/lib/provider/amino/types/admin.js +28 -32
- package/lib/provider/amino/types/bank.js +1 -1
- package/lib/provider/amino/types/broker.js +1 -1
- package/lib/provider/amino/types/cdp.js +22 -22
- package/lib/provider/amino/types/coin.js +4 -4
- package/lib/provider/amino/types/gov.js +4 -32
- package/lib/provider/amino/types/ibc.js +1 -1
- package/lib/provider/amino/types/leverage.js +1 -1
- package/lib/provider/amino/types/liquidityPool.js +7 -7
- package/lib/provider/amino/types/market.js +1 -1
- package/lib/provider/amino/types/oracle.js +1 -1
- package/lib/provider/amino/types/order.js +4 -4
- package/lib/provider/amino/types/position.js +1 -1
- package/lib/provider/amino/types/profile.js +1 -1
- package/lib/provider/amino/types/staking.js +4 -4
- package/lib/provider/amino/types/subaccount.js +3 -3
- package/lib/provider/amino/utils.js +11 -11
- package/lib/provider/ledger/ledger.js +2 -2
- package/lib/provider/metamask/MetaMask.js +1 -1
- package/lib/provider/o3/O3Wallet.js +2 -2
- package/lib/util/address.js +13 -13
- package/lib/util/api.js +4 -4
- package/lib/util/fetch.js +1 -1
- package/lib/util/generic.js +3 -3
- package/lib/util/gov.d.ts +0 -2
- package/lib/util/gov.js +0 -6
- package/lib/util/number.js +5 -5
- package/lib/util/tx.d.ts +9 -6
- package/lib/wallet/CarbonSigner.js +2 -2
- package/lib/wallet/CarbonSigningClient.js +8 -8
- package/lib/wallet/CarbonWallet.js +6 -6
- package/lib/websocket/connector.js +3 -3
- package/package.json +1 -1
|
@@ -3,17 +3,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.RemoveLiquidities = exports.RemoveLiquidity = exports.AddLiquidities = exports.AddLiquidity = exports.Pools = exports.Pool = exports.Params = exports.protobufPackage = void 0;
|
|
6
|
+
exports.PoolReserve = exports.RemovePoolRoutes = exports.RemoveLiquidities = exports.RemoveLiquidity = exports.AddLiquidities = exports.AddLiquidity = exports.PoolRoute = exports.Pools = exports.Pool = exports.Params = exports.protobufPackage = void 0;
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
10
|
exports.protobufPackage = "Switcheo.carbon.liquiditypool";
|
|
11
|
-
const baseParams = {
|
|
11
|
+
const baseParams = {
|
|
12
|
+
rewardReductionThreshold: long_1.default.UZERO,
|
|
13
|
+
numQuotes: long_1.default.UZERO,
|
|
14
|
+
};
|
|
12
15
|
exports.Params = {
|
|
13
16
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
14
17
|
if (!message.rewardReductionThreshold.isZero()) {
|
|
15
18
|
writer.uint32(8).uint64(message.rewardReductionThreshold);
|
|
16
19
|
}
|
|
20
|
+
if (!message.numQuotes.isZero()) {
|
|
21
|
+
writer.uint32(16).uint64(message.numQuotes);
|
|
22
|
+
}
|
|
17
23
|
return writer;
|
|
18
24
|
},
|
|
19
25
|
decode(input, length) {
|
|
@@ -26,6 +32,9 @@ exports.Params = {
|
|
|
26
32
|
case 1:
|
|
27
33
|
message.rewardReductionThreshold = reader.uint64();
|
|
28
34
|
break;
|
|
35
|
+
case 2:
|
|
36
|
+
message.numQuotes = reader.uint64();
|
|
37
|
+
break;
|
|
29
38
|
default:
|
|
30
39
|
reader.skipType(tag & 7);
|
|
31
40
|
break;
|
|
@@ -40,12 +49,18 @@ exports.Params = {
|
|
|
40
49
|
object.rewardReductionThreshold !== null
|
|
41
50
|
? long_1.default.fromString(object.rewardReductionThreshold)
|
|
42
51
|
: long_1.default.UZERO;
|
|
52
|
+
message.numQuotes =
|
|
53
|
+
object.numQuotes !== undefined && object.numQuotes !== null
|
|
54
|
+
? long_1.default.fromString(object.numQuotes)
|
|
55
|
+
: long_1.default.UZERO;
|
|
43
56
|
return message;
|
|
44
57
|
},
|
|
45
58
|
toJSON(message) {
|
|
46
59
|
const obj = {};
|
|
47
60
|
message.rewardReductionThreshold !== undefined &&
|
|
48
61
|
(obj.rewardReductionThreshold = (message.rewardReductionThreshold || long_1.default.UZERO).toString());
|
|
62
|
+
message.numQuotes !== undefined &&
|
|
63
|
+
(obj.numQuotes = (message.numQuotes || long_1.default.UZERO).toString());
|
|
49
64
|
return obj;
|
|
50
65
|
},
|
|
51
66
|
fromPartial(object) {
|
|
@@ -55,6 +70,10 @@ exports.Params = {
|
|
|
55
70
|
object.rewardReductionThreshold !== null
|
|
56
71
|
? long_1.default.fromValue(object.rewardReductionThreshold)
|
|
57
72
|
: long_1.default.UZERO;
|
|
73
|
+
message.numQuotes =
|
|
74
|
+
object.numQuotes !== undefined && object.numQuotes !== null
|
|
75
|
+
? long_1.default.fromValue(object.numQuotes)
|
|
76
|
+
: long_1.default.UZERO;
|
|
58
77
|
return message;
|
|
59
78
|
},
|
|
60
79
|
};
|
|
@@ -375,6 +394,97 @@ exports.Pools = {
|
|
|
375
394
|
return message;
|
|
376
395
|
},
|
|
377
396
|
};
|
|
397
|
+
const basePoolRoute = {
|
|
398
|
+
market: "",
|
|
399
|
+
poolIds: long_1.default.UZERO,
|
|
400
|
+
numQuotes: long_1.default.ZERO,
|
|
401
|
+
};
|
|
402
|
+
exports.PoolRoute = {
|
|
403
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
404
|
+
if (message.market !== "") {
|
|
405
|
+
writer.uint32(10).string(message.market);
|
|
406
|
+
}
|
|
407
|
+
writer.uint32(18).fork();
|
|
408
|
+
for (const v of message.poolIds) {
|
|
409
|
+
writer.uint64(v);
|
|
410
|
+
}
|
|
411
|
+
writer.ldelim();
|
|
412
|
+
if (!message.numQuotes.isZero()) {
|
|
413
|
+
writer.uint32(24).int64(message.numQuotes);
|
|
414
|
+
}
|
|
415
|
+
return writer;
|
|
416
|
+
},
|
|
417
|
+
decode(input, length) {
|
|
418
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
419
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
420
|
+
const message = Object.assign({}, basePoolRoute);
|
|
421
|
+
message.poolIds = [];
|
|
422
|
+
while (reader.pos < end) {
|
|
423
|
+
const tag = reader.uint32();
|
|
424
|
+
switch (tag >>> 3) {
|
|
425
|
+
case 1:
|
|
426
|
+
message.market = reader.string();
|
|
427
|
+
break;
|
|
428
|
+
case 2:
|
|
429
|
+
if ((tag & 7) === 2) {
|
|
430
|
+
const end2 = reader.uint32() + reader.pos;
|
|
431
|
+
while (reader.pos < end2) {
|
|
432
|
+
message.poolIds.push(reader.uint64());
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
message.poolIds.push(reader.uint64());
|
|
437
|
+
}
|
|
438
|
+
break;
|
|
439
|
+
case 3:
|
|
440
|
+
message.numQuotes = reader.int64();
|
|
441
|
+
break;
|
|
442
|
+
default:
|
|
443
|
+
reader.skipType(tag & 7);
|
|
444
|
+
break;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
return message;
|
|
448
|
+
},
|
|
449
|
+
fromJSON(object) {
|
|
450
|
+
var _a;
|
|
451
|
+
const message = Object.assign({}, basePoolRoute);
|
|
452
|
+
message.market =
|
|
453
|
+
object.market !== undefined && object.market !== null
|
|
454
|
+
? String(object.market)
|
|
455
|
+
: "";
|
|
456
|
+
message.poolIds = ((_a = object.poolIds) !== null && _a !== void 0 ? _a : []).map((e) => long_1.default.fromString(e));
|
|
457
|
+
message.numQuotes =
|
|
458
|
+
object.numQuotes !== undefined && object.numQuotes !== null
|
|
459
|
+
? long_1.default.fromString(object.numQuotes)
|
|
460
|
+
: long_1.default.ZERO;
|
|
461
|
+
return message;
|
|
462
|
+
},
|
|
463
|
+
toJSON(message) {
|
|
464
|
+
const obj = {};
|
|
465
|
+
message.market !== undefined && (obj.market = message.market);
|
|
466
|
+
if (message.poolIds) {
|
|
467
|
+
obj.poolIds = message.poolIds.map((e) => (e || long_1.default.UZERO).toString());
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
obj.poolIds = [];
|
|
471
|
+
}
|
|
472
|
+
message.numQuotes !== undefined &&
|
|
473
|
+
(obj.numQuotes = (message.numQuotes || long_1.default.ZERO).toString());
|
|
474
|
+
return obj;
|
|
475
|
+
},
|
|
476
|
+
fromPartial(object) {
|
|
477
|
+
var _a, _b;
|
|
478
|
+
const message = Object.assign({}, basePoolRoute);
|
|
479
|
+
message.market = (_a = object.market) !== null && _a !== void 0 ? _a : "";
|
|
480
|
+
message.poolIds = ((_b = object.poolIds) !== null && _b !== void 0 ? _b : []).map((e) => long_1.default.fromValue(e));
|
|
481
|
+
message.numQuotes =
|
|
482
|
+
object.numQuotes !== undefined && object.numQuotes !== null
|
|
483
|
+
? long_1.default.fromValue(object.numQuotes)
|
|
484
|
+
: long_1.default.ZERO;
|
|
485
|
+
return message;
|
|
486
|
+
},
|
|
487
|
+
};
|
|
378
488
|
const baseAddLiquidity = {
|
|
379
489
|
creator: "",
|
|
380
490
|
id: long_1.default.UZERO,
|
|
@@ -649,6 +759,214 @@ exports.RemoveLiquidities = {
|
|
|
649
759
|
return message;
|
|
650
760
|
},
|
|
651
761
|
};
|
|
762
|
+
const baseRemovePoolRoutes = {};
|
|
763
|
+
exports.RemovePoolRoutes = {
|
|
764
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
765
|
+
for (const v of message.removePoolRoutes) {
|
|
766
|
+
writer.uint32(10).bytes(v);
|
|
767
|
+
}
|
|
768
|
+
return writer;
|
|
769
|
+
},
|
|
770
|
+
decode(input, length) {
|
|
771
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
772
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
773
|
+
const message = Object.assign({}, baseRemovePoolRoutes);
|
|
774
|
+
message.removePoolRoutes = [];
|
|
775
|
+
while (reader.pos < end) {
|
|
776
|
+
const tag = reader.uint32();
|
|
777
|
+
switch (tag >>> 3) {
|
|
778
|
+
case 1:
|
|
779
|
+
message.removePoolRoutes.push(reader.bytes());
|
|
780
|
+
break;
|
|
781
|
+
default:
|
|
782
|
+
reader.skipType(tag & 7);
|
|
783
|
+
break;
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
return message;
|
|
787
|
+
},
|
|
788
|
+
fromJSON(object) {
|
|
789
|
+
var _a;
|
|
790
|
+
const message = Object.assign({}, baseRemovePoolRoutes);
|
|
791
|
+
message.removePoolRoutes = ((_a = object.removePoolRoutes) !== null && _a !== void 0 ? _a : []).map((e) => bytesFromBase64(e));
|
|
792
|
+
return message;
|
|
793
|
+
},
|
|
794
|
+
toJSON(message) {
|
|
795
|
+
const obj = {};
|
|
796
|
+
if (message.removePoolRoutes) {
|
|
797
|
+
obj.removePoolRoutes = message.removePoolRoutes.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
|
798
|
+
}
|
|
799
|
+
else {
|
|
800
|
+
obj.removePoolRoutes = [];
|
|
801
|
+
}
|
|
802
|
+
return obj;
|
|
803
|
+
},
|
|
804
|
+
fromPartial(object) {
|
|
805
|
+
var _a;
|
|
806
|
+
const message = Object.assign({}, baseRemovePoolRoutes);
|
|
807
|
+
message.removePoolRoutes = ((_a = object.removePoolRoutes) !== null && _a !== void 0 ? _a : []).map((e) => e);
|
|
808
|
+
return message;
|
|
809
|
+
},
|
|
810
|
+
};
|
|
811
|
+
const basePoolReserve = {
|
|
812
|
+
id: long_1.default.UZERO,
|
|
813
|
+
amountA: "",
|
|
814
|
+
weightA: "",
|
|
815
|
+
amountB: "",
|
|
816
|
+
weightB: "",
|
|
817
|
+
vAmountA: "",
|
|
818
|
+
vAmountB: "",
|
|
819
|
+
};
|
|
820
|
+
exports.PoolReserve = {
|
|
821
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
822
|
+
if (!message.id.isZero()) {
|
|
823
|
+
writer.uint32(8).uint64(message.id);
|
|
824
|
+
}
|
|
825
|
+
if (message.amountA !== "") {
|
|
826
|
+
writer.uint32(18).string(message.amountA);
|
|
827
|
+
}
|
|
828
|
+
if (message.weightA !== "") {
|
|
829
|
+
writer.uint32(26).string(message.weightA);
|
|
830
|
+
}
|
|
831
|
+
if (message.amountB !== "") {
|
|
832
|
+
writer.uint32(34).string(message.amountB);
|
|
833
|
+
}
|
|
834
|
+
if (message.weightB !== "") {
|
|
835
|
+
writer.uint32(42).string(message.weightB);
|
|
836
|
+
}
|
|
837
|
+
if (message.vAmountA !== "") {
|
|
838
|
+
writer.uint32(50).string(message.vAmountA);
|
|
839
|
+
}
|
|
840
|
+
if (message.vAmountB !== "") {
|
|
841
|
+
writer.uint32(58).string(message.vAmountB);
|
|
842
|
+
}
|
|
843
|
+
return writer;
|
|
844
|
+
},
|
|
845
|
+
decode(input, length) {
|
|
846
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
847
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
848
|
+
const message = Object.assign({}, basePoolReserve);
|
|
849
|
+
while (reader.pos < end) {
|
|
850
|
+
const tag = reader.uint32();
|
|
851
|
+
switch (tag >>> 3) {
|
|
852
|
+
case 1:
|
|
853
|
+
message.id = reader.uint64();
|
|
854
|
+
break;
|
|
855
|
+
case 2:
|
|
856
|
+
message.amountA = reader.string();
|
|
857
|
+
break;
|
|
858
|
+
case 3:
|
|
859
|
+
message.weightA = reader.string();
|
|
860
|
+
break;
|
|
861
|
+
case 4:
|
|
862
|
+
message.amountB = reader.string();
|
|
863
|
+
break;
|
|
864
|
+
case 5:
|
|
865
|
+
message.weightB = reader.string();
|
|
866
|
+
break;
|
|
867
|
+
case 6:
|
|
868
|
+
message.vAmountA = reader.string();
|
|
869
|
+
break;
|
|
870
|
+
case 7:
|
|
871
|
+
message.vAmountB = reader.string();
|
|
872
|
+
break;
|
|
873
|
+
default:
|
|
874
|
+
reader.skipType(tag & 7);
|
|
875
|
+
break;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
return message;
|
|
879
|
+
},
|
|
880
|
+
fromJSON(object) {
|
|
881
|
+
const message = Object.assign({}, basePoolReserve);
|
|
882
|
+
message.id =
|
|
883
|
+
object.id !== undefined && object.id !== null
|
|
884
|
+
? long_1.default.fromString(object.id)
|
|
885
|
+
: long_1.default.UZERO;
|
|
886
|
+
message.amountA =
|
|
887
|
+
object.amountA !== undefined && object.amountA !== null
|
|
888
|
+
? String(object.amountA)
|
|
889
|
+
: "";
|
|
890
|
+
message.weightA =
|
|
891
|
+
object.weightA !== undefined && object.weightA !== null
|
|
892
|
+
? String(object.weightA)
|
|
893
|
+
: "";
|
|
894
|
+
message.amountB =
|
|
895
|
+
object.amountB !== undefined && object.amountB !== null
|
|
896
|
+
? String(object.amountB)
|
|
897
|
+
: "";
|
|
898
|
+
message.weightB =
|
|
899
|
+
object.weightB !== undefined && object.weightB !== null
|
|
900
|
+
? String(object.weightB)
|
|
901
|
+
: "";
|
|
902
|
+
message.vAmountA =
|
|
903
|
+
object.vAmountA !== undefined && object.vAmountA !== null
|
|
904
|
+
? String(object.vAmountA)
|
|
905
|
+
: "";
|
|
906
|
+
message.vAmountB =
|
|
907
|
+
object.vAmountB !== undefined && object.vAmountB !== null
|
|
908
|
+
? String(object.vAmountB)
|
|
909
|
+
: "";
|
|
910
|
+
return message;
|
|
911
|
+
},
|
|
912
|
+
toJSON(message) {
|
|
913
|
+
const obj = {};
|
|
914
|
+
message.id !== undefined &&
|
|
915
|
+
(obj.id = (message.id || long_1.default.UZERO).toString());
|
|
916
|
+
message.amountA !== undefined && (obj.amountA = message.amountA);
|
|
917
|
+
message.weightA !== undefined && (obj.weightA = message.weightA);
|
|
918
|
+
message.amountB !== undefined && (obj.amountB = message.amountB);
|
|
919
|
+
message.weightB !== undefined && (obj.weightB = message.weightB);
|
|
920
|
+
message.vAmountA !== undefined && (obj.vAmountA = message.vAmountA);
|
|
921
|
+
message.vAmountB !== undefined && (obj.vAmountB = message.vAmountB);
|
|
922
|
+
return obj;
|
|
923
|
+
},
|
|
924
|
+
fromPartial(object) {
|
|
925
|
+
var _a, _b, _c, _d, _e, _f;
|
|
926
|
+
const message = Object.assign({}, basePoolReserve);
|
|
927
|
+
message.id =
|
|
928
|
+
object.id !== undefined && object.id !== null
|
|
929
|
+
? long_1.default.fromValue(object.id)
|
|
930
|
+
: long_1.default.UZERO;
|
|
931
|
+
message.amountA = (_a = object.amountA) !== null && _a !== void 0 ? _a : "";
|
|
932
|
+
message.weightA = (_b = object.weightA) !== null && _b !== void 0 ? _b : "";
|
|
933
|
+
message.amountB = (_c = object.amountB) !== null && _c !== void 0 ? _c : "";
|
|
934
|
+
message.weightB = (_d = object.weightB) !== null && _d !== void 0 ? _d : "";
|
|
935
|
+
message.vAmountA = (_e = object.vAmountA) !== null && _e !== void 0 ? _e : "";
|
|
936
|
+
message.vAmountB = (_f = object.vAmountB) !== null && _f !== void 0 ? _f : "";
|
|
937
|
+
return message;
|
|
938
|
+
},
|
|
939
|
+
};
|
|
940
|
+
var globalThis = (() => {
|
|
941
|
+
if (typeof globalThis !== "undefined")
|
|
942
|
+
return globalThis;
|
|
943
|
+
if (typeof self !== "undefined")
|
|
944
|
+
return self;
|
|
945
|
+
if (typeof window !== "undefined")
|
|
946
|
+
return window;
|
|
947
|
+
if (typeof global !== "undefined")
|
|
948
|
+
return global;
|
|
949
|
+
throw "Unable to locate global object";
|
|
950
|
+
})();
|
|
951
|
+
const atob = globalThis.atob ||
|
|
952
|
+
((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
|
|
953
|
+
function bytesFromBase64(b64) {
|
|
954
|
+
const bin = atob(b64);
|
|
955
|
+
const arr = new Uint8Array(bin.length);
|
|
956
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
957
|
+
arr[i] = bin.charCodeAt(i);
|
|
958
|
+
}
|
|
959
|
+
return arr;
|
|
960
|
+
}
|
|
961
|
+
const btoa = globalThis.btoa ||
|
|
962
|
+
((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
|
|
963
|
+
function base64FromBytes(arr) {
|
|
964
|
+
const bin = [];
|
|
965
|
+
for (const byte of arr) {
|
|
966
|
+
bin.push(String.fromCharCode(byte));
|
|
967
|
+
}
|
|
968
|
+
return btoa(bin.join(""));
|
|
969
|
+
}
|
|
652
970
|
if (minimal_1.default.util.Long !== long_1.default) {
|
|
653
971
|
minimal_1.default.util.Long = long_1.default;
|
|
654
972
|
minimal_1.default.configure();
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import {
|
|
3
|
+
import { SetRewardCurveParams, SetCommitmentCurveParams, SetRewardsWeightsParams, UpdatePoolParams, CreatePoolRouteParams, RemovePoolRouteParams, UpdatePoolRouteParams } from "./tx";
|
|
4
4
|
export declare const protobufPackage = "Switcheo.carbon.liquiditypool";
|
|
5
|
-
export interface LinkPoolProposal {
|
|
6
|
-
title: string;
|
|
7
|
-
description: string;
|
|
8
|
-
msg?: LinkPoolParams;
|
|
9
|
-
}
|
|
10
|
-
export interface UnlinkPoolProposal {
|
|
11
|
-
title: string;
|
|
12
|
-
description: string;
|
|
13
|
-
msg?: UnlinkPoolParams;
|
|
14
|
-
}
|
|
15
5
|
export interface SetRewardCurveProposal {
|
|
16
6
|
title: string;
|
|
17
7
|
description: string;
|
|
@@ -32,20 +22,21 @@ export interface UpdatePoolProposal {
|
|
|
32
22
|
description: string;
|
|
33
23
|
msg?: UpdatePoolParams;
|
|
34
24
|
}
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
25
|
+
export interface CreatePoolRouteProposal {
|
|
26
|
+
title: string;
|
|
27
|
+
description: string;
|
|
28
|
+
msg?: CreatePoolRouteParams;
|
|
29
|
+
}
|
|
30
|
+
export interface RemovePoolRouteProposal {
|
|
31
|
+
title: string;
|
|
32
|
+
description: string;
|
|
33
|
+
msg?: RemovePoolRouteParams;
|
|
34
|
+
}
|
|
35
|
+
export interface UpdatePoolRouteProposal {
|
|
36
|
+
title: string;
|
|
37
|
+
description: string;
|
|
38
|
+
msg?: UpdatePoolRouteParams;
|
|
39
|
+
}
|
|
49
40
|
export declare const SetRewardCurveProposal: {
|
|
50
41
|
encode(message: SetRewardCurveProposal, writer?: _m0.Writer): _m0.Writer;
|
|
51
42
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SetRewardCurveProposal;
|
|
@@ -74,6 +65,27 @@ export declare const UpdatePoolProposal: {
|
|
|
74
65
|
toJSON(message: UpdatePoolProposal): unknown;
|
|
75
66
|
fromPartial(object: DeepPartial<UpdatePoolProposal>): UpdatePoolProposal;
|
|
76
67
|
};
|
|
68
|
+
export declare const CreatePoolRouteProposal: {
|
|
69
|
+
encode(message: CreatePoolRouteProposal, writer?: _m0.Writer): _m0.Writer;
|
|
70
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): CreatePoolRouteProposal;
|
|
71
|
+
fromJSON(object: any): CreatePoolRouteProposal;
|
|
72
|
+
toJSON(message: CreatePoolRouteProposal): unknown;
|
|
73
|
+
fromPartial(object: DeepPartial<CreatePoolRouteProposal>): CreatePoolRouteProposal;
|
|
74
|
+
};
|
|
75
|
+
export declare const RemovePoolRouteProposal: {
|
|
76
|
+
encode(message: RemovePoolRouteProposal, writer?: _m0.Writer): _m0.Writer;
|
|
77
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): RemovePoolRouteProposal;
|
|
78
|
+
fromJSON(object: any): RemovePoolRouteProposal;
|
|
79
|
+
toJSON(message: RemovePoolRouteProposal): unknown;
|
|
80
|
+
fromPartial(object: DeepPartial<RemovePoolRouteProposal>): RemovePoolRouteProposal;
|
|
81
|
+
};
|
|
82
|
+
export declare const UpdatePoolRouteProposal: {
|
|
83
|
+
encode(message: UpdatePoolRouteProposal, writer?: _m0.Writer): _m0.Writer;
|
|
84
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UpdatePoolRouteProposal;
|
|
85
|
+
fromJSON(object: any): UpdatePoolRouteProposal;
|
|
86
|
+
toJSON(message: UpdatePoolRouteProposal): unknown;
|
|
87
|
+
fromPartial(object: DeepPartial<UpdatePoolRouteProposal>): UpdatePoolRouteProposal;
|
|
88
|
+
};
|
|
77
89
|
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
78
90
|
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
79
91
|
[K in keyof T]?: DeepPartial<T[K]>;
|