我已经使用this documentation安装了cardano-wallet。一切都很好,只是我不知道如何运行它,所以我可以通过node js与它进行交互:
const { WalletServer } = require('cardano-wallet-js');
let walletServer = WalletServer.init('http://127.0.0.1:1337/v2');
async function test() {
let information = await walletServer.getNetworkInformation();
console.log(information);
}
test()有谁有主意吗?
发布于 2021-11-08 20:10:25
根据IOHK文档,在运行服务器之前,您必须对节点执行run操作:
cardano-node run \
--topology ~/cardano/config/mainnet-topology.json \
--database-path ~/cardano/db/ \
--socket-path ~/cardano/db/node.socket \
--host-addr 127.0.0.1 \
--port 1337 \
--config ~/cardano/config/mainnet-config.json然后使用适当的标志调用serve命令:
cardano-wallet serve \
--port 8090 \
--mainnet \
--database ~/cardano/wallets/db \
--node-socket $CARDANO_NODE_SOCKET_PATH如果你需要更多细节,请阅读我的medium post。
https://stackoverflow.com/questions/69506678
复制相似问题