sign method

void sign(
  1. List<SolanaPrivateKey> signers
)

Signs the transaction with provided signers.

Implementation

void sign(List<SolanaPrivateKey> signers) {
  final messageBytes = serializeMessage();
  for (final signer in signers) {
    final address = signer.publicKey().toAddress();
    final signature = signer.sign(messageBytes);
    addSignature(address, signature);
  }
}