Post
Topic
Board Development & Technical Discussion
Re: Derive in batches, addresses of an xpub programmatically.
by
gyaani
on 16/11/2016, 06:06:17 UTC
Quote
You could always check out the extension for libsecp256k1 https://github.com/bit-wasp/secp256k1-php
(Note for googlers: the default branch does NOT compile for PHP5. Run
Code:
git checkout v0.0.8
in directory - secp256k1-php , before ./configure)

Thanks for this, but I can't figure out how to use or even understand it. Plus the examples in the README are for the latest branch which doesn't work with PHP5. So have no examples or documentation Sad.
Anyhow, this looks like what I want? :
Quote
Public Key tweak by addition

secp256k1_ec_pubkey_tweak_add(resource $context, resource $publicKey, string $tweak32) takes the given $tweak value, converts it to a point, and adds the point to the $publicKey point. The result is written to the provided $publicKey memory location.

This function is useful for deterministic key derivation.


btw What is 'tweak' here  ? Googling doesn't seem to help.

My Goal is to just generate public keys from an xpub. any guidance would be much appreciated

ty