fromBuffer method

Address fromBuffer(
  1. List<int> buf
)

Implementation

Address fromBuffer(List<int> buf) {
  if (buf.length != 1 + 20) {
    throw INVALID_ADDRESS_LENGTH;
  }
  if (buf[0] != this.pubKeyHash) {
    throw INVALID_ADDRESS_VERSION_BYTE_NUM_BYTE;
  }
  this.versionByteNum = buf[0];
  this.hashBuf = buf.slice(1);
  return this;
}