Crypto API
| Endpoint | Method | Description |
|---|---|---|
| crypto:createCurrencyTemplate | websocket | Create currency template |
| crypto:deleteCurrencyTemplate | websocket | Delete currency template |
| crypto:listCurrencyTemplateDescriptions | websocket | List currency template descriptions |
| crypto:getCurrencyTemplate | websocket | Get currency template |
Create currency template
Method: websocket
Endpoint: crypto:createCurrencyTemplate
Request:
{
"data": {
"pBus": string // VRSCTEST (this is the only one available for now), VRSC, VALU
"currencyName": string // Unique per PBus
"networkId": string // Valuverse network id
"authorId": string // Valuverse user id
"currencyType": string // Branded Token, etc.
"data": map[string]{ custom structure } // Currency parameters as JSON
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Delete currency template
Method: websocket
Endpoint: crypto:deleteCurrencyTemplate
Request:
{
"data": {
"pBus": string
"currencyName": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
List currency template descriptions
Method: websocket
Endpoint: crypto:listCurrencyTemplateDescriptions
Request:
{ empty }
Response:
{
"data": {
"currencies": [{
"pBus": string // VRSCTEST (this is the only one available for now), VRSC, VALU
"currencyName": string // Unique per PBus
"networkId": string // Valuverse network id
"authorId": string // Valuverse user id
"currencyType": string // Branded Token, etc.
}]
}
"error": { "status": bool, "code": int, "message": string }
}
Get currency template
Method: websocket
Endpoint: crypto:getCurrencyTemplate
Request:
{
"data": {
"pBus": string
"currencyName": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"currency": {
"pBus": string // VRSCTEST (this is the only one available for now), VRSC, VALU
"currencyName": string // Unique per PBus
"networkId": string // Valuverse network id
"authorId": string // Valuverse user id
"currencyType": string // Branded Token, etc.
"data": map[string]{ custom structure } // Currency parameters as JSON
}
}
"error": { "status": bool, "code": int, "message": string }
}