Expand description
Account validation and shared program utilities.
Functions§
- assert_
admin - Asserts that the authority matches ADMIN_ADDRESS.
- assert_
key - Asserts that an account’s key matches the expected pubkey.
- new_
ed25519_ instruction_ with_ signature - Build ed25519 verify instruction for top-level tx (not CPI - Ed25519 doesn’t support CPI). Client must prepend this instruction before claim_daily_reward.
- scene_
bonus - Returns (flat_spirit_power, pct_bps) for claim_shards scene bonus. Scene 0: no bonus. Scenes 1,6,7,8: +50k SP. Scene 2: +100k SP. Scenes 3,4,5: +2%, +3%, +5% multiplier respectively.
- verify_
signed_ task_ via_ introspection - Verify Ed25519 signature via instruction introspection. The client must prepend the Ed25519 verify instruction before claim_daily_reward (Ed25519 cannot be called via CPI). Message: prefix + dojo_pda + task_id. Always 1 day per claim.