diff --git a/lerna.json b/lerna.json index 08086b0..dd27438 100644 --- a/lerna.json +++ b/lerna.json @@ -2,6 +2,6 @@ "packages": [ "packages/*" ], - "version": "7.4.2", + "version": "7.4.3", "$schema": "node_modules/lerna/schemas/lerna-schema.json" } diff --git a/packages/common/package.json b/packages/common/package.json index 61e756e..d890c4d 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@streamflow/common", - "version": "7.4.2", + "version": "7.4.3", "description": "Common utilities and types used by streamflow packages.", "homepage": "https://github.com/streamflow-finance/js-sdk/", "main": "./dist/esm/index.js", diff --git a/packages/distributor/package.json b/packages/distributor/package.json index 55e52ee..935ae70 100644 --- a/packages/distributor/package.json +++ b/packages/distributor/package.json @@ -1,6 +1,6 @@ { "name": "@streamflow/distributor", - "version": "7.4.2", + "version": "7.4.3", "description": "JavaScript SDK to interact with Streamflow Airdrop protocol.", "homepage": "https://github.com/streamflow-finance/js-sdk/", "main": "dist/esm/index.js", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 008386c..a1322d5 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@streamflow/eslint-config", - "version": "7.4.2", + "version": "7.4.3", "license": "ISC", "main": "index.js", "files": [ diff --git a/packages/launchpad/package.json b/packages/launchpad/package.json index 18c1d10..78df703 100644 --- a/packages/launchpad/package.json +++ b/packages/launchpad/package.json @@ -1,6 +1,6 @@ { "name": "@streamflow/launchpad", - "version": "7.4.2", + "version": "7.4.3", "description": "JavaScript SDK to interact with Streamflow Launchpad protocol.", "homepage": "https://github.com/streamflow-finance/js-sdk/", "main": "dist/esm/index.js", diff --git a/packages/launchpad/solana/types.ts b/packages/launchpad/solana/types.ts index d3ebefe..9e6824c 100644 --- a/packages/launchpad/solana/types.ts +++ b/packages/launchpad/solana/types.ts @@ -1,4 +1,4 @@ -import { Address, type IdlTypes } from "@coral-xyz/anchor"; +import { Address, type IdlAccounts } from "@coral-xyz/anchor"; import { SignerWalletAdapter } from "@solana/wallet-adapter-base"; import { Keypair } from "@solana/web3.js"; import { ITransactionSolanaExt } from "@streamflow/common/solana"; @@ -7,8 +7,8 @@ import BN from "bn.js"; import { StreamflowLaunchpad } from "./descriptor/streamflow_launchpad.js"; -export type Launchpad = IdlTypes["launchpad"]; -export type DepositAccount = IdlTypes["depositAccount"]; +export type Launchpad = IdlAccounts["launchpad"]; +export type DepositAccount = IdlAccounts["depositAccount"]; export interface IInteractSolanaExt extends ITransactionSolanaExt { invoker: SignerWalletAdapter | Keypair; diff --git a/packages/staking/package.json b/packages/staking/package.json index e6f1dbd..f8c474e 100644 --- a/packages/staking/package.json +++ b/packages/staking/package.json @@ -1,6 +1,6 @@ { "name": "@streamflow/staking", - "version": "7.4.2", + "version": "7.4.3", "description": "JavaScript SDK to interact with Streamflow Staking protocol.", "homepage": "https://github.com/streamflow-finance/js-sdk/", "main": "dist/esm/index.js", diff --git a/packages/staking/solana/client.ts b/packages/staking/solana/client.ts index 267cf72..51e11be 100644 --- a/packages/staking/solana/client.ts +++ b/packages/staking/solana/client.ts @@ -2,7 +2,7 @@ import { AccountsCoder, AnchorError, Idl, - IdlTypes, + IdlAccounts, Program, ProgramAccount, ProgramError, @@ -496,8 +496,8 @@ export class SolanaStakingClient { ProgramName extends keyof Programs = keyof Programs, DecodingProgram = Programs[ProgramName], DerivedIdl extends Idl = DecodingProgram extends Program ? IDLType : never, - AccountName extends keyof IdlTypes = keyof IdlTypes, - DecodedAccount = IdlTypes[AccountName], + AccountName extends keyof IdlAccounts = keyof IdlAccounts, + DecodedAccount = IdlAccounts[AccountName], >( programKey: ProgramName, accountName: AccountName, @@ -512,7 +512,7 @@ export class SolanaStakingClient { ProgramName extends keyof Programs = keyof Programs, DecodingProgram = Programs[ProgramName], DerivedIdl extends Idl = DecodingProgram extends Program ? IDLType : never, - AccountName extends keyof IdlTypes = keyof IdlTypes, + AccountName extends keyof IdlAccounts = keyof IdlAccounts, >(programKey: ProgramName, accountName: AccountName): number[] { const decodingProgram = this.programs[programKey]; invariant(decodingProgram, `Decoding program with key ${programKey} is not available`); diff --git a/packages/staking/solana/types.ts b/packages/staking/solana/types.ts index a370b1e..53a795c 100644 --- a/packages/staking/solana/types.ts +++ b/packages/staking/solana/types.ts @@ -1,4 +1,4 @@ -import { Address, type IdlTypes } from "@coral-xyz/anchor"; +import { Address, type IdlAccounts } from "@coral-xyz/anchor"; import { SignerWalletAdapter } from "@solana/wallet-adapter-base"; import { Keypair } from "@solana/web3.js"; import { ITransactionSolanaExt } from "@streamflow/common/solana"; @@ -8,12 +8,12 @@ import { RewardPool as RewardPoolIDL } from "./descriptor/reward_pool.js"; import { StakePool as StakePoolIDL } from "./descriptor/stake_pool.js"; import { FeeManager as FeeManagerIDL } from "./descriptor/fee_manager.js"; -export type StakePool = IdlTypes["stakePool"]; -export type StakeEntry = IdlTypes["stakeEntry"]; -export type RewardEntry = IdlTypes["rewardEntry"]; -export type RewardPool = IdlTypes["rewardPool"]; -export type FeeValue = IdlTypes["feeValue"]; -export type DefaultFeeValueConfig = IdlTypes["config"]; +export type StakePool = IdlAccounts["stakePool"]; +export type StakeEntry = IdlAccounts["stakeEntry"]; +export type RewardEntry = IdlAccounts["rewardEntry"]; +export type RewardPool = IdlAccounts["rewardPool"]; +export type FeeValue = IdlAccounts["feeValue"]; +export type DefaultFeeValueConfig = IdlAccounts["config"]; export interface IInteractSolanaExt extends ITransactionSolanaExt { invoker: SignerWalletAdapter | Keypair; diff --git a/packages/stream/package.json b/packages/stream/package.json index 5de0097..ae2bbcd 100644 --- a/packages/stream/package.json +++ b/packages/stream/package.json @@ -1,6 +1,6 @@ { "name": "@streamflow/stream", - "version": "7.4.2", + "version": "7.4.3", "description": "JavaScript SDK to interact with Streamflow protocol.", "homepage": "https://github.com/streamflow-finance/js-sdk/", "main": "./dist/esm/index.js", diff --git a/packages/stream/solana/types.ts b/packages/stream/solana/types.ts index aca0a22..f66752b 100644 --- a/packages/stream/solana/types.ts +++ b/packages/stream/solana/types.ts @@ -2,7 +2,7 @@ import { SignerWalletAdapter } from "@solana/wallet-adapter-base"; import { AccountInfo, PublicKey, Keypair, VersionedTransaction, TransactionInstruction } from "@solana/web3.js"; import { ITransactionSolanaExt } from "@streamflow/common/solana"; import BN from "bn.js"; -import { type IdlTypes } from "@coral-xyz/anchor"; +import { type IdlAccounts, type IdlTypes } from "@coral-xyz/anchor"; import { buildStreamType, calculateUnlockedAmount, decodeEndTime } from "../common/contractUtils.js"; import { AlignedStream, IRecipient, LinearStream, OracleTypeName, StreamType } from "../common/types.js"; @@ -13,10 +13,11 @@ import { ALIGNED_PRECISION_FACTOR_POW } from "./constants.js"; export { IChain, ICluster, ContractError } from "@streamflow/common"; type AlignedUnlocksTypes = IdlTypes; +type AlignedUnlocksAccounts = IdlAccounts; -export type AlignedUnlocksContract = AlignedUnlocksTypes["contract"]; -export type OracleType = AlignedUnlocksTypes["oracleType"]; -export type TestOracle = AlignedUnlocksTypes["testOracle"]; +export type AlignedUnlocksContract = AlignedUnlocksAccounts["contract"]; +export type OracleType = IdlTypes["oracleType"]; +export type TestOracle = AlignedUnlocksAccounts["testOracle"]; export type CreateParams = AlignedUnlocksTypes["createParams"]; export type ChangeOracleParams = AlignedUnlocksTypes["changeOracleParams"];