setAddress method

Transaction setAddress(
  1. dynamic addr
)

Set the transaction builder with address (required for originSign) @param {String | Uint8List} to Address (hexadecimal | Uint8List)

Implementation

Transaction setAddress(dynamic addr) {
  if (addr is! Uint8List && addr is! String) {
    throw "'addr' must be a string or Uint8List";
  }
  if (addr is String) {
    if (!isHex(addr)) {
      throw "'addr' must be an hexadecimal string";
    }
  } else {
    addr = uint8ListToHex(addr);
  }

  address = addr;
  return this;
}