네트워크
Token Net APIs support HTTP protocol. It uses net_ namespace.
net_getTempKey
생성된 tempKey를 주소별로 반환합니다.
파라메터
Name | Type | Description |
---|---|---|
address | String | 주소 |
keyType | String | 아래 키타입 섹션 참조. |
키타입
Transaction Type | keyType String |
---|---|
Export Address | exportAddress |
Create Token | create |
Burn | burn |
Transfer | transfer |
Approve | approve |
Mint | mintNFT |
리턴 값
Name | Type | Description |
---|---|---|
tempKey | String | tempKey |
예제
net_getTransactionStatus
트랜잭션 상태를 반환합니다.
파라메터
Name | Type | Description |
---|---|---|
transactionId | String | Transaction Id |
리턴 값
Name | Type | Description |
---|---|---|
status | Integer | 상태 타입 참조 |
revertReason | String | Reverted reason, if transaction fail. |
상태 타입
Status | Description |
---|---|
1 | 성공 |
0 | 실패 |
2 | 비정상 |
-1 | 보류중 |
예제
net_getBalance
PRT 잔액을 반환합니다.
Parameters
Name | Type | Description |
---|---|---|
address | String | Address |
Return Value
Name | Type | Description |
---|---|---|
balance | BigDecimal | balance of address. |
Example
net_transfer
PRT를 From 주소에서 To 주소로 송금합니다.
Parameters
Name | Type | Description |
---|---|---|
sender | String | 송신하는 지 address |
toAddress | String | to address |
amount | BigDecimal | 송금 amount. |
comment | String | Comment Max length : 200 |
tempKey | String | tempKey for "transfer" |
hashKey | String | 해쉬값 (tempKey | fromAddress' secretKey) |
signature | String | 서명값 ( hash (sender | toAddress | amount | tempKey | hashKey) ) by formAddress's privateKey using signData API |
거래를 수행하기 위해서는 from address의 가스 비용 잔액이 적어도 50 MFEI 이상이어야 한다.
리턴 값
Name | Type | Description |
---|---|---|
transactionId | String | Transaction Id |
트랜잭션 ID가 반환되지만 아직 블록에 추가되지 않았습니다. getTransactionStatus를 사용하여 상태가 1인지 확인해야 합니다.
Example
net_getTokenInfo
토큰 정보를 반환합니다.
Parameters
Name | Type | Description |
---|---|---|
contractAddress | String | 토큰에 대한 address of token |
Return Value
Name | Type | Description |
---|---|---|
contractAddress | String | Transaction Id |
tokenType | String | Type of Token : "ERC20" or "ERC721" |
owner | String | Owner's address |
name | String | 토큰 명 |
symbol | String | 토큰 기호 |
decimals | Integer | 토큰 decimals |
initialSupply | BigInteger | 최초 supply amount |
txId | String | 트렌잭션 Id |
blockNumber | Long | 트랜잭션을 포함하는 블록 번호입니다.. |
txTime | String | 트랜잭션이 생성된 시간. |
status | Integer | 트랜잭션 상태 값 참조 getTransactionStatus API. |
gasValue | BigDecimal String | 트랜잭션에 사용된 가스입니다. |
Example
Last updated