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',},],},]
Describes the expected return type for a function that returns an instruction