Managing KAS Project

This tutorial demonstrates how to create a Project, add Action & Filter, and reobtain your Credential. It is assumed that you have already signed up on KAS. If you haven't yet done so, please sign up.

Project

Introduction

Project is a service that enables you to control access rights to KAS resources. By creating a Project, you can control the access to KAS resources and APIs.

How is it different from KAS Credential?

The API Secret Access Key that you can obtain with your KAS account is a root credential. It grants you full access to the services and resources of KAS. Using the Project ID and Key, you can limit the API usage as well as only permit specific Actions and Sub Actions.

Project Functionalities

Project offers the following functionalities:

Sharing KAS account resources

  • You can manage and use KAS account resources without sharing the API secret access key of the root user.

Controlling access to permitted Actions and Subactions: Filter

  • Permitted Actions (API) and Subactions (Filters) constitute the specifications of the API access control.

  • Using Project, you can define the permitted Actions (APIs) and other conditions for access.

    1. Origin

      • Only allow API calls when the Origin in the Request Header matches the Origin that was specified when creating the Project.

      • Origin example: https://www.example.com

    2. User-Agent

      • Only allow API calls when the User-Agent in the Request Header matches the User-Agent that was specified when creating the Project.

      • Only allow API calls when the User-Agent begins with a specified string (prefix match).

      • User-Agent example: Chrome : Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

    3. IP Whitelist

      • Only allow API calls when the Client's IP matches the IP that was specified when creating the Project.

    4. KAS Action

      • Action : Allow API calls for certain Actions that were specified when creating the Project

      • SubAction : Allow API calls for certain Subactions that were specified when creating the Project (To be used when an Action requires a Subaction, e.g. for node::CallRPC)

      • Filters

        • body : Only allow API calls when the Request Body matches the Body that was specified when creating the Project.

        • query : Only allow API calls when the Request Query matches the Query specified when creating the Project.

        • rlp : Only allow API calls when the RLP in the Request Body matches the RLP pattern specified when creating the Project.

Creating Project

To create a Project, sign in to KAS Console and go to My Page > Project.

Create Project

Click on [Create Project] and enter the required data: Name, Description, Origins, IP Whitelist, User Agent. Click [Create] to create a Project.

Create Project-2

Once you have created a Project, you can obtain the Project ID and Project Key. Download the Secret Access Key with the file name {Project-ID}.json.

Download Secret Access Key after Creating Project

The Project ID and Project Key will be displayed only once, so make sure to back them up and store them in a safe place. When you call an API, the Project ID and the Project Key will encoded, just like the AccessKey ID and the Secret AccessKey, and the Basic Auth header will automatically be generated.

After creating the Project, go to My Page - Project on Console. You will see the Project ID and a brief description on the list. If you want to edit the description, click on the Project ID and go to Project Info.

Edit Project

Adding Project Action & Filter

When a Project is first created, it doesn't have any Actions & Filters.

You cannot access any KAS resources if the Project ID and Key do not have specified Actions & Filters. Therefore, the client needs to add the desired Actions and Filters.

Under the Action & Filters tab in Project Info, click on the Add Action & Filter button.

Add Actions and Filters

Click on Action bar and select the KAS Action to add.

If a KAS Action requires a Sub Action, it can be added following the same steps.

Select Action

If you need filters for the Body, Query, RLP of the Action, add the names and patterns of the Filter and click Add.

Add Action Filter

As in the example above, if the query parameter size of kip17::GetContract is set to 5, you can call the API with the Project ID and Key only when the query parameter size is set to 5.

In the same way as mentioned above, if you set the field and pattern for Body and RLP, you can limit the access to certain APIs that meet the requirements.

After entering the data for the Actions Filters, click on Add Action & Filter to save them.

Save Action Filter

Reissuing Project Key

If you want to reissue the key for an existing Project, go to MyPage > Project and select the Project, and click Reissue ID & Key.

Reissue ID & KEY

Filtering Examples

Note: The filter name for the Project supports GJSON Path Syntax.

Filtering UserAgent

You can create a Project with a designated User-Agent. User-Agent is verified using the prefix and only API calls that include a valid User-Agent in the header are allowed.

Example: User-Agent is set to PostmanRuntime:

  • PostmanRuntime/7.280 (PASS)

  • PostmanRuntim/7.280 (FAIL)

  • Postman/7.280 (FAIL)

You can make changes in Project Info when necessary.

Filtering UserAgent

cURL Example:

Filtering Origin

You can create a Project with a designated Origin. After that, you can only make API calls when the Origin is included in the header. Please make sure that the strings you entered correspond exactly to the Origin.

Example: Origin is set to https://www.example.com:

  • https://www.example.com (PASS)

  • http://www.example.com (FAIL)

  • https://foo.example (FAIL)

You can change them anytime in Project Info.

Origin Filtering

cURL Example:

Filtering IP

You can designate an IP when creating a Project, which would only allow API calls from that IP address only. You can change this later in Project Info.

IP Filtering

Body Filtering

1. Node API - CallRPC : Allowing klay_getBalance calls for certain accounts

You need the following parameters when calling klay_getBalance using Node API.

  • Account address for checking the balance

  • Quantity Tag (e.g. ["latest", "earliest"])

Fill in the params field with the parameters so that the body looks like this:

To only allow klay_getBalance calls for certain accounts, select the Project from the Project List and click on the Actions & Filters tab.

As you see on the image, select node::CallRPC for Action and klay_getBalance for Sub Action. Select Body type for Action Filter. Since the account address is included at index 0 of params, the name of the filter is params.0, refering to its position at index 0. For the pattern, enter the account address that you want to permit.

Node API Filtering

After filling in the data, click Add Action & Filter.

If the Action and Filter was successfully added, you can make API calls with the Project ID and Key only for the designated account address.

cURL example:

Call successful (The designated address(0x60d0902c428D0E197F97a756011Fd4893C1E57B0) was added to params.0)

Call unsuccessful (An address other than 0x60d0902c428D0E197F97a756011Fd4893C1E57B0 was added toparams.0)

Body Filtering

2: KIP-17 API - Allowing certain accounts to mint tokens

To call Mint KIP-17 Contract Token, you need the following parameters:

  • Recipient (to): The Klaytn account address of the recipient

  • Token ID (id): The identification number of the token

  • Token URI (uri): The location of the token data (JSON file) expressed as an URI

In order to pass the above data, prepare a request Body like this:

To enable certain accounts to mint tokens, select the Project on the Project list and click on the Actions & Filters tab.

As you see on the image, select kip17::MintToken for Action and skip Sub Action because it doesn't apply here. Select Body type for Action Filter. The filter name is to, and pattern is the account address that you wish to permit.

Filtering KIP17 token minting

After entering all the data, click Add Action & Filter.

If the Action and Filter was successfully added, you can only make API calls with the Project ID and Key for the designated account address.

cURL example:

Call successful (The designated address(0x837Bbfa5dBCfD781c8EE45970d53F1F1198Bb6Bb) was entered for to)

Call unsuccessful (An address other than 0x837Bbfa5dBCfD781c8EE45970d53F1F1198Bb6Bb was entered for to)

Query Filtering

1. Only allowing calls for certain chain-id

Select a Project from the Project list and click on the Actions & Filters tab.

As you see on the image, select an Action, such as kip17::MintToken, and skip Sub Action because because it doesn't apply here Select Query type for Action Filter. The filter name is chain-id, and pattern is the chain-id that you want to permit. To learn more about the possible query types, please refer to the API Reference.

chain-id Filtering

After entering the data, click on Add Action & Filter.

If the Action and Filter was successfully added, you can make the API call with the Project ID and Key only when the request parameter contains the chain-id as a Query Parameter.

cURL example: (KIP17:ListContractsInDeployerPool)

Call successful (chain-id is 1001)

Call unsuccessful (chain-id is not 1001)

Query Filtering

2. Only allowing size=5 when querying KIP-17 Token History

Select Project from the Project list and click on the Actions & Filters tab.

As you see on the image, enter kip17::GetTokenHistory for Action, and Skip Sub Action since it doesn't apply here. Select Query type as Action Filter. The filter name is size, and we will set pattern to 5.

Query size Filtering

After entering the data, click Add Action & Filter.

If the Action and Filter was successfully added, you can only make the API call with the Project ID and Key when "size=5" is given as a Query Parameter.

cURL example:

Call successful (size is 5)

Call unsuccessful (size is not 5)

RLP Filtering

Filtering Wallet API's from account for Send Klay Transaction

Select the Project on the Project list and click on the Actions & Filters tab.

As you see on the image, enter wallet:tx:basic-RLPTx for Action and skip Sub Action because it doesn't apply here. Select select rlp type for Action Filter. The filter name is {Position of the RLP field in Body(gjson supported)}#rlp#{field in RLP-encoded Body (gjson supported)}, and the pattern is the account address that you wish to permit.

Below is an example where only 0x59733a0943465fc4f5540b368d92a9d08472e959 is allowed as the account address of the from field.

When you RLP-encode the JSON object, the return value will look like this:

You can also enter the following data in the Body when calling wallet:tx:basic-RLPTx.

The filter name is rlp#rlp#from, and the pattern 0x59733a0943465fc4f5540b368d92a9d08472e959.

RLP Filtering

After entering all the data, click Add Action & Filter.

If the Action and Filter was successfully added, you can only make API calls for the specified account address with the Project ID and Key.

cURL example:

Call successful (The specified address (0x59733a0943465fc4f5540b368d92a9d08472e959) was entered correctly in from)

Call unsuccessful (An address other than 0x59733a0943465fc4f5540b368d92a9d08472e959 was entered in from)

Approving All Calls for a Specific Action

If you want to approve all calls for a specific Action, just add the Action without adding the Sub Action and Filter.

We will demonstrate this with two examples.

Allowing specific Actions

1. Allow calls for all methods of Node API

You can allow all calls for the Action node::CallRPC for the Project ID/Key that you obtained.

Select the Project from the Project List and click on the Actions & Filters tab. As you can see below, select node::CallRPC for Action, and leave the Sub Action and Action Filter fields empty.

Node API Filtering - 1

And then click on Add Action & Filter.

Now using the Project ID/Key, all calls for the Action node::CallRPC are allowed.

2. Allow minting of all KIP-17 tokens

You can allow all calls for the Action kip17::MintToken for the Project ID/Key that you obtained.

First, select the Project from the Project List and click on the Actions & Filters tab. As you can see below, select kip17::MintToken for Action. Skip Sub Action because it doesn't apply here, and also leave the Action Filter empty.

Filtering KIP-17 Token Minting - 1

And then click on Add Action & Filter.

Now using the Project ID/Key, all calls for the Action node::CallRPC are allowed.

Multiple Filters for Action

Specific item size for "Get KIP-17 Token History"

Project allows you to apply multiple filters for a specific Action. For example, you can apply two filters, size=3 and size=5, for the Action "Get KIP-17 Token History". Select the Project from the Project List and go to the Actions & Filters tab.

Allow size=3

As you can see below, select kip17::GetTokenHistory as Action and skip Sub Action because it doesn't apply here. For Action Filter select Query type and enter "size" for Filter name, and "3" for Filter pattern. Click Add, and then Add Action & Filter.

Filtering KIP-17 Token History - 1

Allow size=5

You will see that an Action kip17:GetTokenHistory with a size=3 filter has been added. Now select kip17::GetTokenHistory again for Action. And choose Query type for Action Filter, and enter enter "size" for Filter name, and "5" for Filter pattern. Click Add, and then Add Action & Filter.

Filtering KIP-17 Token History - 2

If you add multiple size filters for one Action like in the picture below, you won't be able to make any calls for kip17::GetTokenHistory.

Filtering KIP17 Token History - 3

Defining KAS Actions

Anchor API

Domain: https://anchor-api.klaytnapi.com

For more details on Anchor API, please refer to Anchor API Reference.

Action ID
API
PATH
Description

anchor:operator:RetrieveOperators

GET

/v1/operator

Returns a list of all operators

anchor:operator:RetrieveOperator

GET

/v1/operator/:operator-id

Returns a list of specified operators

anchor:block:AnchorBlock

POST

/v1/anchor

Creates an anchoring transaction

anchor:block:RetrieveTxs

GET

/v1/operator/:operator-id/tx

Returns a list of anchoring transactions by operator

anchor:block:RetrieveTxByHash

GET

/v1/operator/:operator-id/tx/:transaction-hash

Returns a list of anchoring transactions bt transaction hash

anchor:block:RetrieveTxByPayload

GET

/v1/operator/:operator-id/payload/:payload-id

Returns a list of transactions by payload

Node API

Domain: https://node-api.klaytnapi.com

For more details on Node API, please refer toNode API Reference.

Action ID
API
PATH
Description

node::CallRPC

POST

/v1/klaytn

Call JSON RPC

node::GetFtContractMetadata

GET

/v1/metaadata/ft/:address

Returns the metadata of a FT Contract

node::GetNftContractMetadata

GET

/v1/metaadata/nft/:address

Returns the metadata of a NFT Contract

node::GetNftMetadata

GET

/v1/metaadata/nft/:address/:id

Returns the metadata of a NFT

Token Hisotry API

Domain: https://th-api.klaytnapi.com

For more details on Token History API, please refer to Token History API Reference.

Action ID
API
PATH
Description

th:preset-pool:GetTransfersByPresetPools

GET

/v2/transfer

Returns token transfer history

th::GetTransfersByTxHash

GET

/v2/transfer/tx/:txHash

Returns token transfer history by transaction hash

th::GetTransfersByAddress

GET

/v2/transfer/account/:address

Returns token transfer history by address

th::GetContractFts

GET

/v2/contract/ft

Returns a list of the data of all FT contracts

th::GetContractFt

GET

/v2/contract/ft/:ftAddress

Returns the data of a specified FT contract

th::GetContractNfts

GET

/v2/contract/nft

Returns the data of all NFT contracts

th::GetContractNft

GET

/v2/contract/nft/:nftAddress

Returns the data of a specified NFT contract

th::GetContractMts

GET

/v2/contract/mt

Returns the data of all MT contracts

th::GetContractMt

GET

/v2/contract/mt/:mtAddress

Returns the data of a specified MT contract

th::GetContractNftTokens

GET

/v2/contract/nft/:nftAddress/token

Returns the data of all tokens of an NFT contract

th::GetContractNftTokensByOwner

GET

/v2/contract/nft/:nftAddress/owner/:ownerAddress

Returns the data of all NFT tokens belonging to an address

th::GetContractNftToken

GET

/v2/contract/nft/:nftAddress/token/:tokenId

Returns the data of a specified NFT token

th::GetContractMtTokens

GET

/v2/contract/mt/:mtAddress/token

Returns the data of all tokens of an MT contract

th::GetContractMtTokensById

GET

/v2/contract/mt/:mtAddress/token/:tokenId

Returns the ownership history of a specified MT

th::GetContractMtTokensByOwner

GET

/v2/contract/mt/:mtAddress/owner/:ownerAddress

Returns the data of all MT tokens belonging to a specific address

th::GetContractMtTokenByOwner

GET

/v2/contract/mt/:mtAddress/owner/:ownerAddress/token/:tokenId

Returns the data of a specified MT token belonging to a specific address

th::GetContractNftTokenHistory

GET

/v2/contract/nft/:nftAddress/token/:tokenId/history

Returns the ownership history of a specified NFT

th::GetAccountContracts

GET

/v2/account/:address/contract

Returns the data of a specified contract belonging to a specific address

th::GetAccountTokens

GET

/v2/account/:address/token

Returns the data of a specified token belonging to a specific address

Wallet API

Domain: https://wallet-api.klaytnapi.com

For more details on Wallet API, please refer to Wallet API Reference.

Action ID
API
PATH
Description

wallet::CreateAccount

POST

/v2/account

Creates basic account

wallet:account:GetAccounts

GET

/v2/account

Returns a list of accounts

wallet:account:GetAccount

GET

/v2/account/:address

Returns a specified account

wallet:account:DeleteAccount

DELETE

/v2/account/:address

Deletes a specified account

wallet:account:DisableAccount

PUT

/v2/account/:address/disable

Deactivates a specified account

wallet:account:EnableAccount

PUT

/v2/account/:address/enable

Activates a specified account

wallet:account:SignTx

POST

/v2/account/:address/tx/:tx_id/sign

Signs a transaction

wallet:account:UpdateToMultisigAccount

PUT

/v2/account/:address/multisig

Updates the account to Multisig

wallet:account:GetAssociatedAccountsWithPubKey

GET

/v2/pubkey/:public_key/account

Returns the accounts associated with a specified public key

wallet:account:CreateFeePayerAccount

POST

/v2/feepayer

Creates a fee payer account

wallet:account:GetFeePayerAccounts

GET

/v2/feepayer

Returns a list of fee payer accounts

wallet:account:GetFeePayerAccount

GET

/v2/feepayer/:address

Returns a specified fee payer account

wallet:account:DeleteFeePayerAccount

DELETE

/v2/feepayer/:address

Deletes a specified fee payer account

wallet:tx:basic-LegacyTx

POST

/v2/tx/legacy

Creates a legacy transaction

wallet:tx:basic-ValueTransferTx

POST

/v2/tx/value

Creates a Klay transfer transaction

wallet:tx:basic-ContractDeployTx

POST

/v2/tx/contract/deploy

Creates a contract deployment transaction

wallet:tx:basic-ContractExecuteTx

POST

/v2/tx/contract/execute

Creates a contract execution transaction

wallet:tx:basic-CancelTx

DELETE

/v2/tx

Cancels a transaction

wallet:tx:basic-AnchorTx

POST

/v2/tx/anchor

Creates an anchoring transaction

wallet:tx:basic-RLPTx

POST

/v2/tx/rlp

Creates a transaction using RLP

wallet:tx:basic-UpdateAccountTx

PUT

/v2/tx/account

Creates an account update transaction

wallet:tx:GetTxInfo

GET

/v2/tx/:tx_hash

Returns a specified transaction by transaction hash

wallet:tx:ContractCall

POST

/v2/tx/contract/call

Calls a specified contract

wallet:tx:fd-FDValueTransferTx

POST

/v2/tx/fd/value

Creates a Klay transfer transaction with global fee delegation

wallet:tx:fd-FDContractDeployTx

POST

/v2/tx/fd/contract/deploy

Creates a contract deployment transaction with global fee delegation

wallet:tx:fd-FDContractExecuteTx

POST

/v2/tx/fd/contract/execute

Creates a contract execution transaction with global fee delegation

wallet:tx:fd-FDCancelTx

DELETE

/v2/tx/fd

Creates a transaction to cancel transaction with global fee deletation

wallet:tx:fd-FDAnchorTx

POST

/v2/tx/fd/anchor

Creates an anchoring transaction with global fee deletation

wallet:tx:fd-FDRLPTx

POST

/v2/tx/fd/rlp

Creates a transaction using RLP with global fee deletation

wallet:tx:fd-FDUpdateAccountTx

PUT

/v2/tx/fd/account

Creates a transaction for updating account with global fee deletation

wallet:tx:fduser-UserFDValueTransferTx

POST

/v2/tx/fd-user/value

Creates a Klay transfer transaction with user fee delegation

wallet:tx:fduser-UserFDContractDeployTx

POST

/v2/tx/fd-user/contract/deploy

Creates a contract deployment transaction with user fee delegation

wallet:tx:fduser-UserFDContractExecuteTx

POST

/v2/tx/fd-user/contract/execute

Creates a contract execution transaction with user fee delegation

wallet:tx:fduser-UserFDCancelTx

DELETE

/v2/tx/fd-user

Creates a transaction to cancel a transaction with user fee delegation

wallet:tx:fduser-UserFDAnchorTx

POST

/v2/tx/fd-user/anchor

Creates an anchoring transaction with user fee delegation

wallet:tx:fduser-UserFDRLPTx

POST

/v2/tx/fd-user/rlp

Creates a transaction using RLP with user fee delegation

wallet:tx:fduser-UserFDUpdateAccountTx

PUT

/v2/tx/fd-user/account

Creates a transaction for updating account with user fee delegation

wallet:tx:GetMultisigTxInfo

GET

/v2/multisig/account/:address/tx

Returns a pending transaction

wallet:tx:SignMultisigTx

POST

/v2/multisig/account/:address/tx/:tx_id/sign

Signs a pending transaction

wallet:tx:SignMultisigTxBySig

POST

/v2/multisig/tx/:tx_id/sign

Signs transaction

wallet:stat:GetAccountCount

GET

/v2/stat/count

Returns the number of the Klaytn accounts and keys belonging to a user

wallet:stat:GetAccountCountByKRN

GET

/v2/stat/count/krn

Returns the number of Klaytn accounts in a specified account pool

wallet🔑CreateKey

POST

/v2/key

Creates a new key

wallet🔑GetKey

GET

/v2/key/:key_id

Returns a specified key

wallet🔑DeleteKey

DELETE

/v2/key/:key_id

Deletes a specified key

wallet🔑SignData

POST

/v2/key/:key_id/sign

Signs data using a specified key

wallet:account:RegisterAccounts

POST

/v2/registration/account

Registers an account

KIP-17 API

Domain: https://kip17-api.klaytnapi.com

For more details on KIP-17 API, please refer to KIP-17 API Reference.

Action ID
API
PATH
Description

kip17::DeployContract

POST

/v2/contract

Deploys a KIP-17 Contract

kip17::ListContractsInDeployerPool

GET

/v2/contract

Returns a list of KIP-17 contracts

kip17::GetContract

GET

/v2/contract/:caoa

Returns a specified KIP-17 contract

kip17::MintToken

POST

/v2/contract/:caoa/token

Returns a specified KIP-17 contract token of a specified contract

kip17::ListTokensInContract

GET

/v2/contract/:caoa/token

Returns a list of tokens issued from a specified KIP-17 contract

kip17::GetToken

GET

/v2/contract/:caoa/token/:token-id

Returns the data of a specified token of a KIP-17 contract

kip17::TransferToken

POST

/v2/contract/:caoa/token/:token-id

Sends a specified KIP-17 token

kip17::BurnToken

DELETE

/v2/contract/:caoa/token/:token-id

Burns a specified KIP-17 token

kip17::ApproveToken

POST

/v2/contract/:caoa/approve/:token-id

Approves the transfer of a specified token of a specified contract

kip17::ApproveAll

POST

/v2/contract/:caoa/approveall

Approves the transfer of all tokens of a specified contract

kip17::GetOwnerTokens

POST

/v2/contract/:caoa/owner/:owner

Returns a list of tokens owned by a specified owner

kip17::GetTokenHistory

GET

/v2/contract/:caoa/token/:token-id/history

Returns ownership history of a specified token

KIP-7 API

Domain: https://kip7-api.klaytnapi.com

For more details on KIP-7 API, please refer to KIP-7 API Reference.

Action ID
API
PATH
Description

kip7::ListContractsInDeployerPool

GET

/v1/contract

Returns a list of KIP-7 contracts

kip7::DeployContract

POST

/v1/contract

Deploys a KIP-7 contract

kip7::GetContract

GET

/v1/contract/:caoa

Returns the data of a specified KIP-7 contract

kip7::PauseContract

POST

/v1/contract/:caoa/pause

Pauses a specified KIP-7 contract

kip7::UnpauseContract

POST

/v1/contract/:caoa/unpause

Resumes a specified KIP-7 contract

kip7::MintToken

POST

/v1/contract/:caoa/mint

Creates a new KIP-7 token

kip7::TransferToken

POST

/v1/contract/:caoa/transfer

Sends a KIP-7 token

kip7::TransferFromToken

POST

/v1/contract/:caoa/transfer-from

Sends a KIP-7 token on behalf of a third party

kip7::GetTokenBalance

GET

/v1/contract/:caoa/account/:owner/balance

Returns the balance of KIP-7 tokens of an account

kip7::ApproveToken

POST

/v1/contract/:caoa/approve

Approves the transfer of a token

kip7::GetAllowanceToken

GET

/v1/contract/:caoa/account/:owner/allowance/:spender

Returns the list of approved KIP-7 tokens

kip7::BurnToken

DELETE

/v1/contract/:caoa/burn

Deletes KIP-7 tokens

kip7::BurnFromToken

DELETE

/v1/contract/:caoa/burn-from

Deletes approved KIP-7 tokens

kip7::GetDefaultDeployer

GET

/v1/deployer/default

Returns the default contract deployer accounts

KIP-37 API

Domain: https://kip37-api.klaytnapi.com

For more details on KIP-37 API, please refer to KIP-37 API Reference.

Action ID
API
PATH
Description

kip37:externalApi:HandleGetContracts

GET

/v2/contract

Returns a list of KIP-37 contracts

kip37:externalApi:HandleDeployContract

POST

/v2/contract

Deploys a KIP-37 contract

kip37:externalApi:HandleImportContract

POST

/v2/contract/import

Imports KIP-37 contracts

kip37:externalApi:HandleGetContract

GET

/v2/contract/:caoa

Returns KIP-37 contract data

kip37:externalApi:HandleUpdateContract

PUT

/v2/contract/:caoa

Updates KIP-37 contract data

kip37:externalApi:HandleApproveAll

POST

/v2/contract/:contract-address-or-alias/approveall

Approves transfers for all tokens of a KIP-37 contract

kip37:externalApi:HandlePauseContract

POST

/v2/contract/:contract-address-or-alias/pause

Pauses a KIP-37 contract

kip37:externalApi:HandleUnpauseContract

POST

/v2/contract/:contract-address-or-alias/unpause

Resumes a KIP-37 contract

kip37:externalApi:HandleCreateToken

POST

/v2/contract/:contract-address-or-alias/token

Creates a KIP-37 token

kip37:externalApi:HandleGetTokens

GET

/v2/contract/:contract-address-or-alias/token

Returns a list of KIP-37 tokens

kip37:externalApi:HandleMintTokens

POST

/v2/contract/:contract-address-or-alias/token/mint

Mints additional KIP-37 tokens

kip37:externalApi:HandleTransferTokens

POST

/v2/contract/:contract-address-or-alias/token/transfer

Transfers a KIP-37 token

kip37:externalApi:HandleBurnTokens

DELETE

/v2/contract/:contract-address-or-alias/token

Burns a KIP-37 token

kip37:externalApi:HandlePauseToken

POST

/v2/contract/:contract-address-or-alias/token/pause/:token-id

Pauses a KIP-37 token

kip37:externalApi:HandleUnpauseToken

POST

/v2/contract/:contract-address-or-alias/token/unpause/:token-id

Resumes a KIP-37 token

kip37:externalApi:HandleGetTokenOwnershipsByOwner

GET

/v2/contract/:contract-address-or-alias/owner/:owner-address/token

Returns a list of KIP-37 tokens owned by a specified account

kip37:externalApi:HandleGetDefaultDeployer

GET

/v2/deployer/default

Returns the default contract deployer account

Metadata API

Domain: https://metadata-api.klaytnapi.com

For more details on KIP-37 API, please refer to Metadata API Reference.

Action ID
API
PATH
Description

metadata:externalApi:UploadMetadata

POST

/v1/metadata

Uploads metadata

metadata:externalApi:UploadAsset

POST

/v1/metadata/asset

Uploads assets

Last updated

Was this helpful?