curl -H "Content-Type: application/json" --data '{"method": "getnewaddress"}' rpcuser:[email protected]:port
Or, you can specify account and get this address assigned to new address
curl -H "Content-Type: application/json" --data '{"method": "getnewaddress", "params": ["billy"]}' rpcuser:[email protected]:port
Where 'billy' is your account name. You can check that your account was created properly:
curl -H "Content-Type: application/json" --data '{"method": "getaddressesbyaccount", "params": ["billy"]}' rpcuser:[email protected]:port
curl -H "Content-Type: application/json" --data '{"method": "getinfo"}' rpcuser:[email protected]:port
To get account by address:
curl -H "Content-Type: application/json" --data '{"method": "getaccount", "params": ["bchtest:qpkgrpazps220qtnzvlvlcm62urtnq0edv7ufjr95n"]}' rpcuser:[email protected]:port
To get addresses associated with account:
curl -H "Content-Type: application/json" --data '{"method": "getaddressesbyaccount", "params": ["billy"]}' rpcuser:[email protected]:port
To get account balance:
curl -H "Content-Type: application/json" --data '{"method": "getbalance", "params": ["billy"]}' rpcuser:[email protected]:port
More:
To extract a private key of an address, run:
curl -H "Content-Type: application/json" --data '{"method": "dumpprivkey", "params": ["*address*"]}' rpcuser:[email protected]:port
To extract private keys of all available addresses on the node, run:
curl -H "Content-Type: application/json" --data '{"method": "dumpwallet", "params": ["*filename*"]}' rpcuser:[email protected]:port
You'll find the wallet dump in the file specified previously.
To create new XRP account, You should first generate a key pair and XRP Ledger address:
curl -H "Content-Type: application/json" --data '{"method": "wallet_propose"}' rpcuser:[email protected]:port
Now someone who already has an account in the XRP Ledger should send XRP to the address you generated. The first time you receive XRP at your own XRP Ledger address, you must pay the account reserve (currently 20 XRP), which locks up that amount of XRP indefinitely.
More:
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"personal_newAccount","params":["passphrase"],"id":42}' rpcuser:[email protected]:ip
curl --data '{"method":"parity_allAccountsInfo","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
curl --data '{"method":"parity_testPassword","params":["*account address*","*account_password*"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
To export an account you need to know the passphrase for the account you want to export Export is done in JSON format. You can then save this JSON into a file and import it to Metamask.
curl --data '{"method":"parity_exportAccount","params":["*account address*","*account_password*"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545 | jq -c .result
This will return the json that has to be saved to a file.
curl --data '{"method":"parity_changePassword","params":["*accout address*","*old_password*", "*new_password*"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
More: