Platform gRPC Endpoints#
Please refer to the gRPC Overview for details regarding running the examples shown below, encoding/decoding the request/response data, and clients available for several languages.
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. Full support is not yet available in the JavaScript client, but can be used 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 |
Versioning#
Dash Platform 0.25.16 included a breaking change that added versioning to these endpoints so future updates can be done without creating significant issues for API consumers.
Endpoint Details#
broadcastStateTransition#
π
Note: The
waitForStateTransitionResult
endpoint should be used in conjunction with this one for instances where proof of block confirmation is required.
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
Parameters:
Name |
Type |
Required |
Description |
---|---|---|---|
|
Bytes (Base64) |
Yes |
Response: No response except on error
getIdentity#
π§ Breaking changes
Due to serialization changes in Dash Platform 0.25, using wasm-dpp is recommended when working with identities, data contracts, and documents.
Returns: Identity information for the requested identity
Parameters:
Name |
Type |
Required |
Description |
---|---|---|---|
|
Bytes |
Yes |
An identity |
|
Boolean |
No |
Set to |
π
Note: When requesting proofs, the data requested will be encoded as part of the proof in the response.
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();
const identityId = Identifier.from('4EfA9Jrvv3nnCFdSf7fad59851iiTRZ6Wcu6YVJ4iSeF');
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('4EfA9Jrvv3nnCFdSf7fad59851iiTRZ6Wcu6YVJ4iSeF');
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": "MBLBm5jsADOt2zbNZLf1EGcPKjUaQwS19plBRChu/aw="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentity
{
"$version":"0",
"id":"4EfA9Jrvv3nnCFdSf7fad59851iiTRZ6Wcu6YVJ4iSeF",
"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": "ADASwZuY7AAzrds2zWS39RBnDyo1GkMEtfaZQUQobv2sAgAAAAAAAAAAIQLItHR7UoysX933psxjcC7gTtfRMykE4IUQND6gDc5UagABAAEAAgAAACECAe4o+E9UhTkFZ+k5wrWGAQtjpp7JLKtTXclqjHGRNgIA/QAAAAQrpPz8AA==",
"metadata": {
"height": "6730",
"coreChainLockedHeight": 926904,
"epoch": 844,
"timeMs": "1701959872131",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
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": "MBLBm5jsADOt2zbNZLf1EGcPKjUaQwS19plBRChu/aw="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityBalance
{
"v0": {
"balance": "17912102140",
"metadata": {
"height": "6858",
"coreChainLockedHeight": 927080,
"epoch": 850,
"timeMs": "1701983632299",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
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": "MBLBm5jsADOt2zbNZLf1EGcPKjUaQwS19plBRChu/aw="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityBalanceAndRevision
{
"v0": {
"balance_and_revision": {
"balance": "17912102140",
"revision": "0"
},
"metadata": {
"height": "6862",
"core_chain_locked_height": 927086,
"epoch": 851,
"time_ms": "1701984361792",
"protocol_version": 1,
"chain_id": "dash-testnet-37"
}
}
}
getIdentityByPublicKeyHash#
Returns: An identity associated with the provided public key hash
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"
}
}
}
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": "ALL_KEYS_OF_KIND_REQUEST"
}
}
}
}
Example Request and Response#
# Request all identity keys
# `identityId` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identity_id": "MBLBm5jsADOt2zbNZLf1EGcPKjUaQwS19plBRChu/aw=",
"request_type": {
"allKeys": {}
}
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityKeys
# Request specific keys
# `identityId` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identity_id": "MBLBm5jsADOt2zbNZLf1EGcPKjUaQwS19plBRChu/aw=",
"request_type": {
"specificKeys": {
"keyIds": [
1
]
}
}
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityKeys
# Search keys
# `identityId` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identity_id": "MBLBm5jsADOt2zbNZLf1EGcPKjUaQwS19plBRChu/aw=",
"request_type": {
"search_key": {
"purpose_map": {
"0": {
"security_level_map": {
"0": "ALL_KEYS_OF_KIND_REQUEST"
}
}
}
}
}
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentityKeys
// All keys
{
"v0": {
"keys": {
"keysBytes": [
"AAAAAAAAACECyLR0e1KMrF/d96bMY3Au4E7X0TMpBOCFEDQ+oA3OVGoA",
"AAEAAgAAACECAe4o+E9UhTkFZ+k5wrWGAQtjpp7JLKtTXclqjHGRNgIA"
]
},
"metadata": {
"height": "9240",
"coreChainLockedHeight": 929379,
"epoch": 941,
"timeMs": "1702309782764",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
getIdentities#
Returns: Identity information for the requested identities
Parameters:
Name |
Type |
Required |
Description |
---|---|---|---|
|
Array |
Yes |
An array of identity 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": [
"MBLBm5jsADOt2zbNZLf1EGcPKjUaQwS19plBRChu/aw="
]
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentities
{
"v0": {
"identities": {
"identityEntries": [
{
"key": "MBLBm5jsADOt2zbNZLf1EGcPKjUaQwS19plBRChu/aw=",
"value": {
"value": "ADASwZuY7AAzrds2zWS39RBnDyo1GkMEtfaZQUQobv2sAgAAAAAAAAAAIQLItHR7UoysX933psxjcC7gTtfRMykE4IUQND6gDc5UagABAAEAAgAAACECAe4o+E9UhTkFZ+k5wrWGAQtjpp7JLKtTXclqjHGRNgIA/QAAAAQrpPz8AA=="
}
}
]
},
"metadata": {
"height": "6851",
"coreChainLockedHeight": 927070,
"epoch": 850,
"timeMs": "1701982306949",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
getIdentitiesByPublicKeyHashes#
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 |
π
Note: When requesting proofs, the data requested will be encoded as part of the proof in the response.
π Public key hash
Note: the hash must be done using all fields of the identity public key object - e.g.
{ "$version": "0", "id": 0, "purpose": 0, "securityLevel": 0, "contractBounds": null, "type": 0, "readOnly": false, "data": "Asi0dHtSjKxf3femzGNwLuBO19EzKQTghRA0PqANzlRq", "disabledAt": null }When using the js-dpp library, the hash can be accessed via the IdentityPublicKey objectβs
hash
method (e.g.identity.getPublicKeyById(0).hash()
).
Example Request and Response
const DAPIClient = require('@dashevo/dapi-client');
const {
default: loadDpp, DashPlatformProtocol,
} = require('@dashevo/wasm-dpp');
const client = new DAPIClient();
loadDpp();
const dpp = new DashPlatformProtocol();
const publicKeyHash = 'b8d1591aa74d440e0af9c0be16c55bbc141847f7';
const publicKeysBuffer = [Buffer.from(publicKeyHash, 'hex')];
client.platform.getIdentitiesByPublicKeyHashes(publicKeysBuffer)
.then((response) => {
const retrievedIdentity = dpp.identity.createFromBuffer(response.identities[0]);
console.log(retrievedIdentity.toJSON());
});
const {
v0: { PlatformPromiseClient, GetIdentitiesByPublicKeyHashesRequest },
} = require('@dashevo/dapi-grpc');
const { DashPlatformProtocol, default: loadDpp } = require('@dashevo/wasm-dpp');
loadDpp();
const dpp = new DashPlatformProtocol();
const platformPromiseClient = new PlatformPromiseClient(
'https://seed-1.testnet.networks.dash.org:1443',
);
const publicKeyHash = 'b8d1591aa74d440e0af9c0be16c55bbc141847f7';
const publicKeysBuffer = [Buffer.from(publicKeyHash, 'hex')];
const getIdentitiesByPublicKeyHashesRequest = new GetIdentitiesByPublicKeyHashesRequest();
getIdentitiesByPublicKeyHashesRequest.setPublicKeyHashesList(publicKeysBuffer);
platformPromiseClient
.getIdentitiesByPublicKeyHashes(getIdentitiesByPublicKeyHashesRequest)
.then((response) => {
const identitiesResponse = response.getIdentities().getIdentitiesList();
console.log(dpp.identity.createFromBuffer(Buffer.from(identitiesResponse[0])).toJSON());
})
.catch((e) => console.error(e));
# `public_key_hashes` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"public_key_hashes":"uNFZGqdNRA4K+cC+FsVbvBQYR/c="
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getIdentitiesByPublicKeyHashes
{
"$version":"0",
"id":"4EfA9Jrvv3nnCFdSf7fad59851iiTRZ6Wcu6YVJ4iSeF",
"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": {
"identities": {
"identityEntries": [
{
"publicKeyHash": "uNFZGqdNRA4K+cC+FsVbvBQYR/c=",
"value": "ADASwZuY7AAzrds2zWS39RBnDyo1GkMEtfaZQUQobv2sAgAAAAAAAAAAIQLItHR7UoysX933psxjcC7gTtfRMykE4IUQND6gDc5UagABAAEAAgAAACECAe4o+E9UhTkFZ+k5wrWGAQtjpp7JLKtTXclqjHGRNgIA/QAAAAQrpPz8AA=="
}
]
},
"metadata": {
"height": "6733",
"coreChainLockedHeight": 926908,
"epoch": 844,
"timeMs": "1701960418324",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
getDataContract#
π§ Breaking changes
Due to serialization changes in Dash Platform 0.25, using wasm-dpp is recommended when working with identities, data contracts, and documents.
Returns: Data Contract information for the requested data contract
Parameters:
Name |
Type |
Required |
Description |
---|---|---|---|
|
Bytes |
Yes |
A data contract |
|
Boolean |
No |
Set to |
π
Note: When requesting proofs, the data requested will be encoded as part of the proof in the response.
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();
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":"4EfA9Jrvv3nnCFdSf7fad59851iiTRZ6Wcu6YVJ4iSeF",
"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": "AOZoxlmvZq7h5ywYbd57W34KHXEqCcQNVyH2Ir9TxTFVAAAAAAABAAABMBLBm5jsADOt2zbNZLf1EGcPKjUaQwS19plBRChu/awAAgZkb21haW4WBhIEdHlwZRIGb2JqZWN0EgdpbmRpY2VzFQMWAxIEbmFtZRIScGFyZW50TmFtZUFuZExhYmVsEgpwcm9wZXJ0aWVzFQIWARIabm9ybWFsaXplZFBhcmVudERvbWFpbk5hbWUSA2FzYxYBEg9ub3JtYWxpemVkTGFiZWwSA2FzYxIGdW5pcXVlEwEWAxIEbmFtZRIOZGFzaElkZW50aXR5SWQSCnByb3BlcnRpZXMVARYBEhxyZWNvcmRzLmRhc2hVbmlxdWVJZGVudGl0eUlkEgNhc2MSBnVuaXF1ZRMBFgISBG5hbWUSCWRhc2hBbGlhcxIKcHJvcGVydGllcxUBFgESG3JlY29yZHMuZGFzaEFsaWFzSWRlbnRpdHlJZBIDYXNjEgpwcm9wZXJ0aWVzFgcSBWxhYmVsFgYSBHR5cGUSBnN0cmluZxIHcGF0dGVybhIqXlthLXpBLVowLTldW2EtekEtWjAtOS1dezAsNjF9W2EtekEtWjAtOV0kEgltaW5MZW5ndGgCAxIJbWF4TGVuZ3RoAj8SCHBvc2l0aW9uAgASC2Rlc2NyaXB0aW9uEhlEb21haW4gbGFiZWwuIGUuZy4gJ0JvYicuEg9ub3JtYWxpemVkTGFiZWwWBhIEdHlwZRIGc3RyaW5nEgdwYXR0ZXJuEjxeW2EtaGota20tbnAtejAtOV1bYS1oai1rbS1ucC16MC05LV17MCw2MX1bYS1oai1rbS1ucC16MC05XSQSCW1heExlbmd0aAI/Eghwb3NpdGlvbgIBEgtkZXNjcmlwdGlvbhKjRG9tYWluIGxhYmVsIGNv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ight": 926935,
"epoch": 845,
"timeMs": "1701963780843",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
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/awAAgZkb21haW4WBhIEdHlwZRIGb2JqZWN0EgdpbmRpY2VzFQMWAxIEbmFtZRIScGFyZW50TmFtZUFuZExhYmVsEgpwcm9wZXJ0aWVzFQIWARIabm9ybWFsaXplZFBhcmVudERvbWFpbk5hbWUSA2FzYxYBEg9ub3JtYWxpemVkTGFiZWwSA2FzYxIGdW5pcXVlEwEWAxIEbmFtZRIOZGFzaElkZW50aXR5SWQSCnByb3BlcnRpZXMVARYBEhxyZWNvcmRzLmRhc2hVbmlxdWVJZGVudGl0eUlkEgNhc2MSBnVuaXF1ZRMBFgISBG5hbWUSCWRhc2hBbGlhcxIKcHJvcGVydGllcxUBFgESG3JlY29yZHMuZGFzaEFsaWFzSWRlbnRpdHlJZBIDYXNjEgpwcm9wZXJ0aWVzFgcSBWxhYmVsFgYSBHR5cGUSBnN0cmluZxIHcGF0dGVybhIqXlthLXpBLVowLTldW2EtekEtWjAtOS1dezAsNjF9W2EtekEtWjAtOV0kEgltaW5MZW5ndGgCAxIJbWF4TGVuZ3Ro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gMzIgYnl0ZSByYW5kb20gc2FsdCBhbmQgYSBub3JtYWxpemVkIGRvbWFpbiBuYW1lEghyZXF1aXJlZBUBEhBzYWx0ZWREb21haW5IYXNoEhRhZGRpdGlvbmFsUHJvcGVydGllcxMAEggkY29tbWVudBJKUHJlb3JkZXIgZG9jdW1lbnRzIGFyZSBpbW11dGFibGU6IG1vZGlmaWNhdGlvbiBhbmQgZGVsZXRpb24gYXJlIHJlc3RyaWN0ZWQ="
}
]
},
"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 |
π
Note: When requesting proofs, the data requested will be encoded as part of the proof in the response.
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();
const contractId = Identifier.from('2ciAVGRuzogbR2NNtNfbn6YdW7BkLWntC7jrLNRMZN9n');
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":"GAGPHaxHbGDQv62LYIMuYbOaYjqD36X/pIXADxTfJvE=",
"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"
}
}
}
getDocuments#
π§ Breaking changes
Due to serialization changes in Dash Platform 0.25, using wasm-dpp is recommended when working with identities, data contracts, and documents.
Returns: Document information for the requested document(s)
Parameters:
π Parameter constraints
Note: The
where
,order_by
,limit
,start_at
, andstart_after
parameters must comply with the limits defined on the Query Syntax page.Additionally, note that
where
andorder_by
must be CBOR encoded.
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 (must be CBOR encoded) |
|
Bytes |
No |
Sort records by the field(s) provided (must be CBOR encoded) |
|
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 |
π
Note: When requesting proofs, the data requested will be encoded as part of the proof in the response.
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();
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":"4EfA9Jrvv3nnCFdSf7fad59851iiTRZ6Wcu6YVJ4iSeF",
"schemaDefs":null,
"documentSchemas":{
"domain":[
"Object"
],
"preorder":[
"Object"
]
}
},
"$type":"domain"
}
{
"v0":{
"documents":{
"documents":[
"AANHCCLI23JAM6yPcJwiyAaVouU4btv1kXxaMF0mfXTDOM4WaCQNLedQ0rpbl1UMTZhEbnVeMfL4941ZD08iyFwBAAAHQ2hyb25pYwdjaHIwbjFjAQRkYXNoBGRhc2jU/03mq/VbDbGS/r9demy/KbIZjJyFGwtcyEKq9bv0miIBOM4WaCQNLedQ0rpbl1UMTZhEbnVeMfL4941ZD08iyFwAAQA="
]
},
"metadata":{
"height":"6755",
"coreChainLockedHeight":926945,
"epoch":845,
"timeMs":"1701964691399",
"protocolVersion":1,
"chainId":"dash-testnet-37"
}
}
}
getEpochsInfo#
Returns: Information for the requested epoch(s)
Parameters:
Name |
Type |
Required |
Description |
---|---|---|---|
|
Bytes |
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": 849,
"firstBlockHeight": "6822",
"firstCoreBlockHeight": 927030,
"startTime": "1701976758619",
"feeMultiplier": 2
},
{
"number": 850,
"firstBlockHeight": "6840",
"firstCoreBlockHeight": 927061,
"startTime": "1701980303210",
"feeMultiplier": 2
}
]
},
"metadata": {
"height": "6843",
"coreChainLockedHeight": 927065,
"epoch": 850,
"timeMs": "1701980850126",
"protocolVersion": 1,
"chainId": "dash-testnet-37"
}
}
}
getProofs#
Returns: Proof information for the requested identities, contracts, and/or document(s)
Parameters:
A combination of one or more of the following are required fields are required:
Field |
Type |
Required |
Description |
---|---|---|---|
|
|
No |
List of identity requests |
|
|
No |
List of contract requests |
|
|
No |
List of document requests |
Request type details
Field |
Type |
Required |
Description |
---|---|---|---|
IdentityRequest |
|||
|
Bytes |
Yes |
Identity ID |
|
Type (enum) |
Yes |
Type of identity proof data to request (options: FULL_IDENTITY, BALANCE, KEYS) |
βββββ |
|||
ContractRequest |
|||
|
Bytes |
Yes |
A contract ID |
βββββ |
|||
DocumentRequest |
|||
|
Bytes |
Yes |
A contract ID |
|
String |
Yes |
Type of contract document |
|
Boolean |
No |
Indicates if the document type maintains a history |
|
Bytes |
Yes |
Document ID |
Example Request and Response
# Request proofs for an identity and a data contract
# `identityId` and `contractId` must be represented in base64
grpcurl -proto protos/platform/v0/platform.proto \
-d '{
"v0": {
"identities": [
{
"request_type": "FULL_IDENTITY",
"identity_id": "MBLBm5jsADOt2zbNZLf1EGcPKjUaQwS19plBRChu/aw="
}
],
"contracts": [
{
"contract_id": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU="
}
],
"documents": []
}
}' \
seed-1.testnet.networks.dash.org:1443 \
org.dash.platform.dapi.v0.Platform/getProofs
// GroveDB proof for the requested identity and contract
{
"v0": {
"proof": {
"grovedbProof": "AQYAAQDuAgHx2HzoF4wSud2eE4a+j9LczjcgboCJsEZJK+Bl/97hLAQBIAAkAgEgn2WlCmdZa3aGIz7NDvWCqFa+KfeLcarKW0WH8vLbYZgAAJpItikQWz3TcDudnxxiJSY5h5Ndejq2UOkZPubKDN0QAfhJDycGmgAM67TyQkPU3kuavJLc7wlcbvBD48JEelqeEQQBQAAkAgEgoqG0rG/vIuoqGmjoEjZEs1eHX2tBLBgQkoHBRueycbwA1L5TY2e0nwaAJolrXP7S6qWDVVTGeFpz4cjXIHoOPUoQAY6uNnLUV0nQB1qQqQWBLRyaJZfu/o/kBIBYXq4egeakBAFgAC0EASCfZaUKZ1lrdoYjPs0O9YKoVr4p94txqspbRYfy8tthmP3KiDkEJD0hAACXwGQWS6E+DOmhhxAd6xNjdVGeulgD5i3dNpt5nRiwGxABMwg2kOcA+9xQ3NhoBqze6XaeidN/5COubSCHkp+bZ9wREQEBIN0CAduEoBne86ZfsX2HwXtJ9jM/ghzM4rJqnUNLkRV/wom8As3l9skVhNWf85H1JsVvK8PkRe3fO83N0QjZ9StB5QNQEAFviDbTTGTvt2tyoqGNJydjW32VQs0vs5XVc8d/M5FJpQQgMBLBm5jsADOt2zbNZLf1EGcPKjUaQwS19plBRChu/awACQIBAQIBAwAAAKWXTEBAq5u+FwX5AZapJ7qj7G7SIxP3mYey+otzvhefEAHYJdPBfgqNhf9vXtvya+ip4ZEJR6rubhW79ZMAabO48RERAmKv6d1LDUzhxxrKW1iDGkYD6tZ9TfORRKQKkfWd11g8EAFfm8qRd2+WVybP18udB0457INJ3U11YNIZvdKFY1rQjBECDegFhb6zh0BzQ1pirX6IQGLel/eF8+xv98HZYmkJgBAQAVAO5YGj0RWNmvhmC0NqrtWHwnjSUQNxd6uYRJMjfcPrEQEgM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ZLVeDUZzS0QAfdYjSzg2BIkhpiPAHQ5W4aN0OlpO7pNjwx46JLVtF5HEQLIaUC5PRYEMoQrfMJnG3PgKokrA37sdKCgo7Hxar/TcRABMapwxTKSfBkDooZq35By87R1c8Y4h4LvZXgOwY+CNfQR",
"quorumHash": "AAAAu4I2BiBDnydSZOLs2bV45yWb+vJFEKQi9wTc3hg=",
"signature": "t6IYrtqREmhCMGQva67DMYpqoY+4fIPB0245y/vhrs0L4qqv7+jDYFoppC7TzFCnCpXLxwOL15u8AOmGFsuMn7FA7qtz/rzJT0124Va1EL5ioeD0DwPVVCAEfQcN/7+6",
"round": 1,
"blockIdHash": "R6LgAhbTCMP2bbiktIm1nLnJ4csO0UvaK6vArGJ2ghs=",
"quorumType": 6
},
"metadata": {
"height": "9350",
"coreChainLockedHeight": 929436,
"epoch": 943,
"timeMs": "1702317747792",
"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"
}
}
}
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 |
π
Note: When requesting proofs, the data requested will be encoded as part of the proof in the response.
Example Request
const DAPIClient = require('@dashevo/dapi-client');
const client = new DAPIClient();
// 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
Deprecated Endpoints#
No endpoints were deprecated in Dash Platform v0.25, but the previous version of documentation can be viewed here.
Code Reference#
Implementation details related to the information on this page can be found in:
The Platform repository
packages/dapi/lib/grpcServer/handlers/core
folderThe Platform repository
packages/dapi-grpc/protos
folder