2024-04-03 21:43:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
## Test
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
yarn test
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Import
|
|
|
|
|
|
|
|
|
|
```
|
2025-09-23 16:57:49 +02:00
|
|
|
yarn add kraiken-lib
|
2024-04-03 21:43:12 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
|
|
```
|
2025-09-23 16:57:49 +02:00
|
|
|
import { bytesToUint256LittleEndian, uint256ToBytesLittleEndian } from "kraiken-lib";
|
2024-04-03 21:43:12 +02:00
|
|
|
|
|
|
|
|
uint256ToBytesLittleEndian(3n);
|
2024-04-04 22:34:16 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## get Snatch List
|
|
|
|
|
|
|
|
|
|
```
|
2025-09-23 16:57:49 +02:00
|
|
|
import { getSnatchList } from "kraiken-lib";
|
2024-04-04 22:34:16 +02:00
|
|
|
|
2025-09-23 16:57:49 +02:00
|
|
|
const positionIds = getSnatchList(positions, neededShares, maxTaxRateDecimal, stakeTotalSupply);
|
2024-04-04 22:34:16 +02:00
|
|
|
```
|