How to get the private_key and public_key of an address?
I installed testnet on my local node. I want to get the private and public key of an address. How to get that? When I am requesting an "address" method to get a new address using POST, it is asking the API key. Generate a new account address in the wallet. Requires API_KEY to be provided. What is API key here? The below is my waves-testnet.conf file
# Wallet settings
wallet {
# Password to protect wallet file
password = "some string as password"
# Wallet seed as BASE58 string
# seed = "BASE58SEED"
}
# Blockchain settings
blockchain.type = TESTNET
# Matcher settings
matcher {
# Enable/disable matcher
enable = yes
# Matcher's account address
# account = ""
# Matcher REST API bind address
bind-address = "127.0.0.1"
# Matcher REST API port
port = 6886
price-assets = [
"WAVES",
"Fmg13HEHJHuZYbtJq8Da8wifJENq8uBxDuWoP9pVe2Qe",
"HyFJ3rrq5m7FxdkWtQXkZrDat1F7LjVVGfpSkUuEXQHj",
"2xnE3EdpqXtFgCP156qt1AbyjpqdZ5jGjWo3CwTawcux",
"6pmDivReTLikwYqQtJTv6dTcE59knriaodB3AK8T9cF8"
]
predefined-pairs = [
{amountAsset = "WAVES", priceAsset = "Fmg13HEHJHuZYbtJq8Da8wifJENq8uBxDuWoP9pVe2Qe"},
{amountAsset = "WAVES", priceAsset = "HyFJ3rrq5m7FxdkWtQXkZrDat1F7LjVVGfpSkUuEXQHj"},
{amountAsset = "WAVES", priceAsset = "2xnE3EdpqXtFgCP156qt1AbyjpqdZ5jGjWo3CwTawcux"},
{amountAsset = "Fmg13HEHJHuZYbtJq8Da8wifJENq8uBxDuWoP9pVe2Qe", priceAsset = "2aSqCbvCTgvCpwkGsk4mea4tCLG4Zgp69aQDhHNvRUZv"},
{amountAsset = "Fmg13HEHJHuZYbtJq8Da8wifJENq8uBxDuWoP9pVe2Qe", priceAsset = "8zEZuJcKPQmFuYgVe5ZMpxgiPLu5zBhjA6xgdGomQDaP"},
{amountAsset = "Fmg13HEHJHuZYbtJq8Da8wifJENq8uBxDuWoP9pVe2Qe", priceAsset = "D2MNuUyA38pSKoV7F7vpS15Uhw9nw5qfbrGUfCLRNuRo"},
{amountAsset = "2xnE3EdpqXtFgCP156qt1AbyjpqdZ5jGjWo3CwTawcux", priceAsset = "HyFJ3rrq5m7FxdkWtQXkZrDat1F7LjVVGfpSkUuEXQHj"}
]
}
# Node's REST API settings
rest-api {
# Enable/disable node's REST API
enable = yes
# Network address to bind to
bind-address = "0.0.0.0"
# Port to listen to REST API requests
port = 6869
# Hash of API key string
api-key-hash = "H6nsiifwYKYEx6YzYD7woP1XCn72RVvx6tC1zjjLXqsu"
}
}
include "local.conf"
Api-Key is a string from which the api-key-hash in the config was created.
So, you have to do following steps:
- Create any string and remember it
- Using API
utils/hash/secureget the hast of the string - Put the hast to the config file
- Use original string when accessing API
By the way, the default Api-Key is ridethewaves!.
Got it. Can you give me the proper info like what is key and value for POST parameters to pass the API_KEY? In this following URL: '' https://github.com/wavesplatform/Waves/wiki/Waves-Node-REST-API#post-addresses" under POST /addresses, Generate a new account address in the wallet. Requires API_KEY to be provided Could you give me an example of how to request with an api_key? There is no example of the request.
Thanks, Geet Sameer.
On Tue, Mar 20, 2018 at 3:02 PM, Alexey Kiselev [email protected] wrote:
Api-Key is a string from which the api-key-hash in the config was created. So, you have to do following steps:
- Create any string and remember it
- Using API utils/hash/secure get the hast of the string
- Put the hast to the config file
- Use original string when accessing API
By the way, the default Api-Key is ridethewaves!.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wavesplatform/Waves/issues/912#issuecomment-374531148, or mute the thread https://github.com/notifications/unsubscribe-auth/ASvL3Z-2uS4WUTFRp2HR2fL__Wb8cSy4ks5tgMyigaJpZM4SwaXS .
-- Regards V.Geet Sameer. 9989573418. [email protected]
I figured it out. Could you please tell me how to get private and public keys of an address using Node Rest API?
On 20-Mar-2018 4:56 PM, "Geet Sameer" [email protected] wrote:
Got it. Can you give me the proper info like what is key and value for POST parameters to pass the API_KEY? In this following URL: ''https://github.com/wavesplatform/Waves/wiki/ Waves-Node-REST-API#post-addresses" under POST /addresses, Generate a new account address in the wallet. Requires API_KEY to be provided Could you give me an example of how to request with an api_key? There is no example of the request.
Thanks, Geet Sameer.
On Tue, Mar 20, 2018 at 3:02 PM, Alexey Kiselev [email protected] wrote:
Api-Key is a string from which the api-key-hash in the config was created. So, you have to do following steps:
- Create any string and remember it
- Using API utils/hash/secure get the hast of the string
- Put the hast to the config file
- Use original string when accessing API
By the way, the default Api-Key is ridethewaves!.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wavesplatform/Waves/issues/912#issuecomment-374531148, or mute the thread https://github.com/notifications/unsubscribe-auth/ASvL3Z-2uS4WUTFRp2HR2fL__Wb8cSy4ks5tgMyigaJpZM4SwaXS .
-- Regards V.Geet Sameer. 9989573418. [email protected]
+1