Skip to content
This repository was archived by the owner on Jun 22, 2021. It is now read-only.

Reorganize and rename documentation files to work with new developer's site #146

Merged
merged 2 commits into from
Jul 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions learn/anchor.md → guides/anchor.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ If your anchor doesn't see a lot of volume, you don't need to set up your own in
### Issuing account
The issuing account can issue credit from the anchor. It is very important to maintain the security of this account. Keeping its secret key on a machine that doesn't have Internet access can help. Transactions are manually initiated by a human and are signed locally on the offline machine—a local install of js-stellar-sdk creates a tx_blob containing the signed transaction. This tx_blob can be transported to a machine connected to the Internet via offline methods (e.g. QRcode, USB or by hand). This design makes the issuing account key much harder to compromise.

To learn how to create the issuing account, see [account management](./building-blocks/account-management.md).
To learn how to create the issuing account, see [account management](./account-management.md).

### Base account
People will frequently be redeeming and purchasing credit from your anchor, and you don't want these processes to involve the issuing account directly. Instead, create a `base account` that trusts the issuing account and holds a limited amount of credit issued by it. These funds are sent out to users as needed. A base account contains a limited amount of funds to restrict loss in the event of a security breach.

To learn how to create a base account, see [account management](./building-blocks/account-management.md).
To learn how to create a base account, see [account management](./account-management.md).

### Database
- Need to create a table for pending payments, `StellarPayments`.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions learn/exchange.md → guides/exchange.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ If your exchange doesn't see a lot of volume, you don't need to set up your own
### Issuing account
An issuing account is typically used to keep the bulk of customer funds secure. An issuing account is a Stellar account whose secret keys are not on any device that touches the Internet. Transactions are manually initiated by a human and signed locally on the offline machine—a local install of `js-stellar-sdk` creates a `tx_blob` containing the signed transaction. This `tx_blob` can be transported to a machine connected to the Internet via offline methods (e.g., USB or by hand). This design makes the issuing account secret key much harder to compromise.

To learn how to create an issuing account, see [account management](./building-blocks/account-management.md).
To learn how to create an issuing account, see [account management](./account-management.md).

### Base account
A base account contains a more limited amount of funds than an issuing account. A base account is a Stellar account used on a machine that is connected to the Internet. It handles the day-to-day sending and receiving of lumens. The limited amount of funds in a base account restricts loss in the event of a security breach.

To learn how to create a base account, see [account management](./building-blocks/account-management.md).
To learn how to create a base account, see [account management](./account-management.md).

### Database
- Need to create a table for pending withdrawals, `StellarTransactions`.
Expand Down Expand Up @@ -178,7 +178,7 @@ function handleRequestWithdrawal(userID,amountLumens,destinationAddress) {
db.transaction(function() {
// Read the user's balance from the exchange's database
var userBalance = getBalance('userID');

// Check that user has the required lumens
if (amountLumens <= userBalance) {
// Debit the user's internal lumen balance by the amount of lumens they are withdrawing
Expand Down Expand Up @@ -233,7 +233,7 @@ function submitTransaction(exchangeAccount, destinationAddress, amountLumens) {
.build();

transaction.sign(StellarSdk.Keypair.fromSecret(config.baseAccountSecret));

// POST https://horizon-testnet.stellar.org/transactions
return server.submitTransaction(transaction);
})
Expand All @@ -255,10 +255,10 @@ function submitPendingTransactions(exchangeAccount) {
// Update in an atomic transaction
db.transaction(function() {
var pendingTransactions = querySQL("SELECT * FROM StellarTransactions WHERE state =`pending`");

while (pendingTransactions.length > 0) {
var txn = pendingTransactions.pop();

// This function is async so it won't block. For simplicity we're using
// ES7 `await` keyword but you should create a "promise waterfall" so
// `setTimeout` line below is executed after all transactions are submitted.
Expand Down
File renamed without changes.
File renamed without changes.