@triadxyz/poseidons-protocol 0.0.4 → 0.0.5

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
@@ -48,7 +48,8 @@ export default class PoseidonsProtocolClient {
48
48
  * Add Poseidon rewards
49
49
  * @param mint - The mint of the Poseidon
50
50
  * @param amount - The amount of rewards to add
51
+ * @param boost - Whether to boost the Poseidon
51
52
  * @returns The transaction signature or versioned transaction
52
53
  */
53
- addPoseidonRewards(mint: PublicKey, amount: number): Promise<string | import("@solana/web3.js").VersionedTransaction>;
54
+ addPoseidonRewards(mint: PublicKey, amount: number, boost: boolean): Promise<string | import("@solana/web3.js").VersionedTransaction>;
54
55
  }
package/dist/index.js CHANGED
@@ -138,13 +138,14 @@ class PoseidonsProtocolClient {
138
138
  * Add Poseidon rewards
139
139
  * @param mint - The mint of the Poseidon
140
140
  * @param amount - The amount of rewards to add
141
+ * @param boost - Whether to boost the Poseidon
141
142
  * @returns The transaction signature or versioned transaction
142
143
  */
143
- addPoseidonRewards(mint, amount) {
144
+ addPoseidonRewards(mint, amount, boost) {
144
145
  return __awaiter(this, void 0, void 0, function* () {
145
146
  const ixs = [
146
147
  yield this.program.methods
147
- .addPoseidonRewards(new anchor_1.BN(amount * Math.pow(10, 6)))
148
+ .addPoseidonRewards(new anchor_1.BN(amount * Math.pow(10, 6)), boost)
148
149
  .accounts({
149
150
  signer: this.program.provider.publicKey,
150
151
  poseidon: (0, pda_1.getPoseidonPDA)(mint)
@@ -119,6 +119,10 @@
119
119
  {
120
120
  "name": "rewards",
121
121
  "type": "u64"
122
+ },
123
+ {
124
+ "name": "boost",
125
+ "type": "bool"
122
126
  }
123
127
  ]
124
128
  },
@@ -535,10 +539,14 @@
535
539
  "name": "number",
536
540
  "type": "u16"
537
541
  },
542
+ {
543
+ "name": "boost",
544
+ "type": "bool"
545
+ },
538
546
  {
539
547
  "name": "padding",
540
548
  "type": {
541
- "array": ["u8", 22]
549
+ "array": ["u8", 21]
542
550
  }
543
551
  }
544
552
  ]
@@ -21,4 +21,5 @@ export type Poseidon = {
21
21
  power: number;
22
22
  trdBurned: number;
23
23
  number: number;
24
+ boost: boolean;
24
25
  };
@@ -154,6 +154,10 @@ export type PoseidonsProtocol = {
154
154
  {
155
155
  name: 'rewards';
156
156
  type: 'u64';
157
+ },
158
+ {
159
+ name: 'boost';
160
+ type: 'bool';
157
161
  }
158
162
  ];
159
163
  },
@@ -710,10 +714,14 @@ export type PoseidonsProtocol = {
710
714
  name: 'number';
711
715
  type: 'u16';
712
716
  },
717
+ {
718
+ name: 'boost';
719
+ type: 'bool';
720
+ },
713
721
  {
714
722
  name: 'padding';
715
723
  type: {
716
- array: ['u8', 22];
724
+ array: ['u8', 21];
717
725
  };
718
726
  }
719
727
  ];
@@ -19,7 +19,8 @@ const formatPoseidon = (account, address) => {
19
19
  rewardsAvailable: account.rewardsAvailable.toNumber() / Math.pow(10, 6),
20
20
  power: account.power.toNumber(),
21
21
  trdBurned: account.trdBurned.toNumber() / Math.pow(10, 6),
22
- number: account.number
22
+ number: account.number,
23
+ boost: account.boost
23
24
  };
24
25
  };
25
26
  exports.formatPoseidon = formatPoseidon;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/poseidons-protocol",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",