<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Raza</title>
    <description>The latest articles on Forem by Raza (@almostefficient).</description>
    <link>https://forem.com/almostefficient</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F750389%2F8c6ae6cc-aa1d-401b-9009-a97bb88687bf.jpg</url>
      <title>Forem: Raza</title>
      <link>https://forem.com/almostefficient</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/almostefficient"/>
    <language>en</language>
    <item>
      <title>A buzzword-free Solana crash course for founders, devs, and investors</title>
      <dc:creator>Raza</dc:creator>
      <pubDate>Wed, 21 Feb 2024 10:40:16 +0000</pubDate>
      <link>https://forem.com/almostefficient/a-buzzword-free-solana-crash-course-for-founders-devs-and-investors-4ab7</link>
      <guid>https://forem.com/almostefficient/a-buzzword-free-solana-crash-course-for-founders-devs-and-investors-4ab7</guid>
      <description>&lt;p&gt;I'm gonna explain everything you need to know about Solana and I'll try doing it without using buzzwords. There are three parts to this, I recommend skimming parts that you feel comfortable with!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who is this for?&lt;/strong&gt;&lt;br&gt;
Someone who's never used a blockchain and doesn’t understand what Solana, Bitcoin, or Ethereum are (even a little bit).&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Solana?
&lt;/h2&gt;

&lt;p&gt;Solana is a platform for building applications on top of. &lt;/p&gt;

&lt;p&gt;Practically, it’s a network of computers that run common software that lets you use them for running code and storing data. Anyone can run these computers and there’s thousands of them worldwide.&lt;/p&gt;

&lt;p&gt;People have built and deployed thousands of applications on Solana. Anyone can use them by visiting their websites, like regular apps.&lt;/p&gt;

&lt;p&gt;Alongside all of these computers and the applications that run on top of them, Solana is the millions of humans that form communities to push forward their goals, innovate, and have fun.&lt;/p&gt;

&lt;h4&gt;
  
  
  The network
&lt;/h4&gt;

&lt;p&gt;Solana is an open network, meaning anyone can join or use it without asking for permission or requesting access. This also means anyone can run the code or read the data that’s already on the network. This is permissionlessness.&lt;/p&gt;

&lt;p&gt;Many apps publish their code and document how you can interact with them using your code, so you can build apps on top of existing programs on the network. This is composability.&lt;/p&gt;

&lt;p&gt;While frowned upon as it’s against the open-source spirit, it &lt;strong&gt;is&lt;/strong&gt; possible to publish code/data on Solana that is private: if you don’t share &lt;strong&gt;how&lt;/strong&gt; to interact with it, no one can. &lt;/p&gt;

&lt;h4&gt;
  
  
  The applications
&lt;/h4&gt;

&lt;p&gt;Blockchain networks are mainly used for financial applications. The idea (and reality) is that a shared digital space for confirmable transactions is more efficient and fairer than traditional financial spaces. &lt;/p&gt;

&lt;p&gt;Imagine a banking system that doesn’t close on the weekends, lets you move your money without restrictions, and guarantees that your money won’t disappear (unless you make it). &lt;/p&gt;

&lt;p&gt;Solana allows blockchains to expand beyond financial apps to anything that can benefit from its unique qualities — games, art, social media, physical infrastructure. &lt;/p&gt;

&lt;h4&gt;
  
  
  The communities
&lt;/h4&gt;

&lt;p&gt;When everyone can participate and has control and ownership of what's being built, communities naturally form. &lt;/p&gt;

&lt;p&gt;There’s a bunch of tools and services on Solana to help communities coordinate, govern, and fundraise. You can easily combine resources and vote on decisions, so the only limits are human coordination. &lt;/p&gt;

&lt;h3&gt;
  
  
  How does Solana work?
&lt;/h3&gt;

&lt;p&gt;I’ll keep it short: a large number of computers with specific hardware requirements talk to each other to validate and transmit messages. The messages are called “transactions”, which are a verifiable message format, that tell the computers what users are doing with their data. &lt;/p&gt;

&lt;p&gt;If you broadcast a transaction message stating “I transfer 1 USD to Raza”, the computers running the network check if you have 1 USD to transfer, and if you do, they deduct 1 USD from your balances and add it to mine. All of this adds up to a platform you can build apps on.&lt;/p&gt;

&lt;p&gt;As computing infrastructure, Solana is similar to AWS/GCP/Azure/Vercel. You write and deploy code, and users interact with it from a client (website, mobile app).&lt;/p&gt;

&lt;p&gt;The main differences are:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decentralization&lt;/strong&gt; - Vercel can decide that your app ain’t vibin with their terms of service and kick you off. Solana can’t. The network is run by thousands of individual computers owned by me and you, not a CEO. The network as a collective decides what happens.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Composability&lt;/strong&gt; - You’ve got a program on AWS that I want to interact with. This isn’t possible unless you explicitly expose it to me. On Solana, everything can interact, so software compounds faster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Openness&lt;/strong&gt; - Twitter/Reddit increased their API costs a stupid amount. All of your data on these services is now inaccessible. Data on Solana is public and permanent — if you know how to read it, you’ll never lose it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pay per action&lt;/strong&gt; - Solana is more like public transport than a car you rent. You only pay for what you use. Every time you write, update, or delete data on the network, you pay a small fee based on the computational intensity of your actions. &lt;/p&gt;

&lt;h3&gt;
  
  
  Why build on Solana?
&lt;/h3&gt;

&lt;p&gt;Web2 platforms (AWS/GCP/Azure/Vercel) are great for duplication and an infinite number of something. Solana is better for things that need scarcity, like currencies.&lt;/p&gt;

&lt;p&gt;Here’s a bunch of qualities that are built in to Solana, at the platform level: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scarcity&lt;/strong&gt; - it’s impossible to duplicate assets. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sovereignty&lt;/strong&gt; - users can self-custody and they get to own their data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trustless&lt;/strong&gt; - no need to trust anyone, everything is guaranteed with math (cryptography).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security&lt;/strong&gt; - no one can change your data or update your programs (unless you leave a hole somewhere).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composability&lt;/strong&gt; - build on top of existing resources, save time and money.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt; - Recreating these things faster and cheaper (while staying decentralized) than Solana is virtually impossible. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Does your app/service need Solana?&lt;/strong&gt;&lt;br&gt;
To answer that, ask yourself how easy it would be to build these on your own versus using the ones available on Solana. &lt;/p&gt;

&lt;p&gt;Most use-cases don’t benefit from being on the blockchain. If you don’t need two or more of these qualities, you probably don’t need to build on Solana. &lt;/p&gt;

&lt;p&gt;Build on Solana because you want to push forward and do something that's never been done before. Build on Solana because you know you can get rich by creating better products. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 1: Payments&lt;/strong&gt;&lt;br&gt;
If you use Stripe or Paypal, you’ll lose at least 3% in payment processor fees. Solana fees are $0.0006 per transaction (paid by users). This isn’t theoretical — you can set up a Shopify store that accepts virtual USD payments on Solana right now using the &lt;a href="https://apps.shopify.com/solana-pay"&gt;Solana Pay Shopify app&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 2: Physical infrastructure&lt;/strong&gt;&lt;br&gt;
If you don’t have an infinite budget, the best way to build an alternative to Google Maps is by letting regular people contribute map data. Users buy hardware, contribute data, and get rewarded. Coordination, payouts, and payment for usage of map data is all done on the Solana network.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Solana ecosystem
&lt;/h3&gt;

&lt;p&gt;The bigger apps and communities in the ecosystem are financial - exchanges, trading, banking, stablecoins. While there’s a bunch of infrastructure and B2B companies, the ethos of the ecosystem is to build consumer apps and solve real problems, not sell shovels in a gold rush. &lt;/p&gt;

&lt;p&gt;The range of apps is limited to the people that want to build them and we’re seeing games, social apps, and more come up. &lt;/p&gt;

&lt;p&gt;Here’s a map of the big ecosystem players from Messari: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhq7ke0pseh3uadyak623.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhq7ke0pseh3uadyak623.png" alt="Image description" width="800" height="514"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s normal if some of these labels don’t make sense. Each of these uses one or more of the previously mentioned qualities of Solana. I suggest picking one area you’re interested in and digging into it. A Google/Twitter search will get you far enough to be able to navigate yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started on Solana
&lt;/h2&gt;

&lt;p&gt;First, create an identity. This is normally an email address and a password. On Solana, you’ll generate a wallet, which consists of a public key and a private key — these are similar to an email and password, except if you leak your private key, everything you own in that identity is gone.&lt;/p&gt;

&lt;p&gt;Wallet apps secure and control your public/private keypair. The most popular one is &lt;a href="https://phantom.app/"&gt;Phantom wallet&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To do anything on Solana, you need the SOL token, the native currency of the network, for paying transaction fees. $1 USD worth of SOL will let you pay for 1000+ transactions. Instead of buying crypto, I recommend earning it via bounties: &lt;a href="https://earn.superteam.fun/"&gt;earn.superteam.fun&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;What now? Buy, trade, invest, shop, create, whatever you want.&lt;/p&gt;

&lt;h2&gt;
  
  
  Terms, topics, and buzzwords
&lt;/h2&gt;

&lt;p&gt;Can’t run from buzzwords forever. Here I’ve got the most common terms explained in casual language.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transaction&lt;/strong&gt; - messages users send to Solana network computers to change account data, like asset transfers, purchases, and complex actions like buy orders.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Instruction&lt;/strong&gt; - the atomic unit of a transaction. One transaction can do multiple things. Each action in the transaction is an instruction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On-chain&lt;/strong&gt; - short for “on the blockchain”. When you do things on the Solana network (vs on a private database), you have to pay, and those things are a lot more secure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Off-chain&lt;/strong&gt; - Not on the blockchain. Example: your salary in your bank account. To get it on-chain, transfer from your bank account to an exchange bank account, and receive on-chain money.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Validator&lt;/strong&gt; - a computer on Solana that validates (checks/verifies/confirms) and adds transactions to the ledger (list of previous transactions). They do this cause they get paid. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Signature&lt;/strong&gt; - a string of text used to verify that an action came from a specific identity. Just like a checkbook, these are used to make sure that other people can’t change your data/assets. Think of them like a fingerprint scan; only you can unlock your phone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stake&lt;/strong&gt; - anyone can join the network and submit false data (e.g. taking 69 USD from my account 😠). To prevent this, validators must lock up SOL tokens to participate. If you submit false data, the protocol will seize your SOL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Oracle&lt;/strong&gt; - services that bring off-chain data (like weather, Gold price) on-chain. These are a middleman, but they’re run trustlessly. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mint&lt;/strong&gt; - create new assets on chain. Example: new virtual dollars (USDC) are minted when you transfer money from your bank to the bank of the company that runs USDC. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Program/smart contract&lt;/strong&gt; - this is code that lives on the Solana network that’s used to do things. Think of it like backend logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Account&lt;/strong&gt; - where data is stored on Solana. This data can be program code or user data. Similar to a database entry or Excel row.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mainnet/testnet/devnet&lt;/strong&gt; - there are three Solana networks. Mainnet is for real money and all the apps. Testnet and devnet are for developers with fake money to test things.&lt;/p&gt;

&lt;h2&gt;
  
  
  Developer overview
&lt;/h2&gt;

&lt;p&gt;You can learn to build Solana apps in as little as a weekend. The majority of Solana development is building clients that interact with programs already deployed on the blockchain (web and mobile). There’s plenty of libraries and SDKs that make your job easier.&lt;/p&gt;

&lt;p&gt;If you want to build something truly novel that hasn’t been done before, you’ll write Solana programs (smart contracts) in Rust. I suggest starting with building clients (even just Node.js scripts) to get a feel for Solana and then move to Rust.&lt;/p&gt;

&lt;p&gt;Solana offloads data formatting (among other things) to developers so the network can process faster. Data you get from the chain directl is in bytes. SDKs handle deserialization (converting it into text from 1’s and 0’s, aka decoding). You also need to encode data before sending to the chain. &lt;/p&gt;

&lt;h3&gt;
  
  
  RPC Nodes
&lt;/h3&gt;

&lt;p&gt;To read/write from the blockchain, you’ll send API requests to an RPC node - a computer in the network that doesn't participate in validation/consensus, but only receives and sends data. It takes your transactions and submits them to the rest of the network.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reading blockchain data
&lt;/h3&gt;

&lt;p&gt;All you need is the account address of where it’s stored and how the data is formatted. Send an API request to an RPC node and you’ll get back a response if your query was valid. &lt;/p&gt;

&lt;p&gt;Create a connection, fetch the data, decode it, interpret it. &lt;/p&gt;

&lt;h3&gt;
  
  
  Writing blockchain data
&lt;/h3&gt;

&lt;p&gt;You write to Solana by interacting with existing on-chain programs or publishing new ones. To publish a new program, write it in Rust and use tools like Solana CLI or Anchor CLI to deploy it on-chain. &lt;/p&gt;

&lt;p&gt;To interact with existing deployed programs on Solana, you can either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;use an SDK (like Solana web3.js). These handle data formatting and fill in boilerplate/configs. 
or&lt;/li&gt;
&lt;li&gt;do all of the encoding and structuring yourself if you’re working with a custom program that doesn’t have an SDK.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Start building
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Developers
&lt;/h3&gt;

&lt;p&gt;Solana developer portal: Solana.com/developers&lt;/p&gt;

&lt;p&gt;Full-stack Solana development course: soldev.app/course &lt;/p&gt;

&lt;p&gt;Solana for Javascript developers: &lt;a href="https://www.youtube.com/watch?v=9ayz-5-h_vY"&gt;https://www.youtube.com/watch?v=9ayz-5-h_vY&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;A deep dive on Solana transactions: &lt;a href="https://www.youtube.com/watch?v=cu5GNWnN7IU"&gt;https://www.youtube.com/watch?v=cu5GNWnN7IU&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Founders
&lt;/h3&gt;

&lt;p&gt;The Solana Foundation provides equity-free grants to get you started. They also have a venture arm — Solana Ventures, that offers advice, funding, and intros when you’re ready to scale. &lt;/p&gt;

&lt;p&gt;Solana Foundation grants: &lt;a href="https://solana.org/grants"&gt;https://solana.org/grants&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;YC request for startups: &lt;a href="https://www.ycombinator.com/rfs#:~:text=software%20to%20build.-,STABLECOIN%20FINANCE,-%2D%20Brad%20Flora"&gt;Stablecoin Finance&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Superteam ideas to build: &lt;a href="https://build.superteam.fun/"&gt;https://build.superteam.fun/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Superteam grants: &lt;a href="https://earn.superteam.fun/grants/"&gt;https://earn.superteam.fun/grants/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Solana focused accelerator: &lt;a href="https://www.colosseum.org/accelerator"&gt;https://www.colosseum.org/accelerator&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The tech of the future is here. Go out and build what you want to see exist.&lt;/p&gt;

</description>
      <category>solana</category>
      <category>webdev</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
    <item>
      <title>Solana for Javascript developers</title>
      <dc:creator>Raza</dc:creator>
      <pubDate>Thu, 12 Oct 2023 19:09:02 +0000</pubDate>
      <link>https://forem.com/almostefficient/solana-for-javascript-developers-448</link>
      <guid>https://forem.com/almostefficient/solana-for-javascript-developers-448</guid>
      <description>&lt;p&gt;Javascript. The water of programming languages: shapeless, formless. When you put it on the frontend, it becomes the frontend. When you put it on the backend, it becomes the backend. Take a sip, here's everything you need to know about developing on Solana with Javascript.&lt;/p&gt;

&lt;p&gt;I'm going to assume you're a some-stack web developer: front, back, full, that can write Javascript. &lt;/p&gt;

&lt;p&gt;🎉 Congratulations, I declare you a Solana developer. 🎉&lt;/p&gt;

&lt;p&gt;No other skills necessary. Get to the end of this article and I'll even give you a certificate. &lt;/p&gt;

&lt;h2&gt;
  
  
  What even is Solana?
&lt;/h2&gt;

&lt;p&gt;To a Javascript dev, Solana is just another backend. It's always on, highly optimized, doesn't go down, and it has virtually infinite reads, all for free. Oh, and you can write data to it at cheapish rates. What more can you ask for?&lt;/p&gt;

&lt;p&gt;Proof of History, Tower BFT, Sealevel, yada yada. You don't need to understand how it all works. I don't. All I know is that it's a global computer that synchronizes state at the speed of light. &lt;/p&gt;

&lt;h2&gt;
  
  
  What stays the same?
&lt;/h2&gt;

&lt;p&gt;A lot more than you think. Everything is still just an app of some sort - web app, mobile app, desktop app, Samsung smart fridge app. You'll build the same UIs with most of the same libraries using your favourite tools -  VSCode, Vercel, Dreamweaver, Notepad.txt.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changes?
&lt;/h2&gt;

&lt;p&gt;The two big changes are authentication and data. &lt;/p&gt;

&lt;h3&gt;
  
  
  Authentication
&lt;/h3&gt;

&lt;p&gt;Instead of JWTs and session tokens, you'll be interacting with “wallets”: middlemen applications between your code and the user that handle their credentials securely. If your app is a restaurant kitchen and customers are your users, wallet apps are the waiters, confirming orders and delivering food between you two.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TUmAXPIW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f2klqs37s2550ze0upk8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TUmAXPIW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f2klqs37s2550ze0upk8.png" alt="Comic that displays cats as a chef, a waiter, and a user" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wallet &amp;lt;&amp;gt; app communication is pretty well documented and there’s tons of templates and examples out there. Just &lt;code&gt;npm i&lt;/code&gt; the components and jam them into your app:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PPvRuNeD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/27yzykok8jf7r9nv066x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PPvRuNeD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/27yzykok8jf7r9nv066x.png" alt="A screenshot of React components for connecting wallets" width="800" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's wallet adapters and components for React, Svelte, and Angular:&lt;br&gt;
React, Official - &lt;a href="https://github.com/solana-labs/wallet-adapter"&gt;https://github.com/solana-labs/wallet-adapter&lt;/a&gt;&lt;br&gt;
Svelte - &lt;a href="https://github.com/svelte-on-solana/wallet-adapter"&gt;https://github.com/svelte-on-solana/wallet-adapter&lt;/a&gt;&lt;br&gt;
Angular - &lt;a href="https://github.com/danmt/wallet-adapter-angular-sample"&gt;https://github.com/danmt/wallet-adapter-angular-sample&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can event take wallet connections one step further and implement "Sign in With Solana" - &lt;a href="https://siws.web3auth.io/"&gt;https://siws.web3auth.io/&lt;/a&gt; - a complete alternate solution to traditional profiles.&lt;/p&gt;

&lt;p&gt;The only authentication you do "on the backend" is verifying wallet signatures. Since most wallets are browser extensions, it's possible to "impersonate" another wallet by injecting JS. To ensure users are who they say they are, you ask them to sign a unique message, usually a timestamp or ID, and then check that the signature is valid for their address. &lt;/p&gt;

&lt;p&gt;Once again - you don't need to fully understand how wallet signatures work when getting started, follow the docs and you'll be good to go.&lt;/p&gt;

&lt;p&gt;The last type of authentication is custodial wallets - you make a wallet for the user and control it. This is frowned upon, not only because it's whack, but also because it defeats the whole purpose of being on the blockchain - giving users full control of their identities. &lt;/p&gt;
&lt;h3&gt;
  
  
  Data
&lt;/h3&gt;

&lt;p&gt;Everything is stored on the big global computer (i.e. blockchain state). The majority of your data reads will be one of: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What assets does this user have in their wallet/account?&lt;/li&gt;
&lt;li&gt;What data is stored in their program accounts?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All of this will be read directly from the blockchain, but don’t worry about how you’ll be doing that. There’s some very smart people out there taking all the raw data on the blockchain and putting it into a pretty API for you to consume. The Solana Foundation offers &lt;a href="https://docs.solana.com/cluster/rpc-endpoints"&gt;free JSON-RPC endpoints&lt;/a&gt;, so you can just slap the URL into your code and get started. &lt;/p&gt;
&lt;h3&gt;
  
  
  Reading data
&lt;/h3&gt;

&lt;p&gt;The process of reading data is largely the same as a regular backend. You set up a connection to the backend (RPC endpoint), you define what you want to read and you get the data.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://solana-labs.github.io/solana-web3.js/"&gt;solana-web3.js&lt;/a&gt; library handles all the complexity of formatting these requests, and it has a pretty comprehensive API, here's what a simple balance read looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Connection, PublicKey, clusterApiUrl } from "@solana/web3.js";

// Connection to the endpoint
const connection = new Connection(clusterApiUrl("devnet"));
// Defining which address we're gonna read
const address = new PublicKey('CenYq6bDRB7p73EjsPEpiYN7uveyPUTdXkDkgUduboaN');
// Making the read call
const balance = await connection.getBalance(address);

console.log(`The balance of the account at ${address} is ${balance} lamports`); 
console.log(`✅ Finished!`)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the simplest version of it. When reading from programs (also known as smart contracts), you have to take a few more steps and you need to know how the data you're reading is structured. &lt;/p&gt;

&lt;p&gt;In a nutshell, you also have to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Define the schema of the data you're reading&lt;/li&gt;
&lt;li&gt;Deserialize it (think of this like converting formats)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There's a well-documented library called &lt;code&gt;project-serum/borsh&lt;/code&gt; that's commonly used for deserialisation. &lt;/p&gt;

&lt;p&gt;Rejoice, for you have been given the gift of literacy. Go forth and read.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create, Update, Delete - All about blockchain interactions
&lt;/h2&gt;

&lt;p&gt;"Writing" data to the network just means interacting with programs deployed on the network that change the state of accounts. You have two options of doing this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use the existing libraries and their built in transaction "templates"&lt;/li&gt;
&lt;li&gt;Create a transaction from scratch on your own&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;#1 is easy for common transaction types and when interacting with system programs. You'll need to do #2 when interacting with custom programs.&lt;/p&gt;

&lt;p&gt;Let's take a look at #1. The beauty of the &lt;code&gt;solana-web3.js&lt;/code&gt; library is that it lets you create, update, and delete from a single Node.js file. &lt;/p&gt;

&lt;p&gt;Create a new currency. Send a million people unique images. Gamble your net worth in a game of Plinko. Just hit &lt;code&gt;node index.js&lt;/code&gt; and your financial future is in the hands of a computer.&lt;/p&gt;

&lt;p&gt;Let's say you've decided to launch your own coin. To do that, you'll interact with the token program and create a "mint" account, that can mint all the tokens you want. &lt;/p&gt;

&lt;p&gt;Here's what that looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createMint&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@solana/spl-token&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;clusterApiUrl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Connection&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Keypair&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LAMPORTS_PER_SOL&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@solana/web3.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Create new keypairs that you need &lt;/span&gt;

&lt;span class="c1"&gt;// Address paying the fees for this tx&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;payer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Keypair&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;// Address allowed to mint tokens&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mintAuthority&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Keypair&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;// Address allowed to freeze tokens&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;freezeAuthority&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Keypair&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Connect to the network&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;connection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Connection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;clusterApiUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;devnet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;confirmed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Call the built-in createMint function&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mint&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;createMint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;payer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
  &lt;span class="nx"&gt;mintAuthority&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
  &lt;span class="nx"&gt;freezeAuthority&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="c1"&gt;// The number of decimals of the token&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Log the address of the mint account&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mint&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toBase58&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This script sets up a connection, creates the necessary keys, adn then sends a transaction to create a mint account (which is then used to mint tokens).&lt;/p&gt;

&lt;p&gt;Again, you'll be doing this via wallets most often, not Node scripts. The user will come to your website, connect their wallet, click a series of buttons, and you'll send their wallet a transaction. The flow will be the same as above, but you'll just use their wallet that's passed in through the DOM instead of creating new keys.&lt;/p&gt;

&lt;p&gt;These are the two most used libraries for creating, minting, and transferring tokens and NFTs:&lt;br&gt;
&lt;a href="https://github.com/metaplex-foundation/js"&gt;https://github.com/metaplex-foundation/js&lt;/a&gt;&lt;br&gt;
&lt;a href="https://spl.solana.com/token"&gt;https://spl.solana.com/token&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Craft, for you have been given the gift of creation.&lt;/p&gt;

&lt;p&gt;Here's a super handy collection of examples on how to do common interactions:&lt;br&gt;
&lt;a href="https://github.com/solana-developers/web3-examples"&gt;https://github.com/solana-developers/web3-examples&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to from here?
&lt;/h2&gt;

&lt;p&gt;You can now create million dollar apps on Solana using nothing but Javascript. Start by getting your hands dirty with an idea that feels fun or by modifying somethign from a tutorial (plently of them on &lt;a href="https://www.soldev.app/"&gt;SolDev&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Here's your certificate! &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RKKBEp_E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hzd27yq6hn8ilzkv56e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RKKBEp_E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hzd27yq6hn8ilzkv56e.png" alt="Solana for JS Devs cert" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now go and build! Here's some ideas - &lt;a href="https://build.superteam.fun/ideas"&gt;https://build.superteam.fun/ideas&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>web3</category>
      <category>webdev</category>
      <category>solana</category>
    </item>
  </channel>
</rss>
