@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 +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4807,7 +4807,7 @@ var HistoryManager = class {
|
|
|
4807
4807
|
|
|
4808
4808
|
// src/idl/jbond.json
|
|
4809
4809
|
var jbond_default = {
|
|
4810
|
-
address: "
|
|
4810
|
+
address: "BondQ7KqZreTcW2UbeTNDcLCJQ3aXAtLn2Fm6ftaJDU",
|
|
4811
4811
|
metadata: {
|
|
4812
4812
|
name: "jbond",
|
|
4813
4813
|
version: "0.2.1",
|
|
@@ -6006,7 +6006,7 @@ var jbond_default = {
|
|
|
6006
6006
|
{
|
|
6007
6007
|
name: "BondInitializeData",
|
|
6008
6008
|
docs: [
|
|
6009
|
-
"Data required to initialize a
|
|
6009
|
+
"Data required to initialize a performance bond"
|
|
6010
6010
|
],
|
|
6011
6011
|
type: {
|
|
6012
6012
|
kind: "struct",
|
|
@@ -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,
|
|
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 (
|
|
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
|
}
|