Skip to content
VerifiedXVerifiedX Docs
verifiedx.io
verifiedx.io

Auction Houses

POST http://localhost:7292/dstapi/DSTV1/SaveDecShop

Request Params:

{
"Name": "Shop Name",
"DecShopURL": "tutorial-shop",
"Description": "My shop's description...",
"OwnerAddress": "Rabc123...",
"HostingType": 0,
"AutoUpdateNetworkDNS": true
}

DecShopURL is the bare name: the node adds vfx:// and refuses a URL that already contains it. HostingType is 0 (Network), 1 (SelfHosted, also send IP and Port) or 2 (ThirdParty). The description is limited to 200 words and 1,200 characters. This call saves the shop on the node only; publish it with the next call.

{
"Success": true,
"Message": "Decentralized Auction Shop has been created with name Shop Name"
}
const createShop = async () => {
const payload = {
Name: "Shop Name",
DecShopURL: "tutorial-shop",
Description: "My shop's description...",
OwnerAddress: "xDnL4MCGtgHu85JJHdN1fkXinHzKaqVQ59",
HostingType: 0,
AutoUpdateNetworkDNS: true,
};
const url = `${CLI_BASE_URL}/dstapi/DSTV1/SaveDecShop`;
const request = await fetch(url, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
const data = await request.json();
return data["Success"];
};
GET http://localhost:7292/dstapi/DSTV1/GetPublishDecShop

Publishing sends a shop registration transaction from the owner address. It costs 10 VFX plus the normal network fee.

{
"Success": true,
"Message": "Success! TX ID: abcdfg...",
"Hash": "abcdfg..."
}
const publishShop = async () => {
const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetPublishDecShop`;
const request = await fetch(url);
const data = await request.json();
console.log(data);
return data["Success"];
};
GET http://localhost:7292/dstapi/DSTV1/GetDecShop
{
"Success": true,
"Message": "DecShop Found",
"DecShop": {
...
}
}
const retrieveShop = async () => {
const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetDecShop`;
const request = await fetch(url);
const data = await request.json();
if (data["Success"] == true) {
return data["DecShop"];
}
return null;
};
POST http://localhost:7292/dstapi/DSTV1/SaveDecShop

Request Params:

{
"Name": "Updated Shop Name",
"DecShopURL": "tutorial-shop",
"Description": "My updated shop's description...",
"OwnerAddress": "xDnL4MCGtgHu85JJHdN1fkXinHzKaqVQ59",
"HostingType": 0,
"AutoUpdateNetworkDNS": true
}
{
"Success": true,
"Message": "Decentralized Auction Shop has been updated with name Updated Shop Name"
}

SaveDecShop changes the local copy only. Publish the change to the network with GetUpdateDecShop, which sends an update transaction costing 1 VFX plus the normal network fee:

GET http://localhost:7292/dstapi/DSTV1/GetUpdateDecShop
{
"Success": true,
"Message": "Success! TX ID: abcdfg..."
}

When nothing changed since the last publish, it answers {"Success": false, "Message": "No update is pending."}.

GET http://localhost:7292/dstapi/DSTV1/GetSetShopStatus
const toggleShopOnline = async () => {
const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetSetShopStatus`;
const request = await fetch(url);
const data = await request.json();
console.log(data);
if (data["Success"] == true) {
return data["Message"].replace("Is Offline? ", "") == "True";
}
return null;
};
GET http://localhost:7292/dstapi/DSTV1/GetDeleteDecShop

Deleting sends a shop delete transaction costing 1 VFX plus the normal network fee.

const deleteNetworkShop = async () => {
const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetDeleteDecShop`;
const request = await fetch(url);
const data = await request.json();
return data["Success"] == true;
};
GET http://localhost:7292/dstapi/DSTV1/GetDeleteLocalDecShop
const deleteShop = async () => {
const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetDeleteLocalDecShop`;
const request = await fetch(url);
const data = await request.json();
return data["Success"] == true;
};
GET http://localhost:7292/dstapi/DSTV1/GetNetworkDecShopInfo/{url}
const retrieveNetworkShop = async (shopUrl) => {
const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetNetworkDecShopInfo/${shopUrl}`;
const request = await fetch(url);
const data = await request.json();
if (data["Success"] == true) {
return data["DecShop"];
}
return null;
};

url: URL of the shop (for example, vfx://tutorial-shop)

{
"Success": true,
"Message": "Shop Found",
"DecShop": {
...
}
}