Created
January 26, 2022 23:40
-
-
Save spirobel/4067786d142a5f08540e530e585610d8 to your computer and use it in GitHub Desktop.
two scripts to create and open monero wallets via the wallet rpc (using curl)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
IP=127.0.0.1 | |
PORT=18082 | |
METHOD="create_wallet" | |
PARAMS="{\"filename\":\"emptywallet\",\"language\":\"English\"}" | |
curl \ | |
-u username:password --digest \ | |
http://$IP:$PORT/json_rpc \ | |
-d '{"jsonrpc":"2.0","id":"0","method":"'$METHOD'","params":'"$PARAMS"'}' \ | |
-H 'Content-Type: application/json' | |
#!/bin/sh | |
IP=127.0.0.1 | |
PORT=18082 | |
METHOD="open_wallet" | |
PARAMS="{\"filename\":\"emptywallet\"}" | |
curl \ | |
-u username:password --digest \ | |
http://$IP:$PORT/json_rpc \ | |
-d '{"jsonrpc":"2.0","id":"0","method":"'$METHOD'","params":'"$PARAMS"'}' \ | |
-H 'Content-Type: application/json' | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment