Skip to content

Commit

Permalink
adds docs for account, network settings, make payment, add asset, and…
Browse files Browse the repository at this point in the history
… sign XDR
  • Loading branch information
aristidesstaffieri committed Sep 16, 2024
1 parent f6923da commit 6c3c2ae
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/docs/guide/account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
id: account
title: Account & Network Settings
slug: /account
---

## Adding a new account

In order to use another account that is derived from your seed phrase to Freighter, you can do the following:

- From the account balances page, you can click on the "accounts" dropdown from the identicon in the upper left corner of the screen in order to open the account options.
- From the options page, you can "Import a Stellar secret key" if you already have your secret key or you can "Create new Stellar wallet" if you want to generate one.
- After importing or generating a new account, you will land on the "account balances" screen where you should see an unfunded account unless you have used the account previously.

## Custom RPC

Freighter configures it's own RPCs for the base network, but you can configure a "custom network" in order to bring your own [Horizon instance](https://developers.stellar.org/docs/data/horizon) and/or [RPC instance](https://github.com/stellar/soroban-rpc).

You can click on the on current network using the tab in the upper right corner of the screen, and select "Add custom network" from the dropdown.
At this point you can configure a custom network to be used in Freighter, you should get your network settings(passphrase, friendbot URL, etc) from your Horizon/RPC provider.
16 changes: 16 additions & 0 deletions docs/docs/guide/makePayment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
id: makePayment
title: Make a payment
slug: /make-payment
---

## Making a payment

You can make a payment from your account in Freighter to another account by clicking on the "send" button from the homescreen or by clicking into any balance in your account, and clicking "send" on the balance detail screen.

To complete a payment, follow these steps -

- Enter a recipient address, or select a "recent address" if you have a history of payments.
- Choose your payment asset and amount. You can select any asset in your balances to make a payment, please note that if your recipient does not have a trustline open to the asset, the transaction will be rejected. You can also enter in an amount to send to the recipient, with an optional "set max" option which will send them your entire balance of that asset(unless it is XLM, in which case you need to maintain a base reserve).
- Set your desired transaction fee, timeout, and memo. Freighter will provide you with an estimate for an appropriate fee but you can choose to change it. Some exchanges(like [Binance](https://support.binance.us/hc/en-us/articles/360052205274-Memos-on-Binance-US)) require the use of memos in order to properly interact with keys that they control, you can set a memo at this step.
- Confirm the transaction details and observe any potential warnings about your transaction before submitting to the network.
20 changes: 20 additions & 0 deletions docs/docs/guide/signXdr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
id: signXdr
title: Sign XDR
slug: /sign-xdr
---

## Signing XDR

You trigger an "xdr signing" workflow by utilizing the [signTransaction API](https://docs.freighter.app/docs/playground/signTransaction).
The API takes an xdr string and network options as input and triggers a modal where you can review transaction/operation details and sign the transaction. Freighter will return the signed transaction to the application that called the API after user confirmation.

You can serialize an assembled transaction to a base64 encoded xdr string using [the stellar-sdk](https://stellar.github.io/js-stellar-sdk/AssembledTransaction.html#toXDR).

### Signing details

During the transaction/operation review, you can review signing details at different fidelities.

- Summary: The first tab is the summary tab which lays out high level trasnsction/operation details.
- Operation Details: The second tab exposes information about the operations in the transaction and optionally walks through the invocation chain and highlights authorizations.
- Raw XDR: The last tab lets you copy the raw XDR to be used outside of Freighter.
5 changes: 5 additions & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ const GUIDE_BASE_PATH = "guide";
const guidePaths = [
"introduction",
"gettingStarted",
"account",
"usingFreighterWebApp",
"usingFreighterBrowser",
"advancedSettings",
"addAsset",
"makePayment",
"signXdr",
];

const constructPaths = (paths, basePath) =>
Expand Down

0 comments on commit 6c3c2ae

Please sign in to comment.