@lightprotocol/stateless.js - v0.23.1
    Preparing search index...

    Interface CompressionApiInterface

    interface CompressionApiInterface {
        getCompressedAccount(
            address?: BN,
            hash?: BN,
        ): Promise<CompressedAccountWithMerkleContext | null>;
        getCompressedBalance(address?: BN, hash?: BN): Promise<BN | null>;
        getCompressedBalanceByOwner(owner: PublicKey): Promise<BN>;
        getCompressedAccountProof(hash: BN): Promise<MerkleContextWithMerkleProof>;
        getMultipleCompressedAccounts(
            hashes: BN[],
        ): Promise<CompressedAccountWithMerkleContext[]>;
        getMultipleCompressedAccountProofs(
            hashes: BN[],
        ): Promise<MerkleContextWithMerkleProof[]>;
        getValidityProof(
            hashes: BN[],
            newAddresses: BN[],
        ): Promise<ValidityProofWithContext>;
        getValidityProofV0(
            hashes: HashWithTree[],
            newAddresses: AddressWithTree[],
        ): Promise<ValidityProofWithContext>;
        getValidityProofAndRpcContext(
            hashes: HashWithTree[],
            newAddresses: AddressWithTree[],
        ): Promise<WithContext<ValidityProofWithContext>>;
        getCompressedAccountsByOwner(
            owner: PublicKey,
            config?: GetCompressedAccountsByOwnerConfig,
        ): Promise<WithCursor<CompressedAccountWithMerkleContext[]>>;
        getCompressedMintTokenHolders(
            mint: PublicKey,
            options?: PaginatedOptions,
        ): Promise<WithContext<WithCursor<CompressedMintTokenHolders[]>>>;
        getCompressedTokenAccountsByOwner(
            publicKey: PublicKey,
            options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
        ): Promise<WithCursor<ParsedTokenAccount[]>>;
        getCompressedTokenAccountsByDelegate(
            delegate: PublicKey,
            options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
        ): Promise<WithCursor<ParsedTokenAccount[]>>;
        getCompressedTokenAccountBalance(hash: BN): Promise<{ amount: BN }>;
        getCompressedTokenBalancesByOwner(
            publicKey: PublicKey,
            options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
        ): Promise<WithCursor<TokenBalance[]>>;
        getCompressedTokenBalancesByOwnerV2(
            publicKey: PublicKey,
            options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
        ): Promise<WithContext<WithCursor<TokenBalance[]>>>;
        getTransactionWithCompressionInfo(
            signature: string,
        ): Promise<CompressedTransaction | null>;
        getCompressionSignaturesForAccount(
            hash: BN,
        ): Promise<SignatureWithMetadata[]>;
        getCompressionSignaturesForAddress(
            address: PublicKey,
            options?: PaginatedOptions,
        ): Promise<WithCursor<SignatureWithMetadata[]>>;
        getCompressionSignaturesForOwner(
            owner: PublicKey,
            options?: PaginatedOptions,
        ): Promise<WithCursor<SignatureWithMetadata[]>>;
        getCompressionSignaturesForTokenOwner(
            owner: PublicKey,
            options?: PaginatedOptions,
        ): Promise<WithCursor<SignatureWithMetadata[]>>;
        getLatestNonVotingSignatures(
            limit?: number,
            cursor?: string,
        ): Promise<LatestNonVotingSignatures>;
        getLatestCompressionSignatures(
            cursor?: string,
            limit?: number,
        ): Promise<LatestNonVotingSignaturesPaginated>;
        getIndexerHealth(): Promise<string>;
        getIndexerSlot(): Promise<number>;
        getAccountInfoInterface(
            address: PublicKey,
            programId: PublicKey,
            commitmentOrConfig?: Commitment | GetAccountInfoConfig,
            addressSpace?: TreeInfo,
        ): Promise<
            | {
                accountInfo: AccountInfo<Buffer<ArrayBufferLike>>;
                isCold: boolean;
                loadContext?: MerkleContext;
            }
            | null,
        >;
        getSignaturesForAddressInterface(
            address: PublicKey,
            options?: SignaturesForAddressOptions,
            compressedOptions?: PaginatedOptions,
        ): Promise<SignaturesForAddressInterfaceResult>;
        getSignaturesForOwnerInterface(
            owner: PublicKey,
            options?: SignaturesForAddressOptions,
            compressedOptions?: PaginatedOptions,
        ): Promise<SignaturesForAddressInterfaceResult>;
        getTokenAccountBalanceInterface(
            address: PublicKey,
            owner: PublicKey,
            mint: PublicKey,
            commitment?: Commitment,
        ): Promise<UnifiedTokenBalance>;
        getBalanceInterface(
            address: PublicKey,
            commitment?: Commitment,
        ): Promise<UnifiedBalance>;
    }

    Implemented by

    Index

    Methods

    • Parameters

      • address: PublicKey
      • programId: PublicKey
      • OptionalcommitmentOrConfig: Commitment | GetAccountInfoConfig
      • OptionaladdressSpace: TreeInfo

      Returns Promise<
          | {
              accountInfo: AccountInfo<Buffer<ArrayBufferLike>>;
              isCold: boolean;
              loadContext?: MerkleContext;
          }
          | null,
      >