Skip to content

tari-project/tari.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

95 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

tari.js

๐Ÿš€ The complete TypeScript toolkit for building on Tari โ€” Connect any wallet, query the blockchain, and create powerful dApps with confidence.

npm version License Documentation

โœจ What makes tari.js special?

  • ๐Ÿ”Œ Universal Wallet Support โ€” MetaMask, Wallet Daemon, Universe, WalletConnect โ€” all with one API
  • ๐Ÿ›ก๏ธ Privacy-First โ€” Built-in confidential transactions and zero-knowledge proofs
  • ๐Ÿ“ฑ Developer Friendly โ€” Full TypeScript support, intuitive APIs, comprehensive docs
  • โšก Production Ready โ€” Battle-tested, optimized, and actively maintained

๐ŸŽฏ Quick Start (5 minutes)

Get your first Tari app running in minutes:

# Install tari.js
npm install @tari-project/tarijs @tari-project/wallet-daemon-signer

# Run your first connection test
node -e "
import { WalletDaemonTariSigner, TariPermissions } from '@tari-project/tarijs';
const wallet = await WalletDaemonTariSigner.buildFetchSigner({
  serverUrl: 'http://localhost:18103',
  permissions: new TariPermissions()
});
console.log('Connected to Tari!');
"

๐Ÿ‘‰ Complete Installation Guide | 5-Minute Tutorial

๐Ÿ—๏ธ What You Can Build

๐Ÿช™ DeFi Applications

// Transfer tokens
const transaction = new TransactionBuilder()
  .feeTransactionPayFromComponent(account.address, "100")
  .callMethod({
    componentAddress: account.address,
    methodName: 'withdraw'
  }, [{ type: 'Amount', value: '1000' }])
  .build();

๐ŸŽฎ Gaming & NFTs

// Call a smart contract function
const transaction = new TransactionBuilder()
  .feeTransactionPayFromComponent(account.address, "100")
  .callFunction({
    templateAddress: nftTemplate.address,
    functionName: 'mint_nft'
  }, [{ name: 'metadata', value: { name: "Epic Sword", rarity: "legendary" } }])
  .build();

๐Ÿ’ผ Enterprise Solutions

// Multiple operations in one transaction
const transaction = new TransactionBuilder()
  .feeTransactionPayFromComponent(account.address, "100")
  .callMethod({ componentAddress: account1, methodName: 'withdraw' }, [amount1])
  .callMethod({ componentAddress: account2, methodName: 'withdraw' }, [amount2])
  .build();

๐Ÿ”— Supported Wallets

Wallet Best For Status
๐Ÿ–ฅ๏ธ Tari Wallet Daemon Servers, advanced features โœ… Production
๐ŸฆŠ MetaMask Browser apps, familiar UX โœ… Production
๐ŸŒŒ Tari Universe Mobile, native experience โœ… Production
๐Ÿ“ฑ WalletConnect Cross-platform, mobile-first โœ… Production

๐Ÿ“š Documentation Hub

๐Ÿš€ Get Started

๐Ÿ“– Guides & Examples

๐Ÿ”ง Reference


๐Ÿ› ๏ธ Contributing & Development

Want to contribute? We'd love your help! Here's how to get started:

๐Ÿš€ Quick Development Setup

# 1. Clone with required dependencies
git clone https://github.com/tari-project/tari.js
git clone https://github.com/tari-project/tari-ootle ../tari-ootle

# 2. Install toolchain
curl -fsSL https://moonrepo.dev/install/proto.sh | bash
proto use

# 3. Build everything
pnpm install
moon tarijs:build

๐Ÿงช Run the Example App

cd packages/tarijs/example
cp .env.example .env    # Configure your wallet endpoints
pnpm run dev           # Start development server

๐Ÿ“ฆ Docker Development

docker build -t tarijs .
docker create --name tarijs-build tarijs
docker cp tarijs-build:/app/combined_dist/ ./dist

๐Ÿ“– Documentation Development

moon tari-docs:start   # http://localhost:3000/tari.js/

Need help getting started? Check our Contributing Guide or ask in GitHub Discussions.

๐Ÿค Community & Support

๐Ÿ“„ License

This project is licensed under the BSD 3-Clause License โ€” see the LICENSE file for details.


Built with โค๏ธ by the Tari Project

Website โ€ข Blog โ€ข Twitter โ€ข Discord

Packages

No packages published

Contributors 13

Languages