@glacislabs/stablegenie-zerodelta 4.16.0 → 4.17.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/README.md CHANGED
@@ -168,7 +168,7 @@ sits in a payment path.
168
168
  | `trustedApiOrigin` | — | The single absolute origin permitted to receive `apiKey`, e.g. `https://pay.example.com`. Omit and no absolute origin is trusted — same-origin only. |
169
169
  | `provider` | EIP-6963 / `window.ethereum` | Inject the host's EIP-1193 provider to reuse an existing connection. |
170
170
  | `theme` | light/dark | `{ accent, bg, surface, text, border, radius, font, mode }` — mirrors the ZeroDelta palette. |
171
- | `rpcOverrides` | registry / bundled | Per-chain RPC for on-chain settlement verification. |
171
+ | `rpcOverrides` | registry / bundled | Per-chain RPC for on-chain settlement verification. Key `1151111081099710` (Solana) replaces the bundled Solana RPCs. |
172
172
 
173
173
  `StableGenieProvider` can supply these once for multiple widgets.
174
174
 
@@ -194,7 +194,10 @@ The wallet always owns the final signature. In addition:
194
194
  `eth_getTransactionReceipt` with status `0x1` over a bundled public RPC before reporting success.
195
195
  A broadcast-but-unmined or reverted transaction surfaces as `pending`/`reverted`, and **`onSuccess`
196
196
  does not fire** for either — treat that callback as "the money moved", because that is what it means.
197
- - **No telemetry.** The only network calls are to your `apiBase`, to the RPC used for verification,
197
+ - **No telemetry.** The only network calls are to your `apiBase`, to the RPC used for verification
198
+ (for a Solana payment, `solana-rpc.publicnode.com` then `api.mainnet-beta.solana.com`, from the
199
+ payer's browser — add both to your CSP `connect-src`, or every Solana call falls back to your
200
+ proxy's `/solana-rpc` relay),
198
201
  and image loads for token artwork: the registry's https `logoUrl` when it ships one, otherwise the
199
202
  same CoinGecko images the ZeroDelta dapp draws (`BUNDLED_TOKEN_LOGO`, `coin-images.coingecko.com`).
200
203
  Chain marks are embedded in the bundle and load nothing. A blocked or failed image falls back to
@@ -158,6 +158,7 @@ var BUNDLED_RPC = {
158
158
  42161: "https://arb1.arbitrum.io/rpc",
159
159
  98866: "https://rpc.plume.org"
160
160
  };
161
+ var BUNDLED_SOLANA_RPC = ["https://solana-rpc.publicnode.com", "https://api.mainnet-beta.solana.com"];
161
162
  var CHAIN_DISPLAY_NAMES = Object.freeze({
162
163
  1: "Ethereum",
163
164
  10: "Optimism",
@@ -1206,7 +1207,7 @@ function buildPayOptions({ invoiceAsset, invoiceChainId, tokens, routes, chains,
1206
1207
  if (refusal(token)) continue;
1207
1208
  seen.add(key);
1208
1209
  const payKey = symbolKey(token.symbol);
1209
- const direct = chainId === invoiceChain && payKey === invoiceKey;
1210
+ const direct2 = chainId === invoiceChain && payKey === invoiceKey;
1210
1211
  options.push({
1211
1212
  symbol: token.symbol,
1212
1213
  symbolKey: payKey,
@@ -1219,7 +1220,7 @@ function buildPayOptions({ invoiceAsset, invoiceChainId, tokens, routes, chains,
1219
1220
  logoUrl: token.logoUrl,
1220
1221
  bridge: routeBridge.get(`${payKey}:${chainId}`) || token.bridge,
1221
1222
  sameChain: chainId === invoiceChain,
1222
- direct
1223
+ direct: direct2
1223
1224
  });
1224
1225
  }
1225
1226
  options.sort((a, b) => {
@@ -1240,6 +1241,56 @@ function buildPayOptions({ invoiceAsset, invoiceChainId, tokens, routes, chains,
1240
1241
  return options;
1241
1242
  }
1242
1243
 
1244
+ // src/core/solana-rpc.ts
1245
+ var ATTEMPT_TIMEOUT_MS = 12e3;
1246
+ var REFUSAL_CODES = /* @__PURE__ */ new Set([-32005, -32029, -32052, 403, 429]);
1247
+ function refusesService(body) {
1248
+ const error = body.error;
1249
+ if (!error) return false;
1250
+ if (REFUSAL_CODES.has(error.code)) return true;
1251
+ return error.code === -32602 && /personal token/i.test(String(error.message ?? ""));
1252
+ }
1253
+ function unwrap(body) {
1254
+ if (body.error && solanaLamportShortfall(body.error.data?.logs) !== null) throw new Error(SOL_SHORTFALL_MESSAGE);
1255
+ if (body.error || body.result === void 0) throw new Error(String(body.error?.message || "Invalid Solana RPC response."));
1256
+ return body.result;
1257
+ }
1258
+ async function direct(fetchImpl, url, payload) {
1259
+ const controller = new AbortController();
1260
+ const timer = setTimeout(() => controller.abort(), ATTEMPT_TIMEOUT_MS);
1261
+ try {
1262
+ const response = await fetchImpl(url, { method: "POST", headers: { "Content-Type": "application/json" }, body: payload, signal: controller.signal });
1263
+ if (!response.ok) return { refused: `HTTP ${response.status}` };
1264
+ const body = await response.json().catch(() => null);
1265
+ if (!body || typeof body !== "object" || Array.isArray(body)) return { refused: "not a JSON-RPC body" };
1266
+ if (refusesService(body)) return { refused: `refused (${String(body.error?.code)})` };
1267
+ return { body };
1268
+ } catch (error) {
1269
+ return { refused: controller.signal.aborted ? "timed out" : error instanceof Error ? error.message : String(error) };
1270
+ } finally {
1271
+ clearTimeout(timer);
1272
+ }
1273
+ }
1274
+ function createSolanaRpc(api, fetchImpl = globalThis.fetch?.bind(globalThis), urls = BUNDLED_SOLANA_RPC) {
1275
+ return async (method, params) => {
1276
+ const payload = JSON.stringify({ jsonrpc: "2.0", id: 1, method, params });
1277
+ const refused = [];
1278
+ for (const url of urls) {
1279
+ const attempt = await direct(fetchImpl, url, payload);
1280
+ if ("body" in attempt) return unwrap(attempt.body);
1281
+ refused.push(`${new URL(url).host}: ${attempt.refused}`);
1282
+ }
1283
+ let relayed;
1284
+ try {
1285
+ relayed = await api.apiRequest("/solana-rpc", { method: "POST", body: payload, timeoutMs: 15e3 });
1286
+ } catch (error) {
1287
+ refused.push(`proxy: ${error instanceof Error ? error.message : String(error)}`);
1288
+ throw new Error(`No Solana RPC answered ${method} (${refused.join("; ")}).`);
1289
+ }
1290
+ return unwrap(relayed);
1291
+ };
1292
+ }
1293
+
1243
1294
  // src/core/solana-source.ts
1244
1295
  var CANONICAL_SOLANA_PROGRAM = "zd1E5feCJLNYaPPsBAYkCPMKGVnipYf8God9h917W33";
1245
1296
  var MAX_ASK_OVER_FINAL_BPS = 200n;
@@ -1489,18 +1540,6 @@ async function buildSolanaSourcePlan(api, input, quoted) {
1489
1540
  });
1490
1541
  return plan;
1491
1542
  }
1492
- function createSolanaRpc(api) {
1493
- return async (method, params) => {
1494
- const body = await api.apiRequest("/solana-rpc", {
1495
- method: "POST",
1496
- body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params }),
1497
- timeoutMs: 15e3
1498
- });
1499
- if (body.error && solanaLamportShortfall(body.error.data?.logs) !== null) throw new Error(SOL_SHORTFALL_MESSAGE);
1500
- if (body.error || body.result === void 0) throw new Error(body.error?.message || "Invalid Solana RPC response.");
1501
- return body.result;
1502
- };
1503
- }
1504
1543
  var SolanaSendError = class extends Error {
1505
1544
  constructor(message, signature, sentAt) {
1506
1545
  super(message);
@@ -1647,6 +1686,10 @@ async function readSolanaBalance(rpc, owner, mint) {
1647
1686
  try {
1648
1687
  solanaKeyBytes(owner);
1649
1688
  solanaKeyBytes(mint);
1689
+ } catch {
1690
+ return void 0;
1691
+ }
1692
+ try {
1650
1693
  const result = await rpc("getTokenAccountsByOwner", [owner, { mint }, { encoding: "jsonParsed", commitment: "confirmed" }]);
1651
1694
  if (!Array.isArray(result.value)) throw new Error("Invalid token accounts.");
1652
1695
  let total = 0n, decimals;
@@ -1657,10 +1700,30 @@ async function readSolanaBalance(rpc, owner, mint) {
1657
1700
  total += BigInt(raw(amount.amount, "token balance"));
1658
1701
  }
1659
1702
  return total;
1703
+ } catch {
1704
+ }
1705
+ try {
1706
+ return await associatedBalance(rpc, owner, mint);
1660
1707
  } catch {
1661
1708
  return void 0;
1662
1709
  }
1663
1710
  }
1711
+ async function associatedBalance(rpc, owner, mint) {
1712
+ const programs = [TOKEN_PROGRAM, TOKEN_2022_PROGRAM];
1713
+ const keys = [...programs.map((p) => associatedTokenAddress(owner, mint, p)), mint];
1714
+ const result = await rpc("getMultipleAccounts", [keys, { encoding: "jsonParsed", commitment: "confirmed" }]);
1715
+ const accounts = result?.value;
1716
+ if (!Array.isArray(accounts) || accounts.length !== keys.length) throw new Error("Invalid token accounts.");
1717
+ if (!accounts[2] || !programs.includes(accounts[2].owner)) throw new Error("Not a token mint.");
1718
+ let total = 0n;
1719
+ for (const [i, account] of accounts.slice(0, 2).entries()) {
1720
+ if (!account) continue;
1721
+ const info = account.data?.parsed?.info;
1722
+ if (account.owner !== programs[i] || info?.mint !== mint) throw new Error("Invalid token account.");
1723
+ total += BigInt(raw(info?.tokenAmount?.amount, "token balance"));
1724
+ }
1725
+ return total;
1726
+ }
1664
1727
  function solanaLamportShortfall(logs) {
1665
1728
  if (!Array.isArray(logs)) return null;
1666
1729
  for (const line of logs) {
@@ -2917,7 +2980,7 @@ var CHANNEL_HEADER = "x-zd-channel";
2917
2980
  var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
2918
2981
  var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
2919
2982
  var WIDGET_CHANNEL = "widget";
2920
- var WIDGET_VERSION = "4.16.0" ;
2983
+ var WIDGET_VERSION = "4.17.0" ;
2921
2984
  var MAX_CHANNEL_VERSION_LEN = 32;
2922
2985
  function sanitizeVersion(raw2) {
2923
2986
  const v = String(raw2).trim();
@@ -4019,7 +4082,8 @@ function createEngine(config = {}) {
4019
4082
  const resolved = resolveConfig(config);
4020
4083
  const api = createApiClient(resolved);
4021
4084
  const verifier = createVerifier(api, resolved.fetchImpl, resolved.rpcOverrides);
4022
- const solanaRpc = createSolanaRpc(api);
4085
+ const solanaOverride = resolved.rpcOverrides[SOLANA_CHAIN_ID];
4086
+ const solanaRpc = createSolanaRpc(api, resolved.fetchImpl, solanaOverride && /^https?:\/\//i.test(solanaOverride) ? [solanaOverride] : BUNDLED_SOLANA_RPC);
4023
4087
  return {
4024
4088
  api,
4025
4089
  verifier,
@@ -4085,4 +4149,4 @@ function createEngine(config = {}) {
4085
4149
  };
4086
4150
  }
4087
4151
 
4088
- export { API_CACHE_TTL_MS, BLOCK_LABEL_DEFAULT, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, COMPLIANCE_CHECK_ORDER, COMPLIANCE_DENY_LABEL, DEFAULT_WIDGET_API_BASE, DIRECT_CHECK_IDS, DIRECT_SCOPE_NOTE, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, FLOOR_CATEGORIES, LZ_FEE_BUFFER_BPS, MAX_LZ_MSG_VALUE_WEI, MAX_LZ_MSG_VALUE_WEI_BY_CHAIN, MAX_QUOTE_CANDIDATES, MAX_SAME_CLASS_PAY_BPS, MAX_UINT64, NO_PARTNER_ID, PREVIEW_OWNER, QUOTE_BUFFER_BPS, SAME_CLASS_STABLE, SCREENING_BUCKETS, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SolanaSendError, TRACKING, TRADEABLE_RWA_ASSETS, TUNABLE_CATEGORIES, WALLET_HISTORY_LIMIT, ZERO_ADDRESS, addressWord, allowanceCovers, amountFieldError, apiError, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetClassOf, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, blockLabelFor, brokenLaneFor, brokenLaneReason, buildCatalogue, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, bytes32Word, bytesEqual, bytesPayload, canAttachApiKey, categoryLabel, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, classifyQuoteError, complianceChecks, complianceControlsEvaluated, complianceControlsLine, complianceReasonHead, complianceReasonTag, complianceTagOf, complianceView, cosignSolanaEvent, counterpartTokens, createApiClient, createEngine, createSolanaRpc, createVerifier, decodeSolanaSubmitOrder, decodeSubmitOrderCalldata, deriveSolanaEvent, destinationAvailability, destinationKeys, directComplianceFromScreens, distinctScreenedWallets, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, exceedsLaneLimit, executableRoutes, executeSolanaPlan, executeSolanaPlanStaged, executionChainIds, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, finalOf, findProgramAddress, findToken, foldTicker, formatJurisdiction, formatNative, formatUnits, hasReachableDestination, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, hubDeliverableSymbols, humanizeComplianceReason, isAddress, isChainAddress, isDeliverable, isExecutableBridge, isHexAddress, isHexData, isHexQuantity, isKnownUnbridgeable, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSellableRwa, isSolanaAddress, isSolanaChainId, isSourceToken, isSubmitOrder, laneAvailabilityState, laneKey, laneKeys, laneLimitAmount, laneLimitError, laneLimitFor, laneLimitHint, laneLimitSymbol, limitedLanes, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, overwriteBlockhash, parseAddressLookupTable, parseAllowedApiBase, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, productAssets, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, registryRpc, requiresNativeBridgeFee, resolveApiBase, resolveConfig, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, screeningOutcomeOf, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenKey, tokenTicker, txMatchesPlan, uint64Word, uintWord, unattributedComplianceReasons, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, withVaultArtwork };
4152
+ export { API_CACHE_TTL_MS, BLOCK_LABEL_DEFAULT, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BUNDLED_SOLANA_RPC, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, COMPLIANCE_CHECK_ORDER, COMPLIANCE_DENY_LABEL, DEFAULT_WIDGET_API_BASE, DIRECT_CHECK_IDS, DIRECT_SCOPE_NOTE, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, FLOOR_CATEGORIES, LZ_FEE_BUFFER_BPS, MAX_LZ_MSG_VALUE_WEI, MAX_LZ_MSG_VALUE_WEI_BY_CHAIN, MAX_QUOTE_CANDIDATES, MAX_SAME_CLASS_PAY_BPS, MAX_UINT64, NO_PARTNER_ID, PREVIEW_OWNER, QUOTE_BUFFER_BPS, SAME_CLASS_STABLE, SCREENING_BUCKETS, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SolanaSendError, TOKEN_2022_PROGRAM, TOKEN_PROGRAM, TRACKING, TRADEABLE_RWA_ASSETS, TUNABLE_CATEGORIES, WALLET_HISTORY_LIMIT, ZERO_ADDRESS, addressWord, allowanceCovers, amountFieldError, apiError, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetClassOf, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, blockLabelFor, brokenLaneFor, brokenLaneReason, buildCatalogue, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, bytes32Word, bytesEqual, bytesPayload, canAttachApiKey, categoryLabel, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, classifyQuoteError, complianceChecks, complianceControlsEvaluated, complianceControlsLine, complianceReasonHead, complianceReasonTag, complianceTagOf, complianceView, cosignSolanaEvent, counterpartTokens, createApiClient, createEngine, createSolanaRpc, createVerifier, decodeSolanaSubmitOrder, decodeSubmitOrderCalldata, deriveSolanaEvent, destinationAvailability, destinationKeys, directComplianceFromScreens, distinctScreenedWallets, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, exceedsLaneLimit, executableRoutes, executeSolanaPlan, executeSolanaPlanStaged, executionChainIds, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, finalOf, findProgramAddress, findToken, foldTicker, formatJurisdiction, formatNative, formatUnits, hasReachableDestination, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, hubDeliverableSymbols, humanizeComplianceReason, isAddress, isChainAddress, isDeliverable, isExecutableBridge, isHexAddress, isHexData, isHexQuantity, isKnownUnbridgeable, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSellableRwa, isSolanaAddress, isSolanaChainId, isSourceToken, isSubmitOrder, laneAvailabilityState, laneKey, laneKeys, laneLimitAmount, laneLimitError, laneLimitFor, laneLimitHint, laneLimitSymbol, limitedLanes, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, overwriteBlockhash, parseAddressLookupTable, parseAllowedApiBase, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, productAssets, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, registryRpc, requiresNativeBridgeFee, resolveApiBase, resolveConfig, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, screeningOutcomeOf, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenKey, tokenTicker, txMatchesPlan, uint64Word, uintWord, unattributedComplianceReasons, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, withVaultArtwork };
@@ -1,4 +1,4 @@
1
- import { CHAIN_DISPLAY_NAMES, EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, complianceView, complianceTagOf, symbolKey, normalizeDecimalText, findToken, laneLimitFor, laneLimitSymbol, tokenTicker, exceedsLaneLimit, assetDecimals, parseUnitsDecimal, counterpartTokens, assetClassOf, brokenLaneFor, brokenLaneReason, destinationAvailability, laneLimitHint, tickerOn, laneLimitError, routeNativeValue, formatNative, nativeSymbol, isSolanaChainId, isSellableRwa, formatUnits, amountFieldError, solanaQuoteCompliance, directComplianceFromScreens, SUPPORTED_CHAIN_IDS, complianceChecks, DIRECT_CHECK_IDS, isSolanaAddress, createEngine, isAddress, checkNativeFee, nativeFeeShortLabel, nativeFeeShortMessage, allowanceCovers, validatePlannedTransaction, TRACKING, mergeHistory, solanaPlanNeedsPreparation, SOLANA_CHAIN_ID, unattributedComplianceReasons, distinctScreenedWallets, formatJurisdiction, humanizeComplianceReason, DIRECT_SCOPE_NOTE, categoryLabel, SCREENING_BUCKETS, BUNDLED_RPC, foldTicker } from './chunk-7FBWRHP2.js';
1
+ import { CHAIN_DISPLAY_NAMES, EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, complianceView, complianceTagOf, symbolKey, normalizeDecimalText, findToken, laneLimitFor, laneLimitSymbol, tokenTicker, exceedsLaneLimit, assetDecimals, parseUnitsDecimal, counterpartTokens, assetClassOf, brokenLaneFor, brokenLaneReason, destinationAvailability, laneLimitHint, tickerOn, laneLimitError, routeNativeValue, formatNative, nativeSymbol, isSolanaChainId, isSellableRwa, formatUnits, amountFieldError, solanaQuoteCompliance, directComplianceFromScreens, SUPPORTED_CHAIN_IDS, complianceChecks, DIRECT_CHECK_IDS, isSolanaAddress, createEngine, isAddress, checkNativeFee, nativeFeeShortLabel, nativeFeeShortMessage, allowanceCovers, validatePlannedTransaction, TRACKING, mergeHistory, solanaPlanNeedsPreparation, SOLANA_CHAIN_ID, unattributedComplianceReasons, distinctScreenedWallets, formatJurisdiction, humanizeComplianceReason, DIRECT_SCOPE_NOTE, categoryLabel, SCREENING_BUCKETS, BUNDLED_RPC, foldTicker } from './chunk-5GVQQIGQ.js';
2
2
  import { createContext, useState, useRef, useMemo, useEffect, useCallback, useId, useLayoutEffect, createElement, useContext, useSyncExternalStore, useReducer } from 'react';
3
3
  import { createRoot } from 'react-dom/client';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -730,6 +730,7 @@ var BUNDLED_RPC = {
730
730
  42161: "https://arb1.arbitrum.io/rpc",
731
731
  98866: "https://rpc.plume.org"
732
732
  };
733
+ var BUNDLED_SOLANA_RPC = ["https://solana-rpc.publicnode.com", "https://api.mainnet-beta.solana.com"];
733
734
  var CHAIN_DISPLAY_NAMES = Object.freeze({
734
735
  1: "Ethereum",
735
736
  10: "Optimism",
@@ -1778,7 +1779,7 @@ function buildPayOptions({ invoiceAsset, invoiceChainId, tokens, routes, chains,
1778
1779
  if (refusal(token)) continue;
1779
1780
  seen.add(key);
1780
1781
  const payKey = symbolKey(token.symbol);
1781
- const direct = chainId === invoiceChain && payKey === invoiceKey;
1782
+ const direct2 = chainId === invoiceChain && payKey === invoiceKey;
1782
1783
  options.push({
1783
1784
  symbol: token.symbol,
1784
1785
  symbolKey: payKey,
@@ -1791,7 +1792,7 @@ function buildPayOptions({ invoiceAsset, invoiceChainId, tokens, routes, chains,
1791
1792
  logoUrl: token.logoUrl,
1792
1793
  bridge: routeBridge.get(`${payKey}:${chainId}`) || token.bridge,
1793
1794
  sameChain: chainId === invoiceChain,
1794
- direct
1795
+ direct: direct2
1795
1796
  });
1796
1797
  }
1797
1798
  options.sort((a, b) => {
@@ -1812,6 +1813,56 @@ function buildPayOptions({ invoiceAsset, invoiceChainId, tokens, routes, chains,
1812
1813
  return options;
1813
1814
  }
1814
1815
 
1816
+ // src/core/solana-rpc.ts
1817
+ var ATTEMPT_TIMEOUT_MS = 12e3;
1818
+ var REFUSAL_CODES = /* @__PURE__ */ new Set([-32005, -32029, -32052, 403, 429]);
1819
+ function refusesService(body) {
1820
+ const error = body.error;
1821
+ if (!error) return false;
1822
+ if (REFUSAL_CODES.has(error.code)) return true;
1823
+ return error.code === -32602 && /personal token/i.test(String(error.message ?? ""));
1824
+ }
1825
+ function unwrap(body) {
1826
+ if (body.error && solanaLamportShortfall(body.error.data?.logs) !== null) throw new Error(SOL_SHORTFALL_MESSAGE);
1827
+ if (body.error || body.result === void 0) throw new Error(String(body.error?.message || "Invalid Solana RPC response."));
1828
+ return body.result;
1829
+ }
1830
+ async function direct(fetchImpl, url, payload) {
1831
+ const controller = new AbortController();
1832
+ const timer = setTimeout(() => controller.abort(), ATTEMPT_TIMEOUT_MS);
1833
+ try {
1834
+ const response = await fetchImpl(url, { method: "POST", headers: { "Content-Type": "application/json" }, body: payload, signal: controller.signal });
1835
+ if (!response.ok) return { refused: `HTTP ${response.status}` };
1836
+ const body = await response.json().catch(() => null);
1837
+ if (!body || typeof body !== "object" || Array.isArray(body)) return { refused: "not a JSON-RPC body" };
1838
+ if (refusesService(body)) return { refused: `refused (${String(body.error?.code)})` };
1839
+ return { body };
1840
+ } catch (error) {
1841
+ return { refused: controller.signal.aborted ? "timed out" : error instanceof Error ? error.message : String(error) };
1842
+ } finally {
1843
+ clearTimeout(timer);
1844
+ }
1845
+ }
1846
+ function createSolanaRpc(api, fetchImpl = globalThis.fetch?.bind(globalThis), urls = BUNDLED_SOLANA_RPC) {
1847
+ return async (method, params) => {
1848
+ const payload = JSON.stringify({ jsonrpc: "2.0", id: 1, method, params });
1849
+ const refused = [];
1850
+ for (const url of urls) {
1851
+ const attempt = await direct(fetchImpl, url, payload);
1852
+ if ("body" in attempt) return unwrap(attempt.body);
1853
+ refused.push(`${new URL(url).host}: ${attempt.refused}`);
1854
+ }
1855
+ let relayed;
1856
+ try {
1857
+ relayed = await api.apiRequest("/solana-rpc", { method: "POST", body: payload, timeoutMs: 15e3 });
1858
+ } catch (error) {
1859
+ refused.push(`proxy: ${error instanceof Error ? error.message : String(error)}`);
1860
+ throw new Error(`No Solana RPC answered ${method} (${refused.join("; ")}).`);
1861
+ }
1862
+ return unwrap(relayed);
1863
+ };
1864
+ }
1865
+
1815
1866
  // src/core/solana-source.ts
1816
1867
  var CANONICAL_SOLANA_PROGRAM = "zd1E5feCJLNYaPPsBAYkCPMKGVnipYf8God9h917W33";
1817
1868
  var MAX_ASK_OVER_FINAL_BPS = 200n;
@@ -2061,18 +2112,6 @@ async function buildSolanaSourcePlan(api, input, quoted) {
2061
2112
  });
2062
2113
  return plan;
2063
2114
  }
2064
- function createSolanaRpc(api) {
2065
- return async (method, params) => {
2066
- const body = await api.apiRequest("/solana-rpc", {
2067
- method: "POST",
2068
- body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params }),
2069
- timeoutMs: 15e3
2070
- });
2071
- if (body.error && solanaLamportShortfall(body.error.data?.logs) !== null) throw new Error(SOL_SHORTFALL_MESSAGE);
2072
- if (body.error || body.result === void 0) throw new Error(body.error?.message || "Invalid Solana RPC response.");
2073
- return body.result;
2074
- };
2075
- }
2076
2115
  var SolanaSendError = class extends Error {
2077
2116
  constructor(message, signature, sentAt) {
2078
2117
  super(message);
@@ -2219,6 +2258,10 @@ async function readSolanaBalance(rpc, owner, mint) {
2219
2258
  try {
2220
2259
  solanaKeyBytes(owner);
2221
2260
  solanaKeyBytes(mint);
2261
+ } catch {
2262
+ return void 0;
2263
+ }
2264
+ try {
2222
2265
  const result = await rpc("getTokenAccountsByOwner", [owner, { mint }, { encoding: "jsonParsed", commitment: "confirmed" }]);
2223
2266
  if (!Array.isArray(result.value)) throw new Error("Invalid token accounts.");
2224
2267
  let total = 0n, decimals;
@@ -2229,10 +2272,30 @@ async function readSolanaBalance(rpc, owner, mint) {
2229
2272
  total += BigInt(raw(amount.amount, "token balance"));
2230
2273
  }
2231
2274
  return total;
2275
+ } catch {
2276
+ }
2277
+ try {
2278
+ return await associatedBalance(rpc, owner, mint);
2232
2279
  } catch {
2233
2280
  return void 0;
2234
2281
  }
2235
2282
  }
2283
+ async function associatedBalance(rpc, owner, mint) {
2284
+ const programs = [TOKEN_PROGRAM, TOKEN_2022_PROGRAM];
2285
+ const keys = [...programs.map((p) => associatedTokenAddress(owner, mint, p)), mint];
2286
+ const result = await rpc("getMultipleAccounts", [keys, { encoding: "jsonParsed", commitment: "confirmed" }]);
2287
+ const accounts = result?.value;
2288
+ if (!Array.isArray(accounts) || accounts.length !== keys.length) throw new Error("Invalid token accounts.");
2289
+ if (!accounts[2] || !programs.includes(accounts[2].owner)) throw new Error("Not a token mint.");
2290
+ let total = 0n;
2291
+ for (const [i, account] of accounts.slice(0, 2).entries()) {
2292
+ if (!account) continue;
2293
+ const info = account.data?.parsed?.info;
2294
+ if (account.owner !== programs[i] || info?.mint !== mint) throw new Error("Invalid token account.");
2295
+ total += BigInt(raw(info?.tokenAmount?.amount, "token balance"));
2296
+ }
2297
+ return total;
2298
+ }
2236
2299
  function solanaLamportShortfall(logs) {
2237
2300
  if (!Array.isArray(logs)) return null;
2238
2301
  for (const line of logs) {
@@ -3489,7 +3552,7 @@ var CHANNEL_HEADER = "x-zd-channel";
3489
3552
  var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
3490
3553
  var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
3491
3554
  var WIDGET_CHANNEL = "widget";
3492
- var WIDGET_VERSION = "4.16.0" ;
3555
+ var WIDGET_VERSION = "4.17.0" ;
3493
3556
  var MAX_CHANNEL_VERSION_LEN = 32;
3494
3557
  function sanitizeVersion(raw2) {
3495
3558
  const v = String(raw2).trim();
@@ -4591,7 +4654,8 @@ function createEngine(config = {}) {
4591
4654
  const resolved = resolveConfig(config);
4592
4655
  const api = createApiClient(resolved);
4593
4656
  const verifier = createVerifier(api, resolved.fetchImpl, resolved.rpcOverrides);
4594
- const solanaRpc = createSolanaRpc(api);
4657
+ const solanaOverride = resolved.rpcOverrides[SOLANA_CHAIN_ID];
4658
+ const solanaRpc = createSolanaRpc(api, resolved.fetchImpl, solanaOverride && /^https?:\/\//i.test(solanaOverride) ? [solanaOverride] : BUNDLED_SOLANA_RPC);
4595
4659
  return {
4596
4660
  api,
4597
4661
  verifier,
@@ -4666,6 +4730,7 @@ exports.API_CACHE_TTL_MS = API_CACHE_TTL_MS;
4666
4730
  exports.BLOCK_LABEL_DEFAULT = BLOCK_LABEL_DEFAULT;
4667
4731
  exports.BUNDLED_NATIVE_SYMBOL = BUNDLED_NATIVE_SYMBOL;
4668
4732
  exports.BUNDLED_RPC = BUNDLED_RPC;
4733
+ exports.BUNDLED_SOLANA_RPC = BUNDLED_SOLANA_RPC;
4669
4734
  exports.CANONICAL_DECIMALS = CANONICAL_DECIMALS;
4670
4735
  exports.CANONICAL_ESCROW = CANONICAL_ESCROW;
4671
4736
  exports.CANONICAL_INBOUND_BRIDGE = CANONICAL_INBOUND_BRIDGE;
@@ -4707,6 +4772,8 @@ exports.SUBMIT_ORDER_SELECTOR = SUBMIT_ORDER_SELECTOR;
4707
4772
  exports.SUPPORTED_ASSETS = SUPPORTED_ASSETS;
4708
4773
  exports.SUPPORTED_CHAIN_IDS = SUPPORTED_CHAIN_IDS;
4709
4774
  exports.SolanaSendError = SolanaSendError;
4775
+ exports.TOKEN_2022_PROGRAM = TOKEN_2022_PROGRAM;
4776
+ exports.TOKEN_PROGRAM = TOKEN_PROGRAM;
4710
4777
  exports.TRACKING = TRACKING;
4711
4778
  exports.TRADEABLE_RWA_ASSETS = TRADEABLE_RWA_ASSETS;
4712
4779
  exports.TUNABLE_CATEGORIES = TUNABLE_CATEGORIES;
@@ -47,6 +47,7 @@ declare const SAME_CLASS_STABLE: ReadonlySet<string>;
47
47
  declare const MAX_SAME_CLASS_PAY_BPS = 30000n;
48
48
  declare const BUNDLED_NATIVE_SYMBOL: Record<number, string>;
49
49
  declare const BUNDLED_RPC: Record<number, string>;
50
+ declare const BUNDLED_SOLANA_RPC: readonly string[];
50
51
  declare const CHAIN_DISPLAY_NAMES: Readonly<Record<number, string>>;
51
52
 
52
53
  declare function symbolKey(value: unknown): string;
@@ -68,6 +69,8 @@ declare function isSolanaAddress(value: unknown): boolean;
68
69
  declare function solanaKeyHex(value: string): string | null;
69
70
  declare function hexToSolanaKey(value: string): string | null;
70
71
  type SolanaBridge = "cctp" | "layerzero";
72
+ declare const TOKEN_PROGRAM = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
73
+ declare const TOKEN_2022_PROGRAM = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
71
74
  type SolanaAssetPin = Readonly<{
72
75
  symbol: string;
73
76
  decimals: number;
@@ -235,6 +238,12 @@ declare function buildSwapPlan(api: ApiClient, swap: SwapInput, payer: string, w
235
238
  chainId?: number;
236
239
  }): Promise<Plan>;
237
240
 
241
+ /**
242
+ * One Solana JSON-RPC call: each URL in `urls` in order, then the integrator's proxy relay. Falls through
243
+ * on a network error, a timeout, a non-2xx status or a JSON-RPC refusal of service.
244
+ */
245
+ declare function createSolanaRpc(api: ApiClient, fetchImpl?: typeof fetch, urls?: readonly string[]): SolanaRpc;
246
+
238
247
  /**
239
248
  * The ZeroDelta Solana program every Solana-source transaction must target. Read on-chain 2026-10-27:
240
249
  * owned by BPFLoaderUpgradeab1e11111111111111111111111, executable. Never taken from an API response.
@@ -335,7 +344,7 @@ declare function previewSolanaSource(api: ApiClient, input: Pick<SolanaSourceInp
335
344
  */
336
345
  declare function solanaQuoteCompliance(quote: Pick<NativeSolanaQuote, "compliance" | "complianceDecision"> | null | undefined): Compliance | undefined;
337
346
  declare function buildSolanaSourcePlan(api: ApiClient, input: SolanaSourceInput, quoted?: SolanaSourcePreview): Promise<SolanaSourcePlan>;
338
- declare function createSolanaRpc(api: ApiClient): SolanaRpc;
347
+
339
348
  declare class SolanaSendError extends Error {
340
349
  readonly signature: string;
341
350
  readonly sentAt: number;
@@ -366,6 +375,12 @@ declare function executeSolanaPlanStaged(input: {
366
375
  }>;
367
376
  /** Whether a plan still has preparation to sign before its submit. */
368
377
  declare function solanaPlanNeedsPreparation(plan: SolanaSourcePlan): boolean;
378
+ /**
379
+ * Every token account the owner holds for the mint, summed (`getTokenAccountsByOwner`). That method is
380
+ * INDEXED and publicnode refuses it, so the call falls through to the next endpoint; when every endpoint
381
+ * refuses it, the owner's associated token accounts are read instead (zd-dapp solanaBalanceImpl.ts).
382
+ * Fails open: undefined means "unknown", never 0.
383
+ */
369
384
  declare function readSolanaBalance(rpc: SolanaRpc, owner: string, mint: string): Promise<bigint | undefined>;
370
385
  interface SolanaOrderCost {
371
386
  lamports: number;
@@ -1033,4 +1048,4 @@ interface Engine {
1033
1048
  /** Create an engine bound to a config. Its 60s registry cache is shared with every engine of the same base and key (api.ts › registryCacheFor). */
1034
1049
  declare function createEngine(config?: EngineConfig): Engine;
1035
1050
 
1036
- export { API_CACHE_TTL_MS, ApiClient, type AssertQuoteArgs, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BalanceEntry, type BalanceReader, BalanceTarget, type BuildPayOptionsArgs, type BuildRouteArgs, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, Catalogue, Chain, Compliance, DEFAULT_WIDGET_API_BASE, type DecodedOrderRequest, type DecodedSubmitOrder, type DeliveryPhase, type DeliveryStatus, type DeliveryStep, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, type Engine, EngineConfig, ExchangeProduct, type ExpectedOrder, FetchQuoteFn, LZ_FEE_BUFFER_BPS, MAX_LZ_MSG_VALUE_WEI, MAX_LZ_MSG_VALUE_WEI_BY_CHAIN, MAX_QUOTE_CANDIDATES, MAX_SAME_CLASS_PAY_BPS, MAX_UINT64, NO_PARTNER_ID, type NativeFeeCheck, type NativeSolanaOption, type NativeSolanaQuote, type NativeSolanaQuoteRequest, NormalizedOrder, OrderRequest, PREVIEW_OWNER, type ParsedSolanaTransaction, PayOption, type PayRequest, type PaymentWalletContext, Plan, PlannedTx, QUOTE_BUFFER_BPS, Quote, Route, RouteResult, RwaVault, SAME_CLASS_STABLE, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SanitizedTxEntry, type SolanaBridge, type SolanaOrderCost, type SolanaProgress, type SolanaProgressStage, type SolanaRpc, type SolanaRpcAccount, SolanaSendError, type SolanaSigner, type SolanaSourceInput, type SolanaSourcePlan, type SolanaSourcePreview, type SolanaSubmitOrder, type SolanaTransaction, type SolveArgs, SolveResult, SwapInput, type SwapPreview, TRACKING, TRADEABLE_RWA_ASSETS, Token, TxHistoryEntry, type ValidatedSwap, Verifier, WALLET_HISTORY_LIMIT, ZERO_ADDRESS, addressWord, allowanceCovers, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, bytes32Word, bytesEqual, bytesPayload, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, cosignSolanaEvent, createEngine, createSolanaRpc, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, deriveSolanaEvent, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, executeSolanaPlan, executeSolanaPlanStaged, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, finalOf, findProgramAddress, findToken, foldTicker, formatNative, formatUnits, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, isAddress, isChainAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSolanaAddress, isSolanaChainId, isSubmitOrder, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, overwriteBlockhash, parseAddressLookupTable, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, requiresNativeBridgeFee, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenTicker, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, withVaultArtwork };
1051
+ export { API_CACHE_TTL_MS, ApiClient, type AssertQuoteArgs, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BUNDLED_SOLANA_RPC, BalanceEntry, type BalanceReader, BalanceTarget, type BuildPayOptionsArgs, type BuildRouteArgs, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, Catalogue, Chain, Compliance, DEFAULT_WIDGET_API_BASE, type DecodedOrderRequest, type DecodedSubmitOrder, type DeliveryPhase, type DeliveryStatus, type DeliveryStep, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, type Engine, EngineConfig, ExchangeProduct, type ExpectedOrder, FetchQuoteFn, LZ_FEE_BUFFER_BPS, MAX_LZ_MSG_VALUE_WEI, MAX_LZ_MSG_VALUE_WEI_BY_CHAIN, MAX_QUOTE_CANDIDATES, MAX_SAME_CLASS_PAY_BPS, MAX_UINT64, NO_PARTNER_ID, type NativeFeeCheck, type NativeSolanaOption, type NativeSolanaQuote, type NativeSolanaQuoteRequest, NormalizedOrder, OrderRequest, PREVIEW_OWNER, type ParsedSolanaTransaction, PayOption, type PayRequest, type PaymentWalletContext, Plan, PlannedTx, QUOTE_BUFFER_BPS, Quote, Route, RouteResult, RwaVault, SAME_CLASS_STABLE, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SanitizedTxEntry, type SolanaBridge, type SolanaOrderCost, type SolanaProgress, type SolanaProgressStage, type SolanaRpc, type SolanaRpcAccount, SolanaSendError, type SolanaSigner, type SolanaSourceInput, type SolanaSourcePlan, type SolanaSourcePreview, type SolanaSubmitOrder, type SolanaTransaction, type SolveArgs, SolveResult, SwapInput, type SwapPreview, TOKEN_2022_PROGRAM, TOKEN_PROGRAM, TRACKING, TRADEABLE_RWA_ASSETS, Token, TxHistoryEntry, type ValidatedSwap, Verifier, WALLET_HISTORY_LIMIT, ZERO_ADDRESS, addressWord, allowanceCovers, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, bytes32Word, bytesEqual, bytesPayload, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, cosignSolanaEvent, createEngine, createSolanaRpc, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, deriveSolanaEvent, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, executeSolanaPlan, executeSolanaPlanStaged, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, finalOf, findProgramAddress, findToken, foldTicker, formatNative, formatUnits, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, isAddress, isChainAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSolanaAddress, isSolanaChainId, isSubmitOrder, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, overwriteBlockhash, parseAddressLookupTable, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, requiresNativeBridgeFee, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenTicker, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, withVaultArtwork };
@@ -47,6 +47,7 @@ declare const SAME_CLASS_STABLE: ReadonlySet<string>;
47
47
  declare const MAX_SAME_CLASS_PAY_BPS = 30000n;
48
48
  declare const BUNDLED_NATIVE_SYMBOL: Record<number, string>;
49
49
  declare const BUNDLED_RPC: Record<number, string>;
50
+ declare const BUNDLED_SOLANA_RPC: readonly string[];
50
51
  declare const CHAIN_DISPLAY_NAMES: Readonly<Record<number, string>>;
51
52
 
52
53
  declare function symbolKey(value: unknown): string;
@@ -68,6 +69,8 @@ declare function isSolanaAddress(value: unknown): boolean;
68
69
  declare function solanaKeyHex(value: string): string | null;
69
70
  declare function hexToSolanaKey(value: string): string | null;
70
71
  type SolanaBridge = "cctp" | "layerzero";
72
+ declare const TOKEN_PROGRAM = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
73
+ declare const TOKEN_2022_PROGRAM = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
71
74
  type SolanaAssetPin = Readonly<{
72
75
  symbol: string;
73
76
  decimals: number;
@@ -235,6 +238,12 @@ declare function buildSwapPlan(api: ApiClient, swap: SwapInput, payer: string, w
235
238
  chainId?: number;
236
239
  }): Promise<Plan>;
237
240
 
241
+ /**
242
+ * One Solana JSON-RPC call: each URL in `urls` in order, then the integrator's proxy relay. Falls through
243
+ * on a network error, a timeout, a non-2xx status or a JSON-RPC refusal of service.
244
+ */
245
+ declare function createSolanaRpc(api: ApiClient, fetchImpl?: typeof fetch, urls?: readonly string[]): SolanaRpc;
246
+
238
247
  /**
239
248
  * The ZeroDelta Solana program every Solana-source transaction must target. Read on-chain 2026-10-27:
240
249
  * owned by BPFLoaderUpgradeab1e11111111111111111111111, executable. Never taken from an API response.
@@ -335,7 +344,7 @@ declare function previewSolanaSource(api: ApiClient, input: Pick<SolanaSourceInp
335
344
  */
336
345
  declare function solanaQuoteCompliance(quote: Pick<NativeSolanaQuote, "compliance" | "complianceDecision"> | null | undefined): Compliance | undefined;
337
346
  declare function buildSolanaSourcePlan(api: ApiClient, input: SolanaSourceInput, quoted?: SolanaSourcePreview): Promise<SolanaSourcePlan>;
338
- declare function createSolanaRpc(api: ApiClient): SolanaRpc;
347
+
339
348
  declare class SolanaSendError extends Error {
340
349
  readonly signature: string;
341
350
  readonly sentAt: number;
@@ -366,6 +375,12 @@ declare function executeSolanaPlanStaged(input: {
366
375
  }>;
367
376
  /** Whether a plan still has preparation to sign before its submit. */
368
377
  declare function solanaPlanNeedsPreparation(plan: SolanaSourcePlan): boolean;
378
+ /**
379
+ * Every token account the owner holds for the mint, summed (`getTokenAccountsByOwner`). That method is
380
+ * INDEXED and publicnode refuses it, so the call falls through to the next endpoint; when every endpoint
381
+ * refuses it, the owner's associated token accounts are read instead (zd-dapp solanaBalanceImpl.ts).
382
+ * Fails open: undefined means "unknown", never 0.
383
+ */
369
384
  declare function readSolanaBalance(rpc: SolanaRpc, owner: string, mint: string): Promise<bigint | undefined>;
370
385
  interface SolanaOrderCost {
371
386
  lamports: number;
@@ -1033,4 +1048,4 @@ interface Engine {
1033
1048
  /** Create an engine bound to a config. Its 60s registry cache is shared with every engine of the same base and key (api.ts › registryCacheFor). */
1034
1049
  declare function createEngine(config?: EngineConfig): Engine;
1035
1050
 
1036
- export { API_CACHE_TTL_MS, ApiClient, type AssertQuoteArgs, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BalanceEntry, type BalanceReader, BalanceTarget, type BuildPayOptionsArgs, type BuildRouteArgs, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, Catalogue, Chain, Compliance, DEFAULT_WIDGET_API_BASE, type DecodedOrderRequest, type DecodedSubmitOrder, type DeliveryPhase, type DeliveryStatus, type DeliveryStep, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, type Engine, EngineConfig, ExchangeProduct, type ExpectedOrder, FetchQuoteFn, LZ_FEE_BUFFER_BPS, MAX_LZ_MSG_VALUE_WEI, MAX_LZ_MSG_VALUE_WEI_BY_CHAIN, MAX_QUOTE_CANDIDATES, MAX_SAME_CLASS_PAY_BPS, MAX_UINT64, NO_PARTNER_ID, type NativeFeeCheck, type NativeSolanaOption, type NativeSolanaQuote, type NativeSolanaQuoteRequest, NormalizedOrder, OrderRequest, PREVIEW_OWNER, type ParsedSolanaTransaction, PayOption, type PayRequest, type PaymentWalletContext, Plan, PlannedTx, QUOTE_BUFFER_BPS, Quote, Route, RouteResult, RwaVault, SAME_CLASS_STABLE, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SanitizedTxEntry, type SolanaBridge, type SolanaOrderCost, type SolanaProgress, type SolanaProgressStage, type SolanaRpc, type SolanaRpcAccount, SolanaSendError, type SolanaSigner, type SolanaSourceInput, type SolanaSourcePlan, type SolanaSourcePreview, type SolanaSubmitOrder, type SolanaTransaction, type SolveArgs, SolveResult, SwapInput, type SwapPreview, TRACKING, TRADEABLE_RWA_ASSETS, Token, TxHistoryEntry, type ValidatedSwap, Verifier, WALLET_HISTORY_LIMIT, ZERO_ADDRESS, addressWord, allowanceCovers, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, bytes32Word, bytesEqual, bytesPayload, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, cosignSolanaEvent, createEngine, createSolanaRpc, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, deriveSolanaEvent, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, executeSolanaPlan, executeSolanaPlanStaged, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, finalOf, findProgramAddress, findToken, foldTicker, formatNative, formatUnits, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, isAddress, isChainAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSolanaAddress, isSolanaChainId, isSubmitOrder, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, overwriteBlockhash, parseAddressLookupTable, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, requiresNativeBridgeFee, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenTicker, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, withVaultArtwork };
1051
+ export { API_CACHE_TTL_MS, ApiClient, type AssertQuoteArgs, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BUNDLED_SOLANA_RPC, BalanceEntry, type BalanceReader, BalanceTarget, type BuildPayOptionsArgs, type BuildRouteArgs, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, Catalogue, Chain, Compliance, DEFAULT_WIDGET_API_BASE, type DecodedOrderRequest, type DecodedSubmitOrder, type DeliveryPhase, type DeliveryStatus, type DeliveryStep, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, type Engine, EngineConfig, ExchangeProduct, type ExpectedOrder, FetchQuoteFn, LZ_FEE_BUFFER_BPS, MAX_LZ_MSG_VALUE_WEI, MAX_LZ_MSG_VALUE_WEI_BY_CHAIN, MAX_QUOTE_CANDIDATES, MAX_SAME_CLASS_PAY_BPS, MAX_UINT64, NO_PARTNER_ID, type NativeFeeCheck, type NativeSolanaOption, type NativeSolanaQuote, type NativeSolanaQuoteRequest, NormalizedOrder, OrderRequest, PREVIEW_OWNER, type ParsedSolanaTransaction, PayOption, type PayRequest, type PaymentWalletContext, Plan, PlannedTx, QUOTE_BUFFER_BPS, Quote, Route, RouteResult, RwaVault, SAME_CLASS_STABLE, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SanitizedTxEntry, type SolanaBridge, type SolanaOrderCost, type SolanaProgress, type SolanaProgressStage, type SolanaRpc, type SolanaRpcAccount, SolanaSendError, type SolanaSigner, type SolanaSourceInput, type SolanaSourcePlan, type SolanaSourcePreview, type SolanaSubmitOrder, type SolanaTransaction, type SolveArgs, SolveResult, SwapInput, type SwapPreview, TOKEN_2022_PROGRAM, TOKEN_PROGRAM, TRACKING, TRADEABLE_RWA_ASSETS, Token, TxHistoryEntry, type ValidatedSwap, Verifier, WALLET_HISTORY_LIMIT, ZERO_ADDRESS, addressWord, allowanceCovers, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, bytes32Word, bytesEqual, bytesPayload, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, cosignSolanaEvent, createEngine, createSolanaRpc, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, deriveSolanaEvent, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, executeSolanaPlan, executeSolanaPlanStaged, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, finalOf, findProgramAddress, findToken, foldTicker, formatNative, formatUnits, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, isAddress, isChainAddress, isDeliverable, isHexAddress, isHexData, isHexQuantity, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSolanaAddress, isSolanaChainId, isSubmitOrder, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, overwriteBlockhash, parseAddressLookupTable, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, requiresNativeBridgeFee, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, stableGenieIntentSchema, strip0x, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenTicker, uint64Word, uintWord, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, withVaultArtwork };
@@ -1 +1 @@
1
- export { API_CACHE_TTL_MS, BLOCK_LABEL_DEFAULT, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, COMPLIANCE_CHECK_ORDER, COMPLIANCE_DENY_LABEL, DEFAULT_WIDGET_API_BASE, DIRECT_CHECK_IDS, DIRECT_SCOPE_NOTE, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, FLOOR_CATEGORIES, LZ_FEE_BUFFER_BPS, MAX_LZ_MSG_VALUE_WEI, MAX_LZ_MSG_VALUE_WEI_BY_CHAIN, MAX_QUOTE_CANDIDATES, MAX_SAME_CLASS_PAY_BPS, MAX_UINT64, NO_PARTNER_ID, PREVIEW_OWNER, QUOTE_BUFFER_BPS, SAME_CLASS_STABLE, SCREENING_BUCKETS, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SolanaSendError, TRACKING, TRADEABLE_RWA_ASSETS, TUNABLE_CATEGORIES, WALLET_HISTORY_LIMIT, ZERO_ADDRESS, addressWord, allowanceCovers, amountFieldError, apiError, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetClassOf, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, blockLabelFor, brokenLaneFor, brokenLaneReason, buildCatalogue, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, bytes32Word, bytesEqual, bytesPayload, canAttachApiKey, categoryLabel, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, classifyQuoteError, complianceChecks, complianceControlsEvaluated, complianceControlsLine, complianceReasonHead, complianceReasonTag, complianceTagOf, complianceView, cosignSolanaEvent, counterpartTokens, createApiClient, createEngine, createSolanaRpc, createVerifier, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, deriveSolanaEvent, destinationAvailability, destinationKeys, directComplianceFromScreens, distinctScreenedWallets, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, exceedsLaneLimit, executableRoutes, executeSolanaPlan, executeSolanaPlanStaged, executionChainIds, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, finalOf, findProgramAddress, findToken, foldTicker, formatJurisdiction, formatNative, formatUnits, hasReachableDestination, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, hubDeliverableSymbols, humanizeComplianceReason, isAddress, isChainAddress, isDeliverable, isExecutableBridge, isHexAddress, isHexData, isHexQuantity, isKnownUnbridgeable, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSellableRwa, isSolanaAddress, isSolanaChainId, isSourceToken, isSubmitOrder, laneAvailabilityState, laneKey, laneKeys, laneLimitAmount, laneLimitError, laneLimitFor, laneLimitHint, laneLimitSymbol, limitedLanes, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, overwriteBlockhash, parseAddressLookupTable, parseAllowedApiBase, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, productAssets, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, registryRpc, requiresNativeBridgeFee, resolveApiBase, resolveConfig, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, screeningOutcomeOf, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenKey, tokenTicker, txMatchesPlan, uint64Word, uintWord, unattributedComplianceReasons, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, withVaultArtwork } from '../chunk-7FBWRHP2.js';
1
+ export { API_CACHE_TTL_MS, BLOCK_LABEL_DEFAULT, BUNDLED_NATIVE_SYMBOL, BUNDLED_RPC, BUNDLED_SOLANA_RPC, CANONICAL_DECIMALS, CANONICAL_ESCROW, CANONICAL_INBOUND_BRIDGE, CANONICAL_SOLANA_PROGRAM, CHAIN_DISPLAY_NAMES, COMPLIANCE_CHECK_ORDER, COMPLIANCE_DENY_LABEL, DEFAULT_WIDGET_API_BASE, DIRECT_CHECK_IDS, DIRECT_SCOPE_NOTE, ERC20_ALLOWANCE_SELECTOR, ERC20_APPROVE_SELECTOR, ERC20_BALANCEOF_SELECTOR, ERC20_TRANSFER_SELECTOR, EXECUTABLE_STABLE_ASSETS, FLOOR_CATEGORIES, LZ_FEE_BUFFER_BPS, MAX_LZ_MSG_VALUE_WEI, MAX_LZ_MSG_VALUE_WEI_BY_CHAIN, MAX_QUOTE_CANDIDATES, MAX_SAME_CLASS_PAY_BPS, MAX_UINT64, NO_PARTNER_ID, PREVIEW_OWNER, QUOTE_BUFFER_BPS, SAME_CLASS_STABLE, SCREENING_BUCKETS, SCREEN_CACHE_TTL_MS, SOLANA_CHAIN_ID, SOLANA_DESTINATION_ASSETS, SOL_SHORTFALL_MESSAGE, STABLEGENIE_INTENT_TTL_MS, STABLEGENIE_INTENT_VERSION, STABLEGENIE_SUPPORTED_ASSETS, STABLEGENIE_SUPPORTED_CHAIN_IDS, STABLE_ASSETS, SUBMIT_ORDER_DISCRIMINATOR, SUBMIT_ORDER_SELECTOR, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, SolanaSendError, TOKEN_2022_PROGRAM, TOKEN_PROGRAM, TRACKING, TRADEABLE_RWA_ASSETS, TUNABLE_CATEGORIES, WALLET_HISTORY_LIMIT, ZERO_ADDRESS, addressWord, allowanceCovers, amountFieldError, apiError, applyLayerZeroBuffer, askCovers, askTokenDecimals, assertAddress, assertChainAddress, assertQuoteMatchesSelection, assertWalletMessage, assetClassOf, assetDecimals, associatedTokenAddress, base58Decode, base58Encode, base64Decode, base64Encode, blockLabelFor, brokenLaneFor, brokenLaneReason, buildCatalogue, buildPayOptions, buildRoute, buildSolanaSourcePlan, buildSwapPlan, bytes32Word, bytesEqual, bytesPayload, canAttachApiKey, categoryLabel, chainAddressKey, chainById, chainNameOf, chainSelectable, checkEscrow, checkNativeFee, checkSolanaPlan as checkPlan, checkSolanaPlan, checkSolanaProgram, checkSolanaReceiver, checkSolanaRouteBuffer, classifyQuoteError, complianceChecks, complianceControlsEvaluated, complianceControlsLine, complianceReasonHead, complianceReasonTag, complianceTagOf, complianceView, cosignSolanaEvent, counterpartTokens, createApiClient, createEngine, createSolanaRpc, createVerifier, decodeSolanaSubmitOrder, decodeSolanaSubmitOrder as decodeSubmitOrder, decodeSubmitOrderCalldata, deriveSolanaEvent, destinationAvailability, destinationKeys, directComplianceFromScreens, distinctScreenedWallets, encodeAllowance, encodeApprove, encodeBalanceOf, encodeNextSolanaOrders, encodeSubmitOrder, encodeTransfer, exceedsLaneLimit, executableRoutes, executeSolanaPlan, executeSolanaPlanStaged, executionChainIds, expectedSolanaDelivery, fetchDelivery, fetchPaymentPlan, fetchWalletHistory, finalOf, findProgramAddress, findToken, foldTicker, formatJurisdiction, formatNative, formatUnits, hasReachableDestination, hexBytes, hexToSolanaKey, historyEntryFromOrder, historyKey, hubDeliverableSymbols, humanizeComplianceReason, isAddress, isChainAddress, isDeliverable, isExecutableBridge, isHexAddress, isHexData, isHexQuantity, isKnownUnbridgeable, isLayerZeroRoute, isOnEd25519Curve, isPreparationInstruction, isSellableRwa, isSolanaAddress, isSolanaChainId, isSourceToken, isSubmitOrder, laneAvailabilityState, laneKey, laneKeys, laneLimitAmount, laneLimitError, laneLimitFor, laneLimitHint, laneLimitSymbol, limitedLanes, maxDeadlineSeconds, maxNativeFeeWei, mergeHistory, nativeFeeShortLabel, nativeFeeShortMessage, nativeSymbol, normalizeAddress, normalizeDecimalText, normalizeDelivery, normalizeOrderRequest, normalizeOrderRequests, overwriteBlockhash, parseAddressLookupTable, parseAllowedApiBase, parseSolanaTransaction, parseUnitsDecimal, placeSignature, planErrorSummary, planMsgValueHex, pollSolanaConfirmation, previewSolanaSource, productAssets, quotePartnerId, quotePayOption, quoteSolanaSource, quoteSwapPreview, readSolanaBalance, recommendedDeadlineSeconds, registryRpc, requiresNativeBridgeFee, resolveApiBase, resolveConfig, resolveSolanaKeys, resolveSwapReceiver, resolveVaultIcon, routeNativeValue, safeTicker, scaleDecimals, screeningOutcomeOf, serializeSolanaTransaction, sha256, simulateSolanaCost, solanaBridgeOf, solanaDestinationAsset, solanaKeyBytes, solanaKeyHex, solanaLamportShortfall, solanaPlanNeedsPreparation, solanaQuoteCompliance, solveExactIn, solveExactOut, sourceKeys, stableGenieIntentSchema, strip0x, suppressedLanes, symbolKey, tickerOn, toHexQuantity, tokenEnabled, tokenKey, tokenTicker, txMatchesPlan, uint64Word, uintWord, unattributedComplianceReasons, validateDestination, validatePlannedTransaction, validateSwap, vaultIconsBySymbol, verifySolanaSubmit, verifySolanaTransaction, verifySolanaSubmit as verifySubmit, verifySolanaTransaction as verifyTransaction, withVaultArtwork } from '../chunk-5GVQQIGQ.js';