Crates.io | valence_market |
lib.rs | valence_market |
version | 0.1.1 |
source | src |
created_at | 2023-10-25 11:01:49.209608 |
updated_at | 2023-11-24 15:26:47.931806 |
description | Set up a web3 marketplace in seconds |
homepage | https://a-block.io |
repository | https://github.com/ABlockOfficial/valence_market |
max_upload_size | |
id | 1013288 |
size | 48,413 |
valence_market
is a plug-in for Valence that lets you set up a web3 marketplace in seconds. Let your users buy and sell assets in a distributed marketplace, where the only fees are the ones you set, and your users are in control of their own trades.
Official documentation ยป
valence_market
provides routes that you can plug in to your base Valence node to turn it into a fully functional marketplace. It is designed to be used as a library and can be imported into your Valence project.
..
If you have cargo-add
installed, you can simply run the following command:
cargo add valence_market
Otherwise, add the following to your Cargo.toml
file:
[dependencies]
valence_market = "0.1.0"
..
/listings
Retrieve a list of available assets that users can browse and potentially buy
..
/listings/:id
Retrieve a specific listing by its ID
..
/listings
Create a new listing. The structure for the request body will need to follow the Listing
interface, which looks like:
{
"_id": "a8f163782fb07c69f511248e",
"title": "Asset_test",
"description": "This is a test asset listing",
"initial_price": 100,
"quantity": 10
}
..
/orders/:id
Retrieve a list of orders that have been placed, retrieved by the listing ID
..
/orders
Create a new order. The structure for the request body will need to follow the Order
interface, which looks like:
{
"id": "8c6dbdaea24a234fad18eca6",
"asset_id": "f837cb510db38d9040889e83",
"price": 100,
"quantity": 2,
"is_bid": false,
"created_at": "20 June 2023",
"druid": "g092384435098",
"desired_asset_id": null
}
..
..