Dash
Dash Transactions
Build, sign, broadcast Dash transactions, and compute signature hashes with Zafeguard Dash components.
Components for building, signing, and broadcasting Dash transactions, plus signature hash computation. Dash uses P2PKH addresses only. Network access (UTXO fetch, fee estimate, broadcast) is handled by Zafeguard — no RPC URL required.
BROADCAST_DASH_TRANSACTION Workflow Component
Broadcasts a finalized raw transaction to the Dash network and returns the transaction ID.
| Field | Type | Required | Description |
|---|
network | 'mainnet' | 'testnet' | Yes | Target Dash network |
| Field | Type | Description |
|---|
signedTransaction | string (hex) | Raw transaction hex to broadcast |
| Field | Type | Description |
|---|
txid | string | Transaction ID (64-char hex) |
import { WorkspaceClient, ComponentModule } from '@zafeguard/caller-sdk';
const workspace = new WorkspaceClient({ apiKey: process.env.ZAFEGUARD_API_KEY! });
const result = await workspace.call(ComponentModule.BROADCAST_DASH_TRANSACTION, {
signedTransaction: 'deadbeef...',
}).promise();
console.log(result.txid);
BUILD_DASH_TRANSACTION Workflow Component
Builds an unsigned PSBT with UTXO selection, fee estimation, and sighash generation. Supports optional locktime, OP_RETURN data, change address, and fee deduction.
| Field | Type | Required | Default | Description |
|---|
network | 'mainnet' | 'testnet' | Yes | — | Target Dash network |
deductFee | boolean | No | false | When true, subtracts the estimated fee from amount instead of adding it on top |
| Field | Type | Description |
|---|
recipientAddress | string | Destination Dash address |
amount | number | Amount to send in duffs (1 DASH = 100,000,000 duffs) |
publicKey | string (hex) | Sender public key — compressed 33 bytes (66 hex) or uncompressed 65 bytes (130 hex) |
locktime | string | null | Transaction locktime as block height string. null to disable |
opReturnData | string | null | Hex data to embed in an OP_RETURN output. null to skip |
changeAddress | string | null | Address for change output. null uses the sender's address |
feeRate | number | null | Custom fee rate in duffs/vByte. null falls back to the network's half-hour fee estimate. See Customizing Transaction Fees for rate selection guidance |
| Field | Type | Description |
|---|
unsignedTransaction | string (hex) | Hex-encoded unsigned PSBT |
messageHashes | string[] | Array of sighash hex strings, one per input (each 64 hex chars) |
estimatedFee | number | Estimated network fee in duffs (using the chosen fee rate) |
import { WorkspaceClient, ComponentModule } from '@zafeguard/caller-sdk';
const workspace = new WorkspaceClient({ apiKey: process.env.ZAFEGUARD_API_KEY! });
const result = await workspace.call(ComponentModule.BUILD_DASH_TRANSACTION, {
recipientAddress: 'XyZ...',
amount: 100_000_000, // 1 DASH
publicKey: '02abc123...',
locktime: null,
opReturnData: null,
changeAddress: null,
feeRate: null,
}).promise();
console.log(result.unsignedTransaction);
console.log(result.messageHashes);
console.log(result.estimatedFee);
SIGN_DASH_TRANSACTION Workflow Component
Applies signatures to an unsigned PSBT and produces a finalized raw transaction ready to broadcast.
| Field | Type | Description |
|---|
unsignedTransaction | string (hex) | Hex-encoded PSBT from BUILD_DASH_TRANSACTION |
signatures | string[] | Hex-encoded signatures, one per input |
publicKey | string (hex) | Signer public key — compressed 33 bytes (66 hex) or uncompressed 65 bytes (130 hex) |
| Field | Type | Description |
|---|
signedTransaction | string (hex) | Finalized raw transaction hex, ready to broadcast |
COMPUTE_DASH_SIGNATURE_HASH Workflow Component
Computes a signature hash for a message using either the standard Dash message format (\x19DarkCoin Signed Message:\n) or raw double-SHA-256 hashing.
| Field | Type | Required | Description |
|---|
format | 'dash-message' | 'raw' | Yes | dash-message produces a standard signed-message hash. raw produces a double SHA-256 hash |
| Field | Type | Description |
|---|
message | string | Message string to hash |
| Field | Type | Description |
|---|
messageHash | string | 32-byte hash as 64-char hex, ready for external signing |