Constructors
constructor
- new BankSharedPoolLib(programId: PublicKey, connection: Connection, wallet: Wallet): BankSharedPoolLib
Parameters
programId: PublicKey
connection: Connection
wallet: Wallet
Properties
connection
connection: Connection
program
Methods
addFeePayerAndRecentBlockHashInTransaction
- addFeePayerAndRecentBlockHashInTransaction(tx: Transaction, feePayer: PublicKey): Promise<Transaction>
Parameters
tx: Transaction
feePayer: PublicKey
Returns Promise<Transaction>
addSignatureInTransaction
- addSignatureInTransaction(tx: Transaction, signerAddress: PublicKey, signature: Buffer): Transaction
Parameters
tx: Transaction
signerAddress: PublicKey
signature: Buffer
Returns Transaction
addSolDepositEventListener
- addSolDepositEventListener(callback: ((event: SolDepositEvent) => void)): number
Parameters
Returns number
addSolDistributionEventListener
Parameters
Returns number
addSolSpendEventListener
- addSolSpendEventListener(callback: ((event: SolSpendEvent) => void)): number
Parameters
Returns number
addSolWithdrawEventListener
- addSolWithdrawEventListener(callback: ((event: SolWithdrawEvent) => void)): number
Parameters
Returns number
addTokenDepositEventListener
Parameters
Returns number
addTokenDistributionEventListener
Parameters
Returns number
addTokenSpendEventListener
- addTokenSpendEventListener(callback: ((event: TokenSpendEvent) => void)): number
Parameters
Returns number
addTokenWithdrawEventListener
Parameters
Returns number
createAddSolDepositSupplyTransaction
- createAddSolDepositSupplyTransaction(bankName: string, amount: number, supplyProvider: PublicKey, solSigningAuthority: PublicKey, payer: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
bankName: string
amount: number
supplyProvider: PublicKey
solSigningAuthority: PublicKey
payer: PublicKey
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createAddSolDistributionSupplyTransaction
- createAddSolDistributionSupplyTransaction(bankName: string, amount: number, supplyProvider: PublicKey, solSigningAuthority: PublicKey, payer: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
bankName: string
amount: number
supplyProvider: PublicKey
solSigningAuthority: PublicKey
payer: PublicKey
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createAddTokenDepositSupplyTransaction
- createAddTokenDepositSupplyTransaction(tokenMintAccount: PublicKey, bankName: string, amount: number, supplyProvider: PublicKey, tokenSigningAuthority: PublicKey, payer: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
tokenMintAccount: PublicKey
bankName: string
amount: number
supplyProvider: PublicKey
tokenSigningAuthority: PublicKey
payer: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createAddTokenDistributionSupplyTransaction
- createAddTokenDistributionSupplyTransaction(tokenMintAccount: PublicKey, bankName: string, amount: number, supplyProvider: PublicKey, tokenSigningAuthority: PublicKey, payer: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
tokenMintAccount: PublicKey
bankName: string
amount: number
supplyProvider: PublicKey
tokenSigningAuthority: PublicKey
payer: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createBankConfigTransaction
- createBankConfigTransaction(bankName: string, bankSigningAuthority: PublicKey, payer: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
bankName: string
bankSigningAuthority: PublicKey
payer: PublicKey
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createDepositSolTransaction
- createDepositSolTransaction(bankName: string, amount: number, depositFrom: PublicKey, user: PublicKey, solSigningAuthority: PublicKey, payer: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
bankName: string
amount: number
depositFrom: PublicKey
user: PublicKey
solSigningAuthority: PublicKey
payer: PublicKey
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createDepositTokenTransaction
- createDepositTokenTransaction(tokenMintAccount: PublicKey, bankName: string, amount: number, depositFrom: PublicKey, user: PublicKey, tokenSigningAuthority: PublicKey, payer: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
tokenMintAccount: PublicKey
bankName: string
amount: number
depositFrom: PublicKey
user: PublicKey
tokenSigningAuthority: PublicKey
payer: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createDistributeSolTransaction
- createDistributeSolTransaction(bankName: string, amount: number, solSigningAuthority: PublicKey, user: PublicKey, payer: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
bankName: string
amount: number
solSigningAuthority: PublicKey
user: PublicKey
payer: PublicKey
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createDistributeSolWithoutUserTransaction
- createDistributeSolWithoutUserTransaction(bankName: string, amount: number, solSigningAuthority: PublicKey, user: PublicKey, payer: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
bankName: string
amount: number
solSigningAuthority: PublicKey
user: PublicKey
payer: PublicKey
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createDistributeTokenTransaction
- createDistributeTokenTransaction(tokenMintAccount: PublicKey, bankName: string, amount: number, tokenSigningAuthority: PublicKey, user: PublicKey, payer: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
tokenMintAccount: PublicKey
bankName: string
amount: number
tokenSigningAuthority: PublicKey
user: PublicKey
payer: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createDistributeTokenWithoutUserTransaction
- createDistributeTokenWithoutUserTransaction(tokenMintAccount: PublicKey, bankName: string, amount: number, tokenSigningAuthority: PublicKey, user: PublicKey, payer: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
tokenMintAccount: PublicKey
bankName: string
amount: number
tokenSigningAuthority: PublicKey
user: PublicKey
payer: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createInitializeMainConfigTransaction
- createInitializeMainConfigTransaction(mainSigningAuthority: PublicKey, payer: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
mainSigningAuthority: PublicKey
payer: PublicKey
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createSolConfigTransaction
- createSolConfigTransaction(bankName: string, isMaxWithdrawEnable: boolean, isMinWithdrawEnable: boolean, maxWithdraw: number, minWithdraw: number, incomeAccount: PublicKey, solSigningAuthority: PublicKey, bankSigningAuthority: PublicKey, payer: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
bankName: string
isMaxWithdrawEnable: boolean
isMinWithdrawEnable: boolean
maxWithdraw: number
minWithdraw: number
incomeAccount: PublicKey
solSigningAuthority: PublicKey
bankSigningAuthority: PublicKey
payer: PublicKey
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createSpendSolTransaction
- createSpendSolTransaction(bankName: string, amount: number, incomeAccount: PublicKey, solSigningAuthority: PublicKey, user: PublicKey, payer: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
bankName: string
amount: number
incomeAccount: PublicKey
solSigningAuthority: PublicKey
user: PublicKey
payer: PublicKey
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createSpendSolWithoutUserTransaction
- createSpendSolWithoutUserTransaction(bankName: string, amount: number, incomeAccount: PublicKey, solSigningAuthority: PublicKey, user: PublicKey, payer: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
bankName: string
amount: number
incomeAccount: PublicKey
solSigningAuthority: PublicKey
user: PublicKey
payer: PublicKey
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createSpendTokenTransaction
- createSpendTokenTransaction(tokenMintAccount: PublicKey, bankName: string, amount: number, incomeAccount: PublicKey, tokenSigningAuthority: PublicKey, user: PublicKey, payer: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
tokenMintAccount: PublicKey
bankName: string
amount: number
incomeAccount: PublicKey
tokenSigningAuthority: PublicKey
user: PublicKey
payer: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createSpendTokenWithoutUserTransaction
- createSpendTokenWithoutUserTransaction(tokenMintAccount: PublicKey, bankName: string, amount: number, incomeAccount: PublicKey, tokenSigningAuthority: PublicKey, user: PublicKey, payer: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
tokenMintAccount: PublicKey
bankName: string
amount: number
incomeAccount: PublicKey
tokenSigningAuthority: PublicKey
user: PublicKey
payer: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createTokenConfigTransaction
- createTokenConfigTransaction(tokenMintAccount: PublicKey, bankName: string, isMaxWithdrawEnable: boolean, isMinWithdrawEnable: boolean, maxWithdraw: number, minWithdraw: number, incomeAccount: PublicKey, tokenSigningAuthority: PublicKey, bankSigningAuthority: PublicKey, payer: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
tokenMintAccount: PublicKey
bankName: string
isMaxWithdrawEnable: boolean
isMinWithdrawEnable: boolean
maxWithdraw: number
minWithdraw: number
incomeAccount: PublicKey
tokenSigningAuthority: PublicKey
bankSigningAuthority: PublicKey
payer: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createUpdateSolConfigTransaction
- createUpdateSolConfigTransaction(bankName: string, isMaxWithdrawEnable: boolean, isMinWithdrawEnable: boolean, maxWithdraw: number, minWithdraw: number, incomeAccount: PublicKey, solSigningAuthority: PublicKey, payer: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
bankName: string
isMaxWithdrawEnable: boolean
isMinWithdrawEnable: boolean
maxWithdraw: number
minWithdraw: number
incomeAccount: PublicKey
solSigningAuthority: PublicKey
payer: PublicKey
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createUpdateTokenConfigTransaction
- createUpdateTokenConfigTransaction(tokenMintAccount: PublicKey, bankName: string, isMaxWithdrawEnable: boolean, isMinWithdrawEnable: boolean, maxWithdraw: number, minWithdraw: number, incomeAccount: PublicKey, tokenSigningAuthority: PublicKey, payer: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
tokenMintAccount: PublicKey
bankName: string
isMaxWithdrawEnable: boolean
isMinWithdrawEnable: boolean
maxWithdraw: number
minWithdraw: number
incomeAccount: PublicKey
tokenSigningAuthority: PublicKey
payer: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createWithdrawSolTransaction
- createWithdrawSolTransaction(bankName: string, amount: number, receiver: PublicKey, user: PublicKey, solSigningAuthority: PublicKey, payer: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
bankName: string
amount: number
receiver: PublicKey
user: PublicKey
solSigningAuthority: PublicKey
payer: PublicKey
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createWithdrawSolWithoutUserTransaction
- createWithdrawSolWithoutUserTransaction(bankName: string, amount: number, receiver: PublicKey, user: PublicKey, solSigningAuthority: PublicKey, payer: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
bankName: string
amount: number
receiver: PublicKey
user: PublicKey
solSigningAuthority: PublicKey
payer: PublicKey
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createWithdrawTokenTransaction
- createWithdrawTokenTransaction(tokenMintAccount: PublicKey, bankName: string, amount: number, receiver: PublicKey, user: PublicKey, tokenSigningAuthority: PublicKey, payer: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
tokenMintAccount: PublicKey
bankName: string
amount: number
receiver: PublicKey
user: PublicKey
tokenSigningAuthority: PublicKey
payer: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
createWithdrawTokenWithoutUserTransaction
- createWithdrawTokenWithoutUserTransaction(tokenMintAccount: PublicKey, bankName: string, amount: number, receiver: PublicKey, user: PublicKey, tokenSigningAuthority: PublicKey, payer: PublicKey, tokenProgram?: PublicKey, associatedTokenProgram?: PublicKey, systemProgram?: PublicKey, rent?: PublicKey): Promise<Transaction>
Parameters
tokenMintAccount: PublicKey
bankName: string
amount: number
receiver: PublicKey
user: PublicKey
tokenSigningAuthority: PublicKey
payer: PublicKey
tokenProgram: PublicKey = TOKEN_PROGRAM_ID
associatedTokenProgram: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID
systemProgram: PublicKey = SystemProgram.programId
rent: PublicKey = SYSVAR_RENT_PUBKEY
Returns Promise<Transaction>
getAllBankConfigAccountData
- getAllBankConfigAccountData(): Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
Returns Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
getAllDepositPoolAccountData
- getAllDepositPoolAccountData(): Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
Returns Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
getAllDistributionPoolAccountData
- getAllDistributionPoolAccountData(): Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
Returns Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
getAllMainConfigAccountData
- getAllMainConfigAccountData(): Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
Returns Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
getAllSolConfigAccountData
- getAllSolConfigAccountData(): Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
Returns Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
getAllTokenConfigAccountData
- getAllTokenConfigAccountData(): Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
Returns Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
getAllUserSolAccountData
- getAllUserSolAccountData(): Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
Returns Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
getAllUserTokenAccountData
- getAllUserTokenAccountData(): Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
Returns Promise<ProgramAccount<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>[]>
getBankConfigAccountData
- getBankConfigAccountData(bankConfigAccountPDA: PublicKey): Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
Parameters
bankConfigAccountPDA: PublicKey
Returns Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
getBankConfigAccountPDAAndBump
- getBankConfigAccountPDAAndBump(bankName: String): Promise<[PublicKey, number]>
Parameters
Returns Promise<[PublicKey, number]>
getDepositPoolAccountData
- getDepositPoolAccountData(depositPoolAccountPDA: PublicKey): Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
Parameters
depositPoolAccountPDA: PublicKey
Returns Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
getDistributionPoolAccountData
- getDistributionPoolAccountData(distributionPoolAccountPDA: PublicKey): Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
Parameters
distributionPoolAccountPDA: PublicKey
Returns Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
getMainConfigAccountData
- getMainConfigAccountData(mainConfigAccountPDA: PublicKey): Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
Parameters
mainConfigAccountPDA: PublicKey
Returns Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
getMainConfigAccountPDAAndBump
- getMainConfigAccountPDAAndBump(): Promise<[PublicKey, number]>
Returns Promise<[PublicKey, number]>
getSolConfigAccountData
- getSolConfigAccountData(solConfigAccountPDA: PublicKey): Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
Parameters
solConfigAccountPDA: PublicKey
Returns Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
getSolConfigAccountPDAAndBump
- getSolConfigAccountPDAAndBump(bankConfigAccountPDA: PublicKey): Promise<[PublicKey, number]>
Parameters
bankConfigAccountPDA: PublicKey
Returns Promise<[PublicKey, number]>
getSolDepositPoolAccountPDAAndBump
- getSolDepositPoolAccountPDAAndBump(solConfigAccountPDA: PublicKey): Promise<[PublicKey, number]>
Parameters
solConfigAccountPDA: PublicKey
Returns Promise<[PublicKey, number]>
getSolDistributionPoolAccountPDAAndBump
- getSolDistributionPoolAccountPDAAndBump(solConfigAccountPDA: PublicKey): Promise<[PublicKey, number]>
Parameters
solConfigAccountPDA: PublicKey
Returns Promise<[PublicKey, number]>
getTokenConfigAccountData
- getTokenConfigAccountData(tokenConfigAccountPDA: PublicKey): Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
Parameters
tokenConfigAccountPDA: PublicKey
Returns Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
getTokenConfigAccountPDAAndBump
- getTokenConfigAccountPDAAndBump(bankConfigAccountPDA: PublicKey, tokenMintAccount: PublicKey): Promise<[PublicKey, number]>
Parameters
bankConfigAccountPDA: PublicKey
tokenMintAccount: PublicKey
Returns Promise<[PublicKey, number]>
getTokenDepositPoolAccountPDAAndBump
- getTokenDepositPoolAccountPDAAndBump(tokenConfigAccountPDA: PublicKey, tokenMintAccount: PublicKey): Promise<[PublicKey, number]>
Parameters
tokenConfigAccountPDA: PublicKey
tokenMintAccount: PublicKey
Returns Promise<[PublicKey, number]>
getTokenDepositPoolTokenAccountPDAAndBump
- getTokenDepositPoolTokenAccountPDAAndBump(tokenDepositPoolAccountPDA: PublicKey, tokenMintAccount: PublicKey): Promise<[PublicKey, number]>
Parameters
tokenDepositPoolAccountPDA: PublicKey
tokenMintAccount: PublicKey
Returns Promise<[PublicKey, number]>
getTokenDistributionPoolAccountPDAAndBump
- getTokenDistributionPoolAccountPDAAndBump(tokenConfigAccountPDA: PublicKey, tokenMintAccount: PublicKey): Promise<[PublicKey, number]>
Parameters
tokenConfigAccountPDA: PublicKey
tokenMintAccount: PublicKey
Returns Promise<[PublicKey, number]>
getTokenDistributionPoolTokenAccountPDAAndBump
- getTokenDistributionPoolTokenAccountPDAAndBump(tokenDistributionPoolAccountPDA: PublicKey, tokenMintAccount: PublicKey): Promise<[PublicKey, number]>
Parameters
tokenDistributionPoolAccountPDA: PublicKey
tokenMintAccount: PublicKey
Returns Promise<[PublicKey, number]>
getUserSolAccountData
- getUserSolAccountData(userSolAccountPDA: PublicKey): Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
Parameters
userSolAccountPDA: PublicKey
Returns Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
getUserSolAccountPDAAndBump
- getUserSolAccountPDAAndBump(bankConfigAccountPDA: PublicKey, solConfigAccountPDA: PublicKey, user: PublicKey): Promise<[PublicKey, number]>
Parameters
bankConfigAccountPDA: PublicKey
solConfigAccountPDA: PublicKey
user: PublicKey
Returns Promise<[PublicKey, number]>
getUserTokenAccountData
- getUserTokenAccountData(userTokenAccountPDA: PublicKey): Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
Parameters
userTokenAccountPDA: PublicKey
Returns Promise<DecodeStruct<{ fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "bankSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["current deposit amount"]; name: "currentValue"; type: "u64" }, { docs: ["total deposited amount"]; name: "totalValue"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { docs: ["program main signing authority"]; name: "mainSigningAuthority"; type: "publicKey" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "solSigningAuthority"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "tokenSigningAuthority"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "incomeAccount"; type: "publicKey" }, { name: "isMinWithdrawEnable"; type: "bool" }, { name: "isMaxWithdrawEnable"; type: "bool" }, { name: "minWithdraw"; type: "u64" }, { name: "maxWithdraw"; type: "u64" }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserSolAction" } }]; kind: "struct" } | { fields: [{ docs: ["timestamp when account updated"]; name: "lastBlockTimestamp"; type: "i64" }, { name: "user"; type: "publicKey" }, { name: "mint"; type: "publicKey" }, { name: "totalDepositValue"; type: "u64" }, { name: "totalWithdrawValue"; type: "u64" }, { name: "totalSpendValue"; type: "u64" }, { name: "totalDistributeValue"; type: "u64" }, { name: "lastAction"; type: { defined: "UserTokenAction" } }]; kind: "struct" }, DecodedHelper<[{ name: "UserSolAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }, { name: "UserTokenAction"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "Deposit" }, { name: "Withdraw" }, { name: "Spend" }, { name: "Distribute" }] } }], EmptyDefined>>>
getUserTokenAccountPDAAndBump
- getUserTokenAccountPDAAndBump(bankConfigAccountPDA: PublicKey, tokenConfigAccountPDA: PublicKey, tokenMintAccount: PublicKey, user: PublicKey): Promise<[PublicKey, number]>
Parameters
bankConfigAccountPDA: PublicKey
tokenConfigAccountPDA: PublicKey
tokenMintAccount: PublicKey
user: PublicKey
Returns Promise<[PublicKey, number]>
isPdaAddressInitialize
- isPdaAddressInitialize(pdaAddress: PublicKey): Promise<boolean>
Parameters
Returns Promise<boolean>
removeEventListener
- removeEventListener(eventId: number): Promise<void>
Parameters
Returns Promise<void>
signTransaction
- signTransaction(tx: Transaction, secretKey: string): Transaction
Parameters
tx: Transaction
secretKey: string
Returns Transaction
Add signature in the transaction.