@jpool/bond-sdk 0.11.0-next.18 → 0.11.0-next.19

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/dist/index.mjs CHANGED
@@ -4546,15 +4546,14 @@ var require_bn = __commonJS({
4546
4546
 
4547
4547
  // src/client.ts
4548
4548
  var import_bn = __toESM(require_bn());
4549
-
4550
- // src/constants.ts
4551
4549
  var GLOBAL_STATE_SEED = "global_state";
4552
4550
  var BOND_STATE_SEED = "bond_state";
4553
4551
  var VALIDATOR_BOND_SEED = "validator_bond";
4554
4552
  var STANDARD_BOND_SEED = "standard";
4555
4553
  var CROWDFUNDING_BOND_SEED = "crowdfunding";
4556
4554
  var ENV_PROGRAM_ID = {
4557
- // [JBondClientEnv.DEV]: new PublicKey('...'),
4555
+ ["dev" /* DEV */]: new PublicKey("Fo17edWRJewZNTRibgx9iTfjywCW6dzS81VwBLmPFVq1"),
4556
+ ["prod" /* PROD */]: new PublicKey("BondQ7KqZreTcW2UbeTNDcLCJQ3aXAtLn2Fm6ftaJDU")
4558
4557
  };
4559
4558
 
4560
4559
  // src/types/index.ts
@@ -6713,7 +6712,11 @@ var JBondClient = class _JBondClient {
6713
6712
  * Set the environment.
6714
6713
  */
6715
6714
  env(env) {
6716
- return this.configure("programId", ENV_PROGRAM_ID[env]);
6715
+ const envProgramId = ENV_PROGRAM_ID[env];
6716
+ if (!envProgramId) {
6717
+ throw new Error(`Invalid environment: ${env}`);
6718
+ }
6719
+ return this.configure("programId", envProgramId);
6717
6720
  }
6718
6721
  /**
6719
6722
  * Configure a specific option.