@Test public void testScriptHashToAddressWithVersion() { NeoConfig.setAddressVersion((byte) 0x37); byte[] scriptHash = Numeric.hexStringToByteArray("bbf14c0d508108e56402116aede9942a064f7dc6"); String address = "PRivaTenetyWuqK7Gj7Vd747d77ssYeDhL"; assertThat(AddressUtils.scriptHashToAddress(scriptHash), is(address)); }
public static String scriptHashToAddress(byte[] scriptHash) { byte[] script = ArrayUtils.concatenate(NeoConfig.addressVersion(), scriptHash); byte[] checksum = ArrayUtils.getFirstNBytes(hash256(script), 4); return Base58.encode(ArrayUtils.concatenate(script, checksum)); }
AddressUtils { public static String scriptHashToAddress(byte[] scriptHash) { byte[] script = ArrayUtils.concatenate(NeoConfig.addressVersion(), scriptHash); byte[] checksum = ArrayUtils.getFirstNBytes(hash256(script), 4); return Base58.encode(ArrayUtils.concatenate(script, checksum)); } }
AddressUtils { public static String scriptHashToAddress(byte[] scriptHash) { byte[] script = ArrayUtils.concatenate(NeoConfig.addressVersion(), scriptHash); byte[] checksum = ArrayUtils.getFirstNBytes(hash256(script), 4); return Base58.encode(ArrayUtils.concatenate(script, checksum)); }  }
AddressUtils { public static String scriptHashToAddress(byte[] scriptHash) { byte[] script = ArrayUtils.concatenate(NeoConfig.addressVersion(), scriptHash); byte[] checksum = ArrayUtils.getFirstNBytes(hash256(script), 4); return Base58.encode(ArrayUtils.concatenate(script, checksum)); }  static boolean isValidAddress(String address); static byte[] addressToScriptHash(String address); static String scriptHashToAddress(byte[] scriptHash); }
AddressUtils { public static String scriptHashToAddress(byte[] scriptHash) { byte[] script = ArrayUtils.concatenate(NeoConfig.addressVersion(), scriptHash); byte[] checksum = ArrayUtils.getFirstNBytes(hash256(script), 4); return Base58.encode(ArrayUtils.concatenate(script, checksum)); }  static boolean isValidAddress(String address); static byte[] addressToScriptHash(String address); static String scriptHashToAddress(byte[] scriptHash);  }