Skip to content

Instantly share code, notes, and snippets.

@PastaPastaPasta
Created March 12, 2026 15:22
Show Gist options
  • Select an option

  • Save PastaPastaPasta/bf7d06f21d70640cf1d4421c66e33629 to your computer and use it in GitHub Desktop.

Select an option

Save PastaPastaPasta/bf7d06f21d70640cf1d4421c66e33629 to your computer and use it in GitHub Desktop.
Dash Platform (dashevo) WalletConnect JSON-RPC Wallet Spec

Dash Platform

Dash Platform JSON-RPC Methods

Note: This document is still under review and may change. Wallet and dapp implementers should expect breaking changes until this spec reaches stable status.

dashevo_getIdentities

Returns the Dash Platform identities available in the wallet for the current session chain.

Parameters

None

Returns

  1. Array - Array of identity objects:
    1. account : STRING - CAIP-10 account identifier
    2. identityId : STRING - base58-encoded 256-bit identity ID
    3. displayName : STRING | null - DPNS label if cached by the wallet, otherwise null

Example

// Request
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "dashevo_getIdentities",
  "params": []
}

// Result
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": [
    {
      "account": "dashevo:evo1:EWSqsaghuwHRjtutbXK3nR11KbRkg9a12PNAAkJWRTpY",
      "identityId": "EWSqsaghuwHRjtutbXK3nR11KbRkg9a12PNAAkJWRTpY",
      "displayName": "alice"
    }
  ]
}

Note: displayName is wallet-optional. The wallet returns it if cached from DPNS; it is not required to resolve DPNS on demand.


dashevo_signStateTransition

Signs a Dash Platform state transition without broadcasting it.

Parameters

  1. account : STRING (required) - CAIP-10 account identifier
  2. stateTransition : STRING (required) - base64-encoded unsigned state transition bytes (standard RFC 4648 §4, not base64url)
  3. keyId : INTEGER (optional) - identity key index hint (the id field from the identity's publicKeys array)
  4. label : STRING (optional) - dapp-provided display label for the wallet prompt

Returns

  1. account : STRING - CAIP-10 account identifier
  2. keyId : INTEGER - identity key index that was actually used for signing
  3. signedStateTransition : STRING - base64-encoded signed state transition bytes

Example

// Request
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "dashevo_signStateTransition",
  "params": {
    "account": "dashevo:evo1:EWSqsaghuwHRjtutbXK3nR11KbRkg9a12PNAAkJWRTpY",
    "stateTransition": "base64encodeddata...",
    "keyId": 1,
    "label": "Update contact request"
  }
}

// Result
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "account": "dashevo:evo1:EWSqsaghuwHRjtutbXK3nR11KbRkg9a12PNAAkJWRTpY",
    "keyId": 1,
    "signedStateTransition": "base64encodedsigneddata..."
  }
}

Example (without keyId — wallet chooses key)

// Request
{
  "id": 2,
  "jsonrpc": "2.0",
  "method": "dashevo_signStateTransition",
  "params": {
    "account": "dashevo:evo1:EWSqsaghuwHRjtutbXK3nR11KbRkg9a12PNAAkJWRTpY",
    "stateTransition": "base64encodeddata...",
    "label": "Create document"
  }
}

// Result (wallet selected key 0)
{
  "id": 2,
  "jsonrpc": "2.0",
  "result": {
    "account": "dashevo:evo1:EWSqsaghuwHRjtutbXK3nR11KbRkg9a12PNAAkJWRTpY",
    "keyId": 0,
    "signedStateTransition": "base64encodedsigneddata..."
  }
}

dashevo_signAndBroadcastStateTransition

Signs a Dash Platform state transition and broadcasts it to the network via DAPI.

Parameters

  1. account : STRING (required) - CAIP-10 account identifier
  2. stateTransition : STRING (required) - base64-encoded unsigned state transition bytes (standard RFC 4648 §4, not base64url)
  3. keyId : INTEGER (optional) - identity key index hint (the id field from the identity's publicKeys array)
  4. label : STRING (optional) - dapp-provided display label for the wallet prompt

Returns

  1. account : STRING - CAIP-10 account identifier
  2. keyId : INTEGER - identity key index that was actually used for signing
  3. signedStateTransition : STRING - base64-encoded signed state transition bytes
  4. stateTransitionHash : STRING - Tenderdash transaction hash (SHA-256 of the signed serialized bytes), lowercase hex

Example

// Request
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "dashevo_signAndBroadcastStateTransition",
  "params": {
    "account": "dashevo:evo1:EWSqsaghuwHRjtutbXK3nR11KbRkg9a12PNAAkJWRTpY",
    "stateTransition": "base64encodeddata...",
    "keyId": 1,
    "label": "Register data contract"
  }
}

// Result
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "account": "dashevo:evo1:EWSqsaghuwHRjtutbXK3nR11KbRkg9a12PNAAkJWRTpY",
    "keyId": 1,
    "signedStateTransition": "base64encodedsigneddata...",
    "stateTransitionHash": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2"
  }
}

Note: The wallet handles DAPI broadcast internally. The dapp does not need to know which DAPI node is used — this is a wallet implementation concern, not a protocol concern.


Encoding Reference

Field Encoding
stateTransition Standard base64 (RFC 4648 §4), not base64url
signedStateTransition Standard base64 (RFC 4648 §4), not base64url
stateTransitionHash Tenderdash transaction hash: SHA-256 of the signed serialized bytes, lowercase hex
identityId base58 (no checksum), 32 bytes / 43-44 characters
keyId Integer — the key's id field in the identity's publicKeys array per Platform protocol

Error Codes

Code Meaning
4001 User rejected the request
4100 Unauthorized — identity/account not available in wallet
4200 Unsupported method — wallet does not support the requested method
4900 Disconnected — provider is disconnected from the relay
4901 Wrong chain — request chain does not match session chain
-32602 Invalid params — undecodable state transition or missing required fields
-32000 Signing, validation, or broadcast failure

Codes 4200 and 4900 are standard WalletConnect provider errors included for completeness. The remaining codes are application-level errors specific to Dash Platform methods.

Errors MAY include a data field with { "message": "human-readable detail" }.

Error Response Example

// Error: wrong chain
{
  "id": 1,
  "jsonrpc": "2.0",
  "error": {
    "code": 4901,
    "message": "Wrong chain: request targets dashevo:dash-testnet-51 but session is on dashevo:evo1"
  }
}

Behavior Rules

  1. The wallet must reject requests where the request chain does not match the session chain (error 4901).
  2. The wallet must deserialize the state transition before prompting the user, to display meaningful information about what is being signed.
  3. The wallet must verify that the state transition owner matches the requested account when the transition type includes an owner field (e.g., document create/replace/delete, data contract update). See Platform protocol documentation for the full list of transition types and their fields.
  4. If keyId is provided, the wallet must use that specific key or reject with an error — it must not silently fall back to a different key.
  5. For signAndBroadcast, the wallet broadcasts through DAPI after signing. DAPI endpoint selection is internal to the wallet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment