瀏覽代碼

[research/wif] wif proposal

ertosns 2 年之前
父節點
當前提交
4c2370d92f
共有 1 個文件被更改,包括 35 次插入0 次删除
  1. 35 0
      script/research/wif/README.md

+ 35 - 0
script/research/wif/README.md

@@ -0,0 +1,35 @@
+# Wallet import format
+
+base58 encoding of extended address, and optional checksum.
+
+# Checksum
+
+Last 4 bytes of double sha256 encoding of extended address
+
+# Extended address
+
+Extended address consist of prefix concatenated with raw data
+
+# Prefix
+
+One bytes prefix to raw data.
+
+|   Prefix         | Value  |
+|------------------|--------|
+| DaoBulla         | 1      |
+| DaoProposalBulla | 2      |
+| Coin             | 3      |
+| Nullifier        | 4      |
+| TokenID          | 5      |
+| ContractID       | 6      |
+| SecretKey        | 7      |
+| PublicKey        | 8      |
+
+# Raw data
+
+`pallas::Base` field element of 32 bytes length.
+
+
+# Implementation
+
+Add wif encoding, decoding in `fp_from_bs58`, and `fp_to_bs58`.