Skip to content

Commit

Permalink
Reorg (#290)
Browse files Browse the repository at this point in the history
* Change SDK section to Reference section

* Adding JS SDK to list of SDKs

* Adding Overcat's Python SDK to list of SDKs

* Moving Networks -> Futurenet to Reference section

* Moving Releases to Reference section

* Delete Networks from main nav

Networks now lives under Reference section

* Deleting as Releases now live in Reference section

* Changing sidebar position

Temporary, this will eventually move to How-To Guides

* Update byo.mdx

* Edited Quick Start to 1. Hello World

Includes Tutorials -> Create a Project / Write a Contract / Test / Build / Run on Sandbox / Optimizing Builds

* Move Storing Data from Examples to Getting Started

* Move Deploy to Local Network to Getting Started

Moved this section from Tutorials to Getting Started

* Move Freighter wallet tutorial to Getting Started

* Update and rename 6.-connect-Freighter-wallet.mdx to 4. Connect Freighter Wallet

* Move Deploy to Futurenet to Getting Started

* Rename 4. Connect Freighter Wallet to 4. Connect Freighter Wallet.mdx

* Moved to Getting Started

* Moved to Getting Started

Removing this section

* Moved to Getting Started

Removing this as it has been moved to Getting Started

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started

Removing due to this section being moved

* Update Examples to How-To Guides

* Move BYO SDK to How-To Guides

* Moved to How-To Guides

* Moved invoking contracts with transactions to How-To Guides

* Removing because it's moved to How-To Guides

* Moved Token Interface to Token How-To Guide

* Remove Token Interface

Token Interface has been moved to How-To Guides -> Token

* Move Stellar Asset Contract to How-To Guides

* Delete docs/built-in-contracts directory

Moved to How-To Guides

* Move Stellar FAQs to Learn

* Delete faq.mdx

Moved to Learn

* Update authorization.mdx

Alphabetize sidebar

* Update contract-lifecycle.mdx

Alphabetizing sidebar

* Update custom-types.mdx

Alphabetizing sidebar

* Update rust-dialect.mdx

Alphabetizing sidebar

* Update debugging.mdx

Alphabetizing sidebar

* Update environment-concepts.mdx

Alphabetizing sidebar

* Update errors.mdx

Alphabetizing sidebar

* Update events.mdx

Alphabetizing sidebar

* Update gas-and-metering.mdx

Alphabetizing sidebar

* Update interacting-with-contracts.mdx

Alphabetizing sidebar

* Update persisting-data.mdx

Alphabetizing sidebar

* Update high-level-overview.mdx

Update spelling

* formatting

* formatting

* formatting

* formatting

* Update faq.mdx

* fixed broken links

* fix broken links

* fix broken links

* moar link fixes

* fixed some broken links

* added sorobanathon homepage

* add google tag manager

* Content edits made

* back to original

* Content Edit

* button location

* Content & Eligibility guidelines added

* Update sorobanathon.js

* update all admonitions such that prettier doesn't yell

* Lots of formatting

* --prose-wrap preserve

* Update releases.mdx

* update prettier

* fixed the callouts

* formatting

* fix module import

* Update sorobanathon.js

* Fixed Reorg PR

Fixed links, moved sections, deleted double sections

* Update index.js

* Updating Sorobanathon Info

* Fixed links

Many links.

* Formatting

* Change SDK section to Reference section

* Adding JS SDK to list of SDKs

* Adding Overcat's Python SDK to list of SDKs

* Moving Networks -> Futurenet to Reference section

* Moving Releases to Reference section

* Delete Networks from main nav

Networks now lives under Reference section

* Deleting as Releases now live in Reference section

* Changing sidebar position

Temporary, this will eventually move to How-To Guides

* Update byo.mdx

* formatting

* fix broken links

* Edited Quick Start to 1. Hello World

Includes Tutorials -> Create a Project / Write a Contract / Test / Build / Run on Sandbox / Optimizing Builds

* Move Storing Data from Examples to Getting Started

* Move Deploy to Local Network to Getting Started

Moved this section from Tutorials to Getting Started

* Move Freighter wallet tutorial to Getting Started

* Update and rename 6.-connect-Freighter-wallet.mdx to 4. Connect Freighter Wallet

* Move Deploy to Futurenet to Getting Started

* Rename 4. Connect Freighter Wallet to 4. Connect Freighter Wallet.mdx

* Moved to Getting Started

Removing this as it has been moved to Getting Started

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* formatting

* fix broken links

* moar link fixes

* Update Examples to How-To Guides

* Move BYO SDK to How-To Guides

* Moved invoking contracts with transactions to How-To Guides

* Moved Token Interface to Token How-To Guide

* Remove Token Interface

Token Interface has been moved to How-To Guides -> Token

* Move Stellar Asset Contract to How-To Guides

* Delete docs/built-in-contracts directory

Moved to How-To Guides

* formatting

* fixed broken links

* Move Stellar FAQs to Learn

* Update authorization.mdx

Alphabetize sidebar

* Update contract-lifecycle.mdx

Alphabetizing sidebar

* Update custom-types.mdx

Alphabetizing sidebar

* Update rust-dialect.mdx

Alphabetizing sidebar

* Update debugging.mdx

Alphabetizing sidebar

* Update environment-concepts.mdx

Alphabetizing sidebar

* Update errors.mdx

Alphabetizing sidebar

* Update events.mdx

Alphabetizing sidebar

* Update gas-and-metering.mdx

Alphabetizing sidebar

* Update interacting-with-contracts.mdx

Alphabetizing sidebar

* Update persisting-data.mdx

Alphabetizing sidebar

* Update high-level-overview.mdx

Update spelling

* formatting

* Update faq.mdx

* fixed some broken links

* Update releases.mdx

* update prettier

* fixed the callouts

* formatting

* fix module import

* Fixed Reorg PR

Fixed links, moved sections, deleted double sections

* Fixed links

Many links.

* Formatting

* Merge cleanup

* More cleanup

* Formatting

* some small design tweaks

* copy tweaks

---------

Co-authored-by: Bri <[email protected]>
Co-authored-by: Anuxhya <[email protected]>
  • Loading branch information
3 people authored Feb 7, 2023
1 parent b2643e7 commit b28dfa7
Show file tree
Hide file tree
Showing 15 changed files with 685 additions and 927 deletions.
50 changes: 0 additions & 50 deletions docs/faq.mdx

This file was deleted.

18 changes: 18 additions & 0 deletions docs/getting-started/connect-freighter-wallet.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
sidebar_position: 6
title: 4. Connect Freighter Wallet
---

## Signing Transactions with Freighter

If you're building a JS dapp, easily sign Soroban transactions using the [Freighter browser extension](https://www.freighter.app/) and its corresponding client library [@stellar/freighter-api](https://www.npmjs.com/package/@stellar/freighter-api):

1. Install the Freighter browser extension.

2. Create a keypair or import an existing account using a mnemonic phrase to complete setup.

3. Next, switch to Experimental Mode to enable the Soroban SDK. In the extension, click the gear in the lower right corner and then navigate to `Preferences`. Toggle on `Experimental Mode`.

4. Now, you can use the `signTransaction` [method](https://docs.freighter.app/docs/guide/usingFreighterNode) from `@stellar/freighter-api` in your dapp to sign Soroban XDR's using the account in Freighter.

Upon calling `signTransaction`, Freighter will open and prompt the user to sign the transaction. Approving the transaction will return the signed XDR to the requesting dapp.
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
---
sidebar_position: 8
title: Deploy to a Local Network
sidebar_position: 5
title: 3. Deploy to a Local Network
---

If you have Docker installed, you can run a local standalone network with the
[Stellar Quickstart] Docker image.
If you have Docker installed, you can run a local standalone network with the [Stellar Quickstart] Docker image.

The Quickstart image is a single container that runs everything you need to test
against a fully featured network. It contains:
The Quickstart image is a single container that runs everything you need to test against a fully featured network. It contains:

- Stellar Core – Node software that runs the network, coordinates consensus, and
finalizes ledgers.
- Stellar Core – Node software that runs the network, coordinates consensus, and finalizes ledgers.
- Soroban RPC server – JSON RPC server for interacting with Soroban contracts.
- Horizon server – HTTP API for access ledger state and historical transactions.
- Friendbot server – HTTP API for creating and funding new accounts on test
networks.
- Friendbot server – HTTP API for creating and funding new accounts on test networks.

:::info

It's also possible to run a contract in the local sandbox environment without a
network using just the [`soroban-cli`]. See [Run on Sandbox] for more details.
It's also possible to run a contract in the local sandbox environment without a network using just the [`soroban-cli`]. See [Run on Sandbox] for more details.

:::

To run a local standalone network with the Stellar Quickstart Docker image,
run the following command.
To run a local standalone network with the Stellar Quickstart Docker image, run the following command.

```sh
docker run --rm -it \
Expand All @@ -41,30 +35,21 @@ Once the image is started you can check its status by querying the Horizon API:
curl http://localhost:8000
```

Generate a key for use on the local sandbox environment by going to the [Stellar
Laboratory]. Make note of both the `G...` and `S...` keys. The `G...` key is the
public key and will also be the account ID. The `S...` key is the secret key and
is that you use to control the account.
Generate a key for use on the local sandbox environment by going to the [Stellar Laboratory]. Make note of both the `G...` and `S...` keys. The `G...` key is the public key and will also be the account ID. The `S...` key is the secret key and is that you use to control the account.

:::tip

It's a good practice to never use the same keys for testing and development that
you use do for the public Stellar network. Generate new keys for testing and
development and avoid ever using them for other purposes.
It's a good practice to never use the same keys for testing and development that you use do for the public Stellar network. Generate new keys for testing and development and avoid ever using them for other purposes.

:::

Create an account on the local sandbox environment by making a request to the
local Friendbot. Specify as the `addr` the `G...` key of your account.
Create an account on the local sandbox environment by making a request to the local Friendbot. Specify as the `addr` the `G...` key of your account.

```sh
curl "http://localhost:8000/friendbot?addr=G..."
```

Once you have an account on the network, we'll use the code we wrote in [Write a
Contract] and the resulting `.wasm` file we built in [Build] as our contract to
deploy. Run the following commands to deploy the contract to the network. Use
the `S...` key as the secret key.
Once you have an account on the network, we'll use the code we wrote in [Write a Contract] and the resulting `.wasm` file we built in [Build] as our contract to deploy. Run the following commands to deploy the contract to the network. Use the `S...` key as the secret key.

```sh
soroban deploy \
Expand All @@ -76,11 +61,7 @@ soroban deploy \

:::tip

It's good practice to avoid entering secret keys on the command line. You can
also specify the secret key by setting the environment variable
`SOROBAN_SECRET_KEY`. The [`soroban-cli`] is still in development and in the
future there will be other secure ways to provide a secret key, such as via
hardware keys.
It's good practice to avoid entering secret keys on the command line. You can also specify the secret key by setting the environment variable `SOROBAN_SECRET_KEY`. The [`soroban-cli`] is still in development and in the future there will be other secure ways to provide a secret key, such as via hardware keys.

:::

Expand All @@ -90,8 +71,7 @@ A contract ID will be outputted.
cd4dae2c409c433b1e1d83994a20214d3e5f60bdd3a817978d8aa7c797864313
```

Using the contract ID that was outputted, use the [`soroban-cli`] to invoke the
`hello` function with a single argument `friend`.
Using the contract ID that was outputted, use the [`soroban-cli`] to invoke the `hello` function with a single argument `friend`.

```sh
soroban invoke \
Expand All @@ -109,10 +89,10 @@ The following output should appear.
["Hello", "friend"]
```

[Write a Contract]: write-a-contract
[Write a Contract]: hello-world#write-a-contract
[Run on a Local Network]: run-on-local-network
[Build]: build
[Build]: hello-world#build
[`soroban-cli`]: ../getting-started/setup#install-the-soroban-cli
[Stellar Laboratory]: https://laboratory.stellar.org/#account-creator?network=test
[Run on Sandbox]: run-on-sandbox
[Run on Sandbox]: hello-world#run-on-sandbox
[Stellar Quickstart]: https://github.com/stellar/quickstart
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
---
sidebar_position: 9
title: Deploy to Futurenet
sidebar_position: 7
title: 5. Deploy to Futurenet
---

If you have Docker installed, you can run a local node with the [Stellar
Quickstart] Docker image that joins the [Futurenet] network, and then use that
local node to deploy.
If you have Docker installed, you can run a local node with the [Stellar Quickstart] Docker image that joins the [Futurenet] network, and then use that local node to deploy.

[Futurenet]: ../networks/futurenet
[Futurenet]: ../reference/futurenet

:::info

It's also possible to run a contract in the local sandbox environment without a
network using just the [`soroban-cli`]. See [Run on Sandbox] for more details.
It's also possible to run a contract in the local sandbox environment without a network using just the [`soroban-cli`]. See [Run on Sandbox] for more details.

:::

To run a local node for the [Futurenet] network with the Stellar Quickstart
Docker image, run the following command.
To run a local node for the [Futurenet] network with the Stellar Quickstart Docker image, run the following command.

```sh
docker run --rm -it \
Expand All @@ -34,33 +30,23 @@ Once the image is started you can check its status by querying the Horizon API:
curl http://localhost:8000
```

It takes sometime to join a remote network. Monitor the output of that endpoint
until you see the `core_latest_ledger` become a number above zero.
It takes sometime to join a remote network. Monitor the output of that endpoint until you see the `core_latest_ledger` become a number above zero.

Generate a key by going to the [Stellar Laboratory]. Make note of both the
`G...` and `S...` keys. The `G...` key is the public key and will also be the
account ID. The `S...` key is the secret key and is that you use to control the
account.
Generate a key by going to the [Stellar Laboratory]. Make note of both the `G...` and `S...` keys. The `G...` key is the public key and will also be the account ID. The `S...` key is the secret key and is that you use to control the account.

:::tip

It's a good practice to never use the same keys for testing and development that
you use for the public Stellar network. Generate new keys for testing and
development and avoid ever using them for other purposes.
It's a good practice to never use the same keys for testing and development that you use for the public Stellar network. Generate new keys for testing and development and avoid ever using them for other purposes.

:::

Create an account on the [Futurenet] network by making a request to the
Friendbot. Specify as the `addr` the `G...` key of your account.
Create an account on the [Futurenet] network by making a request to the Friendbot. Specify as the `addr` the `G...` key of your account.

```sh
curl "https://friendbot-futurenet.stellar.org/?addr=G..."
```

Once you have an account on the network, we'll use the code we wrote in [Write a
Contract] and the resulting `.wasm` file we built in [Build] as our contract to
deploy. Run the following commands to deploy the contract to the network. Use
the `S...` key as the secret key.
Once you have an account on the network, we'll use the code we wrote in [Write a Contract] and the resulting `.wasm` file we built in [Build] as our contract to deploy. Run the following commands to deploy the contract to the network. Use the `S...` key as the secret key.

```sh
soroban deploy \
Expand All @@ -72,11 +58,7 @@ soroban deploy \

:::tip

It's good practice to avoid entering secret keys on the command line. You can
also specify the secret key by setting the environment variable
`SOROBAN_SECRET_KEY`. The [`soroban-cli`] is still in development and in the
future there will be other secure ways to provide a secret key, such as via
hardware keys.
It's good practice to avoid entering secret keys on the command line. You can also specify the secret key by setting the environment variable `SOROBAN_SECRET_KEY`. The [`soroban-cli`] is still in development and in the future there will be other secure ways to provide a secret key, such as via hardware keys.

:::

Expand All @@ -86,8 +68,7 @@ A contract ID will be outputted.
cd4dae2c409c433b1e1d83994a20214d3e5f60bdd3a817978d8aa7c797864313
```

Using the contract ID that was outputted, use the [`soroban-cli`] to invoke the
`hello` function with a single argument `friend`.
Using the contract ID that was outputted, use the [`soroban-cli`] to invoke the `hello` function with a single argument `friend`.

```sh
soroban invoke \
Expand All @@ -105,10 +86,10 @@ The following output should appear.
["Hello", "friend"]
```

[Write a Contract]: write-a-contract
[Write a Contract]: hello-world#write-a-contract
[Run on a Local Network]: run-on-local-network
[Build]: build
[Build]: hello-world#build
[`soroban-cli`]: ../getting-started/setup#install-the-soroban-cli
[Stellar Laboratory]: https://laboratory.stellar.org/#account-creator?network=test
[Run on Sandbox]: run-on-sandbox
[Run on Sandbox]: hello-world#run-on-sandbox
[Stellar Quickstart]: https://github.com/stellar/quickstart
Loading

0 comments on commit b28dfa7

Please sign in to comment.