I'm generating a wallet address and keys with http://moneroaddress.org. But how can I create, sign and send transactions with NodeJS from this cold wallet?
1 Answer
The monero-wallet-rpc
requires a wallet file to operate on. Therefore, if you only have the keys, you will first need to restore a wallet file from your keys, which can be done using the monero-wallet-cli
:
monero-wallet-cli --generate-from-keys my_wallet
This will prompt you for your address and keys then save the new wallet file as my_wallet
.
You can then proceed to opening the wallet file you just created with the RPC:
monero-wallet-rpc --wallet-file my_wallet --rpc-bind-port 18084 ...
At which point you can then call the RPC methods, such as transfer, to transfer funds.
All the RPC commands are just HTTP POST calls, no special libraries are needed.
-
But how another wallets support importing wallet from keys? MyMonero for examle– intosKaiCommented Sep 20, 2019 at 15:40
-
MyMonero is not the official Monero wallet. This answer is specifically for the official Monero applications and wallet file & keys. Commented Sep 20, 2019 at 19:15