Integration Overview

This documentation is also available as a PDF.

Dash Core v0.13.x is a “fork” of Bitcoin and shares many common functionalities. Key differences relate to existing JSON-RPC commands which have been customized to support unique functionalities such as InstantSend.

  1. General Information: Dash is a “Proof of Work” network and is similar to Bitcoin.
    1. Block Time: ~2.6 Minutes per Block
    2. Github Source: https://github.com/dashpay/dash
    3. Latest Release: https://github.com/dashpay/dash/releases
  2. 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:
  3. 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.
  4. Special Transactions: Dash Core v0.13.x introduces the concept of “Special Transactions”. Please see the Transaction Type Integration Guide for more information.

v0.13.0 Integration Notes

This documentation is also available as a PDF.

Dash 0.13.0 implements 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:

Release إصدار Type Payload Size Payload Payload JSON Transaction Purpose
v0.13.0 3 0 n/a n/a n/a Standard Transaction
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

Integration notes:

  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 in order 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 Overview

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 by Merchants and other service providers. All InstantSend Transactions are secured for 25 blocks by the “Masternode Network” at the moment of broadcast. The transaction is mined into the next block in accordance with standard blockchain principles.

InstantSend is enabled by the Masternode Network which comprises approximately 4,800 masternode servers. These nodes are differentiated from standard nodes by having proven ownership of 1,000 Dash. One responsibility that is appointed to this special type of server is to perform "Transaction Locking", also known as InstantSend.

This concept works as an extension to network consensus. When an "InstantSend" transaction occurs the network goes through an extra validation process which examines the following two properties of the transaction:

  1. Input Maturity: the network will require all inputs to have at least 6 confirmations.
  2. Input Composition: the number of inputs in use dictates fee requirements.
    1. 1 - 4 inputs: per-kB fee of 0.00001 DASH using Automatic InstantSend.
    2. 5+ inputs: per-input fee of 0.0001 DASH is required.

Assuming the Input Maturity and Input Composition requirements are met, the network will "lock" the inputs related to this transaction for 25 blocks. Transactions carrying 4 or fewer inputs are referred to as a “simple transaction” and carry no extra fee.

Automatic InstantSend

Dash Core v0.13.x introduces the process of Automatic InstantSend. Any transaction which is classified as a “simple transaction” will automatically be broadcast as an InstantSend transaction when using standard transaction broadcast endpoints.

InstantSend vs. Standard Transactions

The term “InstantSend” is used to describe a standard transaction that has been provided additional assurances by the Masternode Network. As a result, and from an integration perspective, there is no technical difference between the two types of transactions.

The most notable difference relates to the way that confirmation policy is applied within an integrated system. The receiving system must be aware of InstantSend Status in order to safely apply transaction confirmation policies that are enabled using this technology.

تلقي معاملات الإرسال الفوري

Receiving an InstantSend Transaction introduces two requirements:

  1. The ability to determine the “InstantSend Status” of a given transaction.
  2. The ability to adjust “Confirmation Status” independently of block confirmation.

InstantSend Status is typically determined through direct connection with the dash daemon, ZMQ notification, or through the usage of an external wallet notification script.

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:

Wallet Notification: The Dash Core Daemon can be configured to execute an external script whenever an InstantSend transaction relating to that wallet is observed. This is configured by adding the following line to the dash.conf file:

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

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

البث المعاملات للإرسال الفوري

Automatic InstantSend introduces two requirements into the system being integrated:

  1. The ability to evaluate the number of inputs in a given transaction.
  2. The ability to apply an increased fee-level in cases of 5+ inputs.

In many cases an integrated system will already contain logic intended to keep transaction fees to a minimum by optimizing input usage. If this is true, and it can be assumed that only “simple transactions” are being formed, no additional development effort is required.

In cases where this is not possible or will be unknown, the integrated system should be able to calculate a fee based on the number of inputs being used to form the transaction. This per-input fee of 0.0001 DASH must be applied in order for the transaction to be successfully broadcast as an InstantSend. In these cases, it’s important to note that the “instantsend” flag must be set as “true” when issuing the sendrawtransaction command, e.g.:

sendrawtransaction "hexstring" false true

موارد إضافية

توفر الموارد التالية معلومات إضافية حول الإرسال الفوري وتهدف إلى المساعدة على توفير فهم أكثر اكتمالاً للتكنولوجيات الأساسية.

خدمات API

This documentation is also available as a PDF.

توجد عدة خدمات API لتسهيل التكامل السريع والسهل مع شبكة داش للخدمات بما في ذلك:

  • بث المعاملات
  • معدل التحويل
  • تحويل العملة
  • جيل الفاتورة

يتم استخدام خدمات API بشكل نموذجي للتخلص من متطلبات تشغيل البنية الأساسية الخاصة بك لدعم تفاعلات بلوكشين. يتضمن ذلك آليات مثل:

  • تشكيل ونقل المعاملات إلى الشبكة.
  • توليد العناوين باستخدام HD محافظ.
  • معالجة الدفع باستخدام WebHooks.

هناك مجموعة متنوعة من الخيارات لدعم هذه الطرق ، مع الاختلاف الرئيسي في كون نموذج التسعير مضمنًا وميزات مدعومة. تحاول القائمة التالية لمقدمي واجهة برمجة التطبيقات تحديد هذه الميزات / الاختلافات الرئيسية كما تتضمن أيضًا رابطًا للوثائق ذات الصلة.

نظرة

../_images/insight.png

https://github.com/dashevo/insight-api

The open-source Insight REST API provides you with a convenient, powerful and simple way to read data from the Dash network and build your own services with it. A practical guide to getting started with the Insight API and Insight UI block explorer is available here.

BlockCypher

../_images/blockcypher.png

https://www.blockcypher.com

BlockCypher هو واجهة برمجة تطبيقات بسيطة ومعظمها RESTful JSON للتفاعل مع بلوكشين ، يمكن الوصول إليها عبر HTTP أو HTTPS من نطاق api.blockcypher.com.

  • الميزات: بث المعاملات ، HD محفظة / توليد عناوين ، WebSocket و WebHook Callbacks بالإضافة إلى إعادة توجيه الدفع. BlockCypher لا يتعامل مع مفاتيح خاصة.
  • نموذج التسعير: لكل استدعاء API ، طلبات 5000 -> 85.00 دولار في الشهر (https://accounts.blockcypher.com/plans)
  • الوتيقة:https://www.blockcypher.com/dev/dash/

BitGo

../_images/bitgo.png

https://www.bitgo.com

BitGo provides a simple and robust RESTful API and client SDK to integrate digital currency wallets with your application. Support for Dash InstantSend is available.

  • Features: Multi-Signature HD Wallets, Wallet Operations, WebSocket and WebHook Notifications, Custody Solutions
  • Pricing Model: Per API Call
  • Documentation: https://www.bitgo.com/api/v2/

ChainRider

../_images/chainrider.png

https://www.chainrider.io

ChainRider هي خدمة سحابة توفر مجموعة من واجهات برمجة التطبيقات REST لإدارة واستكشاف العملة الرقمية.

  • الميزات: استعلامات بلوكشين ، إخطارات الأحداث ، بث المعاملات ، معالجة الدفع ، إلخ.
  • نموذج التسعير: إصدار تجريبي مجاني والدفع لكل مكالمة API
  • الوتيقة:https://www.chainrider.io/docs/dash

GoCoin

../_images/gocoin.png

https://gocoin.com

تجعل منصة GoCoin من اتخاذ داش أمرًا سهلاً مثل تثبيت مكون إضافي. يتم تنفيذ معالجة الدفع بالفعل لكل منصة تسوق رئيسية. تركز GoCoin على مساعدة التجار في منافذ الخصوصية وصناعات محددة ، وتتعامل مع جميع مخاطر المعاملات لجميع المدفوعات من عملائك.

  • الميزات: الفواتير ، أسعار الصرف ، WebHook Callbacks. تحتفظ GoCoin بالمفاتيح الخاصة على خادمها مما يسمح للتاجر بسحب الأموال في العملات الرقمية أو تحويلها إلى Fiat.
  • التكامل: WooCommerce ، Magento ، Prestashop ، VirtueMart ، ZenCart ، OpenCart ، OSCommerce ، UberCart ، nopCommerce ، WHMCS ، NATS4 ، Shopify.
  • نموذج التسعير: رسوم المعالجة بنسبة 1٪ (https://gocoin.com/fees)
  • الوتيقة:https://gocoin.com/docs

CoinPayments

../_images/coinpayments.png

https://www.coinpayments.net

CoinPayments هو عبارة عن بوابة دفع متكاملة لعمليات العملات الرقمية مثل داش. تتوفر المكونات الإضافية لسلة التسوق لجميع كاميرات الويب الشائعة المستخدمة اليوم. يمكن أن تساعدك CoinPayments في إعداد عملية دفع جديدة ، أو تتكامل مع عملية الدفع السابقة.

  • الميزات: الفواتير ، أسعار الصرف ، WebHook Callbacks. تحتفظ CoinPayments بمفاتيح خاصة على خادمها تسمح للتاجر بسحب الأموال في العملات الرقمية أو تحويلها إلى Fiat.
  • التكاملات: aMember Pro، Arastta، Blesta، BoxBilling، Drupal، Ecwid، Hikashop، Magento، OpenCart، OSCommerce، PrestaShop، Tomato Cart، WooCommerce، Ubercart، XCart، ZenCart
  • نموذج التسعير: 0.5٪ رسوم المعالجة (https://www.coinpayments.net/help-fees)
  • الوتيقة:https://www.coinpayments.net/apidoc

موارد SDK

This documentation is also available as a PDF.

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.

دليل مطورين داش

../_images/dash-logo.png

https://dash-docs.github.io/en/developer-guide

يهدف دليل مطور داش إلى توفير المعلومات التي تحتاجها لفهم داش والبدء في إنشاء تطبيقات تستند إلى داش. لتحقيق الاستفادة المثلى من هذا المستند ، قد تحتاج إلى تثبيت الإصدار الحالي من داش كور ، إما من المصدر أو من ملف قابل للتنفيذ تم ترجمته مسبقًا.

NodeJS/JavaScript: Dashcore

../_images/bitcore.png

https://bitcore.io

Dashcore is a fork of Bitcore and operates as a full Dash node — your apps run directly on the peer-to-peer network. For wallet application development, additional indexes have been added into Dash for querying address balances, transaction history, and unspent outputs.

PHP: Bitcoin-PHP

https://github.com/snogcel/bitcoin-php

Bitcoin-PHP is an implementation of Bitcoin with support for Dash using mostly pure PHP.

Python: PyCoin

https://github.com/DeltaEngine/pycoin

PyCoin is an implementation of a bunch of utility routines that may be useful when dealing with Bitcoin and Dash. It has been tested with Python 2.7, 3.6 and 3.7.

Java: DashJ

../_images/bitcoinj.png

https://github.com/HashEngineering/dashj

داش ج هي مكتبة للعمل مع بروتوكول داش. يمكنه الاحتفاظ بمحفظة ، إرسال / استقبال المعاملات (بما في ذلك الإرسال الفوري) دون الحاجة إلى نسخة محلية من داش كور ، ولديه العديد من الميزات المتقدمة الأخرى. يتم تنفيذه في Java ولكن يمكن استخدامه من أي لغة متوافقة مع JVM: يتم تضمين أمثلة في Python و JavaScript.

Objective-C: Dash-Sync

../_images/dash-logo.png

https://github.com/dashevo/dashsync-iOS

Dash-Sync is an Objective-C Dash blockchain framework for iOS. It implements all most relevant Bitcoin Improvement Proposals (BIPs) and Dash Improvement Proposals (DIPs).

.NET: NBitcoin

../_images/dash-logo.png

https://github.com/MetacoSA/NBitcoin

NBitcoin هي مكتبة بيتكوين الأكثر اكتمالا لمنصة .NET ، وقد تم تصحيحها لتتضمن دعم داش. وتنفذ جميع مقترحات تحسين بيتكوين الأكثر ملاءمة (BIPs) و داش تحسين الإقتراحات (DIPs). كما يوفر وصولاً منخفض المستوى إلى البدايات الأولية بحيث يمكنك بسهولة إنشاء التطبيق الخاص بك فوقه.

BlockCypher

../_images/blockcypher.png

https://www.blockcypher.com

يوفر BlockCypher أيضًا SDKs للعميل.

GoCoin

../_images/gocoin.png

https://gocoin.com

  • النظام الأساسي: JavaScript ، PHP ، Java ، Ruby ، .NET ، Python
  • المستودعات: https://gocoin.com/docs

آلات البيع

أصدر عضو المنتدى moocowmoo تعليمات برمجية لمساعدة التجار في إنشاء آلة البيع الخاصة بهم وإعدادها لتلقي دفعات الإرسال الفوري في داش. يمكن أيضًا استخدام برنامج Dashvend لإنشاء أي نوع من أنظمة الدفع ، بما في ذلك أنظمة نقاط البيع ، التي يمكنها قبول دفعات الإرسال الفوري.

مؤشرات السعر

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

تتوفر أدوات مماثلة مع تصاميم مختلفة من CoinLib, WorldCoinIndex و Cryptonator, بينما تتوفر واجهة برمجة التطبيقات التي توفر معلومات مماثلة من داش سنترال.

الماسح الضوئي

العديد من المحافظ قادرة على توليد رموز QR التي يمكن مسحها ضوئيا لتبسيط دخول عنوان داش. يؤدي طباعة هذه الرموز أو نشرها على موقع الويب إلى تسهيل تلقي الدفعات والنصائح في داش ، سواء عبر الإنترنت أو في وضع عدم الاتصال.

  • في داش كور ، انتقل إلى علامة استقبال ، ثم أنشئ عنوانًا إذا لزم الأمر ، وانقر عليه نقرًا مزدوجًا لعرض رمز الاستجابة السريعة. انقر بزر الماوس الأيمن على رمز الاستجابة السريعة وحدد حفظ الصورة لحفظ ملف PNG.
  • في داش في الأندرويد ، انقر على طلب عملات ثم انقر على رمز QR لعرض صورة أكبر. يمكنك قطة الشاشة هذه لحفظ الصورة.
  • في داش في الأبفون ، مرّر سريعًا إلى اليسار لعرض شاشة استقبال داش. سيظهر رمز الاستجابة السريعة والعنوان. يمكنك قطة الشاشة هذه لحفظ الصورة.
  • لإنشاء رمز الاستجابة السريعة من أي عنوان داش ، تفضل بزيارة هنا وببساطة قم بلصق عنوان الشرطة خاصتك لإنشاء صورة.