codify the hardened child key paths for various aspects of data stores

This commit is contained in:
Jude Nelson
2017-02-12 03:33:07 -05:00
parent a37b8a259f
commit 130ce771e7

View File

@@ -303,6 +303,7 @@ METADATA_DIRNAME = 'metadata'
APP_ACCOUNT_DIRNAME = 'accounts'
USER_DIRNAME = 'accounts'
DATASTORE_DIRNAME = 'datastores'
LOCAL_PRIVKEY_INDEX_NAME = 'local_privkey.idx'
BLOCKCHAIN_ID_MAGIC = 'id'
@@ -334,6 +335,16 @@ APPROX_TX_OUT_P2PKH_LEN = 40
APPROX_TX_IN_P2SH_LEN = 300
APPROX_TX_OUT_P2SH_LEN = 40
# hardened children indexes
# user list and private key index paths are $MASTER_PRIVKEY/$INDEX'/0'
# global user accounts are $MASTER_PRIVKEY/$USER_GLOBAL_SIGNING_KEY_INDEX'/0'/$USER_INDEX'
# local user accounts are $MASTER_PRIVKEY/$USER_LOCAL_SIGNING_KEY_INDEX'/0'/$USER_INDEX'
# accounts are $USER_PRIVKEY/0'/$ACCOUNT_INDEX'
USER_LIST_SIGNING_KEY_INDEX = 1
PRIVKEY_INDEX_SIGNING_KEY_INDEX = 2
USER_GLOBAL_SIGNING_KEY_INDEX = 3
USER_LOCAL_SIGNING_KEY_INDEX = 4
# epoch dates
EPOCH_1_END_BLOCK = 436650