@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.
Files changed (158) hide show
  1. package/dist/cjs/api/getAssets.cjs +16 -0
  2. package/dist/cjs/api/getAssetsBetweenChains.cjs +12 -0
  3. package/dist/cjs/api/getBridges.cjs +12 -0
  4. package/dist/cjs/api/getChains.cjs +12 -0
  5. package/dist/cjs/api/getVenues.cjs +12 -0
  6. package/dist/cjs/api/postAssetsFromSource.cjs +13 -0
  7. package/dist/cjs/api/postBalances.cjs +12 -0
  8. package/dist/cjs/api/postIbcOriginAssets.cjs +12 -0
  9. package/dist/cjs/api/postMessages.cjs +12 -0
  10. package/dist/cjs/api/postMessagesDirect.cjs +12 -0
  11. package/dist/cjs/api/postRecommendAssets.cjs +12 -0
  12. package/dist/cjs/api/postRoute.cjs +12 -0
  13. package/dist/cjs/api/postSubmitTransaction.cjs +12 -0
  14. package/dist/cjs/api/postTrackTransaction.cjs +12 -0
  15. package/dist/cjs/api/postTransactionStatus.cjs +12 -0
  16. package/dist/cjs/chunk-25TA7Z7R.cjs +460 -0
  17. package/dist/cjs/chunk-2QPPD3BB.cjs +210 -0
  18. package/dist/cjs/chunk-2SA3OAIJ.cjs +18 -0
  19. package/dist/cjs/chunk-3KO2DHFX.cjs +1495 -0
  20. package/dist/cjs/chunk-477CU2G2.cjs +280 -0
  21. package/dist/cjs/chunk-4BWE7SOV.cjs +68 -0
  22. package/dist/cjs/chunk-4GHUZDDP.cjs +16 -0
  23. package/dist/cjs/chunk-4ZIVDKQN.cjs +387 -0
  24. package/dist/cjs/chunk-6T4SBY5H.cjs +214 -0
  25. package/dist/cjs/chunk-A3UNNRKD.cjs +574 -0
  26. package/dist/cjs/chunk-A5S6SIYN.cjs +12 -0
  27. package/dist/cjs/chunk-ASDMDYTC.cjs +11 -0
  28. package/dist/cjs/chunk-ATW6UNT5.cjs +136 -0
  29. package/dist/cjs/chunk-AUTOIM57.cjs +22 -0
  30. package/dist/cjs/chunk-AVWWCQ5P.cjs +2264 -0
  31. package/dist/cjs/chunk-CIZTNJ3K.cjs +24 -0
  32. package/dist/cjs/chunk-CK6CQWQU.cjs +49 -0
  33. package/dist/cjs/chunk-EAZQ2ECA.cjs +185 -0
  34. package/dist/cjs/chunk-F3EB2AQG.cjs +28 -0
  35. package/dist/cjs/chunk-FCTBCHOT.cjs +12 -0
  36. package/dist/cjs/chunk-IJIBMN2F.cjs +12 -0
  37. package/dist/cjs/chunk-IUMMXFGP.cjs +189 -0
  38. package/dist/cjs/chunk-JRXPJ45U.cjs +12 -0
  39. package/dist/cjs/chunk-LJV45UGL.cjs +582 -0
  40. package/dist/cjs/chunk-MUJBB64F.cjs +291 -0
  41. package/dist/cjs/chunk-NCFH5MGF.cjs +39 -0
  42. package/dist/cjs/chunk-NM4PISTQ.cjs +3359 -0
  43. package/dist/cjs/chunk-OJISEAMX.cjs +13 -0
  44. package/dist/cjs/chunk-OVKHTOBP.cjs +99 -0
  45. package/dist/cjs/chunk-PDNKS5R2.cjs +13 -0
  46. package/dist/cjs/chunk-TELXDMYL.cjs +55 -0
  47. package/dist/cjs/chunk-UXW4XVHF.cjs +15 -0
  48. package/dist/cjs/index.cjs +349 -0
  49. package/dist/cjs/public-functions/executeMultipleRoutes.cjs +27 -0
  50. package/dist/cjs/public-functions/executeRoute.cjs +27 -0
  51. package/dist/cjs/public-functions/getCosmosGasAmountForMessage.cjs +16 -0
  52. package/dist/cjs/public-functions/getEvmGasAmountForMessage.cjs +11 -0
  53. package/dist/cjs/public-functions/getFeeInfoForChain.cjs +14 -0
  54. package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +15 -0
  55. package/dist/cjs/public-functions/getRouteWithGasOnReceive.cjs +41 -0
  56. package/dist/cjs/public-functions/getSigningStargateClient.cjs +15 -0
  57. package/dist/cjs/public-functions/setApiOptions.cjs +12 -0
  58. package/dist/cjs/public-functions/setClientOptions.cjs +16 -0
  59. package/dist/cjs/public-functions/subscribeToRouteStatus.cjs +26 -0
  60. package/dist/cjs/public-functions/validateCosmosGasBalance.cjs +18 -0
  61. package/dist/cjs/public-functions/waitForTransaction.cjs +18 -0
  62. package/dist/esm/api/getAssets.d.ts +19 -0
  63. package/dist/esm/api/getAssets.js +3 -0
  64. package/dist/esm/api/getAssetsBetweenChains.d.ts +56 -0
  65. package/dist/esm/api/getAssetsBetweenChains.js +3 -0
  66. package/dist/esm/api/getBridges.d.ts +55 -0
  67. package/dist/esm/api/getBridges.js +3 -0
  68. package/dist/esm/api/getChains.d.ts +41 -0
  69. package/dist/esm/api/getChains.js +3 -0
  70. package/dist/esm/api/getVenues.d.ts +13 -0
  71. package/dist/esm/api/getVenues.js +3 -0
  72. package/dist/esm/api/postAssetsFromSource.d.ts +22 -0
  73. package/dist/esm/api/postAssetsFromSource.js +4 -0
  74. package/dist/esm/api/postBalances.d.ts +35 -0
  75. package/dist/esm/api/postBalances.js +3 -0
  76. package/dist/esm/api/postIbcOriginAssets.d.ts +32 -0
  77. package/dist/esm/api/postIbcOriginAssets.js +3 -0
  78. package/dist/esm/api/postMessages.d.ts +101 -0
  79. package/dist/esm/api/postMessages.js +3 -0
  80. package/dist/esm/api/postMessagesDirect.d.ts +640 -0
  81. package/dist/esm/api/postMessagesDirect.js +3 -0
  82. package/dist/esm/api/postRecommendAssets.d.ts +40 -0
  83. package/dist/esm/api/postRecommendAssets.js +3 -0
  84. package/dist/esm/api/postRoute.d.ts +530 -0
  85. package/dist/esm/api/postRoute.js +3 -0
  86. package/dist/esm/api/postSubmitTransaction.d.ts +17 -0
  87. package/dist/esm/api/postSubmitTransaction.js +3 -0
  88. package/dist/esm/api/postTrackTransaction.d.ts +12 -0
  89. package/dist/esm/api/postTrackTransaction.js +3 -0
  90. package/dist/esm/api/postTransactionStatus.d.ts +639 -0
  91. package/dist/esm/api/postTransactionStatus.js +3 -0
  92. package/dist/esm/apiState-1VvikVK-.d.ts +8 -0
  93. package/dist/esm/callbacks-DdC6QMlE.d.ts +158 -0
  94. package/dist/esm/chunk-3DIX6KRJ.js +566 -0
  95. package/dist/esm/chunk-3JHLVPRG.js +10 -0
  96. package/dist/esm/chunk-5WYMRZIO.js +97 -0
  97. package/dist/esm/chunk-A5NZMSTI.js +10 -0
  98. package/dist/esm/chunk-BU5RCZQH.js +187 -0
  99. package/dist/esm/chunk-CGJRRAFS.js +22 -0
  100. package/dist/esm/chunk-DMJMN4J3.js +379 -0
  101. package/dist/esm/chunk-E4NRDAVO.js +65 -0
  102. package/dist/esm/chunk-ETBJVFQP.js +10 -0
  103. package/dist/esm/chunk-F2LQB2DP.js +3323 -0
  104. package/dist/esm/chunk-F66EKL3W.js +203 -0
  105. package/dist/esm/chunk-G665WTT3.js +212 -0
  106. package/dist/esm/chunk-GPEO2I4P.js +272 -0
  107. package/dist/esm/chunk-GV2QOWB4.js +26 -0
  108. package/dist/esm/chunk-GZJLX2CP.js +2258 -0
  109. package/dist/esm/chunk-HNU2Y3JI.js +13 -0
  110. package/dist/esm/chunk-IZUHXTBP.js +53 -0
  111. package/dist/esm/chunk-J24LYWJE.js +130 -0
  112. package/dist/esm/chunk-KZKAL5ZN.js +16 -0
  113. package/dist/esm/chunk-N4PTRCNT.js +11 -0
  114. package/dist/esm/chunk-NUHMTWHP.js +180 -0
  115. package/dist/esm/chunk-P36PE4CR.js +37 -0
  116. package/dist/esm/chunk-QYXGDTUU.js +47 -0
  117. package/dist/esm/chunk-RH7PDDI5.js +433 -0
  118. package/dist/esm/chunk-RTDD7HZ3.js +275 -0
  119. package/dist/esm/chunk-SXBG57J3.js +20 -0
  120. package/dist/esm/chunk-TGTOO2ZQ.js +14 -0
  121. package/dist/esm/chunk-UHCKOKBM.js +9 -0
  122. package/dist/esm/chunk-ULUX2CVU.js +557 -0
  123. package/dist/esm/chunk-UN46DUOV.js +11 -0
  124. package/dist/esm/chunk-XIVAEU6S.js +1492 -0
  125. package/dist/esm/chunk-XNU3TKKM.js +10 -0
  126. package/dist/esm/client-types-D03Tellv.d.ts +114 -0
  127. package/dist/esm/generateApi-Bv02Xt5y.d.ts +56 -0
  128. package/dist/esm/index.d.ts +1859 -0
  129. package/dist/esm/index.js +32 -0
  130. package/dist/esm/public-functions/executeMultipleRoutes.d.ts +80 -0
  131. package/dist/esm/public-functions/executeMultipleRoutes.js +18 -0
  132. package/dist/esm/public-functions/executeRoute.d.ts +12 -0
  133. package/dist/esm/public-functions/executeRoute.js +18 -0
  134. package/dist/esm/public-functions/getCosmosGasAmountForMessage.d.ts +8 -0
  135. package/dist/esm/public-functions/getCosmosGasAmountForMessage.js +3 -0
  136. package/dist/esm/public-functions/getEvmGasAmountForMessage.d.ts +14 -0
  137. package/dist/esm/public-functions/getEvmGasAmountForMessage.js +2 -0
  138. package/dist/esm/public-functions/getFeeInfoForChain.d.ts +9 -0
  139. package/dist/esm/public-functions/getFeeInfoForChain.js +5 -0
  140. package/dist/esm/public-functions/getRecommendedGasPrice.d.ts +9 -0
  141. package/dist/esm/public-functions/getRecommendedGasPrice.js +6 -0
  142. package/dist/esm/public-functions/getRouteWithGasOnReceive.d.ts +20 -0
  143. package/dist/esm/public-functions/getRouteWithGasOnReceive.js +32 -0
  144. package/dist/esm/public-functions/getSigningStargateClient.d.ts +13 -0
  145. package/dist/esm/public-functions/getSigningStargateClient.js +6 -0
  146. package/dist/esm/public-functions/setApiOptions.d.ts +9 -0
  147. package/dist/esm/public-functions/setApiOptions.js +3 -0
  148. package/dist/esm/public-functions/setClientOptions.d.ts +11 -0
  149. package/dist/esm/public-functions/setClientOptions.js +7 -0
  150. package/dist/esm/public-functions/subscribeToRouteStatus.d.ts +12 -0
  151. package/dist/esm/public-functions/subscribeToRouteStatus.js +5 -0
  152. package/dist/esm/public-functions/validateCosmosGasBalance.d.ts +44 -0
  153. package/dist/esm/public-functions/validateCosmosGasBalance.js +9 -0
  154. package/dist/esm/public-functions/waitForTransaction.d.ts +1279 -0
  155. package/dist/esm/public-functions/waitForTransaction.js +5 -0
  156. package/dist/esm/setClientOptions-CTwe8YVX.d.ts +76 -0
  157. package/dist/esm/swaggerTypes-CzGbnX_b.d.ts +2067 -0
  158. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ import { api } from './chunk-F66EKL3W.js';
2
+
3
+ // src/api/postMessagesDirect.ts
4
+ var messagesDirect = api({
5
+ methodName: "msgsDirect",
6
+ method: "post",
7
+ path: "v2/fungible/msgs_direct"
8
+ });
9
+
10
+ export { messagesDirect };
@@ -0,0 +1,114 @@
1
+ import { OfflineAminoSigner } from '@cosmjs/amino';
2
+ import { OfflineDirectSigner } from '@cosmjs/proto-signing';
3
+ import { GasPrice, StdFee, SignerData } from '@cosmjs/stargate';
4
+ import { WalletClient } from 'viem';
5
+ import { Adapter } from '@solana/wallet-adapter-base';
6
+ import { e as ChainType, ah as FeeAsset, a8 as CosmosMsg } from './swaggerTypes-CzGbnX_b.js';
7
+ import { TrackTxPollingProps } from './api/postTrackTransaction.js';
8
+
9
+ /** Common Types */
10
+ type UserAddress = {
11
+ chainId: string;
12
+ address: string;
13
+ };
14
+ type EndpointOptions = {
15
+ rpc?: string;
16
+ rest?: string;
17
+ };
18
+ type ValidateGasResult = {
19
+ error: null | string;
20
+ asset: FeeAsset | null;
21
+ fee: StdFee | null;
22
+ };
23
+ /** Signer Getters */
24
+ type SignerGetters = {
25
+ getEvmSigner?: (chainId: string) => Promise<WalletClient>;
26
+ getCosmosSigner?: (chainId: string) => Promise<(OfflineAminoSigner & OfflineDirectSigner) | OfflineAminoSigner | OfflineDirectSigner>;
27
+ getSvmSigner?: () => Promise<Adapter>;
28
+ };
29
+ /** Gas Options */
30
+ type GetFallbackGasAmount = (chainId: string, chainType: ChainType) => Promise<number | undefined>;
31
+ type GetGasPrice = (chainId: string, chainType: ChainType) => Promise<GasPrice | undefined>;
32
+ type GasOptions = {
33
+ /**
34
+ * If `getGasPrice` is undefined, or returns undefined, the router will attempt to set the recommended gas price
35
+ **/
36
+ getGasPrice?: GetGasPrice;
37
+ /**
38
+ * If `getFallbackGasAmount` is set, when router fails to simulate the gas amount, it will use the fallback gas amount
39
+ */
40
+ getFallbackGasAmount?: GetFallbackGasAmount;
41
+ gasAmountMultiplier?: number;
42
+ };
43
+ type SignCosmosMessageOptionsBase = {
44
+ signerAddress: string;
45
+ chainId: string;
46
+ cosmosMsgs: CosmosMsg[];
47
+ fee: StdFee;
48
+ signerData: SignerData;
49
+ };
50
+ type SignCosmosMessageDirectOptions = SignCosmosMessageOptionsBase & {
51
+ signer: OfflineDirectSigner;
52
+ };
53
+ type SignCosmosMessageAminoOptions = SignCosmosMessageOptionsBase & {
54
+ signer: OfflineAminoSigner;
55
+ };
56
+ type TxResult = {
57
+ txHash: string;
58
+ chainId: string;
59
+ explorerLink?: string;
60
+ };
61
+ interface BaseSettings {
62
+ slippageTolerancePercent?: string;
63
+ simulate?: boolean;
64
+ /**
65
+ * Set allowance amount to max if EVM transaction requires allowance approval.
66
+ */
67
+ useUnlimitedApproval?: boolean;
68
+ /**
69
+ /**
70
+ * If `skipApproval` is set to `true`, the router will bypass checking whether
71
+ * the signer has granted approval for the specified token contract on an EVM chain.
72
+ * This can be useful if approval has already been handled externally or there are race conditions.
73
+ */
74
+ bypassApprovalCheck?: boolean;
75
+ /**
76
+ * defaults to true
77
+ * If `batchSimulate` is set to `true`, it will simulate all messages in a batch before the first tx run.
78
+ * If `batchSimulate` is set to `false`, it will simulate each message one by one.
79
+ */
80
+ batchSimulate?: boolean;
81
+ /**
82
+ * Optional configuration for transaction polling behavior.
83
+ * - `maxRetries`: Maximum number of polling attempts (default: 5)
84
+ * - `retryInterval`: Retry interval in milliseconds (default: 1000)
85
+ * - `backoffMultiplier`: Exponential backoff multiplier for increasing delay between retries (default: 2.5)
86
+ * Example backoff with retryInterval = 1000 and backoffMultiplier = 2:
87
+ * 1st retry: 1000ms → 2nd: 2000ms → 3rd: 4000ms → 4th: 8000ms ...
88
+ */
89
+ trackTxPollingOptions?: TrackTxPollingProps;
90
+ /**
91
+ * If `batchSignTxs` is set to `true`, it will sign all transactions in a batch up front.
92
+ * If `batchSignTxs` is set to `false`, it will sign each transaction one by one.
93
+ */
94
+ batchSignTxs?: boolean;
95
+ /**
96
+ * If `cosmosPriorityFeeDenom` is provided, it will be used to set the priority fee for Cosmos transactions.
97
+ * It should be a function that takes a chainId and returns the denom for the priority fee.
98
+ */
99
+ getCosmosPriorityFeeDenom?: (chainId: string) => Promise<string | undefined>;
100
+ /**
101
+ * SVM Fee Payer
102
+ *
103
+ * This is used to pay for the transaction fees on SVM chains.
104
+ * It should be an object with the following properties:
105
+ * `address`: The address of the fee payer.
106
+ * `signTransaction`: A function that takes the data to sign and returns a Promise that resolves to the signed transaction.
107
+ */
108
+ svmFeePayer?: {
109
+ address: string;
110
+ signTransaction: (dataToSign: Buffer) => Promise<Uint8Array>;
111
+ };
112
+ }
113
+
114
+ export type { BaseSettings as B, EndpointOptions as E, GetFallbackGasAmount as G, SignerGetters as S, TxResult as T, UserAddress as U, ValidateGasResult as V, GetGasPrice as a, GasOptions as b, SignCosmosMessageOptionsBase as c, SignCosmosMessageDirectOptions as d, SignCosmosMessageAminoOptions as e };
@@ -0,0 +1,56 @@
1
+ import { bK as Api } from './swaggerTypes-CzGbnX_b.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
+ type PollingProps<K extends ValidApiMethodKeys> = {
22
+ isSuccess?: (result: ApiResponse<K>) => boolean;
23
+ /**
24
+ * Maximum number of retries
25
+ * @default 5
26
+ */
27
+ maxRetries?: number;
28
+ /**
29
+ * Retry interval in milliseconds
30
+ * @default 1000
31
+ */
32
+ retryInterval?: number;
33
+ /**
34
+ * Backoff multiplier for retries
35
+ *
36
+ * example: `retryInterval` is set to 1000, backoffMultiplier is set to 2
37
+ *
38
+ * 1st retry: 1000ms
39
+ *
40
+ * 2nd retry: 2000ms
41
+ *
42
+ * 3rd retry: 4000ms
43
+ *
44
+ * 4th retry: 8000ms
45
+ *
46
+ * 5th retry: 16000ms
47
+ *
48
+ * @default 2
49
+ */
50
+ backoffMultiplier?: number;
51
+ onError?: (error: unknown, attempt: number) => void;
52
+ onSuccess?: (result: ApiResponse<K>, attempt: number) => void;
53
+ throwOnError?: boolean;
54
+ };
55
+
56
+ export type { ApiRequest as A, PollingProps as P, ApiResponse as a };