Conversation
Release: v2.9.0
commit 0928965 Author: julian.martinez <julian_martinez28@outlook.com> Date: Mon Jul 7 17:08:14 2025 -0700 end of buffer commit 2f286c9 Author: julian.martinez <julian_martinez28@outlook.com> Date: Mon Jul 7 15:59:32 2025 -0700 update okx provider logic commit 12b50c2 Merge: a687ae4 98ad4a2 Author: julian.martinez <julian_martinez28@outlook.com> Date: Mon Jul 7 15:49:53 2025 -0700 Merge branch 'main' of https://github.com/Julian-dev28/enKrypt commit a687ae4 Author: Julian Martinez <julian.martinez@okg.com> Date: Mon Jun 16 21:50:08 2025 -0700 update request/response params commit 98ad4a2 Author: julian.martinez <julian_martinez28@outlook.com> Date: Mon Jun 16 19:18:08 2025 -0700 update request/response params commit eff5837 Author: julian.martinez <julian_martinez28@outlook.com> Date: Thu Jun 12 18:39:25 2025 -0700 add okx provider commit 934e55b Author: julian.martinez <julian_martinez28@outlook.com> Date: Wed Jun 11 10:29:01 2025 -0700 add okx provider
WalkthroughThese changes introduce full support for the OKX DEX aggregator as a swap provider for the Solana network. This includes a new provider implementation with robust API integration, environment variable configuration, and fee/referral logic. The transaction processing pipeline is updated to handle raw Solana transactions, default fee calculation, and improved logging for debugging and traceability. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SwapUI
participant SwapCore
participant OKXProvider
participant OKXAPI
participant SolanaRPC
User->>SwapUI: Initiate swap (select tokens, amount)
SwapUI->>SwapCore: Request quote/providers
SwapCore->>OKXProvider: getQuote()
OKXProvider->>OKXAPI: Fetch quote
OKXAPI-->>OKXProvider: Return quote data
OKXProvider-->>SwapCore: Return quote
SwapCore-->>SwapUI: Display quote
User->>SwapUI: Confirm swap
SwapUI->>SwapCore: Execute swap
SwapCore->>OKXProvider: getSwap()
OKXProvider->>OKXAPI: Request swap transaction
OKXAPI-->>OKXProvider: Return base64 transaction
OKXProvider-->>SwapCore: Return raw transaction
SwapCore->>SolanaRPC: Broadcast transaction
SolanaRPC-->>SwapCore: Transaction signature
SwapCore->>OKXProvider: getStatus()
OKXProvider->>SolanaRPC: Check transaction status
SolanaRPC-->>OKXProvider: Status info
OKXProvider-->>SwapCore: Status result
SwapCore-->>SwapUI: Update status
Suggested reviewers
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (4)
packages/extension/src/ui/action/views/swap/libs/solana-gasvals.ts (1)
151-153: Consider making the default fee configurableThe hardcoded default fee of 10000 lamports might need adjustment based on network conditions.
+// Default fee for raw transactions in lamports +const DEFAULT_RAW_TRANSACTION_FEE = 10000; // 0.00001 SOL + // Handle raw transactions differently if ('isRawData' in tx && tx.isRawData) { // Use a reasonable default fee for raw transactions // Most Solana transactions cost around 5000-10000 lamports - const defaultFee = 10000; // 0.00001 SOL + const defaultFee = DEFAULT_RAW_TRANSACTION_FEE; feesumlamp = feesumlamp.add(toBN(defaultFee));packages/swap/src/providers/okx/index.ts (3)
132-145: Simplify optional chaining as suggested by static analysisThe nested if statements can be simplified using optional chaining.
- // Check for Retry-After header if available - if (error.response && error.response.headers) { - const retryAfter = - error.response.headers.get && - error.response.headers.get("Retry-After"); - if (retryAfter) { + // Check for Retry-After header if available + const retryAfter = error.response?.headers?.get?.("Retry-After"); + if (retryAfter) { const retryAfterMs = parseInt(retryAfter, 10) * 1000; if (!isNaN(retryAfterMs)) { delay = Math.max(delay, retryAfterMs); logger.info( `OKX API Retry-After header present, waiting ${delay}ms`, ); } - } }
831-838: Simplify native SOL address checkingThe repeated ternary operations for native SOL address checking can be extracted to a helper function.
+ // Helper to convert native SOL address to wrapped SOL for quotes + const toWrappedAddress = (address: string): string => + address === OKX_NATIVE_SOL_ADDRESS ? WRAPPED_SOL_ADDRESS : address; + // Get quote first (using wrapped SOL addresses for quote API) - const srcMint = new PublicKey( - srcTokenAddress === "11111111111111111111111111111111" - ? WRAPPED_SOL_ADDRESS - : srcTokenAddress, - ); - const dstMint = new PublicKey( - dstTokenAddress === "11111111111111111111111111111111" - ? WRAPPED_SOL_ADDRESS - : dstTokenAddress, - ); + const srcMint = new PublicKey(toWrappedAddress(srcTokenAddress)); + const dstMint = new PublicKey(toWrappedAddress(dstTokenAddress));
343-343: Consider externalizing the default rent feeThe hardcoded default rent fee of 2039280 lamports appears in multiple places and should be defined as a constant.
+// Default rent exemption for SPL token account in lamports +const DEFAULT_SPL_TOKEN_RENT_EXEMPTION = 2039280; + logger.warn(`Could not get rent exemption: ${rentError}`); // Use a default rent fee if we can't get it - rentFees += 2039280; // Default SOL rent exemption for token account + rentFees += DEFAULT_SPL_TOKEN_RENT_EXEMPTION;Apply the same change at line 931:
- rentFees += 2039280; // Default SOL rent exemption + rentFees += DEFAULT_SPL_TOKEN_RENT_EXEMPTION;
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (10)
packages/extension/src/ui/action/views/swap/libs/solana-gasvals.ts(3 hunks)packages/extension/src/ui/action/views/swap/libs/swap-txs.ts(1 hunks)packages/extension/src/ui/action/views/swap/views/swap-best-offer/index.vue(3 hunks)packages/extension/vite.config.ts(3 hunks)packages/swap/package.json(2 hunks)packages/swap/src/configs.ts(1 hunks)packages/swap/src/index.ts(2 hunks)packages/swap/src/providers/okx/index.ts(1 hunks)packages/swap/src/providers/okx/types.ts(1 hunks)packages/swap/src/types/index.ts(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
packages/swap/src/index.ts (1)
packages/swap/src/providers/okx/index.ts (1)
OKX(172-941)
packages/swap/src/providers/okx/index.ts (6)
packages/utils/src/debug-logger.ts (1)
error(388-392)packages/swap/src/types/index.ts (10)
TokenType(49-60)TokenNetworkType(74-77)getQuoteOptions(142-148)QuoteMetaOptions(107-114)ProviderQuoteResponse(212-224)SwapQuote(206-210)ProviderSwapResponse(243-257)SolanaTransaction(166-185)StatusOptions(233-236)StatusOptionsResponse(238-241)packages/swap/src/providers/okx/types.ts (3)
OKXTokenInfo(5-16)OKXQuoteResponse(18-89)OKXSwapResponse(144-160)packages/swap/src/configs.ts (3)
NATIVE_TOKEN_ADDRESS(133-133)FEE_CONFIGS(131-131)DEFAULT_SLIPPAGE(137-137)packages/swap/src/utils/solana.ts (6)
WRAPPED_SOL_ADDRESS(49-50)isValidSolanaAddressAsync(469-473)getTokenProgramOfMint(280-304)getSPLAssociatedTokenAccountPubkey(309-321)solAccountExists(484-491)SPL_TOKEN_ATA_ACCOUNT_SIZE_BYTES(43-43)packages/swap/src/utils/approvals.ts (1)
TOKEN_AMOUNT_INFINITY_AND_BEYOND(7-8)
🪛 Biome (1.9.4)
packages/swap/src/providers/okx/index.ts
[error] 132-132: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
[error] 134-135: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
[error] 668-668: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
[error] 669-669: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
🔇 Additional comments (12)
packages/swap/package.json (2)
30-31: LGTM: Appropriate dependencies for OKX integration.The
crypto-jsanddotenvdependencies are correctly added to support the OKX provider's cryptographic signing and environment variable management requirements.
44-44: LGTM: TypeScript types added for crypto-js.The development dependency for
@types/crypto-jsis properly added to provide TypeScript support.packages/swap/src/types/index.ts (1)
131-131: LGTM: Provider name enum updated correctly.The addition of
okxto theProviderNameenum follows the established pattern and properly integrates with the provider system.packages/swap/src/index.ts (2)
50-50: LGTM: Clean import statement for OKX provider.The import follows the established pattern and properly integrates the OKX provider into the system.
123-123: LGTM: OKX provider properly integrated into Solana providers.The OKX provider is correctly instantiated and added to the Solana providers array with appropriate type casting.
packages/swap/src/configs.ts (1)
68-77: Please confirm OKX should share Jupiter’s referrer addressesOur search in
packages/swap/src/configs.tsshows OKX’sreferrervalues are identical to Jupiter’s:[ProviderName.jupiter]: { [WalletIdentifier.enkrypt]: { referrer: "HXWkRK9a4H1EuBiqP4sVfFsEpd2NasoQPScoXL1NgSE2", fee: 0.01 }, [WalletIdentifier.mew]: { referrer: "CmrkoXWiTW37ZqUZcfJtxiKhy9eRMBQHq1nm8HpmRXH4", fee: 0.03 }, }, [ProviderName.okx]: { [WalletIdentifier.enkrypt]: { referrer: "HXWkRK9a4H1EuBiqP4sVfFsEpd2NasoQPScoXL1NgSE2", fee: 0.01 }, [WalletIdentifier.mew]: { referrer: "CmrkoXWiTW37ZqUZcfJtxiKhy9eRMBQHq1nm8HpmRXH4", fee: 0.03 }, },No OKX-specific referrer docs were found. Please confirm that OKX is intended to use the same fee-collection setup as Jupiter.
packages/extension/vite.config.ts (2)
1-2: LGTM: Dotenv configuration properly set up.The dotenv configuration is correctly implemented to load environment variables from the
.envfile.
68-73: LGTM: Environment variables properly injected into build.The OKX environment variables are correctly injected into the build process using the
globalThis.importMetaEnvpattern, making them accessible to the client-side code.packages/extension/src/ui/action/views/swap/libs/swap-txs.ts (1)
112-127: No further action needed for Solana raw transactionsWe verified that
getSwapTransactionsis only consumed inswap-best-offer/index.vue’s fee calculation and thatgetSolanaTransactionFeesexplicitly handles theisRawDataflag by applying a default fee. Consumers will continue to work as expected with raw transaction data.packages/swap/src/providers/okx/types.ts (1)
1-161: Well-structured type definitionsThe TypeScript interfaces are comprehensive and properly documented. Using strings for numeric values is appropriate for API responses to maintain precision.
packages/extension/src/ui/action/views/swap/libs/solana-gasvals.ts (1)
204-210: LGTM! Good error handling for null messagesThe code properly handles the case where
getTxMessagereturns null for raw transactions by using a default fee.packages/swap/src/providers/okx/index.ts (1)
764-770: Avoid logging sensitive informationWhile the code correctly checks for presence/absence of credentials, ensure no sensitive data is accidentally logged in other debug statements.
The implementation correctly masks API credentials in logs by only showing "present" or "missing" status.
packages/extension/src/ui/action/views/swap/views/swap-best-offer/index.vue
Show resolved
Hide resolved
| swapData.trades.forEach((trade, index) => { | ||
| console.log(`Trade ${index + 1}:`, { | ||
| provider: trade.provider, | ||
| fromAmount: trade.fromTokenAmount.toString(), | ||
| toAmount: trade.toTokenAmount.toString(), | ||
| additionalFees: trade.additionalNativeFees.toString(), | ||
| }); | ||
| }); |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Remove or conditionally enable debug logging
Debug console.log statements should not be in production code.
- swapData.trades.forEach((trade, index) => {
- console.log(`Trade ${index + 1}:`, {
- provider: trade.provider,
- fromAmount: trade.fromTokenAmount.toString(),
- toAmount: trade.toTokenAmount.toString(),
- additionalFees: trade.additionalNativeFees.toString(),
- });
- });
+ if (import.meta.env.DEV) {
+ swapData.trades.forEach((trade, index) => {
+ console.log(`Trade ${index + 1}:`, {
+ provider: trade.provider,
+ fromAmount: trade.fromTokenAmount.toString(),
+ toAmount: trade.toTokenAmount.toString(),
+ additionalFees: trade.additionalNativeFees.toString(),
+ });
+ });
+ }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| swapData.trades.forEach((trade, index) => { | |
| console.log(`Trade ${index + 1}:`, { | |
| provider: trade.provider, | |
| fromAmount: trade.fromTokenAmount.toString(), | |
| toAmount: trade.toTokenAmount.toString(), | |
| additionalFees: trade.additionalNativeFees.toString(), | |
| }); | |
| }); | |
| if (import.meta.env.DEV) { | |
| swapData.trades.forEach((trade, index) => { | |
| console.log(`Trade ${index + 1}:`, { | |
| provider: trade.provider, | |
| fromAmount: trade.fromTokenAmount.toString(), | |
| toAmount: trade.toTokenAmount.toString(), | |
| additionalFees: trade.additionalNativeFees.toString(), | |
| }); | |
| }); | |
| } |
🤖 Prompt for AI Agents
In packages/extension/src/ui/action/views/swap/views/swap-best-offer/index.vue
around lines 313 to 320, the code contains console.log statements used for
debugging. Remove these console.log calls or wrap them in a conditional check
that ensures they only run in a development environment to prevent debug logs
from appearing in production.
| logger.info(`getEnvVar(${name}) - checking environment variables`); | ||
|
|
||
| if (typeof process !== "undefined" && process.env && process.env[name]) { | ||
| logger.info(`getEnvVar(${name}) - found in process.env`); | ||
| return process.env[name]; | ||
| } | ||
|
|
||
| // For Vite/browser builds, use globalThis.importMetaEnv (set in vite.config.ts) | ||
| if ( | ||
| typeof globalThis !== "undefined" && | ||
| (globalThis as any).importMetaEnv && | ||
| (globalThis as any).importMetaEnv[`VITE_${name}`] | ||
| ) { | ||
| logger.info( | ||
| `getEnvVar(${name}) - found in globalThis.importMetaEnv.VITE_${name}`, | ||
| ); | ||
| return (globalThis as any).importMetaEnv[`VITE_${name}`]; | ||
| } | ||
|
|
||
| logger.info(`getEnvVar(${name}) - not found in any environment`); | ||
| return undefined; | ||
| } |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Reduce verbose logging in production
The logger.info calls for environment variable checking are too verbose and could expose sensitive information.
function getEnvVar(name: string): string | undefined {
- logger.info(`getEnvVar(${name}) - checking environment variables`);
+ logger.debug(`getEnvVar(${name}) - checking environment variables`);
if (typeof process !== "undefined" && process.env && process.env[name]) {
- logger.info(`getEnvVar(${name}) - found in process.env`);
+ logger.debug(`getEnvVar(${name}) - found in process.env`);
return process.env[name];
}
// For Vite/browser builds, use globalThis.importMetaEnv (set in vite.config.ts)
if (
typeof globalThis !== "undefined" &&
(globalThis as any).importMetaEnv &&
(globalThis as any).importMetaEnv[`VITE_${name}`]
) {
- logger.info(
+ logger.debug(
`getEnvVar(${name}) - found in globalThis.importMetaEnv.VITE_${name}`,
);
return (globalThis as any).importMetaEnv[`VITE_${name}`];
}
- logger.info(`getEnvVar(${name}) - not found in any environment`);
+ logger.debug(`getEnvVar(${name}) - not found in any environment`);
return undefined;
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| logger.info(`getEnvVar(${name}) - checking environment variables`); | |
| if (typeof process !== "undefined" && process.env && process.env[name]) { | |
| logger.info(`getEnvVar(${name}) - found in process.env`); | |
| return process.env[name]; | |
| } | |
| // For Vite/browser builds, use globalThis.importMetaEnv (set in vite.config.ts) | |
| if ( | |
| typeof globalThis !== "undefined" && | |
| (globalThis as any).importMetaEnv && | |
| (globalThis as any).importMetaEnv[`VITE_${name}`] | |
| ) { | |
| logger.info( | |
| `getEnvVar(${name}) - found in globalThis.importMetaEnv.VITE_${name}`, | |
| ); | |
| return (globalThis as any).importMetaEnv[`VITE_${name}`]; | |
| } | |
| logger.info(`getEnvVar(${name}) - not found in any environment`); | |
| return undefined; | |
| } | |
| function getEnvVar(name: string): string | undefined { | |
| logger.debug(`getEnvVar(${name}) - checking environment variables`); | |
| if (typeof process !== "undefined" && process.env && process.env[name]) { | |
| logger.debug(`getEnvVar(${name}) - found in process.env`); | |
| return process.env[name]; | |
| } | |
| // For Vite/browser builds, use globalThis.importMetaEnv (set in vite.config.ts) | |
| if ( | |
| typeof globalThis !== "undefined" && | |
| (globalThis as any).importMetaEnv && | |
| (globalThis as any).importMetaEnv[`VITE_${name}`] | |
| ) { | |
| logger.debug( | |
| `getEnvVar(${name}) - found in globalThis.importMetaEnv.VITE_${name}`, | |
| ); | |
| return (globalThis as any).importMetaEnv[`VITE_${name}`]; | |
| } | |
| logger.debug(`getEnvVar(${name}) - not found in any environment`); | |
| return undefined; | |
| } |
🤖 Prompt for AI Agents
In packages/swap/src/providers/okx/index.ts between lines 56 and 77, the
logger.info calls that log environment variable checks are too verbose and may
expose sensitive data. Replace these logger.info calls with a less verbose
logging level such as logger.debug or remove them entirely for production
builds. Ensure that sensitive environment variable names or values are not
logged to avoid security risks.
| autoSlippage: "true", // STRING, not boolean - CRITICAL | ||
| maxAutoSlippageBps: "100", // Add this parameter - REQUIRED |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Make critical parameters more maintainable
The hardcoded string "true" for autoSlippage and "100" for maxAutoSlippageBps are error-prone and should be constants.
+// OKX API specific constants
+const OKX_AUTO_SLIPPAGE = "true"; // Must be string, not boolean
+const OKX_MAX_AUTO_SLIPPAGE_BPS = "100";
+
const swapParams: any = {
chainId: "501",
amount: options.amount.toString(10),
fromTokenAddress: srcTokenAddress, // Use native format for swap
toTokenAddress: dstTokenAddress, // Use native format for swap
userWalletAddress: options.fromAddress,
slippage: parseFloat(meta.slippage || DEFAULT_SLIPPAGE).toString(),
- autoSlippage: "true", // STRING, not boolean - CRITICAL
- maxAutoSlippageBps: "100", // Add this parameter - REQUIRED
+ autoSlippage: OKX_AUTO_SLIPPAGE,
+ maxAutoSlippageBps: OKX_MAX_AUTO_SLIPPAGE_BPS,
};📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| autoSlippage: "true", // STRING, not boolean - CRITICAL | |
| maxAutoSlippageBps: "100", // Add this parameter - REQUIRED | |
| // OKX API specific constants | |
| const OKX_AUTO_SLIPPAGE = "true"; // Must be string, not boolean | |
| const OKX_MAX_AUTO_SLIPPAGE_BPS = "100"; | |
| const swapParams: any = { | |
| chainId: "501", | |
| amount: options.amount.toString(10), | |
| fromTokenAddress: srcTokenAddress, // Use native format for swap | |
| toTokenAddress: dstTokenAddress, // Use native format for swap | |
| userWalletAddress: options.fromAddress, | |
| slippage: parseFloat(meta.slippage || DEFAULT_SLIPPAGE).toString(), | |
| autoSlippage: OKX_AUTO_SLIPPAGE, | |
| maxAutoSlippageBps: OKX_MAX_AUTO_SLIPPAGE_BPS, | |
| }; |
🤖 Prompt for AI Agents
In packages/swap/src/providers/okx/index.ts at lines 862 to 863, the values for
autoSlippage and maxAutoSlippageBps are hardcoded as strings "true" and "100".
To improve maintainability and reduce errors, define these values as constants
at the top of the file or in a relevant constants module, then replace the
hardcoded strings with references to these constants.
| if (options.fromToken.address === NATIVE_TOKEN_ADDRESS) { | ||
| srcTokenAddress = "11111111111111111111111111111111"; // Native SOL format | ||
| } else { | ||
| srcTokenAddress = options.fromToken.address; | ||
| } | ||
|
|
||
| let dstTokenAddress: string; | ||
| if (options.toToken.address === NATIVE_TOKEN_ADDRESS) { | ||
| dstTokenAddress = "11111111111111111111111111111111"; // Native SOL format | ||
| } else { | ||
| dstTokenAddress = options.toToken.address; | ||
| } |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Extract native SOL address as a constant
The hardcoded native SOL address should be defined as a constant for maintainability.
+// Native SOL address format used by OKX API
+const OKX_NATIVE_SOL_ADDRESS = "11111111111111111111111111111111";
+
// CRITICAL FIX: Use native SOL format for swap API calls (not wrapped SOL)
let srcTokenAddress: string;
if (options.fromToken.address === NATIVE_TOKEN_ADDRESS) {
- srcTokenAddress = "11111111111111111111111111111111"; // Native SOL format
+ srcTokenAddress = OKX_NATIVE_SOL_ADDRESS; // Native SOL format
} else {
srcTokenAddress = options.fromToken.address;
}
let dstTokenAddress: string;
if (options.toToken.address === NATIVE_TOKEN_ADDRESS) {
- dstTokenAddress = "11111111111111111111111111111111"; // Native SOL format
+ dstTokenAddress = OKX_NATIVE_SOL_ADDRESS; // Native SOL format
} else {
dstTokenAddress = options.toToken.address;
}Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In packages/swap/src/providers/okx/index.ts around lines 816 to 827, the native
SOL address is hardcoded as a string literal in multiple places. Define this
native SOL address as a constant at the top of the file or in an appropriate
constants section, then replace all occurrences of the hardcoded string with
this constant to improve maintainability and avoid duplication.
Add OKX Provider Integration
Description
This PR adds integration with OKX's DEX aggregator API for token swaps on Solana. The implementation includes a new provider class that handles token swaps through OKX's API endpoints.
Changes
packages/swap/src/providers/okx/index.tswww.okx.comtoweb3.okx.comcrypto-jsfor API authenticationdotenvfor environment variable management@types/crypto-jsfor TypeScript supportTechnical Details
ProviderClassinterface for OKX DEX aggregatorDependencies Added
{ "dependencies": { "crypto-js": "^4.2.0", "dotenv": "^16.4.1" }, "devDependencies": { "@types/crypto-js": "^4.2.2" } }Testing
Documentation
web3.okx.comSecurity
Summary by CodeRabbit
New Features
Improvements
Dependencies
crypto-jsanddotenvas new dependencies.Types