Skip to content

karczuRF/tari.js

 
 

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 :build

# or target individual packages with 
moon <package>: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

WebsiteBlogTwitterDiscord

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.0%
  • Shell 2.0%
  • Other 2.0%