Mesh LogoMesh
ResourcesSolutions

For Beginners

Build Cardano dApps without blockchain expertise using Mesh SDK's beginner-friendly APIs.

Mesh SDK is designed for JavaScript developers new to Cardano. No blockchain expertise required. Use familiar patterns to build dApps in minutes.

Quick start

1. Install Mesh

npm install @meshsdk/core @meshsdk/react

2. Add wallet connection

import { MeshProvider, CardanoWallet } from "@meshsdk/react";

function App() {
  return (
    <MeshProvider>
      <CardanoWallet />
    </MeshProvider>
  );
}

3. Send your first transaction

import { useWallet } from "@meshsdk/react";
import { MeshTxBuilder } from "@meshsdk/core";

function SendADA() {
  const { wallet, connected } = useWallet();

  const sendADA = async () => {
    const utxos = await wallet.getUtxos();
    const changeAddress = await wallet.getChangeAddress();

    const txBuilder = new MeshTxBuilder();
    const unsignedTx = await txBuilder
      .txOut("addr_test1...", [{ unit: "lovelace", quantity: "5000000" }])
      .changeAddress(changeAddress)
      .selectUtxosFrom(utxos)
      .complete();

    const signedTx = await wallet.signTx(unsignedTx);
    const txHash = await wallet.submitTx(signedTx);
    console.log("Transaction:", txHash);
  };

  return (
    <button onClick={sendADA} disabled={!connected}>
      Send 5 ADA
    </button>
  );
}

What makes Mesh beginner-friendly

FeatureBenefit
Familiar patternsJavaScript classes, async/await, React hooks
Automatic complexityFee calculation, UTXO selection handled automatically
Clear errorsHelpful messages explain what went wrong
Minimal setupNo blockchain node, just npm install
Full documentationGuides and examples for every skill level

Common tasks

Connect a wallet

import { CardanoWallet, useWallet } from "@meshsdk/react";

<CardanoWallet />

// Or use the hook
const { connected, wallet, connect, disconnect } = useWallet();

Build a transaction

const txBuilder = new MeshTxBuilder();
const unsignedTx = await txBuilder
  .txOut("addr...", [{ unit: "lovelace", quantity: "10000000" }])
  .changeAddress(changeAddress)
  .selectUtxosFrom(utxos)
  .complete();

Read blockchain data

import { BlockfrostProvider } from "@meshsdk/core";

const provider = new BlockfrostProvider("your-api-key");
const utxos = await provider.fetchAddressUTxOs("addr...");

Step 1: Wallet integration

import { MeshProvider, CardanoWallet, useWallet } from "@meshsdk/react";

function App() {
  return (
    <MeshProvider>
      <Header />
    </MeshProvider>
  );
}

function Header() {
  const { connected, wallet } = useWallet();

  return (
    <header>
      <CardanoWallet />
      {connected && <WalletInfo wallet={wallet} />}
    </header>
  );
}

Learn: React context, wallet state, connection handling.

Step 2: Simple transactions

async function sendPayment(wallet, recipient, amount) {
  const utxos = await wallet.getUtxos();
  const changeAddress = await wallet.getChangeAddress();

  const txBuilder = new MeshTxBuilder();
  const unsigned = await txBuilder
    .txOut(recipient, [{ unit: "lovelace", quantity: amount }])
    .changeAddress(changeAddress)
    .selectUtxosFrom(utxos)
    .complete();

  const signed = await wallet.signTx(unsigned);
  return await wallet.submitTx(signed);
}

Learn: Transaction building, signing, submission.

Step 3: Token operations

// Send existing tokens
txBuilder.txOut(recipient, [
  { unit: "policyId" + "tokenNameHex", quantity: "10" }
]);

// Mint new tokens
txBuilder
  .mint("1000", policyId, tokenNameHex)
  .mintingScript(forgingScript);

Learn: Asset structure, minting, multi-asset transactions.

Step 4: Smart contracts

import { mConStr0 } from "@meshsdk/core";

// Lock funds at script
txBuilder
  .txOut(scriptAddress, [{ unit: "lovelace", quantity: "50000000" }])
  .txOutInlineDatumValue(mConStr0([]));

// Unlock funds
txBuilder
  .spendingPlutusScriptV2()
  .txIn(utxo.input.txHash, utxo.input.outputIndex)
  .txInInlineDatumPresent()
  .txInRedeemerValue(mConStr0([]))
  .txInScript(scriptCbor);

Learn: Datums, redeemers, script addresses.


First projects

import { useAssets } from "@meshsdk/react";

function NFTGallery() {
  const assets = useAssets();
  const nfts = assets?.filter(a => a.quantity === "1" && a.unit !== "lovelace");

  return (
    <div className="gallery">
      {nfts?.map(nft => (
        <NFTCard key={nft.unit} asset={nft} />
      ))}
    </div>
  );
}

Payment button

function PaymentButton({ amount, recipient }) {
  const { wallet, connected } = useWallet();

  const pay = async () => {
    const utxos = await wallet.getUtxos();
    const changeAddress = await wallet.getChangeAddress();

    const txBuilder = new MeshTxBuilder();
    const unsigned = await txBuilder
      .txOut(recipient, [{ unit: "lovelace", quantity: amount }])
      .changeAddress(changeAddress)
      .selectUtxosFrom(utxos)
      .complete();

    const signed = await wallet.signTx(unsigned);
    await wallet.submitTx(signed);
  };

  return (
    <button onClick={pay} disabled={!connected}>
      Pay {Number(amount) / 1_000_000} ADA
    </button>
  );
}

Testing

Use preprod testnet

  1. Get test ADA from the Cardano Testnet Faucet
  2. Switch your wallet to preprod network
  3. Test all functionality risk-free
  4. Move to mainnet when confident

Local development

No blockchain node required. Mesh connects to public infrastructure.

npm run dev

Why beginners choose Mesh

ReasonDetails
Skip the deep diveBuild first, learn concepts as needed
Use familiar JavaScriptNo new programming language
Working examplesCopy, paste, modify
Clear error messages"Insufficient funds" not cryptographic dump
Community supportActive Discord, no question too basic

ResourceLink
Wallet integration/resources/solutions/wallet-integration
React components/resources/solutions/react-components
Transaction builder/resources/solutions/transaction-builder
Learning curve challenge/resources/challenges/learning-curve
Getting started guide/guides

On this page