Platform gRPC Endpoints#
Please refer to the gRPC Overview for details regarding running the examples shown below.
General Behavior#
Versioning#
All Dash Platform endpoints are versioned so future updates can be done without creating significant issues for API consumers.
Data Proofs and Metadata#
Platform gRPC endpoints can provide proofs so the data returned for a request can be verified as being valid. When requesting proofs, the data requested will be encoded as part of the proof in the response. Proofs are supported in the js-evo-sdk and via the low-level dapi-grpc library.
Some additional metadata is also provided with responses:
Metadata field |
Description |
|---|---|
|
Last committed platform chain height |
|
Height of the most recent ChainLock on the core chain |
|
The current Platform epoch |
|
Unix timestamp in milliseconds for the response |
|
Platform protocol version |
|
Name of the network |
Masternode identity IDs#
Masternode identities are created automatically by the system based on the Core masternode registration transaction (protx) hash. Masternode identity IDs are created by converting the protx hash to base58. This can be done using an online base58 encoder or through JavaScript using the bs58 package as shown below. For gRPCurl, convert the protx hash to base64 instead. This can be done using an online hex to base64 encoder.
const bs58 = require('bs58').default;
const protx = '8eca4bcbb3a124ab283afd42dad3bdb2077b3809659788a0f1daffce5b9f001f';
const base58Protx = bs58.encode(Buffer.from(protx, 'hex'));
console.log(`Masternode identity id (base58): ${base58Protx}`);
const base64Protx = Buffer.from(protx, 'hex').toString('base64');
console.log(`Masternode identity id (base64): ${base64Protx}`);
// Output:
// Masternode identity id (base58): AcPogCxrxeas7jrWYG7TnLHKbsA5KLHGfvg6oYgANZ8J
// Masternode identity id (base64): jspLy7OhJKsoOv1C2tO9sgd7OAlll4ig8dr/zlufAB8=
Contested Resource Endpoints#
Contested resources are a special class of Dash Platform documents that require deterministic conflict resolution when multiple identities request the same logical resource (e.g., a DPNS name). These resources are defined at the data contract level using contested indexes. See the DPNS conflict resolution section for an example of how this works for premium DPNS names.
The endpoints in this section allow clients to check the status of active contests, retrieve contestants, and obtain the outcome.
getContestedResources#
Retrieves the contested resources for a specific contract, document type, and index.
Returns: A list of contested resource values or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the data contract associated with the contested resources |
|
String |
Yes |
The name of the document type associated with the contested resources |
|
String |
Yes |
The name of the index used to query the contested resources |
|
Array |
No |
Start values for index, for pagination |
|
Array |
No |
End values for index, for pagination |
|
Object |
No |
Start value information for pagination |
|
Integer |
No |
Number of contested resources to return |
|
Boolean |
No |
Sort order for results |
|
Boolean |
No |
Set to |
Example Request and Response
# `contract_id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"contract_id": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"document_type_name": "domain",
"index_name": "parentNameAndLabel"
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getContestedResources
{
"v0": {
"contestedResourceValues": {
"contestedResourceValues": [
"EgRkYXNo"
]
},
"metadata": {
"height": "2729",
"coreChainLockedHeight": 1086764,
"epoch": 756,
"timeMs": "1724076831562",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
}
}
}
getContestedResourceIdentityVotes#
Retrieves the voting record of a specific identity.
Returns: A list of contested resource votes or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the identity whose votes are being requested |
|
Integer |
No |
Maximum number of results to return |
|
Integer |
No |
Offset for pagination |
|
Boolean |
No |
Sort order for results |
|
Object |
No |
Start poll ID information for pagination |
|
Boolean |
No |
Set to |
Example Request and Response
# `identity_id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identity_id": "CSgo7cCB07oaVPBDJZuUE2jyxxiIGwap00eIOyG/4xM="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getContestedResourceIdentityVotes
{
"v0": {
"votes": {
"contestedResourceIdentityVotes": [
{
"contractId": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"documentTypeName": "domain",
"serializedIndexStorageValues": [
"ZGFzaA==",
"dDBueQ=="
],
"voteChoice": {
"identityId": "+G9rGhk5ggauDroBJbx8DHj/DCjLaLvlxj3m4oFs9f0="
}
},
{
"contractId": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"documentTypeName": "domain",
"serializedIndexStorageValues": [
"ZGFzaA==",
"anUxeQ=="
],
"voteChoice": {
"identityId": "hzKARzLQgCeLgieyXkc22PVsDy9RoyRCSQpVA1sq3Ag="
}
},
{
"contractId": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"documentTypeName": "domain",
"serializedIndexStorageValues": [
"ZGFzaA==",
"cmVkcGFuZGE="
],
"voteChoice": {
"identityId": "Yiub6FbtHuyrGjiOhtFFsNzkFXay15HKapz/5WmIdRc="
}
},
{
"contractId": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"documentTypeName": "domain",
"serializedIndexStorageValues": [
"ZGFzaA==",
"YTFleGFuZHJh"
],
"voteChoice": {
"identityId": "FSzaDd9OWziOwkizZf/t6HdDCG3pY6zb4MTriOuiyf0="
}
},
{
"contractId": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"documentTypeName": "domain",
"serializedIndexStorageValues": [
"ZGFzaA==",
"ZW0xMTFt"
],
"voteChoice": {
"identityId": "HpGErJllHxDvKnetz9d88452CCfWsbm8s+SLq7hn1v4="
}
},
{
"contractId": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"documentTypeName": "domain",
"serializedIndexStorageValues": [
"ZGFzaA==",
"YXNkdGhyZWVhcHI="
],
"voteChoice": {
"identityId": "toqsgrVi2jpH5zyFqx8IkC2cK987anWbUQJknPu+qss="
}
}
],
"finishedResults": true
},
"metadata": {
"height": "164297",
"coreChainLockedHeight": 2256124,
"epoch": 25,
"timeMs": "1744850434997",
"protocolVersion": 8,
"chainId": "evo1"
}
}
}
getContestedResourceVotersForIdentity#
Retrieves the voters for a specific identity associated with a contested resource.
Returns: A list of voters or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the data contract associated with the contested resource |
|
String |
Yes |
The name of the document type associated with the contested resource |
|
String |
Yes |
The name of the index used to query the contested resource |
|
Array |
Yes |
The values used to query the contested resource |
|
Bytes |
Yes |
The ID of the identity for which to retrieve voters |
|
Object |
No |
Start identifier information for pagination |
|
Integer |
No |
Number of results to return |
|
Boolean |
No |
Sort order for results |
|
Boolean |
No |
Set to |
Example Request and Response
# `contract_id` and `contestant_id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"contract_id": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"document_type_name": "domain",
"index_name": "parentNameAndLabel",
"index_values": ["EgRkYXNo", "EgZlbTExMW0="],
"contestant_id": "HpGErJllHxDvKnetz9d88452CCfWsbm8s+SLq7hn1v4="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getContestedResourceVotersForIdentity
{
"v0": {
"contestedResourceVoters": {
"voters": [
"9BNnQL24MI/zNJQeg6njKqMFsPfY3r1syRB9zxAlZFQ=",
"7GFTbyVQbbUuol/RD2iNAeKbsL7NXPjfqSjhapTRN3g=",
"vMOhByXvdDR4bNAWsB/gF5WdtF+W4HIEciZgRJZnN4I=",
"rU44/IHactYbFCOO5uW5GRVVTiTXJXGIAGktOoY8kQs=",
"nrjH6/4hLLe9Eh/Y9NPsezMctlDH4+q+4+2AujX68WQ=",
"hLickXbsCtHIUjadrnX4DGaALQ1hBi4HSzAn1iAiI1A=",
"TC4jH+JzJyRlHQ/YxdtqN+L2icRxcM/8Uuq7gxjSJ+8=",
"Nk7hQkGkrfC7lApPG8EyQXOKXoGKsg07MfY1khdQxoM=",
"FE0hYA6383IDzr7zrFxdT6pgY9kXjt90b4OKJED7tCg=",
"CSgo7cCB07oaVPBDJZuUE2jyxxiIGwap00eIOyG/4xM="
],
"finishedResults": true
},
"metadata": {
"height": "164240",
"coreChainLockedHeight": 2256049,
"epoch": 25,
"timeMs": "1744839902217",
"protocolVersion": 8,
"chainId": "evo1"
}
}
}
getContestedResourceVoteState#
Retrieves the state of a vote for a specific contested resource.
Returns: The state of the contested resource vote, including the current contenders and the tally of votes.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the data contract associated with the contested resource |
|
String |
Yes |
The name of the document type associated with the contested resource |
|
String |
Yes |
The name of the index used to query the contested resource |
|
Array |
Yes |
The values used to query the contested resource. |
|
Enum |
Yes |
Specifies the result type to return: |
|
Boolean |
No |
Include votes that are locked or abstaining in the tally |
|
Object |
No |
Start identifier information for pagination |
|
Integer |
No |
Number of results to return |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"contract_id": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"document_type_name": "domain",
"index_name": "parentNameAndLabel",
"index_values": ["EgRkYXNo", "EgZlbTExMW0="],
"result_type": 2
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getContestedResourceVoteState
{
"v0": {
"contestedResourceContenders": {
"contenders": [
{
"identifier": "HpGErJllHxDvKnetz9d88452CCfWsbm8s+SLq7hn1v4=",
"voteCount": 34,
"document": "AKcHIgv30Tb3zWNw0bgSF17cJp7HW+A6eiYRVpS3YMKuHpGErJllHxDvKnetz9d88452CCfWsbm8s+SLq7hn1v4BAAcAAAGWGJoweAAAAZYYmjB4AAABlhiaMHgABkVtaWxpTQZlbTExMW0BBGRhc2gEZGFzaAAhAR6RhKyZZR8Q7yp3rc/XfPOOdggn1rG5vLPki6u4Z9b+AQA="
}
]
},
"metadata": {
"height": "164296",
"coreChainLockedHeight": 2256122,
"epoch": 25,
"timeMs": "1744850252661",
"protocolVersion": 8,
"chainId": "evo1"
}
}
}
getVotePollsByEndDate#
Retrieves vote polls that will end within a specified date range.
Returns: A list of vote polls or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Object |
No |
Start time information for filtering vote polls |
|
Object |
No |
End time information for filtering vote polls |
|
Integer |
No |
Maximum number of results to return |
|
Integer |
No |
Offset for pagination |
|
Boolean |
No |
Sort order for results |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"start_time_info": {"start_time_ms": "1701980000000", "start_time_included": true},
"end_time_info": {"end_time_ms": "1702000000000", "end_time_included": true},
"limit": 10
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getVotePollsByEndDate
{
"v0": {
"votePollsByTimestamps": {
"finishedResults": true
},
"metadata": {
"height": "2876",
"coreChainLockedHeight": 1086885,
"epoch": 761,
"timeMs": "1724094056585",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
}
}
}
Data Contract Endpoints#
getDataContract#
Returns: Data Contract information for the requested data contract
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
A data contract |
|
Boolean |
No |
Set to |
Example Request and Response
const DAPIClient = require('@dashevo/dapi-client');
const {
default: loadDpp,
DashPlatformProtocol,
Identifier,
} = require('@dashevo/wasm-dpp');
loadDpp();
const dpp = new DashPlatformProtocol(null);
const client = new DAPIClient({ network: 'testnet' });
const contractId = Identifier.from('GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec');
client.platform.getDataContract(contractId).then((response) => {
dpp.dataContract.createFromBuffer(response.getDataContract()).then((dataContract) => {
console.dir(dataContract.toJSON(), { depth: 10 });
});
});
const {
v0: { PlatformPromiseClient, GetDataContractRequest },
} = require('@dashevo/dapi-grpc');
const { default: loadDpp, DashPlatformProtocol, Identifier } = require('@dashevo/wasm-dpp');
const platformPromiseClient = new PlatformPromiseClient(
'https://seed-1.testnet.networks.dash.org:1443',
);
const contractId = Identifier.from('GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec');
const contractIdBuffer = Buffer.from(contractId);
const getDataContractRequest = new GetDataContractRequest();
getDataContractRequest.setId(contractIdBuffer);
platformPromiseClient
.getDataContract(getDataContractRequest)
.then((response) => {
dpp.dataContract.createFromBuffer(response.getDataContract()).then((dataContract) => {
console.dir(dataContract.toJSON(), { depth: 10 });
});
})
.catch((e) => console.error(e));
# `id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"id":"5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getDataContract
{
"$format_version":"0",
"id":"GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec",
"config":{
"$format_version":"0",
"canBeDeleted":false,
"readonly":false,
"keepsHistory":false,
"documentsKeepHistoryContractDefault":false,
"documentsMutableContractDefault":true,
"requiresIdentityEncryptionBoundedKey":null,
"requiresIdentityDecryptionBoundedKey":null
},
"version":1,
"ownerId":"EuzJmuZdBSJs2eTrxHEp6QqJztbp6FKDNGMeb4W2Ds7h",
"schemaDefs":null,
"documentSchemas":{
"domain":{
"type":"object",
"indices":[
{
"name":"parentNameAndLabel",
"properties":[
{
"normalizedParentDomainName":"asc"
},
{
"normalizedLabel":"asc"
}
],
"unique":true
},
{
"name":"dashIdentityId",
"properties":[
{
"records.dashUniqueIdentityId":"asc"
}
],
"unique":true
},
{
"name":"dashAlias",
"properties":[
{
"records.dashAliasIdentityId":"asc"
}
]
}
],
"properties":{
"label":{
"type":"string",
"pattern":"^[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$",
"minLength":3,
"maxLength":63,
"position":0,
"description":"Domain label. e.g. 'Bob'."
},
"normalizedLabel":{
"type":"string",
"pattern":"^[a-hj-km-np-z0-9][a-hj-km-np-z0-9-]{0,61}[a-hj-km-np-z0-9]$",
"maxLength":63,
"position":1,
"description":"`Domain label converted to lowercase for case-insensitive uniqueness validation. \"o\", \"i\" and \"l\" replaced with \"0\" and \"1\" to mitigate homograph attack. e.g. 'b0b'`",
"$comment":"Must be equal to the label in lowercase. \"o\", \"i\" and \"l\" must be replaced with \"0\" and \"1\"."
},
"parentDomainName":{
"type":"string",
"pattern":"^$|^[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$",
"minLength":0,
"maxLength":63,
"position":2,
"description":"A full parent domain name. e.g. 'dash'."
},
"normalizedParentDomainName":{
"type":"string",
"pattern":"^$|^[a-hj-km-np-z0-9][a-hj-km-np-z0-9-\\.]{0,61}[a-hj-km-np-z0-9]$",
"minLength":0,
"maxLength":63,
"position":3,
"description":"`A parent domain name in lowercase for case-insensitive uniqueness validation. \"o\", \"i\" and \"l\" replaced with \"0\" and \"1\" to mitigate homograph attack. e.g. 'dash'`",
"$comment":"Must either be equal to an existing domain or empty to create a top level domain. \"o\", \"i\" and \"l\" must be replaced with \"0\" and \"1\". Only the data contract owner can create top level domains."
},
"preorderSalt":{
"type":"array",
"byteArray":true,
"minItems":32,
"maxItems":32,
"position":4,
"description":"Salt used in the preorder document"
},
"records":{
"type":"object",
"properties":{
"dashUniqueIdentityId":{
"type":"array",
"byteArray":true,
"minItems":32,
"maxItems":32,
"position":0,
"contentMediaType":"application/x.dash.dpp.identifier",
"description":"Identity ID to be used to create the primary name the Identity",
"$comment":"Must be equal to the document owner"
},
"dashAliasIdentityId":{
"type":"array",
"byteArray":true,
"minItems":32,
"maxItems":32,
"position":1,
"contentMediaType":"application/x.dash.dpp.identifier",
"description":"Identity ID to be used to create alias names for the Identity",
"$comment":"Must be equal to the document owner"
}
},
"minProperties":1,
"maxProperties":1,
"position":5,
"additionalProperties":false,
"$comment":"Constraint with max and min properties ensure that only one identity record is used - either a `dashUniqueIdentityId` or a `dashAliasIdentityId`"
},
"subdomainRules":{
"type":"object",
"properties":{
"allowSubdomains":{
"type":"boolean",
"description":"This option defines who can create subdomains: true - anyone; false - only the domain owner",
"$comment":"Only the domain owner is allowed to create subdomains for non top-level domains",
"position":0
}
},
"position":6,
"description":"Subdomain rules allow domain owners to define rules for subdomains",
"additionalProperties":false,
"required":[
"allowSubdomains"
]
}
},
"required":[
"label",
"normalizedLabel",
"normalizedParentDomainName",
"preorderSalt",
"records",
"subdomainRules"
],
"additionalProperties":false,
"$comment":"In order to register a domain you need to create a preorder. The preorder step is needed to prevent man-in-the-middle attacks. normalizedLabel + '.' + normalizedParentDomain must not be longer than 253 chars length as defined by RFC 1035. Domain documents are immutable: modification and deletion are restricted"
},
"preorder":{
"type":"object",
"indices":[
{
"name":"saltedHash",
"properties":[
{
"saltedDomainHash":"asc"
}
],
"unique":true
}
],
"properties":{
"saltedDomainHash":{
"type":"array",
"byteArray":true,
"minItems":32,
"maxItems":32,
"position":0,
"description":"Double sha-256 of the concatenation of a 32 byte random salt and a normalized domain name"
}
},
"required":[
"saltedDomainHash"
],
"additionalProperties":false,
"$comment":"Preorder documents are immutable: modification and deletion are restricted"
}
}
}
{
"v0": {
"dataContract": "AOZoxlmvZq7h5ywYbd57W34KHXEqCcQNVyH2Ir9TxTFVAAAAAAABAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIGZG9tYWluFgsSEGRvY3VtZW50c011dGFibGUTABIMY2FuQmVEZWxldGVkEwESDHRyYW5zZmVyYWJsZQIBEgl0cmFkZU1vZGUCARIEdHlwZRIGb2JqZWN0EgdpbmRpY2VzFQIWBBIEbmFtZRIScGFyZW50TmFtZUFuZExhYmVsEgpwcm9wZXJ0aWVzFQIWARIabm9ybWFsaXplZFBhcmVudERvbWFpbk5hbWUSA2FzYxYBEg9ub3JtYWxpemVkTGFiZWwSA2FzYxIGdW5pcXVlEwESCWNvbnRlc3RlZBYDEgxmaWVsZE1hdGNoZXMVARYCEgVmaWVsZBIPbm9ybWFsaXplZExhYmVsEgxyZWdleFBhdHRlcm4SE15bYS16QS1aMDEtXXszLDE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2F0ZW5hdGlvbiBvZiBhIDMyIGJ5dGUgcmFuZG9tIHNhbHQgYW5kIGEgbm9ybWFsaXplZCBkb21haW4gbmFtZRIIcmVxdWlyZWQVARIQc2FsdGVkRG9tYWluSGFzaBIUYWRkaXRpb25hbFByb3BlcnRpZXMTABIIJGNvbW1lbnQSSlByZW9yZGVyIGRvY3VtZW50cyBhcmUgaW1tdXRhYmxlOiBtb2RpZmljYXRpb24gYW5kIGRlbGV0aW9uIGFyZSByZXN0cmljdGVk",
"metadata": {
"height": "5990",
"coreChainLockedHeight": 1097384,
"epoch": 1170,
"timeMs": "1725567663863",
"protocolVersion": 1,
"chainId": "dash-testnet-51"
}
}
}
getDataContracts#
Returns: Data Contract information for the requested data contracts
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Array |
Yes |
An array of data contract IDs |
|
Boolean |
No |
Set to |
Example Request and Response
# `id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"ids": [
"5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU="
]
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getDataContracts
{
"v0": {
"dataContracts": {
"dataContractEntries": [
{
"identifier": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"dataContract": "AOZoxlmvZq7h5ywYbd57W34KHXEqCcQNVyH2Ir9TxTFVAAAAAAABAAABMBLBm5jsADOt2zbNZLf1EGcPKjUaQwS19plBRChu/awAAgZkb21haW4WBhIEdHlwZRIGb2JqZWN0EgdpbmRpY2VzFQMWAxIEbmFtZRIScGFyZW50TmFtZUFuZExhYmVsEgpwcm9wZXJ0aWVzFQIWARIabm9ybWFsaXplZFBhcmVudERvbWFpbk5hbWUSA2FzYxYBEg9ub3JtYWxpemVkTGFiZWwSA2FzYxIGdW5pcXVlEwEWAxIEbmFtZRIOZGFzaElkZW50aXR5SWQSCnByb3BlcnRpZXMVARYBEhx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B2luZGljZXMVARYDEgRuYW1lEgpzYWx0ZWRIYXNoEgpwcm9wZXJ0aWVzFQEWARIQc2FsdGVkRG9tYWluSGFzaBIDYXNjEgZ1bmlxdWUTARIKcHJvcGVydGllcxYBEhBzYWx0ZWREb21haW5IYXNoFgYSBHR5cGUSBWFycmF5EglieXRlQXJyYXkTARIIbWluSXRlbXMCIBIIbWF4SXRlbXMCIBIIcG9zaXRpb24CABILZGVzY3JpcHRpb24SWURvdWJsZSBzaGEtMjU2IG9mIHRoZSBjb25jYXRlbmF0aW9uIG9mIGEgMzIgYnl0ZSByYW5kb20gc2FsdCBhbmQgYSBub3JtYWxpemVkIGRvbWFpbiBuYW1lEghyZXF1aXJlZBUBEhBzYWx0ZWREb21haW5IYXNoEhRhZGRpdGlvbmFsUHJvcGVydGllcxMAEggkY29tbWVudBJKUHJlb3JkZXIgZG9jdW1lbnRzIGFyZSBpbW11dGFibGU6IG1vZGlmaWNhdGlvbiBhbmQgZGVsZXRpb24gYXJlIHJlc3RyaWN0ZWQ="
}
]
},
"metadata": {
"height": "6807",
"coreChainLockedHeight": 927014,
"epoch": 848,
"timeMs": "1701973925674",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
getDataContractHistory#
Returns: Data Contract information for the requested data contract
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
A data contract |
|
Integer |
Yes |
Request revisions starting at this timestamp |
|
Integer |
Yes |
The maximum number of revisions to return |
|
Integer |
Yes |
The offset of the first revision to return |
|
Boolean |
No |
Set to |
Example Request and Response
const DAPIClient = require('@dashevo/dapi-client');
const {
default: loadDpp,
DashPlatformProtocol,
Identifier,
} = require('@dashevo/wasm-dpp');
loadDpp();
const dpp = new DashPlatformProtocol(null);
const client = new DAPIClient({ network: 'testnet' });
const contractId = Identifier.from('23iZPjG4ADx8CYGorW4yM8FUo1gihQL2fZszWLTMFyQf');
client.platform.getDataContractHistory(contractId, 0, 2, 0).then((response) => {
for (const key in response.getDataContractHistory()) {
const revision = response.getDataContractHistory()[key];
dpp.dataContract.createFromBuffer(revision).then((dataContract) => {
console.dir(dataContract.toJSON(), { depth: 10 });
});
}
});
# `id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"id":"D43WwBJeadt7AR8wRmcagPiCmi/YvDBHYwheFKzMfyw=",
"limit": 2,
"offset": 0,
"start_at_ms": 0,
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getDataContractHistory
{
"$format_version":"0",
"id":"2ciAVGRuzogbR2NNtNfbn6YdW7BkLWntC7jrLNRMZN9n",
"config":{
"$format_version":"0",
"canBeDeleted":false,
"readonly":false,
"keepsHistory":true,
"documentsKeepHistoryContractDefault":false,
"documentsMutableContractDefault":true,
"requiresIdentityEncryptionBoundedKey":null,
"requiresIdentityDecryptionBoundedKey":null
},
"version":1,
"ownerId":"EB9eBUQxLjA7XGj71x3Msdd1uNmehKYZff3b6idhnTyV",
"schemaDefs":null,
"documentSchemas":{
"note":{
"type":"object",
"properties":{
"message":{
"type":"string",
"position":0
}
},
"additionalProperties":false
}
}
},
{
"$format_version":"0",
"id":"2ciAVGRuzogbR2NNtNfbn6YdW7BkLWntC7jrLNRMZN9n",
"config":{
"$format_version":"0",
"canBeDeleted":false,
"readonly":false,
"keepsHistory":true,
"documentsKeepHistoryContractDefault":false,
"documentsMutableContractDefault":true,
"requiresIdentityEncryptionBoundedKey":null,
"requiresIdentityDecryptionBoundedKey":null
},
"version":2,
"ownerId":"EB9eBUQxLjA7XGj71x3Msdd1uNmehKYZff3b6idhnTyV",
"schemaDefs":null,
"documentSchemas":{
"note":{
"type":"object",
"properties":{
"message":{
"type":"string",
"position":0
},
"author":{
"type":"string",
"position":1
}
},
"additionalProperties":false
}
}
}
{
"v0": {
"dataContractHistory": {
"dataContractEntries": [
{
"date": "1701271990189",
"value": "ABgBjx2sR2xg0L+ti2CDLmGzmmI6g9+l/6SFwA8U3ybxAAAAAQABAAABw8GCMyj2ynyRr4i36i1KKHFYdYuPDVwKmo1jmEgT4zwAAQRub3RlFgMSBHR5cGUSBm9iamVjdBIKcHJvcGVydGllcxYBEgdtZXNzYWdlFgISBHR5cGUSBnN0cmluZxIIcG9zaXRpb24DABIUYWRkaXRpb25hbFByb3BlcnRpZXMTAA=="
},
{
"date": "1701272469813",
"value": "ABgBjx2sR2xg0L+ti2CDLmGzmmI6g9+l/6SFwA8U3ybxAAAAAQABAAACw8GCMyj2ynyRr4i36i1KKHFYdYuPDVwKmo1jmEgT4zwAAQRub3RlFgMSBHR5cGUSBm9iamVjdBIKcHJvcGVydGllcxYCEgdtZXNzYWdlFgISBHR5cGUSBnN0cmluZxIIcG9zaXRpb24CABIGYXV0aG9yFgISBHR5cGUSBnN0cmluZxIIcG9zaXRpb24CARIUYWRkaXRpb25hbFByb3BlcnRpZXMTAA=="
}
]
},
"metadata": {
"height": "6776",
"coreChainLockedHeight": 926975,
"epoch": 846,
"timeMs": "1701968396855",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
Document Endpoints#
getDocuments#
Returns: Document information for the requested document(s)
Parameters:
Note
The where, order_by, limit, start_at, and start_after parameters must comply with the limits defined on the Query Syntax page.
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
A data contract |
|
String |
Yes |
A document type defined by the data contract (e.g. |
|
Bytes |
No |
Where clause to filter the results |
|
Bytes |
No |
Sort records by the field(s) provided |
|
Integer |
No |
Maximum number of results to return |
———- |
|||
One of the following: |
|||
|
Integer |
No |
Return records beginning with the index provided |
|
Integer |
No |
Return records beginning after the index provided |
———- |
|||
|
Boolean |
No |
Set to |
Example Request and Response
const DAPIClient = require('@dashevo/dapi-client');
const {
default: loadDpp,
DashPlatformProtocol,
Identifier,
} = require('@dashevo/wasm-dpp');
loadDpp();
const dpp = new DashPlatformProtocol(null);
const client = new DAPIClient({ network: 'testnet' });
const contractId = Identifier.from('GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec');
const type = 'domain';
const limit = 1;
client.platform.getDataContract(contractId).then((contractResponse) => {
dpp.dataContract
.createFromBuffer(contractResponse.getDataContract())
.then((contract) => {
// Get document(s)
client.platform
.getDocuments(contractId, type, {
limit,
})
.then((response) => {
for (const document of response.documents) {
const doc = dpp.document.createExtendedDocumentFromDocumentBuffer(
document,
type,
contract,
);
console.log(doc.toJSON());
}
});
});
});
const {
v0: { PlatformPromiseClient, GetDataContractRequest, GetDocumentsRequest },
} = require('@dashevo/dapi-grpc');
const { default: loadDpp, DashPlatformProtocol, Identifier } = require('@dashevo/wasm-dpp');
loadDpp();
const dpp = new DashPlatformProtocol(null);
const platformPromiseClient = new PlatformPromiseClient(
'https://seed-1.testnet.networks.dash.org:1443',
);
const contractId = Identifier.from('GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec');
const contractIdBuffer = Buffer.from(contractId);
const getDataContractRequest = new GetDataContractRequest();
getDataContractRequest.setId(contractIdBuffer);
platformPromiseClient
.getDataContract(getDataContractRequest)
.then((contractResponse) => {
dpp.dataContract.createFromBuffer(contractResponse.getDataContract()).then((contract) => {
// Get documents
const getDocumentsRequest = new GetDocumentsRequest();
const type = 'domain';
const limit = 10;
getDocumentsRequest.setDataContractId(contractIdBuffer);
getDocumentsRequest.setDocumentType(type);
// getDocumentsRequest.setWhere(whereSerialized);
// getDocumentsRequest.setOrderBy(orderBySerialized);
getDocumentsRequest.setLimit(limit);
// getDocumentsRequest.setStartAfter(startAfter);
// getDocumentsRequest.setStartAt(startAt);
platformPromiseClient.getDocuments(getDocumentsRequest).then((response) => {
for (const document of response.getDocuments().getDocumentsList()) {
const documentBuffer = Buffer.from(document);
const doc = dpp.document.createExtendedDocumentFromDocumentBuffer(
documentBuffer,
type,
contract,
);
console.log(doc.toJSON());
}
});
});
})
.catch((e) => console.error(e));
# Request documents
# `id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"data_contract_id":"5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"document_type":"domain",
"limit":1
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getDocuments
{
"$id":"Do3YtBPJG72zG4tCbN5VE8djJ6rLpvx7yvtMWEy89HC",
"$ownerId":"4pk6ZhgDtxn9yN2bbB6kfsYLRmUBH7PKUq275cjyzepT",
"label":"Chronic",
"normalizedLabel":"chr0n1c",
"normalizedParentDomainName":"dash",
"parentDomainName":"dash",
"preorderSalt":"1P9N5qv1Ww2xkv6/XXpsvymyGYychRsLXMhCqvW79Jo=",
"records":{
"dashUniqueIdentityId":"OM4WaCQNLedQ0rpbl1UMTZhEbnVeMfL4941ZD08iyFw="
},
"subdomainRules":{
"allowSubdomains":false
},
"$revision":1,
"$createdAt":null,
"$updatedAt":null,
"$dataContract":{
"$format_version":"0",
"id":"GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec",
"config":{
"$format_version":"0",
"canBeDeleted":false,
"readonly":false,
"keepsHistory":false,
"documentsKeepHistoryContractDefault":false,
"documentsMutableContractDefault":true,
"requiresIdentityEncryptionBoundedKey":null,
"requiresIdentityDecryptionBoundedKey":null
},
"version":1,
"ownerId":"EuzJmuZdBSJs2eTrxHEp6QqJztbp6FKDNGMeb4W2Ds7h",
"schemaDefs":null,
"documentSchemas":{
"domain":[
"Object"
],
"preorder":[
"Object"
]
}
},
"$type":"domain"
}
{
"v0": {
"documents": {
"documents": [
"AAZ1S7dbhY4VJrSCvjs2Z1DIwa9Qt9MAyjbJdh7gPu6oDsGC/h1Ayf+ZzXp2zLWDF4XB2qMLWZ0brsAKo0r/0sYBAAcAAAGRivixugAAAZGK+LG6AAABkYr4sboAF2F1ZzI1LTEyMzQ1Njc4OTAxMjM0NTY3F2F1ZzI1LTEyMzQ1Njc4OTAxMjM0NTY3AQRkYXNoBGRhc2gAIQEOwYL+HUDJ/5nNenbMtYMXhcHaowtZnRuuwAqjSv/SxgEA"
]
},
"metadata": {
"height": "5991",
"coreChainLockedHeight": 1097384,
"epoch": 1170,
"timeMs": "1725567845055",
"protocolVersion": 1,
"chainId": "dash-testnet-51"
}
}
}
Identity Endpoints#
getIdentity#
Returns: Identity information for the requested identity
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
An identity |
|
Boolean |
No |
Set to |
Example Request and Response
const DAPIClient = require('@dashevo/dapi-client');
const {
default: loadDpp,
DashPlatformProtocol,
Identifier,
} = require('@dashevo/wasm-dpp');
loadDpp();
const dpp = new DashPlatformProtocol();
const client = new DAPIClient({ network: 'testnet' });
const identityId = Identifier.from('36LGwPSXef8q8wpdnx4EdDeVNuqCYNAE9boDu5bxytsm');
client.platform.getIdentity(identityId).then((response) => {
const identity = dpp.identity.createFromBuffer(response.getIdentity());
console.log(identity.toJSON());
});
const {
v0: { PlatformPromiseClient, GetIdentityRequest },
} = require('@dashevo/dapi-grpc');
const {
default: loadDpp,
DashPlatformProtocol,
Identifier,
} = require('@dashevo/wasm-dpp');
loadDpp();
const dpp = new DashPlatformProtocol(null);
const platformPromiseClient = new PlatformPromiseClient(
'https://seed-1.testnet.networks.dash.org:1443',
);
const id = Identifier.from('36LGwPSXef8q8wpdnx4EdDeVNuqCYNAE9boDu5bxytsm');
const idBuffer = Buffer.from(id);
const getIdentityRequest = new GetIdentityRequest();
getIdentityRequest.setId(idBuffer);
getIdentityRequest.setProve(false);
platformPromiseClient
.getIdentity(getIdentityRequest)
.then((response) => {
const identity = dpp.identity.createFromBuffer(response.getIdentity());
console.dir(identity.toJSON());
})
.catch((e) => console.error(e));
# `id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"id": "HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentity
{
"$version":"0",
"id":"EuzJmuZdBSJs2eTrxHEp6QqJztbp6FKDNGMeb4W2Ds7h",
"publicKeys":[
{
"$version":"0",
"id":0,
"purpose":0,
"securityLevel":0,
"contractBounds":null,
"type":0,
"readOnly":false,
"data":"Asi0dHtSjKxf3femzGNwLuBO19EzKQTghRA0PqANzlRq",
"disabledAt":null
},
{
"$version":"0",
"id":1,
"purpose":0,
"securityLevel":2,
"contractBounds":null,
"type":0,
"readOnly":false,
"data":"AgHuKPhPVIU5BWfpOcK1hgELY6aeySyrU13JaoxxkTYC",
"disabledAt":null
}
],
"balance":17912102140,
"revision":0
}
{
"v0": {
"identity": "AB8VEmymhcW7r01Ka36+WtMlOruBGrE3Ulr0sTsCo5scBAAAAAAAAAAAIQMSQ7bd3xPfA+9xn2+FLl/AJrQTEhdW/OUafgjhbjs6qwABAAEAAgAAACED8nl3p8oFHACE5DGvv8Y9sBxWEVPLpUDUlSD7yICx0OoAAgACAAEAAAAhA9BQqn5pbKnveG+CTGpr+sheSghjJFEUYpm//gO1HPa1AAMAAwMBAAAAIQK7PbawzDv5oNWL3icaXEeAnv5xigN0gUMXRVzn6VgPQwD8J+gRAgA=",
"metadata": {
"height": "5986",
"coreChainLockedHeight": 1097381,
"epoch": 1170,
"timeMs": "1725566939334",
"protocolVersion": 1,
"chainId": "dash-testnet-51"
}
}
}
getIdentityBalance#
Returns: Credit balance for the requested Identity
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
An identity ID |
|
Boolean |
No |
Set to |
Example Request and Response
# `id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"id": "HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityBalance
{
"v0": {
"balance": "669520130",
"metadata": {
"height": "5986",
"coreChainLockedHeight": 1097381,
"epoch": 1170,
"timeMs": "1725566939334",
"protocolVersion": 1,
"chainId": "dash-testnet-51"
}
}
}
getIdentityBalanceAndRevision#
Returns: Credit balance and identity revision for the requested Identity
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
An identity ID |
|
Boolean |
No |
Set to |
Example Request and Response
# `id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"id": "HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityBalanceAndRevision
{
"v0": {
"balanceAndRevision": {
"balance": "669520130"
},
"metadata": {
"height": "5986",
"coreChainLockedHeight": 1097381,
"epoch": 1170,
"timeMs": "1725566939334",
"protocolVersion": 1,
"chainId": "dash-testnet-51"
}
}
}
getIdentityByNonUniquePublicKeyHash#
Added in version 2.0.0.
Returns: One or more identities associated with a public key hash, including non-unique masternode keys.
Note
Unlike getIdentityByPublicKeyHash, this endpoint supports public
key hashes that may be associated with multiple identities, such as masternode voting keys. Use the
start_after parameter to paginate through results.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
Public key hash (sha256-ripemd160) to search for |
|
Bytes |
No |
Identity ID to start after (for pagination) |
|
Boolean |
No |
Set to |
Example Request and Response
# `public_key_hash` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"public_key_hash": "uNFZGqdNRA4K+cC+FsVbvBQYR/c="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityByNonUniquePublicKeyHash
{
"v0": {
"identity": {
"identity": "ADASwZuY7AAzrds2zWS39RBnDyo1GkMEtfaZQUQobv2sAgAAAAAAAAAAIQCgUViOvLoIUc3Ibd9YqICX+1+xQz+fdYxRkyZPslTrBzQABAAEAAgAAACECA+Zn..."
},
"metadata": {
"height": "7242",
"coreChainLockedHeight": 927815,
"epoch": 855,
"timeMs": "1702012386543",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
getIdentityByPublicKeyHash#
Returns: An identity associated with the provided public key hash
Note
This endpoint only works for unique keys. Since masternode keys do not have to be unique
(e.g., voting keys), some masternode identities cannot be retrieved using this endpoint. See
getIdentityByNonUniquePublicKeyHash for masternode
identities.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
Public key hash (sha256-ripemd160) of identity public key |
|
Boolean |
No |
Set to |
Example Request and Response
# `id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"public_key_hash": "uNFZGqdNRA4K+cC+FsVbvBQYR/c="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityByPublicKeyHash
{
"v0": {
"identity": "ADASwZuY7AAzrds2zWS39RBnDyo1GkMEtfaZQUQobv2sAgAAAAAAAAAAIQLItHR7UoysX933psxjcC7gTtfRMykE4IUQND6gDc5UagABAAEAAgAAACECAe4o+E9UhTkFZ+k5wrWGAQtjpp7JLKtTXclqjHGRNgIA/QAAAAQ8fEg8AA==",
"metadata": {
"height": "6870",
"coreChainLockedHeight": 927094,
"epoch": 851,
"timeMs": "1701985137472",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
getIdentityContractNonce#
Returns: Current contract nonce for the requested Identity
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
An identity ID |
|
Bytes |
Yes |
A contract ID |
|
Boolean |
No |
Set to |
Example Request and Response
const DAPIClient = require('@dashevo/dapi-client');
const {
default: loadDpp,
DashPlatformProtocol,
Identifier,
} = require('@dashevo/wasm-dpp');
loadDpp();
const dpp = new DashPlatformProtocol(null);
const client = new DAPIClient({ network: 'testnet' });
const identityId = Identifier.from('36LGwPSXef8q8wpdnx4EdDeVNuqCYNAE9boDu5bxytsm');
const contractId = Identifier.from('GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec');
client.platform.getIdentityContractNonce(identityId, contractId).then((response) => {
console.log(`Current identity contract nonce: ${response.getIdentityContractNonce()}`);
});
# `id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identity_id": "HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw=",
"contract_id": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityContractNonce
Current identity contract nonce: 0
{
"v0": {
"identityContractNonce": "3",
"metadata": {
"height": "5986",
"coreChainLockedHeight": 1097381,
"epoch": 1170,
"timeMs": "1725566939334",
"protocolVersion": 1,
"chainId": "dash-testnet-51"
}
}
}
getIdentityKeys#
Returns: Keys for an Identity.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
String |
Yes |
An identity ID |
|
Yes |
Request all keys ( |
|
|
Integer |
Yes |
The maximum number of revisions to return |
|
Integer |
Yes |
The offset of the first revision to return |
|
Boolean |
No |
Set to |
Request Types#
All keys
To request all keys for an identity, use the all_keys request type:
"all_keys": {}
Specific keys
To request specific keys for an identity, use the specific_keys request type where key_ids is an array containing the key IDs to request:
"specific_keys": {
"key_ids": [
1
]
}
Search keys
To search for identity keys, use the search_keys request type. The options for security_Level_map are “CURRENT_KEY_OF_KIND_REQUEST” and “ALL_KEYS_OF_KIND_REQUEST”:
"search_key": {
"purpose_map": {
"0": {
"security_level_map": {
"0": "CURRENT_KEY_OF_KIND_REQUEST"
}
}
}
}
Example Request and Response#
Request all identity keys
Note: identityId must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identity_id": "HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw=",
"request_type": {
"allKeys": {}
}
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityKeys
Request specific keys
Note: identityId must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identity_id": "HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw=",
"request_type": {
"specificKeys": {
"keyIds": [
1
]
}
},
"limit": 1
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityKeys
Search keys
Note: identityId must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identity_id": "HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw=",
"request_type": {
"search_key": {
"purpose_map": {
"0": {
"security_level_map": {
"0": "CURRENT_KEY_OF_KIND_REQUEST"
}
}
}
}
},
"limit": 1
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityKeys
All keys
{
"v0": {
"keys": {
"keysBytes": [
"AAAAAAAAACEDEkO23d8T3wPvcZ9vhS5fwCa0ExIXVvzlGn4I4W47OqsA",
"AAEAAgAAACED8nl3p8oFHACE5DGvv8Y9sBxWEVPLpUDUlSD7yICx0OoA",
"AAIAAQAAACED0FCqfmlsqe94b4JMamv6yF5KCGMkURRimb/+A7Uc9rUA",
"AAMDAQAAACECuz22sMw7+aDVi94nGlxHgJ7+cYoDdIFDF0Vc5+lYD0MA"
]
},
"metadata": {
"height": "5986",
"coreChainLockedHeight": 1097381,
"epoch": 1170,
"timeMs": "1725566939334",
"protocolVersion": 1,
"chainId": "dash-testnet-51"
}
}
}
getIdentityNonce#
Returns: Current nonce for the requested Identity
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
An identity ID |
|
Boolean |
No |
Set to |
Example Request and Response
const DAPIClient = require('@dashevo/dapi-client');
const {
default: loadDpp,
DashPlatformProtocol,
Identifier,
} = require('@dashevo/wasm-dpp');
loadDpp();
const dpp = new DashPlatformProtocol(null);
const client = new DAPIClient({ network: 'testnet' });
const identityId = Identifier.from('36LGwPSXef8q8wpdnx4EdDeVNuqCYNAE9boDu5bxytsm');
client.platform.getIdentityNonce(identityId).then((response) => {
console.log(`Current identity nonce: ${response.getIdentityNonce()}`);
});
# `id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identity_id": "HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityNonce
Current identity nonce: 0
{
"v0": {
"identityNonce": "3",
"metadata": {
"height": "5990",
"coreChainLockedHeight": 1097384,
"epoch": 1170,
"timeMs": "1725567663863",
"protocolVersion": 1,
"chainId": "dash-testnet-51"
}
}
}
getIdentitiesBalances#
Retrieves the balances for a list of identities.
Returns: A list of identities with their corresponding balances or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Array |
No |
An array of identity IDs for which balances are requested |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"ids": [
"jspLy7OhJKsoOv1C2tO9sgd7OAlll4ig8dr/zlufAB8=","dUuJ2ujbIPxM7l462wexRtfv5Qimb6Co4QlGdbnao14="
],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentitiesBalances
{
"v0": {
"identitiesBalances": {
"entries": [
{
"identity_id": "jspLy7OhJKsoOv1C2tO9sgd7OAlll4ig8dr/zlufAB8=",
"balance": 1000000
},
{
"identity_id": "dUuJ2ujbIPxM7l462wexRtfv5Qimb6Co4QlGdbnao14=",
"balance": 2500000
}
]
},
"metadata": {
"height": "13621",
"coreChainLockedHeight": 1105397,
"epoch": 1482,
"timeMs": "1726691577244",
"protocolVersion": 3,
"chainId": "dash-testnet-51"
}
}
}
getIdentitiesContractKeys#
Returns: Keys associated to a specific contract for multiple Identities.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Array |
Yes |
An array of identity IDs |
|
String |
Yes |
The ID of the contract |
|
String |
No |
Name of the document type |
|
Array of KeyPurpose |
No |
Array of purposes for which keys are requested |
|
Boolean |
No |
Set to |
Key Purposes#
Key Purposes define the intent of usage for each key. Here are the available purposes:
AUTHENTICATION- Keys used for authentication purposes.ENCRYPTION- Keys used for encrypting data.DECRYPTION- Keys used for decrypting data.TRANSFER- Keys used for transferring assets.VOTING- Keys used for voting mechanisms.
Example Request and Response#
# Request identity keys associated with the specified contract
# `identities_ids` and `contract_id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identities_ids": [
"HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw=",
"NBgQk65dTNttDYDGLZNLrb1QEAWB91jqkqXtK1KU4Dc="
],
"purposes": [],
"contract_id": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentitiesContractKeys
{
"v0": {
"identitiesKeys": {},
"metadata": {
"height": "5990",
"coreChainLockedHeight": 1097384,
"epoch": 1170,
"timeMs": "1725567663863",
"protocolVersion": 1,
"chainId": "dash-testnet-51"
}
}
}
Security Group Endpoints#
Added in version 2.0.0.
Security groups provide a way to distribute token configuration and update authorization across multiple identities. Each group defines a set of member identities, the voting power of each member, and the required power threshold to authorize an action. The endpoints in this section are used to retrieve information about groups and the actions they are performing.
getGroupInfo#
Retrieves information about a specific group within a contract, including its members and required power.
Returns: Group information containing member details and required power, or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the contract containing the group |
|
UInt32 |
Yes |
The position of the group within the contract |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"contract_id": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"group_contract_position": 1,
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getGroupInfo
{
"v0": {
"group_info": {
"group_info": {
"members": [
{
"member_id": "01abcdef",
"power": 5
},
{
"member_id": "02abcdef",
"power": 10
}
],
"group_required_power": 15
}
},
"metadata": {
"height": "2876",
"coreChainLockedHeight": 1086885,
"epoch": 761,
"timeMs": "1724094056585",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
}
}
}
getGroupInfos#
Retrieves information about multiple groups within a contract, including their members and required power.
Returns: A list of group information entries or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the contract containing the groups |
|
Object |
No |
Filtering options for retrieving groups |
|
UInt32 |
No |
The position of the first group to retrieve |
|
Boolean |
No |
Whether the start position should be included in the results |
|
UInt32 |
No |
The maximum number of groups to retrieve |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"contract_id": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"start_at_group_contract_position": {
"start_group_contract_position": 1,
"start_group_contract_position_included": true
},
"count": 5,
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getGroupInfos
{
"v0": {
"group_infos": {
"group_infos": [
{
"group_contract_position": 1,
"members": [
{
"member_id": "01abcdef",
"power": 5
},
{
"member_id": "02abcdef",
"power": 10
}
],
"group_required_power": 15
},
{
"group_contract_position": 2,
"members": [
{
"member_id": "03abcdef",
"power": 8
},
{
"member_id": "04abcdef",
"power": 12
}
],
"group_required_power": 20
}
]
},
"metadata": {
"height": "2876",
"coreChainLockedHeight": 1086885,
"epoch": 761,
"timeMs": "1724094056585",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
}
}
}
getGroupActions#
Retrieves a list of actions performed by a specific group within a contract.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the contract containing the group |
|
UInt32 |
Yes |
The position of the group within the contract |
|
Enum |
Yes |
The status of the actions to retrieve ( |
|
Object |
No |
Filtering options for retrieving actions |
|
Bytes |
No |
The action ID to start retrieving from |
|
Boolean |
No |
Whether the start action should be included in the results |
|
UInt32 |
No |
The maximum number of actions to retrieve |
|
Boolean |
No |
Set to |
Returns: A list of group actions or a cryptographic proof. The response message contains details about actions performed by a group, including various event types related to token operations, document updates, contract updates, and emergency actions. The list of possible actions is shown in the table below:
Event Type |
Subtype |
Description |
|---|---|---|
TokenEvent |
|
Mints new tokens to a specified recipient. |
|
Burns (destroys) a specified amount of tokens. |
|
|
Freezes a specific entity’s tokens. |
|
|
Unfreezes a specific entity’s tokens. |
|
|
Destroys frozen funds for a specified entity. |
|
|
Performs emergency actions like pausing or resuming the contract. |
|
|
Updates token configuration settings. |
|
DocumentEvent |
|
Represents the creation of a document. |
ContractEvent |
|
Represents updates to a contract. |
Response Object
Name |
Type |
Description |
|---|---|---|
|
Object |
Contains a list of group actions |
|
Array of |
A list of actions performed by the group |
|
Bytes |
Unique identifier for the action |
|
Object |
The event data associated with the action |
|
Object |
The specific type of event |
|
Object |
Token-related event details (if applicable). See Token Event details below for complete information. |
|
Object |
Document-related event details |
|
Object |
Document creation event details |
|
Bytes |
Created document data |
|
Object |
Contract-related event details |
|
Object |
Contract update event details |
|
Bytes |
Updated contract data |
|
Object |
Metadata about the blockchain state. See metadata details for complete information |
Token Event Fields#
Token Event Type |
Field Name |
Type |
Description |
|---|---|---|---|
|
|
UInt64 |
Amount of tokens to mint. |
|
Bytes |
Identity ID of the recipient. |
|
|
String (Optional) |
A public note for the mint event. |
|
|
|
UInt64 |
Amount of tokens to burn. |
|
String (Optional) |
A public note for the burn event. |
|
|
|
Bytes |
Identifier of the entity being frozen. |
|
String (Optional) |
A public note for the freeze event. |
|
|
|
Bytes |
Identifier of the entity being unfrozen. |
|
String (Optional) |
A public note for the unfreeze event. |
|
|
|
Bytes |
Identifier of the frozen entity. |
|
UInt64 |
Amount of frozen funds to destroy. |
|
|
String (Optional) |
A public note for the destruction event. |
|
|
|
Enum ( |
Type of emergency action performed. |
|
String (Optional) |
A public note for the emergency action. |
|
|
|
Bytes |
Configuration update details. |
|
String (Optional) |
A public note for the configuration update. |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"contract_id": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"group_contract_position": 1,
"status": 0,
"start_at_action_id": {
"start_action_id": "01abcdef",
"start_action_id_included": true
},
"count": 5,
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getGroupActions
{
"v0": {
"group_actions": {
"group_actions": [
{
"action_id": "01abcdef",
"event": {
"event_type": {
"token_event": {
"mint": {
"amount": "1000",
"recipient_id": "02abcdef",
"public_note": "Minting 1000 tokens"
}
}
}
}
},
{
"action_id": "02abcdef",
"event": {
"event_type": {
"token_event": {
"burn": {
"amount": "500",
"public_note": "Burning 500 tokens"
}
}
}
}
}
]
},
"metadata": {
"height": "2876",
"coreChainLockedHeight": 1086885,
"epoch": 761,
"timeMs": "1724094056585",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
}
}
}
getGroupActionSigners#
Retrieves the signers for a specified group action within a contract, along with their assigned power.
Returns: A list of group action signers or a cryptographic proof.
Parameters
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the contract containing the group action. |
|
UInt32 |
Yes |
The position of the group within the contract. |
|
Enum |
Yes |
The status of the action ( |
|
Bytes |
Yes |
The unique identifier of the action. |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"contract_id": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
"group_contract_position": 1,
"status": 0,
"action_id": "01abcdef",
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getGroupActionSigners
{
"v0": {
"group_action_signers": {
"signers": [
{
"signer_id": "01abcdef",
"power": 5
},
{
"signer_id": "02abcdef",
"power": 10
}
]
},
"metadata": {
"height": "2876",
"coreChainLockedHeight": 1086885,
"epoch": 761,
"timeMs": "1724094056585",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
}
}
}
State Transition Endpoints#
broadcastStateTransition#
Broadcasts a state transition to the platform via DAPI to make a change to layer 2 data. The broadcastStateTransition call returns once the state transition has been accepted into the mempool.
Returns: Nothing or error
Note
The waitForStateTransitionResult endpoint should be used after broadcastStateTransition if proof of block confirmation is required.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes (Base64) |
Yes |
Response: No response except on error
waitForStateTransitionResult#
Returns: The state transition hash and either a proof that the state transition was confirmed in a block or an error.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
Hash of the state transition |
|
Boolean |
Yes |
Set to |
Example Request
const DAPIClient = require('@dashevo/dapi-client');
const client = new DAPIClient({ network: 'testnet' });
// Replace <YOUR_STATE_TRANSITION_HASH> with your actual hash
const hash = <YOUR_STATE_TRANSITION_HASH>;
client.platform.waitForStateTransitionResult(hash, { prove: true })
.then((response) => {
console.log(response);
});
# Replace `your_state_transition_hash` with your own before running
# `your_state_transition_hash` must be represented in base64
# Example: wEiwFu9WvAtylrwTph5v0uXQm743N+75C+C9DhmZBkw=
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"state_transition_hash":your_state_transition_hash,
"prove": "true"
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/waitForStateTransitionResult
System Info Endpoints#
getCurrentQuorumsInfo#
Retrieves current quorum details, including validator sets and metadata for each quorum.
Returns: Information about current quorums, including quorum hashes, validator sets, and cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Object |
No |
Version object containing request parameters |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getCurrentQuorumsInfo
{
"v0": {
"quorumHashes": [
"AAABC9mcu+F3eC33hC9wyZAP20QQNHz4kYnfFQPwa5A="
],
"currentQuorumHash": "AAABP7yY5DKt8UlLUR/QJlH8BI108xugKSEIOrR6iAA=",
"validatorSets": [
{
"quorumHash": "AAABC9mcu+F3eC33hC9wyZAP20QQNHz4kYnfFQPwa5A=",
"coreHeight": 1131096,
"members": [
{
"proTxHash": "BbaHl4NE+iQzsqqZ1B9kPi2FgaeJzcIwhIic7KUkTqg=",
"nodeIp": "52.24.124.162"
},
{
"proTxHash": "iCUb1LEk7+uHU33qvuxU9sj1dfTfgfEM9ejuoHMJK28=",
"nodeIp": "52.33.28.47"
},
{
"proTxHash": "FD3Namt2hP3gHoihDl1l3popJExezVhtFKNCZXAl8RM=",
"nodeIp": "35.164.23.245"
}
],
"thresholdPublicKey": "ixciXjkgFnI/cQNXS51yBi4MYgdPZWjRGxsubEsfzItgvTlABUxow9S1eCE7w9+f"
}
],
"lastBlockProposer": "iCUb1LEk7+uHU33qvuxU9sj1dfTfgfEM9ejuoHMJK28=",
"metadata": {
"height": "43865",
"coreChainLockedHeight": 1131112,
"epoch": 2483,
"timeMs": "1730295469308",
"protocolVersion": 4,
"chainId": "dash-testnet-51"
}
}
}
getEvonodesProposedEpochBlocksByIds#
Retrieves the number of blocks proposed by the specified evonodes in a certain epoch, based on their IDs.
Returns: A list of evonodes and their proposed block counts or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Integer |
No |
The epoch to query for. If not set, the current epoch will be used |
|
Array |
Yes |
An array of evonode IDs for which proposed blocks are retrieved IDs |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"ids": [
"jspLy7OhJKsoOv1C2tO9sgd7OAlll4ig8dr/zlufAB8=","dUuJ2ujbIPxM7l462wexRtfv5Qimb6Co4QlGdbnao14="
],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getEvonodesProposedEpochBlocksByIds
{
"v0": {
"evonodesProposedBlockCountsInfo": {
"evonodesProposedBlockCounts": [
{
"proTxHash": "dUuJ2ujbIPxM7l462wexRtfv5Qimb6Co4QlGdbnao14="
},
{
"proTxHash": "jspLy7OhJKsoOv1C2tO9sgd7OAlll4ig8dr/zlufAB8=",
"count": "13"
}
]
},
"metadata": {
"height": "13621",
"coreChainLockedHeight": 1105397,
"epoch": 1482,
"timeMs": "1726691577244",
"protocolVersion": 3,
"chainId": "dash-testnet-51"
}
}
}
getEvonodesProposedEpochBlocksByRange#
Retrieves the number of blocks proposed by evonodes for a specified epoch.
Returns: A list of evonodes and their proposed block counts or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Integer |
No |
The epoch to query for. If not set, the current epoch will be used |
|
Integer |
No |
Maximum number of evonodes proposed epoch blocks to return |
|
Bytes |
No |
Retrieve results starting after this document |
|
Bytes |
No |
Retrieve results starting at this document |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"epoch": 0,
"limit": 10,
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getEvonodesProposedEpochBlocksByRange
{
"v0": {
"evonodesProposedBlockCountsInfo": {
"evonodesProposedBlockCounts": [
{
"proTxHash": "BbaHl4NE+iQzsqqZ1B9kPi2FgaeJzcIwhIic7KUkTqg=",
"count": "1"
}
]
},
"metadata": {
"height": "20263",
"coreChainLockedHeight": 1105827,
"epoch": 1499,
"timeMs": "1726752270072",
"protocolVersion": 3,
"chainId": "dash-testnet-51"
}
}
}
getEpochsInfo#
Returns: Information for the requested epoch(s)
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Integer |
No |
First epoch being requested |
|
Integer |
No |
Number of records to request |
|
Boolean |
No |
Set to |
|
Boolean |
No |
Set to |
Example Request and Response
# `id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"count": 2
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getEpochsInfo
{
"v0": {
"epochs": {
"epochInfos": [
{
"number": 7859,
"firstBlockHeight": "157927",
"firstCoreBlockHeight": 1268167,
"startTime": "1749645648076",
"feeMultiplier": 1,
"protocolVersion": 9
},
{
"number": 7860,
"firstBlockHeight": "157947",
"firstCoreBlockHeight": 1268194,
"startTime": "1749649302574",
"feeMultiplier": 1,
"protocolVersion": 9
}
]
},
"metadata": {
"height": "157955",
"coreChainLockedHeight": 1268198,
"epoch": 7860,
"timeMs": "1749650378981",
"protocolVersion": 9,
"chainId": "dash-testnet-51"
}
}
}
getFinalizedEpochInfos#
Retrieves finalized epoch information within a specified index range.
Returns: A list of finalized epoch information entries or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Integer |
No |
Starting epoch index for the query |
|
Boolean |
No |
Whether to include the |
|
Integer |
No |
Ending epoch index for the query |
|
Boolean |
No |
Whether to include the |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"start_epoch_index": 7850,
"start_epoch_index_included": true,
"end_epoch_index": 7851,
"end_epoch_index_included": false,
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getFinalizedEpochInfos
{
"v0": {
"epochs": {
"finalizedEpochInfos": [
{
"number": 7850,
"firstBlockHeight": "157747",
"firstCoreBlockHeight": 1267938,
"firstBlockTime": "1749613360443",
"feeMultiplier": 1,
"protocolVersion": 9,
"totalBlocksInEpoch": "19",
"nextEpochStartCoreBlockHeight": 1267964,
"totalDistributedStorageFees": "38925829",
"totalCreatedStorageFees": "760",
"coreBlockRewards": "1947189353778",
"blockProposers": [
{
"proposerId": "BbaHl4NE+iQzsqqZ1B9kPi2FgaeJzcIwhIic7KUkTqg=",
"blockCount": 1
},
{
"proposerId": "FD3Namt2hP3gHoihDl1l3popJExezVhtFKNCZXAl8RM=",
"blockCount": 1
},
{
"proposerId": "IBB+xQ6BiA3KGBeLt+U+LQRJwHNBBqYHJTua8v/qAGw=",
"blockCount": 1
},
{
"proposerId": "LkhlGi6cDLTy+3q4dAYapK8M0otZaVYx5qNa85UO9vs=",
"blockCount": 1
},
{
"proposerId": "OXQa2D3XkeHnOPGe2ugtbAMily5qRVmBQk2jdps9vUo=",
"blockCount": 1
},
{
"proposerId": "QHhPP5p2HGAVb5JEqQLAYm+LyP4AN4bHDx/GvkHaRn0=",
"blockCount": 1
},
{
"proposerId": "XGVCdmYVOHGDcV2VipJVUkcvkzNfoWEogEI+S72u9DY=",
"blockCount": 1
},
{
"proposerId": "YdM/R4kzeXvk3og1PHwthDwhMQ9tAPbv8xQkp1buffs=",
"blockCount": 1
},
{
"proposerId": "bRsYW6A2781Ep34Fqar2mgxOQJdq7ACwR3PlKGMyCWY=",
"blockCount": 1
},
{
"proposerId": "dxjtrTceRtIPrTAIbkrPSgXCtmDfauXypoSuvfG+QpA=",
"blockCount": 1
},
{
"proposerId": "hfFaMdODgpOpwdcqGg+iHmYRDOIIeL1MECTErh1b6CQ=",
"blockCount": 1
},
{
"proposerId": "hwdSNKxHNTtCu5fORjMMtnzUZIwB8LI5PX5ymw1niRg=",
"blockCount": 1
},
{
"proposerId": "iCUb1LEk7+uHU33qvuxU9sj1dfTfgfEM9ejuoHMJK28=",
"blockCount": 1
},
{
"proposerId": "iRe7VGMY80ENGnkBx7hGpzRGMRtRZLRaA/DmE/II8jQ=",
"blockCount": 1
},
{
"proposerId": "i40Rk6/SLlOM4Mn7UP7hVdD2F2ymjmXaaExdzi0eCBU=",
"blockCount": 1
},
{
"proposerId": "jeixKVL3BY2Ce9BM3/HCF12Hu/ifKLUkUqY3vJea3cQ=",
"blockCount": 1
},
{
"proposerId": "uozh3HKFe0Fo4zJyVx33+6+Ewxbf5IIXrdz2WV4lQhY=",
"blockCount": 1
},
{
"proposerId": "2bCQz8Gcry4n1RLmnEOBKidL3ynAgdCt5P0nKtVqX4k=",
"blockCount": 1
},
{
"proposerId": "/yYdLBx2kHoq2K62xWEXlvA7XL2IrpJFKkcn4T9PSsk=",
"blockCount": 1
}
]
}
]
},
"metadata": {
"height": "157957",
"coreChainLockedHeight": 1268201,
"epoch": 7860,
"timeMs": "1749650741098",
"protocolVersion": 9,
"chainId": "dash-testnet-51"
}
}
}
getPathElements#
Retrieves elements for a specified path in the platform.
Returns: The elements or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Array |
Yes |
The path for which elements are being requested |
|
Array |
No |
The keys associated with the elements being requested |
|
Boolean |
No |
Set to |
Example Request and Response
# `path` array values be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"path": ["path_element_1", "path_element_2"],
"keys": ["key1", "key2"]
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getPathElements
{
"v0": {
"elements": {},
"metadata": {
"height": "3256",
"coreChainLockedHeight": 1087397,
"epoch": 780,
"timeMs": "1724164508171",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
}
}
}
getPrefundedSpecializedBalance#
Retrieves the pre-funded specialized balance for a specific identity.
Returns: The balance or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the identity whose balance is being requested |
|
Boolean |
No |
Set to |
Example Request and Response
# `id` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"id": "HxUSbKaFxbuvTUprfr5a0yU6u4EasTdSWvSxOwKjmxw="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getPrefundedSpecializedBalance
{
"v0": {
"balance": "100000000",
"metadata": {
"height": "6860",
"coreChainLockedHeight": 927080,
"epoch": 852,
"timeMs": "1701983732299",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
getProtocolVersionUpgradeState#
Returns: The number of votes cast for each protocol version.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": { }
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getProtocolVersionUpgradeState
{
"v0": {
"versions": {
"versions": [
{
"versionNumber": 1,
"voteCount": 28
}
]
},
"metadata": {
"height": "10649",
"coreChainLockedHeight": 930014,
"epoch": 965,
"timeMs": "1702397313265",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
getProtocolVersionUpgradeVoteStatus#
Returns: Protocol version upgrade status.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
String |
No |
Protx hash of an evonode |
|
Integer |
No |
Number of records to request |
|
Boolean |
No |
Set to |
Example Request and Response
# `start_pro_tx_hash` must be represented in base64 if present
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"count": 2
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getProtocolVersionUpgradeVoteStatus
{
"v0": {
"versions": {
"versionSignals": [
{
"proTxHash": "WyRggLpkNQaF/jAtPXkPW7I4y2GZINRiMMhE8HmUSiM=",
"version": 1
},
{
"proTxHash": "XGVCdmYVOHGDcV2VipJVUkcvkzNfoWEogEI+S72u9DY=",
"version": 1
}
]
},
"metadata": {
"height": "10662",
"coreChainLockedHeight": 930024,
"epoch": 966,
"timeMs": "1702398582963",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
getStatus#
Retrieves status information related to Dash Platform.
Returns: Status details including version, node, chain, network, and state sync information, or a cryptographic proof.
Parameters:
This endpoint does not require any parameters.
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getStatus
{
"v0": {
"version": {
"software": {
"dapi": "1.2.0",
"drive": "1.2.0",
"tenderdash": "1.2.1"
},
"protocol": {
"tenderdash": {
"p2p": 10,
"block": 14
},
"drive": {
"latest": 1,
"current": 1
}
}
},
"node": {
"id": "H/vx0yVB3Lj1VVMFKVcEqf+a3CQ=",
"proTxHash": "LkhlGi6cDLTy+3q4dAYapK8M0otZaVYx5qNa85UO9vs="
},
"chain": {
"latestBlockHash": "XY1U/Ay7DCdZqJJwM4sXSw1OFdBIbnVYFc9sJep1hNw=",
"latestAppHash": "9wq6IzU4AjuL27HybKqvWOOPCbnpBJQjk6q64nsd7i8=",
"latestBlockHeight": "7768",
"earliestBlockHash": "CPoCwn7AOQujAeT8fj1+rbNQyBk+PmKgk2iXBuOiC/o=",
"earliestAppHash": "vwzLnKBxugGubmegwJD5eAPSbVbWddzVExeBy8rI7I8=",
"earliestBlockHeight": "1",
"maxPeerBlockHeight": "7768",
"coreChainLockedHeight": 1099682
},
"network": {
"chainId": "dash-testnet-51",
"peersCount": 61,
"listening": true
},
"stateSync": {},
"time": {
"local": "1725890999274",
"block": "1725890829092",
"genesis": "0",
"epoch": 1260
}
}
}
getTotalCreditsInPlatform#
Retrieves the total credits in the platform.
Returns: The total amount of credits or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getTotalCreditsInPlatform
{
"v0": {
"credits": "1594457743625920",
"metadata": {
"height": "3263",
"coreChainLockedHeight": 1087403,
"epoch": 781,
"timeMs": "1724165757972",
"protocolVersion": 1,
"chainId": "dash-testnet-50"
}
}
}
Token Endpoints#
Added in version 2.0.0.
getIdentityTokenBalances#
Retrieves token balances for a specified identity.
Returns: A list of token balances or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the identity for which token balances are requested |
|
Array of Bytes |
No |
List of token IDs to filter the balances |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identity_id": "HVkP3Jq7Rx6O4+TDMIe9emp4NUx2xOjvPSgYJqPqTPQ=",
"token_ids": ["rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=", "LP44w8MPMx6hjEL1fBbCWVoekxUzyK/fdiHURk1jl7U="],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityTokenBalances
{
"v0": {
"tokenBalances": {
"tokenBalances": [
{
"tokenId": "LP44w8MPMx6hjEL1fBbCWVoekxUzyK/fdiHURk1jl7U="
},
{
"tokenId": "rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=",
"balance": "101820"
}
]
},
"metadata": {
"height": "157980",
"coreChainLockedHeight": 1268232,
"epoch": 7861,
"timeMs": "1749654828318",
"protocolVersion": 9,
"chainId": "dash-testnet-51"
}
}
}
getIdentitiesTokenBalances#
Retrieves the token balances for a list of specified identities.
Returns: A list of identity token balances or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the token whose balances are requested |
|
Array of Bytes |
No |
A list of identity IDs to filter the balances |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"token_id": "rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=",
"identity_ids": ["HVkP3Jq7Rx6O4+TDMIe9emp4NUx2xOjvPSgYJqPqTPQ=", "tBRF8/5pzZtmKQ7SHfkm0B3WOUmm3/EfZldNi8sdaDk="],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentitiesTokenBalances
{
"v0": {
"identityTokenBalances": {
"identityTokenBalances": [
{
"identityId": "HVkP3Jq7Rx6O4+TDMIe9emp4NUx2xOjvPSgYJqPqTPQ=",
"balance": "101820"
},
{
"identityId": "tBRF8/5pzZtmKQ7SHfkm0B3WOUmm3/EfZldNi8sdaDk=",
"balance": "5"
}
]
},
"metadata": {
"height": "157980",
"coreChainLockedHeight": 1268232,
"epoch": 7861,
"timeMs": "1749654828318",
"protocolVersion": 9,
"chainId": "dash-testnet-51"
}
}
}
getIdentityTokenInfos#
Retrieves information about specified tokens for a given identity.
Returns: A list of token information entries or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the identity whose token information is requested |
|
Array of Bytes |
No |
A list of token IDs to retrieve information for |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identity_id": "tBRF8/5pzZtmKQ7SHfkm0B3WOUmm3/EfZldNi8sdaDk=",
"token_ids": ["rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=", "LP44w8MPMx6hjEL1fBbCWVoekxUzyK/fdiHURk1jl7U="],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityTokenInfos
{
"v0": {
"tokenInfos": {
"tokenInfos": [
{
"tokenId": "LP44w8MPMx6hjEL1fBbCWVoekxUzyK/fdiHURk1jl7U="
},
{
"tokenId": "rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=",
"info": {
"frozen": true
}
}
]
},
"metadata": {
"height": "157984",
"coreChainLockedHeight": 1268234,
"epoch": 7861,
"timeMs": "1749655176587",
"protocolVersion": 9,
"chainId": "dash-testnet-51"
}
}
}
getIdentitiesTokenInfos#
Retrieves token information for a list of specified identities.
Returns: A list of token information entries for the provided identities or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the token whose information is requested |
|
Array of Bytes |
No |
A list of identity IDs to retrieve token information for |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"token_id": "rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=",
"identity_ids": ["HVkP3Jq7Rx6O4+TDMIe9emp4NUx2xOjvPSgYJqPqTPQ=", "tBRF8/5pzZtmKQ7SHfkm0B3WOUmm3/EfZldNi8sdaDk="],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentitiesTokenInfos
{
"v0": {
"identityTokenInfos": {
"tokenInfos": [
{
"identityId": "HVkP3Jq7Rx6O4+TDMIe9emp4NUx2xOjvPSgYJqPqTPQ="
},
{
"identityId": "tBRF8/5pzZtmKQ7SHfkm0B3WOUmm3/EfZldNi8sdaDk=",
"info": {
"frozen": true
}
}
]
},
"metadata": {
"height": "157984",
"coreChainLockedHeight": 1268234,
"epoch": 7861,
"timeMs": "1749655176587",
"protocolVersion": 9,
"chainId": "dash-testnet-51"
}
}
}
getTokenContractInfo#
Retrieves contract information for a specific token ID.
Returns: Token contract info or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The 32-byte ID of the token whose contract information is being requested |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"token_id": "rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=",
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getTokenContractInfo
{
"v0": {
"data": {
"contractId": "L+2jKoiBdmhzIAg82a3nnOn8/K5sQiaIW/Tinw0ypNM="
},
"metadata": {
"height": "157984",
"coreChainLockedHeight": 1268234,
"epoch": 7861,
"timeMs": "1749655176587",
"protocolVersion": 9,
"chainId": "dash-testnet-51"
}
}
}
getTokenDirectPurchasePrices#
Retrieves direct purchase prices defined for the specified token IDs.
This endpoint provides pricing data for tokens that support direct purchases. Each token may have either a fixed price or a tiered pricing schedule that depends on the quantity being purchased.
Returns: A list of token price entries or a cryptographic proof containing the requested data.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Array |
Yes |
List of 32-byte token IDs to retrieve pricing for. Must be unique and non-empty. |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"token_ids": ["rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=", "LP44w8MPMx6hjEL1fBbCWVoekxUzyK/fdiHURk1jl7U="],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getTokenDirectPurchasePrices
{
"v0": {
"tokenDirectPurchasePrices": {
"tokenDirectPurchasePrice": [
{
"tokenId": "LP44w8MPMx6hjEL1fBbCWVoekxUzyK/fdiHURk1jl7U="
},
{
"tokenId": "rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=",
"fixedPrice": "10000000000"
}
]
},
"metadata": {
"height": "158027",
"coreChainLockedHeight": 1268261,
"epoch": 7862,
"timeMs": "1749659877672",
"protocolVersion": 9,
"chainId": "dash-testnet-51"
}
}
}
{
"v0": {
"tokenDirectPurchasePrices": {
"tokenDirectPurchasePrice": [
{
"tokenId": "LP44w8MPMx6hjEL1fBbCWVoekxUzyK/fdiHURk1jl7U="
},
{
"tokenId": "rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=",
"variablePrice": {
"priceForQuantity": [
{
"quantity": "1",
"price": "10000000000"
},
{
"quantity": "10",
"price": "7000000000"
},
{
"quantity": "50",
"price": "5000000000"
}
]
}
}
]
},
"metadata": {
"height": "158017",
"coreChainLockedHeight": 1268248,
"epoch": 7862,
"timeMs": "1749658213296",
"protocolVersion": 9,
"chainId": "dash-testnet-51"
}
}
}
getTokenPerpetualDistributionLastClaim#
Retrieves the last-claim timestamp for a token’s perpetual distribution for a specific identity.
Returns: A timestamp indicating the last successful claim, or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The unique 32-byte identifier of the token |
|
Object |
No |
Token contract info, used to disambiguate tokens with the same ID across contracts |
|
Bytes |
Yes (if |
ID of the data contract where the token is defined |
|
Integer |
Yes (if |
Token position within the contract |
|
Bytes |
Yes |
Identity whose last-claim info is being requested |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"token_id": "rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=",
"identity_id": "HVkP3Jq7Rx6O4+TDMIe9emp4NUx2xOjvPSgYJqPqTPQ=",
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getTokenPerpetualDistributionLastClaim
{
"v0": {
"lastClaim": {
"rawBytes": "AAABl1+BUYA="
},
"metadata": {
"height": "158030",
"coreChainLockedHeight": 1268268,
"epoch": 7863,
"timeMs": "1749660288110",
"protocolVersion": 9,
"chainId": "dash-testnet-51"
}
}
}
getTokenPreProgrammedDistributions#
Retrieves pre-programmed distributions of a specified token.
Returns: A list of token distributions scheduled over time or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the token whose distributions are requested |
|
Object |
No |
Filtering options for the distribution query |
|
UInt64 |
No |
Start timestamp (in milliseconds) for filtering distributions |
|
Bytes |
No |
The recipient ID to start retrieving distributions from |
|
Boolean |
No |
Whether the start recipient should be included in the results |
|
UInt32 |
No |
Maximum number of results to return |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"token_id": "qa3VvNgqTlRQEfBbqHFQrVJJqO8fcxHMCy4PNrBR4Ho=",
"limit": 10,
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getTokenPreProgrammedDistributions
{
"v0": {
"tokenDistributions": {
"tokenDistributions": [
{
"timestamp": "1749662152621",
"distributions": [
{
"recipientId": "HVkP3Jq7Rx6O4+TDMIe9emp4NUx2xOjvPSgYJqPqTPQ=",
"amount": "100"
}
]
},
{
"timestamp": "1749665692621",
"distributions": [
{
"recipientId": "HVkP3Jq7Rx6O4+TDMIe9emp4NUx2xOjvPSgYJqPqTPQ=",
"amount": "1000"
}
]
},
{
"timestamp": "1781198092621",
"distributions": [
{
"recipientId": "HVkP3Jq7Rx6O4+TDMIe9emp4NUx2xOjvPSgYJqPqTPQ=",
"amount": "1000000"
}
]
}
]
},
"metadata": {
"height": "158043",
"coreChainLockedHeight": 1268281,
"epoch": 7863,
"timeMs": "1749662275384",
"protocolVersion": 9,
"chainId": "dash-testnet-51"
}
}
}
getTokenStatuses#
Retrieves the statuses of specified tokens.
Returns: A list of token statuses or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Array of Bytes |
Yes |
A list of token IDs to retrieve statuses for |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"token_ids": ["rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=", "LP44w8MPMx6hjEL1fBbCWVoekxUzyK/fdiHURk1jl7U="],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getTokenStatuses
{
"v0": {
"tokenStatuses": {
"tokenStatuses": [
{
"tokenId": "LP44w8MPMx6hjEL1fBbCWVoekxUzyK/fdiHURk1jl7U="
},
{
"tokenId": "rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=",
"paused": false
}
]
},
"metadata": {
"height": "158031",
"coreChainLockedHeight": 1268271,
"epoch": 7863,
"timeMs": "1749660469151",
"protocolVersion": 9,
"chainId": "dash-testnet-51"
}
}
}
getTokenTotalSupply#
Retrieves the total supply of a specified token, including aggregated user accounts and system-held amounts.
Returns: The total supply of a token or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The ID of the token whose total supply is requested |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"token_id": "rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=",
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getTokenTotalSupply
{
"v0": {
"tokenTotalSupply": {
"tokenId": "rHb8c3C+RFDdsmSXv7dV4F5daFa1xiMpJx4A9YWHyOQ=",
"totalAggregatedAmountInUserAccounts": "102060",
"totalSystemAmount": "102060"
},
"metadata": {
"height": "158031",
"coreChainLockedHeight": 1268271,
"epoch": 7863,
"timeMs": "1749660469151",
"protocolVersion": 9,
"chainId": "dash-testnet-51"
}
}
}
Address System Endpoints#
Added in version 3.0.0.
getAddressInfo#
Returns balance and nonce information for a specified address.
Returns: An address info entry or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
The address to query |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"address": "AGMKU+A583xy+MWA8kFpOkxFrDlA",
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getAddressInfo
{
"v0": {
"addressInfoEntry": {
"address": "AGMKU+A583xy+MWA8kFpOkxFrDlA",
"balanceAndNonce": {
"balance": "99388684960",
"nonce": 10
}
},
"metadata": {
"height": "307493",
"coreChainLockedHeight": 1453973,
"epoch": 15063,
"timeMs": "1775581907797",
"protocolVersion": 11,
"chainId": "dash-testnet-51"
}
}
}
getAddressesInfos#
Returns balance and nonce information for multiple addresses.
Returns: A list of address info entries or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Array of Bytes |
Yes |
The addresses to query |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"addresses": [
"AGMKU+A583xy+MWA8kFpOkxFrDlA",
"AHEBwunnlfvW0zylnqC6rokXwANq"
],
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getAddressesInfos
{
"v0": {
"addressInfoEntries": {
"addressInfoEntries": [
{
"address": "AGMKU+A583xy+MWA8kFpOkxFrDlA",
"balanceAndNonce": {
"balance": "99388684960",
"nonce": 10
}
},
{
"address": "AHEBwunnlfvW0zylnqC6rokXwANq",
"balanceAndNonce": {
"balance": "500000000"
}
}
]
},
"metadata": {
"height": "307493",
"coreChainLockedHeight": 1453973,
"epoch": 15063,
"timeMs": "1775581907797",
"protocolVersion": 11,
"chainId": "dash-testnet-51"
}
}
}
getAddressesTrunkState#
Returns a cryptographic proof of the trunk state of the address balance tree. Used with getAddressesBranchState to perform incremental sync of address balances.
Returns: A cryptographic proof of the address tree trunk state.
Parameters:
None.
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{ "v0": {} }' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getAddressesTrunkState
{
"v0": {
"proof": {
"grovedbProof": "APsA/wGQtKE8gXoPHBaBJWO/39M63DsnEkx4Lah9...(truncated)",
"quorumHash": "AAAAN0ggLzkGuHl7bJM48baKuEs/b3rhSMSF5kIw14g=",
"signature": "oc8EMH7WkoZhv06iPvP4HjTlleaRLOfDRvWg30hjXL3z83DpNigk1/8mZwC1jrEDFymkkftcoE+DcPhZu/R8wlP2yxWcWo+605lLqU/FIb29nOt0q6hUbuX+eZL39mdb",
"blockIdHash": "Eq24v2aaWwDXN41oCmduKOYnDRsvoAJwDk8BEHZRDaU=",
"quorumType": 6
},
"metadata": {
"height": "307493",
"coreChainLockedHeight": 1453973,
"epoch": 15063,
"timeMs": "1775581907797",
"protocolVersion": 11,
"chainId": "dash-testnet-51"
}
}
}
getAddressesBranchState#
Returns a Merkle proof for a branch of the address balance tree. The key must be a valid node key from the address tree, obtained by parsing a getAddressesTrunkState proof. Use the height from that response’s metadata as checkpoint_height to ensure consistency.
Returns: A Merkle proof for the specified branch.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
A valid node key from the address tree (obtained by parsing a trunk proof) |
|
Integer |
Yes |
The depth of the branch (valid range: 6–9) |
|
Integer |
Yes |
Block height from a |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"key": "<node key from trunk proof>",
"depth": 6,
"checkpointHeight": "<height from getAddressesTrunkState metadata>"
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getAddressesBranchState
{
"v0": {
"merkProof": "AAEC..."
}
}
getRecentAddressBalanceChanges#
Returns address balance changes starting from a specified block height. Supports both inclusive and exclusive start heights for incremental sync.
Returns: A list of address balance changes grouped by block, or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
String (uint64) |
Yes |
Block height to start from (as a string due to uint64 size) |
|
Boolean |
No |
Set to |
|
Boolean |
No |
When |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"startHeight": "305000",
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getRecentAddressBalanceChanges
{
"v0": {
"addressBalanceUpdateEntries": {
"blockChanges": [
{
"blockHeight": "305590",
"changes": [
{
"address": "AGMKU+A583xy+MWA8kFpOkxFrDlA",
"addToBalance": "800000000000"
}
]
},
{
"blockHeight": "305591",
"changes": [
{
"address": "AGMKU+A583xy+MWA8kFpOkxFrDlA",
"setBalance": "99388684960"
}
]
}
]
},
"metadata": {
"height": "307487",
"coreChainLockedHeight": 1453964,
"epoch": 15063,
"timeMs": "1775580820548",
"protocolVersion": 11,
"chainId": "dash-testnet-51"
}
}
}
getRecentCompactedAddressBalanceChanges#
Returns compacted address balance changes from a specified block height. Compacted changes merge multiple operations per address into a single entry per block range, reducing response size for bulk sync.
Returns: A list of compacted address balance changes grouped by block range, or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
String (uint64) |
Yes |
Block height to start from (as a string due to uint64 size) |
|
Boolean |
No |
Set to |
Example Request and Response
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"startBlockHeight": "307400",
"prove": false
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getRecentCompactedAddressBalanceChanges
{
"v0": {
"compactedAddressBalanceUpdateEntries": {},
"metadata": {
"height": "307489",
"coreChainLockedHeight": 1453968,
"epoch": 15063,
"timeMs": "1775581182645",
"protocolVersion": 11,
"chainId": "dash-testnet-51"
}
}
}
Shielded Transaction Endpoints#
Added in version 3.1.0.
Attention
These endpoints are defined in the protocol but are not yet available on public nodes.
getShieldedEncryptedNotes#
Returns encrypted notes from the shielded pool for a specified range. Clients use these notes for trial decryption to identify notes belonging to their viewing key.
Returns: A list of encrypted notes or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Integer |
Yes |
The index of the first note to retrieve |
|
Integer |
Yes |
The number of notes to retrieve |
|
Boolean |
No |
Set to |
getShieldedAnchors#
Returns all commitment tree anchors for the shielded pool. Anchors are used by shielded transaction provers to reference a valid state of the commitment tree.
Returns: A list of commitment tree anchors or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Boolean |
No |
Set to |
getMostRecentShieldedAnchor#
Returns the most recent commitment tree anchor for the shielded pool.
Returns: The most recent anchor or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Boolean |
No |
Set to |
getShieldedPoolState#
Returns the total balance held in the shielded pool.
Returns: The total shielded pool balance (in credits) or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Boolean |
No |
Set to |
getShieldedNullifiers#
Returns the spent status of specified nullifiers. Clients use this to determine whether notes have already been spent.
Returns: A list of nullifier statuses or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Array of Bytes |
Yes |
The nullifiers to query (each 32 bytes) |
|
Boolean |
No |
Set to |
getNullifiersTrunkState#
Returns a cryptographic proof of the trunk state of a nullifier tree. Used with getNullifiersBranchState to perform incremental sync of nullifier sets.
Returns: A cryptographic proof of the nullifier tree trunk state.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Integer |
Yes |
The shielded pool type: |
|
Bytes |
No |
32-byte token identifier; required when |
getNullifiersBranchState#
Returns a Merkle proof for a branch of the nullifier tree. Use checkpoint_height from the metadata of a getNullifiersTrunkState response to ensure consistency.
Returns: A Merkle proof for the specified branch.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Integer |
Yes |
The shielded pool type: |
|
Bytes |
No |
32-byte token identifier; required when |
|
Bytes |
Yes |
The branch key to query |
|
Integer |
Yes |
The depth of the branch |
|
Integer |
Yes |
Block height from a |
getRecentNullifierChanges#
Returns nullifier additions starting from a specified block height, indicating which notes were spent per block.
Returns: A list of nullifier additions grouped by block, or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
String (uint64) |
Yes |
Block height to start from (as a string due to uint64 size) |
|
Boolean |
No |
Set to |
getRecentCompactedNullifierChanges#
Returns compacted nullifier additions from a specified block height. Compacted changes merge multiple blocks into ranges, reducing response size for bulk sync.
Returns: A list of compacted nullifier additions grouped by block range, or a cryptographic proof.
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
String (uint64) |
Yes |
Block height to start from (as a string due to uint64 size) |
|
Boolean |
No |
Set to |
Deprecated Endpoints#
The following endpoints were recently deprecated. See the previous version of documentation for additional information on these endpoints.
getIdentities#
Attention
Deprecated in Dash Platform v1.0.0
Returns: Identity information for the requested identities
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Array |
Yes |
An array of identity IDs |
|
Boolean |
No |
Set to |
getIdentitiesByPublicKeyHashes#
Attention
Deprecated in Dash Platform v1.0.0
Returns: An array of identities associated with the provided public key hashes
Parameters:
Name |
Type |
Required |
Description |
|---|---|---|---|
|
Bytes |
Yes |
Public key hashes (sha256-ripemd160) of identity public keys |
|
Boolean |
No |
Set to |
Code Reference#
Implementation details related to the information on this page can be found in:
The Platform repository
packages/dapi/lib/grpcServer/handlers/corefolderThe Platform repository
packages/dapi-grpc/protosfolder