Learning Curve Overcome Cardano's learning curve with Mesh SDK's beginner-friendly TypeScript APIs.
Cardano has a steeper learning curve due to the UTXO model, native assets, and academic terminology. Mesh flattens this curve with intuitive APIs that let you build functional dApps immediately.
Ethereum (Accounts) Cardano (UTXO) Single balance number Set of discrete outputs Transactions modify balance Transactions consume and create outputs Partial spending possible Must consume entire UTXO, create change Sequential processing Parallel transaction processing
Challenge Impact UTXO model Different from familiar account systems Haskell roots Plutus smart contracts use Haskell Academic terminology Datums, redeemers, lovelace Fragmented docs Multiple tools and approaches
Mesh provides progressive complexity. Start simple, add advanced features as needed.
npm install @meshsdk/core @meshsdk/react
import { CardanoWallet, MeshProvider, useWallet } from "@meshsdk/react" ;
function App () {
const { connected } = useWallet ();
return (
< MeshProvider >
< CardanoWallet />
{connected && < p >Wallet connected!</ p >}
</ MeshProvider >
);
}
import { MeshTxBuilder } from "@meshsdk/core" ;
const txBuilder = new MeshTxBuilder ({
fetcher: provider,
submitter: provider,
});
const unsignedTx = await txBuilder
. txOut (recipientAddress, [{ unit: "lovelace" , quantity: "5000000" }])
. changeAddress (myAddress)
. selectUtxosFrom (myUtxos)
. complete ();
You say "send 5 ADA to this address." Mesh handles UTXO selection, fee calculation, and change automatically.
Topic What you learn Wallet connection Addresses, connection state ADA transfers Transaction lifecycle, UTXOs Balance checking UTXO aggregation
import { MeshCardanoBrowserWallet } from "@meshsdk/wallet" ;
const wallet = await MeshCardanoBrowserWallet. enable ( "eternl" );
const address = await wallet. getChangeAddressBech32 ();
const utxos = await wallet. getUtxosMesh ();
Topic What you learn Token transfers Asset structure Minting Policy scripts Multi-asset transactions Token bundles
const tx = await txBuilder
. txOut (recipient, [
{ unit: "lovelace" , quantity: "2000000" },
{ unit: policyId + assetName, quantity: "10" }
])
. changeAddress (changeAddress)
. selectUtxosFrom (utxos)
. complete ();
Topic What you learn Transaction metadata On-chain data NFT metadata CIP-25, CIP-68 Message standards CIP-20
const tx = await txBuilder
. txOut (recipient, [{ unit: "lovelace" , quantity: "5000000" }])
. metadataValue ( "674" , { msg: [ "Hello Cardano" ] })
. changeAddress (changeAddress)
. selectUtxosFrom (utxos)
. complete ();
Topic What you learn Datums Script state storage Redeemers Unlock conditions Script execution Budgets, collateral
const tx = await txBuilder
. spendingPlutusScript ( "V2" )
. txIn (scriptUtxo.input.txHash, scriptUtxo.input.outputIndex)
. txInScript (scriptCbor)
. txInDatumValue (datum)
. txInRedeemerValue (redeemer)
. complete ();
Term Meaning Mesh usage Lovelace Smallest ADA unit (1M = 1 ADA) { unit: "lovelace", quantity: "1000000" }UTXO Unspent output - a "coin" to spend wallet.getUtxos()Datum Data attached to script output txInDatumValue()Redeemer Input to unlock script output txInRedeemerValue()Policy ID Token collection identifier Part of asset unit string
import { MeshCardanoHeadlessWallet, AddressType } from "@meshsdk/wallet" ;
import { BlockfrostProvider } from "@meshsdk/core" ;
// Similar to ethers.js pattern
const provider = new BlockfrostProvider ( "<api-key>" );
const wallet = await MeshCardanoHeadlessWallet. fromMnemonic ({
networkId: 0 ,
walletAddressType: AddressType.Base,
fetcher: provider,
mnemonic: [ "your" , "mnemonic" , "words" , "..." ],
});
import { CardanoWallet, useWallet, useLovelace } from "@meshsdk/react" ;
function Dashboard () {
const { connected } = useWallet ();
const lovelace = useLovelace ();
return (
< div >
< CardanoWallet />
{connected && < p >Balance: { Number (lovelace) / 1_000_000 } ADA</ p >}
</ div >
);
}
Full type definitions for IDE autocompletion and compile-time error catching.