From d258c477c6e9f80faedecaca4281d518368954d9 Mon Sep 17 00:00:00 2001 From: sayantank <40912636+sayantank@users.noreply.github.com> Date: Fri, 27 May 2022 07:59:06 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20project-?= =?UTF-8?q?serum/serum-dev-tools@4a0a18d9286db91abe713e7423c73a6fb202ae56?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/Coin.html | 2 +- classes/Dex.html | 10 +++++----- classes/DexMarket.html | 16 ++++++++-------- classes/FileKeypair.html | 2 +- interfaces/MarketAccounts.html | 2 +- modules.html | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/classes/Coin.html b/classes/Coin.html index ab26889..8b9317f 100644 --- a/classes/Coin.html +++ b/classes/Coin.html @@ -1 +1 @@ -Coin | @project-serum/serum-dev-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Coin

Index

Constructors

  • new Coin(symbol: string, decimals: number, mint: PublicKey, mintAuthority: Keypair, freezeAuthority: Keypair): Coin
  • Parameters

    • symbol: string
    • decimals: number
    • mint: PublicKey
    • mintAuthority: Keypair
    • freezeAuthority: Keypair

    Returns Coin

Properties

decimals: number
freezeAuthority: Keypair
mint: PublicKey
mintAuthority: Keypair
symbol: string

Methods

  • fundAccount(decimalAmount: number, owner: Keypair, connection: Connection): Promise<void>
  • Parameters

    • decimalAmount: number
    • owner: Keypair
    • connection: Connection

    Returns Promise<void>

  • getBalance(owner: Keypair, connection: Connection): Promise<RpcResponseAndContext<TokenAmount>>
  • Parameters

    • owner: Keypair
    • connection: Connection

    Returns Promise<RpcResponseAndContext<TokenAmount>>

Generated using TypeDoc

\ No newline at end of file +Coin | @project-serum/serum-dev-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Coin

Index

Constructors

  • new Coin(symbol: string, decimals: number, mint: PublicKey, mintAuthority: Keypair, freezeAuthority: Keypair): Coin
  • Parameters

    • symbol: string
    • decimals: number
    • mint: PublicKey
    • mintAuthority: Keypair
    • freezeAuthority: Keypair

    Returns Coin

Properties

decimals: number
freezeAuthority: Keypair
mint: PublicKey
mintAuthority: Keypair
symbol: string

Methods

  • fundAccount(decimalAmount: number, owner: Keypair, connection: Connection): Promise<void>
  • Parameters

    • decimalAmount: number
    • owner: Keypair
    • connection: Connection

    Returns Promise<void>

  • getBalance(owner: Keypair, connection: Connection): Promise<RpcResponseAndContext<TokenAmount>>
  • Parameters

    • owner: Keypair
    • connection: Connection

    Returns Promise<RpcResponseAndContext<TokenAmount>>

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/Dex.html b/classes/Dex.html index 71ccb89..ddf1f31 100644 --- a/classes/Dex.html +++ b/classes/Dex.html @@ -1,6 +1,6 @@ Dex | @project-serum/serum-dev-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Dex is a wrapper class for a deployed Serum Dex program.

-

Hierarchy

  • Dex

Index

Constructors

  • new Dex(address: PublicKey, connection: Connection): Dex
  • Parameters

    • address: PublicKey
    • connection: Connection

    Returns Dex

Properties

address: PublicKey
coins: Coin[]
connection: Connection
markets: DexMarket[]

Methods

  • createCoin(symbol: string, decimals: number, payer: Keypair, mintAuthority: Keypair, freezeAuthority: Keypair): Promise<Coin>

Hierarchy

  • Dex

Index

Constructors

  • new Dex(address: PublicKey, connection: Connection): Dex
  • Parameters

    • address: PublicKey
    • connection: Connection

    Returns Dex

Properties

address: PublicKey
coins: Coin[]
connection: Connection
markets: DexMarket[]

Methods

  • createCoin(symbol: string, decimals: number, payer: Keypair, mintAuthority: Keypair, freezeAuthority: Keypair): Promise<Coin>
  • Create a Coin object to be associated with the Dex.

    Parameters

    • symbol: string

      The symbol of the coin to create

      @@ -12,17 +12,17 @@

      The mint authority Keypair to use for the mint

    • freezeAuthority: Keypair

      The freeze authority Keypair to use for the mint

      -

    Returns Promise<Coin>

  • getCoin(symbol: string): Coin

Returns Promise<Coin>

  • getCoin(symbol: string): Coin
  • Fetch one of the Coin objects associated with the Dex by symbol.

    Parameters

    • symbol: string

      The symbol of the coin to fetch

      -

    Returns Coin

Returns Coin

  • Fetch a DexMarket object associated with the Dex by the base coin and quote coin.

    Parameters

    • baseCoin: Coin

      The base Coin of the market to fetch

    • quoteCoin: Coin

      The quote Coin of the market to fetch

      -

    Returns DexMarket

Returns DexMarket

  • Initialize a DexMarket instance associated with the Dex.

    Parameters

    • payer: Keypair

      The payer Keypair to use for the transactions

      @@ -32,7 +32,7 @@

      The quote Coin of the market to create

    • marketParams: MarketParams

      The parameters required to create the market

      -

    Returns Promise<DexMarket>

Returns Promise<DexMarket>

  • createMarketAccountsInstructions(accounts: MarketAccounts, payer: Keypair, connection: Connection, programID: PublicKey): Promise<TransactionInstruction[]>
  • Create a Transaction object for creating the accounts required for a DexMarket.

    Parameters

    • accounts: MarketAccounts

      The MarketAccounts object containing the accounts needed for initializing the market.

      @@ -20,7 +20,7 @@

      The Connection object to connect to Solana.

    • programID: PublicKey

      The address of the serum-dex program deployed.

      -

    Returns Promise<TransactionInstruction[]>

  • createMarketVaultsTransaction(payer: Keypair, vaultOwner: PublicKey, baseVault: Keypair, quoteVault: Keypair, baseCoin: Coin, quoteCoin: Coin, connection: Connection): Promise<Transaction>

Returns Promise<TransactionInstruction[]>

  • createMarketVaultsTransaction(payer: Keypair, vaultOwner: PublicKey, baseVault: Keypair, quoteVault: Keypair, baseCoin: Coin, quoteCoin: Coin, connection: Connection): Promise<Transaction>
  • Create a Transaction object for creating the vaults required for a DexMarket.

    Parameters

    • payer: Keypair

      The Keypair of the account that will pay for the transaction.

      @@ -36,7 +36,7 @@

      The quote Coin object provided by the Coin class.

    • connection: Connection

      The Connection object to connect to Solana.

      -

    Returns Promise<Transaction>

  • getCancelOrderTransaction(connection: Connection, owner: Keypair, serumMarket: Market, order: Order): Promise<TransactionWithSigners>

Returns Promise<Transaction>

  • getCancelOrderTransaction(connection: Connection, owner: Keypair, serumMarket: Market, order: Order): Promise<TransactionWithSigners>
  • Create a Transaction object for cancelling an order.

    Parameters

    • connection: Connection

      The Connection object to connect to Solana.

      @@ -46,7 +46,7 @@

      The Market object from serum-ts package.

    • order: Order

      The Order object to cancel.

      -

    Returns Promise<TransactionWithSigners>

  • getOrCreateOpenOrderAccount(owner: Keypair, serumMarket: Market, connection: Connection): Promise<OpenOrders>
  • Parameters

    • owner: Keypair
    • serumMarket: Market
    • connection: Connection

    Returns Promise<OpenOrders>

  • getPlaceOrderTransaction(connection: Connection, owner: Keypair, serumMarket: Market, side: "buy" | "sell", orderType: OrderType, size: number, price: number): Promise<TransactionWithSigners>

Returns Promise<TransactionWithSigners>

  • getOrCreateOpenOrderAccount(owner: Keypair, serumMarket: Market, connection: Connection): Promise<OpenOrders>
  • Parameters

    • owner: Keypair
    • serumMarket: Market
    • connection: Connection

    Returns Promise<OpenOrders>

  • getPlaceOrderTransaction(connection: Connection, owner: Keypair, serumMarket: Market, side: "buy" | "sell", orderType: OrderType, size: number, price: number): Promise<TransactionWithSigners>
  • Create a Transaction object for placing an order.

    Parameters

    • connection: Connection

      The Connection object to connect to Solana.

      @@ -62,7 +62,7 @@

      The size of the order.

    • price: number

      The price of the order.

      -

    Returns Promise<TransactionWithSigners>

  • load(connection: Connection, programID: PublicKey, marketAddress: PublicKey, baseCoin: Coin, quoteCoin: Coin): Promise<DexMarket>

Returns Promise<TransactionWithSigners>

  • load(connection: Connection, programID: PublicKey, marketAddress: PublicKey, baseCoin: Coin, quoteCoin: Coin): Promise<DexMarket>
  • Load a DexMarket instance from a given market address.

    Parameters

    • connection: Connection

      The Connection object to connect to Solana.

      @@ -74,7 +74,7 @@

      The base Coin object provided by the Coin class.

    • quoteCoin: Coin

      The quote Coin object provided by the Coin class.

      -

    Returns Promise<DexMarket>

  • placeOrder(connection: Connection, owner: Keypair, serumMarket: Market, side: "buy" | "sell", orderType: OrderType, size: number, price: number): Promise<string>

Returns Promise<DexMarket>

  • placeOrder(connection: Connection, owner: Keypair, serumMarket: Market, side: "buy" | "sell", orderType: OrderType, size: number, price: number): Promise<string>
  • Place an order on the DexMarket.

    Parameters

    • connection: Connection

      The Connection object to connect to Solana.

      @@ -90,4 +90,4 @@

      The size of the order.

    • price: number

      The price of the order.

      -

    Returns Promise<string>

  • sanityCheck(serumMarket: Market, price: number, size: number): void
  • Parameters

    • serumMarket: Market
    • price: number
    • size: number

    Returns void

Generated using TypeDoc

\ No newline at end of file +

Returns Promise<string>

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/FileKeypair.html b/classes/FileKeypair.html index 6222456..70b5d2f 100644 --- a/classes/FileKeypair.html +++ b/classes/FileKeypair.html @@ -1 +1 @@ -FileKeypair | @project-serum/serum-dev-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • FileKeypair

Index

Constructors

  • new FileKeypair(filePath: string, keypair: Keypair): FileKeypair

Properties

filePath: string
keypair: Keypair

Methods

  • withKeypair(filePath: string, keypair: Keypair): FileKeypair

Generated using TypeDoc

\ No newline at end of file +FileKeypair | @project-serum/serum-dev-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • FileKeypair

Index

Constructors

  • new FileKeypair(filePath: string, keypair: Keypair): FileKeypair

Properties

filePath: string
keypair: Keypair

Methods

  • withKeypair(filePath: string, keypair: Keypair): FileKeypair

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/MarketAccounts.html b/interfaces/MarketAccounts.html index b56efab..3bc3f4a 100644 --- a/interfaces/MarketAccounts.html +++ b/interfaces/MarketAccounts.html @@ -1 +1 @@ -MarketAccounts | @project-serum/serum-dev-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MarketAccounts

Index

Properties

asks: Keypair
bids: Keypair
eventQueue: Keypair
market: Keypair
requestQueue: Keypair

Generated using TypeDoc

\ No newline at end of file +MarketAccounts | @project-serum/serum-dev-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MarketAccounts

Index

Properties

asks: Keypair
bids: Keypair
eventQueue: Keypair
market: Keypair
requestQueue: Keypair

Generated using TypeDoc

\ No newline at end of file diff --git a/modules.html b/modules.html index aa15223..6a05b14 100644 --- a/modules.html +++ b/modules.html @@ -1 +1 @@ -@project-serum/serum-dev-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

@project-serum/serum-dev-tools

Index

Type aliases

MarketParams: { feeRate: number; lotSize: number; quoteDustThreshold: BN; tickSize: number }
param lotSize
param tickSize
param feeRate
param quoteDustThreshold

Type declaration

  • feeRate: number
  • lotSize: number
  • quoteDustThreshold: BN
  • tickSize: number
OrderType: "limit" | "ioc" | "postOnly"
TransactionWithSigners: { signers: Signer[]; transaction: Transaction }

Type declaration

  • signers: Signer[]
  • transaction: Transaction

Generated using TypeDoc

\ No newline at end of file +@project-serum/serum-dev-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

@project-serum/serum-dev-tools

Index

Type aliases

MarketParams: { feeRate: number; lotSize: number; quoteDustThreshold: BN; tickSize: number }
param lotSize
param tickSize
param feeRate
param quoteDustThreshold

Type declaration

  • feeRate: number
  • lotSize: number
  • quoteDustThreshold: BN
  • tickSize: number
OrderType: "limit" | "ioc" | "postOnly"
TransactionWithSigners: { signers: Signer[]; transaction: Transaction }

Type declaration

  • signers: Signer[]
  • transaction: Transaction

Generated using TypeDoc

\ No newline at end of file