Title: Why can't I find any resources on how to mint ordinal NFTs via code? Post by: warpanomaly on January 01, 2024, 10:13:45 AM I have spent a few days now looking into how to mint ordinal NFTs. I am a hobbyist developer so I consider myself pretty tech literate and ordinal NFTs are NOT user friendly lol. What's even more concerning is that ordinal services never provide a code example. They usually make you upload an image or piece of text to a webpage, pay an invoice QR code with the lightning network, wait (a long long time), and eventually receive an ordinal NFT to a btc taproot address. This doesn't make sense. Why can't I find a script on Github and do this myself? Doesn't minting an ordinal NFT require the simple construction of an envelope transaction like:
Code: OP_FALSE Assigning 1 satoshi to the output, and running the command? Why has no one written out a self contained script that mints ordinal NFTs? Title: Re: Why can't I find any resources on how to mint ordinal NFTs via code? Post by: vjudeu on January 01, 2024, 01:35:36 PM Quote Assigning 1 satoshi to the output, and running the command? You can assign one satoshi, or even zero satoshi, to some output, but miners will not include those transactions into a block, because of the dust limit. If you would have one or zero satoshi in a spendable output, then what fee would be needed to spend it?Quote Why has no one written out a self contained script that mints ordinal NFTs? Because a lot of people are against Ordinals, when it comes to their current implementation. There should be a separate sidechain, focused on cloud storage, to achieve such things, and to leave more space for regular payments. Because if you want to push data on-chain, then why do you need any coins for that?And if you want to connect any data with your coins, then you can do so with commitments, that would be cheaper, because no additional on-chain bytes will be consumed. Which means, if your Taproot address for your Ordinal would be bc1pscu742m5eyt6vwzl62fjugy9mj5yq8pgk674qc2x44892t3zjqfs3ca78z, then it means you can just use "8639eaab74c917a6385fd2932e2085dca8401c28b6bd506146ad4e552e229013" as R-value of your signature, in any address type you want, and then your data will be connected with that signature. Title: Re: Why can't I find any resources on how to mint ordinal NFTs via code? Post by: BlackHatCoiner on January 01, 2024, 06:36:11 PM You can assign one satoshi, or even zero satoshi Just out of curiosity, is there a zero worth UTXO? I cannot find any results.There should be a separate sidechain, focused on cloud storage, to achieve such things, and to leave more space for regular payments. The best selling point of Ordinals is that they are stored on the main chain, which is the most secure and censorship resistant. That somewhat guarantees there will always be online peers that act as seeders. Migrating to a sidechain does not guarantee that. Title: Re: Why can't I find any resources on how to mint ordinal NFTs via code? Post by: vjudeu on January 01, 2024, 08:39:52 PM Quote Just out of curiosity, is there a zero worth UTXO? I cannot find any results. https://mempool.space/tx/47c3ffaac3f64dff83131a429f9de40c58fee3ad0334468aed5e24c4b4bbda61Quote That somewhat guarantees there will always be online peers that act as seeders. This is true here and now, but in the future, it can be changed. Because each time when something is sent as fees, the new coinbase transaction starts a new "chain of signatures". Which means, if you want to migrate transactions from one chain to another, then you have to follow signatures only to the nearest coinbase transaction. Because then, it could be made from original fees, or from any other fees, which means, it may be possible in the future to discard the chain of signatures, after the nearest coinbase transaction, if Ordinals or other abuse will force full node operators to do so, and to optimize some things in some future model (for example UTXO-based model).Title: Re: Why can't I find any resources on how to mint ordinal NFTs via code? Post by: warpanomaly on January 02, 2024, 04:26:58 AM Quote This is true here and now, but in the future, it can be changed. Because each time when something is sent as fees, the new coinbase transaction starts a new "chain of signatures". Which means, if you want to migrate transactions from one chain to another, then you have to follow signatures only to the nearest coinbase transaction. Because then, it could be made from original fees, or from any other fees, which means, it may be possible in the future to discard the chain of signatures, after the nearest coinbase transaction, if Ordinals or other abuse will force full node operators to do so, and to optimize some things in some future model (for example UTXO-based model). Are you sure about this? I think the mining nodes would still have to keep an entire transaction history. Nodes that sync from the genesis block need every block to calculate/verify the hashes of every block leading up to the latest block. This requires at least some nodes to have every single block. This means that there can never be zero seeders for the entire bitcoin blockchain. Please correct me if I'm wrong. P.S. I looked into commitment signatures and I think this would be a great replacement for ordinals in the application that I plan on building. Title: Re: Why can't I find any resources on how to mint ordinal NFTs via code? Post by: vjudeu on January 04, 2024, 12:28:36 AM Quote Are you sure about this? Maybe I should show an example, how to move some mainnet transaction into regtest.First, pick some mainnet block, that can be migrated, for example 227836, and get its coinbase transaction: https://mempool.space/tx/0f3601a5da2f516fa9d3f80c9bf6e530f1afb0c90da73e8f8ad0630c5483afe5 Then, generate at least N-1 blocks, that has to be present before that. Because of network rules, I usually generate 1000 blocks at a time: Code: generatetodescriptor 1000 "raw(51)#8lvh9jxk" Also, because all coins are sent to OP_TRUE, it will be possible to reproduce my example, no matter, what block headers you will construct. Of course, if you generate 1000 blocks at a time, starting from the current timestamp, you may encounter this error: Code: CreateNewBlock: TestBlockValidity failed: time-too-new, block timestamp too far in the future (code -1) Sooner or later, you should get there: Code: getblockcount Code: submitblock 00000020ec6e213d3dc91be62e1d9c938f50ff894509c6bcdfe300ac17ac5012c76cf560e074c0ffa900ae2bf25debe7ee43d201f438b66ce6d7c89fa59ee4338dc48b63ac204f51ffff7f20000000000201000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2703fc7903062f503253482f04ac204f510858029a11000003550d3363646164312f736c7573682f0000000001207e6295000000001976a914e285a29e0704004d4e95dbb7c57a98563d9fb2eb88ac0000000002000000010101811a9245cfae75af3f2fb5ebebb35ee25dfee53b74afac6a45be242bbab40000000000fdffffff01e073a39400000000015100000000 Title: Re: Why can't I find any resources on how to mint ordinal NFTs via code? Post by: seoincorporation on January 04, 2024, 06:37:06 PM I would recommend to read the ordinals BIP to understand how it works:
https://github.com/ordinals/ord/blob/master/bip.mediawiki And if you want the full tech information, you can see the docs on the main ordinals site: https://docs.ordinals.com/introduction.html And that site you will understand how to work with ordinals step by step, and the limits of the technology. You mentioned the sites that make ordinal don't have their code open source, and that's because anyone can code it's own program with the current info in the docs. And one last source of ordinal info is Bitcoin-Knowledge repo: https://github.com/vondas-network/Bitcoin-knowledge#ordinals Title: Re: Why can't I find any resources on how to mint ordinal NFTs via code? Post by: warpanomaly on January 06, 2024, 11:36:49 PM Quote See? It is valid, and instead of 1MejoVXRvsmwyDpTpkw3VJ82NsjjT8SyEw mainnet address, you have n2Ah6YcQjuDCkLJ5YKuRKDLMEsLSPhKwWQ regtest address. And because a lot of altcoins just copy-pasted Bitcoin code, you can migrate their coinbase transactions as well. Fascinating... I'm surprised that there's away around storing the entire blockchain history. Thanks for the post. Title: Re: Why can't I find any resources on how to mint ordinal NFTs via code? Post by: warpanomaly on January 06, 2024, 11:47:01 PM I would recommend to read the ordinals BIP to understand how it works: https://github.com/ordinals/ord/blob/master/bip.mediawiki And if you want the full tech information, you can see the docs on the main ordinals site: https://docs.ordinals.com/introduction.html And that site you will understand how to work with ordinals step by step, and the limits of the technology. You mentioned the sites that make ordinal don't have their code open source, and that's because anyone can code it's own program with the current info in the docs. And one last source of ordinal info is Bitcoin-Knowledge repo: https://github.com/vondas-network/Bitcoin-knowledge#ordinals Nice! Thanks for the resources! I will dig into this. |