Skip to content

Commit a17f597

Browse files
authored
expose freezeStakeMint and unstakePeriod (#279)
* expose freezeStakeMint and unstakePeriod
1 parent ea8a405 commit a17f597

File tree

10 files changed

+19
-9
lines changed

10 files changed

+19
-9
lines changed

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"packages": [
33
"packages/*"
44
],
5-
"version": "7.4.18",
5+
"version": "7.5.0",
66
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
77
}

packages/common/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@streamflow/common",
3-
"version": "7.4.18",
3+
"version": "7.5.0",
44
"description": "Common utilities and types used by streamflow packages.",
55
"homepage": "https://github.com/streamflow-finance/js-sdk/",
66
"main": "./dist/esm/index.js",

packages/distributor/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@streamflow/distributor",
3-
"version": "7.4.18",
3+
"version": "7.5.0",
44
"description": "JavaScript SDK to interact with Streamflow Airdrop protocol.",
55
"homepage": "https://github.com/streamflow-finance/js-sdk/",
66
"main": "dist/esm/index.js",

packages/eslint-config/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@streamflow/eslint-config",
3-
"version": "7.4.18",
3+
"version": "7.5.0",
44
"license": "ISC",
55
"main": "index.js",
66
"files": [

packages/launchpad/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@streamflow/launchpad",
3-
"version": "7.4.18",
3+
"version": "7.5.0",
44
"description": "JavaScript SDK to interact with Streamflow Launchpad protocol.",
55
"homepage": "https://github.com/streamflow-finance/js-sdk/",
66
"main": "dist/esm/index.js",

packages/staking/README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,18 @@ const rewardMint = REWARD_MINT_ADDRESS; // rewarding token
152152
*/
153153
const permissionless = true;
154154

155+
/*
156+
Whether to create stake mint token accounts in frozen state by default - in this case stakers won't be able to send or burn these tokens
157+
*/
158+
const freezeStakeMint = true;
159+
155160
client.createRewardPool({
156161
nonce,
157162
rewardAmount,
158163
rewardPeriod,
159164
rewardMint,
160-
permissionless = false,
165+
permissionless,
166+
freezeStakeMint,
161167
stakePool: stakePoolPda,
162168
stakePoolMint: MINT_ADDRESS,
163169
})

packages/staking/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@streamflow/staking",
3-
"version": "7.4.18",
3+
"version": "7.5.0",
44
"description": "JavaScript SDK to interact with Streamflow Staking protocol.",
55
"homepage": "https://github.com/streamflow-finance/js-sdk/",
66
"main": "dist/esm/index.js",

packages/staking/solana/client.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ export class SolanaStakingClient {
220220
minDuration,
221221
mint,
222222
permissionless = false,
223+
freezeStakeMint = null,
224+
unstakePeriod = null,
223225
nonce,
224226
tokenProgramId = TOKEN_PROGRAM_ID,
225227
}: CreateStakePoolArgs,
@@ -229,7 +231,7 @@ export class SolanaStakingClient {
229231
const creator = extParams.invoker.publicKey;
230232
invariant(creator, "Undefined invoker publicKey");
231233
const createInstruction = await stakePoolProgram.methods
232-
.createPool(nonce, maxWeight, minDuration, maxDuration, permissionless, null, null)
234+
.createPool(nonce, maxWeight, minDuration, maxDuration, permissionless, freezeStakeMint, unstakePeriod)
233235
.accounts({
234236
creator,
235237
mint,

packages/staking/solana/types.ts

+2
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,7 @@ export interface CreateStakePoolArgs extends TokenProgram {
8484
minDuration: BN;
8585
maxDuration: BN;
8686
permissionless?: boolean;
87+
freezeStakeMint?: boolean | null;
88+
unstakePeriod?: BN | null;
8789
authority?: Keypair;
8890
}

packages/stream/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@streamflow/stream",
3-
"version": "7.4.18",
3+
"version": "7.5.0",
44
"description": "JavaScript SDK to interact with Streamflow protocol.",
55
"homepage": "https://github.com/streamflow-finance/js-sdk/",
66
"main": "./dist/esm/index.js",

0 commit comments

Comments
 (0)