The KrypC wallet-dev Service API provides a "Generate Keys" feature, allowing users to obtain private keys, public keys, and addresses with ease.
This creates a wallet using this method.
Generate Keys under the given instance.
{
"Data": {
"address": "0x722b17B6802F609ba66xxxxxxxxxxxxxxxxx",
"privateKey": "0xc1a009172xxxxxxxxxxxxxx",
"publicKey": "0x04a85e6b0843c4c7dfb3de68a08b5b3792f852b1f1c9a69182c46876ac1132b168e7ccc1df78e102b5b334362ef341f98ea9xxxxxxxxxxxxxxx"
},
"Message": "Keys generated successfully",
"Status": "SUCCESS"
}
{
"message": "Invalid API key in request"
}
Take a look at how you might call this method using our official libraries, or via curl
curl --location --request POST 'https://api.krypcore.com/api/v0/devWallet/generateKeys' \
--header 'DappId: **********' \
--header 'Authorization: **********' \
var myHeaders = new Headers();
myHeaders.append("DappId", "**********");
myHeaders.append("Authorization", "**********");
var raw = "";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.krypcore.com/api/v0/devWallet/generateKeys", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import requests
url = "https://api.krypcore.com/api/v0/devWallet/generateKeys"
payload = ""
headers = {
'DappId': '**********',
'Authorization': '**********',
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.krypcore.com/api/v0/devWallet/generateKeys"
method := "POST"
payload := strings.NewReader(``)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("DappId", "**********")
req.Header.Add("Authorization", "**********")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}