@skip-go/client 1.0.1-alpha-1 → 1.0.2

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 (32) hide show
  1. package/dist/api/getAssets.d.ts +19 -0
  2. package/dist/api/getAssetsBetweenChains.d.ts +56 -0
  3. package/dist/api/getBridges.d.ts +54 -0
  4. package/dist/api/getChains.d.ts +41 -0
  5. package/dist/api/getVenues.d.ts +13 -0
  6. package/dist/api/postAssetsFromSource.d.ts +13 -0
  7. package/dist/api/postBalances.d.ts +35 -0
  8. package/dist/api/postIbcOriginAssets.d.ts +32 -0
  9. package/dist/api/postMessages.d.ts +528 -0
  10. package/dist/api/postMessagesDirect.d.ts +568 -0
  11. package/dist/api/postRecommendAssets.d.ts +40 -0
  12. package/dist/api/postRoute.d.ts +460 -0
  13. package/dist/api/postSubmitTransaction.d.ts +13 -0
  14. package/dist/api/postTrackTransaction.d.ts +13 -0
  15. package/dist/api/postTransactionStatus.d.ts +559 -0
  16. package/dist/apiState-CdzxTxYd.d.ts +6 -0
  17. package/dist/{chunk-Y5EY3Q6D.js → chunk-735L35R6.js} +1 -1
  18. package/dist/client-types-CxjtffyG.d.ts +60 -0
  19. package/dist/executeRoute-BKvMVd1I.d.ts +69 -0
  20. package/dist/generateApi-DqCp36fX.d.ts +22 -0
  21. package/dist/index.d.ts +35 -0
  22. package/dist/index.js +1 -1
  23. package/dist/public-functions/executeRoute.d.ts +9 -0
  24. package/dist/public-functions/executeRoute.js +1 -1
  25. package/dist/public-functions/getFeeInfoForChain.d.ts +9 -0
  26. package/dist/public-functions/getRecommendedGasPrice.d.ts +9 -0
  27. package/dist/public-functions/getSigningStargateClient.d.ts +13 -0
  28. package/dist/public-functions/setApiOptions.d.ts +9 -0
  29. package/dist/public-functions/setClientOptions.d.ts +9 -0
  30. package/dist/setClientOptions-DbanEIwL.d.ts +19 -0
  31. package/dist/swaggerTypes-O9-gvCT1.d.ts +1890 -0
  32. package/package.json +4 -4
@@ -0,0 +1,69 @@
1
+ import { aT as TransferStatus, R as Erc20Approval, ap as RouteResponse, V as CosmosMsg } from './swaggerTypes-O9-gvCT1.js';
2
+ import { A as ApiRequest } from './generateApi-DqCp36fX.js';
3
+ import { S as SignerGetters, b as GasOptions, U as UserAddress } from './client-types-CxjtffyG.js';
4
+
5
+ type CallbackStatus = "success" | "error" | "pending" | "completed";
6
+ type TransactionCallbacks = {
7
+ onTransactionSigned?: (txInfo: {
8
+ chainId: string;
9
+ }) => Promise<void>;
10
+ onTransactionBroadcast?: (txInfo: {
11
+ txHash: string;
12
+ chainId: string;
13
+ }) => Promise<void>;
14
+ onTransactionTracked?: (txInfo: {
15
+ txHash: string;
16
+ chainId: string;
17
+ explorerLink: string;
18
+ }) => Promise<void>;
19
+ onTransactionCompleted?: (txInfo: {
20
+ chainId: string;
21
+ txHash: string;
22
+ status?: TransferStatus;
23
+ }) => Promise<void>;
24
+ onValidateGasBalance?: (value: {
25
+ chainId?: string;
26
+ txIndex?: number;
27
+ status: CallbackStatus;
28
+ }) => Promise<void>;
29
+ onApproveAllowance?: (value: {
30
+ allowance?: Erc20Approval;
31
+ status: CallbackStatus;
32
+ }) => Promise<void>;
33
+ };
34
+
35
+ /** Execute Route Options */
36
+ type ExecuteRouteOptions = SignerGetters & GasOptions & TransactionCallbacks & Pick<ApiRequest<"getMsgsV2">, "timeoutSeconds"> & {
37
+ route: RouteResponse;
38
+ /**
39
+ * Addresses should be in the same order with the `chainIDs` in the `route`
40
+ */
41
+ userAddresses: UserAddress[];
42
+ simulate?: boolean;
43
+ slippageTolerancePercent?: string;
44
+ /**
45
+ * Arbitrary Tx to be executed before or after route msgs
46
+ */
47
+ beforeMsg?: CosmosMsg;
48
+ afterMsg?: CosmosMsg;
49
+ /**
50
+ * Set allowance amount to max if EVM transaction requires allowance approval.
51
+ */
52
+ useUnlimitedApproval?: boolean;
53
+ /**
54
+ /**
55
+ * If `skipApproval` is set to `true`, the router will bypass checking whether
56
+ * the signer has granted approval for the specified token contract on an EVM chain.
57
+ * This can be useful if approval has already been handled externally or there are race conditions.
58
+ */
59
+ bypassApprovalCheck?: boolean;
60
+ /**
61
+ * defaults to true
62
+ * If `batchSimulate` is set to `true`, it will simulate all messages in a batch before the first tx run.
63
+ * If `batchSimulate` is set to `false`, it will simulate each message one by one.
64
+ */
65
+ batchSimulate?: boolean;
66
+ };
67
+ declare const executeRoute: (options: ExecuteRouteOptions) => Promise<void>;
68
+
69
+ export { type ExecuteRouteOptions as E, type TransactionCallbacks as T, executeRoute as e };
@@ -0,0 +1,22 @@
1
+ import { bc as Api } from './swaggerTypes-O9-gvCT1.js';
2
+
3
+ type CamelKey<S extends string> = S extends `${infer T}_${infer U}` ? `${T}${Capitalize<CamelKey<U>>}` : S;
4
+ type Camel<T> = T extends (infer U)[] ? Camel<U>[] : T extends object ? {
5
+ [K in keyof T as K extends string ? CamelKey<K> : never]: Camel<T[K]>;
6
+ } : T;
7
+
8
+ type ApiInstance = InstanceType<typeof Api>;
9
+ type FunctionKeys<T> = {
10
+ [K in keyof T]: T[K] extends (...args: any[]) => any ? K : never;
11
+ }[keyof T];
12
+ type ValidApiMethodKeys = {
13
+ [K in FunctionKeys<ApiInstance>]: Awaited<ReturnType<ApiInstance[K]>> extends {
14
+ data: unknown;
15
+ } ? K : never;
16
+ }[FunctionKeys<ApiInstance>];
17
+ type ApiRequest<K extends ValidApiMethodKeys> = NonNullable<Camel<Parameters<ApiInstance[K]>[0]>>;
18
+ type ApiResponse<K extends ValidApiMethodKeys> = Camel<Awaited<ReturnType<ApiInstance[K]>> extends {
19
+ data: infer D;
20
+ } ? D extends object ? D : never : never>;
21
+
22
+ export type { ApiRequest as A, ApiResponse as a };
@@ -0,0 +1,35 @@
1
+ export { A as AcknowledgementErrorDetails, a as Affiliate, bc as Api, b8 as ApiConfig, b as ApiError, c as Asset, d as AssetBetweenChains, e as AssetRecommendation, f as AutopilotAction, g as AutopilotMsg, h as AutopilotMsgWrapper, i as AxelarTransfer, j as AxelarTransferInfo, k as AxelarTransferState, l as AxelarTransferType, m as AxelarTransferWrapper, B as BalanceRequestChainEntry, D as BalanceResponseChainEntry, z as BalanceResponseDenomEntry, E as BankSend, F as BankSendWrapper, H as Bridge, I as BridgeType, C as CCTPTransfer, n as CCTPTransferInfo, p as CCTPTransferState, o as CCTPTransferTxs, q as CCTPTransferWrapper, J as Chain, L as ChainAffiliates, al as ChainTransaction, K as ChainType, ba as ContentType, M as ContractCallWithTokenError, N as ContractCallWithTokenErrorType, O as ContractCallWithTokenTxs, P as CosmWasmContractMsg, Q as CosmWasmContractMsgWrapper, b0 as CosmosModuleSupport, V as CosmosMsg, W as CosmosTx, X as CosmosTxWrapper, R as Erc20Approval, U as Error, T as ErrorDetail, aV as EurekaTransfer, aW as EurekaTransferInfo, aX as EurekaTransferWrapper, Y as EvmSwap, Z as EvmSwapWrapper, _ as EvmTx, $ as EvmTxWrapper, b3 as Fee, a2 as FeeAsset, b2 as FeeType, b6 as FullRequestParams, a4 as GRPCStatusCode, a3 as GoFastFee, G as GoFastTransfer, y as GoFastTransferInfo, w as GoFastTransferState, x as GoFastTransferTxs, bb as HttpClient, b9 as HttpResponse, a5 as HyperlaneTransfer, a6 as HyperlaneTransferInfo, a7 as HyperlaneTransferState, a8 as HyperlaneTransferTransactions, a9 as HyperlaneTransferWrapper, aa as IBCTransferInfo, b1 as IbcCapabilities, aY as LayerZeroTransfer, aZ as LayerZeroTransferInfo, aO as LayerZeroTransferState, ah as LayerZeroTransferTransactions, a_ as LayerZeroTransferWrapper, ab as Msg, ad as MultiChainMsg, ae as MultiChainMsgWrapper, aJ as OPInitTransfer, aL as OPInitTransferInfo, aN as OPInitTransferState, aM as OPInitTransferTxs, aK as OPInitTransferWrapper, af as Operation, ag as OptionalAsset, ai as Packet, aj as PacketError, ak as PacketErrorType, am as PostHandler, b4 as QueryParamsType, an as Reason, a$ as RecommendationRequest, b7 as RequestParams, b5 as ResponseFormat, ao as RoutePriceWarningType, ap as RouteResponse, aq as SendTokenError, ar as SendTokenErrorType, as as SendTokenTxs, S as SmartRelayFeeQuote, aC as SmartSwapExactCoinIn, aE as SmartSwapInWrapper, aD as SmartSwapOptions, r as StargateTransfer, u as StargateTransferInfo, s as StargateTransferState, t as StargateTransferTxs, v as StargateTransferWrapper, at as StatusError, au as StatusErrorType, a0 as SvmTx, a1 as SvmTxWrapper, av as Swap, aw as SwapExactCoinIn, ax as SwapExactCoinOut, ay as SwapInWrapper, az as SwapOperation, aA as SwapOutWrapper, aB as SwapRoute, aF as SwapVenue, aG as SwapWrapper, aH as TransactionExecutionErrorDetails, aI as TransactionState, aP as Transfer, aS as TransferAssetRelease, aQ as TransferEvent, aR as TransferState, aT as TransferStatus, aU as TransferWrapper, ac as Tx } from './swaggerTypes-O9-gvCT1.js';
2
+ export { E as ExecuteRouteOptions, T as TransactionCallbacks, e as executeRoute } from './executeRoute-BKvMVd1I.js';
3
+ export { E as EndpointOptions, b as GasOptions, G as GetFallbackGasAmount, a as GetGasPrice, e as SignCosmosMessageAminoOptions, d as SignCosmosMessageDirectOptions, c as SignCosmosMessageOptionsBase, S as SignerGetters, T as TxResult, U as UserAddress, V as ValidateGasResult } from './client-types-CxjtffyG.js';
4
+ export { assets } from './api/getAssets.js';
5
+ export { assetsBetweenChains } from './api/getAssetsBetweenChains.js';
6
+ export { bridges } from './api/getBridges.js';
7
+ export { chains } from './api/getChains.js';
8
+ export { venues } from './api/getVenues.js';
9
+ export { ibcOriginAssets } from './api/postIbcOriginAssets.js';
10
+ export { MessagesRequest, MessagesResponse, messages } from './api/postMessages.js';
11
+ export { messagesDirect } from './api/postMessagesDirect.js';
12
+ export { recommendAssets } from './api/postRecommendAssets.js';
13
+ export { assetsFromSource } from './api/postAssetsFromSource.js';
14
+ export { BalanceRequest, BalanceResponse, balances } from './api/postBalances.js';
15
+ export { RouteRequest, route } from './api/postRoute.js';
16
+ export { submitTransaction } from './api/postSubmitTransaction.js';
17
+ export { trackTransaction } from './api/postTrackTransaction.js';
18
+ export { TxStatusResponse, transactionStatus } from './api/postTransactionStatus.js';
19
+ export { getSigningStargateClient, getSigningStargateClientProps } from './public-functions/getSigningStargateClient.js';
20
+ export { S as SkipClientOptions, s as setClientOptions } from './setClientOptions-DbanEIwL.js';
21
+ export { getRecommendedGasPrice } from './public-functions/getRecommendedGasPrice.js';
22
+ export { getFeeInfoForChain } from './public-functions/getFeeInfoForChain.js';
23
+ export { SetApiOptionsProps, setApiOptions } from './public-functions/setApiOptions.js';
24
+ import './generateApi-DqCp36fX.js';
25
+ import '@cosmjs/amino';
26
+ import '@cosmjs/proto-signing';
27
+ import '@cosmjs/stargate';
28
+ import 'viem';
29
+ import '@solana/wallet-adapter-base';
30
+ import './apiState-CdzxTxYd.js';
31
+ import '@cosmjs/proto-signing/build/signer';
32
+
33
+ declare const GAS_STATION_CHAIN_IDS: string[];
34
+
35
+ export { GAS_STATION_CHAIN_IDS };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { executeRoute } from './chunk-Y5EY3Q6D.js';
1
+ export { executeRoute } from './chunk-735L35R6.js';
2
2
  export { getRecommendedGasPrice } from './chunk-BRJDNGYH.js';
3
3
  import './chunk-VQ5SIQWU.js';
4
4
  export { getFeeInfoForChain } from './chunk-VMPFHQ7U.js';
@@ -0,0 +1,9 @@
1
+ export { E as ExecuteRouteOptions, e as executeRoute } from '../executeRoute-BKvMVd1I.js';
2
+ import '../swaggerTypes-O9-gvCT1.js';
3
+ import '../generateApi-DqCp36fX.js';
4
+ import '../client-types-CxjtffyG.js';
5
+ import '@cosmjs/amino';
6
+ import '@cosmjs/proto-signing';
7
+ import '@cosmjs/stargate';
8
+ import 'viem';
9
+ import '@solana/wallet-adapter-base';
@@ -1,4 +1,4 @@
1
- export { executeRoute } from '../chunk-Y5EY3Q6D.js';
1
+ export { executeRoute } from '../chunk-735L35R6.js';
2
2
  import '../chunk-VQ5SIQWU.js';
3
3
  import '../chunk-SWYON2RG.js';
4
4
  import '../chunk-3N7XVGLX.js';
@@ -0,0 +1,9 @@
1
+ import { a2 as FeeAsset } from '../swaggerTypes-O9-gvCT1.js';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
3
+
4
+ type GetFeeInfoForChainProps = {
5
+ chainId: string;
6
+ } & SkipApiOptions;
7
+ declare const getFeeInfoForChain: ({ chainId, apiUrl, apiKey }: GetFeeInfoForChainProps) => Promise<FeeAsset | undefined>;
8
+
9
+ export { type GetFeeInfoForChainProps, getFeeInfoForChain };
@@ -0,0 +1,9 @@
1
+ import { GasPrice } from '@cosmjs/stargate';
2
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
3
+
4
+ type getRecommendedGasPriceProps = {
5
+ chainId: string;
6
+ } & SkipApiOptions;
7
+ declare const getRecommendedGasPrice: (props: getRecommendedGasPriceProps) => Promise<GasPrice | undefined>;
8
+
9
+ export { getRecommendedGasPrice, type getRecommendedGasPriceProps };
@@ -0,0 +1,13 @@
1
+ import { OfflineSigner } from '@cosmjs/proto-signing/build/signer';
2
+ import { SigningStargateClient } from '@cosmjs/stargate';
3
+
4
+ type getSigningStargateClientProps = {
5
+ chainId: string;
6
+ getOfflineSigner?: (chainId: string) => Promise<OfflineSigner>;
7
+ };
8
+ declare const getSigningStargateClient: ({ chainId, getOfflineSigner, }: getSigningStargateClientProps) => Promise<{
9
+ stargateClient: SigningStargateClient;
10
+ signer: OfflineSigner;
11
+ }>;
12
+
13
+ export { getSigningStargateClient, type getSigningStargateClientProps };
@@ -0,0 +1,9 @@
1
+ import { S as SkipApiOptions } from '../apiState-CdzxTxYd.js';
2
+ import { L as ChainAffiliates } from '../swaggerTypes-O9-gvCT1.js';
3
+
4
+ type SetApiOptionsProps = {
5
+ chainIdsToAffiliates?: Record<string, ChainAffiliates>;
6
+ } & SkipApiOptions;
7
+ declare const setApiOptions: (options?: SetApiOptionsProps) => Promise<void>;
8
+
9
+ export { type SetApiOptionsProps, setApiOptions };
@@ -0,0 +1,9 @@
1
+ export { s as setClientOptions } from '../setClientOptions-DbanEIwL.js';
2
+ import '@cosmjs/proto-signing';
3
+ import '@cosmjs/stargate';
4
+ import '../apiState-CdzxTxYd.js';
5
+ import '../client-types-CxjtffyG.js';
6
+ import '@cosmjs/amino';
7
+ import 'viem';
8
+ import '@solana/wallet-adapter-base';
9
+ import '../swaggerTypes-O9-gvCT1.js';
@@ -0,0 +1,19 @@
1
+ import { GeneratedType } from '@cosmjs/proto-signing';
2
+ import { AminoConverters } from '@cosmjs/stargate';
3
+ import { S as SkipApiOptions } from './apiState-CdzxTxYd.js';
4
+ import { E as EndpointOptions } from './client-types-CxjtffyG.js';
5
+
6
+ type SkipClientOptions = SkipApiOptions & {
7
+ endpointOptions?: {
8
+ endpoints?: Record<string, EndpointOptions>;
9
+ getRpcEndpointForChain?: (chainId: string) => Promise<string>;
10
+ getRestEndpointForChain?: (chainId: string) => Promise<string>;
11
+ };
12
+ aminoTypes?: AminoConverters;
13
+ registryTypes?: Iterable<[string, GeneratedType]>;
14
+ cacheDurationMs?: number;
15
+ };
16
+
17
+ declare const setClientOptions: (options?: SkipClientOptions) => void;
18
+
19
+ export { type SkipClientOptions as S, setClientOptions as s };