Adds a new param to the CLI for the account new command, --storage-mode=onchain,offchain(default) that enables the creation of onchain accounts
Adds to the node rpc client a get_account_updates trait function. This function takes an account ID and fetches the GetAccountDetails endpoint on the node added on #294 from miden-node (and previous PRs)
Updates the sync behavior
When doing a sync we check the account updates in two ways (always doing so for tracked accounts).
First, validating that the updated offchain account hashes match the ones of our client
Second, checking the updated onchain accounts, if the hash does not match ours that means it's outdated and thus we'll use the get_account_updates function to fetch the most up to date account
This PR introduces a few things:
account new
command,--storage-mode=onchain,offchain(default)
that enables the creation of onchain accountsget_account_updates
trait function. This function takes an account ID and fetches theGetAccountDetails
endpoint on the node added on #294 from miden-node (and previous PRs)get_account_updates
function to fetch the most up to date account