Download OpenAPI specification:Download
Wallet API helps developers to create and manage Kaia accounts and send transactions. It provides a wallet for secure storage of your Kaia account private keys as well. The functionality of the multiple endpoints enables you to do the following actions:
Basic transaction on KAS is the same as Kaia transaction, and fee delegation transaction divides its type depends on who pays the transaction fee. With the Global Fee Delegation transaction scheme, the transaction fee will initially be paid by GroundX and then be charged to you at a later date. With the User Fee Delegation transaction scheme, you create an account that pays the transaction fees on behalf of the users for a transaction. Multisig transaction needs more than one signature for transaction transfer. In the case of multisig accounts, a transaction will automatically be sent to Kaia once (Threshold) is met.
The administrator can use account management features to create or retrieve account pools on KAS Console.
IMPORTANT
Wallet API v2 does not support some features. Make sure to check prior to using the API.
[Not support]
- Service Chain
- Account management for external custodial keys
- Multi-signature for RLP-encoded transaction
/v2/tx/*
, Wallet API will automatically parse the nonce of this account to set the transaction parameters.CAUTION
In the event of an overload, the order of transaction and nonce cannot be guaranteed. For example, if the transaction that was supposed to be executed first turns out to have a bigger nonce, it may have to wait before the transactions with lower nonces go through.
In cases when order matters, you can set the nonce yourself. The transaction parameters will be set with the data provided by you.
A common error titled Unauthorized
occurs regardless of API type if you have authorization issues.
401: Unauthorized
Code | Message |
---|---|
1010007 | The path or method in request is invalid. Check the service API documentation and try again. |
1010009 | The credential you provided is invalid. |
KAS uses Basic HTTP Auth. All requests must have a correct Authorization header. You can create the Credential for Basic Auth by using username
as AccessKey ID and password
as SecretAccessKey obtained on KAS Console.
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 POST 'https://wallet-api.klaytnapi.com/v2/account' \
-u ${your_accessKeyId}:${your_secretAccessKey} \
--header 'x-chain-id: 1001' \
--header 'Content-Type: application/json'
Security Scheme Type | HTTP |
---|---|
HTTP Authorization Scheme | basic |