pub unsafe fn wallet_set_state(
    wallet: WalletPtr,
    value: u64,
    nonces: SpendingCounters
) -> Result
Expand description

update the wallet account state

this is the value retrieved from any jormungandr endpoint that allows to query for the account state. It gives the value associated to the account as well as the counter.

It is important to be sure to have an updated wallet state before doing any transactions otherwise future transactions may fail to be accepted by any nodes of the blockchain because of invalid signature state.

Errors

  • this function may fail if the wallet pointer is null;

Safety

The wallet argument must be a pointer previously returned by this library. The data field in nonces must be not null and point to an array of len size.