cmdruid / tapscript

A humble library for working with Tapscript and Bitcoin Transactions.
https://www.npmjs.com/package/@cmdcode/tapscript
Creative Commons Zero v1.0 Universal
197 stars 50 forks source link

Plz how to inscribe brc20? #3

Closed winktool closed 1 year ago

cmdruid commented 1 year ago

BRC-20 uses an inscription of a JSON object. Check out the inscription example in the README.

Instead of inscribing an image, you are inscribing a JSON object, so you would use JSON.stringify() and new TextEncoder.encode() to convert it to bytes for the inscription, and change the mimetype to application/json. I hope that helps.

winktool commented 1 year ago

Thanks a lot

winktool commented 1 year ago

How can I inscribe a BRC20 from wallet A to wallet B and is there a specific example of the various inputs and outputs? I would like to see more comments, thank you very much.

cmdruid commented 1 year ago

I'm not familiar with the BRC-20 protocol myself sorry. I think the official repository is here, but I don't know for sure: https://github.com/bitcoin-computer/monorepo/tree/main/packages/BRC20

winktool commented 1 year ago

Well,and how to use wallet in testnet? |https://github.com/cmdruid/tapscript/blob/4681c6fd5264c9c5af63227f262e84420b6fb71b/test/example/taproot/inscribe.test.ts#L33

cmdruid commented 1 year ago

You don't have to change the key cryptography when using testnet or any other network.