This is an Ordinal/NFT marketplace operating on the Fractal Bitcoin network, where users can list their Ordinals for sale. Buyers can explore and purchase listed Ordinals according to Ordinal Theory within the Fractal ecosystem.
Configuration settings are sourced from a .env
file and a config module. Ensure you have the necessary environment variables set up in your .env
file.
Clone the repository:
git clone https://github.com/bitman310/fractal-ordinals-marketplace.git
cd fractal-ordinals-marketplace
Install the dependencies:
npm install
Create an .env
file and add your environment variables:
NETWORKTYPE=TESTNET
PORT=3000
MONGODB_URI=mongodb://localhost:27017/fractal-ordinals-marketplace
You can reference .env.example file configuration.
Start the server:
npm start
After starting the server, the application will be running on the specified port. By default, it is set to port 3000. You can access the backend running status at http://localhost:3000
and see the Swagger API documentation at http://localhost:3000/api-docs
.
The following routes are available in the application:
POST /api/create-listing
: Create a new listing.POST /api/save-listing
: Save listing data.DELETE /api/delete-listing
: Delete an existing listing.PUT /api/update-listing
: Update an existing listing.POST /api/create-offer
: Create a new offer for a listing.POST /api/submit-offer
: Submit an offer for a listing.The MongoDB schema used in this project is as follows:
import mongoose from "mongoose";
const OrderSchema = new mongoose.Schema({
ordinalId: { type: String, required: true, unique: true },
price: { type: Number, required: true },
sellerPaymentAddress: { type: String, required: true },
sellerOrdinalPublicKey: { type: String, required: true },
status: { type: String, required: true },
ordinalUtxoTxId: { type: String, required: true },
ordinalUtxoVout: { type: Number, requred: true },
serviceFee: { type: Number },
signedListingPSBT: { type: String, required: true },
});
const OrderModel = mongoose.model("order", OrderSchema);
export default OrderModel;
Swagger UI is integrated to provide an interactive API documentation. You can access it at http://localhost:3000/api-docs
. This documentation will dynamically reflect the API endpoints of the application.
Contributions are welcome! Please follow these steps:
git checkout -b feature-branch
).git commit -m "Add new feature"
).git push origin feature-branch
)./create-listing
application/json
CreateListing
/save-listing
create-listing
endpoint, this signed PSBT must be saved in the listing database through this endpoint.application/json
SaveListing
/relist
/marketplace/confirm-relist
for the changes to take effect.application/json
UpdateListing
/confirm-relist
/marketplace/confirm-relist
.application/json
ConfirmUpdateListing
/delist
/confirm-delist
to transfer the ordinal back to the seller on fractal network.application/json
DeleteListing
/create-offer
application/json
CreateOffer
/submit-offer
application/json
SubmitOffer
I have developed a fractal ordinal marketplace, based on previous ordinal marketplace developments on the Bitcoin mainnet. The initial functionalities are showcased in this public repository for the fractal ordinal marketplace. For further technical support or development assistance, please contact me here.
Telegram: @dwlee918
Discord: @muratcanbey.
Thanks.