@jpool/bond-sdk 0.9.0-next.23 → 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.d.mts CHANGED
@@ -32,7 +32,7 @@ declare const ENV_PROGRAM_ID: Record<string, PublicKey>;
32
32
  * IDL can be found at `target/idl/jbond.json`.
33
33
  */
34
34
  type Jbond = {
35
- "address": "Fo17edWRJewZNTRibgx9iTfjywCW6dzS81VwBLmPFVq1";
35
+ "address": "BondQ7KqZreTcW2UbeTNDcLCJQ3aXAtLn2Fm6ftaJDU";
36
36
  "metadata": {
37
37
  "name": "jbond";
38
38
  "version": "0.2.1";
@@ -1231,7 +1231,7 @@ type Jbond = {
1231
1231
  {
1232
1232
  "name": "bondInitializeData";
1233
1233
  "docs": [
1234
- "Data required to initialize a standard bond"
1234
+ "Data required to initialize a performance bond"
1235
1235
  ];
1236
1236
  "type": {
1237
1237
  "kind": "struct";
@@ -1942,7 +1942,8 @@ declare class JBondClient {
1942
1942
  /**
1943
1943
  * Get all bond states with total collected collateral
1944
1944
  */
1945
- getAllBondStates(bondType: BondType, session_status?: SessionStatus): Promise<{
1945
+ getAllBondStates(bondType: BondType, sessionStatus?: SessionStatus): Promise<{
1946
+ publicKey: PublicKey;
1946
1947
  bondState: {
1947
1948
  name: string;
1948
1949
  bondType: ({
package/dist/index.d.ts CHANGED
@@ -32,7 +32,7 @@ declare const ENV_PROGRAM_ID: Record<string, PublicKey>;
32
32
  * IDL can be found at `target/idl/jbond.json`.
33
33
  */
34
34
  type Jbond = {
35
- "address": "Fo17edWRJewZNTRibgx9iTfjywCW6dzS81VwBLmPFVq1";
35
+ "address": "BondQ7KqZreTcW2UbeTNDcLCJQ3aXAtLn2Fm6ftaJDU";
36
36
  "metadata": {
37
37
  "name": "jbond";
38
38
  "version": "0.2.1";
@@ -1231,7 +1231,7 @@ type Jbond = {
1231
1231
  {
1232
1232
  "name": "bondInitializeData";
1233
1233
  "docs": [
1234
- "Data required to initialize a standard bond"
1234
+ "Data required to initialize a performance bond"
1235
1235
  ];
1236
1236
  "type": {
1237
1237
  "kind": "struct";
@@ -1942,7 +1942,8 @@ declare class JBondClient {
1942
1942
  /**
1943
1943
  * Get all bond states with total collected collateral
1944
1944
  */
1945
- getAllBondStates(bondType: BondType, session_status?: SessionStatus): Promise<{
1945
+ getAllBondStates(bondType: BondType, sessionStatus?: SessionStatus): Promise<{
1946
+ publicKey: PublicKey;
1946
1947
  bondState: {
1947
1948
  name: string;
1948
1949
  bondType: ({
package/dist/index.js CHANGED
@@ -4842,7 +4842,7 @@ var HistoryManager = class {
4842
4842
 
4843
4843
  // src/idl/jbond.json
4844
4844
  var jbond_default = {
4845
- address: "Fo17edWRJewZNTRibgx9iTfjywCW6dzS81VwBLmPFVq1",
4845
+ address: "BondQ7KqZreTcW2UbeTNDcLCJQ3aXAtLn2Fm6ftaJDU",
4846
4846
  metadata: {
4847
4847
  name: "jbond",
4848
4848
  version: "0.2.1",
@@ -6041,7 +6041,7 @@ var jbond_default = {
6041
6041
  {
6042
6042
  name: "BondInitializeData",
6043
6043
  docs: [
6044
- "Data required to initialize a standard bond"
6044
+ "Data required to initialize a performance bond"
6045
6045
  ],
6046
6046
  type: {
6047
6047
  kind: "struct",
@@ -6941,19 +6941,20 @@ var JBondClient = class _JBondClient {
6941
6941
  /**
6942
6942
  * Get all bond states with total collected collateral
6943
6943
  */
6944
- async getAllBondStates(bondType, session_status) {
6944
+ async getAllBondStates(bondType, sessionStatus) {
6945
6945
  const bondStates = [];
6946
6946
  const bondStateAccounts = await this.program.account.bondState.all();
6947
- for (const { account: state } of bondStateAccounts) {
6947
+ for (const { publicKey, account: state } of bondStateAccounts) {
6948
6948
  if (!sameVariant(state.bondType, bondType)) {
6949
6949
  continue;
6950
6950
  }
6951
- if (session_status !== void 0 && this.getBondStateSessionStatus(state) !== session_status) {
6951
+ if (sessionStatus !== void 0 && this.getBondStateSessionStatus(state) !== sessionStatus) {
6952
6952
  continue;
6953
6953
  }
6954
6954
  const bondStateStats = await this.getBondStateStats(state);
6955
6955
  bondStates.push(
6956
6956
  {
6957
+ publicKey,
6957
6958
  bondState: state,
6958
6959
  stateStats: bondStateStats
6959
6960
  }