@jpool/bond-sdk 0.11.0-next.16 → 0.11.0-next.17
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 +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -264,8 +264,8 @@ type Jbond = {
|
|
|
264
264
|
"name": "bondLockFunds";
|
|
265
265
|
"docs": [
|
|
266
266
|
"Locks funds for both the current and upcoming epoch.",
|
|
267
|
-
"Moves collateral from available to locked state, making it unavailable for withdrawal for
|
|
268
|
-
"# Errors",
|
|
267
|
+
"Moves collateral from available to locked state, making it unavailable for withdrawal for",
|
|
268
|
+
"the current and next epoch. # Errors",
|
|
269
269
|
"Fails if the validator is not active, or if there are insufficient available funds."
|
|
270
270
|
];
|
|
271
271
|
"discriminator": [
|
|
@@ -706,7 +706,7 @@ type Jbond = {
|
|
|
706
706
|
"",
|
|
707
707
|
"This function should be called at epoch boundaries to update the bond's",
|
|
708
708
|
"`last_update_epoch` and move the `next_epoch_locked` amount into",
|
|
709
|
-
"`
|
|
709
|
+
"`locked`. It ensures that the update only occurs once per epoch.",
|
|
710
710
|
"",
|
|
711
711
|
"# Errors",
|
|
712
712
|
"Returns [`BondError::InvalidEpoch`] if called more than once in the same epoch,",
|
|
@@ -1734,16 +1734,16 @@ type Jbond = {
|
|
|
1734
1734
|
"type": "u8";
|
|
1735
1735
|
},
|
|
1736
1736
|
{
|
|
1737
|
-
"name": "
|
|
1737
|
+
"name": "locked";
|
|
1738
1738
|
"docs": [
|
|
1739
|
-
"Amount of collateral locked
|
|
1739
|
+
"Amount of collateral currently locked"
|
|
1740
1740
|
];
|
|
1741
1741
|
"type": "u64";
|
|
1742
1742
|
},
|
|
1743
1743
|
{
|
|
1744
|
-
"name": "
|
|
1744
|
+
"name": "nextEpochLocked";
|
|
1745
1745
|
"docs": [
|
|
1746
|
-
"Amount of collateral locked for the
|
|
1746
|
+
"Amount of collateral locked for the next epoch"
|
|
1747
1747
|
];
|
|
1748
1748
|
"type": "u64";
|
|
1749
1749
|
},
|
|
@@ -2294,8 +2294,8 @@ declare class JBondClient {
|
|
|
2294
2294
|
withdrawalAuthority: PublicKey | null;
|
|
2295
2295
|
createdAt: bn_js;
|
|
2296
2296
|
bump: number;
|
|
2297
|
+
locked: bn_js;
|
|
2297
2298
|
nextEpochLocked: bn_js;
|
|
2298
|
-
currentEpochLocked: bn_js;
|
|
2299
2299
|
lastUpdateEpoch: bn_js;
|
|
2300
2300
|
publicKey: PublicKey;
|
|
2301
2301
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -264,8 +264,8 @@ type Jbond = {
|
|
|
264
264
|
"name": "bondLockFunds";
|
|
265
265
|
"docs": [
|
|
266
266
|
"Locks funds for both the current and upcoming epoch.",
|
|
267
|
-
"Moves collateral from available to locked state, making it unavailable for withdrawal for
|
|
268
|
-
"# Errors",
|
|
267
|
+
"Moves collateral from available to locked state, making it unavailable for withdrawal for",
|
|
268
|
+
"the current and next epoch. # Errors",
|
|
269
269
|
"Fails if the validator is not active, or if there are insufficient available funds."
|
|
270
270
|
];
|
|
271
271
|
"discriminator": [
|
|
@@ -706,7 +706,7 @@ type Jbond = {
|
|
|
706
706
|
"",
|
|
707
707
|
"This function should be called at epoch boundaries to update the bond's",
|
|
708
708
|
"`last_update_epoch` and move the `next_epoch_locked` amount into",
|
|
709
|
-
"`
|
|
709
|
+
"`locked`. It ensures that the update only occurs once per epoch.",
|
|
710
710
|
"",
|
|
711
711
|
"# Errors",
|
|
712
712
|
"Returns [`BondError::InvalidEpoch`] if called more than once in the same epoch,",
|
|
@@ -1734,16 +1734,16 @@ type Jbond = {
|
|
|
1734
1734
|
"type": "u8";
|
|
1735
1735
|
},
|
|
1736
1736
|
{
|
|
1737
|
-
"name": "
|
|
1737
|
+
"name": "locked";
|
|
1738
1738
|
"docs": [
|
|
1739
|
-
"Amount of collateral locked
|
|
1739
|
+
"Amount of collateral currently locked"
|
|
1740
1740
|
];
|
|
1741
1741
|
"type": "u64";
|
|
1742
1742
|
},
|
|
1743
1743
|
{
|
|
1744
|
-
"name": "
|
|
1744
|
+
"name": "nextEpochLocked";
|
|
1745
1745
|
"docs": [
|
|
1746
|
-
"Amount of collateral locked for the
|
|
1746
|
+
"Amount of collateral locked for the next epoch"
|
|
1747
1747
|
];
|
|
1748
1748
|
"type": "u64";
|
|
1749
1749
|
},
|
|
@@ -2294,8 +2294,8 @@ declare class JBondClient {
|
|
|
2294
2294
|
withdrawalAuthority: PublicKey | null;
|
|
2295
2295
|
createdAt: bn_js;
|
|
2296
2296
|
bump: number;
|
|
2297
|
+
locked: bn_js;
|
|
2297
2298
|
nextEpochLocked: bn_js;
|
|
2298
|
-
currentEpochLocked: bn_js;
|
|
2299
2299
|
lastUpdateEpoch: bn_js;
|
|
2300
2300
|
publicKey: PublicKey;
|
|
2301
2301
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -4574,7 +4574,7 @@ var VALIDATOR_BOND_SEED = "validator_bond";
|
|
|
4574
4574
|
var STANDARD_BOND_SEED = "standard";
|
|
4575
4575
|
var CROWDFUNDING_BOND_SEED = "crowdfunding";
|
|
4576
4576
|
var ENV_PROGRAM_ID = {
|
|
4577
|
-
//
|
|
4577
|
+
// [JBondClientEnv.DEV]: new PublicKey('...'),
|
|
4578
4578
|
};
|
|
4579
4579
|
|
|
4580
4580
|
// src/history.ts
|
|
@@ -5012,8 +5012,8 @@ var jbond_default = {
|
|
|
5012
5012
|
name: "bond_lock_funds",
|
|
5013
5013
|
docs: [
|
|
5014
5014
|
"Locks funds for both the current and upcoming epoch.",
|
|
5015
|
-
"Moves collateral from available to locked state, making it unavailable for withdrawal for
|
|
5016
|
-
"# Errors",
|
|
5015
|
+
"Moves collateral from available to locked state, making it unavailable for withdrawal for",
|
|
5016
|
+
"the current and next epoch. # Errors",
|
|
5017
5017
|
"Fails if the validator is not active, or if there are insufficient available funds."
|
|
5018
5018
|
],
|
|
5019
5019
|
discriminator: [
|
|
@@ -5454,7 +5454,7 @@ var jbond_default = {
|
|
|
5454
5454
|
"",
|
|
5455
5455
|
"This function should be called at epoch boundaries to update the bond's",
|
|
5456
5456
|
"`last_update_epoch` and move the `next_epoch_locked` amount into",
|
|
5457
|
-
"`
|
|
5457
|
+
"`locked`. It ensures that the update only occurs once per epoch.",
|
|
5458
5458
|
"",
|
|
5459
5459
|
"# Errors",
|
|
5460
5460
|
"Returns [`BondError::InvalidEpoch`] if called more than once in the same epoch,",
|
|
@@ -6482,16 +6482,16 @@ var jbond_default = {
|
|
|
6482
6482
|
type: "u8"
|
|
6483
6483
|
},
|
|
6484
6484
|
{
|
|
6485
|
-
name: "
|
|
6485
|
+
name: "locked",
|
|
6486
6486
|
docs: [
|
|
6487
|
-
"Amount of collateral locked
|
|
6487
|
+
"Amount of collateral currently locked"
|
|
6488
6488
|
],
|
|
6489
6489
|
type: "u64"
|
|
6490
6490
|
},
|
|
6491
6491
|
{
|
|
6492
|
-
name: "
|
|
6492
|
+
name: "next_epoch_locked",
|
|
6493
6493
|
docs: [
|
|
6494
|
-
"Amount of collateral locked for the
|
|
6494
|
+
"Amount of collateral locked for the next epoch"
|
|
6495
6495
|
],
|
|
6496
6496
|
type: "u64"
|
|
6497
6497
|
},
|
|
@@ -7190,7 +7190,7 @@ var JBondClient = class _JBondClient {
|
|
|
7190
7190
|
*/
|
|
7191
7191
|
async getAvailableCollateral(bondType, bondName, voteAccount) {
|
|
7192
7192
|
const validatorBond = await this.getValidatorBond(bondType, bondName, voteAccount);
|
|
7193
|
-
return await this.getValidatorBondBalance(bondType, bondName, voteAccount) - validatorBond.
|
|
7193
|
+
return await this.getValidatorBondBalance(bondType, bondName, voteAccount) - validatorBond.locked.toNumber();
|
|
7194
7194
|
}
|
|
7195
7195
|
/**
|
|
7196
7196
|
* Get all bond states with total collected collateral
|