Skip to content

Commit

Permalink
docs: add toctree for examples section
Browse files Browse the repository at this point in the history
  • Loading branch information
thephez committed Aug 31, 2023
1 parent fb5159f commit 39c8497
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 7 deletions.
10 changes: 10 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,13 @@ dapi-client-js/overview
dapi-client-js/quick-start
dapi-client-js/usage/usage
```

```{toctree}
:maxdepth: 2
:titlesonly:
:caption: Dash SDK
:hidden:
sdk-js/overview
sdk-js/examples/examples
```
13 changes: 13 additions & 0 deletions docs/sdk-js/examples/examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Examples

```{toctree}
:maxdepth: 2
:titlesonly:
fetch-an-identity-from-its-name
generate-a-new-mnemonic
paying-to-another-address
receive-money-and-check-balance
sign-and-verify-messages
use-different-account
```
2 changes: 1 addition & 1 deletion docs/sdk-js/examples/fetch-an-identity-from-its-name.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Fetching an identity from its name
# Fetching an identity from its name

Assuming you have created an identity and attached a name to it (see how to [register an identity](https://dashplatform.readme.io/docs/tutorial-register-an-identity) and how to [attach it to a name](https://dashplatform.readme.io/docs/tutorial-register-a-name-for-an-identity)), you will then be able to directly recover an identity from its names. See below:

Expand Down
2 changes: 1 addition & 1 deletion docs/sdk-js/examples/generate-a-new-mnemonic.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Generate a new mnemonic
# Generate a new mnemonic

In order to be able to keep your private keys private, we encourage to create your own mnemonic instead of using those from the examples (that might be empty).
Below, you will be proposed two options allowing you to create a new mnemonic, depending on the level of customisation you need.
Expand Down
2 changes: 1 addition & 1 deletion docs/sdk-js/examples/paying-to-another-address.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Paying to another address
# Paying to another address

In order to pay, you need to have an [existing balance](https://dashplatform.readme.io/docs/dash-sdk-examples-receive-money-and-check-balance).
The below code will allow you to pay to a single address a specific amount of satoshis.
Expand Down
4 changes: 3 additions & 1 deletion docs/sdk-js/examples/receive-money-and-check-balance.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## Receive money and display balance
# Receive money and display balance

## Initialize client

Initialize the SDK Client with your [generated mnemonic](https://dashplatform.readme.io/docs/dash-sdk-examples-generate-a-new-mnemonic) passed as an option.

Expand Down
2 changes: 1 addition & 1 deletion docs/sdk-js/examples/sign-and-verify-messages.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Sign and verify messages
# Sign and verify messages

Dash SDK exports the Message constructor inside the Core namespace `new Dash.Core.Message`

Expand Down
2 changes: 1 addition & 1 deletion docs/sdk-js/examples/use-different-account.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Using a different account
# Using a different account

Clients initialized with a mnemonic support multiple accounts as defined in [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki).

Expand Down
2 changes: 1 addition & 1 deletion docs/sdk-js/overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Dash SDK
# Overview

[![NPM Version](https://img.shields.io/npm/v/dash)](https://www.npmjs.org/package/dash)
[![Release Packages](https://github.com/dashpay/platform/actions/workflows/release.yml/badge.svg)](https://github.com/dashpay/platform/actions/workflows/release.yml)
Expand Down

0 comments on commit 39c8497

Please sign in to comment.