TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tiagosiebler/coinbase-api/llms.txt
Use this file to discover all available pages before exploring further.
coinbase-api SDK is isomorphic — it is designed to work in both Node.js server environments and browser/frontend applications. A webpack configuration is included in the repository to produce a browser-compatible UMD bundle from the compiled TypeScript output.
Building the Browser Bundle
Install dependencies
From the root of the cloned
coinbase-api repository, install all Node.js dependencies:Compile TypeScript
Build the CJS and ESM output from source:This compiles the TypeScript source from
src/ into dist/cjs/ and dist/mjs/.Bundle with webpack
Run the webpack bundler to produce a browser-ready UMD bundle:Webpack reads from
dist/cjs/index.js (the CJS build output) and writes the final bundle to dist/coinbaseapi.js, along with a source map at dist/coinbaseapi.map.Webpack Configuration
The bundle is configured inwebpack/webpack.config.cjs. Key settings:
fallback configuration is important: it tells webpack to replace Node.js-only modules (http, https, crypto) with empty stubs in the browser bundle. The SDK handles this transparently — request signing switches to the browser-native Web Crypto API automatically.
Node.js vs Browser Differences
| Feature | Node.js | Browser |
|---|---|---|
| JWT / request signing | jose + Node crypto | Web Crypto API |
| HTTP keep-alive | https.Agent | Native browser pooling |
| WebSocket | ws via isomorphic-ws | Native browser WebSocket |
| Bundle size | Full source | Minified UMD bundle |
Security Warning
Current Limitations
Browser bundle documentation is still being expanded. Behavioural differences between Node.js and browser environments are still being documented. If you encounter any issues using the SDK in a browser, please open an issue on GitHub.