Net

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

net_getTempKey

Returns a generated tempKey by address

Parameters

NameTypeDescription

address

String

Address

keyType

String

See below keyType section.

keyType

Transaction TypekeyType String

Export Address

exportAddress

Create Token

create

Burn

burn

Transfer

transfer

Approve

approve

Mint

mintNFT

Return Value

NameTypeDescription

tempKey

String

tempKey

Example

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

net_getTransactionStatus

Returns a status of transaction.

Parameters

NameTypeDescription

transactionId

String

Transaction Id

Return Value

NameTypeDescription

status

Integer

See below status type.

revertReason

String

Reverted reason, if transaction fail.

Status type

StatusDescription

1

Success

0

Fail

2

Invalid

-1

Pending

Example

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

net_getBalance

Return an address FIX balance.

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

Transfer FIX from from-address to to-address.

Parameters

NameTypeDescription

sender

String

Sender address

toAddress

String

To address

amount

BigDecimal

Transfer amount.

comment

String

Comment Max length : 200

tempKey

String

tempKey for "transfer"

hashKey

String

hash(tempKey | fromAddress' secretKey)

signature

String

sign( hash (sender | toAddress | amount | tempKey | hashKey) ) by formAddress's privateKey using signData API

In order to perform a transaction, the from address must have a balance of at least 50 MFEI for gas cost.

Return Value

NameTypeDescription

transactionId

String

Transaction Id

A transactionId is returned, but that doesn't mean it has been added to the Block yet. You should check that the status is 1 by using getTransactionStatus.

Example

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

net_getTokenInfo

Returns a token information.

Parameters

NameTypeDescription

contractAddress

String

Contract 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

Token name

symbol

String

Token symbol

decimals

Integer

Token decimals

initialSupply

BigInteger

Initial supply amount

txId

String

Transaction Id

blockNumber

Long

The block number containing the transaction.

txTime

String

Time the transaction was created.

status

Integer

Transaction status value, see getTransactionStatus API.

gasValue

BigDecimal String

The gas used by the transaction.

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