import { ConfirmedSignatureInfo, Connection, ParsedTransactionWithMeta, PublicKey, TransactionInstruction, AccountInfo, ParsedAccountData } from "@solana/web3.js"; import BigNumber from "bignumber.js"; import { Awaited } from "../../logic"; import { SolanaTokenProgram, StakeCreateAccountCommand, StakeDelegateCommand, StakeSplitCommand, StakeUndelegateCommand, StakeWithdrawCommand, TokenCreateApproveCommand, TokenCreateATACommand, TokenCreateRevokeCommand, TokenTransferCommand, TransferCommand } from "../../types"; import { StakeAccountInfo } from "./account/stake"; import { MintAccountInfo, TokenAccountInfo } from "./account/token"; import { VoteAccountInfo } from "./account/vote"; import { ChainAPI } from "."; export type ParsedOnChainTokenAccount = Awaited>["value"][number]; type ParsedOnChainStakeAccount = Awaited>[number]; export type ParsedOnChainTokenAccountWithInfo = { onChainAcc: ParsedOnChainTokenAccount; info: TokenAccountInfo; }; export type ParsedOnChainMintWithInfo = { onChainAcc: AccountInfo; info: MintAccountInfo; }; export type ParsedOnChainStakeAccountWithInfo = { onChainAcc: ParsedOnChainStakeAccount; info: StakeAccountInfo; }; export declare function toTokenAccountWithInfo(onChainAcc: ParsedOnChainTokenAccount): ParsedOnChainTokenAccountWithInfo; export declare function toStakeAccountWithInfo(onChainAcc: ParsedOnChainStakeAccount): ParsedOnChainStakeAccountWithInfo | undefined; export type TransactionDescriptor = { parsed: ParsedTransactionWithMeta; info: ConfirmedSignatureInfo; }; export declare function getTransactions(address: string, untilTxSignature: string | undefined, api: ChainAPI): Promise; export declare const buildTransferInstructions: (api: ChainAPI, { sender, recipient, amount, memo }: TransferCommand) => Promise; export declare const buildTokenTransferInstructions: (api: ChainAPI, command: TokenTransferCommand) => Promise; export declare const buildApproveTransactionInstructions: (api: ChainAPI, { account, mintAddress, recipientDescriptor, owner, amount, decimals, tokenProgram, }: TokenCreateApproveCommand) => Promise; export declare const buildRevokeTransactionInstructions: (api: ChainAPI, { account, owner, tokenProgram }: TokenCreateRevokeCommand) => Promise; export declare function findAssociatedTokenAccountPubkey(ownerAddress: string, mintAddress: string, tokenProgram: SolanaTokenProgram): Promise; export declare const getMaybeMintAccount: (address: string, api: ChainAPI) => Promise; export declare const getMaybeTokenAccount: (address: string, api: ChainAPI) => Promise; export declare function getMaybeVoteAccount(address: string, api: ChainAPI): Promise; export declare const getMaybeTokenMint: (address: string, api: ChainAPI) => Promise; export declare const getMaybeTokenMintProgram: (address: string, api: ChainAPI) => Promise; export declare function getStakeAccountMinimumBalanceForRentExemption(api: ChainAPI): Promise; export declare function getStakeMinimumDelegation(api: ChainAPI): Promise; export declare function getAccountMinimumBalanceForRentExemption(api: ChainAPI, address: string): Promise; export declare function getTokenAccruedInterestDelta(api: ChainAPI, amount: BigNumber, magnitude: number, mint: string, payerAddress: string): Promise; export declare function getStakeAccountAddressWithSeed({ fromAddress, seed, }: { fromAddress: string; seed: string; }): Promise; export declare function getPriorityFee(api: ChainAPI, accounts: string[]): Promise; export declare function appendMaybePriorityFeeInstructions(api: ChainAPI, ixs: TransactionInstruction[], payer: PublicKey): Promise; export declare function buildMaybePriorityFeeInstruction(api: ChainAPI, accounts: string[]): Promise; export declare function buildComputeUnitInstruction(api: ChainAPI, ixs: TransactionInstruction[], payer: PublicKey): Promise; export declare function buildCreateAssociatedTokenAccountInstruction(api: ChainAPI, { mint, owner, associatedTokenAccountAddress }: TokenCreateATACommand): Promise; export declare function buildStakeDelegateInstructions(api: ChainAPI, { authorizedAccAddr, stakeAccAddr, voteAccAddr }: StakeDelegateCommand): Promise; export declare function buildStakeUndelegateInstructions(api: ChainAPI, { authorizedAccAddr, stakeAccAddr }: StakeUndelegateCommand): Promise; export declare function buildStakeWithdrawInstructions(api: ChainAPI, { authorizedAccAddr, stakeAccAddr, amount, toAccAddr }: StakeWithdrawCommand): Promise; export declare function buildStakeSplitInstructions(api: ChainAPI, { authorizedAccAddr, stakeAccAddr, seed, amount, splitStakeAccAddr }: StakeSplitCommand): Promise; export declare function buildStakeCreateAccountInstructions(api: ChainAPI, { fromAccAddress, stakeAccAddress, seed, amount, stakeAccRentExemptAmount, delegate, }: StakeCreateAccountCommand): Promise; export {}; //# sourceMappingURL=web3.d.ts.map