@triadxyz/poseidons-protocol 0.0.6 → 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 +7 -2
- package/dist/index.js +11 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -51,11 +51,16 @@ 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
|
|
62
|
+
* @param burnMint - The mint of the burn Poseidon
|
|
58
63
|
* @returns The transaction signature or versioned transaction
|
|
59
64
|
*/
|
|
60
|
-
burnNft(mint: PublicKey): Promise<string | import("@solana/web3.js").VersionedTransaction>;
|
|
65
|
+
burnNft(mint: PublicKey, burnMint: PublicKey): Promise<string | import("@solana/web3.js").VersionedTransaction>;
|
|
61
66
|
}
|
package/dist/index.js
CHANGED
|
@@ -141,32 +141,35 @@ 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
|
}
|
|
158
159
|
/**
|
|
159
160
|
* Burn NFT
|
|
160
161
|
* @param mint - The mint of the Poseidon
|
|
162
|
+
* @param burnMint - The mint of the burn Poseidon
|
|
161
163
|
* @returns The transaction signature or versioned transaction
|
|
162
164
|
*/
|
|
163
|
-
burnNft(mint) {
|
|
165
|
+
burnNft(mint, burnMint) {
|
|
164
166
|
return __awaiter(this, void 0, void 0, function* () {
|
|
165
167
|
const ixs = [
|
|
166
168
|
yield this.program.methods
|
|
167
169
|
.burnNft()
|
|
168
170
|
.accounts({
|
|
169
171
|
poseidonAsset: mint,
|
|
172
|
+
burnPoseidonAsset: burnMint,
|
|
170
173
|
corePoseidonCollection: constants_1.CORE_POSEIDON_COLLECTION
|
|
171
174
|
})
|
|
172
175
|
.instruction()
|