replace npk for account id in commitment and init nullifier formulas

This commit is contained in:
Sergio Chouhy
2026-04-14 23:45:34 -03:00
parent 12b8c0ad31
commit a4af8da13b
43 changed files with 148 additions and 97 deletions
+3 -2
View File
@@ -201,14 +201,15 @@ pub fn initial_state() -> V03State {
.iter()
.map(|init_comm_data| {
let npk = &init_comm_data.npk;
let account_id = nssa::AccountId::from((npk, 0));
let mut acc = init_comm_data.account.clone();
acc.program_owner = nssa::program::Program::authenticated_transfer_program().id();
(
nssa_core::Commitment::new(npk, &acc),
nssa_core::Nullifier::for_account_initialization(npk),
nssa_core::Commitment::new(&account_id, &acc),
nssa_core::Nullifier::for_account_initialization(&account_id),
)
})
.collect();