네트워크

Token Net APIs support HTTP protocol. It uses net_ namespace.

net_getTempKey

생성된 tempKey를 주소별로 반환합니다.

파라메터

NameTypeDescription

address

String

주소

keyType

String

아래 키타입 섹션 참조.

키타입

Transaction TypekeyType String

Export Address

exportAddress

Create Token

create

Burn

burn

Transfer

transfer

Approve

approve

Mint

mintNFT

리턴 값

NameTypeDescription

tempKey

String

tempKey

예제

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": { 
            "tempKey": "ffd5b9f7f4650366bd7043271bfcf0eb",
        }
    }
}

net_getTransactionStatus

트랜잭션 상태를 반환합니다.

파라메터

NameTypeDescription

transactionId

String

Transaction Id

리턴 값

NameTypeDescription

status

Integer

상태 타입 참조

revertReason

String

Reverted reason, if transaction fail.

상태 타입

StatusDescription

1

성공

0

실패

2

비정상

-1

보류중

예제

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "status": 0,
            "revertReason":"&ERC20: transfer amount exceeds balance"
        }
    }
}

net_getBalance

PRT 잔액을 반환합니다.

Parameters

NameTypeDescription

address

String

Address

Return Value

NameTypeDescription

balance

BigDecimal

balance of address.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "balance": "100.12"
        }
    }
}

net_transfer

PRT를 From 주소에서 To 주소로 송금합니다.

Parameters

NameTypeDescription

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 이상이어야 한다.

리턴 값

NameTypeDescription

transactionId

String

Transaction Id

트랜잭션 ID가 반환되지만 아직 블록에 추가되지 않았습니다. getTransactionStatus를 사용하여 상태가 1인지 확인해야 합니다.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "transactionId": "0xf7d37be47ce8b563b07aa5e81e17e9722bab2e71374d970a558b45c0ed51df7b"
        }
    }
}

net_getTokenInfo

토큰 정보를 반환합니다.

Parameters

NameTypeDescription

contractAddress

String

토큰에 대한 address of token

Return Value

NameTypeDescription

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

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "contractAddress":"0xe65106614ffa3510d1b1d0987d28a5ce9cd4dfb1",
            "tokenType":"ERC20",
            "owner":"0x666cf9aed17a9dfb4ae91b80789dd99803568b11",
            "tokenDesc":"Ibexlab Test token",
            "symbol":"TOK3",
            "decimals":18,
            "initialSupply":"20000000",
            "txId":"0xaff42527a42d60ca3fb548fd799b01e6f57e309cd12c226881487266cd5dd2c9",
            "blockNumber":799245,
            "txTime":"2021-12-13T13:18:20",
            "status":1,
            "gasValue":"0.000000001185297"
        }
    }
}

Last updated