@jpool/bond-sdk 0.11.0-next.8 → 0.11.0-next.9

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
@@ -7095,6 +7095,13 @@ var JBondClient = class _JBondClient {
7095
7095
  };
7096
7096
  return this.program.methods.bondReleaseFunds(solToLamports(amount)).accountsPartial(accounts).instruction();
7097
7097
  }
7098
+ /**
7099
+ * Get available collateral for withdrawal (taking into account locked funds)
7100
+ */
7101
+ async getAvailableCollateral(bondType, bondName, voteAccount) {
7102
+ const validatorBond = await this.getValidatorBond(bondType, bondName, voteAccount);
7103
+ return await this.getValidatorBondBalance(bondType, bondName, voteAccount) - validatorBond.currentEpochLocked.toNumber();
7104
+ }
7098
7105
  /**
7099
7106
  * Get all bond states with total collected collateral
7100
7107
  */