This documentation explains the address identification system used by NewChain, the blockchain behind Newton's ecosystem.
NewChain addresses are 39 characters long, and constructed from:
- Newton's unique identifier (NEW)
- Chain ID - you can choose from testnet or mainnet
- Actual address
- Checksum to reduce errors
An example NewChain address is:
NEW182X4BUrUViiVZUMibXgjFy77Z8M2g5okr2B
The following items are encoded:
3-character Newton identifier:
NEW182X4BUrUViiVZUMibXgjFy77Z8M2g5okr2B
Chain ID (maximum of 4 bytes):
NEW182X4BUrUViiVZUMibXgjFy77Z8M2g5okr2B
Actual address:
NEW182X4BUrUViiVZUMibXgjFy77Z8M2g5okr2B
Four bytes (32 bits) of SHA3-based checksum:
NEW182X4BUrUViiVZUMibXgjFy77Z8M2g5okr2B
(The last four bytes of the SHA3-based error checking code reduce the accidental address errors which occur in Ethereum.)
This is the step-by-step process for going from a private key to a NewChain address
We start with a 256-bit private key:
eec7d48ec12e2f8f6da7683eb202529d35cd814875d23b0eba127ab01f73239b
The public key is created by running the private key through secp256r1:
e19e548c22765859940e854f863a2932e637415b9efaf32cbd21452369cc8e764c57e0a89a0b0c64c6cebd70385c03d8f570b6baf8dcd75502404719aee84461
The uncompressed public key is hashed with the Keccak-256 algorithm:
c5592e6aab131b88a728868154db4d39cedeaf78af1d15aa540570ca168fe303
We take the last 40 characters for the hashed public key...:
54db4d39cedeaf78af1d15aa540570ca168fe303
...convert the chainID(1012) to hex string:
3f4
...and combine this with our hex address string:
3f454db4d39cedeaf78af1d15aa540570ca168fe303
...run with base58check encode
182Ln6vMMXGRwPbESbyGCxc3U3sPU1PrcKw8
We then combine this with our network ID (NEW) base58check's result to get the final NewChain address:
NEW182Ln6vMMXGRwPbESbyGCxc3U3sPU1PrcKw8
NewChain lives in a multi-chain world. For end users, it's perfectly common to transfer value from an address on network A to an address on network B.
The Bitcoin protocol uses Base58Check encoding to prevent users sending value off-network, while Ethereum uses a raw hex version of the address.
At present this system works with NewChain, but will also work with other blockchains in the future.