NFTs revisited

+1 vote

Hello MultiChain Team,

I've read an article about how a luxory watch manufacturer uses the blockchain to fight against counterfeit products. They make use of NFTs as well. I loved the idea and tried to reproduce the use case.

So issue an NFT:

multichain-cli chain1 issue 1UBXNq177rgPi8yperyAZgBhMNtr66hBAHxGCD 
'{"name": "12345klp111", "open": false, "fungible": false, 
"canopen": true}' 0 1 0 '{"Manufacturer" : "Swiss watch", 
"model" : "super time", "serial no" : "12345klp111"}'

e80aca96c38e7c239b5f186b461623c23e6bf70d1a0b0491208874912f2efd74

so far, so good. But actually, what are the parameters "open" and "canopen"? I understand that it allows some sort of later manipulation, like issuing a token that depends on the NFT? What use case would that be?

multichain-cli chain1 listassets "12345klp111"
{"method":"listassets","params":["12345klp111"],"id":"70189557-1750117422","chain_name":"chain1"}

[
    {
        "name" : "12345klp111",
        "issuetxid" : "e80aca96c38e7c239b5f186b461623c23e6bf70d1a0b0491208874912f2efd74",
        "assetref" : null,
        "multiple" : 1,
        "units" : 1,
        "open" : false,
        "restrict" : {
            "send" : false,
            "receive" : false,
            "issue" : true
        },
        "fungible" : false,
        "canopen" : true,
        "canclose" : false,
        "totallimit" : null,
        "issuelimit" : null,
        "details" : {
            "Manufacturer" : "Swiss watch",
            "model" : "super time",
            "serial no" : "12345klp111"
        },
        "issuecount" : 1,
        "issueqty" : 0,
        "issueraw" : 0,
        "subscribed" : true,
        "synchronized" : true,
        "transactions" : 1,
        "confirmed" : 0
    }
]

it looks good to me, NFT is created.

When I try to transfer it to another address (aka the watch is sold and the buyer shall get the digital representation of the watch into his wallet), I get an error:

multichain-cli chain1 sendasset 
1HrnzpVLvSu6Ecs26Q3ZRakTWd2NskzbgGCq64 "12345klp111" 1
{"method":"sendasset","params":
["1HrnzpVLvSu6Ecs26Q3ZRakTWd2NskzbgGCq64",
"12345klp111",1],"id":"22511383-1750117567",
"chain_name":"chain1"}

error code: -702
error message:
This API is not supported for nun-fungible assets

whats wrong here? Here is my getinfo:

multichain-cli chain1 getinfo
{"method":"getinfo","params":[],"id":"
49769585-1750117609","chain_name":"chain1"}

{
    "version" : "2.3.3",
    "nodeversion" : 20303901,
    "edition" : "Community",
    "protocolversion" : 20013,
    "chainname" : "chain1",
    "description" : "MultiChain chain1",
    "protocol" : "multichain",
    "port" : 5759,
    "setupblocks" : 60,
    "nodeaddress" : "chain1@192.168.10.114:5759",
    "burnaddress" : "1XXXXXXWpvXXXXXXZXXXXXXXk7XXXXXXV1FN3N",
    "incomingpaused" : false,
    "miningpaused" : false,
    "offchainpaused" : false,
    "walletversion" : 60000,
    "balance" : 0,
    "walletdbversion" : 3,
    "reindex" : false,
    "blocks" : 297171,
    "chainrewards" : 0,
    "assets" : 13,
    "streams" : 3,
    "addresses" : 12,
    "transactions" : 698134,
    "peers" : 0,
    "timeoffset" : 0,
    "connections" : 0,
    "proxy" : "",
    "difficulty" : 5.96046447753906e-8,
    "testnet" : false,
    "keypoololdest" : 1744062673,
    "keypoolsize" : 2,
    "paytxfee" : 0,
    "relayfee" : 0,
    "errors" : ""
}

ok, lets say sending works. Lets also assume, the watch was destroyed in a fire, so its time to destroy the belonging NFT as well. So I though I'll send it to the burn address:

multichain-cli chain1 sendasset 
1XXXXXXWpvXXXXXXZXXXXXXXk7XXXXXXV1FN3N  "12345klp111" 1
{"method":"sendasset","params":["1XXXXXXWpvXXXXXXZXXXXXXXk7XXXXXXV1FN3N",
"12345klp111",1],"id":"61043256-1750117758","chain_name":"chain1"}

error code: -704
error message:
Destination address doesn't have receive permission

This is also unexpected to me: I thought the burn address can receive every kind of tokens at all times.

I'd be very happy to get this straight - I also think this would help other interested folks get a deeper understanding for use cases for a blockchain.

Thanks for the great work anyway.

asked 2 days ago by bbking
edited 2 days ago by bbking

1 Answer

0 votes

First, canopen means that you can use the update command to reopen the asset for issuance – see the update command in the Asset management section here:

https://www.multichain.com/developers/json-rpc-api/

Second, you cannot send an NFT token using sendasset. Instead you should use send(from), passing the full token details as an object in the amounts parameter. See here for the form required:

https://www.multichain.com/developers/json-rpc-api/#amounts

Finally, yes, receive permissions need to be explicitly assigned to the burn address, since sending something to the burn address is quite a dangerous operation!

answered 2 days ago by MultiChain
Thanks for your reply. I am a bit confused, how can a non fungible token get more than once issued or have more than one qty?

When I try to use send instead of sendasset the amounts parameter should be populated like {"12345klp111":{"token":"token1","qty":1}} where token1 shoud be the assetref if I understand it correctly. But when I do a multichain-cli chain1 getaddressbalances 1UBXNq177rgPi8yperyAZgBhMNtr66hBAHxGCD

I get assetref : null:
    {
        "name" : "12345klp111",
        "assetref" : null,
        "qty" : 0
    }

multichain-cli chain1 listunspent does not show 12345klp111 either. So could you line out how to properly mint an NFT please. Thanks a lot in advance
I managed to get a bit further:
Issued a token for the NFT:

multichain-cli chain1 issuetoken 1UBXNq177rgPi8yperyAZgBhMNtr66hBAHxGCD "12345klp111" "watch token" 1

with that I was able to send it to another wallet:

multichain-cli chain1 sendfrom 1UBXNq177rgPi8yperyAZgBhMNtr66hBAHxGCD 1HrnzpVLvSu6Ecs26Q3ZRakTWd2NskzbgGCq64 '{"12345klp111":{"token":"watch token","qty":1}}'

However, still unclear for my understanding: why does an NFT get a token issued? In this case for a super luxury watch. After sending the token to another wallet, the NFT still stays in mine. How is that to understand? Who owns the NFT now? And why can I issue more tokens based on that NFT when there is only one physical watch?
The NFT is the individual token issued, not the asset. The point of a non-fungible asset is to allow multiple different tokens to be issued, each of which is identified as different.
...