如何使用 NodeJS 发送狗狗币?

How to Send Money Dogecoin With NodeJS?

我正在学习制作一个简单的狗狗币钱包终端供个人使用。我设法生成了私钥和 public 地址(使用 coinkey). And success check balance Dogecoin (using API Dogechain)。

但是,我仍然对从我生成的私钥发送狗狗币感到困惑。是否有可用于从私钥发送狗狗币的 NodeJS 模块?或者谁有例子?

您可以使用 node - dogecoin。是狗狗币钱包的简单包装器(我认为它与所有兼容莱特币的钱包兼容,但尚未测试)。 通过这种方式,您可以在一个独特的 nodejs 模块中生成私钥、查询余额、发送硬币等

您需要 运行 个 dogecoind 实例才能连接。如果您是 运行 Debian/Ubuntu,这对我有用:http://www.dogeco.in/wiki/index.php/Dogecoind

然后,安装 node-dogecoin NPM 包。 (https://github.com/countable/node-dogecoin)

npm 安装 node-dogecoin

var dogecoin = require('node-dogecoin')()

dogecoin
.auth('MyUserName', 'mypassword')
.getNewAddress()
.getBalance()