@swapkit/helpers 4.20.5 → 5.0.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.
@@ -14,7 +14,9 @@ export declare enum RouteQuoteTxType {
14
14
  NEAR = "NEAR",
15
15
  STELLAR = "STELLAR",
16
16
  TON = "TON",
17
- TRON = "TRON"
17
+ TRON = "TRON",
18
+ EIP_712_HYPE_SEND_ASSET = "EIP_712_HYPE_SEND_ASSET",
19
+ EIP_712_HYPE_WITHDRAW = "EIP_712_HYPE_WITHDRAW"
18
20
  }
19
21
  export declare enum TxnType {
20
22
  approve = "approve",
@@ -1136,6 +1138,85 @@ export declare const TONTransactionSchema: z.ZodObject<{
1136
1138
  sendMode: z.ZodNumber;
1137
1139
  }, z.core.$strip>;
1138
1140
  export type TONTransaction = z.infer<typeof TONTransactionSchema>;
1141
+ /** Canonical HyperCore spot token id for USDC — the only sell token HyperCore payin routes support. */
1142
+ export declare const HYPERCORE_USDC_TOKEN_ID = "USDC:0x6d1e7cde53ba9467b783cb7c530ce054";
1143
+ export declare const HyperCoreEip712TypedDataSchema: z.ZodObject<{
1144
+ domain: z.ZodObject<{
1145
+ chainId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
1146
+ name: z.ZodOptional<z.ZodString>;
1147
+ verifyingContract: z.ZodOptional<z.ZodString>;
1148
+ version: z.ZodOptional<z.ZodString>;
1149
+ }, z.core.$loose>;
1150
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1151
+ primaryType: z.ZodString;
1152
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1153
+ name: z.ZodString;
1154
+ type: z.ZodString;
1155
+ }, z.core.$loose>>>;
1156
+ }, z.core.$loose>;
1157
+ export declare const HyperCoreSendAssetActionSchema: z.ZodObject<{
1158
+ amount: z.ZodString;
1159
+ destination: z.ZodString;
1160
+ destinationDex: z.ZodString;
1161
+ fromSubAccount: z.ZodString;
1162
+ hyperliquidChain: z.ZodString;
1163
+ nonce: z.ZodNumber;
1164
+ signatureChainId: z.ZodString;
1165
+ sourceDex: z.ZodString;
1166
+ token: z.ZodString;
1167
+ type: z.ZodLiteral<"sendAsset">;
1168
+ }, z.core.$loose>;
1169
+ export declare const HyperCoreTypedDataTransactionSchema: z.ZodObject<{
1170
+ action: z.ZodObject<{
1171
+ type: z.ZodString;
1172
+ }, z.core.$loose>;
1173
+ submitTo: z.ZodString;
1174
+ typedData: z.ZodObject<{
1175
+ domain: z.ZodObject<{
1176
+ chainId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
1177
+ name: z.ZodOptional<z.ZodString>;
1178
+ verifyingContract: z.ZodOptional<z.ZodString>;
1179
+ version: z.ZodOptional<z.ZodString>;
1180
+ }, z.core.$loose>;
1181
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1182
+ primaryType: z.ZodString;
1183
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1184
+ name: z.ZodString;
1185
+ type: z.ZodString;
1186
+ }, z.core.$loose>>>;
1187
+ }, z.core.$loose>;
1188
+ }, z.core.$loose>;
1189
+ export type HyperCoreTypedDataTransaction = z.infer<typeof HyperCoreTypedDataTransactionSchema>;
1190
+ export declare const HyperCoreSendAssetTransactionSchema: z.ZodObject<{
1191
+ submitTo: z.ZodString;
1192
+ typedData: z.ZodObject<{
1193
+ domain: z.ZodObject<{
1194
+ chainId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
1195
+ name: z.ZodOptional<z.ZodString>;
1196
+ verifyingContract: z.ZodOptional<z.ZodString>;
1197
+ version: z.ZodOptional<z.ZodString>;
1198
+ }, z.core.$loose>;
1199
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1200
+ primaryType: z.ZodString;
1201
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1202
+ name: z.ZodString;
1203
+ type: z.ZodString;
1204
+ }, z.core.$loose>>>;
1205
+ }, z.core.$loose>;
1206
+ action: z.ZodObject<{
1207
+ amount: z.ZodString;
1208
+ destination: z.ZodString;
1209
+ destinationDex: z.ZodString;
1210
+ fromSubAccount: z.ZodString;
1211
+ hyperliquidChain: z.ZodString;
1212
+ nonce: z.ZodNumber;
1213
+ signatureChainId: z.ZodString;
1214
+ sourceDex: z.ZodString;
1215
+ token: z.ZodString;
1216
+ type: z.ZodLiteral<"sendAsset">;
1217
+ }, z.core.$loose>;
1218
+ }, z.core.$loose>;
1219
+ export type HyperCoreSendAssetTransaction = z.infer<typeof HyperCoreSendAssetTransactionSchema>;
1139
1220
  export declare const RouteLegSchema: z.ZodObject<{
1140
1221
  affiliate: z.ZodOptional<z.ZodString>;
1141
1222
  affiliateFee: z.ZodOptional<z.ZodNumber>;
@@ -1422,7 +1503,7 @@ export declare const QuoteResponseRouteItem: z.ZodObject<{
1422
1503
  sourceAddress: z.ZodOptional<z.ZodString>;
1423
1504
  targetAddress: z.ZodOptional<z.ZodString>;
1424
1505
  totalSlippageBps: z.ZodNumber;
1425
- tx: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1506
+ tx: z.ZodOptional<z.ZodUnion<[z.ZodUnion<readonly [z.ZodObject<{
1426
1507
  data: z.ZodString;
1427
1508
  from: z.ZodString;
1428
1509
  to: z.ZodString;
@@ -1477,11 +1558,7 @@ export declare const QuoteResponseRouteItem: z.ZodObject<{
1477
1558
  txID: z.ZodString;
1478
1559
  value: z.ZodOptional<z.ZodString>;
1479
1560
  visible: z.ZodBoolean;
1480
- }, z.core.$strip>, z.ZodArray<z.ZodObject<{
1481
- calldata: z.ZodArray<z.ZodString>;
1482
- contractAddress: z.ZodString;
1483
- entrypoint: z.ZodString;
1484
- }, z.core.$strip>>, z.ZodObject<{
1561
+ }, z.core.$strip>, z.ZodObject<{
1485
1562
  messages: z.ZodArray<z.ZodObject<{
1486
1563
  address: z.ZodString;
1487
1564
  amount: z.ZodString;
@@ -1489,7 +1566,30 @@ export declare const QuoteResponseRouteItem: z.ZodObject<{
1489
1566
  stateInit: z.ZodOptional<z.ZodString>;
1490
1567
  }, z.core.$strip>>;
1491
1568
  sendMode: z.ZodNumber;
1492
- }, z.core.$strip>, z.ZodString]>>;
1569
+ }, z.core.$strip>, z.ZodObject<{
1570
+ action: z.ZodObject<{
1571
+ type: z.ZodString;
1572
+ }, z.core.$loose>;
1573
+ submitTo: z.ZodString;
1574
+ typedData: z.ZodObject<{
1575
+ domain: z.ZodObject<{
1576
+ chainId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
1577
+ name: z.ZodOptional<z.ZodString>;
1578
+ verifyingContract: z.ZodOptional<z.ZodString>;
1579
+ version: z.ZodOptional<z.ZodString>;
1580
+ }, z.core.$loose>;
1581
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1582
+ primaryType: z.ZodString;
1583
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1584
+ name: z.ZodString;
1585
+ type: z.ZodString;
1586
+ }, z.core.$loose>>>;
1587
+ }, z.core.$loose>;
1588
+ }, z.core.$loose>, z.ZodString]>, z.ZodArray<z.ZodObject<{
1589
+ calldata: z.ZodArray<z.ZodString>;
1590
+ contractAddress: z.ZodString;
1591
+ entrypoint: z.ZodString;
1592
+ }, z.core.$strip>>]>>;
1493
1593
  txType: z.ZodOptional<z.ZodEnum<typeof RouteQuoteTxType>>;
1494
1594
  warnings: z.ZodArray<z.ZodObject<{
1495
1595
  code: z.ZodEnum<typeof WarningCodeEnum>;
@@ -1619,7 +1719,7 @@ export declare const QuoteResponseSchema: z.ZodObject<{
1619
1719
  sourceAddress: z.ZodOptional<z.ZodString>;
1620
1720
  targetAddress: z.ZodOptional<z.ZodString>;
1621
1721
  totalSlippageBps: z.ZodNumber;
1622
- tx: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1722
+ tx: z.ZodOptional<z.ZodUnion<[z.ZodUnion<readonly [z.ZodObject<{
1623
1723
  data: z.ZodString;
1624
1724
  from: z.ZodString;
1625
1725
  to: z.ZodString;
@@ -1674,11 +1774,7 @@ export declare const QuoteResponseSchema: z.ZodObject<{
1674
1774
  txID: z.ZodString;
1675
1775
  value: z.ZodOptional<z.ZodString>;
1676
1776
  visible: z.ZodBoolean;
1677
- }, z.core.$strip>, z.ZodArray<z.ZodObject<{
1678
- calldata: z.ZodArray<z.ZodString>;
1679
- contractAddress: z.ZodString;
1680
- entrypoint: z.ZodString;
1681
- }, z.core.$strip>>, z.ZodObject<{
1777
+ }, z.core.$strip>, z.ZodObject<{
1682
1778
  messages: z.ZodArray<z.ZodObject<{
1683
1779
  address: z.ZodString;
1684
1780
  amount: z.ZodString;
@@ -1686,7 +1782,30 @@ export declare const QuoteResponseSchema: z.ZodObject<{
1686
1782
  stateInit: z.ZodOptional<z.ZodString>;
1687
1783
  }, z.core.$strip>>;
1688
1784
  sendMode: z.ZodNumber;
1689
- }, z.core.$strip>, z.ZodString]>>;
1785
+ }, z.core.$strip>, z.ZodObject<{
1786
+ action: z.ZodObject<{
1787
+ type: z.ZodString;
1788
+ }, z.core.$loose>;
1789
+ submitTo: z.ZodString;
1790
+ typedData: z.ZodObject<{
1791
+ domain: z.ZodObject<{
1792
+ chainId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
1793
+ name: z.ZodOptional<z.ZodString>;
1794
+ verifyingContract: z.ZodOptional<z.ZodString>;
1795
+ version: z.ZodOptional<z.ZodString>;
1796
+ }, z.core.$loose>;
1797
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1798
+ primaryType: z.ZodString;
1799
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1800
+ name: z.ZodString;
1801
+ type: z.ZodString;
1802
+ }, z.core.$loose>>>;
1803
+ }, z.core.$loose>;
1804
+ }, z.core.$loose>, z.ZodString]>, z.ZodArray<z.ZodObject<{
1805
+ calldata: z.ZodArray<z.ZodString>;
1806
+ contractAddress: z.ZodString;
1807
+ entrypoint: z.ZodString;
1808
+ }, z.core.$strip>>]>>;
1690
1809
  txType: z.ZodOptional<z.ZodEnum<typeof RouteQuoteTxType>>;
1691
1810
  warnings: z.ZodArray<z.ZodObject<{
1692
1811
  code: z.ZodEnum<typeof WarningCodeEnum>;
@@ -2137,7 +2256,26 @@ export declare const QuoteRouteV2Response: z.ZodObject<{
2137
2256
  stateInit: z.ZodOptional<z.ZodString>;
2138
2257
  }, z.core.$strip>>;
2139
2258
  sendMode: z.ZodNumber;
2140
- }, z.core.$strip>, z.ZodString]>>;
2259
+ }, z.core.$strip>, z.ZodObject<{
2260
+ action: z.ZodObject<{
2261
+ type: z.ZodString;
2262
+ }, z.core.$loose>;
2263
+ submitTo: z.ZodString;
2264
+ typedData: z.ZodObject<{
2265
+ domain: z.ZodObject<{
2266
+ chainId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
2267
+ name: z.ZodOptional<z.ZodString>;
2268
+ verifyingContract: z.ZodOptional<z.ZodString>;
2269
+ version: z.ZodOptional<z.ZodString>;
2270
+ }, z.core.$loose>;
2271
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2272
+ primaryType: z.ZodString;
2273
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
2274
+ name: z.ZodString;
2275
+ type: z.ZodString;
2276
+ }, z.core.$loose>>>;
2277
+ }, z.core.$loose>;
2278
+ }, z.core.$loose>, z.ZodString]>>;
2141
2279
  txType: z.ZodOptional<z.ZodEnum<typeof RouteQuoteTxType>>;
2142
2280
  }, z.core.$strip>;
2143
2281
  export declare const RouteQuoteProviderErrorSchema: z.ZodObject<{
@@ -2342,7 +2480,26 @@ export declare const QuoteV2ResponseSchema: z.ZodObject<{
2342
2480
  stateInit: z.ZodOptional<z.ZodString>;
2343
2481
  }, z.core.$strip>>;
2344
2482
  sendMode: z.ZodNumber;
2345
- }, z.core.$strip>, z.ZodString]>>;
2483
+ }, z.core.$strip>, z.ZodObject<{
2484
+ action: z.ZodObject<{
2485
+ type: z.ZodString;
2486
+ }, z.core.$loose>;
2487
+ submitTo: z.ZodString;
2488
+ typedData: z.ZodObject<{
2489
+ domain: z.ZodObject<{
2490
+ chainId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
2491
+ name: z.ZodOptional<z.ZodString>;
2492
+ verifyingContract: z.ZodOptional<z.ZodString>;
2493
+ version: z.ZodOptional<z.ZodString>;
2494
+ }, z.core.$loose>;
2495
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2496
+ primaryType: z.ZodString;
2497
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
2498
+ name: z.ZodString;
2499
+ type: z.ZodString;
2500
+ }, z.core.$loose>>>;
2501
+ }, z.core.$loose>;
2502
+ }, z.core.$loose>, z.ZodString]>>;
2346
2503
  txType: z.ZodOptional<z.ZodEnum<typeof RouteQuoteTxType>>;
2347
2504
  }, z.core.$strip>>;
2348
2505
  }, z.core.$strip>;
@@ -2534,7 +2691,26 @@ export declare const SwapRouteV2ResponseSchema: z.ZodObject<{
2534
2691
  stateInit: z.ZodOptional<z.ZodString>;
2535
2692
  }, z.core.$strip>>;
2536
2693
  sendMode: z.ZodNumber;
2537
- }, z.core.$strip>, z.ZodString]>>;
2694
+ }, z.core.$strip>, z.ZodObject<{
2695
+ action: z.ZodObject<{
2696
+ type: z.ZodString;
2697
+ }, z.core.$loose>;
2698
+ submitTo: z.ZodString;
2699
+ typedData: z.ZodObject<{
2700
+ domain: z.ZodObject<{
2701
+ chainId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
2702
+ name: z.ZodOptional<z.ZodString>;
2703
+ verifyingContract: z.ZodOptional<z.ZodString>;
2704
+ version: z.ZodOptional<z.ZodString>;
2705
+ }, z.core.$loose>;
2706
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2707
+ primaryType: z.ZodString;
2708
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
2709
+ name: z.ZodString;
2710
+ type: z.ZodString;
2711
+ }, z.core.$loose>>>;
2712
+ }, z.core.$loose>;
2713
+ }, z.core.$loose>, z.ZodString]>>;
2538
2714
  txType: z.ZodOptional<z.ZodEnum<typeof RouteQuoteTxType>>;
2539
2715
  approvalTx: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2540
2716
  data: z.ZodString;
@@ -14,7 +14,6 @@ export * from "./modules/requestClient";
14
14
  export * from "./modules/swapKitConfig";
15
15
  export * from "./modules/swapKitError";
16
16
  export * from "./modules/swapKitNumber";
17
- export * from "./modules/widgetAuth";
18
17
  /**
19
18
  * Types
20
19
  */
@@ -25,9 +24,7 @@ export * from "./types";
25
24
  export * from "./utils/asset";
26
25
  export * from "./utils/chains";
27
26
  export * from "./utils/derivationPath";
28
- export * from "./utils/explorerUrls";
29
27
  export * from "./utils/liquidity";
30
28
  export * from "./utils/memo";
31
29
  export * from "./utils/others";
32
- export * from "./utils/validators";
33
30
  export * from "./utils/wallets";