@jpool/bond-sdk 0.9.0-next.22 → 0.9.0-next.24

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
@@ -4553,7 +4553,7 @@ var Seeds = /* @__PURE__ */ ((Seeds2) => {
4553
4553
  Seeds2["GlobalState"] = "global_state";
4554
4554
  Seeds2["BondState"] = "bond_state";
4555
4555
  Seeds2["ValidatorBond"] = "validator_bond";
4556
- Seeds2["PerformanceBond"] = "performance";
4556
+ Seeds2["StandardBond"] = "standard";
4557
4557
  Seeds2["CrowdFundingBond"] = "crowdfunding";
4558
4558
  return Seeds2;
4559
4559
  })(Seeds || {});
@@ -4563,11 +4563,11 @@ var ENV_PROGRAM_ID = {
4563
4563
 
4564
4564
  // src/types/index.ts
4565
4565
  var bondTypeToSeed = {
4566
- performance: "performance" /* PerformanceBond */,
4566
+ standard: "standard" /* StandardBond */,
4567
4567
  crowdfunding: "crowdfunding" /* CrowdFundingBond */
4568
4568
  };
4569
4569
  var BondTypeVariant = {
4570
- Performance: { performance: {} },
4570
+ Standard: { standard: {} },
4571
4571
  Crowdfunding: { crowdfunding: {} }
4572
4572
  };
4573
4573
  var BondStateStatusVariant = {
@@ -4807,7 +4807,7 @@ var HistoryManager = class {
4807
4807
 
4808
4808
  // src/idl/jbond.json
4809
4809
  var jbond_default = {
4810
- address: "Fo17edWRJewZNTRibgx9iTfjywCW6dzS81VwBLmPFVq1",
4810
+ address: "BondQ7KqZreTcW2UbeTNDcLCJQ3aXAtLn2Fm6ftaJDU",
4811
4811
  metadata: {
4812
4812
  name: "jbond",
4813
4813
  version: "0.2.1",
@@ -6070,7 +6070,7 @@ var jbond_default = {
6070
6070
  {
6071
6071
  name: "bond_type",
6072
6072
  docs: [
6073
- "The type of bond (e.g., Performance, Crowdfunding)"
6073
+ "The type of bond (e.g., Standard, Crowdfunding)"
6074
6074
  ],
6075
6075
  type: {
6076
6076
  defined: {
@@ -6182,7 +6182,7 @@ var jbond_default = {
6182
6182
  kind: "enum",
6183
6183
  variants: [
6184
6184
  {
6185
- name: "Performance"
6185
+ name: "Standard"
6186
6186
  },
6187
6187
  {
6188
6188
  name: "Crowdfunding"
@@ -6905,19 +6905,20 @@ var JBondClient = class _JBondClient {
6905
6905
  /**
6906
6906
  * Get all bond states with total collected collateral
6907
6907
  */
6908
- async getAllBondStates(bondType, session_status) {
6908
+ async getAllBondStates(bondType, sessionStatus) {
6909
6909
  const bondStates = [];
6910
6910
  const bondStateAccounts = await this.program.account.bondState.all();
6911
- for (const { account: state } of bondStateAccounts) {
6911
+ for (const { publicKey, account: state } of bondStateAccounts) {
6912
6912
  if (!sameVariant(state.bondType, bondType)) {
6913
6913
  continue;
6914
6914
  }
6915
- if (session_status !== void 0 && this.getBondStateSessionStatus(state) !== session_status) {
6915
+ if (sessionStatus !== void 0 && this.getBondStateSessionStatus(state) !== sessionStatus) {
6916
6916
  continue;
6917
6917
  }
6918
6918
  const bondStateStats = await this.getBondStateStats(state);
6919
6919
  bondStates.push(
6920
6920
  {
6921
+ publicKey,
6921
6922
  bondState: state,
6922
6923
  stateStats: bondStateStats
6923
6924
  }