Download OpenAPI specification:Download
The KIP-17 API helps DApp (Decentralized Application) developers to manage contracts and tokens created in accordance with the KIP-17 standard, which is Kaia's technical speficication for Non-Fungible Tokens. The functionality of the multiple endpoints enables you to do the following actions:
When you have created a contract on the Kaia Network using SDKs like caver, you can use the contract address and your Wallet API account to manage contracts and tokens.
For more details on KAS, please refer to KAS Docs. If you have any questions or comments, please leave them in the KAS Developers Forum.
alias
When a method of the KIP-17 API requires a contract address, you can use the contract alias. You can give the contract an alias when deploying, and use it in place of the complicated address.
KIP-17 v2 newly supports Ownable interface. Using this, you can designate a contract owner when deploying a contract. Features renouncing or transferring ownership by the contract owner and querying a specific contract owner are also available. The contracts deployed with KIP-17 v1 are inaccessible to use the collection-editing feature on OpenSea, while the owner of contracts deployed with v2 can set and edit collections.
All features except ownership-related API are the same as v1 and compatible with the contracts deployed with KIP-17 v1. However, we recommend using only v2 APIs for the contracts deployed with KIP-17 v2.
KAS KIP-17 supports four ways to pay the transaction fees.
1. Only using KAS Global FeePayer Account
Sends all transactions using KAS Global FeePayer Account.
{
"options": {
"enableGlobalFeePayer": true
}
}
2. Using User FeePayer Account
Sends all transactions using User FeePayer Account.
{
"options": {
"enableGlobalFeePayer": false,
"userFeePayer": {
"krn": "krn:1001:wallet:20bab367-141b-439a-8b4c-ae8788b86316:feepayer-pool:default",
"address": "0xd6905b98E4Ba43a24E842d2b66c1410173791cab"
}
}
}
3. Using both KAS Global FeePayer Account + User FeePayer Account
Sends transactions using User FeePayer Account by default, and switches to the KAS Global FeePayer Account when balances are insufficient.
{
"options": {
"enableGlobalFeePayer": true,
"userFeePayer": {
"krn": "krn:1001:wallet:20bab367-141b-439a-8b4c-ae8788b86316:feepayer-pool:default",
"address": "0xd6905b98E4Ba43a24E842d2b66c1410173791cab"
}
}
}
4. Not using FeePayer Account
Sends transactions the default way, paying the transaction fee from the user's account.
{
"options": {
"enableGlobalFeePayer": false
}
}
This section contains the errors that might occur when using the KIP-17 API. KAS uses HTTP status codes. Error code tables can be found here.
KAS uses Basic HTTP Auth. All requests must have a correct Authorization header and a KAS user can create the credentials to be used for Basic Auth by using username
as access key ID and password
as secret access key.
NOTE
The KAS account credentials grant access to all services of KAS and own all rights to the Kaia account created by Wallet API, which means they can execute value transfer of assets on the Kaia account (such as KAIA) or a Transaction execution. To keep your KAS/Kaia account secure, do not share your KAS API Secret Access Key with others and manage it safely.
cURL
curl --location --request GET 'https://kip17-api.klaytnapi.com/v2/contract' \
-u ${your_accessKeyId}:${your_secretAccessKey} \
--header 'x-chain-id: 1001' \
--header 'Content-Type: application/json'
Security Scheme Type | HTTP |
---|---|
HTTP Authorization Scheme | basic |