@triadxyz/poseidons-protocol 0.0.7 → 0.0.8
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 +5 -1
- package/dist/index.js +8 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,11 @@ export default class PoseidonsProtocolClient {
|
|
|
51
51
|
* @param boost - Whether to boost the Poseidon
|
|
52
52
|
* @returns The transaction signature or versioned transaction
|
|
53
53
|
*/
|
|
54
|
-
addPoseidonRewards(
|
|
54
|
+
addPoseidonRewards(poseidons: {
|
|
55
|
+
mint: PublicKey;
|
|
56
|
+
amount: number;
|
|
57
|
+
boost: boolean;
|
|
58
|
+
}[]): Promise<string | import("@solana/web3.js").VersionedTransaction>;
|
|
55
59
|
/**
|
|
56
60
|
* Burn NFT
|
|
57
61
|
* @param mint - The mint of the Poseidon
|
package/dist/index.js
CHANGED
|
@@ -141,17 +141,18 @@ class PoseidonsProtocolClient {
|
|
|
141
141
|
* @param boost - Whether to boost the Poseidon
|
|
142
142
|
* @returns The transaction signature or versioned transaction
|
|
143
143
|
*/
|
|
144
|
-
addPoseidonRewards(
|
|
144
|
+
addPoseidonRewards(poseidons) {
|
|
145
145
|
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
-
const ixs = [
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
const ixs = [];
|
|
147
|
+
for (const poseidon of poseidons) {
|
|
148
|
+
ixs.push(yield this.program.methods
|
|
149
|
+
.addPoseidonRewards(new anchor_1.BN(poseidon.amount * Math.pow(10, 6)), poseidon.boost)
|
|
149
150
|
.accounts({
|
|
150
151
|
signer: this.program.provider.publicKey,
|
|
151
|
-
poseidon: (0, pda_1.getPoseidonPDA)(mint)
|
|
152
|
+
poseidon: (0, pda_1.getPoseidonPDA)(poseidon.mint)
|
|
152
153
|
})
|
|
153
|
-
.instruction()
|
|
154
|
-
|
|
154
|
+
.instruction());
|
|
155
|
+
}
|
|
155
156
|
return (0, sendVersionedTransaction_1.default)(this.program, ixs, this.rpcOptions);
|
|
156
157
|
});
|
|
157
158
|
}
|