For more details of SDK Usage, please refer to OKX JS Wallet SDK.
For more details of OKX Build, please refer to OKX Build.
For applications that are bootstrapped by create-react-app like this demo page, please consider to install react-app-rewired and reference config-overrides.js at the root folder to polyfill necessary node core modules required for the OKX Wallet SDK.
For applications that are using Webpack 5 as bundler, please consider to update webpack.config.js resolve.fallback to polyfill necessary node core modules required for the OKS Wallet SDK.
For applications that are using Vite as bundler, please consider to update vite.config.js build.rollupOptions.external to polyfill necessary node core modules required for the OKS Wallet SDK.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.