Proof of stake transactions

Proof of stake using the SDK

All proof of stake functionality will be find within the namada_sdk::proof_of_stake module.

The namada_impl object is assumed to have been constructed as described in the setting up a client section.

// We assume we have a namada_impl object that is already initialized
let bond_tx_builder = namada_impl
            .new_bond(validator_address.clone(), amount)
let (mut bond_tx, signing_data) = bond_tx_builder
    .expect("unable to build bond");
        &mut bond_tx,
    .expect("unable to sign reveal bond");
let tx = namada_iml.submit(bond_tx, &bond_tx_builder.tx).await;

That will submit the bond transaction to the network.

Similar proof of stake transactions such as new_unbond, new_redelegation, new_claim_rewards and new_withdraw are also available in the SDK.