Code snippet to create NFT on BCH?

Hi,

Can anybody point me to an SDK, or preferrably even just a code snippet (or post it directly in the comments) to generate a valid BCH NFT? In python, javascript, PHP, whatever... I assume the function would be something like:

$raw_transaction = CreateSignedNFT($private_key,$prev_unspent_output,$metadata);

(Any documentation on what data/structure is required/optional for $metadata would be great too.)

It'd also be great to have the reverse... something like:

$metadata = ParseNFT($raw_transaction);

Oh, also I suppose, is there anything special to do to send an NFT vs just sending a normal BCH transaction (once it's already been minted)? Or will it automatically just "follow" the unspent output somehow? Like is it just:

$raw_transaction = SendNFT($prev_unspent_output,$dest_bch_address); ?

Thanks!!

submitted by /u/zhoujianfu to r/btc
[link] [comments]
Quelle: bitcoin-en