Then, the result is converted to string using Base58Check encoding, as used in Bitcoin.
...
...
@@ -82,13 +82,13 @@ The API key is either 49 or 50 characters long.
We take the account key, *as a string*, and we use HMAC function to derive filename and password for metadata file. Every account has its own metadata file.
* First, we use the HMAC function :code:`HMAC-SHA512(API key, constant)`, where
* First, we use the HMAC function `HMAC-SHA512(API key, constant)`, where
* API key is a string (in base58c) from the previous section.
The API key is taken as a string, so third-party applications can use their own API keys.
* constant is :code:`0123456789abcdeffedcba9876543210` (byte sequence, here in hexadecimal).
* constant is `0123456789abcdeffedcba9876543210` (byte sequence, here in hexadecimal).
* The result is 64 bytes/512 bits.
...
...
@@ -117,38 +117,38 @@ The (decrypted) metadata are in following format:
The file is a serialized JSON object with the following keys:
*:code:`version`: version of metadata format, for future backwards compatibility. The version is currently :code:`1.0.0`.
*:code:`accountLabel`: label for the account, a string
*:code:`outputLabels`: labels for outputs, described further
*:code:`addressLabels`: labels for addresses, described further
*`version`: version of metadata format, for future backwards compatibility. The version is currently `1.0.0`.
*`accountLabel`: label for the account, a string
*`outputLabels`: labels for outputs, described further
*`addressLabels`: labels for addresses, described further
:code:`outputLabels` has transaction hashes for keys, and for values it has object with output indexes for keys and output labels, as strings, for values. Output indexes start at 0.
`outputLabels` has transaction hashes for keys, and for values it has object with output indexes for keys and output labels, as strings, for values. Output indexes start at 0.
:code:`addressLabels` has addresses (in traditional Base58Check encoding) for keys and their labels for values. Only receiving addresses are saved in this object.
`addressLabels` has addresses (in traditional Base58Check encoding) for keys and their labels for values. Only receiving addresses are saved in this object.
All labels can have any unicode letters. Empty string is treated in the software as having no label.
An example object looks like this:
.. code:: json
{
"version": "1.0.0",
"accountLabel": "Saving account", // one file per account, so only 1 label needed
"addressLabels": {
"1JAd7XCBzGudGpJQSDSfpmJhiygtLQWaGL": "My receiving address",
"1GWFxtwWmNVqotUPXLcKVL2mUKpshuJYo": "" // equivalent to no label set or null
(comments are of course not part of a valid JSON and are included here only for clarity)
...
...
@@ -170,7 +170,7 @@ For the "stress test" wallet, defined in SLIP-0014, the master key should be (in
Example code, deriving an account key for master key, is in [2_accountkey.py](slip-0015/2_accountkey.py). First argument of the script is xpub of the account, the second argument is the master key from previous step (in hexadecimal).
For the "stress test" wallet, defined in SLIP-0014, and its first account (with the xpub :code:`xpub6BiVtCp...`), the key should be::
For the "stress test" wallet, defined in SLIP-0014, and its first account (with the xpub `xpub6BiVtCp...`), the key should be::
v5kCxSKLTsnwmgPBeaRyFDWeG9zXouF34L72763zjLrS4LWy8
...
...
@@ -178,24 +178,24 @@ For the "stress test" wallet, defined in SLIP-0014, and its first account (with
Example code for decryption is in [3_decrypt.py](slip-0015/3_decrypt.py). First and only argument is the account key from previous step. The file has to be in a current working directory (in myTREZOR, we use ~/Dropbox/Apps/TREZOR/ for saving the files).
With the key :code:`v5kCxSKLTsnwmgPBeaRyFDWeG9zXouF34L72763zjLrS4LWy8`, filename :code:`08108c3a46882bb71a5df59f4962e02f89a63efb1cf5f32ded94694528be6cec.mtdt` and the data (in hex)
With the key `v5kCxSKLTsnwmgPBeaRyFDWeG9zXouF34L72763zjLrS4LWy8`, filename `08108c3a46882bb71a5df59f4962e02f89a63efb1cf5f32ded94694528be6cec.mtdt` and the data (in hex)