Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 3.96 KB

getting_started.md

File metadata and controls

43 lines (28 loc) · 3.96 KB

Getting Started

How do I connect to an Algorand Network?

All connections to an Algorand Network is via a node that exists on that network. Nodes provide three REST services:

Service Client Purpose
algod (Algo Daemon) AlgodClient Send and monitor Transactions.
indexer IndexerClient Query the Algorand Blockchain and lookup account, asset, or smart contract information.
kmd (Key Management Daemon) KmdClient Manage private keys and accounts securely in a wallet hosted by the node.

When developing locally, it's very important to have an Algorand node setup for quick iteration and testing. See the documentation on AlgoKit for a guide on setting up a local Algorand network for this purpose.

How do I write to an Algorand Blockchain?

A blockchain is a ledger made up of transactions. Any write to a blockchain (not just the Algorand blockchain) requires making a Transaction. To make a transaction:

  1. Define/construct your transaction using static methods on Transaction class.
  2. Sign your transaction with a Signer or AsyncSigner.
  3. Send the transaction using algod service via AlgodClient.RawTransaction.
  4. Wait for the transaction to be confirmed via AlgodClient.WaitForConfirmation.

See Your First Transaction for an in-depth guide on making your first transaction.

How do I create an NFT or other kind of Token?

Tokens on the Algorand blockchain are represented by Algorand Standard Assets (ASAs). See the guide on Algorand Standard Assets to learn more about how to manipulate tokens with this SDK.

What about smart contracts?

There are two kinds of smart contracts on the Algorand blockchain:

Type of Smart Contract Other Names SDK entrypoint Official Docs
Stateful Application, Smart Contract Transaction.AppCreate See docs
Stateless Logicsig, Smart Signature LogicSig See docs

All smart contracts are written using TEAL. To use a smart contract:

  1. Use your favorite tool to write TEAL source code. (Some may like PyTEAL).
  2. Compile the source code using AlgodClient.TealCompile.
  3. Use the compiled program in your LogicSig or Transaction.AppCreate.