KTHULU DOCS
Search
K
Comment on page

NFT 민트 (발행)

개요

NFT를 발행합니다. 발행된 NFT는 스마트 컨트랙트의 정의에 따라 고유한 디지털 자산으로써 블록체인에 등록됩니다. 해당 NFT의 소유권은 발행자(민터)에게 있습니다.

ERC721, ERC1155를 지원합니다.

NFT 컬렉션 생성 SDK 기능을 사용하여 생성된 컬렉션의 NFT만 민트할 수 있습니다.

Android
iOS
Web

Parameters

이름
타입
설명
참조
network
String
네트워크
required
collection_id
String
컬렉션 아이디
required
from
String
보내는 계정
required
to
String
받는 계정
required
token_id
String
발행 NFT 토큰 아이디
required
token_uri
String
토큰 uri
if uri_type = 2 [{tokenUri}] (required)
amount
String
NFT 발행량
if ERC1155 required

Response

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

Example

// parameters
val network = "polygon"
val collection_id = "0x..."
val from = "0x..."
val to = "0x..."
val token_id = "617"
val token_uri = "https://kthulu.io/1.json"
val amount = "1"
//ERC721
val mintERC721 = mintErc721Async(network,
from,
to,
token_uri,
token_id,
collection_id)
//ERC1155
val mintERC1155 = mintErc1155Async(network,
from,
to,
token_uri,
token_id,
collection_id,
amount)
println(mintERC721)
println(mintERC1155)
// result log
/*
{
"result" : "OK",
"value": [
{
"transaction_hash": "0x..."
}
]
}
*/

Parameters

이름
타입
설명
참조
network
String
네트워크
required
collection_id
String
컬렉션 아이디
required
from
String
보내는 계정
required
to
String
받는 계정
required
token_id
String
발행 NFT 토큰 아이디
required
token_uri
String
토큰 uri
if uri_type = 2 [{tokenUri}] (required)
amount
String
NFT 발행량
if ERC1155 required

Response

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

Example

// parameters
let network = "polygon"
let collection_id = "0x..."
let from = "0x..."
let to = "0x..."
let token_id = "913"
let token_uri = "https://kthulu.io/1.json"
let amount = "1"
//ERC721
let mintERC721 = try await mintErc721Async(network: network,
from: from,
to: to,
token_uri: token_uri,
token_id: token_id,
collection_id: collection_id)
//ERC1155
let mintERC1155 = try await mintErc1155Async(network: network,
from: from,
to: to,
token_uri: token_uri,
token_id: token_id,
collection_id: collection_id,
amount: amount)
print(mintERC721)
print(mintERC1155)
// result log
/*
{
"result" : "OK",
"value": [
{
"transaction_hash": "0x..."
}
]
}
*/