From 9c67ec5fe8fd186af04365c54de203839a94957f Mon Sep 17 00:00:00 2001 From: microwavedcola1 <89031858+microwavedcola1@users.noreply.github.com> Date: Tue, 25 Apr 2023 14:37:36 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20blockwor?= =?UTF-8?q?ks-foundation/mango-v4@4e4af83d98764d52847a334afa8046aa02ddf407?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rs/.rustc_info.json | 2 +- .../struct.GroupWithdrawInsuranceFund.html | 4 +- .../group_withdraw_insurance_fund.rs.html | 2 - ts/client/classes/As.html | 2 +- ts/client/classes/Bank.html | 10 ++-- ts/client/classes/BookSide.html | 6 +-- ts/client/classes/BookSideType.html | 2 +- ts/client/classes/FlashLoanType.html | 2 +- ts/client/classes/FlashLoanWithdraw.html | 2 +- ts/client/classes/Group.html | 4 +- ts/client/classes/HealthType.html | 2 +- ts/client/classes/I80F48.html | 8 +-- ts/client/classes/I80F48Dto.html | 2 +- ts/client/classes/InnerNode.html | 2 +- ts/client/classes/InterestRateParams.html | 2 +- ts/client/classes/LeafNode.html | 2 +- ts/client/classes/MangoAccount.html | 50 +++++++++---------- ts/client/classes/MangoClient.html | 6 +-- ts/client/classes/MintInfo.html | 2 +- ts/client/classes/OracleConfigParams.html | 2 +- ts/client/classes/PerpEventQueue.html | 2 +- ts/client/classes/PerpMarket.html | 8 +-- ts/client/classes/PerpOo.html | 2 +- ts/client/classes/PerpOoDto.html | 2 +- ts/client/classes/PerpOrder.html | 2 +- ts/client/classes/PerpOrderSide.html | 2 +- ts/client/classes/PerpOrderType.html | 2 +- ts/client/classes/PerpPosition.html | 2 +- ts/client/classes/PerpPositionDto.html | 2 +- ts/client/classes/Serum3Market.html | 6 +-- ts/client/classes/Serum3OrderType.html | 2 +- ts/client/classes/Serum3Orders.html | 2 +- ts/client/classes/Serum3PositionDto.html | 2 +- .../classes/Serum3SelfTradeBehavior.html | 2 +- ts/client/classes/Serum3Side.html | 2 +- ts/client/classes/StubOracle.html | 2 +- ts/client/classes/TokenPosition.html | 14 +++--- ts/client/classes/TokenPositionDto.html | 2 +- ts/client/enums/OracleProvider.html | 2 +- ts/client/enums/SwapMode.html | 2 +- ts/client/index.html | 4 +- ts/client/interfaces/BankForHealth.html | 2 +- ts/client/interfaces/Event.html | 2 +- ts/client/interfaces/ExactOutSwapParams.html | 4 +- ts/client/interfaces/Fee.html | 2 +- ts/client/interfaces/FillEvent.html | 2 +- ts/client/interfaces/LiquidateEvent.html | 2 +- ts/client/interfaces/MarketInfo.html | 2 +- ts/client/interfaces/OutEvent.html | 2 +- ts/client/interfaces/Quote.html | 2 +- ts/client/interfaces/QuoteParams.html | 2 +- ts/client/interfaces/RouteInfo.html | 2 +- ts/client/interfaces/SwapParams.html | 4 +- ts/client/interfaces/TransactionFeeInfo.html | 2 +- 54 files changed, 104 insertions(+), 106 deletions(-) diff --git a/rs/.rustc_info.json b/rs/.rustc_info.json index 75641412e..1f7ee4712 100644 --- a/rs/.rustc_info.json +++ b/rs/.rustc_info.json @@ -1 +1 @@ -{"rustc_fingerprint":3499599073734681354,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.68.2 (9eb3afe9e 2023-03-27)\nbinary: rustc\ncommit-hash: 9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0\ncommit-date: 2023-03-27\nhost: x86_64-unknown-linux-gnu\nrelease: 1.68.2\nLLVM version: 15.0.6\n","stderr":""},"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}} \ No newline at end of file +{"rustc_fingerprint":13323018454505921775,"outputs":{"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.68.2 (9eb3afe9e 2023-03-27)\nbinary: rustc\ncommit-hash: 9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0\ncommit-date: 2023-03-27\nhost: x86_64-unknown-linux-gnu\nrelease: 1.68.2\nLLVM version: 15.0.6\n","stderr":""}},"successes":{}} \ No newline at end of file diff --git a/rs/doc/mango_v4/accounts_ix/struct.GroupWithdrawInsuranceFund.html b/rs/doc/mango_v4/accounts_ix/struct.GroupWithdrawInsuranceFund.html index 607a01e3c..8cb0e63cb 100644 --- a/rs/doc/mango_v4/accounts_ix/struct.GroupWithdrawInsuranceFund.html +++ b/rs/doc/mango_v4/accounts_ix/struct.GroupWithdrawInsuranceFund.html @@ -1,10 +1,10 @@ -GroupWithdrawInsuranceFund in mango_v4::accounts_ix - Rust
pub struct GroupWithdrawInsuranceFund<'info> {
+GroupWithdrawInsuranceFund in mango_v4::accounts_ix - Rust
pub struct GroupWithdrawInsuranceFund<'info> {
     pub group: AccountLoader<'info, Group>,
     pub admin: Signer<'info>,
     pub insurance_vault: Account<'info, TokenAccount>,
     pub destination: Account<'info, TokenAccount>,
     pub token_program: Program<'info, Token>,
-}

Fields§

§group: AccountLoader<'info, Group>§admin: Signer<'info>§insurance_vault: Account<'info, TokenAccount>§destination: Account<'info, TokenAccount>§token_program: Program<'info, Token>

Implementations§

Trait Implementations§

Returns the validated accounts struct. What constitutes “valid” is +}

Fields§

§group: AccountLoader<'info, Group>§admin: Signer<'info>§insurance_vault: Account<'info, TokenAccount>§destination: Account<'info, TokenAccount>§token_program: Program<'info, Token>

Implementations§

Trait Implementations§

Returns the validated accounts struct. What constitutes “valid” is program dependent. However, users of these types should never have to worry about account substitution attacks. For example, if a program expects a Mint account from the SPL token program in a particular diff --git a/rs/doc/src/mango_v4/accounts_ix/group_withdraw_insurance_fund.rs.html b/rs/doc/src/mango_v4/accounts_ix/group_withdraw_insurance_fund.rs.html index 5e435c86f..0a8fed785 100644 --- a/rs/doc/src/mango_v4/accounts_ix/group_withdraw_insurance_fund.rs.html +++ b/rs/doc/src/mango_v4/accounts_ix/group_withdraw_insurance_fund.rs.html @@ -32,7 +32,6 @@ 32 33 34 -35
use crate::{error::MangoError, state::*};
 use anchor_lang::prelude::*;
 use anchor_spl::token::{self, Token, TokenAccount};
@@ -40,7 +39,6 @@
 #[derive(Accounts)]
 pub struct GroupWithdrawInsuranceFund<'info> {
     #[account(
-        mut,
         has_one = insurance_vault,
         has_one = admin,
         constraint = group.load()?.is_ix_enabled(IxGate::GroupWithdrawInsuranceFund) @ MangoError::IxIsDisabled,
diff --git a/ts/client/classes/As.html b/ts/client/classes/As.html
index b775faae8..d9ee22aca 100644
--- a/ts/client/classes/As.html
+++ b/ts/client/classes/As.html
@@ -1 +1 @@
-As | @blockworks-foundation/mango-v4
Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • Tag: keyof never

Hierarchy

  • As

Index

Constructors

Properties

Constructors

  • new As<Tag>(): As<Tag>
  • Type parameters

    • Tag: string | number | symbol

    Returns As<Tag>

Properties

[$as$]: Record<Tag, true>
$as$: typeof $as$

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Private property
  • Private method
  • Static property
  • Static method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +As | @blockworks-foundation/mango-v4
Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • Tag: keyof never

Hierarchy

  • As

Index

Constructors

Properties

Constructors

  • new As<Tag>(): As<Tag>
  • Type parameters

    • Tag: string | number | symbol

    Returns As<Tag>

Properties

[$as$]: Record<Tag, true>
$as$: typeof $as$

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Private property
  • Private method
  • Static property
  • Static method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/ts/client/classes/Bank.html b/ts/client/classes/Bank.html index c92b8c014..de8776d34 100644 --- a/ts/client/classes/Bank.html +++ b/ts/client/classes/Bank.html @@ -1,5 +1,5 @@ -Bank | @blockworks-foundation/mango-v4
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Bank

Implements

Index

Constructors

  • new Bank(publicKey: PublicKey, group: PublicKey, name: number[], mint: PublicKey, vault: PublicKey, oracle: PublicKey, oracleConfig: OracleConfigDto, stablePriceModel: StablePriceModel, depositIndex: I80F48Dto, borrowIndex: I80F48Dto, indexedDeposits: I80F48Dto, indexedBorrows: I80F48Dto, indexLastUpdated: BN, bankRateLastUpdated: BN, avgUtilization: I80F48Dto, adjustmentFactor: I80F48Dto, util0: I80F48Dto, rate0: I80F48Dto, util1: I80F48Dto, rate1: I80F48Dto, maxRate: I80F48Dto, collectedFeesNative: I80F48Dto, loanOriginationFeeRate: I80F48Dto, loanFeeRate: I80F48Dto, maintAssetWeight: I80F48Dto, initAssetWeight: I80F48Dto, maintLiabWeight: I80F48Dto, initLiabWeight: I80F48Dto, liquidationFee: I80F48Dto, dust: I80F48Dto, flashLoanTokenAccountInitial: BN, flashLoanApprovedAmount: BN, tokenIndex: TokenIndex, mintDecimals: number, bankNum: number, minVaultToDepositsRatio: number, netBorrowLimitWindowSizeTs: BN, lastNetBorrowsWindowStartTs: BN, netBorrowLimitPerWindowQuote: BN, netBorrowsInWindow: BN, borrowWeightScaleStartQuote: number, depositWeightScaleStartQuote: number, reduceOnly: number, forceClose: boolean): Bank

Properties

_oracleLastUpdatedSlot: undefined | number
_oracleProvider: undefined | OracleProvider
_price: undefined | I80F48
_uiPrice: undefined | number
adjustmentFactor: I80F48
avgUtilization: I80F48
bankNum: number
bankRateLastUpdated: BN
borrowIndex: I80F48
borrowWeightScaleStartQuote: number
collectedFeesNative: I80F48
depositIndex: I80F48
depositWeightScaleStartQuote: number
dust: I80F48
forceClose: boolean
group: PublicKey
indexLastUpdated: BN
indexedBorrows: I80F48
indexedDeposits: I80F48
initAssetWeight: I80F48
initLiabWeight: I80F48
lastNetBorrowsWindowStartTs: BN
liquidationFee: I80F48
loanFeeRate: I80F48
loanOriginationFeeRate: I80F48
maintAssetWeight: I80F48
maintLiabWeight: I80F48
maxRate: I80F48
minVaultToDepositsRatio: number
mint: PublicKey
mintDecimals: number
name: string
netBorrowLimitPerWindowQuote: BN
netBorrowLimitWindowSizeTs: BN
netBorrowsInWindow: BN
oracle: PublicKey
oracleConfig: OracleConfig
publicKey: PublicKey
rate0: I80F48
rate1: I80F48
reduceOnly: number
stablePriceModel: StablePriceModel
tokenIndex: TokenIndex
util0: I80F48
util1: I80F48
vault: PublicKey

Accessors

  • get oracleLastUpdatedSlot(): number
  • get uiPrice(): number

Methods

  • areBorrowsReduceOnly(): boolean
  • areDepositsReduceOnly(): boolean
  • getBorrowRateUi(): number
  • getDepositRateUi(): number
  • toString(): string
  • uiBorrows(): number
  • uiDeposits(): number
  • from(publicKey: PublicKey, obj: { adjustmentFactor: I80F48Dto; avgUtilization: I80F48Dto; bankNum: number; bankRateLastUpdated: BN; borrowIndex: I80F48Dto; borrowWeightScaleStartQuote: number; collectedFeesNative: I80F48Dto; depositIndex: I80F48Dto; depositWeightScaleStartQuote: number; dust: I80F48Dto; flashLoanApprovedAmount: BN; flashLoanTokenAccountInitial: BN; forceClose: number; group: PublicKey; indexLastUpdated: BN; indexedBorrows: I80F48Dto; indexedDeposits: I80F48Dto; initAssetWeight: I80F48Dto; initLiabWeight: I80F48Dto; lastNetBorrowsWindowStartTs: BN; liquidationFee: I80F48Dto; loanFeeRate: I80F48Dto; loanOriginationFeeRate: I80F48Dto; maintAssetWeight: I80F48Dto; maintLiabWeight: I80F48Dto; maxRate: I80F48Dto; minVaultToDepositsRatio: number; mint: PublicKey; mintDecimals: number; name: number[]; netBorrowLimitPerWindowQuote: BN; netBorrowLimitWindowSizeTs: BN; netBorrowsInWindow: BN; oracle: PublicKey; oracleConfig: OracleConfigDto; rate0: I80F48Dto; rate1: I80F48Dto; reduceOnly: number; stablePriceModel: StablePriceModel; tokenIndex: number; util0: I80F48Dto; util1: I80F48Dto; vault: PublicKey }): Bank

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Private property
  • Private method
  • Static property
  • Static method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +Bank | @blockworks-foundation/mango-v4
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Bank

Implements

Index

Constructors

  • new Bank(publicKey: PublicKey, group: PublicKey, name: number[], mint: PublicKey, vault: PublicKey, oracle: PublicKey, oracleConfig: OracleConfigDto, stablePriceModel: StablePriceModel, depositIndex: I80F48Dto, borrowIndex: I80F48Dto, indexedDeposits: I80F48Dto, indexedBorrows: I80F48Dto, indexLastUpdated: BN, bankRateLastUpdated: BN, avgUtilization: I80F48Dto, adjustmentFactor: I80F48Dto, util0: I80F48Dto, rate0: I80F48Dto, util1: I80F48Dto, rate1: I80F48Dto, maxRate: I80F48Dto, collectedFeesNative: I80F48Dto, loanOriginationFeeRate: I80F48Dto, loanFeeRate: I80F48Dto, maintAssetWeight: I80F48Dto, initAssetWeight: I80F48Dto, maintLiabWeight: I80F48Dto, initLiabWeight: I80F48Dto, liquidationFee: I80F48Dto, dust: I80F48Dto, flashLoanTokenAccountInitial: BN, flashLoanApprovedAmount: BN, tokenIndex: TokenIndex, mintDecimals: number, bankNum: number, minVaultToDepositsRatio: number, netBorrowLimitWindowSizeTs: BN, lastNetBorrowsWindowStartTs: BN, netBorrowLimitPerWindowQuote: BN, netBorrowsInWindow: BN, borrowWeightScaleStartQuote: number, depositWeightScaleStartQuote: number, reduceOnly: number, forceClose: boolean): Bank

Properties

_oracleLastUpdatedSlot: undefined | number
_oracleProvider: undefined | OracleProvider
_price: undefined | I80F48
_uiPrice: undefined | number
adjustmentFactor: I80F48
avgUtilization: I80F48
bankNum: number
bankRateLastUpdated: BN
borrowIndex: I80F48
borrowWeightScaleStartQuote: number
collectedFeesNative: I80F48
depositIndex: I80F48
depositWeightScaleStartQuote: number
dust: I80F48
forceClose: boolean
group: PublicKey
indexLastUpdated: BN
indexedBorrows: I80F48
indexedDeposits: I80F48
initAssetWeight: I80F48
initLiabWeight: I80F48
lastNetBorrowsWindowStartTs: BN
liquidationFee: I80F48
loanFeeRate: I80F48
loanOriginationFeeRate: I80F48
maintAssetWeight: I80F48
maintLiabWeight: I80F48
maxRate: I80F48
minVaultToDepositsRatio: number
mint: PublicKey
mintDecimals: number
name: string
netBorrowLimitPerWindowQuote: BN
netBorrowLimitWindowSizeTs: BN
netBorrowsInWindow: BN
oracle: PublicKey
oracleConfig: OracleConfig
publicKey: PublicKey
rate0: I80F48
rate1: I80F48
reduceOnly: number
stablePriceModel: StablePriceModel
tokenIndex: TokenIndex
util0: I80F48
util1: I80F48
vault: PublicKey

Accessors

  • get oracleLastUpdatedSlot(): number
  • get uiPrice(): number

Methods

  • areBorrowsReduceOnly(): boolean
  • areDepositsReduceOnly(): boolean
  • getBorrowRateUi(): number
  • getDepositRateUi(): number
  • toString(): string
  • uiBorrows(): number
  • uiDeposits(): number
  • from(publicKey: PublicKey, obj: { adjustmentFactor: I80F48Dto; avgUtilization: I80F48Dto; bankNum: number; bankRateLastUpdated: BN; borrowIndex: I80F48Dto; borrowWeightScaleStartQuote: number; collectedFeesNative: I80F48Dto; depositIndex: I80F48Dto; depositWeightScaleStartQuote: number; dust: I80F48Dto; flashLoanApprovedAmount: BN; flashLoanTokenAccountInitial: BN; forceClose: number; group: PublicKey; indexLastUpdated: BN; indexedBorrows: I80F48Dto; indexedDeposits: I80F48Dto; initAssetWeight: I80F48Dto; initLiabWeight: I80F48Dto; lastNetBorrowsWindowStartTs: BN; liquidationFee: I80F48Dto; loanFeeRate: I80F48Dto; loanOriginationFeeRate: I80F48Dto; maintAssetWeight: I80F48Dto; maintLiabWeight: I80F48Dto; maxRate: I80F48Dto; minVaultToDepositsRatio: number; mint: PublicKey; mintDecimals: number; name: number[]; netBorrowLimitPerWindowQuote: BN; netBorrowLimitWindowSizeTs: BN; netBorrowsInWindow: BN; oracle: PublicKey; oracleConfig: OracleConfigDto; rate0: I80F48Dto; rate1: I80F48Dto; reduceOnly: number; stablePriceModel: StablePriceModel; tokenIndex: number; util0: I80F48Dto; util1: I80F48Dto; vault: PublicKey }): Bank

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Private property
  • Private method
  • Static property
  • Static method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/ts/client/classes/BookSide.html b/ts/client/classes/BookSide.html index 7bcff0875..14589b659 100644 --- a/ts/client/classes/BookSide.html +++ b/ts/client/classes/BookSide.html @@ -1,7 +1,7 @@ -BookSide | @blockworks-foundation/mango-v4
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BookSide

Index

Constructors

Properties

client: MangoClient
now: BN
orderTreeNodes: OrderTreeNodes
perpMarket: PerpMarket
rootFixed: OrderTreeRoot
rootOraclePegged: OrderTreeRoot
INNER_NODE_TAG: number = 1
LEAF_NODE_TAG: number = 2

Methods

  • fixedItems(): Generator<PerpOrder, any, unknown>
  • getImpactPriceUi(baseLots: BN): undefined | number
  • getL2(depth: number): [number, number, BN, BN][]
  • getL2Ui(depth: number): [number, number][]
  • oraclePeggedItems(): Generator<PerpOrder, any, unknown>
  • getPriceFromKey(key: BN): BN

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Private property
  • Private method
  • Static property
  • Static method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/ts/client/classes/BookSideType.html b/ts/client/classes/BookSideType.html index c26a880dd..acbd2e086 100644 --- a/ts/client/classes/BookSideType.html +++ b/ts/client/classes/BookSideType.html @@ -1 +1 @@ -BookSideType | @blockworks-foundation/mango-v4
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BookSideType

Index

Constructors

Properties

Constructors

Properties

asks: { asks: {} } = ...

Type declaration

  • asks: {}
    bids: { bids: {} } = ...

    Type declaration

    • bids: {}

      Legend

      • Constructor
      • Property
      • Method
      • Property
      • Method
      • Private property
      • Private method
      • Static property
      • Static method

      Settings

      Theme

      Generated using TypeDoc

      \ No newline at end of file +BookSideType | @blockworks-foundation/mango-v4
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Hierarchy

      • BookSideType

      Index

      Constructors

      Properties

      Constructors

      Properties

      asks: { asks: {} } = ...

      Type declaration

      • asks: {}
        bids: { bids: {} } = ...

        Type declaration

        • bids: {}

          Legend

          • Constructor
          • Property
          • Method
          • Property
          • Method
          • Private property
          • Private method
          • Static property
          • Static method

          Settings

          Theme

          Generated using TypeDoc

          \ No newline at end of file diff --git a/ts/client/classes/FlashLoanType.html b/ts/client/classes/FlashLoanType.html index a3803a09b..f40d5c94c 100644 --- a/ts/client/classes/FlashLoanType.html +++ b/ts/client/classes/FlashLoanType.html @@ -1 +1 @@ -FlashLoanType | @blockworks-foundation/mango-v4
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Hierarchy

          • FlashLoanType

          Index

          Constructors

          Properties

          Constructors

          Properties

          swap: { swap: {} } = ...

          Type declaration

          • swap: {}
            unknown: { unknown: {} } = ...

            Type declaration

            • unknown: {}

              Legend

              • Constructor
              • Property
              • Method
              • Property
              • Method
              • Private property
              • Private method
              • Static property
              • Static method

              Settings

              Theme

              Generated using TypeDoc

              \ No newline at end of file +FlashLoanType | @blockworks-foundation/mango-v4
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Hierarchy

              • FlashLoanType

              Index

              Constructors

              Properties

              Constructors

              Properties

              swap: { swap: {} } = ...

              Type declaration

              • swap: {}
                unknown: { unknown: {} } = ...

                Type declaration

                • unknown: {}

                  Legend

                  • Constructor
                  • Property
                  • Method
                  • Property
                  • Method
                  • Private property
                  • Private method
                  • Static property
                  • Static method

                  Settings

                  Theme

                  Generated using TypeDoc

                  \ No newline at end of file diff --git a/ts/client/classes/FlashLoanWithdraw.html b/ts/client/classes/FlashLoanWithdraw.html index caf64f3be..7f15db2c7 100644 --- a/ts/client/classes/FlashLoanWithdraw.html +++ b/ts/client/classes/FlashLoanWithdraw.html @@ -1 +1 @@ -FlashLoanWithdraw | @blockworks-foundation/mango-v4
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Hierarchy

                  • FlashLoanWithdraw

                  Index

                  Constructors

                  Properties

                  Constructors

                  Properties

                  amount: BN
                  index: number

                  Legend

                  • Constructor
                  • Property
                  • Method
                  • Property
                  • Method
                  • Private property
                  • Private method
                  • Static property
                  • Static method

                  Settings

                  Theme

                  Generated using TypeDoc

                  \ No newline at end of file +FlashLoanWithdraw | @blockworks-foundation/mango-v4
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Hierarchy

                  • FlashLoanWithdraw

                  Index

                  Constructors

                  Properties

                  Constructors

                  Properties

                  amount: BN
                  index: number

                  Legend

                  • Constructor
                  • Property
                  • Method
                  • Property
                  • Method
                  • Private property
                  • Private method
                  • Static property
                  • Static method

                  Settings

                  Theme

                  Generated using TypeDoc

                  \ No newline at end of file diff --git a/ts/client/classes/Group.html b/ts/client/classes/Group.html index 5f8a329b2..6bdb0a100 100644 --- a/ts/client/classes/Group.html +++ b/ts/client/classes/Group.html @@ -1,2 +1,2 @@ -Group | @blockworks-foundation/mango-v4
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Hierarchy

                  • Group

                  Index

                  Constructors

                  • new Group(publicKey: PublicKey, creator: PublicKey, groupNum: number, admin: PublicKey, fastListingAdmin: PublicKey, mngoTokenIndex: TokenIndex, insuranceMint: PublicKey, insuranceVault: PublicKey, testing: number, version: number, buybackFees: boolean, buybackFeesMngoBonusFactor: number, addressLookupTables: PublicKey[], securityAdmin: PublicKey, depositLimitQuote: any, ixGate: BN, buybackFeesSwapMangoAccount: PublicKey, buybackFeesExpiryInterval: BN, addressLookupTablesList: AddressLookupTableAccount[], banksMapByName: Map<string, Bank[]>, banksMapByMint: Map<string, Bank[]>, banksMapByTokenIndex: Map<TokenIndex, Bank[]>, serum3MarketsMapByExternal: Map<string, Serum3Market>, serum3MarketsMapByMarketIndex: Map<MarketIndex, Serum3Market>, serum3ExternalMarketsMap: Map<string, Market>, perpMarketsMapByOracle: Map<string, PerpMarket>, perpMarketsMapByMarketIndex: Map<PerpMarketIndex, PerpMarket>, perpMarketsMapByName: Map<string, PerpMarket>, mintInfosMapByTokenIndex: Map<TokenIndex, MintInfo>, mintInfosMapByMint: Map<string, MintInfo>, vaultAmountsMap: Map<string, BN>): Group
                  • Parameters

                    • publicKey: PublicKey
                    • creator: PublicKey
                    • groupNum: number
                    • admin: PublicKey
                    • fastListingAdmin: PublicKey
                    • mngoTokenIndex: TokenIndex
                    • insuranceMint: PublicKey
                    • insuranceVault: PublicKey
                    • testing: number
                    • version: number
                    • buybackFees: boolean
                    • buybackFeesMngoBonusFactor: number
                    • addressLookupTables: PublicKey[]
                    • securityAdmin: PublicKey
                    • depositLimitQuote: any
                    • ixGate: BN
                    • buybackFeesSwapMangoAccount: PublicKey
                    • buybackFeesExpiryInterval: BN
                    • addressLookupTablesList: AddressLookupTableAccount[]
                    • banksMapByName: Map<string, Bank[]>
                    • banksMapByMint: Map<string, Bank[]>
                    • banksMapByTokenIndex: Map<TokenIndex, Bank[]>
                    • serum3MarketsMapByExternal: Map<string, Serum3Market>
                    • serum3MarketsMapByMarketIndex: Map<MarketIndex, Serum3Market>
                    • serum3ExternalMarketsMap: Map<string, Market>
                    • perpMarketsMapByOracle: Map<string, PerpMarket>
                    • perpMarketsMapByMarketIndex: Map<PerpMarketIndex, PerpMarket>
                    • perpMarketsMapByName: Map<string, PerpMarket>
                    • mintInfosMapByTokenIndex: Map<TokenIndex, MintInfo>
                    • mintInfosMapByMint: Map<string, MintInfo>
                    • vaultAmountsMap: Map<string, BN>

                    Returns Group

                  Properties

                  addressLookupTables: PublicKey[]
                  addressLookupTablesList: AddressLookupTableAccount[]
                  admin: PublicKey
                  banksMapByMint: Map<string, Bank[]>
                  banksMapByName: Map<string, Bank[]>
                  banksMapByTokenIndex: Map<TokenIndex, Bank[]>
                  buybackFees: boolean
                  buybackFeesExpiryInterval: BN
                  buybackFeesMngoBonusFactor: number
                  buybackFeesSwapMangoAccount: PublicKey
                  creator: PublicKey
                  depositLimitQuote: any
                  fastListingAdmin: PublicKey
                  groupNum: number
                  insuranceMint: PublicKey
                  insuranceVault: PublicKey
                  ixGate: BN
                  mintInfosMapByMint: Map<string, MintInfo>
                  mintInfosMapByTokenIndex: Map<TokenIndex, MintInfo>
                  mngoTokenIndex: TokenIndex
                  perpMarketsMapByMarketIndex: Map<PerpMarketIndex, PerpMarket>
                  perpMarketsMapByName: Map<string, PerpMarket>
                  perpMarketsMapByOracle: Map<string, PerpMarket>
                  publicKey: PublicKey
                  securityAdmin: PublicKey
                  serum3ExternalMarketsMap: Map<string, Market>
                  serum3MarketsMapByExternal: Map<string, Serum3Market>
                  serum3MarketsMapByMarketIndex: Map<MarketIndex, Serum3Market>
                  testing: number
                  vaultAmountsMap: Map<string, BN>
                  version: number

                  Methods

                  • consoleLogBanks(): void
                  • decodePriceFromOracleAi(coder: BorshAccountsCoder<string>, oracle: PublicKey, ai: AccountInfo<Buffer>, baseDecimals: number, client: MangoClient): Promise<{ lastUpdatedSlot: number; price: I80F48; provider: OracleProvider; uiPrice: number }>
                  • getFirstBankByMint(mintPk: PublicKey): Bank
                  • getFirstBankForMngo(): Bank
                  • getFirstBankForPerpSettlement(): Bank
                  • getInsuranceMintDecimals(): number
                  • getMintDecimals(mintPk: PublicKey): number
                  • getMintDecimalsByTokenIndex(tokenIndex: TokenIndex): number
                  • getPerpMarketByName(perpMarketName: string): PerpMarket
                  • getPerpMarketByOracle(oracle: PublicKey): PerpMarket
                  • getSerum3ExternalMarket(externalMarketPk: PublicKey): Market
                  • getSerum3MarketByExternalMarket(externalMarketPk: PublicKey): Serum3Market
                  • getSerum3MarketByMarketIndex(marketIndex: MarketIndex): Serum3Market
                  • getTokenVaultBalanceByMintUi(mintPk: PublicKey): number
                  • Parameters

                    • mintPk: PublicKey

                    Returns number

                    sum of ui balances of vaults for all banks for a token

                    -
                  • loadSerum3AsksForMarket(client: MangoClient, externalMarketPk: PublicKey): Promise<Orderbook>
                  • loadSerum3BidsForMarket(client: MangoClient, externalMarketPk: PublicKey): Promise<Orderbook>
                  • reloadBankOraclePrices(client: MangoClient): Promise<void>
                  • reloadBanks(client: MangoClient, ids?: Id): Promise<void>
                  • reloadMintInfos(client: MangoClient, ids?: Id): Promise<void>
                  • reloadPerpMarketOraclePrices(client: MangoClient): Promise<void>
                  • reloadPerpMarkets(client: MangoClient, ids?: Id): Promise<void>
                  • reloadSerum3ExternalMarkets(client: MangoClient): Promise<void>
                  • reloadSerum3Markets(client: MangoClient, ids?: Id): Promise<void>
                  • toNativeDecimals(uiAmount: number, mintPk: PublicKey): BN
                  • toNativePrice(uiPrice: number, baseDecimals: number): I80F48
                  • toString(): string
                  • toUiPrice(price: number | I80F48, baseDecimals: number): number
                  • from(publicKey: PublicKey, obj: { addressLookupTables: PublicKey[]; admin: PublicKey; buybackFees: number; buybackFeesExpiryInterval: BN; buybackFeesMngoBonusFactor: number; buybackFeesSwapMangoAccount: PublicKey; creator: PublicKey; depositLimitQuote: BN; fastListingAdmin: PublicKey; groupNum: number; insuranceMint: PublicKey; insuranceVault: PublicKey; ixGate: BN; mngoTokenIndex: number; securityAdmin: PublicKey; testing: number; version: number }): Group
                  • Parameters

                    • publicKey: PublicKey
                    • obj: { addressLookupTables: PublicKey[]; admin: PublicKey; buybackFees: number; buybackFeesExpiryInterval: BN; buybackFeesMngoBonusFactor: number; buybackFeesSwapMangoAccount: PublicKey; creator: PublicKey; depositLimitQuote: BN; fastListingAdmin: PublicKey; groupNum: number; insuranceMint: PublicKey; insuranceVault: PublicKey; ixGate: BN; mngoTokenIndex: number; securityAdmin: PublicKey; testing: number; version: number }
                      • addressLookupTables: PublicKey[]
                      • admin: PublicKey
                      • buybackFees: number
                      • buybackFeesExpiryInterval: BN
                      • buybackFeesMngoBonusFactor: number
                      • buybackFeesSwapMangoAccount: PublicKey
                      • creator: PublicKey
                      • depositLimitQuote: BN
                      • fastListingAdmin: PublicKey
                      • groupNum: number
                      • insuranceMint: PublicKey
                      • insuranceVault: PublicKey
                      • ixGate: BN
                      • mngoTokenIndex: number
                      • securityAdmin: PublicKey
                      • testing: number
                      • version: number

                    Returns Group

                  Legend

                  • Constructor
                  • Property
                  • Method
                  • Property
                  • Method
                  • Private property
                  • Private method
                  • Static property
                  • Static method

                  Settings

                  Theme

                  Generated using TypeDoc

                  \ No newline at end of file +Group | @blockworks-foundation/mango-v4
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Hierarchy

                  • Group

                  Index

                  Constructors

                  • new Group(publicKey: PublicKey, creator: PublicKey, groupNum: number, admin: PublicKey, fastListingAdmin: PublicKey, mngoTokenIndex: TokenIndex, insuranceMint: PublicKey, insuranceVault: PublicKey, testing: number, version: number, buybackFees: boolean, buybackFeesMngoBonusFactor: number, addressLookupTables: PublicKey[], securityAdmin: PublicKey, depositLimitQuote: any, ixGate: BN, buybackFeesSwapMangoAccount: PublicKey, buybackFeesExpiryInterval: BN, addressLookupTablesList: AddressLookupTableAccount[], banksMapByName: Map<string, Bank[]>, banksMapByMint: Map<string, Bank[]>, banksMapByTokenIndex: Map<TokenIndex, Bank[]>, serum3MarketsMapByExternal: Map<string, Serum3Market>, serum3MarketsMapByMarketIndex: Map<MarketIndex, Serum3Market>, serum3ExternalMarketsMap: Map<string, Market>, perpMarketsMapByOracle: Map<string, PerpMarket>, perpMarketsMapByMarketIndex: Map<PerpMarketIndex, PerpMarket>, perpMarketsMapByName: Map<string, PerpMarket>, mintInfosMapByTokenIndex: Map<TokenIndex, MintInfo>, mintInfosMapByMint: Map<string, MintInfo>, vaultAmountsMap: Map<string, BN>): Group
                  • Parameters

                    • publicKey: PublicKey
                    • creator: PublicKey
                    • groupNum: number
                    • admin: PublicKey
                    • fastListingAdmin: PublicKey
                    • mngoTokenIndex: TokenIndex
                    • insuranceMint: PublicKey
                    • insuranceVault: PublicKey
                    • testing: number
                    • version: number
                    • buybackFees: boolean
                    • buybackFeesMngoBonusFactor: number
                    • addressLookupTables: PublicKey[]
                    • securityAdmin: PublicKey
                    • depositLimitQuote: any
                    • ixGate: BN
                    • buybackFeesSwapMangoAccount: PublicKey
                    • buybackFeesExpiryInterval: BN
                    • addressLookupTablesList: AddressLookupTableAccount[]
                    • banksMapByName: Map<string, Bank[]>
                    • banksMapByMint: Map<string, Bank[]>
                    • banksMapByTokenIndex: Map<TokenIndex, Bank[]>
                    • serum3MarketsMapByExternal: Map<string, Serum3Market>
                    • serum3MarketsMapByMarketIndex: Map<MarketIndex, Serum3Market>
                    • serum3ExternalMarketsMap: Map<string, Market>
                    • perpMarketsMapByOracle: Map<string, PerpMarket>
                    • perpMarketsMapByMarketIndex: Map<PerpMarketIndex, PerpMarket>
                    • perpMarketsMapByName: Map<string, PerpMarket>
                    • mintInfosMapByTokenIndex: Map<TokenIndex, MintInfo>
                    • mintInfosMapByMint: Map<string, MintInfo>
                    • vaultAmountsMap: Map<string, BN>

                    Returns Group

                  Properties

                  addressLookupTables: PublicKey[]
                  addressLookupTablesList: AddressLookupTableAccount[]
                  admin: PublicKey
                  banksMapByMint: Map<string, Bank[]>
                  banksMapByName: Map<string, Bank[]>
                  banksMapByTokenIndex: Map<TokenIndex, Bank[]>
                  buybackFees: boolean
                  buybackFeesExpiryInterval: BN
                  buybackFeesMngoBonusFactor: number
                  buybackFeesSwapMangoAccount: PublicKey
                  creator: PublicKey
                  depositLimitQuote: any
                  fastListingAdmin: PublicKey
                  groupNum: number
                  insuranceMint: PublicKey
                  insuranceVault: PublicKey
                  ixGate: BN
                  mintInfosMapByMint: Map<string, MintInfo>
                  mintInfosMapByTokenIndex: Map<TokenIndex, MintInfo>
                  mngoTokenIndex: TokenIndex
                  perpMarketsMapByMarketIndex: Map<PerpMarketIndex, PerpMarket>
                  perpMarketsMapByName: Map<string, PerpMarket>
                  perpMarketsMapByOracle: Map<string, PerpMarket>
                  publicKey: PublicKey
                  securityAdmin: PublicKey
                  serum3ExternalMarketsMap: Map<string, Market>
                  serum3MarketsMapByExternal: Map<string, Serum3Market>
                  serum3MarketsMapByMarketIndex: Map<MarketIndex, Serum3Market>
                  testing: number
                  vaultAmountsMap: Map<string, BN>
                  version: number

                  Methods

                  • consoleLogBanks(): void
                  • decodePriceFromOracleAi(coder: BorshAccountsCoder<string>, oracle: PublicKey, ai: AccountInfo<Buffer>, baseDecimals: number, client: MangoClient): Promise<{ lastUpdatedSlot: number; price: I80F48; provider: OracleProvider; uiPrice: number }>
                  • getFirstBankByMint(mintPk: PublicKey): Bank
                  • getFirstBankForMngo(): Bank
                  • getFirstBankForPerpSettlement(): Bank
                  • getInsuranceMintDecimals(): number
                  • getMintDecimals(mintPk: PublicKey): number
                  • getMintDecimalsByTokenIndex(tokenIndex: TokenIndex): number
                  • getPerpMarketByName(perpMarketName: string): PerpMarket
                  • getPerpMarketByOracle(oracle: PublicKey): PerpMarket
                  • getSerum3ExternalMarket(externalMarketPk: PublicKey): Market
                  • getSerum3MarketByExternalMarket(externalMarketPk: PublicKey): Serum3Market
                  • getSerum3MarketByMarketIndex(marketIndex: MarketIndex): Serum3Market
                  • getTokenVaultBalanceByMintUi(mintPk: PublicKey): number
                  • Parameters

                    • mintPk: PublicKey

                    Returns number

                    sum of ui balances of vaults for all banks for a token

                    +
                  • loadSerum3AsksForMarket(client: MangoClient, externalMarketPk: PublicKey): Promise<Orderbook>
                  • loadSerum3BidsForMarket(client: MangoClient, externalMarketPk: PublicKey): Promise<Orderbook>
                  • reloadBankOraclePrices(client: MangoClient): Promise<void>
                  • reloadBanks(client: MangoClient, ids?: Id): Promise<void>
                  • reloadMintInfos(client: MangoClient, ids?: Id): Promise<void>
                  • reloadPerpMarketOraclePrices(client: MangoClient): Promise<void>
                  • reloadPerpMarkets(client: MangoClient, ids?: Id): Promise<void>
                  • reloadSerum3ExternalMarkets(client: MangoClient): Promise<void>
                  • reloadSerum3Markets(client: MangoClient, ids?: Id): Promise<void>
                  • toNativeDecimals(uiAmount: number, mintPk: PublicKey): BN
                  • toNativePrice(uiPrice: number, baseDecimals: number): I80F48
                  • toString(): string
                  • toUiPrice(price: number | I80F48, baseDecimals: number): number
                  • from(publicKey: PublicKey, obj: { addressLookupTables: PublicKey[]; admin: PublicKey; buybackFees: number; buybackFeesExpiryInterval: BN; buybackFeesMngoBonusFactor: number; buybackFeesSwapMangoAccount: PublicKey; creator: PublicKey; depositLimitQuote: BN; fastListingAdmin: PublicKey; groupNum: number; insuranceMint: PublicKey; insuranceVault: PublicKey; ixGate: BN; mngoTokenIndex: number; securityAdmin: PublicKey; testing: number; version: number }): Group
                  • Parameters

                    • publicKey: PublicKey
                    • obj: { addressLookupTables: PublicKey[]; admin: PublicKey; buybackFees: number; buybackFeesExpiryInterval: BN; buybackFeesMngoBonusFactor: number; buybackFeesSwapMangoAccount: PublicKey; creator: PublicKey; depositLimitQuote: BN; fastListingAdmin: PublicKey; groupNum: number; insuranceMint: PublicKey; insuranceVault: PublicKey; ixGate: BN; mngoTokenIndex: number; securityAdmin: PublicKey; testing: number; version: number }
                      • addressLookupTables: PublicKey[]
                      • admin: PublicKey
                      • buybackFees: number
                      • buybackFeesExpiryInterval: BN
                      • buybackFeesMngoBonusFactor: number
                      • buybackFeesSwapMangoAccount: PublicKey
                      • creator: PublicKey
                      • depositLimitQuote: BN
                      • fastListingAdmin: PublicKey
                      • groupNum: number
                      • insuranceMint: PublicKey
                      • insuranceVault: PublicKey
                      • ixGate: BN
                      • mngoTokenIndex: number
                      • securityAdmin: PublicKey
                      • testing: number
                      • version: number

                    Returns Group

                  Legend

                  • Constructor
                  • Property
                  • Method
                  • Property
                  • Method
                  • Private property
                  • Private method
                  • Static property
                  • Static method

                  Settings

                  Theme

                  Generated using TypeDoc

                  \ No newline at end of file diff --git a/ts/client/classes/HealthType.html b/ts/client/classes/HealthType.html index 4b3b395bf..6c7df4dd9 100644 --- a/ts/client/classes/HealthType.html +++ b/ts/client/classes/HealthType.html @@ -1 +1 @@ -HealthType | @blockworks-foundation/mango-v4
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Hierarchy

                  • HealthType

                  Index

                  Constructors

                  Properties

                  init: { init: {} } = ...

                  Type declaration

                  • init: {}
                    liquidationEnd: { liquidationEnd: {} } = ...

                    Type declaration

                    • liquidationEnd: {}
                      maint: { maint: {} } = ...

                      Type declaration

                      • maint: {}

                        Legend

                        • Constructor
                        • Property
                        • Method
                        • Property
                        • Method
                        • Private property
                        • Private method
                        • Static property
                        • Static method

                        Settings

                        Theme

                        Generated using TypeDoc

                        \ No newline at end of file +HealthType | @blockworks-foundation/mango-v4
                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Hierarchy

                        • HealthType

                        Index

                        Constructors

                        Properties

                        init: { init: {} } = ...

                        Type declaration

                        • init: {}
                          liquidationEnd: { liquidationEnd: {} } = ...

                          Type declaration

                          • liquidationEnd: {}
                            maint: { maint: {} } = ...

                            Type declaration

                            • maint: {}

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/I80F48.html b/ts/client/classes/I80F48.html index 82188fea4..9b4a1ec1d 100644 --- a/ts/client/classes/I80F48.html +++ b/ts/client/classes/I80F48.html @@ -1,11 +1,11 @@ -I80F48 | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • I80F48

                              Index

                              Constructors

                              Properties

                              data: BN
                              FRACTIONS: number = 48
                              MAX_BN: BN = ...
                              MAX_SIZE: number = 128
                              +I80F48 | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • I80F48

                              Index

                              Constructors

                              Properties

                              data: BN
                              FRACTIONS: number = 48
                              MAX_BN: BN = ...
                              MAX_SIZE: number = 128

                              This is represented by a 128 bit signed integer underneath The first 80 bits are treated as an integer and last 48 bits are treated as fractional part after binary point It's possible to think of an I80F48 as an i128 divided by 2 ^ 40

                              Read up on how fixed point math works: https://inst.eecs.berkeley.edu/~cs61c/sp06/handout/fixedpt.html Read up on how 2s complement works: https://en.wikipedia.org/wiki/Two%27s_complement

                              -
                              MIN_BN: BN = ...
                              MULTIPLIER_BIG: any = ...
                              MULTIPLIER_BN: BN = ...
                              MULTIPLIER_NUMBER: number = ...

                              Methods

                              • getBinaryLayout(): string
                              • getData(): BN
                              • isNeg(): boolean
                              • isPos(): boolean
                              • isZero(): boolean
                              MIN_BN: BN = ...
                              MULTIPLIER_BIG: any = ...
                              MULTIPLIER_BN: BN = ...
                              MULTIPLIER_NUMBER: number = ...

                              Methods

                              • getBinaryLayout(): string
                              • getData(): BN
                              • isNeg(): boolean
                              • isPos(): boolean
                              • isZero(): boolean
                              • toArray(): Uint8Array
                              • toArrayLike(ArrayType: BufferConstructor, endian?: Endianness, length?: number): Buffer
                              • Parameters

                                • ArrayType: BufferConstructor
                                • Optional endian: Endianness
                                • Optional length: number

                                Returns Buffer

                              • toBig(): Big
                              • toFixed(decimals?: number): string
                              • toArray(): Uint8Array
                              • toArrayLike(ArrayType: BufferConstructor, endian?: Endianness, length?: number): Buffer
                              • Parameters

                                • ArrayType: BufferConstructor
                                • Optional endian: Endianness
                                • Optional length: number

                                Returns Buffer

                              • toBig(): Big
                              • toFixed(decimals?: number): string
                              • The number will be rounded first for UI sensibilities, then toFixed

                                -

                                Parameters

                                • Optional decimals: number

                                Returns string

                              • toLocaleString(locales?: string | string[], options?: NumberFormatOptions): string
                              • Parameters

                                • Optional locales: string | string[]
                                • Optional options: NumberFormatOptions

                                Returns string

                              • toNumber(): number
                              • toString(): string
                              • toTwos(): BN
                              • fromArray(src: Uint8Array): I80F48
                              • fromNumberOrUndef(x?: number): undefined | I80F48
                              • fromOptionalString(x?: string): undefined | I80F48

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file +

                              Parameters

                              • Optional decimals: number

                              Returns string

                              • toLocaleString(locales?: string | string[], options?: NumberFormatOptions): string
                              • Parameters

                                • Optional locales: string | string[]
                                • Optional options: NumberFormatOptions

                                Returns string

                              • toNumber(): number
                              • toString(): string
                              • toTwos(): BN
                              • fromArray(src: Uint8Array): I80F48
                              • fromNumberOrUndef(x?: number): undefined | I80F48
                              • fromOptionalString(x?: string): undefined | I80F48

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/I80F48Dto.html b/ts/client/classes/I80F48Dto.html index 7d7c863c7..72a1939aa 100644 --- a/ts/client/classes/I80F48Dto.html +++ b/ts/client/classes/I80F48Dto.html @@ -1 +1 @@ -I80F48Dto | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • I80F48Dto

                              Index

                              Constructors

                              Properties

                              Constructors

                              Properties

                              val: BN

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file +I80F48Dto | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • I80F48Dto

                              Index

                              Constructors

                              Properties

                              Constructors

                              Properties

                              val: BN

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/InnerNode.html b/ts/client/classes/InnerNode.html index 0920f1036..74481db3d 100644 --- a/ts/client/classes/InnerNode.html +++ b/ts/client/classes/InnerNode.html @@ -1 +1 @@ -InnerNode | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • InnerNode

                              Index

                              Constructors

                              Properties

                              Methods

                              Constructors

                              Properties

                              children: [number]

                              Methods

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file +InnerNode | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • InnerNode

                              Index

                              Constructors

                              Properties

                              Methods

                              Constructors

                              Properties

                              children: [number]

                              Methods

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/InterestRateParams.html b/ts/client/classes/InterestRateParams.html index c9e283450..23dff2730 100644 --- a/ts/client/classes/InterestRateParams.html +++ b/ts/client/classes/InterestRateParams.html @@ -1 +1 @@ -InterestRateParams | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • InterestRateParams

                              Index

                              Constructors

                              Properties

                              adjustmentFactor: number
                              maxRate: number
                              rate0: number
                              rate1: number
                              util0: number
                              util1: number

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file +InterestRateParams | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • InterestRateParams

                              Index

                              Constructors

                              Properties

                              adjustmentFactor: number
                              maxRate: number
                              rate0: number
                              rate1: number
                              util0: number
                              util1: number

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/LeafNode.html b/ts/client/classes/LeafNode.html index cc71f9b81..6e65d59fd 100644 --- a/ts/client/classes/LeafNode.html +++ b/ts/client/classes/LeafNode.html @@ -1 +1 @@ -LeafNode | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • LeafNode

                              Index

                              Constructors

                              • new LeafNode(ownerSlot: number, orderType: PerpOrderType, timeInForce: number, key: BN, owner: PublicKey, quantity: BN, timestamp: BN, pegLimit: BN): LeafNode

                              Properties

                              key: BN
                              orderType: PerpOrderType
                              owner: PublicKey
                              ownerSlot: number
                              pegLimit: BN
                              quantity: BN
                              timeInForce: number
                              timestamp: BN

                              Methods

                              • from(obj: { key: BN; orderType: PerpOrderType; owner: PublicKey; ownerSlot: number; pegLimit: BN; quantity: BN; timeInForce: number; timestamp: BN }): LeafNode
                              • Parameters

                                • obj: { key: BN; orderType: PerpOrderType; owner: PublicKey; ownerSlot: number; pegLimit: BN; quantity: BN; timeInForce: number; timestamp: BN }
                                  • key: BN
                                  • orderType: PerpOrderType
                                  • owner: PublicKey
                                  • ownerSlot: number
                                  • pegLimit: BN
                                  • quantity: BN
                                  • timeInForce: number
                                  • timestamp: BN

                                Returns LeafNode

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file +LeafNode | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • LeafNode

                              Index

                              Constructors

                              • new LeafNode(ownerSlot: number, orderType: PerpOrderType, timeInForce: number, key: BN, owner: PublicKey, quantity: BN, timestamp: BN, pegLimit: BN): LeafNode

                              Properties

                              key: BN
                              orderType: PerpOrderType
                              owner: PublicKey
                              ownerSlot: number
                              pegLimit: BN
                              quantity: BN
                              timeInForce: number
                              timestamp: BN

                              Methods

                              • from(obj: { key: BN; orderType: PerpOrderType; owner: PublicKey; ownerSlot: number; pegLimit: BN; quantity: BN; timeInForce: number; timestamp: BN }): LeafNode
                              • Parameters

                                • obj: { key: BN; orderType: PerpOrderType; owner: PublicKey; ownerSlot: number; pegLimit: BN; quantity: BN; timeInForce: number; timestamp: BN }
                                  • key: BN
                                  • orderType: PerpOrderType
                                  • owner: PublicKey
                                  • ownerSlot: number
                                  • pegLimit: BN
                                  • quantity: BN
                                  • timeInForce: number
                                  • timestamp: BN

                                Returns LeafNode

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/MangoAccount.html b/ts/client/classes/MangoAccount.html index b84741178..482687eb3 100644 --- a/ts/client/classes/MangoAccount.html +++ b/ts/client/classes/MangoAccount.html @@ -1,68 +1,68 @@ -MangoAccount | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • MangoAccount

                              Index

                              Constructors

                              • new MangoAccount(publicKey: PublicKey, group: PublicKey, owner: PublicKey, name: number[], delegate: PublicKey, accountNum: number, beingLiquidated: boolean, inHealthRegion: boolean, netDeposits: BN, perpSpotTransfers: BN, healthRegionBeginInitHealth: BN, frozenUntil: BN, buybackFeesAccruedCurrent: BN, buybackFeesAccruedPrevious: BN, buybackFeesExpiryTimestamp: BN, headerVersion: number, tokens: TokenPositionDto[], serum3: Serum3PositionDto[], perps: PerpPositionDto[], perpOpenOrders: PerpOoDto[], serum3OosMapByMarketIndex: Map<number, OpenOrders>): MangoAccount
                              • Parameters

                                • publicKey: PublicKey
                                • group: PublicKey
                                • owner: PublicKey
                                • name: number[]
                                • delegate: PublicKey
                                • accountNum: number
                                • beingLiquidated: boolean
                                • inHealthRegion: boolean
                                • netDeposits: BN
                                • perpSpotTransfers: BN
                                • healthRegionBeginInitHealth: BN
                                • frozenUntil: BN
                                • buybackFeesAccruedCurrent: BN
                                • buybackFeesAccruedPrevious: BN
                                • buybackFeesExpiryTimestamp: BN
                                • headerVersion: number
                                • tokens: TokenPositionDto[]
                                • serum3: Serum3PositionDto[]
                                • perps: PerpPositionDto[]
                                • perpOpenOrders: PerpOoDto[]
                                • serum3OosMapByMarketIndex: Map<number, OpenOrders>

                                Returns MangoAccount

                              Properties

                              accountNum: number
                              beingLiquidated: boolean
                              buybackFeesAccruedCurrent: BN
                              buybackFeesAccruedPrevious: BN
                              buybackFeesExpiryTimestamp: BN
                              delegate: PublicKey
                              frozenUntil: BN
                              group: PublicKey
                              headerVersion: number
                              healthRegionBeginInitHealth: BN
                              inHealthRegion: boolean
                              name: string
                              netDeposits: BN
                              owner: PublicKey
                              perpOpenOrders: PerpOo[]
                              perpSpotTransfers: BN
                              perps: PerpPosition[]
                              publicKey: PublicKey
                              serum3: Serum3Orders[]
                              serum3OosMapByMarketIndex: Map<number, OpenOrders>
                              tokens: TokenPosition[]

                              Methods

                              • toString(group?: Group, onlyTokens?: boolean): string
                              • from(publicKey: PublicKey, obj: { accountNum: number; beingLiquidated: number; buybackFeesAccruedCurrent: BN; buybackFeesAccruedPrevious: BN; buybackFeesExpiryTimestamp: BN; delegate: PublicKey; frozenUntil: BN; group: PublicKey; headerVersion: number; healthRegionBeginInitHealth: BN; inHealthRegion: number; name: number[]; netDeposits: BN; owner: PublicKey; perpOpenOrders: unknown; perpSpotTransfers: BN; perps: unknown; serum3: unknown; tokens: unknown }): MangoAccount
                              • Parameters

                                • publicKey: PublicKey
                                • obj: { accountNum: number; beingLiquidated: number; buybackFeesAccruedCurrent: BN; buybackFeesAccruedPrevious: BN; buybackFeesExpiryTimestamp: BN; delegate: PublicKey; frozenUntil: BN; group: PublicKey; headerVersion: number; healthRegionBeginInitHealth: BN; inHealthRegion: number; name: number[]; netDeposits: BN; owner: PublicKey; perpOpenOrders: unknown; perpSpotTransfers: BN; perps: unknown; serum3: unknown; tokens: unknown }
                                  • accountNum: number
                                  • beingLiquidated: number
                                  • buybackFeesAccruedCurrent: BN
                                  • buybackFeesAccruedPrevious: BN
                                  • buybackFeesExpiryTimestamp: BN
                                  • delegate: PublicKey
                                  • frozenUntil: BN
                                  • group: PublicKey
                                  • headerVersion: number
                                  • healthRegionBeginInitHealth: BN
                                  • inHealthRegion: number
                                  • name: number[]
                                  • netDeposits: BN
                                  • owner: PublicKey
                                  • perpOpenOrders: unknown
                                  • perpSpotTransfers: BN
                                  • perps: unknown
                                  • serum3: unknown
                                  • tokens: unknown

                                Returns MangoAccount

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/MangoClient.html b/ts/client/classes/MangoClient.html index bc520e312..55297de30 100644 --- a/ts/client/classes/MangoClient.html +++ b/ts/client/classes/MangoClient.html @@ -1,4 +1,4 @@ -MangoClient | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • MangoClient

                              Index

                              Constructors

                              Properties

                              Accessors

                              Methods

                              Constructors

                              • new MangoClient(program: Program<MangoV4>, programId: PublicKey, cluster: Cluster, opts?: MangoClientOptions): MangoClient
                              • Parameters

                                • program: Program<MangoV4>
                                • programId: PublicKey
                                • cluster: Cluster
                                • opts: MangoClientOptions = {}

                                Returns MangoClient

                              Properties

                              cluster: Cluster
                              idsSource: IdsSource
                              openbookFeesToDao: boolean
                              opts: MangoClientOptions = {}
                              postSendTxCallback?: (__namedParameters: Object) => void

                              Type declaration

                                • (__namedParameters: Object): void
                                • Parameters

                                  • __namedParameters: Object

                                  Returns void

                              prioritizationFee: number
                              program: Program<MangoV4>
                              programId: PublicKey
                              txConfirmationCommitment: Commitment

                              Accessors

                              • get connection(): Connection
                              • get walletPk(): PublicKey

                              Methods

                              • accountBuybackFeesWithMngo(group: Group, mangoAccount: MangoAccount, maxBuyback?: number): Promise<string>
                              • accountBuybackFeesWithMngoIx(group: Group, mangoAccount: MangoAccount, maxBuybackUsd?: number): Promise<TransactionInstruction>
                              • altExtend(group: Group, addressLookupTable: PublicKey, index: number, pks: PublicKey[]): Promise<string>
                              • Parameters

                                • group: Group
                                • addressLookupTable: PublicKey
                                • index: number
                                • pks: PublicKey[]

                                Returns Promise<string>

                              • altSet(group: Group, addressLookupTable: PublicKey, index: number): Promise<string>
                              • Parameters

                                • group: Group
                                • addressLookupTable: PublicKey
                                • index: number

                                Returns Promise<string>

                              • closeMangoAccount(group: Group, mangoAccount: MangoAccount, forceClose?: boolean): Promise<string>

                              Returns PublicKey[]

                              • closeMangoAccount(group: Group, mangoAccount: MangoAccount, forceClose?: boolean): Promise<string>
                              • Note: this ix doesn't settle liabs, reduce open positions, or withdraw tokens to wallet, it simply closes the account. To close successfully ensure all positions are closed, or use forceClose flag

                                -

                                Parameters

                                Returns Promise<string>

                              • createAndFetchMangoAccount(group: Group, accountNumber?: number, name?: string, tokenCount?: number, serum3Count?: number, perpCount?: number, perpOoCount?: number, loadSerum3Oo?: boolean): Promise<undefined | MangoAccount>
                              • Parameters

                                • group: Group
                                • Optional accountNumber: number
                                • Optional name: string
                                • Optional tokenCount: number
                                • Optional serum3Count: number
                                • Optional perpCount: number
                                • Optional perpOoCount: number
                                • loadSerum3Oo: boolean = false

                                Returns Promise<undefined | MangoAccount>

                              • createMangoAccount(group: Group, accountNumber?: number, name?: string, tokenCount?: number, serum3Count?: number, perpCount?: number, perpOoCount?: number): Promise<string>
                              • Parameters

                                • group: Group
                                • Optional accountNumber: number
                                • Optional name: string
                                • Optional tokenCount: number
                                • Optional serum3Count: number
                                • Optional perpCount: number
                                • Optional perpOoCount: number

                                Returns Promise<string>

                              • editMangoAccount(group: Group, mangoAccount: MangoAccount, name?: string, delegate?: PublicKey): Promise<string>
                              • expandMangoAccount(group: Group, account: MangoAccount, tokenCount: number, serum3Count: number, perpCount: number, perpOoCount: number): Promise<string>
                              • Parameters

                                • group: Group
                                • account: MangoAccount
                                • tokenCount: number
                                • serum3Count: number
                                • perpCount: number
                                • perpOoCount: number

                                Returns Promise<string>

                              • getBanksForGroup(group: Group): Promise<Bank[]>
                              • getGroup(groupPk: PublicKey): Promise<Group>
                              • getGroupForCreator(creatorPk: PublicKey, groupNum: number): Promise<Group>
                              • Parameters

                                • creatorPk: PublicKey
                                • groupNum: number

                                Returns Promise<Group>

                              • getGroupsForCreator(creatorPk: PublicKey): Promise<Group[]>
                              • getIds(groupPk: PublicKey): Promise<undefined | Id>
                              • Parameters

                                • groupPk: PublicKey

                                Returns Promise<undefined | Id>

                              • getMangoAccountForOwner(group: Group, ownerPk: PublicKey, accountNumber: number, loadSerum3Oo?: boolean): Promise<undefined | MangoAccount>
                              • Parameters

                                • group: Group
                                • ownerPk: PublicKey
                                • accountNumber: number
                                • loadSerum3Oo: boolean = false

                                Returns Promise<undefined | MangoAccount>

                              • getMangoAccountWithSlot(mangoAccountPk: PublicKey, loadSerum3Oo?: boolean): Promise<undefined | { slot: number; value: MangoAccount }>
                              • Parameters

                                • mangoAccountPk: PublicKey
                                • loadSerum3Oo: boolean = false

                                Returns Promise<undefined | { slot: number; value: MangoAccount }>

                              • getMangoAccountsForDelegate(group: Group, delegate: PublicKey, loadSerum3Oo?: boolean): Promise<MangoAccount[]>
                              • getMangoAccountsForOwner(group: Group, ownerPk: PublicKey, loadSerum3Oo?: boolean): Promise<MangoAccount[]>
                              • groupClose(group: Group): Promise<string>
                              • groupCreate(groupNum: number, testing: boolean, version: number, insuranceMintPk: PublicKey): Promise<string>
                              • Parameters

                                • groupNum: number
                                • testing: boolean
                                • version: number
                                • insuranceMintPk: PublicKey

                                Returns Promise<string>

                              • groupEdit(group: Group, admin?: PublicKey, fastListingAdmin?: PublicKey, securityAdmin?: PublicKey, testing?: number, version?: number, depositLimitQuote?: BN, feesPayWithMngo?: boolean, feesMngoBonusRate?: number, feesSwapMangoAccount?: PublicKey, feesMngoTokenIndex?: TokenIndex, feesExpiryInterval?: BN): Promise<string>
                              • Parameters

                                • group: Group
                                • Optional admin: PublicKey
                                • Optional fastListingAdmin: PublicKey
                                • Optional securityAdmin: PublicKey
                                • Optional testing: number
                                • Optional version: number
                                • Optional depositLimitQuote: BN
                                • Optional feesPayWithMngo: boolean
                                • Optional feesMngoBonusRate: number
                                • Optional feesSwapMangoAccount: PublicKey
                                • Optional feesMngoTokenIndex: TokenIndex
                                • Optional feesExpiryInterval: BN

                                Returns Promise<string>

                              • ixGateSet(group: Group, ixGateParams: IxGateParams): Promise<string>
                              • Parameters

                                • group: Group
                                • ixGateParams: IxGateParams

                                Returns Promise<string>

                              • liqTokenWithToken(group: Group, liqor: MangoAccount, liqee: MangoAccount, assetMintPk: PublicKey, liabMintPk: PublicKey, maxLiabTransfer: number): Promise<string>
                              • marginTrade(__namedParameters: { amountIn: number; flashLoanType: FlashLoanType; group: Group; inputMintPk: PublicKey; mangoAccount: MangoAccount; outputMintPk: PublicKey; userDefinedAlts: AddressLookupTableAccount[]; userDefinedInstructions: TransactionInstruction[] }): Promise<string>
                              • Parameters

                                • __namedParameters: { amountIn: number; flashLoanType: FlashLoanType; group: Group; inputMintPk: PublicKey; mangoAccount: MangoAccount; outputMintPk: PublicKey; userDefinedAlts: AddressLookupTableAccount[]; userDefinedInstructions: TransactionInstruction[] }
                                  • amountIn: number
                                  • flashLoanType: FlashLoanType
                                  • group: Group
                                  • inputMintPk: PublicKey
                                  • mangoAccount: MangoAccount
                                  • outputMintPk: PublicKey
                                  • userDefinedAlts: AddressLookupTableAccount[]
                                  • userDefinedInstructions: TransactionInstruction[]

                                Returns Promise<string>

                              • modifyPerpOrder(group: Group, mangoAccount: MangoAccount, perpMarketIndex: PerpMarketIndex, orderId: BN, side: PerpOrderSide, price: number, quantity: number, maxQuoteQuantity?: number, clientOrderId?: number, orderType?: PerpOrderType, reduceOnly?: boolean, expiryTimestamp?: number, limit?: number): Promise<string>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • perpMarketIndex: PerpMarketIndex
                                • orderId: BN
                                • side: PerpOrderSide
                                • price: number
                                • quantity: number
                                • Optional maxQuoteQuantity: number
                                • Optional clientOrderId: number
                                • Optional orderType: PerpOrderType
                                • Optional reduceOnly: boolean
                                • Optional expiryTimestamp: number
                                • Optional limit: number

                                Returns Promise<string>

                              • perpConsumeEvents(group: Group, perpMarketIndex: PerpMarketIndex, accounts: PublicKey[], limit: number): Promise<string>
                              • perpConsumeEventsIx(group: Group, perpMarketIndex: PerpMarketIndex, accounts: PublicKey[], limit: number): Promise<TransactionInstruction>
                              • perpCreateMarket(group: Group, oraclePk: PublicKey, perpMarketIndex: number, name: string, oracleConfig: OracleConfigParams, baseDecimals: number, quoteLotSize: number, baseLotSize: number, maintBaseAssetWeight: number, initBaseAssetWeight: number, maintBaseLiabWeight: number, initBaseLiabWeight: number, maintOverallAssetWeight: number, initOverallAssetWeight: number, baseLiquidationFee: number, makerFee: number, takerFee: number, feePenalty: number, minFunding: number, maxFunding: number, impactQuantity: number, groupInsuranceFund: boolean, settleFeeFlat: number, settleFeeAmountThreshold: number, settleFeeFractionLowHealth: number, settleTokenIndex: number, settlePnlLimitFactor: number, settlePnlLimitWindowSize: number, positivePnlLiquidationFee: number): Promise<string>
                              • Parameters

                                • group: Group
                                • oraclePk: PublicKey
                                • perpMarketIndex: number
                                • name: string
                                • oracleConfig: OracleConfigParams
                                • baseDecimals: number
                                • quoteLotSize: number
                                • baseLotSize: number
                                • maintBaseAssetWeight: number
                                • initBaseAssetWeight: number
                                • maintBaseLiabWeight: number
                                • initBaseLiabWeight: number
                                • maintOverallAssetWeight: number
                                • initOverallAssetWeight: number
                                • baseLiquidationFee: number
                                • makerFee: number
                                • takerFee: number
                                • feePenalty: number
                                • minFunding: number
                                • maxFunding: number
                                • impactQuantity: number
                                • groupInsuranceFund: boolean
                                • settleFeeFlat: number
                                • settleFeeAmountThreshold: number
                                • settleFeeFractionLowHealth: number
                                • settleTokenIndex: number
                                • settlePnlLimitFactor: number
                                • settlePnlLimitWindowSize: number
                                • positivePnlLiquidationFee: number

                                Returns Promise<string>

                              • perpEditMarket(group: Group, perpMarketIndex: PerpMarketIndex, params: PerpEditParams): Promise<string>
                              • perpPlaceOrder(group: Group, mangoAccount: MangoAccount, perpMarketIndex: PerpMarketIndex, side: PerpOrderSide, price: number, quantity: number, maxQuoteQuantity?: number, clientOrderId?: number, orderType?: PerpOrderType, reduceOnly?: boolean, expiryTimestamp?: number, limit?: number): Promise<string>
                              • perpPlaceOrderIx(group: Group, mangoAccount: MangoAccount, perpMarketIndex: PerpMarketIndex, side: PerpOrderSide, price: number, quantity: number, maxQuoteQuantity?: number, clientOrderId?: number, orderType?: PerpOrderType, reduceOnly?: boolean, expiryTimestamp?: number, limit?: number): Promise<TransactionInstruction>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • perpMarketIndex: PerpMarketIndex
                                • side: PerpOrderSide
                                • price: number
                                • quantity: number
                                • Optional maxQuoteQuantity: number
                                • Optional clientOrderId: number
                                • Optional orderType: PerpOrderType
                                • Optional reduceOnly: boolean
                                • Optional expiryTimestamp: number
                                • Optional limit: number

                                Returns Promise<TransactionInstruction>

                              • perpPlaceOrderPegged(group: Group, mangoAccount: MangoAccount, perpMarketIndex: PerpMarketIndex, side: PerpOrderSide, priceOffset: number, quantity: number, pegLimit?: number, maxQuoteQuantity?: number, clientOrderId?: number, orderType?: PerpOrderType, reduceOnly?: boolean, expiryTimestamp?: number, limit?: number): Promise<string>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • perpMarketIndex: PerpMarketIndex
                                • side: PerpOrderSide
                                • priceOffset: number
                                • quantity: number
                                • Optional pegLimit: number
                                • Optional maxQuoteQuantity: number
                                • Optional clientOrderId: number
                                • Optional orderType: PerpOrderType
                                • Optional reduceOnly: boolean
                                • Optional expiryTimestamp: number
                                • Optional limit: number

                                Returns Promise<string>

                              • perpPlaceOrderPeggedIx(group: Group, mangoAccount: MangoAccount, perpMarketIndex: PerpMarketIndex, side: PerpOrderSide, priceOffset: number, quantity: number, pegLimit?: number, maxQuoteQuantity?: number, clientOrderId?: number, orderType?: PerpOrderType, reduceOnly?: boolean, expiryTimestamp?: number, limit?: number): Promise<TransactionInstruction>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • perpMarketIndex: PerpMarketIndex
                                • side: PerpOrderSide
                                • priceOffset: number
                                • quantity: number
                                • Optional pegLimit: number
                                • Optional maxQuoteQuantity: number
                                • Optional clientOrderId: number
                                • Optional orderType: PerpOrderType
                                • Optional reduceOnly: boolean
                                • Optional expiryTimestamp: number
                                • Optional limit: number

                                Returns Promise<TransactionInstruction>

                              • perpUpdateFundingIx(group: Group, perpMarket: PerpMarket): Promise<TransactionInstruction>
                              • sendAndConfirmTransaction(ixs: TransactionInstruction[], opts?: any): Promise<string>
                              • Parameters

                                • ixs: TransactionInstruction[]
                                • opts: any = {}

                                Returns Promise<string>

                              • sendAndConfirmTransactionForGroup(group: Group, ixs: TransactionInstruction[], opts?: any): Promise<string>
                              • Parameters

                                • group: Group
                                • ixs: TransactionInstruction[]
                                • opts: any = {}

                                Returns Promise<string>

                              • serum3CancelAllOrders(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey, limit?: number): Promise<string>
                              • serum3CancelAllOrdersIx(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey, limit?: number): Promise<TransactionInstruction>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • externalMarketPk: PublicKey
                                • Optional limit: number

                                Returns Promise<TransactionInstruction>

                              • serum3CancelOrder(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey, side: Serum3Side, orderId: BN): Promise<string>
                              • serum3CancelOrderIx(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey, side: Serum3Side, orderId: BN): Promise<TransactionInstruction>
                              • serum3CloseOpenOrders(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<string>
                              • serum3CloseOpenOrdersIx(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<TransactionInstruction>
                              • serum3CreateOpenOrders(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<string>
                              • serum3CreateOpenOrdersIx(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<TransactionInstruction>
                              • serum3EditMarket(group: Group, serum3MarketIndex: MarketIndex, reduceOnly: null | boolean, forceClose: null | boolean): Promise<string>
                              • Parameters

                                • group: Group
                                • serum3MarketIndex: MarketIndex
                                • reduceOnly: null | boolean
                                • forceClose: null | boolean

                                Returns Promise<string>

                              • serum3GetMarkets(group: Group, baseTokenIndex?: number, quoteTokenIndex?: number): Promise<Serum3Market[]>
                              • serum3LiqForceCancelOrders(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey, limit?: number): Promise<string>
                              • serum3RegisterMarket(group: Group, serum3MarketExternalPk: PublicKey, baseBank: Bank, quoteBank: Bank, marketIndex: number, name: string): Promise<string>
                              • Parameters

                                • group: Group
                                • serum3MarketExternalPk: PublicKey
                                • baseBank: Bank
                                • quoteBank: Bank
                                • marketIndex: number
                                • name: string

                                Returns Promise<string>

                              • serum3SettleFunds(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<string>
                              • serum3SettleFundsIx(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<TransactionInstruction>
                              • serum3SettleFundsV2Ix(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<TransactionInstruction>
                              • serum3deregisterMarket(group: Group, externalMarketPk: PublicKey): Promise<string>
                              • Parameters

                                • group: Group
                                • externalMarketPk: PublicKey

                                Returns Promise<string>

                              • stubOracleClose(group: Group, oracle: PublicKey): Promise<string>
                              • stubOracleCreate(group: Group, mintPk: PublicKey, price: number): Promise<string>
                              • Parameters

                                • group: Group
                                • mintPk: PublicKey
                                • price: number

                                Returns Promise<string>

                              • stubOracleSet(group: Group, oraclePk: PublicKey, price: number): Promise<string>
                              • Parameters

                                • group: Group
                                • oraclePk: PublicKey
                                • price: number

                                Returns Promise<string>

                              • toggleMangoAccountFreeze(group: Group, mangoAccount: MangoAccount, freeze: boolean): Promise<string>
                              • tokenDeposit(group: Group, mangoAccount: MangoAccount, mintPk: PublicKey, amount: number, reduceOnly?: boolean): Promise<string>
                              • tokenDepositNative(group: Group, mangoAccount: MangoAccount, mintPk: PublicKey, nativeAmount: BN, reduceOnly?: boolean): Promise<string>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • mintPk: PublicKey
                                • nativeAmount: BN
                                • reduceOnly: boolean = false

                                Returns Promise<string>

                              • tokenDeregister(group: Group, mintPk: PublicKey): Promise<string>
                              • tokenEdit(group: Group, mintPk: PublicKey, params: TokenEditParams): Promise<string>
                              • Parameters

                                • group: Group
                                • mintPk: PublicKey
                                • params: TokenEditParams

                                Returns Promise<string>

                              • tokenRegister(group: Group, mintPk: PublicKey, oraclePk: PublicKey, oracleConfig: OracleConfigParams, tokenIndex: number, name: string, interestRateParams: InterestRateParams, loanFeeRate: number, loanOriginationFeeRate: number, maintAssetWeight: number, initAssetWeight: number, maintLiabWeight: number, initLiabWeight: number, liquidationFee: number, minVaultToDepositsRatio: number, netBorrowLimitWindowSizeTs: number, netBorrowLimitPerWindowQuote: number): Promise<string>
                              • Parameters

                                • group: Group
                                • mintPk: PublicKey
                                • oraclePk: PublicKey
                                • oracleConfig: OracleConfigParams
                                • tokenIndex: number
                                • name: string
                                • interestRateParams: InterestRateParams
                                • loanFeeRate: number
                                • loanOriginationFeeRate: number
                                • maintAssetWeight: number
                                • initAssetWeight: number
                                • maintLiabWeight: number
                                • initLiabWeight: number
                                • liquidationFee: number
                                • minVaultToDepositsRatio: number
                                • netBorrowLimitWindowSizeTs: number
                                • netBorrowLimitPerWindowQuote: number

                                Returns Promise<string>

                              • tokenRegisterTrustless(group: Group, mintPk: PublicKey, oraclePk: PublicKey, tokenIndex: number, name: string): Promise<string>
                              • Parameters

                                • group: Group
                                • mintPk: PublicKey
                                • oraclePk: PublicKey
                                • tokenIndex: number
                                • name: string

                                Returns Promise<string>

                              • tokenUpdateIndexAndRate(group: Group, mintPk: PublicKey): Promise<string>
                              • tokenUpdateIndexAndRateIx(group: Group, mintPk: PublicKey): Promise<TransactionInstruction>
                              • Parameters

                                • group: Group
                                • mintPk: PublicKey

                                Returns Promise<TransactionInstruction>

                              • tokenWithdraw(group: Group, mangoAccount: MangoAccount, mintPk: PublicKey, amount: number, allowBorrow: boolean): Promise<string>
                              • tokenWithdrawNative(group: Group, mangoAccount: MangoAccount, mintPk: PublicKey, nativeAmount: BN, allowBorrow: boolean): Promise<string>
                              • tokenWithdrawNativeIx(group: Group, mangoAccount: MangoAccount, mintPk: PublicKey, nativeAmount: BN, allowBorrow: boolean): Promise<TransactionInstruction[]>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • mintPk: PublicKey
                                • nativeAmount: BN
                                • allowBorrow: boolean

                                Returns Promise<TransactionInstruction[]>

                              • connect(provider: default, cluster: Cluster, programId: PublicKey, opts?: MangoClientOptions): MangoClient
                              • Parameters

                                • provider: default
                                • cluster: Cluster
                                • programId: PublicKey
                                • Optional opts: MangoClientOptions

                                Returns MangoClient

                              • connectForGroupName(provider: default, groupName: string): MangoClient

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file +

                              Parameters

                              Returns Promise<string>

                              • createAndFetchMangoAccount(group: Group, accountNumber?: number, name?: string, tokenCount?: number, serum3Count?: number, perpCount?: number, perpOoCount?: number, loadSerum3Oo?: boolean): Promise<undefined | MangoAccount>
                              • Parameters

                                • group: Group
                                • Optional accountNumber: number
                                • Optional name: string
                                • Optional tokenCount: number
                                • Optional serum3Count: number
                                • Optional perpCount: number
                                • Optional perpOoCount: number
                                • loadSerum3Oo: boolean = false

                                Returns Promise<undefined | MangoAccount>

                              • createMangoAccount(group: Group, accountNumber?: number, name?: string, tokenCount?: number, serum3Count?: number, perpCount?: number, perpOoCount?: number): Promise<string>
                              • Parameters

                                • group: Group
                                • Optional accountNumber: number
                                • Optional name: string
                                • Optional tokenCount: number
                                • Optional serum3Count: number
                                • Optional perpCount: number
                                • Optional perpOoCount: number

                                Returns Promise<string>

                              • editMangoAccount(group: Group, mangoAccount: MangoAccount, name?: string, delegate?: PublicKey): Promise<string>
                              • expandMangoAccount(group: Group, account: MangoAccount, tokenCount: number, serum3Count: number, perpCount: number, perpOoCount: number): Promise<string>
                              • Parameters

                                • group: Group
                                • account: MangoAccount
                                • tokenCount: number
                                • serum3Count: number
                                • perpCount: number
                                • perpOoCount: number

                                Returns Promise<string>

                              • getBanksForGroup(group: Group): Promise<Bank[]>
                              • getGroup(groupPk: PublicKey): Promise<Group>
                              • getGroupForCreator(creatorPk: PublicKey, groupNum: number): Promise<Group>
                              • Parameters

                                • creatorPk: PublicKey
                                • groupNum: number

                                Returns Promise<Group>

                              • getGroupsForCreator(creatorPk: PublicKey): Promise<Group[]>
                              • getIds(groupPk: PublicKey): Promise<undefined | Id>
                              • Parameters

                                • groupPk: PublicKey

                                Returns Promise<undefined | Id>

                              • getMangoAccountForOwner(group: Group, ownerPk: PublicKey, accountNumber: number, loadSerum3Oo?: boolean): Promise<undefined | MangoAccount>
                              • Parameters

                                • group: Group
                                • ownerPk: PublicKey
                                • accountNumber: number
                                • loadSerum3Oo: boolean = false

                                Returns Promise<undefined | MangoAccount>

                              • getMangoAccountWithSlot(mangoAccountPk: PublicKey, loadSerum3Oo?: boolean): Promise<undefined | { slot: number; value: MangoAccount }>
                              • Parameters

                                • mangoAccountPk: PublicKey
                                • loadSerum3Oo: boolean = false

                                Returns Promise<undefined | { slot: number; value: MangoAccount }>

                              • getMangoAccountsForDelegate(group: Group, delegate: PublicKey, loadSerum3Oo?: boolean): Promise<MangoAccount[]>
                              • getMangoAccountsForOwner(group: Group, ownerPk: PublicKey, loadSerum3Oo?: boolean): Promise<MangoAccount[]>
                              • groupClose(group: Group): Promise<string>
                              • groupCreate(groupNum: number, testing: boolean, version: number, insuranceMintPk: PublicKey): Promise<string>
                              • Parameters

                                • groupNum: number
                                • testing: boolean
                                • version: number
                                • insuranceMintPk: PublicKey

                                Returns Promise<string>

                              • groupEdit(group: Group, admin?: PublicKey, fastListingAdmin?: PublicKey, securityAdmin?: PublicKey, testing?: number, version?: number, depositLimitQuote?: BN, feesPayWithMngo?: boolean, feesMngoBonusRate?: number, feesSwapMangoAccount?: PublicKey, feesMngoTokenIndex?: TokenIndex, feesExpiryInterval?: BN): Promise<string>
                              • Parameters

                                • group: Group
                                • Optional admin: PublicKey
                                • Optional fastListingAdmin: PublicKey
                                • Optional securityAdmin: PublicKey
                                • Optional testing: number
                                • Optional version: number
                                • Optional depositLimitQuote: BN
                                • Optional feesPayWithMngo: boolean
                                • Optional feesMngoBonusRate: number
                                • Optional feesSwapMangoAccount: PublicKey
                                • Optional feesMngoTokenIndex: TokenIndex
                                • Optional feesExpiryInterval: BN

                                Returns Promise<string>

                              • ixGateSet(group: Group, ixGateParams: IxGateParams): Promise<string>
                              • Parameters

                                • group: Group
                                • ixGateParams: IxGateParams

                                Returns Promise<string>

                              • liqTokenWithToken(group: Group, liqor: MangoAccount, liqee: MangoAccount, assetMintPk: PublicKey, liabMintPk: PublicKey, maxLiabTransfer: number): Promise<string>
                              • marginTrade(__namedParameters: { amountIn: number; flashLoanType: FlashLoanType; group: Group; inputMintPk: PublicKey; mangoAccount: MangoAccount; outputMintPk: PublicKey; userDefinedAlts: AddressLookupTableAccount[]; userDefinedInstructions: TransactionInstruction[] }): Promise<string>
                              • Parameters

                                • __namedParameters: { amountIn: number; flashLoanType: FlashLoanType; group: Group; inputMintPk: PublicKey; mangoAccount: MangoAccount; outputMintPk: PublicKey; userDefinedAlts: AddressLookupTableAccount[]; userDefinedInstructions: TransactionInstruction[] }
                                  • amountIn: number
                                  • flashLoanType: FlashLoanType
                                  • group: Group
                                  • inputMintPk: PublicKey
                                  • mangoAccount: MangoAccount
                                  • outputMintPk: PublicKey
                                  • userDefinedAlts: AddressLookupTableAccount[]
                                  • userDefinedInstructions: TransactionInstruction[]

                                Returns Promise<string>

                              • modifyPerpOrder(group: Group, mangoAccount: MangoAccount, perpMarketIndex: PerpMarketIndex, orderId: BN, side: PerpOrderSide, price: number, quantity: number, maxQuoteQuantity?: number, clientOrderId?: number, orderType?: PerpOrderType, reduceOnly?: boolean, expiryTimestamp?: number, limit?: number): Promise<string>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • perpMarketIndex: PerpMarketIndex
                                • orderId: BN
                                • side: PerpOrderSide
                                • price: number
                                • quantity: number
                                • Optional maxQuoteQuantity: number
                                • Optional clientOrderId: number
                                • Optional orderType: PerpOrderType
                                • Optional reduceOnly: boolean
                                • Optional expiryTimestamp: number
                                • Optional limit: number

                                Returns Promise<string>

                              • perpConsumeEvents(group: Group, perpMarketIndex: PerpMarketIndex, accounts: PublicKey[], limit: number): Promise<string>
                              • perpConsumeEventsIx(group: Group, perpMarketIndex: PerpMarketIndex, accounts: PublicKey[], limit: number): Promise<TransactionInstruction>
                              • perpCreateMarket(group: Group, oraclePk: PublicKey, perpMarketIndex: number, name: string, oracleConfig: OracleConfigParams, baseDecimals: number, quoteLotSize: number, baseLotSize: number, maintBaseAssetWeight: number, initBaseAssetWeight: number, maintBaseLiabWeight: number, initBaseLiabWeight: number, maintOverallAssetWeight: number, initOverallAssetWeight: number, baseLiquidationFee: number, makerFee: number, takerFee: number, feePenalty: number, minFunding: number, maxFunding: number, impactQuantity: number, groupInsuranceFund: boolean, settleFeeFlat: number, settleFeeAmountThreshold: number, settleFeeFractionLowHealth: number, settleTokenIndex: number, settlePnlLimitFactor: number, settlePnlLimitWindowSize: number, positivePnlLiquidationFee: number): Promise<string>
                              • Parameters

                                • group: Group
                                • oraclePk: PublicKey
                                • perpMarketIndex: number
                                • name: string
                                • oracleConfig: OracleConfigParams
                                • baseDecimals: number
                                • quoteLotSize: number
                                • baseLotSize: number
                                • maintBaseAssetWeight: number
                                • initBaseAssetWeight: number
                                • maintBaseLiabWeight: number
                                • initBaseLiabWeight: number
                                • maintOverallAssetWeight: number
                                • initOverallAssetWeight: number
                                • baseLiquidationFee: number
                                • makerFee: number
                                • takerFee: number
                                • feePenalty: number
                                • minFunding: number
                                • maxFunding: number
                                • impactQuantity: number
                                • groupInsuranceFund: boolean
                                • settleFeeFlat: number
                                • settleFeeAmountThreshold: number
                                • settleFeeFractionLowHealth: number
                                • settleTokenIndex: number
                                • settlePnlLimitFactor: number
                                • settlePnlLimitWindowSize: number
                                • positivePnlLiquidationFee: number

                                Returns Promise<string>

                              • perpEditMarket(group: Group, perpMarketIndex: PerpMarketIndex, params: PerpEditParams): Promise<string>
                              • perpPlaceOrder(group: Group, mangoAccount: MangoAccount, perpMarketIndex: PerpMarketIndex, side: PerpOrderSide, price: number, quantity: number, maxQuoteQuantity?: number, clientOrderId?: number, orderType?: PerpOrderType, reduceOnly?: boolean, expiryTimestamp?: number, limit?: number): Promise<string>
                              • perpPlaceOrderIx(group: Group, mangoAccount: MangoAccount, perpMarketIndex: PerpMarketIndex, side: PerpOrderSide, price: number, quantity: number, maxQuoteQuantity?: number, clientOrderId?: number, orderType?: PerpOrderType, reduceOnly?: boolean, expiryTimestamp?: number, limit?: number): Promise<TransactionInstruction>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • perpMarketIndex: PerpMarketIndex
                                • side: PerpOrderSide
                                • price: number
                                • quantity: number
                                • Optional maxQuoteQuantity: number
                                • Optional clientOrderId: number
                                • Optional orderType: PerpOrderType
                                • Optional reduceOnly: boolean
                                • Optional expiryTimestamp: number
                                • Optional limit: number

                                Returns Promise<TransactionInstruction>

                              • perpPlaceOrderPegged(group: Group, mangoAccount: MangoAccount, perpMarketIndex: PerpMarketIndex, side: PerpOrderSide, priceOffset: number, quantity: number, pegLimit?: number, maxQuoteQuantity?: number, clientOrderId?: number, orderType?: PerpOrderType, reduceOnly?: boolean, expiryTimestamp?: number, limit?: number): Promise<string>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • perpMarketIndex: PerpMarketIndex
                                • side: PerpOrderSide
                                • priceOffset: number
                                • quantity: number
                                • Optional pegLimit: number
                                • Optional maxQuoteQuantity: number
                                • Optional clientOrderId: number
                                • Optional orderType: PerpOrderType
                                • Optional reduceOnly: boolean
                                • Optional expiryTimestamp: number
                                • Optional limit: number

                                Returns Promise<string>

                              • perpPlaceOrderPeggedIx(group: Group, mangoAccount: MangoAccount, perpMarketIndex: PerpMarketIndex, side: PerpOrderSide, priceOffset: number, quantity: number, pegLimit?: number, maxQuoteQuantity?: number, clientOrderId?: number, orderType?: PerpOrderType, reduceOnly?: boolean, expiryTimestamp?: number, limit?: number): Promise<TransactionInstruction>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • perpMarketIndex: PerpMarketIndex
                                • side: PerpOrderSide
                                • priceOffset: number
                                • quantity: number
                                • Optional pegLimit: number
                                • Optional maxQuoteQuantity: number
                                • Optional clientOrderId: number
                                • Optional orderType: PerpOrderType
                                • Optional reduceOnly: boolean
                                • Optional expiryTimestamp: number
                                • Optional limit: number

                                Returns Promise<TransactionInstruction>

                              • perpUpdateFundingIx(group: Group, perpMarket: PerpMarket): Promise<TransactionInstruction>
                              • sendAndConfirmTransaction(ixs: TransactionInstruction[], opts?: any): Promise<string>
                              • Parameters

                                • ixs: TransactionInstruction[]
                                • opts: any = {}

                                Returns Promise<string>

                              • sendAndConfirmTransactionForGroup(group: Group, ixs: TransactionInstruction[], opts?: any): Promise<string>
                              • Parameters

                                • group: Group
                                • ixs: TransactionInstruction[]
                                • opts: any = {}

                                Returns Promise<string>

                              • serum3CancelAllOrders(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey, limit?: number): Promise<string>
                              • serum3CancelAllOrdersIx(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey, limit?: number): Promise<TransactionInstruction>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • externalMarketPk: PublicKey
                                • Optional limit: number

                                Returns Promise<TransactionInstruction>

                              • serum3CancelOrder(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey, side: Serum3Side, orderId: BN): Promise<string>
                              • serum3CancelOrderIx(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey, side: Serum3Side, orderId: BN): Promise<TransactionInstruction>
                              • serum3CloseOpenOrders(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<string>
                              • serum3CloseOpenOrdersIx(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<TransactionInstruction>
                              • serum3CreateOpenOrders(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<string>
                              • serum3CreateOpenOrdersIx(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<TransactionInstruction>
                              • serum3EditMarket(group: Group, serum3MarketIndex: MarketIndex, reduceOnly: null | boolean, forceClose: null | boolean): Promise<string>
                              • Parameters

                                • group: Group
                                • serum3MarketIndex: MarketIndex
                                • reduceOnly: null | boolean
                                • forceClose: null | boolean

                                Returns Promise<string>

                              • serum3GetMarkets(group: Group, baseTokenIndex?: number, quoteTokenIndex?: number): Promise<Serum3Market[]>
                              • serum3LiqForceCancelOrders(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey, limit?: number): Promise<string>
                              • serum3RegisterMarket(group: Group, serum3MarketExternalPk: PublicKey, baseBank: Bank, quoteBank: Bank, marketIndex: number, name: string): Promise<string>
                              • Parameters

                                • group: Group
                                • serum3MarketExternalPk: PublicKey
                                • baseBank: Bank
                                • quoteBank: Bank
                                • marketIndex: number
                                • name: string

                                Returns Promise<string>

                              • serum3SettleFunds(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<string>
                              • serum3SettleFundsIx(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<TransactionInstruction>
                              • serum3SettleFundsV2Ix(group: Group, mangoAccount: MangoAccount, externalMarketPk: PublicKey): Promise<TransactionInstruction>
                              • serum3deregisterMarket(group: Group, externalMarketPk: PublicKey): Promise<string>
                              • Parameters

                                • group: Group
                                • externalMarketPk: PublicKey

                                Returns Promise<string>

                              • stubOracleClose(group: Group, oracle: PublicKey): Promise<string>
                              • stubOracleCreate(group: Group, mintPk: PublicKey, price: number): Promise<string>
                              • Parameters

                                • group: Group
                                • mintPk: PublicKey
                                • price: number

                                Returns Promise<string>

                              • stubOracleSet(group: Group, oraclePk: PublicKey, price: number): Promise<string>
                              • Parameters

                                • group: Group
                                • oraclePk: PublicKey
                                • price: number

                                Returns Promise<string>

                              • toggleMangoAccountFreeze(group: Group, mangoAccount: MangoAccount, freeze: boolean): Promise<string>
                              • tokenDeposit(group: Group, mangoAccount: MangoAccount, mintPk: PublicKey, amount: number, reduceOnly?: boolean): Promise<string>
                              • tokenDepositNative(group: Group, mangoAccount: MangoAccount, mintPk: PublicKey, nativeAmount: BN, reduceOnly?: boolean): Promise<string>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • mintPk: PublicKey
                                • nativeAmount: BN
                                • reduceOnly: boolean = false

                                Returns Promise<string>

                              • tokenDeregister(group: Group, mintPk: PublicKey): Promise<string>
                              • tokenEdit(group: Group, mintPk: PublicKey, params: TokenEditParams): Promise<string>
                              • Parameters

                                • group: Group
                                • mintPk: PublicKey
                                • params: TokenEditParams

                                Returns Promise<string>

                              • tokenRegister(group: Group, mintPk: PublicKey, oraclePk: PublicKey, oracleConfig: OracleConfigParams, tokenIndex: number, name: string, interestRateParams: InterestRateParams, loanFeeRate: number, loanOriginationFeeRate: number, maintAssetWeight: number, initAssetWeight: number, maintLiabWeight: number, initLiabWeight: number, liquidationFee: number, minVaultToDepositsRatio: number, netBorrowLimitWindowSizeTs: number, netBorrowLimitPerWindowQuote: number): Promise<string>
                              • Parameters

                                • group: Group
                                • mintPk: PublicKey
                                • oraclePk: PublicKey
                                • oracleConfig: OracleConfigParams
                                • tokenIndex: number
                                • name: string
                                • interestRateParams: InterestRateParams
                                • loanFeeRate: number
                                • loanOriginationFeeRate: number
                                • maintAssetWeight: number
                                • initAssetWeight: number
                                • maintLiabWeight: number
                                • initLiabWeight: number
                                • liquidationFee: number
                                • minVaultToDepositsRatio: number
                                • netBorrowLimitWindowSizeTs: number
                                • netBorrowLimitPerWindowQuote: number

                                Returns Promise<string>

                              • tokenRegisterTrustless(group: Group, mintPk: PublicKey, oraclePk: PublicKey, tokenIndex: number, name: string): Promise<string>
                              • Parameters

                                • group: Group
                                • mintPk: PublicKey
                                • oraclePk: PublicKey
                                • tokenIndex: number
                                • name: string

                                Returns Promise<string>

                              • tokenUpdateIndexAndRate(group: Group, mintPk: PublicKey): Promise<string>
                              • tokenUpdateIndexAndRateIx(group: Group, mintPk: PublicKey): Promise<TransactionInstruction>
                              • Parameters

                                • group: Group
                                • mintPk: PublicKey

                                Returns Promise<TransactionInstruction>

                              • tokenWithdraw(group: Group, mangoAccount: MangoAccount, mintPk: PublicKey, amount: number, allowBorrow: boolean): Promise<string>
                              • tokenWithdrawNative(group: Group, mangoAccount: MangoAccount, mintPk: PublicKey, nativeAmount: BN, allowBorrow: boolean): Promise<string>
                              • tokenWithdrawNativeIx(group: Group, mangoAccount: MangoAccount, mintPk: PublicKey, nativeAmount: BN, allowBorrow: boolean): Promise<TransactionInstruction[]>
                              • Parameters

                                • group: Group
                                • mangoAccount: MangoAccount
                                • mintPk: PublicKey
                                • nativeAmount: BN
                                • allowBorrow: boolean

                                Returns Promise<TransactionInstruction[]>

                              • connect(provider: default, cluster: Cluster, programId: PublicKey, opts?: MangoClientOptions): MangoClient
                              • Parameters

                                • provider: default
                                • cluster: Cluster
                                • programId: PublicKey
                                • Optional opts: MangoClientOptions

                                Returns MangoClient

                              • connectForGroupName(provider: default, groupName: string): MangoClient

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/MintInfo.html b/ts/client/classes/MintInfo.html index 2f5e453b5..b463c91bb 100644 --- a/ts/client/classes/MintInfo.html +++ b/ts/client/classes/MintInfo.html @@ -1 +1 @@ -MintInfo | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • MintInfo

                              Index

                              Constructors

                              • new MintInfo(publicKey: PublicKey, group: PublicKey, tokenIndex: TokenIndex, mint: PublicKey, banks: PublicKey[], vaults: PublicKey[], oracle: PublicKey, registrationTime: BN, groupInsuranceFund: boolean): MintInfo
                              • Parameters

                                • publicKey: PublicKey
                                • group: PublicKey
                                • tokenIndex: TokenIndex
                                • mint: PublicKey
                                • banks: PublicKey[]
                                • vaults: PublicKey[]
                                • oracle: PublicKey
                                • registrationTime: BN
                                • groupInsuranceFund: boolean

                                Returns MintInfo

                              Properties

                              banks: PublicKey[]
                              group: PublicKey
                              groupInsuranceFund: boolean
                              mint: PublicKey
                              oracle: PublicKey
                              publicKey: PublicKey
                              registrationTime: BN
                              tokenIndex: TokenIndex
                              vaults: PublicKey[]

                              Methods

                              • firstBank(): PublicKey
                              • firstVault(): PublicKey
                              • toString(): string
                              • from(publicKey: PublicKey, obj: { banks: PublicKey[]; group: PublicKey; groupInsuranceFund: number; mint: PublicKey; oracle: PublicKey; registrationTime: BN; tokenIndex: number; vaults: PublicKey[] }): MintInfo
                              • Parameters

                                • publicKey: PublicKey
                                • obj: { banks: PublicKey[]; group: PublicKey; groupInsuranceFund: number; mint: PublicKey; oracle: PublicKey; registrationTime: BN; tokenIndex: number; vaults: PublicKey[] }
                                  • banks: PublicKey[]
                                  • group: PublicKey
                                  • groupInsuranceFund: number
                                  • mint: PublicKey
                                  • oracle: PublicKey
                                  • registrationTime: BN
                                  • tokenIndex: number
                                  • vaults: PublicKey[]

                                Returns MintInfo

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file +MintInfo | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • MintInfo

                              Index

                              Constructors

                              • new MintInfo(publicKey: PublicKey, group: PublicKey, tokenIndex: TokenIndex, mint: PublicKey, banks: PublicKey[], vaults: PublicKey[], oracle: PublicKey, registrationTime: BN, groupInsuranceFund: boolean): MintInfo
                              • Parameters

                                • publicKey: PublicKey
                                • group: PublicKey
                                • tokenIndex: TokenIndex
                                • mint: PublicKey
                                • banks: PublicKey[]
                                • vaults: PublicKey[]
                                • oracle: PublicKey
                                • registrationTime: BN
                                • groupInsuranceFund: boolean

                                Returns MintInfo

                              Properties

                              banks: PublicKey[]
                              group: PublicKey
                              groupInsuranceFund: boolean
                              mint: PublicKey
                              oracle: PublicKey
                              publicKey: PublicKey
                              registrationTime: BN
                              tokenIndex: TokenIndex
                              vaults: PublicKey[]

                              Methods

                              • firstBank(): PublicKey
                              • firstVault(): PublicKey
                              • toString(): string
                              • from(publicKey: PublicKey, obj: { banks: PublicKey[]; group: PublicKey; groupInsuranceFund: number; mint: PublicKey; oracle: PublicKey; registrationTime: BN; tokenIndex: number; vaults: PublicKey[] }): MintInfo
                              • Parameters

                                • publicKey: PublicKey
                                • obj: { banks: PublicKey[]; group: PublicKey; groupInsuranceFund: number; mint: PublicKey; oracle: PublicKey; registrationTime: BN; tokenIndex: number; vaults: PublicKey[] }
                                  • banks: PublicKey[]
                                  • group: PublicKey
                                  • groupInsuranceFund: number
                                  • mint: PublicKey
                                  • oracle: PublicKey
                                  • registrationTime: BN
                                  • tokenIndex: number
                                  • vaults: PublicKey[]

                                Returns MintInfo

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/OracleConfigParams.html b/ts/client/classes/OracleConfigParams.html index 9b6e09504..009ae3fcb 100644 --- a/ts/client/classes/OracleConfigParams.html +++ b/ts/client/classes/OracleConfigParams.html @@ -1 +1 @@ -OracleConfigParams | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • OracleConfigParams

                              Index

                              Constructors

                              Properties

                              confFilter: number
                              maxStalenessSlots: null | number

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file +OracleConfigParams | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • OracleConfigParams

                              Index

                              Constructors

                              Properties

                              confFilter: number
                              maxStalenessSlots: null | number

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/PerpEventQueue.html b/ts/client/classes/PerpEventQueue.html index 20faf68c6..b62e8d847 100644 --- a/ts/client/classes/PerpEventQueue.html +++ b/ts/client/classes/PerpEventQueue.html @@ -1 +1 @@ -PerpEventQueue | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • PerpEventQueue

                              Index

                              Constructors

                              Properties

                              count: number
                              head: number
                              rawEvents: (FillEvent | OutEvent | LiquidateEvent)[]
                              seqNum: BN
                              FILL_EVENT_TYPE: number = 0
                              LIQUIDATE_EVENT_TYPE: number = 2
                              OUT_EVENT_TYPE: number = 1

                              Methods

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file +PerpEventQueue | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • PerpEventQueue

                              Index

                              Constructors

                              Properties

                              count: number
                              head: number
                              rawEvents: (FillEvent | OutEvent | LiquidateEvent)[]
                              seqNum: BN
                              FILL_EVENT_TYPE: number = 0
                              LIQUIDATE_EVENT_TYPE: number = 2
                              OUT_EVENT_TYPE: number = 1

                              Methods

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/PerpMarket.html b/ts/client/classes/PerpMarket.html index 9d67463a8..c0dd1540d 100644 --- a/ts/client/classes/PerpMarket.html +++ b/ts/client/classes/PerpMarket.html @@ -1,12 +1,12 @@ -PerpMarket | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • PerpMarket

                              Index

                              Constructors

                              • new PerpMarket(publicKey: PublicKey, group: PublicKey, settleTokenIndex: TokenIndex, perpMarketIndex: PerpMarketIndex, groupInsuranceFund: boolean, baseDecimals: number, name: number[], bids: PublicKey, asks: PublicKey, eventQueue: PublicKey, oracle: PublicKey, oracleConfig: OracleConfigDto, stablePriceModel: StablePriceModel, quoteLotSize: BN, baseLotSize: BN, maintBaseAssetWeight: I80F48Dto, initBaseAssetWeight: I80F48Dto, maintBaseLiabWeight: I80F48Dto, initBaseLiabWeight: I80F48Dto, openInterest: BN, seqNum: BN, registrationTime: BN, minFunding: I80F48Dto, maxFunding: I80F48Dto, impactQuantity: BN, longFunding: I80F48Dto, shortFunding: I80F48Dto, fundingLastUpdated: BN, baseLiquidationFee: I80F48Dto, makerFee: I80F48Dto, takerFee: I80F48Dto, feesAccrued: I80F48Dto, feesSettled: I80F48Dto, feePenalty: number, settleFeeFlat: number, settleFeeAmountThreshold: number, settleFeeFractionLowHealth: number, settlePnlLimitFactor: number, settlePnlLimitWindowSizeTs: BN, reduceOnly: boolean, forceClose: boolean, maintOverallAssetWeight: I80F48Dto, initOverallAssetWeight: I80F48Dto, positivePnlLiquidationFee: I80F48Dto): PerpMarket

                              Properties

                              _asks: BookSide
                              _bids: BookSide
                              _oracleLastUpdatedSlot: number
                              _oracleProvider: OracleProvider
                              _price: I80F48
                              _uiPrice: number
                              asks: PublicKey
                              baseDecimals: number
                              baseLiquidationFee: I80F48
                              baseLotSize: BN
                              baseLotsToUiConverter: number
                              bids: PublicKey
                              eventQueue: PublicKey
                              feePenalty: number
                              feesAccrued: I80F48
                              feesSettled: I80F48
                              forceClose: boolean
                              fundingLastUpdated: BN
                              group: PublicKey
                              groupInsuranceFund: boolean
                              impactQuantity: BN
                              initBaseAssetWeight: I80F48
                              initBaseLiabWeight: I80F48
                              initOverallAssetWeight: I80F48
                              longFunding: I80F48
                              maintBaseAssetWeight: I80F48
                              maintBaseLiabWeight: I80F48
                              maintOverallAssetWeight: I80F48
                              makerFee: I80F48
                              maxFunding: I80F48
                              minFunding: I80F48
                              name: string
                              openInterest: BN
                              oracle: PublicKey
                              oracleConfig: OracleConfig
                              perpMarketIndex: PerpMarketIndex
                              positivePnlLiquidationFee: I80F48
                              priceLotsToUiConverter: number
                              publicKey: PublicKey
                              quoteLotSize: BN
                              quoteLotsToUiConverter: number
                              reduceOnly: boolean
                              registrationTime: BN
                              seqNum: BN
                              settleFeeAmountThreshold: number
                              settleFeeFlat: number
                              settleFeeFractionLowHealth: number
                              settlePnlLimitFactor: number
                              settlePnlLimitWindowSizeTs: BN
                              settleTokenIndex: TokenIndex
                              shortFunding: I80F48
                              stablePriceModel: StablePriceModel
                              takerFee: I80F48

                              Accessors

                              • get minOrderSize(): number
                              • get oracleLastUpdatedSlot(): number
                              • get tickSize(): number
                              • get uiPrice(): number

                              Methods

                              • baseLotsToUi(quantity: BN): number
                              • insidePriceLimit(side: PerpOrderSide, orderPrice: number): boolean
                              • priceLotsToUi(price: BN): number
                              • priceNativeToUi(price: number): number
                              • quoteLotsToUi(quantity: BN): number
                              • toString(): string
                              • uiBaseToLots(quantity: number): BN
                              • uiPriceToLots(price: number): BN
                              • uiQuoteToLots(uiQuote: number): BN
                              • from(publicKey: PublicKey, obj: { asks: PublicKey; baseDecimals: number; baseLiquidationFee: I80F48Dto; baseLotSize: BN; bids: PublicKey; eventQueue: PublicKey; feePenalty: number; feesAccrued: I80F48Dto; feesSettled: I80F48Dto; forceClose: number; fundingLastUpdated: BN; group: PublicKey; groupInsuranceFund: number; impactQuantity: BN; initBaseAssetWeight: I80F48Dto; initBaseLiabWeight: I80F48Dto; initOverallAssetWeight: I80F48Dto; longFunding: I80F48Dto; maintBaseAssetWeight: I80F48Dto; maintBaseLiabWeight: I80F48Dto; maintOverallAssetWeight: I80F48Dto; makerFee: I80F48Dto; maxFunding: I80F48Dto; minFunding: I80F48Dto; name: number[]; openInterest: BN; oracle: PublicKey; oracleConfig: OracleConfigDto; perpMarketIndex: number; positivePnlLiquidationFee: I80F48Dto; quoteLotSize: BN; reduceOnly: number; registrationTime: BN; seqNum: BN; settleFeeAmountThreshold: number; settleFeeFlat: number; settleFeeFractionLowHealth: number; settlePnlLimitFactor: number; settlePnlLimitWindowSizeTs: BN; settleTokenIndex: number; shortFunding: I80F48Dto; stablePriceModel: StablePriceModel; takerFee: I80F48Dto }): PerpMarket
                              • Parameters

                                • publicKey: PublicKey
                                • obj: { asks: PublicKey; baseDecimals: number; baseLiquidationFee: I80F48Dto; baseLotSize: BN; bids: PublicKey; eventQueue: PublicKey; feePenalty: number; feesAccrued: I80F48Dto; feesSettled: I80F48Dto; forceClose: number; fundingLastUpdated: BN; group: PublicKey; groupInsuranceFund: number; impactQuantity: BN; initBaseAssetWeight: I80F48Dto; initBaseLiabWeight: I80F48Dto; initOverallAssetWeight: I80F48Dto; longFunding: I80F48Dto; maintBaseAssetWeight: I80F48Dto; maintBaseLiabWeight: I80F48Dto; maintOverallAssetWeight: I80F48Dto; makerFee: I80F48Dto; maxFunding: I80F48Dto; minFunding: I80F48Dto; name: number[]; openInterest: BN; oracle: PublicKey; oracleConfig: OracleConfigDto; perpMarketIndex: number; positivePnlLiquidationFee: I80F48Dto; quoteLotSize: BN; reduceOnly: number; registrationTime: BN; seqNum: BN; settleFeeAmountThreshold: number; settleFeeFlat: number; settleFeeFractionLowHealth: number; settlePnlLimitFactor: number; settlePnlLimitWindowSizeTs: BN; settleTokenIndex: number; shortFunding: I80F48Dto; stablePriceModel: StablePriceModel; takerFee: I80F48Dto }
                                  • asks: PublicKey
                                  • baseDecimals: number
                                  • baseLiquidationFee: I80F48Dto
                                  • baseLotSize: BN
                                  • bids: PublicKey
                                  • eventQueue: PublicKey
                                  • feePenalty: number
                                  • feesAccrued: I80F48Dto
                                  • feesSettled: I80F48Dto
                                  • forceClose: number
                                  • fundingLastUpdated: BN
                                  • group: PublicKey
                                  • groupInsuranceFund: number
                                  • impactQuantity: BN
                                  • initBaseAssetWeight: I80F48Dto
                                  • initBaseLiabWeight: I80F48Dto
                                  • initOverallAssetWeight: I80F48Dto
                                  • longFunding: I80F48Dto
                                  • maintBaseAssetWeight: I80F48Dto
                                  • maintBaseLiabWeight: I80F48Dto
                                  • maintOverallAssetWeight: I80F48Dto
                                  • makerFee: I80F48Dto
                                  • maxFunding: I80F48Dto
                                  • minFunding: I80F48Dto
                                  • name: number[]
                                  • openInterest: BN
                                  • oracle: PublicKey
                                  • oracleConfig: OracleConfigDto
                                  • perpMarketIndex: number
                                  • positivePnlLiquidationFee: I80F48Dto
                                  • quoteLotSize: BN
                                  • reduceOnly: number
                                  • registrationTime: BN
                                  • seqNum: BN
                                  • settleFeeAmountThreshold: number
                                  • settleFeeFlat: number
                                  • settleFeeFractionLowHealth: number
                                  • settlePnlLimitFactor: number
                                  • settlePnlLimitWindowSizeTs: BN
                                  • settleTokenIndex: number
                                  • shortFunding: I80F48Dto
                                  • stablePriceModel: StablePriceModel
                                  • takerFee: I80F48Dto

                                Returns PerpMarket

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/PerpOo.html b/ts/client/classes/PerpOo.html index 9415aa1b4..c9a639112 100644 --- a/ts/client/classes/PerpOo.html +++ b/ts/client/classes/PerpOo.html @@ -1 +1 @@ -PerpOo | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • PerpOo

                              Index

                              Constructors

                              • new PerpOo(sideAndTree: any, orderMarket: number, clientId: BN, id: BN): PerpOo

                              Properties

                              clientId: BN
                              id: BN
                              orderMarket: number
                              sideAndTree: any
                              OrderMarketUnset: number = 65535

                              Methods

                              • isActive(): boolean

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file +PerpOo | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • PerpOo

                              Index

                              Constructors

                              • new PerpOo(sideAndTree: any, orderMarket: number, clientId: BN, id: BN): PerpOo

                              Properties

                              clientId: BN
                              id: BN
                              orderMarket: number
                              sideAndTree: any
                              OrderMarketUnset: number = 65535

                              Methods

                              • isActive(): boolean

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/PerpOoDto.html b/ts/client/classes/PerpOoDto.html index ad7df5f6e..93918f370 100644 --- a/ts/client/classes/PerpOoDto.html +++ b/ts/client/classes/PerpOoDto.html @@ -1 +1 @@ -PerpOoDto | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • PerpOoDto

                              Index

                              Constructors

                              • new PerpOoDto(sideAndTree: any, market: number, clientId: BN, id: BN): PerpOoDto

                              Properties

                              clientId: BN
                              id: BN
                              market: number
                              sideAndTree: any

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file +PerpOoDto | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • PerpOoDto

                              Index

                              Constructors

                              • new PerpOoDto(sideAndTree: any, market: number, clientId: BN, id: BN): PerpOoDto

                              Properties

                              clientId: BN
                              id: BN
                              market: number
                              sideAndTree: any

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/PerpOrder.html b/ts/client/classes/PerpOrder.html index a1e1057e9..aa63f9e64 100644 --- a/ts/client/classes/PerpOrder.html +++ b/ts/client/classes/PerpOrder.html @@ -1 +1 @@ -PerpOrder | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • PerpOrder

                              Index

                              Constructors

                              • new PerpOrder(seqNum: BN, orderId: BN, owner: PublicKey, openOrdersSlot: number, feeTier: 0, uiPrice: number, priceLots: BN, uiSize: number, sizeLots: BN, side: PerpOrderSide, timestamp: BN, expiryTimestamp: BN, perpMarketIndex: number, isExpired?: boolean, isOraclePegged?: boolean, orderType: PerpOrderType, oraclePeggedProperties?: OraclePeggedProperties): PerpOrder
                              • Parameters

                                • seqNum: BN
                                • orderId: BN
                                • owner: PublicKey
                                • openOrdersSlot: number
                                • feeTier: 0
                                • uiPrice: number
                                • priceLots: BN
                                • uiSize: number
                                • sizeLots: BN
                                • side: PerpOrderSide
                                • timestamp: BN
                                • expiryTimestamp: BN
                                • perpMarketIndex: number
                                • isExpired: boolean = false
                                • isOraclePegged: boolean = false
                                • orderType: PerpOrderType
                                • Optional oraclePeggedProperties: OraclePeggedProperties

                                Returns PerpOrder

                              Properties

                              expiryTimestamp: BN
                              feeTier: 0
                              isExpired: boolean = false
                              isOraclePegged: boolean = false
                              openOrdersSlot: number
                              oraclePeggedProperties?: OraclePeggedProperties
                              orderId: BN
                              orderType: PerpOrderType
                              owner: PublicKey
                              perpMarketIndex: number
                              priceLots: BN
                              seqNum: BN
                              sizeLots: BN
                              timestamp: BN
                              uiPrice: number
                              uiSize: number

                              Accessors

                              • get price(): number
                              • get size(): number

                              Methods

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file +PerpOrder | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • PerpOrder

                              Index

                              Constructors

                              • new PerpOrder(seqNum: BN, orderId: BN, owner: PublicKey, openOrdersSlot: number, feeTier: 0, uiPrice: number, priceLots: BN, uiSize: number, sizeLots: BN, side: PerpOrderSide, timestamp: BN, expiryTimestamp: BN, perpMarketIndex: number, isExpired?: boolean, isOraclePegged?: boolean, orderType: PerpOrderType, oraclePeggedProperties?: OraclePeggedProperties): PerpOrder
                              • Parameters

                                • seqNum: BN
                                • orderId: BN
                                • owner: PublicKey
                                • openOrdersSlot: number
                                • feeTier: 0
                                • uiPrice: number
                                • priceLots: BN
                                • uiSize: number
                                • sizeLots: BN
                                • side: PerpOrderSide
                                • timestamp: BN
                                • expiryTimestamp: BN
                                • perpMarketIndex: number
                                • isExpired: boolean = false
                                • isOraclePegged: boolean = false
                                • orderType: PerpOrderType
                                • Optional oraclePeggedProperties: OraclePeggedProperties

                                Returns PerpOrder

                              Properties

                              expiryTimestamp: BN
                              feeTier: 0
                              isExpired: boolean = false
                              isOraclePegged: boolean = false
                              openOrdersSlot: number
                              oraclePeggedProperties?: OraclePeggedProperties
                              orderId: BN
                              orderType: PerpOrderType
                              owner: PublicKey
                              perpMarketIndex: number
                              priceLots: BN
                              seqNum: BN
                              sizeLots: BN
                              timestamp: BN
                              uiPrice: number
                              uiSize: number

                              Accessors

                              • get price(): number
                              • get size(): number

                              Methods

                              Legend

                              • Constructor
                              • Property
                              • Method
                              • Property
                              • Method
                              • Private property
                              • Private method
                              • Static property
                              • Static method

                              Settings

                              Theme

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/PerpOrderSide.html b/ts/client/classes/PerpOrderSide.html index 3e7b114e3..ec836ce2e 100644 --- a/ts/client/classes/PerpOrderSide.html +++ b/ts/client/classes/PerpOrderSide.html @@ -1 +1 @@ -PerpOrderSide | @blockworks-foundation/mango-v4
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Hierarchy

                              • PerpOrderSide

                              Index

                              Constructors

                              Properties

                              Constructors

                              Properties

                              ask: { ask: {} } = ...

                              Type declaration

                              • ask: {}
                                bid: { bid: {} } = ...

                                Type declaration

                                • bid: {}

                                  Legend

                                  • Constructor
                                  • Property
                                  • Method
                                  • Property
                                  • Method
                                  • Private property
                                  • Private method
                                  • Static property
                                  • Static method

                                  Settings

                                  Theme

                                  Generated using TypeDoc

                                  \ No newline at end of file +PerpOrderSide | @blockworks-foundation/mango-v4
                                  Options
                                  All
                                  • Public
                                  • Public/Protected
                                  • All
                                  Menu

                                  Hierarchy

                                  • PerpOrderSide

                                  Index

                                  Constructors

                                  Properties

                                  Constructors

                                  Properties

                                  ask: { ask: {} } = ...

                                  Type declaration

                                  • ask: {}
                                    bid: { bid: {} } = ...

                                    Type declaration

                                    • bid: {}

                                      Legend

                                      • Constructor
                                      • Property
                                      • Method
                                      • Property
                                      • Method
                                      • Private property
                                      • Private method
                                      • Static property
                                      • Static method

                                      Settings

                                      Theme

                                      Generated using TypeDoc

                                      \ No newline at end of file diff --git a/ts/client/classes/PerpOrderType.html b/ts/client/classes/PerpOrderType.html index 6ccbd82a5..9601b5d66 100644 --- a/ts/client/classes/PerpOrderType.html +++ b/ts/client/classes/PerpOrderType.html @@ -1 +1 @@ -PerpOrderType | @blockworks-foundation/mango-v4
                                      Options
                                      All
                                      • Public
                                      • Public/Protected
                                      • All
                                      Menu

                                      Hierarchy

                                      • PerpOrderType

                                      Index

                                      Constructors

                                      Properties

                                      immediateOrCancel: { immediateOrCancel: {} } = ...

                                      Type declaration

                                      • immediateOrCancel: {}
                                        limit: { limit: {} } = ...

                                        Type declaration

                                        • limit: {}
                                          market: { market: {} } = ...

                                          Type declaration

                                          • market: {}
                                            postOnly: { postOnly: {} } = ...

                                            Type declaration

                                            • postOnly: {}
                                              postOnlySlide: { postOnlySlide: {} } = ...

                                              Type declaration

                                              • postOnlySlide: {}

                                                Legend

                                                • Constructor
                                                • Property
                                                • Method
                                                • Property
                                                • Method
                                                • Private property
                                                • Private method
                                                • Static property
                                                • Static method

                                                Settings

                                                Theme

                                                Generated using TypeDoc

                                                \ No newline at end of file +PerpOrderType | @blockworks-foundation/mango-v4
                                                Options
                                                All
                                                • Public
                                                • Public/Protected
                                                • All
                                                Menu

                                                Hierarchy

                                                • PerpOrderType

                                                Index

                                                Constructors

                                                Properties

                                                immediateOrCancel: { immediateOrCancel: {} } = ...

                                                Type declaration

                                                • immediateOrCancel: {}
                                                  limit: { limit: {} } = ...

                                                  Type declaration

                                                  • limit: {}
                                                    market: { market: {} } = ...

                                                    Type declaration

                                                    • market: {}
                                                      postOnly: { postOnly: {} } = ...

                                                      Type declaration

                                                      • postOnly: {}
                                                        postOnlySlide: { postOnlySlide: {} } = ...

                                                        Type declaration

                                                        • postOnlySlide: {}

                                                          Legend

                                                          • Constructor
                                                          • Property
                                                          • Method
                                                          • Property
                                                          • Method
                                                          • Private property
                                                          • Private method
                                                          • Static property
                                                          • Static method

                                                          Settings

                                                          Theme

                                                          Generated using TypeDoc

                                                          \ No newline at end of file diff --git a/ts/client/classes/PerpPosition.html b/ts/client/classes/PerpPosition.html index 88620343b..71b5fe0a2 100644 --- a/ts/client/classes/PerpPosition.html +++ b/ts/client/classes/PerpPosition.html @@ -1 +1 @@ -PerpPosition | @blockworks-foundation/mango-v4
                                                          Options
                                                          All
                                                          • Public
                                                          • Public/Protected
                                                          • All
                                                          Menu

                                                          Hierarchy

                                                          • PerpPosition

                                                          Index

                                                          Constructors

                                                          • new PerpPosition(marketIndex: PerpMarketIndex, settlePnlLimitWindow: number, settlePnlLimitSettledInCurrentWindowNative: BN, basePositionLots: BN, quotePositionNative: I80F48, quoteRunningNative: BN, longSettledFunding: I80F48, shortSettledFunding: I80F48, bidsBaseLots: BN, asksBaseLots: BN, takerBaseLots: BN, takerQuoteLots: BN, cumulativeLongFunding: number, cumulativeShortFunding: number, makerVolume: BN, takerVolume: BN, perpSpotTransfers: BN, avgEntryPricePerBaseLot: number, realizedTradePnlNative: I80F48, realizedOtherPnlNative: I80F48, settlePnlLimitRealizedTrade: BN, realizedPnlForPositionNative: I80F48): PerpPosition
                                                          • Parameters

                                                            • marketIndex: PerpMarketIndex
                                                            • settlePnlLimitWindow: number
                                                            • settlePnlLimitSettledInCurrentWindowNative: BN
                                                            • basePositionLots: BN
                                                            • quotePositionNative: I80F48
                                                            • quoteRunningNative: BN
                                                            • longSettledFunding: I80F48
                                                            • shortSettledFunding: I80F48
                                                            • bidsBaseLots: BN
                                                            • asksBaseLots: BN
                                                            • takerBaseLots: BN
                                                            • takerQuoteLots: BN
                                                            • cumulativeLongFunding: number
                                                            • cumulativeShortFunding: number
                                                            • makerVolume: BN
                                                            • takerVolume: BN
                                                            • perpSpotTransfers: BN
                                                            • avgEntryPricePerBaseLot: number
                                                            • realizedTradePnlNative: I80F48
                                                            • realizedOtherPnlNative: I80F48
                                                            • settlePnlLimitRealizedTrade: BN
                                                            • realizedPnlForPositionNative: I80F48

                                                            Returns PerpPosition

                                                          Properties

                                                          asksBaseLots: BN
                                                          avgEntryPricePerBaseLot: number
                                                          basePositionLots: BN
                                                          bidsBaseLots: BN
                                                          cumulativeLongFunding: number
                                                          cumulativeShortFunding: number
                                                          longSettledFunding: I80F48
                                                          makerVolume: BN
                                                          marketIndex: PerpMarketIndex
                                                          perpSpotTransfers: BN
                                                          quotePositionNative: I80F48
                                                          quoteRunningNative: BN
                                                          realizedOtherPnlNative: I80F48
                                                          realizedPnlForPositionNative: I80F48
                                                          realizedTradePnlNative: I80F48
                                                          settlePnlLimitRealizedTrade: BN
                                                          settlePnlLimitSettledInCurrentWindowNative: BN
                                                          settlePnlLimitWindow: number
                                                          shortSettledFunding: I80F48
                                                          takerBaseLots: BN
                                                          takerQuoteLots: BN
                                                          takerVolume: BN
                                                          PerpMarketIndexUnset: number = 65535

                                                          Methods

                                                          • availableSettleLimit(perpMarket: PerpMarket): [BN, BN]
                                                          • cumulativePnlOverPositionLifetimeUi(perpMarket: PerpMarket): number
                                                          • getAverageEntryPriceUi(perpMarket: PerpMarket): number
                                                          • getBasePositionUi(perpMarket: PerpMarket, useEventQueue?: boolean): number
                                                          • getBreakEvenPriceUi(perpMarket: PerpMarket): number
                                                          • getNotionalValueUi(perpMarket: PerpMarket, useEventQueue?: boolean): number
                                                          • getQuotePositionUi(perpMarket: PerpMarket, useEventQueue?: boolean): number
                                                          • getUnsettledFundingUi(perpMarket: PerpMarket): number
                                                          • hasOpenOrders(): boolean
                                                          • isActive(): boolean

                                                          Legend

                                                          • Constructor
                                                          • Property
                                                          • Method
                                                          • Property
                                                          • Method
                                                          • Private property
                                                          • Private method
                                                          • Static property
                                                          • Static method

                                                          Settings

                                                          Theme

                                                          Generated using TypeDoc

                                                          \ No newline at end of file +PerpPosition | @blockworks-foundation/mango-v4
                                                          Options
                                                          All
                                                          • Public
                                                          • Public/Protected
                                                          • All
                                                          Menu

                                                          Hierarchy

                                                          • PerpPosition

                                                          Index

                                                          Constructors

                                                          • new PerpPosition(marketIndex: PerpMarketIndex, settlePnlLimitWindow: number, settlePnlLimitSettledInCurrentWindowNative: BN, basePositionLots: BN, quotePositionNative: I80F48, quoteRunningNative: BN, longSettledFunding: I80F48, shortSettledFunding: I80F48, bidsBaseLots: BN, asksBaseLots: BN, takerBaseLots: BN, takerQuoteLots: BN, cumulativeLongFunding: number, cumulativeShortFunding: number, makerVolume: BN, takerVolume: BN, perpSpotTransfers: BN, avgEntryPricePerBaseLot: number, realizedTradePnlNative: I80F48, realizedOtherPnlNative: I80F48, settlePnlLimitRealizedTrade: BN, realizedPnlForPositionNative: I80F48): PerpPosition
                                                          • Parameters

                                                            • marketIndex: PerpMarketIndex
                                                            • settlePnlLimitWindow: number
                                                            • settlePnlLimitSettledInCurrentWindowNative: BN
                                                            • basePositionLots: BN
                                                            • quotePositionNative: I80F48
                                                            • quoteRunningNative: BN
                                                            • longSettledFunding: I80F48
                                                            • shortSettledFunding: I80F48
                                                            • bidsBaseLots: BN
                                                            • asksBaseLots: BN
                                                            • takerBaseLots: BN
                                                            • takerQuoteLots: BN
                                                            • cumulativeLongFunding: number
                                                            • cumulativeShortFunding: number
                                                            • makerVolume: BN
                                                            • takerVolume: BN
                                                            • perpSpotTransfers: BN
                                                            • avgEntryPricePerBaseLot: number
                                                            • realizedTradePnlNative: I80F48
                                                            • realizedOtherPnlNative: I80F48
                                                            • settlePnlLimitRealizedTrade: BN
                                                            • realizedPnlForPositionNative: I80F48

                                                            Returns PerpPosition

                                                          Properties

                                                          asksBaseLots: BN
                                                          avgEntryPricePerBaseLot: number
                                                          basePositionLots: BN
                                                          bidsBaseLots: BN
                                                          cumulativeLongFunding: number
                                                          cumulativeShortFunding: number
                                                          longSettledFunding: I80F48
                                                          makerVolume: BN
                                                          marketIndex: PerpMarketIndex
                                                          perpSpotTransfers: BN
                                                          quotePositionNative: I80F48
                                                          quoteRunningNative: BN
                                                          realizedOtherPnlNative: I80F48
                                                          realizedPnlForPositionNative: I80F48
                                                          realizedTradePnlNative: I80F48
                                                          settlePnlLimitRealizedTrade: BN
                                                          settlePnlLimitSettledInCurrentWindowNative: BN
                                                          settlePnlLimitWindow: number
                                                          shortSettledFunding: I80F48
                                                          takerBaseLots: BN
                                                          takerQuoteLots: BN
                                                          takerVolume: BN
                                                          PerpMarketIndexUnset: number = 65535

                                                          Methods

                                                          • availableSettleLimit(perpMarket: PerpMarket): [BN, BN]
                                                          • cumulativePnlOverPositionLifetimeUi(perpMarket: PerpMarket): number
                                                          • getAverageEntryPriceUi(perpMarket: PerpMarket): number
                                                          • getBasePositionUi(perpMarket: PerpMarket, useEventQueue?: boolean): number
                                                          • getBreakEvenPriceUi(perpMarket: PerpMarket): number
                                                          • getNotionalValueUi(perpMarket: PerpMarket, useEventQueue?: boolean): number
                                                          • getQuotePositionUi(perpMarket: PerpMarket, useEventQueue?: boolean): number
                                                          • getUnsettledFundingUi(perpMarket: PerpMarket): number
                                                          • hasOpenOrders(): boolean
                                                          • isActive(): boolean

                                                          Legend

                                                          • Constructor
                                                          • Property
                                                          • Method
                                                          • Property
                                                          • Method
                                                          • Private property
                                                          • Private method
                                                          • Static property
                                                          • Static method

                                                          Settings

                                                          Theme

                                                          Generated using TypeDoc

                                                          \ No newline at end of file diff --git a/ts/client/classes/PerpPositionDto.html b/ts/client/classes/PerpPositionDto.html index 8a6d12829..cef9c74e8 100644 --- a/ts/client/classes/PerpPositionDto.html +++ b/ts/client/classes/PerpPositionDto.html @@ -1 +1 @@ -PerpPositionDto | @blockworks-foundation/mango-v4
                                                          Options
                                                          All
                                                          • Public
                                                          • Public/Protected
                                                          • All
                                                          Menu

                                                          Hierarchy

                                                          • PerpPositionDto

                                                          Index

                                                          Constructors

                                                          • new PerpPositionDto(marketIndex: number, settlePnlLimitWindow: number, settlePnlLimitSettledInCurrentWindowNative: BN, basePositionLots: BN, quotePositionNative: { val: BN }, quoteRunningNative: BN, longSettledFunding: I80F48Dto, shortSettledFunding: I80F48Dto, bidsBaseLots: BN, asksBaseLots: BN, takerBaseLots: BN, takerQuoteLots: BN, cumulativeLongFunding: number, cumulativeShortFunding: number, makerVolume: BN, takerVolume: BN, perpSpotTransfers: BN, avgEntryPricePerBaseLot: number, realizedTradePnlNative: I80F48Dto, realizedOtherPnlNative: I80F48Dto, settlePnlLimitRealizedTrade: BN, realizedPnlForPositionNative: I80F48Dto): PerpPositionDto
                                                          • Parameters

                                                            • marketIndex: number
                                                            • settlePnlLimitWindow: number
                                                            • settlePnlLimitSettledInCurrentWindowNative: BN
                                                            • basePositionLots: BN
                                                            • quotePositionNative: { val: BN }
                                                              • val: BN
                                                            • quoteRunningNative: BN
                                                            • longSettledFunding: I80F48Dto
                                                            • shortSettledFunding: I80F48Dto
                                                            • bidsBaseLots: BN
                                                            • asksBaseLots: BN
                                                            • takerBaseLots: BN
                                                            • takerQuoteLots: BN
                                                            • cumulativeLongFunding: number
                                                            • cumulativeShortFunding: number
                                                            • makerVolume: BN
                                                            • takerVolume: BN
                                                            • perpSpotTransfers: BN
                                                            • avgEntryPricePerBaseLot: number
                                                            • realizedTradePnlNative: I80F48Dto
                                                            • realizedOtherPnlNative: I80F48Dto
                                                            • settlePnlLimitRealizedTrade: BN
                                                            • realizedPnlForPositionNative: I80F48Dto

                                                            Returns PerpPositionDto

                                                          Properties

                                                          asksBaseLots: BN
                                                          avgEntryPricePerBaseLot: number
                                                          basePositionLots: BN
                                                          bidsBaseLots: BN
                                                          cumulativeLongFunding: number
                                                          cumulativeShortFunding: number
                                                          longSettledFunding: I80F48Dto
                                                          makerVolume: BN
                                                          marketIndex: number
                                                          perpSpotTransfers: BN
                                                          quotePositionNative: { val: BN }

                                                          Type declaration

                                                          • val: BN
                                                          quoteRunningNative: BN
                                                          realizedOtherPnlNative: I80F48Dto
                                                          realizedPnlForPositionNative: I80F48Dto
                                                          realizedTradePnlNative: I80F48Dto
                                                          settlePnlLimitRealizedTrade: BN
                                                          settlePnlLimitSettledInCurrentWindowNative: BN
                                                          settlePnlLimitWindow: number
                                                          shortSettledFunding: I80F48Dto
                                                          takerBaseLots: BN
                                                          takerQuoteLots: BN
                                                          takerVolume: BN

                                                          Legend

                                                          • Constructor
                                                          • Property
                                                          • Method
                                                          • Property
                                                          • Method
                                                          • Private property
                                                          • Private method
                                                          • Static property
                                                          • Static method

                                                          Settings

                                                          Theme

                                                          Generated using TypeDoc

                                                          \ No newline at end of file +PerpPositionDto | @blockworks-foundation/mango-v4
                                                          Options
                                                          All
                                                          • Public
                                                          • Public/Protected
                                                          • All
                                                          Menu

                                                          Hierarchy

                                                          • PerpPositionDto

                                                          Index

                                                          Constructors

                                                          • new PerpPositionDto(marketIndex: number, settlePnlLimitWindow: number, settlePnlLimitSettledInCurrentWindowNative: BN, basePositionLots: BN, quotePositionNative: { val: BN }, quoteRunningNative: BN, longSettledFunding: I80F48Dto, shortSettledFunding: I80F48Dto, bidsBaseLots: BN, asksBaseLots: BN, takerBaseLots: BN, takerQuoteLots: BN, cumulativeLongFunding: number, cumulativeShortFunding: number, makerVolume: BN, takerVolume: BN, perpSpotTransfers: BN, avgEntryPricePerBaseLot: number, realizedTradePnlNative: I80F48Dto, realizedOtherPnlNative: I80F48Dto, settlePnlLimitRealizedTrade: BN, realizedPnlForPositionNative: I80F48Dto): PerpPositionDto
                                                          • Parameters

                                                            • marketIndex: number
                                                            • settlePnlLimitWindow: number
                                                            • settlePnlLimitSettledInCurrentWindowNative: BN
                                                            • basePositionLots: BN
                                                            • quotePositionNative: { val: BN }
                                                              • val: BN
                                                            • quoteRunningNative: BN
                                                            • longSettledFunding: I80F48Dto
                                                            • shortSettledFunding: I80F48Dto
                                                            • bidsBaseLots: BN
                                                            • asksBaseLots: BN
                                                            • takerBaseLots: BN
                                                            • takerQuoteLots: BN
                                                            • cumulativeLongFunding: number
                                                            • cumulativeShortFunding: number
                                                            • makerVolume: BN
                                                            • takerVolume: BN
                                                            • perpSpotTransfers: BN
                                                            • avgEntryPricePerBaseLot: number
                                                            • realizedTradePnlNative: I80F48Dto
                                                            • realizedOtherPnlNative: I80F48Dto
                                                            • settlePnlLimitRealizedTrade: BN
                                                            • realizedPnlForPositionNative: I80F48Dto

                                                            Returns PerpPositionDto

                                                          Properties

                                                          asksBaseLots: BN
                                                          avgEntryPricePerBaseLot: number
                                                          basePositionLots: BN
                                                          bidsBaseLots: BN
                                                          cumulativeLongFunding: number
                                                          cumulativeShortFunding: number
                                                          longSettledFunding: I80F48Dto
                                                          makerVolume: BN
                                                          marketIndex: number
                                                          perpSpotTransfers: BN
                                                          quotePositionNative: { val: BN }

                                                          Type declaration

                                                          • val: BN
                                                          quoteRunningNative: BN
                                                          realizedOtherPnlNative: I80F48Dto
                                                          realizedPnlForPositionNative: I80F48Dto
                                                          realizedTradePnlNative: I80F48Dto
                                                          settlePnlLimitRealizedTrade: BN
                                                          settlePnlLimitSettledInCurrentWindowNative: BN
                                                          settlePnlLimitWindow: number
                                                          shortSettledFunding: I80F48Dto
                                                          takerBaseLots: BN
                                                          takerQuoteLots: BN
                                                          takerVolume: BN

                                                          Legend

                                                          • Constructor
                                                          • Property
                                                          • Method
                                                          • Property
                                                          • Method
                                                          • Private property
                                                          • Private method
                                                          • Static property
                                                          • Static method

                                                          Settings

                                                          Theme

                                                          Generated using TypeDoc

                                                          \ No newline at end of file diff --git a/ts/client/classes/Serum3Market.html b/ts/client/classes/Serum3Market.html index 421268536..d83d07a23 100644 --- a/ts/client/classes/Serum3Market.html +++ b/ts/client/classes/Serum3Market.html @@ -1,5 +1,5 @@ -Serum3Market | @blockworks-foundation/mango-v4
                                                          Options
                                                          All
                                                          • Public
                                                          • Public/Protected
                                                          • All
                                                          Menu

                                                          Hierarchy

                                                          • Serum3Market

                                                          Index

                                                          Constructors

                                                          • new Serum3Market(publicKey: PublicKey, group: PublicKey, baseTokenIndex: TokenIndex, quoteTokenIndex: TokenIndex, name: number[], serumProgram: PublicKey, serumMarketExternal: PublicKey, marketIndex: MarketIndex, registrationTime: BN, reduceOnly: boolean, forceClose: boolean): Serum3Market
                                                          • Parameters

                                                            • publicKey: PublicKey
                                                            • group: PublicKey
                                                            • baseTokenIndex: TokenIndex
                                                            • quoteTokenIndex: TokenIndex
                                                            • name: number[]
                                                            • serumProgram: PublicKey
                                                            • serumMarketExternal: PublicKey
                                                            • marketIndex: MarketIndex
                                                            • registrationTime: BN
                                                            • reduceOnly: boolean
                                                            • forceClose: boolean

                                                            Returns Serum3Market

                                                          Properties

                                                          baseTokenIndex: TokenIndex
                                                          forceClose: boolean
                                                          group: PublicKey
                                                          marketIndex: MarketIndex
                                                          name: string
                                                          publicKey: PublicKey
                                                          quoteTokenIndex: TokenIndex
                                                          reduceOnly: boolean
                                                          registrationTime: BN
                                                          serumMarketExternal: PublicKey
                                                          serumProgram: PublicKey

                                                          Methods

                                                          • computePriceForMarketOrderOfSize(client: MangoClient, group: Group, size: number, side: "buy" | "sell"): Promise<number>
                                                          • findOoPda(programId: PublicKey, mangoAccount: PublicKey): Promise<PublicKey>
                                                          • Parameters

                                                            • programId: PublicKey
                                                            • mangoAccount: PublicKey

                                                            Returns Promise<PublicKey>

                                                          • getFeeRates(taker?: boolean): number
                                                          • maxAskLeverage(group: Group): number
                                                          • from(publicKey: PublicKey, obj: { baseTokenIndex: number; forceClose: number; group: PublicKey; marketIndex: number; name: number[]; quoteTokenIndex: number; reduceOnly: number; registrationTime: BN; serumMarketExternal: PublicKey; serumProgram: PublicKey }): Serum3Market
                                                          • Parameters

                                                            • publicKey: PublicKey
                                                            • obj: { baseTokenIndex: number; forceClose: number; group: PublicKey; marketIndex: number; name: number[]; quoteTokenIndex: number; reduceOnly: number; registrationTime: BN; serumMarketExternal: PublicKey; serumProgram: PublicKey }
                                                              • baseTokenIndex: number
                                                              • forceClose: number
                                                              • group: PublicKey
                                                              • marketIndex: number
                                                              • name: number[]
                                                              • quoteTokenIndex: number
                                                              • reduceOnly: number
                                                              • registrationTime: BN
                                                              • serumMarketExternal: PublicKey
                                                              • serumProgram: PublicKey

                                                            Returns Serum3Market

                                                          Legend

                                                          • Constructor
                                                          • Property
                                                          • Method
                                                          • Property
                                                          • Method
                                                          • Private property
                                                          • Private method
                                                          • Static property
                                                          • Static method

                                                          Settings

                                                          Theme

                                                          Generated using TypeDoc

                                                          \ No newline at end of file diff --git a/ts/client/classes/Serum3OrderType.html b/ts/client/classes/Serum3OrderType.html index 2725407a4..9a2a4f7fc 100644 --- a/ts/client/classes/Serum3OrderType.html +++ b/ts/client/classes/Serum3OrderType.html @@ -1 +1 @@ -Serum3OrderType | @blockworks-foundation/mango-v4
                                                          Options
                                                          All
                                                          • Public
                                                          • Public/Protected
                                                          • All
                                                          Menu

                                                          Hierarchy

                                                          • Serum3OrderType

                                                          Index

                                                          Constructors

                                                          Properties

                                                          immediateOrCancel: { immediateOrCancel: {} } = ...

                                                          Type declaration

                                                          • immediateOrCancel: {}
                                                            limit: { limit: {} } = ...

                                                            Type declaration

                                                            • limit: {}
                                                              postOnly: { postOnly: {} } = ...

                                                              Type declaration

                                                              • postOnly: {}

                                                                Legend

                                                                • Constructor
                                                                • Property
                                                                • Method
                                                                • Property
                                                                • Method
                                                                • Private property
                                                                • Private method
                                                                • Static property
                                                                • Static method

                                                                Settings

                                                                Theme

                                                                Generated using TypeDoc

                                                                \ No newline at end of file +Serum3OrderType | @blockworks-foundation/mango-v4
                                                                Options
                                                                All
                                                                • Public
                                                                • Public/Protected
                                                                • All
                                                                Menu

                                                                Hierarchy

                                                                • Serum3OrderType

                                                                Index

                                                                Constructors

                                                                Properties

                                                                immediateOrCancel: { immediateOrCancel: {} } = ...

                                                                Type declaration

                                                                • immediateOrCancel: {}
                                                                  limit: { limit: {} } = ...

                                                                  Type declaration

                                                                  • limit: {}
                                                                    postOnly: { postOnly: {} } = ...

                                                                    Type declaration

                                                                    • postOnly: {}

                                                                      Legend

                                                                      • Constructor
                                                                      • Property
                                                                      • Method
                                                                      • Property
                                                                      • Method
                                                                      • Private property
                                                                      • Private method
                                                                      • Static property
                                                                      • Static method

                                                                      Settings

                                                                      Theme

                                                                      Generated using TypeDoc

                                                                      \ No newline at end of file diff --git a/ts/client/classes/Serum3Orders.html b/ts/client/classes/Serum3Orders.html index 53859e3ea..efa21aefc 100644 --- a/ts/client/classes/Serum3Orders.html +++ b/ts/client/classes/Serum3Orders.html @@ -1 +1 @@ -Serum3Orders | @blockworks-foundation/mango-v4
                                                                      Options
                                                                      All
                                                                      • Public
                                                                      • Public/Protected
                                                                      • All
                                                                      Menu

                                                                      Hierarchy

                                                                      • Serum3Orders

                                                                      Index

                                                                      Constructors

                                                                      Properties

                                                                      baseTokenIndex: TokenIndex
                                                                      marketIndex: MarketIndex
                                                                      openOrders: PublicKey
                                                                      quoteTokenIndex: TokenIndex
                                                                      Serum3MarketIndexUnset: number = 65535

                                                                      Methods

                                                                      • isActive(): boolean

                                                                      Legend

                                                                      • Constructor
                                                                      • Property
                                                                      • Method
                                                                      • Property
                                                                      • Method
                                                                      • Private property
                                                                      • Private method
                                                                      • Static property
                                                                      • Static method

                                                                      Settings

                                                                      Theme

                                                                      Generated using TypeDoc

                                                                      \ No newline at end of file +Serum3Orders | @blockworks-foundation/mango-v4
                                                                      Options
                                                                      All
                                                                      • Public
                                                                      • Public/Protected
                                                                      • All
                                                                      Menu

                                                                      Hierarchy

                                                                      • Serum3Orders

                                                                      Index

                                                                      Constructors

                                                                      Properties

                                                                      baseTokenIndex: TokenIndex
                                                                      marketIndex: MarketIndex
                                                                      openOrders: PublicKey
                                                                      quoteTokenIndex: TokenIndex
                                                                      Serum3MarketIndexUnset: number = 65535

                                                                      Methods

                                                                      • isActive(): boolean

                                                                      Legend

                                                                      • Constructor
                                                                      • Property
                                                                      • Method
                                                                      • Property
                                                                      • Method
                                                                      • Private property
                                                                      • Private method
                                                                      • Static property
                                                                      • Static method

                                                                      Settings

                                                                      Theme

                                                                      Generated using TypeDoc

                                                                      \ No newline at end of file diff --git a/ts/client/classes/Serum3PositionDto.html b/ts/client/classes/Serum3PositionDto.html index 8fbe48c3c..da574c1a0 100644 --- a/ts/client/classes/Serum3PositionDto.html +++ b/ts/client/classes/Serum3PositionDto.html @@ -1 +1 @@ -Serum3PositionDto | @blockworks-foundation/mango-v4
                                                                      Options
                                                                      All
                                                                      • Public
                                                                      • Public/Protected
                                                                      • All
                                                                      Menu

                                                                      Hierarchy

                                                                      • Serum3PositionDto

                                                                      Index

                                                                      Constructors

                                                                      • new Serum3PositionDto(openOrders: PublicKey, marketIndex: number, baseBorrowsWithoutFee: BN, quoteBorrowsWithoutFee: BN, baseTokenIndex: number, quoteTokenIndex: number, reserved: number[]): Serum3PositionDto

                                                                      Properties

                                                                      baseBorrowsWithoutFee: BN
                                                                      baseTokenIndex: number
                                                                      marketIndex: number
                                                                      openOrders: PublicKey
                                                                      quoteBorrowsWithoutFee: BN
                                                                      quoteTokenIndex: number
                                                                      reserved: number[]

                                                                      Legend

                                                                      • Constructor
                                                                      • Property
                                                                      • Method
                                                                      • Property
                                                                      • Method
                                                                      • Private property
                                                                      • Private method
                                                                      • Static property
                                                                      • Static method

                                                                      Settings

                                                                      Theme

                                                                      Generated using TypeDoc

                                                                      \ No newline at end of file +Serum3PositionDto | @blockworks-foundation/mango-v4
                                                                      Options
                                                                      All
                                                                      • Public
                                                                      • Public/Protected
                                                                      • All
                                                                      Menu

                                                                      Hierarchy

                                                                      • Serum3PositionDto

                                                                      Index

                                                                      Constructors

                                                                      • new Serum3PositionDto(openOrders: PublicKey, marketIndex: number, baseBorrowsWithoutFee: BN, quoteBorrowsWithoutFee: BN, baseTokenIndex: number, quoteTokenIndex: number, reserved: number[]): Serum3PositionDto

                                                                      Properties

                                                                      baseBorrowsWithoutFee: BN
                                                                      baseTokenIndex: number
                                                                      marketIndex: number
                                                                      openOrders: PublicKey
                                                                      quoteBorrowsWithoutFee: BN
                                                                      quoteTokenIndex: number
                                                                      reserved: number[]

                                                                      Legend

                                                                      • Constructor
                                                                      • Property
                                                                      • Method
                                                                      • Property
                                                                      • Method
                                                                      • Private property
                                                                      • Private method
                                                                      • Static property
                                                                      • Static method

                                                                      Settings

                                                                      Theme

                                                                      Generated using TypeDoc

                                                                      \ No newline at end of file diff --git a/ts/client/classes/Serum3SelfTradeBehavior.html b/ts/client/classes/Serum3SelfTradeBehavior.html index eb8606a02..0a6a2f30b 100644 --- a/ts/client/classes/Serum3SelfTradeBehavior.html +++ b/ts/client/classes/Serum3SelfTradeBehavior.html @@ -1 +1 @@ -Serum3SelfTradeBehavior | @blockworks-foundation/mango-v4
                                                                      Options
                                                                      All
                                                                      • Public
                                                                      • Public/Protected
                                                                      • All
                                                                      Menu

                                                                      Hierarchy

                                                                      • Serum3SelfTradeBehavior

                                                                      Index

                                                                      Constructors

                                                                      Properties

                                                                      abortTransaction: { abortTransaction: {} } = ...

                                                                      Type declaration

                                                                      • abortTransaction: {}
                                                                        cancelProvide: { cancelProvide: {} } = ...

                                                                        Type declaration

                                                                        • cancelProvide: {}
                                                                          decrementTake: { decrementTake: {} } = ...

                                                                          Type declaration

                                                                          • decrementTake: {}

                                                                            Legend

                                                                            • Constructor
                                                                            • Property
                                                                            • Method
                                                                            • Property
                                                                            • Method
                                                                            • Private property
                                                                            • Private method
                                                                            • Static property
                                                                            • Static method

                                                                            Settings

                                                                            Theme

                                                                            Generated using TypeDoc

                                                                            \ No newline at end of file +Serum3SelfTradeBehavior | @blockworks-foundation/mango-v4
                                                                            Options
                                                                            All
                                                                            • Public
                                                                            • Public/Protected
                                                                            • All
                                                                            Menu

                                                                            Hierarchy

                                                                            • Serum3SelfTradeBehavior

                                                                            Index

                                                                            Constructors

                                                                            Properties

                                                                            abortTransaction: { abortTransaction: {} } = ...

                                                                            Type declaration

                                                                            • abortTransaction: {}
                                                                              cancelProvide: { cancelProvide: {} } = ...

                                                                              Type declaration

                                                                              • cancelProvide: {}
                                                                                decrementTake: { decrementTake: {} } = ...

                                                                                Type declaration

                                                                                • decrementTake: {}

                                                                                  Legend

                                                                                  • Constructor
                                                                                  • Property
                                                                                  • Method
                                                                                  • Property
                                                                                  • Method
                                                                                  • Private property
                                                                                  • Private method
                                                                                  • Static property
                                                                                  • Static method

                                                                                  Settings

                                                                                  Theme

                                                                                  Generated using TypeDoc

                                                                                  \ No newline at end of file diff --git a/ts/client/classes/Serum3Side.html b/ts/client/classes/Serum3Side.html index e433515b5..a0512537e 100644 --- a/ts/client/classes/Serum3Side.html +++ b/ts/client/classes/Serum3Side.html @@ -1 +1 @@ -Serum3Side | @blockworks-foundation/mango-v4
                                                                                  Options
                                                                                  All
                                                                                  • Public
                                                                                  • Public/Protected
                                                                                  • All
                                                                                  Menu

                                                                                  Hierarchy

                                                                                  • Serum3Side

                                                                                  Index

                                                                                  Constructors

                                                                                  Properties

                                                                                  Constructors

                                                                                  Properties

                                                                                  ask: { ask: {} } = ...

                                                                                  Type declaration

                                                                                  • ask: {}
                                                                                    bid: { bid: {} } = ...

                                                                                    Type declaration

                                                                                    • bid: {}

                                                                                      Legend

                                                                                      • Constructor
                                                                                      • Property
                                                                                      • Method
                                                                                      • Property
                                                                                      • Method
                                                                                      • Private property
                                                                                      • Private method
                                                                                      • Static property
                                                                                      • Static method

                                                                                      Settings

                                                                                      Theme

                                                                                      Generated using TypeDoc

                                                                                      \ No newline at end of file +Serum3Side | @blockworks-foundation/mango-v4
                                                                                      Options
                                                                                      All
                                                                                      • Public
                                                                                      • Public/Protected
                                                                                      • All
                                                                                      Menu

                                                                                      Hierarchy

                                                                                      • Serum3Side

                                                                                      Index

                                                                                      Constructors

                                                                                      Properties

                                                                                      Constructors

                                                                                      Properties

                                                                                      ask: { ask: {} } = ...

                                                                                      Type declaration

                                                                                      • ask: {}
                                                                                        bid: { bid: {} } = ...

                                                                                        Type declaration

                                                                                        • bid: {}

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/classes/StubOracle.html b/ts/client/classes/StubOracle.html index 835758822..2f83bea88 100644 --- a/ts/client/classes/StubOracle.html +++ b/ts/client/classes/StubOracle.html @@ -1 +1 @@ -StubOracle | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • StubOracle

                                                                                          Index

                                                                                          Constructors

                                                                                          • new StubOracle(publicKey: PublicKey, group: PublicKey, mint: PublicKey, price: I80F48Dto, lastUpdated: BN): StubOracle

                                                                                          Properties

                                                                                          group: PublicKey
                                                                                          lastUpdated: BN
                                                                                          mint: PublicKey
                                                                                          price: I80F48
                                                                                          publicKey: PublicKey

                                                                                          Methods

                                                                                          • from(publicKey: PublicKey, obj: { group: PublicKey; lastUpdated: BN; mint: PublicKey; price: I80F48Dto }): StubOracle

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +StubOracle | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • StubOracle

                                                                                          Index

                                                                                          Constructors

                                                                                          • new StubOracle(publicKey: PublicKey, group: PublicKey, mint: PublicKey, price: I80F48Dto, lastUpdated: BN): StubOracle

                                                                                          Properties

                                                                                          group: PublicKey
                                                                                          lastUpdated: BN
                                                                                          mint: PublicKey
                                                                                          price: I80F48
                                                                                          publicKey: PublicKey

                                                                                          Methods

                                                                                          • from(publicKey: PublicKey, obj: { group: PublicKey; lastUpdated: BN; mint: PublicKey; price: I80F48Dto }): StubOracle

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/classes/TokenPosition.html b/ts/client/classes/TokenPosition.html index 3c0d93529..1809e608c 100644 --- a/ts/client/classes/TokenPosition.html +++ b/ts/client/classes/TokenPosition.html @@ -1,7 +1,7 @@ -TokenPosition | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • TokenPosition

                                                                                          Index

                                                                                          Constructors

                                                                                          • new TokenPosition(indexedPosition: I80F48, tokenIndex: TokenIndex, inUseCount: number, previousIndex: I80F48, cumulativeDepositInterest: number, cumulativeBorrowInterest: number): TokenPosition

                                                                                          Properties

                                                                                          cumulativeBorrowInterest: number
                                                                                          cumulativeDepositInterest: number
                                                                                          inUseCount: number
                                                                                          indexedPosition: I80F48
                                                                                          previousIndex: I80F48
                                                                                          tokenIndex: TokenIndex
                                                                                          TokenIndexUnset: number = 65535

                                                                                          Methods

                                                                                          • balanceUi(bank: Bank): number
                                                                                          • borrowsUi(bank: Bank): number
                                                                                          • depositsUi(bank: Bank): number
                                                                                          • isActive(): boolean
                                                                                          • toString(group?: Group, index?: number): string

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +TokenPosition | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • TokenPosition

                                                                                          Index

                                                                                          Constructors

                                                                                          • new TokenPosition(indexedPosition: I80F48, tokenIndex: TokenIndex, inUseCount: number, previousIndex: I80F48, cumulativeDepositInterest: number, cumulativeBorrowInterest: number): TokenPosition

                                                                                          Properties

                                                                                          cumulativeBorrowInterest: number
                                                                                          cumulativeDepositInterest: number
                                                                                          inUseCount: number
                                                                                          indexedPosition: I80F48
                                                                                          previousIndex: I80F48
                                                                                          tokenIndex: TokenIndex
                                                                                          TokenIndexUnset: number = 65535

                                                                                          Methods

                                                                                          • balanceUi(bank: Bank): number
                                                                                          • borrowsUi(bank: Bank): number
                                                                                          • depositsUi(bank: Bank): number
                                                                                          • isActive(): boolean
                                                                                          • toString(group?: Group, index?: number): string

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/classes/TokenPositionDto.html b/ts/client/classes/TokenPositionDto.html index 752e0c24a..ed9d65768 100644 --- a/ts/client/classes/TokenPositionDto.html +++ b/ts/client/classes/TokenPositionDto.html @@ -1 +1 @@ -TokenPositionDto | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • TokenPositionDto

                                                                                          Index

                                                                                          Constructors

                                                                                          • new TokenPositionDto(indexedPosition: I80F48Dto, tokenIndex: number, inUseCount: number, reserved: number[], previousIndex: I80F48Dto, cumulativeDepositInterest: number, cumulativeBorrowInterest: number): TokenPositionDto

                                                                                          Properties

                                                                                          cumulativeBorrowInterest: number
                                                                                          cumulativeDepositInterest: number
                                                                                          inUseCount: number
                                                                                          indexedPosition: I80F48Dto
                                                                                          previousIndex: I80F48Dto
                                                                                          reserved: number[]
                                                                                          tokenIndex: number

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +TokenPositionDto | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • TokenPositionDto

                                                                                          Index

                                                                                          Constructors

                                                                                          • new TokenPositionDto(indexedPosition: I80F48Dto, tokenIndex: number, inUseCount: number, reserved: number[], previousIndex: I80F48Dto, cumulativeDepositInterest: number, cumulativeBorrowInterest: number): TokenPositionDto

                                                                                          Properties

                                                                                          cumulativeBorrowInterest: number
                                                                                          cumulativeDepositInterest: number
                                                                                          inUseCount: number
                                                                                          indexedPosition: I80F48Dto
                                                                                          previousIndex: I80F48Dto
                                                                                          reserved: number[]
                                                                                          tokenIndex: number

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/enums/OracleProvider.html b/ts/client/enums/OracleProvider.html index 6bf23b92c..c722238f2 100644 --- a/ts/client/enums/OracleProvider.html +++ b/ts/client/enums/OracleProvider.html @@ -1 +1 @@ -OracleProvider | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Index

                                                                                          Enumeration members

                                                                                          Enumeration members

                                                                                          Pyth = 0
                                                                                          Stub = 2
                                                                                          Switchboard = 1

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +OracleProvider | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Index

                                                                                          Enumeration members

                                                                                          Enumeration members

                                                                                          Pyth = 0
                                                                                          Stub = 2
                                                                                          Switchboard = 1

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/enums/SwapMode.html b/ts/client/enums/SwapMode.html index f9fd5658c..2bc6cd61d 100644 --- a/ts/client/enums/SwapMode.html +++ b/ts/client/enums/SwapMode.html @@ -1 +1 @@ -SwapMode | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Index

                                                                                          Enumeration members

                                                                                          Enumeration members

                                                                                          ExactIn = "ExactIn"
                                                                                          ExactOut = "ExactOut"

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +SwapMode | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Index

                                                                                          Enumeration members

                                                                                          Enumeration members

                                                                                          ExactIn = "ExactIn"
                                                                                          ExactOut = "ExactOut"

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/index.html b/ts/client/index.html index affd3c337..8a8baf600 100644 --- a/ts/client/index.html +++ b/ts/client/index.html @@ -1,4 +1,4 @@ -@blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          @blockworks-foundation/mango-v4

                                                                                          Index

                                                                                          Type aliases

                                                                                          AccountInfoMap: Map<string, AccountInfo<Buffer> | null>
                                                                                          AmmLabel: "Aldrin" | "Crema" | "Cropper" | "Cykura" | "DeltaFi" | "GooseFX" | "Invariant" | "Lifinity" | "Lifinity V2" | "Marinade" | "Mercurial" | "Meteora" | "Raydium" | "Raydium CLMM" | "Saber" | "Serum" | "Orca" | "Step" | "Penguin" | "Saros" | "Stepn" | "Orca (Whirlpools)" | "Sencha" | "Saber (Decimals)" | "Dradex" | "Balansol" | "Openbook" | "Unknown"
                                                                                          Modify<T, R>: Omit<T, keyof R> & R

                                                                                          Type parameters

                                                                                          • T

                                                                                          • R

                                                                                          OracleConfig: { confFilter: I80F48; maxStalenessSlots: BN }

                                                                                          Type declaration

                                                                                          • confFilter: I80F48
                                                                                          • maxStalenessSlots: BN
                                                                                          OracleConfigDto: { confFilter: I80F48Dto; maxStalenessSlots: BN }

                                                                                          Type declaration

                                                                                          ParsedFillEvent: Modify<FillEvent, { price: number; quantity: number }>
                                                                                          PerpMarketIndex: number & As<"perp-market-index">
                                                                                          PlatformFee: { feeAccount: string; feeBps: number }

                                                                                          Type declaration

                                                                                          • feeAccount: string
                                                                                          • feeBps: number
                                                                                          QuoteMintToReferrer: Map<TokenMintAddress, string>
                                                                                          Routes: { bestRoute: RouteInfo | null; routes: RouteInfo[] }

                                                                                          Type declaration

                                                                                          StablePriceModel: { delayAccumulatorPrice: number; delayAccumulatorTime: number; delayGrowthLimit: number; delayIntervalSeconds: number; delayPrices: number[]; lastDelayIntervalIndex: number; lastUpdateTimestamp: BN; stableGrowthLimit: number; stablePrice: number }

                                                                                          Type declaration

                                                                                          • delayAccumulatorPrice: number
                                                                                          • delayAccumulatorTime: number
                                                                                          • delayGrowthLimit: number
                                                                                          • delayIntervalSeconds: number
                                                                                          • delayPrices: number[]
                                                                                          • lastDelayIntervalIndex: number
                                                                                          • lastUpdateTimestamp: BN
                                                                                          • stableGrowthLimit: number
                                                                                          • stablePrice: number
                                                                                          Token: { address: string; chainId: number; decimals: number; extensions: { coingeckoId?: string }; logoURI: string; name: string; symbol: string; tags: string[] }

                                                                                          Type declaration

                                                                                          • address: string
                                                                                          • chainId: number
                                                                                          • decimals: number
                                                                                          • extensions: { coingeckoId?: string }
                                                                                            • Optional coingeckoId?: string
                                                                                          • logoURI: string
                                                                                          • name: string
                                                                                          • symbol: string
                                                                                          • tags: string[]
                                                                                          TokenIndex: number & As<"token-index">
                                                                                          TokenMintAddress: string

                                                                                          Variables

                                                                                          I64_MAX_BN: BN = ...
                                                                                          MANGO_ROUTER_API_URL: "https://api.mngo.cloud/router/v1" = 'https://api.mngo.cloud/router/v1'
                                                                                          MANGO_V4_ID: { devnet: PublicKey; mainnet-beta: PublicKey; testnet: PublicKey } = ...

                                                                                          Type declaration

                                                                                          • devnet: PublicKey
                                                                                          • mainnet-beta: PublicKey
                                                                                          • testnet: PublicKey
                                                                                          NullPerpEditParams: PerpEditParams = ...
                                                                                          NullTokenEditParams: TokenEditParams = ...
                                                                                          OPENBOOK_PROGRAM_ID: { devnet: PublicKey; mainnet-beta: PublicKey } = ...

                                                                                          Type declaration

                                                                                          • devnet: PublicKey
                                                                                          • mainnet-beta: PublicKey
                                                                                          QUOTE_DECIMALS: 6 = 6
                                                                                          TrueIxGateParams: IxGateParams = ...
                                                                                          U64_MAX_BN: BN = ...

                                                                                          Functions

                                                                                          • RUST_I64_MAX(): BN
                                                                                          • RUST_I64_MIN(): BN
                                                                                          • RUST_U64_MAX(): BN
                                                                                          • bpsToDecimal(bps: number): number
                                                                                          • Parameters

                                                                                            • bps: number

                                                                                            Returns number

                                                                                          • buildIxGate(p: IxGateParams): BN
                                                                                          • buildVersionedTx(provider: AnchorProvider, ix: TransactionInstruction[], additionalSigners?: Signer[], alts?: AddressLookupTableAccount[]): Promise<VersionedTransaction>
                                                                                          • Parameters

                                                                                            • provider: AnchorProvider
                                                                                            • ix: TransactionInstruction[]
                                                                                            • additionalSigners: Signer[] = []
                                                                                            • alts: AddressLookupTableAccount[] = []

                                                                                            Returns Promise<VersionedTransaction>

                                                                                          • createAssociatedTokenAccountIdempotentInstruction(payer: PublicKey, owner: PublicKey, mint: PublicKey): Promise<TransactionInstruction>
                                                                                          • Parameters

                                                                                            • payer: PublicKey
                                                                                            • owner: PublicKey
                                                                                            • mint: PublicKey

                                                                                            Returns Promise<TransactionInstruction>

                                                                                          • fetchJupiterTransaction(connection: Connection, selectedRoute: RouteInfo, userPublicKey: PublicKey, slippage: number, inputMint: PublicKey, outputMint: PublicKey): Promise<[TransactionInstruction[], AddressLookupTableAccount[]]>
                                                                                          • Parameters

                                                                                            • connection: Connection
                                                                                            • selectedRoute: RouteInfo
                                                                                            • userPublicKey: PublicKey
                                                                                            • slippage: number
                                                                                            • inputMint: PublicKey
                                                                                            • outputMint: PublicKey

                                                                                            Returns Promise<[TransactionInstruction[], AddressLookupTableAccount[]]>

                                                                                          • fetchRoutes(inputMint: any, outputMint: any, amount?: string, slippage?: number, swapMode?: string, feeBps?: string, wallet?: PublicKey): Promise<Routes>
                                                                                          • Parameters

                                                                                            • inputMint: any
                                                                                            • outputMint: any
                                                                                            • amount: string = '0'
                                                                                            • slippage: number = 50
                                                                                            • swapMode: string = 'ExactIn'
                                                                                            • feeBps: string = '0'
                                                                                            • wallet: PublicKey = PublicKey.default

                                                                                            Returns Promise<Routes>

                                                                                          • getAssociatedTokenAddress(mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, programId?: PublicKey, associatedTokenProgramId?: PublicKey): Promise<PublicKey>
                                                                                          • percentageToDecimal(percentage: number): number
                                                                                          • Parameters

                                                                                            • percentage: number

                                                                                            Returns number

                                                                                          • prepareMangoRouterInstructions(selectedRoute: RouteInfo, inputMint: PublicKey, outputMint: PublicKey, userPublicKey: PublicKey): Promise<[TransactionInstruction[], AddressLookupTableAccount[]]>
                                                                                          • Parameters

                                                                                            • selectedRoute: RouteInfo
                                                                                            • inputMint: PublicKey
                                                                                            • outputMint: PublicKey
                                                                                            • userPublicKey: PublicKey

                                                                                            Returns Promise<[TransactionInstruction[], AddressLookupTableAccount[]]>

                                                                                          • toNative(uiAmount: number, decimals: number): BN
                                                                                          • Parameters

                                                                                            • uiAmount: number
                                                                                            • decimals: number

                                                                                            Returns BN

                                                                                          • toNativeI80F48(uiAmount: number, decimals: number): I80F48
                                                                                          • toNativeI80F48ForQuote(uiAmount: number): I80F48
                                                                                          • toUiDecimals(nativeAmount: number | BN | I80F48, decimals: number): number
                                                                                          • Parameters

                                                                                            • nativeAmount: number | BN | I80F48
                                                                                            • decimals: number

                                                                                            Returns number

                                                                                          • toUiDecimalsForQuote(nativeAmount: number | BN | I80F48): number

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/BankForHealth.html b/ts/client/interfaces/BankForHealth.html index f496fd007..80f2f11b8 100644 --- a/ts/client/interfaces/BankForHealth.html +++ b/ts/client/interfaces/BankForHealth.html @@ -1 +1 @@ -BankForHealth | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • BankForHealth

                                                                                          Implemented by

                                                                                          Index

                                                                                          Properties

                                                                                          initAssetWeight: I80F48
                                                                                          initLiabWeight: I80F48
                                                                                          maintAssetWeight: I80F48
                                                                                          maintLiabWeight: I80F48
                                                                                          price: I80F48
                                                                                          stablePriceModel: StablePriceModel
                                                                                          tokenIndex: TokenIndex

                                                                                          Methods

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +BankForHealth | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • BankForHealth

                                                                                          Implemented by

                                                                                          Index

                                                                                          Properties

                                                                                          initAssetWeight: I80F48
                                                                                          initLiabWeight: I80F48
                                                                                          maintAssetWeight: I80F48
                                                                                          maintLiabWeight: I80F48
                                                                                          price: I80F48
                                                                                          stablePriceModel: StablePriceModel
                                                                                          tokenIndex: TokenIndex

                                                                                          Methods

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/Event.html b/ts/client/interfaces/Event.html index 5adb8952f..8705c66ef 100644 --- a/ts/client/interfaces/Event.html +++ b/ts/client/interfaces/Event.html @@ -1 +1 @@ -Event | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          Index

                                                                                          Properties

                                                                                          Properties

                                                                                          eventType: number

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +Event | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          Index

                                                                                          Properties

                                                                                          Properties

                                                                                          eventType: number

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/ExactOutSwapParams.html b/ts/client/interfaces/ExactOutSwapParams.html index f134f08a8..ee3c44fe2 100644 --- a/ts/client/interfaces/ExactOutSwapParams.html +++ b/ts/client/interfaces/ExactOutSwapParams.html @@ -1,3 +1,3 @@ -ExactOutSwapParams | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          Index

                                                                                          Properties

                                                                                          amount: number
                                                                                          +ExactOutSwapParams | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          Index

                                                                                          Properties

                                                                                          amount: number

                                                                                          amount is used for instruction and can be null when it is an intermediate swap, only the first swap has an amount

                                                                                          -
                                                                                          destinationMint: string
                                                                                          inAmount: number
                                                                                          openOrdersAddress?: string
                                                                                          overflowFeeAccount?: string
                                                                                          platformFee?: PlatformFee
                                                                                          quoteMintToReferrer?: QuoteMintToReferrer
                                                                                          slippageBps: number
                                                                                          sourceMint: string
                                                                                          swapMode: SwapMode
                                                                                          userDestinationTokenAccount: string
                                                                                          userSourceTokenAccount: string
                                                                                          userTransferAuthority: string

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +
                                                                                          destinationMint: string
                                                                                          inAmount: number
                                                                                          openOrdersAddress?: string
                                                                                          overflowFeeAccount?: string
                                                                                          platformFee?: PlatformFee
                                                                                          quoteMintToReferrer?: QuoteMintToReferrer
                                                                                          slippageBps: number
                                                                                          sourceMint: string
                                                                                          swapMode: SwapMode
                                                                                          userDestinationTokenAccount: string
                                                                                          userSourceTokenAccount: string
                                                                                          userTransferAuthority: string

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/Fee.html b/ts/client/interfaces/Fee.html index b89b9d736..91814f364 100644 --- a/ts/client/interfaces/Fee.html +++ b/ts/client/interfaces/Fee.html @@ -1 +1 @@ -Fee | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • Fee

                                                                                          Index

                                                                                          Properties

                                                                                          Properties

                                                                                          amount: number
                                                                                          mint: string
                                                                                          pct: number

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +Fee | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • Fee

                                                                                          Index

                                                                                          Properties

                                                                                          Properties

                                                                                          amount: number
                                                                                          mint: string
                                                                                          pct: number

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/FillEvent.html b/ts/client/interfaces/FillEvent.html index 30e309877..2bbd3ad92 100644 --- a/ts/client/interfaces/FillEvent.html +++ b/ts/client/interfaces/FillEvent.html @@ -1 +1 @@ -FillEvent | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          Index

                                                                                          Properties

                                                                                          eventType: number
                                                                                          maker: PublicKey
                                                                                          makerFee: number
                                                                                          makerOrderId: BN
                                                                                          makerOut: boolean
                                                                                          makerSlot: number
                                                                                          makerTimestamp: BN
                                                                                          price: number
                                                                                          quantity: number
                                                                                          seqNum: BN
                                                                                          taker: PublicKey
                                                                                          takerClientOrderId: BN
                                                                                          takerFee: number
                                                                                          takerOrderId: BN
                                                                                          takerSide: PerpOrderType
                                                                                          timestamp: BN

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +FillEvent | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          Index

                                                                                          Properties

                                                                                          eventType: number
                                                                                          maker: PublicKey
                                                                                          makerFee: number
                                                                                          makerOrderId: BN
                                                                                          makerOut: boolean
                                                                                          makerSlot: number
                                                                                          makerTimestamp: BN
                                                                                          price: number
                                                                                          quantity: number
                                                                                          seqNum: BN
                                                                                          taker: PublicKey
                                                                                          takerClientOrderId: BN
                                                                                          takerFee: number
                                                                                          takerOrderId: BN
                                                                                          takerSide: PerpOrderType
                                                                                          timestamp: BN

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/LiquidateEvent.html b/ts/client/interfaces/LiquidateEvent.html index 82692ff88..ddb546f0f 100644 --- a/ts/client/interfaces/LiquidateEvent.html +++ b/ts/client/interfaces/LiquidateEvent.html @@ -1 +1 @@ -LiquidateEvent | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          Index

                                                                                          Properties

                                                                                          Properties

                                                                                          eventType: number
                                                                                          seqNum: BN

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +LiquidateEvent | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          Index

                                                                                          Properties

                                                                                          Properties

                                                                                          eventType: number
                                                                                          seqNum: BN

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/MarketInfo.html b/ts/client/interfaces/MarketInfo.html index 88d9ef487..272f787e1 100644 --- a/ts/client/interfaces/MarketInfo.html +++ b/ts/client/interfaces/MarketInfo.html @@ -1 +1 @@ -MarketInfo | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • MarketInfo

                                                                                          Index

                                                                                          Properties

                                                                                          id: string
                                                                                          inAmount: number
                                                                                          inputMint: string
                                                                                          label: string
                                                                                          lpFee: Fee
                                                                                          notEnoughLiquidity: boolean
                                                                                          outAmount: number
                                                                                          outputMint: string
                                                                                          platformFee: Fee
                                                                                          priceImpactPct: number

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +MarketInfo | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • MarketInfo

                                                                                          Index

                                                                                          Properties

                                                                                          id: string
                                                                                          inAmount: number
                                                                                          inputMint: string
                                                                                          label: string
                                                                                          lpFee: Fee
                                                                                          notEnoughLiquidity: boolean
                                                                                          outAmount: number
                                                                                          outputMint: string
                                                                                          platformFee: Fee
                                                                                          priceImpactPct: number

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/OutEvent.html b/ts/client/interfaces/OutEvent.html index eff834d0b..f32b7dfa1 100644 --- a/ts/client/interfaces/OutEvent.html +++ b/ts/client/interfaces/OutEvent.html @@ -1 +1 @@ -OutEvent | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          Index

                                                                                          Properties

                                                                                          eventType: number
                                                                                          owner: PublicKey
                                                                                          ownerSlot: number
                                                                                          quantity: BN
                                                                                          seqNum: BN
                                                                                          timestamp: BN

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +OutEvent | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          Index

                                                                                          Properties

                                                                                          eventType: number
                                                                                          owner: PublicKey
                                                                                          ownerSlot: number
                                                                                          quantity: BN
                                                                                          seqNum: BN
                                                                                          timestamp: BN

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/Quote.html b/ts/client/interfaces/Quote.html index a7eb2575b..8f1435242 100644 --- a/ts/client/interfaces/Quote.html +++ b/ts/client/interfaces/Quote.html @@ -1 +1 @@ -Quote | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • Quote

                                                                                          Index

                                                                                          Properties

                                                                                          feeAmount: number
                                                                                          feeMint: string
                                                                                          feePct: number
                                                                                          inAmount: number
                                                                                          minInAmount?: number
                                                                                          minOutAmount?: number
                                                                                          notEnoughLiquidity: boolean
                                                                                          outAmount: number
                                                                                          priceImpactPct: number

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +Quote | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • Quote

                                                                                          Index

                                                                                          Properties

                                                                                          feeAmount: number
                                                                                          feeMint: string
                                                                                          feePct: number
                                                                                          inAmount: number
                                                                                          minInAmount?: number
                                                                                          minOutAmount?: number
                                                                                          notEnoughLiquidity: boolean
                                                                                          outAmount: number
                                                                                          priceImpactPct: number

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/QuoteParams.html b/ts/client/interfaces/QuoteParams.html index ca23b99b5..e7a4a1967 100644 --- a/ts/client/interfaces/QuoteParams.html +++ b/ts/client/interfaces/QuoteParams.html @@ -1 +1 @@ -QuoteParams | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • QuoteParams

                                                                                          Index

                                                                                          Properties

                                                                                          amount: number
                                                                                          destinationMint: string
                                                                                          sourceMint: string
                                                                                          swapMode: SwapMode

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +QuoteParams | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • QuoteParams

                                                                                          Index

                                                                                          Properties

                                                                                          amount: number
                                                                                          destinationMint: string
                                                                                          sourceMint: string
                                                                                          swapMode: SwapMode

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/RouteInfo.html b/ts/client/interfaces/RouteInfo.html index f1183fea5..1739e7e51 100644 --- a/ts/client/interfaces/RouteInfo.html +++ b/ts/client/interfaces/RouteInfo.html @@ -1 +1 @@ -RouteInfo | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • RouteInfo

                                                                                          Index

                                                                                          Properties

                                                                                          amount: number
                                                                                          inAmount: number
                                                                                          instructions?: TransactionInstruction[]
                                                                                          marketInfos: MarketInfo[]
                                                                                          mints?: PublicKey[]
                                                                                          otherAmountThreshold: number
                                                                                          outAmount: number
                                                                                          priceImpactPct: number
                                                                                          routerName?: "Mango"
                                                                                          slippageBps: number
                                                                                          swapMode: SwapMode

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +RouteInfo | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • RouteInfo

                                                                                          Index

                                                                                          Properties

                                                                                          amount: number
                                                                                          inAmount: number
                                                                                          instructions?: TransactionInstruction[]
                                                                                          marketInfos: MarketInfo[]
                                                                                          mints?: PublicKey[]
                                                                                          otherAmountThreshold: number
                                                                                          outAmount: number
                                                                                          priceImpactPct: number
                                                                                          routerName?: "Mango"
                                                                                          slippageBps: number
                                                                                          swapMode: SwapMode

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/SwapParams.html b/ts/client/interfaces/SwapParams.html index ba50a6109..cf38ffe45 100644 --- a/ts/client/interfaces/SwapParams.html +++ b/ts/client/interfaces/SwapParams.html @@ -1,3 +1,3 @@ -SwapParams | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          Index

                                                                                          Properties

                                                                                          amount: number
                                                                                          +SwapParams | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          Index

                                                                                          Properties

                                                                                          amount: number

                                                                                          amount is used for instruction and can be null when it is an intermediate swap, only the first swap has an amount

                                                                                          -
                                                                                          destinationMint: string
                                                                                          openOrdersAddress?: string
                                                                                          quoteMintToReferrer?: QuoteMintToReferrer
                                                                                          sourceMint: string
                                                                                          swapMode: SwapMode
                                                                                          userDestinationTokenAccount: string
                                                                                          userSourceTokenAccount: string
                                                                                          userTransferAuthority: string

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +
                                                                                          destinationMint: string
                                                                                          openOrdersAddress?: string
                                                                                          quoteMintToReferrer?: QuoteMintToReferrer
                                                                                          sourceMint: string
                                                                                          swapMode: SwapMode
                                                                                          userDestinationTokenAccount: string
                                                                                          userSourceTokenAccount: string
                                                                                          userTransferAuthority: string

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/TransactionFeeInfo.html b/ts/client/interfaces/TransactionFeeInfo.html index b07926d97..1832c93b0 100644 --- a/ts/client/interfaces/TransactionFeeInfo.html +++ b/ts/client/interfaces/TransactionFeeInfo.html @@ -1 +1 @@ -TransactionFeeInfo | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • TransactionFeeInfo

                                                                                          Index

                                                                                          Properties

                                                                                          ataDeposits: number[]
                                                                                          minimumSOLForTransaction: number
                                                                                          openOrdersDeposits: number[]
                                                                                          signatureFee: number
                                                                                          totalFeeAndDeposits: number

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file +TransactionFeeInfo | @blockworks-foundation/mango-v4
                                                                                          Options
                                                                                          All
                                                                                          • Public
                                                                                          • Public/Protected
                                                                                          • All
                                                                                          Menu

                                                                                          Hierarchy

                                                                                          • TransactionFeeInfo

                                                                                          Index

                                                                                          Properties

                                                                                          ataDeposits: number[]
                                                                                          minimumSOLForTransaction: number
                                                                                          openOrdersDeposits: number[]
                                                                                          signatureFee: number
                                                                                          totalFeeAndDeposits: number

                                                                                          Legend

                                                                                          • Constructor
                                                                                          • Property
                                                                                          • Method
                                                                                          • Property
                                                                                          • Method
                                                                                          • Private property
                                                                                          • Private method
                                                                                          • Static property
                                                                                          • Static method

                                                                                          Settings

                                                                                          Theme

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file