@jpool/bond-sdk 0.9.0-next.15 → 0.9.0-next.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/dist/index.d.mts CHANGED
@@ -1912,7 +1912,7 @@ declare class JBondClient {
1912
1912
  * @param bondType - Type of the bond
1913
1913
  * @param bondName - Name of the bond
1914
1914
  */
1915
- getBondState(bondType: BondType, bondName: string): Promise<[BondState, BondStateStats]>;
1915
+ getBondState(bondType: BondType, bondName: string, withStats?: boolean): Promise<[BondState, BondStateStats | null]>;
1916
1916
  /**
1917
1917
  * Get all bond states with total collected collateral
1918
1918
  */
package/dist/index.d.ts CHANGED
@@ -1912,7 +1912,7 @@ declare class JBondClient {
1912
1912
  * @param bondType - Type of the bond
1913
1913
  * @param bondName - Name of the bond
1914
1914
  */
1915
- getBondState(bondType: BondType, bondName: string): Promise<[BondState, BondStateStats]>;
1915
+ getBondState(bondType: BondType, bondName: string, withStats?: boolean): Promise<[BondState, BondStateStats | null]>;
1916
1916
  /**
1917
1917
  * Get all bond states with total collected collateral
1918
1918
  */
package/dist/index.js CHANGED
@@ -6906,9 +6906,9 @@ var JBondClient = class _JBondClient {
6906
6906
  * @param bondType - Type of the bond
6907
6907
  * @param bondName - Name of the bond
6908
6908
  */
6909
- async getBondState(bondType, bondName) {
6909
+ async getBondState(bondType, bondName, withStats = false) {
6910
6910
  const bondState = await this.program.account.bondState.fetch(this.pda.bondState(bondType, bondName)[0]);
6911
- return [bondState, await this.getBondStateStats(bondState)];
6911
+ return [bondState, withStats ? await this.getBondStateStats(bondState) : null];
6912
6912
  }
6913
6913
  /**
6914
6914
  * Get all bond states with total collected collateral