forked from anoma/namada-docs
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'anoma:master' into master
- Loading branch information
Showing
128 changed files
with
3,329 additions
and
1,348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"sdk" : "Using the SDK" | ||
"sdk" : "Using the SDK", | ||
"light-sdk": "Using the Light SDK", | ||
"indexer": "Using the Indexer", | ||
"interface": "Namada Interface" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Namada Interface | ||
|
||
## Front end development with Namada | ||
The [namada-interface repository](https://github.com/anoma/namada-interface) is a monorepo which contains the Namada browser extension | ||
and associated Namada-Interface web app. It's a great resource for developers wishing to understand how to incorporate the Namada SDK | ||
into their front-end applications. | ||
|
||
### Installing from source (for development and experiment purposes) | ||
|
||
#### Connect to a testnet or run a local node | ||
1. Follow the instructions for the [testnets](../networks/testnets.mdx) to connect to a testnet or [set up a local node](../operators/networks/local-network.mdx). | ||
2. Figure out where the base directory is stored and save its location as a variable such as `export BASE_DIR=<path/to/base/dir>`. | ||
You can follow [these docs](../networks/testnets/migrating-testnets.mdx) to save this variable. Go ahead and save the chain id as a variable as well. You can find the chain id by running `cat $BASE_DIR/global-config.toml`. Save this chain-id to the variable `export CHAIN_ID=<CHAIN_ID>`. | ||
3. You will need to edit the CometBFT config in order to allow the web wallet to connect to your node. | ||
The CometBFT config will be located in `$BASE_DIR/$CHAIN_ID/cometbft/config/config.toml`. You will need to change the `cors_allowed_origins` field to `["*"]`. You can do this by running | ||
```shell copy | ||
sed -i 's/cors_allowed_origins = \[\]/cors_allowed_origins = ["*"]/' \ | ||
$BASE_DIR/$CHAIN_ID/cometbft/config/config.toml | ||
``` | ||
|
||
#### Setting up the extension | ||
1. Clone the [namada-interface repository](https://github.com/anoma/namada-interface). | ||
2. Follow the installation instructions in `README.md`. | ||
3. `cd` into the `namada-interface/apps/extension` directory and run `yarn start:chrome`. This will build the extension and place it in the `namada-interface/apps/extension/build` directory. It also starts the dev server which will watch for changes. | ||
4. `cd` into the `namada-interface/apps/namada-interface` directory and run `yarn dev:local` in order to launch a local instance of the web wallet. | ||
4. Add the extension to the browser. For example, in Chrome, you can go to `chrome://extensions/` and click `Load unpacked` and select the `namada-interface/apps/extension/build/chrome/` folder. | ||
|
||
## Receiving tokens | ||
You can show the address of any account by pressing the `Receive` button in the initial view under the "Total Balances" tab. You can copy the address by clicking the copy icon next to the address. | ||
This will also display a QR code that can be scanned by a mobile wallet. | ||
|
||
## Sending Transactions | ||
|
||
In order to send transactions, you can press the `Send` button in the initial view under the "Total Balances" tab. This will open a modal that will allow you to send tokens to any account, from any account in your wallet that has a positive balance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Callout } from 'nextra-theme-docs'; | ||
|
||
# The Namada Light SDK | ||
|
||
The namada light sdk was developed to provide a simple way to interact with the Namada API. | ||
It provides pre-built functions that can be used in a more "out of the box" way than the SDK, but still requires some knowledge of the API. | ||
|
||
This documentation aims to provide that knowledge. | ||
|
||
## Sections | ||
|
||
- [Setup](./light-sdk/setup.mdx) | ||
- [Usage](./light-sdk/usage.mdx) | ||
- [Examples](./light-sdk/examples.mdx) |
5 changes: 5 additions & 0 deletions
5
packages/docs/pages/integrating-with-namada/light-sdk/_meta.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"setup": "Setup", | ||
"usage": "Usage", | ||
"examples": "Examples" | ||
} |
Oops, something went wrong.