Răsfoiți Sursa

[research/wif] wif proposal

ertosns 2 ani în urmă
părinte
comite
4c2370d92f
1 a modificat fișierele cu 35 adăugiri și 0 ștergeri
  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`.