ERC1155 Token

Token ERC1155 APIs support HTTP protocol. It uses erc1155_ namespace.

erc1155_create

Create an ERC1155 NFT.

Parameters

NameTypeDescription

sender

String

Sender address

name

String

Token name Max length : 200

symbol

String

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

tempKey

String

tempKey for "create"

hashKey

String

hash(tempKey | secretKey)

signature

String

sign( hash( owner | name | symbol | tempKey | hashKey ) ) by owner'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"
        }
    }
}

erc1155_mint

Mint the new tokenId by amount. Only the token owner can do this.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token

sender

String

Sender address

address

String

address

tokenId

BigInteger

tokenId to mint

amount

BigInteger

amount to mint

commet

String

Comment Max length : 200

tempKey

String

tempKey for "mint"

hashKey

String

hash(tempKey | secretKey)

signature

String

sign(hash( contractAddress | owner | tokenId | amount | 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.

Example

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

erc1155_mintBatch

Mint multiple new tokenId by amount. Only the token owner can do this.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token

sender

String

Sender address

address

String

address

tokenIds

String

tokenId list to mint. ex) 10,11

amounts

String

amount list to mint. ex) 10000,12000

commet

String

Comment Max length : 200

tempKey

String

tempKey for "mint"

hashKey

String

hash(tempKey | secretKey)

signature

String

sign( hash( contractAddress | owner | tokensIds | amounts | 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.

Example

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

erc1155_getBalance

Return an address Token balance.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token.

address

String

Address

tokenId

BigInteger

tokenId

Return Value

NameTypeDescription

balance

BigInteger

Token balance of address and tokenId.

Example

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

erc1155_transferFrom

Transfer token amount from from-address to to-address.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token

sender

String

Sender address

fromAddress

String

From address

toAddress

String

To address

tokenId

BigInteger

tokenId

amount

BigInteger

Transfer amount

comment

String

Comment Max length : 200

tempKey

String

tempKey for "transfer"

hashKey

String

hash(tempKey | fromAddress' secretKey)

signature

String

sign( hash( contractAddress | address | fromAddress | toAddress | tokenId | amount | 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"
        }
    }
}

erc1155_transferFromBatch

Transfer multiple token amount from from-address to to-address.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token

sender

String

Sender address

fromAddress

String

From address

toAddress

String

To address

tokenIds

String

Transfer tokenId list. ex) 10,11

amounts

String

Transfer amount list. ex) 100,200

comment

String

Comment Max length : 200

tempKey

String

tempKey for "transfer"

hashKey

String

hash(tempKey | fromAddress' secretKey)

signature

String

sign( hash( contractAddress | address | fromAddress | toAddress | tokenIds | amounts | 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"
        }
    }
}

erc1155_setApprovalForAll

Approval settings for all token to operator.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token

sender

String

Sender address

operator

String

Operator address

approved

Integer

Approval set value. 1 : true, 0 : false

comment

String

Comment Max length : 200

tempKey

String

tempKey for "approve"

hashKey

String

hash(tempKey | fromAddress' secretKey)

signature

String

sign( hash( contractAddress | sender | operator | approved | 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"
        }
    }
}

erc1155_isApprovedForAll

Returns the value of the operator's approval setting for address .

Parameters

NameTypeDescription

contractAddress

String

Contract address of token.

address

String

Owner address

operator

String

Operator address

Return Value

NameTypeDescription

approved

Boolean

Approval set value

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "approved": true
        }
    }
}

erc1155_setURI

Set the uri to tokenId. Only the token owner can do this.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token

sender

String

Address

tokenId

BigInteger

token Id

uri

String

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

tempKey

String

tempKey for "setURI"

hashKey

String

hash(tempKey | secretKey)

signature

String

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

erc1155_getURI

Returns a uri data of tokenId.

Parameters

NameTypeDescription

contractAddress

String

Contract address of token

address

String

Address

tokenId

BigInteger

Token Id

Return Value

NameTypeDescription

uri

String

The uri data of token.

Example

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

Last updated