curl -H "Content-Type: application/json" --data '{"method": "getnewaddress"}' rpcuser:rpcpassword@ip: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:rpcpassword@ip: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:rpcpassword@ip:port
curl -H "Content-Type: application/json" --data '{"method": "getinfo"}' rpcuser:rpcpassword@ip:port
To get account by address:
curl -H "Content-Type: application/json" --data '{"method": "getaccount", "params": ["bchtest:qpkgrpazps220qtnzvlvlcm62urtnq0edv7ufjr95n"]}' rpcuser:rpcpassword@ip:port
To get addresses associated with account:
curl -H "Content-Type: application/json" --data '{"method": "getaddressesbyaccount", "params": ["billy"]}' rpcuser:rpcpassword@ip:port
To get account balance:
curl -H "Content-Type: application/json" --data '{"method": "getbalance", "params": ["billy"]}' rpcuser:rpcpassword@ip:port
More:
To extract a private key of an address, run:
curl -H "Content-Type: application/json" --data '{"method": "dumpprivkey", "params": ["*address*"]}' rpcuser:rpcpassword@ip: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:rpcpassword@ip: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:rpcpassword@ip: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:rpcpassword@port: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: