@skip-go/client 1.0.2 → 1.0.3
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/dist/api/getAssets.cjs +15 -0
- package/dist/api/{getAssets.d.ts → getAssets.d.cts} +2 -2
- package/dist/api/getAssetsBetweenChains.cjs +11 -0
- package/dist/api/{getAssetsBetweenChains.d.ts → getAssetsBetweenChains.d.cts} +2 -2
- package/dist/api/getBridges.cjs +11 -0
- package/dist/api/{getBridges.d.ts → getBridges.d.cts} +2 -2
- package/dist/api/getChains.cjs +11 -0
- package/dist/api/{getChains.d.ts → getChains.d.cts} +2 -2
- package/dist/api/getVenues.cjs +11 -0
- package/dist/api/{getVenues.d.ts → getVenues.d.cts} +1 -1
- package/dist/api/postAssetsFromSource.cjs +12 -0
- package/dist/api/{postAssetsFromSource.d.ts → postAssetsFromSource.d.cts} +2 -2
- package/dist/api/postBalances.cjs +11 -0
- package/dist/api/{postBalances.d.ts → postBalances.d.cts} +3 -3
- package/dist/api/postIbcOriginAssets.cjs +11 -0
- package/dist/api/{postIbcOriginAssets.d.ts → postIbcOriginAssets.d.cts} +1 -1
- package/dist/api/postMessages.cjs +11 -0
- package/dist/api/{postMessages.d.ts → postMessages.d.cts} +186 -186
- package/dist/api/postMessagesDirect.cjs +11 -0
- package/dist/api/{postMessagesDirect.d.ts → postMessagesDirect.d.cts} +185 -185
- package/dist/api/postRecommendAssets.cjs +11 -0
- package/dist/api/{postRecommendAssets.d.ts → postRecommendAssets.d.cts} +2 -2
- package/dist/api/postRoute.cjs +11 -0
- package/dist/api/{postRoute.d.ts → postRoute.d.cts} +163 -163
- package/dist/api/postSubmitTransaction.cjs +11 -0
- package/dist/api/{postSubmitTransaction.d.ts → postSubmitTransaction.d.cts} +1 -1
- package/dist/api/postTrackTransaction.cjs +11 -0
- package/dist/api/{postTrackTransaction.d.ts → postTrackTransaction.d.cts} +1 -1
- package/dist/api/postTransactionStatus.cjs +11 -0
- package/dist/api/{postTransactionStatus.d.ts → postTransactionStatus.d.cts} +3 -3
- package/dist/chunk-32MRDO7V.cjs +12 -0
- package/dist/chunk-44PBLFB5.cjs +24 -0
- package/dist/{chunk-VQ5SIQWU.js → chunk-4R6OCWRR.cjs} +3 -1
- package/dist/{chunk-SQGWZAUC.js → chunk-5IAEEEOQ.cjs} +243 -221
- package/dist/{chunk-4JJWOILI.js → chunk-77ITCT75.cjs} +5 -3
- package/dist/{chunk-3OZQ35X3.js → chunk-7OIZPQJB.cjs} +174 -111
- package/dist/{chunk-JTIHU43D.js → chunk-7SK3IFXJ.cjs} +6 -1
- package/dist/chunk-DAMZSSOH.cjs +12 -0
- package/dist/{chunk-BRMONS6A.js → chunk-ED2OY55G.cjs} +11 -5
- package/dist/{chunk-735L35R6.js → chunk-G7BBDZ7C.cjs} +208 -186
- package/dist/{chunk-W6TBGBV3.js → chunk-HAR3IXDE.cjs} +31 -1
- package/dist/chunk-ISHM4QWP.cjs +16 -0
- package/dist/{chunk-VMPFHQ7U.js → chunk-J4LI33TK.cjs} +11 -9
- package/dist/chunk-KDN7RCGP.cjs +13 -0
- package/dist/{chunk-SWYON2RG.js → chunk-KZOSEIWH.cjs} +4 -1
- package/dist/chunk-L5V5PASH.cjs +12 -0
- package/dist/chunk-LXYLWTNZ.cjs +12 -0
- package/dist/{chunk-C2EDPY6J.js → chunk-PNWIJSMA.cjs} +5 -3
- package/dist/{chunk-PRQ2NHRZ.js → chunk-RDOSNDAQ.cjs} +5 -3
- package/dist/{chunk-GARVPN2H.js → chunk-SFMBRLUS.cjs} +6 -4
- package/dist/{chunk-3N7XVGLX.js → chunk-SW3SEQMJ.cjs} +51 -47
- package/dist/chunk-URLFWBSC.cjs +11 -0
- package/dist/{chunk-KNV72XRZ.js → chunk-VI7UMBQ7.cjs} +5 -3
- package/dist/{chunk-TW77BXMT.js → chunk-ZNXE6PUV.cjs} +9 -7
- package/dist/{client-types-CxjtffyG.d.ts → client-types-qvyKvyFh.d.cts} +1 -1
- package/dist/{executeRoute-BKvMVd1I.d.ts → executeRoute-BKRpODCc.d.cts} +3 -3
- package/dist/{generateApi-DqCp36fX.d.ts → generateApi-C0amiydg.d.cts} +1 -1
- package/dist/index.cjs +209 -0
- package/dist/{index.d.ts → index.d.cts} +25 -25
- package/dist/public-functions/executeRoute.cjs +21 -0
- package/dist/public-functions/{executeRoute.d.ts → executeRoute.d.cts} +4 -4
- package/dist/public-functions/getFeeInfoForChain.cjs +14 -0
- package/dist/public-functions/{getFeeInfoForChain.d.ts → getFeeInfoForChain.d.cts} +2 -2
- package/dist/public-functions/getRecommendedGasPrice.cjs +16 -0
- package/dist/public-functions/{getRecommendedGasPrice.d.ts → getRecommendedGasPrice.d.cts} +1 -1
- package/dist/public-functions/getSigningStargateClient.cjs +13 -0
- package/dist/public-functions/setApiOptions.cjs +11 -0
- package/dist/public-functions/{setApiOptions.d.ts → setApiOptions.d.cts} +2 -2
- package/dist/public-functions/setClientOptions.cjs +13 -0
- package/dist/public-functions/setClientOptions.d.cts +9 -0
- package/dist/{setClientOptions-DbanEIwL.d.ts → setClientOptions-CT6CHI9I.d.cts} +2 -2
- package/package.json +6 -6
- package/dist/api/getAssets.js +0 -2
- package/dist/api/getAssetsBetweenChains.js +0 -2
- package/dist/api/getBridges.js +0 -2
- package/dist/api/getChains.js +0 -2
- package/dist/api/getVenues.js +0 -2
- package/dist/api/postAssetsFromSource.js +0 -3
- package/dist/api/postBalances.js +0 -2
- package/dist/api/postIbcOriginAssets.js +0 -2
- package/dist/api/postMessages.js +0 -2
- package/dist/api/postMessagesDirect.js +0 -2
- package/dist/api/postRecommendAssets.js +0 -2
- package/dist/api/postRoute.js +0 -2
- package/dist/api/postSubmitTransaction.js +0 -2
- package/dist/api/postTrackTransaction.js +0 -2
- package/dist/api/postTransactionStatus.js +0 -2
- package/dist/chunk-33K6EESX.js +0 -10
- package/dist/chunk-BQTQJQ5E.js +0 -10
- package/dist/chunk-BRJDNGYH.js +0 -22
- package/dist/chunk-DW4U6YI6.js +0 -10
- package/dist/chunk-MGVXJ2U4.js +0 -11
- package/dist/chunk-MTMPHY3Y.js +0 -9
- package/dist/chunk-RDRDFJQE.js +0 -10
- package/dist/chunk-RMP3HM5N.js +0 -14
- package/dist/index.js +0 -24
- package/dist/public-functions/executeRoute.js +0 -12
- package/dist/public-functions/getFeeInfoForChain.js +0 -5
- package/dist/public-functions/getRecommendedGasPrice.js +0 -7
- package/dist/public-functions/getSigningStargateClient.js +0 -4
- package/dist/public-functions/setApiOptions.js +0 -2
- package/dist/public-functions/setClientOptions.d.ts +0 -9
- package/dist/public-functions/setClientOptions.js +0 -4
- /package/dist/{apiState-CdzxTxYd.d.ts → apiState-CdzxTxYd.d.cts} +0 -0
- /package/dist/public-functions/{getSigningStargateClient.d.ts → getSigningStargateClient.d.cts} +0 -0
- /package/dist/{swaggerTypes-O9-gvCT1.d.ts → swaggerTypes-O9-gvCT1.d.cts} +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
1
3
|
// src/types/swaggerTypes.ts
|
|
2
4
|
var AutopilotAction = /* @__PURE__ */ ((AutopilotAction2) => {
|
|
3
5
|
AutopilotAction2["LIQUID_STAKE"] = "LIQUID_STAKE";
|
|
@@ -672,4 +674,32 @@ var ApiState = class _ApiState {
|
|
|
672
674
|
}
|
|
673
675
|
};
|
|
674
676
|
|
|
675
|
-
|
|
677
|
+
exports.Api = Api;
|
|
678
|
+
exports.ApiState = ApiState;
|
|
679
|
+
exports.AutopilotAction = AutopilotAction;
|
|
680
|
+
exports.AxelarTransferState = AxelarTransferState;
|
|
681
|
+
exports.AxelarTransferType = AxelarTransferType;
|
|
682
|
+
exports.BridgeType = BridgeType;
|
|
683
|
+
exports.CCTPTransferState = CCTPTransferState;
|
|
684
|
+
exports.ChainType = ChainType;
|
|
685
|
+
exports.ContentType = ContentType;
|
|
686
|
+
exports.ContractCallWithTokenErrorType = ContractCallWithTokenErrorType;
|
|
687
|
+
exports.FeeType = FeeType;
|
|
688
|
+
exports.GoFastTransferState = GoFastTransferState;
|
|
689
|
+
exports.HttpClient = HttpClient;
|
|
690
|
+
exports.HyperlaneTransferState = HyperlaneTransferState;
|
|
691
|
+
exports.LayerZeroTransferState = LayerZeroTransferState;
|
|
692
|
+
exports.OPInitTransferState = OPInitTransferState;
|
|
693
|
+
exports.PacketErrorType = PacketErrorType;
|
|
694
|
+
exports.Reason = Reason;
|
|
695
|
+
exports.RoutePriceWarningType = RoutePriceWarningType;
|
|
696
|
+
exports.SendTokenErrorType = SendTokenErrorType;
|
|
697
|
+
exports.StargateTransferState = StargateTransferState;
|
|
698
|
+
exports.StatusErrorType = StatusErrorType;
|
|
699
|
+
exports.TransactionState = TransactionState;
|
|
700
|
+
exports.TransferState = TransferState;
|
|
701
|
+
exports.api = api;
|
|
702
|
+
exports.createRequestClient = createRequestClient;
|
|
703
|
+
exports.pollingApi = pollingApi;
|
|
704
|
+
exports.toCamel = toCamel;
|
|
705
|
+
exports.wait = wait;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkED2OY55G_cjs = require('./chunk-ED2OY55G.cjs');
|
|
4
|
+
var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
|
|
5
|
+
|
|
6
|
+
// src/api/postAssetsFromSource.ts
|
|
7
|
+
var assetsFromSource = chunkHAR3IXDE_cjs.api({
|
|
8
|
+
methodName: "getAssetsFromSource",
|
|
9
|
+
method: "post",
|
|
10
|
+
path: "/v2/fungible/assets_from_source",
|
|
11
|
+
transformResponse(response) {
|
|
12
|
+
return chunkED2OY55G_cjs.transformAssetsMap(response.destAssets);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
exports.assetsFromSource = assetsFromSource;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkKZOSEIWH_cjs = require('./chunk-KZOSEIWH.cjs');
|
|
4
|
+
var chunk7SK3IFXJ_cjs = require('./chunk-7SK3IFXJ.cjs');
|
|
5
|
+
var chunkED2OY55G_cjs = require('./chunk-ED2OY55G.cjs');
|
|
4
6
|
|
|
5
7
|
// src/private-functions/getDefaultGasTokenForChain.ts
|
|
6
8
|
var getDefaultGasTokenForChain = async (chainId) => {
|
|
7
|
-
const gasDenom = DEFAULT_GAS_DENOM_OVERRIDES[chainId];
|
|
9
|
+
const gasDenom = chunkKZOSEIWH_cjs.DEFAULT_GAS_DENOM_OVERRIDES[chainId];
|
|
8
10
|
if (gasDenom) {
|
|
9
11
|
return gasDenom;
|
|
10
12
|
}
|
|
11
|
-
const chain = chains().find((chain2) => chain2.chain_id === chainId);
|
|
13
|
+
const chain = chunk7SK3IFXJ_cjs.chains().find((chain2) => chain2.chain_id === chainId);
|
|
12
14
|
if (!chain) {
|
|
13
15
|
return void 0;
|
|
14
16
|
}
|
|
@@ -37,7 +39,7 @@ var getDefaultGasTokenForChain = async (chainId) => {
|
|
|
37
39
|
return chain.fees.fee_tokens[0]?.denom;
|
|
38
40
|
};
|
|
39
41
|
var getStakingTokensForChain = (chainId) => {
|
|
40
|
-
const chain = chains().find((chain2) => chain2.chain_id === chainId);
|
|
42
|
+
const chain = chunk7SK3IFXJ_cjs.chains().find((chain2) => chain2.chain_id === chainId);
|
|
41
43
|
if (!chain) {
|
|
42
44
|
throw new Error(
|
|
43
45
|
`getStakingTokensForChain error: failed to find chain id '${chainId}' in registry`
|
|
@@ -51,7 +53,7 @@ var getStakingTokensForChain = (chainId) => {
|
|
|
51
53
|
|
|
52
54
|
// src/public-functions/getFeeInfoForChain.ts
|
|
53
55
|
var getFeeInfoForChain = async ({ chainId, apiUrl, apiKey }) => {
|
|
54
|
-
const skipChains = await ClientState.getSkipChains({ apiUrl, apiKey });
|
|
56
|
+
const skipChains = await chunkED2OY55G_cjs.ClientState.getSkipChains({ apiUrl, apiKey });
|
|
55
57
|
const skipChain = skipChains.find((chain2) => chain2.chainId === chainId);
|
|
56
58
|
if (!skipChain) {
|
|
57
59
|
return void 0;
|
|
@@ -67,7 +69,7 @@ var getFeeInfoForChain = async ({ chainId, apiUrl, apiKey }) => {
|
|
|
67
69
|
if (skipFeeInfo && skipFeeInfo.gasPrice !== null) {
|
|
68
70
|
return skipFeeInfo;
|
|
69
71
|
}
|
|
70
|
-
const chain = chains().find((chain2) => chain2.chain_id === chainId);
|
|
72
|
+
const chain = chunk7SK3IFXJ_cjs.chains().find((chain2) => chain2.chain_id === chainId);
|
|
71
73
|
if (!chain) {
|
|
72
74
|
return void 0;
|
|
73
75
|
}
|
|
@@ -90,4 +92,4 @@ var getFeeInfoForChain = async ({ chainId, apiUrl, apiKey }) => {
|
|
|
90
92
|
};
|
|
91
93
|
};
|
|
92
94
|
|
|
93
|
-
|
|
95
|
+
exports.getFeeInfoForChain = getFeeInfoForChain;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
|
|
4
|
+
|
|
5
|
+
// src/api/postTrackTransaction.ts
|
|
6
|
+
var trackTransaction = chunkHAR3IXDE_cjs.pollingApi({
|
|
7
|
+
methodName: "trackTransactionV2",
|
|
8
|
+
path: "/v2/tx/track",
|
|
9
|
+
method: "post",
|
|
10
|
+
backoffMultiplier: 2.5
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
exports.trackTransaction = trackTransaction;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
1
3
|
// src/constants/constants.ts
|
|
2
4
|
var DEFAULT_GAS_DENOM_OVERRIDES = {
|
|
3
5
|
"noble-1": "uusdc"
|
|
4
6
|
};
|
|
5
7
|
var GAS_STATION_CHAIN_IDS = ["bbn-test-5", "bbn-1"];
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
exports.DEFAULT_GAS_DENOM_OVERRIDES = DEFAULT_GAS_DENOM_OVERRIDES;
|
|
10
|
+
exports.GAS_STATION_CHAIN_IDS = GAS_STATION_CHAIN_IDS;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
|
|
4
|
+
|
|
5
|
+
// src/api/postSubmitTransaction.ts
|
|
6
|
+
var submitTransaction = chunkHAR3IXDE_cjs.api({
|
|
7
|
+
methodName: "submitTransactionV2",
|
|
8
|
+
method: "post",
|
|
9
|
+
path: "/v2/tx/submit"
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
exports.submitTransaction = submitTransaction;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
|
|
4
|
+
|
|
5
|
+
// src/api/postMessagesDirect.ts
|
|
6
|
+
var messagesDirect = chunkHAR3IXDE_cjs.api({
|
|
7
|
+
methodName: "getMsgsDirectV2",
|
|
8
|
+
method: "post",
|
|
9
|
+
path: "/v2/fungible/msgs_direct"
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
exports.messagesDirect = messagesDirect;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
|
|
2
4
|
|
|
3
5
|
// src/api/getVenues.ts
|
|
4
|
-
var venues = api({
|
|
6
|
+
var venues = chunkHAR3IXDE_cjs.api({
|
|
5
7
|
methodName: "getVenues",
|
|
6
8
|
path: "/v2/fungible/venues",
|
|
7
9
|
transformResponse: (response) => response.venues
|
|
8
10
|
});
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
exports.venues = venues;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
|
|
2
4
|
|
|
3
5
|
// src/api/postIbcOriginAssets.ts
|
|
4
|
-
var ibcOriginAssets = api({
|
|
6
|
+
var ibcOriginAssets = chunkHAR3IXDE_cjs.api({
|
|
5
7
|
methodName: "getOriginAssets",
|
|
6
8
|
method: "post",
|
|
7
9
|
path: "/v2/fungible/ibc_origin_assets",
|
|
8
10
|
transformResponse: (response) => response.originAssets
|
|
9
11
|
});
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
exports.ibcOriginAssets = ibcOriginAssets;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
|
|
2
4
|
|
|
3
5
|
// src/api/postRoute.ts
|
|
4
6
|
var route = async (request) => {
|
|
5
7
|
const requestWithAffiliateFeeBps = {
|
|
6
8
|
...request,
|
|
7
|
-
cumulativeAffiliateFeeBps: ApiState.cumulativeAffiliateFeeBPS
|
|
9
|
+
cumulativeAffiliateFeeBps: chunkHAR3IXDE_cjs.ApiState.cumulativeAffiliateFeeBPS
|
|
8
10
|
};
|
|
9
|
-
return api({
|
|
11
|
+
return chunkHAR3IXDE_cjs.api({
|
|
10
12
|
methodName: "getRouteV2",
|
|
11
13
|
method: "post",
|
|
12
14
|
path: "/v2/fungible/route"
|
|
13
15
|
})(requestWithAffiliateFeeBps);
|
|
14
16
|
};
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
exports.route = route;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk7SK3IFXJ_cjs = require('./chunk-7SK3IFXJ.cjs');
|
|
4
|
+
var chunkED2OY55G_cjs = require('./chunk-ED2OY55G.cjs');
|
|
5
|
+
var stargate = require('@cosmjs/stargate');
|
|
6
|
+
var utils = require('@cosmjs/utils');
|
|
7
|
+
var binary = require('cosmjs-types/binary');
|
|
8
|
+
var auth = require('cosmjs-types/cosmos/auth/v1beta1/auth');
|
|
9
|
+
var coin = require('cosmjs-types/cosmos/base/v1beta1/coin');
|
|
10
|
+
var protoSigning = require('@cosmjs/proto-signing');
|
|
11
|
+
var sdkTs = require('@injectivelabs/sdk-ts');
|
|
12
|
+
var keys = require('cosmjs-types/cosmos/crypto/secp256k1/keys');
|
|
13
|
+
var amino = require('@cosmjs/amino');
|
|
12
14
|
|
|
13
15
|
var createBaseVestingAccount = () => {
|
|
14
16
|
return {
|
|
@@ -21,21 +23,21 @@ var createBaseVestingAccount = () => {
|
|
|
21
23
|
};
|
|
22
24
|
};
|
|
23
25
|
var BaseVestingAccount = {
|
|
24
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
26
|
+
encode(message, writer = binary.BinaryWriter.create()) {
|
|
25
27
|
if (message.baseAccount !== void 0) {
|
|
26
|
-
BaseAccount.encode(
|
|
28
|
+
auth.BaseAccount.encode(
|
|
27
29
|
message.baseAccount,
|
|
28
30
|
writer.uint32(10).fork()
|
|
29
31
|
).ldelim();
|
|
30
32
|
}
|
|
31
33
|
for (const v of message.originalVesting) {
|
|
32
|
-
Coin.encode(v, writer.uint32(18).fork()).ldelim();
|
|
34
|
+
coin.Coin.encode(v, writer.uint32(18).fork()).ldelim();
|
|
33
35
|
}
|
|
34
36
|
for (const v of message.delegatedFree) {
|
|
35
|
-
Coin.encode(v, writer.uint32(26).fork()).ldelim();
|
|
37
|
+
coin.Coin.encode(v, writer.uint32(26).fork()).ldelim();
|
|
36
38
|
}
|
|
37
39
|
for (const v of message.delegatedVesting) {
|
|
38
|
-
Coin.encode(v, writer.uint32(34).fork()).ldelim();
|
|
40
|
+
coin.Coin.encode(v, writer.uint32(34).fork()).ldelim();
|
|
39
41
|
}
|
|
40
42
|
if (message.endTime !== BigInt(0)) {
|
|
41
43
|
writer.uint32(40).int64(message.endTime);
|
|
@@ -43,23 +45,23 @@ var BaseVestingAccount = {
|
|
|
43
45
|
return writer;
|
|
44
46
|
},
|
|
45
47
|
decode(input, length) {
|
|
46
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
48
|
+
const reader = input instanceof binary.BinaryReader ? input : new binary.BinaryReader(input);
|
|
47
49
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
48
50
|
const message = createBaseVestingAccount();
|
|
49
51
|
while (reader.pos < end) {
|
|
50
52
|
const tag = reader.uint32();
|
|
51
53
|
switch (tag >>> 3) {
|
|
52
54
|
case 1:
|
|
53
|
-
message.baseAccount = BaseAccount.decode(reader, reader.uint32());
|
|
55
|
+
message.baseAccount = auth.BaseAccount.decode(reader, reader.uint32());
|
|
54
56
|
break;
|
|
55
57
|
case 2:
|
|
56
|
-
message.originalVesting.push(Coin.decode(reader, reader.uint32()));
|
|
58
|
+
message.originalVesting.push(coin.Coin.decode(reader, reader.uint32()));
|
|
57
59
|
break;
|
|
58
60
|
case 3:
|
|
59
|
-
message.delegatedFree.push(Coin.decode(reader, reader.uint32()));
|
|
61
|
+
message.delegatedFree.push(coin.Coin.decode(reader, reader.uint32()));
|
|
60
62
|
break;
|
|
61
63
|
case 4:
|
|
62
|
-
message.delegatedVesting.push(Coin.decode(reader, reader.uint32()));
|
|
64
|
+
message.delegatedVesting.push(coin.Coin.decode(reader, reader.uint32()));
|
|
63
65
|
break;
|
|
64
66
|
case 5:
|
|
65
67
|
message.endTime = reader.int64();
|
|
@@ -81,7 +83,7 @@ function createBasePeriod() {
|
|
|
81
83
|
};
|
|
82
84
|
}
|
|
83
85
|
var Period = {
|
|
84
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
86
|
+
encode(message, writer = binary.BinaryWriter.create()) {
|
|
85
87
|
if (message.startTime !== BigInt(0)) {
|
|
86
88
|
writer.uint32(8).int64(message.startTime);
|
|
87
89
|
}
|
|
@@ -89,7 +91,7 @@ var Period = {
|
|
|
89
91
|
writer.uint32(16).int64(message.length);
|
|
90
92
|
}
|
|
91
93
|
for (const v of message.amount) {
|
|
92
|
-
Coin.encode(v, writer.uint32(26).fork()).ldelim();
|
|
94
|
+
coin.Coin.encode(v, writer.uint32(26).fork()).ldelim();
|
|
93
95
|
}
|
|
94
96
|
if (message.actionType !== 0) {
|
|
95
97
|
writer.uint32(32).int32(message.actionType);
|
|
@@ -97,7 +99,7 @@ var Period = {
|
|
|
97
99
|
return writer;
|
|
98
100
|
},
|
|
99
101
|
decode(input, length) {
|
|
100
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
102
|
+
const reader = input instanceof binary.BinaryReader ? input : new binary.BinaryReader(input);
|
|
101
103
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
102
104
|
const message = createBasePeriod();
|
|
103
105
|
while (reader.pos < end) {
|
|
@@ -110,7 +112,7 @@ var Period = {
|
|
|
110
112
|
message.length = reader.int64();
|
|
111
113
|
break;
|
|
112
114
|
case 3:
|
|
113
|
-
message.amount.push(Coin.decode(reader, reader.uint32()));
|
|
115
|
+
message.amount.push(coin.Coin.decode(reader, reader.uint32()));
|
|
114
116
|
break;
|
|
115
117
|
case 4:
|
|
116
118
|
message.actionType = reader.int32();
|
|
@@ -132,7 +134,7 @@ function createBaseStridePeriodicVestingAccount() {
|
|
|
132
134
|
};
|
|
133
135
|
}
|
|
134
136
|
var StridePeriodicVestingAccount = {
|
|
135
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
137
|
+
encode(message, writer = binary.BinaryWriter.create()) {
|
|
136
138
|
if (message.baseVestingAccount !== void 0) {
|
|
137
139
|
BaseVestingAccount.encode(
|
|
138
140
|
message.baseVestingAccount,
|
|
@@ -145,7 +147,7 @@ var StridePeriodicVestingAccount = {
|
|
|
145
147
|
return writer;
|
|
146
148
|
},
|
|
147
149
|
decode(input, length) {
|
|
148
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
150
|
+
const reader = input instanceof binary.BinaryReader ? input : new binary.BinaryReader(input);
|
|
149
151
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
150
152
|
const message = createBaseStridePeriodicVestingAccount();
|
|
151
153
|
while (reader.pos < end) {
|
|
@@ -172,29 +174,29 @@ var accountParser = (acc) => {
|
|
|
172
174
|
switch (acc.typeUrl) {
|
|
173
175
|
case "/stride.vesting.StridePeriodicVestingAccount": {
|
|
174
176
|
const baseAccount = StridePeriodicVestingAccount.decode(acc.value).baseVestingAccount?.baseAccount;
|
|
175
|
-
assertDefinedAndNotNull(baseAccount);
|
|
177
|
+
utils.assertDefinedAndNotNull(baseAccount);
|
|
176
178
|
return {
|
|
177
179
|
address: baseAccount.address,
|
|
178
|
-
pubkey: baseAccount.pubKey ? decodePubkey(baseAccount.pubKey) : null,
|
|
180
|
+
pubkey: baseAccount.pubKey ? protoSigning.decodePubkey(baseAccount.pubKey) : null,
|
|
179
181
|
accountNumber: Number(baseAccount.accountNumber),
|
|
180
182
|
sequence: Number(baseAccount.sequence)
|
|
181
183
|
};
|
|
182
184
|
}
|
|
183
185
|
case "/injective.types.v1beta1.EthAccount":
|
|
184
|
-
return accountEthParser(
|
|
186
|
+
return sdkTs.accountEthParser(
|
|
185
187
|
acc,
|
|
186
188
|
"/injective.crypto.v1beta1.ethsecp256k1.PubKey"
|
|
187
189
|
);
|
|
188
190
|
case "/ethermint.types.v1.EthAccount":
|
|
189
|
-
return accountEthParser(acc, "/ethermint.crypto.v1.ethsecp256k1.PubKey");
|
|
191
|
+
return sdkTs.accountEthParser(acc, "/ethermint.crypto.v1.ethsecp256k1.PubKey");
|
|
190
192
|
default: {
|
|
191
193
|
if (acc.typeUrl === "/cosmos.auth.v1beta1.BaseAccount") {
|
|
192
|
-
const { address, pubKey, accountNumber, sequence } = BaseAccount.decode(
|
|
194
|
+
const { address, pubKey, accountNumber, sequence } = auth.BaseAccount.decode(
|
|
193
195
|
acc.value
|
|
194
196
|
);
|
|
195
197
|
if (pubKey?.typeUrl === "/initia.crypto.v1beta1.ethsecp256k1.PubKey") {
|
|
196
|
-
const { key } = PubKey.decode(pubKey.value);
|
|
197
|
-
const pk = encodeSecp256k1Pubkey(key);
|
|
198
|
+
const { key } = keys.PubKey.decode(pubKey.value);
|
|
199
|
+
const pk = amino.encodeSecp256k1Pubkey(key);
|
|
198
200
|
return {
|
|
199
201
|
address,
|
|
200
202
|
pubkey: pk,
|
|
@@ -203,18 +205,18 @@ var accountParser = (acc) => {
|
|
|
203
205
|
};
|
|
204
206
|
}
|
|
205
207
|
}
|
|
206
|
-
return accountFromAny(acc);
|
|
208
|
+
return stargate.accountFromAny(acc);
|
|
207
209
|
}
|
|
208
210
|
}
|
|
209
211
|
};
|
|
210
212
|
|
|
211
213
|
// src/private-functions/getRpcEndpointForChain.ts
|
|
212
214
|
var getRpcEndpointForChain = async (chainId) => {
|
|
213
|
-
if (ClientState.endpointOptions.getRpcEndpointForChain) {
|
|
214
|
-
return ClientState.endpointOptions.getRpcEndpointForChain(chainId);
|
|
215
|
+
if (chunkED2OY55G_cjs.ClientState.endpointOptions.getRpcEndpointForChain) {
|
|
216
|
+
return chunkED2OY55G_cjs.ClientState.endpointOptions.getRpcEndpointForChain(chainId);
|
|
215
217
|
}
|
|
216
|
-
if (ClientState.endpointOptions.endpoints && ClientState.endpointOptions.endpoints[chainId]) {
|
|
217
|
-
const endpointOptions = ClientState.endpointOptions.endpoints[chainId];
|
|
218
|
+
if (chunkED2OY55G_cjs.ClientState.endpointOptions.endpoints && chunkED2OY55G_cjs.ClientState.endpointOptions.endpoints[chainId]) {
|
|
219
|
+
const endpointOptions = chunkED2OY55G_cjs.ClientState.endpointOptions.endpoints[chainId];
|
|
218
220
|
if (endpointOptions?.rpc) {
|
|
219
221
|
return endpointOptions.rpc;
|
|
220
222
|
}
|
|
@@ -222,7 +224,7 @@ var getRpcEndpointForChain = async (chainId) => {
|
|
|
222
224
|
console.warn(
|
|
223
225
|
"Warning: You are using unreliable public endpoints. We strongly recommend overriding them via endpointOptions for use beyond development settings."
|
|
224
226
|
);
|
|
225
|
-
const chain = chains().find((chain2) => chain2.chain_id === chainId);
|
|
227
|
+
const chain = chunk7SK3IFXJ_cjs.chains().find((chain2) => chain2.chain_id === chainId);
|
|
226
228
|
if (!chain) {
|
|
227
229
|
throw new Error(`getRpcEndpointForChain: failed to find chain id '${chainId}' in registry`);
|
|
228
230
|
}
|
|
@@ -232,7 +234,7 @@ var getRpcEndpointForChain = async (chainId) => {
|
|
|
232
234
|
);
|
|
233
235
|
}
|
|
234
236
|
const endpoints = chain.apis?.rpc?.map((api) => api.address);
|
|
235
|
-
const endpoint = await findFirstWorkingEndpoint(endpoints, "rpc");
|
|
237
|
+
const endpoint = await chunk7SK3IFXJ_cjs.findFirstWorkingEndpoint(endpoints, "rpc");
|
|
236
238
|
if (!endpoint) {
|
|
237
239
|
throw new Error(
|
|
238
240
|
`getRpcEndpointForChain error: failed to find RPC endpoint for chain '${chainId}'`
|
|
@@ -249,21 +251,23 @@ var getSigningStargateClient = async ({
|
|
|
249
251
|
if (!getOfflineSigner) {
|
|
250
252
|
throw new Error("'getCosmosSigner' is not provided or configured in skip router");
|
|
251
253
|
}
|
|
252
|
-
if (!ClientState.signingStargateClientByChainId?.[chainId]) {
|
|
254
|
+
if (!chunkED2OY55G_cjs.ClientState.signingStargateClientByChainId?.[chainId]) {
|
|
253
255
|
const [signer, endpoint] = await Promise.all([
|
|
254
256
|
getOfflineSigner(chainId),
|
|
255
257
|
getRpcEndpointForChain(chainId)
|
|
256
258
|
]);
|
|
257
|
-
ClientState.signingStargateClientByChainId[chainId] = await SigningStargateClient.connectWithSigner(endpoint, signer, {
|
|
258
|
-
aminoTypes: ClientState.aminoTypes,
|
|
259
|
-
registry: ClientState.registry,
|
|
259
|
+
chunkED2OY55G_cjs.ClientState.signingStargateClientByChainId[chainId] = await stargate.SigningStargateClient.connectWithSigner(endpoint, signer, {
|
|
260
|
+
aminoTypes: chunkED2OY55G_cjs.ClientState.aminoTypes,
|
|
261
|
+
registry: chunkED2OY55G_cjs.ClientState.registry,
|
|
260
262
|
accountParser
|
|
261
263
|
});
|
|
262
264
|
}
|
|
263
265
|
return {
|
|
264
|
-
stargateClient: ClientState.signingStargateClientByChainId[chainId],
|
|
266
|
+
stargateClient: chunkED2OY55G_cjs.ClientState.signingStargateClientByChainId[chainId],
|
|
265
267
|
signer: await getOfflineSigner(chainId)
|
|
266
268
|
};
|
|
267
269
|
};
|
|
268
270
|
|
|
269
|
-
|
|
271
|
+
exports.accountParser = accountParser;
|
|
272
|
+
exports.getRpcEndpointForChain = getRpcEndpointForChain;
|
|
273
|
+
exports.getSigningStargateClient = getSigningStargateClient;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
|
|
4
|
+
|
|
5
|
+
// src/api/getAssetsBetweenChains.ts
|
|
6
|
+
var assetsBetweenChains = chunkHAR3IXDE_cjs.api({
|
|
7
|
+
methodName: "fungibleAssetsBetweenChainsCreate",
|
|
8
|
+
path: "/v2/fungible/assets_between_chains"
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
exports.assetsBetweenChains = assetsBetweenChains;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
|
|
2
4
|
|
|
3
5
|
// src/api/getBridges.ts
|
|
4
|
-
var bridges = api({
|
|
6
|
+
var bridges = chunkHAR3IXDE_cjs.api({
|
|
5
7
|
methodName: "getBridges",
|
|
6
8
|
path: "/v2/info/bridges",
|
|
7
9
|
transformResponse: (response) => response.bridges
|
|
8
10
|
});
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
exports.bridges = bridges;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkHAR3IXDE_cjs = require('./chunk-HAR3IXDE.cjs');
|
|
2
4
|
|
|
3
5
|
// src/public-functions/setApiOptions.ts
|
|
4
6
|
var setApiOptions = (options = {}) => {
|
|
5
|
-
ApiState.client = createRequestClient({
|
|
7
|
+
chunkHAR3IXDE_cjs.ApiState.client = chunkHAR3IXDE_cjs.createRequestClient({
|
|
6
8
|
baseUrl: options.apiUrl || "https://api.skip.build",
|
|
7
9
|
apiKey: options.apiKey
|
|
8
10
|
});
|
|
9
|
-
ApiState.setClientInitialized();
|
|
11
|
+
chunkHAR3IXDE_cjs.ApiState.setClientInitialized();
|
|
10
12
|
if (options.chainIdsToAffiliates) {
|
|
11
|
-
ApiState.cumulativeAffiliateFeeBPS = validateChainIdsToAffiliates(options.chainIdsToAffiliates);
|
|
12
|
-
ApiState.chainIdsToAffiliates = options.chainIdsToAffiliates;
|
|
13
|
+
chunkHAR3IXDE_cjs.ApiState.cumulativeAffiliateFeeBPS = validateChainIdsToAffiliates(options.chainIdsToAffiliates);
|
|
14
|
+
chunkHAR3IXDE_cjs.ApiState.chainIdsToAffiliates = options.chainIdsToAffiliates;
|
|
13
15
|
}
|
|
14
|
-
return ApiState.clientInitialized;
|
|
16
|
+
return chunkHAR3IXDE_cjs.ApiState.clientInitialized;
|
|
15
17
|
};
|
|
16
18
|
function validateChainIdsToAffiliates(chainIdsToAffiliates) {
|
|
17
19
|
const affiliatesArray = Object.values(chainIdsToAffiliates).map((chain) => chain.affiliates).filter((a) => a !== void 0);
|
|
@@ -41,4 +43,4 @@ function validateChainIdsToAffiliates(chainIdsToAffiliates) {
|
|
|
41
43
|
return firstAffiliateBasisPointsFee?.toFixed(0);
|
|
42
44
|
}
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
exports.setApiOptions = setApiOptions;
|
|
@@ -3,7 +3,7 @@ import { OfflineDirectSigner } from '@cosmjs/proto-signing';
|
|
|
3
3
|
import { StdFee, GasPrice, SignerData } from '@cosmjs/stargate';
|
|
4
4
|
import { WalletClient } from 'viem';
|
|
5
5
|
import { Adapter } from '@solana/wallet-adapter-base';
|
|
6
|
-
import { a2 as FeeAsset, K as ChainType, V as CosmosMsg } from './swaggerTypes-O9-gvCT1.
|
|
6
|
+
import { a2 as FeeAsset, K as ChainType, V as CosmosMsg } from './swaggerTypes-O9-gvCT1.cjs';
|
|
7
7
|
|
|
8
8
|
/** Common Types */
|
|
9
9
|
type UserAddress = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { aT as TransferStatus, R as Erc20Approval, ap as RouteResponse, V as CosmosMsg } from './swaggerTypes-O9-gvCT1.
|
|
2
|
-
import { A as ApiRequest } from './generateApi-
|
|
3
|
-
import { S as SignerGetters, b as GasOptions, U as UserAddress } from './client-types-
|
|
1
|
+
import { aT as TransferStatus, R as Erc20Approval, ap as RouteResponse, V as CosmosMsg } from './swaggerTypes-O9-gvCT1.cjs';
|
|
2
|
+
import { A as ApiRequest } from './generateApi-C0amiydg.cjs';
|
|
3
|
+
import { S as SignerGetters, b as GasOptions, U as UserAddress } from './client-types-qvyKvyFh.cjs';
|
|
4
4
|
|
|
5
5
|
type CallbackStatus = "success" | "error" | "pending" | "completed";
|
|
6
6
|
type TransactionCallbacks = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bc as Api } from './swaggerTypes-O9-gvCT1.
|
|
1
|
+
import { bc as Api } from './swaggerTypes-O9-gvCT1.cjs';
|
|
2
2
|
|
|
3
3
|
type CamelKey<S extends string> = S extends `${infer T}_${infer U}` ? `${T}${Capitalize<CamelKey<U>>}` : S;
|
|
4
4
|
type Camel<T> = T extends (infer U)[] ? Camel<U>[] : T extends object ? {
|