From 2327effd23bd76a11b0eadba86fb0a652d34b8fd Mon Sep 17 00:00:00 2001 From: Sayan kar Date: Wed, 13 Aug 2025 17:23:21 +0530 Subject: [PATCH 1/2] docs: add transport config to README.md --- client/README.md | 164 +++++++ .../package-lock.json | 399 +++++++++++++++++- 2 files changed, 560 insertions(+), 3 deletions(-) diff --git a/client/README.md b/client/README.md index f519d60f..ae455521 100644 --- a/client/README.md +++ b/client/README.md @@ -194,12 +194,176 @@ const client = createAvalancheClient({ transport: { type: "", // Transport type url: "", + config: { + // Transport-specific configuration + } }, apiKey: "", // Optional API key rlToken: "", // Optional rate limit token }) ``` +### Transport Configuration + +The SDK supports multiple transport types for connecting to Avalanche nodes. Each transport type has specific configuration options: + +#### HTTP Transport (Recommended) +```typescript +const client = createAvalancheClient({ + chain: avalanche, + transport: { + type: "http", + url: "https://api.avax.network/ext/bc/C/rpc", // Optional custom RPC URL + config: { + // HTTP-specific configuration + fetchOptions: { + headers: { + "Custom-Header": "value" + }, + } + retryCount: 3, + retryDelay: 1000, + timeout: 5000 + } + } +}) +``` + +**HTTP Transport Features:** +- **Automatic URL Resolution**: If no URL is provided, uses the chain's default RPC endpoint +- **Custom Headers**: Support for custom HTTP headers via `fetchOptions.headers` +- **API Key Support**: Automatically adds `x-glacier-api-key` header when `apiKey` is provided +- **Rate Limit Support**: Automatically adds `rlToken` header when `rlToken` is provided + +#### WebSocket Transport +```typescript +const client = createAvalancheClient({ + chain: avalanche, + transport: { + type: "ws", + url: "wss://api.avax.network/ext/bc/C/ws", // Optional custom WebSocket URL + config: { + // WebSocket-specific configuration + retryCount: 3, + retryDelay: 1000 + } + } +}) +``` + +**WebSocket Transport Features:** +- **Real-time Updates**: Supports WebSocket connections for live data +- **Automatic Reconnection**: Built-in retry logic with configurable retry count and delay +- **Event-driven**: Ideal for subscribing to blockchain events and real-time updates + +#### Custom Transport +```typescript +const client = createAvalancheClient({ + chain: avalanche, + transport: { + type: "custom", + provider: window.avalanche, // Custom provider implementation + config: { + // Custom transport configuration + } + } +}) +``` + +**Custom Transport Features:** +- **Provider Integration**: Integrate with custom RPC providers or middleware +- **Flexible Configuration**: Full control over transport behavior +- **Wallet Support**: Special handling for wallet clients + +#### Fallback Transport +```typescript +const client = createAvalancheClient({ + chain: avalanche, + transport: { + type: "fallback", + transports: [ + { type: "http", url: "https://primary-rpc.com" }, + { type: "http", url: "https://backup-rpc.com" } + ], + config: { + // Fallback configuration + retryCount: 3, + retryDelay: 1000 + } + } +}) +``` + +**Fallback Transport Features:** +- **High Availability**: Automatic failover between multiple RPC endpoints + +### Advanced Configuration Examples + +#### Custom HTTP Headers and Timeouts +```typescript +const client = createAvalancheClient({ + chain: avalanche, + transport: { + type: "http", + config: { + fetchOptions: { + headers: { + "X-Custom-Header": "custom-value" + }, + } + } + } +}) +``` + +#### Multiple Fallback Endpoints +```typescript +const client = createAvalancheClient({ + chain: avalanche, + transport: { + type: "fallback", + transports: [ + { type: "http", url: "https://api.avax.network/ext/bc/C/rpc" }, + { type: "http", url: "https://rpc.ankr.com/avalanche" }, + { type: "http", url: "https://avalanche.public-rpc.com" } + ], + config: { + retryCount: 5, + retryDelay: 2000 + } + } +}) +``` + +#### WebSocket with Custom Configuration +```typescript +const client = createAvalancheClient({ + chain: avalanche, + transport: { + type: "ws", + config: { + retryCount: 5, + retryDelay: 2000, + maxRetryDelay: 30000 + } + } +}) +``` + +### Transport Selection Guidelines + +- **HTTP Transport**: Best for most use cases, simple configuration, wide compatibility +- **WebSocket Transport**: Ideal for real-time applications, event subscriptions, live updates +- **Custom Transport**: Use when integrating with specific providers or middleware +- **Fallback Transport**: Recommended for production applications requiring high availability + +### Environment Considerations + +- **Browser**: HTTP and WebSocket transports are fully supported +- **Node.js**: All transport types are supported +- **Mobile**: HTTP transport is recommended for mobile applications +- **Production**: Consider using fallback transport with multiple RPC endpoints for reliability + ## Exported Modules and Utilities ### Main Exports diff --git a/client/examples/react-show-balance-and-cross-chain-transfers/package-lock.json b/client/examples/react-show-balance-and-cross-chain-transfers/package-lock.json index d0bba141..f7cdd8bd 100644 --- a/client/examples/react-show-balance-and-cross-chain-transfers/package-lock.json +++ b/client/examples/react-show-balance-and-cross-chain-transfers/package-lock.json @@ -1,13 +1,14 @@ { - "name": "react-core-wallet-example", + "name": "react-show-balance-and-cross-chain-transfers", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "react-core-wallet-example", + "name": "react-show-balance-and-cross-chain-transfers", "version": "0.1.0", "dependencies": { + "@avalanche-sdk/client": "^0.0.4-alpha.12", "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", "@mui/icons-material": "^6.5.0", @@ -25,6 +26,12 @@ "vite": "^7.1.2" } }, + "node_modules/@adraffy/ens-normalize": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.11.0.tgz", + "integrity": "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==", + "license": "MIT" + }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", @@ -39,6 +46,37 @@ "node": ">=6.0.0" } }, + "node_modules/@avalabs/avalanchejs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@avalabs/avalanchejs/-/avalanchejs-5.0.0.tgz", + "integrity": "sha512-0hJK/Hdf8v+q05c8+5K6arFmzq7o1W4I05/Dmr+Es1XRi8canvTu1Y0RruYd6ea2rrvX3UhKrPs3BzLhCTHDrw==", + "dependencies": { + "@noble/curves": "1.3.0", + "@noble/hashes": "1.3.3", + "@noble/secp256k1": "2.0.0", + "@scure/base": "1.1.5", + "micro-eth-signer": "0.7.2" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@avalanche-sdk/client": { + "version": "0.0.4-alpha.12", + "resolved": "https://registry.npmjs.org/@avalanche-sdk/client/-/client-0.0.4-alpha.12.tgz", + "integrity": "sha512-0SuILrZXszPt8Po1QMWemT1NxDsgxpulSVpG//ASOfLjjpyx7oBzKrxfdThvcLO9glAHyHnqqHiK/5KPSZdzcg==", + "license": "BSD-3-Clause", + "dependencies": { + "@avalabs/avalanchejs": "^5.0.0", + "@noble/hashes": "1.3.3", + "util": "^0.12.5", + "viem": "^2.33.3" + }, + "engines": { + "node": ">=20", + "npm": ">=10" + } + }, "node_modules/@babel/code-frame": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", @@ -915,6 +953,18 @@ "node": ">=18" } }, + "node_modules/@ethereumjs/rlp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-5.0.0.tgz", + "integrity": "sha512-WuS1l7GJmB0n0HsXLozCoEFc9IwYgf3l0gCkKVYgR67puVF1O4OpEaN0hWmm1c+iHUHFCKt1hJrvy5toLg+6ag==", + "license": "MPL-2.0", + "bin": { + "rlp": "bin/rlp" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.12", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", @@ -1179,6 +1229,54 @@ } } }, + "node_modules/@noble/ciphers": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz", + "integrity": "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/curves": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", + "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.3.3" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/secp256k1": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-2.0.0.tgz", + "integrity": "sha512-rUGBd95e2a45rlmFTqQJYEFA4/gdIARFfuTuTqLglz0PZ6AKyzyXsEZZq7UZn8hZsvaBgpCzKKBJizT2cJERXw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT" + }, "node_modules/@popperjs/core": { "version": "2.11.8", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", @@ -1476,6 +1574,99 @@ "win32" ] }, + "node_modules/@scure/base": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.5.tgz", + "integrity": "sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/curves": { + "version": "1.9.6", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.6.tgz", + "integrity": "sha512-GIKz/j99FRthB8icyJQA51E8Uk5hXmdyThjgQXRKiv9h0zeRlzSCLIzFw6K1LotZ3XuB7yzlf76qk7uBmTdFqA==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -1590,6 +1781,27 @@ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, + "node_modules/abitype": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/abitype/-/abitype-1.0.8.tgz", + "integrity": "sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/wevm" + }, + "peerDependencies": { + "typescript": ">=5.0.4", + "zod": "^3 >=3.22.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "zod": { + "optional": true + } + } + }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -1944,6 +2156,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" + }, "node_modules/fdir": { "version": "6.4.6", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", @@ -2251,6 +2469,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/isows": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/isows/-/isows-1.0.7.tgz", + "integrity": "sha512-I1fSfDCZL5P0v33sVqeTDSpcstAg/N+wF5HS033mogOVIp4B+oHC7oOCsA3axAbBSGTJ8QubbNmnIRN/h8U7hg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2325,6 +2558,31 @@ "node": ">= 0.4" } }, + "node_modules/micro-eth-signer": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/micro-eth-signer/-/micro-eth-signer-0.7.2.tgz", + "integrity": "sha512-uFH23nqPNdg2KZ9ZdvLG4GO3bTAOWRhwGTsecY4Et2IdQOJ26x6inu8lJ9oyslnYL/0o1vnETCGhMimMvO0SqQ==", + "license": "MIT", + "dependencies": { + "@ethereumjs/rlp": "5.0.0", + "@noble/curves": "~1.3.0", + "@noble/hashes": "~1.3.3", + "@scure/base": "~1.1.5", + "micro-packed": "~0.5.1" + } + }, + "node_modules/micro-packed": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/micro-packed/-/micro-packed-0.5.3.tgz", + "integrity": "sha512-zWRoH+qUb/ZMp9gVZhexvRGCENDM5HEQF4sflqpdilUHWK2/zKR7/MT8GBctnTwbhNJwy1iuk5q6+TYP7/twYA==", + "license": "MIT", + "dependencies": { + "@scure/base": "~1.1.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2366,6 +2624,63 @@ "node": ">=0.10.0" } }, + "node_modules/ox": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/ox/-/ox-0.8.6.tgz", + "integrity": "sha512-eiKcgiVVEGDtEpEdFi1EGoVVI48j6icXHce9nFwCNM7CKG3uoCXKdr4TPhS00Iy1TR2aWSF1ltPD0x/YgqIL9w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "dependencies": { + "@adraffy/ens-normalize": "^1.11.0", + "@noble/ciphers": "^1.3.0", + "@noble/curves": "^1.9.1", + "@noble/hashes": "^1.8.0", + "@scure/bip32": "^1.7.0", + "@scure/bip39": "^1.6.0", + "abitype": "^1.0.8", + "eventemitter3": "5.0.1" + }, + "peerDependencies": { + "typescript": ">=5.4.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/ox/node_modules/@noble/curves": { + "version": "1.9.6", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.6.tgz", + "integrity": "sha512-GIKz/j99FRthB8icyJQA51E8Uk5hXmdyThjgQXRKiv9h0zeRlzSCLIzFw6K1LotZ3XuB7yzlf76qk7uBmTdFqA==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ox/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -2731,7 +3046,7 @@ "version": "5.9.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -2785,6 +3100,63 @@ "which-typed-array": "^1.1.2" } }, + "node_modules/viem": { + "version": "2.33.3", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.33.3.tgz", + "integrity": "sha512-aWDr6i6r3OfNCs0h9IieHFhn7xQJJ8YsuA49+9T5JRyGGAkWhLgcbLq2YMecgwM7HdUZpx1vPugZjsShqNi7Gw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "dependencies": { + "@noble/curves": "1.9.2", + "@noble/hashes": "1.8.0", + "@scure/bip32": "1.7.0", + "@scure/bip39": "1.6.0", + "abitype": "1.0.8", + "isows": "1.0.7", + "ox": "0.8.6", + "ws": "8.18.2" + }, + "peerDependencies": { + "typescript": ">=5.0.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/viem/node_modules/@noble/curves": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.2.tgz", + "integrity": "sha512-HxngEd2XUcg9xi20JkwlLCtYwfoFw4JGkuZpT+WlsPD4gB/cxkvTD8fSsoAnphGZhFdZYKeQIPCuFlWPm1uE0g==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/viem/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/vite": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.2.tgz", @@ -2881,6 +3253,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/ws": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", From e5939503cf9e1bc8e81bf7f2b54be4dfb51a9597 Mon Sep 17 00:00:00 2001 From: Sayan kar Date: Wed, 13 Aug 2025 19:31:25 +0530 Subject: [PATCH 2/2] feat: add vercel.json --- vercel.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 vercel.json diff --git a/vercel.json b/vercel.json new file mode 100644 index 00000000..ce0e4e6d --- /dev/null +++ b/vercel.json @@ -0,0 +1,12 @@ +{ + "buildCommand": "cd client && npm i && npm run generate-docs", + "outputDirectory": "client/docs", + "installCommand": "echo 'Dependencies installed during build'", + "framework": null, + "rewrites": [ + { + "source": "/(.*)", + "destination": "/index.html" + } + ] +}