Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update startup configuration #213

Merged
merged 3 commits into from
Aug 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 24 additions & 15 deletions docs/stellar-disbursement-platform/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,23 @@ USDC will arrive in your demo wallet account within seconds! Refresh the account

## Run the SDP Locally

### Prerequisites

#### Docker

Make sure you have Docker installed on your system. If not, you can download it from [here](https://docs.docker.com/get-docker/).

#### Stellar Accounts

We will need two Stellar accounts to set up the SDP, one of which you already created above.

1. A Distribution account that will be used for sending funds to receivers. You should have just created this account using the [Create and Fund a Distribution Account](#create-and-fund-a-distribution-account) process above.
1. A SEP-10 account that will be used for authentication. It can be created the same way as the distribution account, but it doesn't need to be funded. Make sure to create this account now if you haven't already done so.

The public and private key of these two accounts will be used to configure the SDP in the next step.

### Run the SDP

First you'll need to clone the project.

<CodeExample>
Expand All @@ -63,7 +80,7 @@ git clone [email protected]:stellar/stellar-disbursement-platform-backend.git

</CodeExample>

Before we run the SDP, lets replace the private key configured for the distribution account with the one we created with the demo wallet earlier.
Before we run the SDP, we need to configure it with the accounts created in the previous step.

<CodeExample>

Expand All @@ -73,25 +90,17 @@ cd stellar-disbursement-platform-backend/dev

</CodeExample>

Copy the secret key from the demo wallet, and replace the following value in `docker-compose-tss.yml`
Create a `.env` file in the dev directory by copying the `.env.example` file:

<CodeExample>

```yaml
DISTRIBUTION_SEED: # your secret key
```bash
cp .env.example .env
```

</CodeExample>

Copy the public key from the demo wallet, and replace the following value in `docker-compose-sdp-anchor.yml`

<CodeExample>

```yaml
DISTRIBUTION_PUBLIC_KEY: # your public key
```

</CodeExample>
Update the `.env` file with the public and private keys of the two accounts created in the previous step.

Then build it using the pre-defined docker compose files.

Expand Down Expand Up @@ -243,7 +252,7 @@ SECRET_SEP24_INTERACTIVE_URL_JWT_SECRET:
SECRET_SEP24_MORE_INFO_URL_JWT_SECRET:
# used to encrypt passwords of the SDP users
# NOTE: you'll need to recreate any existing users in the database if this is reset
EC256_PRIVATE_KEY:
EC256_PRIVATE_KEY:
```

</CodeExample>
Expand Down Expand Up @@ -326,7 +335,7 @@ var DefaultWalletsNetworkMap = WalletsNetworkMapType{

</CodeExample>

Once you’ve added the new wallet, make sure the wallet has whitelisted your SDP domain (the domain that appears in the deep link).
Once you’ve added the new wallet, make sure the wallet has whitelisted your SDP domain (the domain that appears in the deep link).

Now you should be set with whichever countries and wallets you want available for new disbursements!

Expand Down