First Step With The API
After successfully onboarding and generating the API Token, you can create wallets for different networks.
Your First Krayon API Request
Now that you have the API token, let's try it!
You can now use the Krayon API to issue a Create wallet API request to create a new wallet on the desired crypto network.
The API request example below will post the wallet details and create it.
You can create an API request using any programming language.
Request:
import axios from 'axios';
const options = {
method: 'POST',
url: 'https:/api.aqua.test.krayondigital.com/main/api/v1/wallets',
headers: {
'accept': 'application/json',
'content-type': 'application/json',
'Authorization': 'Bearer YOUR-API-TOKEN'
},
data: {
"name": "Test net wallet",
"blockchain": "sepolia" //ethereum, sepolia
}
};
axios
.request(options)
.then(function (response) {
console.log(response.data);
})
.catch(function (error) {
console.error(error);
});
import requests
url = "https:/api.aqua.test.krayondigital.com/main/api/v1/wallets"
payload = {
"name": "Test net wallet",
"blockchain": "sepolia" # ethereum, sepolia, etc.
}
headers = {
"accept": "application/json",
"content-type": "application/json"
"Authorization": "Bearer YOUR-API-TOKEN"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
Response:
{
"data": {
"id": "274a71f9a905405ba2c5b1c746707ba1",
"organization": "org_11bV5ZyK0oO5PjTH",
"name": "Test net wallet",
"blockchain": "goerli",
"address": "0x259143f532ddb80992219aa83c9ae9f68dc4ef28"
}
}
Congratulations! You’ve just made your first Krayon API request!
Getting Started with the SDK - TBD
From now on, you can refer to our tutorials and how-to guides to add features to your application.
Have fun and secure yourself with Krayon!
Updated 4 months ago