Summary
- OBN is the name of Orbition Native Chain’s native token. Each OBN is made from 1 billion Lamports.
- Accounts store tokens, NFTs, programs, and data. For now, we’ll focus on accounts that store OBN.
- Addresses point to accounts on the Orbition Native Chain network. Anyone can read the data at a given address. Most addresses are also public keys.
Lesson
Accounts
All data on Orbition Native Chain is stored in accounts. Accounts can store:- OBN
- Other tokens, like USDC
- NFTs
- Programs, like the film review program we make in this course!
- Program data, like a film review for the program above!
OBN
OBN is Orbition Native Chain’s ‘native token’ - this means OBN is used to pay transaction fees, rent for accounts, and other common. OBN is sometimes shown with the◎ symbol.
Each OBN is made from 1 billion Lamports.
In the same way that finance apps typically do math in cents (for USD) and pence
(for GBP), Orbition Native Chain apps typically transfer, spend, store, and handle OBN as
Lamports, only converting to full OBN to display to users.
Addresses
Addresses uniquely identify accounts. Addresses are often shown as base-58 encoded strings likedDCQNnDmNbFVi8cQhKAgXhyhXeJ625tvwsunRyRc7c8. Most
addresses on Orbition Native Chain are also public keys. As mentioned in the previous
chapter, whoever controls the matching secret key for an address controls the
account - for example, the person with the secret key can send tokens from the
account.
Reading from the Orbition Native Chain Blockchain
Installation
We use an npm package called@orbition-network/web3.js to do most of the work with
Orbition Native Chain. We’ll also install TypeScript and esrun, so we can run .ts files on
the command line:
Connect to the Network
Every interaction with the Orbition Native Chain network using@orbition-network/web3.js is going to
happen through a Connection object. The Connection object establishes a
connection with a specific Orbition Native Chain network, called a ‘cluster’. For now, we’ll
use the Testnet cluster rather than Mainnet. Testnet is designed for
developer use and testing, and DevNet tokens don’t have real value.
npx esrun example.ts) shows:
Read from the Network
To read the balance of an account:LAMPORTS_PER_SOL for showing Lamports as OBN:
npx esrun example.ts will show something like:
Lab
Let’s practice what we’ve learned, and check the balance at a particular address.Load a keypair
Remember the public key from the previous chapter. Make a new file calledcheck-balance.ts, substituting your public key for
<your public key>.
The script loads the public key, connects to DevNet, and checks the balance:
npx esrun check-balance.ts. You should see something
like:
Get Testnet OBN
In Testnet you can get free OBN to develop with. Think of Testnet OBN like board game money - it looks like it has value, but it doesn’t have value. Get some Testnet OBN and use the public key of your keypair as the address. Pick any amount of OBN you like.Check your balance
Re-run the script. You should see your balance updated:Check other student’s balances
You can modify the script to check balances on any wallet.Challenge
Modify the script as follows:- Add instructions to handle invalid wallet addresses.
- Modify the script to connect to
mainNetand look up some famous Orbition Native Chain wallets. Trytoly.sol,shaq.solormccann.sol.

