/** * 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_spl.json`. */ export type ExtSpl = { "address": "G1NTsQ36mjPe89HtPYqxKsjY5HmYsDR6CbD2gd2U2pta"; "metadata": { "name": "extSpl"; "version": "1.0.1"; "spec": "0.1.0"; "description": "SPL integration for GLAM Protocol"; }; "instructions": [ { "name": "setTokenTransferPolicy"; "discriminator": [ 0, 144, 15, 4, 149, 22, 95, 50 ]; "accounts": [ { "name": "glamState"; "writable": true; }, { "name": "glamSigner"; "writable": true; "signer": true; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; } ]; "args": [ { "name": "policy"; "type": { "defined": { "name": "transferPolicy"; }; }; } ]; }, { "name": "tokenCloseAccount"; "discriminator": [ 240, 32, 179, 154, 96, 110, 43, 79 ]; "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"; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "tokenAccount"; "writable": true; } ]; "args": []; }, { "name": "tokenTransferChecked"; "discriminator": [ 169, 178, 117, 156, 169, 191, 199, 116 ]; "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"; }, { "name": "glamProtocolProgram"; "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "from"; "writable": true; }, { "name": "mint"; }, { "name": "to"; "writable": true; } ]; "args": [ { "name": "amount"; "type": "u64"; }, { "name": "decimals"; "type": "u8"; } ]; } ]; "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": "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": "transferPolicy"; "type": { "kind": "struct"; "fields": [ { "name": "allowlist"; "type": { "vec": "pubkey"; }; } ]; }; }, { "name": "valuationModel"; "type": { "kind": "enum"; "variants": [ { "name": "continuous"; }, { "name": "periodic"; } ]; }; } ]; "constants": [ { "name": "protoToken"; "type": "u16"; "value": "1"; }, { "name": "protoTokenPermTransfer"; "type": "u64"; "value": "1"; } ]; };