stampAddressSuffix static method
Writes the published address suffix from tx.c.
put32(adrs + 20, 0x42), put32(adrs + 24, 0x0e),
put32(adrs + 28, 0x01), little-endian. address is either the 32-byte
addr seed or a 2208-byte WOTS address.
Implementation
static void stampAddressSuffix(Uint8List address) {
final base = address.length == 2208 ? 2176 : 0;
if (address.length != 2208 && address.length != PARAMSN) {
throw ArgumentError(
'Expected a 32-byte addr or a 2208-byte WOTS address');
}
void put32(int offset, int value) {
address[base + offset] = value & 0xff;
address[base + offset + 1] = (value >> 8) & 0xff;
address[base + offset + 2] = (value >> 16) & 0xff;
address[base + offset + 3] = (value >> 24) & 0xff;
}
put32(20, 0x42);
put32(24, 0x0e);
put32(28, 0x01);
}