This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example of stealth addressess using Diffie-Hellman, to create a unique offset between 2 mpks | |
# doesn't need to exchange data in the blockchain. Payee can just look for new transactions against their | |
# mpk at offset S, where S is the shared secret between the two parties. | |
import obelisk | |
import os | |
from ecdsa import numbertheory, curves, util, ellipticcurve | |
# From https://github.com/FelixWeis/python-hdwallet/blob/master/hdwallet/hdwallet.py | |
def point_decompress(data): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: %run examples/stealth.py | |
Bob secret e8f32e723decf4051aefac8e2c93c9c5b214313817cdb01a1494b917c8436b35 | |
Alice secret 4b03d6fc340455b363f51020ad3ecca4f0850280cf436c70c727923f6db46c3e | |
Bob mpk (compressed) 0339a36013301597daef41fbe593a02cc513d0b55527ec2df1050e2e8ff49c85c2 | |
Alice mpk (compressed) 03cbcaa9c98c877a26977d00825c956a238e8dddfbd322cce4f74b0b5bd6ace4a7 | |
Bob chain 873dff81c02f525623fd1fe5167eac3a55a049de3d314bb42ee227ffed37d508 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example of stealth addressess using Diffie-Hellman, to create a unique offset between 2 mpks | |
# doesn't need to exchange data in the blockchain. Payee can just look for new transactions against their | |
# mpk at offset S, where S is the shared secret between the two parties. | |
# This will require the payee to subscribe to n addresses, | |
# where n is the number of identities they expect to receive a payment from. | |
import obelisk | |
import os | |
from ecdsa import numbertheory, curves, util, ellipticcurve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Magic read test derp | |
*/ | |
#include <future> | |
#include <bitcoin/bitcoin.hpp> | |
#define LOG_BOOTSTRAP "bootstrap" | |
using namespace bc; | |
using std::placeholders::_1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Imports blocks from bootstrap.dat | |
bootstrap.dat is the raw blocks in the format | |
[magic bytes] [block length] [serialized block] | |
*/ | |
#include <future> | |
#include <bitcoin/bitcoin.hpp> | |
#define LOG_BOOTSTRAP "bootstrap" |