{"id":23304267,"url":"https://github.com/damon-btcsol/ordinal-rune-multi-tools","last_synced_at":"2025-08-22T08:32:25.131Z","repository":{"id":265218064,"uuid":"852792691","full_name":"damon-btcsol/Ordinal-Rune-Multi-Tools","owner":"damon-btcsol","description":"Here is my previous code group for bitcoin rune and ordinals - Rune Airdrop, Etching, Transfer, Delegate, Burn, Split, Ordinal inscribe, reinscribe, recursive inscription","archived":false,"fork":false,"pushed_at":"2024-09-05T12:50:13.000Z","size":66,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-28T10:39:48.689Z","etag":null,"topics":["airdrop","bitcoin","bitcoinjs-lib","burn","etching","inscribe","multisig","ordinal","psbt","recursive","rune","split","transfer","utxo"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/damon-btcsol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-05T12:41:28.000Z","updated_at":"2024-11-02T17:43:08.000Z","dependencies_parsed_at":"2024-11-28T10:40:07.826Z","dependency_job_id":"8ba5bfe4-a648-4653-b9c9-ed508f7357b5","html_url":"https://github.com/damon-btcsol/Ordinal-Rune-Multi-Tools","commit_stats":null,"previous_names":["damon-btcsol/ordinal-rune-multi-tools"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damon-btcsol%2FOrdinal-Rune-Multi-Tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damon-btcsol%2FOrdinal-Rune-Multi-Tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damon-btcsol%2FOrdinal-Rune-Multi-Tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damon-btcsol%2FOrdinal-Rune-Multi-Tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damon-btcsol","download_url":"https://codeload.github.com/damon-btcsol/Ordinal-Rune-Multi-Tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230575766,"owners_count":18247484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airdrop","bitcoin","bitcoinjs-lib","burn","etching","inscribe","multisig","ordinal","psbt","recursive","rune","split","transfer","utxo"],"created_at":"2024-12-20T11:16:23.703Z","updated_at":"2024-12-20T11:16:24.328Z","avatar_url":"https://github.com/damon-btcsol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Runestone toolbox Typescript\n---\nRunestone Etch, Mint, Transfer, Recursive Rune, Airdrop, Encipher, Decipher\n\n## Prerequisites\n---\nBefore running the script, ensure you have the following dependencies installed:\n\n- `bitcoinjs-lib`\n- `ecpair`\n- `@bitcoinerlab/secp256k1`\n- `axios`\n- `runelib`\n-  `cbor`\n\nYou can install them using npm:\n\n```sh\nnpm install bitcoinjs-lib ecpair @bitcoinerlab/secp256k1 axios runelib\n```\n\n## Configuration\n---\nEnsure you have a `.env` file in your project root with the following variables:\n\n```plaintext\nPRIVATE_KEY=\u003cyour_private_key\u003e\nMNEMONIC=\u003cyour_seed_mnemonic\u003e (optional, if using SeedWallet)\n```\n\n## Recursive Rune Etching Script\n\nThis script allows you to create a recursive ordinal inscription on the Bitcoin testnet using Taproot addresses. It involves creating an HTML content, enciphering it as a Taproot script, and broadcasting the transaction to the testnet network.\n\n### Usage\n\n1. **Initialize ECC Library**:\n   The script initializes the ECC library using `initEccLib` from `bitcoinjs-lib`.\n\n2. **Wallet Setup**:\n   The script supports two types of wallets: `SeedWallet` and `WIFWallet`. Currently, the `WIFWallet` is used.\n\n3. **Create Etching**:\n   The `etching` function is the main function that creates the recursive ordinal. It involves the following steps:\n   - Define the HTML content to be inscribed.\n   - Create an inscription object using `EtchInscription`.\n   - Define a Taproot script with the inscription and the wallet's public key.\n   - Generate a Taproot address and wait for UTXOs to be funded to this address.\n   - Create a Partially Signed Bitcoin Transaction (PSBT).\n   - Add inputs and outputs to the PSBT.\n   - Sign and broadcast the transaction.\n\n4. **Broadcast Transaction**:\n   The `signAndSend` function handles the signing and broadcasting of the transaction. It supports both node environment and browser environment.\n\n## Functions\n\n- **etching()**: Main function to create the recursive ordinal inscription.\n- **waitUntilUTXO(address: string)**: Polls the address for UTXOs until found.\n- **getTx(id: string)**: Fetches transaction hex by ID.\n- **signAndSend(keyPair: BTCSigner, psbt: Psbt, address: string)**: Signs and broadcasts the PSBT.\n- **broadcast(txHex: string)**: Broadcasts the raw transaction to the network.\n- **tapTweakHash(pubKey: Buffer, h: Buffer | undefined)**: Computes the Taproot tweak hash.\n- **toXOnly(pubkey: Buffer)**: Converts a public key to X-only format.\n- **tweakSigner(signer: BTCSigner, opts: any)**: Tweaks the signer for Taproot key tweaking.\n\n# Taproot Rune Minting Script\n\nThis script enables the minting of Runes using Taproot addresses on the Bitcoin testnet. It leverages `bitcoinjs-lib`, `ecpair`, and `runelib` to create, sign, and broadcast a Bitcoin transaction containing Runes.\n\n## Usage\n\n1. **Initialize ECC Library**:\n   The script initializes the ECC library using `initEccLib` from `bitcoinjs-lib`.\n\n2. **Wallet Setup**:\n   The script supports two types of wallets: `SeedWallet` and `WIFWallet`. Currently, the `WIFWallet` is used.\n\n3. **Minting with Taproot**:\n   The `mintWithTaproot` function is the main function that mints Runes. It involves the following steps:\n   - Define Runes to be minted.\n   - Create a Runestone with the specified Runes.\n   - Tweak the signer for Taproot key tweaking.\n   - Generate a Taproot address.\n   - Wait for UTXOs to be funded to this address.\n   - Create a Partially Signed Bitcoin Transaction (PSBT).\n   - Add inputs and outputs to the PSBT.\n   - Sign and broadcast the transaction.\n\n4. **Broadcast Transaction**:\n   The `signAndSend` function handles the signing and broadcasting of the transaction. It supports both node environment and browser environment.\n\n## Functions\n\n- **mintWithTaproot()**: Main function to mint Runes using Taproot.\n- **waitUntilUTXO(address: string)**: Polls the address for UTXOs until found.\n- **getTx(id: string)**: Fetches transaction hex by ID.\n- **signAndSend(keyPair: BTCSigner, psbt: Psbt, address: string)**: Signs and broadcasts the PSBT.\n- **broadcast(txHex: string)**: Broadcasts the raw transaction to the network.\n- **tapTweakHash(pubKey: Buffer, h: Buffer | undefined)**: Computes the Taproot tweak hash.\n- **toXOnly(pubkey: Buffer)**: Converts a public key to X-only format.\n- **tweakSigner(signer: BTCSigner, opts: any)**: Tweaks the signer for Taproot key tweaking.\n- \n# Recursive Rune Minting Script with Taproot Inscription\n\nThis script allows you to mint recursive Runes on the Bitcoin testnet using Taproot addresses. The script uses `bitcoinjs-lib`, `ecpair`, and `runelib` libraries to create, sign, and broadcast Bitcoin transactions containing Runes.\n\n## Prerequisites\n\nMake sure you have the following dependencies installed:\n\n- `bitcoinjs-lib`\n- `ecpair`\n- `@bitcoinerlab/secp256k1`\n- `axios`\n- `cbor`\n- `runelib`\n\nYou can install them using npm:\n\n```sh\nnpm install bitcoinjs-lib ecpair @bitcoinerlab/secp256k1 axios cbor runelib\n```\n\n## Usage\n\n### Steps Overview\n\n1. **Initialize ECC Library**: \n   The script initializes the ECC library using `initEccLib` from `bitcoinjs-lib`.\n\n2. **Wallet Setup**: \n   The script supports two types of wallets: `SeedWallet` and `WIFWallet`. Currently, the `WIFWallet` is used.\n\n3. **Create Taproot Inscription**: \n   The `createChildInscriptionTapScript` function creates the Taproot script for the inscription, using the provided content and metadata.\n\n4. **Mint Runes and Create PSBT**: \n   The `childInscribe` function mints Runes and creates a Partially Signed Bitcoin Transaction (PSBT). It includes:\n   - Funding the Taproot address.\n   - Adding inputs and outputs to the PSBT.\n   - Signing and broadcasting the transaction.\n\n5. **Broadcast Transaction**: \n   The `signAndSend` function handles the signing and broadcasting of the transaction.\n\n## Functions\n\n- **contentBuffer(content: string)**: Converts content string to a buffer.\n- **createChildInscriptionTapScript()**: Creates the Taproot script for child inscriptions.\n- **childInscribe()**: Main function to mint Runes using Taproot.\n- **signAndSend(keyPair: BTCSigner, psbt: Psbt)**: Signs and broadcasts the PSBT.\n- **waitUntilUTXO(address: string)**: Polls the address for UTXOs until found.\n- **getTx(id: string)**: Fetches transaction hex by ID.\n- **broadcast(txHex: string)**: Broadcasts the raw transaction to the network.\n- **tapTweakHash(pubKey: Buffer, h: Buffer | undefined)**: Computes the Taproot tweak hash.\n- **toXOnly(pubkey: Buffer)**: Converts a public key to X-only format.\n- **tweakSigner(signer: BTCSigner, opts: any)**: Tweaks the signer for Taproot key tweaking.\n\n## Important Variables\n\n- **network**: Configured to use Bitcoin testnet.\n- **txhash**: Transaction hash of the parent inscription.\n- **memeType**: MIME type for the content.\n- **metaProtocol**: Meta protocol buffer.\n- **receiveAddress**: Address to receive the Runes.\n- **metadata**: Metadata for the inscription.\n- **fee**: Transaction fee.\n- **parentInscriptionTXID**: Transaction ID of the parent inscription.\n- **contentBufferData**: Buffer containing the content for the inscription.\n- **revealtxIDBuffer**: Buffer of the parent inscription transaction ID.\n- **pointerBuffer**: Array of buffers for pointers in the Taproot script.\n- **metadataBuffer**: CBOR encoded metadata buffer.\n- **contentBufferArray**: Array of content buffers split into chunks.\n## Example Output\n\nThe script will output logs at various stages:\n- The Taproot address where funds should be sent.\n- The UTXO being used.\n- The raw transaction hex to be broadcasted.\n- The transaction ID after broadcasting.\n\n## Notes\n\n- The script is configured to work with the Bitcoin testnet.\n- Ensure that you have testnet coins available in the provided private key.\n- Adjust the fee and other parameters as needed.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamon-btcsol%2Fordinal-rune-multi-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamon-btcsol%2Fordinal-rune-multi-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamon-btcsol%2Fordinal-rune-multi-tools/lists"}