Skip to content

Commit

Permalink
reorder the docs content
Browse files Browse the repository at this point in the history
  • Loading branch information
kalepail committed Aug 11, 2022
1 parent 012a05b commit db0be0d
Show file tree
Hide file tree
Showing 131 changed files with 301 additions and 414 deletions.
7 changes: 7 additions & 0 deletions docs/anchoring-assets/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"position": 40,
"label": "Anchor Assets",
"link": {
"type": "doc", "id": "index"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"position": 20,
"label": "Enable Cross-border Payments",
"link": {
"type": "doc", "id": "index"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Overview
order: 10
sidebar_position: 10
---

import { Alert } from "@site/src/components/Alert";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Launch
order: 50
sidebar_position: 50
---

Once the testnet and mainnet servers are deployed, KYC collection conforms to regulations, banking rails are integrated, and the whole system is audited, it's time to prepare for launch.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Tools and References
order: 20
sidebar_position: 20
---

These docs walk through the steps necessary to set up and launch both a test server and a production server for SEP-31 cross-border payments, but before you get any deeper, it's worth noting: you don't have to start from scratch. SDF offers some tools that make it easy to implement those servers, and test them from the sending anchor (**SA**) side.
Expand All @@ -9,7 +9,7 @@ These docs walk through the steps necessary to set up and launch both a test ser

To help with server setup, SDF created [Polaris](https://github.com/stellar/django-polaris), an extendable django reusable-app that comes with fully-implemented endpoints, templates, and database models. It's built in Python using the community-supported [Stellar Python SDK](https://github.com/StellarCN/py-stellar-base), and is compliant with the Stellar Ecosystem Protocols mentioned in the previous section.

TODO: REPLACE PNG ![Screenshots of the reference implementation](../../web-assets/polaris.png)
TODO: REPLACE PNG ![Screenshots of the reference implementation](/assets/polaris.png)

Polaris modularizes the parts of the codebase that interface with the Stellar network, and provides clear methods for developers to integrate their own customer registrations, banking connections, and KYC and transcation processing. That means you can focus on implementing the business- and country-related aspects of your product without having to spend much time defining how to connect the server to the Stellar Network.

Expand All @@ -21,14 +21,14 @@ Once you have a server set up, SDF also maintains a [Demo Wallet Project](https:

This allows you to run through your receiving anchor's flow by entering information to a fake wallet application like a real sending user would.

![Screenshot of the demo client](../../web-assets/demo-wallet-sep31.png)
![Screenshot of the demo client](/assets/demo-wallet-sep31.png)

With the demo client, you can test your payment flows, and get information about the transactions that are created during those processes. It gives a clear step-by-step visual example of how the functionalities work along with insightful information about the requests, protocols, and possible validation messages. To start testing the deploys, simply update the settings of the Demo Client (click the gear button on the bottom right) to include your project's information.

## Anchor Validation Suite

The Anchor Validation Suite is a set of tests that helps confirming if your anchor implementation is compliant with the latest specifications of the SEP-31 standard. This is a great resource for people that are getting started building an anchor and want to check what's still missing in their implementation, or for teams that have already finalized the anchor development and want an extra validation on the codebase. Also, the Anchor Validation Suite doesn't replace the necessity of having a professional security auditor reviewing the whole project.

TODO: REPLACE PNG ![Screenshot of the Anchor Validation Suite's UI](../../web-assets/anchor-validation-suite.png)
TODO: REPLACE PNG ![Screenshot of the Anchor Validation Suite's UI](/assets/anchor-validation-suite.png)

The Anchor Validation Suite codebase is available in an open-sourced [Github Repository](https://github.com/stellar/transfer-server-validator/), where you can check in details exactly how all tests work. SDF also maintains a [deployed version of the Validation Suite](http://anchor-validator.stellar.org/) with a UI for running the tests without the need to setup your own infrastructure. In order to also test the interactive parts of SEP-24, you'll need to add test values to all the required interactive flow fields. The [Github Repository Readme file](https://github.com/stellar/transfer-server-validator/#providing-field-values) has more information on how exactly those fields need to be added. Finally, you can also trigger the tests directly from a Continuous Integration tool (like CircleCI or Jenkins), in order to have continuous monitoring of your anchor infrastructure.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Deploy a Production Version on Mainnet
order: 40
sidebar_position: 40
---

import { Alert } from "@site/src/components/Alert";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Build a SEP-31 Anchor on Testnet
order: 30
sidebar_position: 30
---

import { CodeExample } from "@site/src/components/CodeExample";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"position": 30,
"label": "Enable Deposits and Withdrawals",
"link": {
"type": "doc", "id": "index"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "SEP-24: Deposits & Withdrawals"
order: 10
sidebar_position: 10
---

Supporting deposits and withdrawals of an asset on and off the Stellar network requires cooperation between wallet (client) and anchor (server) applications. In this section, we'll only go over the steps necessary for building a SEP-24 server, but we also have documentation for [building a wallet](../../building-apps/index.mdx).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Launch
order: 50
sidebar_position: 50
---

Once the testnet and mainnet servers are deployed, KYC collection conforms to regulations, banking rails are integrated, and the whole system is audited, it's time to prepare for launch.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Tools and References
order: 20
sidebar_position: 20
---

These docs walk through the steps necessary to set up and launch both a test server and a production server to handle deposits and withdrawals, but before you get any deeper, it's worth noting: you don't have to start from scratch. SDF offers some tools that make it easy to implement those servers, and test them from the client side.
Expand All @@ -9,7 +9,7 @@ These docs walk through the steps necessary to set up and launch both a test ser

To help with server setup, SDF created [Polaris](https://github.com/stellar/django-polaris), an extendable django reusable-app that comes with fully-implemented endpoints, templates, and database models. It's built in Python using the community-supported [Stellar Python SDK](https://github.com/StellarCN/py-stellar-base), and is compliant with the Stellar Ecosystem Protocols mentioned in the previous section.

![Screenshots of the reference implementation](../../web-assets/polaris.png)
![Screenshots of the reference implementation](/assets/polaris.png)

Polaris modularizes the parts of the codebase that interface with the Stellar network, and provides clear methods for developers to integrate their own deposit and withdrawal forms, KYC process, and banking rails connections. That means you can focus on implementing the business- and country-related aspects of your product without having to spend much time defining how to connect the server to the Stellar Network.

Expand All @@ -21,14 +21,14 @@ Once you have a server set up, SDF also maintains a [Demo Wallet Project](https:

This allows you to run those tests with a UI without needing to set up a new hosting infrastructure for that project.

![Screenshot of the demo wallet](../../web-assets/demo_wallet_sep24dep.png)
![Screenshot of the demo wallet](/assets/demo_wallet_sep24dep.png)

With the demo client, you can test your deposit and withdraw flows, and get information about the transactions that are created during those processes. It gives a clear step-by-step visual example of how the functionalities work along with insightful information about the requests, protocols, and possible validation messages. To start testing the deploys, simply update the settings of the Demo Client (click the gear button on the bottom right) to include your project's information.

## Anchor Validation Suite

The SEP-24 Anchor Validation Suite is a set of tests that helps confirming if your anchor implementation is compliant with the latest specifications of the SEP-24 standard. This is a great resource for people that are getting started building an anchor and want to check what's still missing in their implementation, or for teams that have already finalized the anchor development and want an extra validation on the codebase. Also, the Anchor Validation Suite doesn't replace the necessity of having a professional security auditor reviewing the whole project.

![Screenshot of the Anchor Validation Suite's UI](../../web-assets/anchor-validation-suite.png)
![Screenshot of the Anchor Validation Suite's UI](/assets/anchor-validation-suite.png)

The SEP-24 Anchor Validation Suite codebase is available in an open-sourced [Github Repository](https://github.com/stellar/transfer-server-validator/), where you can check in details exactly how all tests work. SDF also maintains a [deployed version of the Validation Suite](http://anchor-validator.stellar.org/) with a UI for running the tests without the need to setup your own infrastructure. In order to also test the interactive parts of SEP-24, you'll need to add test values to all the required interactive flow fields. The [Github Repository Readme file](https://github.com/stellar/transfer-server-validator/#providing-field-values) has more information on how exactly those fields need to be added. Finally, you can also trigger the tests directly from a Continuous Integration tool (like CircleCI or Jenkins), in order to have continuous monitoring of your anchor infrastructure.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Set Up a Production Server
order: 40
sidebar_position: 40
---

Once the test server is live and you have tested both deposit and withdraw flows, it's time to get started with the real deploy connected to real KYC and real banking rails providers. Before using any banking APIs, it's critical that you perform a full security audit on the system to make sure that there aren't any vulnerabilities.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Set Up a Test Server
order: 30
sidebar_position: 30
---

import { CodeExample } from "@site/src/components/CodeExample";
Expand Down Expand Up @@ -177,7 +177,7 @@ Wallets poll the `/transaction` endpoint when waiting for a transaction’s stat

Wallets need access to the transactions associated with the user’s account for displaying history or past activity. This can be accomplished with a `/transactions` endpoint. Wallets may also use this endpoint after making a POST request to `/transactions/deposit/interactive` to make sure a transaction was successfully created.

![Status Diagram of SEP-24 transactions](../../web-assets/SEP24-state-diagram.png)
![Status Diagram of SEP-24 transactions](/assets/SEP24-state-diagram.png)

### Transactions History Endpoint

Expand Down
2 changes: 1 addition & 1 deletion docs/anchoring-assets/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Overview
order: 0
sidebar_position: 0
---

_Stellar Anchors_ are the on/off ramps of the Stellar network: they accept deposits of fiat currencies (such as USD, CNY, and BRL) via existing rails (such as bank deposits or cash-in points), and send a user the equivalent digital tokens representing those deposits on the Stellar network. On the flipside, they allow holders to redeem those tokens for the real-world assets they represent. To read more about the kinds of things you can do with digital fiat currency, check out [this explainer](https://www.stellar.org/learn/the-power-of-stellar).
Expand Down
4 changes: 0 additions & 4 deletions docs/anchoring-assets/metadata.json

This file was deleted.

7 changes: 7 additions & 0 deletions docs/building-apps/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"position": 50,
"label": "Build Apps",
"link": {
"type": "doc", "id": "index"
}
}
14 changes: 7 additions & 7 deletions docs/building-apps/basic-wallet.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Create a Basic Wallet
order: 40
sidebar_position: 40
---

import { CodeExample } from "@site/src/components/CodeExample";
Expand Down Expand Up @@ -45,7 +45,7 @@ Call it `stellar-prompt`, and deselect both test files leaving only the styling.
font-size: 15px;

.prompt-wrapper {
position: absolute;
sidebar_position: absolute;
top: 0;
left: 0;
bottom: 0;
Expand All @@ -64,7 +64,7 @@ Call it `stellar-prompt`, and deselect both test files leaving only the styling.
padding: 20px;
max-width: 350px;
width: 100%;
position: relative;
sidebar_position: relative;

p {
margin-bottom: 10px;
Expand All @@ -74,7 +74,7 @@ Call it `stellar-prompt`, and deselect both test files leaving only the styling.
margin: 0;
padding: 5px;
outline: none;
border: 1px solid black;
bsidebar_position: 1px solid black;
text-transform: uppercase;

&:focus {
Expand All @@ -83,7 +83,7 @@ Call it `stellar-prompt`, and deselect both test files leaving only the styling.
}
}
.select-wrapper {
position: relative;
sidebar_position: relative;
display: inline-flex;

select {
Expand All @@ -95,7 +95,7 @@ Call it `stellar-prompt`, and deselect both test files leaving only the styling.
&:after,
&:before {
font-size: 12px;
position: absolute;
sidebar_position: absolute;
right: 10px;
color: blue;
}
Expand All @@ -121,7 +121,7 @@ Call it `stellar-prompt`, and deselect both test files leaving only the styling.
}
.cancel {
background: none;
border: 1px solid blue;
bsidebar_position: 1px solid blue;
color: blue;
}
.submit {
Expand Down
7 changes: 7 additions & 0 deletions docs/building-apps/connect-to-anchors/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"position": 70,
"label": "Deposit and Withdraw From Anchors",
"link": {
"type": "generated-index"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Deposit Anchored Assets
order: 20
sidebar_position: 20
---

import { CodeExample } from "@site/src/components/CodeExample";
Expand Down
2 changes: 1 addition & 1 deletion docs/building-apps/connect-to-anchors/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Interoperability Basics
order: 0
sidebar_position: 0
---

Stellar makes it easy to issue assets and to connect them to existing banking rails so that users can move value onto — and off of — the network. The services that create those connections are called **anchors**, and you can read all about how they work and what they do in [Enable Deposit and Withdrawal](../../anchoring-assets/enabling-deposit-and-withdrawal/index.mdx).
Expand Down
4 changes: 0 additions & 4 deletions docs/building-apps/connect-to-anchors/metadata.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Setup for Anchored Assets
order: 10
sidebar_position: 10
---

import { CodeExample } from "@site/src/components/CodeExample";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Withdraw Anchored Assets
order: 30
sidebar_position: 30
---

import { CodeExample } from "@site/src/components/CodeExample";
Expand Down
2 changes: 1 addition & 1 deletion docs/building-apps/custom-assets.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Handle Custom Assets
order: 60
sidebar_position: 60
---

import { CodeExample } from "@site/src/components/CodeExample";
Expand Down
8 changes: 4 additions & 4 deletions docs/building-apps/first-deposit.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Fund the Account and make the First Deposit
order: 65
sidebar_position: 65
---

In this section, we will go over the new user account creation flow between non-custodial wallets and anchors with SEP-24 and/or SEP-6 implementations. Before we dive into the flow, it’s important to understand how Stellar accounts are created in the first place.
Expand All @@ -26,7 +26,7 @@ For this option, the wallet needs to allow users to initiate their first deposit

**Note**: An anchor should always maintain a healthy amount of XLM in its distribution account to support new account creations. If doing so becomes unsustainable, it’s recommended that the anchor collaborates with wallets to determine a strategy based on the number of account creation requests. The recommended amount is 2XLM per user account creation (1XLM to meet the minimum balance requirement, and 1XLM for establishing trustlines and covering transaction fees).

![anchor creates account flow](../web-assets/first-deposit-anchor-flow.png)
![anchor creates account flow](/assets/first-deposit-anchor-flow.png)

With the flow described above, the wallet and the anchor have to facilitate listening for and responding to the trustline status, which can create user experience frictions when waiting for the trustline to be established. To address this issue, Protocol 15 introduced [Claimable Balances](../glossary/claimable-balance.mdx), which enhance the flow by allowing users to start using the wallet without having to secure XLM wait to create the trustline after they made their first deposit. Both the wallet and the anchor have to implement Claimable Balance support in order to make this flow work.

Expand All @@ -40,7 +40,7 @@ The flow with Claimable Balances looks like this:
1. The anchor creates a Claimable Balance.
1. The wallet detects the Claimable Balance for the account, claims the funds, and posts it in the wallet.

![anchor creates account claimable balance flow](../web-assets/first-deposit-claimable-balance-flow.png)
![anchor creates account claimable balance flow](/assets/first-deposit-claimable-balance-flow.png)

### Option 2: The wallet creates and funds the Stellar account upon user sign-up

Expand All @@ -55,6 +55,6 @@ The flow looks like this:
1. The anchor receives the funds, then sends them to the user’s Stellar account.
1. The wallet detects that funds were sent and notifies the user.

![wallet creates account flow](../web-assets/first-deposit-wallet-flow.png)
![wallet creates account flow](/assets/first-deposit-wallet-flow.png)

**Note**: In the examples above, we suggest having the anchor or wallet cover minimum balance and trustline XLM requirements by depositing funds directly into a user's account. We made that suggestion for the sake of simplicity, but in all cases, the anchor or wallet could instead use [Sponsored Reserves](../glossary/sponsored-reserves.mdx) to ensure that when a user closes a trustline or merges their account, the reserve reverts to the sponsoring account rather than to the user's account.
2 changes: 1 addition & 1 deletion docs/building-apps/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Overview
order: 0
sidebar_position: 0
---

Stellar is a self-serve distributed ledger that you can use as a backend to power all kinds of apps and services. It has built-in logic for creating accounts, signing transactions, and tracking balances, and anyone can use it to issue, store, transfer, and trade assets. Since many of those assets connect to real-world currencies, and since there are open protocols for integrating deposit and withdrawal of those assets, a Stellar-based app can take advantage of real banking rails and connect to real money.
Expand Down
2 changes: 1 addition & 1 deletion docs/building-apps/key-management.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Key Management Basics
order: 30
sidebar_position: 30
---

Step one for any app is to sort out user onboarding. Since a Stellar wallet is an interface that gives a user access to an account stored on the ledger, and since that access is controlled by the account's secret key, the first thing you have to decide is how to handle a user's secret key, and how to append the Stellar account it unlocks to a user object.
Expand Down
4 changes: 0 additions & 4 deletions docs/building-apps/metadata.json

This file was deleted.

Loading

0 comments on commit db0be0d

Please sign in to comment.