MeshJS / mesh

TypeScript open-source library to advance Web3 development on Cardano
https://meshjs.dev
Apache License 2.0
221 stars 65 forks source link
cardano sdk typescript web3
mesh logo

Mesh TypeScript SDK

[![Licence](https://img.shields.io/github/license/meshjs/mesh)](https://github.com/meshjs/mesh/blob/master/LICENSE) [![Build](https://github.com/meshjs/mesh/actions/workflows/build.yml/badge.svg)](https://github.com/meshjs/mesh/actions/workflows/build.yml) [![Package](https://github.com/meshjs/mesh/actions/workflows/publish.yml/badge.svg)](https://github.com/meshjs/mesh/actions/workflows/publish.yml) [![Twitter/X](https://img.shields.io/badge/Follow%20us-@MeshJS-blue?logo=x&style=for-the-badge)](https://x.com/meshsdk) [![NPM](https://img.shields.io/npm/v/%40meshsdk%2Fcore?style=for-the-badge)](https://www.npmjs.com/package/@meshsdk/core) All-in-one TypeScript SDK for Cardano apps

Mesh is an open-source library designed to make building dApps accessible. Whether you're a beginner developer, startup, web3 market leader, or a large enterprise, Mesh makes web3 development easy with reliable, scalable, and well-engineered APIs & developer tools.

Explore the features on Mesh Playground.

What's inside?

Architecture Overview

graph TD
  package-core[@meshsdk/core]
  package-core-csl[@meshsdk/core-csl]
  package-core-cst[@meshsdk/core-cst]
  package-provider[@meshsdk/provider]
  package-react[@meshsdk/react]
  package-transaction[@meshsdk/transaction]
  package-wallet[@meshsdk/wallet]
  package-sidan-csl[@sidan-lab/*]
  package-cardano-sdk[@cardano-sdk/*]
  package-harmoniclabs[@harmoniclabs/*]
  package-stricahq[@stricahq/*]
  package-core --> package-core-csl
  package-core --> package-core-cst
  package-core --> package-provider
  package-core --> package-react
  package-core --> package-transaction
  package-core --> package-wallet
  package-provider --> package-core-cst

  package-react --> package-transaction
  package-react --> package-wallet
  package-transaction --> package-core-csl
  package-transaction --> package-core-cst
  subgraph serializer
  package-core-csl --> package-sidan-csl
  package-core-cst --> package-cardano-sdk
  package-core-cst --> package-harmoniclabs
  package-core-cst --> package-stricahq
  end
  click package-core-csl "https://docs.meshjs.dev/core-csl" _parent
  click package-core-cst "https://docs.meshjs.dev/core-cst" _parent
  click package-provider "https://docs.meshjs.dev/providers" _parent
  click package-react "https://meshjs.dev/react" _parent
  click package-transaction "https://docs.meshjs.dev/transactions" _parent
  click package-wallet "https://docs.meshjs.dev/wallets" _parent

Packages

A collection of packages that provide different functionalities to interact with the Cardano blockchain.

Description Docs Playground
@meshsdk/common Contains constants, types and interfaces used across the SDK and different serialization libraries :page_facing_up:
@meshsdk/contract A collection of smart contracts and its transactions :page_facing_up: :shipit:
@meshsdk/core Exports all the functionalities including wallets, transactions, and providers :shipit:
@meshsdk/core-csl Types and utilities functions between Mesh and cardano-serialization-lib :page_facing_up:
@meshsdk/core-cst Types and utilities functions between Mesh and cardano-js-sdk :page_facing_up:
@meshsdk/provider Blockchain data providers :page_facing_up: :shipit:
@meshsdk/react React component library :shipit:
@meshsdk/transaction Transactions to send assets, mint tokens, and interact with smart contracts :page_facing_up: :shipit:
@meshsdk/wallet Wallets to manage assets and interact with the blockchain :page_facing_up: :shipit:

Apps

Frontend documentation and live demos for Mesh SDK.

Description Website
apps/docs Mesh technical docs :shipit:
apps/playground Mesh homepage and live demos :shipit:

Mesh Smart Contracts Library

Here's a list of open-source smart contracts, complete with documentation, live demos, and end-to-end source code.

Contract Description Links
Content Ownership Create a content registry and users can create content that is stored in the registry [demo] [source] [docs]
Escrow Facilitates the secure exchange of assets between two parties by acting as a trusted intermediary that holds the assets until the conditions of the agreement are met [demo] [source] [docs]
Giftcard Allows users to create a transactions to lock assets into the smart contract, which can be redeemed by any user [demo] [source] [docs]
Hello World A simple lock-and-unlock assets contract, providing a hands-on introduction to end-to-end smart contract validation and transaction building [demo] [source] [docs]
Marketplace Allows anyone to buy and sell native assets such as NFTs [demo] [source] [docs]
NFT Minting Machine Mint NFTs with an automatically incremented index, which increases by one for each newly minted NFT [demo] [source] [docs]
Payment Splitter Allows users to split incoming payments among a group of accounts [demo] [source] [docs]
Swap Facilitates the exchange of assets between two parties [demo] [source] [docs]
Vesting Allows users to lock tokens for a period of time and withdraw the funds after the lockup period [demo] [source] [docs]

Getting Started

Usage

To use Mesh in your project, run the following command to install the core package:

npm install @meshsdk/core

Install

To install all dependencies, run the following command:

npm install

Build

To build all apps and packages, run the following command:

npm run build

Run

To run all apps and packages, run the following command:

npm run dev

Contributing

Mesh SDK project welcomes all constructive contributions. Contributions take many forms, from code for bug fixes and enhancements, to additions and fixes to documentation, additional tests, triaging incoming pull requests and issues, and more!

Check out the contributing guide.

Alt