@triadxyz/triad-protocol 2.7.1-beta → 2.7.2-beta

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.ts CHANGED
@@ -328,7 +328,7 @@ export default class TriadProtocolClient {
328
328
  * @param options - RPC options
329
329
  *
330
330
  */
331
- createCustomer({ id, name, authority, feeRecipient, isStaked }: CreateCustomerArgs, options?: RpcOptions): Promise<string>;
331
+ createCustomer({ id, name, authority, feeRecipient }: CreateCustomerArgs, options?: RpcOptions): Promise<string>;
332
332
  /**
333
333
  * Get User Trade Nonce With Slots
334
334
  * @param userTrades - User Trades
package/dist/index.js CHANGED
@@ -38,7 +38,6 @@ const sendVersionedTransaction_1 = __importDefault(require("./utils/sendVersione
38
38
  const swap_1 = require("./utils/swap");
39
39
  const stake_1 = __importDefault(require("./stake"));
40
40
  const poseidon_1 = __importDefault(require("./poseidon"));
41
- const stake_2 = require("./utils/pda/stake");
42
41
  __exportStar(require("./types"), exports);
43
42
  __exportStar(require("./types/stake"), exports);
44
43
  __exportStar(require("./types/poseidon"), exports);
@@ -576,18 +575,13 @@ class TriadProtocolClient {
576
575
  * @param options - RPC options
577
576
  *
578
577
  */
579
- createCustomer({ id, name, authority, feeRecipient, isStaked }, options) {
578
+ createCustomer({ id, name, authority, feeRecipient }, options) {
580
579
  return __awaiter(this, void 0, void 0, function* () {
581
580
  const ixs = [];
582
- let stakePDA = null;
583
- if (isStaked) {
584
- stakePDA = (0, stake_2.getStakePDA)(this.program.programId, this.program.provider.publicKey);
585
- }
586
581
  ixs.push(yield this.program.methods
587
582
  .createCustomer({ id, name, authority, feeRecipient })
588
583
  .accounts({
589
- signer: this.program.provider.publicKey,
590
- stake: stakePDA
584
+ signer: this.program.provider.publicKey
591
585
  })
592
586
  .instruction());
593
587
  return (0, sendVersionedTransaction_1.default)(this.program, ixs, options);
package/dist/stake.js CHANGED
@@ -169,8 +169,8 @@ class Stake {
169
169
  ixs.push(yield this.program.methods
170
170
  .claimStakeRewards()
171
171
  .accounts({
172
- mint: constants_1.TRD_MINT,
173
- stake: (0, stake_1.getStakePDA)(this.program.programId, this.program.provider.publicKey)
172
+ signer: this.program.provider.publicKey,
173
+ mint: constants_1.TRD_MINT
174
174
  })
175
175
  .instruction());
176
176
  return (0, sendVersionedTransaction_1.default)(this.program, ixs, options);
@@ -214,7 +214,19 @@
214
214
  },
215
215
  {
216
216
  "name": "stake",
217
- "writable": true
217
+ "writable": true,
218
+ "pda": {
219
+ "seeds": [
220
+ {
221
+ "kind": "const",
222
+ "value": [115, 116, 97, 107, 101, 95, 118, 51]
223
+ },
224
+ {
225
+ "kind": "account",
226
+ "path": "signer"
227
+ }
228
+ ]
229
+ }
218
230
  },
219
231
  {
220
232
  "name": "mint",
@@ -660,7 +672,19 @@
660
672
  {
661
673
  "name": "stake",
662
674
  "writable": true,
663
- "optional": true
675
+ "optional": true,
676
+ "pda": {
677
+ "seeds": [
678
+ {
679
+ "kind": "const",
680
+ "value": [115, 116, 97, 107, 101, 95, 118, 51]
681
+ },
682
+ {
683
+ "kind": "account",
684
+ "path": "signer"
685
+ }
686
+ ]
687
+ }
664
688
  },
665
689
  {
666
690
  "name": "system_program",
@@ -291,6 +291,18 @@ export type TriadProtocol = {
291
291
  {
292
292
  name: 'stake';
293
293
  writable: true;
294
+ pda: {
295
+ seeds: [
296
+ {
297
+ kind: 'const';
298
+ value: [115, 116, 97, 107, 101, 95, 118, 51];
299
+ },
300
+ {
301
+ kind: 'account';
302
+ path: 'signer';
303
+ }
304
+ ];
305
+ };
294
306
  },
295
307
  {
296
308
  name: 'mint';
@@ -969,6 +981,18 @@ export type TriadProtocol = {
969
981
  name: 'stake';
970
982
  writable: true;
971
983
  optional: true;
984
+ pda: {
985
+ seeds: [
986
+ {
987
+ kind: 'const';
988
+ value: [115, 116, 97, 107, 101, 95, 118, 51];
989
+ },
990
+ {
991
+ kind: 'account';
992
+ path: 'signer';
993
+ }
994
+ ];
995
+ };
972
996
  },
973
997
  {
974
998
  name: 'systemProgram';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "2.7.1-beta",
3
+ "version": "2.7.2-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",