@skip-go/client 1.0.0-alpha-3 → 1.0.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/api/{getAssets.d.mts → getAssets.d.ts} +2 -2
- package/dist/api/getAssets.js +2 -0
- package/dist/api/{getAssetsBetweenChains.d.mts → getAssetsBetweenChains.d.ts} +2 -2
- package/dist/api/getAssetsBetweenChains.js +2 -0
- package/dist/api/{getBridges.d.mts → getBridges.d.ts} +2 -2
- package/dist/api/getBridges.js +2 -0
- package/dist/api/{getChains.d.mts → getChains.d.ts} +2 -2
- package/dist/api/getChains.js +2 -0
- package/dist/api/{getVenues.d.mts → getVenues.d.ts} +1 -1
- package/dist/api/getVenues.js +2 -0
- package/dist/api/{postAssetsFromSource.d.mts → postAssetsFromSource.d.ts} +2 -2
- package/dist/api/postAssetsFromSource.js +3 -0
- package/dist/api/{postBalances.d.mts → postBalances.d.ts} +3 -3
- package/dist/api/postBalances.js +2 -0
- package/dist/api/{postIbcOriginAssets.d.mts → postIbcOriginAssets.d.ts} +1 -1
- package/dist/api/postIbcOriginAssets.js +2 -0
- package/dist/api/{postMessages.d.mts → postMessages.d.ts} +3 -3
- package/dist/api/postMessages.js +2 -0
- package/dist/api/{postMessagesDirect.d.mts → postMessagesDirect.d.ts} +2 -2
- package/dist/api/postMessagesDirect.js +2 -0
- package/dist/api/{postRecommendAssets.d.mts → postRecommendAssets.d.ts} +2 -2
- package/dist/api/postRecommendAssets.js +2 -0
- package/dist/api/{postRoute.d.mts → postRoute.d.ts} +3 -3
- package/dist/api/postRoute.js +2 -0
- package/dist/api/{postSubmitTransaction.d.mts → postSubmitTransaction.d.ts} +1 -1
- package/dist/api/postSubmitTransaction.js +2 -0
- package/dist/api/{postTrackTransaction.d.mts → postTrackTransaction.d.ts} +1 -1
- package/dist/api/postTrackTransaction.js +2 -0
- package/dist/api/{postTransactionStatus.d.mts → postTransactionStatus.d.ts} +3 -3
- package/dist/api/postTransactionStatus.js +2 -0
- package/dist/{chunk-7TBBV2YY.mjs → chunk-2H4KT24S.js} +1 -1
- package/dist/{chunk-OTLFF5OB.mjs → chunk-3OZQ35X3.js} +101 -138
- package/dist/{chunk-WDMGUHWR.mjs → chunk-44YEAWRJ.js} +5 -6
- package/dist/{chunk-NU7MCJOK.mjs → chunk-66DO7NZD.js} +32 -36
- package/dist/{chunk-2F4MBSMT.mjs → chunk-6IZXDY7U.js} +14 -20
- package/dist/{chunk-PEZHVPSR.mjs → chunk-6JMGI4N7.js} +75 -83
- package/dist/{chunk-YWYU6P7W.mjs → chunk-6MCLH626.js} +2 -2
- package/dist/{chunk-CAAR7GDJ.mjs → chunk-6SEZNZJY.js} +1 -1
- package/dist/{chunk-LJVI5DLG.mjs → chunk-BQTWTYWD.js} +1 -1
- package/dist/chunk-DUCP65HQ.js +675 -0
- package/dist/{chunk-KPK3Z6QZ.mjs → chunk-EAVQIWH7.js} +1 -1
- package/dist/{chunk-QZ3X6MP3.mjs → chunk-HFWTLB35.js} +1 -1
- package/dist/{chunk-NNZFCKHP.mjs → chunk-JBPMJE44.js} +1 -1
- package/dist/{chunk-CZ27FEZ7.mjs → chunk-LJ4RFN4L.js} +1 -1
- package/dist/{chunk-C5CGY2X7.mjs → chunk-MKEROBAQ.js} +1 -1
- package/dist/{chunk-J7GGREYX.mjs → chunk-QKCJUB43.js} +1 -1
- package/dist/{chunk-2ETF4N4H.mjs → chunk-RSUFWUIE.js} +4 -5
- package/dist/chunk-T3G7MVDN.js +16 -0
- package/dist/chunk-XEDYWBEU.js +1792 -0
- package/dist/{chunk-B72MYSG5.mjs → chunk-XOC57DJF.js} +17 -21
- package/dist/{chunk-IGD32L7C.mjs → chunk-XS6XFYYD.js} +1 -1
- package/dist/chunk-Y325PIRY.js +130 -0
- package/dist/{client-types-CVch1pZ-.d.mts → client-types-CxjtffyG.d.ts} +1 -1
- package/dist/{executeRoute-CRdeEz1o.d.mts → executeRoute-BKvMVd1I.d.ts} +3 -3
- package/dist/{generateApi-3mHZ6Zbr.d.mts → generateApi-DqCp36fX.d.ts} +1 -1
- package/dist/{index.d.mts → index.d.ts} +25 -25
- package/dist/index.js +24 -0
- package/dist/public-functions/{executeRoute.d.mts → executeRoute.d.ts} +4 -4
- package/dist/public-functions/executeRoute.js +12 -0
- package/dist/public-functions/{getFeeInfoForChain.d.mts → getFeeInfoForChain.d.ts} +2 -2
- package/dist/public-functions/getFeeInfoForChain.js +5 -0
- package/dist/public-functions/{getRecommendedGasPrice.d.mts → getRecommendedGasPrice.d.ts} +1 -1
- package/dist/public-functions/getRecommendedGasPrice.js +7 -0
- package/dist/public-functions/getSigningStargateClient.js +4 -0
- package/dist/public-functions/{setApiOptions.d.mts → setApiOptions.d.ts} +2 -2
- package/dist/public-functions/setApiOptions.js +2 -0
- package/dist/public-functions/setClientOptions.d.ts +9 -0
- package/dist/public-functions/setClientOptions.js +4 -0
- package/dist/{setClientOptions-CVB_OUIn.d.mts → setClientOptions-DbanEIwL.d.ts} +2 -2
- package/package.json +45 -4
- package/dist/api/getAssets.mjs +0 -2
- package/dist/api/getAssetsBetweenChains.mjs +0 -2
- package/dist/api/getBridges.mjs +0 -2
- package/dist/api/getChains.mjs +0 -2
- package/dist/api/getVenues.mjs +0 -2
- package/dist/api/postAssetsFromSource.mjs +0 -3
- package/dist/api/postBalances.mjs +0 -2
- package/dist/api/postIbcOriginAssets.mjs +0 -2
- package/dist/api/postMessages.mjs +0 -2
- package/dist/api/postMessagesDirect.mjs +0 -2
- package/dist/api/postRecommendAssets.mjs +0 -2
- package/dist/api/postRoute.mjs +0 -2
- package/dist/api/postSubmitTransaction.mjs +0 -2
- package/dist/api/postTrackTransaction.mjs +0 -2
- package/dist/api/postTransactionStatus.mjs +0 -2
- package/dist/chunk-2FYLP573.mjs +0 -15
- package/dist/chunk-DKIWPD5I.mjs +0 -124
- package/dist/chunk-KSMJWLEH.mjs +0 -2315
- package/dist/chunk-RXWDHQLG.mjs +0 -231
- package/dist/index.mjs +0 -24
- package/dist/public-functions/executeRoute.mjs +0 -12
- package/dist/public-functions/getFeeInfoForChain.mjs +0 -5
- package/dist/public-functions/getRecommendedGasPrice.mjs +0 -7
- package/dist/public-functions/getSigningStargateClient.mjs +0 -4
- package/dist/public-functions/setApiOptions.mjs +0 -2
- package/dist/public-functions/setClientOptions.d.mts +0 -9
- package/dist/public-functions/setClientOptions.mjs +0 -4
- /package/dist/{apiState-CdzxTxYd.d.mts → apiState-CdzxTxYd.d.ts} +0 -0
- /package/dist/{chunk-ZAF3Z56R.mjs → chunk-SWYON2RG.js} +0 -0
- /package/dist/{chunk-TUBI6VE6.mjs → chunk-VQ5SIQWU.js} +0 -0
- /package/dist/public-functions/{getSigningStargateClient.d.mts → getSigningStargateClient.d.ts} +0 -0
- /package/dist/{swaggerTypes-O9-gvCT1.d.mts → swaggerTypes-O9-gvCT1.d.ts} +0 -0
package/dist/chunk-DKIWPD5I.mjs
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { api, __async, __spreadValues, __objRest } from './chunk-RXWDHQLG.mjs';
|
|
2
|
-
|
|
3
|
-
// src/private-functions/getMainnetAndTestnetChains.ts
|
|
4
|
-
var getMainnetAndTestnetChains = (apiOptions) => __async(void 0, null, function* () {
|
|
5
|
-
const [mainnetRes, testnetRes] = yield Promise.all([
|
|
6
|
-
chains(__spreadValues({
|
|
7
|
-
includeEvm: true,
|
|
8
|
-
includeSvm: true
|
|
9
|
-
}, apiOptions)),
|
|
10
|
-
chains(__spreadValues({
|
|
11
|
-
includeEvm: true,
|
|
12
|
-
includeSvm: true,
|
|
13
|
-
onlyTestnets: true
|
|
14
|
-
}, apiOptions))
|
|
15
|
-
]);
|
|
16
|
-
const combinedChains = [...mainnetRes != null ? mainnetRes : [], ...testnetRes != null ? testnetRes : []];
|
|
17
|
-
ClientState.skipChains = combinedChains;
|
|
18
|
-
return combinedChains;
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
// src/api/getAssets.ts
|
|
22
|
-
var assets = api({
|
|
23
|
-
methodName: "getAssets",
|
|
24
|
-
path: "/v2/fungible/assets",
|
|
25
|
-
transformResponse: (response) => {
|
|
26
|
-
return transformAssetsMap(response.chainToAssetsMap);
|
|
27
|
-
},
|
|
28
|
-
onSuccess: (response, options) => {
|
|
29
|
-
if ((options == null ? void 0 : options.includeEvmAssets) && (options == null ? void 0 : options.includeSvmAssets) && (options == null ? void 0 : options.includeCw20Assets)) {
|
|
30
|
-
ClientState.skipAssets = response;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
var transformAssetsMap = (input) => Object.entries(input != null ? input : {}).reduce(
|
|
35
|
-
(acc, [chainId, { assets: assets2 }]) => {
|
|
36
|
-
acc[chainId] = (assets2 != null ? assets2 : []).map((asset) => asset);
|
|
37
|
-
return acc;
|
|
38
|
-
},
|
|
39
|
-
{}
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
// src/private-functions/getMainnetAndTestnetAssets.ts
|
|
43
|
-
var getMainnetAndTestnetAssets = (_a) => __async(void 0, null, function* () {
|
|
44
|
-
var _b = _a, {
|
|
45
|
-
chainId
|
|
46
|
-
} = _b, apiOptions = __objRest(_b, [
|
|
47
|
-
"chainId"
|
|
48
|
-
]);
|
|
49
|
-
const [assetsMainnet, assetsTestnet] = yield Promise.all([
|
|
50
|
-
assets(__spreadValues({
|
|
51
|
-
chainIds: chainId ? [chainId] : void 0
|
|
52
|
-
}, apiOptions)),
|
|
53
|
-
assets(__spreadValues({
|
|
54
|
-
chainIds: chainId ? [chainId] : void 0,
|
|
55
|
-
onlyTestnets: true
|
|
56
|
-
}, apiOptions))
|
|
57
|
-
]);
|
|
58
|
-
const mainnet = assetsMainnet;
|
|
59
|
-
const testnet = assetsTestnet;
|
|
60
|
-
const merged = __spreadValues(__spreadValues({}, mainnet), testnet);
|
|
61
|
-
ClientState.skipAssets = merged;
|
|
62
|
-
return merged;
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
// src/api/postBalances.ts
|
|
66
|
-
var balances = api({
|
|
67
|
-
methodName: "getBalances",
|
|
68
|
-
method: "post",
|
|
69
|
-
path: "/v2/info/balances",
|
|
70
|
-
onSuccess: (response, options) => {
|
|
71
|
-
if (!options) {
|
|
72
|
-
ClientState.skipBalances = response;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
// src/state/clientState.ts
|
|
78
|
-
var ClientState = class {
|
|
79
|
-
static getSkipChains(apiOptions) {
|
|
80
|
-
return __async(this, null, function* () {
|
|
81
|
-
if (this.skipChains) {
|
|
82
|
-
return this.skipChains;
|
|
83
|
-
}
|
|
84
|
-
const response = yield getMainnetAndTestnetChains(apiOptions);
|
|
85
|
-
this.skipChains = response;
|
|
86
|
-
return response;
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
static getSkipAssets(props) {
|
|
90
|
-
return __async(this, null, function* () {
|
|
91
|
-
if (this.skipAssets) {
|
|
92
|
-
return this.skipAssets;
|
|
93
|
-
}
|
|
94
|
-
const response = yield getMainnetAndTestnetAssets(props);
|
|
95
|
-
this.skipAssets = response;
|
|
96
|
-
return response;
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
static getSkipBalances() {
|
|
100
|
-
return __async(this, null, function* () {
|
|
101
|
-
if (this.skipBalances) {
|
|
102
|
-
return this.skipBalances;
|
|
103
|
-
}
|
|
104
|
-
const response = yield balances();
|
|
105
|
-
this.skipBalances = response;
|
|
106
|
-
return response;
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
ClientState.signingStargateClientByChainId = {};
|
|
111
|
-
|
|
112
|
-
// src/api/getChains.ts
|
|
113
|
-
var chains = api({
|
|
114
|
-
methodName: "getChains",
|
|
115
|
-
path: "/v2/info/chains",
|
|
116
|
-
transformResponse: (response) => response.chains,
|
|
117
|
-
onSuccess: (response, options) => {
|
|
118
|
-
if ((options == null ? void 0 : options.includeEvm) && (options == null ? void 0 : options.includeSvm)) {
|
|
119
|
-
ClientState.skipChains = response;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
export { ClientState, assets, balances, chains, transformAssetsMap };
|