@sodax/sdk 2.0.0-rc.16 → 2.0.0-rc.17

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.
package/dist/index.mjs CHANGED
@@ -2613,6 +2613,8 @@ var RelayChainIdMap = {
2613
2613
  };
2614
2614
  var INTENT_CHAIN_IDS = Object.values(RelayChainIdMap);
2615
2615
  var IntentRelayChainIdToChainKey = Object.fromEntries(Object.entries(RelayChainIdMap).map(([chainKey, chainId]) => [chainId, chainKey]));
2616
+ var CHAIN_LOGO_BASE_URL = "https://raw.githubusercontent.com/icon-project/sodax-sdks/main/packages/assets/chain";
2617
+ var chainLogo = (key) => `${CHAIN_LOGO_BASE_URL}/${key}.png`;
2616
2618
  var baseChainInfo = {
2617
2619
  [ChainKeys.SONIC_MAINNET]: {
2618
2620
  name: "Sonic",
@@ -2620,6 +2622,7 @@ var baseChainInfo = {
2620
2622
  type: "EVM",
2621
2623
  chainId: 146,
2622
2624
  mainnet: true,
2625
+ logo: chainLogo(ChainKeys.SONIC_MAINNET),
2623
2626
  explorer: {
2624
2627
  baseUrl: "https://sonicscan.org/",
2625
2628
  txUrl: "https://sonicscan.org/tx/",
@@ -2633,6 +2636,7 @@ var baseChainInfo = {
2633
2636
  type: "SOLANA",
2634
2637
  chainId: "solana",
2635
2638
  mainnet: true,
2639
+ logo: chainLogo(ChainKeys.SOLANA_MAINNET),
2636
2640
  explorer: {
2637
2641
  baseUrl: "https://solscan.io/",
2638
2642
  txUrl: "https://solscan.io/tx/",
@@ -2646,6 +2650,7 @@ var baseChainInfo = {
2646
2650
  type: "EVM",
2647
2651
  chainId: 43114,
2648
2652
  mainnet: true,
2653
+ logo: chainLogo(ChainKeys.AVALANCHE_MAINNET),
2649
2654
  explorer: {
2650
2655
  baseUrl: "https://snowtrace.io/",
2651
2656
  txUrl: "https://snowtrace.io/tx/",
@@ -2659,6 +2664,7 @@ var baseChainInfo = {
2659
2664
  type: "EVM",
2660
2665
  chainId: 42161,
2661
2666
  mainnet: true,
2667
+ logo: chainLogo(ChainKeys.ARBITRUM_MAINNET),
2662
2668
  explorer: {
2663
2669
  baseUrl: "https://arbiscan.io/",
2664
2670
  txUrl: "https://arbiscan.io/tx/",
@@ -2672,6 +2678,7 @@ var baseChainInfo = {
2672
2678
  type: "EVM",
2673
2679
  chainId: 8453,
2674
2680
  mainnet: true,
2681
+ logo: chainLogo(ChainKeys.BASE_MAINNET),
2675
2682
  explorer: {
2676
2683
  baseUrl: "https://basescan.org/",
2677
2684
  txUrl: "https://basescan.org/tx/",
@@ -2685,6 +2692,7 @@ var baseChainInfo = {
2685
2692
  type: "EVM",
2686
2693
  chainId: 10,
2687
2694
  mainnet: true,
2695
+ logo: chainLogo(ChainKeys.OPTIMISM_MAINNET),
2688
2696
  explorer: {
2689
2697
  baseUrl: "https://optimistic.etherscan.io/",
2690
2698
  txUrl: "https://optimistic.etherscan.io/tx/",
@@ -2698,6 +2706,7 @@ var baseChainInfo = {
2698
2706
  type: "EVM",
2699
2707
  chainId: 56,
2700
2708
  mainnet: true,
2709
+ logo: chainLogo(ChainKeys.BSC_MAINNET),
2701
2710
  explorer: {
2702
2711
  baseUrl: "https://bscscan.com/",
2703
2712
  txUrl: "https://bscscan.com/tx/",
@@ -2711,6 +2720,7 @@ var baseChainInfo = {
2711
2720
  type: "EVM",
2712
2721
  chainId: 137,
2713
2722
  mainnet: true,
2723
+ logo: chainLogo(ChainKeys.POLYGON_MAINNET),
2714
2724
  explorer: {
2715
2725
  baseUrl: "https://polygonscan.com/",
2716
2726
  txUrl: "https://polygonscan.com/tx/",
@@ -2724,6 +2734,7 @@ var baseChainInfo = {
2724
2734
  type: "EVM",
2725
2735
  chainId: 999,
2726
2736
  mainnet: true,
2737
+ logo: chainLogo(ChainKeys.HYPEREVM_MAINNET),
2727
2738
  explorer: {
2728
2739
  baseUrl: "https://hyperevmscan.io/",
2729
2740
  txUrl: "https://hyperevmscan.io/tx/",
@@ -2737,6 +2748,7 @@ var baseChainInfo = {
2737
2748
  type: "EVM",
2738
2749
  chainId: 1890,
2739
2750
  mainnet: true,
2751
+ logo: chainLogo(ChainKeys.LIGHTLINK_MAINNET),
2740
2752
  explorer: {
2741
2753
  baseUrl: "https://phoenix.lightlink.io/",
2742
2754
  txUrl: "https://phoenix.lightlink.io/tx/",
@@ -2750,6 +2762,7 @@ var baseChainInfo = {
2750
2762
  type: "INJECTIVE",
2751
2763
  chainId: "injective-1",
2752
2764
  mainnet: true,
2765
+ logo: chainLogo(ChainKeys.INJECTIVE_MAINNET),
2753
2766
  explorer: {
2754
2767
  baseUrl: "https://www.mintscan.io/injective/",
2755
2768
  txUrl: "https://www.mintscan.io/injective/tx/",
@@ -2763,6 +2776,7 @@ var baseChainInfo = {
2763
2776
  type: "STELLAR",
2764
2777
  chainId: "stellar",
2765
2778
  mainnet: true,
2779
+ logo: chainLogo(ChainKeys.STELLAR_MAINNET),
2766
2780
  explorer: {
2767
2781
  baseUrl: "https://stellar.expert/explorer/public/",
2768
2782
  txUrl: "https://stellar.expert/explorer/public/tx/",
@@ -2776,6 +2790,7 @@ var baseChainInfo = {
2776
2790
  type: "SUI",
2777
2791
  chainId: "sui",
2778
2792
  mainnet: true,
2793
+ logo: chainLogo(ChainKeys.SUI_MAINNET),
2779
2794
  explorer: {
2780
2795
  baseUrl: "https://suivision.xyz/",
2781
2796
  txUrl: "https://suivision.xyz/txblock/",
@@ -2789,6 +2804,7 @@ var baseChainInfo = {
2789
2804
  type: "ICON",
2790
2805
  chainId: "0x1.icon",
2791
2806
  mainnet: true,
2807
+ logo: chainLogo(ChainKeys.ICON_MAINNET),
2792
2808
  explorer: {
2793
2809
  baseUrl: "https://tracker.icon.community/",
2794
2810
  txUrl: "https://tracker.icon.community/transaction/",
@@ -2802,6 +2818,7 @@ var baseChainInfo = {
2802
2818
  type: "NEAR",
2803
2819
  chainId: "near",
2804
2820
  mainnet: true,
2821
+ logo: chainLogo(ChainKeys.NEAR_MAINNET),
2805
2822
  explorer: {
2806
2823
  baseUrl: "https://nearblocks.io/",
2807
2824
  txUrl: "https://nearblocks.io/txns/",
@@ -2815,6 +2832,7 @@ var baseChainInfo = {
2815
2832
  type: "EVM",
2816
2833
  chainId: 1,
2817
2834
  mainnet: true,
2835
+ logo: chainLogo(ChainKeys.ETHEREUM_MAINNET),
2818
2836
  explorer: {
2819
2837
  baseUrl: "https://etherscan.io/",
2820
2838
  txUrl: "https://etherscan.io/tx/",
@@ -2828,6 +2846,7 @@ var baseChainInfo = {
2828
2846
  type: "BITCOIN",
2829
2847
  chainId: "bitcoin",
2830
2848
  mainnet: true,
2849
+ logo: chainLogo(ChainKeys.BITCOIN_MAINNET),
2831
2850
  explorer: {
2832
2851
  baseUrl: "https://mempool.space/",
2833
2852
  txUrl: "https://mempool.space/tx/",
@@ -2841,6 +2860,7 @@ var baseChainInfo = {
2841
2860
  type: "EVM",
2842
2861
  chainId: 151,
2843
2862
  mainnet: true,
2863
+ logo: chainLogo(ChainKeys.REDBELLY_MAINNET),
2844
2864
  explorer: {
2845
2865
  baseUrl: "https://redbelly.routescan.io/",
2846
2866
  txUrl: "https://redbelly.routescan.io/tx/",
@@ -2854,6 +2874,7 @@ var baseChainInfo = {
2854
2874
  type: "EVM",
2855
2875
  chainId: 8217,
2856
2876
  mainnet: true,
2877
+ logo: chainLogo(ChainKeys.KAIA_MAINNET),
2857
2878
  explorer: {
2858
2879
  baseUrl: "https://klaytnfinder.io/",
2859
2880
  txUrl: "https://klaytnfinder.io/tx/",
@@ -2867,6 +2888,7 @@ var baseChainInfo = {
2867
2888
  type: "STACKS",
2868
2889
  chainId: "stacks",
2869
2890
  mainnet: true,
2891
+ logo: chainLogo(ChainKeys.STACKS_MAINNET),
2870
2892
  explorer: {
2871
2893
  baseUrl: "https://explorer.hiro.so/",
2872
2894
  txUrl: "https://explorer.hiro.so/txid/",
@@ -3858,8 +3880,11 @@ var swapSupportedTokens = {
3858
3880
  spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.WAL,
3859
3881
  spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.NAVX
3860
3882
  ],
3861
- // Injective is currently staging-only — see stagingSwapSupportedTokens
3862
- [ChainKeys.INJECTIVE_MAINNET]: [],
3883
+ [ChainKeys.INJECTIVE_MAINNET]: [
3884
+ spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.INJ,
3885
+ spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.bnUSD,
3886
+ spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.USDC
3887
+ ],
3863
3888
  [ChainKeys.NEAR_MAINNET]: [
3864
3889
  spokeChainConfig[ChainKeys.NEAR_MAINNET].supportedTokens.NEAR,
3865
3890
  spokeChainConfig[ChainKeys.NEAR_MAINNET].supportedTokens.bnUSD,
@@ -3948,12 +3973,7 @@ var stagingSwapSupportedTokens = {
3948
3973
  [ChainKeys.ICON_MAINNET]: [],
3949
3974
  [ChainKeys.STELLAR_MAINNET]: [],
3950
3975
  [ChainKeys.SUI_MAINNET]: [spokeChainConfig[ChainKeys.SUI_MAINNET].supportedTokens.USDT],
3951
- [ChainKeys.INJECTIVE_MAINNET]: [
3952
- spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.INJ,
3953
- spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.bnUSD,
3954
- spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.USDC
3955
- // spokeChainConfig[ChainKeys.INJECTIVE_MAINNET].supportedTokens.SODA, // NOTE: not in solver wiki
3956
- ],
3976
+ [ChainKeys.INJECTIVE_MAINNET]: [],
3957
3977
  [ChainKeys.NEAR_MAINNET]: [],
3958
3978
  [ChainKeys.BITCOIN_MAINNET]: [],
3959
3979
  [ChainKeys.ETHEREUM_MAINNET]: [
@@ -4059,6 +4079,31 @@ function usesBip322MessageSigning(addressType) {
4059
4079
  var BTC_WALLET_ADDRESS_TYPES = ["taproot", "segwit"];
4060
4080
  var BTC_ADDRESS_TYPES = ["P2PKH", "P2SH", "P2WPKH", "P2TR"];
4061
4081
 
4082
+ // ../types/dist/hooks/hooks.js
4083
+ var HookKind = {
4084
+ /** Deposits delivered USDC into the recipient's HyperCore perps account (HyperEVM). */
4085
+ HYPERCORE_DEPOSIT: "hyperCoreDeposit"
4086
+ };
4087
+ var spokeHooks = {
4088
+ [ChainKeys.HYPEREVM_MAINNET]: [
4089
+ {
4090
+ kind: HookKind.HYPERCORE_DEPOSIT,
4091
+ address: "0xc79224a4DEE653C9a26572B941149d95a88432c4",
4092
+ supportedTokens: [spokeChainConfig[ChainKeys.HYPEREVM_MAINNET].supportedTokens.USDC.address]
4093
+ // USDC on HyperEVM
4094
+ }
4095
+ ]
4096
+ };
4097
+ var getSpokeHook = (chainKey, kind) => spokeHooks[chainKey]?.find((h) => h.kind === kind);
4098
+ var getSpokeHooks = (chainKey) => spokeHooks[chainKey] ?? [];
4099
+ var isHookSupportedToken = (chainKey, kind, token) => {
4100
+ const hook = getSpokeHook(chainKey, kind);
4101
+ if (!hook) {
4102
+ return false;
4103
+ }
4104
+ return !hook.supportedTokens || hook.supportedTokens.some((t) => t.toLowerCase() === token.toLowerCase());
4105
+ };
4106
+
4062
4107
  // ../types/dist/utils/utils.js
4063
4108
  function isHubChainKey(chainId) {
4064
4109
  return chainId === HUB_CHAIN_KEY;
@@ -4173,7 +4218,7 @@ function isValidWalletProviderForChainKey(chainKey, walletProvider) {
4173
4218
  }
4174
4219
 
4175
4220
  // ../types/dist/index.js
4176
- var CONFIG_VERSION = 214;
4221
+ var CONFIG_VERSION = 215;
4177
4222
  function isEvmSpokeChainConfig(value) {
4178
4223
  return typeof value === "object" && value !== null && value.chain.type === "EVM" && value.chain.key !== HUB_CHAIN_KEY;
4179
4224
  }
@@ -21824,9 +21869,147 @@ var NearSpokeService = class {
21824
21869
 
21825
21870
  // src/shared/types/intent-types.ts
21826
21871
  var IntentDataType = /* @__PURE__ */ ((IntentDataType2) => {
21872
+ IntentDataType2[IntentDataType2["ARRAY"] = 0] = "ARRAY";
21827
21873
  IntentDataType2[IntentDataType2["FEE"] = 1] = "FEE";
21874
+ IntentDataType2[IntentDataType2["HOOK"] = 2] = "HOOK";
21875
+ IntentDataType2[IntentDataType2["DELIVERY"] = 3] = "DELIVERY";
21828
21876
  return IntentDataType2;
21829
21877
  })(IntentDataType || {});
21878
+ var HOOK_DELIVERY_ABI = {
21879
+ // HyperCoreDepositHook expects `abi.encode(address)` — the HyperCore account to credit.
21880
+ [HookKind.HYPERCORE_DEPOSIT]: [{ name: "recipient", type: "address" }]
21881
+ };
21882
+ var HookService = class _HookService {
21883
+ constructor() {
21884
+ }
21885
+ /**
21886
+ * Encodes a hook's `deliveryData` payload. One common entry point for all hooks — the encoding is
21887
+ * selected by {@link HookRequest.kind} and uses that hook's schema from {@link HOOK_DELIVERY_ABI}.
21888
+ *
21889
+ * @param request - The hook selection (and any hook-specific params).
21890
+ * @param recipient - The end recipient the hook should credit (the intent's `dstAddress`).
21891
+ */
21892
+ static encodeDeliveryData(request, recipient) {
21893
+ switch (request.kind) {
21894
+ case HookKind.HYPERCORE_DEPOSIT:
21895
+ return encodeAbiParameters(HOOK_DELIVERY_ABI[HookKind.HYPERCORE_DEPOSIT], [recipient]);
21896
+ }
21897
+ throw new Error(
21898
+ `[HookService.encodeDeliveryData] Unsupported delivery hook kind: ${request.kind}`
21899
+ );
21900
+ }
21901
+ /**
21902
+ * Resolves a high-level {@link HookRequest} to the on-chain delivery pair: the deployed hook address
21903
+ * (becomes the intent's `dstAddress`) and the encoded payload the hook expects (`deliveryData`).
21904
+ * Bundling lookup + codec here guarantees the address and its payload schema can never drift.
21905
+ *
21906
+ * @param chainKey - Destination spoke chain (must have the requested hook deployed).
21907
+ * @param request - The hook selection (and any hook-specific params).
21908
+ * @param recipient - The end recipient the hook should credit (the intent's `dstAddress`).
21909
+ */
21910
+ static resolveDeliveryHook(chainKey, request, recipient) {
21911
+ const hook = getSpokeHook(chainKey, request.kind);
21912
+ invariant(hook, `No '${request.kind}' delivery hook is deployed on chain ${chainKey}`);
21913
+ return { dstAddress: hook.address, deliveryData: _HookService.encodeDeliveryData(request, recipient) };
21914
+ }
21915
+ /**
21916
+ * Resolves the effective delivery target for an intent. When {@link CreateIntentParams.hook} is set,
21917
+ * routes the output through that registered hook (overriding `dstAddress` and deriving `deliveryData`);
21918
+ * otherwise returns the caller's `dstAddress` and low-level `deliveryData` unchanged. Centralised so
21919
+ * both the hub and Sonic intent constructors apply hooks identically.
21920
+ *
21921
+ * @returns `{ dstAddress, deliveryData }` — the address to deliver to and the payload to forward.
21922
+ */
21923
+ static resolveDelivery(params) {
21924
+ if (!params.hook) {
21925
+ return { dstAddress: params.dstAddress, deliveryData: params.deliveryData };
21926
+ }
21927
+ return _HookService.resolveDeliveryHook(params.dstChainKey, params.hook, params.dstAddress);
21928
+ }
21929
+ };
21930
+ var ARRAY_DATA_ABI = [
21931
+ {
21932
+ type: "tuple",
21933
+ components: [
21934
+ {
21935
+ name: "data",
21936
+ type: "tuple[]",
21937
+ components: [
21938
+ { name: "dataType", type: "uint8" },
21939
+ { name: "data", type: "bytes" }
21940
+ ]
21941
+ }
21942
+ ]
21943
+ }
21944
+ ];
21945
+ var IntentDataService = class _IntentDataService {
21946
+ constructor() {
21947
+ }
21948
+ /**
21949
+ * Folds a partner-fee envelope and an optional delivery payload into the final `Intent.data`:
21950
+ * - Neither → `'0x'`.
21951
+ * - Exactly one → that single packed `[uint8 type, bytes payload]` envelope (byte-identical to a
21952
+ * bare fee envelope, so a fee-only intent's `data` is unchanged and stays decode-stable).
21953
+ * - Both → a `TYPE_ARRAY` envelope wrapping `[FEE, DELIVERY]` entries.
21954
+ *
21955
+ * @param feeEnvelope - The packed fee envelope from `EvmSolverService.createIntentFeeData` (`'0x'` if no fee).
21956
+ * @param deliveryData - Opaque delivery payload (e.g. from `HookService.encodeDeliveryData`), or `undefined`.
21957
+ */
21958
+ static composeIntentData(feeEnvelope, deliveryData) {
21959
+ const entries = [];
21960
+ if (feeEnvelope !== "0x") {
21961
+ entries.push({ type: 1 /* FEE */, data: `0x${feeEnvelope.slice(4)}` });
21962
+ }
21963
+ if (deliveryData && deliveryData !== "0x") {
21964
+ entries.push({ type: 3 /* DELIVERY */, data: deliveryData });
21965
+ }
21966
+ return _IntentDataService.encodeIntentData(entries);
21967
+ }
21968
+ /**
21969
+ * Encodes a list of typed `IntentData` entries into the `Intent.data` bytes the contract decodes.
21970
+ * Empty → `'0x'`; single → a packed `[uint8 type, bytes payload]` envelope; multiple → a `TYPE_ARRAY`
21971
+ * envelope wrapping the entries as `ArrayData { DataEntry[] }`.
21972
+ */
21973
+ static encodeIntentData(entries) {
21974
+ if (entries.length === 0) {
21975
+ return "0x";
21976
+ }
21977
+ const [first] = entries;
21978
+ if (first && entries.length === 1) {
21979
+ return encodePacked(["uint8", "bytes"], [first.type, first.data]);
21980
+ }
21981
+ const encodedArray = encodeAbiParameters(ARRAY_DATA_ABI, [
21982
+ { data: entries.map((e) => ({ dataType: e.type, data: e.data })) }
21983
+ ]);
21984
+ return encodePacked(["uint8", "bytes"], [0 /* ARRAY */, encodedArray]);
21985
+ }
21986
+ /**
21987
+ * Extracts the raw `FeeData` payload (`abi.encode(uint256 fee, address receiver)`) from an intent's
21988
+ * `data`, unwrapping whichever envelope shape it uses. Returns `undefined` when there is no fee:
21989
+ * empty `data`, a delivery-only envelope, or an unknown type byte (logged). Used by
21990
+ * `EvmSolverService.decodeIntentFeeAmount` to recover fees regardless of delivery data.
21991
+ */
21992
+ static extractFeePayload(data) {
21993
+ if (data === "0x" || data.length <= 2) {
21994
+ return void 0;
21995
+ }
21996
+ const typeByte = Number.parseInt(data.slice(2, 4), 16);
21997
+ if (typeByte === 1 /* FEE */) {
21998
+ return `0x${data.slice(4)}`;
21999
+ }
22000
+ if (typeByte === 0 /* ARRAY */) {
22001
+ const [arrayData] = decodeAbiParameters(ARRAY_DATA_ABI, `0x${data.slice(4)}`);
22002
+ return arrayData.data.find((e) => e.dataType === 1 /* FEE */)?.data;
22003
+ }
22004
+ if (typeByte === 3 /* DELIVERY */) {
22005
+ return void 0;
22006
+ }
22007
+ console.error(
22008
+ `[IntentDataService.extractFeePayload] Unknown IntentData type byte: ${typeByte}. Gracefully returning no fee.`
22009
+ );
22010
+ return void 0;
22011
+ }
22012
+ };
21830
22013
  var IntentCreatedEventAbi = getAbiItem({ abi: IntentsAbi, name: "IntentCreated" });
21831
22014
  var IntentFilledEventAbi = getAbiItem({ abi: IntentsAbi, name: "IntentFilled" });
21832
22015
  var MintPositionEventAbi = getAbiItem({ abi: CLPositionManagerAbi, name: "MintPosition" });
@@ -21865,7 +22048,9 @@ var EvmSolverService = class _EvmSolverService {
21865
22048
  outputToken,
21866
22049
  `hub asset not found for spoke chain token (intent.outputToken): ${createIntentParams.outputToken}`
21867
22050
  );
21868
- const [feeData, feeAmount] = _EvmSolverService.createIntentFeeData(fee, createIntentParams.inputAmount);
22051
+ const { dstAddress, deliveryData } = HookService.resolveDelivery(createIntentParams);
22052
+ const [feeEnvelope, feeAmount] = _EvmSolverService.createIntentFeeData(fee, createIntentParams.inputAmount);
22053
+ const intentData = IntentDataService.composeIntentData(feeEnvelope, deliveryData);
21869
22054
  const calls = [];
21870
22055
  const intentsContract = config.solver.intentsContract;
21871
22056
  const intent = {
@@ -21880,10 +22065,10 @@ var EvmSolverService = class _EvmSolverService {
21880
22065
  srcChain: getIntentRelayChainId(createIntentParams.srcChainKey),
21881
22066
  dstChain: getIntentRelayChainId(createIntentParams.dstChainKey),
21882
22067
  srcAddress: encodeAddress(createIntentParams.srcChainKey, createIntentParams.srcAddress),
21883
- dstAddress: encodeAddress(createIntentParams.dstChainKey, createIntentParams.dstAddress),
22068
+ dstAddress: encodeAddress(createIntentParams.dstChainKey, dstAddress),
21884
22069
  solver: createIntentParams.solver ?? "0x0000000000000000000000000000000000000000",
21885
- data: feeData
21886
- // fee amount will be deducted from the input amount
22070
+ data: intentData
22071
+ // fee amount will be deducted from the input amount; may also carry delivery data
21887
22072
  };
21888
22073
  calls.push(Erc20Service.encodeApprove(intent.inputToken, intentsContract, createIntentParams.inputAmount));
21889
22074
  calls.push(_EvmSolverService.encodeCreateIntent(intent, intentsContract));
@@ -21944,29 +22129,25 @@ var EvmSolverService = class _EvmSolverService {
21944
22129
  /**
21945
22130
  * Recovers the partner fee amount embedded in an intent's `data` field.
21946
22131
  *
21947
- * Exact inverse of {@link createIntentFeeData}: `'0x'` means no fee (`0n`); otherwise the first
21948
- * byte is the {@link IntentDataType} tag (from the `encodePacked(['uint8','bytes'], …)` envelope)
21949
- * and the remainder is the ABI-encoded `(uint256 fee, address receiver)` struct.
22132
+ * Inverse of {@link createIntentFeeData}: returns the encoded fee, regardless of whether the `data`
22133
+ * is a bare fee envelope or a multi-entry envelope that also carries delivery data. The envelope
22134
+ * parsing lives in {@link IntentDataService.extractFeePayload}; this method just decodes the fee struct.
21950
22135
  *
21951
22136
  * @param data - The intent's `data` field (`'0x'` when no fee was configured).
21952
- * @returns The fee amount in the input token's smallest unit (`0n` when no fee data is present, or
21953
- * when the leading type byte is not {@link IntentDataType.FEE} — in which case it logs and degrades to `0n`).
22137
+ * @returns The fee amount in the input token's smallest unit (`0n` when no fee is present).
21954
22138
  */
21955
22139
  static decodeIntentFeeAmount(data) {
21956
- if (data === "0x" || data.length <= 2) {
21957
- return 0n;
21958
- }
21959
- const typeByte = Number.parseInt(data.slice(2, 4), 16);
21960
- if (typeByte !== 1 /* FEE */) {
21961
- console.error(`[decodeIntentFeeAmount] Unknown IntentData type byte: ${typeByte}. Gracefully returning 0n.`);
21962
- return 0n;
21963
- }
22140
+ const feePayload = IntentDataService.extractFeePayload(data);
22141
+ return feePayload ? _EvmSolverService.decodeFeePayload(feePayload) : 0n;
22142
+ }
22143
+ /** Decodes a raw `FeeData` payload (`abi.encode(uint256 fee, address receiver)`) to its fee amount. */
22144
+ static decodeFeePayload(payload) {
21964
22145
  const [feeAmount] = decodeAbiParameters(
21965
22146
  [
21966
22147
  { name: "fee", type: "uint256" },
21967
22148
  { name: "receiver", type: "address" }
21968
22149
  ],
21969
- `0x${data.slice(4)}`
22150
+ payload
21970
22151
  );
21971
22152
  return feeAmount;
21972
22153
  }
@@ -22332,7 +22513,9 @@ var SonicSpokeService = class {
22332
22513
  outputToken,
22333
22514
  `hub asset not found for spoke chain token (intent.outputToken): ${createIntentParams.outputToken}`
22334
22515
  );
22335
- const [feeData, feeAmount] = EvmSolverService.createIntentFeeData(fee, createIntentParams.inputAmount);
22516
+ const { dstAddress, deliveryData } = HookService.resolveDelivery(createIntentParams);
22517
+ const [feeEnvelope, feeAmount] = EvmSolverService.createIntentFeeData(fee, createIntentParams.inputAmount);
22518
+ const intentData = IntentDataService.composeIntentData(feeEnvelope, deliveryData);
22336
22519
  const intentsContract = solverConfig2.intentsContract;
22337
22520
  const intent = {
22338
22521
  intentId: randomUint256(),
@@ -22346,10 +22529,10 @@ var SonicSpokeService = class {
22346
22529
  srcChain: getIntentRelayChainId(createIntentParams.srcChainKey),
22347
22530
  dstChain: getIntentRelayChainId(createIntentParams.dstChainKey),
22348
22531
  srcAddress: encodeAddress(createIntentParams.srcChainKey, createIntentParams.srcAddress),
22349
- dstAddress: encodeAddress(createIntentParams.dstChainKey, createIntentParams.dstAddress),
22532
+ dstAddress: encodeAddress(createIntentParams.dstChainKey, dstAddress),
22350
22533
  solver: createIntentParams.solver ?? "0x0000000000000000000000000000000000000000",
22351
- data: feeData
22352
- // fee amount will be deducted from the input amount
22534
+ data: intentData
22535
+ // fee amount will be deducted from the input amount; may also carry delivery data
22353
22536
  };
22354
22537
  const txData = EvmSolverService.encodeCreateIntent(intent, intentsContract);
22355
22538
  const rawTx = {
@@ -38416,4 +38599,4 @@ var isPartnerError = isCodeMember(PARTNER_CODES);
38416
38599
  (*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
38417
38600
  */
38418
38601
 
38419
- export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, AssetService, BITCOIN_CHAIN_KEYS, BITCOIN_CHAIN_KEYS_SET, BTC_WALLET_ADDRESS_TYPES, BackendApiService, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BitcoinSpokeService, BnUSDMigrationService, BridgeService, CHAIN_KEYS, CONFIG_VERSION, CREATE_INTENT_CODES, ChainKeys, ChainTypeArr, ClService, ConfigService, CustomSorobanServer, CustomStellarAccount, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, DexService, EVM_CHAIN_ID_TO_KEY, EVM_CHAIN_KEYS, EVM_CHAIN_KEYS_SET, EVM_SPOKE_ONLY_CHAIN_KEYS, EVM_SPOKE_ONLY_CHAIN_KEYS_SET, Erc20Service, Erc4626Service, EvmAssetManagerService, EvmHubProvider, EvmSolverService, EvmSpokeService, EvmVaultTokenService, FEE_PERCENTAGE_SCALE, GAS_ESTIMATION_CODES, HALF_RAY, HALF_WAD, HUB_CHAIN_KEY, HttpRelayError, HubVaultSymbols, ICON_CHAIN_KEYS, ICON_CHAIN_KEYS_SET, ICON_TX_RESULT_WAIT_MAX_RETRY, INJECTIVE_CHAIN_KEYS, INJECTIVE_CHAIN_KEYS_SET, INTENT_CHAIN_IDS, IconSpokeService, IcxMigrationService, Injective20Token, InjectiveSpokeService, IntentCreatedEventAbi, IntentDataType, IntentFilledEventAbi, IntentRelayChainIdToChainKey, IntentsAbi, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, LeverageYieldService, LockupMultiplier, LockupPeriod, LsodaSymbols, LsodaTokens, MAX_UINT256, MigrationService, MintPositionEventAbi, MoneyMarketDataService, MoneyMarketService, NEAR_CHAIN_KEYS, NEAR_CHAIN_KEYS_SET, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, PartnerFeeClaimService, PartnerService, Permit2Service, ProtocolIntentsAbi, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RadfiApiError, RadfiProvider, RecoveryService, RelayChainIdMap, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SOLANA_CHAIN_KEYS, SOLANA_CHAIN_KEYS_SET, SONIC_CHAIN_KEYS, SONIC_CHAIN_KEYS_SET, STACKS_CHAIN_KEYS, STACKS_CHAIN_KEYS_SET, STELLAR_CHAIN_KEYS, STELLAR_CHAIN_KEYS_SET, SUI_CHAIN_KEYS, SUI_CHAIN_KEYS_SET, SodaTokens, Sodax, SodaxError, SolanaSpokeService, SolverApiService, SolverIntentErrorCode, SolverIntentStatusCode, SonicSpokeService, SpokeService, StacksSpokeService, StakingLogic, StakingService, StatATokenAddresses, StellarSpokeService, SuiSpokeService, SupportedMigrationTokens, SwapService, USD_DECIMALS, UiPoolDataProviderService, VAULT_TOKEN_DECIMALS, WAD, WAD_RAY_RATIO, WEI_DECIMALS, adjustAmountByFee, allowanceCheckFailed, apiConfig, approveFailed, arbitrumSupportedTokens, assetManagerAbi, avalancheSupportedTokens, balnSwapAbi, baseChainInfo, baseSupportedTokens, binomialApproximatedRayPow, bitcoinSupportedTokens, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bridgeConfig, bridgeInvariant, bscSupportedTokens, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, concentratedLiquidityConfig, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, detectBitcoinAddressType, dexConfig, dexInvariant, dexPools, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, ethereumSupportedTokens, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getChainKeyFromRelayChainId, getChainType, getCompoundedBalance, getConcentratedLiquidityConfig, getConnectionIdl, getConnectionProgram, getEvmChainKeyByChainId, getEvmViemChain, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getStagingSolverTokens, getSupportedSolverTokens, getTransactionPackets, getbnUSDToken, hexToBigInt, hexToSolanaAddress, hubConfig, hyper, hyperevmSupportedTokens, iconSupportedTokens, injectiveSupportedTokens, intentCreationFailed, isBalnMigrateParams, isBitcoinChainKey, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexError, isEvmChainKey, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKey, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isHubChainKey, isHubChainKeyType, isIconAddress, isIconChainKey, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKey, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeToken, isNearChainKey, isNearChainKeyType, isNewbnUSDChainId, isNewbnUSDToken, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKey, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKey, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeChainKey, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isStacksChainKey, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKey, isStellarChainKeyType, isStellarWalletProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiChainKey, isSuiChainKeyType, isSupportedBitcoinAddressType, isSwapCreateIntentError, isSwapError, isSwapSupportedToken, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, isValidWalletProviderForChainKey, kaiaSupportedTokens, leverageYieldConfig, leverageYieldInvariant, leverageYieldVaults, lightlinkSupportedTokens, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, moneyMarketConfig, moneyMarketReserveAssets, moneyMarketSupportedTokens, nativeToUSD, nearSupportedTokens, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, optimismSupportedTokens, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, polygonSupportedTokens, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, redbellySupportedTokens, relayConfig, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxConfig, sodaxInvariant, solanaSupportedTokens, solverConfig, sonicSupportedTokens, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainKeysSet, stacksSupportedTokens, stagingSwapSupportedTokens, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, stellarSupportedTokens, submitTransaction, suiSupportedTokens, supportedSpokeChains, supportedTokensByChain, swapExactInSingleParamsAbi, swapInvariant, swapSupportedTokens, swapsConfig, uiPoolDataAbi, universalRouterAbi, unknownFailed, usesBip322MessageSigning, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
38602
+ export { ALLOWANCE_CHECK_CODES, APPROVE_CODES, AssetService, BITCOIN_CHAIN_KEYS, BITCOIN_CHAIN_KEYS_SET, BTC_WALLET_ADDRESS_TYPES, BackendApiService, BalnSwapService, BigIntToHex, BigNumberZeroDecimal, BitcoinSpokeService, BnUSDMigrationService, BridgeService, CHAIN_KEYS, CHAIN_LOGO_BASE_URL, CONFIG_VERSION, CREATE_INTENT_CODES, ChainKeys, ChainTypeArr, ClService, ConfigService, CustomSorobanServer, CustomStellarAccount, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, DexService, EVM_CHAIN_ID_TO_KEY, EVM_CHAIN_KEYS, EVM_CHAIN_KEYS_SET, EVM_SPOKE_ONLY_CHAIN_KEYS, EVM_SPOKE_ONLY_CHAIN_KEYS_SET, Erc20Service, Erc4626Service, EvmAssetManagerService, EvmHubProvider, EvmSolverService, EvmSpokeService, EvmVaultTokenService, FEE_PERCENTAGE_SCALE, GAS_ESTIMATION_CODES, HALF_RAY, HALF_WAD, HUB_CHAIN_KEY, HookKind, HookService, HttpRelayError, HubVaultSymbols, ICON_CHAIN_KEYS, ICON_CHAIN_KEYS_SET, ICON_TX_RESULT_WAIT_MAX_RETRY, INJECTIVE_CHAIN_KEYS, INJECTIVE_CHAIN_KEYS_SET, INTENT_CHAIN_IDS, IconSpokeService, IcxMigrationService, Injective20Token, InjectiveSpokeService, IntentCreatedEventAbi, IntentDataService, IntentDataType, IntentFilledEventAbi, IntentRelayChainIdToChainKey, IntentsAbi, LOOKUP_CODES, LTV_PRECISION, LendingPoolService, LeverageYieldService, LockupMultiplier, LockupPeriod, LsodaSymbols, LsodaTokens, MAX_UINT256, MigrationService, MintPositionEventAbi, MoneyMarketDataService, MoneyMarketService, NEAR_CHAIN_KEYS, NEAR_CHAIN_KEYS_SET, NEAR_DEFAULT_GAS, NEAR_STORAGE_DEPOSIT, NearSpokeService, PartnerFeeClaimService, PartnerService, Permit2Service, ProtocolIntentsAbi, RAY, RAY_DECIMALS, RELAY_ERROR_CODES, RadfiApiError, RadfiProvider, RecoveryService, RelayChainIdMap, SECONDS_PER_YEAR, SODAX_ERROR_CODES, SODAX_FEATURES, SOLANA_CHAIN_KEYS, SOLANA_CHAIN_KEYS_SET, SONIC_CHAIN_KEYS, SONIC_CHAIN_KEYS_SET, STACKS_CHAIN_KEYS, STACKS_CHAIN_KEYS_SET, STELLAR_CHAIN_KEYS, STELLAR_CHAIN_KEYS_SET, SUI_CHAIN_KEYS, SUI_CHAIN_KEYS_SET, SodaTokens, Sodax, SodaxError, SolanaSpokeService, SolverApiService, SolverIntentErrorCode, SolverIntentStatusCode, SonicSpokeService, SpokeService, StacksSpokeService, StakingLogic, StakingService, StatATokenAddresses, StellarSpokeService, SuiSpokeService, SupportedMigrationTokens, SwapService, USD_DECIMALS, UiPoolDataProviderService, VAULT_TOKEN_DECIMALS, WAD, WAD_RAY_RATIO, WEI_DECIMALS, adjustAmountByFee, allowanceCheckFailed, apiConfig, approveFailed, arbitrumSupportedTokens, assetManagerAbi, avalancheSupportedTokens, balnSwapAbi, baseChainInfo, baseSupportedTokens, binomialApproximatedRayPow, bitcoinSupportedTokens, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bridgeConfig, bridgeInvariant, bscSupportedTokens, calcOpReturnOutputVbytes, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, concentratedLiquidityConfig, connectionAbi, consoleLogger, convertTransactionInstructionToRaw, createInvariant, deepMerge, defaultHookAbi, detectBitcoinAddressType, dexConfig, dexInvariant, dexPools, encodeAddress, encodeBtcPayloadToBytes, encodeContractCalls, erc20Abi, erc4626Abi, estimateBitcoinTxSize, ethereumSupportedTokens, executionFailed, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, gasEstimationFailed, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getAssetManagerIdl, getAssetManagerProgram, getChainKeyFromRelayChainId, getChainType, getCompoundedBalance, getConcentratedLiquidityConfig, getConnectionIdl, getConnectionProgram, getEvmChainKeyByChainId, getEvmViemChain, getIconAddressBytes, getIntentRelayChainId, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getProvider, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getSolverConfig, getSpokeHook, getSpokeHooks, getStagingSolverTokens, getSupportedSolverTokens, getTransactionPackets, getbnUSDToken, hexToBigInt, hexToSolanaAddress, hubConfig, hyper, hyperevmSupportedTokens, iconSupportedTokens, injectiveSupportedTokens, intentCreationFailed, isBalnMigrateParams, isBitcoinChainKey, isBitcoinChainKeyType, isBitcoinWalletProviderType, isBridgeAllowanceCheckError, isBridgeApproveError, isBridgeCreateIntentError, isBridgeError, isBridgeLookupError, isBridgeOrchestrationError, isCodeMember, isDexError, isEvmChainKey, isEvmChainKeyType, isEvmSpokeChainConfig, isEvmSpokeOnlyChainKey, isEvmSpokeOnlyChainKeyType, isEvmWalletProviderType, isFeatureError, isHookSupportedToken, isHubChainKey, isHubChainKeyType, isIconAddress, isIconChainKey, isIconChainKeyType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveChainKey, isInjectiveChainKeyType, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isLeverageYieldAllowanceCheckError, isLeverageYieldApproveError, isLeverageYieldCreateIntentError, isLeverageYieldError, isLeverageYieldLookupError, isLeverageYieldPostExecutionError, isLeverageYieldSwapError, isMigrateOrchestrationError, isMigrationAllowanceCheckError, isMigrationApproveError, isMigrationCreateIntentError, isMigrationError, isMigrationLookupError, isMoneyMarketAllowanceCheckError, isMoneyMarketApproveError, isMoneyMarketCreateIntentError, isMoneyMarketError, isMoneyMarketGasEstimationError, isMoneyMarketOrchestrationError, isNativeToken, isNearChainKey, isNearChainKeyType, isNewbnUSDChainId, isNewbnUSDToken, isOptionalBitcoinWalletProviderType, isOptionalEvmWalletProviderType, isOptionalStellarWalletProviderType, isPartnerError, isPartnerFeeAmount, isPartnerFeePercentage, isPostExecutionError, isRawDestinationParams, isRecoveryError, isResponseAddressType, isResponseSigningType, isRevertMigrationOrchestrationError, isSodaxError, isSolanaChainKey, isSolanaChainKeyType, isSolanaNativeToken, isSonicChainKey, isSonicChainKeyType, isSpokeApproveParamsEvmSpoke, isSpokeApproveParamsHub, isSpokeApproveParamsStellar, isSpokeChainKey, isSpokeIsAllowanceValidParamsEvmSpoke, isSpokeIsAllowanceValidParamsHub, isSpokeIsAllowanceValidParamsStellar, isStacksChainKey, isStacksChainKeyType, isStakeOrchestrationError, isStakingAllowanceCheckError, isStakingApproveError, isStakingCreateIntentError, isStakingError, isStakingInfoFetchError, isStakingOrchestrationError, isStellarChainKey, isStellarChainKeyType, isStellarWalletProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiChainKey, isSuiChainKeyType, isSupportedBitcoinAddressType, isSwapCreateIntentError, isSwapError, isSwapSupportedToken, isUndefinedOrValidWalletProviderForChainKey, isUnifiedBnUSDMigrateParams, isValidWalletProviderForChainKey, kaiaSupportedTokens, leverageYieldConfig, leverageYieldInvariant, leverageYieldVaults, lightlinkSupportedTokens, lookupFailed, mapRelayFailure, mergeSodaxConfig, messageOf, migrationInvariant, mintPositionParamsAbi, mmInvariant, modifyLiquidityParamsAbi, moneyMarketConfig, moneyMarketReserveAssets, moneyMarketSupportedTokens, nativeToUSD, nearSupportedTokens, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizePsbtToBase64, normalizeSignatureToBase64, normalizedToUsd, optimismSupportedTokens, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, partnerInvariant, permit2Abi, polygonSupportedTokens, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, recoveryInvariant, redbellySupportedTokens, relayConfig, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, resolveLogger, retry, reverseEncodeAddress, serializeAddressData, silentLogger, sleep, sodaxConfig, sodaxInvariant, solanaSupportedTokens, solverConfig, sonicSupportedTokens, sonicWalletFactoryAbi, spokeAssetManagerAbi, spokeChainConfig, spokeChainKeysSet, spokeHooks, stacksSupportedTokens, stagingSwapSupportedTokens, stakedSodaAbi, stakingInvariant, stakingRouterAbi, stataTokenFactoryAbi, stellarSupportedTokens, submitTransaction, suiSupportedTokens, supportedSpokeChains, supportedTokensByChain, swapExactInSingleParamsAbi, swapInvariant, swapSupportedTokens, swapsConfig, uiPoolDataAbi, universalRouterAbi, unknownFailed, usesBip322MessageSigning, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, verifyFailed, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "2.0.0-rc.16",
7
+ "version": "2.0.0-rc.17",
8
8
  "license": "MIT",
9
9
  "description": "Sodax SDK",
10
10
  "keywords": [
@@ -66,8 +66,8 @@
66
66
  "near-api-js": "7.2.0",
67
67
  "rlp": "3.0.0",
68
68
  "viem": "2.29.2",
69
- "@sodax/libs": "2.0.0-rc.16",
70
- "@sodax/types": "2.0.0-rc.16"
69
+ "@sodax/types": "2.0.0-rc.17",
70
+ "@sodax/libs": "2.0.0-rc.17"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@arethetypeswrong/cli": "0.17.4",