@streamflow/staking 8.2.2 → 8.3.0
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/README.md +103 -17
- package/dist/cjs/index.cjs +3493 -352
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +1827 -16
- package/dist/cjs/solana/descriptor/fee_manager.d.cts +303 -151
- package/dist/cjs/solana/descriptor/reward_pool.d.cts +1095 -513
- package/dist/cjs/solana/descriptor/stake_pool.d.cts +1055 -539
- package/dist/esm/index.d.ts +1827 -16
- package/dist/esm/index.js +3494 -353
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/descriptor/fee_manager.d.ts +303 -151
- package/dist/esm/solana/descriptor/idl/fee_manager.json +183 -31
- package/dist/esm/solana/descriptor/idl/reward_pool.json +745 -133
- package/dist/esm/solana/descriptor/idl/reward_pool_dynamic.json +1725 -0
- package/dist/esm/solana/descriptor/idl/stake_pool.json +623 -107
- package/dist/esm/solana/descriptor/reward_pool.d.ts +1095 -513
- package/dist/esm/solana/descriptor/stake_pool.d.ts +1055 -539
- package/package.json +6 -6
|
@@ -5,282 +5,434 @@
|
|
|
5
5
|
* IDL can be found at `target/idl/fee_manager.json`.
|
|
6
6
|
*/
|
|
7
7
|
type FeeManager = {
|
|
8
|
-
address: "FEELzfBhsWXTNJX53zZcDVfRNoFYZQ6cZA3jLiGVL16V";
|
|
9
|
-
metadata: {
|
|
10
|
-
name: "feeManager";
|
|
11
|
-
version: "
|
|
12
|
-
spec: "0.1.0";
|
|
13
|
-
description: "Stores Fees and other admin configuration for the Staking protocol";
|
|
8
|
+
"address": "FEELzfBhsWXTNJX53zZcDVfRNoFYZQ6cZA3jLiGVL16V";
|
|
9
|
+
"metadata": {
|
|
10
|
+
"name": "feeManager";
|
|
11
|
+
"version": "2.2.0";
|
|
12
|
+
"spec": "0.1.0";
|
|
13
|
+
"description": "Stores Fees and other admin configuration for the Staking protocol";
|
|
14
14
|
};
|
|
15
|
-
instructions: [
|
|
15
|
+
"instructions": [
|
|
16
16
|
{
|
|
17
|
-
name: "changeAuthority";
|
|
18
|
-
discriminator: [
|
|
19
|
-
|
|
17
|
+
"name": "changeAuthority";
|
|
18
|
+
"discriminator": [
|
|
19
|
+
50,
|
|
20
|
+
106,
|
|
21
|
+
66,
|
|
22
|
+
104,
|
|
23
|
+
99,
|
|
24
|
+
118,
|
|
25
|
+
145,
|
|
26
|
+
88
|
|
27
|
+
];
|
|
28
|
+
"accounts": [
|
|
20
29
|
{
|
|
21
|
-
name: "config";
|
|
22
|
-
writable: true;
|
|
23
|
-
pda: {
|
|
24
|
-
seeds: [
|
|
30
|
+
"name": "config";
|
|
31
|
+
"writable": true;
|
|
32
|
+
"pda": {
|
|
33
|
+
"seeds": [
|
|
25
34
|
{
|
|
26
|
-
kind: "const";
|
|
27
|
-
value: [
|
|
35
|
+
"kind": "const";
|
|
36
|
+
"value": [
|
|
37
|
+
99,
|
|
38
|
+
111,
|
|
39
|
+
110,
|
|
40
|
+
102,
|
|
41
|
+
105,
|
|
42
|
+
103
|
|
43
|
+
];
|
|
28
44
|
}
|
|
29
45
|
];
|
|
30
46
|
};
|
|
31
47
|
},
|
|
32
48
|
{
|
|
33
|
-
name: "authority";
|
|
34
|
-
docs: [
|
|
35
|
-
|
|
49
|
+
"name": "authority";
|
|
50
|
+
"docs": [
|
|
51
|
+
"authority"
|
|
52
|
+
];
|
|
53
|
+
"signer": true;
|
|
36
54
|
},
|
|
37
55
|
{
|
|
38
|
-
name: "newAuthority";
|
|
56
|
+
"name": "newAuthority";
|
|
39
57
|
}
|
|
40
58
|
];
|
|
41
|
-
args: [];
|
|
59
|
+
"args": [];
|
|
42
60
|
},
|
|
43
61
|
{
|
|
44
|
-
name: "initialize";
|
|
45
|
-
discriminator: [
|
|
46
|
-
|
|
62
|
+
"name": "initialize";
|
|
63
|
+
"discriminator": [
|
|
64
|
+
175,
|
|
65
|
+
175,
|
|
66
|
+
109,
|
|
67
|
+
31,
|
|
68
|
+
13,
|
|
69
|
+
152,
|
|
70
|
+
155,
|
|
71
|
+
237
|
|
72
|
+
];
|
|
73
|
+
"accounts": [
|
|
47
74
|
{
|
|
48
|
-
name: "config";
|
|
49
|
-
writable: true;
|
|
50
|
-
pda: {
|
|
51
|
-
seeds: [
|
|
75
|
+
"name": "config";
|
|
76
|
+
"writable": true;
|
|
77
|
+
"pda": {
|
|
78
|
+
"seeds": [
|
|
52
79
|
{
|
|
53
|
-
kind: "const";
|
|
54
|
-
value: [
|
|
80
|
+
"kind": "const";
|
|
81
|
+
"value": [
|
|
82
|
+
99,
|
|
83
|
+
111,
|
|
84
|
+
110,
|
|
85
|
+
102,
|
|
86
|
+
105,
|
|
87
|
+
103
|
|
88
|
+
];
|
|
55
89
|
}
|
|
56
90
|
];
|
|
57
91
|
};
|
|
58
92
|
},
|
|
59
93
|
{
|
|
60
|
-
name: "authority";
|
|
61
|
-
docs: [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
94
|
+
"name": "authority";
|
|
95
|
+
"docs": [
|
|
96
|
+
"authority"
|
|
97
|
+
];
|
|
98
|
+
"writable": true;
|
|
99
|
+
"signer": true;
|
|
100
|
+
"address": "ACYtYsL4KYtJzD53wqyifqad2D8224kamcngYPgSy3t";
|
|
65
101
|
},
|
|
66
102
|
{
|
|
67
|
-
name: "systemProgram";
|
|
68
|
-
address: "11111111111111111111111111111111";
|
|
103
|
+
"name": "systemProgram";
|
|
104
|
+
"address": "11111111111111111111111111111111";
|
|
69
105
|
}
|
|
70
106
|
];
|
|
71
|
-
args: [];
|
|
107
|
+
"args": [];
|
|
72
108
|
},
|
|
73
109
|
{
|
|
74
|
-
name: "removeFee";
|
|
75
|
-
discriminator: [
|
|
76
|
-
|
|
110
|
+
"name": "removeFee";
|
|
111
|
+
"discriminator": [
|
|
112
|
+
190,
|
|
113
|
+
227,
|
|
114
|
+
105,
|
|
115
|
+
10,
|
|
116
|
+
30,
|
|
117
|
+
161,
|
|
118
|
+
81,
|
|
119
|
+
212
|
|
120
|
+
];
|
|
121
|
+
"accounts": [
|
|
77
122
|
{
|
|
78
|
-
name: "feeValue";
|
|
79
|
-
writable: true;
|
|
80
|
-
pda: {
|
|
81
|
-
seeds: [
|
|
123
|
+
"name": "feeValue";
|
|
124
|
+
"writable": true;
|
|
125
|
+
"pda": {
|
|
126
|
+
"seeds": [
|
|
82
127
|
{
|
|
83
|
-
kind: "const";
|
|
84
|
-
value: [
|
|
128
|
+
"kind": "const";
|
|
129
|
+
"value": [
|
|
130
|
+
102,
|
|
131
|
+
101,
|
|
132
|
+
101,
|
|
133
|
+
45,
|
|
134
|
+
118,
|
|
135
|
+
97,
|
|
136
|
+
108,
|
|
137
|
+
117,
|
|
138
|
+
101
|
|
139
|
+
];
|
|
85
140
|
},
|
|
86
141
|
{
|
|
87
|
-
kind: "account";
|
|
88
|
-
path: "target";
|
|
142
|
+
"kind": "account";
|
|
143
|
+
"path": "target";
|
|
89
144
|
}
|
|
90
145
|
];
|
|
91
146
|
};
|
|
92
147
|
},
|
|
93
148
|
{
|
|
94
|
-
name: "config";
|
|
95
|
-
pda: {
|
|
96
|
-
seeds: [
|
|
149
|
+
"name": "config";
|
|
150
|
+
"pda": {
|
|
151
|
+
"seeds": [
|
|
97
152
|
{
|
|
98
|
-
kind: "const";
|
|
99
|
-
value: [
|
|
153
|
+
"kind": "const";
|
|
154
|
+
"value": [
|
|
155
|
+
99,
|
|
156
|
+
111,
|
|
157
|
+
110,
|
|
158
|
+
102,
|
|
159
|
+
105,
|
|
160
|
+
103
|
|
161
|
+
];
|
|
100
162
|
}
|
|
101
163
|
];
|
|
102
164
|
};
|
|
103
165
|
},
|
|
104
166
|
{
|
|
105
|
-
name: "authority";
|
|
106
|
-
docs: [
|
|
107
|
-
|
|
108
|
-
|
|
167
|
+
"name": "authority";
|
|
168
|
+
"docs": [
|
|
169
|
+
"authority"
|
|
170
|
+
];
|
|
171
|
+
"writable": true;
|
|
172
|
+
"signer": true;
|
|
109
173
|
},
|
|
110
174
|
{
|
|
111
|
-
name: "target";
|
|
175
|
+
"name": "target";
|
|
112
176
|
},
|
|
113
177
|
{
|
|
114
|
-
name: "systemProgram";
|
|
115
|
-
address: "11111111111111111111111111111111";
|
|
178
|
+
"name": "systemProgram";
|
|
179
|
+
"address": "11111111111111111111111111111111";
|
|
116
180
|
}
|
|
117
181
|
];
|
|
118
|
-
args: [];
|
|
182
|
+
"args": [];
|
|
119
183
|
},
|
|
120
184
|
{
|
|
121
|
-
name: "updateConfig";
|
|
122
|
-
discriminator: [
|
|
123
|
-
|
|
185
|
+
"name": "updateConfig";
|
|
186
|
+
"discriminator": [
|
|
187
|
+
29,
|
|
188
|
+
158,
|
|
189
|
+
252,
|
|
190
|
+
191,
|
|
191
|
+
10,
|
|
192
|
+
83,
|
|
193
|
+
219,
|
|
194
|
+
99
|
|
195
|
+
];
|
|
196
|
+
"accounts": [
|
|
124
197
|
{
|
|
125
|
-
name: "config";
|
|
126
|
-
writable: true;
|
|
127
|
-
pda: {
|
|
128
|
-
seeds: [
|
|
198
|
+
"name": "config";
|
|
199
|
+
"writable": true;
|
|
200
|
+
"pda": {
|
|
201
|
+
"seeds": [
|
|
129
202
|
{
|
|
130
|
-
kind: "const";
|
|
131
|
-
value: [
|
|
203
|
+
"kind": "const";
|
|
204
|
+
"value": [
|
|
205
|
+
99,
|
|
206
|
+
111,
|
|
207
|
+
110,
|
|
208
|
+
102,
|
|
209
|
+
105,
|
|
210
|
+
103
|
|
211
|
+
];
|
|
132
212
|
}
|
|
133
213
|
];
|
|
134
214
|
};
|
|
135
215
|
},
|
|
136
216
|
{
|
|
137
|
-
name: "authority";
|
|
138
|
-
docs: [
|
|
139
|
-
|
|
217
|
+
"name": "authority";
|
|
218
|
+
"docs": [
|
|
219
|
+
"authority"
|
|
220
|
+
];
|
|
221
|
+
"signer": true;
|
|
140
222
|
},
|
|
141
223
|
{
|
|
142
|
-
name: "systemProgram";
|
|
143
|
-
address: "11111111111111111111111111111111";
|
|
224
|
+
"name": "systemProgram";
|
|
225
|
+
"address": "11111111111111111111111111111111";
|
|
144
226
|
}
|
|
145
227
|
];
|
|
146
|
-
args: [
|
|
228
|
+
"args": [
|
|
147
229
|
{
|
|
148
|
-
name: "streamflowFee";
|
|
149
|
-
type: {
|
|
150
|
-
option: "u64";
|
|
230
|
+
"name": "streamflowFee";
|
|
231
|
+
"type": {
|
|
232
|
+
"option": "u64";
|
|
151
233
|
};
|
|
152
234
|
}
|
|
153
235
|
];
|
|
154
236
|
},
|
|
155
237
|
{
|
|
156
|
-
name: "writeFee";
|
|
157
|
-
discriminator: [
|
|
158
|
-
|
|
238
|
+
"name": "writeFee";
|
|
239
|
+
"discriminator": [
|
|
240
|
+
80,
|
|
241
|
+
12,
|
|
242
|
+
148,
|
|
243
|
+
143,
|
|
244
|
+
16,
|
|
245
|
+
120,
|
|
246
|
+
24,
|
|
247
|
+
48
|
|
248
|
+
];
|
|
249
|
+
"accounts": [
|
|
159
250
|
{
|
|
160
|
-
name: "feeValue";
|
|
161
|
-
writable: true;
|
|
162
|
-
pda: {
|
|
163
|
-
seeds: [
|
|
251
|
+
"name": "feeValue";
|
|
252
|
+
"writable": true;
|
|
253
|
+
"pda": {
|
|
254
|
+
"seeds": [
|
|
164
255
|
{
|
|
165
|
-
kind: "const";
|
|
166
|
-
value: [
|
|
256
|
+
"kind": "const";
|
|
257
|
+
"value": [
|
|
258
|
+
102,
|
|
259
|
+
101,
|
|
260
|
+
101,
|
|
261
|
+
45,
|
|
262
|
+
118,
|
|
263
|
+
97,
|
|
264
|
+
108,
|
|
265
|
+
117,
|
|
266
|
+
101
|
|
267
|
+
];
|
|
167
268
|
},
|
|
168
269
|
{
|
|
169
|
-
kind: "account";
|
|
170
|
-
path: "target";
|
|
270
|
+
"kind": "account";
|
|
271
|
+
"path": "target";
|
|
171
272
|
}
|
|
172
273
|
];
|
|
173
274
|
};
|
|
174
275
|
},
|
|
175
276
|
{
|
|
176
|
-
name: "config";
|
|
177
|
-
pda: {
|
|
178
|
-
seeds: [
|
|
277
|
+
"name": "config";
|
|
278
|
+
"pda": {
|
|
279
|
+
"seeds": [
|
|
179
280
|
{
|
|
180
|
-
kind: "const";
|
|
181
|
-
value: [
|
|
281
|
+
"kind": "const";
|
|
282
|
+
"value": [
|
|
283
|
+
99,
|
|
284
|
+
111,
|
|
285
|
+
110,
|
|
286
|
+
102,
|
|
287
|
+
105,
|
|
288
|
+
103
|
|
289
|
+
];
|
|
182
290
|
}
|
|
183
291
|
];
|
|
184
292
|
};
|
|
185
293
|
},
|
|
186
294
|
{
|
|
187
|
-
name: "authority";
|
|
188
|
-
docs: [
|
|
189
|
-
|
|
190
|
-
|
|
295
|
+
"name": "authority";
|
|
296
|
+
"docs": [
|
|
297
|
+
"authority"
|
|
298
|
+
];
|
|
299
|
+
"writable": true;
|
|
300
|
+
"signer": true;
|
|
191
301
|
},
|
|
192
302
|
{
|
|
193
|
-
name: "target";
|
|
303
|
+
"name": "target";
|
|
194
304
|
},
|
|
195
305
|
{
|
|
196
|
-
name: "systemProgram";
|
|
197
|
-
address: "11111111111111111111111111111111";
|
|
306
|
+
"name": "systemProgram";
|
|
307
|
+
"address": "11111111111111111111111111111111";
|
|
198
308
|
}
|
|
199
309
|
];
|
|
200
|
-
args: [
|
|
310
|
+
"args": [
|
|
201
311
|
{
|
|
202
|
-
name: "streamflowFee";
|
|
203
|
-
type: "u64";
|
|
312
|
+
"name": "streamflowFee";
|
|
313
|
+
"type": "u64";
|
|
204
314
|
}
|
|
205
315
|
];
|
|
206
316
|
}
|
|
207
317
|
];
|
|
208
|
-
accounts: [
|
|
318
|
+
"accounts": [
|
|
209
319
|
{
|
|
210
|
-
name: "config";
|
|
211
|
-
discriminator: [
|
|
320
|
+
"name": "config";
|
|
321
|
+
"discriminator": [
|
|
322
|
+
155,
|
|
323
|
+
12,
|
|
324
|
+
170,
|
|
325
|
+
224,
|
|
326
|
+
30,
|
|
327
|
+
250,
|
|
328
|
+
204,
|
|
329
|
+
130
|
|
330
|
+
];
|
|
212
331
|
},
|
|
213
332
|
{
|
|
214
|
-
name: "feeValue";
|
|
215
|
-
discriminator: [
|
|
333
|
+
"name": "feeValue";
|
|
334
|
+
"discriminator": [
|
|
335
|
+
10,
|
|
336
|
+
188,
|
|
337
|
+
89,
|
|
338
|
+
64,
|
|
339
|
+
4,
|
|
340
|
+
183,
|
|
341
|
+
231,
|
|
342
|
+
0
|
|
343
|
+
];
|
|
216
344
|
}
|
|
217
345
|
];
|
|
218
|
-
errors: [
|
|
346
|
+
"errors": [
|
|
219
347
|
{
|
|
220
|
-
code: 6000;
|
|
221
|
-
name: "unauthorized";
|
|
222
|
-
msg: "Account is not authorized to execute this instruction";
|
|
348
|
+
"code": 6000;
|
|
349
|
+
"name": "unauthorized";
|
|
350
|
+
"msg": "Account is not authorized to execute this instruction";
|
|
223
351
|
},
|
|
224
352
|
{
|
|
225
|
-
code: 6001;
|
|
226
|
-
name: "invalidFee";
|
|
227
|
-
msg: "Provided fee is not valid";
|
|
353
|
+
"code": 6001;
|
|
354
|
+
"name": "invalidFee";
|
|
355
|
+
"msg": "Provided fee is not valid";
|
|
228
356
|
}
|
|
229
357
|
];
|
|
230
|
-
types: [
|
|
358
|
+
"types": [
|
|
231
359
|
{
|
|
232
|
-
name: "config";
|
|
233
|
-
type: {
|
|
234
|
-
kind: "struct";
|
|
235
|
-
fields: [
|
|
360
|
+
"name": "config";
|
|
361
|
+
"type": {
|
|
362
|
+
"kind": "struct";
|
|
363
|
+
"fields": [
|
|
236
364
|
{
|
|
237
|
-
name: "authority";
|
|
238
|
-
docs: [
|
|
239
|
-
|
|
365
|
+
"name": "authority";
|
|
366
|
+
"docs": [
|
|
367
|
+
"Fee Manager authority"
|
|
368
|
+
];
|
|
369
|
+
"type": "pubkey";
|
|
240
370
|
},
|
|
241
371
|
{
|
|
242
|
-
name: "streamflowFee";
|
|
243
|
-
docs: [
|
|
244
|
-
|
|
372
|
+
"name": "streamflowFee";
|
|
373
|
+
"docs": [
|
|
374
|
+
"Default fee"
|
|
375
|
+
];
|
|
376
|
+
"type": "u64";
|
|
245
377
|
},
|
|
246
378
|
{
|
|
247
|
-
name: "buffer1";
|
|
248
|
-
docs: [
|
|
249
|
-
|
|
250
|
-
|
|
379
|
+
"name": "buffer1";
|
|
380
|
+
"docs": [
|
|
381
|
+
"Buffer for additional fields"
|
|
382
|
+
];
|
|
383
|
+
"type": {
|
|
384
|
+
"array": [
|
|
385
|
+
"u8",
|
|
386
|
+
64
|
|
387
|
+
];
|
|
251
388
|
};
|
|
252
389
|
},
|
|
253
390
|
{
|
|
254
|
-
name: "buffer2";
|
|
255
|
-
docs: [
|
|
256
|
-
|
|
257
|
-
|
|
391
|
+
"name": "buffer2";
|
|
392
|
+
"docs": [
|
|
393
|
+
"Buffer for additional fields"
|
|
394
|
+
];
|
|
395
|
+
"type": {
|
|
396
|
+
"array": [
|
|
397
|
+
"u8",
|
|
398
|
+
64
|
|
399
|
+
];
|
|
258
400
|
};
|
|
259
401
|
},
|
|
260
402
|
{
|
|
261
|
-
name: "buffer3";
|
|
262
|
-
docs: [
|
|
263
|
-
|
|
264
|
-
|
|
403
|
+
"name": "buffer3";
|
|
404
|
+
"docs": [
|
|
405
|
+
"Buffer for additional fields"
|
|
406
|
+
];
|
|
407
|
+
"type": {
|
|
408
|
+
"array": [
|
|
409
|
+
"u8",
|
|
410
|
+
64
|
|
411
|
+
];
|
|
265
412
|
};
|
|
266
413
|
}
|
|
267
414
|
];
|
|
268
415
|
};
|
|
269
416
|
},
|
|
270
417
|
{
|
|
271
|
-
name: "feeValue";
|
|
272
|
-
type: {
|
|
273
|
-
kind: "struct";
|
|
274
|
-
fields: [
|
|
418
|
+
"name": "feeValue";
|
|
419
|
+
"type": {
|
|
420
|
+
"kind": "struct";
|
|
421
|
+
"fields": [
|
|
275
422
|
{
|
|
276
|
-
name: "streamflowFee";
|
|
277
|
-
type: "u64";
|
|
423
|
+
"name": "streamflowFee";
|
|
424
|
+
"type": "u64";
|
|
278
425
|
},
|
|
279
426
|
{
|
|
280
|
-
name: "buffer";
|
|
281
|
-
docs: [
|
|
282
|
-
|
|
283
|
-
|
|
427
|
+
"name": "buffer";
|
|
428
|
+
"docs": [
|
|
429
|
+
"Buffer for additional fields"
|
|
430
|
+
];
|
|
431
|
+
"type": {
|
|
432
|
+
"array": [
|
|
433
|
+
"u8",
|
|
434
|
+
64
|
|
435
|
+
];
|
|
284
436
|
};
|
|
285
437
|
}
|
|
286
438
|
];
|