KTHULU DOCS
Search
K
Comment on page

NFT 전송

개요

트랜잭션을 전송합니다.

  1. 1.
    코인(transfer) 및 NFT(safeTransferFrom)를 전송하는 트랜잭션을 생성합니다.
  2. 2.
    생성한 트랜잭션에 서명합니다.
  3. 3.
    서명된 트랜잭션을 전송합니다.
Android
iOS
Web

Parameters

이름
타입
설명
참조
network
String
네트워크
required
from
String
보낸 계정
required
to
String
받는 계정
required
collection_id
String
컬렉션 아이디
required
token_id
String
NFT 토큰 아이디
required
amount
String
전송량
if ERC1155 required

Response

object
이름
타입
설명
result
String
전송 성공여부("OK", "FAIL")
value (array of object)
이름
타입
설명
transaction_hash
String
전송 트랜잭션 해쉬

Example

//parameters
val network = "polygon"
val from = "0x..."
val to = "0x..."
val collection_id = "0x..."
val token_id = "7"
val amount = "1"
//ERC721
val sendERC721 = sendNFT721TransactionAsync(network,
from,
to,
token_id,
collection_id)
//ERC1155
val sendERC1155 = sendNFT1155TransactionAsync(network,
from,
to,
token_id,
collection_id,
amount)
println(sendERC721)
println(sendERC1155)
//result log
/*
{
"result" : "OK",
"value": [
{
"transaction_hash": "0x..."
}
]
}
*/

Parameters

이름
타입
설명
참조
network
String
네트워크
required
from
String
보낸 계정
required
to
String
받는 계정
required
collection_id
String
컬렉션 아이디
required
token_id
String
NFT 토큰 아이디
required
amount
String
전송량
if ERC1155 required

Response

object
이름
타입
설명
result
String
전송 성공여부("OK", "FAIL")
value (array of object)
이름
타입
설명
transaction_hash
String
전송 트랜잭션 해쉬

Example

//parameters
let network = "polygon"
let from = "0x..."
let to = "0x..."
let collection_id = "0x..."
let token_id = "7"
let amount = "1"
//ERC721
let sendERC721 = try await sendNFT721TransactionAsync(network: network,
from: from,
to: to,
token_id: token_id,
collection_id: collection_id)
//ERC1155
let sendERC1155 = try await sendNFT1155TransactionAsync(network: network,
from: from,
to: to,
token_id: token_id,
collection_id: collection_id,
amount: amount)
print(sendERC721)
print(sendERC1155)
//result log
/*
{
"result" : "OK",
"value": [
{
"transaction_hash": "0x..."
}
]
}
*/