@jpool/bond-sdk 0.11.0-next.14 → 0.11.0-next.16

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
@@ -286,6 +286,38 @@ type Jbond = {
286
286
  {
287
287
  "name": "validatorBond";
288
288
  "writable": true;
289
+ "pda": {
290
+ "seeds": [
291
+ {
292
+ "kind": "const";
293
+ "value": [
294
+ 118,
295
+ 97,
296
+ 108,
297
+ 105,
298
+ 100,
299
+ 97,
300
+ 116,
301
+ 111,
302
+ 114,
303
+ 95,
304
+ 98,
305
+ 111,
306
+ 110,
307
+ 100
308
+ ];
309
+ },
310
+ {
311
+ "kind": "account";
312
+ "path": "bondState";
313
+ },
314
+ {
315
+ "kind": "account";
316
+ "path": "validator_bond.vote_account";
317
+ "account": "validatorBond";
318
+ }
319
+ ];
320
+ };
289
321
  },
290
322
  {
291
323
  "name": "bondTokenAccount";
@@ -435,9 +467,45 @@ type Jbond = {
435
467
  190
436
468
  ];
437
469
  "accounts": [
470
+ {
471
+ "name": "bondState";
472
+ "writable": true;
473
+ },
438
474
  {
439
475
  "name": "validatorBond";
440
476
  "writable": true;
477
+ "pda": {
478
+ "seeds": [
479
+ {
480
+ "kind": "const";
481
+ "value": [
482
+ 118,
483
+ 97,
484
+ 108,
485
+ 105,
486
+ 100,
487
+ 97,
488
+ 116,
489
+ 111,
490
+ 114,
491
+ 95,
492
+ 98,
493
+ 111,
494
+ 110,
495
+ 100
496
+ ];
497
+ },
498
+ {
499
+ "kind": "account";
500
+ "path": "bondState";
501
+ },
502
+ {
503
+ "kind": "account";
504
+ "path": "validator_bond.vote_account";
505
+ "account": "validatorBond";
506
+ }
507
+ ];
508
+ };
441
509
  },
442
510
  {
443
511
  "name": "payer";
@@ -2084,6 +2152,7 @@ declare class JBondClient {
2084
2152
  bondType: BondType;
2085
2153
  bondName: string;
2086
2154
  voteAccount: PublicKeyInitData;
2155
+ payer: PublicKey;
2087
2156
  epoch: number;
2088
2157
  }): Promise<TransactionInstruction>;
2089
2158
  /**
package/dist/index.d.ts CHANGED
@@ -286,6 +286,38 @@ type Jbond = {
286
286
  {
287
287
  "name": "validatorBond";
288
288
  "writable": true;
289
+ "pda": {
290
+ "seeds": [
291
+ {
292
+ "kind": "const";
293
+ "value": [
294
+ 118,
295
+ 97,
296
+ 108,
297
+ 105,
298
+ 100,
299
+ 97,
300
+ 116,
301
+ 111,
302
+ 114,
303
+ 95,
304
+ 98,
305
+ 111,
306
+ 110,
307
+ 100
308
+ ];
309
+ },
310
+ {
311
+ "kind": "account";
312
+ "path": "bondState";
313
+ },
314
+ {
315
+ "kind": "account";
316
+ "path": "validator_bond.vote_account";
317
+ "account": "validatorBond";
318
+ }
319
+ ];
320
+ };
289
321
  },
290
322
  {
291
323
  "name": "bondTokenAccount";
@@ -435,9 +467,45 @@ type Jbond = {
435
467
  190
436
468
  ];
437
469
  "accounts": [
470
+ {
471
+ "name": "bondState";
472
+ "writable": true;
473
+ },
438
474
  {
439
475
  "name": "validatorBond";
440
476
  "writable": true;
477
+ "pda": {
478
+ "seeds": [
479
+ {
480
+ "kind": "const";
481
+ "value": [
482
+ 118,
483
+ 97,
484
+ 108,
485
+ 105,
486
+ 100,
487
+ 97,
488
+ 116,
489
+ 111,
490
+ 114,
491
+ 95,
492
+ 98,
493
+ 111,
494
+ 110,
495
+ 100
496
+ ];
497
+ },
498
+ {
499
+ "kind": "account";
500
+ "path": "bondState";
501
+ },
502
+ {
503
+ "kind": "account";
504
+ "path": "validator_bond.vote_account";
505
+ "account": "validatorBond";
506
+ }
507
+ ];
508
+ };
441
509
  },
442
510
  {
443
511
  "name": "payer";
@@ -2084,6 +2152,7 @@ declare class JBondClient {
2084
2152
  bondType: BondType;
2085
2153
  bondName: string;
2086
2154
  voteAccount: PublicKeyInitData;
2155
+ payer: PublicKey;
2087
2156
  epoch: number;
2088
2157
  }): Promise<TransactionInstruction>;
2089
2158
  /**
package/dist/index.js CHANGED
@@ -5033,7 +5033,39 @@ var jbond_default = {
5033
5033
  },
5034
5034
  {
5035
5035
  name: "validator_bond",
5036
- writable: true
5036
+ writable: true,
5037
+ pda: {
5038
+ seeds: [
5039
+ {
5040
+ kind: "const",
5041
+ value: [
5042
+ 118,
5043
+ 97,
5044
+ 108,
5045
+ 105,
5046
+ 100,
5047
+ 97,
5048
+ 116,
5049
+ 111,
5050
+ 114,
5051
+ 95,
5052
+ 98,
5053
+ 111,
5054
+ 110,
5055
+ 100
5056
+ ]
5057
+ },
5058
+ {
5059
+ kind: "account",
5060
+ path: "bond_state"
5061
+ },
5062
+ {
5063
+ kind: "account",
5064
+ path: "validator_bond.vote_account",
5065
+ account: "ValidatorBond"
5066
+ }
5067
+ ]
5068
+ }
5037
5069
  },
5038
5070
  {
5039
5071
  name: "bond_token_account",
@@ -5184,9 +5216,45 @@ var jbond_default = {
5184
5216
  ],
5185
5217
  accounts: [
5186
5218
  {
5187
- name: "validator_bond",
5219
+ name: "bond_state",
5188
5220
  writable: true
5189
5221
  },
5222
+ {
5223
+ name: "validator_bond",
5224
+ writable: true,
5225
+ pda: {
5226
+ seeds: [
5227
+ {
5228
+ kind: "const",
5229
+ value: [
5230
+ 118,
5231
+ 97,
5232
+ 108,
5233
+ 105,
5234
+ 100,
5235
+ 97,
5236
+ 116,
5237
+ 111,
5238
+ 114,
5239
+ 95,
5240
+ 98,
5241
+ 111,
5242
+ 110,
5243
+ 100
5244
+ ]
5245
+ },
5246
+ {
5247
+ kind: "account",
5248
+ path: "bond_state"
5249
+ },
5250
+ {
5251
+ kind: "account",
5252
+ path: "validator_bond.vote_account",
5253
+ account: "ValidatorBond"
5254
+ }
5255
+ ]
5256
+ }
5257
+ },
5190
5258
  {
5191
5259
  name: "payer",
5192
5260
  writable: true,
@@ -7071,9 +7139,9 @@ var JBondClient = class _JBondClient {
7071
7139
  * This should not be used in production environments.
7072
7140
  */
7073
7141
  async getTestSetLastUpdateEpochIx(props) {
7074
- const { bondType, bondName, voteAccount, epoch } = props;
7142
+ const { bondType, bondName, voteAccount, payer, epoch } = props;
7075
7143
  const [validatorBond, _] = this.pda.validatorBond(bondType, bondName, voteAccount);
7076
- return this.program.methods.testSetLastUpdateEpoch(new import_bn.BN(epoch)).accountsPartial({ validatorBond }).instruction();
7144
+ return this.program.methods.testSetLastUpdateEpoch(new import_bn.BN(epoch)).accountsPartial({ validatorBond, payer }).instruction();
7077
7145
  }
7078
7146
  /**
7079
7147
  * Build lock funds instruction
@@ -7108,8 +7176,10 @@ var JBondClient = class _JBondClient {
7108
7176
  */
7109
7177
  async getReleaseFundsIx(props) {
7110
7178
  const { bondType, name, voteAccount, amount, withdrawAuthority } = props;
7179
+ const [bondState] = this.pda.bondState(bondType, name);
7111
7180
  const [validatorBond] = this.pda.validatorBond(bondType, name, voteAccount);
7112
7181
  const accounts = {
7182
+ bondState,
7113
7183
  validatorBond,
7114
7184
  payer: withdrawAuthority
7115
7185
  };