@funkit/fun-relay 2.2.3-next.0 → 2.4.0

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
@@ -454,6 +454,8 @@ import { MAINNET_RELAY_API as MAINNET_RELAY_API4 } from "@relayprotocol/relay-sd
454
454
  async function getRelayAssetInfo({
455
455
  chainId,
456
456
  address,
457
+ // https://fun-xyz.slack.com/archives/C08MQ85QB2N/p1770674350731879?thread_ts=1770670744.270889&cid=C08MQ85QB2N
458
+ useExternalSearch = true,
457
459
  apiKey
458
460
  }) {
459
461
  const relayChainId = convertFunToRelayChainId(Number(chainId));
@@ -468,7 +470,8 @@ async function getRelayAssetInfo({
468
470
  });
469
471
  const body = {
470
472
  chainIds: [relayChainId],
471
- address: relayTokenAddress
473
+ address: relayTokenAddress,
474
+ useExternalSearch
472
475
  };
473
476
  const response = await fetch(url, {
474
477
  method: "POST",
@@ -573,7 +576,7 @@ async function getRelayQuote({
573
576
  const relayClient = getRelayClient();
574
577
  const isSameChainFlow = String(fromChainId) === String(toChainId);
575
578
  const txs = actionParams?.map((action) => {
576
- const data = encodeFunctionData({
579
+ const data = action.rawCalldata ?? encodeFunctionData({
577
580
  abi: action.contractAbi,
578
581
  args: action.functionArgs,
579
582
  functionName: action.functionName
@@ -1833,6 +1836,7 @@ export {
1833
1836
  LogLevel,
1834
1837
  RELAY_BITCOIN_CHAIN_ID,
1835
1838
  RELAY_BITCOIN_CHAIN_ID_NUMBER,
1839
+ RELAY_LIGHTER_CHAIN_ID,
1836
1840
  RELAY_NATIVE_TOKEN,
1837
1841
  RELAY_NATIVE_TOKEN_BITCOIN,
1838
1842
  RELAY_NATIVE_TOKEN_HYPERCORE,