{"id":21239196,"url":"https://github.com/cutupdev/rune-toolkit","last_synced_at":"2025-07-03T18:33:57.424Z","repository":{"id":260545242,"uuid":"831643098","full_name":"cutupdev/Rune-Toolkit","owner":"cutupdev","description":"Runestone toolkit including eching, mint, transfer, airdrop, recursive rune","archived":false,"fork":false,"pushed_at":"2024-07-21T07:29:35.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T18:02:17.802Z","etag":null,"topics":["bitcoin","rune","runestone","typescript"],"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/cutupdev.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-07-21T07:28:22.000Z","updated_at":"2024-07-21T07:33:11.000Z","dependencies_parsed_at":"2024-10-31T23:34:35.077Z","dependency_job_id":"5a7aa688-0af0-4db2-9e88-e3496135c280","html_url":"https://github.com/cutupdev/Rune-Toolkit","commit_stats":null,"previous_names":["cutupdev/rune-toolkit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cutupdev/Rune-Toolkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutupdev%2FRune-Toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutupdev%2FRune-Toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutupdev%2FRune-Toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutupdev%2FRune-Toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cutupdev","download_url":"https://codeload.github.com/cutupdev/Rune-Toolkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutupdev%2FRune-Toolkit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261170423,"owners_count":23119511,"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":["bitcoin","rune","runestone","typescript"],"created_at":"2024-11-21T00:42:24.119Z","updated_at":"2025-06-21T18:03:52.459Z","avatar_url":"https://github.com/cutupdev.png","language":"TypeScript","readme":"# Runestone toolbox Typescript\n---\nRunestone Etch, Mint, Transfer, Recursive Rune, Airdrop, Encipher, Decipher\n\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutupdev%2Frune-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcutupdev%2Frune-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutupdev%2Frune-toolkit/lists"}