@skip-go/client 0.17.2 → 1.0.0-alpha-0

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.
Files changed (54) hide show
  1. package/dist/api/getAssets.d.mts +19 -0
  2. package/dist/api/getAssets.mjs +25 -0
  3. package/dist/api/getAssetsBetweenChains.d.mts +56 -0
  4. package/dist/api/getAssetsBetweenChains.mjs +9 -0
  5. package/dist/api/getBridges.d.mts +54 -0
  6. package/dist/api/getBridges.mjs +10 -0
  7. package/dist/api/getChains.d.mts +41 -0
  8. package/dist/api/getChains.mjs +16 -0
  9. package/dist/api/getVenues.d.mts +13 -0
  10. package/dist/api/getVenues.mjs +10 -0
  11. package/dist/api/postAssetsFromSource.d.mts +13 -0
  12. package/dist/api/postAssetsFromSource.mjs +14 -0
  13. package/dist/api/postBalances.d.mts +35 -0
  14. package/dist/api/postBalances.mjs +16 -0
  15. package/dist/api/postIbcOriginAssets.d.mts +32 -0
  16. package/dist/api/postIbcOriginAssets.mjs +11 -0
  17. package/dist/api/postMessages.d.mts +528 -0
  18. package/dist/api/postMessages.mjs +10 -0
  19. package/dist/api/postMessagesDirect.d.mts +568 -0
  20. package/dist/api/postMessagesDirect.mjs +10 -0
  21. package/dist/api/postRecommendAssets.d.mts +40 -0
  22. package/dist/api/postRecommendAssets.mjs +13 -0
  23. package/dist/api/postRoute.d.mts +460 -0
  24. package/dist/api/postRoute.mjs +16 -0
  25. package/dist/api/postSubmitTransaction.d.mts +13 -0
  26. package/dist/api/postSubmitTransaction.mjs +10 -0
  27. package/dist/api/postTrackTransaction.d.mts +13 -0
  28. package/dist/api/postTrackTransaction.mjs +11 -0
  29. package/dist/api/postTransactionStatus.d.mts +559 -0
  30. package/dist/api/postTransactionStatus.mjs +10 -0
  31. package/dist/apiState-CdzxTxYd.d.mts +6 -0
  32. package/dist/chunk-AXBFBHS2.mjs +41 -0
  33. package/dist/client-types-CVch1pZ-.d.mts +60 -0
  34. package/dist/executeRoute-CRdeEz1o.d.mts +69 -0
  35. package/dist/generateApi-3mHZ6Zbr.d.mts +22 -0
  36. package/dist/index.d.mts +35 -0
  37. package/dist/index.mjs +24 -0
  38. package/dist/public-functions/executeRoute.d.mts +9 -0
  39. package/dist/public-functions/executeRoute.mjs +100 -0
  40. package/dist/public-functions/getFeeInfoForChain.d.mts +9 -0
  41. package/dist/public-functions/getFeeInfoForChain.mjs +47 -0
  42. package/dist/public-functions/getRecommendedGasPrice.d.mts +9 -0
  43. package/dist/public-functions/getRecommendedGasPrice.mjs +1366 -0
  44. package/dist/public-functions/getSigningStargateClient.d.mts +13 -0
  45. package/dist/public-functions/getSigningStargateClient.mjs +32 -0
  46. package/dist/public-functions/setApiOptions.d.mts +9 -0
  47. package/dist/public-functions/setApiOptions.mjs +46 -0
  48. package/dist/public-functions/setClientOptions.d.mts +9 -0
  49. package/dist/public-functions/setClientOptions.mjs +34 -0
  50. package/dist/setClientOptions-CVB_OUIn.d.mts +19 -0
  51. package/dist/swaggerTypes-O9-gvCT1.d.mts +1890 -0
  52. package/package.json +10 -4
  53. package/dist/index.d.ts +0 -2336
  54. package/dist/index.js +0 -264
@@ -0,0 +1,19 @@
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
+ import { c as Asset } from '../swaggerTypes-O9-gvCT1.mjs';
3
+
4
+ declare const assets: (options?: ({
5
+ chainIds?: string[] | undefined;
6
+ nativeOnly?: boolean | undefined;
7
+ includeNoMetadataAssets?: boolean | undefined;
8
+ includeCw20Assets?: boolean | undefined;
9
+ includeEvmAssets?: boolean | undefined;
10
+ includeSvmAssets?: boolean | undefined;
11
+ onlyTestnets?: boolean | undefined;
12
+ } & SkipApiOptions & {
13
+ abortDuplicateRequests?: boolean | undefined;
14
+ }) | undefined) => Promise<Record<string, Asset[]> | undefined>;
15
+ declare const transformAssetsMap: (input?: Record<string, {
16
+ assets?: Asset[];
17
+ }>) => Record<string, Asset[]>;
18
+
19
+ export { assets, transformAssetsMap };
@@ -0,0 +1,25 @@
1
+ import '../chunk-AXBFBHS2.mjs';
2
+ import { ClientState } from '../state/clientState.mjs';
3
+ import { api } from '../utils/generateApi.mjs';
4
+
5
+ var assets = api({
6
+ methodName: "getAssets",
7
+ path: "/v2/fungible/assets",
8
+ transformResponse: (response) => {
9
+ return transformAssetsMap(response.chainToAssetsMap);
10
+ },
11
+ onSuccess: (response, options) => {
12
+ if ((options == null ? void 0 : options.includeEvmAssets) && (options == null ? void 0 : options.includeSvmAssets) && (options == null ? void 0 : options.includeCw20Assets)) {
13
+ ClientState.skipAssets = response;
14
+ }
15
+ }
16
+ });
17
+ var transformAssetsMap = (input) => Object.entries(input != null ? input : {}).reduce(
18
+ (acc, [chainId, { assets: assets2 }]) => {
19
+ acc[chainId] = (assets2 != null ? assets2 : []).map((asset) => asset);
20
+ return acc;
21
+ },
22
+ {}
23
+ );
24
+
25
+ export { assets, transformAssetsMap };
@@ -0,0 +1,56 @@
1
+ import { I as BridgeType } from '../swaggerTypes-O9-gvCT1.mjs';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
3
+
4
+ declare const assetsBetweenChains: (options?: ({
5
+ sourceChainId?: string | undefined;
6
+ destChainId?: string | undefined;
7
+ includeNoMetadataAssets?: boolean | undefined;
8
+ includeCw20Assets?: boolean | undefined;
9
+ includeEvmAssets?: boolean | undefined;
10
+ allowMultiTx?: boolean | undefined;
11
+ } & SkipApiOptions & {
12
+ abortDuplicateRequests?: boolean | undefined;
13
+ }) | undefined) => Promise<{
14
+ assetsBetweenChains?: {
15
+ assetOnSource?: {
16
+ chainId: string;
17
+ coingeckoId?: string | undefined;
18
+ decimals?: number | undefined;
19
+ denom: string;
20
+ description?: string | undefined;
21
+ isCw20: boolean;
22
+ isEvm: boolean;
23
+ isSvm: boolean;
24
+ logoUri?: string | undefined;
25
+ name?: string | undefined;
26
+ originChainId: string;
27
+ originDenom: string;
28
+ recommendedSymbol?: string | undefined;
29
+ symbol?: string | undefined;
30
+ tokenContract?: string | undefined;
31
+ trace: string;
32
+ } | undefined;
33
+ assetOnDest?: {
34
+ chainId: string;
35
+ coingeckoId?: string | undefined;
36
+ decimals?: number | undefined;
37
+ denom: string;
38
+ description?: string | undefined;
39
+ isCw20: boolean;
40
+ isEvm: boolean;
41
+ isSvm: boolean;
42
+ logoUri?: string | undefined;
43
+ name?: string | undefined;
44
+ originChainId: string;
45
+ originDenom: string;
46
+ recommendedSymbol?: string | undefined;
47
+ symbol?: string | undefined;
48
+ tokenContract?: string | undefined;
49
+ trace: string;
50
+ } | undefined;
51
+ txsRequired: number;
52
+ bridges?: BridgeType[] | undefined;
53
+ }[] | undefined;
54
+ } | undefined>;
55
+
56
+ export { assetsBetweenChains };
@@ -0,0 +1,9 @@
1
+ import '../chunk-AXBFBHS2.mjs';
2
+ import { api } from '../utils/generateApi.mjs';
3
+
4
+ var assetsBetweenChains = api({
5
+ methodName: "fungibleAssetsBetweenChainsCreate",
6
+ path: "/v2/fungible/assets_between_chains"
7
+ });
8
+
9
+ export { assetsBetweenChains };
@@ -0,0 +1,54 @@
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
+ import { ba as ContentType, I as BridgeType } from '../swaggerTypes-O9-gvCT1.mjs';
3
+
4
+ declare const bridges: (options?: ({
5
+ cache?: RequestCache | undefined;
6
+ credentials?: RequestCredentials | undefined;
7
+ headers?: string[][] | {
8
+ [x: string]: string;
9
+ } | {
10
+ append: {};
11
+ delete: {};
12
+ get: {};
13
+ getSetCookie: {};
14
+ has: {};
15
+ set: {};
16
+ forEach: {};
17
+ entries: {};
18
+ keys: {};
19
+ values: {};
20
+ } | undefined;
21
+ integrity?: string | undefined;
22
+ keepalive?: boolean | undefined;
23
+ mode?: RequestMode | undefined;
24
+ redirect?: RequestRedirect | undefined;
25
+ referrer?: string | undefined;
26
+ referrerPolicy?: ReferrerPolicy | undefined;
27
+ signal?: {
28
+ readonly aborted: boolean;
29
+ onabort: {} | null;
30
+ readonly reason: any;
31
+ throwIfAborted: {};
32
+ addEventListener: {};
33
+ removeEventListener: {};
34
+ dispatchEvent: {};
35
+ } | null | undefined;
36
+ window?: null | undefined;
37
+ secure?: boolean | undefined;
38
+ type?: ContentType | undefined;
39
+ format?: "arrayBuffer" | "blob" | "formData" | "json" | "text" | undefined;
40
+ baseUrl?: string | undefined;
41
+ cancelToken?: string | number | {
42
+ toString: {};
43
+ valueOf: {};
44
+ readonly description: string | undefined;
45
+ } | undefined;
46
+ } & SkipApiOptions & {
47
+ abortDuplicateRequests?: boolean | undefined;
48
+ }) | undefined) => Promise<{
49
+ id?: BridgeType | undefined;
50
+ name?: string | undefined;
51
+ logoUri?: string | undefined;
52
+ }[] | undefined>;
53
+
54
+ export { bridges };
@@ -0,0 +1,10 @@
1
+ import '../chunk-AXBFBHS2.mjs';
2
+ import { api } from '../utils/generateApi.mjs';
3
+
4
+ var bridges = api({
5
+ methodName: "getBridges",
6
+ path: "/v2/info/bridges",
7
+ transformResponse: (response) => response.bridges
8
+ });
9
+
10
+ export { bridges };
@@ -0,0 +1,41 @@
1
+ import { K as ChainType } from '../swaggerTypes-O9-gvCT1.mjs';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
3
+
4
+ declare const chains: (options?: ({
5
+ chainIds?: string[] | undefined;
6
+ includeEvm?: boolean | undefined;
7
+ includeSvm?: boolean | undefined;
8
+ onlyTestnets?: boolean | undefined;
9
+ } & SkipApiOptions & {
10
+ abortDuplicateRequests?: boolean | undefined;
11
+ }) | undefined) => Promise<{
12
+ chainName: string;
13
+ chainId: string;
14
+ pfmEnabled: boolean;
15
+ cosmosModuleSupport: {
16
+ authz?: boolean | undefined;
17
+ feegrant?: boolean | undefined;
18
+ };
19
+ supportsMemo: boolean;
20
+ logoUri?: string | undefined;
21
+ bech32Prefix: string;
22
+ feeAssets: {
23
+ denom: string;
24
+ gasPrice?: {
25
+ average?: string | undefined;
26
+ high?: string | undefined;
27
+ low?: string | undefined;
28
+ } | undefined;
29
+ }[];
30
+ chainType: ChainType;
31
+ ibcCapabilities: {
32
+ cosmosPfm?: boolean | undefined;
33
+ cosmosIbcHooks?: boolean | undefined;
34
+ cosmosMemo?: boolean | undefined;
35
+ cosmosAutopilot?: boolean | undefined;
36
+ };
37
+ isTestnet: boolean;
38
+ prettyName: string;
39
+ }[] | undefined>;
40
+
41
+ export { chains };
@@ -0,0 +1,16 @@
1
+ import '../chunk-AXBFBHS2.mjs';
2
+ import { ClientState } from '../state/clientState.mjs';
3
+ import { api } from '../utils/generateApi.mjs';
4
+
5
+ var chains = api({
6
+ methodName: "getChains",
7
+ path: "/v2/info/chains",
8
+ transformResponse: (response) => response.chains,
9
+ onSuccess: (response, options) => {
10
+ if ((options == null ? void 0 : options.includeEvm) && (options == null ? void 0 : options.includeSvm)) {
11
+ ClientState.skipChains = response;
12
+ }
13
+ }
14
+ });
15
+
16
+ export { chains };
@@ -0,0 +1,13 @@
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
+
3
+ declare const venues: (options?: ({
4
+ onlyTestnets?: boolean | undefined;
5
+ } & SkipApiOptions & {
6
+ abortDuplicateRequests?: boolean | undefined;
7
+ }) | undefined) => Promise<{
8
+ chainId?: string | undefined;
9
+ name?: string | undefined;
10
+ logoUri?: string | undefined;
11
+ }[] | undefined>;
12
+
13
+ export { venues };
@@ -0,0 +1,10 @@
1
+ import '../chunk-AXBFBHS2.mjs';
2
+ import { api } from '../utils/generateApi.mjs';
3
+
4
+ var venues = api({
5
+ methodName: "getVenues",
6
+ path: "/v2/fungible/venues",
7
+ transformResponse: (response) => response.venues
8
+ });
9
+
10
+ export { venues };
@@ -0,0 +1,13 @@
1
+ import { c as Asset } from '../swaggerTypes-O9-gvCT1.mjs';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
3
+
4
+ declare const assetsFromSource: (options?: ({
5
+ sourceAssetDenom: string;
6
+ sourceAssetChainId: string;
7
+ allowMultiTx?: boolean | undefined;
8
+ includeCw20Assets?: boolean | undefined;
9
+ } & SkipApiOptions & {
10
+ abortDuplicateRequests?: boolean | undefined;
11
+ }) | undefined) => Promise<Record<string, Asset[]> | undefined>;
12
+
13
+ export { assetsFromSource };
@@ -0,0 +1,14 @@
1
+ import '../chunk-AXBFBHS2.mjs';
2
+ import { api } from '../utils/generateApi.mjs';
3
+ import { transformAssetsMap } from './getAssets.mjs';
4
+
5
+ var assetsFromSource = api({
6
+ methodName: "getAssetsFromSource",
7
+ method: "post",
8
+ path: "/v2/fungible/assets_from_source",
9
+ transformResponse(response) {
10
+ return transformAssetsMap(response.destAssets);
11
+ }
12
+ });
13
+
14
+ export { assetsFromSource };
@@ -0,0 +1,35 @@
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
+ import { A as ApiRequest, a as ApiResponse } from '../generateApi-3mHZ6Zbr.mjs';
3
+ import '../swaggerTypes-O9-gvCT1.mjs';
4
+
5
+ declare const balances: (options?: ({
6
+ chains?: {
7
+ [x: string]: {
8
+ address?: string | undefined;
9
+ denoms?: string[] | undefined;
10
+ };
11
+ } | undefined;
12
+ } & SkipApiOptions & {
13
+ abortDuplicateRequests?: boolean | undefined;
14
+ }) | undefined) => Promise<{
15
+ chains?: {
16
+ [x: string]: {
17
+ denoms?: {
18
+ [x: string]: {
19
+ amount: string;
20
+ decimals?: number | undefined;
21
+ formattedAmount: string;
22
+ price?: string | undefined;
23
+ valueUsd?: string | undefined;
24
+ error?: {
25
+ message?: string | undefined;
26
+ } | undefined;
27
+ };
28
+ } | undefined;
29
+ };
30
+ } | undefined;
31
+ } | undefined>;
32
+ type BalanceRequest = ApiRequest<"getBalances">;
33
+ type BalanceResponse = ApiResponse<"getBalances">;
34
+
35
+ export { type BalanceRequest, type BalanceResponse, balances };
@@ -0,0 +1,16 @@
1
+ import '../chunk-AXBFBHS2.mjs';
2
+ import { ClientState } from '../state/clientState.mjs';
3
+ import { api } from '../utils/generateApi.mjs';
4
+
5
+ var balances = api({
6
+ methodName: "getBalances",
7
+ method: "post",
8
+ path: "/v2/info/balances",
9
+ onSuccess: (response, options) => {
10
+ if (!options) {
11
+ ClientState.skipBalances = response;
12
+ }
13
+ }
14
+ });
15
+
16
+ export { balances };
@@ -0,0 +1,32 @@
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.mjs';
2
+
3
+ declare const ibcOriginAssets: (options?: ({
4
+ assets?: {
5
+ denom?: string | undefined;
6
+ chainId?: string | undefined;
7
+ }[] | undefined;
8
+ } & SkipApiOptions & {
9
+ abortDuplicateRequests?: boolean | undefined;
10
+ }) | undefined) => Promise<{
11
+ asset?: {
12
+ chainId: string;
13
+ coingeckoId?: string | undefined;
14
+ decimals?: number | undefined;
15
+ denom: string;
16
+ description?: string | undefined;
17
+ isCw20: boolean;
18
+ isEvm: boolean;
19
+ isSvm: boolean;
20
+ logoUri?: string | undefined;
21
+ name?: string | undefined;
22
+ originChainId: string;
23
+ originDenom: string;
24
+ recommendedSymbol?: string | undefined;
25
+ symbol?: string | undefined;
26
+ tokenContract?: string | undefined;
27
+ trace: string;
28
+ } | undefined;
29
+ assetFound?: boolean | undefined;
30
+ }[] | undefined>;
31
+
32
+ export { ibcOriginAssets };
@@ -0,0 +1,11 @@
1
+ import '../chunk-AXBFBHS2.mjs';
2
+ import { api } from '../utils/generateApi.mjs';
3
+
4
+ var ibcOriginAssets = api({
5
+ methodName: "getOriginAssets",
6
+ method: "post",
7
+ path: "/v2/fungible/ibc_origin_assets",
8
+ transformResponse: (response) => response.originAssets
9
+ });
10
+
11
+ export { ibcOriginAssets };