Options
All
  • Public
  • Public/Protected
  • All
Menu

flash-loan-mastery

Index

Type aliases

FlashLoanMastery

FlashLoanMastery: { accounts: [{ docs: ["`PoolAuthority` account"]; name: "poolAuthority"; type: { fields: [{ docs: ["The token mint"]; name: "mint"; type: "publicKey" }, { docs: ["The `pool_share_mint`"]; name: "poolShareMint"; type: "publicKey" }, { docs: ["The PDA bump"]; name: "bump"; type: "u8" }]; kind: "struct" } }]; errors: [{ code: 6000; msg: "Address Mismatch"; name: "AddressMismatch" }, { code: 6001; msg: "Owner Mismatch"; name: "OwnerMismatch" }, { code: 6002; msg: "Pool Mismatch"; name: "PoolMismatch" }, { code: 6003; msg: "Program Mismatch"; name: "ProgramMismatch" }, { code: 6004; msg: "Invalid Mint Supply"; name: "InvalidMintSupply" }, { code: 6005; msg: "Invalid Mint Decimals"; name: "InvalidMintDecimals" }, { code: 6006; msg: "Cannot Borrow Before Repay"; name: "CannotBorrowBeforeRepay" }, { code: 6007; msg: "There is no repayment instruction"; name: "NoRepaymentInstructionFound" }, { code: 6008; msg: "The repayment amount is incorrect"; name: "IncorrectRepaymentAmount" }]; instructions: [{ accounts: [{ docs: ["The funder for the `pool_authority` account"]; isMut: true; isSigner: true; name: "funder" }, { docs: ["The mint representing the token that will be borrowed via flash loans"]; isMut: false; isSigner: false; name: "mint" }, { docs: ["The mint of the token that will represent shares in the new pool"]; isMut: true; isSigner: false; name: "poolShareMint" }, { docs: ["The current mint authority of `pool_share_mint`"]; isMut: false; isSigner: true; name: "poolShareMintAuthority" }, { docs: ["The pool authority"]; isMut: true; isSigner: false; name: "poolAuthority" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }, { docs: ["The Solana System program"]; isMut: false; isSigner: false; name: "systemProgram" }]; args: []; docs: ["Initialize a lending pool"]; name: "initPool" }, { accounts: [{ docs: ["The entity depositing funds into the pool"]; isMut: false; isSigner: true; name: "depositor" }, { docs: ["The token to deposit into the pool"]; isMut: true; isSigner: false; name: "tokenFrom" }, { docs: ["The token to receive tokens deposited into the pool"]; isMut: true; isSigner: false; name: "tokenTo" }, { docs: ["The token account for receiving shares in the pool"]; isMut: true; isSigner: false; name: "poolShareTokenTo" }, { docs: ["The mint of the token representing shares in the pool"]; isMut: true; isSigner: false; name: "poolShareMint" }, { docs: ["The pool authority"]; isMut: false; isSigner: false; name: "poolAuthority" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; docs: ["Deposit funds into a lending pool"]; name: "deposit" }, { accounts: [{ docs: ["The entity withdrawing funds into the pool"]; isMut: false; isSigner: true; name: "withdrawer" }, { docs: ["The token to withdraw from the pool"]; isMut: true; isSigner: false; name: "tokenFrom" }, { docs: ["The token to receive tokens withdrawn from the pool"]; isMut: true; isSigner: false; name: "tokenTo" }, { docs: ["The token account for redeeming shares of the pool"]; isMut: true; isSigner: false; name: "poolShareTokenFrom" }, { docs: ["The mint of the token representing shares in the pool"]; isMut: true; isSigner: false; name: "poolShareMint" }, { docs: ["The pool authority"]; isMut: false; isSigner: false; name: "poolAuthority" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; docs: ["Withdraw funds from a lending pool"]; name: "withdraw" }, { accounts: [{ docs: ["The entity borrowing funds from the pool"]; isMut: false; isSigner: true; name: "borrower" }, { docs: ["The token to borrow from the pool"]; isMut: true; isSigner: false; name: "tokenFrom" }, { docs: ["The token to receive tokens borrowed from the pool"]; isMut: true; isSigner: false; name: "tokenTo" }, { docs: ["The pool authority"]; isMut: false; isSigner: false; name: "poolAuthority" }, { docs: ["Solana Instructions Sysvar"]; isMut: false; isSigner: false; name: "instructionsSysvar" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; docs: ["Borrow funds from a lending pool"]; name: "borrow" }, { accounts: [{ docs: ["The entity repaying funds from the pool"]; isMut: false; isSigner: true; name: "repayer" }, { docs: ["The token to repay back to the pool"]; isMut: true; isSigner: false; name: "tokenFrom" }, { docs: ["The token to receive tokens repaid into the pool"]; isMut: true; isSigner: false; name: "tokenTo" }, { docs: ["The pool authority"]; isMut: false; isSigner: false; name: "poolAuthority" }, { docs: ["Solana Instructions Sysvar"]; isMut: false; isSigner: false; name: "instructionsSysvar" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; docs: ["Repay funds to a lending pool"]; name: "repay" }]; name: "flash_loan_mastery"; version: "0.1.0" }

Type declaration

  • accounts: [{ docs: ["`PoolAuthority` account"]; name: "poolAuthority"; type: { fields: [{ docs: ["The token mint"]; name: "mint"; type: "publicKey" }, { docs: ["The `pool_share_mint`"]; name: "poolShareMint"; type: "publicKey" }, { docs: ["The PDA bump"]; name: "bump"; type: "u8" }]; kind: "struct" } }]
  • errors: [{ code: 6000; msg: "Address Mismatch"; name: "AddressMismatch" }, { code: 6001; msg: "Owner Mismatch"; name: "OwnerMismatch" }, { code: 6002; msg: "Pool Mismatch"; name: "PoolMismatch" }, { code: 6003; msg: "Program Mismatch"; name: "ProgramMismatch" }, { code: 6004; msg: "Invalid Mint Supply"; name: "InvalidMintSupply" }, { code: 6005; msg: "Invalid Mint Decimals"; name: "InvalidMintDecimals" }, { code: 6006; msg: "Cannot Borrow Before Repay"; name: "CannotBorrowBeforeRepay" }, { code: 6007; msg: "There is no repayment instruction"; name: "NoRepaymentInstructionFound" }, { code: 6008; msg: "The repayment amount is incorrect"; name: "IncorrectRepaymentAmount" }]
  • instructions: [{ accounts: [{ docs: ["The funder for the `pool_authority` account"]; isMut: true; isSigner: true; name: "funder" }, { docs: ["The mint representing the token that will be borrowed via flash loans"]; isMut: false; isSigner: false; name: "mint" }, { docs: ["The mint of the token that will represent shares in the new pool"]; isMut: true; isSigner: false; name: "poolShareMint" }, { docs: ["The current mint authority of `pool_share_mint`"]; isMut: false; isSigner: true; name: "poolShareMintAuthority" }, { docs: ["The pool authority"]; isMut: true; isSigner: false; name: "poolAuthority" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }, { docs: ["The Solana System program"]; isMut: false; isSigner: false; name: "systemProgram" }]; args: []; docs: ["Initialize a lending pool"]; name: "initPool" }, { accounts: [{ docs: ["The entity depositing funds into the pool"]; isMut: false; isSigner: true; name: "depositor" }, { docs: ["The token to deposit into the pool"]; isMut: true; isSigner: false; name: "tokenFrom" }, { docs: ["The token to receive tokens deposited into the pool"]; isMut: true; isSigner: false; name: "tokenTo" }, { docs: ["The token account for receiving shares in the pool"]; isMut: true; isSigner: false; name: "poolShareTokenTo" }, { docs: ["The mint of the token representing shares in the pool"]; isMut: true; isSigner: false; name: "poolShareMint" }, { docs: ["The pool authority"]; isMut: false; isSigner: false; name: "poolAuthority" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; docs: ["Deposit funds into a lending pool"]; name: "deposit" }, { accounts: [{ docs: ["The entity withdrawing funds into the pool"]; isMut: false; isSigner: true; name: "withdrawer" }, { docs: ["The token to withdraw from the pool"]; isMut: true; isSigner: false; name: "tokenFrom" }, { docs: ["The token to receive tokens withdrawn from the pool"]; isMut: true; isSigner: false; name: "tokenTo" }, { docs: ["The token account for redeeming shares of the pool"]; isMut: true; isSigner: false; name: "poolShareTokenFrom" }, { docs: ["The mint of the token representing shares in the pool"]; isMut: true; isSigner: false; name: "poolShareMint" }, { docs: ["The pool authority"]; isMut: false; isSigner: false; name: "poolAuthority" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; docs: ["Withdraw funds from a lending pool"]; name: "withdraw" }, { accounts: [{ docs: ["The entity borrowing funds from the pool"]; isMut: false; isSigner: true; name: "borrower" }, { docs: ["The token to borrow from the pool"]; isMut: true; isSigner: false; name: "tokenFrom" }, { docs: ["The token to receive tokens borrowed from the pool"]; isMut: true; isSigner: false; name: "tokenTo" }, { docs: ["The pool authority"]; isMut: false; isSigner: false; name: "poolAuthority" }, { docs: ["Solana Instructions Sysvar"]; isMut: false; isSigner: false; name: "instructionsSysvar" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; docs: ["Borrow funds from a lending pool"]; name: "borrow" }, { accounts: [{ docs: ["The entity repaying funds from the pool"]; isMut: false; isSigner: true; name: "repayer" }, { docs: ["The token to repay back to the pool"]; isMut: true; isSigner: false; name: "tokenFrom" }, { docs: ["The token to receive tokens repaid into the pool"]; isMut: true; isSigner: false; name: "tokenTo" }, { docs: ["The pool authority"]; isMut: false; isSigner: false; name: "poolAuthority" }, { docs: ["Solana Instructions Sysvar"]; isMut: false; isSigner: false; name: "instructionsSysvar" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; docs: ["Repay funds to a lending pool"]; name: "repay" }]
  • name: "flash_loan_mastery"
  • version: "0.1.0"

InstructionReturn

InstructionReturn: { instruction: TransactionInstruction; signers: Signer[] }

Describes the expected return type for a function that returns an instruction

Type declaration

  • instruction: TransactionInstruction
  • signers: Signer[]

Variables

Const FLASH_LOAN_MASTERY_PROGRAM_ID

FLASH_LOAN_MASTERY_PROGRAM_ID: PublicKey = new web3.PublicKey('1oanfPPN8r1i4UbugXHDxWMbWVJ5qLSN5qzNFZkz6Fg')

Const LOAN_FEE

LOAN_FEE: 900 = 900

Const LOAN_FEE_DENOMINATOR

LOAN_FEE_DENOMINATOR: 10000 = 10000

Const ONE_HUNDRED

ONE_HUNDRED: 100 = 100

Const REFERRAL_FEE

REFERRAL_FEE: 50 = 50

Functions

Const deposit

  • deposit(p: { amount: BN; connection: Connection; depositor: PublicKey; mint: PublicKey; program: Program<FlashLoanMastery>; tokenFrom: PublicKey }): Promise<{ bankToken: PublicKey; instructions: InstructionReturn[]; poolAuthority: PublicKey; poolShareTokenTo: PublicKey }>
  • Deposit tokens to a flash loan pool. For instance, if you have USDC you can deposit it into the USDC pool and make it available for people to borrow. You will then earn part of the flash loan interest.

    Parameters

    • p: { amount: BN; connection: Connection; depositor: PublicKey; mint: PublicKey; program: Program<FlashLoanMastery>; tokenFrom: PublicKey }
      • amount: BN
      • connection: Connection
      • depositor: PublicKey
      • mint: PublicKey
      • program: Program<FlashLoanMastery>
      • tokenFrom: PublicKey

    Returns Promise<{ bankToken: PublicKey; instructions: InstructionReturn[]; poolAuthority: PublicKey; poolShareTokenTo: PublicKey }>

Const flashLoan

  • flashLoan(p: { amount: BN; borrower: PublicKey; mint: PublicKey; program: Program<FlashLoanMastery>; referralTokenTo?: web3.PublicKey }): Promise<{ borrow: TransactionInstruction; repay: TransactionInstruction; repaymentAmount: BN }>
  • Initiate a flash loan transaction. This outputs two instructions representing the flash loan borrow and repay for you to use as you please.

    Parameters

    • p: { amount: BN; borrower: PublicKey; mint: PublicKey; program: Program<FlashLoanMastery>; referralTokenTo?: web3.PublicKey }
      • amount: BN
      • borrower: PublicKey
      • mint: PublicKey
      • program: Program<FlashLoanMastery>
      • Optional referralTokenTo?: web3.PublicKey

    Returns Promise<{ borrow: TransactionInstruction; repay: TransactionInstruction; repaymentAmount: BN }>

Const getAssociatedTokenAddressSync

  • getAssociatedTokenAddressSync(mint: PublicKey, owner: PublicKey): [PublicKey, number]
  • Synchronously get an associated token address for a mint and owner

    Parameters

    • mint: PublicKey
    • owner: PublicKey

    Returns [PublicKey, number]

Const getPoolAuthority

  • getPoolAuthority(programId?: PublicKey, mint: PublicKey): [PublicKey, number]
  • Finds and returns the pool address for a given mint

    Parameters

    • Default value programId: PublicKey = FLASH_LOAN_MASTERY_PROGRAM_ID
    • mint: PublicKey

    Returns [PublicKey, number]

Const getProgram

  • getProgram(programId?: PublicKey, provider?: AnchorProvider): Program<FlashLoanMastery>
  • Gets the Anchor program object

    Parameters

    • Default value programId: PublicKey = FLASH_LOAN_MASTERY_PROGRAM_ID
    • Optional provider: AnchorProvider

    Returns Program<FlashLoanMastery>

Const getTokenAccount

  • getTokenAccount(connection: Connection, owner: PublicKey, mint: PublicKey): Promise<null | { account: AccountInfo<ParsedAccountData>; pubkey: PublicKey }>
  • Gets a token account for a given mint and owner or returns null if it does not exist

    Parameters

    • connection: Connection
    • owner: PublicKey
    • mint: PublicKey

    Returns Promise<null | { account: AccountInfo<ParsedAccountData>; pubkey: PublicKey }>

Const initPool

  • initPool(p: { connection: Connection; funder: Signer; poolMint: PublicKey; poolMintAuthority: Signer; program: Program<FlashLoanMastery>; tokenMint: PublicKey }): Promise<{ bankToken: PublicKey; instructions: InstructionReturn[]; poolAuthority: PublicKey }>
  • Initializes a new flash loan pool for a given token mint. Use this when you want to enable flash loans for a particular Solana token e,g. USDC or even your own token.

    Parameters

    • p: { connection: Connection; funder: Signer; poolMint: PublicKey; poolMintAuthority: Signer; program: Program<FlashLoanMastery>; tokenMint: PublicKey }
      • connection: Connection
      • funder: Signer
      • poolMint: PublicKey
      • poolMintAuthority: Signer
      • program: Program<FlashLoanMastery>
      • tokenMint: PublicKey

    Returns Promise<{ bankToken: PublicKey; instructions: InstructionReturn[]; poolAuthority: PublicKey }>

Const withdraw

  • withdraw(p: { amount: BN; connection: Connection; mint: PublicKey; poolShareTokenFrom: PublicKey; program: Program<FlashLoanMastery>; withdrawer: PublicKey }): Promise<{ instructions: InstructionReturn[]; poolAuthority: PublicKey }>
  • Withdraw tokens from a flash loan pool. This will withdraw your previous deposits as well as any accumulated earned interest.

    Parameters

    • p: { amount: BN; connection: Connection; mint: PublicKey; poolShareTokenFrom: PublicKey; program: Program<FlashLoanMastery>; withdrawer: PublicKey }
      • amount: BN
      • connection: Connection
      • mint: PublicKey
      • poolShareTokenFrom: PublicKey
      • program: Program<FlashLoanMastery>
      • withdrawer: PublicKey

    Returns Promise<{ instructions: InstructionReturn[]; poolAuthority: PublicKey }>

Object literals

Const IDL

IDL: object

accounts

accounts: [{ docs: ["`PoolAuthority` account"]; name: "poolAuthority"; type: object }] = [{name: 'poolAuthority',docs: ['`PoolAuthority` account'],type: {kind: 'struct',fields: [{name: 'mint',docs: ['The token mint'],type: 'publicKey',},{name: 'poolShareMint',docs: ['The `pool_share_mint`'],type: 'publicKey',},{name: 'bump',docs: ['The PDA bump'],type: 'u8',},],},},]

errors

errors: [{ code: 6000; msg: "Address Mismatch"; name: "AddressMismatch" }, { code: 6001; msg: "Owner Mismatch"; name: "OwnerMismatch" }, { code: 6002; msg: "Pool Mismatch"; name: "PoolMismatch" }, { code: 6003; msg: "Program Mismatch"; name: "ProgramMismatch" }, { code: 6004; msg: "Invalid Mint Supply"; name: "InvalidMintSupply" }, { code: 6005; msg: "Invalid Mint Decimals"; name: "InvalidMintDecimals" }, { code: 6006; msg: "Cannot Borrow Before Repay"; name: "CannotBorrowBeforeRepay" }, { code: 6007; msg: "There is no repayment instruction"; name: "NoRepaymentInstructionFound" }, { code: 6008; msg: "The repayment amount is incorrect"; name: "IncorrectRepaymentAmount" }] = [{code: 6000,name: 'AddressMismatch',msg: 'Address Mismatch',},{code: 6001,name: 'OwnerMismatch',msg: 'Owner Mismatch',},{code: 6002,name: 'PoolMismatch',msg: 'Pool Mismatch',},{code: 6003,name: 'ProgramMismatch',msg: 'Program Mismatch',},{code: 6004,name: 'InvalidMintSupply',msg: 'Invalid Mint Supply',},{code: 6005,name: 'InvalidMintDecimals',msg: 'Invalid Mint Decimals',},{code: 6006,name: 'CannotBorrowBeforeRepay',msg: 'Cannot Borrow Before Repay',},{code: 6007,name: 'NoRepaymentInstructionFound',msg: 'There is no repayment instruction',},{code: 6008,name: 'IncorrectRepaymentAmount',msg: 'The repayment amount is incorrect',},]

instructions

instructions: [{ accounts: [{ docs: ["The funder for the `pool_authority` account"]; isMut: true; isSigner: true; name: "funder" }, { docs: ["The mint representing the token that will be borrowed via flash loans"]; isMut: false; isSigner: false; name: "mint" }, { docs: ["The mint of the token that will represent shares in the new pool"]; isMut: true; isSigner: false; name: "poolShareMint" }, { docs: ["The current mint authority of `pool_share_mint`"]; isMut: false; isSigner: true; name: "poolShareMintAuthority" }, { docs: ["The pool authority"]; isMut: true; isSigner: false; name: "poolAuthority" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }, { docs: ["The Solana System program"]; isMut: false; isSigner: false; name: "systemProgram" }]; args: []; docs: ["Initialize a lending pool"]; name: "initPool" }, { accounts: [{ docs: ["The entity depositing funds into the pool"]; isMut: false; isSigner: true; name: "depositor" }, { docs: ["The token to deposit into the pool"]; isMut: true; isSigner: false; name: "tokenFrom" }, { docs: ["The token to receive tokens deposited into the pool"]; isMut: true; isSigner: false; name: "tokenTo" }, { docs: ["The token account for receiving shares in the pool"]; isMut: true; isSigner: false; name: "poolShareTokenTo" }, { docs: ["The mint of the token representing shares in the pool"]; isMut: true; isSigner: false; name: "poolShareMint" }, { docs: ["The pool authority"]; isMut: false; isSigner: false; name: "poolAuthority" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; docs: ["Deposit funds into a lending pool"]; name: "deposit" }, { accounts: [{ docs: ["The entity withdrawing funds into the pool"]; isMut: false; isSigner: true; name: "withdrawer" }, { docs: ["The token to withdraw from the pool"]; isMut: true; isSigner: false; name: "tokenFrom" }, { docs: ["The token to receive tokens withdrawn from the pool"]; isMut: true; isSigner: false; name: "tokenTo" }, { docs: ["The token account for redeeming shares of the pool"]; isMut: true; isSigner: false; name: "poolShareTokenFrom" }, { docs: ["The mint of the token representing shares in the pool"]; isMut: true; isSigner: false; name: "poolShareMint" }, { docs: ["The pool authority"]; isMut: false; isSigner: false; name: "poolAuthority" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; docs: ["Withdraw funds from a lending pool"]; name: "withdraw" }, { accounts: [{ docs: ["The entity borrowing funds from the pool"]; isMut: false; isSigner: true; name: "borrower" }, { docs: ["The token to borrow from the pool"]; isMut: true; isSigner: false; name: "tokenFrom" }, { docs: ["The token to receive tokens borrowed from the pool"]; isMut: true; isSigner: false; name: "tokenTo" }, { docs: ["The pool authority"]; isMut: false; isSigner: false; name: "poolAuthority" }, { docs: ["Solana Instructions Sysvar"]; isMut: false; isSigner: false; name: "instructionsSysvar" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; docs: ["Borrow funds from a lending pool"]; name: "borrow" }, { accounts: [{ docs: ["The entity repaying funds from the pool"]; isMut: false; isSigner: true; name: "repayer" }, { docs: ["The token to repay back to the pool"]; isMut: true; isSigner: false; name: "tokenFrom" }, { docs: ["The token to receive tokens repaid into the pool"]; isMut: true; isSigner: false; name: "tokenTo" }, { docs: ["The pool authority"]; isMut: false; isSigner: false; name: "poolAuthority" }, { docs: ["Solana Instructions Sysvar"]; isMut: false; isSigner: false; name: "instructionsSysvar" }, { docs: ["The [Token] program"]; isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; docs: ["Repay funds to a lending pool"]; name: "repay" }] = [{name: 'initPool',docs: ['Initialize a lending pool'],accounts: [{name: 'funder',isMut: true,isSigner: true,docs: ['The funder for the `pool_authority` account'],},{name: 'mint',isMut: false,isSigner: false,docs: ['The mint representing the token that will be borrowed via flash loans',],},{name: 'poolShareMint',isMut: true,isSigner: false,docs: ['The mint of the token that will represent shares in the new pool',],},{name: 'poolShareMintAuthority',isMut: false,isSigner: true,docs: ['The current mint authority of `pool_share_mint`'],},{name: 'poolAuthority',isMut: true,isSigner: false,docs: ['The pool authority'],},{name: 'tokenProgram',isMut: false,isSigner: false,docs: ['The [Token] program'],},{name: 'systemProgram',isMut: false,isSigner: false,docs: ['The Solana System program'],},],args: [],},{name: 'deposit',docs: ['Deposit funds into a lending pool'],accounts: [{name: 'depositor',isMut: false,isSigner: true,docs: ['The entity depositing funds into the pool'],},{name: 'tokenFrom',isMut: true,isSigner: false,docs: ['The token to deposit into the pool'],},{name: 'tokenTo',isMut: true,isSigner: false,docs: ['The token to receive tokens deposited into the pool'],},{name: 'poolShareTokenTo',isMut: true,isSigner: false,docs: ['The token account for receiving shares in the pool'],},{name: 'poolShareMint',isMut: true,isSigner: false,docs: ['The mint of the token representing shares in the pool'],},{name: 'poolAuthority',isMut: false,isSigner: false,docs: ['The pool authority'],},{name: 'tokenProgram',isMut: false,isSigner: false,docs: ['The [Token] program'],},],args: [{name: 'amount',type: 'u64',},],},{name: 'withdraw',docs: ['Withdraw funds from a lending pool'],accounts: [{name: 'withdrawer',isMut: false,isSigner: true,docs: ['The entity withdrawing funds into the pool'],},{name: 'tokenFrom',isMut: true,isSigner: false,docs: ['The token to withdraw from the pool'],},{name: 'tokenTo',isMut: true,isSigner: false,docs: ['The token to receive tokens withdrawn from the pool'],},{name: 'poolShareTokenFrom',isMut: true,isSigner: false,docs: ['The token account for redeeming shares of the pool'],},{name: 'poolShareMint',isMut: true,isSigner: false,docs: ['The mint of the token representing shares in the pool'],},{name: 'poolAuthority',isMut: false,isSigner: false,docs: ['The pool authority'],},{name: 'tokenProgram',isMut: false,isSigner: false,docs: ['The [Token] program'],},],args: [{name: 'amount',type: 'u64',},],},{name: 'borrow',docs: ['Borrow funds from a lending pool'],accounts: [{name: 'borrower',isMut: false,isSigner: true,docs: ['The entity borrowing funds from the pool'],},{name: 'tokenFrom',isMut: true,isSigner: false,docs: ['The token to borrow from the pool'],},{name: 'tokenTo',isMut: true,isSigner: false,docs: ['The token to receive tokens borrowed from the pool'],},{name: 'poolAuthority',isMut: false,isSigner: false,docs: ['The pool authority'],},{name: 'instructionsSysvar',isMut: false,isSigner: false,docs: ['Solana Instructions Sysvar'],},{name: 'tokenProgram',isMut: false,isSigner: false,docs: ['The [Token] program'],},],args: [{name: 'amount',type: 'u64',},],},{name: 'repay',docs: ['Repay funds to a lending pool'],accounts: [{name: 'repayer',isMut: false,isSigner: true,docs: ['The entity repaying funds from the pool'],},{name: 'tokenFrom',isMut: true,isSigner: false,docs: ['The token to repay back to the pool'],},{name: 'tokenTo',isMut: true,isSigner: false,docs: ['The token to receive tokens repaid into the pool'],},{name: 'poolAuthority',isMut: false,isSigner: false,docs: ['The pool authority'],},{name: 'instructionsSysvar',isMut: false,isSigner: false,docs: ['Solana Instructions Sysvar'],},{name: 'tokenProgram',isMut: false,isSigner: false,docs: ['The [Token] program'],},],args: [{name: 'amount',type: 'u64',},],},]

name

name: "flash_loan_mastery" = "flash_loan_mastery"

version

version: "0.1.0" = "0.1.0"

Generated using TypeDoc