ERC721 Token

Token ERC721 APIs support HTTP protocol. It uses erc721_ namespace.

erc721_create

Create an ERC721 NFT.

Parameters

NameTypeDescription

sender

String

Sender address

name

String

Token name Max length : 30

symbol

String

Token symbol. Consists of only alphanumeric characters and can contain up to 4 characters. Max length : 4

maxTotalSupply

BigInteger

Max total supply amount of token

tempKey

String

tempKey for "create"

hashKey

String

hash(tempKey | secretKey)

signature

String

sign( hash ( sender | name | symbol | maxTotalSupply | tempKey | hashKey ) ) by sender's privateKey using signData API

In order to perform a transaction, the owner must have a balance of at least 4 GFEI for gas cost.

Return Value

NameTypeDescription

transactionId

String

Transaction Id

contractAddress

String

Token contract address

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 net_getTransactionStatus.

Example

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

erc721_getBalance

Return an address Token balance.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token.

address

String

Address

Return Value

NameTypeDescription

balance

BigInteger

Token balance of address.

Example

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

erc721_getMintedTokenId

Return a minted tokenId.

Parameters

NameTypeDescription

transactionId

String

TransactionId of erc721_mint.

Return Value

NameTypeDescription

tokenId

BigInteger

minted tokenId. If it is an error, this is null .

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "tokenId": "1"
        }
    }
}

erc721_mint

Create new token with uri data. Only the token owner can do this..

Parameters

NameTypeDescription

contractAddress

String

Contract address of token

sender

String

Address

uri

String

The uri data to store in the token. Max length : 100

commet

String

Comment Max length : 200

tempKey

String

tempKey for "mint"

hashKey

String

hash(tempKey | secretKey)

signature

String

sign( hash ( contractAddress | sender | uri | tempKey | hashKey ) ) by owner's privateKey using signData API

In order to perform a transaction, the owner must have a balance of at least 100 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 net_getTransactionStatus.

The generated tokenId can be checked using erc721_getMintedTokenId API.

Example

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

erc721_getURI

Returns an owner and uri data of tokenId.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token

address

String

Address

tokenId

BigInteger

Token Id

Return Value

NameTypeDescription

owner

String

Owner's address

uri

String

The uri data of token.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "owner":"0x666cf9aed17a9dfb4ae91b80789dd99803568b11",
            "uri":"0xaff42527a42d60ca3fb548fd799b01e6f57e309cd12c226881487266cd5dd2c9"
        }
    }
}

erc721_transfer

Transfer NFT owner from from-address to to-address.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token

sender

String

Sender address

toAddress

String

To address

tokenId

BigInteger

Token Id

comment

String

Comment Max length : 200

tempKey

String

tempKey for "transfer"

hashKey

String

hash(tempKey | fromAddress' secretKey)

signature

String

sign( hash ( contractAddress | sender | toAddress | tokenId | 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 100 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 net_getTransactionStatus.

Example

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

erc721_transferFrom

Transfer NFT owner from from-address to to-address by spender address.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token

sender

String

Sender address

fromAddress

String

From address

toAddress

String

To address

tokenId

BigInteger

Token Id

comment

String

Comment Max length : 200

tempKey

String

tempKey for "transfer"

hashKey

String

hash(tempKey | fromAddress' secretKey)

signature

String

sign( hash ( contractAddress | sender | fromAddress | toAddress | tokenId | tempKey | hashKey ) ) by address's privateKey using signData API

In order to perform a transaction, the spender address must have a balance of at least 100 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 net_getTransactionStatus.

Example

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

erc721_approve

Approve token from owner-address to spender-address.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token

sender

String

Sender address

spender

String

Spender address

tokenId

BigInteger

Token Id

comment

String

Comment Max length : 200

tempKey

String

tempKey for "approve"

hashKey

String

hash(tempKey | fromAddress' secretKey)

signature

String

sign( hash ( contractAddress | sender | spender | tokenId | 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 100 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 net_getTransactionStatus.

Example

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

erc721_getApproved

Returns an allowed token spender from owner address.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token.

address

String

Owner address

tokenId

BigInteger

Token Id

Return Value

NameTypeDescription

address

String

Spender's address

Example

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

Last updated