Namespace

Note zachys (atomic units) are 10^6 in X-Cash

Stats

This method gets the stats

URL: https://api.xcash.foundation/v1/xcash/namespace/unauthorized/stats/

Method: GET

Inputs: None.

Results:

  • totalNamesRegisteredOrRenewed - unsigned int; The total registered or renewed names the delegates have processed.

  • totalVolume - unsigned long long; The total xcash paid to delegates using the namespace protocol in zachys (atomic units).

$ curl -X GET https://api.xcash.foundation/v1/xcash/namespace/unauthorized/stats/ -H 'Accept: application/json'
{
  "totalNamesRegisteredOrRenewed": 100,
  "totalVolume": 10000000
}

Registered Delegates

This method gets all of the registered delegates

URL: https://api.xcash.foundation/v1/xcash/namespace/unauthorized/delegates/registered

Method: GET

Inputs: None.

Results:

Array of objects with the following structure:

  • delegateName - string; The delegate name.

  • amount - unsigned long long; The amount to register or renew a name, using this delegate in zachys (atomic units).

$ curl -X GET https://api.xcash.foundation/v1/xcash/namespace/unauthorized/delegates/registered/ -H 'Accept: application/json'
[
  {
    "delegateName": "us1_xcash_foundation",
    "amount": 100000000
  },
  {
    "delegateName": "europe1_xcash_foundation",
    "amount": 100000000
  }
]

Delegates

This method gets the delegates data

URL: https://api.xcash.foundation/v1/xcash/namespace/unauthorized/delegates/{delegateName}

Method: GET

Resources:

  • delegateName - Required - The delegates name.

Results:

  • delegateName - string; The delegate name.

  • publicAddress - string; The public address.

  • amount - unsigned long long; The amount that a delegate charges to register or renew a name in zachys (atomic units).

  • totalNamesRegisteredOrRenewed - unsigned int; The total registered or renewed names that the delegate has processed.

  • totalVolume - unsigned long long; The total xcash paid to delegates using the namespace protocol in zachys (atomic units).

$ curl -X GET https://api.xcash.foundation/v1/xcash/namespace/unauthorized/delegates/us1_xcash_foundation/ -H 'Accept: application/json'
{
  "delegateName": "us1_xcash_foundation",
  "publicAddress": "XCA1a9usG2UKajV1Dqzp8fL1BbN3hzuaaJMYjCo7qDoC4C3Vvc5owiLAqKbVw2cRbwRqx3mgrau1Z7LkX6cxR2NC4ZmFBLe2Mf",
  "amount": 100000000,
  "totalNamesRegisteredOrRenewed": 100,
  "totalVolume": 10000000
}

Names

This method gets the names data for a specific name

URL: https://api.xcash.foundation/v1/xcash/namespace/unauthorized/names/{name}

Method: GET

Resources:

  • name - Required - The namespace.

Results:

  • address - string; The address.

  • saddress - string; The saddress.

  • paddress - string; The paddress.

  • expires - unsigned int; The time the domain expires.

  • delegateName - string; The delegate that registered the namespace.

  • delegateAmount - unsigned long long; The total xcash paid to delegates to register or renew the namespace in zachys (atomic units).

$ curl -X GET https://api.xcash.foundation/v1/xcash/namespace/unauthorized/names/xcash/ -H 'Accept: application/json'
{
  "address": "XCA1a9usG2UKajV1Dqzp8fL1BbN3hzuaaJMYjCo7qDoC4C3Vvc5owiLAqKbVw2cRbwRqx3mgrau1Z7LkX6cxR2NC4ZmFBLe2Mf",
  "saddress": "XCA1a9usG2UKajV1Dqzp8fL1BbN3hzuaaJMYjCo7qDoC4C3Vvc5owiLAqKbVw2cRbwRqx3mgrau1Z7LkX6cxR2NC4ZmFBLe2Mf",
  "paddress": "XCA1a9usG2UKajV1Dqzp8fL1BbN3hzuaaJMYjCo7qDoC4C3Vvc5owiLAqKbVw2cRbwRqx3mgrau1Z7LkX6cxR2NC4ZmFBLe2Mf",
  "expires": 1654228489,
  "delegateName": "us1_xcash_foundation",
  "delegateAmount": 100000000
}

Name Status

This method checks if a name can be purchased,either by it has not been registered yet, or it has expired

URL: https://api.xcash.foundation/v1/xcash/namespace/unauthorized/names/status/{name}

Method: GET

Resources:

  • name - Required - The namespace.

Results:

  • status - bool; True if one can register the name, otherwise false.

$ curl -X GET https://api.xcash.foundation/v1/xcash/namespace/unauthorized/names/status/xcash/ -H 'Accept: application/json'
{
  "status": false
}

Address Status

This method gets the address status

URL: https://api.xcash.foundation/v1/xcash/namespace/unauthorized/addresses/status/{address}

Method: GET

Resources:

  • address - Required - The address.

Results:

  • status - string; "not registered|address|saddress|paddress"

$ curl -X GET https://api.xcash.foundation/v1/xcash/namespace/unauthorized/addresses/status/XCA1a9usG2UKajV1Dqzp8fL1BbN3hzuaaJMYjCo7qDoC4C3Vvc5owiLAqKbVw2cRbwRqx3mgrau1Z7LkX6cxR2NC4ZmFBLe2Mf/ -H 'Accept: application/json'
{
  "status": "address"
}

Name To Address

This method converts a name to an address

URL: https://api.xcash.foundation/v1/xcash/namespace/unauthorized/names/convert/{name}

Method: GET

Resources:

  • name - Required - The namespace

Results:

  • address - string; The address.

  • saddress - string; The saddress.

  • paddress - string; The paddress.

$ curl -X GET https://api.xcash.foundation/v1/xcash/namespace/unauthorized/names/convert/xcash/ -H 'Accept: application/json'
{
  "address": "XCA1a9usG2UKajV1Dqzp8fL1BbN3hzuaaJMYjCo7qDoC4C3Vvc5owiLAqKbVw2cRbwRqx3mgrau1Z7LkX6cxR2NC4ZmFBLe2Mf",
  "saddress": "XCA1a9usG2UKajV1Dqzp8fL1BbN3hzuaaJMYjCo7qDoC4C3Vvc5owiLAqKbVw2cRbwRqx3mgrau1Z7LkX6cxR2NC4ZmFBLe2Mf",
  "paddress": "XCA1a9usG2UKajV1Dqzp8fL1BbN3hzuaaJMYjCo7qDoC4C3Vvc5owiLAqKbVw2cRbwRqx3mgrau1Z7LkX6cxR2NC4ZmFBLe2Mf"
}

Address To Name

This method converts an address to a name and extension

URL: https://api.xcash.foundation/v1/xcash/namespace/unauthorized/addresses/convert/{address}

Method: GET

Resources:

  • address - Required - The address.

Results:

  • name - string; The name.

  • extension - string; The extension.

$ curl -X GET https://api.xcash.foundation/v1/xcash/namespace/unauthorized/addresses/convert/XCA1a9usG2UKajV1Dqzp8fL1BbN3hzuaaJMYjCo7qDoC4C3Vvc5owiLAqKbVw2cRbwRqx3mgrau1Z7LkX6cxR2NC4ZmFBLe2Mf/ -H 'Accept: application/json'
{
  "name": "xcash",
  "extension": ".pxcash"
}

Last updated