Quill Quill
Home
Connect Wallet
tinywateer
@0xFd
B319

IC 中 Principal、Account ID、Public Key 的生成方式

2023-01-12 06:32 Words count: 412
本文聊聊 Principal(身份)、Account ID 以及 Public Key 的生成方式。 第一点,Principal 由 Public Key 生成。 生成方式是: 第二点,Account ID 由 Principal 生成。 ...

本文聊聊 Principal(身份)、Account ID 以及 Public Key 的生成方式。

第一点,Principal 由 Public Key 生成。

生成方式是:

从 Public Key 生成 Principal

第二点,Account ID 由 Principal 生成。

生成方式是:

从 Principal 生成 Account ID

具体代码可以见 这里 的 accountIdentifier 函数。

第三点,对于 Public Key,有两种生成情况:

  1. 在 Internet Identity(II)中,Principal 由 Anchor(User Number)和 frontend(DApp URL)生成,具体见 Internet Identity(II)的设计和实现:第一篇
  2. 在 DApp 中,可以使用和以太坊体系一样的生成方式,即由「助记词」生成私钥和公钥,具体是:

生成 Public Key

Reward
0 0
0 times bought
•
0 times reward
0.0
Price(BTC)
0
Paid Times
$0.0
Revenue
0.0%
My Share(%)
Comments 0
Subscribe
tinywateer
@0xFd
B319
7 Posts 0 Subscribers 2 Subscribing
Joined at January 12, 2023
一个修身者 | No any Labels
Subscribe
Related Posts
构建反脆弱的框架 聊聊 IC 的 Certified Variable Internet Identity(II)的设计和实现:第三篇 Internet Identity(II)的设计和实现:第一篇 项目分析:一个去中心化的人才网络 Braintrust
© 2026 Quill
Rules Stats Help Github
IC 中 Principal、Account ID、Public Key 的生成方式
Reward