/** * 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/directed_stake_token.json`. */ export type DirectedStakeToken = { address: "VtokuDkNTQxXPJAp37ZXsoS4myJpxjHZ5RmCbDhUED4"; metadata: { name: "directedStakeToken"; version: "0.1.0"; spec: "0.1.0"; description: "Creates a token which directs stake."; }; instructions: [ { name: "acceptOperator"; docs: ["(Pending operator only) Accepts the operator transfer."]; discriminator: [216, 185, 116, 130, 254, 55, 57, 128]; accounts: [ { name: "dst"; writable: true; }, { name: "pendingOperator"; signer: true; relations: ["dst"]; } ]; args: []; }, { name: "burnDst"; docs: [ "(Public) Burns DST tokens and records the fees taken.", "", 'Only two "transfers" are made here:', "- A burning of DST tokens", "- A transfer of vSOL to the destination account, 1:1 with the provided `burn_amount` minus fees.", "", "The fees are tracked in the DST account and can be withdrawn in a separate instruction." ]; discriminator: [11, 149, 100, 52, 221, 149, 221, 194]; accounts: [ { name: "dst"; docs: ["The DST account"]; writable: true; }, { name: "tokenMint"; docs: ["Mint account of the DST."]; writable: true; relations: ["dst"]; }, { name: "sourceDstAccount"; docs: ["The DST token account to burn from"]; writable: true; }, { name: "sourceAuthority"; docs: ["The owner of the source_dst_account to burn from"]; writable: true; signer: true; }, { name: "destinationVsolAccount"; docs: ["The account to send vSOL to"]; writable: true; }, { name: "vsolReserves"; docs: ["The vSOL reserves token account owned by the DST."]; writable: true; relations: ["dst"]; }, { name: "tokenProgram"; docs: ["SPL token program"]; address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; } ]; args: [ { name: "burnAmount"; type: "u64"; } ]; }, { name: "createDst"; docs: [ "Creates a new DST. This can be called by anyone, but only DSTs created", "using The Vault as the operator will get any sort of official support.", "", "One should take care to create token metadata before creating a DST, since", "the authority cannot be transferred. To do this:", "", "1. Create the mint", "2. Upload token metadata", "3. (optional) - Set the Metaplex update authority to an address you control", "4. Calculate the DST address and transfer the mint authority privilege to it" ]; discriminator: [102, 102, 169, 216, 30, 217, 113, 213]; accounts: [ { name: "dst"; writable: true; pda: { seeds: [ { kind: "const"; value: [100, 115, 116]; }, { kind: "account"; path: "tokenMint"; } ]; }; }, { name: "tokenMint"; docs: ["The [Mint] account of the DST."]; }, { name: "operator"; docs: ["The operator to set."]; }, { name: "partner"; docs: ["The partner to set."]; }, { name: "vsolMint"; docs: ["vSOL mint."]; address: "vSoLxydx6akxyMD9XEcPvGYNGq6Nn66oqVb3UkGkei7"; }, { name: "vsolReserves"; writable: true; pda: { seeds: [ { kind: "account"; path: "dst"; }, { kind: "const"; value: [ 6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169 ]; }, { kind: "account"; path: "vsolMint"; } ]; program: { kind: "const"; value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ]; }; }; }, { name: "payer"; writable: true; signer: true; }, { name: "systemProgram"; address: "11111111111111111111111111111111"; }, { name: "tokenProgram"; address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { name: "associatedTokenProgram"; address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"; } ]; args: [ { name: "baseFee"; type: "u8"; }, { name: "operatorFee"; type: "u16"; } ]; }, { name: "initDirector"; docs: ["(Operator only) Initializes the Director for the DST."]; discriminator: [187, 176, 215, 229, 47, 249, 190, 199]; accounts: [ { name: "dst"; docs: ["The DST to initialize the director for."]; }, { name: "operator"; docs: ["The DST's operator."]; signer: true; relations: ["dst"]; }, { name: "director"; docs: [ "The director account for the Directed Stake program.", "This should be uninitialized and will be initialized by the Directed Stake program." ]; writable: true; }, { name: "directedStakeProgram"; docs: ["The Directed Stake program"]; address: "DStkUE3DjxBhVwEGNzv89eni1p7LpYuHSxxm1foggbEv"; }, { name: "payer"; writable: true; signer: true; }, { name: "systemProgram"; address: "11111111111111111111111111111111"; } ]; args: []; }, { name: "mintDst"; docs: ["(Public) Mints DST tokens to the destination account."]; discriminator: [219, 110, 216, 13, 99, 204, 214, 228]; accounts: [ { name: "dst"; writable: true; }, { name: "vsolReserves"; writable: true; relations: ["dst"]; }, { name: "sourceVsolAccount"; writable: true; }, { name: "owner"; docs: ["Owner of the source vSOL account."]; signer: true; }, { name: "dstTokenAccount"; docs: ["Account to mint the DST to."]; writable: true; }, { name: "tokenMint"; writable: true; relations: ["dst"]; }, { name: "tokenProgram"; address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; } ]; args: [ { name: "amount"; type: "u64"; } ]; }, { name: "setBaseFee"; docs: ["(Operator only) Sets the base fee."]; discriminator: [98, 73, 109, 224, 140, 181, 141, 33]; accounts: [ { name: "dst"; writable: true; }, { name: "operator"; signer: true; relations: ["dst"]; } ]; args: [ { name: "newBaseFee"; type: "u8"; } ]; }, { name: "setOperatorFee"; docs: ["(Operator only) Sets the operator fee."]; discriminator: [133, 117, 76, 185, 26, 173, 213, 64]; accounts: [ { name: "dst"; writable: true; }, { name: "operator"; signer: true; relations: ["dst"]; } ]; args: [ { name: "newOperatorFee"; type: "u16"; } ]; }, { name: "setPartner"; docs: ["(Operator only) Sets the partner."]; discriminator: [177, 250, 113, 16, 75, 175, 141, 136]; accounts: [ { name: "dst"; writable: true; }, { name: "partner"; docs: ["The new partner to set."]; }, { name: "operator"; signer: true; relations: ["dst"]; } ]; args: []; }, { name: "setStakeTarget"; docs: [ "(Operator only) Sets the stake target for the DST.", "Note that [init_director] should be called before this." ]; discriminator: [82, 172, 106, 255, 106, 24, 153, 243]; accounts: [ { name: "dst"; writable: true; }, { name: "director"; writable: true; }, { name: "stakeTarget"; docs: ["The stake target to set."]; }, { name: "operator"; docs: ["Operator of the DST."]; signer: true; relations: ["dst"]; }, { name: "directedStakeProgram"; docs: ["The Directed Stake program"]; address: "DStkUE3DjxBhVwEGNzv89eni1p7LpYuHSxxm1foggbEv"; }, { name: "clock"; docs: ["Clock sysvar."]; address: "SysvarC1ock11111111111111111111111111111111"; } ]; args: []; }, { name: "transferOperator"; docs: ["(Operator only) Begins an operator transfer."]; discriminator: [90, 96, 24, 156, 196, 80, 166, 121]; accounts: [ { name: "dst"; writable: true; }, { name: "pendingOperator"; }, { name: "operator"; signer: true; relations: ["dst"]; } ]; args: []; }, { name: "withdrawOperatorFees"; docs: [ "(Operator only) Withdraws operator fees to a specified address.", "If one wants to withdraw the DST instead, chain this with [mint_dst]." ]; discriminator: [82, 143, 99, 139, 122, 132, 80, 187]; accounts: [ { name: "dst"; writable: true; }, { name: "operator"; docs: ["The operator."]; signer: true; relations: ["dst"]; }, { name: "vsolReserves"; writable: true; relations: ["dst"]; }, { name: "operatorFeeDestination"; writable: true; }, { name: "tokenProgram"; address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; } ]; args: []; }, { name: "withdrawPartnerFees"; docs: [ "(Partner only) Withdraws partner fees to a specified address.", "If one wants to withdraw the DST instead, chain this with [mint_dst]." ]; discriminator: [182, 218, 66, 29, 223, 152, 61, 1]; accounts: [ { name: "dst"; writable: true; }, { name: "partner"; signer: true; relations: ["dst"]; }, { name: "vsolReserves"; writable: true; relations: ["dst"]; }, { name: "partnerFeeDestination"; writable: true; }, { name: "tokenProgram"; address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; } ]; args: []; } ]; accounts: [ { name: "dstInfo"; discriminator: [49, 95, 235, 134, 19, 90, 186, 243]; }, { name: "director"; discriminator: [220, 1, 17, 212, 58, 16, 231, 102]; } ]; errors: [ { code: 6000; name: "invariantFailed"; msg: "Invariant failed"; }, { code: 6001; name: "invalidMintMintAuthority"; msg: "Invalid mint (mint authority)"; }, { code: 6002; name: "invalidMintDecimals"; msg: "Invalid mint (decimals)"; }, { code: 6003; name: "invalidMintSupply"; msg: "Invalid mint (supply)"; }, { code: 6004; name: "invalidMintFreezeAuthority"; msg: "Invalid mint (freeze authority)"; }, { code: 6005; name: "invalidOperator"; msg: "Invalid operator"; }, { code: 6006; name: "invalidPartner"; msg: "Invalid partner"; }, { code: 6007; name: "feeTooHigh"; msg: "Fee exceeds the maximum allowed limit"; }, { code: 6008; name: "insufficientOperatorFee"; msg: "Operator fee is not that high"; }, { code: 6009; name: "burnInsufficientDstBalance"; msg: "Insufficient DST balance"; }, { code: 6010; name: "mintInsufficientVsolBalance"; msg: "Insufficient vSOL balance"; }, { code: 6011; name: "mathOverflow"; msg: "Overflow during a math operation"; } ]; types: [ { name: "dstInfo"; docs: [ "Holds information about the DST.", "This PDA is also the signer of a token account containing the vSOL tokens." ]; serialization: "bytemuck"; repr: { kind: "c"; }; type: { kind: "struct"; fields: [ { name: "tokenMint"; docs: ["Mint account of the DST."]; type: "pubkey"; }, { name: "operator"; type: "pubkey"; }, { name: "partner"; type: "pubkey"; }, { name: "vsolReserves"; docs: [ "Where the vSOL tokens are stored.", "This also holds all fees.", "Note that fees are withdrawn in vSOL-- to withdraw the DST,", "chain the withdraw instruction with a mint instruction." ]; type: "pubkey"; }, { name: "lifetimeOperatorFees"; type: "u64"; }, { name: "unclaimedOperatorFees"; type: "u64"; }, { name: "lifetimePartnerFees"; type: "u64"; }, { name: "unclaimedPartnerFees"; type: "u64"; }, { name: "bump"; docs: ["Bump seed"]; type: "u8"; }, { name: "baseFee"; docs: ["Base fee in BPS."]; type: "u8"; }, { name: "operatorFee"; docs: ["Operator fee in BPS."]; type: "u16"; }, { name: "padding"; docs: ["Padding to align the struct"]; type: "u32"; }, { name: "pendingOperator"; docs: ["An account which can become the new operator."]; type: "pubkey"; } ]; }; }, { name: "director"; serialization: "bytemuck"; repr: { kind: "c"; }; type: { kind: "struct"; fields: [ { name: "stakeTarget"; type: "pubkey"; }, { name: "lastUpdatedAt"; type: "u64"; } ]; }; } ]; }; //# sourceMappingURL=idlTypes.d.ts.map