Bitcoin Forum
May 25, 2024, 06:32:16 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: JS or PHP lib that allows separate HD public+private keys? (for offline wallet)  (Read 832 times)
Kazimir (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1003



View Profile
November 09, 2015, 10:49:41 AM
Merited by ABCbits (2)
 #1

Hi, is there a JavaScript or PHP library that features:

1. generating a public and private 'seed' or 'root key'
2. based on the private seed or root key, generating a deterministic sequence of private keys
3. based on the public seed or root key, generating a deterministic sequence of Bitcoin addresses (corresponding with the private keys from step 2)

Steps 2 and 3 should be able to operate independently. The idea is to have an online 'read only' wallet, where one can check balance, generate new addresses, and prepare transactions. And having a separate offline wallet (in a safe, isolated environment) where the corresponding private keys can be generated, and where the previously created transactions can be signed (and then the hex tx data can be exported and pushed on the network separately).

Is bitcoin-js capable of this? The github repos mentions HD wallet capabilities, but not the separation of public and private keys. And bitcoinjs.org seems rather outdated.

In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
luv2drnkbr
Hero Member
*****
Offline Offline

Activity: 793
Merit: 1016



View Profile
November 09, 2015, 02:47:45 PM
 #2

Any hierarchical deterministic wallet code will be able to do that.  Take a look at the bip32-utils from the same user as your link.

fbueller
Sr. Member
****
Offline Offline

Activity: 412
Merit: 275


View Profile
November 09, 2015, 11:34:47 PM
 #3

Bitcore or Bitcoinjs-lib works well for clientside stuff, and your server if you like.

https://github.com/Bit-Wasp/bitcoin-php can do public HD derivations on your server if PHP is preferred for that. (I wrote this library)

Bitwasp Developer.
CrazyJoker
Full Member
***
Offline Offline

Activity: 689
Merit: 102



View Profile
November 09, 2015, 11:43:52 PM
 #4

Are you looking for a functionality like https://coinb.in/#newHDaddress ?

Then check coinb.in code on Github. It is an awesome JS implementation.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!