diff --git a/rs/.rustc_info.json b/rs/.rustc_info.json index 1aea06d33..494f9af48 100644 --- a/rs/.rustc_info.json +++ b/rs/.rustc_info.json @@ -1 +1 @@ -{"rustc_fingerprint":94712473748940106,"outputs":{"10376369925670944939":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/runner/.rustup/toolchains/1.65-x86_64-unknown-linux-gnu\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.65.0 (897e37553 2022-11-02)\nbinary: rustc\ncommit-hash: 897e37553bba8b42751c67658967889d11ecd120\ncommit-date: 2022-11-02\nhost: x86_64-unknown-linux-gnu\nrelease: 1.65.0\nLLVM version: 15.0.0\n","stderr":""},"15697416045686424142":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n","stderr":""}},"successes":{}} \ No newline at end of file +{"rustc_fingerprint":6950612624927230067,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.65.0 (897e37553 2022-11-02)\nbinary: rustc\ncommit-hash: 897e37553bba8b42751c67658967889d11ecd120\ncommit-date: 2022-11-02\nhost: x86_64-unknown-linux-gnu\nrelease: 1.65.0\nLLVM version: 15.0.0\n","stderr":""},"15697416045686424142":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n","stderr":""},"10376369925670944939":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/runner/.rustup/toolchains/1.65-x86_64-unknown-linux-gnu\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 diff --git a/rs/doc/mango_v4/index.html b/rs/doc/mango_v4/index.html index f5e29d1e2..7493c6c04 100644 --- a/rs/doc/mango_v4/index.html +++ b/rs/doc/mango_v4/index.html @@ -1,4 +1,4 @@ -mango_v4 - Rust

Modules

An Anchor generated module, providing a set of structs +mango_v4 - Rust

Modules

An Anchor generated module, providing a set of structs mirroring the structs deriving Accounts, where each field is a Pubkey. This is useful for specifying accounts for a client.
An Anchor generated module containing the program’s set of instructions, where each method handler in the #[program] mod is diff --git a/ts/client/classes/As.html b/ts/client/classes/As.html index 6541612b3..63dd98e67 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 7c372b762..21a53e6c9 100644 --- a/ts/client/classes/Bank.html +++ b/ts/client/classes/Bank.html @@ -1,6 +1,6 @@ -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
  • Returns number

    total borrow rate percentage (including loan upkeep rate)

    -
  • getBorrowRateWithoutUpkeepRate(): I80F48
  • 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
  • Returns number

    total borrow rate percentage (including loan upkeep rate)

    +
  • getBorrowRateWithoutUpkeepRate(): I80F48
  • 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 b4ac3e94a..31277de00 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 78cf08d8d..d63d13ebf 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 1a4f71931..167d29f3a 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 3dbbb0bc4..977fdc537 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 e538f9922..68335aa95 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 31012d847..1ff9f3148 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 f717f7a95..bbc54101f 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 33732f689..8fc7b6d0b 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 15ecd305f..e924a2179 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 77638a7e8..1e3efb615 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 092a8f500..24491fb28 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 01fc5a052..80be9a6a3 100644 --- a/ts/client/classes/MangoAccount.html +++ b/ts/client/classes/MangoAccount.html @@ -1,69 +1,69 @@ -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 2c2c00bd3..0638080d2 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 0a8396b1a..f288749fe 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

                              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

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/OracleConfigParams.html b/ts/client/classes/OracleConfigParams.html index 7faf65559..f865e22cf 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

                              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

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/PerpEventQueue.html b/ts/client/classes/PerpEventQueue.html index 33364b670..bd2c5114a 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

                              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

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/PerpMarket.html b/ts/client/classes/PerpMarket.html index d212b6f58..29c826233 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

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/PerpOo.html b/ts/client/classes/PerpOo.html index de3d24bca..c176f3e74 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

                              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

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/PerpOoDto.html b/ts/client/classes/PerpOoDto.html index 2a80144f2..6f5fb9233 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

                              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

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/PerpOrder.html b/ts/client/classes/PerpOrder.html index 2ffbda8f2..e7162236d 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

                              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

                              Generated using TypeDoc

                              \ No newline at end of file diff --git a/ts/client/classes/PerpOrderSide.html b/ts/client/classes/PerpOrderSide.html index 2ee79f5e0..76c5477cc 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: {}

                                  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: {}

                                      Generated using TypeDoc

                                      \ No newline at end of file diff --git a/ts/client/classes/PerpOrderType.html b/ts/client/classes/PerpOrderType.html index 2b6cac46a..eb11ea5be 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: {}

                                                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: {}

                                                          Generated using TypeDoc

                                                          \ No newline at end of file diff --git a/ts/client/classes/PerpPosition.html b/ts/client/classes/PerpPosition.html index 69d34e506..87a66522c 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

                                                          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

                                                          Generated using TypeDoc

                                                          \ No newline at end of file diff --git a/ts/client/classes/PerpPositionDto.html b/ts/client/classes/PerpPositionDto.html index 07e487365..fcf6896ba 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

                                                          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

                                                          Generated using TypeDoc

                                                          \ No newline at end of file diff --git a/ts/client/classes/Serum3Market.html b/ts/client/classes/Serum3Market.html index ed4966aac..2b14089d8 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

                                                          Generated using TypeDoc

                                                          \ No newline at end of file diff --git a/ts/client/classes/Serum3OrderType.html b/ts/client/classes/Serum3OrderType.html index 5d22de01e..794ce63a8 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: {}

                                                                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: {}

                                                                      Generated using TypeDoc

                                                                      \ No newline at end of file diff --git a/ts/client/classes/Serum3Orders.html b/ts/client/classes/Serum3Orders.html index d8ba757db..20558a964 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

                                                                      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

                                                                      Generated using TypeDoc

                                                                      \ No newline at end of file diff --git a/ts/client/classes/Serum3PositionDto.html b/ts/client/classes/Serum3PositionDto.html index 1ab48d5c3..94ca03971 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[]

                                                                      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[]

                                                                      Generated using TypeDoc

                                                                      \ No newline at end of file diff --git a/ts/client/classes/Serum3SelfTradeBehavior.html b/ts/client/classes/Serum3SelfTradeBehavior.html index 069235f50..ce2ce8911 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: {}

                                                                            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: {}

                                                                                  Generated using TypeDoc

                                                                                  \ No newline at end of file diff --git a/ts/client/classes/Serum3Side.html b/ts/client/classes/Serum3Side.html index 0e5263f9a..480b9ae8e 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: {}

                                                                                      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: {}

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/classes/StubOracle.html b/ts/client/classes/StubOracle.html index bfd9f27b1..8f95835b7 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

                                                                                          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

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/classes/TokenPosition.html b/ts/client/classes/TokenPosition.html index b2bf5b7a3..bbfe3c38d 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

                                                                                          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

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/classes/TokenPositionDto.html b/ts/client/classes/TokenPositionDto.html index d4e1f17ff..8731cd4f6 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

                                                                                          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

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/enums/OracleProvider.html b/ts/client/enums/OracleProvider.html index 446389b74..ac468e4a3 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

                                                                                          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

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/enums/SwapMode.html b/ts/client/enums/SwapMode.html index 5f04cb263..61098d08d 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"

                                                                                          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"

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/index.html b/ts/client/index.html index f5c8e0b54..caeebef92 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>

                                                                                          • computePriceImpactOnJup(amount: string, inputMint: string, outputMint: string): Promise<{ outAmount: number; priceImpactPct: number }>
                                                                                          • Parameters

                                                                                            • amount: string
                                                                                            • inputMint: string
                                                                                            • outputMint: string

                                                                                            Returns Promise<{ outAmount: number; priceImpactPct: number }>

                                                                                          • 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>
                                                                                          • getOnChainPriceForMints(mints: string[]): Promise<number[]>
                                                                                          • Parameters

                                                                                            • mints: string[]

                                                                                            Returns Promise<number[]>

                                                                                          • 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

                                                                                          Generated using TypeDoc

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

                                                                                          Hierarchy

                                                                                          • AccountEquity

                                                                                          Index

                                                                                          Properties

                                                                                          Properties

                                                                                          Account: { highlight: boolean; val: PublicKey }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: PublicKey
                                                                                          Equity: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number

                                                                                          Generated using TypeDoc

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

                                                                                          Hierarchy

                                                                                          • AccountEquity

                                                                                          Index

                                                                                          Properties

                                                                                          Properties

                                                                                          Account: { highlight: boolean; val: PublicKey }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: PublicKey
                                                                                          Equity: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/BankForHealth.html b/ts/client/interfaces/BankForHealth.html index bf4f23108..00fdcb633 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

                                                                                          borrowWeightScaleStartQuote: number
                                                                                          depositWeightScaleStartQuote: number
                                                                                          initAssetWeight: I80F48
                                                                                          initLiabWeight: I80F48
                                                                                          maintAssetWeight: I80F48
                                                                                          maintLiabWeight: I80F48
                                                                                          price: I80F48
                                                                                          stablePriceModel: StablePriceModel
                                                                                          tokenIndex: TokenIndex

                                                                                          Methods

                                                                                          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

                                                                                          borrowWeightScaleStartQuote: number
                                                                                          depositWeightScaleStartQuote: number
                                                                                          initAssetWeight: I80F48
                                                                                          initLiabWeight: I80F48
                                                                                          maintAssetWeight: I80F48
                                                                                          maintLiabWeight: I80F48
                                                                                          price: I80F48
                                                                                          stablePriceModel: StablePriceModel
                                                                                          tokenIndex: TokenIndex

                                                                                          Methods

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/Event.html b/ts/client/interfaces/Event.html index 4abca5080..95ace9943 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

                                                                                          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

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/ExactOutSwapParams.html b/ts/client/interfaces/ExactOutSwapParams.html index b00df68c6..476df8516 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

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/Fee.html b/ts/client/interfaces/Fee.html index 1c3629921..de56a2e56 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

                                                                                          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

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/FillEvent.html b/ts/client/interfaces/FillEvent.html index 1edbc2e90..2bd09cf5c 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

                                                                                          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

                                                                                          Generated using TypeDoc

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

                                                                                          Hierarchy

                                                                                          • LiqorPriceImpact

                                                                                          Index

                                                                                          Properties

                                                                                          Assets: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Assets Slippage: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Coin: { highlight: boolean; val: string }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: string
                                                                                          Future Price: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Jup Price: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Liabs: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Liabs Slippage: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Oracle Price: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          V4 Liq Fee: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number

                                                                                          Generated using TypeDoc

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

                                                                                          Hierarchy

                                                                                          • LiqorPriceImpact

                                                                                          Index

                                                                                          Properties

                                                                                          Assets: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Assets Slippage: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Coin: { highlight: boolean; val: string }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: string
                                                                                          Future Price: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Jup Price: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Liabs: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Liabs Slippage: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Oracle Price: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          V4 Liq Fee: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/LiquidateEvent.html b/ts/client/interfaces/LiquidateEvent.html index eba3fc9be..5abcd86be 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

                                                                                          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

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/MarketInfo.html b/ts/client/interfaces/MarketInfo.html index 551a9c99f..ab2c9f9fc 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

                                                                                          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

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/OutEvent.html b/ts/client/interfaces/OutEvent.html index 486ce389c..1159c1cf5 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

                                                                                          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

                                                                                          Generated using TypeDoc

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

                                                                                          Hierarchy

                                                                                          • PerpPositionsToBeLiquidated

                                                                                          Index

                                                                                          Properties

                                                                                          Future Price: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Market: { highlight: boolean; val: string }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: string
                                                                                          Notional Position: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Price: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number

                                                                                          Generated using TypeDoc

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

                                                                                          Hierarchy

                                                                                          • PerpPositionsToBeLiquidated

                                                                                          Index

                                                                                          Properties

                                                                                          Future Price: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Market: { highlight: boolean; val: string }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: string
                                                                                          Notional Position: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number
                                                                                          Price: { highlight: boolean; val: number }

                                                                                          Type declaration

                                                                                          • highlight: boolean
                                                                                          • val: number

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/Quote.html b/ts/client/interfaces/Quote.html index f906e0589..10bbf340b 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

                                                                                          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

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/QuoteParams.html b/ts/client/interfaces/QuoteParams.html index d151cfa0f..4886feceb 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

                                                                                          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

                                                                                          Generated using TypeDoc

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

                                                                                          Hierarchy

                                                                                          • Risk

                                                                                          Index

                                                                                          Properties

                                                                                          assetDrop: { data: LiqorPriceImpact[]; title: string }

                                                                                          Type declaration

                                                                                          assetRally: { data: LiqorPriceImpact[]; title: string }

                                                                                          Type declaration

                                                                                          liqorEquity: { data: AccountEquity[]; title: string }

                                                                                          Type declaration

                                                                                          marketMakerEquity: { data: AccountEquity[]; title: string }

                                                                                          Type declaration

                                                                                          perpDrop: { data: PerpPositionsToBeLiquidated[]; title: string }

                                                                                          Type declaration

                                                                                          perpRally: { data: PerpPositionsToBeLiquidated[]; title: string }

                                                                                          Type declaration

                                                                                          usdcDepeg: { data: LiqorPriceImpact[]; title: string }

                                                                                          Type declaration

                                                                                          usdtDepeg: { data: LiqorPriceImpact[]; title: string }

                                                                                          Type declaration

                                                                                          Generated using TypeDoc

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

                                                                                          Hierarchy

                                                                                          • Risk

                                                                                          Index

                                                                                          Properties

                                                                                          assetDrop: { data: LiqorPriceImpact[]; title: string }

                                                                                          Type declaration

                                                                                          assetRally: { data: LiqorPriceImpact[]; title: string }

                                                                                          Type declaration

                                                                                          liqorEquity: { data: AccountEquity[]; title: string }

                                                                                          Type declaration

                                                                                          marketMakerEquity: { data: AccountEquity[]; title: string }

                                                                                          Type declaration

                                                                                          perpDrop: { data: PerpPositionsToBeLiquidated[]; title: string }

                                                                                          Type declaration

                                                                                          perpRally: { data: PerpPositionsToBeLiquidated[]; title: string }

                                                                                          Type declaration

                                                                                          usdcDepeg: { data: LiqorPriceImpact[]; title: string }

                                                                                          Type declaration

                                                                                          usdtDepeg: { data: LiqorPriceImpact[]; title: string }

                                                                                          Type declaration

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/RouteInfo.html b/ts/client/interfaces/RouteInfo.html index 71b5829d8..60058fd60 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

                                                                                          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

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/SwapParams.html b/ts/client/interfaces/SwapParams.html index a0840855f..da5e3d14d 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

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file diff --git a/ts/client/interfaces/TransactionFeeInfo.html b/ts/client/interfaces/TransactionFeeInfo.html index e4a21eccf..273e71f24 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

                                                                                          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

                                                                                          Generated using TypeDoc

                                                                                          \ No newline at end of file