@triadxyz/triad-protocol 1.0.5-beta → 1.0.7-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/local-test.js +1 -1
- package/dist/stake.d.ts +2 -2
- package/dist/stake.js +2 -1
- package/dist/utils/sendVersionedTransaction.js +2 -1
- package/package.json +1 -1
package/dist/local-test.js
CHANGED
|
@@ -156,7 +156,7 @@ const claimAllRewards = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
156
156
|
wallet: wallet.publicKey,
|
|
157
157
|
ranks: [],
|
|
158
158
|
collections: 1,
|
|
159
|
-
verifier:
|
|
159
|
+
verifier: '43bkRb3xj4Vv77Y76TjQuNiPGUsnun4tFSMYXY2Y2K5LfRT79YDpHhc7jruWmDGdygUBPXYQQZntCQz6V6cRGz8F'
|
|
160
160
|
});
|
|
161
161
|
console.log(response);
|
|
162
162
|
});
|
package/dist/stake.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnchorProvider, Program } from '@coral-xyz/anchor';
|
|
2
|
-
import {
|
|
2
|
+
import { PublicKey } from '@solana/web3.js';
|
|
3
3
|
import { TriadProtocol } from './types/triad_protocol';
|
|
4
4
|
import { RpcOptions } from './types';
|
|
5
5
|
import { UpdateStakeVaultArgs, StakeNftArgs, RequestWithdrawArgs, WithdrawArgs, Stake as StakeResponse, ClaimStakeRewardsArgs, StakeTokenArgs, UpdateBoostArgs } from './types/stake';
|
|
@@ -88,7 +88,7 @@ export default class Stake {
|
|
|
88
88
|
name: string;
|
|
89
89
|
rarityRankHrtt: number;
|
|
90
90
|
}[];
|
|
91
|
-
verifier:
|
|
91
|
+
verifier: string;
|
|
92
92
|
}, options?: RpcOptions): Promise<string>;
|
|
93
93
|
/**
|
|
94
94
|
* Update Boost
|
package/dist/stake.js
CHANGED
|
@@ -22,6 +22,7 @@ const base64_js_1 = require("base64-js");
|
|
|
22
22
|
const getRarityRank_1 = __importDefault(require("./utils/getRarityRank"));
|
|
23
23
|
const sendVersionedTransaction_1 = __importDefault(require("./utils/sendVersionedTransaction"));
|
|
24
24
|
const sendTransactionWithOptions_1 = __importDefault(require("./utils/sendTransactionWithOptions"));
|
|
25
|
+
const convertSecretKeyToKeypair_1 = require("./utils/convertSecretKeyToKeypair");
|
|
25
26
|
class Stake {
|
|
26
27
|
constructor(program, provider) {
|
|
27
28
|
this.stakeVaultName = constants_1.STAKE_VAULT_NAME;
|
|
@@ -253,7 +254,7 @@ class Stake {
|
|
|
253
254
|
})
|
|
254
255
|
.instruction());
|
|
255
256
|
}
|
|
256
|
-
return (0, sendVersionedTransaction_1.default)(this.provider, ixs, options, verifier);
|
|
257
|
+
return (0, sendVersionedTransaction_1.default)(this.provider, ixs, options, (0, convertSecretKeyToKeypair_1.convertSecretKeyToKeypair)(verifier));
|
|
257
258
|
});
|
|
258
259
|
}
|
|
259
260
|
/**
|
|
@@ -25,7 +25,8 @@ const sendVersionedTransaction = (provider, ixs, options, payer) => __awaiter(vo
|
|
|
25
25
|
if (payer) {
|
|
26
26
|
tx.sign([payer]);
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
const newTx = yield provider.wallet.signTransaction(tx);
|
|
29
|
+
return provider.sendAndConfirm(newTx, payer ? [payer] : [], {
|
|
29
30
|
skipPreflight: options === null || options === void 0 ? void 0 : options.skipPreflight,
|
|
30
31
|
commitment: 'confirmed'
|
|
31
32
|
});
|