ICPCoins Academy Logo

ICPCoins Academy

Web Technology Image

Intro to ICP Blockchain Addresses

Beginner

Web3CryptoDLTBlockchain

Intro to ICP Blockchain Addresses

Blockchain Addresses and Internet Computer

In the world of blockchain, similar to addresses in the real world or a website, we come across blockchain addresses in web3. Oftentimes when users talk about addresses they mean wallet addresses.

These are strings of text generated with cryptographic protocols and used to identify a particular user account or a smart contract.

These addresses are used to identify and access details of a particular wallet on the blockchain, which is mainly used to send or receive digital assets such as Tokens and NFTs

Bitcoin Wallet Address Example: 12tkqA9xSoowkzoERHMWNKsTey55YEBqkv

Internet Computer Address:

  • Principal: nfxu4-cn7qt-x7r3c-5dhnk-dcrct-gmgoz-67gcg-5glvc-2krhv-gcmsr-qqe

    • Legacy address: c19748cd2fd01ab1f87d0831bcd622b0ed5391267773b72322165798ca7a116a

Ethereum Wallet Address Example: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Similar to the real world, the blockchain addresses are unique to each user who generates them and controls them with their private keys or derived seed phrases.

Almost all blockchains have similar address structure with numbers and strings of letter which is difficult for humans to remember but can be easily understood and decoded by the computer networks

Things get interesting when it comes to ICP

The main type of address or account is known as Principal which represents entities that can interact with Internet computer blockchain such as users, nodes, canister smart contracts, etc.

Generally there are two types of addresses on ICP.

  1. Principal - which is the main unique ID generated by users or canisters on ICP
  2. Legacy Address / Account Addresses - derived from Principal Id, is used for transactions on a ledger.

“A “principal” is someone who can interact with a computer system and can be identified for this purpose”

Principal can be thought of as an unique ID assigned to a principal (an entity) which can be used to authenticate, verify or sign access to resources or other users.

It is a series of 53 characters separated by hyphen

Example: nfxu4-cn7qt-x7r3c-5dhnk-dcrct-gmgoz-67gcg-5glvc-2krhv-gcmsr-qqe

For example a user can generate Principal ID, from which they can derive account address to hold or transact ICP tokens on the ledger.

Here a Principal unique to the user, which is not confidential, generates an Account address with cryptographic protocols, which can be used to hold or transact ICP tokens or other digital assets.

Example Legacy address: c19748cd2fd01ab1f87d0831bcd622b0ed5391267773b72322165798ca7a116a

If the application supports, the principal can be used to transact assets as well, which has a default account address derived from subaccount number 0.

One Principal can have multiple account addresses derived from different subaccount numbers.

Account addresses can have only one Principal ID and on ICP, principal ID can be obscured. You may not always be able to trace Principal ID with just an Account number.

This design adds more compartmentalization and privacy to managing assets or for interacting with Internet Computer Blockchain

Principal ID can be thought of as a public key, which along with its private key, makes up Identity

You could install multiple identities on your machine, and each identity can have a name.

If you lose your identity or the private keys, you may not be able to authenticate yourself as a user(principal) to the Internet Computer, therefore keep your private keys and backup phrases safe.

Legacy Address

Legacy address on ICP is an ID/address used for identifying transactions on ICP ledger or NFT ledgers. It is generated by hashing the principal ID and the sub-account number.

It is a series of 64 characters similar to wallet addresses on other blockchains.

A principal can be used to derive multiple account IDs using sub account numbers.

However an account id can have only one principal ID. Users can

Legacy address:

63d7d03f9c019b675addb0df1da2ce2234be520d8ffda2a20f1b48da02374fab

New ICRC1 Address:

rxwy2-zaaaa-aaaag-qcfna-cai-dgtszxq.1deff45e34226dcb7d660c2c52cd7e3ba779f9077c02492b49fc1fbc31020000

ICP accounts currently use legacy addresses, but in different apps also work with the new address format. ICRC1 addresses can be converted to a legacy address, but the opposite is not true. Other tokens on the IC use the ICRC1 addresses like NTN, CHAT, HOT

It's important to understand that the design of Principal Ids and Account Id on ICP have positive implications on privacy. By this unique design, ICP promotes anonymity.

Each application supports different protocols and addresses.

Be careful before you send or receive any tokens and make sure the application recognizes and supports the assets.

On Ethereum blockchain, a user’s identity and account address remain the same across all the applications they interact with, which could compromise their privacy.

Internet Identity

To combat the issue of memorizing or creating separate ids for every application on ICP, DFINITY designed and released Internet Identity.

Internet Identity is how an user can create Principal Id and authenticate with multiple other dapps with a single private key.

Internet Identity can be created with a private key, which can then authenticate with every supported application on ICP.

You can use Internet Identity to authenticate and create an account on the NNS DAO app, which is the first and the decentralized DAO dapp used for storing ICPs, Staking ICPs and governing the ICP network with DAO governance proposals.

Here Internet Identity allows you to create an account / principal Id on the NNS application, thereby allowing you to derive an account id address and interact with your $ICP tokens from the NNS dapp.

You can use the same internet identity to create an account / principal ID on another application called OpenChat which is a fully on chain chat messenger. Open Chat also has a wallet which can store tokens such as $ICP, $CHAT, $NTN etc.

The Principal ID created on this application is different from NNS dapp but is controlled by the same Internet Identity, which can be used to authenticate transfers, login to dapps, or to store and move assets.

In conclusion, Internet Identity can be imagined as a wallet which you can use to login to ICP apps, and manage assets.

Some apps allow you to directly create accounts i.e. Principal ID without using an Internet Identity.

They can use only seed phrases (private keys) to manage access to your accounts. This further adds security by allowing users to create new accounts natively in the application, increasing flexibiility too.

Summary

  1. Addresses on ICP start with unique IDs called Principal ID (by Principals - an entity)Example:nfxu4-cn7qt-x7r3c-5dhnk-dcrct-gmgoz-67gcg-5glvc-2krhv-gcmsr-qqe
  2. Principals can be either users or nodes or canister smart contracts
  3. Principals are generic ID which can be used to Identify and authenticate with assets or services on the Internet Computer
  4. Principal ID is anonymous and unique. They are similar to public keys on other blockchains, which along with their private keys make up a wallet/identity
  5. Principal ID along with private keys make up an Identity.
  6. Principal ID is used to derive Account ID / Account address which look like wallet address without hyphens and are 64 characters long.Example: 63d7d03f9c019b675addb0df1da2ce2234be520d8ffda2a20f1b48da02374fab
  7. These account addresses are used as identifiers for transactions on ICP ledger or other NFT ledgers.
  8. Account Addresses can be used to send or receive ICP tokens. Principal IDs main function is for unique identification and authentication on Internet Computer
  9. One Principal ID can generate any number of account addresses using sub account number and cryptography
  10. Identity on the Internet Computer blockchain is used to authenticate with ICP and the resources on it.
  11. Internet Identity is a service designed by DFINITY’s to authenticate and create application specific Identities / Principal IDs
  12. When you use Internet Identity to sign in to different applications, each application creates a unique principal ID linked to your Internet Identity. This principal ID is unique to the particular application and may not support tokens from other applications or NFTs. This improves privacy and security.
  13. Generally most of the wallets support NFT or ICRC token registries and have no trouble in letting users access them or transact them
ICPCoins Academy Logo

ICPCoins Academy

© 2024 Neutrinite DAO. All rights reserved