multistake 0.1.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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,49 @@
1
+ import { PublicKey } from "@solana/web3.js";
2
+ import { BN } from "@coral-xyz/anchor";
3
+ /**
4
+ * Pool 配置
5
+ */
6
+ export interface PoolConfig {
7
+ feeNumerator: number;
8
+ feeDenominator: number;
9
+ }
10
+ /**
11
+ * Pool 信息
12
+ */
13
+ export interface PoolInfo {
14
+ admin: PublicKey;
15
+ poolVault: PublicKey;
16
+ poolMint: PublicKey;
17
+ tokenCount: number;
18
+ feeNumerator: BN;
19
+ feeDenominator: BN;
20
+ }
21
+ /**
22
+ * Token 信息
23
+ */
24
+ export interface TokenInfo {
25
+ mintAccount: PublicKey;
26
+ mintAmount: BN;
27
+ weight: BN;
28
+ }
29
+ /**
30
+ * 质押参数
31
+ */
32
+ export interface StakeParams {
33
+ itemIndex: number;
34
+ amount: number | BN;
35
+ }
36
+ /**
37
+ * 取消质押参数
38
+ */
39
+ export interface UnstakeParams {
40
+ itemIndex: number;
41
+ lpAmount: number | BN;
42
+ }
43
+ /**
44
+ * 修改权重参数
45
+ */
46
+ export interface ModifyWeightParams {
47
+ weights: (number | BN)[];
48
+ tokenMints: PublicKey[];
49
+ }
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "multistake",
3
+ "version": "0.1.0",
4
+ "description": "TypeScript SDK for MultiStake - Single Token Staking System",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc && cp src/multistake.json dist/multistake.json",
9
+ "prepublish": "npm run build"
10
+ },
11
+ "keywords": [
12
+ "solana",
13
+ "anchor",
14
+ "staking",
15
+ "defi"
16
+ ],
17
+ "author": "KM-studio",
18
+ "license": "MIT",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/KM-studio/multistake-sdk.git",
22
+ "directory": "app"
23
+ },
24
+ "homepage": "https://github.com/KM-studio/multistake-sdk#readme",
25
+ "bugs": {
26
+ "url": "https://github.com/KM-studio/multistake-sdk/issues"
27
+ },
28
+ "peerDependencies": {
29
+ "@coral-xyz/anchor": "^0.32.0",
30
+ "@solana/web3.js": "^1.95.0",
31
+ "@solana/spl-token": "^0.4.0"
32
+ },
33
+ "devDependencies": {
34
+ "@coral-xyz/anchor": "^0.32.0",
35
+ "@solana/web3.js": "^1.95.0",
36
+ "@solana/spl-token": "^0.4.0",
37
+ "typescript": "^5.0.0"
38
+ }
39
+ }