From e201f638cd8d93b2552729552d8c970956263b65 Mon Sep 17 00:00:00 2001 From: sayantank <40912636+sayantank@users.noreply.github.com> Date: Mon, 27 Jun 2022 21:41:25 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20project-?= =?UTF-8?q?serum/serum-dev-tools@247d1c0a323693e02e1a86897a0d718ec87773e9?= =?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 | 8 ++++---- classes/Dex.html | 12 ++++++------ classes/DexMarket.html | 20 ++++++++++---------- classes/FileKeypair.html | 2 +- interfaces/MarketAccounts.html | 2 +- modules.html | 8 ++++---- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/classes/Coin.html b/classes/Coin.html index b16b00e..c2efded 100644 --- a/classes/Coin.html +++ b/classes/Coin.html @@ -1,4 +1,4 @@ -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: null | Keypair): Coin
  • Parameters

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

    Returns Coin

Properties

_decimals: number
_freezeAuthority: null | Keypair
_mint: PublicKey
_mintAuthority: Keypair
_symbol: string

Accessors

  • get decimals(): number
  • get freezeAuthority(): null | Keypair
  • get mint(): PublicKey
  • get mintAuthority(): Keypair
  • get symbol(): string

Methods

  • fundAccount(decimalAmount: number, owner: Keypair, connection: Connection): Promise<void>
  • +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: null | Keypair): Coin
    • Parameters

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

      Returns Coin

    Properties

    _decimals: number
    _freezeAuthority: null | Keypair
    _mint: PublicKey
    _mintAuthority: Keypair
    _symbol: string

    Accessors

    • get decimals(): number
    • get freezeAuthority(): null | Keypair
    • get mint(): PublicKey
    • get mintAuthority(): Keypair
    • get symbol(): string

    Methods

    • fundAccount(decimalAmount: number, owner: Keypair, connection: Connection): Promise<void>
    • Fund the owner key-pair with the specified amount of this coin.

      Parameters

      • decimalAmount: number

        The amount of tokens to fund account with, in decimal notation.

        @@ -6,17 +6,17 @@

        The Keypair to fund.

      • connection: Connection

        The Connection object to connect to Solana.

        -

      Returns Promise<void>

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

    Returns Promise<void>

  • getBalance(owner: Keypair, connection: Connection): Promise<RpcResponseAndContext<TokenAmount>>
  • Get the token balance for the specified owner.

    Parameters

    • owner: Keypair

      The Keypair whose balance to fetch.

    • connection: Connection

      The Connection object to connect to Solana.

      -

    Returns Promise<RpcResponseAndContext<TokenAmount>>

  • isEqual(to: Coin): boolean

Returns Promise<RpcResponseAndContext<TokenAmount>>

  • isEqual(to: Coin): boolean
  • Equality check between two Coins.

    Parameters

    • to: Coin

      The Coin object to compare to.

      -

    Returns boolean

  • load(connection: Connection, symbol: string, mint: PublicKey, mintAuthority: Keypair, freezeAuthority: null | Keypair): Promise<Coin>

Returns boolean

  • load(connection: Connection, symbol: string, mint: PublicKey, mintAuthority: Keypair, freezeAuthority: null | Keypair): Promise<Coin>
  • getCoin(symbol: string): null | Coin
  • Fetch one of the Coin objects associated with the Dex by symbol.

    Parameters

    • symbol: string

      The symbol of the coin to fetch

      -

    Returns null | Coin

Returns null | 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 null | DexMarket

Returns null | DexMarket

  • Initialize a DexMarket instance associated with the Dex.

    Parameters

    • payer: Keypair

      The payer Keypair to use for the transactions

      @@ -34,7 +34,7 @@

      The quote Coin of the market to create

    • marketParams: MarketParams

      The parameters required to create the market

      -

    Returns Promise<DexMarket>

Returns Promise<DexMarket>

  • Runs a crank on a separate node process for the given DexMarket for specified duration.

    Parameters

    • market: DexMarket

      The DexMarket to run a crank for

      @@ -42,7 +42,7 @@

      The owner FileKeypair consuming events.

    • opts: CrankOpts

      The crank options used

      -

    Returns ChildProcess

Returns ChildProcess

  • 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>

Returns Promise<TransactionWithSigners>

  • getOrCreateOpenOrderAccount(owner: Keypair, serumMarket: Market, connection: Connection): Promise<OpenOrders>
  • Get or create an OpenOrder account for the specified owner.

    Parameters

    • owner: Keypair

      The Keypair for which OpenOrders account is required.

      @@ -54,7 +54,7 @@

      The Market object from serum-ts package.

    • connection: Connection

      The Connection object to connect to Solana.

      -

    Returns Promise<OpenOrders>

  • getOrdersForOwner(owner: Keypair, serumMarket: Market, connection: Connection): Promise<Order[]>

Returns Promise<OpenOrders>

  • getOrdersForOwner(owner: Keypair, serumMarket: Market, connection: Connection): Promise<Order[]>
  • Get all orders placed by a keypair.

    Parameters

    • owner: Keypair

      The Keypair for which orders have to be fetched.

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

      The Market object from serum-ts package.

    • connection: Connection

      The Connection object to connect to Solana.

      -

    Returns Promise<Order[]>

Returns Promise<Order[]>

  • Create a Transaction object for placing an order.

    Parameters

    • connection: Connection

      The Connection object to connect to Solana.

      @@ -80,7 +80,7 @@

      The price of the order.

    • Optional selfTradeBehaviour: SelfTradeBehaviour

      The SelfTradeBehaviour action to follow for the order placed.

      -

    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.

      @@ -92,7 +92,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, selfTradeBehaviour?: SelfTradeBehaviour): Promise<string>

Returns Promise<DexMarket>

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

    Parameters

    • connection: Connection

      The Connection object to connect to Solana.

      @@ -110,4 +110,4 @@

      The price of the order.

    • Optional selfTradeBehaviour: SelfTradeBehaviour

      The SelfTradeBehaviour action to follow for the order placed.

      -

    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 b8fa273..5f274a0 100644 --- a/classes/FileKeypair.html +++ b/classes/FileKeypair.html @@ -1,3 +1,3 @@ FileKeypair | @project-serum/serum-dev-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

A wrapper class around @solana/web3.js Keypair that allows persisting key-pairs in your local filesystem.

-

Hierarchy

  • FileKeypair

Index

Constructors

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

Properties

absoluteFilePath: string
keypair: Keypair

Methods

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

Generated using TypeDoc

\ No newline at end of file +

Hierarchy

Index

Constructors

Properties

absoluteFilePath: string
keypair: Keypair

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/MarketAccounts.html b/interfaces/MarketAccounts.html index c077d59..1483af3 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 42d9e72..8c1d43e 100644 --- a/modules.html +++ b/modules.html @@ -1,11 +1,11 @@ -@project-serum/serum-dev-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

@project-serum/serum-dev-tools

Index

Type aliases

CrankOpts: { durationInSecs: number; verbose: boolean }
param durationInSecs

The duration in seconds for which the market maker will run.

+@project-serum/serum-dev-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

@project-serum/serum-dev-tools

Index

Type aliases

CrankOpts: { durationInSecs: number; verbose: boolean }
param durationInSecs

The duration in seconds for which the market maker will run.

param verbose

The boolean flag determining whether to log about the actions taking place.

-

Type declaration

  • durationInSecs: number
  • verbose: boolean
MarketMakerOpts: { baseGeckoSymbol: string; durationInSecs: number; initialBidSize: number; orderCount: number; quoteGeckoSymbol: string; verbose: boolean }
param durationInSecs

The duration in seconds for which the market maker will run.

+

Type declaration

  • durationInSecs: number
  • verbose: boolean
MarketMakerOpts: { baseGeckoSymbol: string; durationInSecs: number; initialBidSize: number; orderCount: number; quoteGeckoSymbol: string; verbose: boolean }
param durationInSecs

The duration in seconds for which the market maker will run.

param orderCount

The number of orders to place per side in each iteration.

param initialBidSize

The initial bid size for the market maker.

param baseGeckoSymbol

The symbol used by CoinGecko for the base coin.

param quoteGeckoSymbol

The symbol used by CoinGecko for the quote coin.

param verbose

The boolean flag determining whether to log about the actions taking place.

-

Type declaration

  • baseGeckoSymbol: string
  • durationInSecs: number
  • initialBidSize: number
  • orderCount: number
  • quoteGeckoSymbol: string
  • verbose: boolean
MarketParams: { lotSize: number; tickSize: number }
param lotSize

This is the smallest representable amount of the base coin .

+

Type declaration

  • baseGeckoSymbol: string
  • durationInSecs: number
  • initialBidSize: number
  • orderCount: number
  • quoteGeckoSymbol: string
  • verbose: boolean
MarketParams: { lotSize: number; tickSize: number }
param lotSize

This is the smallest representable amount of the base coin .

param tickSize

This is the smallest representable amount of the quote coin.

-

Type declaration

  • lotSize: number
  • tickSize: number
MessageType: { action: "start"; args: any }

Type declaration

  • action: "start"
  • args: any
OrderType: "limit" | "ioc" | "postOnly"
SelfTradeBehaviour: "decrementTake" | "cancelProvide" | "abortTransaction"
TransactionWithSigners: { signers: Signer[]; transaction: Transaction }

Type declaration

  • signers: Signer[]
  • transaction: Transaction

Legend

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

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +

Type declaration

  • lotSize: number
  • tickSize: number
MessageType: { action: "start"; args: any }

Type declaration

  • action: "start"
  • args: any
OrderType: "limit" | "ioc" | "postOnly"
SelfTradeBehaviour: "decrementTake" | "cancelProvide" | "abortTransaction"
TransactionWithSigners: { signers: Signer[]; transaction: Transaction }

Type declaration

  • signers: Signer[]
  • transaction: Transaction

Generated using TypeDoc

\ No newline at end of file