# ERC1155 Token

### erc1155\_getBalance

Return an address Token balance.

#### Parameters

| Name            | Type       | Description                |
| --------------- | ---------- | -------------------------- |
| contractAddress | String     | Contract address of token. |
| address         | String     | Address                    |
| tokenId         | BigInteger | tokenId                    |

#### Return Value

| Name    | Type       | Description                           |
| ------- | ---------- | ------------------------------------- |
| balance | BigInteger | Token balance of address and tokenId. |

#### Example

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

### erc1155\_mint

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

#### Parameters

| Name            | Type       | Description                                                                                                                                                                                                       |
| --------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| contractAddress | String     | Contract address of token                                                                                                                                                                                         |
| sender          | String     | address of owner                                                                                                                                                                                                  |
| account         | String     | address of mint                                                                                                                                                                                                   |
| tokenId         | BigInteger | tokenId to mint                                                                                                                                                                                                   |
| amount          | BigInteger | amount to mint                                                                                                                                                                                                    |
| tempKey         | String     | tempKey for "mint"                                                                                                                                                                                                |
| hashKey         | String     | hash(tempKey \| secretKey)                                                                                                                                                                                        |
| signature       | String     | sign(hash( contractAddress \| sender \| account \| tokenId \| amount \| tempKey \| hashKey ) ) by owner's privateKey using signData API                                                                           |
| gasPrice        | BigDecimal | gasPrice                                                                                                                                                                                                          |
| nonce           | BigInteger | nonce value. If it is null, it will be filled in automatically. If acceleration is needed, use the nonce value generated when performing the transaction and use a higher gasPrice than the previous transaction. |

#### Return Value

| Name          | Type       | Description    |
| ------------- | ---------- | -------------- |
| transactionId | String     | Transaction Id |
| nonce         | BigInteger | nonce          |

{% hint style="info" %}
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.
{% endhint %}

#### Example

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

### erc1155\_burn

Burn the tokenId by amount. Only the token owner can do this.

#### Parameters

| Name            | Type       | Description                                                                                                                                                                                                       |
| --------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| contractAddress | String     | Contract address of token                                                                                                                                                                                         |
| sender          | String     | address of owner                                                                                                                                                                                                  |
| account         | String     | address of mint                                                                                                                                                                                                   |
| tokenId         | BigInteger | tokenId to mint                                                                                                                                                                                                   |
| amount          | BigInteger | amount to mint                                                                                                                                                                                                    |
| tempKey         | String     | tempKey for "burn"                                                                                                                                                                                                |
| hashKey         | String     | hash(tempKey \| secretKey)                                                                                                                                                                                        |
| signature       | String     | sign(hash( contractAddress \| sender \| account \| tokenId \| amount \| tempKey \| hashKey ) ) by owner's privateKey using signData API                                                                           |
| gasPrice        | BigDecimal | gasPrice                                                                                                                                                                                                          |
| nonce           | BigInteger | nonce value. If it is null, it will be filled in automatically. If acceleration is needed, use the nonce value generated when performing the transaction and use a higher gasPrice than the previous transaction. |

#### Return Value

| Name          | Type       | Description    |
| ------------- | ---------- | -------------- |
| transactionId | String     | Transaction Id |
| nonce         | BigInteger | nonce          |

{% hint style="info" %}
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.
{% endhint %}

#### Example

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

### erc1155\_transfer

Transfer token amount from sender to to-address.

#### Parameters

| Name            | Type       | Description                                                                                                                                                                                                       |
| --------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| contractAddress | String     | Contract address of token                                                                                                                                                                                         |
| sender          | String     | Sender address                                                                                                                                                                                                    |
| toAddress       | String     | To address                                                                                                                                                                                                        |
| tokenId         | BigInteger | tokenId                                                                                                                                                                                                           |
| amount          | BigInteger | Transfer amount                                                                                                                                                                                                   |
| tempKey         | String     | tempKey for "transfer"                                                                                                                                                                                            |
| hashKey         | String     | hash(tempKey \| fromAddress' secretKey)                                                                                                                                                                           |
| signature       | String     | sign( hash( contractAddress \| sender \| toAddress \| tokenId \| amount \| tempKey \| hashKey ) ) by address's privateKey using signData API                                                                      |
| gasPrice        | BigDecimal | gasPrice                                                                                                                                                                                                          |
| nonce           | BigInteger | nonce value. If it is null, it will be filled in automatically. If acceleration is needed, use the nonce value generated when performing the transaction and use a higher gasPrice than the previous transaction. |

#### Return Value

| Name          | Type       | Description    |
| ------------- | ---------- | -------------- |
| transactionId | String     | Transaction Id |
| nonce         | BigInteger | nonce value    |

{% hint style="info" %}
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.
{% endhint %}

#### Example

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

### erc1155\_transferFrom

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

#### Parameters

| Name            | Type       | Description                                                                                                                                                                                                       |
| --------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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                                                                                                                                                                                                   |
| tempKey         | String     | tempKey for "transfer"                                                                                                                                                                                            |
| hashKey         | String     | hash(tempKey \| fromAddress' secretKey)                                                                                                                                                                           |
| signature       | String     | sign( hash( contractAddress \| sender \| fromAddress \| toAddress \| tokenId \| amount \| tempKey \| hashKey ) ) by address's privateKey using signData API                                                       |
| gasPrice        | BigDecimal | gasPrice                                                                                                                                                                                                          |
| nonce           | BigInteger | nonce value. If it is null, it will be filled in automatically. If acceleration is needed, use the nonce value generated when performing the transaction and use a higher gasPrice than the previous transaction. |

#### Return Value

| Name          | Type       | Description    |
| ------------- | ---------- | -------------- |
| transactionId | String     | Transaction Id |
| nonce         | BigInteger | nonce value    |

{% hint style="info" %}
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.
{% endhint %}

#### Example

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

### erc1155\_setApprovalForAll

Approval settings for all token to operator.

#### Parameters

| Name            | Type       | Description                                                                                                                                                                                                       |
| --------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| contractAddress | String     | Contract address of token                                                                                                                                                                                         |
| sender          | String     | Sender address                                                                                                                                                                                                    |
| operator        | String     | Operator address                                                                                                                                                                                                  |
| approved        | Boolean    | true \| false                                                                                                                                                                                                     |
| 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                                                                            |
| gasPrice        | BigDecimal | gasPrice                                                                                                                                                                                                          |
| nonce           | BigInteger | nonce value. If it is null, it will be filled in automatically. If acceleration is needed, use the nonce value generated when performing the transaction and use a higher gasPrice than the previous transaction. |

#### Return Value

| Name          | Type       | Description    |
| ------------- | ---------- | -------------- |
| transactionId | String     | Transaction Id |
| nonce         | BigInteger | nonce          |

{% hint style="info" %}
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.
{% endhint %}

#### Example

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

### erc1155\_isApprovedForAll

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

#### Parameters

| Name            | Type   | Description                |
| --------------- | ------ | -------------------------- |
| contractAddress | String | Contract address of token. |
| account         | String | Owner address              |
| operator        | String | Operator address           |

#### Return Value

| Name     | Type    | Description                       |
| -------- | ------- | --------------------------------- |
| approved | Boolean | Approval set value. true \| false |

#### Example

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.finenex.net/chain-api/api-references/erc1155-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
