@streamflow/staking 7.4.1 → 7.4.3
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountsCoder, Idl,
|
|
1
|
+
import { AccountsCoder, Idl, IdlAccounts, Program, ProgramAccount } from "@coral-xyz/anchor";
|
|
2
2
|
import { Commitment, Connection, ConnectionConfig, PublicKey, TransactionInstruction } from "@solana/web3.js";
|
|
3
3
|
import { ICluster, ITransactionResult } from "@streamflow/common";
|
|
4
4
|
import PQueue from "p-queue";
|
|
@@ -81,8 +81,8 @@ export declare class SolanaStakingClient {
|
|
|
81
81
|
prepareUpdateRewardPoolInstructions({ rewardPool, rewardAmount, rewardPeriod, stakePool }: UpdateRewardPoolArgs, extParams: IInteractSolanaExt): Promise<{
|
|
82
82
|
ixs: TransactionInstruction[];
|
|
83
83
|
}>;
|
|
84
|
-
decode<ProgramName extends keyof Programs = keyof Programs, DecodingProgram = Programs[ProgramName], DerivedIdl extends Idl = DecodingProgram extends Program<infer IDLType> ? IDLType : never, AccountName extends keyof
|
|
85
|
-
getDiscriminator<ProgramName extends keyof Programs = keyof Programs, DecodingProgram = Programs[ProgramName], DerivedIdl extends Idl = DecodingProgram extends Program<infer IDLType> ? IDLType : never, AccountName extends keyof
|
|
84
|
+
decode<ProgramName extends keyof Programs = keyof Programs, DecodingProgram = Programs[ProgramName], DerivedIdl extends Idl = DecodingProgram extends Program<infer IDLType> ? IDLType : never, AccountName extends keyof IdlAccounts<DerivedIdl> = keyof IdlAccounts<DerivedIdl>, DecodedAccount = IdlAccounts<DerivedIdl>[AccountName]>(programKey: ProgramName, accountName: AccountName, accInfo: Parameters<AccountsCoder["decode"]>[1]): DecodedAccount;
|
|
85
|
+
getDiscriminator<ProgramName extends keyof Programs = keyof Programs, DecodingProgram = Programs[ProgramName], DerivedIdl extends Idl = DecodingProgram extends Program<infer IDLType> ? IDLType : never, AccountName extends keyof IdlAccounts<DerivedIdl> = keyof IdlAccounts<DerivedIdl>>(programKey: ProgramName, accountName: AccountName): number[];
|
|
86
86
|
private execute;
|
|
87
87
|
}
|
|
88
88
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Address, type
|
|
1
|
+
import { Address, type IdlAccounts } from "@coral-xyz/anchor";
|
|
2
2
|
import { SignerWalletAdapter } from "@solana/wallet-adapter-base";
|
|
3
3
|
import { Keypair } from "@solana/web3.js";
|
|
4
4
|
import { ITransactionSolanaExt } from "@streamflow/common/solana";
|
|
@@ -6,12 +6,12 @@ import BN from "bn.js";
|
|
|
6
6
|
import { RewardPool as RewardPoolIDL } from "./descriptor/reward_pool.js";
|
|
7
7
|
import { StakePool as StakePoolIDL } from "./descriptor/stake_pool.js";
|
|
8
8
|
import { FeeManager as FeeManagerIDL } from "./descriptor/fee_manager.js";
|
|
9
|
-
export type StakePool =
|
|
10
|
-
export type StakeEntry =
|
|
11
|
-
export type RewardEntry =
|
|
12
|
-
export type RewardPool =
|
|
13
|
-
export type FeeValue =
|
|
14
|
-
export type DefaultFeeValueConfig =
|
|
9
|
+
export type StakePool = IdlAccounts<StakePoolIDL>["stakePool"];
|
|
10
|
+
export type StakeEntry = IdlAccounts<StakePoolIDL>["stakeEntry"];
|
|
11
|
+
export type RewardEntry = IdlAccounts<RewardPoolIDL>["rewardEntry"];
|
|
12
|
+
export type RewardPool = IdlAccounts<RewardPoolIDL>["rewardPool"];
|
|
13
|
+
export type FeeValue = IdlAccounts<FeeManagerIDL>["feeValue"];
|
|
14
|
+
export type DefaultFeeValueConfig = IdlAccounts<FeeManagerIDL>["config"];
|
|
15
15
|
export interface IInteractSolanaExt extends ITransactionSolanaExt {
|
|
16
16
|
invoker: SignerWalletAdapter | Keypair;
|
|
17
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamflow/staking",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.3",
|
|
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": "
|
|
30
|
+
"gitHead": "e22bbb3f9755ab0c1824b35f1781da39dea690a7",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@streamflow/eslint-config": "7.4.
|
|
32
|
+
"@streamflow/eslint-config": "7.4.3",
|
|
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.
|
|
43
|
+
"@streamflow/common": "7.4.3",
|
|
44
44
|
"bn.js": "5.2.1",
|
|
45
45
|
"borsh": "^2.0.0",
|
|
46
46
|
"bs58": "5.0.0",
|