containsAddress method

bool containsAddress(
  1. String address
)

Checks if an address is a signatory of this multisig account.

This method validates whether a given address is authorized to participate in multisig operations for this account.

Parameters:

  • address: The SS58-encoded address to check

Returns: true if the address is a signatory, false otherwise.

Throws:

Example:

if (!multisigAccount.containsAddress(alice.address)) {
  throw Exception('Alice is not authorized to sign this transaction');
}

Implementation

bool containsAddress(final String address) {
  final searchPubkey = Address.decode(address).pubkey;
  return publicKeys.any((final key) => _matchesPubkey(key, searchPubkey));
}