@streamflow/staking 7.4.13 → 7.4.15

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.
@@ -132,6 +132,157 @@ export type StakePool = {
132
132
  {
133
133
  name: "permissionless";
134
134
  type: "bool";
135
+ },
136
+ {
137
+ name: "freezeStakeMint";
138
+ type: {
139
+ option: "bool";
140
+ };
141
+ },
142
+ {
143
+ name: "unstakePeriod";
144
+ type: {
145
+ option: "u64";
146
+ };
147
+ }
148
+ ];
149
+ },
150
+ {
151
+ name: "requestUnstake";
152
+ discriminator: [44, 154, 110, 253, 160, 202, 54, 34];
153
+ accounts: [
154
+ {
155
+ name: "stakePool";
156
+ writable: true;
157
+ relations: ["stakeEntry"];
158
+ },
159
+ {
160
+ name: "stakeEntry";
161
+ docs: ["Entry that stores Stake Metadata"];
162
+ writable: true;
163
+ },
164
+ {
165
+ name: "authority";
166
+ docs: ["Stake Entry Authority"];
167
+ writable: true;
168
+ signer: true;
169
+ }
170
+ ];
171
+ args: [];
172
+ },
173
+ {
174
+ name: "setTokenMetadataSpl";
175
+ discriminator: [244, 162, 227, 218, 129, 5, 25, 253];
176
+ accounts: [
177
+ {
178
+ name: "authority";
179
+ docs: ["Stake Pool Authority"];
180
+ signer: true;
181
+ relations: ["stakePool"];
182
+ },
183
+ {
184
+ name: "stakePool";
185
+ },
186
+ {
187
+ name: "stakeMint";
188
+ relations: ["stakePool"];
189
+ },
190
+ {
191
+ name: "metadataAccount";
192
+ writable: true;
193
+ pda: {
194
+ seeds: [
195
+ {
196
+ kind: "const";
197
+ value: [109, 101, 116, 97, 100, 97, 116, 97];
198
+ },
199
+ {
200
+ kind: "account";
201
+ path: "metadataProgram";
202
+ },
203
+ {
204
+ kind: "account";
205
+ path: "stakeMint";
206
+ }
207
+ ];
208
+ program: {
209
+ kind: "account";
210
+ path: "metadataProgram";
211
+ };
212
+ };
213
+ },
214
+ {
215
+ name: "metadataProgram";
216
+ docs: ["MPL Program"];
217
+ address: "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s";
218
+ },
219
+ {
220
+ name: "tokenProgram";
221
+ address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
222
+ },
223
+ {
224
+ name: "rent";
225
+ address: "SysvarRent111111111111111111111111111111111";
226
+ },
227
+ {
228
+ name: "systemProgram";
229
+ address: "11111111111111111111111111111111";
230
+ }
231
+ ];
232
+ args: [
233
+ {
234
+ name: "name";
235
+ type: "string";
236
+ },
237
+ {
238
+ name: "symbol";
239
+ type: "string";
240
+ },
241
+ {
242
+ name: "uri";
243
+ type: "string";
244
+ }
245
+ ];
246
+ },
247
+ {
248
+ name: "setTokenMetadataT22";
249
+ discriminator: [239, 134, 91, 83, 196, 57, 120, 106];
250
+ accounts: [
251
+ {
252
+ name: "authority";
253
+ docs: ["Stake Pool Authority"];
254
+ signer: true;
255
+ relations: ["stakePool"];
256
+ },
257
+ {
258
+ name: "stakePool";
259
+ },
260
+ {
261
+ name: "stakeMint";
262
+ writable: true;
263
+ relations: ["stakePool"];
264
+ },
265
+ {
266
+ name: "tokenProgram";
267
+ address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
268
+ },
269
+ {
270
+ name: "systemProgram";
271
+ address: "11111111111111111111111111111111";
272
+ }
273
+ ];
274
+ args: [
275
+ {
276
+ name: "name";
277
+ type: "string";
278
+ },
279
+ {
280
+ name: "symbol";
281
+ type: "string";
282
+ },
283
+ {
284
+ name: "uri";
285
+ type: "string";
135
286
  }
136
287
  ];
137
288
  },
@@ -209,10 +360,6 @@ export type StakePool = {
209
360
  {
210
361
  name: "tokenProgram";
211
362
  },
212
- {
213
- name: "rent";
214
- address: "SysvarRent111111111111111111111111111111111";
215
- },
216
363
  {
217
364
  name: "systemProgram";
218
365
  address: "11111111111111111111111111111111";
@@ -373,6 +520,21 @@ export type StakePool = {
373
520
  code: 6014;
374
521
  name: "unsupportedTokenExtensions";
375
522
  msg: "Mint has unsupported Token Extensions";
523
+ },
524
+ {
525
+ code: 6015;
526
+ name: "unstakeRequestNotRequired";
527
+ msg: "Unstake request is not required";
528
+ },
529
+ {
530
+ code: 6016;
531
+ name: "unstakeRequestRequired";
532
+ msg: "Stake pool has unstake period, request is required prior to unstake";
533
+ },
534
+ {
535
+ code: 6017;
536
+ name: "unstakeTooEarly";
537
+ msg: "Unstake is not possible until unstake period has passed";
376
538
  }
377
539
  ];
378
540
  types: [
@@ -423,14 +585,24 @@ export type StakePool = {
423
585
  },
424
586
  {
425
587
  name: "closedTs";
426
- docs: ["Flag whether entry has been already unstaked"];
588
+ docs: ["Timestamp when entry has been closed"];
589
+ type: "u64";
590
+ },
591
+ {
592
+ name: "priorTotalEffectiveStake";
593
+ docs: ["Total effective stake at the time of staking"];
594
+ type: "u128";
595
+ },
596
+ {
597
+ name: "unstakeTs";
598
+ docs: ["Timestamp when unstake was requested, will be used in case `unstake_period` is set"];
427
599
  type: "u64";
428
600
  },
429
601
  {
430
602
  name: "buffer";
431
603
  docs: ["Buffer for additional fields"];
432
604
  type: {
433
- array: ["u8", 64];
605
+ array: ["u8", 40];
434
606
  };
435
607
  }
436
608
  ];
@@ -524,11 +696,23 @@ export type StakePool = {
524
696
  ];
525
697
  type: "u128";
526
698
  },
699
+ {
700
+ name: "freezeStakeMint";
701
+ docs: ["Whether we should freeze stake mint token accounts"];
702
+ type: "bool";
703
+ },
704
+ {
705
+ name: "unstakePeriod";
706
+ docs: [
707
+ "Period for unstaking, if set unstake at first should be requested, and the real unstake can only happen after this period"
708
+ ];
709
+ type: "u64";
710
+ },
527
711
  {
528
712
  name: "buffer";
529
713
  docs: ["Buffer for additional fields"];
530
714
  type: {
531
- array: ["u8", 64];
715
+ array: ["u8", 55];
532
716
  };
533
717
  }
534
718
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamflow/staking",
3
- "version": "7.4.13",
3
+ "version": "7.4.15",
4
4
  "description": "JavaScript SDK to interact with Streamflow Staking protocol.",
5
5
  "homepage": "https://github.com/streamflow-finance/js-sdk/",
6
6
  "main": "dist/esm/index.js",
@@ -27,9 +27,9 @@
27
27
  "test": "vitest",
28
28
  "prepublishOnly": "pnpm run lint && pnpm run test run && pnpm run build"
29
29
  },
30
- "gitHead": "1fdd4be9210a469bac52e97f969b679774a9aefd",
30
+ "gitHead": "3fb3977003767687e7a7b00bd69565b6bf5a1b63",
31
31
  "devDependencies": {
32
- "@streamflow/eslint-config": "7.4.13",
32
+ "@streamflow/eslint-config": "7.4.15",
33
33
  "@types/bn.js": "5.1.1",
34
34
  "typescript": "^5.6.3"
35
35
  },
@@ -40,7 +40,7 @@
40
40
  "@solana/spl-token": "0.4.9",
41
41
  "@solana/wallet-adapter-base": "0.9.19",
42
42
  "@solana/web3.js": "1.95.4",
43
- "@streamflow/common": "7.4.13",
43
+ "@streamflow/common": "7.4.15",
44
44
  "bn.js": "5.2.1",
45
45
  "borsh": "^2.0.0",
46
46
  "bs58": "5.0.0",