Address property
Implementation
static final Address = Bcs.bytes(SUI_ADDRESS_LENGTH).transform(
validate: (dynamic val) {
final address = val is String ? val : toHEX(val);
if (address.isEmpty || !isValidSuiAddress(normalizeSuiAddress(address))) {
throw Exception('Invalid Sui address $address');
}
},
input: (dynamic val) =>
val is String ? fromHEX(normalizeSuiAddress(val)) : val,
output: (Uint8List val) => normalizeSuiAddress(toHEX(val)),
);