otherSignatoriesForAddress method

List<Uint8List> otherSignatoriesForAddress(
  1. String signerAddress
)

Returns the list of other signatories excluding the current signer.

This method is essential for constructing multisig extrinsics, as Substrate requires the "other_signatories" field to contain all signatories except the current signer. The list maintains the same sorted order as the original public keys.

Parameters:

  • signerAddress: The SS58-encoded address of the current signer

Returns: A List<Uint8List> containing the public keys of all other signatories in sorted order.

Throws:

  • ArgumentError if the signer address is invalid or cannot be decoded
  • ArgumentError if the signer is not a signatory of this multisig account

Example:

// Alice is signing a transaction
final others = multisigAccount.otherSignatoriesForAddress(alice.address);
// Returns public keys of Bob and Charlie (sorted)

Implementation

List<Uint8List> otherSignatoriesForAddress(final String signerAddress) {
  late final Uint8List signerPubkey;
  try {
    signerPubkey = Address.decode(signerAddress).pubkey;
  } catch (e) {
    throw ArgumentError('Invalid signer address: $signerAddress');
  }

  return otherSignatoriesForPubkey(signerPubkey);
}