Skip to main content

MultiversX SDK cookbook

Recipes for building on MultiversX with the JavaScript, TypeScript, and Rust SDKs. The 61 Project build checked recipes show a complete standalone project: package, TypeScript configuration, entrypoint, helpers, and required text assets. Full project files are collapsed so the task itself stays easy to scan. The 11 Reference pages are focused migrations, setup guidance, or Rust examples; they intentionally do not claim to be standalone projects.

CI reconstructs all 61 projects from the files on their pages, installs their exact dependencies, and runs each project's own build on Node 20.19.0. Titled TypeScript fences across the cookbook are also checked together in strict mode. The badges describe that artifact boundary; they are not hand-entered dated status claims.

Building with a coding agent?

Point your agent at the docs and let it read the recipes directly. Agent or agentic engineer? Start here covers the machine-readable surface (llms.txt) and how to wire the cookbook into an agentic workflow.

Start here5 recipes

Accounts and signing15 recipes

BeginnerBuild checked
Generate a mnemonic + derive keys

Generate a BIP39 mnemonic with sdk-core and derive secret keys at several address indices, fully offline, with a determinism check and secrecy notes.

sdk-coretypescriptwalletsdk-core 15.4.1
BeginnerBuild checked
Create an Account from a KeyPair, secret key, or mnemonic

Build an sdk-core Account from a KeyPair, a raw secret key, or a mnemonic, fully offline, and learn which named constructors are sync versus async.

sdk-coretypescriptwalletsdk-core 15.4.1
BeginnerBuild checked
Save and load a keystore (encrypted JSON)

Save a wallet to an encrypted keystore and load it back with a password, for both secret-key and mnemonic keystores, with sdk-core. Fully offline.

sdk-coretypescriptwalletsdk-core 15.4.1
BeginnerBuild checked
Save and load a PEM (dev only)

Save a wallet to a PEM file and load it back via Account and UserPem with sdk-core. PEM is unencrypted and dev-only; fully offline, no network.

sdk-coretypescriptwalletsdk-core 15.4.1
BeginnerBuild checked
Address utilities

The sdk-core Address toolkit, bech32/hex conversion, raw public key, shard computation, isSmartContract, and the HRP. Fully offline, no network.

sdk-coretypescriptaddresssdk-core 15.4.1
BeginnerBuild checked
Fetch an account's on-chain state

Read any address's nonce, balance, username, and guarded flag, plus its key-value storage, through a network provider. Verified live against mainnet.

sdk-corenetwork-providerapisdk-core 15.4.1
IntermediateReference
Save key-value data to an account

Save key-value pairs in an account's on-chain storage with sdk-core's AccountController or AccountTransactionsFactory.

sdk-coreaccountaccount-storagesdk-core 15.4.1
IntermediateBuild checked
Manage nonces (fetch-then-increment)

Fetch an account's nonce from the network once, then increment it locally for every transaction sent afterward in a batch, plus recovery from a nonce gap.

sdk-coretransactiontypescriptsdk-core 15.4.1
BeginnerBuild checked
Sign a message + verify a signature

Sign a message with an account or secret key and verify it with a UserVerifier, fully offline, including proof the check fails on a tampered signature.

sdk-coretypescriptsdk-core 15.4.1
IntermediateBuild checked
Sign + verify a transaction (offline)

Sign a transaction offline with a raw secret key and verify it three ways with sdk-core, including tamper checks. No devnet, no broadcast.

sdk-coretypescripttransactionsdk-core 15.4.1
AdvancedBuild checked
Hash-signing a transaction

Opt a transaction into hash signing with sdk-core, assert the version/options bits, and sign the hash correctly. Includes a real v15.4.1 signing trap.

sdk-coretypescripttransactionsdk-core 15.4.1
IntermediateBuild checked
Set a guardian on an account

Nominate a guardian for an account with SetGuardian via sdk-core's AccountController and AccountTransactionsFactory, payload verified on devnet.

sdk-coreguardiantransactionsdk-core 15.4.1
IntermediateBuild checked
Guard and unguard an account

Activate guardianship with GuardAccount and remove it with UnGuardAccount via sdk-core, including the guardian co-sign requirement, verified on devnet.

sdk-coreguardiantransactionsdk-core 15.4.1
AdvancedBuild checked
Apply a guardian to a transaction and co-sign it

Turn any transaction into a guarded one with TransactionComputer.applyGuardian and co-sign it, asserting version, options, and guardian fields on devnet.

sdk-coreguardiantransactionsdk-core 15.4.1
AdvancedBuild checked
Build a relayed v3 transaction

A sender who has no EGLD for gas, and a relayer who pays it, both signing the same transaction, devnet-verified, with V1/V2 deprecation flagged.

sdk-coretransactionrelayedsdk-core 15.4.1

Network providers7 recipes

BeginnerBuild checked
Configure a network provider (Api vs Proxy)

Construct an ApiNetworkProvider or ProxyNetworkProvider, tune clientName and timeout, or get one from an entrypoint. Both share one INetworkProvider interface.

sdk-corenetwork-providerapisdk-core 15.4.1
BeginnerBuild checked
Fetch network config and status

Read the static network config (gas costs, shard count, round duration) and the live per-shard status (block nonce, epoch, round) via a network provider.

sdk-corenetwork-providerapisdk-core 15.4.1
IntermediateBuild checked
Fetch a block

Fetch the latest block and a block by hash via ApiNetworkProvider, and a block by shard and nonce via ProxyNetworkProvider. Verified live against mainnet.

sdk-corenetwork-providerapisdk-core 15.4.1
IntermediateBuild checked
Await an account on a custom condition

Block until an account matches a predicate you write with awaitAccountOnCondition, tuning the poll interval and timeout via AwaitingOptions.

sdk-corenetwork-providertypescriptsdk-core 15.4.1
IntermediateBuild checked
Await a transaction on a custom condition

Block until a transaction matches a predicate you write with awaitTransactionOnCondition, tuning the poll interval and timeout via AwaitingOptions.

sdk-corenetwork-providertransactionsdk-core 15.4.1
IntermediateBuild checked
Simulate and estimate a transaction

Ask the network what a transaction would cost with estimateTransactionCost and what it would do with simulateTransaction, without ever broadcasting it.

sdk-corenetwork-providertransactionsdk-core 15.4.1
IntermediateBuild checked
Custom API/Proxy request

Call any API or Proxy endpoint the typed provider methods do not cover, via doGetGeneric and doPostGeneric, for economics, stats, and a raw VM query.

sdk-corenetwork-providerapisdk-core 15.4.1

Fetching data from the network1 recipe

Transactions4 recipes

Tokens (ESDT / NFT / SFT)8 recipes

IntermediateBuild checked
Issue a fungible ESDT

Issue a fungible ESDT token with sdk-core's TokenManagementController against DevnetEntrypoint, payload hand-verified against real devnet.

sdk-coreesdttransactionsdk-core 15.4.1
IntermediateBuild checked
Issue an NFT collection + mint an NFT

Issue an NFT collection and mint an NFT into it with sdk-core's TokenManagementController, every field hand-verified against real devnet.

sdk-corenftesdtsdk-core 15.4.1
IntermediateBuild checked
Issue an SFT collection + create, add, and burn quantity

Issue a semi-fungible (SFT) collection, create an SFT batch, then add and burn quantity with sdk-core's TokenManagementController on devnet.

sdk-coresftesdtsdk-core 15.4.1
IntermediateBuild checked
Set and unset special roles on a fungible ESDT

Set and unset the local-mint, local-burn, and ESDT-transfer roles on a fungible ESDT with sdk-core, including a confirmed v15.4.1 unset-role bug.

sdk-coreesdttransactionsdk-core 15.4.1
IntermediateBuild checked
Local mint and burn (change a fungible token's supply)

Increase and decrease a fungible ESDT's circulating supply with ESDTLocalMint and ESDTLocalBurn via sdk-core, plus a real SDK method-name typo.

sdk-coreesdttransactionsdk-core 15.4.1
AdvancedBuild checked
Token lifecycle — freeze, unfreeze, pause, unpause, wipe

Freeze/unfreeze an account's token, pause/unpause globally, and wipe with sdk-core, includes the confirmed v15.4.1 wrong-receiver bug and its fix.

sdk-coreesdttransactionsdk-core 15.4.1
IntermediateBuild checked
Fetch token metadata

Read a token's definition, name, ticker, decimals, owner and property flags, for a fungible token and for an NFT or SFT collection. Verified live.

sdk-corenetwork-provideresdtsdk-core 15.4.1
IntermediateBuild checked
Fetch an account's token balances

Read the tokens an account holds, all fungible ESDTs, all NFTs and SFTs, and one specific token balance, via a network provider. Verified live.

sdk-corenetwork-provideresdtsdk-core 15.4.1

Wallets7 recipes

BeginnerBuild checked
Read the connected account with useGetAccount

Every AccountType field explained, which ones are optional, how to format the balance correctly, and when to reach for useGetAccountInfo instead.

sdk-dappwalletreactsdk-dapp 5.7.1
BeginnerBuild checked
Add a wallet login button

Configure UnlockPanelManager once at startup, then add a reusable connect and disconnect button that works with every registered wallet provider.

sdk-dappwalletvitesdk-dapp 5.7.1
IntermediateBuild checked
Log in with the DeFi Wallet browser extension

A dedicated single-provider login button using ProviderFactory directly, with real extension detection and no generic multi-provider picker UI.

sdk-dappwalletwallet-extensionsdk-dapp 5.7.1
IntermediateBuild checked
Log in with xPortal via WalletConnect

A dedicated xPortal login button using ProviderFactory and WalletConnect v2 directly, including the QR-code anchor element and project ID setup.

sdk-dappwalletwalletconnectsdk-dapp 5.7.1
IntermediateBuild checked
Log in with a Ledger hardware wallet

A dedicated Ledger login button using ProviderFactory directly, including the anchor element the SDK renders its own device-connect and account-picker UI into.

sdk-dappwalletledgersdk-dapp 5.7.1
IntermediateBuild checked
Native auth, token issuance, expiry, auto-logout

How nativeAuth issues a bearer token on login, why loginExpiresAt is not the token's real expiry, and how LogoutManager schedules the warning toast and logout.

sdk-dappwalletnative-authsdk-dapp 5.7.1
IntermediateReference
TypeScript strict-mode checklist for sdk-dapp consumers

Four real bugs found while verifying cookbook recipes against installed sdk-dapp, plus the tsconfig flags and ESLint rules that catch them.

sdk-dapptypescriptreactsdk-dapp 5.7.1

Migration3 recipes

Governance2 recipes

Delegation5 recipes

Multisig4 recipes

Smart contracts (call & query)6 recipes

Smart contracts (deploy & upgrade)3 recipes

Smart contracts (Rust authoring)2 recipes

72 recipes across 14 sections: 61 standalone projects reconstructed and built in CI, plus 11 focused reference pages. Card badges state which artifact the page contains.