Skip to main content

Introduction

This section walks you through building on Stellar without smart contracts. Learn basic Stellar functions such as creating accounts and making payments, how to issue assets on the network, how to build an application with the JavaScript SDK, Wallet SDK, and more.

Fast Track‚Äč

Issue your first asset on the Stellar network in one, single transaction!

const {
Keypair,
Horizon,
TransactionBuilder,
Networks,
Operation,
Asset,
BASE_FEE,
} = require("@stellar/stellar-sdk");

const issuerKeypair = Keypair.random();
const destinationKeypair = Keypair.random();

const server = new Horizon.Server("https://horizon-testnet.stellar.org");
const account = await server.loadAccount(issuerKeypair.publicKey());
const abcAsset = new Asset("ABC", issuerKeypair.publicKey());

const transaction = new TransactionBuilder(account, {
fee: BASE_FEE,
networkPassphrase: Networks.TESTNET,
})
.addOperation(
Operation.changeTrust({
asset: abcAsset,
source: destinationKeypair,
}),
)
.addOperation(
Operation.payment({
destination: destinationKeypair.publicKey(),
asset: abcAsset,
amount: "100",
}),
)
.setTimeout(30)
.build();

transaction.sign(issuerKeypair, destinationKeypair);
const res = await server.submitTransaction(transaction);
console.log(`Transaction response: ${res}`);