ERC1155 Token
Token ERC1155 APIs.
Endpoint
Real Server : https://api.lmtls.io/v1/chain/erc1155
Test Server : https://test-api.lmtls.io/v1/chain/erc1155
erc1155_mint
Mint the new tokenId by amount. Only the token owner can do this.
Parameters
contractAddress
String
Contract address of token
sender
String
Sender address
address
String
address
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 | owner | 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
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
mintBatch
Mint multiple new tokenId by amount. Only the token owner can do this.
Parameters
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
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
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
transactionId
String
Transaction Id
nonce
BigInteger
nonce value
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
getBalance
Return an address Token balance.
Parameters
contractAddress
String
Contract address of token.
address
String
Address
tokenId
BigInteger
tokenId
Return Value
balance
BigInteger
Token balance of address and tokenId.
Example
transferFrom
Transfer token amount from from-address to to-address.
Parameters
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 | address | 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
transactionId
String
Transaction Id
nonce
BigInteger
nonce value
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
transferFromBatch
Transfer multiple token amount from from-address to to-address.
Parameters
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
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
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
transactionId
String
Transaction Id
nonce
BigInteger
nonce value
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
setApprovalForAll
Approval settings for all token to operator.
Parameters
contractAddress
String
Contract address of token
sender
String
Sender address
operator
String
Operator address
approved
Integer
Approval set value. 1 : true, 0 : 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
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
isApprovedForAll
Returns the value of the operator's approval setting for address .
Parameters
contractAddress
String
Contract address of token.
address
String
Owner address
operator
String
Operator address
Return Value
approved
Boolean
Approval set value
Example
setURI
Set the uri to tokenId. Only the token owner can do this.
Parameters
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
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
transactionId
String
Transaction Id
nonce
BigInteger
nonce value
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.
getURI
Returns a uri data of tokenId.
Parameters
contractAddress
String
Contract address of token
address
String
Address
tokenId
BigInteger
Token Id
Return Value
uri
String
The uri data of token.
Example
Last updated