@obolnetwork/obol-sdk 2.11.5-rc.0 → 2.11.5-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/browser/src/index.js +18280 -0
- package/dist/browser/src/index.js.map +1 -0
- package/dist/cjs/src/index.js +20 -7
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/esm/src/index.js +20 -7
- package/dist/esm/src/index.js.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +20 -7
- package/dist/types/src/verification/termsAndConditions.d.ts +0 -1
package/README.md
CHANGED
|
@@ -52,3 +52,36 @@ If you'd like to propose improvements or new features, please follow these steps
|
|
|
52
52
|
All contributions are reviewed before they are merged into the main branch. Please address any feedback provided during the review process.
|
|
53
53
|
|
|
54
54
|
Thank you for contributing to Obol-SDK!
|
|
55
|
+
|
|
56
|
+
## Next.js / SSR Configuration
|
|
57
|
+
|
|
58
|
+
If using this SDK in **Next.js** or other SSR frameworks, add this minimal config to your `next.config.js`:
|
|
59
|
+
|
|
60
|
+
```javascript
|
|
61
|
+
webpack: (config, { isServer, webpack }) => {
|
|
62
|
+
if (!isServer) {
|
|
63
|
+
config.plugins.push(
|
|
64
|
+
new webpack.DefinePlugin({
|
|
65
|
+
'process.stdout.isTTY': 'false',
|
|
66
|
+
'process.stderr.isTTY': 'false',
|
|
67
|
+
})
|
|
68
|
+
);
|
|
69
|
+
} else {
|
|
70
|
+
// Server: Externalize native dependencies
|
|
71
|
+
config.externals = config.externals || [];
|
|
72
|
+
config.externals.push({
|
|
73
|
+
'@chainsafe/bls': 'commonjs @chainsafe/bls',
|
|
74
|
+
'@chainsafe/blst': 'commonjs @chainsafe/blst',
|
|
75
|
+
'bcrypto': 'commonjs bcrypto',
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Ignore .node files
|
|
80
|
+
config.plugins.push(
|
|
81
|
+
new webpack.IgnorePlugin({ resourceRegExp: /\.node$/ })
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
return config;
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|