/** * 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/ext_marginfi.json`. */ export type ExtMarginfi = { "address": "G1NTMFeTAUAPBmcZxvo3LdvHvUV1Dc3itrEysyxfDJH4"; "metadata": { "name": "extMarginfi"; "version": "0.1.0"; "spec": "0.1.0"; "description": "Marginfi integration for GLAM Protocol"; }; "instructions": [ { "name": "kaminoDeposit"; "docs": [ "Deposit Kamino-backed collateral into a Marginfi account.", "", "- Permission: `MarginfiPermissions::KaminoDeposit`.", "- Policy:", "- `group` must be present in `MarginfiPolicy::groups_allowlist`.", "- `bank` must be present in `MarginfiPolicy::banks_allowlist`." ]; "discriminator": [ 237, 8, 188, 187, 115, 99, 49, 85 ]; "accounts": [ { "name": "glamState"; "writable": true; }, { "name": "glamVault"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 118, 97, 117, 108, 116 ]; }, { "kind": "account"; "path": "glamState"; } ]; "program": { "kind": "account"; "path": "glamProtocolProgram"; }; }; }, { "name": "glamSigner"; "writable": true; "signer": true; }, { "name": "integrationAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 105, 110, 116, 101, 103, 114, 97, 116, 105, 111, 110, 45, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "cpiProgram"; "address": "MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA"; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "group"; }, { "name": "marginfiAccount"; "writable": true; }, { "name": "bank"; "writable": true; }, { "name": "signerTokenAccount"; "writable": true; }, { "name": "liquidityVaultAuthority"; "writable": true; }, { "name": "liquidityVault"; "writable": true; }, { "name": "integrationAcc2"; "writable": true; }, { "name": "lendingMarket"; }, { "name": "lendingMarketAuthority"; }, { "name": "integrationAcc1"; "writable": true; }, { "name": "mint"; }, { "name": "reserveLiquiditySupply"; "writable": true; }, { "name": "reserveCollateralMint"; "writable": true; }, { "name": "reserveDestinationDepositCollateral"; "writable": true; }, { "name": "obligationFarmUserState"; "writable": true; "optional": true; }, { "name": "reserveFarmState"; "writable": true; "optional": true; }, { "name": "kaminoProgram"; }, { "name": "farmsProgram"; }, { "name": "collateralTokenProgram"; }, { "name": "liquidityTokenProgram"; }, { "name": "instructionSysvarAccount"; } ]; "args": [ { "name": "amount"; "type": "u64"; } ]; }, { "name": "kaminoWithdraw"; "docs": [ "Withdraw Kamino-backed collateral from a Marginfi account.", "", "- Permission: `MarginfiPermissions::KaminoWithdraw`.", "- Policy:", "- `group` must be present in `MarginfiPolicy::groups_allowlist`.", "- `bank` must be present in `MarginfiPolicy::banks_allowlist`." ]; "discriminator": [ 199, 101, 41, 45, 213, 98, 224, 200 ]; "accounts": [ { "name": "glamState"; "writable": true; }, { "name": "glamVault"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 118, 97, 117, 108, 116 ]; }, { "kind": "account"; "path": "glamState"; } ]; "program": { "kind": "account"; "path": "glamProtocolProgram"; }; }; }, { "name": "glamSigner"; "writable": true; "signer": true; }, { "name": "integrationAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 105, 110, 116, 101, 103, 114, 97, 116, 105, 111, 110, 45, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "cpiProgram"; "address": "MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA"; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "group"; }, { "name": "marginfiAccount"; "writable": true; }, { "name": "bank"; "writable": true; }, { "name": "destinationTokenAccount"; "writable": true; }, { "name": "liquidityVaultAuthority"; "writable": true; }, { "name": "liquidityVault"; "writable": true; }, { "name": "integrationAcc2"; "writable": true; }, { "name": "lendingMarket"; }, { "name": "lendingMarketAuthority"; }, { "name": "integrationAcc1"; "writable": true; }, { "name": "mint"; "writable": true; }, { "name": "reserveLiquiditySupply"; "writable": true; }, { "name": "reserveCollateralMint"; "writable": true; }, { "name": "reserveSourceCollateral"; "writable": true; }, { "name": "obligationFarmUserState"; "writable": true; "optional": true; }, { "name": "reserveFarmState"; "writable": true; "optional": true; }, { "name": "kaminoProgram"; }, { "name": "farmsProgram"; }, { "name": "collateralTokenProgram"; }, { "name": "liquidityTokenProgram"; }, { "name": "instructionSysvarAccount"; } ]; "args": [ { "name": "amount"; "type": "u64"; }, { "name": "withdrawAll"; "type": { "option": "bool"; }; } ]; }, { "name": "lendingAccountBorrow"; "docs": [ "Borrow liquidity from Marginfi into the GLAM vault.", "", "- Permission: `MarginfiPermissions::Borrow`.", "- Policy:", "- `group` must be present in `MarginfiPolicy::groups_allowlist`.", "- `bank` must be present in `MarginfiPolicy::banks_allowlist`.", "- The bank mint must be present in `MarginfiPolicy::borrow_allowlist`." ]; "discriminator": [ 4, 126, 116, 53, 48, 5, 212, 31 ]; "accounts": [ { "name": "glamState"; "writable": true; }, { "name": "glamVault"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 118, 97, 117, 108, 116 ]; }, { "kind": "account"; "path": "glamState"; } ]; "program": { "kind": "account"; "path": "glamProtocolProgram"; }; }; }, { "name": "glamSigner"; "writable": true; "signer": true; }, { "name": "integrationAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 105, 110, 116, 101, 103, 114, 97, 116, 105, 111, 110, 45, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "cpiProgram"; "address": "MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA"; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "group"; }, { "name": "marginfiAccount"; "writable": true; }, { "name": "bank"; "writable": true; }, { "name": "destinationTokenAccount"; "writable": true; }, { "name": "bankLiquidityVaultAuthority"; }, { "name": "liquidityVault"; "writable": true; }, { "name": "tokenProgram"; } ]; "args": [ { "name": "amount"; "type": "u64"; } ]; }, { "name": "lendingAccountDeposit"; "docs": [ "Deposit liquidity from the GLAM vault into a Marginfi account.", "", "- Permission: `MarginfiPermissions::Deposit`.", "- Policy:", "- `group` must be present in `MarginfiPolicy::groups_allowlist`.", "- `bank` must be present in `MarginfiPolicy::banks_allowlist`." ]; "discriminator": [ 171, 94, 235, 103, 82, 64, 212, 140 ]; "accounts": [ { "name": "glamState"; "writable": true; }, { "name": "glamVault"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 118, 97, 117, 108, 116 ]; }, { "kind": "account"; "path": "glamState"; } ]; "program": { "kind": "account"; "path": "glamProtocolProgram"; }; }; }, { "name": "glamSigner"; "writable": true; "signer": true; }, { "name": "integrationAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 105, 110, 116, 101, 103, 114, 97, 116, 105, 111, 110, 45, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "cpiProgram"; "address": "MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA"; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "group"; }, { "name": "marginfiAccount"; "writable": true; }, { "name": "bank"; "writable": true; }, { "name": "signerTokenAccount"; "writable": true; }, { "name": "liquidityVault"; "writable": true; }, { "name": "tokenProgram"; } ]; "args": [ { "name": "amount"; "type": "u64"; }, { "name": "depositUpToLimit"; "type": { "option": "bool"; }; } ]; }, { "name": "lendingAccountRepay"; "docs": [ "Repay borrowed liquidity from the GLAM vault to a Marginfi account.", "", "- Permission: `MarginfiPermissions::Repay`.", "- Policy:", "- `group` must be present in `MarginfiPolicy::groups_allowlist`.", "- `bank` must be present in `MarginfiPolicy::banks_allowlist`." ]; "discriminator": [ 79, 209, 172, 177, 222, 51, 173, 151 ]; "accounts": [ { "name": "glamState"; "writable": true; }, { "name": "glamVault"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 118, 97, 117, 108, 116 ]; }, { "kind": "account"; "path": "glamState"; } ]; "program": { "kind": "account"; "path": "glamProtocolProgram"; }; }; }, { "name": "glamSigner"; "writable": true; "signer": true; }, { "name": "integrationAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 105, 110, 116, 101, 103, 114, 97, 116, 105, 111, 110, 45, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "cpiProgram"; "address": "MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA"; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "group"; }, { "name": "marginfiAccount"; "writable": true; }, { "name": "bank"; "writable": true; }, { "name": "signerTokenAccount"; "writable": true; }, { "name": "liquidityVault"; "writable": true; }, { "name": "tokenProgram"; } ]; "args": [ { "name": "amount"; "type": "u64"; }, { "name": "repayAll"; "type": { "option": "bool"; }; } ]; }, { "name": "lendingAccountWithdraw"; "docs": [ "Withdraw liquidity from a Marginfi account to the GLAM vault.", "", "- Permission: `MarginfiPermissions::Withdraw`.", "- Policy:", "- `group` must be present in `MarginfiPolicy::groups_allowlist`.", "- `bank` must be present in `MarginfiPolicy::banks_allowlist`." ]; "discriminator": [ 36, 72, 74, 19, 210, 210, 192, 192 ]; "accounts": [ { "name": "glamState"; "writable": true; }, { "name": "glamVault"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 118, 97, 117, 108, 116 ]; }, { "kind": "account"; "path": "glamState"; } ]; "program": { "kind": "account"; "path": "glamProtocolProgram"; }; }; }, { "name": "glamSigner"; "writable": true; "signer": true; }, { "name": "integrationAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 105, 110, 116, 101, 103, 114, 97, 116, 105, 111, 110, 45, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "cpiProgram"; "address": "MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA"; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "group"; }, { "name": "marginfiAccount"; "writable": true; }, { "name": "bank"; "writable": true; }, { "name": "destinationTokenAccount"; "writable": true; }, { "name": "bankLiquidityVaultAuthority"; }, { "name": "liquidityVault"; "writable": true; }, { "name": "tokenProgram"; } ]; "args": [ { "name": "amount"; "type": "u64"; }, { "name": "withdrawAll"; "type": { "option": "bool"; }; } ]; }, { "name": "marginfiAccountClose"; "docs": [ "Close an empty Marginfi account PDA owned by the GLAM vault.", "", "- Permission: `MarginfiPermissions::CloseAccount`." ]; "discriminator": [ 186, 221, 93, 34, 50, 97, 194, 241 ]; "accounts": [ { "name": "glamState"; "writable": true; }, { "name": "glamVault"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 118, 97, 117, 108, 116 ]; }, { "kind": "account"; "path": "glamState"; } ]; "program": { "kind": "account"; "path": "glamProtocolProgram"; }; }; }, { "name": "glamSigner"; "writable": true; "signer": true; }, { "name": "integrationAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 105, 110, 116, 101, 103, 114, 97, 116, 105, 111, 110, 45, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "cpiProgram"; "address": "MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA"; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "marginfiAccount"; "writable": true; } ]; "args": []; }, { "name": "marginfiAccountInitializePda"; "docs": [ "Initialize a Marginfi account PDA owned by the GLAM vault.", "", "- Permission: `MarginfiPermissions::InitAccount`." ]; "discriminator": [ 87, 177, 91, 80, 218, 119, 245, 31 ]; "accounts": [ { "name": "glamState"; "writable": true; }, { "name": "glamVault"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 118, 97, 117, 108, 116 ]; }, { "kind": "account"; "path": "glamState"; } ]; "program": { "kind": "account"; "path": "glamProtocolProgram"; }; }; }, { "name": "glamSigner"; "writable": true; "signer": true; }, { "name": "integrationAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 105, 110, 116, 101, 103, 114, 97, 116, 105, 111, 110, 45, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "cpiProgram"; "address": "MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA"; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "marginfiGroup"; }, { "name": "marginfiAccount"; "writable": true; }, { "name": "instructionsSysvar"; } ]; "args": [ { "name": "accountIndex"; "type": "u16"; }, { "name": "thirdPartyId"; "type": { "option": "u16"; }; } ]; }, { "name": "setMarginfiPolicy"; "docs": [ "Set the Marginfi policy (group, bank, and borrow-token allowlists).", "", "- Permission: GLAM state owner via `glam_protocol::set_protocol_policy`." ]; "discriminator": [ 161, 236, 171, 232, 25, 67, 129, 198 ]; "accounts": [ { "name": "glamState"; "writable": true; }, { "name": "glamSigner"; "writable": true; "signer": true; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; } ]; "args": [ { "name": "policy"; "type": { "defined": { "name": "marginfiPolicy"; }; }; } ]; } ]; "accounts": [ { "name": "stateAccount"; "discriminator": [ 142, 247, 54, 95, 85, 133, 249, 103 ]; } ]; "types": [ { "name": "accountType"; "type": { "kind": "enum"; "variants": [ { "name": "vault"; }, { "name": "tokenizedVault"; }, { "name": "mint"; }, { "name": "singleAssetVault"; } ]; }; }, { "name": "accruedFees"; "type": { "kind": "struct"; "fields": [ { "name": "vaultSubscriptionFee"; "type": "u128"; }, { "name": "vaultRedemptionFee"; "type": "u128"; }, { "name": "managerSubscriptionFee"; "type": "u128"; }, { "name": "managerRedemptionFee"; "type": "u128"; }, { "name": "managementFee"; "type": "u128"; }, { "name": "performanceFee"; "type": "u128"; }, { "name": "protocolBaseFee"; "type": "u128"; }, { "name": "protocolFlowFee"; "type": "u128"; } ]; }; }, { "name": "createdModel"; "type": { "kind": "struct"; "fields": [ { "name": "key"; "type": { "array": [ "u8", 8 ]; }; }, { "name": "createdBy"; "type": "pubkey"; }, { "name": "createdAt"; "type": "i64"; } ]; }; }, { "name": "delegateAcl"; "type": { "kind": "struct"; "fields": [ { "name": "pubkey"; "type": "pubkey"; }, { "name": "integrationPermissions"; "type": { "vec": { "defined": { "name": "integrationPermissions"; }; }; }; }, { "name": "expiresAt"; "type": "i64"; } ]; }; }, { "name": "engineField"; "type": { "kind": "struct"; "fields": [ { "name": "name"; "type": { "defined": { "name": "engineFieldName"; }; }; }, { "name": "value"; "type": { "defined": { "name": "engineFieldValue"; }; }; } ]; }; }, { "name": "engineFieldName"; "type": { "kind": "enum"; "variants": [ { "name": "owner"; }, { "name": "portfolioManagerName"; }, { "name": "name"; }, { "name": "uri"; }, { "name": "assets"; }, { "name": "delegateAcls"; }, { "name": "integrationAcls"; }, { "name": "timelockDuration"; }, { "name": "borrowable"; }, { "name": "defaultAccountStateFrozen"; }, { "name": "permanentDelegate"; }, { "name": "notifyAndSettle"; }, { "name": "feeStructure"; }, { "name": "feeParams"; }, { "name": "claimableFees"; }, { "name": "claimedFees"; }, { "name": "oracleConfigs"; } ]; }; }, { "name": "engineFieldValue"; "type": { "kind": "enum"; "variants": [ { "name": "boolean"; "fields": [ { "name": "val"; "type": "bool"; } ]; }, { "name": "u8"; "fields": [ { "name": "val"; "type": "u8"; } ]; }, { "name": "u32"; "fields": [ { "name": "val"; "type": "u32"; } ]; }, { "name": "u64"; "fields": [ { "name": "val"; "type": "u64"; } ]; }, { "name": "string"; "fields": [ { "name": "val"; "type": "string"; } ]; }, { "name": "pubkey"; "fields": [ { "name": "val"; "type": "pubkey"; } ]; }, { "name": "vecPubkey"; "fields": [ { "name": "val"; "type": { "vec": "pubkey"; }; } ]; }, { "name": "vecU8"; "fields": [ { "name": "val"; "type": "bytes"; } ]; }, { "name": "vecU32"; "fields": [ { "name": "val"; "type": { "vec": "u32"; }; } ]; }, { "name": "vecDelegateAcl"; "fields": [ { "name": "val"; "type": { "vec": { "defined": { "name": "delegateAcl"; }; }; }; } ]; }, { "name": "vecIntegrationAcl"; "fields": [ { "name": "val"; "type": { "vec": { "defined": { "name": "integrationAcl"; }; }; }; } ]; }, { "name": "feeStructure"; "fields": [ { "name": "val"; "type": { "defined": { "name": "feeStructure"; }; }; } ]; }, { "name": "feeParams"; "fields": [ { "name": "val"; "type": { "defined": { "name": "feeParams"; }; }; } ]; }, { "name": "accruedFees"; "fields": [ { "name": "val"; "type": { "defined": { "name": "accruedFees"; }; }; } ]; }, { "name": "notifyAndSettle"; "fields": [ { "name": "val"; "type": { "defined": { "name": "notifyAndSettle"; }; }; } ]; }, { "name": "oracleConfigs"; "fields": [ { "name": "val"; "type": { "defined": { "name": "oracleConfigs"; }; }; } ]; } ]; }; }, { "name": "entryExitFees"; "type": { "kind": "struct"; "fields": [ { "name": "subscriptionFeeBps"; "type": "u16"; }, { "name": "redemptionFeeBps"; "type": "u16"; } ]; }; }, { "name": "feeParams"; "type": { "kind": "struct"; "fields": [ { "name": "yearInSeconds"; "type": "u32"; }, { "name": "paHighWaterMark"; "type": "i128"; }, { "name": "paLastNav"; "type": "i128"; }, { "name": "lastAum"; "type": "i128"; }, { "name": "lastPerformanceFeeCrystallized"; "type": "i64"; }, { "name": "lastManagementFeeCrystallized"; "type": "i64"; }, { "name": "lastProtocolFeeCrystallized"; "type": "i64"; } ]; }; }, { "name": "feeStructure"; "type": { "kind": "struct"; "fields": [ { "name": "vault"; "type": { "defined": { "name": "entryExitFees"; }; }; }, { "name": "manager"; "type": { "defined": { "name": "entryExitFees"; }; }; }, { "name": "management"; "type": { "defined": { "name": "managementFee"; }; }; }, { "name": "performance"; "type": { "defined": { "name": "performanceFee"; }; }; }, { "name": "protocol"; "type": { "defined": { "name": "protocolFees"; }; }; } ]; }; }, { "name": "hurdleType"; "type": { "kind": "enum"; "variants": [ { "name": "hard"; }, { "name": "soft"; } ]; }; }, { "name": "integrationAcl"; "docs": [ "An integration program can have multiple protocols supported.", "Enabled protocols are stored in a bitmask, and each protocol can have its own policy." ]; "type": { "kind": "struct"; "fields": [ { "name": "integrationProgram"; "type": "pubkey"; }, { "name": "protocolsBitmask"; "type": "u16"; }, { "name": "protocolPolicies"; "type": { "vec": { "defined": { "name": "protocolPolicy"; }; }; }; } ]; }; }, { "name": "integrationPermissions"; "docs": [ "Stores delegate permissions for an integration program." ]; "type": { "kind": "struct"; "fields": [ { "name": "integrationProgram"; "type": "pubkey"; }, { "name": "protocolPermissions"; "type": { "vec": { "defined": { "name": "protocolPermissions"; }; }; }; } ]; }; }, { "name": "managementFee"; "type": { "kind": "struct"; "fields": [ { "name": "feeBps"; "type": "u16"; } ]; }; }, { "name": "marginfiPolicy"; "type": { "kind": "struct"; "fields": [ { "name": "groupsAllowlist"; "type": { "vec": "pubkey"; }; }, { "name": "banksAllowlist"; "type": { "vec": "pubkey"; }; }, { "name": "borrowAllowlist"; "type": { "vec": "pubkey"; }; } ]; }; }, { "name": "noticePeriodType"; "type": { "kind": "enum"; "variants": [ { "name": "hard"; }, { "name": "soft"; } ]; }; }, { "name": "notifyAndSettle"; "type": { "kind": "struct"; "fields": [ { "name": "model"; "type": { "defined": { "name": "valuationModel"; }; }; }, { "name": "permissionlessFulfillment"; "type": "bool"; }, { "name": "subscribeNoticePeriodType"; "type": { "defined": { "name": "noticePeriodType"; }; }; }, { "name": "subscribeNoticePeriod"; "type": "u64"; }, { "name": "subscribeSettlementPeriod"; "type": "u64"; }, { "name": "subscribeCancellationWindow"; "type": "u64"; }, { "name": "redeemNoticePeriodType"; "type": { "defined": { "name": "noticePeriodType"; }; }; }, { "name": "redeemNoticePeriod"; "type": "u64"; }, { "name": "redeemSettlementPeriod"; "type": "u64"; }, { "name": "redeemCancellationWindow"; "type": "u64"; }, { "name": "timeUnit"; "type": { "defined": { "name": "timeUnit"; }; }; }, { "name": "padding"; "type": { "array": [ "u8", 3 ]; }; } ]; }; }, { "name": "oracleConfigs"; "docs": [ "Vault-specific oracle configs. If available, these configs are preferred over the global config." ]; "type": { "kind": "struct"; "fields": [ { "name": "maxAgesSeconds"; "type": { "vec": { "array": [ "u16", 2 ]; }; }; }, { "name": "padding"; "type": { "array": [ "u8", 12 ]; }; } ]; }; }, { "name": "performanceFee"; "type": { "kind": "struct"; "fields": [ { "name": "feeBps"; "type": "u16"; }, { "name": "hurdleRateBps"; "type": "u16"; }, { "name": "hurdleType"; "type": { "defined": { "name": "hurdleType"; }; }; } ]; }; }, { "name": "pricedProtocol"; "type": { "kind": "struct"; "fields": [ { "name": "rent"; "type": "u64"; }, { "name": "amount"; "type": "i128"; }, { "name": "decimals"; "type": "u8"; }, { "name": "lastUpdatedSlot"; "type": "u64"; }, { "name": "integrationProgram"; "type": "pubkey"; }, { "name": "protocolBitflag"; "type": "u16"; }, { "name": "positions"; "type": { "vec": "pubkey"; }; } ]; }; }, { "name": "protocolFees"; "type": { "kind": "struct"; "fields": [ { "name": "baseFeeBps"; "type": "u16"; }, { "name": "flowFeeBps"; "type": "u16"; } ]; }; }, { "name": "protocolPermissions"; "docs": [ "Represents a delegate's permissions for a specific protocol" ]; "type": { "kind": "struct"; "fields": [ { "name": "protocolBitflag"; "type": "u16"; }, { "name": "permissionsBitmask"; "type": "u64"; } ]; }; }, { "name": "protocolPolicy"; "docs": [ "Stores policy data for an integrated protocol.", "Integration programs serialize/deserialize this data." ]; "type": { "kind": "struct"; "fields": [ { "name": "protocolBitflag"; "type": "u16"; }, { "name": "data"; "type": "bytes"; } ]; }; }, { "name": "stateAccount"; "type": { "kind": "struct"; "fields": [ { "name": "accountType"; "type": { "defined": { "name": "accountType"; }; }; }, { "name": "enabled"; "type": "bool"; }, { "name": "vault"; "type": "pubkey"; }, { "name": "owner"; "type": "pubkey"; }, { "name": "portfolioManagerName"; "type": { "array": [ "u8", 32 ]; }; }, { "name": "created"; "type": { "defined": { "name": "createdModel"; }; }; }, { "name": "baseAssetMint"; "type": "pubkey"; }, { "name": "baseAssetDecimals"; "type": "u8"; }, { "name": "baseAssetTokenProgram"; "type": "u8"; }, { "name": "name"; "type": { "array": [ "u8", 32 ]; }; }, { "name": "timelockDuration"; "type": "u32"; }, { "name": "timelockExpiresAt"; "type": "u64"; }, { "name": "mint"; "type": "pubkey"; }, { "name": "assets"; "type": { "vec": "pubkey"; }; }, { "name": "integrationAcls"; "type": { "vec": { "defined": { "name": "integrationAcl"; }; }; }; }, { "name": "delegateAcls"; "type": { "vec": { "defined": { "name": "delegateAcl"; }; }; }; }, { "name": "externalPositions"; "type": { "vec": "pubkey"; }; }, { "name": "pricedProtocols"; "type": { "vec": { "defined": { "name": "pricedProtocol"; }; }; }; }, { "name": "params"; "type": { "vec": { "vec": { "defined": { "name": "engineField"; }; }; }; }; } ]; }; }, { "name": "timeUnit"; "type": { "kind": "enum"; "variants": [ { "name": "second"; }, { "name": "slot"; } ]; }; }, { "name": "valuationModel"; "type": { "kind": "enum"; "variants": [ { "name": "continuous"; }, { "name": "periodic"; } ]; }; } ]; "constants": [ { "name": "protoMarginfi"; "type": "u16"; "value": "1"; }, { "name": "protoMarginfiPermBorrow"; "type": "u64"; "value": "8"; }, { "name": "protoMarginfiPermCloseAccount"; "type": "u64"; "value": "32"; }, { "name": "protoMarginfiPermDeposit"; "type": "u64"; "value": "2"; }, { "name": "protoMarginfiPermInitAccount"; "type": "u64"; "value": "1"; }, { "name": "protoMarginfiPermKaminoDeposit"; "type": "u64"; "value": "64"; }, { "name": "protoMarginfiPermKaminoWithdraw"; "type": "u64"; "value": "128"; }, { "name": "protoMarginfiPermRepay"; "type": "u64"; "value": "16"; }, { "name": "protoMarginfiPermWithdraw"; "type": "u64"; "value": "4"; } ]; };