KTHULU DOCS
Search
K
Comment on page

NFT 홀더인증(서명)

개요

메세지를 개인키로 서명하여 Signature를 생성합니다.
생성된 Signature는 서명자의 공개키로만 복구할 수 있습니다.
서명할 당시의 메세지와 서명자의 공개키를 통해 특정 주소가 서명자가 맞는지 검증할 수 있습니다.
  • prefix에 지정한 값으로만 '검증'이 가능합니다. 즉, 'NFT 홀더인증(서명)'에 사용한 prefix를 'NFT 홀더인증(검증)' prefix 매개변수에 그대로 넣어야 문제없이 검증됩니다.
Android
iOS
Web

Parameters

이름
타입
설명
참조
network
String
네트워크
required
fromAddress
String
서명자
required
collection_id
String
컬렉션 아이디
required
token_id
String
토큰 아이디
required
prefix
String
서명 메세지에 포함될 고유값
required

Response

타입
설명
String
입력한 토큰정보 및 prefix를 조합하여 서명한 signature

example

// parameters
val network = "ethereum"
val fromAddress = "0x..."
val collection_id = "0x..."
val token_id = "1"
val prefix = "singOK"
val signMessage = signMessage(network,
fromAddress,
collection_id,
token_id,
prefix)
println(signMessage)
/**
* {
"result" : "OK",
"value" : [
{"signature" : "0x.."}
]
}
*/

Parameters

이름
타입
설명
참조
network
String
네트워크
required
fromAddress
String
서명자
required
collection_id
String
컬렉션 아이디
required
token_id
String
토큰 아이디
required
prefix
String
서명 메세지에 포함될 고유값
required

Response

타입
설명
String
입력한 토큰정보 및 prefix를 조합하여 서명한 signature

example

// parameters
let network = "ethereum"
let fromAddress = "0x..."
let collection_id = "0x..."
let token_id = "1"
let prefix = "singOK"
let signMessage = try await signMessage(network: network,
fromAddress: fromAddress,
collection_id: collection_id,
token_id: token_id,
prefix: prefix)
print(signMessage)
/**
* {
"result" : "OK",
"value" : [
{"signature" : "0x.."}
]
}
*/

RequestURL

Parameters

이름
타입
설명
참조
network
String
네트워크
required
account
String
계정
required
collection_id
String
컬렉션 아이디
required
token_id
Int
토큰 아이디
required

Response

이름
타입
설명
result
String
호출 결과 성공여부 (성공: OK, 실패: FAIL)
value (array of object)
이름
타입
설명
signature
String
서명된 시그니처

example

{
"network": ["ethereum"],
"account": "0x...",
"collection_id": "0x...",
"token_id": 1
}
let nfts = await nft.getNFTsByWallet(network, account, collection_id, token_id);
/**
* {
"result" : "OK",
"value" : [
{"signature" : "0x.."}
]
}
*/