commit_keys
Publishes the root of a Winternitz key chain. Every later signature must chain back to it.
1pub fn commit_keys(ctx: Context<CommitKeys>, root: [u8; 32], n: u16) -> Result<()> {2 let chain = &mut ctx.accounts.chain;3 chain.root = root; // H(pk_0 ‖ … ‖ pk_n)4 chain.next = 0; // first unused key5 chain.len = n;6 Ok(())7}