@rhea-finance/cross-chain-sdk 0.1.14 → 0.1.16

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
@@ -1178,15 +1178,37 @@ if (
1178
1178
  - `config_evm` - EVM chain configuration
1179
1179
  - `config_solana` - Solana chain configuration
1180
1180
  - `config_btc` - Bitcoin chain configuration
1181
+ - `setSdkEnv` - Switch SDK environment between `prd` and `stg`
1182
+ - `getSdkEnv` - Get current SDK environment
1181
1183
  - `setCustomNodeUrl` - Set custom RPC node URL for NEAR chain. This function allows you to customize the RPC endpoint used for NEAR chain interactions.
1182
1184
 
1183
1185
  ```typescript
1184
- import { setCustomNodeUrl } from "@rhea-finance/cross-chain-sdk";
1186
+ import {
1187
+ setSdkEnv,
1188
+ getSdkEnv,
1189
+ setCustomNodeUrl,
1190
+ } from "@rhea-finance/cross-chain-sdk";
1191
+
1192
+ // Default environment is prd
1193
+ console.log(getSdkEnv()); // "prd"
1185
1194
 
1186
- // Set custom NEAR RPC node URL
1195
+ // Switch to stg
1196
+ setSdkEnv("stg");
1197
+ console.log(getSdkEnv()); // "stg"
1198
+
1199
+ // Switch back to prd
1200
+ setSdkEnv("prd");
1201
+ console.log(getSdkEnv()); // "prd"
1202
+
1203
+ // Set custom NEAR RPC node URL for the current environment
1187
1204
  setCustomNodeUrl("https://your-custom-near-rpc-url.com");
1188
1205
  ```
1189
1206
 
1207
+ Notes:
1208
+ - The default SDK environment is `prd`.
1209
+ - `setSdkEnv("stg" | "prd")` only switches the SDK environment.
1210
+ - `setCustomNodeUrl(...)` only overrides the NEAR RPC URL of the current environment and does not switch between `stg` and `prd`.
1211
+
1190
1212
  ### Type Definitions
1191
1213
 
1192
1214
  ```typescript