Skip to content
On this page

Crypto API

EndpointMethodDescription
crypto:createCurrencyTemplatewebsocketCreate currency template
crypto:deleteCurrencyTemplatewebsocketDelete currency template
crypto:listCurrencyTemplateDescriptionswebsocketList currency template descriptions
crypto:getCurrencyTemplatewebsocketGet 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 }
}