Options
All
  • Public
  • Public/Protected
  • All
Menu

@jet-lab/jet-engine - v0.3.7

Index

Type aliases

AmountUnits: AmountUnitsTokens | AmountUnitsDepositNotes | AmountUnitsLoanNotes
AuthIdl: { accounts: [{ name: "userAuthentication"; type: { fields: [{ name: "owner"; type: "publicKey" }, { name: "complete"; type: "bool" }, { name: "allowed"; type: "bool" }]; kind: "struct" } }]; events: [{ fields: [{ index: false; name: "user"; type: "publicKey" }]; name: "AuthAccountCreated" }, { fields: [{ index: false; name: "user"; type: "publicKey" }]; name: "Authenticated" }]; instructions: [{ accounts: [{ isMut: false; isSigner: true; name: "user" }, { isMut: true; isSigner: true; name: "payer" }, { isMut: true; isSigner: false; name: "auth" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: []; name: "createUserAuth" }, { accounts: [{ isMut: true; isSigner: false; name: "auth" }, { isMut: false; isSigner: true; name: "authority" }, { isMut: false; isSigner: false; name: "authority" }]; args: []; name: "authenticate" }]; name: "jet_auth"; version: "1.0.0" }

Type declaration

  • accounts: [{ name: "userAuthentication"; type: { fields: [{ name: "owner"; type: "publicKey" }, { name: "complete"; type: "bool" }, { name: "allowed"; type: "bool" }]; kind: "struct" } }]
  • events: [{ fields: [{ index: false; name: "user"; type: "publicKey" }]; name: "AuthAccountCreated" }, { fields: [{ index: false; name: "user"; type: "publicKey" }]; name: "Authenticated" }]
  • instructions: [{ accounts: [{ isMut: false; isSigner: true; name: "user" }, { isMut: true; isSigner: true; name: "payer" }, { isMut: true; isSigner: false; name: "auth" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: []; name: "createUserAuth" }, { accounts: [{ isMut: true; isSigner: false; name: "auth" }, { isMut: false; isSigner: true; name: "authority" }, { isMut: false; isSigner: false; name: "authority" }]; args: []; name: "authenticate" }]
  • name: "jet_auth"
  • version: "1.0.0"
Jet: { accounts: [{ name: "market"; type: { fields: [{ name: "version"; type: "u32" }, { name: "quoteExponent"; type: "i32" }, { name: "quoteCurrency"; type: { array: ["u8", 15] } }, { name: "authorityBumpSeed"; type: { array: ["u8", 1] } }, { name: "authoritySeed"; type: "publicKey" }, { name: "marketAuthority"; type: "publicKey" }, { name: "owner"; type: "publicKey" }, { name: "quoteTokenMint"; type: "publicKey" }, { name: "flags"; type: "u64" }, { name: "reserved"; type: { array: ["u8", 352] } }, { name: "reserves"; type: { array: ["u8", 12288] } }]; kind: "struct" } }, { name: "obligation"; type: { fields: [{ name: "version"; type: "u32" }, { name: "reserved0"; type: "u32" }, { name: "market"; type: "publicKey" }, { name: "owner"; type: "publicKey" }, { name: "reserved1"; type: { array: ["u8", 184] } }, { name: "cached"; type: { array: ["u8", 256] } }, { name: "collateral"; type: { array: ["u8", 2048] } }, { name: "loans"; type: { array: ["u8", 2048] } }]; kind: "struct" } }, { name: "reserve"; type: { fields: [{ name: "version"; type: "u16" }, { name: "index"; type: "u16" }, { name: "exponent"; type: "i32" }, { name: "market"; type: "publicKey" }, { name: "pythOraclePrice"; type: "publicKey" }, { name: "pythOracleProduct"; type: "publicKey" }, { name: "tokenMint"; type: "publicKey" }, { name: "depositNoteMint"; type: "publicKey" }, { name: "loanNoteMint"; type: "publicKey" }, { name: "vault"; type: "publicKey" }, { name: "feeNoteVault"; type: "publicKey" }, { name: "dexSwapTokens"; type: "publicKey" }, { name: "dexOpenOrders"; type: "publicKey" }, { name: "dexMarket"; type: "publicKey" }, { name: "reserved0"; type: { array: ["u8", 408] } }, { name: "config"; type: { defined: "ReserveConfig" } }, { name: "reserved1"; type: { array: ["u8", 704] } }, { name: "state"; type: { array: ["u8", 512] } }]; kind: "struct" } }]; errors: [{ code: 300; msg: "failed to perform some math operation safely"; name: "ArithmeticError" }, { code: 301; msg: "oracle account provided is not valid"; name: "InvalidOracle" }, { code: 302; msg: "no free space left to add a new reserve in the market"; name: "NoFreeReserves" }, { code: 303; msg: "no free space left to add the new loan or collateral in an obligation"; name: "NoFreeObligation" }, { code: 304; msg: "the obligation account doesn't have any record of the loan or collateral account"; name: "UnregisteredPosition" }, { code: 305; msg: "the oracle price account has an invalid price value"; name: "InvalidOraclePrice" }, { code: 306; msg: "there is not enough collateral deposited to borrow against"; name: "InsufficientCollateral" }, { code: 307; msg: "cannot both deposit collateral to and borrow from the same reserve"; name: "SimultaneousDepositAndBorrow" }, { code: 308; msg: "cannot liquidate a healthy position"; name: "ObligationHealthy" }, { code: 309; msg: "cannot perform an action that would leave the obligation unhealthy"; name: "ObligationUnhealthy" }, { code: 310; msg: "reserve requires special action; call refresh_reserve until up to date"; name: "ExceptionalReserveState" }, { code: 311; msg: "the units provided in the amount are not valid for the instruction"; name: "InvalidAmountUnits" }, { code: 312; msg: "the tokens in the DEX market don't match the reserve and lending market quote token"; name: "InvalidDexMarketMints" }, { code: 313; msg: "the market authority provided doesn't match the market account"; name: "InvalidMarketAuthority" }, { code: 314; msg: "the quote token account provided cannot be used for liquidations"; name: "InvalidLiquidationQuoteTokenAccount" }, { code: 315; msg: "the obligation account doesn't have the collateral/loan registered"; name: "ObligationAccountMismatch" }, { code: 316; msg: "unknown instruction"; name: "UnknownInstruction" }, { code: 317; msg: "current conditions prevent an action from being performed"; name: "Disallowed" }, { code: 318; msg: "the actual slipped amount on the DEX trade exceeded the threshold configured"; name: "LiquidationSwapSlipped" }, { code: 319; msg: "the collateral value is too small for a DEX trade"; name: "CollateralValueTooSmall" }, { code: 320; msg: "the collateral returned by the liquidation is smaller than requested"; name: "LiquidationLowCollateral" }, { code: 321; msg: "this action is currently not supported by this version of the program"; name: "NotSupported" }, { code: 322; msg: "the market has currently halted this kind of operation"; name: "MarketHalted" }, { code: 323; msg: "a given parameter is not valid"; name: "InvalidParameter" }, { code: 324; msg: "the obligation account still holds position in the loan or collateral account"; name: "PositionNotEmpty" }, { code: 325; msg: "position not found in an obligation"; name: "ObligationPositionNotFound" }, { code: 326; msg: "the collateral/loan account is not empty"; name: "AccountNotEmptyError" }]; events: [{ fields: [{ index: false; name: "borrower"; type: "publicKey" }, { index: false; name: "reserve"; type: "publicKey" }, { index: false; name: "debt"; type: "u64" }]; name: "BorrowEvent" }, { fields: [{ index: false; name: "depositor"; type: "publicKey" }, { index: false; name: "reserve"; type: "publicKey" }, { index: false; name: "amount"; type: { defined: "Amount" } }]; name: "DepositCollateralEvent" }, { fields: [{ index: false; name: "borrower"; type: "publicKey" }, { index: false; name: "debtReserve"; type: "publicKey" }, { index: false; name: "collateralReserve"; type: "publicKey" }, { index: false; name: "paidAmount"; type: { defined: "Amount" } }, { index: false; name: "collateralAmount"; type: "u64" }]; name: "LiquidateEvent" }, { fields: [{ index: false; name: "borrower"; type: "publicKey" }, { index: false; name: "reserve"; type: "publicKey" }, { index: false; name: "amount"; type: { defined: "Amount" } }]; name: "RepayEvent" }, { fields: [{ index: false; name: "depositor"; type: "publicKey" }, { index: false; name: "reserve"; type: "publicKey" }, { index: false; name: "amount"; type: { defined: "Amount" } }]; name: "WithdrawCollateralEvent" }]; instructions: [{ accounts: [{ isMut: true; isSigner: false; name: "market" }]; args: [{ name: "owner"; type: "publicKey" }, { name: "quoteCurrency"; type: "string" }, { name: "quoteTokenMint"; type: "publicKey" }]; name: "initMarket" }, { accounts: [{ isMut: true; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "feeNoteVault" }, { isMut: true; isSigner: false; name: "dexSwapTokens" }, { isMut: true; isSigner: false; name: "dexOpenOrders" }, { isMut: false; isSigner: false; name: "dexMarket" }, { isMut: false; isSigner: false; name: "tokenMint" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "dexProgram" }, { isMut: false; isSigner: false; name: "oraclePrice" }, { isMut: false; isSigner: false; name: "oracleProduct" }, { isMut: true; isSigner: false; name: "depositNoteMint" }, { isMut: true; isSigner: false; name: "loanNoteMint" }, { isMut: false; isSigner: false; name: "quoteTokenMint" }, { isMut: false; isSigner: true; name: "owner" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "bump"; type: { defined: "InitReserveBumpSeeds" } }, { name: "config"; type: { defined: "ReserveConfig" } }]; name: "initReserve" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: false; isSigner: true; name: "owner" }]; args: [{ name: "newConfig"; type: { defined: "ReserveConfig" } }]; name: "updateReserveConfig" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: false; isSigner: false; name: "reserve" }, { isMut: false; isSigner: false; name: "depositNoteMint" }, { isMut: true; isSigner: true; name: "depositor" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "bump"; type: "u8" }]; name: "initDepositAccount" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: false; isSigner: false; name: "reserve" }, { isMut: false; isSigner: false; name: "depositNoteMint" }, { isMut: true; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "collateralAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "bump"; type: "u8" }]; name: "initCollateralAccount" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: false; isSigner: false; name: "reserve" }, { isMut: false; isSigner: false; name: "loanNoteMint" }, { isMut: true; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "loanAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "bump"; type: "u8" }]; name: "initLoanAccount" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: true; name: "borrower" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: [{ name: "bump"; type: "u8" }]; name: "initObligation" }, { accounts: [{ isMut: true; isSigner: false; name: "market" }, { isMut: false; isSigner: true; name: "owner" }]; args: [{ name: "newOwner"; type: "publicKey" }]; name: "setMarketOwner" }, { accounts: [{ isMut: true; isSigner: false; name: "market" }, { isMut: false; isSigner: true; name: "owner" }]; args: [{ name: "flags"; type: "u64" }]; name: "setMarketFlags" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "depositNoteMint" }, { isMut: true; isSigner: true; name: "depositor" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: true; isSigner: false; name: "receiverAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: "u8" }]; name: "closeDepositAccount" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: true; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "collateralAccount" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: "u8" }]; name: "closeCollateralAccount" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: true; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "loanAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: "u8" }]; name: "closeLoanAccount" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "obligation" }]; args: [{ name: "bump"; type: "u8" }]; name: "closeObligation" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "depositNoteMint" }, { isMut: false; isSigner: true; name: "depositor" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: true; isSigner: false; name: "depositSource" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: "u8" }, { name: "amount"; type: { defined: "Amount" } }]; name: "deposit" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "depositNoteMint" }, { isMut: false; isSigner: true; name: "depositor" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: true; isSigner: false; name: "withdrawAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: "u8" }, { name: "amount"; type: { defined: "Amount" } }]; name: "withdraw" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: false; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: false; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: true; isSigner: false; name: "collateralAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: { defined: "DepositCollateralBumpSeeds" } }, { name: "amount"; type: { defined: "Amount" } }]; name: "depositCollateral" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: false; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: false; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: true; isSigner: false; name: "collateralAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: { defined: "WithdrawCollateralBumpSeeds" } }, { name: "amount"; type: { defined: "Amount" } }]; name: "withdrawCollateral" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "loanNoteMint" }, { isMut: false; isSigner: true; name: "borrower" }, { isMut: true; isSigner: false; name: "loanAccount" }, { isMut: true; isSigner: false; name: "receiverAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: "u8" }, { name: "amount"; type: { defined: "Amount" } }]; name: "borrow" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "loanNoteMint" }, { isMut: true; isSigner: false; name: "loanAccount" }, { isMut: true; isSigner: false; name: "payerAccount" }, { isMut: false; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: { defined: "Amount" } }]; name: "repay" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: false; isSigner: false; name: "collateralReserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "loanNoteMint" }, { isMut: true; isSigner: false; name: "loanAccount" }, { isMut: true; isSigner: false; name: "collateralAccount" }, { isMut: true; isSigner: false; name: "payerAccount" }, { isMut: true; isSigner: false; name: "receiverAccount" }, { isMut: false; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: { defined: "Amount" } }, { name: "minCollateral"; type: "u64" }]; name: "liquidate" }, { accounts: [{ accounts: [{ isMut: true; isSigner: false; name: "market" }, { isMut: true; isSigner: false; name: "openOrders" }, { isMut: true; isSigner: false; name: "requestQueue" }, { isMut: true; isSigner: false; name: "eventQueue" }, { isMut: true; isSigner: false; name: "bids" }, { isMut: true; isSigner: false; name: "asks" }, { isMut: true; isSigner: false; name: "coinVault" }, { isMut: true; isSigner: false; name: "pcVault" }, { isMut: false; isSigner: false; name: "vaultSigner" }]; name: "sourceMarket" }, { accounts: [{ isMut: true; isSigner: false; name: "market" }, { isMut: true; isSigner: false; name: "openOrders" }, { isMut: true; isSigner: false; name: "requestQueue" }, { isMut: true; isSigner: false; name: "eventQueue" }, { isMut: true; isSigner: false; name: "bids" }, { isMut: true; isSigner: false; name: "asks" }, { isMut: true; isSigner: false; name: "coinVault" }, { isMut: true; isSigner: false; name: "pcVault" }, { isMut: false; isSigner: false; name: "vaultSigner" }]; name: "targetMarket" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: true; isSigner: false; name: "loanReserve" }, { isMut: true; isSigner: false; name: "loanReserveVault" }, { isMut: true; isSigner: false; name: "loanNoteMint" }, { isMut: true; isSigner: false; name: "loanAccount" }, { isMut: false; isSigner: false; name: "collateralReserve" }, { isMut: true; isSigner: false; name: "collateralReserveVault" }, { isMut: true; isSigner: false; name: "depositNoteMint" }, { isMut: true; isSigner: false; name: "collateralAccount" }, { isMut: true; isSigner: false; name: "dexSwapTokens" }, { isMut: false; isSigner: false; name: "dexProgram" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "rent" }]; name: "toLiquidate" }]; args: []; name: "mockLiquidateDex" }, { accounts: [{ isMut: true; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "feeNoteVault" }, { isMut: true; isSigner: false; name: "depositNoteMint" }, { isMut: false; isSigner: false; name: "pythOraclePrice" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "refreshReserve" }]; name: "jet"; types: [{ name: "Amount"; type: { fields: [{ name: "units"; type: { defined: "AmountUnits" } }, { name: "value"; type: "u64" }]; kind: "struct" } }, { name: "DepositCollateralBumpSeeds"; type: { fields: [{ name: "collateralAccount"; type: "u8" }, { name: "depositAccount"; type: "u8" }]; kind: "struct" } }, { name: "InitReserveBumpSeeds"; type: { fields: [{ name: "vault"; type: "u8" }, { name: "feeNoteVault"; type: "u8" }, { name: "dexOpenOrders"; type: "u8" }, { name: "dexSwapTokens"; type: "u8" }, { name: "depositNoteMint"; type: "u8" }, { name: "loanNoteMint"; type: "u8" }]; kind: "struct" } }, { name: "ReserveConfig"; type: { fields: [{ name: "utilizationRate1"; type: "u16" }, { name: "utilizationRate2"; type: "u16" }, { name: "borrowRate0"; type: "u16" }, { name: "borrowRate1"; type: "u16" }, { name: "borrowRate2"; type: "u16" }, { name: "borrowRate3"; type: "u16" }, { name: "minCollateralRatio"; type: "u16" }, { name: "liquidationPremium"; type: "u16" }, { name: "manageFeeCollectionThreshold"; type: "u64" }, { name: "manageFeeRate"; type: "u16" }, { name: "loanOriginationFee"; type: "u16" }, { name: "liquidationSlippage"; type: "u16" }, { name: "reserved0"; type: "u16" }, { name: "liquidationDexTradeMax"; type: "u64" }, { name: "reserved1"; type: { array: ["u8", 24] } }]; kind: "struct" } }, { name: "WithdrawCollateralBumpSeeds"; type: { fields: [{ name: "collateralAccount"; type: "u8" }, { name: "depositAccount"; type: "u8" }]; kind: "struct" } }, { name: "CacheInvalidError"; type: { kind: "enum"; variants: [{ fields: [{ name: "msg"; type: "string" }]; name: "Expired" }, { fields: [{ name: "msg"; type: "string" }]; name: "TooNew" }, { name: "Invalidated" }] } }, { name: "AmountUnits"; type: { kind: "enum"; variants: [{ name: "Tokens" }, { name: "DepositNotes" }, { name: "LoanNotes" }] } }, { name: "Rounding"; type: { kind: "enum"; variants: [{ name: "Up" }, { name: "Down" }] } }, { name: "DexSide"; type: { kind: "enum"; variants: [{ name: "Bid" }, { name: "Ask" }] } }, { name: "SwapKind"; type: { kind: "enum"; variants: [{ name: "Buy" }, { name: "Sell" }] } }, { name: "Side"; type: { kind: "enum"; variants: [{ name: "Collateral" }, { name: "Loan" }] } }, { name: "JobCompletion"; type: { kind: "enum"; variants: [{ name: "Partial" }, { name: "Full" }] } }]; version: "0.0.0" }

Type declaration

  • accounts: [{ name: "market"; type: { fields: [{ name: "version"; type: "u32" }, { name: "quoteExponent"; type: "i32" }, { name: "quoteCurrency"; type: { array: ["u8", 15] } }, { name: "authorityBumpSeed"; type: { array: ["u8", 1] } }, { name: "authoritySeed"; type: "publicKey" }, { name: "marketAuthority"; type: "publicKey" }, { name: "owner"; type: "publicKey" }, { name: "quoteTokenMint"; type: "publicKey" }, { name: "flags"; type: "u64" }, { name: "reserved"; type: { array: ["u8", 352] } }, { name: "reserves"; type: { array: ["u8", 12288] } }]; kind: "struct" } }, { name: "obligation"; type: { fields: [{ name: "version"; type: "u32" }, { name: "reserved0"; type: "u32" }, { name: "market"; type: "publicKey" }, { name: "owner"; type: "publicKey" }, { name: "reserved1"; type: { array: ["u8", 184] } }, { name: "cached"; type: { array: ["u8", 256] } }, { name: "collateral"; type: { array: ["u8", 2048] } }, { name: "loans"; type: { array: ["u8", 2048] } }]; kind: "struct" } }, { name: "reserve"; type: { fields: [{ name: "version"; type: "u16" }, { name: "index"; type: "u16" }, { name: "exponent"; type: "i32" }, { name: "market"; type: "publicKey" }, { name: "pythOraclePrice"; type: "publicKey" }, { name: "pythOracleProduct"; type: "publicKey" }, { name: "tokenMint"; type: "publicKey" }, { name: "depositNoteMint"; type: "publicKey" }, { name: "loanNoteMint"; type: "publicKey" }, { name: "vault"; type: "publicKey" }, { name: "feeNoteVault"; type: "publicKey" }, { name: "dexSwapTokens"; type: "publicKey" }, { name: "dexOpenOrders"; type: "publicKey" }, { name: "dexMarket"; type: "publicKey" }, { name: "reserved0"; type: { array: ["u8", 408] } }, { name: "config"; type: { defined: "ReserveConfig" } }, { name: "reserved1"; type: { array: ["u8", 704] } }, { name: "state"; type: { array: ["u8", 512] } }]; kind: "struct" } }]
  • errors: [{ code: 300; msg: "failed to perform some math operation safely"; name: "ArithmeticError" }, { code: 301; msg: "oracle account provided is not valid"; name: "InvalidOracle" }, { code: 302; msg: "no free space left to add a new reserve in the market"; name: "NoFreeReserves" }, { code: 303; msg: "no free space left to add the new loan or collateral in an obligation"; name: "NoFreeObligation" }, { code: 304; msg: "the obligation account doesn't have any record of the loan or collateral account"; name: "UnregisteredPosition" }, { code: 305; msg: "the oracle price account has an invalid price value"; name: "InvalidOraclePrice" }, { code: 306; msg: "there is not enough collateral deposited to borrow against"; name: "InsufficientCollateral" }, { code: 307; msg: "cannot both deposit collateral to and borrow from the same reserve"; name: "SimultaneousDepositAndBorrow" }, { code: 308; msg: "cannot liquidate a healthy position"; name: "ObligationHealthy" }, { code: 309; msg: "cannot perform an action that would leave the obligation unhealthy"; name: "ObligationUnhealthy" }, { code: 310; msg: "reserve requires special action; call refresh_reserve until up to date"; name: "ExceptionalReserveState" }, { code: 311; msg: "the units provided in the amount are not valid for the instruction"; name: "InvalidAmountUnits" }, { code: 312; msg: "the tokens in the DEX market don't match the reserve and lending market quote token"; name: "InvalidDexMarketMints" }, { code: 313; msg: "the market authority provided doesn't match the market account"; name: "InvalidMarketAuthority" }, { code: 314; msg: "the quote token account provided cannot be used for liquidations"; name: "InvalidLiquidationQuoteTokenAccount" }, { code: 315; msg: "the obligation account doesn't have the collateral/loan registered"; name: "ObligationAccountMismatch" }, { code: 316; msg: "unknown instruction"; name: "UnknownInstruction" }, { code: 317; msg: "current conditions prevent an action from being performed"; name: "Disallowed" }, { code: 318; msg: "the actual slipped amount on the DEX trade exceeded the threshold configured"; name: "LiquidationSwapSlipped" }, { code: 319; msg: "the collateral value is too small for a DEX trade"; name: "CollateralValueTooSmall" }, { code: 320; msg: "the collateral returned by the liquidation is smaller than requested"; name: "LiquidationLowCollateral" }, { code: 321; msg: "this action is currently not supported by this version of the program"; name: "NotSupported" }, { code: 322; msg: "the market has currently halted this kind of operation"; name: "MarketHalted" }, { code: 323; msg: "a given parameter is not valid"; name: "InvalidParameter" }, { code: 324; msg: "the obligation account still holds position in the loan or collateral account"; name: "PositionNotEmpty" }, { code: 325; msg: "position not found in an obligation"; name: "ObligationPositionNotFound" }, { code: 326; msg: "the collateral/loan account is not empty"; name: "AccountNotEmptyError" }]
  • events: [{ fields: [{ index: false; name: "borrower"; type: "publicKey" }, { index: false; name: "reserve"; type: "publicKey" }, { index: false; name: "debt"; type: "u64" }]; name: "BorrowEvent" }, { fields: [{ index: false; name: "depositor"; type: "publicKey" }, { index: false; name: "reserve"; type: "publicKey" }, { index: false; name: "amount"; type: { defined: "Amount" } }]; name: "DepositCollateralEvent" }, { fields: [{ index: false; name: "borrower"; type: "publicKey" }, { index: false; name: "debtReserve"; type: "publicKey" }, { index: false; name: "collateralReserve"; type: "publicKey" }, { index: false; name: "paidAmount"; type: { defined: "Amount" } }, { index: false; name: "collateralAmount"; type: "u64" }]; name: "LiquidateEvent" }, { fields: [{ index: false; name: "borrower"; type: "publicKey" }, { index: false; name: "reserve"; type: "publicKey" }, { index: false; name: "amount"; type: { defined: "Amount" } }]; name: "RepayEvent" }, { fields: [{ index: false; name: "depositor"; type: "publicKey" }, { index: false; name: "reserve"; type: "publicKey" }, { index: false; name: "amount"; type: { defined: "Amount" } }]; name: "WithdrawCollateralEvent" }]
  • instructions: [{ accounts: [{ isMut: true; isSigner: false; name: "market" }]; args: [{ name: "owner"; type: "publicKey" }, { name: "quoteCurrency"; type: "string" }, { name: "quoteTokenMint"; type: "publicKey" }]; name: "initMarket" }, { accounts: [{ isMut: true; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "feeNoteVault" }, { isMut: true; isSigner: false; name: "dexSwapTokens" }, { isMut: true; isSigner: false; name: "dexOpenOrders" }, { isMut: false; isSigner: false; name: "dexMarket" }, { isMut: false; isSigner: false; name: "tokenMint" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "dexProgram" }, { isMut: false; isSigner: false; name: "oraclePrice" }, { isMut: false; isSigner: false; name: "oracleProduct" }, { isMut: true; isSigner: false; name: "depositNoteMint" }, { isMut: true; isSigner: false; name: "loanNoteMint" }, { isMut: false; isSigner: false; name: "quoteTokenMint" }, { isMut: false; isSigner: true; name: "owner" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "bump"; type: { defined: "InitReserveBumpSeeds" } }, { name: "config"; type: { defined: "ReserveConfig" } }]; name: "initReserve" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: false; isSigner: true; name: "owner" }]; args: [{ name: "newConfig"; type: { defined: "ReserveConfig" } }]; name: "updateReserveConfig" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: false; isSigner: false; name: "reserve" }, { isMut: false; isSigner: false; name: "depositNoteMint" }, { isMut: true; isSigner: true; name: "depositor" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "bump"; type: "u8" }]; name: "initDepositAccount" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: false; isSigner: false; name: "reserve" }, { isMut: false; isSigner: false; name: "depositNoteMint" }, { isMut: true; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "collateralAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "bump"; type: "u8" }]; name: "initCollateralAccount" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: false; isSigner: false; name: "reserve" }, { isMut: false; isSigner: false; name: "loanNoteMint" }, { isMut: true; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "loanAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "bump"; type: "u8" }]; name: "initLoanAccount" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: true; name: "borrower" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: [{ name: "bump"; type: "u8" }]; name: "initObligation" }, { accounts: [{ isMut: true; isSigner: false; name: "market" }, { isMut: false; isSigner: true; name: "owner" }]; args: [{ name: "newOwner"; type: "publicKey" }]; name: "setMarketOwner" }, { accounts: [{ isMut: true; isSigner: false; name: "market" }, { isMut: false; isSigner: true; name: "owner" }]; args: [{ name: "flags"; type: "u64" }]; name: "setMarketFlags" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "depositNoteMint" }, { isMut: true; isSigner: true; name: "depositor" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: true; isSigner: false; name: "receiverAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: "u8" }]; name: "closeDepositAccount" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: true; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "collateralAccount" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: "u8" }]; name: "closeCollateralAccount" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: true; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "loanAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: "u8" }]; name: "closeLoanAccount" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "obligation" }]; args: [{ name: "bump"; type: "u8" }]; name: "closeObligation" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "depositNoteMint" }, { isMut: false; isSigner: true; name: "depositor" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: true; isSigner: false; name: "depositSource" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: "u8" }, { name: "amount"; type: { defined: "Amount" } }]; name: "deposit" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "depositNoteMint" }, { isMut: false; isSigner: true; name: "depositor" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: true; isSigner: false; name: "withdrawAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: "u8" }, { name: "amount"; type: { defined: "Amount" } }]; name: "withdraw" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: false; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: false; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: true; isSigner: false; name: "collateralAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: { defined: "DepositCollateralBumpSeeds" } }, { name: "amount"; type: { defined: "Amount" } }]; name: "depositCollateral" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: false; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: false; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "depositAccount" }, { isMut: true; isSigner: false; name: "collateralAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: { defined: "WithdrawCollateralBumpSeeds" } }, { name: "amount"; type: { defined: "Amount" } }]; name: "withdrawCollateral" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "loanNoteMint" }, { isMut: false; isSigner: true; name: "borrower" }, { isMut: true; isSigner: false; name: "loanAccount" }, { isMut: true; isSigner: false; name: "receiverAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "bump"; type: "u8" }, { name: "amount"; type: { defined: "Amount" } }]; name: "borrow" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "loanNoteMint" }, { isMut: true; isSigner: false; name: "loanAccount" }, { isMut: true; isSigner: false; name: "payerAccount" }, { isMut: false; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: { defined: "Amount" } }]; name: "repay" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: false; isSigner: false; name: "collateralReserve" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "loanNoteMint" }, { isMut: true; isSigner: false; name: "loanAccount" }, { isMut: true; isSigner: false; name: "collateralAccount" }, { isMut: true; isSigner: false; name: "payerAccount" }, { isMut: true; isSigner: false; name: "receiverAccount" }, { isMut: false; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: { defined: "Amount" } }, { name: "minCollateral"; type: "u64" }]; name: "liquidate" }, { accounts: [{ accounts: [{ isMut: true; isSigner: false; name: "market" }, { isMut: true; isSigner: false; name: "openOrders" }, { isMut: true; isSigner: false; name: "requestQueue" }, { isMut: true; isSigner: false; name: "eventQueue" }, { isMut: true; isSigner: false; name: "bids" }, { isMut: true; isSigner: false; name: "asks" }, { isMut: true; isSigner: false; name: "coinVault" }, { isMut: true; isSigner: false; name: "pcVault" }, { isMut: false; isSigner: false; name: "vaultSigner" }]; name: "sourceMarket" }, { accounts: [{ isMut: true; isSigner: false; name: "market" }, { isMut: true; isSigner: false; name: "openOrders" }, { isMut: true; isSigner: false; name: "requestQueue" }, { isMut: true; isSigner: false; name: "eventQueue" }, { isMut: true; isSigner: false; name: "bids" }, { isMut: true; isSigner: false; name: "asks" }, { isMut: true; isSigner: false; name: "coinVault" }, { isMut: true; isSigner: false; name: "pcVault" }, { isMut: false; isSigner: false; name: "vaultSigner" }]; name: "targetMarket" }, { accounts: [{ isMut: false; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "obligation" }, { isMut: true; isSigner: false; name: "loanReserve" }, { isMut: true; isSigner: false; name: "loanReserveVault" }, { isMut: true; isSigner: false; name: "loanNoteMint" }, { isMut: true; isSigner: false; name: "loanAccount" }, { isMut: false; isSigner: false; name: "collateralReserve" }, { isMut: true; isSigner: false; name: "collateralReserveVault" }, { isMut: true; isSigner: false; name: "depositNoteMint" }, { isMut: true; isSigner: false; name: "collateralAccount" }, { isMut: true; isSigner: false; name: "dexSwapTokens" }, { isMut: false; isSigner: false; name: "dexProgram" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "rent" }]; name: "toLiquidate" }]; args: []; name: "mockLiquidateDex" }, { accounts: [{ isMut: true; isSigner: false; name: "market" }, { isMut: false; isSigner: false; name: "marketAuthority" }, { isMut: true; isSigner: false; name: "reserve" }, { isMut: true; isSigner: false; name: "feeNoteVault" }, { isMut: true; isSigner: false; name: "depositNoteMint" }, { isMut: false; isSigner: false; name: "pythOraclePrice" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "refreshReserve" }]
  • name: "jet"
  • types: [{ name: "Amount"; type: { fields: [{ name: "units"; type: { defined: "AmountUnits" } }, { name: "value"; type: "u64" }]; kind: "struct" } }, { name: "DepositCollateralBumpSeeds"; type: { fields: [{ name: "collateralAccount"; type: "u8" }, { name: "depositAccount"; type: "u8" }]; kind: "struct" } }, { name: "InitReserveBumpSeeds"; type: { fields: [{ name: "vault"; type: "u8" }, { name: "feeNoteVault"; type: "u8" }, { name: "dexOpenOrders"; type: "u8" }, { name: "dexSwapTokens"; type: "u8" }, { name: "depositNoteMint"; type: "u8" }, { name: "loanNoteMint"; type: "u8" }]; kind: "struct" } }, { name: "ReserveConfig"; type: { fields: [{ name: "utilizationRate1"; type: "u16" }, { name: "utilizationRate2"; type: "u16" }, { name: "borrowRate0"; type: "u16" }, { name: "borrowRate1"; type: "u16" }, { name: "borrowRate2"; type: "u16" }, { name: "borrowRate3"; type: "u16" }, { name: "minCollateralRatio"; type: "u16" }, { name: "liquidationPremium"; type: "u16" }, { name: "manageFeeCollectionThreshold"; type: "u64" }, { name: "manageFeeRate"; type: "u16" }, { name: "loanOriginationFee"; type: "u16" }, { name: "liquidationSlippage"; type: "u16" }, { name: "reserved0"; type: "u16" }, { name: "liquidationDexTradeMax"; type: "u64" }, { name: "reserved1"; type: { array: ["u8", 24] } }]; kind: "struct" } }, { name: "WithdrawCollateralBumpSeeds"; type: { fields: [{ name: "collateralAccount"; type: "u8" }, { name: "depositAccount"; type: "u8" }]; kind: "struct" } }, { name: "CacheInvalidError"; type: { kind: "enum"; variants: [{ fields: [{ name: "msg"; type: "string" }]; name: "Expired" }, { fields: [{ name: "msg"; type: "string" }]; name: "TooNew" }, { name: "Invalidated" }] } }, { name: "AmountUnits"; type: { kind: "enum"; variants: [{ name: "Tokens" }, { name: "DepositNotes" }, { name: "LoanNotes" }] } }, { name: "Rounding"; type: { kind: "enum"; variants: [{ name: "Up" }, { name: "Down" }] } }, { name: "DexSide"; type: { kind: "enum"; variants: [{ name: "Bid" }, { name: "Ask" }] } }, { name: "SwapKind"; type: { kind: "enum"; variants: [{ name: "Buy" }, { name: "Sell" }] } }, { name: "Side"; type: { kind: "enum"; variants: [{ name: "Collateral" }, { name: "Loan" }] } }, { name: "JobCompletion"; type: { kind: "enum"; variants: [{ name: "Partial" }, { name: "Full" }] } }]
  • version: "0.0.0"
MarketAccount: { authorityBumpSeed: number[]; authoritySeed: PublicKey; flags: BN; marketAuthority: PublicKey; owner: PublicKey; quoteCurrency: number[]; quoteExponent: number; quoteTokenMint: PublicKey; reserved: number[]; reserves: number[]; version: number }

Type declaration

  • authorityBumpSeed: number[]
  • authoritySeed: PublicKey
  • flags: BN
  • marketAuthority: PublicKey
  • owner: PublicKey
  • quoteCurrency: number[]
  • quoteExponent: number
  • quoteTokenMint: PublicKey
  • reserved: number[]
  • reserves: number[]
  • version: number
MaxVoterWeightRecord: TypeDef<AllAccountsMap<StakeIdl>["maxVoterWeightRecord"], IdlTypes<StakeIdl>>
ObligationAccount: { _reserved0: number; _reserved1: number[]; cached: number[]; collateral: ObligationPositionStruct[]; loans: ObligationPositionStruct[]; market: PublicKey; owner: PublicKey; version: number }

Type declaration

ObligationPositionStruct: { _reserved: number[]; account: PublicKey; amount: BN; reserveIndex: number; side: number }

Type declaration

  • _reserved: number[]
  • account: PublicKey
  • amount: BN
  • reserveIndex: number
  • side: number
Position: { collateralBalance: TokenAmount; collateralNotes?: TokenAmount; depositBalance: TokenAmount; depositNotes?: TokenAmount; loanBalance: TokenAmount; loanNotes?: TokenAmount; maxBorrowAmount: TokenAmount; maxDepositAmount: TokenAmount; maxRepayAmount: TokenAmount; maxWithdrawAmount: TokenAmount; reserve: ReserveData }

Type declaration

RawObligationPositionStruct: { _reserved: Uint8Array; account: PublicKey; amount: BN; reserveIndex: number; side: number }

Type declaration

  • _reserved: Uint8Array
  • account: PublicKey
  • amount: BN
  • reserveIndex: number
  • side: number
ReserveAccount: { config: ReserveConfig; depositNoteMint: PublicKey; dexMarket: PublicKey; dexOpenOrders: PublicKey; dexSwapTokens: PublicKey; exponent: number; feeNoteVault: PublicKey; index: number; loanNoteMint: PublicKey; market: PublicKey; pythOraclePrice: PublicKey; pythOracleProduct: PublicKey; reserved0: number | number[]; reserved1: number | number[]; state: number[]; tokenMint: PublicKey; vault: PublicKey; version: number }

Type declaration

  • config: ReserveConfig
  • depositNoteMint: PublicKey
  • dexMarket: PublicKey
  • dexOpenOrders: PublicKey
  • dexSwapTokens: PublicKey
  • exponent: number
  • feeNoteVault: PublicKey
  • index: number
  • loanNoteMint: PublicKey
  • market: PublicKey
  • pythOraclePrice: PublicKey
  • pythOracleProduct: PublicKey
  • reserved0: number | number[]
  • reserved1: number | number[]
  • state: number[]
  • tokenMint: PublicKey
  • vault: PublicKey
  • version: number
RewardsIdl: { accounts: [{ name: "airdrop"; type: { fields: [{ name: "address"; type: "publicKey" }, { name: "rewardVault"; type: "publicKey" }, { name: "authority"; type: "publicKey" }, { name: "expireAt"; type: "i64" }, { name: "stakePool"; type: "publicKey" }, { name: "flags"; type: "u64" }, { name: "shortDesc"; type: { array: ["u8", 32] } }, { name: "longDesc"; type: { array: ["u8", 255] } }, { name: "vaultBump"; type: { array: ["u8", 1] } }, { name: "targetInfo"; type: { array: ["u8", 400024] } }]; kind: "struct" } }, { name: "award"; type: { fields: [{ name: "authority"; type: "publicKey" }, { name: "seed"; type: { array: ["u8", 30] } }, { name: "seedLen"; type: "u8" }, { name: "bumpSeed"; type: { array: ["u8", 1] } }, { name: "stakeAccount"; type: "publicKey" }, { name: "vault"; type: "publicKey" }, { name: "tokenDistribution"; type: { defined: "TokenDistribution" } }]; kind: "struct" } }, { name: "distribution"; type: { fields: [{ name: "address"; type: "publicKey" }, { name: "authority"; type: "publicKey" }, { name: "vault"; type: "publicKey" }, { name: "seed"; type: { array: ["u8", 30] } }, { name: "seedLen"; type: "u8" }, { name: "bumpSeed"; type: { array: ["u8", 1] } }, { name: "targetAccount"; type: "publicKey" }, { name: "tokenDistribution"; type: { defined: "TokenDistribution" } }]; kind: "struct" } }]; errors: [{ code: 13000; name: "RecipientNotFound" }, { code: 13001; name: "AddOutOfOrder" }, { code: 13002; name: "AirdropFinal" }, { code: 13003; name: "AirdropInsufficientRewardBalance" }, { code: 13004; name: "AirdropExpired" }, { code: 13005; name: "AirdropNotFinal" }, { code: 13006; name: "RecipientsNotSorted" }, { code: 13007; name: "DistributionNotEnded" }, { code: 13008; name: "AwardNotFullyVested" }]; events: [{ fields: [{ index: false; name: "airdrop"; type: "publicKey" }, { index: false; name: "authority"; type: "publicKey" }, { index: false; name: "tokenMint"; type: "publicKey" }, { index: false; name: "params"; type: { defined: "AirdropCreateParams" } }]; name: "AirdropCreated" }, { fields: [{ index: false; name: "airdrop"; type: "publicKey" }, { index: false; name: "rewardAdditional"; type: "u64" }, { index: false; name: "rewardTotal"; type: "u64" }, { index: false; name: "recipientsAdditional"; type: "u64" }, { index: false; name: "recipientsTotal"; type: "u64" }, { index: false; name: "recipients"; type: { vec: { defined: "AirdropRecipientParam" } } }]; name: "AirdropRecipientsAdded" }, { fields: [{ index: false; name: "airdrop"; type: "publicKey" }, { index: false; name: "rewardTotal"; type: "u64" }, { index: false; name: "recipientsTotal"; type: "u64" }, { index: false; name: "vaultBalance"; type: "u64" }]; name: "AirdropFinalized" }, { fields: [{ index: false; name: "airdrop"; type: "publicKey" }, { index: false; name: "recipient"; type: "publicKey" }, { index: false; name: "claimedAmount"; type: "u64" }, { index: false; name: "remainingAmount"; type: "u64" }, { index: false; name: "vaultBalance"; type: "u64" }]; name: "AirdropClaimed" }, { fields: [{ index: false; name: "airdrop"; type: "publicKey" }, { index: false; name: "vaultAmount"; type: "u64" }]; name: "AirdropClosed" }, { fields: [{ index: false; name: "award"; type: "publicKey" }, { index: false; name: "tokenMint"; type: "publicKey" }, { index: false; name: "params"; type: { defined: "AwardCreateParams" } }, { index: false; name: "distributionKind"; type: { defined: "DistributionKind" } }]; name: "AwardCreated" }, { fields: [{ index: false; name: "award"; type: "publicKey" }, { index: false; name: "amountReleased"; type: "u64" }, { index: false; name: "totalReleased"; type: "u64" }, { index: false; name: "vaultBalance"; type: "u64" }]; name: "AwardReleased" }, { fields: [{ index: false; name: "award"; type: "publicKey" }, { index: false; name: "unreleasedAmount"; type: "u64" }, { index: false; name: "totalReleased"; type: "u64" }, { index: false; name: "vaultAmount"; type: "u64" }]; name: "AwardRevoked" }, { fields: [{ index: false; name: "award"; type: "publicKey" }]; name: "AwardClosed" }, { fields: [{ index: false; name: "distribution"; type: "publicKey" }, { index: false; name: "authority"; type: "publicKey" }, { index: false; name: "tokenMint"; type: "publicKey" }, { index: false; name: "params"; type: { defined: "DistributionCreateParams" } }, { index: false; name: "distributionKind"; type: { defined: "DistributionKind" } }]; name: "DistributionCreated" }, { fields: [{ index: false; name: "distribution"; type: "publicKey" }, { index: false; name: "amountReleased"; type: "u64" }, { index: false; name: "totalDistributed"; type: "u64" }, { index: false; name: "vaultBalance"; type: "u64" }]; name: "DistributionReleased" }, { fields: [{ index: false; name: "distribution"; type: "publicKey" }]; name: "DistributionClosed" }]; instructions: [{ accounts: [{ isMut: true; isSigner: false; name: "airdrop" }, { isMut: false; isSigner: false; name: "authority" }, { isMut: true; isSigner: false; name: "rewardVault" }, { isMut: true; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "tokenMint" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "params"; type: { defined: "AirdropCreateParams" } }]; name: "airdropCreate" }, { accounts: [{ isMut: true; isSigner: false; name: "airdrop" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "params"; type: { defined: "AirdropAddRecipientsParams" } }]; name: "airdropAddRecipients" }, { accounts: [{ isMut: true; isSigner: false; name: "airdrop" }, { isMut: false; isSigner: false; name: "rewardVault" }, { isMut: false; isSigner: true; name: "authority" }]; args: []; name: "airdropFinalize" }, { accounts: [{ isMut: true; isSigner: false; name: "airdrop" }, { isMut: true; isSigner: false; name: "rewardVault" }, { isMut: false; isSigner: true; name: "authority" }, { isMut: true; isSigner: false; name: "receiver" }, { isMut: true; isSigner: false; name: "tokenReceiver" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "airdropClose" }, { accounts: [{ isMut: true; isSigner: false; name: "airdrop" }, { isMut: true; isSigner: false; name: "rewardVault" }, { isMut: false; isSigner: true; name: "recipient" }, { isMut: true; isSigner: false; name: "receiver" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "stakePoolVault" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }, { isMut: true; isSigner: false; name: "maxVoterWeightRecord" }, { isMut: false; isSigner: false; name: "stakingProgram" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "airdropClaim" }, { accounts: [{ isMut: true; isSigner: false; name: "distribution" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: true; name: "payerRent" }, { isMut: false; isSigner: true; name: "payerTokenAuthority" }, { isMut: true; isSigner: false; name: "payerTokenAccount" }, { isMut: false; isSigner: false; name: "tokenMint" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "params"; type: { defined: "DistributionCreateParams" } }]; name: "distributionCreate" }, { accounts: [{ isMut: true; isSigner: false; name: "distribution" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "targetAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "distributionRelease" }, { accounts: [{ isMut: true; isSigner: false; name: "distribution" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "receiver" }, { isMut: false; isSigner: true; name: "authority" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "distributionClose" }, { accounts: [{ isMut: true; isSigner: false; name: "award" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: false; isSigner: false; name: "tokenMint" }, { isMut: true; isSigner: false; name: "tokenSource" }, { isMut: false; isSigner: true; name: "tokenSourceAuthority" }, { isMut: true; isSigner: true; name: "payerRent" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "params"; type: { defined: "AwardCreateParams" } }]; name: "awardCreate" }, { accounts: [{ isMut: true; isSigner: false; name: "award" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }, { isMut: true; isSigner: false; name: "maxVoterWeightRecord" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "stakePoolVault" }, { isMut: false; isSigner: false; name: "stakingProgram" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "awardRelease" }, { accounts: [{ isMut: true; isSigner: false; name: "award" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "receiver" }, { isMut: false; isSigner: true; name: "authority" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "awardClose" }, { accounts: [{ isMut: true; isSigner: false; name: "award" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "receiver" }, { isMut: true; isSigner: false; name: "tokenReceiver" }, { isMut: false; isSigner: true; name: "authority" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "awardRevoke" }]; name: "jet_rewards"; types: [{ name: "AirdropAddRecipientsParams"; type: { fields: [{ name: "startIndex"; type: "u64" }, { name: "recipients"; type: { vec: { defined: "AirdropRecipientParam" } } }]; kind: "struct" } }, { name: "AirdropRecipientParam"; type: { fields: [{ name: "amount"; type: "u64" }, { name: "recipient"; type: "publicKey" }]; kind: "struct" } }, { name: "AirdropCreateParams"; type: { fields: [{ name: "expireAt"; type: "i64" }, { name: "stakePool"; type: "publicKey" }, { name: "shortDesc"; type: "string" }, { name: "longDesc"; type: "string" }, { name: "flags"; type: "u64" }]; kind: "struct" } }, { name: "AwardCreateParams"; type: { fields: [{ name: "seed"; type: "string" }, { name: "authority"; type: "publicKey" }, { name: "stakeAccount"; type: "publicKey" }, { name: "amount"; type: "u64" }, { name: "beginAt"; type: "u64" }, { name: "endAt"; type: "u64" }]; kind: "struct" } }, { name: "DistributionCreateParams"; type: { fields: [{ name: "seed"; type: "string" }, { name: "authority"; type: "publicKey" }, { name: "targetAccount"; type: "publicKey" }, { name: "amount"; type: "u64" }, { name: "beginAt"; type: "u64" }, { name: "endAt"; type: "u64" }]; kind: "struct" } }, { name: "TokenDistribution"; type: { fields: [{ name: "targetAmount"; type: "u64" }, { name: "distributed"; type: "u64" }, { name: "beginAt"; type: "u64" }, { name: "endAt"; type: "u64" }, { name: "kind"; type: { defined: "DistributionKind" } }]; kind: "struct" } }, { name: "DistributionKind"; type: { kind: "enum"; variants: [{ name: "Linear" }] } }]; version: "1.0.0" }

Type declaration

  • accounts: [{ name: "airdrop"; type: { fields: [{ name: "address"; type: "publicKey" }, { name: "rewardVault"; type: "publicKey" }, { name: "authority"; type: "publicKey" }, { name: "expireAt"; type: "i64" }, { name: "stakePool"; type: "publicKey" }, { name: "flags"; type: "u64" }, { name: "shortDesc"; type: { array: ["u8", 32] } }, { name: "longDesc"; type: { array: ["u8", 255] } }, { name: "vaultBump"; type: { array: ["u8", 1] } }, { name: "targetInfo"; type: { array: ["u8", 400024] } }]; kind: "struct" } }, { name: "award"; type: { fields: [{ name: "authority"; type: "publicKey" }, { name: "seed"; type: { array: ["u8", 30] } }, { name: "seedLen"; type: "u8" }, { name: "bumpSeed"; type: { array: ["u8", 1] } }, { name: "stakeAccount"; type: "publicKey" }, { name: "vault"; type: "publicKey" }, { name: "tokenDistribution"; type: { defined: "TokenDistribution" } }]; kind: "struct" } }, { name: "distribution"; type: { fields: [{ name: "address"; type: "publicKey" }, { name: "authority"; type: "publicKey" }, { name: "vault"; type: "publicKey" }, { name: "seed"; type: { array: ["u8", 30] } }, { name: "seedLen"; type: "u8" }, { name: "bumpSeed"; type: { array: ["u8", 1] } }, { name: "targetAccount"; type: "publicKey" }, { name: "tokenDistribution"; type: { defined: "TokenDistribution" } }]; kind: "struct" } }]
  • errors: [{ code: 13000; name: "RecipientNotFound" }, { code: 13001; name: "AddOutOfOrder" }, { code: 13002; name: "AirdropFinal" }, { code: 13003; name: "AirdropInsufficientRewardBalance" }, { code: 13004; name: "AirdropExpired" }, { code: 13005; name: "AirdropNotFinal" }, { code: 13006; name: "RecipientsNotSorted" }, { code: 13007; name: "DistributionNotEnded" }, { code: 13008; name: "AwardNotFullyVested" }]
  • events: [{ fields: [{ index: false; name: "airdrop"; type: "publicKey" }, { index: false; name: "authority"; type: "publicKey" }, { index: false; name: "tokenMint"; type: "publicKey" }, { index: false; name: "params"; type: { defined: "AirdropCreateParams" } }]; name: "AirdropCreated" }, { fields: [{ index: false; name: "airdrop"; type: "publicKey" }, { index: false; name: "rewardAdditional"; type: "u64" }, { index: false; name: "rewardTotal"; type: "u64" }, { index: false; name: "recipientsAdditional"; type: "u64" }, { index: false; name: "recipientsTotal"; type: "u64" }, { index: false; name: "recipients"; type: { vec: { defined: "AirdropRecipientParam" } } }]; name: "AirdropRecipientsAdded" }, { fields: [{ index: false; name: "airdrop"; type: "publicKey" }, { index: false; name: "rewardTotal"; type: "u64" }, { index: false; name: "recipientsTotal"; type: "u64" }, { index: false; name: "vaultBalance"; type: "u64" }]; name: "AirdropFinalized" }, { fields: [{ index: false; name: "airdrop"; type: "publicKey" }, { index: false; name: "recipient"; type: "publicKey" }, { index: false; name: "claimedAmount"; type: "u64" }, { index: false; name: "remainingAmount"; type: "u64" }, { index: false; name: "vaultBalance"; type: "u64" }]; name: "AirdropClaimed" }, { fields: [{ index: false; name: "airdrop"; type: "publicKey" }, { index: false; name: "vaultAmount"; type: "u64" }]; name: "AirdropClosed" }, { fields: [{ index: false; name: "award"; type: "publicKey" }, { index: false; name: "tokenMint"; type: "publicKey" }, { index: false; name: "params"; type: { defined: "AwardCreateParams" } }, { index: false; name: "distributionKind"; type: { defined: "DistributionKind" } }]; name: "AwardCreated" }, { fields: [{ index: false; name: "award"; type: "publicKey" }, { index: false; name: "amountReleased"; type: "u64" }, { index: false; name: "totalReleased"; type: "u64" }, { index: false; name: "vaultBalance"; type: "u64" }]; name: "AwardReleased" }, { fields: [{ index: false; name: "award"; type: "publicKey" }, { index: false; name: "unreleasedAmount"; type: "u64" }, { index: false; name: "totalReleased"; type: "u64" }, { index: false; name: "vaultAmount"; type: "u64" }]; name: "AwardRevoked" }, { fields: [{ index: false; name: "award"; type: "publicKey" }]; name: "AwardClosed" }, { fields: [{ index: false; name: "distribution"; type: "publicKey" }, { index: false; name: "authority"; type: "publicKey" }, { index: false; name: "tokenMint"; type: "publicKey" }, { index: false; name: "params"; type: { defined: "DistributionCreateParams" } }, { index: false; name: "distributionKind"; type: { defined: "DistributionKind" } }]; name: "DistributionCreated" }, { fields: [{ index: false; name: "distribution"; type: "publicKey" }, { index: false; name: "amountReleased"; type: "u64" }, { index: false; name: "totalDistributed"; type: "u64" }, { index: false; name: "vaultBalance"; type: "u64" }]; name: "DistributionReleased" }, { fields: [{ index: false; name: "distribution"; type: "publicKey" }]; name: "DistributionClosed" }]
  • instructions: [{ accounts: [{ isMut: true; isSigner: false; name: "airdrop" }, { isMut: false; isSigner: false; name: "authority" }, { isMut: true; isSigner: false; name: "rewardVault" }, { isMut: true; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "tokenMint" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "params"; type: { defined: "AirdropCreateParams" } }]; name: "airdropCreate" }, { accounts: [{ isMut: true; isSigner: false; name: "airdrop" }, { isMut: false; isSigner: true; name: "authority" }]; args: [{ name: "params"; type: { defined: "AirdropAddRecipientsParams" } }]; name: "airdropAddRecipients" }, { accounts: [{ isMut: true; isSigner: false; name: "airdrop" }, { isMut: false; isSigner: false; name: "rewardVault" }, { isMut: false; isSigner: true; name: "authority" }]; args: []; name: "airdropFinalize" }, { accounts: [{ isMut: true; isSigner: false; name: "airdrop" }, { isMut: true; isSigner: false; name: "rewardVault" }, { isMut: false; isSigner: true; name: "authority" }, { isMut: true; isSigner: false; name: "receiver" }, { isMut: true; isSigner: false; name: "tokenReceiver" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "airdropClose" }, { accounts: [{ isMut: true; isSigner: false; name: "airdrop" }, { isMut: true; isSigner: false; name: "rewardVault" }, { isMut: false; isSigner: true; name: "recipient" }, { isMut: true; isSigner: false; name: "receiver" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "stakePoolVault" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }, { isMut: true; isSigner: false; name: "maxVoterWeightRecord" }, { isMut: false; isSigner: false; name: "stakingProgram" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "airdropClaim" }, { accounts: [{ isMut: true; isSigner: false; name: "distribution" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: true; name: "payerRent" }, { isMut: false; isSigner: true; name: "payerTokenAuthority" }, { isMut: true; isSigner: false; name: "payerTokenAccount" }, { isMut: false; isSigner: false; name: "tokenMint" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "params"; type: { defined: "DistributionCreateParams" } }]; name: "distributionCreate" }, { accounts: [{ isMut: true; isSigner: false; name: "distribution" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "targetAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "distributionRelease" }, { accounts: [{ isMut: true; isSigner: false; name: "distribution" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "receiver" }, { isMut: false; isSigner: true; name: "authority" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "distributionClose" }, { accounts: [{ isMut: true; isSigner: false; name: "award" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: false; isSigner: false; name: "tokenMint" }, { isMut: true; isSigner: false; name: "tokenSource" }, { isMut: false; isSigner: true; name: "tokenSourceAuthority" }, { isMut: true; isSigner: true; name: "payerRent" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "params"; type: { defined: "AwardCreateParams" } }]; name: "awardCreate" }, { accounts: [{ isMut: true; isSigner: false; name: "award" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }, { isMut: true; isSigner: false; name: "maxVoterWeightRecord" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "stakePoolVault" }, { isMut: false; isSigner: false; name: "stakingProgram" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "awardRelease" }, { accounts: [{ isMut: true; isSigner: false; name: "award" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "receiver" }, { isMut: false; isSigner: true; name: "authority" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "awardClose" }, { accounts: [{ isMut: true; isSigner: false; name: "award" }, { isMut: true; isSigner: false; name: "vault" }, { isMut: true; isSigner: false; name: "receiver" }, { isMut: true; isSigner: false; name: "tokenReceiver" }, { isMut: false; isSigner: true; name: "authority" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "awardRevoke" }]
  • name: "jet_rewards"
  • types: [{ name: "AirdropAddRecipientsParams"; type: { fields: [{ name: "startIndex"; type: "u64" }, { name: "recipients"; type: { vec: { defined: "AirdropRecipientParam" } } }]; kind: "struct" } }, { name: "AirdropRecipientParam"; type: { fields: [{ name: "amount"; type: "u64" }, { name: "recipient"; type: "publicKey" }]; kind: "struct" } }, { name: "AirdropCreateParams"; type: { fields: [{ name: "expireAt"; type: "i64" }, { name: "stakePool"; type: "publicKey" }, { name: "shortDesc"; type: "string" }, { name: "longDesc"; type: "string" }, { name: "flags"; type: "u64" }]; kind: "struct" } }, { name: "AwardCreateParams"; type: { fields: [{ name: "seed"; type: "string" }, { name: "authority"; type: "publicKey" }, { name: "stakeAccount"; type: "publicKey" }, { name: "amount"; type: "u64" }, { name: "beginAt"; type: "u64" }, { name: "endAt"; type: "u64" }]; kind: "struct" } }, { name: "DistributionCreateParams"; type: { fields: [{ name: "seed"; type: "string" }, { name: "authority"; type: "publicKey" }, { name: "targetAccount"; type: "publicKey" }, { name: "amount"; type: "u64" }, { name: "beginAt"; type: "u64" }, { name: "endAt"; type: "u64" }]; kind: "struct" } }, { name: "TokenDistribution"; type: { fields: [{ name: "targetAmount"; type: "u64" }, { name: "distributed"; type: "u64" }, { name: "beginAt"; type: "u64" }, { name: "endAt"; type: "u64" }, { name: "kind"; type: { defined: "DistributionKind" } }]; kind: "struct" } }, { name: "DistributionKind"; type: { kind: "enum"; variants: [{ name: "Linear" }] } }]
  • version: "1.0.0"
SharedTokenPool: StakePoolInfo["bonded"]
StakeAccountInfo: TypeDef<AllAccountsMap<StakeIdl>["stakeAccount"], IdlTypes<StakeIdl>>
StakeIdl: { accounts: [{ name: "voterWeightRecord"; type: { fields: [{ name: "realm"; type: "publicKey" }, { name: "governingTokenMint"; type: "publicKey" }, { name: "owner"; type: "publicKey" }, { name: "voterWeight"; type: "u64" }, { name: "voterWeightExpiry"; type: { option: "u64" } }, { name: "weightAction"; type: { option: { defined: "VoterWeightAction" } } }, { name: "weightActionTarget"; type: { option: "publicKey" } }, { name: "reserved"; type: { array: ["u8", 8] } }]; kind: "struct" } }, { name: "maxVoterWeightRecord"; type: { fields: [{ name: "realm"; type: "publicKey" }, { name: "governingTokenMint"; type: "publicKey" }, { name: "maxVoterWeight"; type: "u64" }, { name: "maxVoterWeightExpiry"; type: { option: "u64" } }, { name: "reserved"; type: { array: ["u8", 8] } }]; kind: "struct" } }, { name: "stakePool"; type: { fields: [{ name: "authority"; type: "publicKey" }, { name: "seed"; type: { array: ["u8", 30] } }, { name: "seedLen"; type: "u8" }, { name: "bumpSeed"; type: { array: ["u8", 1] } }, { name: "tokenMint"; type: "publicKey" }, { name: "stakePoolVault"; type: "publicKey" }, { name: "maxVoterWeightRecord"; type: "publicKey" }, { name: "governanceRealm"; type: "publicKey" }, { name: "stakeCollateralMint"; type: "publicKey" }, { name: "unbondPeriod"; type: "i64" }, { name: "vaultAmount"; type: "u64" }, { name: "bonded"; type: { defined: "SharedTokenPool" } }, { name: "unbonding"; type: { defined: "SharedTokenPool" } }]; kind: "struct" } }, { name: "stakeAccount"; type: { fields: [{ name: "owner"; type: "publicKey" }, { name: "stakePool"; type: "publicKey" }, { name: "voterWeightRecord"; type: "publicKey" }, { name: "bondedShares"; type: "u64" }, { name: "unbondingShares"; type: "u64" }]; kind: "struct" } }, { name: "unbondingAccount"; type: { fields: [{ name: "stakeAccount"; type: "publicKey" }, { name: "shares"; type: "u64" }, { name: "unbondedAt"; type: "i64" }]; kind: "struct" } }]; errors: [{ code: 13100; name: "InsufficientStake" }, { code: 13101; name: "InvalidTokenOwnerRecord" }, { code: 13102; name: "OutstandingVotes" }, { code: 13103; name: "NotYetUnbonded" }, { code: 13104; name: "StakeRemaining" }, { code: 13105; name: "InvalidAmount" }]; events: [{ fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "authority"; type: "publicKey" }, { index: false; name: "seed"; type: "string" }, { index: false; name: "tokenMint"; type: "publicKey" }, { index: false; name: "config"; type: { defined: "PoolConfig" } }]; name: "StakePoolCreated" }, { fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "stakeAccount"; type: "publicKey" }, { index: false; name: "owner"; type: "publicKey" }]; name: "StakeAccountCreated" }, { fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "stakeAccount"; type: "publicKey" }, { index: false; name: "owner"; type: "publicKey" }, { index: false; name: "depositor"; type: "publicKey" }, { index: false; name: "stakedAmount"; type: { defined: "FullAmount" } }, { index: false; name: "poolNote"; type: { defined: "StakePoolNote" } }, { index: false; name: "accountNote"; type: { defined: "StakeAccountNote" } }]; name: "StakeAdded" }, { fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "stakeAccount"; type: "publicKey" }, { index: false; name: "unbondingAccount"; type: "publicKey" }, { index: false; name: "owner"; type: "publicKey" }, { index: false; name: "unbondedAmount"; type: { defined: "FullAmount" } }, { index: false; name: "unbondedAt"; type: "i64" }, { index: false; name: "poolNote"; type: { defined: "StakePoolNote" } }, { index: false; name: "accountNote"; type: { defined: "StakeAccountNote" } }]; name: "StakeUnbonded" }, { fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "stakeAccount"; type: "publicKey" }, { index: false; name: "unbondingAccount"; type: "publicKey" }, { index: false; name: "owner"; type: "publicKey" }, { index: false; name: "cancelledAmount"; type: { defined: "FullAmount" } }, { index: false; name: "poolNote"; type: { defined: "StakePoolNote" } }, { index: false; name: "accountNote"; type: { defined: "StakeAccountNote" } }]; name: "UnbondCancelled" }, { fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "stakeAccount"; type: "publicKey" }, { index: false; name: "owner"; type: "publicKey" }, { index: false; name: "withdrawnAmount"; type: { defined: "FullAmount" } }, { index: false; name: "poolNote"; type: { defined: "StakePoolNote" } }, { index: false; name: "accountNote"; type: { defined: "StakeAccountNote" } }]; name: "UnbondedWithdrawn" }, { fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "withdrawnAmount"; type: "u64" }, { index: false; name: "poolNote"; type: { defined: "StakePoolNote" } }]; name: "BondedWithdrawn" }, { fields: [{ index: false; name: "owner"; type: "publicKey" }, { index: false; name: "weight"; type: "u64" }, { index: false; name: "weightExpiry"; type: { option: "u64" } }, { index: false; name: "accountNote"; type: { defined: "StakeAccountNote" } }]; name: "CreatedVoterWeightRecord" }, { fields: [{ index: false; name: "stakeAccount"; type: "publicKey" }, { index: false; name: "owner"; type: "publicKey" }]; name: "StakeAccountClosed" }]; instructions: [{ accounts: [{ isMut: true; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "authority" }, { isMut: false; isSigner: false; name: "tokenMint" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "maxVoterWeightRecord" }, { isMut: true; isSigner: false; name: "stakeCollateralMint" }, { isMut: true; isSigner: false; name: "stakePoolVault" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "seed"; type: "string" }, { name: "config"; type: { defined: "PoolConfig" } }]; name: "initPool" }, { accounts: [{ isMut: false; isSigner: true; name: "owner" }, { isMut: false; isSigner: false; name: "auth" }, { isMut: false; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }, { isMut: true; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: []; name: "initStakeAccount" }, { accounts: [{ isMut: true; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "stakePoolVault" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }, { isMut: true; isSigner: false; name: "maxVoterWeightRecord" }, { isMut: false; isSigner: true; name: "payer" }, { isMut: true; isSigner: false; name: "payerTokenAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: { option: "u64" } }]; name: "addStake" }, { accounts: [{ isMut: false; isSigner: true; name: "owner" }, { isMut: true; isSigner: true; name: "payer" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: false; isSigner: false; name: "stakePoolVault" }, { isMut: true; isSigner: false; name: "unbondingAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }, { isMut: true; isSigner: false; name: "maxVoterWeightRecord" }, { isMut: false; isSigner: false; name: "tokenOwnerRecord" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: [{ name: "seed"; type: "u32" }, { name: "amount"; type: { option: "u64" } }]; name: "unbondStake" }, { accounts: [{ isMut: false; isSigner: true; name: "owner" }, { isMut: false; isSigner: false; name: "receiver" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }, { isMut: true; isSigner: false; name: "maxVoterWeightRecord" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: false; isSigner: false; name: "stakePoolVault" }, { isMut: true; isSigner: false; name: "unbondingAccount" }]; args: []; name: "cancelUnbond" }, { accounts: [{ isMut: false; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "closer" }, { isMut: true; isSigner: false; name: "tokenReceiver" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "stakePoolVault" }, { isMut: true; isSigner: false; name: "unbondingAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "withdrawUnbonded" }, { accounts: [{ isMut: false; isSigner: true; name: "authority" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "tokenReceiver" }, { isMut: true; isSigner: false; name: "stakePoolVault" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; name: "withdrawBonded" }, { accounts: [{ isMut: false; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "closer" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }]; args: []; name: "closeStakeAccount" }]; name: "jet_staking"; types: [{ name: "StakePoolNote"; type: { fields: [{ name: "vaultAmount"; type: "u64" }, { name: "bonded"; type: { defined: "SharedTokenPool" } }, { name: "unbonding"; type: { defined: "SharedTokenPool" } }]; kind: "struct" } }, { name: "StakeAccountNote"; type: { fields: [{ name: "bondedShares"; type: "u64" }, { name: "unbondingShares"; type: "u64" }]; kind: "struct" } }, { name: "PoolConfig"; type: { fields: [{ name: "unbondPeriod"; type: "u64" }, { name: "governanceRealm"; type: "publicKey" }]; kind: "struct" } }, { name: "SharedTokenPool"; type: { fields: [{ name: "tokens"; type: "u64" }, { name: "shares"; type: "u64" }]; kind: "struct" } }, { name: "FullAmount"; type: { fields: [{ name: "tokenAmount"; type: "u64" }, { name: "shareAmount"; type: "u64" }, { name: "allShares"; type: "u64" }, { name: "allTokens"; type: "u64" }]; kind: "struct" } }, { name: "VoterWeightAction"; type: { kind: "enum"; variants: [{ name: "CastVote" }, { name: "CommentProposal" }, { name: "CreateGovernance" }, { name: "CreateProposal" }, { name: "SignOffProposal" }] } }, { name: "Rounding"; type: { kind: "enum"; variants: [{ name: "Up" }, { name: "Down" }] } }]; version: "1.0.0" }

Type declaration

  • accounts: [{ name: "voterWeightRecord"; type: { fields: [{ name: "realm"; type: "publicKey" }, { name: "governingTokenMint"; type: "publicKey" }, { name: "owner"; type: "publicKey" }, { name: "voterWeight"; type: "u64" }, { name: "voterWeightExpiry"; type: { option: "u64" } }, { name: "weightAction"; type: { option: { defined: "VoterWeightAction" } } }, { name: "weightActionTarget"; type: { option: "publicKey" } }, { name: "reserved"; type: { array: ["u8", 8] } }]; kind: "struct" } }, { name: "maxVoterWeightRecord"; type: { fields: [{ name: "realm"; type: "publicKey" }, { name: "governingTokenMint"; type: "publicKey" }, { name: "maxVoterWeight"; type: "u64" }, { name: "maxVoterWeightExpiry"; type: { option: "u64" } }, { name: "reserved"; type: { array: ["u8", 8] } }]; kind: "struct" } }, { name: "stakePool"; type: { fields: [{ name: "authority"; type: "publicKey" }, { name: "seed"; type: { array: ["u8", 30] } }, { name: "seedLen"; type: "u8" }, { name: "bumpSeed"; type: { array: ["u8", 1] } }, { name: "tokenMint"; type: "publicKey" }, { name: "stakePoolVault"; type: "publicKey" }, { name: "maxVoterWeightRecord"; type: "publicKey" }, { name: "governanceRealm"; type: "publicKey" }, { name: "stakeCollateralMint"; type: "publicKey" }, { name: "unbondPeriod"; type: "i64" }, { name: "vaultAmount"; type: "u64" }, { name: "bonded"; type: { defined: "SharedTokenPool" } }, { name: "unbonding"; type: { defined: "SharedTokenPool" } }]; kind: "struct" } }, { name: "stakeAccount"; type: { fields: [{ name: "owner"; type: "publicKey" }, { name: "stakePool"; type: "publicKey" }, { name: "voterWeightRecord"; type: "publicKey" }, { name: "bondedShares"; type: "u64" }, { name: "unbondingShares"; type: "u64" }]; kind: "struct" } }, { name: "unbondingAccount"; type: { fields: [{ name: "stakeAccount"; type: "publicKey" }, { name: "shares"; type: "u64" }, { name: "unbondedAt"; type: "i64" }]; kind: "struct" } }]
  • errors: [{ code: 13100; name: "InsufficientStake" }, { code: 13101; name: "InvalidTokenOwnerRecord" }, { code: 13102; name: "OutstandingVotes" }, { code: 13103; name: "NotYetUnbonded" }, { code: 13104; name: "StakeRemaining" }, { code: 13105; name: "InvalidAmount" }]
  • events: [{ fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "authority"; type: "publicKey" }, { index: false; name: "seed"; type: "string" }, { index: false; name: "tokenMint"; type: "publicKey" }, { index: false; name: "config"; type: { defined: "PoolConfig" } }]; name: "StakePoolCreated" }, { fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "stakeAccount"; type: "publicKey" }, { index: false; name: "owner"; type: "publicKey" }]; name: "StakeAccountCreated" }, { fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "stakeAccount"; type: "publicKey" }, { index: false; name: "owner"; type: "publicKey" }, { index: false; name: "depositor"; type: "publicKey" }, { index: false; name: "stakedAmount"; type: { defined: "FullAmount" } }, { index: false; name: "poolNote"; type: { defined: "StakePoolNote" } }, { index: false; name: "accountNote"; type: { defined: "StakeAccountNote" } }]; name: "StakeAdded" }, { fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "stakeAccount"; type: "publicKey" }, { index: false; name: "unbondingAccount"; type: "publicKey" }, { index: false; name: "owner"; type: "publicKey" }, { index: false; name: "unbondedAmount"; type: { defined: "FullAmount" } }, { index: false; name: "unbondedAt"; type: "i64" }, { index: false; name: "poolNote"; type: { defined: "StakePoolNote" } }, { index: false; name: "accountNote"; type: { defined: "StakeAccountNote" } }]; name: "StakeUnbonded" }, { fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "stakeAccount"; type: "publicKey" }, { index: false; name: "unbondingAccount"; type: "publicKey" }, { index: false; name: "owner"; type: "publicKey" }, { index: false; name: "cancelledAmount"; type: { defined: "FullAmount" } }, { index: false; name: "poolNote"; type: { defined: "StakePoolNote" } }, { index: false; name: "accountNote"; type: { defined: "StakeAccountNote" } }]; name: "UnbondCancelled" }, { fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "stakeAccount"; type: "publicKey" }, { index: false; name: "owner"; type: "publicKey" }, { index: false; name: "withdrawnAmount"; type: { defined: "FullAmount" } }, { index: false; name: "poolNote"; type: { defined: "StakePoolNote" } }, { index: false; name: "accountNote"; type: { defined: "StakeAccountNote" } }]; name: "UnbondedWithdrawn" }, { fields: [{ index: false; name: "stakePool"; type: "publicKey" }, { index: false; name: "withdrawnAmount"; type: "u64" }, { index: false; name: "poolNote"; type: { defined: "StakePoolNote" } }]; name: "BondedWithdrawn" }, { fields: [{ index: false; name: "owner"; type: "publicKey" }, { index: false; name: "weight"; type: "u64" }, { index: false; name: "weightExpiry"; type: { option: "u64" } }, { index: false; name: "accountNote"; type: { defined: "StakeAccountNote" } }]; name: "CreatedVoterWeightRecord" }, { fields: [{ index: false; name: "stakeAccount"; type: "publicKey" }, { index: false; name: "owner"; type: "publicKey" }]; name: "StakeAccountClosed" }]
  • instructions: [{ accounts: [{ isMut: true; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "authority" }, { isMut: false; isSigner: false; name: "tokenMint" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "maxVoterWeightRecord" }, { isMut: true; isSigner: false; name: "stakeCollateralMint" }, { isMut: true; isSigner: false; name: "stakePoolVault" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "seed"; type: "string" }, { name: "config"; type: { defined: "PoolConfig" } }]; name: "initPool" }, { accounts: [{ isMut: false; isSigner: true; name: "owner" }, { isMut: false; isSigner: false; name: "auth" }, { isMut: false; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }, { isMut: true; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: []; name: "initStakeAccount" }, { accounts: [{ isMut: true; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "stakePoolVault" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }, { isMut: true; isSigner: false; name: "maxVoterWeightRecord" }, { isMut: false; isSigner: true; name: "payer" }, { isMut: true; isSigner: false; name: "payerTokenAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: { option: "u64" } }]; name: "addStake" }, { accounts: [{ isMut: false; isSigner: true; name: "owner" }, { isMut: true; isSigner: true; name: "payer" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: false; isSigner: false; name: "stakePoolVault" }, { isMut: true; isSigner: false; name: "unbondingAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }, { isMut: true; isSigner: false; name: "maxVoterWeightRecord" }, { isMut: false; isSigner: false; name: "tokenOwnerRecord" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: [{ name: "seed"; type: "u32" }, { name: "amount"; type: { option: "u64" } }]; name: "unbondStake" }, { accounts: [{ isMut: false; isSigner: true; name: "owner" }, { isMut: false; isSigner: false; name: "receiver" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }, { isMut: true; isSigner: false; name: "maxVoterWeightRecord" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: false; isSigner: false; name: "stakePoolVault" }, { isMut: true; isSigner: false; name: "unbondingAccount" }]; args: []; name: "cancelUnbond" }, { accounts: [{ isMut: false; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "closer" }, { isMut: true; isSigner: false; name: "tokenReceiver" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "stakePoolVault" }, { isMut: true; isSigner: false; name: "unbondingAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: []; name: "withdrawUnbonded" }, { accounts: [{ isMut: false; isSigner: true; name: "authority" }, { isMut: true; isSigner: false; name: "stakePool" }, { isMut: true; isSigner: false; name: "tokenReceiver" }, { isMut: true; isSigner: false; name: "stakePoolVault" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "amount"; type: "u64" }]; name: "withdrawBonded" }, { accounts: [{ isMut: false; isSigner: true; name: "owner" }, { isMut: true; isSigner: false; name: "closer" }, { isMut: true; isSigner: false; name: "stakeAccount" }, { isMut: true; isSigner: false; name: "voterWeightRecord" }]; args: []; name: "closeStakeAccount" }]
  • name: "jet_staking"
  • types: [{ name: "StakePoolNote"; type: { fields: [{ name: "vaultAmount"; type: "u64" }, { name: "bonded"; type: { defined: "SharedTokenPool" } }, { name: "unbonding"; type: { defined: "SharedTokenPool" } }]; kind: "struct" } }, { name: "StakeAccountNote"; type: { fields: [{ name: "bondedShares"; type: "u64" }, { name: "unbondingShares"; type: "u64" }]; kind: "struct" } }, { name: "PoolConfig"; type: { fields: [{ name: "unbondPeriod"; type: "u64" }, { name: "governanceRealm"; type: "publicKey" }]; kind: "struct" } }, { name: "SharedTokenPool"; type: { fields: [{ name: "tokens"; type: "u64" }, { name: "shares"; type: "u64" }]; kind: "struct" } }, { name: "FullAmount"; type: { fields: [{ name: "tokenAmount"; type: "u64" }, { name: "shareAmount"; type: "u64" }, { name: "allShares"; type: "u64" }, { name: "allTokens"; type: "u64" }]; kind: "struct" } }, { name: "VoterWeightAction"; type: { kind: "enum"; variants: [{ name: "CastVote" }, { name: "CommentProposal" }, { name: "CreateGovernance" }, { name: "CreateProposal" }, { name: "SignOffProposal" }] } }, { name: "Rounding"; type: { kind: "enum"; variants: [{ name: "Up" }, { name: "Down" }] } }]
  • version: "1.0.0"
StakePoolInfo: TypeDef<AllAccountsMap<StakeIdl>["stakePool"], IdlTypes<StakeIdl>>
Time: TimeNow | TimeAt | TimeNever
UnbondingAccountInfo: TypeDef<AllAccountsMap<StakeIdl>["unbondingAccount"], IdlTypes<StakeIdl>>
VoteAbstain: { abstain: Record<string, never> }

Type declaration

  • abstain: Record<string, never>
VoteNo: { no: Record<string, never> }

Type declaration

  • no: Record<string, never>
VoteYes: { yes: Record<string, never> }

Type declaration

  • yes: Record<string, never>
VoterWeightAction: VoterWeightRecord["weightAction"]
VoterWeightRecord: TypeDef<AllAccountsMap<StakeIdl>["voterWeightRecord"], IdlTypes<StakeIdl>>

Variables

DEX_ID: PublicKey = ...
DEX_ID_DEVNET: PublicKey = ...
IDL: Jet = ...
JET_ID: PublicKey = ...
JET_MARKET_ADDRESS: PublicKey = ...
JET_MARKET_ADDRESS_DEVNET: PublicKey = ...
PLACEHOLDER_ACCOUNT: PublicKey = PublicKey.default
StaticSeed: { RealmAuthority: Buffer; Vault: Buffer; Voter: Buffer } = ...

Type declaration

  • RealmAuthority: Buffer
  • Vault: Buffer
  • Voter: Buffer

Functions

  • bigIntToBn(bigInt: undefined | null | bigint): BN
  • bigIntToNumber(bigint: undefined | null | bigint): number
  • bnToBigInt(bn: undefined | null | number | BN): bigint
  • bnToNumber(bn: undefined | null | BN): number
  • parseMintAccount(info: AccountInfo<Buffer>, address: PublicKey): Mint
  • parseTokenAccount(info: AccountInfo<Buffer>, address: PublicKey): Account
  • Decode a token account. From @solana/spl-token

    Parameters

    • info: AccountInfo<Buffer>
    • address: PublicKey

    Returns Account

Generated using TypeDoc