https://github.com/dashpay/platform-tutorials
Code for the tutorials found on https://docs.dash.org/platform
https://github.com/dashpay/platform-tutorials
blockchain crytpocurrency dash tutorial-code
Last synced: 5 months ago
JSON representation
Code for the tutorials found on https://docs.dash.org/platform
- Host: GitHub
- URL: https://github.com/dashpay/platform-tutorials
- Owner: dashpay
- License: mit
- Created: 2022-04-01T16:46:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-16T20:17:26.000Z (9 months ago)
- Last Synced: 2025-04-30T06:46:01.975Z (5 months ago)
- Topics: blockchain, crytpocurrency, dash, tutorial-code
- Language: JavaScript
- Homepage:
- Size: 406 KB
- Stars: 2
- Watchers: 6
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# platform-readme-tutorials
[](https://github.com/dashpay/platform-readme-tutorials/blob/main/package.json)
Code for the tutorials found on the
[Platform documentation site](https://docs.dash.org/platform).## Install
Note: [NodeJS](https://nodejs.org/en/download/) (v20+) must be installed to run
the tutorial code.### Clone this repository
```shell
git clone https://github.com/dashpay/platform-readme-tutorials.git
```### Install project dependencies
Do a clean install of project dependencies:
```shell
npm ci
```## Usage
1. Create an `.env` file (See [`.env.example`](./.env.example) for an example
`.env` file). Set `NETWORK` to the desired network type (normally 'testnet').
1. Check connection: `node connect.js`
1. Create wallet: `node create-wallet.js`
1. Go to the [Testnet faucet](https://testnet-faucet.dash.org/) and add funds to
the address reported in the previous step
1. Open the `.env` file (See [`.env.example`](./.env.example) for an example
`.env` file) and set `MNEMONIC` to the wallet mnemonic from step 3.
1. If doing withdrawals, open your `.env` file and set `WITHDRAWAL_ADDRESS` to
the Core chain address where you would like to receive funds withdrawn from
Platform.
1. (Optional) To minimize wallet sync time, open your `.env` file and set
`SYNC_START_HEIGHT` to a Core chain block height just below the height of
your wallet's first transaction. Otherwise you can skip this step and use the
default value from [`.env.example`](./.env.example).Proceed with the tutorials
[Identities and Names tutorials](./1-Identities-and-Names/) first and the
[Contracts And Documents tutorials](./2-Contracts-and-Documents/) next. They
align with the tutorials section found on the
[documentation site](https://dashplatform.readme.io/docs/tutorials-introduction).
Many client configuration options are included as comments in
[`setupDashClient.js`](./setupDashClient.js) if more advanced configuration is
required.After [creating an identity](./1-Identities-and-Names/identity-register.js), set
the `IDENTITY_ID` value in your `.env` file to your new identity ID. After
[registering a data contract](./2-Contracts-and-Documents/contract-register-minimal.js),
set the `CONTRACT_ID` value in your `.env` file to your new contract ID. To do
credit transfers between identities, create a second identity and set the
`RECIPIENT_ID` value in your `.env` file to its ID.## Contributing
PRs accepted.
## License
[MIT](LICENSE.md)