@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 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:
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obolnetwork/obol-sdk",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "A package for creating Distributed Validators using the Obol API.",
5
5
  "bugs": {
6
6
  "url": "https://github.com/obolnetwork/obol-sdk/issues"
@@ -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);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obolnetwork/obol-sdk",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "A package for creating Distributed Validators using the Obol API.",
5
5
  "bugs": {
6
6
  "url": "https://github.com/obolnetwork/obol-sdk/issues"
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obolnetwork/obol-sdk",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "A package for creating Distributed Validators using the Obol API.",
5
5
  "bugs": {
6
6
  "url": "https://github.com/obolnetwork/obol-sdk/issues"
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);