//! Falcon-512 hint account contract. //! //! This account stores the packed 29-felt NTT-domain public key used by the Falcon-512 //! verifier and expects the hint signature layout: packed `s1`, two salt felts, and the //! packed multiplication hint. The message point is derived with the BLAKE2s //! hash-to-point, so the off-chain signer must use the matching construction. #[starknet::contract(account)] pub mod Falcon512Account { use pqbench_falcon_512::Falcon512Verifier; use crate::utils::account::PqAccountComponent; component!(path: PqAccountComponent, storage: account, event: AccountEvent); #[abi(embed_v0)] impl AccountImpl = PqAccountComponent::AccountImpl; #[abi(embed_v0)] impl DeployableImpl = PqAccountComponent::DeployableImpl; #[abi(embed_v0)] impl PublicKeyImpl = PqAccountComponent::PublicKeyImpl; impl InternalImpl = PqAccountComponent::InternalImpl; #[storage] struct Storage { #[substorage(v0)] account: PqAccountComponent::Storage, } #[event] #[derive(Drop, starknet::Event)] enum Event { #[flat] AccountEvent: PqAccountComponent::Event, } /// Initializes the account with the packed Falcon public key used for validation. #[constructor] fn constructor(ref self: ContractState, public_key: Array) { self.account.initializer(public_key); } }