UNPKG

@funkit/fun-relay

Version:
564 lines (311 loc) 12.2 kB
# @funkit/fun-relay ## 2.9.0 ### Minor Changes - 7880a7b: chore(fun-relay): bump `@relayprotocol/relay-sdk` to v6.0.1 and the matching wallet adapters (bitcoin `^18.0.1`, svm `^19.0.1`, tron `^7.0.1`) The wallet adapters peer-pin `relay-sdk` to an exact version, so the SDK major bump requires advancing all three adapters in lockstep. v6 accepts the logger in `createClient()` directly, so the post-creation `configure()` workaround (required up to v5) is removed in `initializeRelayClient`. ## 2.8.7 ### Patch Changes - 42aafd9: fix(fun-relay): resolve relay-sdk exports via a namespace import in the relay client Some integrator bundlers (e.g. dydx) failed to bind individual named exports from `@relayprotocol/relay-sdk`'s CJS build, throwing `convertViemChainToRelayChain is not a function` when the relay client initialized. Reading those members off a namespace import resolves them from the live module object and is robust to that CJS/ESM interop gap. ## 2.8.6 ### Patch Changes - 0a13c0c: feat: add additional xstock assets ## 2.8.5 ### Patch Changes - a24681e: feat: add xstocks assets ## 2.8.4 ### Patch Changes - cd57fba: Foundational types and config for the xStock direct-transfer flow: add the optional `assetClass` field to `DynamicTargetAssetCandidate`, the `enable-rpc-xstock-assets` feature gate, the `getActiveDynamicTargetAsset` / Nado asset-class helpers, and the wSPYx / wQQQx asset logos. Additive only — no behavior change. ## 2.8.3 ### Patch Changes - 4462972: chore: reuse abis ## 2.8.2 ### Patch Changes - 1c4a23a: chore: register more assets ## 2.8.1 ### Patch Changes - 0c67343: feat: bump relay deps - 7cc25ca: feat: register usdg token ## 2.8.0 ### Minor Changes - 8baaa78: Add Lighter USDC spot deposit routes (`LIGHTER_USDC_SPOT` and `LIGHTER_USDC_SPOT_NEW_USER`). These mirror the USDC perps routes but deposit into the Lighter spot account (route type 1) via the `0x…03` virtual token, enabling USDC spot deposits in addition to the existing ETH spot and USDC perps flows. ## 2.7.4 ### Patch Changes - a4d5a9b: Reformat packages with oxfmt ## 2.7.3 ### Patch Changes - fc842fc: feat(fun-relay): add PUSD asset logo ## 2.7.2 ### Patch Changes - ec97ba2: Add `RelayBackendQuote` type so `getRelayQuote` exposes the full Execute shape internally while keeping the FE-facing `RelayQuote` typing unchanged ## 2.7.1 ### Patch Changes - 99062ff: chore(deps): bump vite to v8, vitest to 4.1.6, and storybook to v10 ## 2.7.0 ### Minor Changes - 9684ac0: `getRelayQuote` and `getFunRelayFees` accept an optional `usePermit?: boolean` parameter. When set, the value is forwarded to frog's `/api/fee` as a query string parameter so frog's `getUsePermit` can honor the explicit FE preference (e.g., the "Sign message vs Approve transaction" toggle in the connect modal). When omitted (server-driven flows like UDA), behavior is unchanged: frog's auto-gasless-fallback decides based on (clientId, chain, token, gas). ## 2.6.7 ### Patch Changes - 938d858: Fix quote test expectations to include forceSolverExecution field from fee API - 2175863: Add Lighter Fast withdrawal via Relay with LVM wallet adapter and fix userId→accountIndex rename in Lighter configs. ## 2.6.6 ### Patch Changes - 85e6a70: Bump @relayprotocol dependency versions (relay-sdk, relay-bitcoin-wallet-adapter, relay-svm-wallet-adapter, relay-tron-wallet-adapter) ## 2.6.5 ### Patch Changes - c7ac6cb: chore(connect): fix tsconfig ## 2.6.4 ### Patch Changes - cc8cf8b: bump ts version ## 2.6.3 ### Patch Changes - cf786fd: Add U stablecoin support on BSC ## 2.6.2 ### Patch Changes - c47429b: Remove Hyperbeat customer integration ## 2.6.1 ### Patch Changes - 2eea062: bump dependencies version ## 2.6.0 ### Minor Changes - 1c71c8d: feat(connect): add bridgeOverride support via dynamic routing rules ## 2.5.0 ### Minor Changes - d3d8eae: feat: bump relay package version ### Patch Changes - 91f9cb4: feat(connect): add AZTEC token support for Lighter exchange - 8aa93f1: feat(fun-relay): add RELAY_VM_TYPES const - 3b1c2c0: fix(relay): add Across transfer paths for Lighter USDC perps routes ## 2.4.1-next.1 ### Patch Changes - 8aa93f1: feat(fun-relay): add RELAY_VM_TYPES const - 3b1c2c0: fix(relay): add Across transfer paths for Lighter USDC perps routes ## 2.4.1-next.0 ### Patch Changes - addf363: feat(connect): add AZTEC token support for Lighter exchange ## 2.4.0 ### Minor Changes - 0ba280c: feat(fun-relay): add rawCalldata support to ApiFunkitCheckoutActionParams and export RELAY_LIGHTER_CHAIN_ID ## 2.3.0 ### Minor Changes - dee4a4b: feat(fun-relay): add useExternalSearch parameter to getRelayAssetInfo ### Patch Changes - c939c70: fix: tests ## 2.2.3-next.0 ### Patch Changes - c939c70: fix: tests ## 2.2.2 ### Patch Changes - 1a5b5a3: unify assets images by exporting them fun-relay - a50aa11: fix(fun-relay): fix relay logger ## 2.2.1 ### Patch Changes - 3e40d89: feat(connect,fun-relay): add LIT spot asset ## 2.2.0 ### Minor Changes - c289ca6: feat(fun-relay): require api key for relay to prevent rate limiting feat(connect): pass pseudo api key to fun-relay - aa767b0: feat: add tron adapter ### Patch Changes - 173d602: chore(fun-relay): dynamic routes - 3601d23: feat(fun-relay): support for more lighter addresses - 320236b: refactor: refactor approval calldata generation - 52406e3: feat(connect,fun-relay): add new lighter spot assets - e009c8d: Fix USDC_PERPS icon displaying ETH logo instead of USDC logo - 7312429: adopt checkedIndexedAccess for safety - 2f57830: feat: implemented revoke/reset approval mechanics for tokens with non-standard approval implementation - 0152e69: chore(fun-relay): expose `RelayExecute` type - fd5fe29: fix(fun-relay): add protocolVersion to tests - ab9c1e9: chore: update assets - 85ab331: remove unused manual register indexing - 9257a9b: remove tick size read in connect - d4b9ea5: feat(fun-relay): add new lighter routes - dc9cc8c: add relay request id to error message ## 2.2.0-next.6 ### Patch Changes - 320236b: refactor: refactor approval calldata generation - 52406e3: feat(connect,fun-relay): add new lighter spot assets - 2f57830: feat: implemented revoke/reset approval mechanics for tokens with non-standard approval implementation - ab9c1e9: chore: update assets - d4b9ea5: feat(fun-relay): add new lighter routes ## 2.2.0-next.5 ### Patch Changes - 0152e69: chore(fun-relay): expose `RelayExecute` type - dc9cc8c: add relay request id to error message ## 2.2.0-next.4 ### Patch Changes - 7312429: adopt checkedIndexedAccess for safety ## 2.2.0-next.3 ### Minor Changes - c289ca6: feat(fun-relay): require api key for relay to prevent rate limiting feat(connect): pass pseudo api key to fun-relay - aa767b0: feat: add tron adapter ### Patch Changes - fd5fe29: fix(fun-relay): add protocolVersion to tests ## 2.1.16-next.2 ### Patch Changes - e009c8d: Fix USDC_PERPS icon displaying ETH logo instead of USDC logo ## 2.1.16-next.1 ### Patch Changes - 173d602: chore(fun-relay): dynamic routes - 9257a9b: remove tick size read in connect ## 2.1.16-next.0 ### Patch Changes - 3601d23: feat(fun-relay): support for more lighter addresses ## 2.1.15 ### Patch Changes - df73659: chore: bump versions ## 2.1.14 ### Patch Changes - aec480c: chore(fun-relay): add subsidizeFeesSecretKey param to fun-relay and conditionally apply it to x-api-key header ## 2.1.13 ### Patch Changes - b353a64: fix(fun-relay): fix Lighter address type ## 2.1.12 ### Patch Changes - b4c2d23: chore: export lighter types ## 2.1.11 ### Patch Changes - d5a7397: refactor: update lighter chain configs and normalization ## 2.1.10 ### Patch Changes - 3824315: support solana as target asset - 98196b4: fix(relay): exclude target-asset-denominated fees from estSubtotalFromAmount - c76619e: Migrate from Lerna to Turborepo for improved build performance and developer experience. This change removes automatic builds during package installation (`prepare` scripts) and introduces intelligent caching. No changes to public APIs or package functionality. ## 2.1.9 ### Patch Changes - 62ea9d1: fix: fix versioning issue ## 2.1.8 ### Patch Changes - 208c80d: chore(fun-relay): additional options for account abstraction flow ## 2.1.7 ### Patch Changes - 2151498: fix: update conditions for originalTxValue ## 2.1.6 ### Patch Changes - 1e2a2fd: feat(fun-relay): pass senderAddress to frog quote config ## 2.1.5 ### Patch Changes - e69f7f6: refactor: switch fun relay wallet - 20f79ef: chore(fun-relay): add hypevm enum ## 2.1.4 ### Patch Changes - 6b531a6: chore: bump relay deps - 1b37b9c: feat: support relay originalTxValue ## 2.1.3 ### Patch Changes - 977b232: refactor: add normalization guardrails to getRelayAssetInfo and getRelayAssetPriceInfo ## 2.1.2 ### Patch Changes - a13f742: feat(connect,fun-relay): handle known Relay errors ## 2.1.1 ### Patch Changes - 5d8c791: fix: wusde ethereal decimals bypass ## 2.1.0 ### Minor Changes - 6241aab: chore: update relay deps - 022f3d9: refactor: read quote config from frog ## 2.0.5 ### Patch Changes - 2ef411b: feat: set explicit slippage tolerance ## 2.0.4 ### Patch Changes - 277944d: feat: export getReferrer ## 2.0.3 ### Patch Changes - ef0e393: refactor: improve completion detection logic ## 2.0.3-next.0 ### Patch Changes - ef0e393: refactor: improve completion detection logic ## 2.0.2 ### Patch Changes - 5772086: feat(fun-relay): update logging - b3fd390: fix(fun-relay): convert native token for solana' ## 2.0.1 ### Patch Changes - afcc42e: feat: export convertFunToRelayChainId ## 2.0.0 ### Major Changes - 9634540: feat: support hypercore, refactor convertFunToRelayTokenAddress ### Patch Changes - 9425dd0: feat(relay): add bitcoin support ## 1.0.1 ### Patch Changes - ce7f49f: feat: support hyperswap-only liquidity ## 1.0.0 ### Major Changes - a167261: Update depositFeePayer type to only accept SolanaAddress, removing Address option for type safety ### Patch Changes - 90e1f57: feat(fun-relay): add depositFeePayer - b144caf: add new config for starting step - 1ccc1a3: feat: support sushi-only liquidity ## 0.1.12 ### Patch Changes - 278d17c: feat(connect,fun-relay): display Low amount error for relay quotes in Withdrawal ## 0.1.11 ### Patch Changes - 620d5ca: feat: handling for solana chain id ## 0.1.10 ### Patch Changes - 5e1cbf8: feat(connect): update how we display fees for withdrawal feat(fun-relay): update fee structure - remove variable LP feat(frog): update fee structure - remove variable LP - c11a45a: fix(fun-relay): update build watch command to use correct file extension - 09ac3b8: feat(relay): expose blockchain confirmation callback - 09ac3b8: fix(relay): call onConfirmed only once ## 0.1.9 ### Patch Changes - f49824b: feat(relay): accurately check that each step item has a txHash - d1133df: support withdrawal - 57f6bd8: feat(relay): add payerKey to getSolanaWallet - d4d61dc: manually register indexing for relay ## 0.1.9-next.2 ### Patch Changes - d4d61dc: manually register indexing for relay ## 0.1.9-next.1 ### Patch Changes - f49824b: feat(relay): accurately check that each step item has a txHash - 57f6bd8: feat(relay): add payerKey to getSolanaWallet ## 0.1.9-next.0 ### Patch Changes - d1133df: support withdrawal ## 0.1.8 ### Patch Changes - 881f069: feat(relay): add solana support - 915c4de: fix(relay): deduplicate relay fees ## 0.1.7 ### Patch Changes - 9cc9c7f: refactor: reduce latency of usd estimation ## 0.1.6 ### Patch Changes - a6ce5cb: refactor: deprecate getPrice call ## 0.1.5 ### Patch Changes - fc10b40: refactor: buffer and chain consts - 1137afa: feat: implement dynamic fees - 43cf1bf: feat: dynamic relay referrer ## 0.1.4 ### Patch Changes - 0557854: refactor: bump buffer to 6s ## 0.1.3 ### Patch Changes - 4c74602: chore: support katana chain - 2a9539a: feat: fallback price fetch to relay implementation ## 0.1.2 ### Patch Changes - 6cb808b: feat(relay): add exact input quote handling ## 0.1.1 ### Patch Changes - bff34b2: chore: fix files config ## 0.1.0 In development