Type alias NewOrderTransactionArgs
NewOrderTransactionArgs: { auctionEpoch: BN; auctionId: BN; depositAmount: BN; dflow: Program<any>; encryptedOrderDetails: string; marketMakerDataAccount: PublicKey; mmEncryptionPubKey: Uint8Array; orderType: number; previousAuctionEpoch: BN; priceOracles: PublicKey[]; rebateReceiverTokenAccount: PublicKey; retailAccountOwner: PublicKey; retailDataAccount: PublicKey; retailDataAccountNonce: BN; retailEncryptionPubKey: Uint8Array; retailSignature: Uint8Array; retailSigningPubKey: Uint8Array; retailXTokenAccount: PublicKey; signatoryServer: PublicKey; xMint: PublicKey }
Type declaration
-
auctionEpoch: BN
-
auctionId: BN
-
depositAmount: BN
-
dflow: Program<any>
-
encryptedOrderDetails: string
-
marketMakerDataAccount: PublicKey
-
mmEncryptionPubKey: Uint8Array
-
orderType: number
-
previousAuctionEpoch: BN
-
priceOracles: PublicKey[]
-
rebateReceiverTokenAccount: PublicKey
-
retailAccountOwner: PublicKey
-
retailDataAccount: PublicKey
-
retailDataAccountNonce: BN
-
retailEncryptionPubKey: Uint8Array
-
retailSignature: Uint8Array
-
retailSigningPubKey: Uint8Array
-
retailXTokenAccount: PublicKey
-
signatoryServer: PublicKey
-
xMint: PublicKey
Param
The public key of the retail_account_owner account.
Param
The unsigned integer field named nonce in the retail_data_account account. The nonce in the retail trader's account used to generate a PDA for the vault token account. This nonce must be saved and used when referencing this order in the future.
Param
An unsigned 64 bit integer. The auction ID used as a seed to generate the program derived address
Param
An unsigned 64 bit integer. The integer epoch used to generate the PDA of the auction epoch account
Param
An unsigned 64 bit integer. The previous epoch. This must be equal to auction_epoch - 1.
Param
The public key of the signatory_server account.
Param
The retail trader's X25519 public key.
Param
The market maker's X25519 public key.
Param
The ciphertext of the order details, encrypted using a 24-byte nonce of zeros and the key derived from the market maker's X25519 public key and the retail trader's X25519 private key.
Param
The public key of the Ed25519 key pair that the retail trader used to generate the signature.
Param
The signature of the plaintext order details.
Param
The amount of tokens being sent by the retail trader in the trade.
Param
The order type, must be either 0 for limit or 1 for market. All other values result in a failed transaction.
Param
The SPL token account associated with the retail trader which is used to deposit the sold token into escrow prior to the trade occurring. This account is expected to be mutable
Param
The SPL token account associated with the order used to receive a payment from the network, with the same mint as the token accounts used by market makers to bid in the associated auction.
Param
The retail data account holds state specific to the retail trader. This account is expected to be mutable
Param
The account storing state specific to the market maker. This account must be owned by the DFlow program, and this account must be initialized by calling the initialize market maker instruction. This account is expected to be mutable
Param
The SPL mint account associated with the token that is sold by the retail trader during the swap.
Param
These price oracles are the Pyth price accounts associated with the products that could possibly be received by the retail trader based on which token they are selling. For example, if a retail trader is swapping X for some other token, then the price oracles that must be passed here are all price oracles which exist as a pair with X in this auction.