@jpool/bond-sdk 0.9.0-next.10 → 0.9.0-next.11

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.mjs CHANGED
@@ -5567,6 +5567,37 @@ var jbond_default = {
5567
5567
  ],
5568
5568
  args: []
5569
5569
  },
5570
+ {
5571
+ name: "session_finish",
5572
+ docs: [
5573
+ "Finishes a bond, preventing further deposits and withdrawals."
5574
+ ],
5575
+ discriminator: [
5576
+ 230,
5577
+ 209,
5578
+ 54,
5579
+ 205,
5580
+ 127,
5581
+ 141,
5582
+ 137,
5583
+ 113
5584
+ ],
5585
+ accounts: [
5586
+ {
5587
+ name: "bond_state",
5588
+ writable: true
5589
+ },
5590
+ {
5591
+ name: "authority",
5592
+ writable: true,
5593
+ signer: true,
5594
+ relations: [
5595
+ "bond_state"
5596
+ ]
5597
+ }
5598
+ ],
5599
+ args: []
5600
+ },
5570
5601
  {
5571
5602
  name: "session_start",
5572
5603
  docs: [
@@ -6748,8 +6779,12 @@ var JBondClient = class _JBondClient {
6748
6779
  newWithdrawAuthority: props.newWithdrawAuthority ?? null
6749
6780
  }).instruction();
6750
6781
  }
6751
- async buildBondFinishIx(_props) {
6752
- throw new Error("Crowdfunding bond currently does not support finish operation");
6782
+ async buildBondFinishIx(props) {
6783
+ const [bondState] = this.pda.bondState(props.bondType, props.name);
6784
+ return this.program.methods.sessionFinish().accountsPartial({
6785
+ bondState,
6786
+ authority: this.program.provider.wallet?.publicKey
6787
+ }).instruction();
6753
6788
  }
6754
6789
  async buildBondStartIx(props) {
6755
6790
  const [bondState] = this.pda.bondState(props.bondType, props.name);