/** * 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_exponent.json`. */ export type ExtExponent = { "address": "G1NTXWX1nTq35xgVeVzz3DwVhksfgmzcanbK2Lf4hgns"; "metadata": { "name": "extExponent"; "version": "0.1.0"; "spec": "0.1.0"; "description": "Exponent PT trading integration for GLAM Protocol"; }; "instructions": [ { "name": "setExponentPolicy"; "docs": [ "Set the Exponent Core policy for a GLAM vault." ]; "discriminator": [ 144, 218, 118, 248, 42, 205, 27, 217 ]; "accounts": [ { "name": "glamState"; "writable": true; }, { "name": "glamSigner"; "writable": true; "signer": true; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; } ]; "args": [ { "name": "policy"; "type": { "defined": { "name": "exponentPolicy"; }; }; } ]; }, { "name": "wrapperBuyPt"; "docs": [ "Buy Exponent PT from an allowlisted Exponent market using the", "wrapper-compatible path.", "", "This mints up to `max_base_amount` into SY first, then trades PT with the", "minted SY amount as the spend limit. Any unspent SY remains in the GLAM", "vault's SY token account.", "", "- Permission: `BuyPt`.", "- Policy: the market must be in `markets_allowlist`." ]; "discriminator": [ 6, 127, 6, 136, 226, 194, 250, 168 ]; "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": "ExponentnaRg3CQbW6dqQNZKXp7gtZ9DGMp1cwC4HAS7"; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "market"; "writable": true; }, { "name": "tokenSyTrader"; "writable": true; }, { "name": "tokenPtTrader"; "writable": true; }, { "name": "tokenSyEscrow"; "writable": true; }, { "name": "tokenPtEscrow"; "writable": true; }, { "name": "addressLookupTable"; }, { "name": "tokenProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "syProgram"; }, { "name": "tokenFeeTreasurySy"; "writable": true; }, { "name": "eventAuthority"; } ]; "args": [ { "name": "ptAmount"; "type": "u64"; }, { "name": "maxBaseAmount"; "type": "u64"; }, { "name": "mintSyRemAccountsUntil"; "type": "u8"; } ]; }, { "name": "wrapperMerge"; "docs": [ "Merge Exponent PT and YT into SY, then redeem the resulting SY into base", "asset using the wrapper-compatible path.", "", "- Permission: `Merge`.", "- Policy: the vault must be in `vaults_allowlist`." ]; "discriminator": [ 177, 36, 171, 125, 89, 198, 144, 219 ]; "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": "ExponentnaRg3CQbW6dqQNZKXp7gtZ9DGMp1cwC4HAS7"; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "tokenSyMerger"; "writable": true; }, { "name": "vault"; "writable": true; }, { "name": "escrowSy"; "writable": true; }, { "name": "tokenYtMerger"; "writable": true; }, { "name": "tokenPtMerger"; "writable": true; }, { "name": "mintYt"; "writable": true; }, { "name": "mintPt"; "writable": true; }, { "name": "authority"; "writable": true; }, { "name": "vaultAddressLookupTable"; }, { "name": "tokenProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "vaultRobotYieldPosition"; "writable": true; }, { "name": "syProgram"; }, { "name": "eventAuthority"; } ]; "args": [ { "name": "amountPy"; "type": "u64"; }, { "name": "redeemSyAccountsUntil"; "type": "u8"; } ]; }, { "name": "wrapperSellPt"; "docs": [ "Sell Exponent PT into an allowlisted Exponent market using the", "wrapper-compatible path.", "", "- Permission: `SellPt`.", "- Policy: the market must be in `markets_allowlist`." ]; "discriminator": [ 127, 65, 108, 12, 72, 21, 50, 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": "ExponentnaRg3CQbW6dqQNZKXp7gtZ9DGMp1cwC4HAS7"; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "market"; "writable": true; }, { "name": "tokenSyTrader"; "writable": true; }, { "name": "tokenPtTrader"; "writable": true; }, { "name": "tokenSyEscrow"; "writable": true; }, { "name": "tokenPtEscrow"; "writable": true; }, { "name": "addressLookupTable"; }, { "name": "tokenProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "syProgram"; }, { "name": "tokenFeeTreasurySy"; "writable": true; }, { "name": "eventAuthority"; } ]; "args": [ { "name": "amountPt"; "type": "u64"; }, { "name": "minBaseAmount"; "type": "u64"; }, { "name": "redeemSyRemAccountsUntil"; "type": "u8"; } ]; } ]; "accounts": [ { "name": "stateAccount"; "discriminator": [ 142, 247, 54, 95, 85, 133, 249, 103 ]; } ]; "errors": [ { "code": 6000; "name": "glamStateDisabled"; "msg": "GLAM state is disabled"; }, { "code": 6001; "name": "invalidMarketAccount"; "msg": "Invalid Exponent market account"; }, { "code": 6002; "name": "invalidExponentAccount"; "msg": "Invalid Exponent account"; }, { "code": 6003; "name": "invalidVaultTokenAccount"; "msg": "Invalid vault token account"; }, { "code": 6004; "name": "protocolPolicyViolation"; "msg": "Protocol policy violation"; }, { "code": 6005; "name": "invalidIxArgs"; "msg": "Invalid instruction arguments"; }, { "code": 6006; "name": "invalidPolicy"; "msg": "Invalid Exponent policy"; }, { "code": 6007; "name": "tooManyMarkets"; "msg": "Too many Exponent markets in policy allowlist"; }, { "code": 6008; "name": "marketOperationDisabled"; "msg": "Exponent market operation is disabled"; }, { "code": 6009; "name": "marketExpired"; "msg": "Exponent market is expired"; }, { "code": 6010; "name": "missingReturnData"; "msg": "Missing CPI return data"; }, { "code": 6011; "name": "invalidReturnData"; "msg": "Invalid CPI return data"; }, { "code": 6012; "name": "slippageExceeded"; "msg": "Slippage exceeded"; }, { "code": 6013; "name": "invalidVaultAccount"; "msg": "Invalid Exponent vault account"; }, { "code": 6014; "name": "vaultOperationDisabled"; "msg": "Exponent vault operation is disabled"; }, { "code": 6015; "name": "tooManyVaults"; "msg": "Too many Exponent vaults in policy allowlist"; } ]; "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": "exponentPolicy"; "type": { "kind": "struct"; "fields": [ { "name": "marketsAllowlist"; "type": { "vec": "pubkey"; }; }, { "name": "vaultsAllowlist"; "type": { "vec": "pubkey"; }; } ]; }; }, { "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": "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": "protoExponentCore"; "type": "u16"; "value": "1"; }, { "name": "protoExponentCorePermBuyPt"; "type": "u64"; "value": "1"; }, { "name": "protoExponentCorePermMerge"; "type": "u64"; "value": "4"; }, { "name": "protoExponentCorePermSellPt"; "type": "u64"; "value": "2"; } ]; };