///
///
import { web3, BN } from "@coral-xyz/anchor";
export interface StorageAccountFields {
/**
* Immutable boolean to track what kind of storage account this is.
* NOTE: Not used in current implementation w/ non-dynamic storage payments
*/
isStatic: boolean;
/**
* Flag on whether storage account is public (usable by anyone)
* Counter tracking how many files have been initialized
*/
initCounter: number;
/** Counter tracking how many files have been deleted */
delCounter: number;
/** Boolean to track whether storage account (and all child File accounts) are immutable */
immutable: boolean;
/** Delete flag */
toBeDeleted: boolean;
/** Delete request epoch */
deleteRequestEpoch: number;
/** Number of bytes of storage associated with this account */
storage: BN;
/** Bytes available for use */
storageAvailable: BN;
/** Primary owner of StorageAccount (immutable) */
owner1: web3.PublicKey;
/** Optional owner 2 */
owner2: web3.PublicKey;
/** Pubkey of the token account that staked SHDW */
shdwPayer: web3.PublicKey;
/** Counter at time of initialization */
accountCounterSeed: number;
/** Total shades paid for current box size */
totalCostOfCurrentStorage: BN;
totalFeesPaid: BN;
/** Time of storage account creation */
creationTime: number;
/** Time of storage account creation */
creationEpoch: number;
/** The last epoch through which the user paid */
lastFeeEpoch: number;
/**
* Some unique identifier that the user provides.
* Serves as a seed for storage account PDA.
*/
identifier: string;
}
export interface StorageAccountJSON {
/**
* Immutable boolean to track what kind of storage account this is.
* NOTE: Not used in current implementation w/ non-dynamic storage payments
*/
isStatic: boolean;
/**
* Flag on whether storage account is public (usable by anyone)
* Counter tracking how many files have been initialized
*/
initCounter: number;
/** Counter tracking how many files have been deleted */
delCounter: number;
/** Boolean to track whether storage account (and all child File accounts) are immutable */
immutable: boolean;
/** Delete flag */
toBeDeleted: boolean;
/** Delete request epoch */
deleteRequestEpoch: number;
/** Number of bytes of storage associated with this account */
storage: string;
/** Bytes available for use */
storageAvailable: string;
/** Primary owner of StorageAccount (immutable) */
owner1: string;
/** Optional owner 2 */
owner2: string;
/** Pubkey of the token account that staked SHDW */
shdwPayer: string;
/** Counter at time of initialization */
accountCounterSeed: number;
/** Total shades paid for current box size */
totalCostOfCurrentStorage: string;
totalFeesPaid: string;
/** Time of storage account creation */
creationTime: number;
/** Time of storage account creation */
creationEpoch: number;
/** The last epoch through which the user paid */
lastFeeEpoch: number;
/**
* Some unique identifier that the user provides.
* Serves as a seed for storage account PDA.
*/
identifier: string;
}
export declare class StorageAccount {
/**
* Immutable boolean to track what kind of storage account this is.
* NOTE: Not used in current implementation w/ non-dynamic storage payments
*/
readonly isStatic: boolean;
/**
* Flag on whether storage account is public (usable by anyone)
* Counter tracking how many files have been initialized
*/
readonly initCounter: number;
/** Counter tracking how many files have been deleted */
readonly delCounter: number;
/** Boolean to track whether storage account (and all child File accounts) are immutable */
readonly immutable: boolean;
/** Delete flag */
readonly toBeDeleted: boolean;
/** Delete request epoch */
readonly deleteRequestEpoch: number;
/** Number of bytes of storage associated with this account */
readonly storage: BN;
/** Bytes available for use */
readonly storageAvailable: BN;
/** Primary owner of StorageAccount (immutable) */
readonly owner1: web3.PublicKey;
/** Optional owner 2 */
readonly owner2: web3.PublicKey;
/** Pubkey of the token account that staked SHDW */
readonly shdwPayer: web3.PublicKey;
/** Counter at time of initialization */
readonly accountCounterSeed: number;
/** Total shades paid for current box size */
readonly totalCostOfCurrentStorage: BN;
readonly totalFeesPaid: BN;
/** Time of storage account creation */
readonly creationTime: number;
/** Time of storage account creation */
readonly creationEpoch: number;
/** The last epoch through which the user paid */
readonly lastFeeEpoch: number;
/**
* Some unique identifier that the user provides.
* Serves as a seed for storage account PDA.
*/
readonly identifier: string;
static readonly discriminator: Buffer;
static readonly layout: any;
constructor(fields: StorageAccountFields);
static fetch(c: web3.Connection, address: web3.PublicKey): Promise;
static fetchMultiple(c: web3.Connection, addresses: web3.PublicKey[]): Promise>;
static decode(data: Buffer): StorageAccount;
toJSON(): StorageAccountJSON;
static fromJSON(obj: StorageAccountJSON): StorageAccount;
}
//# sourceMappingURL=StorageAccount.d.ts.map