import type { Address } from "@coral-xyz/anchor"; import type { Keypair, PublicKey } from "@solana/web3.js"; export type RpcNetwork = "mainnet-beta" | "devnet"; export type Numeric = string | number; export type StreamConfigInfo = { configName: string; address: PublicKey; admin: PublicKey; withdrawerAccount: PublicKey; whitelistedTokens: PublicKey[]; platformFee: number; baseFee: number; frequencies: number[]; feeTiers: FeeTier[]; feeVault: PublicKey; }; export type StreamMetadataInfo = { address: PublicKey; parties: { sender: PublicKey; receiver: PublicKey; }; financials: { streamToken: PublicKey; cliffPercentage: number; depositedAmount: string; withdrawnAmount: string; }; schedule: { startTime: number; endTime: number; lastWithdrawTime: number; frequency: number; duration: number; pausedTimestamp: number; pausedInterval: number; canceledTimestamp: number; }; permissions: { cancelableBySender: boolean; cancelableByRecipient: boolean; automaticWithdrawal: boolean; transferableBySender: boolean; transferableByRecipient: boolean; canTopup: boolean; isPausable: boolean; rateUpdatable: boolean; }; streamName: string; }; export type TokenMetadata = { mint: PublicKey; decimals: number; freezeAuthority: PublicKey | null; supply: string; isInitialized: boolean; mintAuthority: PublicKey | null; metadata: { address: PublicKey; updateAuthority: PublicKey; name: string; symbol: string; uri: string; } | null; }; export type CreateStreamParams = { feePayer?: Address; receiver: Address; sender: Address; streamToken: Address; amount: Numeric; automaticWithdrawal: boolean; cancelableByRecipient: boolean; cancelableBySender: boolean; cliffPercentage: Numeric; duration: number; isPausable: boolean; startNow: boolean; startTime: number; autoWithdrawFrequency: number; streamName: string; transferableByRecipient: boolean; transferableBySender: boolean; canTopup: boolean; rateUpdatable: boolean; streamMetadataKeypair?: Keypair; }; export type InitializeStreamConfigParams = { admin?: Address; config: { baseFeePercent: Numeric; frequencies: number[]; platformFeePercent: Numeric; withdrawAccount: Address; feeTiers: FeeTier[]; feeVault: Address; }; }; export type FeeTier = { minThreshold: Numeric; maxThreshold: Numeric; feeRateInPercent: Numeric; }; export type UpdateStreamConfigParams = { admin?: Address; config: { baseFeePercent: Numeric; frequencies: number[]; platformFeePercent: Numeric; withdrawAccount: Address; feeTiers: FeeTier[]; feeVault: Address; }; }; export type CancelStreamParams = { feePayer?: Address; streamMetadata: Address; user: Address; }; export type PauseResumeStreamParams = { streamMetadata: Address; }; export type WithdrawStreamParams = { streamMetadata: Address; withdrawer?: Address; feePayer?: Address; receiver: Address; }; export type WhiteListTokensParams = { admin: Address; tokens: Address[]; }; export type ChangeStreamReceiverParams = { streamMetadata: Address; newRecipient: Address; signer: Address; }; export type StreamFeeInfo = { tokenSymbol: string; mintAddress: string; chain: string; streamAmount: string; streamAmountUi: string; tokenPriceUsd: number; streamAmountUsd: number; feeTier: { tier: number; range: string; feeRatePercent: number; }; feeRatePercent: number; feeAmountUsd: number; feeToken: { symbol: string; decimals: number; priceUsd: number; mintAddress: string; }; feeAmount: number; feeAmountRaw: string; };