【问题标题】:Error found when call wallet creation method in ripple-lib as [RippledNotInitializedError(Rippled not initialized)]在ripple-lib中调用钱包创建方法时发现错误[RippledNotInitializedError(Rippled not initialized)]
【发布时间】:2018-03-29 12:24:06
【问题描述】:

我使用的代码如下

const api = new RippleAPI({
    //server: 'wss://s1.ripple.com' // Public rippled server
    server: 'ws://TestnetServerIp:6006' // testnet rippled server
});

router.get('/generateAddress', function (req, res) {
    api.connect().then(() => {
        return api.generateAddress();
    }).then(address => {
        console.log(" newly generated address is ", address);

        res.status(200).json(formatter.simpleFormat(address,true,"success"));
    }).catch(err => {
        console.log(err);
        res.status(500).json(formatter.simpleFormat(null,false,"error"));
    })
});

调用钱包创建 API 时出错

[RippledNotInitializedError(Rippled not initialized)]

【问题讨论】:

  • 你能分享确切的错误信息吗?
  • [RippledNotInitializedError(Rippled not initialized)] 在调用 generateAddress 的 API 时,我只收到了这一行错误

标签: ripple


【解决方案1】:

虽然这可能无法准确回答您想要实现的目标。

所以我不建议使用rippled 生成新地址并通过与rippled 服务器的任何连接检索秘密

我建议您使用ripple-keypairs 在离线环境中生成新地址。你自己做应该很容易。

【讨论】:

    【解决方案2】:

    这意味着 TestnetServerIp 的 server_state 不是 'full'。

    要检查 server_state,请运行以下命令:

    rippled server_info 2>/dev/null | grep server_state
    

    如果状态是'full',这个命令应该输出:

    "server_state" : "full",
    

    通常,状态变为“满”只需几分钟。

    【讨论】:

      猜你喜欢
      • 2021-12-26
      • 2015-03-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多