@skip-go/client 1.6.0-alpha.3 → 1.6.0-alpha.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/dist/cjs/api/getAssets.cjs +16 -0
- package/dist/cjs/api/getAssetsBetweenChains.cjs +12 -0
- package/dist/cjs/api/getBridges.cjs +12 -0
- package/dist/cjs/api/getChains.cjs +12 -0
- package/dist/cjs/api/getVenues.cjs +12 -0
- package/dist/cjs/api/postAssetsFromSource.cjs +13 -0
- package/dist/cjs/api/postBalances.cjs +12 -0
- package/dist/cjs/api/postIbcOriginAssets.cjs +12 -0
- package/dist/cjs/api/postMessages.cjs +12 -0
- package/dist/cjs/api/postMessagesDirect.cjs +12 -0
- package/dist/cjs/api/postRecommendAssets.cjs +12 -0
- package/dist/cjs/api/postRoute.cjs +12 -0
- package/dist/cjs/api/postSubmitTransaction.cjs +12 -0
- package/dist/cjs/api/postTrackTransaction.cjs +12 -0
- package/dist/cjs/api/postTransactionStatus.cjs +12 -0
- package/dist/cjs/chunk-25TA7Z7R.cjs +460 -0
- package/dist/cjs/chunk-2QPPD3BB.cjs +210 -0
- package/dist/cjs/chunk-2SA3OAIJ.cjs +18 -0
- package/dist/cjs/chunk-3KO2DHFX.cjs +1495 -0
- package/dist/cjs/chunk-477CU2G2.cjs +280 -0
- package/dist/cjs/chunk-4BWE7SOV.cjs +68 -0
- package/dist/cjs/chunk-4GHUZDDP.cjs +16 -0
- package/dist/cjs/chunk-4ZIVDKQN.cjs +387 -0
- package/dist/cjs/chunk-6T4SBY5H.cjs +214 -0
- package/dist/cjs/chunk-A3UNNRKD.cjs +574 -0
- package/dist/cjs/chunk-A5S6SIYN.cjs +12 -0
- package/dist/cjs/chunk-ASDMDYTC.cjs +11 -0
- package/dist/cjs/chunk-ATW6UNT5.cjs +136 -0
- package/dist/cjs/chunk-AUTOIM57.cjs +22 -0
- package/dist/cjs/chunk-AVWWCQ5P.cjs +2264 -0
- package/dist/cjs/chunk-CIZTNJ3K.cjs +24 -0
- package/dist/cjs/chunk-CK6CQWQU.cjs +49 -0
- package/dist/cjs/chunk-EAZQ2ECA.cjs +185 -0
- package/dist/cjs/chunk-F3EB2AQG.cjs +28 -0
- package/dist/cjs/chunk-FCTBCHOT.cjs +12 -0
- package/dist/cjs/chunk-IJIBMN2F.cjs +12 -0
- package/dist/cjs/chunk-IUMMXFGP.cjs +189 -0
- package/dist/cjs/chunk-JRXPJ45U.cjs +12 -0
- package/dist/cjs/chunk-LJV45UGL.cjs +582 -0
- package/dist/cjs/chunk-MUJBB64F.cjs +291 -0
- package/dist/cjs/chunk-NCFH5MGF.cjs +39 -0
- package/dist/cjs/chunk-NM4PISTQ.cjs +3359 -0
- package/dist/cjs/chunk-OJISEAMX.cjs +13 -0
- package/dist/cjs/chunk-OVKHTOBP.cjs +99 -0
- package/dist/cjs/chunk-PDNKS5R2.cjs +13 -0
- package/dist/cjs/chunk-TELXDMYL.cjs +55 -0
- package/dist/cjs/chunk-UXW4XVHF.cjs +15 -0
- package/dist/cjs/index.cjs +349 -0
- package/dist/cjs/public-functions/executeMultipleRoutes.cjs +27 -0
- package/dist/cjs/public-functions/executeRoute.cjs +27 -0
- package/dist/cjs/public-functions/getCosmosGasAmountForMessage.cjs +16 -0
- package/dist/cjs/public-functions/getEvmGasAmountForMessage.cjs +11 -0
- package/dist/cjs/public-functions/getFeeInfoForChain.cjs +14 -0
- package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +15 -0
- package/dist/cjs/public-functions/getRouteWithGasOnReceive.cjs +41 -0
- package/dist/cjs/public-functions/getSigningStargateClient.cjs +15 -0
- package/dist/cjs/public-functions/setApiOptions.cjs +12 -0
- package/dist/cjs/public-functions/setClientOptions.cjs +16 -0
- package/dist/cjs/public-functions/subscribeToRouteStatus.cjs +26 -0
- package/dist/cjs/public-functions/validateCosmosGasBalance.cjs +18 -0
- package/dist/cjs/public-functions/waitForTransaction.cjs +18 -0
- package/dist/esm/api/getAssets.d.ts +19 -0
- package/dist/esm/api/getAssets.js +3 -0
- package/dist/esm/api/getAssetsBetweenChains.d.ts +56 -0
- package/dist/esm/api/getAssetsBetweenChains.js +3 -0
- package/dist/esm/api/getBridges.d.ts +55 -0
- package/dist/esm/api/getBridges.js +3 -0
- package/dist/esm/api/getChains.d.ts +41 -0
- package/dist/esm/api/getChains.js +3 -0
- package/dist/esm/api/getVenues.d.ts +13 -0
- package/dist/esm/api/getVenues.js +3 -0
- package/dist/esm/api/postAssetsFromSource.d.ts +22 -0
- package/dist/esm/api/postAssetsFromSource.js +4 -0
- package/dist/esm/api/postBalances.d.ts +35 -0
- package/dist/esm/api/postBalances.js +3 -0
- package/dist/esm/api/postIbcOriginAssets.d.ts +32 -0
- package/dist/esm/api/postIbcOriginAssets.js +3 -0
- package/dist/esm/api/postMessages.d.ts +101 -0
- package/dist/esm/api/postMessages.js +3 -0
- package/dist/esm/api/postMessagesDirect.d.ts +640 -0
- package/dist/esm/api/postMessagesDirect.js +3 -0
- package/dist/esm/api/postRecommendAssets.d.ts +40 -0
- package/dist/esm/api/postRecommendAssets.js +3 -0
- package/dist/esm/api/postRoute.d.ts +530 -0
- package/dist/esm/api/postRoute.js +3 -0
- package/dist/esm/api/postSubmitTransaction.d.ts +17 -0
- package/dist/esm/api/postSubmitTransaction.js +3 -0
- package/dist/esm/api/postTrackTransaction.d.ts +12 -0
- package/dist/esm/api/postTrackTransaction.js +3 -0
- package/dist/esm/api/postTransactionStatus.d.ts +639 -0
- package/dist/esm/api/postTransactionStatus.js +3 -0
- package/dist/esm/apiState-1VvikVK-.d.ts +8 -0
- package/dist/esm/callbacks-DdC6QMlE.d.ts +158 -0
- package/dist/esm/chunk-3DIX6KRJ.js +566 -0
- package/dist/esm/chunk-3JHLVPRG.js +10 -0
- package/dist/esm/chunk-5WYMRZIO.js +97 -0
- package/dist/esm/chunk-A5NZMSTI.js +10 -0
- package/dist/esm/chunk-BU5RCZQH.js +187 -0
- package/dist/esm/chunk-CGJRRAFS.js +22 -0
- package/dist/esm/chunk-DMJMN4J3.js +379 -0
- package/dist/esm/chunk-E4NRDAVO.js +65 -0
- package/dist/esm/chunk-ETBJVFQP.js +10 -0
- package/dist/esm/chunk-F2LQB2DP.js +3323 -0
- package/dist/esm/chunk-F66EKL3W.js +203 -0
- package/dist/esm/chunk-G665WTT3.js +212 -0
- package/dist/esm/chunk-GPEO2I4P.js +272 -0
- package/dist/esm/chunk-GV2QOWB4.js +26 -0
- package/dist/esm/chunk-GZJLX2CP.js +2258 -0
- package/dist/esm/chunk-HNU2Y3JI.js +13 -0
- package/dist/esm/chunk-IZUHXTBP.js +53 -0
- package/dist/esm/chunk-J24LYWJE.js +130 -0
- package/dist/esm/chunk-KZKAL5ZN.js +16 -0
- package/dist/esm/chunk-N4PTRCNT.js +11 -0
- package/dist/esm/chunk-NUHMTWHP.js +180 -0
- package/dist/esm/chunk-P36PE4CR.js +37 -0
- package/dist/esm/chunk-QYXGDTUU.js +47 -0
- package/dist/esm/chunk-RH7PDDI5.js +433 -0
- package/dist/esm/chunk-RTDD7HZ3.js +275 -0
- package/dist/esm/chunk-SXBG57J3.js +20 -0
- package/dist/esm/chunk-TGTOO2ZQ.js +14 -0
- package/dist/esm/chunk-UHCKOKBM.js +9 -0
- package/dist/esm/chunk-ULUX2CVU.js +557 -0
- package/dist/esm/chunk-UN46DUOV.js +11 -0
- package/dist/esm/chunk-XIVAEU6S.js +1492 -0
- package/dist/esm/chunk-XNU3TKKM.js +10 -0
- package/dist/esm/client-types-D03Tellv.d.ts +114 -0
- package/dist/esm/generateApi-Bv02Xt5y.d.ts +56 -0
- package/dist/esm/index.d.ts +1859 -0
- package/dist/esm/index.js +32 -0
- package/dist/esm/public-functions/executeMultipleRoutes.d.ts +80 -0
- package/dist/esm/public-functions/executeMultipleRoutes.js +18 -0
- package/dist/esm/public-functions/executeRoute.d.ts +12 -0
- package/dist/esm/public-functions/executeRoute.js +18 -0
- package/dist/esm/public-functions/getCosmosGasAmountForMessage.d.ts +8 -0
- package/dist/esm/public-functions/getCosmosGasAmountForMessage.js +3 -0
- package/dist/esm/public-functions/getEvmGasAmountForMessage.d.ts +14 -0
- package/dist/esm/public-functions/getEvmGasAmountForMessage.js +2 -0
- package/dist/esm/public-functions/getFeeInfoForChain.d.ts +9 -0
- package/dist/esm/public-functions/getFeeInfoForChain.js +5 -0
- package/dist/esm/public-functions/getRecommendedGasPrice.d.ts +9 -0
- package/dist/esm/public-functions/getRecommendedGasPrice.js +6 -0
- package/dist/esm/public-functions/getRouteWithGasOnReceive.d.ts +20 -0
- package/dist/esm/public-functions/getRouteWithGasOnReceive.js +32 -0
- package/dist/esm/public-functions/getSigningStargateClient.d.ts +13 -0
- package/dist/esm/public-functions/getSigningStargateClient.js +6 -0
- package/dist/esm/public-functions/setApiOptions.d.ts +9 -0
- package/dist/esm/public-functions/setApiOptions.js +3 -0
- package/dist/esm/public-functions/setClientOptions.d.ts +11 -0
- package/dist/esm/public-functions/setClientOptions.js +7 -0
- package/dist/esm/public-functions/subscribeToRouteStatus.d.ts +12 -0
- package/dist/esm/public-functions/subscribeToRouteStatus.js +5 -0
- package/dist/esm/public-functions/validateCosmosGasBalance.d.ts +44 -0
- package/dist/esm/public-functions/validateCosmosGasBalance.js +9 -0
- package/dist/esm/public-functions/waitForTransaction.d.ts +1279 -0
- package/dist/esm/public-functions/waitForTransaction.js +5 -0
- package/dist/esm/setClientOptions-CTwe8YVX.d.ts +76 -0
- package/dist/esm/swaggerTypes-CzGbnX_b.d.ts +2067 -0
- package/package.json +1 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
4
|
+
|
|
5
|
+
// src/private-functions/getMainnetAndTestnetChains.ts
|
|
6
|
+
var getMainnetAndTestnetChains = async (apiOptions) => {
|
|
7
|
+
const [mainnetRes, testnetRes] = await Promise.all([
|
|
8
|
+
chains({
|
|
9
|
+
includeEvm: true,
|
|
10
|
+
includeSvm: true,
|
|
11
|
+
...apiOptions
|
|
12
|
+
}),
|
|
13
|
+
chains({
|
|
14
|
+
includeEvm: true,
|
|
15
|
+
includeSvm: true,
|
|
16
|
+
onlyTestnets: true,
|
|
17
|
+
...apiOptions
|
|
18
|
+
})
|
|
19
|
+
]);
|
|
20
|
+
const combinedChains = [...mainnetRes ?? [], ...testnetRes ?? []];
|
|
21
|
+
ClientState.skipChains = combinedChains;
|
|
22
|
+
return combinedChains;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// src/api/getAssets.ts
|
|
26
|
+
var assets = chunk2QPPD3BB_cjs.api({
|
|
27
|
+
methodName: "assets",
|
|
28
|
+
path: "v2/fungible/assets",
|
|
29
|
+
transformResponse: (response) => {
|
|
30
|
+
return transformAssetsMap(response.chainToAssetsMap);
|
|
31
|
+
},
|
|
32
|
+
onSuccess: (response, options) => {
|
|
33
|
+
if (options?.includeEvmAssets && options?.includeSvmAssets && options?.includeCw20Assets) {
|
|
34
|
+
ClientState.skipAssets = response;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
var transformAssetsMap = (input) => Object.entries(input ?? {}).reduce(
|
|
39
|
+
(acc, [chainId, { assets: assets2 }]) => {
|
|
40
|
+
acc[chainId] = (assets2 ?? []).map((asset) => asset);
|
|
41
|
+
return acc;
|
|
42
|
+
},
|
|
43
|
+
{}
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
// src/private-functions/getMainnetAndTestnetAssets.ts
|
|
47
|
+
var getMainnetAndTestnetAssets = async ({
|
|
48
|
+
chainId,
|
|
49
|
+
...apiOptions
|
|
50
|
+
}) => {
|
|
51
|
+
const [assetsMainnet, assetsTestnet] = await Promise.all([
|
|
52
|
+
assets({
|
|
53
|
+
chainIds: chainId ? [chainId] : void 0,
|
|
54
|
+
...apiOptions
|
|
55
|
+
}),
|
|
56
|
+
assets({
|
|
57
|
+
chainIds: chainId ? [chainId] : void 0,
|
|
58
|
+
onlyTestnets: true,
|
|
59
|
+
...apiOptions
|
|
60
|
+
})
|
|
61
|
+
]);
|
|
62
|
+
const mainnet = assetsMainnet;
|
|
63
|
+
const testnet = assetsTestnet;
|
|
64
|
+
const merged = {
|
|
65
|
+
...mainnet,
|
|
66
|
+
...testnet
|
|
67
|
+
};
|
|
68
|
+
ClientState.skipAssets = merged;
|
|
69
|
+
return merged;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// src/api/postBalances.ts
|
|
73
|
+
var balances = chunk2QPPD3BB_cjs.api({
|
|
74
|
+
methodName: "balances",
|
|
75
|
+
method: "post",
|
|
76
|
+
path: "v2/info/balances",
|
|
77
|
+
onSuccess: (response, options) => {
|
|
78
|
+
if (!options) {
|
|
79
|
+
ClientState.skipBalances = response;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// src/state/clientState.ts
|
|
85
|
+
var ClientState = class {
|
|
86
|
+
static aminoTypes;
|
|
87
|
+
static registry;
|
|
88
|
+
static endpointOptions;
|
|
89
|
+
static skipChains;
|
|
90
|
+
static skipAssets;
|
|
91
|
+
static skipBalances;
|
|
92
|
+
static async getSkipChains(apiOptions) {
|
|
93
|
+
if (this.skipChains) {
|
|
94
|
+
return this.skipChains;
|
|
95
|
+
}
|
|
96
|
+
const response = await getMainnetAndTestnetChains(apiOptions);
|
|
97
|
+
this.skipChains = response;
|
|
98
|
+
return response;
|
|
99
|
+
}
|
|
100
|
+
static async getSkipAssets(props) {
|
|
101
|
+
if (props.chainId && this.skipAssets?.[props.chainId] || !props.chainId && this.skipAssets) {
|
|
102
|
+
return this.skipAssets;
|
|
103
|
+
}
|
|
104
|
+
const response = await getMainnetAndTestnetAssets(props);
|
|
105
|
+
this.skipAssets = response;
|
|
106
|
+
return response;
|
|
107
|
+
}
|
|
108
|
+
static async getSkipBalances() {
|
|
109
|
+
if (this.skipBalances) {
|
|
110
|
+
return this.skipBalances;
|
|
111
|
+
}
|
|
112
|
+
const response = await balances();
|
|
113
|
+
this.skipBalances = response;
|
|
114
|
+
return response;
|
|
115
|
+
}
|
|
116
|
+
static signingStargateClientByChainId = {};
|
|
117
|
+
static validateGasResults;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// src/api/getChains.ts
|
|
121
|
+
var chains = chunk2QPPD3BB_cjs.api({
|
|
122
|
+
methodName: "chains",
|
|
123
|
+
path: "v2/info/chains",
|
|
124
|
+
transformResponse: (response) => response.chains,
|
|
125
|
+
onSuccess: (response, options) => {
|
|
126
|
+
if (options?.includeEvm && options?.includeSvm) {
|
|
127
|
+
ClientState.skipChains = response;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
exports.ClientState = ClientState;
|
|
133
|
+
exports.assets = assets;
|
|
134
|
+
exports.balances = balances;
|
|
135
|
+
exports.chains = chains;
|
|
136
|
+
exports.transformAssetsMap = transformAssetsMap;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk2QPPD3BB_cjs = require('./chunk-2QPPD3BB.cjs');
|
|
4
|
+
|
|
5
|
+
// src/api/postTrackTransaction.ts
|
|
6
|
+
var trackTransaction = ({
|
|
7
|
+
maxRetries,
|
|
8
|
+
retryInterval,
|
|
9
|
+
backoffMultiplier = 2.5,
|
|
10
|
+
...trackTxRequest
|
|
11
|
+
}) => {
|
|
12
|
+
return chunk2QPPD3BB_cjs.pollingApi({
|
|
13
|
+
methodName: "track",
|
|
14
|
+
path: "v2/tx/track",
|
|
15
|
+
method: "post",
|
|
16
|
+
maxRetries,
|
|
17
|
+
retryInterval,
|
|
18
|
+
backoffMultiplier
|
|
19
|
+
})(trackTxRequest);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.trackTransaction = trackTransaction;
|