Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: Curve does not contain point #12

Closed
micah opened this issue Sep 25, 2017 · 3 comments
Closed

Exception: Curve does not contain point #12

micah opened this issue Sep 25, 2017 · 3 comments

Comments

@micah
Copy link

micah commented Sep 25, 2017

Hello,

I've taken the master public key from an electrum wallet and attempted to extract addresses from it:

irb(main):001:0> require 'bitcoin-addrgen'
=> true
irb(main):002:0> master_public_key = "xpub661MyMwAqRbcFTm4eJJRB4SvWGWGj8UC2Vajs7arYz4cJfDJS8nYi1pY51FDu65Z2JNFtqj4ZqxdceNueEobSkkNqGjn7aKXTv9yD6Yfycm"
=> "xpub661MyMwAqRbcFTm4eJJRB4SvWGWGj8UC2Vajs7arYz4cJfDJS8nYi1pY51FDu65Z2JNFtqj4ZqxdceNueEobSkkNqGjn7aKXTv9yD6Yfycm"
irb(main):003:0> first_ten_addresses = 10.times.collect do |address_index|
irb(main):004:1*   BitcoinAddrgen.generate_public_address(master_public_key, address_index)
irb(main):005:1> end
Exception: Curve does not contain point
	from /var/lib/gems/2.3.0/gems/bitcoin-addrgen-0.1.0/lib/bitcoin_addrgen/addrgen.rb:191:in `initialize'
	from /var/lib/gems/2.3.0/gems/bitcoin-addrgen-0.1.0/lib/bitcoin_addrgen/addrgen.rb:311:in `new'
	from /var/lib/gems/2.3.0/gems/bitcoin-addrgen-0.1.0/lib/bitcoin_addrgen/addrgen.rb:311:in `addr_from_mpk'
	from /var/lib/gems/2.3.0/gems/bitcoin-addrgen-0.1.0/lib/bitcoin-addrgen.rb:7:in `generate_public_address'
	from (irb):4:in `block in irb_binding'
	from (irb):3:in `times'
	from (irb):3:in `each'
	from (irb):3:in `collect'
	from (irb):3
	from /usr/bin/irb:11:in `<main>'
irb(main):006:0>
@prusnak
Copy link
Owner

prusnak commented Sep 25, 2017

addrgen does not support xpubs

use this if you want to use xpub: https://github.com/prusnak/bip32utils

@prusnak prusnak closed this as completed Sep 25, 2017
@micah
Copy link
Author

micah commented Sep 25, 2017 via email

@prusnak
Copy link
Owner

prusnak commented Sep 25, 2017

google for "bip32 ruby" then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants