@saberhq/sail
Version: 
Account caching and batched loading for React-based Solana applications.
26 lines • 822 B
TypeScript
/// <reference types="node" />
import type { AccountInfo, KeyedAccountInfo, PublicKey } from "@solana/web3.js";
import type { SailAccountLoadError } from "./errors/errors";
/**
 * Account id + info.
 * This is null if the account could not be found, or undefined
 * if the data is still loading.
 */
export declare type AccountDatum = KeyedAccountInfo | null | undefined;
/**
 * Result of the fetching of an account.
 */
export interface AccountFetchResult {
    data: KeyedAccountInfo | null;
    error?: SailAccountLoadError;
}
/**
 * Parsed account with additional info.
 */
export declare type ParsedAccountInfo<T> = {
    accountId: PublicKey;
    accountInfo: AccountInfo<T>;
    raw: Buffer;
};
export declare type ParsedAccountDatum<T> = ParsedAccountInfo<T> | undefined | null;
//# sourceMappingURL=types.d.ts.map