@glacislabs/stablegenie-zerodelta 4.16.0 → 4.18.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
@@ -1,8 +1,8 @@
1
1
  // src/core/constants.ts
2
2
  var DEFAULT_WIDGET_API_BASE = "/api/widget/v1";
3
3
  var SUPPORTED_CHAIN_IDS = /* @__PURE__ */ new Set([1, 10, 42161, 8453, 57073, 130, 9745, 146, 98866]);
4
- var EXECUTABLE_STABLE_ASSETS = /* @__PURE__ */ new Set(["USDC", "USDT", "USDE", "USDTB", "AUSD", "PYUSD", "USDG"]);
5
- var STABLE_ASSETS = /* @__PURE__ */ new Set([...EXECUTABLE_STABLE_ASSETS, "USD1", "WM", "USDS", "DAI", "RLUSD"]);
4
+ var EXECUTABLE_STABLE_ASSETS = /* @__PURE__ */ new Set(["USDC", "USDT", "USDE", "USDTB", "AUSD", "PYUSD", "USDG", "USD1", "WM", "USDS", "DAI", "RLUSD"]);
5
+ var STABLE_ASSETS = EXECUTABLE_STABLE_ASSETS;
6
6
  var TRADEABLE_RWA_ASSETS = /* @__PURE__ */ new Set([
7
7
  "XAUT",
8
8
  // Nest vault shares — chained delivery on Plume, sellable from their Ethereum deployment.
@@ -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",
@@ -1114,11 +1115,13 @@ function buildCatalogue(input) {
1114
1115
  }
1115
1116
  const allowed = tokens.filter((token) => token.isEnabled !== false && isChainAddress(token.chainId, token.address) && allowedAssets.has(symbolKey(token.symbol)));
1116
1117
  const projectedCatalogue = allowed.filter((token) => {
1117
- if (!chainIds.has(Number(token.chainId))) return false;
1118
+ const chainId = Number(token.chainId);
1119
+ if (!chainIds.has(chainId)) return false;
1118
1120
  if (product === "rwa") return true;
1121
+ if (execution.has(chainId) || token.isChainedDestination === true) return true;
1119
1122
  if (!isExecutableBridge(token)) return false;
1120
1123
  const key = tokenKey(token.chainId, token.address);
1121
- return source.has(key) || destination.has(key) || execution.has(Number(token.chainId));
1124
+ return source.has(key) || destination.has(key);
1122
1125
  });
1123
1126
  const ready = chains.length > 0 && routes.length > 0 && projectedCatalogue.length > 0;
1124
1127
  const catalogue = ready ? projectedCatalogue : allowed;
@@ -1206,7 +1209,7 @@ function buildPayOptions({ invoiceAsset, invoiceChainId, tokens, routes, chains,
1206
1209
  if (refusal(token)) continue;
1207
1210
  seen.add(key);
1208
1211
  const payKey = symbolKey(token.symbol);
1209
- const direct = chainId === invoiceChain && payKey === invoiceKey;
1212
+ const direct2 = chainId === invoiceChain && payKey === invoiceKey;
1210
1213
  options.push({
1211
1214
  symbol: token.symbol,
1212
1215
  symbolKey: payKey,
@@ -1219,7 +1222,7 @@ function buildPayOptions({ invoiceAsset, invoiceChainId, tokens, routes, chains,
1219
1222
  logoUrl: token.logoUrl,
1220
1223
  bridge: routeBridge.get(`${payKey}:${chainId}`) || token.bridge,
1221
1224
  sameChain: chainId === invoiceChain,
1222
- direct
1225
+ direct: direct2
1223
1226
  });
1224
1227
  }
1225
1228
  options.sort((a, b) => {
@@ -1240,6 +1243,56 @@ function buildPayOptions({ invoiceAsset, invoiceChainId, tokens, routes, chains,
1240
1243
  return options;
1241
1244
  }
1242
1245
 
1246
+ // src/core/solana-rpc.ts
1247
+ var ATTEMPT_TIMEOUT_MS = 12e3;
1248
+ var REFUSAL_CODES = /* @__PURE__ */ new Set([-32005, -32029, -32052, 403, 429]);
1249
+ function refusesService(body) {
1250
+ const error = body.error;
1251
+ if (!error) return false;
1252
+ if (REFUSAL_CODES.has(error.code)) return true;
1253
+ return error.code === -32602 && /personal token/i.test(String(error.message ?? ""));
1254
+ }
1255
+ function unwrap(body) {
1256
+ if (body.error && solanaLamportShortfall(body.error.data?.logs) !== null) throw new Error(SOL_SHORTFALL_MESSAGE);
1257
+ if (body.error || body.result === void 0) throw new Error(String(body.error?.message || "Invalid Solana RPC response."));
1258
+ return body.result;
1259
+ }
1260
+ async function direct(fetchImpl, url, payload) {
1261
+ const controller = new AbortController();
1262
+ const timer = setTimeout(() => controller.abort(), ATTEMPT_TIMEOUT_MS);
1263
+ try {
1264
+ const response = await fetchImpl(url, { method: "POST", headers: { "Content-Type": "application/json" }, body: payload, signal: controller.signal });
1265
+ if (!response.ok) return { refused: `HTTP ${response.status}` };
1266
+ const body = await response.json().catch(() => null);
1267
+ if (!body || typeof body !== "object" || Array.isArray(body)) return { refused: "not a JSON-RPC body" };
1268
+ if (refusesService(body)) return { refused: `refused (${String(body.error?.code)})` };
1269
+ return { body };
1270
+ } catch (error) {
1271
+ return { refused: controller.signal.aborted ? "timed out" : error instanceof Error ? error.message : String(error) };
1272
+ } finally {
1273
+ clearTimeout(timer);
1274
+ }
1275
+ }
1276
+ function createSolanaRpc(api, fetchImpl = globalThis.fetch?.bind(globalThis), urls = BUNDLED_SOLANA_RPC) {
1277
+ return async (method, params) => {
1278
+ const payload = JSON.stringify({ jsonrpc: "2.0", id: 1, method, params });
1279
+ const refused = [];
1280
+ for (const url of urls) {
1281
+ const attempt = await direct(fetchImpl, url, payload);
1282
+ if ("body" in attempt) return unwrap(attempt.body);
1283
+ refused.push(`${new URL(url).host}: ${attempt.refused}`);
1284
+ }
1285
+ let relayed;
1286
+ try {
1287
+ relayed = await api.apiRequest("/solana-rpc", { method: "POST", body: payload, timeoutMs: 15e3 });
1288
+ } catch (error) {
1289
+ refused.push(`proxy: ${error instanceof Error ? error.message : String(error)}`);
1290
+ throw new Error(`No Solana RPC answered ${method} (${refused.join("; ")}).`);
1291
+ }
1292
+ return unwrap(relayed);
1293
+ };
1294
+ }
1295
+
1243
1296
  // src/core/solana-source.ts
1244
1297
  var CANONICAL_SOLANA_PROGRAM = "zd1E5feCJLNYaPPsBAYkCPMKGVnipYf8God9h917W33";
1245
1298
  var MAX_ASK_OVER_FINAL_BPS = 200n;
@@ -1489,18 +1542,6 @@ async function buildSolanaSourcePlan(api, input, quoted) {
1489
1542
  });
1490
1543
  return plan;
1491
1544
  }
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
1545
  var SolanaSendError = class extends Error {
1505
1546
  constructor(message, signature, sentAt) {
1506
1547
  super(message);
@@ -1647,6 +1688,10 @@ async function readSolanaBalance(rpc, owner, mint) {
1647
1688
  try {
1648
1689
  solanaKeyBytes(owner);
1649
1690
  solanaKeyBytes(mint);
1691
+ } catch {
1692
+ return void 0;
1693
+ }
1694
+ try {
1650
1695
  const result = await rpc("getTokenAccountsByOwner", [owner, { mint }, { encoding: "jsonParsed", commitment: "confirmed" }]);
1651
1696
  if (!Array.isArray(result.value)) throw new Error("Invalid token accounts.");
1652
1697
  let total = 0n, decimals;
@@ -1657,10 +1702,30 @@ async function readSolanaBalance(rpc, owner, mint) {
1657
1702
  total += BigInt(raw(amount.amount, "token balance"));
1658
1703
  }
1659
1704
  return total;
1705
+ } catch {
1706
+ }
1707
+ try {
1708
+ return await associatedBalance(rpc, owner, mint);
1660
1709
  } catch {
1661
1710
  return void 0;
1662
1711
  }
1663
1712
  }
1713
+ async function associatedBalance(rpc, owner, mint) {
1714
+ const programs = [TOKEN_PROGRAM, TOKEN_2022_PROGRAM];
1715
+ const keys = [...programs.map((p) => associatedTokenAddress(owner, mint, p)), mint];
1716
+ const result = await rpc("getMultipleAccounts", [keys, { encoding: "jsonParsed", commitment: "confirmed" }]);
1717
+ const accounts = result?.value;
1718
+ if (!Array.isArray(accounts) || accounts.length !== keys.length) throw new Error("Invalid token accounts.");
1719
+ if (!accounts[2] || !programs.includes(accounts[2].owner)) throw new Error("Not a token mint.");
1720
+ let total = 0n;
1721
+ for (const [i, account] of accounts.slice(0, 2).entries()) {
1722
+ if (!account) continue;
1723
+ const info = account.data?.parsed?.info;
1724
+ if (account.owner !== programs[i] || info?.mint !== mint) throw new Error("Invalid token account.");
1725
+ total += BigInt(raw(info?.tokenAmount?.amount, "token balance"));
1726
+ }
1727
+ return total;
1728
+ }
1664
1729
  function solanaLamportShortfall(logs) {
1665
1730
  if (!Array.isArray(logs)) return null;
1666
1731
  for (const line of logs) {
@@ -2917,7 +2982,7 @@ var CHANNEL_HEADER = "x-zd-channel";
2917
2982
  var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
2918
2983
  var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
2919
2984
  var WIDGET_CHANNEL = "widget";
2920
- var WIDGET_VERSION = "4.16.0" ;
2985
+ var WIDGET_VERSION = "4.18.0" ;
2921
2986
  var MAX_CHANNEL_VERSION_LEN = 32;
2922
2987
  function sanitizeVersion(raw2) {
2923
2988
  const v = String(raw2).trim();
@@ -4019,7 +4084,8 @@ function createEngine(config = {}) {
4019
4084
  const resolved = resolveConfig(config);
4020
4085
  const api = createApiClient(resolved);
4021
4086
  const verifier = createVerifier(api, resolved.fetchImpl, resolved.rpcOverrides);
4022
- const solanaRpc = createSolanaRpc(api);
4087
+ const solanaOverride = resolved.rpcOverrides[SOLANA_CHAIN_ID];
4088
+ const solanaRpc = createSolanaRpc(api, resolved.fetchImpl, solanaOverride && /^https?:\/\//i.test(solanaOverride) ? [solanaOverride] : BUNDLED_SOLANA_RPC);
4023
4089
  return {
4024
4090
  api,
4025
4091
  verifier,
@@ -4085,4 +4151,4 @@ function createEngine(config = {}) {
4085
4151
  };
4086
4152
  }
4087
4153
 
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 };
4154
+ 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-AEAJKHPP.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';
@@ -573,8 +573,8 @@ var init_ed255192 = __esm({
573
573
  // src/core/constants.ts
574
574
  var DEFAULT_WIDGET_API_BASE = "/api/widget/v1";
575
575
  var SUPPORTED_CHAIN_IDS = /* @__PURE__ */ new Set([1, 10, 42161, 8453, 57073, 130, 9745, 146, 98866]);
576
- var EXECUTABLE_STABLE_ASSETS = /* @__PURE__ */ new Set(["USDC", "USDT", "USDE", "USDTB", "AUSD", "PYUSD", "USDG"]);
577
- var STABLE_ASSETS = /* @__PURE__ */ new Set([...EXECUTABLE_STABLE_ASSETS, "USD1", "WM", "USDS", "DAI", "RLUSD"]);
576
+ var EXECUTABLE_STABLE_ASSETS = /* @__PURE__ */ new Set(["USDC", "USDT", "USDE", "USDTB", "AUSD", "PYUSD", "USDG", "USD1", "WM", "USDS", "DAI", "RLUSD"]);
577
+ var STABLE_ASSETS = EXECUTABLE_STABLE_ASSETS;
578
578
  var TRADEABLE_RWA_ASSETS = /* @__PURE__ */ new Set([
579
579
  "XAUT",
580
580
  // Nest vault shares — chained delivery on Plume, sellable from their Ethereum deployment.
@@ -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",
@@ -1686,11 +1687,13 @@ function buildCatalogue(input) {
1686
1687
  }
1687
1688
  const allowed = tokens.filter((token) => token.isEnabled !== false && isChainAddress(token.chainId, token.address) && allowedAssets.has(symbolKey(token.symbol)));
1688
1689
  const projectedCatalogue = allowed.filter((token) => {
1689
- if (!chainIds.has(Number(token.chainId))) return false;
1690
+ const chainId = Number(token.chainId);
1691
+ if (!chainIds.has(chainId)) return false;
1690
1692
  if (product === "rwa") return true;
1693
+ if (execution.has(chainId) || token.isChainedDestination === true) return true;
1691
1694
  if (!isExecutableBridge(token)) return false;
1692
1695
  const key = tokenKey(token.chainId, token.address);
1693
- return source.has(key) || destination.has(key) || execution.has(Number(token.chainId));
1696
+ return source.has(key) || destination.has(key);
1694
1697
  });
1695
1698
  const ready = chains.length > 0 && routes.length > 0 && projectedCatalogue.length > 0;
1696
1699
  const catalogue = ready ? projectedCatalogue : allowed;
@@ -1778,7 +1781,7 @@ function buildPayOptions({ invoiceAsset, invoiceChainId, tokens, routes, chains,
1778
1781
  if (refusal(token)) continue;
1779
1782
  seen.add(key);
1780
1783
  const payKey = symbolKey(token.symbol);
1781
- const direct = chainId === invoiceChain && payKey === invoiceKey;
1784
+ const direct2 = chainId === invoiceChain && payKey === invoiceKey;
1782
1785
  options.push({
1783
1786
  symbol: token.symbol,
1784
1787
  symbolKey: payKey,
@@ -1791,7 +1794,7 @@ function buildPayOptions({ invoiceAsset, invoiceChainId, tokens, routes, chains,
1791
1794
  logoUrl: token.logoUrl,
1792
1795
  bridge: routeBridge.get(`${payKey}:${chainId}`) || token.bridge,
1793
1796
  sameChain: chainId === invoiceChain,
1794
- direct
1797
+ direct: direct2
1795
1798
  });
1796
1799
  }
1797
1800
  options.sort((a, b) => {
@@ -1812,6 +1815,56 @@ function buildPayOptions({ invoiceAsset, invoiceChainId, tokens, routes, chains,
1812
1815
  return options;
1813
1816
  }
1814
1817
 
1818
+ // src/core/solana-rpc.ts
1819
+ var ATTEMPT_TIMEOUT_MS = 12e3;
1820
+ var REFUSAL_CODES = /* @__PURE__ */ new Set([-32005, -32029, -32052, 403, 429]);
1821
+ function refusesService(body) {
1822
+ const error = body.error;
1823
+ if (!error) return false;
1824
+ if (REFUSAL_CODES.has(error.code)) return true;
1825
+ return error.code === -32602 && /personal token/i.test(String(error.message ?? ""));
1826
+ }
1827
+ function unwrap(body) {
1828
+ if (body.error && solanaLamportShortfall(body.error.data?.logs) !== null) throw new Error(SOL_SHORTFALL_MESSAGE);
1829
+ if (body.error || body.result === void 0) throw new Error(String(body.error?.message || "Invalid Solana RPC response."));
1830
+ return body.result;
1831
+ }
1832
+ async function direct(fetchImpl, url, payload) {
1833
+ const controller = new AbortController();
1834
+ const timer = setTimeout(() => controller.abort(), ATTEMPT_TIMEOUT_MS);
1835
+ try {
1836
+ const response = await fetchImpl(url, { method: "POST", headers: { "Content-Type": "application/json" }, body: payload, signal: controller.signal });
1837
+ if (!response.ok) return { refused: `HTTP ${response.status}` };
1838
+ const body = await response.json().catch(() => null);
1839
+ if (!body || typeof body !== "object" || Array.isArray(body)) return { refused: "not a JSON-RPC body" };
1840
+ if (refusesService(body)) return { refused: `refused (${String(body.error?.code)})` };
1841
+ return { body };
1842
+ } catch (error) {
1843
+ return { refused: controller.signal.aborted ? "timed out" : error instanceof Error ? error.message : String(error) };
1844
+ } finally {
1845
+ clearTimeout(timer);
1846
+ }
1847
+ }
1848
+ function createSolanaRpc(api, fetchImpl = globalThis.fetch?.bind(globalThis), urls = BUNDLED_SOLANA_RPC) {
1849
+ return async (method, params) => {
1850
+ const payload = JSON.stringify({ jsonrpc: "2.0", id: 1, method, params });
1851
+ const refused = [];
1852
+ for (const url of urls) {
1853
+ const attempt = await direct(fetchImpl, url, payload);
1854
+ if ("body" in attempt) return unwrap(attempt.body);
1855
+ refused.push(`${new URL(url).host}: ${attempt.refused}`);
1856
+ }
1857
+ let relayed;
1858
+ try {
1859
+ relayed = await api.apiRequest("/solana-rpc", { method: "POST", body: payload, timeoutMs: 15e3 });
1860
+ } catch (error) {
1861
+ refused.push(`proxy: ${error instanceof Error ? error.message : String(error)}`);
1862
+ throw new Error(`No Solana RPC answered ${method} (${refused.join("; ")}).`);
1863
+ }
1864
+ return unwrap(relayed);
1865
+ };
1866
+ }
1867
+
1815
1868
  // src/core/solana-source.ts
1816
1869
  var CANONICAL_SOLANA_PROGRAM = "zd1E5feCJLNYaPPsBAYkCPMKGVnipYf8God9h917W33";
1817
1870
  var MAX_ASK_OVER_FINAL_BPS = 200n;
@@ -2061,18 +2114,6 @@ async function buildSolanaSourcePlan(api, input, quoted) {
2061
2114
  });
2062
2115
  return plan;
2063
2116
  }
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
2117
  var SolanaSendError = class extends Error {
2077
2118
  constructor(message, signature, sentAt) {
2078
2119
  super(message);
@@ -2219,6 +2260,10 @@ async function readSolanaBalance(rpc, owner, mint) {
2219
2260
  try {
2220
2261
  solanaKeyBytes(owner);
2221
2262
  solanaKeyBytes(mint);
2263
+ } catch {
2264
+ return void 0;
2265
+ }
2266
+ try {
2222
2267
  const result = await rpc("getTokenAccountsByOwner", [owner, { mint }, { encoding: "jsonParsed", commitment: "confirmed" }]);
2223
2268
  if (!Array.isArray(result.value)) throw new Error("Invalid token accounts.");
2224
2269
  let total = 0n, decimals;
@@ -2229,10 +2274,30 @@ async function readSolanaBalance(rpc, owner, mint) {
2229
2274
  total += BigInt(raw(amount.amount, "token balance"));
2230
2275
  }
2231
2276
  return total;
2277
+ } catch {
2278
+ }
2279
+ try {
2280
+ return await associatedBalance(rpc, owner, mint);
2232
2281
  } catch {
2233
2282
  return void 0;
2234
2283
  }
2235
2284
  }
2285
+ async function associatedBalance(rpc, owner, mint) {
2286
+ const programs = [TOKEN_PROGRAM, TOKEN_2022_PROGRAM];
2287
+ const keys = [...programs.map((p) => associatedTokenAddress(owner, mint, p)), mint];
2288
+ const result = await rpc("getMultipleAccounts", [keys, { encoding: "jsonParsed", commitment: "confirmed" }]);
2289
+ const accounts = result?.value;
2290
+ if (!Array.isArray(accounts) || accounts.length !== keys.length) throw new Error("Invalid token accounts.");
2291
+ if (!accounts[2] || !programs.includes(accounts[2].owner)) throw new Error("Not a token mint.");
2292
+ let total = 0n;
2293
+ for (const [i, account] of accounts.slice(0, 2).entries()) {
2294
+ if (!account) continue;
2295
+ const info = account.data?.parsed?.info;
2296
+ if (account.owner !== programs[i] || info?.mint !== mint) throw new Error("Invalid token account.");
2297
+ total += BigInt(raw(info?.tokenAmount?.amount, "token balance"));
2298
+ }
2299
+ return total;
2300
+ }
2236
2301
  function solanaLamportShortfall(logs) {
2237
2302
  if (!Array.isArray(logs)) return null;
2238
2303
  for (const line of logs) {
@@ -3489,7 +3554,7 @@ var CHANNEL_HEADER = "x-zd-channel";
3489
3554
  var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
3490
3555
  var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
3491
3556
  var WIDGET_CHANNEL = "widget";
3492
- var WIDGET_VERSION = "4.16.0" ;
3557
+ var WIDGET_VERSION = "4.18.0" ;
3493
3558
  var MAX_CHANNEL_VERSION_LEN = 32;
3494
3559
  function sanitizeVersion(raw2) {
3495
3560
  const v = String(raw2).trim();
@@ -4591,7 +4656,8 @@ function createEngine(config = {}) {
4591
4656
  const resolved = resolveConfig(config);
4592
4657
  const api = createApiClient(resolved);
4593
4658
  const verifier = createVerifier(api, resolved.fetchImpl, resolved.rpcOverrides);
4594
- const solanaRpc = createSolanaRpc(api);
4659
+ const solanaOverride = resolved.rpcOverrides[SOLANA_CHAIN_ID];
4660
+ const solanaRpc = createSolanaRpc(api, resolved.fetchImpl, solanaOverride && /^https?:\/\//i.test(solanaOverride) ? [solanaOverride] : BUNDLED_SOLANA_RPC);
4595
4661
  return {
4596
4662
  api,
4597
4663
  verifier,
@@ -4666,6 +4732,7 @@ exports.API_CACHE_TTL_MS = API_CACHE_TTL_MS;
4666
4732
  exports.BLOCK_LABEL_DEFAULT = BLOCK_LABEL_DEFAULT;
4667
4733
  exports.BUNDLED_NATIVE_SYMBOL = BUNDLED_NATIVE_SYMBOL;
4668
4734
  exports.BUNDLED_RPC = BUNDLED_RPC;
4735
+ exports.BUNDLED_SOLANA_RPC = BUNDLED_SOLANA_RPC;
4669
4736
  exports.CANONICAL_DECIMALS = CANONICAL_DECIMALS;
4670
4737
  exports.CANONICAL_ESCROW = CANONICAL_ESCROW;
4671
4738
  exports.CANONICAL_INBOUND_BRIDGE = CANONICAL_INBOUND_BRIDGE;
@@ -4707,6 +4774,8 @@ exports.SUBMIT_ORDER_SELECTOR = SUBMIT_ORDER_SELECTOR;
4707
4774
  exports.SUPPORTED_ASSETS = SUPPORTED_ASSETS;
4708
4775
  exports.SUPPORTED_CHAIN_IDS = SUPPORTED_CHAIN_IDS;
4709
4776
  exports.SolanaSendError = SolanaSendError;
4777
+ exports.TOKEN_2022_PROGRAM = TOKEN_2022_PROGRAM;
4778
+ exports.TOKEN_PROGRAM = TOKEN_PROGRAM;
4710
4779
  exports.TRACKING = TRACKING;
4711
4780
  exports.TRADEABLE_RWA_ASSETS = TRADEABLE_RWA_ASSETS;
4712
4781
  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-AEAJKHPP.js';