Dflow: { accounts: [{ name: "globalConfigAccount"; type: { fields: [{ name: "dflowAdmin"; type: "publicKey" }]; kind: "struct" } }, { name: "recoveryStateAccount"; type: { fields: [{ name: "mint"; type: "publicKey" }]; kind: "struct" } }, { name: "auctionMapper"; type: { fields: [{ name: "auctionIds"; type: { vec: "u64" } }]; kind: "struct" } }, { name: "auctionStateAccount"; type: { fields: [{ name: "event"; type: "u8" }, { name: "status"; type: "u8" }, { name: "supportedPairsCount"; type: "u8" }, { name: "auctionWinner"; type: { option: "publicKey" } }, { name: "auctionLeader"; type: { option: "publicKey" } }, { name: "bidMint"; type: "publicKey" }, { name: "voteRewardMint"; type: "publicKey" }, { name: "auctionOwner"; type: "publicKey" }, { name: "voteSize"; type: "u64" }, { name: "auctionId"; type: "u64" }, { name: "epoch"; type: "u64" }, { name: "minNotionalOrderSize"; type: "u64" }, { name: "maxNotionalOrderSize"; type: "u64" }, { name: "notionalDecimals"; type: "u8" }, { name: "bestBid"; type: "u64" }, { name: "winningBid"; type: "u64" }, { name: "batchNotionalSize"; type: "u64" }, { name: "nextOrderId"; type: "u64" }, { name: "votePeriod"; type: "u32" }, { name: "claimPeriod"; type: "u32" }, { name: "numOpenEpochs"; type: "u32" }, { name: "pairs"; type: { vec: { defined: "CurrencyPair" } } }]; kind: "struct" } }, { name: "auctionEpochState"; type: { fields: [{ name: "routedNotional"; type: "u64" }, { name: "bidSize"; type: "u64" }, { name: "epoch"; type: "u64" }, { name: "winner"; type: { option: "publicKey" } }, { name: "numOpenOrders"; type: "u16" }, { name: "numUnsettledFills"; type: "u16" }, { name: "owner"; type: "publicKey" }]; kind: "struct" } }, { name: "fillRecordAccount"; type: { fields: [{ name: "marketMakerAccountOwner"; type: "publicKey" }, { name: "retailAccountOwner"; type: "publicKey" }, { name: "vaultMetaAccount"; type: "publicKey" }, { name: "fillXAmount"; type: "u64" }, { name: "fillNotional"; type: "u64" }, { name: "orderDetails"; type: { defined: "OrderDetails" } }, { name: "auctionId"; type: "u64" }, { name: "fillTimestamp"; type: "u64" }, { name: "retailNonce"; type: "u64" }, { name: "fillNonce"; type: "u16" }, { name: "fairVotes"; type: "u32" }, { name: "unfairVotes"; type: "u32" }]; kind: "struct" } }, { name: "marketMakerDataAccount"; type: { fields: [{ name: "owner"; type: "publicKey" }, { name: "encryptionPubKey"; type: { array: ["u8", 32] } }, { name: "maxOrdersSupported"; type: "u64" }, { name: "eventsHead"; type: "u8" }, { name: "events"; type: { vec: { defined: "MarketMakerEvent" } } }, { name: "orders"; type: { vec: "publicKey" } }]; kind: "struct" } }, { name: "retailDataAccount"; type: { fields: [{ name: "retailAccountOwner"; type: "publicKey" }, { name: "event"; type: "u8" }, { name: "nonce"; type: "u64" }, { name: "numUnsettledFills"; type: "u64" }, { name: "maxOrdersSupported"; type: "u64" }, { name: "orders"; type: { vec: "publicKey" } }]; kind: "struct" } }, { name: "vaultMetaAccount"; type: { fields: [{ name: "retailEncryptionPubKey"; type: { array: ["u8", 32] } }, { name: "mmEncryptionPubKey"; type: { array: ["u8", 32] } }, { name: "retailSigningPubKey"; type: { array: ["u8", 32] } }, { name: "retailSignature"; type: { array: ["u8", 64] } }, { name: "vaultTokenAccount"; type: "publicKey" }, { name: "rebateReceiverTokenAccount"; type: "publicKey" }, { name: "marketMakerDataAccount"; type: "publicKey" }, { name: "retailDataAccount"; type: "publicKey" }, { name: "retailAccountOwner"; type: "publicKey" }, { name: "retailXTokenAccount"; type: "publicKey" }, { name: "xMint"; type: "publicKey" }, { name: "depositNotional"; type: "u64" }, { name: "depositAmount"; type: "u64" }, { name: "filledXAmount"; type: "u64" }, { name: "filledYAmount"; type: "u64" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }, { name: "nonce"; type: "u64" }, { name: "orderId"; type: "u64" }, { name: "orderType"; type: "u8" }, { name: "fillNonce"; type: "u16" }, { name: "basketPrices"; type: { vec: { defined: "MantissaExp" } } }, { name: "encryptedOrderDetails"; type: "string" }]; kind: "struct" } }, { name: "voteRecordAccount"; type: { fields: [{ name: "vote"; type: "u8" }]; kind: "struct" } }, { name: "bidRecordAccount"; type: { fields: [{ name: "bidSize"; type: "u64" }]; kind: "struct" } }, { name: "signatoryRecord"; type: { fields: [{ name: "signatoryServer"; type: "publicKey" }, { name: "stakeSize"; type: "u64" }]; kind: "struct" } }, { name: "signatoryState"; type: { fields: [{ name: "stakeMint"; type: "publicKey" }]; kind: "struct" } }, { name: "whitelistEntry"; type: { fields: [{ name: "principal"; type: "publicKey" }, { name: "roleFlags"; type: "u16" }]; kind: "struct" } }]; errors: [{ code: 15000; name: "BidDidNotExceedBest" }, { code: 15001; name: "RetailOrderQueueFull" }, { code: 15002; name: "MarketMakerOrderQueueFull" }, { code: 15003; name: "_MessageNotSignedByRetailTrader" }, { code: 15004; name: "_NoDesignatedMarketMakerAvailable" }, { code: 15005; name: "_OrdersRequestedExceedsMax" }, { code: 15006; name: "OverFill" }, { code: 15007; name: "InvalidFillPrice" }, { code: 15008; name: "InvalidAuctionSpecified" }, { code: 15009; name: "PriceOracleNotTrading" }, { code: 15010; name: "InvalidVaultMetaVecMismatch" }, { code: 15011; name: "OrderDetailsParsingError" }, { code: 15012; name: "InvalidFillAmount" }, { code: 15013; name: "InvalidMinFillPrice" }, { code: 15014; name: "AuctionEpochInitInvalidOwner" }, { code: 15015; name: "NotAllRewardsDistributed" }, { code: 15016; name: "FillVotingHitMax" }, { code: 15017; name: "InvalidAuctionEpoch" }, { code: 15018; name: "InvalidFillVoteValue" }, { code: 15019; name: "VotingClosed" }, { code: 15020; name: "VoteRewardClaimingClosed" }, { code: 15021; name: "OverflowError" }, { code: 15022; name: "AuctionNotTakingOrders" }, { code: 15023; name: "InvalidOrderType" }, { code: 15024; name: "InvalidMarketMakerAccountAddress" }, { code: 15025; name: "AuctionIdAlreadyExists" }, { code: 15026; name: "InvalidNewOrderEpoch" }, { code: 15027; name: "InvalidYMint" }, { code: 15028; name: "OrderNotInRetailQueue" }, { code: 15029; name: "OrderNotInMarketMakerQueue" }, { code: 15030; name: "InvalidAuctionStatus" }, { code: 15031; name: "AuctionIsHalted" }, { code: 15032; name: "InvalidAuctionInit" }, { code: 15033; name: "InvalidXMint" }, { code: 15034; name: "InvalidOracles" }, { code: 15035; name: "UnableToFindMarketPrice" }, { code: 15036; name: "UnableToIdentifyCurrencyPair" }, { code: 15037; name: "MintDecimalsTooLarge" }, { code: 15038; name: "MintCaptureListEmpty" }, { code: 15039; name: "MintCaptureListSizeMismatch" }, { code: 15040; name: "QuoteCurrencyConversionOverflow" }, { code: 15041; name: "InvalidPriceOraclesPassed" }, { code: 15042; name: "OracleCaptureListEmpty" }, { code: 15043; name: "OracleForXMintNotFound" }, { code: 15044; name: "PythInvalidAccountData" }, { code: 15045; name: "PythBadVersionNumber" }, { code: 15046; name: "PythWrongAccountType" }, { code: 15047; name: "OtherPythError" }, { code: 15048; name: "InvalidNextAuctionEpoch" }, { code: 15049; name: "ArbiterDoesNotDeserveReward" }, { code: 15050; name: "InvalidNotionalSize" }, { code: 15051; name: "UnexpectedBufferSize" }, { code: 15052; name: "Ed25519InstructionNotIncluded" }, { code: 15053; name: "Ed25519InstructionInvalidSigCount" }, { code: 15054; name: "Ed25519InstructionInvalidSigOffset" }, { code: 15055; name: "Ed25519InstructionInvalidSigIndex" }, { code: 15056; name: "Ed25519InstructionInvalidSig" }, { code: 15057; name: "Ed25519InstructionInvalidPubKeyOffset" }, { code: 15058; name: "Ed25519InstructionInvalidPubKeyIndex" }, { code: 15059; name: "Ed25519InstructionInvalidPubKey" }, { code: 15060; name: "Ed25519InstructionInvalidMsgOffset" }, { code: 15061; name: "Ed25519InstructionInvalidMsgIndex" }, { code: 15062; name: "Ed25519InstructionInvalidMsg" }, { code: 15063; name: "InvalidMarketMakerEncryptionPubKey" }, { code: 15064; name: "InvalidRebateReceiverTokenAccount" }, { code: 15065; name: "InvalidMarketMaker" }, { code: 15067; name: "InvalidRetailYTokenAccount" }, { code: 15068; name: "FillNotYetCloseable" }, { code: 15069; name: "NoAuctionWinner" }, { code: 15070; name: "InvalidMarketMakerXTokenAccount" }, { code: 15071; name: "InvalidMarketMakerAccountOwner" }, { code: 15072; name: "InvalidBidRecoveryVaultAccountAddress" }, { code: 15073; name: "InvalidBidRecoveryVaultAccountNotWritable" }, { code: 15074; name: "InvalidXRecoveryVaultAccountAddress" }, { code: 15075; name: "InvalidXRecoveryVaultAccountNotWritable" }, { code: 15076; name: "InvalidCloseFillRemainingAccounts" }, { code: 15077; name: "InvalidCloseFillRetailDataAccount" }, { code: 15080; name: "InvalidCloseRetailDataAccountOpenOrders" }, { code: 15081; name: "InvalidCloseRetailDataAccountUnsettledFills" }, { code: 15082; name: "InvalidCloseRetailDataAccountWrongOwner" }, { code: 15090; name: "InvalidCloseAuctionEpochStateOpenOrders" }, { code: 15091; name: "InvalidCloseAuctionEpochStateUnsettledFills" }, { code: 15092; name: "InvalidCloseAuctionEpochStateAuctionActive" }, { code: 15093; name: "InvalidCloseAuctionEpochStateOwner" }, { code: 15100; name: "NotReclaimableByCurrentLeader" }, { code: 15101; name: "NotReclaimableInvalidMarketMakerOwner" }, { code: 15102; name: "InvalidAuctionStatusChange" }, { code: 15110; name: "InvalidYRecoveryVaultAccountAddress" }, { code: 15111; name: "InvalidYRecoveryVaultAccountNotWritable" }, { code: 15112; name: "InvalidFillOrderRemainingAccounts" }, { code: 15200; name: "InvalidEndorsement" }, { code: 15201; name: "InsufficientSignatoryStake" }, { code: 15300; name: "InvalidDFlowAdmin" }, { code: 15301; name: "InvalidWhitelistEntryType" }, { code: 15302; name: "AlreadyWhitelisted" }, { code: 15303; name: "NotWhitelisted" }, { code: 15304; name: "InvalidAuctionOwner" }, { code: 15800; name: "InvalidVotePeriod" }, { code: 15801; name: "InvalidClaimPeriod" }, { code: 15802; name: "NegativeClockUnixTimestamp" }, { code: 15999; name: "DFlowInvariantViolated" }]; instructions: [{ accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is being initialized with 40 bytes, paid for by", "dflow_admin. This account is a PDA generated by the following", "seeds: the string literal `global_config`"]; isMut: true; isSigner: false; name: "globalConfigAccount" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "dflowAdmin" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }]; docs: ["This instruction creates the global config account and sets the", "DFlow admin.", "", "The DFlow admin controls access to the protocol by granting roles", "to accounts that allow them to perform privileged actions such", "as auction management. This instruction must be the first instruction", "called after program deployment and can only be called once."]; name: "initGlobalConfigInstruction" }, { accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is a PDA generated by the following seeds: the string", "literal `global_config`. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "globalConfigAccount" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction"]; isMut: false; isSigner: true; name: "dflowAdmin" }, { docs: ["The new DFlow admin's public key."]; isMut: false; isSigner: false; name: "newDflowAdmin" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }]; docs: ["This instruction updates the DFlow admin.", "", "The current DFlow admin can use this instruction to assign a", "new DFlow admin."]; name: "setNewDflowAdmin" }, { accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is a PDA generated by the following seeds: the string", "literal `global_config`"]; isMut: false; isSigner: false; name: "globalConfigAccount" }, { docs: ["The account to which the whitelist permissions apply."]; isMut: false; isSigner: false; name: "principal" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "dflowAdmin" }, { docs: ["This account stores the permissions that apply", "to the principal. This account is being initialized with 42 bytes,", "paid for by dflow_admin. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the principal account"]; isMut: true; isSigner: false; name: "whitelistEntry" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }, { name: "whitelistEntryBump"; type: "u8" }, { name: "role"; type: "u8" }]; docs: ["This instruction creates the principal's whitelist entry account", "and grants the specified role to the principal."]; name: "grantRoleUninitializedEntry" }, { accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is a PDA generated by the following seeds: the string", "literal `global_config`"]; isMut: false; isSigner: false; name: "globalConfigAccount" }, { docs: ["The account to which the whitelist permissions apply."]; isMut: false; isSigner: false; name: "principal" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "dflowAdmin" }, { docs: ["This account stores the permissions that apply", "to the principal. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `whitelist_entry`, the public key of the principal account"]; isMut: true; isSigner: false; name: "whitelistEntry" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }, { name: "whitelistEntryBump"; type: "u8" }, { name: "role"; type: "u8" }]; docs: ["This instruction grants the specified role to the principal."]; name: "grantRole" }, { accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is a PDA generated by the following seeds: the string", "literal `global_config`"]; isMut: false; isSigner: false; name: "globalConfigAccount" }, { docs: ["This account stores the permissions that apply", "to the principal. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `whitelist_entry`, the public key of the principal account"]; isMut: true; isSigner: false; name: "whitelistEntry" }, { docs: ["The account to which the whitelist permissions apply."]; isMut: false; isSigner: false; name: "principal" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "dflowAdmin" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }, { name: "whitelistEntryBump"; type: "u8" }, { name: "role"; type: "u8" }]; docs: ["This instruction revokes the specified role from the principal", "and closes the principal's whitelist account if it no longer", "grants any permissions."]; name: "revokeRole" }, { accounts: [{ docs: ["The recovery state account holds state specific", "to the recovery vault. This account is being initialized with", "40 bytes, paid for by auction_owner. This account is a PDA generated", "by the following seeds: the public key of the recovery_vault_mint", "account, the string literal `recovery_state`"]; isMut: true; isSigner: false; name: "recoveryStateAccount" }, { docs: ["The recovery vault account is an SPL token account", "that holds assets that could not be transferred to the intended", "recipient because the intended recipient did not have a token", "account at transfer time. Assets deposited into this account", "are held until the intended recipient makes a claim to retrieve", "the assets. This account is being initialized and is paid for", "by auction_owner. This is a token account which is being initialized,", "and is associated with the recovery_vault_mint mint. The authority", "for this token account is recovery_state_account. This account", "is a PDA generated by the following seeds: the public key of", "the recovery_vault_mint account, the string literal `recovery_vault`"]; isMut: true; isSigner: false; name: "recoveryVaultAccount" }, { docs: ["The SPL mint for the recovery vault account."]; isMut: false; isSigner: false; name: "recoveryVaultMint" }, { docs: ["The auction owner is an authority with permission", "granted by the DFlow admin to create recovery vaults, create", "new auctions, and halt, resume, or deprecate existing auctions.", "This account is a signer for the instruction. This account is", "expected to be mutable"]; isMut: true; isSigner: true; name: "auctionOwner" }, { docs: ["This account stores the permissions that apply", "to the auction_owner. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the auction_owner account"]; isMut: false; isSigner: false; name: "auctionOwnerWhitelistEntry" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "recoveryStateAccountBump"; type: "u8" }, { name: "recoveryVaultAccountBump"; type: "u8" }, { name: "auctionOwnerWhitelistEntryBump"; type: "u8" }]; docs: ["This instruction creates a recovery vault.", "", "Recovery vaults are required for all mints used in the protocol.", "If a transfer recipient does not have a token account set up,", "the transferor can direct the protocol to transfer the tokens", "to the recovery vault. The intended recipient can then recover", "the tokens by submitting a recovery claim."]; name: "initRecoveryVaultInstruction" }, { accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is a PDA generated by the following seeds: the string", "literal `global_config`"]; isMut: false; isSigner: false; name: "globalConfigAccount" }, { docs: ["This account contains a list of non-deprecated", "auction IDs. This account is being initialized with 8240 bytes,", "paid for by dflow_admin. This account is a PDA generated by the", "following seeds: the string literal `mapper`"]; isMut: true; isSigner: false; name: "auctionMapper" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "dflowAdmin" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }, { name: "auctionMapperBump"; type: "u8" }]; docs: ["This instruction initializes the auction mapper account.", "", "The auction mapper account contains a list of auctions that are", "not deprecated. Auctions will either be in a trading or halted", "state. This function can only be called by the DFlow admin."]; name: "initAuctionMapperInstruction" }, { accounts: [{ docs: ["The auction state account holds state specific", "to the auction. This account is being initialized with 1280 bytes,", "paid for by auction_owner. This account is a PDA generated by", "the following seeds: the string literal `auction_state`, an unsigned", "64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["The bid vault account is an SPL token account", "that holds bids made by market makers in the auctions for order", "flow. Bids held in this account are held only temporarily, and", "are distributed out upon fills and fill arbitration. This account", "is being initialized and is paid for by auction_owner. This is", "a token account which is being initialized, and is associated", "with the bid_mint_account mint. The authority for this token", "account is auction_state_account. This account is a PDA generated", "by the following seeds: the string literal `bid_vault`, an unsigned", "64 bit integer"]; isMut: true; isSigner: false; name: "bidVaultAccount" }, { docs: ["The vote vault account is an SPL token account", "that holds votes made by arbiters on each fill. Vote stakes held", "in this account are returned to the arbiters upon honest voting", "of the fill. This account is being initialized and is paid for", "by auction_owner. This is a token account which is being initialized,", "and is associated with the vote_mint_account mint. The authority", "for this token account is auction_state_account. This account", "is a PDA generated by the following seeds: the string literal", "`vote_vault`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "voteVaultAccount" }, { docs: ["This account contains a list of non-deprecated", "auction IDs. This account is expected to be mutable. This account", "is a PDA generated by the following seeds: the string literal", "`mapper`"]; isMut: true; isSigner: false; name: "auctionMapper" }, { docs: ["The auction owner is an authority with permission", "granted by the DFlow admin to create recovery vaults, create", "new auctions, and halt, resume, or deprecate existing auctions.", "This account is a signer for the instruction. This account is", "expected to be mutable"]; isMut: true; isSigner: true; name: "auctionOwner" }, { docs: ["This account stores the permissions that apply", "to the auction_owner. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the auction_owner account"]; isMut: false; isSigner: false; name: "auctionOwnerWhitelistEntry" }, { docs: ["The SPL mint associated with the token that market", "makers use to bid in the order flow auctions."]; isMut: false; isSigner: false; name: "bidMintAccount" }, { docs: ["The SPL mint associated with the token that arbiters", "use to vote on the fairness of the fills."]; isMut: false; isSigner: false; name: "voteMintAccount" }, { docs: ["The recovery state account for the bid mint. This", "account is a PDA generated by the following seeds: the public", "key of the bid_mint_account account, the string literal `recovery_state`"]; isMut: false; isSigner: false; name: "bidRecoveryStateAccount" }, { docs: ["The recovery vault account for the bid mint. This", "account is a PDA generated by the following seeds: the public", "key of the bid_mint_account account, the string literal `recovery_vault`"]; isMut: false; isSigner: false; name: "bidRecoveryVaultAccount" }, { docs: ["The recovery state account for the vote mint.", "This account is a PDA generated by the following seeds: the public", "key of the vote_mint_account account, the string literal `recovery_state`"]; isMut: false; isSigner: false; name: "voteRecoveryStateAccount" }, { docs: ["The recovery vault account for the vote mint.", "This account is a PDA generated by the following seeds: the public", "key of the vote_mint_account account, the string literal `recovery_vault`"]; isMut: false; isSigner: false; name: "voteRecoveryVaultAccount" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "auctionStateAccountBump"; type: "u8" }, { name: "bidVaultAccountBump"; type: "u8" }, { name: "voteVaultAccountBump"; type: "u8" }, { name: "auctionMapperBump"; type: "u8" }, { name: "auctionOwnerWhitelistEntryBump"; type: "u8" }, { name: "bidRecoveryStateAccountBump"; type: "u8" }, { name: "bidRecoveryVaultAccountBump"; type: "u8" }, { name: "voteRecoveryStateAccountBump"; type: "u8" }, { name: "voteRecoveryVaultAccountBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "minNotionalOrderSize"; type: "u64" }, { name: "maxNotionalOrderSize"; type: "u64" }, { name: "notionalDecimals"; type: "u8" }, { name: "batchNotionalSize"; type: "u64" }, { name: "voteSize"; type: "u64" }, { name: "supportedPairsCount"; type: "u8" }, { name: "votePeriod"; type: "u32" }, { name: "claimPeriod"; type: "u32" }]; docs: ["This instruction initializes an auction for order flow, and describes", "the specifications of the order flow account.", "", "This instruction is only callable by an auction owner. Once the", "auction is initialized, it remains in a Halted state until the", "auction owner sets the auction state to Trading."]; name: "initAuctionState" }, { accounts: [{ docs: ["The auction state account holds state specific", "to the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `auction_state`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["The SPL mint associated with the base token in", "a currency pair."]; isMut: false; isSigner: false; name: "baseCurrency" }, { docs: ["The SPL mint associated with the quote token in", "a currency pair."]; isMut: false; isSigner: false; name: "quoteCurrency" }, { docs: ["The Pyth price oracle associated with the base", "token in a currency pair."]; isMut: false; isSigner: false; name: "baseOracle" }, { docs: ["The Pyth price oracle associated with the quote", "token in a currency pair."]; isMut: false; isSigner: false; name: "quoteOracle" }, { docs: ["The recovery state account for the base mint.", "This account is a PDA generated by the following seeds: the public", "key of the base_currency account, the string literal `recovery_state`"]; isMut: false; isSigner: false; name: "baseRecoveryStateAccount" }, { docs: ["The recovery vault account for the base mint.", "This account is a PDA generated by the following seeds: the public", "key of the base_currency account, the string literal `recovery_vault`"]; isMut: false; isSigner: false; name: "baseRecoveryVaultAccount" }, { docs: ["The recovery state account for the quote mint.", "This account is a PDA generated by the following seeds: the public", "key of the quote_currency account, the string literal `recovery_state`"]; isMut: false; isSigner: false; name: "quoteRecoveryStateAccount" }, { docs: ["The recovery vault account for the quote mint.", "This account is a PDA generated by the following seeds: the public", "key of the quote_currency account, the string literal `recovery_vault`"]; isMut: false; isSigner: false; name: "quoteRecoveryVaultAccount" }, { docs: ["The auction owner is an authority with permission", "granted by the DFlow admin to create recovery vaults, create", "new auctions, and halt, resume, or deprecate existing auctions.", "This account is a signer for the instruction"]; isMut: false; isSigner: true; name: "auctionOwner" }, { docs: ["This account stores the permissions that apply", "to the auction_owner. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the auction_owner account"]; isMut: false; isSigner: false; name: "auctionOwnerWhitelistEntry" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "auctionStateAccountBump"; type: "u8" }, { name: "baseRecoveryStateAccountBump"; type: "u8" }, { name: "baseRecoveryVaultAccountBump"; type: "u8" }, { name: "quoteRecoveryStateAccountBump"; type: "u8" }, { name: "quoteRecoveryVaultAccountBump"; type: "u8" }, { name: "auctionOwnerWhitelistEntryBump"; type: "u8" }, { name: "auctionId"; type: "u64" }]; docs: ["This instruction adds a currency pair to an existing auction.", "", "Only a certain number of token pairs are allowed to exist in", "an auction and an error is thrown if this instruction is called", "when the token pairs count is saturated"]; name: "addCurrencyPair" }, { accounts: [{ docs: ["The auction state account holds state specific", "to the auction. This account is expected to be mutable. This", "account is being closed, and the destination of the lamports", "will be the auction_owner account. This account is a PDA generated", "by the following seeds: the string literal `auction_state`, an", "unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["This account contains a list of non-deprecated", "auction IDs. This account is expected to be mutable. This account", "is a PDA generated by the following seeds: the string literal", "`mapper`"]; isMut: true; isSigner: false; name: "auctionMapper" }, { docs: ["The auction owner is an authority with permission", "granted by the DFlow admin to create recovery vaults, create", "new auctions, and halt, resume, or deprecate existing auctions.", "This account is a signer for the instruction. This account is", "expected to be mutable"]; isMut: true; isSigner: true; name: "auctionOwner" }, { docs: ["This account stores the permissions that apply", "to the auction_owner. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the auction_owner account"]; isMut: false; isSigner: false; name: "auctionOwnerWhitelistEntry" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: [{ name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionMapperBump"; type: "u8" }, { name: "auctionOwnerWhitelistEntryBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "newStatus"; type: "u8" }]; docs: ["This instruction changes the status of an auction", "", "This instruction can be used to change the status of an auction", "between Halted, Trading, or Expired. Once Expired, the auction", "will not be revivable."]; name: "changeAuctionStatus" }, { accounts: [{ docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is being", "initialized with 101 bytes, paid for by owner. This account is", "a PDA generated by the following seeds: the string literal `epoch`,", "an unsigned 64 bit integer, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionEpochState" }, { docs: ["The auction state account holds state specific", "to the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `auction_state`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["The creator and owner of AuctionEpochState account.", "This account is a signer for the instruction. This account is", "expected to be mutable"]; isMut: true; isSigner: true; name: "owner" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "auctionEpochStateBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }]; docs: ["This instruction initializes an auction epoch state account", "", "AuctionEpochState carries state specific to a certain auction", "that needs to be remembered after the epoch ends. The AuctionEpochState", "accounts associated with auction epochs N and N + 1 need to be", "initialized when the auction for epoch N begins (i.e. in the", "first SubmitAuctionBid that auction N will receive). Recall that", "if the AuctionState has an epoch field that has value X, then", "auction X is currently active, and auction X - 1 is currently", "receiving order flow."]; name: "initAuctionEpochStateInstruction" }, { accounts: [{ docs: ["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 zeroed out", "upon the start of instruction processing"]; isMut: true; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The public key of the market maker. This account", "is a signer for the instruction"]; isMut: false; isSigner: true; name: "marketMakerAccountOwner" }, { docs: ["This account stores the permissions that apply", "to the market_maker_account_owner. This account is a PDA generated", "by the following seeds: the string literal `whitelist_entry`,", "the public key of the market_maker_account_owner account"]; isMut: false; isSigner: false; name: "marketMakerWhitelistEntry" }]; args: [{ name: "marketMakerWhitelistEntryBump"; type: "u8" }, { name: "maxOrdersSupported"; type: "u64" }, { name: "encryptionPubKey"; type: { array: ["u8", 32] } }]; docs: ["This instruction initializes the market maker account", "", "The market maker account tracks state specific to the market", "maker's market making activities. This instruction must be called", "prior to a market maker being active on DFlow."]; name: "initMarketMakerAccountInstruction" }, { accounts: [{ docs: ["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"]; isMut: true; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The public key of the market maker. This account", "is a signer for the instruction"]; isMut: false; isSigner: true; name: "marketMakerAccountOwner" }, { docs: ["This account stores the permissions that apply", "to the market_maker_account_owner. This account is a PDA generated", "by the following seeds: the string literal `whitelist_entry`,", "the public key of the market_maker_account_owner account"]; isMut: false; isSigner: false; name: "marketMakerWhitelistEntry" }]; args: [{ name: "marketMakerWhitelistEntryBump"; type: "u8" }, { name: "encryptionPubKey"; type: { array: ["u8", 32] } }]; docs: ["This instruction updates the market maker's 256-bit X25519 public", "key.", "", "Retail traders use the market maker's 256-bit X25519 public key", "to encrypt their order details when routing orders to the market", "maker. This instruction updates the market maker's X25519 public", "key."]; name: "updateEncryptionKeyInstruction" }, { accounts: [{ docs: ["The retail data account holds state specific to", "the retail trader. This account is expected to be zeroed out", "upon the start of instruction processing"]; isMut: true; isSigner: false; name: "retailDataAccount" }, { docs: ["The public key of the retail trader. This account", "is a signer for the instruction"]; isMut: false; isSigner: true; name: "retailAccountOwner" }]; args: [{ name: "maxOrdersSupported"; type: "u64" }]; docs: ["This instruction initializes the retail traders account.", "", "The retail data account tracks state specific to the retail trader's", "trading activities on DFlow."]; name: "initRetailDataAccountInstruction" }, { accounts: [{ docs: ["The retail data account holds state specific to", "the retail trader. This account is being closed, and the destination", "of the lamports will be the retail_account_owner account. This", "account is expected to be mutable"]; isMut: true; isSigner: false; name: "retailDataAccount" }, { docs: ["The public key of the retail trader. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "retailAccountOwner" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: []; docs: ["This instruction closes the retail trader's data account.", "", "When retail traders wish to close their account, and regain the", "lamports used to allocate the space for their data account, they", "can call this instruction. Retail traders may not close their", "account if they have open orders, and must wait for the orders", "to be filled, or cancel them."]; name: "closeRetailDataAccount" }, { accounts: [{ docs: ["The auction state account holds state specific", "to the auction. This account is a PDA generated by the following", "seeds: the string literal `auction_state`, an unsigned 64 bit", "integer"]; isMut: false; isSigner: false; name: "auctionStateAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is a", "PDA generated by the following seeds: the string literal `epoch`,", "an unsigned 64 bit integer, an unsigned 64 bit integer"]; isMut: false; isSigner: false; name: "auctionEpochState" }, { docs: ["The account which tracks the market maker's current", "bid in the auction. This account is being initialized with 16", "bytes, paid for by market_maker_account_owner. This account is", "a PDA generated by the following seeds: the string literal `bid_record`,", "an unsigned 64 bit integer, an unsigned 64 bit integer, the public", "key of the market_maker_data_account account"]; isMut: true; isSigner: false; name: "bidRecordAccount" }, { docs: ["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."]; isMut: false; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The public key of the market maker. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "marketMakerAccountOwner" }, { docs: ["This account stores the permissions that apply", "to the market_maker_account_owner. This account is a PDA generated", "by the following seeds: the string literal `whitelist_entry`,", "the public key of the market_maker_account_owner account"]; isMut: false; isSigner: false; name: "marketMakerWhitelistEntry" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "bidRecordAccountBump"; type: "u8" }, { name: "marketMakerWhitelistEntryBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }]; docs: ["This instruction is called by the market maker prior to bidding", "in an auction.", "", "Before a market maker bids in an auction, they must use this", "instruction to initialize an account to track their current bid", "in the auction."]; name: "initBidRecordAccount" }, { accounts: [{ docs: ["The auction state account holds state specific", "to the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `auction_state`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the string literal `epoch`, an unsigned 64 bit integer,", "an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionEpochState" }, { docs: ["The auction epoch state account for the next epoch.", "This account is a PDA generated by the following seeds: the string", "literal `epoch`, an unsigned 64 bit integer, an unsigned 64 bit", "integer"]; isMut: false; isSigner: false; name: "nextAuctionEpochState" }, { docs: ["The bid vault account is an SPL token account", "that holds bids made by market makers in the auctions for order", "flow. Bids held in this account are held only temporarily, and", "are distributed out upon fills and fill arbitration. This account", "is expected to be mutable. This account is a PDA generated by", "the following seeds: the string literal `bid_vault`, an unsigned", "64 bit integer"]; isMut: true; isSigner: false; name: "bidVaultAccount" }, { docs: ["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."]; isMut: false; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The SPL token account associated with the market", "maker used to bid in the auctions. This account is expected to", "be mutable"]; isMut: true; isSigner: false; name: "marketMakerAuctionTokenAccount" }, { docs: ["The account which tracks the market maker's current", "bid in the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `bid_record`, an unsigned 64 bit integer, an unsigned", "64 bit integer, the public key of the market_maker_data_account", "account"]; isMut: true; isSigner: false; name: "bidRecordAccount" }, { docs: ["The public key of the market maker. This account", "is a signer for the instruction"]; isMut: false; isSigner: true; name: "marketMakerAccountOwner" }, { docs: ["This account stores the permissions that apply", "to the market_maker_account_owner. This account is a PDA generated", "by the following seeds: the string literal `whitelist_entry`,", "the public key of the market_maker_account_owner account"]; isMut: false; isSigner: false; name: "marketMakerWhitelistEntry" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "nextAuctionEpochStateBump"; type: "u8" }, { name: "bidVaultAccountBump"; type: "u8" }, { name: "bidRecordAccountBump"; type: "u8" }, { name: "marketMakerWhitelistEntryBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }, { name: "nextAuctionEpoch"; type: "u64" }, { name: "bidSize"; type: "u64" }]; docs: ["This instruction is called by the market maker to bid in an auction.", "", "When a market maker wishes to bid in an auction, they can use", "this instruction to specify the parameters of their bid. Note", "that the first bidder in auction epoch N must ensure that auction", "epoch state accounts are initialized for auction epochs N and", "N + 1."]; name: "submitAuctionBidInstruction" }, { accounts: [{ docs: ["The auction state account holds state specific", "to the auction. This account is a PDA generated by the following", "seeds: the string literal `auction_state`, an unsigned 64 bit", "integer"]; isMut: false; isSigner: false; name: "auctionStateAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is a", "PDA generated by the following seeds: the string literal `epoch`,", "an unsigned 64 bit integer, an unsigned 64 bit integer"]; isMut: false; isSigner: false; name: "auctionEpochState" }, { docs: ["The bid vault account is an SPL token account", "that holds bids made by market makers in the auctions for order", "flow. Bids held in this account are held only temporarily, and", "are distributed out upon fills and fill arbitration. This account", "is expected to be mutable. This account is a PDA generated by", "the following seeds: the string literal `bid_vault`, an unsigned", "64 bit integer"]; isMut: true; isSigner: false; name: "bidVaultAccount" }, { docs: ["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."]; isMut: false; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The SPL token account associated with the market", "maker used to bid in the auctions. This account is expected to", "be mutable"]; isMut: true; isSigner: false; name: "marketMakerAuctionTokenAccount" }, { docs: ["The account which tracks the market maker's current", "bid in the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `bid_record`, an unsigned 64 bit integer, an unsigned", "64 bit integer, the public key of the market_maker_data_account", "account"]; isMut: true; isSigner: false; name: "bidRecordAccount" }, { docs: ["The public key of the market maker. This account", "is expected to be mutable. This account is a signer for the instruction"]; isMut: true; isSigner: true; name: "marketMakerAccountOwner" }, { docs: ["This account stores the permissions that apply", "to the market_maker_account_owner. This account is a PDA generated", "by the following seeds: the string literal `whitelist_entry`,", "the public key of the market_maker_account_owner account"]; isMut: false; isSigner: false; name: "marketMakerWhitelistEntry" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "bidVaultAccountBump"; type: "u8" }, { name: "bidRecordAccountBump"; type: "u8" }, { name: "marketMakerWhitelistEntryBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }]; docs: ["This instruction is called by the market maker to withdraw its", "losing auction bids and close its bid record account for the", "given auction.", "", "A market maker who is outbid in an auction can use this instruction", "to withdraw its bids in the auction and close its bid record", "account for the auction. A market maker who has won an auction", "can use this instruction to close its bid record account for", "the auction."]; name: "reclaimAuctionBidInstruction" }, { accounts: [{ docs: ["The SPL token account owned by the escrow vault,", "which holds the sold tokens during a swap from the retail trader.", "This account is being initialized and is paid for by retail_account_owner.", "This is a token account which is being initialized, and is associated", "with the x_mint mint. The authority for this token account is", "vault_meta_account. This account is a PDA generated by the following", "seeds: the public key of the retail_account_owner account, the", "string literal `vault`, the unsigned integer field named nonce", "in the retail_data_account account"]; isMut: true; isSigner: false; name: "vaultTokenAccount" }, { docs: ["The account which holds state specific to a given", "order initiated by the retail trader. This account is being initialized", "with 816 bytes, paid for by retail_account_owner. This account", "is a PDA generated by the following seeds: the public key of", "the retail_account_owner account, the string literal `vault_meta`,", "the unsigned integer field named nonce in the retail_data_account", "account"]; isMut: true; isSigner: false; name: "vaultMetaAccount" }, { docs: ["The auction epoch state account for the current", "epoch. This account is expected to be mutable. This account is", "a PDA generated by the following seeds: the string literal `epoch`,", "an unsigned 64 bit integer, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "currentAuctionEpochState" }, { docs: ["The auction epoch state account for the previous", "epoch. This account is expected to be mutable. This account is", "a PDA generated by the following seeds: the string literal `epoch`,", "an unsigned 64 bit integer, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "previousAuctionEpochState" }, { docs: ["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"]; isMut: true; isSigner: false; name: "retailXTokenAccount" }, { docs: ["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."]; isMut: false; isSigner: false; name: "rebateReceiverTokenAccount" }, { docs: ["The auction state account holds state specific", "to the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `auction_state`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["The retail data account holds state specific to", "the retail trader. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "retailDataAccount" }, { docs: ["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"]; isMut: true; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The public key of the retail trader. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "retailAccountOwner" }, { docs: ["The SPL mint account associated with the token", "that is sold by the retail trader during the swap."]; isMut: false; isSigner: false; name: "xMint" }, { docs: ["The signatory record account holds information", "about a signatory server, and the existence of the signatory", "record account is a valid proof that the signatory server has", "staked the requisite value in the protocol allowing it to endorse", "flow as originating from a retail source. This account is a PDA", "generated by the following seeds: the public key of the signatory_server", "account"]; isMut: false; isSigner: false; name: "signatoryRecord" }, { docs: ["The public key of the signatory server that endorses", "new orders as originating from a retail source. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "signatoryServer" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "vaultTokenAccountBump"; type: "u8" }, { name: "vaultMetaAccountBump"; type: "u8" }, { name: "currentAuctionEpochStateBump"; type: "u8" }, { name: "previousAuctionEpochStateBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "signatoryRecordBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }, { name: "previousAuctionEpoch"; type: "u64" }, { name: "retailEncryptionPubKey"; type: { array: ["u8", 32] } }, { name: "mmEncryptionPubKey"; type: { array: ["u8", 32] } }, { name: "encryptedOrderDetails"; type: "string" }, { name: "retailSigningPubKey"; type: { array: ["u8", 32] } }, { name: "retailSignature"; type: { array: ["u8", 64] } }, { name: "depositAmount"; type: "u64" }, { name: "orderType"; type: "u8" }]; docs: ["This instruction is called by retail traders when they submit", "their order. A transaction containing this instruction must be", "signed by a signatory server.", "", "When submitting orders, retail traders must encrypt the details", "of their order in order to hide information regarding which token", "is being received."]; name: "newOrderInstruction" }, { accounts: [{ docs: ["The SPL token account owned by the escrow vault,", "which holds the sold tokens during a swap from the retail trader.", "This account is expected to be mutable. This account is being", "closed, and the destination of the lamports will be the retail_account_owner", "account. This account is a PDA generated by the following seeds:", "the public key of the retail_account_owner account, the string", "literal `vault`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "vaultTokenAccount" }, { docs: ["The account which holds state specific to a given", "order initiated by the retail trader. This account is expected", "to be mutable. This account is being closed, and the destination", "of the lamports will be the retail_account_owner account. This", "account is a PDA generated by the following seeds: the public", "key of the retail_account_owner account, the string literal `vault_meta`,", "an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "vaultMetaAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the string literal `epoch`, the unsigned integer field", "named auction_id in the vault_meta_account account, the unsigned", "integer field named auction_epoch in the vault_meta_account account"]; isMut: true; isSigner: false; name: "auctionEpochState" }, { docs: ["The retail data account holds state specific to", "the retail trader. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "retailDataAccount" }, { docs: ["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"]; isMut: true; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["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"]; isMut: true; isSigner: false; name: "retailXTokenAccount" }, { docs: ["The public key of the retail trader. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "retailAccountOwner" }, { docs: ["The SPL mint account associated with the token", "that is sold by the retail trader during the swap."]; isMut: false; isSigner: false; name: "xMint" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "vaultTokenAccountBump"; type: "u8" }, { name: "vaultMetaAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "nonce"; type: "u64" }]; docs: ["This instruction cancels an open order.", "", "Cancelling an open order can only be done if it has not been", "filled and if the order has been filled partially, the retail", "trader can only cancel the part of the order which is still open."]; name: "cancelOrderInstruction" }, { accounts: [{ docs: ["The account which holds state specific to a given", "order initiated by the retail trader. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the public key of the retail_account_owner account, the", "string literal `vault_meta`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "vaultMetaAccount" }, { docs: ["The account which holds meta-information about", "the fill, so that arbiters can reference the information when", "voting on the fairness of the fill. This account is being initialized", "with 194 bytes, paid for by market_maker_account_owner. This", "account is a PDA generated by the following seeds: the public", "key of the vault_meta_account account, the unsigned integer field", "named fill_nonce in the vault_meta_account account, the string", "literal `fra`"]; isMut: true; isSigner: false; name: "fillRecordAccount" }, { docs: ["The retail data account holds state specific to", "the retail trader. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "retailDataAccount" }, { docs: ["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"]; isMut: true; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the string literal `epoch`, the unsigned integer field", "named auction_id in the vault_meta_account account, the unsigned", "integer field named auction_epoch in the vault_meta_account account"]; isMut: true; isSigner: false; name: "auctionEpochState" }, { docs: ["The auction state account holds state specific", "to the auction. This account is a PDA generated by the following", "seeds: the string literal `auction_state`, the unsigned integer", "field named auction_id in the vault_meta_account account"]; isMut: false; isSigner: false; name: "auctionStateAccount" }, { docs: ["The public key of the retail trader."]; isMut: false; isSigner: false; name: "retailAccountOwner" }, { docs: ["The SPL mint account associated with the token", "that is sold by the retail trader during the swap."]; isMut: false; isSigner: false; name: "xMint" }, { docs: ["The SPL mint account associated with the token", "that is received by the retail trader during the swap."]; isMut: false; isSigner: false; name: "yMint" }, { docs: ["The SPL token account associated with the market", "maker, and which sends the asset being received by the retail", "trader during a trade. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "marketMakerYTokenAccount" }, { docs: ["The public key of the market maker. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "marketMakerAccountOwner" }, { docs: ["This account stores the permissions that apply", "to the market_maker_account_owner. This account is a PDA generated", "by the following seeds: the string literal `whitelist_entry`,", "the public key of the market_maker_account_owner account"]; isMut: false; isSigner: false; name: "marketMakerWhitelistEntry" }, { docs: ["The SPL token account associated with the retail", "trader, and which receives the asset being sent by the market", "maker during a trade. This account is expected to be mutable.", "This account is the retail_y_token_account's associated token", "account for the mint of the asset sent by the market maker"]; isMut: true; isSigner: false; name: "retailYTokenAccount" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "instructions" }]; args: [{ name: "vaultMetaAccountBump"; type: "u8" }, { name: "fillRecordAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "marketMakerWhitelistEntryBump"; type: "u8" }, { name: "yRecoveryVaultAccountBump"; type: "u8" }, { name: "nonce"; type: "u64" }, { name: "orderDetails"; type: "string" }, { name: "fillAmount"; type: "u64" }, { name: "fillPrice"; type: "u64" }]; docs: ["This instruction is used to fill an open order", "", "When a market maker fills an order that is assigned to them,", "this instruction will partially settle the trade; the retail", "trader will receive the tokens from themarket maker, but the", "market maker must wait until arbiters have voted on the fairness", "of the fill in order to receive the retail trader's tokens."]; name: "fillOrderInstruction" }, { accounts: [{ docs: ["The account which holds state specific to a given", "order initiated by the retail trader. This account is a PDA generated", "by the following seeds: the public key of the retail_account_owner", "account, the string literal `vault_meta`, an unsigned 64 bit", "integer"]; isMut: false; isSigner: false; name: "vaultMetaAccount" }, { docs: ["The account which holds meta-information about", "the fill, so that arbiters can reference the information when", "voting on the fairness of the fill. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the public key of the vault_meta_account account, an unsigned", "16 bit integer, the string literal `fra`"]; isMut: true; isSigner: false; name: "fillRecordAccount" }, { docs: ["The account which holds the voting record made", "by an arbiter when the arbiter votes on the fairness of the fill.", "This account is being initialized with 9 bytes, paid for by arbiter.", "This account is a PDA generated by the following seeds: the public", "key of the fill_record_account account, the public key of the", "arbiter account, the string literal `vra`"]; isMut: true; isSigner: false; name: "voteRecordAccount" }, { docs: ["The auction state account holds state specific", "to the auction. This account is a PDA generated by the following", "seeds: the string literal `auction_state`, the unsigned integer", "field named auction_id in the vault_meta_account account"]; isMut: false; isSigner: false; name: "auctionStateAccount" }, { docs: ["The public key associated with the arbiter. This", "account is a signer for the instruction. This account is expected", "to be mutable"]; isMut: true; isSigner: true; name: "arbiter" }, { docs: ["This account stores the permissions that apply", "to the arbiter. This account is a PDA generated by the following", "seeds: the string literal `whitelist_entry`, the public key of", "the arbiter account"]; isMut: false; isSigner: false; name: "arbiterWhitelistEntry" }, { docs: ["The public key of the retail trader."]; isMut: false; isSigner: false; name: "retailAccountOwner" }, { docs: ["The SPL token account associated with the arbiter", "used to vote on the fairness of the fill by the market maker.", "This account is expected to be mutable"]; isMut: true; isSigner: false; name: "arbiterTokenAccount" }, { docs: ["The vote vault account is an SPL token account", "that holds votes made by arbiters on each fill. Vote stakes held", "in this account are returned to the arbiters upon honest voting", "of the fill. This account is expected to be mutable. This account", "is a PDA generated by the following seeds: the string literal", "`vote_vault`, the unsigned integer field named auction_id in", "the vault_meta_account account"]; isMut: true; isSigner: false; name: "voteVaultAccount" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "vaultMetaAccountBump"; type: "u8" }, { name: "fillRecordAccountBump"; type: "u8" }, { name: "voteRecordAccountBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "arbiterWhitelistEntryBump"; type: "u8" }, { name: "voteVaultAccountBump"; type: "u8" }, { name: "nonce"; type: "u64" }, { name: "fillNonce"; type: "u16" }, { name: "vote"; type: "u8" }]; docs: ["This instruction is used to vote on the fairness of a fill", "", "Arbiters vote on the fairness of a fill when the fill is open", "for voting. In order to vote on a fill, the arbiter must stake", "tokens on the accuracy of their vote. If the arbiter voted in", "the majority, they receive their tokens back. Otherwise the tokens", "are deposited into a DAO governed backstop fund for the protocol."]; name: "fillVoteInstruction" }, { accounts: [{ docs: ["The account which holds state specific to a given", "order initiated by the retail trader. This account is a PDA generated", "by the following seeds: the public key of the retail_account_owner", "account, the string literal `vault_meta`, an unsigned 64 bit", "integer"]; isMut: false; isSigner: false; name: "vaultMetaAccount" }, { docs: ["The account which holds meta-information about", "the fill, so that arbiters can reference the information when", "voting on the fairness of the fill. This account is being closed,", "and the destination of the lamports will be the market_maker_account_owner", "account. This account is a PDA generated by the following seeds:", "the public key of the vault_meta_account account, an unsigned", "16 bit integer, the string literal `fra`"]; isMut: false; isSigner: false; name: "fillRecordAccount" }, { docs: ["The account which holds the voting record made", "by an arbiter when the arbiter votes on the fairness of the fill.", "This account is expected to be mutable. This account is being", "closed, and the destination of the lamports will be the market_maker_account_owner", "account. This account is a PDA generated by the following seeds:", "the public key of the fill_record_account account, the public", "key of the arbiter account, the string literal `vra`"]; isMut: true; isSigner: false; name: "voteRecordAccount" }, { docs: ["The vote vault account is an SPL token account", "that holds votes made by arbiters on each fill. Vote stakes held", "in this account are returned to the arbiters upon honest voting", "of the fill. This account is expected to be mutable. This account", "is a PDA generated by the following seeds: the string literal", "`vote_vault`, the unsigned integer field named auction_id in", "the vault_meta_account account"]; isMut: true; isSigner: false; name: "voteVaultAccount" }, { docs: ["The bid vault account is an SPL token account", "that holds bids made by market makers in the auctions for order", "flow. Bids held in this account are held only temporarily, and", "are distributed out upon fills and fill arbitration. This account", "is expected to be mutable. This account is a PDA generated by", "the following seeds: the string literal `bid_vault`, the unsigned", "integer field named auction_id in the vault_meta_account account"]; isMut: true; isSigner: false; name: "bidVaultAccount" }, { docs: ["The auction state account holds state specific", "to the auction. This account is a PDA generated by the following", "seeds: the string literal `auction_state`, the unsigned integer", "field named auction_id in the vault_meta_account account"]; isMut: false; isSigner: false; name: "auctionStateAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is a", "PDA generated by the following seeds: the string literal `epoch`,", "the unsigned integer field named auction_id in the vault_meta_account", "account, the unsigned integer field named auction_epoch in the", "vault_meta_account account"]; isMut: false; isSigner: false; name: "auctionEpochState" }, { docs: ["The SPL token account associated with the arbiter", "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. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "arbiterBidTokenAccount" }, { docs: ["The public key associated with the arbiter. This", "account is a signer for the instruction. This account is expected", "to be mutable"]; isMut: true; isSigner: true; name: "arbiter" }, { docs: ["This account stores the permissions that apply", "to the arbiter. This account is a PDA generated by the following", "seeds: the string literal `whitelist_entry`, the public key of", "the arbiter account"]; isMut: false; isSigner: false; name: "arbiterWhitelistEntry" }, { docs: ["The public key of the retail trader."]; isMut: false; isSigner: false; name: "retailAccountOwner" }, { docs: ["The SPL token account associated with the arbiter", "used to vote on the fairness of the fill by the market maker.", "This account is expected to be mutable"]; isMut: true; isSigner: false; name: "arbiterTokenAccount" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "vaultMetaAccountBump"; type: "u8" }, { name: "fillRecordAccountBump"; type: "u8" }, { name: "voteRecordAccountBump"; type: "u8" }, { name: "voteVaultAccountBump"; type: "u8" }, { name: "bidVaultAccountBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "arbiterWhitelistEntryBump"; type: "u8" }, { name: "nonce"; type: "u64" }, { name: "fillNonce"; type: "u16" }]; docs: ["This instruction is used to claim back the tokens staked during", "a fill vote by an arbiter.", "", "If voting with the majority, the arbiter will receieve a payment", "from the network along with their original vote. However, if", "the arbiter did not vote in the majority on the fill, they will", "not receive their tokens back."]; name: "claimVoteRewardInstruction" }, { accounts: [{ docs: ["The SPL token account owned by the escrow vault,", "which holds the sold tokens during a swap from the retail trader.", "This account is expected to be mutable. This account is being", "closed, and the destination of the lamports will be the retail_account_owner", "account. This account is a PDA generated by the following seeds:", "the public key of the retail_account_owner account, the string", "literal `vault`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "vaultTokenAccount" }, { docs: ["The account which holds state specific to a given", "order initiated by the retail trader. This account is expected", "to be mutable. This account is being closed, and the destination", "of the lamports will be the retail_account_owner account. This", "account is a PDA generated by the following seeds: the public", "key of the retail_account_owner account, the string literal `vault_meta`,", "an unsigned 64 bit integer. The key of rebate_receiver_token_account", "must match the field named rebate_receiver_token_account in this", "account"]; isMut: true; isSigner: false; name: "vaultMetaAccount" }, { docs: ["The account which holds meta-information about", "the fill, so that arbiters can reference the information when", "voting on the fairness of the fill. This account is expected", "to be mutable. This account is being closed, and the destination", "of the lamports will be the market_maker_account_owner account.", "This account is a PDA generated by the following seeds: the public", "key of the vault_meta_account account, an unsigned 16 bit integer,", "the string literal `fra`. The key of market_maker_account_owner", "must match the field named market_maker_account_owner in this", "account"]; isMut: true; isSigner: false; name: "fillRecordAccount" }, { docs: ["The bid vault account is an SPL token account", "that holds bids made by market makers in the auctions for order", "flow. Bids held in this account are held only temporarily, and", "are distributed out upon fills and fill arbitration. This account", "is expected to be mutable. This account is a PDA generated by", "the following seeds: the string literal `bid_vault`, the unsigned", "integer field named auction_id in the vault_meta_account account"]; isMut: true; isSigner: false; name: "bidVaultAccount" }, { docs: ["The auction state account holds state specific", "to the auction. This account is a PDA generated by the following", "seeds: the string literal `auction_state`, the unsigned integer", "field named auction_id in the vault_meta_account account"]; isMut: false; isSigner: false; name: "auctionStateAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the string literal `epoch`, the unsigned integer field", "named auction_id in the vault_meta_account account, the unsigned", "integer field named auction_epoch in the vault_meta_account account"]; isMut: true; isSigner: false; name: "auctionEpochState" }, { docs: ["The SPL token account associated with the market", "maker, and which receives the asset sold by the retail trader", "during a trade. This account is expected to be mutable. This", "account is the market_maker_account_owner's associated token", "account for the mint of the asset sent by the retail trader"]; isMut: true; isSigner: false; name: "marketMakerXTokenAccount" }, { docs: ["The retail data account holds state specific to", "the retail trader. This account is expected to be mutable. The", "key of retail_account_owner must match the field named retail_account_owner", "in this account"]; isMut: true; isSigner: false; name: "retailDataAccount" }, { docs: ["The public key of the market maker. This account", "is expected to be mutable"]; isMut: true; isSigner: false; name: "marketMakerAccountOwner" }, { docs: ["The public key associated with the arbiter. This", "account is a signer for the instruction"]; isMut: false; isSigner: true; name: "arbiter" }, { docs: ["This account stores the permissions that apply", "to the arbiter. This account is a PDA generated by the following", "seeds: the string literal `whitelist_entry`, the public key of", "the arbiter account"]; isMut: false; isSigner: false; name: "arbiterWhitelistEntry" }, { docs: ["The public key of the retail trader. This account", "is expected to be mutable"]; isMut: true; isSigner: false; name: "retailAccountOwner" }, { docs: ["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. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "rebateReceiverTokenAccount" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "vaultTokenAccountBump"; type: "u8" }, { name: "vaultMetaAccountBump"; type: "u8" }, { name: "fillRecordAccountBump"; type: "u8" }, { name: "bidVaultAccountBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "arbiterWhitelistEntryBump"; type: "u8" }, { name: "bidRecoveryVaultAccountBump"; type: "u8" }, { name: "xRecoveryVaultAccountBump"; type: "u8" }, { name: "nonce"; type: "u64" }, { name: "fillNonce"; type: "u16" }]; docs: ["This instruction is used to close the various accounts opened", "during the lifecycle of the trade, and additionally give a rebate", "to the order flow source for its order flow.", "", "Lamports used to open the accounts will be returned to the payers", "who opened the accounts."]; name: "closeFillAccounts" }, { accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is a PDA generated by the following seeds: the string", "literal `global_config`"]; isMut: false; isSigner: false; name: "globalConfigAccount" }, { docs: ["The signatory state account holds information", "about the global system of signatory servers, and the existence", "of the signatory state account is a valid proof that the signatory", "server system has been initialized. This account is being initialized", "with 40 bytes, paid for by dflow_admin. This account is a PDA", "generated by the following seeds: the string literal `sigstate`"]; isMut: true; isSigner: false; name: "signatoryState" }, { docs: ["The signatory stake vault holds staked assets", "from signatory server operators. This account is being initialized", "and is paid for by dflow_admin. This is a token account which", "is being initialized, and is associated with the signatory_stake_mint", "mint. The authority for this token account is signatory_state.", "This account is a PDA generated by the following seeds: the string", "literal `sigstake`"]; isMut: true; isSigner: false; name: "signatoryStakeVault" }, { docs: ["The SPL mint account associated with the token", "that is staked by the signatory server."]; isMut: false; isSigner: false; name: "signatoryStakeMint" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "dflowAdmin" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }, { name: "signatoryStateBump"; type: "u8" }, { name: "signatoryStakeVaultBump"; type: "u8" }]; docs: ["This instruction is used to initialize global state for tracking", "the system of signatory servers.", "", "This instruction can only be called by the DFlow admin and can", "only be called once."]; name: "initSignatorySystem" }, { accounts: [{ docs: ["The signatory record account holds information", "about a signatory server, and the existence of the signatory", "record account is a valid proof that the signatory server has", "staked the requisite value in the protocol allowing it to endorse", "flow as originating from a retail source. This account is being", "initialized with 48 bytes, paid for by signatory_server. This", "account is a PDA generated by the following seeds: the public", "key of the signatory_server account"]; isMut: true; isSigner: false; name: "signatoryRecord" }, { docs: ["The signatory stake vault holds staked assets", "from signatory server operators. This account is expected to", "be mutable. This account is a PDA generated by the following", "seeds: the string literal `sigstake`"]; isMut: true; isSigner: false; name: "signatoryStakeVault" }, { docs: ["The signatory server's token account used for", "originating the stake transfer. This account is expected to be", "mutable"]; isMut: true; isSigner: false; name: "signatoryServerTokenAccount" }, { docs: ["The public key of the signatory server that endorses", "new orders as originating from a retail source. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "signatoryServer" }, { docs: ["This account stores the permissions that apply", "to the signatory_server. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the signatory_server account"]; isMut: false; isSigner: false; name: "signatoryServerWhitelistEntry" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "signatoryRecordBump"; type: "u8" }, { name: "signatoryStakeVaultBump"; type: "u8" }, { name: "signatoryServerWhitelistEntryBump"; type: "u8" }]; docs: ["This instruction is used to stake the requisite amount of tokens", "necessary to endorse flow as retail. This stake is subject to", "slashing based on the quality of the order flow sent by the signatory", "server.", "", "Signatory server operators provide helpful network participation", "by endorsing and forwarding retail order flow to the network.", "This helpful network participation is rewarded, or slashed based", "on the quality of order flow sent."]; name: "createSignatory" }, { accounts: [{ docs: ["The signatory record account holds information", "about a signatory server, and the existence of the signatory", "record account is a valid proof that the signatory server has", "staked the requisite value in the protocol allowing it to endorse", "flow as originating from a retail source. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the public key of the signatory_server account"]; isMut: true; isSigner: false; name: "signatoryRecord" }, { docs: ["The signatory stake vault holds staked assets", "from signatory server operators. This account is expected to", "be mutable. This account is a PDA generated by the following", "seeds: the string literal `sigstake`"]; isMut: true; isSigner: false; name: "signatoryStakeVault" }, { docs: ["The signatory server's token account used for", "originating the stake transfer. This account is expected to be", "mutable"]; isMut: true; isSigner: false; name: "signatoryServerTokenAccount" }, { docs: ["The public key of the signatory server that endorses", "new orders as originating from a retail source. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "signatoryServer" }, { docs: ["This account stores the permissions that apply", "to the signatory_server. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the signatory_server account"]; isMut: false; isSigner: false; name: "signatoryServerWhitelistEntry" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "signatoryRecordBump"; type: "u8" }, { name: "signatoryStakeVaultBump"; type: "u8" }, { name: "signatoryServerWhitelistEntryBump"; type: "u8" }, { name: "stakeSize"; type: "u64" }]; docs: ["This instruction is used to stake additional tokens into an existing", "signatory server stake vault.", "", "Signatory servers are subject to slashing, and if slashed to", "below the stake minimum they may no longer be qualified to endorse", "order flow as originated from a retail source."]; name: "stakeSignatory" }, { accounts: [{ docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is expected", "to be mutable. This account is being closed, and the destination", "of the lamports will be the auction_owner account. This account", "is a PDA generated by the following seeds: the string literal", "`epoch`, an unsigned 64 bit integer, an unsigned 64 bit integer.", "The key of owner must match the field named owner in this account"]; isMut: true; isSigner: false; name: "auctionEpochState" }, { docs: ["The auction state account holds state specific", "to the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `auction_state`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["The account that created the AuctionEpochState", "account by calling init_auction_epoch_state_account. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "owner" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: [{ name: "auctionEpochStateBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }]; docs: ["This instruction is used to close an AuctionEpochState account.", "", "The auction owner can use this instruction to close the AuctionEpochState", "account for an old epoch that has no open orders or fills pending", "settlement. The auction owner can also use this instruction close", "the AuctionEpochState account for the last, current, or next", "epoch if the auction is in the Draining state."]; name: "closeAuctionEpochState" }]; name: "dflow"; types: [{ name: "CurrencyPair"; type: { fields: [{ name: "base"; type: "publicKey" }, { name: "baseOracle"; type: "publicKey" }, { name: "quote"; type: "publicKey" }, { name: "quoteOracle"; type: "publicKey" }]; kind: "struct" } }, { name: "MantissaExp"; type: { fields: [{ name: "mantissa"; type: "i64" }, { name: "exponent"; type: "i32" }]; kind: "struct" } }, { name: "OrderDetails"; type: { fields: [{ name: "yMint"; type: "publicKey" }, { name: "minFillPrice"; type: "u64" }]; kind: "struct" } }, { name: "MarketMakerEvent"; type: { fields: [{ name: "event"; type: "u8" }, { name: "data"; type: { array: ["u8", 128] } }]; kind: "struct" } }, { name: "AuctionStateAccountEvent"; type: { kind: "enum"; variants: [{ name: "Initialized" }, { name: "NewBestBid" }, { name: "NewAuctionWinner" }, { name: "NextOrderIdIncremented" }, { name: "AuctionStateChanged" }] } }, { name: "AuctionStatus"; type: { kind: "enum"; variants: [{ name: "Trading" }, { name: "Halted" }, { name: "Expired" }, { name: "Draining" }] } }, { name: "Side"; type: { kind: "enum"; variants: [{ name: "Ask" }, { name: "Bid" }] } }, { name: "MarketMakerEventKind"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "OrderPlaced" }, { name: "OrderCancelled" }, { name: "OrderPartiallyFilled" }, { name: "OrderFilled" }] } }, { name: "RetailDataAccountEvent"; type: { kind: "enum"; variants: [{ name: "Initialized" }, { name: "NewOrder" }, { name: "OrderCancelled" }, { name: "OrderFilled" }, { name: "OrderPartiallyFilled" }, { name: "AccountClosed" }] } }, { name: "Role"; type: { kind: "enum"; variants: [{ name: "AuctionOwner" }, { name: "Arbiter" }, { name: "SignatoryServer" }, { name: "MarketMaker" }] } }, { name: "OrderType"; type: { kind: "enum"; variants: [{ name: "LimitOrder" }, { name: "MarketOrder" }] } }]; version: "0.1.0" }

Type declaration

  • accounts: [{ name: "globalConfigAccount"; type: { fields: [{ name: "dflowAdmin"; type: "publicKey" }]; kind: "struct" } }, { name: "recoveryStateAccount"; type: { fields: [{ name: "mint"; type: "publicKey" }]; kind: "struct" } }, { name: "auctionMapper"; type: { fields: [{ name: "auctionIds"; type: { vec: "u64" } }]; kind: "struct" } }, { name: "auctionStateAccount"; type: { fields: [{ name: "event"; type: "u8" }, { name: "status"; type: "u8" }, { name: "supportedPairsCount"; type: "u8" }, { name: "auctionWinner"; type: { option: "publicKey" } }, { name: "auctionLeader"; type: { option: "publicKey" } }, { name: "bidMint"; type: "publicKey" }, { name: "voteRewardMint"; type: "publicKey" }, { name: "auctionOwner"; type: "publicKey" }, { name: "voteSize"; type: "u64" }, { name: "auctionId"; type: "u64" }, { name: "epoch"; type: "u64" }, { name: "minNotionalOrderSize"; type: "u64" }, { name: "maxNotionalOrderSize"; type: "u64" }, { name: "notionalDecimals"; type: "u8" }, { name: "bestBid"; type: "u64" }, { name: "winningBid"; type: "u64" }, { name: "batchNotionalSize"; type: "u64" }, { name: "nextOrderId"; type: "u64" }, { name: "votePeriod"; type: "u32" }, { name: "claimPeriod"; type: "u32" }, { name: "numOpenEpochs"; type: "u32" }, { name: "pairs"; type: { vec: { defined: "CurrencyPair" } } }]; kind: "struct" } }, { name: "auctionEpochState"; type: { fields: [{ name: "routedNotional"; type: "u64" }, { name: "bidSize"; type: "u64" }, { name: "epoch"; type: "u64" }, { name: "winner"; type: { option: "publicKey" } }, { name: "numOpenOrders"; type: "u16" }, { name: "numUnsettledFills"; type: "u16" }, { name: "owner"; type: "publicKey" }]; kind: "struct" } }, { name: "fillRecordAccount"; type: { fields: [{ name: "marketMakerAccountOwner"; type: "publicKey" }, { name: "retailAccountOwner"; type: "publicKey" }, { name: "vaultMetaAccount"; type: "publicKey" }, { name: "fillXAmount"; type: "u64" }, { name: "fillNotional"; type: "u64" }, { name: "orderDetails"; type: { defined: "OrderDetails" } }, { name: "auctionId"; type: "u64" }, { name: "fillTimestamp"; type: "u64" }, { name: "retailNonce"; type: "u64" }, { name: "fillNonce"; type: "u16" }, { name: "fairVotes"; type: "u32" }, { name: "unfairVotes"; type: "u32" }]; kind: "struct" } }, { name: "marketMakerDataAccount"; type: { fields: [{ name: "owner"; type: "publicKey" }, { name: "encryptionPubKey"; type: { array: ["u8", 32] } }, { name: "maxOrdersSupported"; type: "u64" }, { name: "eventsHead"; type: "u8" }, { name: "events"; type: { vec: { defined: "MarketMakerEvent" } } }, { name: "orders"; type: { vec: "publicKey" } }]; kind: "struct" } }, { name: "retailDataAccount"; type: { fields: [{ name: "retailAccountOwner"; type: "publicKey" }, { name: "event"; type: "u8" }, { name: "nonce"; type: "u64" }, { name: "numUnsettledFills"; type: "u64" }, { name: "maxOrdersSupported"; type: "u64" }, { name: "orders"; type: { vec: "publicKey" } }]; kind: "struct" } }, { name: "vaultMetaAccount"; type: { fields: [{ name: "retailEncryptionPubKey"; type: { array: ["u8", 32] } }, { name: "mmEncryptionPubKey"; type: { array: ["u8", 32] } }, { name: "retailSigningPubKey"; type: { array: ["u8", 32] } }, { name: "retailSignature"; type: { array: ["u8", 64] } }, { name: "vaultTokenAccount"; type: "publicKey" }, { name: "rebateReceiverTokenAccount"; type: "publicKey" }, { name: "marketMakerDataAccount"; type: "publicKey" }, { name: "retailDataAccount"; type: "publicKey" }, { name: "retailAccountOwner"; type: "publicKey" }, { name: "retailXTokenAccount"; type: "publicKey" }, { name: "xMint"; type: "publicKey" }, { name: "depositNotional"; type: "u64" }, { name: "depositAmount"; type: "u64" }, { name: "filledXAmount"; type: "u64" }, { name: "filledYAmount"; type: "u64" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }, { name: "nonce"; type: "u64" }, { name: "orderId"; type: "u64" }, { name: "orderType"; type: "u8" }, { name: "fillNonce"; type: "u16" }, { name: "basketPrices"; type: { vec: { defined: "MantissaExp" } } }, { name: "encryptedOrderDetails"; type: "string" }]; kind: "struct" } }, { name: "voteRecordAccount"; type: { fields: [{ name: "vote"; type: "u8" }]; kind: "struct" } }, { name: "bidRecordAccount"; type: { fields: [{ name: "bidSize"; type: "u64" }]; kind: "struct" } }, { name: "signatoryRecord"; type: { fields: [{ name: "signatoryServer"; type: "publicKey" }, { name: "stakeSize"; type: "u64" }]; kind: "struct" } }, { name: "signatoryState"; type: { fields: [{ name: "stakeMint"; type: "publicKey" }]; kind: "struct" } }, { name: "whitelistEntry"; type: { fields: [{ name: "principal"; type: "publicKey" }, { name: "roleFlags"; type: "u16" }]; kind: "struct" } }]
  • errors: [{ code: 15000; name: "BidDidNotExceedBest" }, { code: 15001; name: "RetailOrderQueueFull" }, { code: 15002; name: "MarketMakerOrderQueueFull" }, { code: 15003; name: "_MessageNotSignedByRetailTrader" }, { code: 15004; name: "_NoDesignatedMarketMakerAvailable" }, { code: 15005; name: "_OrdersRequestedExceedsMax" }, { code: 15006; name: "OverFill" }, { code: 15007; name: "InvalidFillPrice" }, { code: 15008; name: "InvalidAuctionSpecified" }, { code: 15009; name: "PriceOracleNotTrading" }, { code: 15010; name: "InvalidVaultMetaVecMismatch" }, { code: 15011; name: "OrderDetailsParsingError" }, { code: 15012; name: "InvalidFillAmount" }, { code: 15013; name: "InvalidMinFillPrice" }, { code: 15014; name: "AuctionEpochInitInvalidOwner" }, { code: 15015; name: "NotAllRewardsDistributed" }, { code: 15016; name: "FillVotingHitMax" }, { code: 15017; name: "InvalidAuctionEpoch" }, { code: 15018; name: "InvalidFillVoteValue" }, { code: 15019; name: "VotingClosed" }, { code: 15020; name: "VoteRewardClaimingClosed" }, { code: 15021; name: "OverflowError" }, { code: 15022; name: "AuctionNotTakingOrders" }, { code: 15023; name: "InvalidOrderType" }, { code: 15024; name: "InvalidMarketMakerAccountAddress" }, { code: 15025; name: "AuctionIdAlreadyExists" }, { code: 15026; name: "InvalidNewOrderEpoch" }, { code: 15027; name: "InvalidYMint" }, { code: 15028; name: "OrderNotInRetailQueue" }, { code: 15029; name: "OrderNotInMarketMakerQueue" }, { code: 15030; name: "InvalidAuctionStatus" }, { code: 15031; name: "AuctionIsHalted" }, { code: 15032; name: "InvalidAuctionInit" }, { code: 15033; name: "InvalidXMint" }, { code: 15034; name: "InvalidOracles" }, { code: 15035; name: "UnableToFindMarketPrice" }, { code: 15036; name: "UnableToIdentifyCurrencyPair" }, { code: 15037; name: "MintDecimalsTooLarge" }, { code: 15038; name: "MintCaptureListEmpty" }, { code: 15039; name: "MintCaptureListSizeMismatch" }, { code: 15040; name: "QuoteCurrencyConversionOverflow" }, { code: 15041; name: "InvalidPriceOraclesPassed" }, { code: 15042; name: "OracleCaptureListEmpty" }, { code: 15043; name: "OracleForXMintNotFound" }, { code: 15044; name: "PythInvalidAccountData" }, { code: 15045; name: "PythBadVersionNumber" }, { code: 15046; name: "PythWrongAccountType" }, { code: 15047; name: "OtherPythError" }, { code: 15048; name: "InvalidNextAuctionEpoch" }, { code: 15049; name: "ArbiterDoesNotDeserveReward" }, { code: 15050; name: "InvalidNotionalSize" }, { code: 15051; name: "UnexpectedBufferSize" }, { code: 15052; name: "Ed25519InstructionNotIncluded" }, { code: 15053; name: "Ed25519InstructionInvalidSigCount" }, { code: 15054; name: "Ed25519InstructionInvalidSigOffset" }, { code: 15055; name: "Ed25519InstructionInvalidSigIndex" }, { code: 15056; name: "Ed25519InstructionInvalidSig" }, { code: 15057; name: "Ed25519InstructionInvalidPubKeyOffset" }, { code: 15058; name: "Ed25519InstructionInvalidPubKeyIndex" }, { code: 15059; name: "Ed25519InstructionInvalidPubKey" }, { code: 15060; name: "Ed25519InstructionInvalidMsgOffset" }, { code: 15061; name: "Ed25519InstructionInvalidMsgIndex" }, { code: 15062; name: "Ed25519InstructionInvalidMsg" }, { code: 15063; name: "InvalidMarketMakerEncryptionPubKey" }, { code: 15064; name: "InvalidRebateReceiverTokenAccount" }, { code: 15065; name: "InvalidMarketMaker" }, { code: 15067; name: "InvalidRetailYTokenAccount" }, { code: 15068; name: "FillNotYetCloseable" }, { code: 15069; name: "NoAuctionWinner" }, { code: 15070; name: "InvalidMarketMakerXTokenAccount" }, { code: 15071; name: "InvalidMarketMakerAccountOwner" }, { code: 15072; name: "InvalidBidRecoveryVaultAccountAddress" }, { code: 15073; name: "InvalidBidRecoveryVaultAccountNotWritable" }, { code: 15074; name: "InvalidXRecoveryVaultAccountAddress" }, { code: 15075; name: "InvalidXRecoveryVaultAccountNotWritable" }, { code: 15076; name: "InvalidCloseFillRemainingAccounts" }, { code: 15077; name: "InvalidCloseFillRetailDataAccount" }, { code: 15080; name: "InvalidCloseRetailDataAccountOpenOrders" }, { code: 15081; name: "InvalidCloseRetailDataAccountUnsettledFills" }, { code: 15082; name: "InvalidCloseRetailDataAccountWrongOwner" }, { code: 15090; name: "InvalidCloseAuctionEpochStateOpenOrders" }, { code: 15091; name: "InvalidCloseAuctionEpochStateUnsettledFills" }, { code: 15092; name: "InvalidCloseAuctionEpochStateAuctionActive" }, { code: 15093; name: "InvalidCloseAuctionEpochStateOwner" }, { code: 15100; name: "NotReclaimableByCurrentLeader" }, { code: 15101; name: "NotReclaimableInvalidMarketMakerOwner" }, { code: 15102; name: "InvalidAuctionStatusChange" }, { code: 15110; name: "InvalidYRecoveryVaultAccountAddress" }, { code: 15111; name: "InvalidYRecoveryVaultAccountNotWritable" }, { code: 15112; name: "InvalidFillOrderRemainingAccounts" }, { code: 15200; name: "InvalidEndorsement" }, { code: 15201; name: "InsufficientSignatoryStake" }, { code: 15300; name: "InvalidDFlowAdmin" }, { code: 15301; name: "InvalidWhitelistEntryType" }, { code: 15302; name: "AlreadyWhitelisted" }, { code: 15303; name: "NotWhitelisted" }, { code: 15304; name: "InvalidAuctionOwner" }, { code: 15800; name: "InvalidVotePeriod" }, { code: 15801; name: "InvalidClaimPeriod" }, { code: 15802; name: "NegativeClockUnixTimestamp" }, { code: 15999; name: "DFlowInvariantViolated" }]
  • instructions: [{ accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is being initialized with 40 bytes, paid for by", "dflow_admin. This account is a PDA generated by the following", "seeds: the string literal `global_config`"]; isMut: true; isSigner: false; name: "globalConfigAccount" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "dflowAdmin" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }]; docs: ["This instruction creates the global config account and sets the", "DFlow admin.", "", "The DFlow admin controls access to the protocol by granting roles", "to accounts that allow them to perform privileged actions such", "as auction management. This instruction must be the first instruction", "called after program deployment and can only be called once."]; name: "initGlobalConfigInstruction" }, { accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is a PDA generated by the following seeds: the string", "literal `global_config`. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "globalConfigAccount" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction"]; isMut: false; isSigner: true; name: "dflowAdmin" }, { docs: ["The new DFlow admin's public key."]; isMut: false; isSigner: false; name: "newDflowAdmin" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }]; docs: ["This instruction updates the DFlow admin.", "", "The current DFlow admin can use this instruction to assign a", "new DFlow admin."]; name: "setNewDflowAdmin" }, { accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is a PDA generated by the following seeds: the string", "literal `global_config`"]; isMut: false; isSigner: false; name: "globalConfigAccount" }, { docs: ["The account to which the whitelist permissions apply."]; isMut: false; isSigner: false; name: "principal" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "dflowAdmin" }, { docs: ["This account stores the permissions that apply", "to the principal. This account is being initialized with 42 bytes,", "paid for by dflow_admin. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the principal account"]; isMut: true; isSigner: false; name: "whitelistEntry" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }, { name: "whitelistEntryBump"; type: "u8" }, { name: "role"; type: "u8" }]; docs: ["This instruction creates the principal's whitelist entry account", "and grants the specified role to the principal."]; name: "grantRoleUninitializedEntry" }, { accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is a PDA generated by the following seeds: the string", "literal `global_config`"]; isMut: false; isSigner: false; name: "globalConfigAccount" }, { docs: ["The account to which the whitelist permissions apply."]; isMut: false; isSigner: false; name: "principal" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "dflowAdmin" }, { docs: ["This account stores the permissions that apply", "to the principal. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `whitelist_entry`, the public key of the principal account"]; isMut: true; isSigner: false; name: "whitelistEntry" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }, { name: "whitelistEntryBump"; type: "u8" }, { name: "role"; type: "u8" }]; docs: ["This instruction grants the specified role to the principal."]; name: "grantRole" }, { accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is a PDA generated by the following seeds: the string", "literal `global_config`"]; isMut: false; isSigner: false; name: "globalConfigAccount" }, { docs: ["This account stores the permissions that apply", "to the principal. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `whitelist_entry`, the public key of the principal account"]; isMut: true; isSigner: false; name: "whitelistEntry" }, { docs: ["The account to which the whitelist permissions apply."]; isMut: false; isSigner: false; name: "principal" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "dflowAdmin" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }, { name: "whitelistEntryBump"; type: "u8" }, { name: "role"; type: "u8" }]; docs: ["This instruction revokes the specified role from the principal", "and closes the principal's whitelist account if it no longer", "grants any permissions."]; name: "revokeRole" }, { accounts: [{ docs: ["The recovery state account holds state specific", "to the recovery vault. This account is being initialized with", "40 bytes, paid for by auction_owner. This account is a PDA generated", "by the following seeds: the public key of the recovery_vault_mint", "account, the string literal `recovery_state`"]; isMut: true; isSigner: false; name: "recoveryStateAccount" }, { docs: ["The recovery vault account is an SPL token account", "that holds assets that could not be transferred to the intended", "recipient because the intended recipient did not have a token", "account at transfer time. Assets deposited into this account", "are held until the intended recipient makes a claim to retrieve", "the assets. This account is being initialized and is paid for", "by auction_owner. This is a token account which is being initialized,", "and is associated with the recovery_vault_mint mint. The authority", "for this token account is recovery_state_account. This account", "is a PDA generated by the following seeds: the public key of", "the recovery_vault_mint account, the string literal `recovery_vault`"]; isMut: true; isSigner: false; name: "recoveryVaultAccount" }, { docs: ["The SPL mint for the recovery vault account."]; isMut: false; isSigner: false; name: "recoveryVaultMint" }, { docs: ["The auction owner is an authority with permission", "granted by the DFlow admin to create recovery vaults, create", "new auctions, and halt, resume, or deprecate existing auctions.", "This account is a signer for the instruction. This account is", "expected to be mutable"]; isMut: true; isSigner: true; name: "auctionOwner" }, { docs: ["This account stores the permissions that apply", "to the auction_owner. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the auction_owner account"]; isMut: false; isSigner: false; name: "auctionOwnerWhitelistEntry" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "recoveryStateAccountBump"; type: "u8" }, { name: "recoveryVaultAccountBump"; type: "u8" }, { name: "auctionOwnerWhitelistEntryBump"; type: "u8" }]; docs: ["This instruction creates a recovery vault.", "", "Recovery vaults are required for all mints used in the protocol.", "If a transfer recipient does not have a token account set up,", "the transferor can direct the protocol to transfer the tokens", "to the recovery vault. The intended recipient can then recover", "the tokens by submitting a recovery claim."]; name: "initRecoveryVaultInstruction" }, { accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is a PDA generated by the following seeds: the string", "literal `global_config`"]; isMut: false; isSigner: false; name: "globalConfigAccount" }, { docs: ["This account contains a list of non-deprecated", "auction IDs. This account is being initialized with 8240 bytes,", "paid for by dflow_admin. This account is a PDA generated by the", "following seeds: the string literal `mapper`"]; isMut: true; isSigner: false; name: "auctionMapper" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "dflowAdmin" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }, { name: "auctionMapperBump"; type: "u8" }]; docs: ["This instruction initializes the auction mapper account.", "", "The auction mapper account contains a list of auctions that are", "not deprecated. Auctions will either be in a trading or halted", "state. This function can only be called by the DFlow admin."]; name: "initAuctionMapperInstruction" }, { accounts: [{ docs: ["The auction state account holds state specific", "to the auction. This account is being initialized with 1280 bytes,", "paid for by auction_owner. This account is a PDA generated by", "the following seeds: the string literal `auction_state`, an unsigned", "64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["The bid vault account is an SPL token account", "that holds bids made by market makers in the auctions for order", "flow. Bids held in this account are held only temporarily, and", "are distributed out upon fills and fill arbitration. This account", "is being initialized and is paid for by auction_owner. This is", "a token account which is being initialized, and is associated", "with the bid_mint_account mint. The authority for this token", "account is auction_state_account. This account is a PDA generated", "by the following seeds: the string literal `bid_vault`, an unsigned", "64 bit integer"]; isMut: true; isSigner: false; name: "bidVaultAccount" }, { docs: ["The vote vault account is an SPL token account", "that holds votes made by arbiters on each fill. Vote stakes held", "in this account are returned to the arbiters upon honest voting", "of the fill. This account is being initialized and is paid for", "by auction_owner. This is a token account which is being initialized,", "and is associated with the vote_mint_account mint. The authority", "for this token account is auction_state_account. This account", "is a PDA generated by the following seeds: the string literal", "`vote_vault`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "voteVaultAccount" }, { docs: ["This account contains a list of non-deprecated", "auction IDs. This account is expected to be mutable. This account", "is a PDA generated by the following seeds: the string literal", "`mapper`"]; isMut: true; isSigner: false; name: "auctionMapper" }, { docs: ["The auction owner is an authority with permission", "granted by the DFlow admin to create recovery vaults, create", "new auctions, and halt, resume, or deprecate existing auctions.", "This account is a signer for the instruction. This account is", "expected to be mutable"]; isMut: true; isSigner: true; name: "auctionOwner" }, { docs: ["This account stores the permissions that apply", "to the auction_owner. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the auction_owner account"]; isMut: false; isSigner: false; name: "auctionOwnerWhitelistEntry" }, { docs: ["The SPL mint associated with the token that market", "makers use to bid in the order flow auctions."]; isMut: false; isSigner: false; name: "bidMintAccount" }, { docs: ["The SPL mint associated with the token that arbiters", "use to vote on the fairness of the fills."]; isMut: false; isSigner: false; name: "voteMintAccount" }, { docs: ["The recovery state account for the bid mint. This", "account is a PDA generated by the following seeds: the public", "key of the bid_mint_account account, the string literal `recovery_state`"]; isMut: false; isSigner: false; name: "bidRecoveryStateAccount" }, { docs: ["The recovery vault account for the bid mint. This", "account is a PDA generated by the following seeds: the public", "key of the bid_mint_account account, the string literal `recovery_vault`"]; isMut: false; isSigner: false; name: "bidRecoveryVaultAccount" }, { docs: ["The recovery state account for the vote mint.", "This account is a PDA generated by the following seeds: the public", "key of the vote_mint_account account, the string literal `recovery_state`"]; isMut: false; isSigner: false; name: "voteRecoveryStateAccount" }, { docs: ["The recovery vault account for the vote mint.", "This account is a PDA generated by the following seeds: the public", "key of the vote_mint_account account, the string literal `recovery_vault`"]; isMut: false; isSigner: false; name: "voteRecoveryVaultAccount" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "auctionStateAccountBump"; type: "u8" }, { name: "bidVaultAccountBump"; type: "u8" }, { name: "voteVaultAccountBump"; type: "u8" }, { name: "auctionMapperBump"; type: "u8" }, { name: "auctionOwnerWhitelistEntryBump"; type: "u8" }, { name: "bidRecoveryStateAccountBump"; type: "u8" }, { name: "bidRecoveryVaultAccountBump"; type: "u8" }, { name: "voteRecoveryStateAccountBump"; type: "u8" }, { name: "voteRecoveryVaultAccountBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "minNotionalOrderSize"; type: "u64" }, { name: "maxNotionalOrderSize"; type: "u64" }, { name: "notionalDecimals"; type: "u8" }, { name: "batchNotionalSize"; type: "u64" }, { name: "voteSize"; type: "u64" }, { name: "supportedPairsCount"; type: "u8" }, { name: "votePeriod"; type: "u32" }, { name: "claimPeriod"; type: "u32" }]; docs: ["This instruction initializes an auction for order flow, and describes", "the specifications of the order flow account.", "", "This instruction is only callable by an auction owner. Once the", "auction is initialized, it remains in a Halted state until the", "auction owner sets the auction state to Trading."]; name: "initAuctionState" }, { accounts: [{ docs: ["The auction state account holds state specific", "to the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `auction_state`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["The SPL mint associated with the base token in", "a currency pair."]; isMut: false; isSigner: false; name: "baseCurrency" }, { docs: ["The SPL mint associated with the quote token in", "a currency pair."]; isMut: false; isSigner: false; name: "quoteCurrency" }, { docs: ["The Pyth price oracle associated with the base", "token in a currency pair."]; isMut: false; isSigner: false; name: "baseOracle" }, { docs: ["The Pyth price oracle associated with the quote", "token in a currency pair."]; isMut: false; isSigner: false; name: "quoteOracle" }, { docs: ["The recovery state account for the base mint.", "This account is a PDA generated by the following seeds: the public", "key of the base_currency account, the string literal `recovery_state`"]; isMut: false; isSigner: false; name: "baseRecoveryStateAccount" }, { docs: ["The recovery vault account for the base mint.", "This account is a PDA generated by the following seeds: the public", "key of the base_currency account, the string literal `recovery_vault`"]; isMut: false; isSigner: false; name: "baseRecoveryVaultAccount" }, { docs: ["The recovery state account for the quote mint.", "This account is a PDA generated by the following seeds: the public", "key of the quote_currency account, the string literal `recovery_state`"]; isMut: false; isSigner: false; name: "quoteRecoveryStateAccount" }, { docs: ["The recovery vault account for the quote mint.", "This account is a PDA generated by the following seeds: the public", "key of the quote_currency account, the string literal `recovery_vault`"]; isMut: false; isSigner: false; name: "quoteRecoveryVaultAccount" }, { docs: ["The auction owner is an authority with permission", "granted by the DFlow admin to create recovery vaults, create", "new auctions, and halt, resume, or deprecate existing auctions.", "This account is a signer for the instruction"]; isMut: false; isSigner: true; name: "auctionOwner" }, { docs: ["This account stores the permissions that apply", "to the auction_owner. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the auction_owner account"]; isMut: false; isSigner: false; name: "auctionOwnerWhitelistEntry" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "auctionStateAccountBump"; type: "u8" }, { name: "baseRecoveryStateAccountBump"; type: "u8" }, { name: "baseRecoveryVaultAccountBump"; type: "u8" }, { name: "quoteRecoveryStateAccountBump"; type: "u8" }, { name: "quoteRecoveryVaultAccountBump"; type: "u8" }, { name: "auctionOwnerWhitelistEntryBump"; type: "u8" }, { name: "auctionId"; type: "u64" }]; docs: ["This instruction adds a currency pair to an existing auction.", "", "Only a certain number of token pairs are allowed to exist in", "an auction and an error is thrown if this instruction is called", "when the token pairs count is saturated"]; name: "addCurrencyPair" }, { accounts: [{ docs: ["The auction state account holds state specific", "to the auction. This account is expected to be mutable. This", "account is being closed, and the destination of the lamports", "will be the auction_owner account. This account is a PDA generated", "by the following seeds: the string literal `auction_state`, an", "unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["This account contains a list of non-deprecated", "auction IDs. This account is expected to be mutable. This account", "is a PDA generated by the following seeds: the string literal", "`mapper`"]; isMut: true; isSigner: false; name: "auctionMapper" }, { docs: ["The auction owner is an authority with permission", "granted by the DFlow admin to create recovery vaults, create", "new auctions, and halt, resume, or deprecate existing auctions.", "This account is a signer for the instruction. This account is", "expected to be mutable"]; isMut: true; isSigner: true; name: "auctionOwner" }, { docs: ["This account stores the permissions that apply", "to the auction_owner. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the auction_owner account"]; isMut: false; isSigner: false; name: "auctionOwnerWhitelistEntry" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: [{ name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionMapperBump"; type: "u8" }, { name: "auctionOwnerWhitelistEntryBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "newStatus"; type: "u8" }]; docs: ["This instruction changes the status of an auction", "", "This instruction can be used to change the status of an auction", "between Halted, Trading, or Expired. Once Expired, the auction", "will not be revivable."]; name: "changeAuctionStatus" }, { accounts: [{ docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is being", "initialized with 101 bytes, paid for by owner. This account is", "a PDA generated by the following seeds: the string literal `epoch`,", "an unsigned 64 bit integer, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionEpochState" }, { docs: ["The auction state account holds state specific", "to the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `auction_state`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["The creator and owner of AuctionEpochState account.", "This account is a signer for the instruction. This account is", "expected to be mutable"]; isMut: true; isSigner: true; name: "owner" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "auctionEpochStateBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }]; docs: ["This instruction initializes an auction epoch state account", "", "AuctionEpochState carries state specific to a certain auction", "that needs to be remembered after the epoch ends. The AuctionEpochState", "accounts associated with auction epochs N and N + 1 need to be", "initialized when the auction for epoch N begins (i.e. in the", "first SubmitAuctionBid that auction N will receive). Recall that", "if the AuctionState has an epoch field that has value X, then", "auction X is currently active, and auction X - 1 is currently", "receiving order flow."]; name: "initAuctionEpochStateInstruction" }, { accounts: [{ docs: ["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 zeroed out", "upon the start of instruction processing"]; isMut: true; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The public key of the market maker. This account", "is a signer for the instruction"]; isMut: false; isSigner: true; name: "marketMakerAccountOwner" }, { docs: ["This account stores the permissions that apply", "to the market_maker_account_owner. This account is a PDA generated", "by the following seeds: the string literal `whitelist_entry`,", "the public key of the market_maker_account_owner account"]; isMut: false; isSigner: false; name: "marketMakerWhitelistEntry" }]; args: [{ name: "marketMakerWhitelistEntryBump"; type: "u8" }, { name: "maxOrdersSupported"; type: "u64" }, { name: "encryptionPubKey"; type: { array: ["u8", 32] } }]; docs: ["This instruction initializes the market maker account", "", "The market maker account tracks state specific to the market", "maker's market making activities. This instruction must be called", "prior to a market maker being active on DFlow."]; name: "initMarketMakerAccountInstruction" }, { accounts: [{ docs: ["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"]; isMut: true; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The public key of the market maker. This account", "is a signer for the instruction"]; isMut: false; isSigner: true; name: "marketMakerAccountOwner" }, { docs: ["This account stores the permissions that apply", "to the market_maker_account_owner. This account is a PDA generated", "by the following seeds: the string literal `whitelist_entry`,", "the public key of the market_maker_account_owner account"]; isMut: false; isSigner: false; name: "marketMakerWhitelistEntry" }]; args: [{ name: "marketMakerWhitelistEntryBump"; type: "u8" }, { name: "encryptionPubKey"; type: { array: ["u8", 32] } }]; docs: ["This instruction updates the market maker's 256-bit X25519 public", "key.", "", "Retail traders use the market maker's 256-bit X25519 public key", "to encrypt their order details when routing orders to the market", "maker. This instruction updates the market maker's X25519 public", "key."]; name: "updateEncryptionKeyInstruction" }, { accounts: [{ docs: ["The retail data account holds state specific to", "the retail trader. This account is expected to be zeroed out", "upon the start of instruction processing"]; isMut: true; isSigner: false; name: "retailDataAccount" }, { docs: ["The public key of the retail trader. This account", "is a signer for the instruction"]; isMut: false; isSigner: true; name: "retailAccountOwner" }]; args: [{ name: "maxOrdersSupported"; type: "u64" }]; docs: ["This instruction initializes the retail traders account.", "", "The retail data account tracks state specific to the retail trader's", "trading activities on DFlow."]; name: "initRetailDataAccountInstruction" }, { accounts: [{ docs: ["The retail data account holds state specific to", "the retail trader. This account is being closed, and the destination", "of the lamports will be the retail_account_owner account. This", "account is expected to be mutable"]; isMut: true; isSigner: false; name: "retailDataAccount" }, { docs: ["The public key of the retail trader. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "retailAccountOwner" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: []; docs: ["This instruction closes the retail trader's data account.", "", "When retail traders wish to close their account, and regain the", "lamports used to allocate the space for their data account, they", "can call this instruction. Retail traders may not close their", "account if they have open orders, and must wait for the orders", "to be filled, or cancel them."]; name: "closeRetailDataAccount" }, { accounts: [{ docs: ["The auction state account holds state specific", "to the auction. This account is a PDA generated by the following", "seeds: the string literal `auction_state`, an unsigned 64 bit", "integer"]; isMut: false; isSigner: false; name: "auctionStateAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is a", "PDA generated by the following seeds: the string literal `epoch`,", "an unsigned 64 bit integer, an unsigned 64 bit integer"]; isMut: false; isSigner: false; name: "auctionEpochState" }, { docs: ["The account which tracks the market maker's current", "bid in the auction. This account is being initialized with 16", "bytes, paid for by market_maker_account_owner. This account is", "a PDA generated by the following seeds: the string literal `bid_record`,", "an unsigned 64 bit integer, an unsigned 64 bit integer, the public", "key of the market_maker_data_account account"]; isMut: true; isSigner: false; name: "bidRecordAccount" }, { docs: ["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."]; isMut: false; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The public key of the market maker. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "marketMakerAccountOwner" }, { docs: ["This account stores the permissions that apply", "to the market_maker_account_owner. This account is a PDA generated", "by the following seeds: the string literal `whitelist_entry`,", "the public key of the market_maker_account_owner account"]; isMut: false; isSigner: false; name: "marketMakerWhitelistEntry" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "bidRecordAccountBump"; type: "u8" }, { name: "marketMakerWhitelistEntryBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }]; docs: ["This instruction is called by the market maker prior to bidding", "in an auction.", "", "Before a market maker bids in an auction, they must use this", "instruction to initialize an account to track their current bid", "in the auction."]; name: "initBidRecordAccount" }, { accounts: [{ docs: ["The auction state account holds state specific", "to the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `auction_state`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the string literal `epoch`, an unsigned 64 bit integer,", "an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionEpochState" }, { docs: ["The auction epoch state account for the next epoch.", "This account is a PDA generated by the following seeds: the string", "literal `epoch`, an unsigned 64 bit integer, an unsigned 64 bit", "integer"]; isMut: false; isSigner: false; name: "nextAuctionEpochState" }, { docs: ["The bid vault account is an SPL token account", "that holds bids made by market makers in the auctions for order", "flow. Bids held in this account are held only temporarily, and", "are distributed out upon fills and fill arbitration. This account", "is expected to be mutable. This account is a PDA generated by", "the following seeds: the string literal `bid_vault`, an unsigned", "64 bit integer"]; isMut: true; isSigner: false; name: "bidVaultAccount" }, { docs: ["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."]; isMut: false; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The SPL token account associated with the market", "maker used to bid in the auctions. This account is expected to", "be mutable"]; isMut: true; isSigner: false; name: "marketMakerAuctionTokenAccount" }, { docs: ["The account which tracks the market maker's current", "bid in the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `bid_record`, an unsigned 64 bit integer, an unsigned", "64 bit integer, the public key of the market_maker_data_account", "account"]; isMut: true; isSigner: false; name: "bidRecordAccount" }, { docs: ["The public key of the market maker. This account", "is a signer for the instruction"]; isMut: false; isSigner: true; name: "marketMakerAccountOwner" }, { docs: ["This account stores the permissions that apply", "to the market_maker_account_owner. This account is a PDA generated", "by the following seeds: the string literal `whitelist_entry`,", "the public key of the market_maker_account_owner account"]; isMut: false; isSigner: false; name: "marketMakerWhitelistEntry" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "nextAuctionEpochStateBump"; type: "u8" }, { name: "bidVaultAccountBump"; type: "u8" }, { name: "bidRecordAccountBump"; type: "u8" }, { name: "marketMakerWhitelistEntryBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }, { name: "nextAuctionEpoch"; type: "u64" }, { name: "bidSize"; type: "u64" }]; docs: ["This instruction is called by the market maker to bid in an auction.", "", "When a market maker wishes to bid in an auction, they can use", "this instruction to specify the parameters of their bid. Note", "that the first bidder in auction epoch N must ensure that auction", "epoch state accounts are initialized for auction epochs N and", "N + 1."]; name: "submitAuctionBidInstruction" }, { accounts: [{ docs: ["The auction state account holds state specific", "to the auction. This account is a PDA generated by the following", "seeds: the string literal `auction_state`, an unsigned 64 bit", "integer"]; isMut: false; isSigner: false; name: "auctionStateAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is a", "PDA generated by the following seeds: the string literal `epoch`,", "an unsigned 64 bit integer, an unsigned 64 bit integer"]; isMut: false; isSigner: false; name: "auctionEpochState" }, { docs: ["The bid vault account is an SPL token account", "that holds bids made by market makers in the auctions for order", "flow. Bids held in this account are held only temporarily, and", "are distributed out upon fills and fill arbitration. This account", "is expected to be mutable. This account is a PDA generated by", "the following seeds: the string literal `bid_vault`, an unsigned", "64 bit integer"]; isMut: true; isSigner: false; name: "bidVaultAccount" }, { docs: ["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."]; isMut: false; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The SPL token account associated with the market", "maker used to bid in the auctions. This account is expected to", "be mutable"]; isMut: true; isSigner: false; name: "marketMakerAuctionTokenAccount" }, { docs: ["The account which tracks the market maker's current", "bid in the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `bid_record`, an unsigned 64 bit integer, an unsigned", "64 bit integer, the public key of the market_maker_data_account", "account"]; isMut: true; isSigner: false; name: "bidRecordAccount" }, { docs: ["The public key of the market maker. This account", "is expected to be mutable. This account is a signer for the instruction"]; isMut: true; isSigner: true; name: "marketMakerAccountOwner" }, { docs: ["This account stores the permissions that apply", "to the market_maker_account_owner. This account is a PDA generated", "by the following seeds: the string literal `whitelist_entry`,", "the public key of the market_maker_account_owner account"]; isMut: false; isSigner: false; name: "marketMakerWhitelistEntry" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "bidVaultAccountBump"; type: "u8" }, { name: "bidRecordAccountBump"; type: "u8" }, { name: "marketMakerWhitelistEntryBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }]; docs: ["This instruction is called by the market maker to withdraw its", "losing auction bids and close its bid record account for the", "given auction.", "", "A market maker who is outbid in an auction can use this instruction", "to withdraw its bids in the auction and close its bid record", "account for the auction. A market maker who has won an auction", "can use this instruction to close its bid record account for", "the auction."]; name: "reclaimAuctionBidInstruction" }, { accounts: [{ docs: ["The SPL token account owned by the escrow vault,", "which holds the sold tokens during a swap from the retail trader.", "This account is being initialized and is paid for by retail_account_owner.", "This is a token account which is being initialized, and is associated", "with the x_mint mint. The authority for this token account is", "vault_meta_account. This account is a PDA generated by the following", "seeds: the public key of the retail_account_owner account, the", "string literal `vault`, the unsigned integer field named nonce", "in the retail_data_account account"]; isMut: true; isSigner: false; name: "vaultTokenAccount" }, { docs: ["The account which holds state specific to a given", "order initiated by the retail trader. This account is being initialized", "with 816 bytes, paid for by retail_account_owner. This account", "is a PDA generated by the following seeds: the public key of", "the retail_account_owner account, the string literal `vault_meta`,", "the unsigned integer field named nonce in the retail_data_account", "account"]; isMut: true; isSigner: false; name: "vaultMetaAccount" }, { docs: ["The auction epoch state account for the current", "epoch. This account is expected to be mutable. This account is", "a PDA generated by the following seeds: the string literal `epoch`,", "an unsigned 64 bit integer, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "currentAuctionEpochState" }, { docs: ["The auction epoch state account for the previous", "epoch. This account is expected to be mutable. This account is", "a PDA generated by the following seeds: the string literal `epoch`,", "an unsigned 64 bit integer, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "previousAuctionEpochState" }, { docs: ["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"]; isMut: true; isSigner: false; name: "retailXTokenAccount" }, { docs: ["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."]; isMut: false; isSigner: false; name: "rebateReceiverTokenAccount" }, { docs: ["The auction state account holds state specific", "to the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `auction_state`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["The retail data account holds state specific to", "the retail trader. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "retailDataAccount" }, { docs: ["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"]; isMut: true; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The public key of the retail trader. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "retailAccountOwner" }, { docs: ["The SPL mint account associated with the token", "that is sold by the retail trader during the swap."]; isMut: false; isSigner: false; name: "xMint" }, { docs: ["The signatory record account holds information", "about a signatory server, and the existence of the signatory", "record account is a valid proof that the signatory server has", "staked the requisite value in the protocol allowing it to endorse", "flow as originating from a retail source. This account is a PDA", "generated by the following seeds: the public key of the signatory_server", "account"]; isMut: false; isSigner: false; name: "signatoryRecord" }, { docs: ["The public key of the signatory server that endorses", "new orders as originating from a retail source. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "signatoryServer" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "vaultTokenAccountBump"; type: "u8" }, { name: "vaultMetaAccountBump"; type: "u8" }, { name: "currentAuctionEpochStateBump"; type: "u8" }, { name: "previousAuctionEpochStateBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "signatoryRecordBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }, { name: "previousAuctionEpoch"; type: "u64" }, { name: "retailEncryptionPubKey"; type: { array: ["u8", 32] } }, { name: "mmEncryptionPubKey"; type: { array: ["u8", 32] } }, { name: "encryptedOrderDetails"; type: "string" }, { name: "retailSigningPubKey"; type: { array: ["u8", 32] } }, { name: "retailSignature"; type: { array: ["u8", 64] } }, { name: "depositAmount"; type: "u64" }, { name: "orderType"; type: "u8" }]; docs: ["This instruction is called by retail traders when they submit", "their order. A transaction containing this instruction must be", "signed by a signatory server.", "", "When submitting orders, retail traders must encrypt the details", "of their order in order to hide information regarding which token", "is being received."]; name: "newOrderInstruction" }, { accounts: [{ docs: ["The SPL token account owned by the escrow vault,", "which holds the sold tokens during a swap from the retail trader.", "This account is expected to be mutable. This account is being", "closed, and the destination of the lamports will be the retail_account_owner", "account. This account is a PDA generated by the following seeds:", "the public key of the retail_account_owner account, the string", "literal `vault`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "vaultTokenAccount" }, { docs: ["The account which holds state specific to a given", "order initiated by the retail trader. This account is expected", "to be mutable. This account is being closed, and the destination", "of the lamports will be the retail_account_owner account. This", "account is a PDA generated by the following seeds: the public", "key of the retail_account_owner account, the string literal `vault_meta`,", "an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "vaultMetaAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the string literal `epoch`, the unsigned integer field", "named auction_id in the vault_meta_account account, the unsigned", "integer field named auction_epoch in the vault_meta_account account"]; isMut: true; isSigner: false; name: "auctionEpochState" }, { docs: ["The retail data account holds state specific to", "the retail trader. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "retailDataAccount" }, { docs: ["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"]; isMut: true; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["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"]; isMut: true; isSigner: false; name: "retailXTokenAccount" }, { docs: ["The public key of the retail trader. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "retailAccountOwner" }, { docs: ["The SPL mint account associated with the token", "that is sold by the retail trader during the swap."]; isMut: false; isSigner: false; name: "xMint" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "vaultTokenAccountBump"; type: "u8" }, { name: "vaultMetaAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "nonce"; type: "u64" }]; docs: ["This instruction cancels an open order.", "", "Cancelling an open order can only be done if it has not been", "filled and if the order has been filled partially, the retail", "trader can only cancel the part of the order which is still open."]; name: "cancelOrderInstruction" }, { accounts: [{ docs: ["The account which holds state specific to a given", "order initiated by the retail trader. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the public key of the retail_account_owner account, the", "string literal `vault_meta`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "vaultMetaAccount" }, { docs: ["The account which holds meta-information about", "the fill, so that arbiters can reference the information when", "voting on the fairness of the fill. This account is being initialized", "with 194 bytes, paid for by market_maker_account_owner. This", "account is a PDA generated by the following seeds: the public", "key of the vault_meta_account account, the unsigned integer field", "named fill_nonce in the vault_meta_account account, the string", "literal `fra`"]; isMut: true; isSigner: false; name: "fillRecordAccount" }, { docs: ["The retail data account holds state specific to", "the retail trader. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "retailDataAccount" }, { docs: ["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"]; isMut: true; isSigner: false; name: "marketMakerDataAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the string literal `epoch`, the unsigned integer field", "named auction_id in the vault_meta_account account, the unsigned", "integer field named auction_epoch in the vault_meta_account account"]; isMut: true; isSigner: false; name: "auctionEpochState" }, { docs: ["The auction state account holds state specific", "to the auction. This account is a PDA generated by the following", "seeds: the string literal `auction_state`, the unsigned integer", "field named auction_id in the vault_meta_account account"]; isMut: false; isSigner: false; name: "auctionStateAccount" }, { docs: ["The public key of the retail trader."]; isMut: false; isSigner: false; name: "retailAccountOwner" }, { docs: ["The SPL mint account associated with the token", "that is sold by the retail trader during the swap."]; isMut: false; isSigner: false; name: "xMint" }, { docs: ["The SPL mint account associated with the token", "that is received by the retail trader during the swap."]; isMut: false; isSigner: false; name: "yMint" }, { docs: ["The SPL token account associated with the market", "maker, and which sends the asset being received by the retail", "trader during a trade. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "marketMakerYTokenAccount" }, { docs: ["The public key of the market maker. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "marketMakerAccountOwner" }, { docs: ["This account stores the permissions that apply", "to the market_maker_account_owner. This account is a PDA generated", "by the following seeds: the string literal `whitelist_entry`,", "the public key of the market_maker_account_owner account"]; isMut: false; isSigner: false; name: "marketMakerWhitelistEntry" }, { docs: ["The SPL token account associated with the retail", "trader, and which receives the asset being sent by the market", "maker during a trade. This account is expected to be mutable.", "This account is the retail_y_token_account's associated token", "account for the mint of the asset sent by the market maker"]; isMut: true; isSigner: false; name: "retailYTokenAccount" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "instructions" }]; args: [{ name: "vaultMetaAccountBump"; type: "u8" }, { name: "fillRecordAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "marketMakerWhitelistEntryBump"; type: "u8" }, { name: "yRecoveryVaultAccountBump"; type: "u8" }, { name: "nonce"; type: "u64" }, { name: "orderDetails"; type: "string" }, { name: "fillAmount"; type: "u64" }, { name: "fillPrice"; type: "u64" }]; docs: ["This instruction is used to fill an open order", "", "When a market maker fills an order that is assigned to them,", "this instruction will partially settle the trade; the retail", "trader will receive the tokens from themarket maker, but the", "market maker must wait until arbiters have voted on the fairness", "of the fill in order to receive the retail trader's tokens."]; name: "fillOrderInstruction" }, { accounts: [{ docs: ["The account which holds state specific to a given", "order initiated by the retail trader. This account is a PDA generated", "by the following seeds: the public key of the retail_account_owner", "account, the string literal `vault_meta`, an unsigned 64 bit", "integer"]; isMut: false; isSigner: false; name: "vaultMetaAccount" }, { docs: ["The account which holds meta-information about", "the fill, so that arbiters can reference the information when", "voting on the fairness of the fill. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the public key of the vault_meta_account account, an unsigned", "16 bit integer, the string literal `fra`"]; isMut: true; isSigner: false; name: "fillRecordAccount" }, { docs: ["The account which holds the voting record made", "by an arbiter when the arbiter votes on the fairness of the fill.", "This account is being initialized with 9 bytes, paid for by arbiter.", "This account is a PDA generated by the following seeds: the public", "key of the fill_record_account account, the public key of the", "arbiter account, the string literal `vra`"]; isMut: true; isSigner: false; name: "voteRecordAccount" }, { docs: ["The auction state account holds state specific", "to the auction. This account is a PDA generated by the following", "seeds: the string literal `auction_state`, the unsigned integer", "field named auction_id in the vault_meta_account account"]; isMut: false; isSigner: false; name: "auctionStateAccount" }, { docs: ["The public key associated with the arbiter. This", "account is a signer for the instruction. This account is expected", "to be mutable"]; isMut: true; isSigner: true; name: "arbiter" }, { docs: ["This account stores the permissions that apply", "to the arbiter. This account is a PDA generated by the following", "seeds: the string literal `whitelist_entry`, the public key of", "the arbiter account"]; isMut: false; isSigner: false; name: "arbiterWhitelistEntry" }, { docs: ["The public key of the retail trader."]; isMut: false; isSigner: false; name: "retailAccountOwner" }, { docs: ["The SPL token account associated with the arbiter", "used to vote on the fairness of the fill by the market maker.", "This account is expected to be mutable"]; isMut: true; isSigner: false; name: "arbiterTokenAccount" }, { docs: ["The vote vault account is an SPL token account", "that holds votes made by arbiters on each fill. Vote stakes held", "in this account are returned to the arbiters upon honest voting", "of the fill. This account is expected to be mutable. This account", "is a PDA generated by the following seeds: the string literal", "`vote_vault`, the unsigned integer field named auction_id in", "the vault_meta_account account"]; isMut: true; isSigner: false; name: "voteVaultAccount" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "vaultMetaAccountBump"; type: "u8" }, { name: "fillRecordAccountBump"; type: "u8" }, { name: "voteRecordAccountBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "arbiterWhitelistEntryBump"; type: "u8" }, { name: "voteVaultAccountBump"; type: "u8" }, { name: "nonce"; type: "u64" }, { name: "fillNonce"; type: "u16" }, { name: "vote"; type: "u8" }]; docs: ["This instruction is used to vote on the fairness of a fill", "", "Arbiters vote on the fairness of a fill when the fill is open", "for voting. In order to vote on a fill, the arbiter must stake", "tokens on the accuracy of their vote. If the arbiter voted in", "the majority, they receive their tokens back. Otherwise the tokens", "are deposited into a DAO governed backstop fund for the protocol."]; name: "fillVoteInstruction" }, { accounts: [{ docs: ["The account which holds state specific to a given", "order initiated by the retail trader. This account is a PDA generated", "by the following seeds: the public key of the retail_account_owner", "account, the string literal `vault_meta`, an unsigned 64 bit", "integer"]; isMut: false; isSigner: false; name: "vaultMetaAccount" }, { docs: ["The account which holds meta-information about", "the fill, so that arbiters can reference the information when", "voting on the fairness of the fill. This account is being closed,", "and the destination of the lamports will be the market_maker_account_owner", "account. This account is a PDA generated by the following seeds:", "the public key of the vault_meta_account account, an unsigned", "16 bit integer, the string literal `fra`"]; isMut: false; isSigner: false; name: "fillRecordAccount" }, { docs: ["The account which holds the voting record made", "by an arbiter when the arbiter votes on the fairness of the fill.", "This account is expected to be mutable. This account is being", "closed, and the destination of the lamports will be the market_maker_account_owner", "account. This account is a PDA generated by the following seeds:", "the public key of the fill_record_account account, the public", "key of the arbiter account, the string literal `vra`"]; isMut: true; isSigner: false; name: "voteRecordAccount" }, { docs: ["The vote vault account is an SPL token account", "that holds votes made by arbiters on each fill. Vote stakes held", "in this account are returned to the arbiters upon honest voting", "of the fill. This account is expected to be mutable. This account", "is a PDA generated by the following seeds: the string literal", "`vote_vault`, the unsigned integer field named auction_id in", "the vault_meta_account account"]; isMut: true; isSigner: false; name: "voteVaultAccount" }, { docs: ["The bid vault account is an SPL token account", "that holds bids made by market makers in the auctions for order", "flow. Bids held in this account are held only temporarily, and", "are distributed out upon fills and fill arbitration. This account", "is expected to be mutable. This account is a PDA generated by", "the following seeds: the string literal `bid_vault`, the unsigned", "integer field named auction_id in the vault_meta_account account"]; isMut: true; isSigner: false; name: "bidVaultAccount" }, { docs: ["The auction state account holds state specific", "to the auction. This account is a PDA generated by the following", "seeds: the string literal `auction_state`, the unsigned integer", "field named auction_id in the vault_meta_account account"]; isMut: false; isSigner: false; name: "auctionStateAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is a", "PDA generated by the following seeds: the string literal `epoch`,", "the unsigned integer field named auction_id in the vault_meta_account", "account, the unsigned integer field named auction_epoch in the", "vault_meta_account account"]; isMut: false; isSigner: false; name: "auctionEpochState" }, { docs: ["The SPL token account associated with the arbiter", "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. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "arbiterBidTokenAccount" }, { docs: ["The public key associated with the arbiter. This", "account is a signer for the instruction. This account is expected", "to be mutable"]; isMut: true; isSigner: true; name: "arbiter" }, { docs: ["This account stores the permissions that apply", "to the arbiter. This account is a PDA generated by the following", "seeds: the string literal `whitelist_entry`, the public key of", "the arbiter account"]; isMut: false; isSigner: false; name: "arbiterWhitelistEntry" }, { docs: ["The public key of the retail trader."]; isMut: false; isSigner: false; name: "retailAccountOwner" }, { docs: ["The SPL token account associated with the arbiter", "used to vote on the fairness of the fill by the market maker.", "This account is expected to be mutable"]; isMut: true; isSigner: false; name: "arbiterTokenAccount" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "vaultMetaAccountBump"; type: "u8" }, { name: "fillRecordAccountBump"; type: "u8" }, { name: "voteRecordAccountBump"; type: "u8" }, { name: "voteVaultAccountBump"; type: "u8" }, { name: "bidVaultAccountBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "arbiterWhitelistEntryBump"; type: "u8" }, { name: "nonce"; type: "u64" }, { name: "fillNonce"; type: "u16" }]; docs: ["This instruction is used to claim back the tokens staked during", "a fill vote by an arbiter.", "", "If voting with the majority, the arbiter will receieve a payment", "from the network along with their original vote. However, if", "the arbiter did not vote in the majority on the fill, they will", "not receive their tokens back."]; name: "claimVoteRewardInstruction" }, { accounts: [{ docs: ["The SPL token account owned by the escrow vault,", "which holds the sold tokens during a swap from the retail trader.", "This account is expected to be mutable. This account is being", "closed, and the destination of the lamports will be the retail_account_owner", "account. This account is a PDA generated by the following seeds:", "the public key of the retail_account_owner account, the string", "literal `vault`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "vaultTokenAccount" }, { docs: ["The account which holds state specific to a given", "order initiated by the retail trader. This account is expected", "to be mutable. This account is being closed, and the destination", "of the lamports will be the retail_account_owner account. This", "account is a PDA generated by the following seeds: the public", "key of the retail_account_owner account, the string literal `vault_meta`,", "an unsigned 64 bit integer. The key of rebate_receiver_token_account", "must match the field named rebate_receiver_token_account in this", "account"]; isMut: true; isSigner: false; name: "vaultMetaAccount" }, { docs: ["The account which holds meta-information about", "the fill, so that arbiters can reference the information when", "voting on the fairness of the fill. This account is expected", "to be mutable. This account is being closed, and the destination", "of the lamports will be the market_maker_account_owner account.", "This account is a PDA generated by the following seeds: the public", "key of the vault_meta_account account, an unsigned 16 bit integer,", "the string literal `fra`. The key of market_maker_account_owner", "must match the field named market_maker_account_owner in this", "account"]; isMut: true; isSigner: false; name: "fillRecordAccount" }, { docs: ["The bid vault account is an SPL token account", "that holds bids made by market makers in the auctions for order", "flow. Bids held in this account are held only temporarily, and", "are distributed out upon fills and fill arbitration. This account", "is expected to be mutable. This account is a PDA generated by", "the following seeds: the string literal `bid_vault`, the unsigned", "integer field named auction_id in the vault_meta_account account"]; isMut: true; isSigner: false; name: "bidVaultAccount" }, { docs: ["The auction state account holds state specific", "to the auction. This account is a PDA generated by the following", "seeds: the string literal `auction_state`, the unsigned integer", "field named auction_id in the vault_meta_account account"]; isMut: false; isSigner: false; name: "auctionStateAccount" }, { docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the string literal `epoch`, the unsigned integer field", "named auction_id in the vault_meta_account account, the unsigned", "integer field named auction_epoch in the vault_meta_account account"]; isMut: true; isSigner: false; name: "auctionEpochState" }, { docs: ["The SPL token account associated with the market", "maker, and which receives the asset sold by the retail trader", "during a trade. This account is expected to be mutable. This", "account is the market_maker_account_owner's associated token", "account for the mint of the asset sent by the retail trader"]; isMut: true; isSigner: false; name: "marketMakerXTokenAccount" }, { docs: ["The retail data account holds state specific to", "the retail trader. This account is expected to be mutable. The", "key of retail_account_owner must match the field named retail_account_owner", "in this account"]; isMut: true; isSigner: false; name: "retailDataAccount" }, { docs: ["The public key of the market maker. This account", "is expected to be mutable"]; isMut: true; isSigner: false; name: "marketMakerAccountOwner" }, { docs: ["The public key associated with the arbiter. This", "account is a signer for the instruction"]; isMut: false; isSigner: true; name: "arbiter" }, { docs: ["This account stores the permissions that apply", "to the arbiter. This account is a PDA generated by the following", "seeds: the string literal `whitelist_entry`, the public key of", "the arbiter account"]; isMut: false; isSigner: false; name: "arbiterWhitelistEntry" }, { docs: ["The public key of the retail trader. This account", "is expected to be mutable"]; isMut: true; isSigner: false; name: "retailAccountOwner" }, { docs: ["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. This account is expected to be mutable"]; isMut: true; isSigner: false; name: "rebateReceiverTokenAccount" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "vaultTokenAccountBump"; type: "u8" }, { name: "vaultMetaAccountBump"; type: "u8" }, { name: "fillRecordAccountBump"; type: "u8" }, { name: "bidVaultAccountBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionEpochStateBump"; type: "u8" }, { name: "arbiterWhitelistEntryBump"; type: "u8" }, { name: "bidRecoveryVaultAccountBump"; type: "u8" }, { name: "xRecoveryVaultAccountBump"; type: "u8" }, { name: "nonce"; type: "u64" }, { name: "fillNonce"; type: "u16" }]; docs: ["This instruction is used to close the various accounts opened", "during the lifecycle of the trade, and additionally give a rebate", "to the order flow source for its order flow.", "", "Lamports used to open the accounts will be returned to the payers", "who opened the accounts."]; name: "closeFillAccounts" }, { accounts: [{ docs: ["This account stores the DFlow admin's public key.", "This account is a PDA generated by the following seeds: the string", "literal `global_config`"]; isMut: false; isSigner: false; name: "globalConfigAccount" }, { docs: ["The signatory state account holds information", "about the global system of signatory servers, and the existence", "of the signatory state account is a valid proof that the signatory", "server system has been initialized. This account is being initialized", "with 40 bytes, paid for by dflow_admin. This account is a PDA", "generated by the following seeds: the string literal `sigstate`"]; isMut: true; isSigner: false; name: "signatoryState" }, { docs: ["The signatory stake vault holds staked assets", "from signatory server operators. This account is being initialized", "and is paid for by dflow_admin. This is a token account which", "is being initialized, and is associated with the signatory_stake_mint", "mint. The authority for this token account is signatory_state.", "This account is a PDA generated by the following seeds: the string", "literal `sigstake`"]; isMut: true; isSigner: false; name: "signatoryStakeVault" }, { docs: ["The SPL mint account associated with the token", "that is staked by the signatory server."]; isMut: false; isSigner: false; name: "signatoryStakeMint" }, { docs: ["The public key of the DFlow admin. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "dflowAdmin" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "globalConfigAccountBump"; type: "u8" }, { name: "signatoryStateBump"; type: "u8" }, { name: "signatoryStakeVaultBump"; type: "u8" }]; docs: ["This instruction is used to initialize global state for tracking", "the system of signatory servers.", "", "This instruction can only be called by the DFlow admin and can", "only be called once."]; name: "initSignatorySystem" }, { accounts: [{ docs: ["The signatory record account holds information", "about a signatory server, and the existence of the signatory", "record account is a valid proof that the signatory server has", "staked the requisite value in the protocol allowing it to endorse", "flow as originating from a retail source. This account is being", "initialized with 48 bytes, paid for by signatory_server. This", "account is a PDA generated by the following seeds: the public", "key of the signatory_server account"]; isMut: true; isSigner: false; name: "signatoryRecord" }, { docs: ["The signatory stake vault holds staked assets", "from signatory server operators. This account is expected to", "be mutable. This account is a PDA generated by the following", "seeds: the string literal `sigstake`"]; isMut: true; isSigner: false; name: "signatoryStakeVault" }, { docs: ["The signatory server's token account used for", "originating the stake transfer. This account is expected to be", "mutable"]; isMut: true; isSigner: false; name: "signatoryServerTokenAccount" }, { docs: ["The public key of the signatory server that endorses", "new orders as originating from a retail source. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "signatoryServer" }, { docs: ["This account stores the permissions that apply", "to the signatory_server. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the signatory_server account"]; isMut: false; isSigner: false; name: "signatoryServerWhitelistEntry" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "signatoryRecordBump"; type: "u8" }, { name: "signatoryStakeVaultBump"; type: "u8" }, { name: "signatoryServerWhitelistEntryBump"; type: "u8" }]; docs: ["This instruction is used to stake the requisite amount of tokens", "necessary to endorse flow as retail. This stake is subject to", "slashing based on the quality of the order flow sent by the signatory", "server.", "", "Signatory server operators provide helpful network participation", "by endorsing and forwarding retail order flow to the network.", "This helpful network participation is rewarded, or slashed based", "on the quality of order flow sent."]; name: "createSignatory" }, { accounts: [{ docs: ["The signatory record account holds information", "about a signatory server, and the existence of the signatory", "record account is a valid proof that the signatory server has", "staked the requisite value in the protocol allowing it to endorse", "flow as originating from a retail source. This account is expected", "to be mutable. This account is a PDA generated by the following", "seeds: the public key of the signatory_server account"]; isMut: true; isSigner: false; name: "signatoryRecord" }, { docs: ["The signatory stake vault holds staked assets", "from signatory server operators. This account is expected to", "be mutable. This account is a PDA generated by the following", "seeds: the string literal `sigstake`"]; isMut: true; isSigner: false; name: "signatoryStakeVault" }, { docs: ["The signatory server's token account used for", "originating the stake transfer. This account is expected to be", "mutable"]; isMut: true; isSigner: false; name: "signatoryServerTokenAccount" }, { docs: ["The public key of the signatory server that endorses", "new orders as originating from a retail source. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "signatoryServer" }, { docs: ["This account stores the permissions that apply", "to the signatory_server. This account is a PDA generated by the", "following seeds: the string literal `whitelist_entry`, the public", "key of the signatory_server account"]; isMut: false; isSigner: false; name: "signatoryServerWhitelistEntry" }, { isMut: false; isSigner: false; name: "tokenProgram" }]; args: [{ name: "signatoryRecordBump"; type: "u8" }, { name: "signatoryStakeVaultBump"; type: "u8" }, { name: "signatoryServerWhitelistEntryBump"; type: "u8" }, { name: "stakeSize"; type: "u64" }]; docs: ["This instruction is used to stake additional tokens into an existing", "signatory server stake vault.", "", "Signatory servers are subject to slashing, and if slashed to", "below the stake minimum they may no longer be qualified to endorse", "order flow as originated from a retail source."]; name: "stakeSignatory" }, { accounts: [{ docs: ["The auction epoch state account holds state specific", "to an epoch of the auction, if that state must be remembered", "beyond the duration of that auction epoch. This account is expected", "to be mutable. This account is being closed, and the destination", "of the lamports will be the auction_owner account. This account", "is a PDA generated by the following seeds: the string literal", "`epoch`, an unsigned 64 bit integer, an unsigned 64 bit integer.", "The key of owner must match the field named owner in this account"]; isMut: true; isSigner: false; name: "auctionEpochState" }, { docs: ["The auction state account holds state specific", "to the auction. This account is expected to be mutable. This", "account is a PDA generated by the following seeds: the string", "literal `auction_state`, an unsigned 64 bit integer"]; isMut: true; isSigner: false; name: "auctionStateAccount" }, { docs: ["The account that created the AuctionEpochState", "account by calling init_auction_epoch_state_account. This account", "is a signer for the instruction. This account is expected to", "be mutable"]; isMut: true; isSigner: true; name: "owner" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: [{ name: "auctionEpochStateBump"; type: "u8" }, { name: "auctionStateAccountBump"; type: "u8" }, { name: "auctionId"; type: "u64" }, { name: "auctionEpoch"; type: "u64" }]; docs: ["This instruction is used to close an AuctionEpochState account.", "", "The auction owner can use this instruction to close the AuctionEpochState", "account for an old epoch that has no open orders or fills pending", "settlement. The auction owner can also use this instruction close", "the AuctionEpochState account for the last, current, or next", "epoch if the auction is in the Draining state."]; name: "closeAuctionEpochState" }]
  • name: "dflow"
  • types: [{ name: "CurrencyPair"; type: { fields: [{ name: "base"; type: "publicKey" }, { name: "baseOracle"; type: "publicKey" }, { name: "quote"; type: "publicKey" }, { name: "quoteOracle"; type: "publicKey" }]; kind: "struct" } }, { name: "MantissaExp"; type: { fields: [{ name: "mantissa"; type: "i64" }, { name: "exponent"; type: "i32" }]; kind: "struct" } }, { name: "OrderDetails"; type: { fields: [{ name: "yMint"; type: "publicKey" }, { name: "minFillPrice"; type: "u64" }]; kind: "struct" } }, { name: "MarketMakerEvent"; type: { fields: [{ name: "event"; type: "u8" }, { name: "data"; type: { array: ["u8", 128] } }]; kind: "struct" } }, { name: "AuctionStateAccountEvent"; type: { kind: "enum"; variants: [{ name: "Initialized" }, { name: "NewBestBid" }, { name: "NewAuctionWinner" }, { name: "NextOrderIdIncremented" }, { name: "AuctionStateChanged" }] } }, { name: "AuctionStatus"; type: { kind: "enum"; variants: [{ name: "Trading" }, { name: "Halted" }, { name: "Expired" }, { name: "Draining" }] } }, { name: "Side"; type: { kind: "enum"; variants: [{ name: "Ask" }, { name: "Bid" }] } }, { name: "MarketMakerEventKind"; type: { kind: "enum"; variants: [{ name: "None" }, { name: "OrderPlaced" }, { name: "OrderCancelled" }, { name: "OrderPartiallyFilled" }, { name: "OrderFilled" }] } }, { name: "RetailDataAccountEvent"; type: { kind: "enum"; variants: [{ name: "Initialized" }, { name: "NewOrder" }, { name: "OrderCancelled" }, { name: "OrderFilled" }, { name: "OrderPartiallyFilled" }, { name: "AccountClosed" }] } }, { name: "Role"; type: { kind: "enum"; variants: [{ name: "AuctionOwner" }, { name: "Arbiter" }, { name: "SignatoryServer" }, { name: "MarketMaker" }] } }, { name: "OrderType"; type: { kind: "enum"; variants: [{ name: "LimitOrder" }, { name: "MarketOrder" }] } }]
  • version: "0.1.0"

Generated using TypeDoc