Create an account
Validators do not distinguish between single-signer and multisig accounts. Rather, all the multisig configuration is encoded in the multisig account's address. The only difference from the validator's perspective is when it is checking the signature. If it is passed a transaction with a SignatureOrMultiSig::Signature, it will do the normal signature check, but if it is passed a SignatureOrMultiSig::MultiSig, it will do the multisig check.
This tutorial describes how to create a Fast single-signer or multisig account.
Create a single-signer account
use fast_rust_examples::fastset_types::get_key_pair;
let (sender_pub_key, sender_priv_key) = get_key_pair();Create a multisig account
A multisig account is a special type of account. It is controlled by multiple key pairs, meaning it can accept and/or require signatures from different entities to submit claims.
When creating a multisig account, you first need to define the configuration. This contains the following information:
the list of public keys that are authorized signers for the multisig,
the quorum: this represents the minimum number of signatures from the list of authorized signers required to be submitted along with any transaction for it to pass the multisig check, and
a nonce, whose purpose will be explained below. See
MultiSigConfigfor more information.
After defining the configuration, you need to hash it on the client side to figure out the address of that multisig. This is the Keccak256 hash of the MultiSigConfig object as BCS serialized. Then, you can fund this address like any other account using a faucet endpoint or transferring funds from an existing account.
Then, you can fund this address like any other account, either using a faucet endpoint, or by transferring funds from an existing account.