Revisión de Integraión#

Esta documentación también está disponible como un PDF.

Dash Core is a fork of Bitcoin Core and shares many common functionalities. Key differences are found in existing JSON-RPC commands which have been customized to support unique functionalities such as InstantSend.

The Basics#

Dash is a Proof of Work network, and similar to Bitcoin, Dash has a mining network but uses a different block hashing algorithm. Dash serves as an improvement of Bitcoin’s shortcomings by offering a robust solution for instant transactions, enhancing user privacy, and offering a self-sustainable decentralized governance model.

JSON-RPC Interface#

The majority of commands are unchanged from Bitcoin making integration into existing systems relatively straightforward. Note that the following commands have been modified to support InstantSend:

Block Hashing Algorithm#

Dash uses the X11 algorithm in place of SHA256 used in Bitcoin. It’s important to note, however, that this only affects the hashing of the block itself. All other internals utilize SHA256 hashes (transactions, merkle root, etc.), which allows for most existing libraries to work in the Dash ecosystem.

Transacciones especiales#

Dash Core v0.13.x introduced the concept of “Special Transactions”. Please see the Transaction Type Integration Guide for more information.

Transacciones especiales#

Esta documentación también está disponible en un PDF.

Dash 0.13.0 and higher implement DIP002 Special Transactions, which form a basis for new transaction types that provide on-chain metadata to assist various consensus mechanisms. The following special transaction types exist:

Lanzamiento

Versión

Tipo

Tamaño del pago

Pago

JSON del pago

Tipo de transacción

v0.13.0

3

0

n/d

n/d

n/d

Transacción estándar

v0.13.0

3

1

<variable int>

<hex>

proRegTx

Masternode Registration

v0.13.0

3

2

<variable int>

<hex>

proUpServTx

Update Masternode Service

v0.13.0

3

3

<variable int>

<hex>

proUpRegTx

Update Masternode Operator

v0.13.0

3

4

<variable int>

<hex>

proUpRevTx

Masternode Revocation

v0.13.0

3

5

<variable int>

<hex>

cbTx

Masternode List Merkle Proof

v0.13.0

3

6

<variable int>

<hex>

qcTx

Quorum Commitment

Notas de Instalación

  1. DIP002 Special Transactions are a foundational component of Dash Core v0.13.0 and introduce a new Transaction Version and related “Payload” to the network.

  2. Integrated Systems must be able to serialize and deserialize these new Transaction Types to accurately encode and decode Raw Transaction data.

  3. From a backwards compatibility perspective, the 4 byte (32-bit) version field included in Legacy Transactions has been split into two fields: version and type (each consisting of 2 bytes).

  4. Refer to the Special Transactions section of the dash developer reference for additional detail on these data types, e.g. <variable int>.

  5. InstantSend status and Payload JSON (e.g. proRegTx) is included in the JSON-RPC response, please note that this data is not part of the calculated hash and is provided for convenience.

See the v0.13.0 transaction types integration documentation (PDF) for worked examples of each transaction type.

InstantSend#

This documentation is also available as a PDF.

InstantSend is a feature provided by the Dash network that allows for zero-confirmation transactions to be safely accepted and re-spent. The network attempts to lock the inputs of every valid transaction when it is broadcast to the network. Every secured transaction is included in a following block in accordance with standard blockchain principles.

InstantSend is enabled by the Masternode Network which comprises approximately 5,000 masternode servers. These nodes are differentiated from standard nodes by having proven ownership of 1,000 Dash, making the network highly resistant to Sybil attacks. Masternodes form Long-Living Masternode Quorums (LLMQs), which are responsible for providing near-instant certainty to the transaction participants that the transaction inputs cannot be respent, and that the transaction will be included in a following block instead of a conflicting transaction.

This concept works as an extension to Nakamoto Consensus. InstantSend enables transacted funds to be immediately and securely respent by the recipient, even before the transaction is included in a block.

Recibir transacciones InstantSend#

Recibiendo una transacción de InstantSend introduce dos requerimientos:

  1. La habilidad de determinar el “estado de InstantSend” de la transacción dada.

  2. La habilidad de ajustar “Estado de confirmación” independiente de confirmación de bloques.

El estado de InstantSend es típicamente determinado a través de conexiones directas con el servicio de dash. Notificaciones de ZMQ, o a través que usan el script de notificación de wallets externas.

Direct Connection: InstantSend Status can be identified through direct connection with the Dash daemon using JSON-RPC protocol. The “instantlock” attribute of the JSON response reflects the status of the transaction and is included in the following commands:

ZMQ Notification: Whenever a transaction enters the mempool and whenever a transaction is locked in the mempool, ZMQ notifications can be broadcast by the node. A list of possible ZMQ notifications can be found here.

The following notifications are relevant for recognizing transactions and their corresponding instantlocks:

  • zmqpubhashtx

  • zmqpubhashtxlock

  • zmqpubrawtx

  • zmqpubrawtxlock

Notificación de wallet: Dash Core Daemon se puede configurar para ejecutar un script externo cuando una transacción de InstantSend relacionado a la wallet esta observando. Esta esta configurado para agregar las siguiente linea al archivo dash.conf:

instantsendnotify=/path/to/concurrent/safe/handler %s

This is typically used with a wallet that has been populated with watch-only addresses.

Transmitir Transacciones InstantSend#

Since Dash v0.14.0 established LLMQs on the Dash network, quorums will now attempt to lock every valid transaction by default without any additional fee or action by the sending wallet or user. A transaction is eligible for InstantSend when each of its inputs is considered confirmed. This is the case when at least one of the following circumstances is true:

  • the previous transaction referred to by the input is confirmed with 6 blocks

  • the previous transaction is confirmed through an older InstantSend lock

  • the block containing the previous transaction is ChainLocked

When checking the previous transaction for an InstantSend lock, it is important to do this on mempool (non-mined) transactions. This allows chained InstantSend locking.

Recursos adicionales#

Los siguientes recursos proporcionan información adicional sobre InstantSend y están destinados a ayudar a proporcionar una comprensión más completa de las tecnologías subyacentes.

Servicios API#

Existen varios servicios API para facilitar la integración rápida y sencilla con la red Dash para servicios que incluyen:

  • Transmisión de transacciones

  • Tipo de cambio

  • Conversión de monedas

  • Generación de facturas

Los servicios de API generalmente se aprovechan para eliminar ese requisito de ejecutar tu propia infraestructura para admitir las interacciones de cadena de bloques. Esto incluye mecanismos tales como:

  • Formar y transmitir una transacción a la red.

  • Generación de direcciones usando Billeteras HD.

  • Procesamiento de pagos usando WebHooks.

Hay una variedad de opciones para respaldar estos métodos, con el diferenciador clave como el modelo de fijación de precios y las funciones compatibles. La siguiente lista de proveedores de API intenta delinear estas características/diferenciadores claves y también incluye un enlace a la documentación relacionada.

Insight#

../../../_images/insight.png

dashevo/insight-api

El Insight REST API de software libre que te proporciona una forma conveniente, potente y sencilla de leer datos de la red de Dash y crear tus propios servicios con ella. Una guía practica para iniciar con el API de Insight y la interfaz del explorador de bloques de Insight esta disponible here.

  • Características: Transmisión de transacciones, notificaciones de WebSocket.

  • Modelo de precios: Gratis / Fuente abierta

  • Documentación: dashevo/insight-api

BlockCypher#

../../../_images/blockcypher.png

https://www.blockcypher.com

BlockCypher es un simple RESTful JSON API para interactuar con cadenas de bloques, que puede ser accedido a través de HTTP o HTTPS desde el dominio api.blockcypher.com.

  • Características: Transmisión de transacción, Billetera HD / Generación de direcciones, Retono de llamadas de WebSocket y WebHook, así como el reenvío de pagos. BlockCypher no maneja llaves privadas.

  • Pricing Model: Per API Call, 5000 Requests -> $85.00 per month (https://accounts.blockcypher.com)

  • Documentación: https://www.blockcypher.com/dev/dash/

BitGo#

../../../_images/bitgo.png

https://www.bitgo.com

BitGo provee un API simple y robusto basado en RESTful y un SDK para el cliente que integra la wallet de divisa digital con la aplicación. Soporte para DASH InstantSend esta disponible.

  • Funcionalidades: Wallets Multi-Firma de disco, Operaciones de Wallet, Notificaciones WebSockets y WebHook, Soluciones custodiadas

  • Modelo de precio: Por llamada del API

  • Documentation: https://app.bitgo.com/docs/

ChainRider#

../../../_images/chainrider.png

https://www.chainrider.io

ChainRider es un servicio en la nube que provee un conjunto de REST API para el manejo y exploración de monedas digitales

  • Características: Consultas a la Cadena de Bloques, Notificaciones de Eventos, Transmisión de Transacciones, Procesamiento de Pago, etc.

  • Modelo de Precios: Prueba gratis, pago por llamada de API

  • Documentation: https://www.chainrider.io/docs/dash/

Blockmove#

../../../_images/blockmove.png

https://blockmove.io

Сryptocurrency wallet, merchant & API provider. Blockmove is a simple and easy way to start accepting payments in cryptocurrency.

  • Features: Non-custodial wallet, HD Wallet, High anonymity, Low fees. Private keys are not stored and are available only to the user.

  • Pricing Model: API - 0.3% for withdrawal transactions. Merchant - 1 year free, then $49/month

  • Documentation: https://docs.blockmove.io

NOWNodes#

../../../_images/nownodes.png

https://nownodes.io/

NOWNodes provides simple, fast, and secure RPC access to Dash-based full nodes. The low latency and high performance is of great use to researchers and businesses such as crypto miners or hardware wallet providers.

CoinPayments#

../../../_images/coinpayments.png

https://www.coinpayments.net

CoinPayments is an integrated payment gateway for cryptocurrencies such as Dash. Shopping cart plugins are available for all popular webcarts used today. CoinPayments can help you set up a new checkout or integrate with your pre-existing checkout.

  • Features: Invoicing, Exchange Rates, WebHook Callbacks. CoinPayments holds Private Keys on their server allowing merchants to withdraw funds in Cryptocurrency or convert to fiat.

  • Integraciones: aMember Pro, Arastta, Blesta, BoxBilling, Drupal, Ecwid, Hikashop, Magento, OpenCart, OSCommerce, PrestaShop, Tomato Cart, WooCommerce, Ubercart, XCart, ZenCart

  • Modelo de precios: 0.5% comisión de preocesamiento (https://www.coinpayments.net/help-fees)

  • Documentación: https://www.coinpayments.net/apidoc

Recursos SDK#

SDKs (Software Development Kits) are used to accelerate the design and development of a product for the Dash Network. These resources can either be used to interface with an API provider or for the creation of standalone applications by forming transactions and/or performing various wallet functions.

Guía de desarrollador de Dash#

../../../_images/dash-logo.png

https://dashcore.readme.io/

The Dash Developer Portal aims to provide the information you need to understand Dash and start building Dash-based applications. To make the best use of this documentation, you may want to install the current version of Dash Core and Dash Platform, either from source, from a pre-compiled executable or from Docker Hub.

NodeJS/JavaScript: Dashcore#

../../../_images/bitcore.png

https://bitcore.io

Dashcore en una bifurcación de Bitcore y opera como un nodo completo de Dash - tus aplicaciones corren directamente en la red punto-a-punto. Para el desarrollo de aplicaciones de billeteras, indices adicionales deben ser agregados en Dash para consultar balance de direcciones, histico de transacciones, y salidas sin gastar.

NodeJS/JavaScript: DashJS#

DashJS allows you to transact on L1 or fetch/register documents on L2 within a single library, including management and signing of your documents.

PHP: Bitcoin-PHP#

Bit-Wasp/bitcoin-php

Bitcoin-PHP es una implementación de Bitcoin con soporte para Dash usando mayormente puro PHP.

Python: PyCoin#

richardkiss/pycoin

PyCoin es una implementación de un montón de utilidades que pueden ser útiles cuando se trata de Bitcoin y Dash. Ha sido probado con Python 2.7, 3.6 y 3.7

Java: DashJ#

../../../_images/bitcoinj.png

dashevo/dashj

DashJ es una librería para trabajar con el protocolo Dash. Puede mantener una billetera, enviar/recibir transacciones (incluye InstantSend) sin necesidad de una copia local de Dash Core, y tiene muchas otras características avanzadas. Esta implementado en Java pero puede ser usado desde cualquier

Objective-C: Dash-Sync#

../../../_images/dash-logo.png

dashevo/dashsync-iOS

Dash-Sync es un framework de blockchain hecho en Objective-C para iOS. Este implementa las mejoras mas relevantes de Propuestas de mejoras de Bitcoin (BIPs) y Propuestas de Mejoras de Dash (DIPs).

.NET: NBitcoin#

../../../_images/dash-logo.png

MetacoSA/NBitcoin

NBitcoin is the most complete Bitcoin library for the .NET platform and has been patched to include support for Dash. It implements all most relevant Bitcoin Improvement Proposals (BIPs) and Dash Improvement Proposals (DIPs). It also provides low level access to Dash primitives so you can easily build your application on top of it.

BlockCypher#

../../../_images/blockcypher.png

https://www.blockcypher.com

BlockCypher también ofrece clientes SDK.

Maquina expendedora#

Community member moocowmoo has released code to help merchants build their own vending machine and set it up to receive Dash InstantSend payments. The Dashvend software can also be used to create any sort of payment system, including point-of-sale systems that can accept InstantSend payments.

Precio de tickers#

You can add a simple price ticker widget to your website using the simple code snippet generator from CoinGecko.

Widgets similares con diferentes diseños estan disponibles en CoinLib, WorldCoinIndex y Cryptonator, mientras una API que provee información similar esta disponible en DashCentral.

Códigos R#

Many wallets can generate QR codes that are scannable to simplify entry of the Dash address. Printing these codes or posting the on your website makes it easy to receive payment and tips in Dash, both online and offline.

  • In Dash Core, go to the Receive tab, generate an address if necessary, and double-click it to display a QR code. Right-click on the QR code and select Save Image to save a PNG file.

  • En Dash para Android, toque Solicitar Monedas luego toque el codigo QR para mostrar la imagen mas grande. Puede hacer captura de pantalla para guardar una imagen.

  • En Dash para iOS, deslice a la izquierda para mostrar la pantalla Recibir Dash. Un codigo QR y dirección aparecera. Puedes hacer una captura de pantalla para guardar una imagen.

  • Para generar un código QR de cualquier dirección, visita CWA QR Code Generator y simplemente pegue su dirección Dash para generar una imagen.