UNPKG

@drift-labs/sdk

Version:
3,227 lines (3,226 loc) • 368 kB
/** * Program IDL in camelCase format in order to be used in JS/TS. * * Note that this is only a type helper and is not the actual IDL. The original * IDL can be found at `target/idl/drift.json`. */ export type Drift = { address: 'vELoC1audYbSYVRXn1vPaV8Axoa9oU6BYmNGZZBDZ1P'; metadata: { name: 'drift'; version: '2.162.0'; spec: '0.1.0'; description: 'Created with Anchor'; }; instructions: [ { name: 'addAmmConstituentMappingData'; discriminator: [164, 236, 130, 40, 118, 179, 46, 235]; accounts: [ { name: 'admin'; writable: true; signer: true; }, { name: 'lpPool'; }, { name: 'ammConstituentMapping'; writable: true; pda: { seeds: [ { kind: 'const'; value: [65, 77, 77, 95, 77, 65, 80]; }, { kind: 'account'; path: 'lpPool'; }, ]; }; }, { name: 'constituentTargetBase'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 99, 111, 110, 115, 116, 105, 116, 117, 101, 110, 116, 95, 116, 97, 114, 103, 101, 116, 95, 98, 97, 115, 101, 95, 115, 101, 101, 100, ]; }, { kind: 'account'; path: 'lpPool'; }, ]; }; }, { name: 'state'; }, { name: 'systemProgram'; address: '11111111111111111111111111111111'; }, ]; args: [ { name: 'ammConstituentMappingData'; type: { vec: { defined: { name: 'addAmmConstituentMappingDatum'; }; }; }; }, ]; }, { name: 'addInsuranceFundStake'; discriminator: [251, 144, 115, 11, 222, 47, 62, 236]; accounts: [ { name: 'state'; }, { name: 'spotMarket'; writable: true; pda: { seeds: [ { kind: 'const'; value: [115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'insuranceFundStake'; writable: true; }, { name: 'userStats'; writable: true; }, { name: 'authority'; signer: true; relations: ['insuranceFundStake', 'userStats']; }, { name: 'spotMarketVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'insuranceFundVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 105, 110, 115, 117, 114, 97, 110, 99, 101, 95, 102, 117, 110, 100, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'driftSigner'; }, { name: 'userTokenAccount'; writable: true; }, { name: 'tokenProgram'; }, ]; args: [ { name: 'marketIndex'; type: 'u16'; }, { name: 'amount'; type: 'u64'; }, ]; }, { name: 'addMarketToAmmCache'; discriminator: [112, 149, 195, 222, 124, 7, 87, 237]; accounts: [ { name: 'admin'; writable: true; signer: true; }, { name: 'state'; }, { name: 'ammCache'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 97, 109, 109, 95, 99, 97, 99, 104, 101, 95, 115, 101, 101, 100, ]; }, ]; }; }, { name: 'perpMarket'; }, { name: 'rent'; address: 'SysvarRent111111111111111111111111111111111'; }, { name: 'systemProgram'; address: '11111111111111111111111111111111'; }, ]; args: []; }, { name: 'adminDeposit'; discriminator: [210, 66, 65, 182, 102, 214, 176, 30]; accounts: [ { name: 'state'; }, { name: 'user'; writable: true; }, { name: 'admin'; writable: true; signer: true; }, { name: 'spotMarketVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'adminTokenAccount'; writable: true; }, { name: 'tokenProgram'; }, ]; args: [ { name: 'marketIndex'; type: 'u16'; }, { name: 'amount'; type: 'u64'; }, ]; }, { name: 'adminUpdateUserStatsPausedOperations'; discriminator: [183, 104, 63, 150, 240, 199, 3, 10]; accounts: [ { name: 'admin'; signer: true; }, { name: 'state'; }, { name: 'userStats'; writable: true; }, ]; args: [ { name: 'pausedOperations'; type: 'u8'; }, ]; }, { name: 'adminWithdrawFromInsuranceFundVault'; discriminator: [228, 208, 191, 246, 169, 58, 189, 213]; accounts: [ { name: 'state'; }, { name: 'authority'; writable: true; signer: true; }, { name: 'spotMarket'; writable: true; pda: { seeds: [ { kind: 'const'; value: [115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'insuranceFundVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 105, 110, 115, 117, 114, 97, 110, 99, 101, 95, 102, 117, 110, 100, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'recipientTokenAccount'; writable: true; }, { name: 'tokenProgram'; }, { name: 'driftSigner'; }, ]; args: [ { name: 'marketIndex'; type: 'u16'; }, { name: 'amount'; type: 'u64'; }, ]; }, { name: 'beginInsuranceFundSwap'; discriminator: [176, 69, 143, 205, 32, 132, 163, 0]; accounts: [ { name: 'state'; }, { name: 'authority'; writable: true; signer: true; }, { name: 'outInsuranceFundVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 105, 110, 115, 117, 114, 97, 110, 99, 101, 95, 102, 117, 110, 100, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'outMarketIndex'; }, ]; }; }, { name: 'inInsuranceFundVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 105, 110, 115, 117, 114, 97, 110, 99, 101, 95, 102, 117, 110, 100, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'inMarketIndex'; }, ]; }; }, { name: 'outTokenAccount'; writable: true; }, { name: 'inTokenAccount'; writable: true; }, { name: 'ifRebalanceConfig'; writable: true; }, { name: 'tokenProgram'; }, { name: 'driftSigner'; }, { name: 'instructions'; docs: ['Instructions Sysvar for instruction introspection']; address: 'Sysvar1nstructions1111111111111111111111111'; }, ]; args: [ { name: 'inMarketIndex'; type: 'u16'; }, { name: 'outMarketIndex'; type: 'u16'; }, { name: 'amountIn'; type: 'u64'; }, ]; }, { name: 'beginLpSwap'; discriminator: [64, 44, 24, 199, 48, 125, 67, 91]; accounts: [ { name: 'state'; }, { name: 'admin'; writable: true; signer: true; }, { name: 'signerOutTokenAccount'; docs: ['Signer token accounts']; writable: true; }, { name: 'signerInTokenAccount'; writable: true; }, { name: 'constituentOutTokenAccount'; docs: ['Constituent token accounts']; writable: true; }, { name: 'constituentInTokenAccount'; writable: true; }, { name: 'outConstituent'; docs: ['Constituents']; writable: true; pda: { seeds: [ { kind: 'const'; value: [67, 79, 78, 83, 84, 73, 84, 85, 69, 78, 84]; }, { kind: 'account'; path: 'lpPool'; }, { kind: 'arg'; path: 'outMarketIndex'; }, ]; }; }, { name: 'inConstituent'; writable: true; pda: { seeds: [ { kind: 'const'; value: [67, 79, 78, 83, 84, 73, 84, 85, 69, 78, 84]; }, { kind: 'account'; path: 'lpPool'; }, { kind: 'arg'; path: 'inMarketIndex'; }, ]; }; }, { name: 'lpPool'; }, { name: 'instructions'; docs: ['Instructions Sysvar for instruction introspection']; address: 'Sysvar1nstructions1111111111111111111111111'; }, { name: 'tokenProgram'; }, ]; args: [ { name: 'inMarketIndex'; type: 'u16'; }, { name: 'outMarketIndex'; type: 'u16'; }, { name: 'amountIn'; type: 'u64'; }, ]; }, { name: 'beginSwap'; discriminator: [174, 109, 228, 1, 242, 105, 232, 105]; accounts: [ { name: 'state'; }, { name: 'user'; writable: true; }, { name: 'userStats'; writable: true; }, { name: 'authority'; signer: true; }, { name: 'outSpotMarketVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'outMarketIndex'; }, ]; }; }, { name: 'inSpotMarketVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'inMarketIndex'; }, ]; }; }, { name: 'outTokenAccount'; writable: true; }, { name: 'inTokenAccount'; writable: true; }, { name: 'tokenProgram'; }, { name: 'driftSigner'; }, { name: 'instructions'; docs: ['Instructions Sysvar for instruction introspection']; address: 'Sysvar1nstructions1111111111111111111111111'; }, ]; args: [ { name: 'inMarketIndex'; type: 'u16'; }, { name: 'outMarketIndex'; type: 'u16'; }, { name: 'amountIn'; type: 'u64'; }, ]; }, { name: 'cancelOrder'; discriminator: [95, 129, 237, 240, 8, 49, 223, 132]; accounts: [ { name: 'state'; }, { name: 'user'; writable: true; }, { name: 'authority'; signer: true; }, ]; args: [ { name: 'orderId'; type: { option: 'u32'; }; }, ]; }, { name: 'cancelOrderByUserId'; discriminator: [107, 211, 250, 133, 18, 37, 57, 100]; accounts: [ { name: 'state'; }, { name: 'user'; writable: true; }, { name: 'authority'; signer: true; }, ]; args: [ { name: 'userOrderId'; type: 'u8'; }, ]; }, { name: 'cancelOrders'; discriminator: [238, 225, 95, 158, 227, 103, 8, 194]; accounts: [ { name: 'state'; }, { name: 'user'; writable: true; }, { name: 'authority'; signer: true; }, ]; args: [ { name: 'marketType'; type: { option: { defined: { name: 'marketType'; }; }; }; }, { name: 'marketIndex'; type: { option: 'u16'; }; }, { name: 'direction'; type: { option: { defined: { name: 'positionDirection'; }; }; }; }, ]; }, { name: 'cancelOrdersByIds'; discriminator: [134, 19, 144, 165, 94, 240, 210, 94]; accounts: [ { name: 'state'; }, { name: 'user'; writable: true; }, { name: 'authority'; signer: true; }, ]; args: [ { name: 'orderIds'; type: { vec: 'u32'; }; }, ]; }, { name: 'cancelRequestRemoveInsuranceFundStake'; discriminator: [97, 235, 78, 62, 212, 42, 241, 127]; accounts: [ { name: 'spotMarket'; writable: true; pda: { seeds: [ { kind: 'const'; value: [115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'insuranceFundStake'; writable: true; }, { name: 'userStats'; writable: true; }, { name: 'authority'; signer: true; relations: ['insuranceFundStake', 'userStats']; }, { name: 'insuranceFundVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 105, 110, 115, 117, 114, 97, 110, 99, 101, 95, 102, 117, 110, 100, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, ]; args: [ { name: 'marketIndex'; type: 'u16'; }, ]; }, { name: 'changeApprovedBuilder'; discriminator: [179, 134, 211, 45, 195, 5, 189, 173]; accounts: [ { name: 'escrow'; writable: true; pda: { seeds: [ { kind: 'const'; value: [82, 69, 86, 95, 69, 83, 67, 82, 79, 87]; }, { kind: 'account'; path: 'authority'; }, ]; }; }, { name: 'authority'; signer: true; relations: ['escrow']; }, { name: 'payer'; writable: true; signer: true; }, { name: 'systemProgram'; address: '11111111111111111111111111111111'; }, ]; args: [ { name: 'builder'; type: 'pubkey'; }, { name: 'maxFeeBps'; type: 'u16'; }, { name: 'add'; type: 'bool'; }, ]; }, { name: 'changeSignedMsgWsDelegateStatus'; discriminator: [252, 202, 252, 219, 179, 27, 84, 138]; accounts: [ { name: 'signedMsgWsDelegates'; writable: true; pda: { seeds: [ { kind: 'const'; value: [83, 73, 71, 78, 69, 68, 95, 77, 83, 71, 95, 87, 83]; }, { kind: 'account'; path: 'authority'; }, ]; }; }, { name: 'authority'; writable: true; signer: true; }, { name: 'systemProgram'; address: '11111111111111111111111111111111'; }, ]; args: [ { name: 'delegate'; type: 'pubkey'; }, { name: 'add'; type: 'bool'; }, ]; }, { name: 'deleteAmmCache'; discriminator: [216, 130, 215, 206, 233, 232, 191, 88]; accounts: [ { name: 'admin'; writable: true; signer: true; }, { name: 'state'; }, { name: 'ammCache'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 97, 109, 109, 95, 99, 97, 99, 104, 101, 95, 115, 101, 101, 100, ]; }, ]; }; }, ]; args: []; }, { name: 'deleteInitializedPerpMarket'; discriminator: [91, 154, 24, 87, 106, 59, 190, 66]; accounts: [ { name: 'admin'; writable: true; signer: true; relations: ['state']; }, { name: 'state'; writable: true; }, { name: 'perpMarket'; writable: true; }, ]; args: [ { name: 'marketIndex'; type: 'u16'; }, ]; }, { name: 'deleteInitializedSpotMarket'; discriminator: [31, 140, 67, 191, 189, 20, 101, 221]; accounts: [ { name: 'admin'; writable: true; signer: true; relations: ['state']; }, { name: 'state'; writable: true; }, { name: 'spotMarket'; writable: true; }, { name: 'spotMarketVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'insuranceFundVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 105, 110, 115, 117, 114, 97, 110, 99, 101, 95, 102, 117, 110, 100, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'driftSigner'; }, { name: 'tokenProgram'; }, ]; args: [ { name: 'marketIndex'; type: 'u16'; }, ]; }, { name: 'deleteOpenbookV2FulfillmentConfig'; discriminator: [18, 198, 138, 142, 138, 48, 79, 187]; accounts: [ { name: 'state'; }, { name: 'openbookV2FulfillmentConfig'; writable: true; }, { name: 'admin'; writable: true; signer: true; }, ]; args: []; }, { name: 'deletePrelaunchOracle'; discriminator: [59, 169, 100, 49, 69, 17, 173, 253]; accounts: [ { name: 'admin'; writable: true; signer: true; relations: ['state']; }, { name: 'prelaunchOracle'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 112, 114, 101, 108, 97, 117, 110, 99, 104, 95, 111, 114, 97, 99, 108, 101, ]; }, { kind: 'arg'; path: 'perpMarketIndex'; }, ]; }; }, { name: 'perpMarket'; }, { name: 'state'; }, ]; args: [ { name: 'perpMarketIndex'; type: 'u16'; }, ]; }, { name: 'deleteSerumFulfillmentConfig'; discriminator: [30, 143, 88, 48, 249, 103, 154, 255]; accounts: [ { name: 'state'; }, { name: 'serumFulfillmentConfig'; writable: true; }, { name: 'admin'; writable: true; signer: true; }, ]; args: []; }, { name: 'deleteSignedMsgUserOrders'; discriminator: [221, 247, 128, 253, 212, 254, 46, 153]; accounts: [ { name: 'signedMsgUserOrders'; writable: true; pda: { seeds: [ { kind: 'const'; value: [83, 73, 71, 78, 69, 68, 95, 77, 83, 71]; }, { kind: 'account'; path: 'authority'; }, ]; }; }, { name: 'state'; writable: true; }, { name: 'authority'; signer: true; }, ]; args: []; }, { name: 'deleteUser'; discriminator: [186, 85, 17, 249, 219, 231, 98, 251]; accounts: [ { name: 'user'; writable: true; }, { name: 'userStats'; writable: true; }, { name: 'state'; writable: true; }, { name: 'authority'; writable: true; signer: true; relations: ['user', 'userStats']; }, ]; args: []; }, { name: 'deposit'; discriminator: [242, 35, 198, 137, 82, 225, 242, 182]; accounts: [ { name: 'state'; }, { name: 'user'; writable: true; }, { name: 'userStats'; writable: true; }, { name: 'authority'; signer: true; }, { name: 'spotMarketVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'userTokenAccount'; writable: true; }, { name: 'tokenProgram'; }, ]; args: [ { name: 'marketIndex'; type: 'u16'; }, { name: 'amount'; type: 'u64'; }, { name: 'reduceOnly'; type: 'bool'; }, ]; }, { name: 'depositIntoInsuranceFundStake'; discriminator: [4, 22, 226, 201, 124, 44, 82, 230]; accounts: [ { name: 'signer'; signer: true; }, { name: 'state'; writable: true; }, { name: 'spotMarket'; writable: true; pda: { seeds: [ { kind: 'const'; value: [115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'insuranceFundStake'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 105, 110, 115, 117, 114, 97, 110, 99, 101, 95, 102, 117, 110, 100, 95, 115, 116, 97, 107, 101, ]; }, { kind: 'account'; path: 'userStats'; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'userStats'; writable: true; }, { name: 'spotMarketVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'insuranceFundVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 105, 110, 115, 117, 114, 97, 110, 99, 101, 95, 102, 117, 110, 100, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'userTokenAccount'; writable: true; }, { name: 'tokenProgram'; }, { name: 'driftSigner'; }, ]; args: [ { name: 'marketIndex'; type: 'u16'; }, { name: 'amount'; type: 'u64'; }, ]; }, { name: 'depositIntoIsolatedPerpPosition'; discriminator: [101, 48, 255, 153, 127, 121, 170, 26]; accounts: [ { name: 'state'; }, { name: 'user'; writable: true; }, { name: 'userStats'; writable: true; }, { name: 'authority'; signer: true; }, { name: 'spotMarketVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'spotMarketIndex'; }, ]; }; }, { name: 'userTokenAccount'; writable: true; }, { name: 'tokenProgram'; }, ]; args: [ { name: 'spotMarketIndex'; type: 'u16'; }, { name: 'perpMarketIndex'; type: 'u16'; }, { name: 'amount'; type: 'u64'; }, ]; }, { name: 'depositIntoPerpMarketFeePool'; discriminator: [34, 58, 57, 68, 97, 80, 244, 6]; accounts: [ { name: 'state'; writable: true; }, { name: 'perpMarket'; writable: true; }, { name: 'admin'; signer: true; relations: ['state']; }, { name: 'sourceVault'; writable: true; }, { name: 'driftSigner'; }, { name: 'quoteSpotMarket'; writable: true; pda: { seeds: [ { kind: 'const'; value: [115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116]; }, { kind: 'const'; value: [0, 0]; }, ]; }; }, { name: 'spotMarketVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'const'; value: [0, 0]; }, ]; }; }, { name: 'tokenProgram'; }, ]; args: [ { name: 'amount'; type: 'u64'; }, ]; }, { name: 'depositIntoSpotMarketRevenuePool'; discriminator: [92, 40, 151, 42, 122, 254, 139, 246]; accounts: [ { name: 'state'; }, { name: 'spotMarket'; writable: true; }, { name: 'authority'; writable: true; signer: true; }, { name: 'spotMarketVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'account'; path: 'spotMarket'; }, ]; }; }, { name: 'userTokenAccount'; writable: true; }, { name: 'tokenProgram'; }, ]; args: [ { name: 'amount'; type: 'u64'; }, ]; }, { name: 'depositIntoSpotMarketVault'; discriminator: [48, 252, 119, 73, 255, 205, 174, 247]; accounts: [ { name: 'state'; }, { name: 'spotMarket'; writable: true; }, { name: 'admin'; signer: true; }, { name: 'sourceVault'; writable: true; }, { name: 'spotMarketVault'; writable: true; }, { name: 'tokenProgram'; }, ]; args: [ { name: 'amount'; type: 'u64'; }, ]; }, { name: 'depositToProgramVault'; discriminator: [235, 171, 121, 80, 57, 239, 147, 220]; accounts: [ { name: 'state'; }, { name: 'admin'; writable: true; signer: true; }, { name: 'constituent'; writable: true; }, { name: 'constituentTokenAccount'; writable: true; }, { name: 'spotMarket'; writable: true; }, { name: 'spotMarketVault'; writable: true; }, { name: 'tokenProgram'; }, { name: 'mint'; }, { name: 'oracle'; }, ]; args: [ { name: 'amount'; type: 'u64'; }, ]; }, { name: 'endInsuranceFundSwap'; discriminator: [206, 230, 98, 8, 249, 158, 169, 167]; accounts: [ { name: 'state'; }, { name: 'authority'; writable: true; signer: true; }, { name: 'outInsuranceFundVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 105, 110, 115, 117, 114, 97, 110, 99, 101, 95, 102, 117, 110, 100, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'outMarketIndex'; }, ]; }; }, { name: 'inInsuranceFundVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 105, 110, 115, 117, 114, 97, 110, 99, 101, 95, 102, 117, 110, 100, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'inMarketIndex'; }, ]; }; }, { name: 'outTokenAccount'; writable: true; }, { name: 'inTokenAccount'; writable: true; }, { name: 'ifRebalanceConfig'; writable: true; }, { name: 'tokenProgram'; }, { name: 'driftSigner'; }, { name: 'instructions'; docs: ['Instructions Sysvar for instruction introspection']; address: 'Sysvar1nstructions1111111111111111111111111'; }, ]; args: [ { name: 'inMarketIndex'; type: 'u16'; }, { name: 'outMarketIndex'; type: 'u16'; }, ]; }, { name: 'endLpSwap'; discriminator: [99, 125, 214, 165, 129, 175, 253, 135]; accounts: [ { name: 'state'; }, { name: 'admin'; writable: true; signer: true; }, { name: 'signerOutTokenAccount'; docs: ['Signer token accounts']; writable: true; }, { name: 'signerInTokenAccount'; writable: true; }, { name: 'constituentOutTokenAccount'; docs: ['Constituent token accounts']; writable: true; }, { name: 'constituentInTokenAccount'; writable: true; }, { name: 'outConstituent'; docs: ['Constituents']; writable: true; pda: { seeds: [ { kind: 'const'; value: [67, 79, 78, 83, 84, 73, 84, 85, 69, 78, 84]; }, { kind: 'account'; path: 'lpPool'; }, { kind: 'arg'; path: 'outMarketIndex'; }, ]; }; }, { name: 'inConstituent'; writable: true; pda: { seeds: [ { kind: 'const'; value: [67, 79, 78, 83, 84, 73, 84, 85, 69, 78, 84]; }, { kind: 'account'; path: 'lpPool'; }, { kind: 'arg'; path: 'inMarketIndex'; }, ]; }; }, { name: 'lpPool'; }, { name: 'instructions'; docs: ['Instructions Sysvar for instruction introspection']; address: 'Sysvar1nstructions1111111111111111111111111'; }, { name: 'tokenProgram'; }, ]; args: [ { name: 'inMarketIndex'; type: 'u16'; }, { name: 'outMarketIndex'; type: 'u16'; }, ]; }, { name: 'endSwap'; discriminator: [177, 184, 27, 193, 34, 13, 210, 145]; accounts: [ { name: 'state'; }, { name: 'user'; writable: true; }, { name: 'userStats'; writable: true; }, { name: 'authority'; signer: true; }, { name: 'outSpotMarketVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'outMarketIndex'; }, ]; }; }, { name: 'inSpotMarketVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116, 95, 118, 97, 117, 108, 116, ]; }, { kind: 'arg'; path: 'inMarketIndex'; }, ]; }; }, { name: 'outTokenAccount'; writable: true; }, { name: 'inTokenAccount'; writable: true; }, { name: 'tokenProgram'; }, { name: 'driftSigner'; }, { name: 'instructions'; docs: ['Instructions Sysvar for instruction introspection']; address: 'Sysvar1nstructions1111111111111111111111111'; }, ]; args: [ { name: 'inMarketIndex'; type: 'u16'; }, { name: 'outMarketIndex'; type: 'u16'; }, { name: 'limitPrice'; type: { option: 'u64'; }; }, { name: 'reduceOnly'; type: { option: { defined: { name: 'swapReduceOnly'; }; }; }; }, ]; }, { name: 'fillPerpOrder'; discriminator: [13, 188, 248, 103, 134, 217, 106, 240]; accounts: [ { name: 'state'; }, { name: 'authority'; signer: true; }, { name: 'filler'; writable: true; }, { name: 'fillerStats'; writable: true; }, { name: 'user'; writable: true; }, { name: 'userStats'; writable: true; }, ]; args: [ { name: 'orderId'; type: { option: 'u32'; }; }, { name: 'makerOrderId'; type: { option: 'u32'; }; }, ]; }, { name: 'forceCancelOrders'; discriminator: [64, 181, 196, 63, 222, 72, 64, 232]; accounts: [ { name: 'state'; }, { name: 'authority'; signer: true; }, { name: 'filler'; writable: true; }, { name: 'user'; writable: true; }, ]; args: []; }, { name: 'forceDeleteUser'; discriminator: [2, 241, 195, 172, 227, 24, 254, 158]; accounts: [ { name: 'user'; writable: true; }, { name: 'userStats'; writable: true; }, { name: 'state'; writable: true; }, { name: 'authority'; writable: true; relations: ['user', 'userStats']; }, { name: 'keeper'; writable: true; signer: true; }, { name: 'driftSigner'; }, ]; args: []; }, { name: 'initialize'; discriminator: [175, 175, 109, 31, 13, 152, 155, 237]; accounts: [ { name: 'admin'; writable: true; signer: true; }, { name: 'state'; writable: true; pda: { seeds: [ { kind: 'const'; value: [100, 114, 105, 102, 116, 95, 115, 116, 97, 116, 101]; }, ]; }; }, { name: 'quoteAssetMint'; }, { name: 'driftSigner'; }, { name: 'rent'; address: 'SysvarRent111111111111111111111111111111111'; }, { name: 'systemProgram'; address: '11111111111111111111111111111111'; }, { name: 'tokenProgram'; }, ]; args: []; }, { name: 'initializeAmmCache'; discriminator: [38, 60, 171, 158, 203, 58, 137, 8]; accounts: [ { name: 'admin'; writable: true; signer: true; }, { name: 'state'; }, { name: 'ammCache'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 97, 109, 109, 95, 99, 97, 99, 104, 101, 95, 115, 101, 101, 100, ]; }, ]; }; }, { name: 'rent'; address: 'SysvarRent111111111111111111111111111111111'; }, { name: 'systemProgram'; address: '11111111111111111111111111111111'; }, ]; args: []; }, { name: 'initializeConstituent'; discriminator: [12, 196, 45, 218, 93, 89, 0, 33]; accounts: [ { name: 'state'; }, { name: 'admin'; writable: true; signer: true; }, { name: 'lpPool'; writable: true; }, { name: 'constituentTargetBase'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 99, 111, 110, 115, 116, 105, 116, 117, 101, 110, 116, 95, 116, 97, 114, 103, 101, 116, 95, 98, 97, 115, 101, 95, 115, 101, 101, 100, ]; }, { kind: 'account'; path: 'lpPool'; }, ]; }; }, { name: 'constituentCorrelations'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 99, 111, 110, 115, 116, 105, 116, 117, 101, 110, 116, 95, 99, 111, 114, 114, 101, 108, 97, 116, 105, 111, 110, 115, ]; }, { kind: 'account'; path: 'lpPool'; }, ]; }; }, { name: 'constituent'; writable: true; pda: { seeds: [ { kind: 'const'; value: [67, 79, 78, 83, 84, 73, 84, 85, 69, 78, 84]; }, { kind: 'account'; path: 'lpPool'; }, { kind: 'arg'; path: 'spotMarketIndex'; }, ]; }; }, { name: 'spotMarket'; pda: { seeds: [ { kind: 'const'; value: [115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116]; }, { kind: 'arg'; path: 'spotMarketIndex'; }, ]; }; }, { name: 'spotMarketMint'; }, { name: 'constituentVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 67, 79, 78, 83, 84, 73, 84, 85, 69, 78, 84, 95, 86, 65, 85, 76, 84, ]; }, { kind: 'account'; path: 'lpPool'; }, { kind: 'arg'; path: 'spotMarketIndex'; }, ]; }; }, { name: 'rent'; address: 'SysvarRent111111111111111111111111111111111'; }, { name: 'systemProgram'; address: '11111111111111111111111111111111'; }, { name: 'tokenProgram'; }, ]; args: [ { name: 'spotMarketIndex'; type: 'u16'; }, { name: 'decimals'; type: 'u8'; }, { name: 'maxWeightDeviation'; type: 'i64'; }, { name: 'swapFeeMin'; type: 'i64'; }, { name: 'swapFeeMax'; type: 'i64'; }, { name: 'maxBorrowTokenAmount'; type: 'u64'; }, { name: 'oracleStalenessThreshold'; type: 'u64'; }, { name: 'costToTrade'; type: 'i32'; }, { name: 'constituentDerivativeIndex'; type: { option: 'i16'; }; }, { name: 'constituentDerivativeDepegThreshold'; type: 'u64'; }, { name: 'derivativeWeight'; type: 'u64'; }, { name: 'volatility'; type: 'u64'; }, { name: 'gammaExecution'; type: 'u8'; }, { name: 'gammaInventory'; type: 'u8'; }, { name: 'xi'; type: 'u8'; }, { name: 'newConstituentCorrelations'; type: { vec: 'i64'; }; }, ]; }, { name: 'initializeFuelOverflow'; discriminator: [88, 223, 132, 161, 208, 88, 142, 42]; accounts: [ { name: 'fuelOverflow'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 102, 117, 101, 108, 95, 111, 118, 101, 114, 102, 108, 111, 119, ]; }, { kind: 'account'; path: 'authority'; }, ]; }; }, { name: 'userStats'; writable: true; }, { name: 'authority'; relations: ['userStats']; }, { name: 'payer'; writable: true; signer: true; }, { name: 'rent'; address: 'SysvarRent111111111111111111111111111111111'; }, { name: 'systemProgram'; address: '11111111111111111111111111111111'; }, ]; args: []; }, { name: 'initializeIfRebalanceConfig'; discriminator: [8, 85, 184, 167, 176, 61, 173, 226]; accounts: [ { name: 'admin'; writable: true; signer: true; relations: ['state']; }, { name: 'ifRebalanceConfig'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 105, 102, 95, 114, 101, 98, 97, 108, 97, 110, 99, 101, 95, 99, 111, 110, 102, 105, 103, ]; }, { kind: 'arg'; path: 'params.in_market_index'; }, { kind: 'arg'; path: 'params.out_market_index'; }, ]; }; }, { name: 'state'; }, { name: 'rent'; address: 'SysvarRent111111111111111111111111111111111'; }, { name: 'systemProgram'; address: '11111111111111111111111111111111'; }, ]; args: [ { name: 'params'; type: { defined: { name: 'ifRebalanceConfigParams'; }; }; }, ]; }, { name: 'initializeInsuranceFundStake'; discriminator: [187, 179, 243, 70, 248, 90, 92, 147]; accounts: [ { name: 'spotMarket'; pda: { seeds: [ { kind: 'const'; value: [115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'insuranceFundStake'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 105, 110, 115, 117, 114, 97, 110, 99, 101, 95, 102, 117, 110, 100, 95, 115, 116, 97, 107, 101, ]; }, { kind: 'account'; path: 'authority'; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'userStats'; writable: true; }, { name: 'state'; }, { name: 'authority'; signer: true; relations: ['userStats']; }, { name: 'payer'; writable: true; signer: true; }, { name: 'rent'; address: 'SysvarRent111111111111111111111111111111111'; }, { name: 'systemProgram'; address: '11111111111111111111111111111111'; }, ]; args: [ { name: 'marketIndex'; type: 'u16'; }, ]; }, { name: 'initializeLpPool'; discriminator: [242, 64, 1, 222, 142, 46, 204, 227]; accounts: [ { name: 'admin'; writable: true; signer: true; }, { name: 'lpPool'; writable: true; pda: { seeds: [ { kind: 'const'; value: [108, 112, 95, 112, 111, 111, 108]; }, { kind: 'arg'; path: 'id'; }, ]; }; }, { name: 'mint'; }, { name: 'lpPoolTokenVault'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 76, 80, 95, 80, 79, 79, 76, 95, 84, 79, 75, 69, 78, 95, 86, 65, 85, 76, 84, ]; }, { kind: 'account'; path: 'lpPool'; }, ]; }; }, { name: 'ammConstituentMapping'; writable: true; pda: { seeds: [ { kind: 'const'; value: [65, 77, 77, 95, 77, 65, 80]; }, { kind: 'account'; path: 'lpPool'; }, ]; }; }, { name: 'constituentTargetBase'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 99, 111, 110, 115, 116, 105, 116, 117, 101, 110, 116, 95, 116, 97, 114, 103, 101, 116, 95, 98, 97, 115, 101, 95, 115, 101, 101, 100, ]; }, { kind: 'account'; path: 'lpPool'; }, ]; }; }, { name: 'constituentCorrelations'; writable: true; pda: { seeds: [ { kind: 'const'; value: [ 99, 111, 110, 115, 116, 105, 116, 117, 101, 110, 116, 95, 99, 111, 114, 114, 101, 108, 97, 116, 105, 111, 110, 115, ]; }, { kind: 'account'; path: 'lpPool'; }, ]; }; }, { name: 'state'; }, { name: 'tokenProgram'; address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'; }, { name: 'rent'; address: 'SysvarRent111111111111111111111111111111111'; }, { name: 'systemProgram'; address: '11111111111111111111111111111111'; }, ]; args: [ { name: 'lpPoolId'; type: 'u8'; }, { name: 'minMintFee'; type: 'i64'; }, { name: 'maxAum'; type: 'u128'; }, { name: 'maxSettleQuoteAmountPerMarket'; type: 'u64'; }, { name: 'whitelistMint'; type: 'pubkey'; }, ]; }, { name: 'initializeOpenbookV2FulfillmentConfig'; discriminator: [7, 221, 103, 153, 107, 57, 27, 197]; accounts: [ { name: 'baseSpotMarket'; pda: { seeds: [ { kind: 'const'; value: [115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116]; }, { kind: 'arg'; path: 'marketIndex'; }, ]; }; }, { name: 'quoteSpotMarket'; pda: { seeds: [ { kind: 'const'; value: [115, 112, 111, 116, 95, 109, 97, 114, 107, 101, 116]; }, {