Staking: {
accounts: [{
name: "RegisteredStake";
type: {
fields: [{
name: "authority";
type: "publicKey";
}, {
name: "stakeMint";
type: "publicKey";
}, {
name: "rewardMint";
type: "publicKey";
}, {
name: "currentPeriod";
type: "u16";
}, {
name: "rewardMultiplier";
type: "u64";
}, {
name: "cooldownPeriod";
type: "u64";
}, {
name: "bump";
type: "u8";
}];
kind: "struct";
};
}, {
name: "StakingAccount";
type: {
fields: [{
name: "owner";
type: "publicKey";
}, {
name: "registeredStake";
type: "publicKey";
}, {
name: "stakeMint";
type: "publicKey";
}, {
name: "totalStake";
type: "u64";
}, {
name: "activeStake";
type: "u64";
}, {
name: "pendingRewards";
type: "u64";
}, {
name: "paidRewards";
type: "u64";
}, {
name: "currentPeriod";
type: "u16";
}, {
name: "stakedAtTs";
type: "i64";
}, {
name: "lastPendingRewardCalcTs";
type: "i64";
}, {
name: "lastHarvestTs";
type: "i64";
}, {
name: "unstakedTs";
type: "i64";
}, {
name: "bump";
type: "u8";
}];
kind: "struct";
};
}, {
name: "StakingVars";
type: {
fields: [{
name: "authority";
type: "publicKey";
}, {
name: "bump";
type: "u8";
}];
kind: "struct";
};
}];
errors: [{
code: 6000;
msg: "Invalid Token Mint";
name: "InvalidMint";
}, {
code: 6001;
msg: "Account now owned by user";
name: "InvalidOwner";
}, {
code: 6002;
msg: "Insufficient token balance";
name: "InsufficientFunds";
}, {
code: 6003;
msg: "Invalid authority for this account";
name: "InvalidAuthority";
}, {
code: 6004;
msg: "Invalid deposit quantity";
name: "InvalidDepositQty";
}, {
code: 6005;
msg: "Numerical overflow error";
name: "NumericalOverflowError";
}, {
code: 6006;
msg: "Cannot stake while account is on cooldown";
name: "StakeOnCooldown";
}, {
code: 6007;
msg: "Invalid escrow authority";
name: "InvalidEscrowAuth";
}, {
code: 6008;
msg: "Cannot withdraw before cooldown period has elapsed";
name: "WithdrawOnCooldown";
}, {
code: 6009;
msg: "Staking account must be in the same period as the Registered Stake";
name: "InvalidPeriod";
}, {
code: 6010;
msg: "Staking account is not on cooldown";
name: "NotOnCooldown";
}];
instructions: [{
accounts: [{
isMut: true;
isSigner: true;
name: "user";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
kind: "account";
path: "user";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}];
args: [];
name: "cancelUnstake";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "user";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
kind: "account";
path: "user";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}, {
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [];
name: "createStakingAccount";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "user";
}, {
isMut: false;
isSigner: false;
name: "rewardMint";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
account: "StakingAccount";
kind: "account";
path: "staking_account.owner";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "userRewardAccount";
}, {
isMut: true;
isSigner: false;
name: "rewardAta";
}, {
isMut: false;
isSigner: false;
name: "tokenProgram";
}, {
isMut: false;
isSigner: false;
name: "rent";
}, {
isMut: false;
isSigner: false;
name: "associatedTokenProgram";
}, {
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [];
name: "harvest";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "updateAuthorityAccount";
}, {
isMut: true;
isSigner: false;
name: "stakingVarsAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-vars";
}];
};
}, {
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [];
name: "initializeStaking";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "authority";
}, {
isMut: false;
isSigner: false;
name: "stakingVarsAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-vars";
}];
};
}, {
isMut: false;
isSigner: false;
name: "stakeMint";
}, {
isMut: false;
isSigner: false;
name: "rewardMint";
}, {
isMut: true;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
kind: "account";
path: "authority";
type: "publicKey";
}, {
account: "Mint";
kind: "account";
path: "stake_mint";
type: "publicKey";
}, {
account: "Mint";
kind: "account";
path: "reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "rewardAta";
}, {
isMut: false;
isSigner: false;
name: "rent";
}, {
isMut: false;
isSigner: false;
name: "systemProgram";
}, {
isMut: false;
isSigner: false;
name: "associatedTokenProgram";
}, {
isMut: false;
isSigner: false;
name: "tokenProgram";
}];
args: [{
name: "rewardMultiplier";
type: "u64";
}, {
name: "cooldownPeriod";
type: "u64";
}];
name: "registerStake";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "authority";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
kind: "account";
path: "authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
account: "StakingAccount";
kind: "account";
path: "staking_account.owner";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}];
args: [{
name: "updatedStakingPeriod";
type: "u16";
}];
name: "settle";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "user";
}, {
isMut: false;
isSigner: false;
name: "stakeMint";
}, {
isMut: true;
isSigner: false;
name: "tokenSource";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
kind: "account";
path: "user";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "tokenEscrow";
}, {
isMut: false;
isSigner: false;
name: "rent";
}, {
isMut: false;
isSigner: false;
name: "tokenProgram";
}, {
isMut: false;
isSigner: false;
name: "associatedTokenProgram";
}, {
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "stakeAmount";
type: "u64";
}];
name: "stakeTokens";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "user";
}, {
isMut: false;
isSigner: false;
name: "rewardMint";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
account: "StakingAccount";
kind: "account";
path: "staking_account.owner";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "userRewardAccount";
}, {
isMut: true;
isSigner: false;
name: "rewardAta";
}, {
isMut: false;
isSigner: false;
name: "tokenProgram";
}, {
isMut: false;
isSigner: false;
name: "rent";
}, {
isMut: false;
isSigner: false;
name: "associatedTokenProgram";
}, {
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [];
name: "unstakeTokens";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "authority";
}, {
isMut: true;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
kind: "account";
path: "authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}];
args: [{
name: "cooldownPeriod";
type: "u64";
}];
name: "updateCooldownPeriod";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "authority";
}, {
isMut: true;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
kind: "account";
path: "authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}];
args: [{
name: "rewardMultiplier";
type: "u64";
}, {
name: "newStakingPeriod";
type: "u16";
}];
name: "updateRewardMultiplier";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "user";
}, {
isMut: false;
isSigner: false;
name: "stakeMint";
}, {
isMut: true;
isSigner: false;
name: "tokenSource";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
account: "StakingAccount";
kind: "account";
path: "staking_account.owner";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "tokenEscrow";
}, {
isMut: false;
isSigner: false;
name: "tokenProgram";
}];
args: [];
name: "withdrawTokens";
}];
metadata: Record<string, unknown>;
name: "atlas_staking";
version: "0.1.0";
}
Type declaration
accounts: [{
name: "RegisteredStake";
type: {
fields: [{
name: "authority";
type: "publicKey";
}, {
name: "stakeMint";
type: "publicKey";
}, {
name: "rewardMint";
type: "publicKey";
}, {
name: "currentPeriod";
type: "u16";
}, {
name: "rewardMultiplier";
type: "u64";
}, {
name: "cooldownPeriod";
type: "u64";
}, {
name: "bump";
type: "u8";
}];
kind: "struct";
};
}, {
name: "StakingAccount";
type: {
fields: [{
name: "owner";
type: "publicKey";
}, {
name: "registeredStake";
type: "publicKey";
}, {
name: "stakeMint";
type: "publicKey";
}, {
name: "totalStake";
type: "u64";
}, {
name: "activeStake";
type: "u64";
}, {
name: "pendingRewards";
type: "u64";
}, {
name: "paidRewards";
type: "u64";
}, {
name: "currentPeriod";
type: "u16";
}, {
name: "stakedAtTs";
type: "i64";
}, {
name: "lastPendingRewardCalcTs";
type: "i64";
}, {
name: "lastHarvestTs";
type: "i64";
}, {
name: "unstakedTs";
type: "i64";
}, {
name: "bump";
type: "u8";
}];
kind: "struct";
};
}, {
name: "StakingVars";
type: {
fields: [{
name: "authority";
type: "publicKey";
}, {
name: "bump";
type: "u8";
}];
kind: "struct";
};
}]
errors: [{
code: 6000;
msg: "Invalid Token Mint";
name: "InvalidMint";
}, {
code: 6001;
msg: "Account now owned by user";
name: "InvalidOwner";
}, {
code: 6002;
msg: "Insufficient token balance";
name: "InsufficientFunds";
}, {
code: 6003;
msg: "Invalid authority for this account";
name: "InvalidAuthority";
}, {
code: 6004;
msg: "Invalid deposit quantity";
name: "InvalidDepositQty";
}, {
code: 6005;
msg: "Numerical overflow error";
name: "NumericalOverflowError";
}, {
code: 6006;
msg: "Cannot stake while account is on cooldown";
name: "StakeOnCooldown";
}, {
code: 6007;
msg: "Invalid escrow authority";
name: "InvalidEscrowAuth";
}, {
code: 6008;
msg: "Cannot withdraw before cooldown period has elapsed";
name: "WithdrawOnCooldown";
}, {
code: 6009;
msg: "Staking account must be in the same period as the Registered Stake";
name: "InvalidPeriod";
}, {
code: 6010;
msg: "Staking account is not on cooldown";
name: "NotOnCooldown";
}]
instructions: [{
accounts: [{
isMut: true;
isSigner: true;
name: "user";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
kind: "account";
path: "user";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}];
args: [];
name: "cancelUnstake";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "user";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
kind: "account";
path: "user";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}, {
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [];
name: "createStakingAccount";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "user";
}, {
isMut: false;
isSigner: false;
name: "rewardMint";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
account: "StakingAccount";
kind: "account";
path: "staking_account.owner";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "userRewardAccount";
}, {
isMut: true;
isSigner: false;
name: "rewardAta";
}, {
isMut: false;
isSigner: false;
name: "tokenProgram";
}, {
isMut: false;
isSigner: false;
name: "rent";
}, {
isMut: false;
isSigner: false;
name: "associatedTokenProgram";
}, {
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [];
name: "harvest";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "updateAuthorityAccount";
}, {
isMut: true;
isSigner: false;
name: "stakingVarsAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-vars";
}];
};
}, {
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [];
name: "initializeStaking";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "authority";
}, {
isMut: false;
isSigner: false;
name: "stakingVarsAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-vars";
}];
};
}, {
isMut: false;
isSigner: false;
name: "stakeMint";
}, {
isMut: false;
isSigner: false;
name: "rewardMint";
}, {
isMut: true;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
kind: "account";
path: "authority";
type: "publicKey";
}, {
account: "Mint";
kind: "account";
path: "stake_mint";
type: "publicKey";
}, {
account: "Mint";
kind: "account";
path: "reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "rewardAta";
}, {
isMut: false;
isSigner: false;
name: "rent";
}, {
isMut: false;
isSigner: false;
name: "systemProgram";
}, {
isMut: false;
isSigner: false;
name: "associatedTokenProgram";
}, {
isMut: false;
isSigner: false;
name: "tokenProgram";
}];
args: [{
name: "rewardMultiplier";
type: "u64";
}, {
name: "cooldownPeriod";
type: "u64";
}];
name: "registerStake";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "authority";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
kind: "account";
path: "authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
account: "StakingAccount";
kind: "account";
path: "staking_account.owner";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}];
args: [{
name: "updatedStakingPeriod";
type: "u16";
}];
name: "settle";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "user";
}, {
isMut: false;
isSigner: false;
name: "stakeMint";
}, {
isMut: true;
isSigner: false;
name: "tokenSource";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
kind: "account";
path: "user";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "tokenEscrow";
}, {
isMut: false;
isSigner: false;
name: "rent";
}, {
isMut: false;
isSigner: false;
name: "tokenProgram";
}, {
isMut: false;
isSigner: false;
name: "associatedTokenProgram";
}, {
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [{
name: "stakeAmount";
type: "u64";
}];
name: "stakeTokens";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "user";
}, {
isMut: false;
isSigner: false;
name: "rewardMint";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
account: "StakingAccount";
kind: "account";
path: "staking_account.owner";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "userRewardAccount";
}, {
isMut: true;
isSigner: false;
name: "rewardAta";
}, {
isMut: false;
isSigner: false;
name: "tokenProgram";
}, {
isMut: false;
isSigner: false;
name: "rent";
}, {
isMut: false;
isSigner: false;
name: "associatedTokenProgram";
}, {
isMut: false;
isSigner: false;
name: "systemProgram";
}];
args: [];
name: "unstakeTokens";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "authority";
}, {
isMut: true;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
kind: "account";
path: "authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}];
args: [{
name: "cooldownPeriod";
type: "u64";
}];
name: "updateCooldownPeriod";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "authority";
}, {
isMut: true;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
kind: "account";
path: "authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}];
args: [{
name: "rewardMultiplier";
type: "u64";
}, {
name: "newStakingPeriod";
type: "u16";
}];
name: "updateRewardMultiplier";
}, {
accounts: [{
isMut: true;
isSigner: true;
name: "user";
}, {
isMut: false;
isSigner: false;
name: "stakeMint";
}, {
isMut: true;
isSigner: false;
name: "tokenSource";
}, {
isMut: false;
isSigner: false;
name: "registeredStake";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "registered-stake";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.authority";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.stake_mint";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake.reward_mint";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "stakingAccount";
pda: {
seeds: [{
kind: "const";
type: "string";
value: "staking-account";
}, {
account: "StakingAccount";
kind: "account";
path: "staking_account.owner";
type: "publicKey";
}, {
account: "RegisteredStake";
kind: "account";
path: "registered_stake";
type: "publicKey";
}];
};
}, {
isMut: true;
isSigner: false;
name: "tokenEscrow";
}, {
isMut: false;
isSigner: false;
name: "tokenProgram";
}];
args: [];
name: "withdrawTokens";
}]
metadata: Record<string, unknown>
name: "atlas_staking"
version: "0.1.0"