A principal is an identifier of a developer or canister on the Internet Computer blockchain. Most of the time, principals are used to identify the developer when they deploy and manage Internet Computer canister smart contracts.
Principals could be compared to public SSH keys. For example, you add your public SSH key to GitHub to be able to access a private repository. Similarly, you need to register your principal with the services that you plan to interact with in the future. Principals, like public SSH keys, are not confidential, so you can share them with anyone when needed.
Common properties of principals and public SSH keys:
- They are not secret
- They need to be registered with the services you need to access
- You need an additional secret key to authenticate
Most of the time you will interact with principals during the development of IC dapps to:
- Connect to cycles wallet to obtain ICP cycles that you can use for canister deployment
- Deploy canisters
- Control and interact with already deployed canisters
Principals are also used by the Internet Identity behind the scenes to identify you to various user-facing dapps.
Further Reading
Updated