Overview#
Dash Platform is a Layer 2 cryptocurrency technology that builds upon the Dash layer 1 network. The Rust SDK provides an abstraction layer to simplify usage of the Dash Platform along with data models based on the Dash Platform Protocol (DPP).
See the Quick Start page for example setup and use of the SDK.
Note
For the current monorepo layout and lower-level implementation details, see the Dash Platform repository and the Dash Platform Book.
Usage#
Cargo.toml#
To use this crate, define it as a dependency in your Cargo.toml:
[dependencies]
dash-sdk = { git="https://github.com/dashpay/platform" }
Examples#
You can inspect tests in the
tests/ folder for
detailed examples or see a simple example in the
examples/ folder.
See the Platform Terminal User Interface (TUI) for an
application that uses the SDK to execute various state transitions.
Note
If you need the latest usage details, examples, or implementation references, prefer the Dash Platform monorepo and the Dash Platform Book over older hosted snapshots.
Mocking#
The Dash Platform SDK supports mocking through the mocks feature which provides a convenient way
to define mock expectations and use the SDK without a connection to Platform.
You can see examples of mocking in mock_fetch.rs and mock_fetch_many.rs.