@triadxyz/triad-protocol 0.0.8-beta → 0.0.9-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/test.js +4 -4
- package/dist/types/stake.d.ts +0 -2
- package/dist/utils/helpers.js +0 -2
- package/package.json +1 -1
package/dist/test.js
CHANGED
|
@@ -50,9 +50,9 @@ const updateStakeVaultStatus = () => __awaiter(void 0, void 0, void 0, function*
|
|
|
50
50
|
const withdraw = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
51
51
|
const response = yield triadProtocol.stake.withdrawStake({
|
|
52
52
|
wallet: wallet.publicKey,
|
|
53
|
-
nftName: 'Triad
|
|
54
|
-
mint: new web3_js_1.PublicKey('
|
|
55
|
-
stakeVault:
|
|
53
|
+
nftName: 'Triad 2807',
|
|
54
|
+
mint: new web3_js_1.PublicKey('A4fu2s6bCbKAveVgACkxpMgtJUHqoRJsTyzRp1Jp8nuE'),
|
|
55
|
+
stakeVault: constants_1.STAKE_SEASON
|
|
56
56
|
}, {
|
|
57
57
|
microLamports: 10000,
|
|
58
58
|
skipPreflight: true
|
|
@@ -65,6 +65,7 @@ const getStake = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
65
65
|
console.log(response);
|
|
66
66
|
console.log(stakeVaults);
|
|
67
67
|
});
|
|
68
|
+
getStake();
|
|
68
69
|
const claimStakeRewardsV1 = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
69
70
|
const response = yield triadProtocol.stake.claimStakeRewards({
|
|
70
71
|
wallet: wallet.publicKey,
|
|
@@ -78,7 +79,6 @@ const claimStakeRewardsV1 = () => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
78
79
|
});
|
|
79
80
|
console.log(response);
|
|
80
81
|
});
|
|
81
|
-
claimStakeRewardsV1();
|
|
82
82
|
const getStakers = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
83
83
|
const response = yield triadProtocol.stake.getStakes(constants_1.STAKE_SEASON);
|
|
84
84
|
console.log(JSON.stringify(response, null, 2));
|
package/dist/types/stake.d.ts
CHANGED
|
@@ -104,13 +104,11 @@ export type StakeResponse = {
|
|
|
104
104
|
rarity: string;
|
|
105
105
|
stakeVault: string;
|
|
106
106
|
authority: string;
|
|
107
|
-
amount: number;
|
|
108
107
|
initTs: number;
|
|
109
108
|
isLocked: boolean;
|
|
110
109
|
withdrawTs: number;
|
|
111
110
|
mint: string;
|
|
112
111
|
stakeRewards: string;
|
|
113
|
-
rank: number;
|
|
114
112
|
apr?: number;
|
|
115
113
|
dailyRewards?: number[];
|
|
116
114
|
weeklyRewardsPaid?: boolean[];
|
package/dist/utils/helpers.js
CHANGED
|
@@ -117,13 +117,11 @@ exports.formatStakeVault = formatStakeVault;
|
|
|
117
117
|
const formatStake = (stake) => {
|
|
118
118
|
return {
|
|
119
119
|
name: stake.name,
|
|
120
|
-
rank: stake.rank.toNumber(),
|
|
121
120
|
collections: stake.collections,
|
|
122
121
|
rarity: stake.rarity,
|
|
123
122
|
stakeVault: stake.stakeVault.toBase58(),
|
|
124
123
|
authority: stake.authority.toBase58(),
|
|
125
124
|
initTs: stake.initTs.toNumber(),
|
|
126
|
-
amount: stake.amount.toNumber(),
|
|
127
125
|
isLocked: stake.isLocked,
|
|
128
126
|
withdrawTs: stake.withdrawTs.toNumber(),
|
|
129
127
|
mint: stake.mint.toBase58(),
|