/**
* This code was GENERATED using the solita package.
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
*
* See: https://github.com/metaplex-foundation/solita
*/
///
import * as web3 from '@solana/web3.js';
import * as beet from '@metaplex-foundation/beet';
import * as beetSolana from '@metaplex-foundation/beet-solana';
/**
* Arguments used to create {@link UserProfile}
* @category Accounts
* @category generated
*/
export type UserProfileArgs = {
userWallet: web3.PublicKey;
lastUserClaimedChipTokenTimestamp: beet.bignum;
lastUserDepositedChipTokenTimestamp: beet.bignum;
userRegisteredTimestamp: beet.bignum;
totalAvailableUserWithdrawalAmount: beet.bignum;
lastDepositOrderAmount: beet.bignum;
lastDepositOrderId: beet.bignum;
lastWithdrawalOrderTransferAmount: beet.bignum;
lastWithdrawalOrderFeeAmount: beet.bignum;
lastWithdrawalOrderId: beet.bignum;
availablePoints: beet.bignum;
lastAllocatedPointAmount: beet.bignum;
lastAllocatedPointOrderId: beet.bignum;
lastUserObtainedPointsTimestamp: beet.bignum;
lastUserClaimedPointsTimestamp: beet.bignum;
isApprovedClaimChipToken: boolean;
isBlocked: boolean;
bump: number;
};
export declare const userProfileDiscriminator: number[];
/**
* Holds the data for the {@link UserProfile} Account and provides de/serialization
* functionality for that data
*
* @category Accounts
* @category generated
*/
export declare class UserProfile implements UserProfileArgs {
readonly userWallet: web3.PublicKey;
readonly lastUserClaimedChipTokenTimestamp: beet.bignum;
readonly lastUserDepositedChipTokenTimestamp: beet.bignum;
readonly userRegisteredTimestamp: beet.bignum;
readonly totalAvailableUserWithdrawalAmount: beet.bignum;
readonly lastDepositOrderAmount: beet.bignum;
readonly lastDepositOrderId: beet.bignum;
readonly lastWithdrawalOrderTransferAmount: beet.bignum;
readonly lastWithdrawalOrderFeeAmount: beet.bignum;
readonly lastWithdrawalOrderId: beet.bignum;
readonly availablePoints: beet.bignum;
readonly lastAllocatedPointAmount: beet.bignum;
readonly lastAllocatedPointOrderId: beet.bignum;
readonly lastUserObtainedPointsTimestamp: beet.bignum;
readonly lastUserClaimedPointsTimestamp: beet.bignum;
readonly isApprovedClaimChipToken: boolean;
readonly isBlocked: boolean;
readonly bump: number;
private constructor();
/**
* Creates a {@link UserProfile} instance from the provided args.
*/
static fromArgs(args: UserProfileArgs): UserProfile;
/**
* Deserializes the {@link UserProfile} from the data of the provided {@link web3.AccountInfo}.
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
*/
static fromAccountInfo(accountInfo: web3.AccountInfo, offset?: number): [UserProfile, number];
/**
* Retrieves the account info from the provided address and deserializes
* the {@link UserProfile} from its data.
*
* @throws Error if no account info is found at the address or if deserialization fails
*/
static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise;
/**
* Provides a {@link web3.Connection.getProgramAccounts} config builder,
* to fetch accounts matching filters that can be specified via that builder.
*
* @param programId - the program that owns the accounts we are filtering
*/
static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{
accountDiscriminator: any;
bump: any;
userWallet: any;
lastUserClaimedChipTokenTimestamp: any;
lastUserDepositedChipTokenTimestamp: any;
userRegisteredTimestamp: any;
totalAvailableUserWithdrawalAmount: any;
lastDepositOrderAmount: any;
lastDepositOrderId: any;
lastWithdrawalOrderTransferAmount: any;
lastWithdrawalOrderFeeAmount: any;
lastWithdrawalOrderId: any;
availablePoints: any;
lastAllocatedPointAmount: any;
lastAllocatedPointOrderId: any;
lastUserObtainedPointsTimestamp: any;
lastUserClaimedPointsTimestamp: any;
isApprovedClaimChipToken: any;
isBlocked: any;
}>;
/**
* Deserializes the {@link UserProfile} from the provided data Buffer.
* @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
*/
static deserialize(buf: Buffer, offset?: number): [UserProfile, number];
/**
* Serializes the {@link UserProfile} into a Buffer.
* @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
*/
serialize(): [Buffer, number];
/**
* Returns the byteSize of a {@link Buffer} holding the serialized data of
* {@link UserProfile}
*/
static get byteSize(): number;
/**
* Fetches the minimum balance needed to exempt an account holding
* {@link UserProfile} data from rent
*
* @param connection used to retrieve the rent exemption information
*/
static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise;
/**
* Determines if the provided {@link Buffer} has the correct byte size to
* hold {@link UserProfile} data.
*/
static hasCorrectByteSize(buf: Buffer, offset?: number): boolean;
/**
* Returns a readable version of {@link UserProfile} properties
* and can be used to convert to JSON and/or logging
*/
pretty(): {
userWallet: string;
lastUserClaimedChipTokenTimestamp: number | {
toNumber: () => number;
};
lastUserDepositedChipTokenTimestamp: number | {
toNumber: () => number;
};
userRegisteredTimestamp: number | {
toNumber: () => number;
};
totalAvailableUserWithdrawalAmount: number | {
toNumber: () => number;
};
lastDepositOrderAmount: number | {
toNumber: () => number;
};
lastDepositOrderId: number | {
toNumber: () => number;
};
lastWithdrawalOrderTransferAmount: number | {
toNumber: () => number;
};
lastWithdrawalOrderFeeAmount: number | {
toNumber: () => number;
};
lastWithdrawalOrderId: number | {
toNumber: () => number;
};
availablePoints: number | {
toNumber: () => number;
};
lastAllocatedPointAmount: number | {
toNumber: () => number;
};
lastAllocatedPointOrderId: number | {
toNumber: () => number;
};
lastUserObtainedPointsTimestamp: number | {
toNumber: () => number;
};
lastUserClaimedPointsTimestamp: number | {
toNumber: () => number;
};
isApprovedClaimChipToken: boolean;
isBlocked: boolean;
bump: number;
};
}
/**
* @category Accounts
* @category generated
*/
export declare const userProfileBeet: beet.BeetStruct;