DAPI Endpoints#

Overview#

DAPI currently provides 2 types of endpoints: JSON-RPC and gRPC. The JSON-RPC endpoints expose some layer 1 information while the gRPC endpoints support layer 2 as well as streaming of events related to blocks and transactions/transitions.

Platform Endpoints#

In addition to providing the requested data, the following endpoints can also provide proofs that the data returned is valid and complete. The endpoints are versioned so updates can be made to them without introducing issues for endpoint consumers.

Contested Resources#

Endpoint

Description

getContestedResources

Added in Dash Platform v1.0.0
Retrieves the contested resources for a specific contract, document type, and index.

getContestedResourceIdentityVotes

Added in Dash Platform v1.0.0
Retrieves the voting record of a specific identity.

getContestedResourceVotersForIdentity

Added in Dash Platform v1.0.0
Retrieves the voters for a specific identity associated with a contested resource.

getContestedResourceVoteState

Added in Dash Platform v1.0.0
Retrieves the state of a vote for a specific contested resource.

getVotePollsByEndDate

Retrieves vote polls that will end within a specified date range

Data Contracts and Documents#

Endpoint

Description

getDataContract

Returns the requested data contract

getDataContracts

Returns the requested data contracts

getDataContractHistory

Returns the requested data contract history

getDocuments

Returns the requested document(s)

Identities#

Endpoint

Description

getIdentity

Returns the requested identity

getIdentityBalance

Returns the requested identity’s balance

getIdentityBalanceAndRevision

Returns the requested identity’s balance and revision

getIdentityByNonUniquePublicKeyHash

Added in Dash Platform v2.0.0
Returns one or more identities associated with a public key hash, including for non-unique masternode keys.

getIdentityByPublicKeyHash

Returns the identity associated with the provided public key hash

getIdentityContractNonce

Returns the identity contract nonce

getIdentityKeys

Returns the requested identity keys

getIdentityNonce

Returns the current identity nonce

getIdentitiesBalances

Added in Dash Platform v1.3.0
Retrieves the balances for a list of identities

getIdentitiesContractKeys

Added in Dash Platform v1.0.0
Returns keys associated to a specific contract for multiple Identities

Security Groups#

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.

Endpoint

Description

getGroupInfo

Retrieves information about a specific group within a contract, including its members and required power.

getGroupInfos

Retrieves information about multiple groups within a contract, including their members and required power.

getGroupActions

Retrieves a list of actions performed by a specific group within a contract.

getGroupActionSigners

Retrieves the signers for a specified group action within a contract, along with their assigned power.

State Transitions#

Endpoint

Description

broadcastStateTransition

Broadcasts the provided State Transition

waitForStateTransitionResult

Responds with the state transition hash and either a proof that the state transition was confirmed in a block or an error

System Info#

Endpoint

Description

getCurrentQuorumsInfo

Added in Dash Platform v1.4.0
Retrieves current quorum details, including validator sets and metadata for each quorum.

getEvonodesProposedEpochBlocksByIds

Added in Dash Platform v1.3.0
Retrieves the number of blocks proposed by the specified evonodes in a certain epoch, based on their IDs

getEvonodesProposedEpochBlocksByRange

Added in Dash Platform v1.3.0
Retrieves the number of blocks proposed by evonodes for a specified epoch

getEpochsInfo

Returns information about the requested epoch(s)

getPathElements

Added in Dash Platform v1.0.0
Returns elements for a specified path in the Platform

getPrefundedSpecializedBalance

Added in Dash Platform v1.0.0
Returns the pre-funded specialized balance for a specific identity

getProofs

Disabled for external use in Dash Platform v1.0.0
Returns proof information for the requested identities, contracts, and/or document(s)

getProtocolVersionUpgradeState

Returns the number of votes cast for each protocol version

getProtocolVersionUpgradeVoteStatus

Returns protocol version upgrade status

getStatus

Added in Dash Platform v1.2.0
Retrieves status information related to Dash Platform

getTotalCreditsInPlatform

Added in Dash Platform v1.1.0
Retrieves the total credits in the platform

Tokens#

Added in version 2.0.0.

Endpoint

Description

getIdentityTokenBalances

Retrieves the token balances of a specified identity.

getIdentitiesTokenBalances

Retrieves the token balances for a list of specified identities.

getIdentityTokenInfos

Retrieves information about specified tokens for a given identity.

getIdentitiesTokenInfos

Retrieves token information for a list of specified identities.

getTokenDirectPurchasePrices

Retrieves direct purchase prices defined for the specified token IDs.

getTokenPerpetualDistributionLastClaim

Retrieves the last-claim timestamp for a token’s perpetual distribution for a specific identity.

getTokenPreProgrammedDistributions

Retrieves pre-programmed distributions of a specified token.

getTokenStatuses

Retrieves the statuses of specified tokens.

getTokenTotalSupply

Retrieves the total supply of a specified token, including aggregated user accounts and system-held amounts.

Core Endpoints#

The following endpoints provide information about the Core chain.

JSON-RPC Endpoints#

Endpoint

Description

getBestBlockHash

Returns block hash of the chaintip

getBlockHash

Returns block hash of the requested block

gRPC Endpoints#

Endpoint

Description

broadcastTransaction

Broadcasts the provided transaction

getBestBlockHeight

Added in Dash Platform v1.0.0
Return the best block height

getBlock

Disabled in Dash Platform v1.0.0
Returns information for the requested block

getBlockchainStatus

Added in Dash Platform v1.0.0
Returns blockchain status information

getMasternodeStatus

Disabled in Dash Platform v1.0.0
Returns masternode status information

getTransaction

Returns details for the requested transaction

subscribeTo BlockHeadersWithChainLocks

Returns the requested block headers along with the associated ChainLocks.

subscribeToMasternodeList

Added in Dash Platform v1.0.0
Returns the full masternode list from the genesis block to the chain tip as the first message and provides update messages with every new block

subscribeTo TransactionsWithProofs

Returns transactions matching the provided bloom filter along with the associated islock message and merkle block

Note

The previous version of documentation can be viewed here.