Comments (5)
According to #8, the Node
doesn't carry its network information around with it anymore. This way you can use the same key tree for multiple networks, and you decide which network you want when you ask it to encode the address.
node = MoneyTree::Node.from_bip32(master_node).node_for_path(node_path)
node.to_address(true, network: :bitcoin_testnet)
I think it's unfortunate that the network information encoded in the bip32 is just lost. Maybe it could be preserved and used as the default network for #to_address
?
from money-tree.
@mhanne is correct – moneytree aims to be a currency-agnostic library.
Magic prefixes like xpub
and tpub
- don't scale well if there are arbitrarily many networks
- can be misleading if you want to use one wallet for multiple currencies
- and have no effect on the behavior of the actual HD wallet – only network-specific serialization which is subject to change
We find it better to use the path structure to indicate network per bip44 unless you're running in a constrained environment where the key derivation operation is very expensive (and if that's the case, why use ruby?) and to be explicit when (de)serializing.
from money-tree.
That's also why this was released as a minor version with a breaking change.
from money-tree.
Ok, I'll guess I'll stick with a sane version of the gem then.
It's still not very clear why such a breaking change was released as a minor version bump, because being backwards-compatible usually means "the same stuff will keep working", and not "you'll still be able to achieve similar functionality by doing things in different way" as it seems implied here.
from money-tree.
Per semver.org:
4. Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.
We use minor versions to indicate breaking changes for all versions < 1.0.0 — sorry for your confusion.
from money-tree.
Related Issues (20)
- Wrong address from equivalents derivation path HOT 2
- BIP49 (SegWit) derivation path HOT 10
- money-tree doesn't work on heroku HOT 1
- Ethereum Support HOT 8
- p2sh support HOT 1
- Update gemspec / publish gem HOT 6
- how can we adopt this to litecoin? HOT 3
- [proposal] activate testnet mode via configuration HOT 1
- can't import to electrum or the other way HOT 2
- DASH and DASH Testnet support
- Problem with openssl version on macOS for Ruby 2.6.5 HOT 6
- `money-tree` performs unsafe FFI and Monkey Patching of OpenSSL HOT 4
- Support for Bitcoin only? HOT 2
- release lib money-tree v0.11.0 to rubygems.org HOT 13
- Bip 32 test vector 5 fails 10/16
- litecoin support HOT 2
- Generate master node from private key HOT 1
- OpenSSL 3 deprecated RIPEMD160 ("legacy feature") HOT 8
- Private Key import fails with OpenSSL 3.0 HOT 2
- Bech32 dependency HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from money-tree.