简体   繁体   English

如何运行卡尔达诺钱包?

[英]How to run Cardano Wallet?

I have installed cardano-wallet using this documentation .我已经使用此文档安装了 cardano-wallet。 Everything is OK, Just I don't know how to run it so I can have interaction with it via node.js:一切正常,只是我不知道如何运行它,所以我可以通过 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()

Does's anyone have an idea?有人有想法吗?

According to IOHK documentation, prior to running a server you have to run a node:根据 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

And after that call a serve command with appropriate flags:然后调用带有适当标志的serve命令:

cardano-wallet serve \                            
    --port 8090 \
    --mainnet \
    --database ~/cardano/wallets/db \
    --node-socket $CARDANO_NODE_SOCKET_PATH

If you need more details, read my medium post .如果您需要更多详细信息,请阅读我的媒体帖子

you have to run cardano node in order query blockchain.您必须运行 cardano 节点才能查询区块链。 follow this article https://developers.cardano.org/docs/get-started/cardano-wallet-js按照这篇文章https://developers.cardano.org/docs/get-started/cardano-wallet-js

you have to first download this file docker-compose.yml你必须先下载这个文件 docker-compose.yml

wget https://raw.githubusercontent.com/input-output-hk/cardano-wallet/master/docker-compose.yml 

then run your node either tes.net or mai.net by this command然后通过此命令运行您的节点 tes.net 或 mai.net

NETWORK=testnet docker-compose up

then you can able to connect with blockchain ref - https://github.com/tango-crypto/cardano-wallet-js然后你就可以连接区块链参考 - https://github.com/tango-crypto/cardano-wallet-js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM