[英]How to generate coin address using bitcoin-ruby?
The only difference between the addresses is a single version-byte that ends up defining the first character of the address. 地址之间的唯一区别是单个版本字节,最终定义了该地址的第一个字符。 Bitcoin-ruby has the definition for several networks, including namecoin, litecoin and dogecoin.
比特币红宝石有几个网络的定义,包括名称币,莱特币和狗币。
To use a different network, just set it before doing anything else: 要使用其他网络,只需先进行设置即可:
Bitcoin.network = :namecoin
Now you can generate a namecoin address like usual: 现在,您可以像平常一样生成一个名称币地址:
Bitcoin.generate_address
or: 要么:
Bitcoin::Key.generate
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.