Properties
address
address: PublicKey
Methods
activeMarkets
- activeMarkets(): PublicKey[]
Returns PublicKey[]
placeOrderIx
- placeOrderIx(market, accounts, args): TransactionInstruction
Parameters
- market: Market
- accounts: {
baseTokenProgram?: PublicKey;
payer?: PublicKey;
quoteTokenProgram?: PublicKey;
}Optional
baseTokenProgram?: PublicKey
Optional
payer?: PublicKey
Optional
quoteTokenProgram?: PublicKey
- args: {
amount: number;
isBid: boolean;
orderId?: number;
price: number;
}amount: number
isBid: boolean
Optional
orderId?: number
price: number
Returns TransactionInstruction
prettyPrint
- prettyPrint(): void
Returns void
reload
- reload(connection): Promise<void>
Returns Promise<void>
settleIx
- settleIx(market, accounts, params): TransactionInstruction
Parameters
- market: Market
- accounts: {
baseTokenProgram?: PublicKey;
platformTokenAccount: PublicKey;
quoteTokenProgram?: PublicKey;
referrerTokenAccount: PublicKey;
}Optional
baseTokenProgram?: PublicKey
platformTokenAccount: PublicKey
Optional
quoteTokenProgram?: PublicKey
referrerTokenAccount: PublicKey
- params: SettleFundsInstructionArgs
Returns TransactionInstruction
unsettledBalances
- unsettledBalances(markets): {
market: Market;
numBaseTokens: number;
numQuoteTokens: number;
}[] Returns {
market: Market;
numBaseTokens: number;
numQuoteTokens: number;
}[]
Static
deserializeWrapperBuffer
Static
fetchFirstUserWrapper
- fetchFirstUserWrapper(connection, payer): Promise<null | Readonly<{
account: AccountInfo<Buffer>;
pubkey: PublicKey;
}>> Parameters
- connection: Connection
- payer: PublicKey
Returns Promise<null | Readonly<{
account: AccountInfo<Buffer>;
pubkey: PublicKey;
}>>
Static
loadFromBuffer
- loadFromBuffer(__namedParameters): UiWrapper
Parameters
- __namedParameters: {
address: PublicKey;
buffer: Buffer;
}address: PublicKey
buffer: Buffer
Static
placeOrderCreateIfNotExistsIxs
- placeOrderCreateIfNotExistsIxs(connection, baseMint, baseDecimals, quoteMint, quoteDecimals, owner, payer, args, baseTokenProgram?, quoteTokenProgram?): Promise<{
ixs: TransactionInstruction[];
signers: Signer[];
}> Parameters
- connection: Connection
- baseMint: PublicKey
- baseDecimals: number
- quoteMint: PublicKey
- quoteDecimals: number
- owner: PublicKey
- payer: PublicKey
- args: {
amount: number;
isBid: boolean;
orderId?: number;
price: number;
}amount: number
isBid: boolean
Optional
orderId?: number
price: number
- baseTokenProgram: PublicKey = TOKEN_PROGRAM_ID
- quoteTokenProgram: PublicKey = TOKEN_PROGRAM_ID
Returns Promise<{
ixs: TransactionInstruction[];
signers: Signer[];
}>
Static
setupIxs
- setupIxs(connection, owner, payer): Promise<{
ixs: TransactionInstruction[];
signers: Signer[];
}> Parameters
- connection: Connection
- owner: PublicKey
- payer: PublicKey
Returns Promise<{
ixs: TransactionInstruction[];
signers: Signer[];
}>
Wrapper object used for reading data from a wrapper for manifest markets.