@jpool/bond-sdk 0.11.0-next.17 → 0.11.0-next.18
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 +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5244,6 +5244,37 @@ var jbond_default = {
|
|
|
5244
5244
|
}
|
|
5245
5245
|
]
|
|
5246
5246
|
},
|
|
5247
|
+
{
|
|
5248
|
+
name: "bond_remove",
|
|
5249
|
+
docs: [
|
|
5250
|
+
"Removes bond state"
|
|
5251
|
+
],
|
|
5252
|
+
discriminator: [
|
|
5253
|
+
121,
|
|
5254
|
+
112,
|
|
5255
|
+
246,
|
|
5256
|
+
177,
|
|
5257
|
+
181,
|
|
5258
|
+
8,
|
|
5259
|
+
18,
|
|
5260
|
+
220
|
|
5261
|
+
],
|
|
5262
|
+
accounts: [
|
|
5263
|
+
{
|
|
5264
|
+
name: "bond_state",
|
|
5265
|
+
writable: true
|
|
5266
|
+
},
|
|
5267
|
+
{
|
|
5268
|
+
name: "authority",
|
|
5269
|
+
writable: true,
|
|
5270
|
+
signer: true,
|
|
5271
|
+
relations: [
|
|
5272
|
+
"bond_state"
|
|
5273
|
+
]
|
|
5274
|
+
}
|
|
5275
|
+
],
|
|
5276
|
+
args: []
|
|
5277
|
+
},
|
|
5247
5278
|
{
|
|
5248
5279
|
name: "bond_set_withdraw_authority",
|
|
5249
5280
|
docs: [
|
|
@@ -6799,6 +6830,10 @@ var JBondClient = class _JBondClient {
|
|
|
6799
6830
|
const ix = await this.getBondSessionFinishIx(props);
|
|
6800
6831
|
return this.provider.sendAndConfirm?.(new Transaction().add(ix));
|
|
6801
6832
|
}
|
|
6833
|
+
async bondRemove(props) {
|
|
6834
|
+
const ix = await this.getBondRemoveIx(props);
|
|
6835
|
+
return this.provider.sendAndConfirm?.(new Transaction().add(ix));
|
|
6836
|
+
}
|
|
6802
6837
|
/**
|
|
6803
6838
|
* Build global state initialize instruction
|
|
6804
6839
|
*/
|
|
@@ -7100,6 +7135,15 @@ var JBondClient = class _JBondClient {
|
|
|
7100
7135
|
const [validatorBond, _] = this.pda.validatorBond(bondType, bondName, voteAccount);
|
|
7101
7136
|
return this.program.methods.bondUpdate().accountsPartial({ validatorBond, payer }).instruction();
|
|
7102
7137
|
}
|
|
7138
|
+
/**
|
|
7139
|
+
* Build bond remove instruction
|
|
7140
|
+
*/
|
|
7141
|
+
async getBondRemoveIx(props) {
|
|
7142
|
+
const { bondType, name } = props;
|
|
7143
|
+
const [bondState] = this.pda.bondState(bondType, name);
|
|
7144
|
+
const authority = props.authority ?? this.provider.wallet?.publicKey;
|
|
7145
|
+
return this.program.methods.bondRemove().accountsPartial({ bondState, authority }).instruction();
|
|
7146
|
+
}
|
|
7103
7147
|
/**
|
|
7104
7148
|
* Build test set last update epoch instruction
|
|
7105
7149
|
* NOTE!: This instruction is for testing purposes only.
|