Ejemplo n.º 1
0
 private_key_type wallet_db::get_account_child_key( const private_key_type& parent_private_key, uint32_t child_key_index )const
 { try {
     FC_ASSERT( is_open() );
     const extended_private_key extended_parent_private_key = extended_private_key( parent_private_key );
     fc::sha256::encoder enc;
     fc::raw::pack( enc, child_key_index );
     return extended_parent_private_key.child( enc.result() );
 } FC_CAPTURE_AND_RETHROW( (child_key_index) ) }
Ejemplo n.º 2
0
 private_key_type wallet_db::get_account_child_key( const private_key_type& active_private_key, uint32_t seq_num )const
 { try {
     FC_ASSERT( is_open() );
     const extended_private_key extended_active_private_key = extended_private_key( active_private_key );
     fc::sha256::encoder enc;
     fc::raw::pack( enc, seq_num );
     return extended_active_private_key.child( enc.result() );
 } FC_CAPTURE_AND_RETHROW( (seq_num) ) }
Ejemplo n.º 3
0
 // Deprecated but kept for key regeneration
 private_key_type wallet_db::get_account_child_key_v1( const fc::sha512& password, const address& account_address, uint32_t seq_num )const
 { try {
     FC_ASSERT( is_open() );
     const extended_private_key master_private_key = wallet_master_key->decrypt_key( password );
     fc::sha256::encoder enc;
     fc::raw::pack( enc, account_address );
     fc::raw::pack( enc, seq_num );
     return master_private_key.child( enc.result() );
 } FC_CAPTURE_AND_RETHROW( (account_address)(seq_num) ) }
Ejemplo n.º 4
0
 private_key_type wallet_db::get_wallet_child_key( const fc::sha512& password, uint32_t key_index )const
 { try {
     FC_ASSERT( is_open() );
     const extended_private_key master_private_key = wallet_master_key->decrypt_key( password );
     return master_private_key.child( key_index );
 } FC_CAPTURE_AND_RETHROW( (key_index) ) }