@skip-go/client 1.0.6 → 1.1.1

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 (64) hide show
  1. package/dist/api/getAssets.d.ts +1 -1
  2. package/dist/api/getAssets.js +2 -2
  3. package/dist/api/getAssetsBetweenChains.d.ts +1 -1
  4. package/dist/api/getAssetsBetweenChains.js +2 -2
  5. package/dist/api/getBridges.d.ts +1 -1
  6. package/dist/api/getBridges.js +2 -2
  7. package/dist/api/getChains.d.ts +1 -1
  8. package/dist/api/getChains.js +2 -2
  9. package/dist/api/getVenues.js +2 -2
  10. package/dist/api/postAssetsFromSource.d.ts +1 -1
  11. package/dist/api/postAssetsFromSource.js +3 -3
  12. package/dist/api/postBalances.d.ts +4 -4
  13. package/dist/api/postBalances.js +2 -2
  14. package/dist/api/postIbcOriginAssets.js +2 -2
  15. package/dist/api/postMessages.d.ts +44 -6
  16. package/dist/api/postMessages.js +2 -2
  17. package/dist/api/postMessagesDirect.d.ts +42 -4
  18. package/dist/api/postMessagesDirect.js +2 -2
  19. package/dist/api/postRecommendAssets.d.ts +1 -1
  20. package/dist/api/postRecommendAssets.js +2 -2
  21. package/dist/api/postRoute.d.ts +44 -6
  22. package/dist/api/postRoute.js +2 -2
  23. package/dist/api/postSubmitTransaction.js +2 -2
  24. package/dist/api/postTrackTransaction.js +2 -2
  25. package/dist/api/postTransactionStatus.d.ts +68 -4
  26. package/dist/api/postTransactionStatus.js +2 -2
  27. package/dist/{chunk-33K6EESX.js → chunk-2NYWLY5S.js} +2 -2
  28. package/dist/{chunk-RMP3HM5N.js → chunk-5EU3SRDQ.js} +3 -3
  29. package/dist/{chunk-DW4U6YI6.js → chunk-7FSLD7Y4.js} +2 -2
  30. package/dist/{chunk-RDRDFJQE.js → chunk-7P6AOFMX.js} +2 -2
  31. package/dist/{chunk-MGVXJ2U4.js → chunk-BCN2WD5Q.js} +2 -2
  32. package/dist/{chunk-BRMONS6A.js → chunk-EAUM5JYS.js} +4 -4
  33. package/dist/{chunk-PHTQQIAH.js → chunk-GTJ2EDUG.js} +2 -3
  34. package/dist/{chunk-BQTQJQ5E.js → chunk-H6RXHDUX.js} +2 -2
  35. package/dist/{chunk-TW77BXMT.js → chunk-KWVMUF5R.js} +1 -1
  36. package/dist/{chunk-F75DC5RW.js → chunk-MTXTFZRN.js} +7 -7
  37. package/dist/{chunk-UNF72WYO.js → chunk-PWSY2PQJ.js} +1 -1
  38. package/dist/{chunk-4JJWOILI.js → chunk-PZM2IB6H.js} +2 -2
  39. package/dist/{chunk-GARVPN2H.js → chunk-R2N4D2PY.js} +2 -2
  40. package/dist/{chunk-MTMPHY3Y.js → chunk-R3KHKN33.js} +1 -1
  41. package/dist/{chunk-C2EDPY6J.js → chunk-RL5AVCSG.js} +2 -2
  42. package/dist/{chunk-W6TBGBV3.js → chunk-SOGMQT4H.js} +68 -28
  43. package/dist/{chunk-VMPFHQ7U.js → chunk-T2TOUPEA.js} +1 -1
  44. package/dist/{chunk-SONZJVQM.js → chunk-UPL6CT4S.js} +1 -1
  45. package/dist/{chunk-KNV72XRZ.js → chunk-VRPPVMXO.js} +2 -2
  46. package/dist/{chunk-PRQ2NHRZ.js → chunk-WWDCZAB5.js} +2 -2
  47. package/dist/{client-types-CxjtffyG.d.ts → client-types-BvdIj_Nf.d.ts} +1 -1
  48. package/dist/{executeRoute-BKvMVd1I.d.ts → executeRoute-CxEpxhJ4.d.ts} +4 -4
  49. package/dist/{generateApi-DqCp36fX.d.ts → generateApi-BXIkShKU.d.ts} +1 -1
  50. package/dist/index.d.ts +1555 -6
  51. package/dist/index.js +159 -20
  52. package/dist/public-functions/executeRoute.d.ts +4 -4
  53. package/dist/public-functions/executeRoute.js +8 -8
  54. package/dist/public-functions/getFeeInfoForChain.d.ts +1 -1
  55. package/dist/public-functions/getFeeInfoForChain.js +3 -3
  56. package/dist/public-functions/getRecommendedGasPrice.js +4 -4
  57. package/dist/public-functions/getSigningStargateClient.js +3 -3
  58. package/dist/public-functions/setApiOptions.d.ts +1 -1
  59. package/dist/public-functions/setApiOptions.js +2 -2
  60. package/dist/public-functions/setClientOptions.d.ts +3 -3
  61. package/dist/public-functions/setClientOptions.js +3 -3
  62. package/dist/{setClientOptions-DbanEIwL.d.ts → setClientOptions-BkD-BMo7.d.ts} +1 -1
  63. package/dist/{swaggerTypes-O9-gvCT1.d.ts → swaggerTypes-A72fxJ5y.d.ts} +232 -164
  64. package/package.json +1 -2
@@ -1,8 +1,8 @@
1
- import { api } from './chunk-W6TBGBV3.js';
1
+ import { api } from './chunk-SOGMQT4H.js';
2
2
 
3
3
  // src/api/getVenues.ts
4
4
  var venues = api({
5
- methodName: "getVenues",
5
+ methodName: "venues",
6
6
  path: "/v2/fungible/venues",
7
7
  transformResponse: (response) => response.venues
8
8
  });
@@ -275,10 +275,11 @@ var Api = class extends HttpClient {
275
275
  * @description Get all supported chains along with additional data useful for building applications + frontends that interface with them (e.g. logo URI, IBC capabilities, fee assets, bech32 prefix, etc...)
276
276
  *
277
277
  * @tags Info
278
- * @name GetChains
278
+ * @name Chains
279
279
  * @request GET:/v2/info/chains
280
+ * @response `200` `ChainsResponse` Returns a list of supported chains with additional data
280
281
  */
281
- getChains = (query, params = {}) => this.request({
282
+ chains = (query, params = {}) => this.request({
282
283
  path: `/v2/info/chains`,
283
284
  method: "GET",
284
285
  query,
@@ -289,10 +290,11 @@ var Api = class extends HttpClient {
289
290
  * @description Get the balances of a given set of assets on a given chain and wallet address. Compatible with all Skip Go-supported assets, excluding CW20 assets, across SVM, EVM, and Cosmos chains.
290
291
  *
291
292
  * @tags Info
292
- * @name GetBalances
293
+ * @name Balances
293
294
  * @request POST:/v2/info/balances
295
+ * @response `200` `BalancesResponse` The balances of the assets
294
296
  */
295
- getBalances = (data, params = {}) => this.request({
297
+ balances = (data, params = {}) => this.request({
296
298
  path: `/v2/info/balances`,
297
299
  method: "POST",
298
300
  body: data,
@@ -304,10 +306,11 @@ var Api = class extends HttpClient {
304
306
  * @description Get all supported bridges
305
307
  *
306
308
  * @tags Info
307
- * @name GetBridges
309
+ * @name Bridges
308
310
  * @request GET:/v2/info/bridges
311
+ * @response `200` `BridgesResponse` A list of supported bridges
309
312
  */
310
- getBridges = (params = {}) => this.request({
313
+ bridges = (params = {}) => this.request({
311
314
  path: `/v2/info/bridges`,
312
315
  method: "GET",
313
316
  format: "json",
@@ -317,10 +320,11 @@ var Api = class extends HttpClient {
317
320
  * @description Get supported swap venues.
318
321
  *
319
322
  * @tags Fungible
320
- * @name GetVenues
323
+ * @name Venues
321
324
  * @request GET:/v2/fungible/venues
325
+ * @response `200` `VenuesResponse` A list of supported swap venues
322
326
  */
323
- getVenues = (query, params = {}) => this.request({
327
+ venues = (query, params = {}) => this.request({
324
328
  path: `/v2/fungible/venues`,
325
329
  method: "GET",
326
330
  query,
@@ -331,10 +335,13 @@ var Api = class extends HttpClient {
331
335
  * @description Get supported assets. Optionally limit to assets on a given chain and/or native assets.
332
336
  *
333
337
  * @tags Fungible
334
- * @name GetAssets
338
+ * @name Assets
335
339
  * @request GET:/v2/fungible/assets
340
+ * @response `200` `AssetsResponse` A map of chain_id to assets
341
+ * @response `400` `Error` The request was invalid, e.g. field is invalid
342
+ * @response `500` `Error` Internal server error
336
343
  */
337
- getAssets = (query, params = {}) => this.request({
344
+ assets = (query, params = {}) => this.request({
338
345
  path: `/v2/fungible/assets`,
339
346
  method: "GET",
340
347
  query,
@@ -345,10 +352,13 @@ var Api = class extends HttpClient {
345
352
  * @description Get assets that can be reached from a source via transfers under different conditions (e.g. single vs multiple txs)
346
353
  *
347
354
  * @tags Fungible
348
- * @name GetAssetsFromSource
355
+ * @name AssetsFromSource
349
356
  * @request POST:/v2/fungible/assets_from_source
357
+ * @response `200` `AssetsFromSourceResponse` Assets reachable from the specified source without swapping
358
+ * @response `400` `Error` The request was invalid, e.g. field is invalid
359
+ * @response `500` `Error` Internal server error
350
360
  */
351
- getAssetsFromSource = (data, params = {}) => this.request({
361
+ assetsFromSource = (data, params = {}) => this.request({
352
362
  path: `/v2/fungible/assets_from_source`,
353
363
  method: "POST",
354
364
  body: data,
@@ -360,10 +370,13 @@ var Api = class extends HttpClient {
360
370
  * @description This supports cross-chain actions among EVM chains, Cosmos chains, and between them. Returns the sequence of transfers and/or swaps to reach the given destination asset from the given source asset, along with estimated amount out. Commonly called before /msgs to generate route info and quote.
361
371
  *
362
372
  * @tags Fungible
363
- * @name GetRouteV2
373
+ * @name Route
364
374
  * @request POST:/v2/fungible/route
375
+ * @response `200` `RouteResponse` Swap and transfer route summary & quote
376
+ * @response `400` `Error` The request was invalid, e.g. an invalid amount was passed or the swap size is unsafe
377
+ * @response `500` `Error` Internal server error
365
378
  */
366
- getRouteV2 = (data, params = {}) => this.request({
379
+ route = (data, params = {}) => this.request({
367
380
  path: `/v2/fungible/route`,
368
381
  method: "POST",
369
382
  body: data,
@@ -375,10 +388,13 @@ var Api = class extends HttpClient {
375
388
  * @description This supports cross-chain actions among EVM chains, Cosmos chains, and between them. Returns minimal number of messages required to execute a multi-chain swap or transfer. Input consists of the output of route with additional information required for message construction (e.g. destination addresses for each chain)
376
389
  *
377
390
  * @tags Fungible
378
- * @name GetMsgsV2
391
+ * @name Msgs
379
392
  * @request POST:/v2/fungible/msgs
393
+ * @response `200` `MsgsResponse` The messages required to execute the swap, as JSON.
394
+ * @response `400` `Error` The request was invalid, e.g. an invalid amount was passed.
395
+ * @response `500` `Error` Internal server error
380
396
  */
381
- getMsgsV2 = (data, params = {}) => this.request({
397
+ msgs = (data, params = {}) => this.request({
382
398
  path: `/v2/fungible/msgs`,
383
399
  method: "POST",
384
400
  body: data,
@@ -390,10 +406,13 @@ var Api = class extends HttpClient {
390
406
  * @description This supports cross-chain actions among EVM chains, Cosmos chains, and between them. Returns minimal number of messages required to execute a multi-chain swap or transfer. This is a convenience endpoint that combines /route and /msgs into a single call.
391
407
  *
392
408
  * @tags Fungible
393
- * @name GetMsgsDirectV2
409
+ * @name MsgsDirect
394
410
  * @request POST:/v2/fungible/msgs_direct
411
+ * @response `200` `MsgsDirectResponse` The messages required to execute the swap, as JSON.
412
+ * @response `400` `Error` The request was invalid, e.g. an invalid amount was passed or the swap size is unsafe
413
+ * @response `500` `Error` Internal server error
395
414
  */
396
- getMsgsDirectV2 = (data, params = {}) => this.request({
415
+ msgsDirect = (data, params = {}) => this.request({
397
416
  path: `/v2/fungible/msgs_direct`,
398
417
  method: "POST",
399
418
  body: data,
@@ -405,10 +424,14 @@ var Api = class extends HttpClient {
405
424
  * @description Request asset recommendations for the given source assets on a given destination chain. The response includes recommended destination assets and recommendation reasons.
406
425
  *
407
426
  * @tags Fungible
408
- * @name GetAssetRecommendations
427
+ * @name AssetRecommendations
409
428
  * @request POST:/v2/fungible/recommend_assets
429
+ * @response `200` `AssetRecommendationsResponse` Recommended destination assets and reasons
430
+ * @response `400` `Error` The request was invalid, i.e. required fields are missing
431
+ * @response `404` `Error` A recommendation or the specified token was not found
432
+ * @response `500` `Error` Internal server error
410
433
  */
411
- getAssetRecommendations = (data, params = {}) => this.request({
434
+ assetRecommendations = (data, params = {}) => this.request({
412
435
  path: `/v2/fungible/recommend_assets`,
413
436
  method: "POST",
414
437
  body: data,
@@ -420,10 +443,14 @@ var Api = class extends HttpClient {
420
443
  * @description Submit a signed base64 encoded transaction to be broadcast to the specified network. On successful submission, the status of the transaction and any subsequent IBC or Axelar transfers can be queried through the /status endpoint.
421
444
  *
422
445
  * @tags Transaction
423
- * @name SubmitTransactionV2
446
+ * @name Submit
424
447
  * @request POST:/v2/tx/submit
448
+ * @response `200` `SubmitResponse` The hash of the transaction.
449
+ * @response `400` `Error` The request was invalid, i.e. the submitted transaction was malformed or fails on execution.
450
+ * @response `404` `Error` The specified chain is not supported.
451
+ * @response `500` `Error` Internal server error
425
452
  */
426
- submitTransactionV2 = (data, params = {}) => this.request({
453
+ submit = (data, params = {}) => this.request({
427
454
  path: `/v2/tx/submit`,
428
455
  method: "POST",
429
456
  body: data,
@@ -435,10 +462,14 @@ var Api = class extends HttpClient {
435
462
  * @description Requests tracking of a transaction that has already landed on-chain but was not broadcast through the Skip Go API. The status of a tracked transaction and subsequent IBC or Axelar transfers if routing assets cross chain can be queried through the /status endpoint.
436
463
  *
437
464
  * @tags Transaction
438
- * @name TrackTransactionV2
465
+ * @name Track
439
466
  * @request POST:/v2/tx/track
467
+ * @response `200` `TrackResponse` The hash of the transaction and a link to its explorer page.
468
+ * @response `400` `Error` The request was invalid, i.e. the transaction hash was malformed or the specified transaction did not execute successfully.
469
+ * @response `404` `Error` The specified chain is not supported or the specified transaction was not found.
470
+ * @response `500` `Error` Internal server error
440
471
  */
441
- trackTransactionV2 = (data, params = {}) => this.request({
472
+ track = (data, params = {}) => this.request({
442
473
  path: `/v2/tx/track`,
443
474
  method: "POST",
444
475
  body: data,
@@ -450,10 +481,13 @@ var Api = class extends HttpClient {
450
481
  * @description Get the status of the specified transaction and any subsequent IBC or Axelar transfers if routing assets cross chain. The transaction must have previously been submitted to either the /submit or /track endpoints.
451
482
  *
452
483
  * @tags Transaction
453
- * @name GetTransactionStatusV2
484
+ * @name Status
454
485
  * @request GET:/v2/tx/status
486
+ * @response `200` `StatusResponse` The status of the transaction and any subsequent ibc or Axelar transfers.
487
+ * @response `404` `Error` The specified tx was not found.
488
+ * @response `500` `Error` Internal server error
455
489
  */
456
- getTransactionStatusV2 = (query, params = {}) => this.request({
490
+ status = (query, params = {}) => this.request({
457
491
  path: `/v2/tx/status`,
458
492
  method: "GET",
459
493
  query,
@@ -464,10 +498,13 @@ var Api = class extends HttpClient {
464
498
  * @description Get origin assets from a given list of denoms and chain IDs.
465
499
  *
466
500
  * @tags Fungible
467
- * @name GetOriginAssets
501
+ * @name IbcOriginAssets
468
502
  * @request POST:/v2/fungible/ibc_origin_assets
503
+ * @response `200` `IbcOriginAssetsResponse` The origin assets of the specified denoms and chain IDs.
504
+ * @response `400` `Error` The request was invalid, i.e. required fields are missing
505
+ * @response `500` `Error` Internal server error
469
506
  */
470
- getOriginAssets = (data, params = {}) => this.request({
507
+ ibcOriginAssets = (data, params = {}) => this.request({
471
508
  path: `/v2/fungible/ibc_origin_assets`,
472
509
  method: "POST",
473
510
  body: data,
@@ -481,6 +518,9 @@ var Api = class extends HttpClient {
481
518
  * @tags Fungible
482
519
  * @name FungibleAssetsBetweenChainsCreate
483
520
  * @request POST:/v2/fungible/assets_between_chains
521
+ * @response `200` `FungibleAssetsBetweenChainsCreateResponse` OK
522
+ * @response `404` `Error` One of the chain IDs was not found
523
+ * @response `500` `Error` Internal server error
484
524
  */
485
525
  fungibleAssetsBetweenChainsCreate = (data, params = {}) => this.request({
486
526
  path: `/v2/fungible/assets_between_chains`,
@@ -1,6 +1,6 @@
1
1
  import { DEFAULT_GAS_DENOM_OVERRIDES } from './chunk-SWYON2RG.js';
2
2
  import { chains } from './chunk-JTIHU43D.js';
3
- import { ClientState } from './chunk-BRMONS6A.js';
3
+ import { ClientState } from './chunk-EAUM5JYS.js';
4
4
 
5
5
  // src/private-functions/getDefaultGasTokenForChain.ts
6
6
  var getDefaultGasTokenForChain = async (chainId) => {
@@ -1,5 +1,5 @@
1
1
  import { chains, findFirstWorkingEndpoint } from './chunk-JTIHU43D.js';
2
- import { ClientState } from './chunk-BRMONS6A.js';
2
+ import { ClientState } from './chunk-EAUM5JYS.js';
3
3
  import { accountFromAny, SigningStargateClient } from '@cosmjs/stargate';
4
4
  import { assertDefinedAndNotNull } from '@cosmjs/utils';
5
5
  import { BinaryWriter, BinaryReader } from 'cosmjs-types/binary.js';
@@ -1,8 +1,8 @@
1
- import { api } from './chunk-W6TBGBV3.js';
1
+ import { api } from './chunk-SOGMQT4H.js';
2
2
 
3
3
  // src/api/getBridges.ts
4
4
  var bridges = api({
5
- methodName: "getBridges",
5
+ methodName: "bridges",
6
6
  path: "/v2/info/bridges",
7
7
  transformResponse: (response) => response.bridges
8
8
  });
@@ -1,8 +1,8 @@
1
- import { api } from './chunk-W6TBGBV3.js';
1
+ import { api } from './chunk-SOGMQT4H.js';
2
2
 
3
3
  // src/api/postIbcOriginAssets.ts
4
4
  var ibcOriginAssets = api({
5
- methodName: "getOriginAssets",
5
+ methodName: "ibcOriginAssets",
6
6
  method: "post",
7
7
  path: "/v2/fungible/ibc_origin_assets",
8
8
  transformResponse: (response) => response.originAssets
@@ -3,7 +3,7 @@ import { OfflineDirectSigner } from '@cosmjs/proto-signing';
3
3
  import { StdFee, GasPrice, SignerData } from '@cosmjs/stargate';
4
4
  import { WalletClient } from 'viem';
5
5
  import { Adapter } from '@solana/wallet-adapter-base';
6
- import { a2 as FeeAsset, K as ChainType, V as CosmosMsg } from './swaggerTypes-O9-gvCT1.js';
6
+ import { a3 as FeeAsset, L as ChainType, W as CosmosMsg } from './swaggerTypes-A72fxJ5y.js';
7
7
 
8
8
  /** Common Types */
9
9
  type UserAddress = {
@@ -1,6 +1,6 @@
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';
1
+ import { aU as TransferStatus, T as Erc20Approval, be as RouteResponse, W as CosmosMsg } from './swaggerTypes-A72fxJ5y.js';
2
+ import { A as ApiRequest } from './generateApi-BXIkShKU.js';
3
+ import { S as SignerGetters, b as GasOptions, U as UserAddress } from './client-types-BvdIj_Nf.js';
4
4
 
5
5
  type CallbackStatus = "success" | "error" | "pending" | "completed";
6
6
  type TransactionCallbacks = {
@@ -33,7 +33,7 @@ type TransactionCallbacks = {
33
33
  };
34
34
 
35
35
  /** Execute Route Options */
36
- type ExecuteRouteOptions = SignerGetters & GasOptions & TransactionCallbacks & Pick<ApiRequest<"getMsgsV2">, "timeoutSeconds"> & {
36
+ type ExecuteRouteOptions = SignerGetters & GasOptions & TransactionCallbacks & Pick<ApiRequest<"msgs">, "timeoutSeconds"> & {
37
37
  route: RouteResponse;
38
38
  /**
39
39
  * Addresses should be in the same order with the `chainIDs` in the `route`
@@ -1,4 +1,4 @@
1
- import { bc as Api } from './swaggerTypes-O9-gvCT1.js';
1
+ import { bw as Api } from './swaggerTypes-A72fxJ5y.js';
2
2
 
3
3
  type CamelKey<S extends string> = S extends `${infer T}_${infer U}` ? `${T}${Capitalize<CamelKey<U>>}` : S;
4
4
  type Camel<T> = T extends (infer U)[] ? Camel<U>[] : T extends object ? {