Skip to content

Commit

Permalink
Merge branch 'main' into soroban-merge/dapps-challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotFriend committed Apr 24, 2024
2 parents 6affdde + 50e2602 commit 0d666d5
Show file tree
Hide file tree
Showing 381 changed files with 1,889 additions and 1,320 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Stellar Documentation and API Reference <!-- omit in toc -->

Welcome to the official home repository for [Documentation][docs] and
[API Reference][api] for the [Stellar Network][stellar].
Welcome to the official home repository for [Documentation][docs] for the [Stellar network][stellar].

## Table of Contents <!-- omit in toc -->

Expand Down Expand Up @@ -29,6 +28,26 @@ helpful and meaningful way. Markdown is super easy to learn, and will come quite
naturally after only a bit of practice. You can always help fix typos, spelling,
and broken links, too.

You can contribute to the docs in several ways:

- See something that needs to be fixed in the docs, like an error in the code or a typo? File a [pull request (PR)](https://github.com/stellar/stellar-docs/pulls) proposing to correct the error;
- Think there is helpful content missing from the docs, like a specific how-to guide or piece of explanatory content? File an [issue](https://github.com/stellar/stellar-docs/issues) explaining what you’d like to see (be sure to search existing issues to avoid duplication);
- Have an idea that could make the docs better, like a structural change or a new section idea? File an [issue](https://github.com/stellar/stellar-docs/issues) explaining what you’d like to see (these will be added to the Ideas section on the [Dev Docs board](https://github.com/orgs/stellar/projects/56/views/1) for discussion);
- Want to complete an existing issue? Search through the issues to find something to work on! Issues without an assignee and labeled as a “Good First Issue” or with “Help Wanted” are great places to start! Once you’ve selected an issue to work on, file a PR with your proposed fix.

No matter what you contribute, whether a PR or an issue, you can expect to receive a response from docs maintainers within one week.

- PRs need to be reviewed and approved before merging. Look for either an approval or a follow-up question.
- Issues will be prioritized, labeled, and assigned (if possible). You can check the status of your issue on the Dev Docs board. The status of issues according to the column is:
- Ideas: these issues are being actively discussed. Ideas will either be discarded or repurposed into an actionable issue and added to the queue within three weeks.
- Backlog: these issues are not prioritized or actively being worked on.
- To Do: these issues are prioritized and will be worked on soon.
- In Progress: these issues are currently being worked on.
- Blocked: these issues are being worked on but are blocked for some reason and need attention.
- Done: these issues have been completed and can be closed.

If you have questions, feel free to ask in the [Stellar Developer Discord](https://discord.gg/stellardev).

## Quick Start
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)][codespaces]
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][gitpod]
Expand Down
2 changes: 0 additions & 2 deletions docs/building-apps/application-design-considerations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ With a custodial service, the service provider (an application such as a central

Many custodial services choose to use a single pooled Stellar account (called shared, omnibus, or [pooled accounts](../learn/encyclopedia/pooled-accounts-muxed-accounts-memos.mdx)) to handle transactions on behalf of their users instead of creating a new Stellar account for each user. To distinguish between individual users in a pooled account, we encourage the implementation of [muxed accounts](../learn/encyclopedia/pooled-accounts-muxed-accounts-memos.mdx#muxed-accounts).

Learn how to set up an application as a custodial service in this [tutorial].

### A mixture of non-custodial and custodial

Building an application with [multi-signature](../learn/encyclopedia/signatures-multisig.mdx) capabilities allows you to have a non-custodial service with account recovery. If the user loses their secret key, they can still sign transactions with other authorized signatures, granted the signature threshold is high enough.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Source: https://github.com/stellar/basic-payment-app/blob/main/src/lib/stellar/h
Our `walletStore` is used in a ton of places in our application, especially in the confirmation modal when asking a user to input their pincode. Read on to see how we've done that.

[accounts section]: ../../learn/fundamentals/stellar-data-structures/accounts.mdx
[non-custodial application]: ../application-design-considerations#non-custodial-service
[non-custodial application]: ../application-design-considerations.mdx#non-custodial-service
[`js-stellar-wallets` sdk]: https://github.com/stellar/js-stellar-wallets
[sponsored reserves]: ../../learn/encyclopedia/sponsored-reserves.mdx
[contacts list]: ./contacts-list
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export async function getSep6Info(domain) {

## Display interactive elements

Since many of the SEP-6 (and SEP-24) endpoints require authentication, we wait until our user is [authenticated with SEP-10](./sep10) before we display what kinds of transfers are available. When they have a valid authentication token, we can display some buttons the user can use to begin a transfer.
Since many of the SEP-6 (and SEP-24) endpoints require authentication, we wait until our user is [authenticated with SEP-10](./sep10.mdx) before we display what kinds of transfers are available. When they have a valid authentication token, we can display some buttons the user can use to begin a transfer.

The user can then initiate one of the transfer methods (in BasicPay, only deposits and withdraws are supported) by clicking the “Deposit” or “Withdraw” button underneath a supported asset.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ title: "Setup for Anchored Assets"
sidebar_position: 10
---

An anchor is a Stellar-specific term for the on and off-ramps that connect the Stellar network to traditional financial rails, such as financial institutions or fintech companies. When a user deposits with an anchor, that anchor will credit their Stellar account with the equivalent amount of digital tokens. The user can then hold, transfer, or trade those tokens just like any other Stellar asset. When a user withdraws those tokens, the anchor redeems them for cash in hand or money in the bank. Read more about anchors in our [Anchor Documentation](https://developers.stellar.org/docs/anchoring-assets/overview).
An anchor is a Stellar-specific term for the on and off-ramps that connect the Stellar network to traditional financial rails, such as financial institutions or fintech companies. When a user deposits with an anchor, that anchor will credit their Stellar account with the equivalent amount of digital tokens. The user can then hold, transfer, or trade those tokens just like any other Stellar asset. When a user withdraws those tokens, the anchor redeems them for cash in hand or money in the bank. Read more about anchors in this [anchor section](../../../learn/encyclopedia/anchors.mdx).

When a customer downloads a wallet application that is connected to an anchor service, their Stellar account can either be created by the wallet application or the anchor service. In this example, the account has been created by the wallet application, BasicPay. Account creation strategies are described more in-depth [here](../../application-design-considerations#account-creation-strategies).
When a customer downloads a wallet application that is connected to an anchor service, their Stellar account can either be created by the wallet application or the anchor service. In this example, the account has been created by the wallet application, BasicPay. Account creation strategies are described more in-depth [here](../../application-design-considerations.mdx#account-creation-strategies).

In this example, we’ll use an anchor on Stellar’s Testnet to simulate a bank transfer into and out of the user’s wallet using [SEP-6: Deposit and Withdrawal API](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0006.md) and/or [SEP-24: Hosted Deposit and Withdrawal](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_position: 10

:::note

This tutorial walks through how to build an application with the [`js-stellar-sdk`], to build with the Wallet SDK, please follow the [Build a Wallet tutorial](../wallet/overview). To build with smart contracts, navigate to the [Smart Contracts section](../../smart-contracts/getting-started/setup.mdx).
This tutorial walks through how to build an application with the [`js-stellar-sdk`], to build with the Wallet SDK, please follow the [Build a Wallet tutorial](../wallet/overview.mdx). To build with smart contracts, navigate to the [Smart Contracts section](../../smart-contracts/getting-started/setup.mdx).

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The following additional features have been implemented:
4. The amount entered for the send/receive value.
- An optional memo field is available for text-only memos.

For now, we'll focus on regular payments, and we'll dig into the path payments in a [later section](./path-payment).
For now, we'll focus on regular payments, and we'll dig into the path payments in a [later section](./path-payment.mdx).

```html title="/src/routes/dashboard/send/+page.svelte"
<script>
Expand Down
2 changes: 1 addition & 1 deletion docs/building-apps/wallet/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The wallet instance can be further configured. For example, to connect to the pu
<CodeExample>

```kotlin
val walletMainnet = Wallet(StellarConfiguration(Network.PUBLIC, "https://horizon.stellar.org"))
val walletTestnet = Wallet(StellarConfiguration(Network.TESTNET, "https://horizon-testnet.stellar.org"))
```

```typescript
Expand Down
2 changes: 1 addition & 1 deletion docs/building-apps/wallet/sep24.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ var asset = info.currencies.firstWhere((it)=>it.code=='USDC').assetId;

:::info

Before starting with the deposit flow, make sure that the user account has [established a trustline](/docs/building-apps/wallet/stellar#modify-assets-trustlines) for the asset you are working with.
Before starting with the deposit flow, make sure that the user account has [established a trustline](/docs/building-apps/wallet/stellar.mdx#modify-assets-trustlines) for the asset you are working with.

:::

Expand Down
4 changes: 2 additions & 2 deletions docs/building-apps/wallet/sep6.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Header from "./component/header.mdx";

The [SEP-6] standard defines a way for anchors and wallets to interact on behalf of users. Wallets use this standard to facilitate exchanges between on-chain assets (such as stablecoins) and off-chain assets (such as fiat, or other network assets such as BTC).

Please note, this is for _programmatic_ deposits and withdrawals. For hosted deposits and withdrawals, where the anchor interacts with wallets interactively using a popup, please see [Hosted Deposit and Withdrawal](/docs/building-apps/wallet/sep24).
Please note, this is for _programmatic_ deposits and withdrawals. For hosted deposits and withdrawals, where the anchor interacts with wallets interactively using a popup, please see [Hosted Deposit and Withdrawal](/docs/building-apps/wallet/sep24.mdx).

## Get Anchor Information

Expand Down Expand Up @@ -44,7 +44,7 @@ To initiate an operation, we need to know an asset. You can hardcode this. Ensur

:::info

Before starting with the deposit flow, make sure that the user account has [established a trustline](/docs/building-apps/wallet/stellar#modify-assets-trustlines) for the asset you are working with.
Before starting with the deposit flow, make sure that the user account has [established a trustline](/docs/building-apps/wallet/stellar.mdx#modify-assets-trustlines) for the asset you are working with.

:::

Expand Down
4 changes: 2 additions & 2 deletions docs/issuing-assets/anatomy-of-an-asset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ One major category of assets is the stablecoin. A stablecoin is a blockchain-bas

Reserve-backed stablecoins are pegged to a real-world asset at a 1:1 ratio. Because the underlying asset is maintained as collateral, users should be able to trade their stablecoin for the asset at any time. Asset reserves can be maintained by independent custodians and should be regularly audited.

Currently, one of Stellar's most significant use cases is the tokenization of fiat currency for processes like cross-border payments. With anchors, users can connect Stellar tokens to existing rails that allow for the deposit of real-world assets in exchange for digital currency and vice versa. Learn more about anchors in our [Anchors section](https://developers.stellar.org/docs/anchoring-assets/).
Currently, one of Stellar's most significant use cases is the tokenization of fiat currency for processes like cross-border payments. With anchors, users can connect Stellar tokens to existing rails that allow for the deposit of real-world assets in exchange for digital currency and vice versa. Learn more about anchors in our [Anchors section](../learn/encyclopedia/anchors.mdx).

### Treasury management

Expand All @@ -27,5 +27,5 @@ When issuing a reserve-backed stablecoin, you must set up its off-chain reserve,

As an asset issuer, you may need to comply with regulatory requirements that vary based on jurisdiction. Stellar has built-in features that can help meet these requirements, such as:

- [Controlling access to an asset with flags](./control-asset-access#controlling-access-to-an-asset-with-flags)
- [Controlling access to an asset with flags](./control-asset-access.mdx#controlling-access-to-an-asset-with-flags)
- [SEP-0008: Regulated Assets](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0008.md) - regulated assets are assets that require an issuer’s approval (or a delegated third party’s approval) on a per-transaction basis. Check out this Stellar Ecosystem Proposal to learn how to implement regulated assets into your use case.
2 changes: 1 addition & 1 deletion docs/issuing-assets/control-asset-access.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ from stellar_sdk import Keypair, Network, Server, TransactionBuilder, Authorizat
from stellar_sdk.exceptions import BaseHorizonError

# Configure Stellar SDK to talk to the horizon instance hosted by Stellar.org
# To use the live network, set the hostname to 'https://horizon.stellar.org'
# To use the live network, set the hostname to horizon_url for mainnet
server = Server(horizon_url="https://horizon-testnet.stellar.org")
# Use the test network, if you want to use the live network, please set it to `Network.PUBLIC_NETWORK_PASSPHRASE`
network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE
Expand Down
2 changes: 1 addition & 1 deletion docs/issuing-assets/how-to-issue-an-asset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func main() {
from stellar_sdk import Asset, Keypair, Network, Server, TransactionBuilder

# Configure Stellar SDK to talk to the horizon instance hosted by Stellar.org
# To use the live network, set the hostname to 'https://horizon.stellar.org'
# To use the live network, set the hostname to horizon_url for mainnet
server = Server(horizon_url="https://horizon-testnet.stellar.org")
# Use test network, if you need to use public network, please set it to `Network.PUBLIC_NETWORK_PASSPHRASE`
network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE
Expand Down
2 changes: 1 addition & 1 deletion docs/issuing-assets/publishing-asset-info.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ from stellar_sdk import Keypair, Network, Server, TransactionBuilder
from stellar_sdk.exceptions import BaseHorizonError

# Configure Stellar SDK to talk to the horizon instance hosted by Stellar.org
# To use the live network, set the hostname to 'https://horizon.stellar.org'
# To use the live network, set the hostname to horizon_url for mainnet
server = Server(horizon_url="https://horizon-testnet.stellar.org")
# Use the test network, if you want to use the live network, please set it to `Network.PUBLIC_NETWORK_PASSPHRASE`
network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE
Expand Down
4 changes: 2 additions & 2 deletions docs/learn/encyclopedia/claimable-balances.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Once a ClaimableBalanceEntry has been claimed, it is deleted.

### Create Claimable Balance

For basic parameters, see the Create Claimable Balance entry in our [List of Operations section](../fundamentals/list-of-operations#create-claimable-balance).
For basic parameters, see the Create Claimable Balance entry in our [List of Operations section](../fundamentals/list-of-operations.mdx#create-claimable-balance).

#### Additional parameters

Expand Down Expand Up @@ -53,7 +53,7 @@ This operation claws back a claimable balance, returning the asset to the issuer

Clawback claimable balances require the claimable balance ID.

Learn more about clawbacks in our [Clawback Encyclopedia Entry](./clawbacks).
Learn more about clawbacks in our [Clawback Encyclopedia Entry](./clawbacks.mdx).

## Example

Expand Down
4 changes: 2 additions & 2 deletions docs/learn/encyclopedia/error-handling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Example implementation:
<CodeExample>

```js
let server = sdk.Server("horizon.stellar.org");
let server = sdk.Server("horizon-testnet.stellar.org");

function submitTransaction(tx, timeout) {
if (!tx.timeBounds || tx.timeBounds.maxTime === 0) {
Expand Down Expand Up @@ -186,4 +186,4 @@ If you’re using SDF’s public Horizon instance, you may get a `429 Too Many R
Any transaction that would reduce an account’s balance to less than the minimum will be rejected with an `INSUFFICIENT_BALANCE` error. Likewise, lumen selling liabilities that would reduce an account’s balance to less than the minimum plus lumen selling liabilities will be rejected with an `INSUFFICIENT_BALANCE` error.
For more on minimum balances, see our [Lumens section](../fundamentals/lumens#minimum-balance).
For more on minimum balances, see our [Lumens section](../fundamentals/lumens.mdx#minimum-balance).
2 changes: 1 addition & 1 deletion docs/learn/encyclopedia/fee-bump-transactions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ A fee-bump transaction goes through a series of checks in its lifecycle to deter
- If the fee-bump transaction is taking advantage of the replace-by-fee, the fee must be 10x higher than the first transaction
- **Fee account signature** — the fee-bump transaction envelope must contain a valid signature for the fee account. Additionally, the weight of that signature must meet the low threshold for the fee account, and the appropriate network passphrase must be part of the transaction hash signed by the fee account.
- **Fee account balance** — the fee account must have a sufficient XLM balance to cover the fee
- **Inner transaction** — the inner transaction must be valid, which means it must meet the requirements described in the [Validity of a Transaction section](../fundamentals/stellar-data-structures/operations-and-transactions#transaction-and-operation-validity). If validation of the inner transaction is successful, then the result is `FEE_BUMP_INNER_SUCCESS`, and the validation results from the validation of the inner transaction appear in the inner result. If the inner transaction is invalid, the result is `FEE_BUMP_INNER_FAILED`, and the fee-bump transaction is invalid because the inner transaction is invalid.
- **Inner transaction** — the inner transaction must be valid, which means it must meet the requirements described in the [Validity of a Transaction section](../fundamentals/stellar-data-structures/operations-and-transactions.mdx#transaction-and-operation-validity). If validation of the inner transaction is successful, then the result is `FEE_BUMP_INNER_SUCCESS`, and the validation results from the validation of the inner transaction appear in the inner result. If the inner transaction is invalid, the result is `FEE_BUMP_INNER_FAILED`, and the fee-bump transaction is invalid because the inner transaction is invalid.

## Application

Expand Down
2 changes: 1 addition & 1 deletion docs/learn/encyclopedia/ledger-headers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Hash of the transaction set applied to the previous ledger.

### Close time

When the network closed this ledger; UNIX timestamp.
The close time is a UNIX timestamp for when the ledger closes. The timestamp is the number of seconds, excluding leap seconds, that have elapsed since UNIX epoch. The UNIX epoch is January 1, 1970 at 00:00:00 UTC.

### Upgrades

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This section is scoped specifically to liquidity regarding the AMM and SDEX buil

Users can trade and convert assets on the Stellar network with the use of path payments through Stellar’s decentralized exchange and liquidity pools.

In this section, we will talk about the SDEX and liquidity pools. To learn about how these work together to execute transactions, see our [Path Payments Encyclopedia Entry](./path-payments).
In this section, we will talk about the SDEX and liquidity pools. To learn about how these work together to execute transactions, see our [Path Payments Encyclopedia Entry](./path-payments.mdx).

## SDEX

Expand Down
Loading

0 comments on commit 0d666d5

Please sign in to comment.