ERC Token can be approved using this method. The weightage for this API is 5
ERC Token can be approved under the given instance.
{
"Data": {
"referenceId": "xxxxxxxxxxxxx",
"txnHash": ""
},
"Message": "ERC20 Token Created Successfully",
"Status": "SUCCESS"
}
{
"Status": "FAILURE",
"Code": 400,
"Message": "no / multiple instances found"
}
{"message":"Invalid API key in request"}
{
"Data": null,
"Message": "Mandatory params missing",
"Status": "FAILURE"
}
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/ft-manager/approveFT' \
--header 'Authorization: xxxxxxxxxxxx' \
--header 'DappId: xxxxxxxxxxxx' \
--header 'ChainId: xxxx' \
--header 'Content-Type: application/json' \
--data '{
"approveAddress": "0x688612BD8e65FF693070A875b6a49672502a0707",
"chainId": "xxxx",
"contractAddress": "0xa9BCB7E413FfE96575390c6F44F54607b44F030a",
"custodialWalletAccessToken": "d263d546-ccc2-4676-9691-d28c3f836822",
"quantity": "1000000000000000000",
"walletType": "non-custodial"
}'
const axios = require('axios');
let data = JSON.stringify({
"approveAddress": "0x688612BD8e65FF693070A875b6a49672502a0707",
"chainId": "xxxx",
"contractAddress": "0xa9BCB7E413FfE96575390c6F44F54607b44F030a",
"custodialWalletAccessToken": "d263d546-ccc2-4676-9691-d28c3f836822",
"quantity": "1000000000000000000",
"walletType": "non-custodial"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api.krypcore.com/api/v0/ft-manager/approveFT',
headers: {
'Authorization': 'xxxxxxxxxxxx',
'DappId': 'xxxxxxxxxxxx',
'ChainId': 'xxxx',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
import json
url = "https://api.krypcore.com/api/v0/ft-manager/approveFT"
payload = json.dumps({
"approveAddress": "0x688612BD8e65FF693070A875b6a49672502a0707",
"chainId": "xxxx",
"contractAddress": "0xa9BCB7E413FfE96575390c6F44F54607b44F030a",
"custodialWalletAccessToken": "d263d546-ccc2-4676-9691-d28c3f836822",
"quantity": "1000000000000000000",
"walletType": "non-custodial"
})
headers = {
'Authorization': 'xxxxxxxxxxxx',
'DappId': 'xxxxxxxxxxxx',
'ChainId': 'xxxx',
'Content-Type': 'application/json'
}
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/ft-manager/approveFT"
method := "POST"
payload := strings.NewReader(`{
"approveAddress": "0x688612BD8e65FF693070A875b6a49672502a0707",
"chainId": "xxxx",
"contractAddress": "0xa9BCB7E413FfE96575390c6F44F54607b44F030a",
"custodialWalletAccessToken": "d263d546-ccc2-4676-9691-d28c3f836822",
"quantity": "1000000000000000000",
"walletType": "non-custodial"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxxxxxxxx")
req.Header.Add("DappId", "xxxxxxxxxxxx")
req.Header.Add("ChainId", "xxxx")
req.Header.Add("Content-Type", "application/json")
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))
}