@obolnetwork/obol-sdk 2.2.1 → 2.2.2
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 +5 -0
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/src/utils.js +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/src/utils.js +1 -1
- package/package.json +1 -1
- package/src/utils.ts +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,11 @@ If you're integrating this SDK with a **backend** (e.g., in Node.js), and you st
|
|
|
17
17
|
- The private key is securely stored (e.g., in an `.env` file).
|
|
18
18
|
- Never commit or push your `.env` file containing the private key to version control.
|
|
19
19
|
|
|
20
|
+
## ⚡️ Integration with Safe Wallet
|
|
21
|
+
|
|
22
|
+
When integrating the Obol SDK with a **Safe Wallet**, you will need to provide the `RPC_MAINNET` or `RPC_HOLESKY` or `RPC_GNOSIS` or `RPC_SEPOLIA` environment variable, pointing to the correct network's RPC URL. This is required to interact with Safe kit.
|
|
23
|
+
|
|
24
|
+
|
|
20
25
|
## Contributing
|
|
21
26
|
|
|
22
27
|
Please review the following guidelines:
|
package/dist/cjs/package.json
CHANGED
package/dist/cjs/src/utils.js
CHANGED
|
@@ -69,7 +69,7 @@ const isContractAvailable = (contractAddress, provider, bytecode) => __awaiter(v
|
|
|
69
69
|
exports.isContractAvailable = isContractAvailable;
|
|
70
70
|
const getProvider = (chainId) => {
|
|
71
71
|
const rpcUrl = constants_1.PROVIDER_MAP[chainId];
|
|
72
|
-
if (!rpcUrl) {
|
|
72
|
+
if (!rpcUrl || rpcUrl === 'undefined') {
|
|
73
73
|
throw new Error(`No provider configured for ${types_1.FORK_NAMES[chainId]}`);
|
|
74
74
|
}
|
|
75
75
|
return new ethers_1.ethers.JsonRpcProvider(rpcUrl);
|
package/dist/esm/package.json
CHANGED
package/dist/esm/src/utils.js
CHANGED
|
@@ -61,7 +61,7 @@ export const isContractAvailable = (contractAddress, provider, bytecode) => __aw
|
|
|
61
61
|
});
|
|
62
62
|
export const getProvider = (chainId) => {
|
|
63
63
|
const rpcUrl = PROVIDER_MAP[chainId];
|
|
64
|
-
if (!rpcUrl) {
|
|
64
|
+
if (!rpcUrl || rpcUrl === 'undefined') {
|
|
65
65
|
throw new Error(`No provider configured for ${FORK_NAMES[chainId]}`);
|
|
66
66
|
}
|
|
67
67
|
return new ethers.JsonRpcProvider(rpcUrl);
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -78,7 +78,7 @@ export const isContractAvailable = async (
|
|
|
78
78
|
|
|
79
79
|
export const getProvider = (chainId: number): ethers.Provider => {
|
|
80
80
|
const rpcUrl = PROVIDER_MAP[chainId];
|
|
81
|
-
if (!rpcUrl) {
|
|
81
|
+
if (!rpcUrl || rpcUrl === 'undefined') {
|
|
82
82
|
throw new Error(`No provider configured for ${FORK_NAMES[chainId]}`);
|
|
83
83
|
}
|
|
84
84
|
return new ethers.JsonRpcProvider(rpcUrl);
|