Send Tokens

Sends tokens minted from a given KIP-37 contract. You can select the number and the amount of tokens to send.

Sender

The account that sends the transaction.

You can omit the KRN if the sender address is managed by KIP-37 or Wallet Service account-pool.
Otherwise you have to provide the KRN object in the header (x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}).

Batch Items

It is possible to send different tokens in different amounts. Different functions will be called according to the number of Batch Items (ids, amounts) in the request.

  • One element: the safeTransferFrom function
  • Many elements: the safeBatchTransferFrom function
Request
Security:
path Parameters
contract-address-or-alias
required
string

Contract address (in hex.) or alias.

header Parameters
x-chain-id
required
string

Kaia Network Chain ID (1001 or 8217)

x-krn
string

The KRN (KAS Resource Name) unique to an Account Pool

Request Body schema: application/json
sender
required
string

The Kaia account address to send the tokens

owner
required
string

The Kaia account address that owns the tokens

to
required
string

The Kaia account address to receive the tokens

ids
required
Array of strings

Array of IDs of the tokens to send

amounts
required
Array of strings

Array of the tokens to send (in hex.)

Responses
200

Your request was successful.

400

The request is not valid.

404

The resource you requested does not exist.

post/v2/contract/{contract-address-or-alias}/token/transfer
Request samples
application/json
{
  • "sender": "0x9eaf20b40e0f1ced5dbba6f5cfb0d3e12b0534f4",
  • "owner": "0x9eaf20b40e0f1ced5dbba6f5cfb0d3e12b0534f4",
  • "to": "0xDc277E2D89b92336A4ee80be3c7142443FDaDE47",
  • "ids": [
    ],
  • "amounts": [
    ]
}
Response samples
application/json

Your request was successful.

{
  • "status": "Submitted",
  • "transactionHash": "0xb5a0618be3508b3fe22e35aa96063005dd4c557cf040348cc542b0726cc30f7b"
}