This repository contains the back-end code for the Bitcoin Ordinal Creator application. It provides the necessary API endpoints to support the creation and management of Bitcoin Ordinals.
- API endpoints for creating Ordinal inscriptions
- Support for both Mainnet and Testnet
- Integration with Bitcoin Core for transaction creation and broadcasting
- UTXO management for Ordinal creation
- Node.js
- Express.js
- TypeScript
- bitcoinjs-lib
- axios (for external API calls)
Before you begin, ensure you have met the following requirements:
- Node.js (v14.0.0 or later)
- npm (v6.0.0 or later)
- Bitcoin Core node (for transaction broadcasting)
-
Clone the repository:
git clone https://github.com/your-username/bitcoin-ordinal-creator-backend.git
-
Navigate to the project directory:
cd bitcoin-ordinal-creator-backend
-
Install the dependencies:
npm install
-
Create a
.env
file in the root directory and add the following configurations:PORT=3002 BITCOIN_RPC_URL=http://localhost:8332 BITCOIN_RPC_USER=your_rpc_username BITCOIN_RPC_PASS=your_rpc_password
-
Start the server:
npm start
-
The server will start running on
http://localhost:3002
(or the port specified in your .env file)
- URL:
/api/create-inscription
- Method:
POST
- Body:
{ "content": "string", "contentType": "string", "address": "string", "isTestnet": boolean }
- Response:
{ "inscriptionRequest": { // Inscription request details } }
- URL:
/api/broadcast-tx
- Method:
POST
- Body:
{ "signedTx": "string", "isTestnet": boolean }
- Response:
{ "txid": "string" }
- The server port, Bitcoin RPC URL, and credentials can be configured in the
.env
file. - To switch between Testnet and Mainnet, use the
isTestnet
parameter in the API requests.
Contributions to the Bitcoin Ordinal Creator back-end are welcome. Please follow these steps to contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature-name
) - Make your changes
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/your-feature-name
) - Create a new Pull Request
This project is licensed under the MIT License. See the LICENSE
file for details.
If you have any questions or feedback, please open an issue on GitHub or contact the maintainer at brianchoffman@gmail.com.