update nonce mechanism

This commit is contained in:
jonesmarvin8
2026-02-12 19:22:03 -05:00
parent cb6fb881ac
commit 77f2fb6994
54 changed files with 276 additions and 280 deletions
@@ -3,6 +3,7 @@ use nssa::{
program::Program,
public_transaction::{Message, WitnessSet},
};
use nssa_core::account::Nonce;
use wallet::WalletCore;
// Before running this example, compile the `hello_world_with_authorization.rs` guest program with:
@@ -62,7 +63,7 @@ async fn main() {
.await
.expect("Node should be reachable to query account data");
let signing_keys = [signing_key];
let message = Message::try_new(program.id(), vec![account_id], nonces, greeting).unwrap();
let message = Message::try_new(program.id(), vec![account_id], nonces.iter().map(|x|Nonce(*x)).collect(), greeting).unwrap();
// Pass the signing key to sign the message. This will be used by the node
// to flag the pre_state as `is_authorized` when executing the program
let witness_set = WitnessSet::for_message(&message, &signing_keys);