@tari-project/tarijs 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -67
- package/TODO.md +91 -3
- package/docusaurus/tari-docs/README.md +200 -17
- package/docusaurus/tari-docs/docs/api-reference.md +665 -0
- package/docusaurus/tari-docs/docs/contributing.md +619 -0
- package/docusaurus/tari-docs/docs/guides/getting-started-tutorial.md +965 -0
- package/docusaurus/tari-docs/docs/guides/production-deployment.md +977 -0
- package/docusaurus/tari-docs/docs/index.md +114 -11
- package/docusaurus/tari-docs/docs/installation.md +142 -1
- package/docusaurus/tari-docs/docs/signers/metamask.md +529 -0
- package/docusaurus/tari-docs/docs/troubleshooting.md +661 -0
- package/docusaurus/tari-docs/package.json +1 -1
- package/examples/vite-typescript-react/README.md +9 -0
- package/examples/vite-typescript-react/eslint.config.js +23 -0
- package/examples/vite-typescript-react/index.html +13 -0
- package/examples/vite-typescript-react/package.json +35 -0
- package/examples/vite-typescript-react/public/vite.svg +1 -0
- package/examples/vite-typescript-react/src/App.css +42 -0
- package/examples/vite-typescript-react/src/App.tsx +50 -0
- package/examples/vite-typescript-react/src/assets/react.svg +1 -0
- package/examples/vite-typescript-react/src/index.css +68 -0
- package/examples/vite-typescript-react/src/main.tsx +10 -0
- package/examples/vite-typescript-react/src/vite-env.d.ts +1 -0
- package/examples/vite-typescript-react/tsconfig.app.json +27 -0
- package/examples/vite-typescript-react/tsconfig.json +7 -0
- package/examples/vite-typescript-react/tsconfig.node.json +25 -0
- package/examples/vite-typescript-react/vite.config.ts +7 -0
- package/package.json +2 -2
- package/packages/builders/package.json +2 -2
- package/packages/builders/src/transaction/TransactionBuilder.ts +4 -12
- package/packages/indexer_provider/package.json +2 -2
- package/packages/indexer_provider/src/provider.ts +5 -5
- package/packages/indexer_provider/tsconfig.json +4 -2
- package/packages/metamask_signer/package.json +2 -2
- package/packages/metamask_signer/src/index.ts +2 -14
- package/packages/{tari_permissions → permissions}/package.json +2 -2
- package/packages/{tari_permissions → permissions}/src/helpers.ts +1 -1
- package/packages/permissions/src/index.ts +2 -0
- package/packages/{tari_permissions/src/tari_permissions.ts → permissions/src/permissions.ts} +56 -6
- package/packages/react-mui-connect-button/moon.yml +71 -0
- package/packages/react-mui-connect-button/package.json +40 -0
- package/packages/react-mui-connect-button/src/Logos.tsx +60 -0
- package/packages/react-mui-connect-button/src/TariConnectButton.tsx +51 -0
- package/packages/react-mui-connect-button/src/TariWalletSelectionDialog.tsx +116 -0
- package/packages/react-mui-connect-button/src/content/tari-logo-white.svg +18 -0
- package/packages/react-mui-connect-button/src/content/tari-logo.svg +18 -0
- package/packages/react-mui-connect-button/src/content/walletconnect-logo.svg +13 -0
- package/packages/react-mui-connect-button/src/defaultPermissions.ts +0 -0
- package/packages/react-mui-connect-button/src/index.ts +24 -0
- package/packages/react-mui-connect-button/tsconfig.json +31 -0
- package/packages/tari_provider/package.json +2 -2
- package/packages/tari_signer/package.json +2 -2
- package/packages/tari_universe/package.json +2 -2
- package/packages/tari_universe/tsconfig.json +4 -2
- package/packages/tarijs/package.json +2 -2
- package/packages/tarijs/tsconfig.json +4 -2
- package/packages/tarijs_types/package.json +2 -2
- package/packages/wallet_daemon/package.json +2 -2
- package/packages/wallet_daemon/src/provider.ts +9 -12
- package/packages/wallet_daemon/src/signer.ts +11 -6
- package/packages/wallet_daemon/tsconfig.json +1 -1
- package/packages/walletconnect/package.json +3 -2
- package/packages/walletconnect/src/index.ts +52 -26
- package/packages/walletconnect/tsconfig.json +3 -0
- package/pnpm-workspace.yaml +15 -7
- package/scripts/check_versions.sh +4 -0
- package/scripts/clean_everything.sh +38 -0
- package/tsconfig.json +6 -0
- package/packages/tari_permissions/src/index.ts +0 -2
- /package/packages/{tari_permissions → permissions}/moon.yml +0 -0
- /package/packages/{tari_permissions → permissions}/tsconfig.json +0 -0
package/README.md
CHANGED
|
@@ -1,101 +1,161 @@
|
|
|
1
1
|
# tari.js
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **🚀 The complete TypeScript toolkit for building on Tari** — Connect any wallet, query the blockchain, and create powerful dApps with confidence.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
[](https://badge.fury.io/js/@tari-project%2Ftarijs)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://tari-project.github.io/tari.js/)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**✨ What makes tari.js special?**
|
|
10
|
+
- **🔌 Universal Wallet Support** — MetaMask, Wallet Daemon, Universe, WalletConnect — all with one API
|
|
11
|
+
- **🛡️ Privacy-First** — Built-in confidential transactions and zero-knowledge proofs
|
|
12
|
+
- **📱 Developer Friendly** — Full TypeScript support, intuitive APIs, comprehensive docs
|
|
13
|
+
- **⚡ Production Ready** — Battle-tested, optimized, and actively maintained
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
## 🎯 Quick Start (5 minutes)
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
Get your first Tari app running in minutes:
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
```bash
|
|
20
|
+
# Install tari.js
|
|
21
|
+
npm install @tari-project/tarijs @tari-project/wallet-daemon-signer
|
|
22
|
+
|
|
23
|
+
# Run your first connection test
|
|
24
|
+
node -e "
|
|
25
|
+
import { WalletDaemonTariSigner, TariPermissions } from '@tari-project/tarijs';
|
|
26
|
+
const wallet = await WalletDaemonTariSigner.buildFetchSigner({
|
|
27
|
+
serverUrl: 'http://localhost:18103',
|
|
28
|
+
permissions: new TariPermissions()
|
|
29
|
+
});
|
|
30
|
+
console.log('Connected to Tari!');
|
|
31
|
+
"
|
|
32
|
+
```
|
|
16
33
|
|
|
17
|
-
|
|
34
|
+
**👉 [Complete Installation Guide](https://tari-project.github.io/tari.js/installation) | [5-Minute Tutorial](https://tari-project.github.io/tari.js/guides/getting-started-tutorial)**
|
|
18
35
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
36
|
+
## 🏗️ What You Can Build
|
|
37
|
+
|
|
38
|
+
### 🪙 **DeFi Applications**
|
|
39
|
+
```typescript
|
|
40
|
+
// Transfer tokens
|
|
41
|
+
const transaction = new TransactionBuilder()
|
|
42
|
+
.feeTransactionPayFromComponent(account.address, "100")
|
|
43
|
+
.callMethod({
|
|
44
|
+
componentAddress: account.address,
|
|
45
|
+
methodName: 'withdraw'
|
|
46
|
+
}, [{ type: 'Amount', value: '1000' }])
|
|
47
|
+
.build();
|
|
25
48
|
```
|
|
26
49
|
|
|
27
|
-
|
|
50
|
+
### 🎮 **Gaming & NFTs**
|
|
51
|
+
```typescript
|
|
52
|
+
// Call a smart contract function
|
|
53
|
+
const transaction = new TransactionBuilder()
|
|
54
|
+
.feeTransactionPayFromComponent(account.address, "100")
|
|
55
|
+
.callFunction({
|
|
56
|
+
templateAddress: nftTemplate.address,
|
|
57
|
+
functionName: 'mint_nft'
|
|
58
|
+
}, [{ name: 'metadata', value: { name: "Epic Sword", rarity: "legendary" } }])
|
|
59
|
+
.build();
|
|
60
|
+
```
|
|
28
61
|
|
|
29
|
-
###
|
|
62
|
+
### 💼 **Enterprise Solutions**
|
|
63
|
+
```typescript
|
|
64
|
+
// Multiple operations in one transaction
|
|
65
|
+
const transaction = new TransactionBuilder()
|
|
66
|
+
.feeTransactionPayFromComponent(account.address, "100")
|
|
67
|
+
.callMethod({ componentAddress: account1, methodName: 'withdraw' }, [amount1])
|
|
68
|
+
.callMethod({ componentAddress: account2, methodName: 'withdraw' }, [amount2])
|
|
69
|
+
.build();
|
|
70
|
+
```
|
|
30
71
|
|
|
31
|
-
|
|
72
|
+
## 🔗 Supported Wallets
|
|
32
73
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
74
|
+
| Wallet | Best For | Status |
|
|
75
|
+
|--------|----------|--------|
|
|
76
|
+
| **🖥️ [Tari Wallet Daemon](https://tari-project.github.io/tari.js/signers/wallet-daemon)** | Servers, advanced features | ✅ Production |
|
|
77
|
+
| **🦊 [MetaMask](https://tari-project.github.io/tari.js/signers/metamask)** | Browser apps, familiar UX | ✅ Production |
|
|
78
|
+
| **🌌 [Tari Universe](https://tari-project.github.io/tari.js/signers/tari-universe)** | Mobile, native experience | ✅ Production |
|
|
79
|
+
| **📱 [WalletConnect](https://tari-project.github.io/tari.js/signers/wallet-connect)** | Cross-platform, mobile-first | ✅ Production |
|
|
36
80
|
|
|
37
|
-
|
|
38
|
-
docker create --name tarijs-build tarijs
|
|
39
|
-
docker cp tarijs-build:/app/combined_dist/ ./dist
|
|
40
|
-
docker rm tarijs-build
|
|
41
|
-
```
|
|
81
|
+
## 📚 Documentation Hub
|
|
42
82
|
|
|
43
|
-
|
|
83
|
+
### 🚀 **Get Started**
|
|
84
|
+
- **[Installation Guide](https://tari-project.github.io/tari.js/installation)** — Set up your development environment
|
|
85
|
+
- **[First App Tutorial](https://tari-project.github.io/tari.js/guides/getting-started-tutorial)** — Build a working wallet app
|
|
86
|
+
- **[Provider vs Signer](https://tari-project.github.io/tari.js/provider-vs-signer)** — Understand the core concepts
|
|
44
87
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
├── tari_permissions/
|
|
50
|
-
├── wallet_daemon/
|
|
51
|
-
├── tari_signer/
|
|
52
|
-
├── builders/
|
|
53
|
-
├── metamask_signer/
|
|
54
|
-
├── tari_universe/
|
|
55
|
-
├── tarijs_types/
|
|
56
|
-
├── indexer_provider/
|
|
57
|
-
└── walletconnect/
|
|
58
|
-
```
|
|
88
|
+
### 📖 **Guides & Examples**
|
|
89
|
+
- **[Wallet Integration](https://tari-project.github.io/tari.js/category/signers)** — Connect different wallet types
|
|
90
|
+
- **[Transaction Building](https://tari-project.github.io/tari.js/wallet/submit-transaction/transaction-builder/)** — Create complex transactions
|
|
91
|
+
- **[Production Deployment](https://tari-project.github.io/tari.js/guides/production-deployment)** — Go live with confidence
|
|
59
92
|
|
|
60
|
-
|
|
93
|
+
### 🔧 **Reference**
|
|
94
|
+
- **[Complete API Reference](https://tari-project.github.io/tari.js/api-reference)** — Every method documented
|
|
95
|
+
- **[Troubleshooting](https://tari-project.github.io/tari.js/troubleshooting)** — Common issues & solutions
|
|
96
|
+
- **[Templates & Examples](https://github.com/tari-project/tari.js/tree/main/examples)** — Copy-paste code snippets
|
|
61
97
|
|
|
62
|
-
|
|
98
|
+
---
|
|
63
99
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
100
|
+
## 🛠️ Contributing & Development
|
|
101
|
+
|
|
102
|
+
**Want to contribute?** We'd love your help! Here's how to get started:
|
|
103
|
+
|
|
104
|
+
### 🚀 **Quick Development Setup**
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# 1. Clone with required dependencies
|
|
108
|
+
git clone https://github.com/tari-project/tari.js
|
|
109
|
+
git clone https://github.com/tari-project/tari-ootle ../tari-ootle
|
|
68
110
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
111
|
+
# 2. Install toolchain
|
|
112
|
+
curl -fsSL https://moonrepo.dev/install/proto.sh | bash
|
|
113
|
+
proto use
|
|
114
|
+
|
|
115
|
+
# 3. Build everything
|
|
116
|
+
pnpm install
|
|
72
117
|
moon tarijs:build
|
|
73
|
-
pnpm run dev
|
|
74
118
|
```
|
|
75
119
|
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
cd example
|
|
79
|
-
|
|
120
|
+
### 🧪 **Run the Example App**
|
|
121
|
+
```bash
|
|
122
|
+
cd packages/tarijs/example
|
|
123
|
+
cp .env.example .env # Configure your wallet endpoints
|
|
124
|
+
pnpm run dev # Start development server
|
|
80
125
|
```
|
|
81
|
-
The distribution files will be under the `example/dist` folder.
|
|
82
126
|
|
|
83
|
-
|
|
127
|
+
### 📦 **Docker Development**
|
|
128
|
+
```bash
|
|
129
|
+
docker build -t tarijs .
|
|
130
|
+
docker create --name tarijs-build tarijs
|
|
131
|
+
docker cp tarijs-build:/app/combined_dist/ ./dist
|
|
132
|
+
```
|
|
84
133
|
|
|
85
|
-
|
|
134
|
+
### 📖 **Documentation Development**
|
|
135
|
+
```bash
|
|
136
|
+
moon tari-docs:start # http://localhost:3000/tari.js/
|
|
137
|
+
```
|
|
86
138
|
|
|
87
|
-
|
|
139
|
+
**Need help getting started?** Check our **[Contributing Guide](https://tari-project.github.io/tari.js/contributing)** or ask in [GitHub Discussions](https://github.com/tari-project/tari.js/discussions).
|
|
88
140
|
|
|
89
|
-
|
|
141
|
+
## 🤝 Community & Support
|
|
90
142
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
143
|
+
- **📚 [Complete Documentation](https://tari-project.github.io/tari.js/)** — Everything you need to know
|
|
144
|
+
- **💬 [GitHub Discussions](https://github.com/tari-project/tari.js/discussions)** — Ask questions, share ideas
|
|
145
|
+
- **🐛 [Issue Tracker](https://github.com/tari-project/tari.js/issues)** — Report bugs, request features
|
|
146
|
+
- **🔧 [Troubleshooting Guide](https://tari-project.github.io/tari.js/troubleshooting)** — Common issues & solutions
|
|
147
|
+
- **🎮 [Example Apps](https://github.com/tari-project/tari.js/tree/main/examples)** — See tari.js in action
|
|
148
|
+
|
|
149
|
+
## 📄 License
|
|
150
|
+
|
|
151
|
+
This project is licensed under the **BSD 3-Clause License** — see the [LICENSE](LICENSE) file for details.
|
|
152
|
+
|
|
153
|
+
---
|
|
94
154
|
|
|
95
|
-
|
|
155
|
+
<div align="center">
|
|
96
156
|
|
|
97
|
-
|
|
157
|
+
**Built with ❤️ by the [Tari Project](https://tari.com)**
|
|
98
158
|
|
|
99
|
-
|
|
159
|
+
[Website](https://tari.com) • [Blog](https://blog.tari.com) • [Twitter](https://twitter.com/tari) • [Discord](https://discord.gg/tari)
|
|
100
160
|
|
|
101
|
-
|
|
161
|
+
</div>
|
package/TODO.md
CHANGED
|
@@ -1,4 +1,92 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 🚀 tari.js Roadmap & Feature Requests
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
**Welcome to our development roadmap!** This document tracks upcoming features, improvements, and community requests. Want to contribute? Pick an item and let's build together!
|
|
4
|
+
|
|
5
|
+
## 🎯 **Current Sprint (v0.6.0)**
|
|
6
|
+
|
|
7
|
+
### 🔧 **Developer Experience Improvements**
|
|
8
|
+
- [ ] **Universal `TariConnect` Component** — Reusable React component for wallet connections
|
|
9
|
+
- Pre-built UI for all wallet types
|
|
10
|
+
- Customizable themes and styling
|
|
11
|
+
- TypeScript definitions included
|
|
12
|
+
- Ready for any React/Next.js app
|
|
13
|
+
|
|
14
|
+
### 📱 **Mobile & Web Enhancements**
|
|
15
|
+
- [ ] **Progressive Web App (PWA) Support** — Offline capabilities for mobile apps
|
|
16
|
+
- [ ] **React Native Bindings** — Native mobile app integration
|
|
17
|
+
- [ ] **QR Code Scanner** — Built-in address scanning for mobile wallets
|
|
18
|
+
|
|
19
|
+
### 🔒 **Security & Privacy Features**
|
|
20
|
+
- [ ] **Hardware Wallet Support** — Ledger and Trezor integration
|
|
21
|
+
- [ ] **Multi-signature Transactions** — Enterprise-grade security
|
|
22
|
+
- [ ] **Advanced Privacy Controls** — Granular confidential transaction settings
|
|
23
|
+
|
|
24
|
+
## 🌟 **Upcoming Features (v0.7.0+)**
|
|
25
|
+
|
|
26
|
+
### 🎮 **Gaming & NFT Tools**
|
|
27
|
+
- [ ] **NFT Marketplace SDK** — Complete toolkit for NFT platforms
|
|
28
|
+
- [ ] **Game Asset Management** — In-game currency and item handling
|
|
29
|
+
- [ ] **Achievement System** — Blockchain-based gaming achievements
|
|
30
|
+
|
|
31
|
+
### 💼 **Enterprise Solutions**
|
|
32
|
+
- [ ] **Batch Transaction Processing** — High-volume transaction handling
|
|
33
|
+
- [ ] **Audit Trail APIs** — Compliance and reporting tools
|
|
34
|
+
- [ ] **Multi-tenant Architecture** — SaaS platform support
|
|
35
|
+
|
|
36
|
+
### 🏗️ **Developer Tools**
|
|
37
|
+
- [ ] **Visual Transaction Builder** — Drag-and-drop transaction creation
|
|
38
|
+
- [ ] **Real-time Debugging** — Live transaction monitoring
|
|
39
|
+
- [ ] **Template Generator** — Auto-generate smart contract templates
|
|
40
|
+
|
|
41
|
+
## 💡 **Community Requests**
|
|
42
|
+
|
|
43
|
+
### Most Requested Features
|
|
44
|
+
1. **🔌 Simplified Wallet Detection** — Auto-detect available wallets
|
|
45
|
+
2. **📊 Analytics Dashboard** — Built-in usage metrics
|
|
46
|
+
3. **🌐 Multi-language Support** — i18n for global apps
|
|
47
|
+
4. **🔄 Auto-retry Logic** — Smart transaction failure handling
|
|
48
|
+
5. **📦 CDN Distribution** — Browser-ready builds via CDN
|
|
49
|
+
|
|
50
|
+
### Vote for Features
|
|
51
|
+
Have an idea? [Create a feature request](https://github.com/tari-project/tari.js/discussions/categories/ideas) and get community votes!
|
|
52
|
+
|
|
53
|
+
## 🐛 **Known Issues & Fixes**
|
|
54
|
+
|
|
55
|
+
### High Priority
|
|
56
|
+
- [ ] **MetaMask Snap Performance** — Optimize snap loading times
|
|
57
|
+
- [ ] **WebRTC Connection Stability** — Improve wallet daemon connections
|
|
58
|
+
- [ ] **Bundle Size Optimization** — Reduce package footprint
|
|
59
|
+
|
|
60
|
+
### Medium Priority
|
|
61
|
+
- [ ] **Documentation Search** — Improve search functionality
|
|
62
|
+
- [ ] **TypeScript Strict Mode** — Full strict type checking
|
|
63
|
+
- [ ] **Test Coverage** — Achieve 95%+ code coverage
|
|
64
|
+
|
|
65
|
+
## 🚀 **How to Contribute**
|
|
66
|
+
|
|
67
|
+
### 🛠️ **For Developers**
|
|
68
|
+
1. Browse open issues: [Good First Issues](https://github.com/tari-project/tari.js/labels/good%20first%20issue)
|
|
69
|
+
2. Join our [Discord](https://discord.gg/tari) for real-time discussions
|
|
70
|
+
3. Check the [Contributing Guide](https://tari-project.github.io/tari.js/contributing)
|
|
71
|
+
|
|
72
|
+
### 💭 **For Ideas & Feedback**
|
|
73
|
+
1. [Start a discussion](https://github.com/tari-project/tari.js/discussions) with your ideas
|
|
74
|
+
2. [Request features](https://github.com/tari-project/tari.js/issues/new?template=feature_request.md)
|
|
75
|
+
3. Share your use cases and examples
|
|
76
|
+
|
|
77
|
+
### 📚 **For Documentation**
|
|
78
|
+
1. Improve existing docs in `/docusaurus/tari-docs/docs/`
|
|
79
|
+
2. Add examples and tutorials
|
|
80
|
+
3. Create video guides and walkthroughs
|
|
81
|
+
|
|
82
|
+
## 📅 **Release Timeline**
|
|
83
|
+
|
|
84
|
+
| Version | Expected | Key Features |
|
|
85
|
+
|---------|----------|--------------|
|
|
86
|
+
| **v0.6.0** | Q3 2025 | TariConnect component, PWA support |
|
|
87
|
+
| **v0.7.0** | Q4 2025 | Gaming SDK, enterprise tools |
|
|
88
|
+
| **v1.0.0** | Q1 2026 | Stable API, full platform coverage |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
**🎉 Want to see something specific?** [Let us know!](https://github.com/tari-project/tari.js/discussions) We prioritize features based on community interest and real-world usage.
|
|
@@ -1,41 +1,224 @@
|
|
|
1
|
-
# Website
|
|
1
|
+
# tari.js Documentation Website 📚
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Beautiful, comprehensive documentation for tari.js** — Built with Docusaurus for an exceptional developer experience.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This is the source for the official [tari.js documentation site](https://tari-project.github.io/tari.js/), providing comprehensive guides, tutorials, and API reference for building with tari.js.
|
|
6
6
|
|
|
7
|
+
## 🚀 **Quick Start**
|
|
8
|
+
|
|
9
|
+
### **Prerequisites**
|
|
10
|
+
- **Node.js 18+** and **pnpm** (recommended) or **yarn**
|
|
11
|
+
- **Git** for version control
|
|
12
|
+
|
|
13
|
+
### **Development Setup**
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Navigate to docs directory
|
|
17
|
+
cd docusaurus/tari-docs
|
|
18
|
+
|
|
19
|
+
# Install dependencies
|
|
20
|
+
pnpm install
|
|
21
|
+
# or
|
|
22
|
+
yarn install
|
|
23
|
+
|
|
24
|
+
# Start development server
|
|
25
|
+
pnpm start
|
|
26
|
+
# or
|
|
27
|
+
yarn start
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The development server will start at `http://localhost:3000/tari.js/` with live reload enabled.
|
|
31
|
+
|
|
32
|
+
## 🏗️ **Building & Deployment**
|
|
33
|
+
|
|
34
|
+
### **Local Build**
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Build static site
|
|
38
|
+
pnpm build
|
|
39
|
+
# or
|
|
40
|
+
yarn build
|
|
7
41
|
```
|
|
8
|
-
|
|
42
|
+
|
|
43
|
+
This generates static content in the `build/` directory that can be served by any static hosting service.
|
|
44
|
+
|
|
45
|
+
### **Production Deployment**
|
|
46
|
+
|
|
47
|
+
The documentation is automatically deployed to GitHub Pages via CI/CD when changes are merged to the main branch.
|
|
48
|
+
|
|
49
|
+
**Manual deployment** (maintainers only):
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Deploy to GitHub Pages
|
|
53
|
+
GIT_USER=<Your GitHub username> pnpm deploy
|
|
54
|
+
# or
|
|
55
|
+
GIT_USER=<Your GitHub username> yarn deploy
|
|
9
56
|
```
|
|
10
57
|
|
|
11
|
-
|
|
58
|
+
## 📁 **Documentation Structure**
|
|
12
59
|
|
|
13
60
|
```
|
|
14
|
-
|
|
61
|
+
docs/
|
|
62
|
+
├── index.md # Welcome page
|
|
63
|
+
├── installation.md # Setup guide
|
|
64
|
+
├── provider-vs-signer.md # Core concepts
|
|
65
|
+
├── guides/ # Tutorials and guides
|
|
66
|
+
│ ├── getting-started-tutorial.md
|
|
67
|
+
│ └── production-deployment.md
|
|
68
|
+
├── signers/ # Wallet integrations
|
|
69
|
+
│ ├── wallet-daemon.md
|
|
70
|
+
│ ├── metamask.md
|
|
71
|
+
│ ├── tari-universe.md
|
|
72
|
+
│ └── wallet-connect.md
|
|
73
|
+
├── wallet/ # Transaction & account management
|
|
74
|
+
│ ├── submit-transaction/
|
|
75
|
+
│ └── template-definition.md
|
|
76
|
+
├── providers/ # Data access
|
|
77
|
+
│ └── indexer-provider.md
|
|
78
|
+
├── api-reference.md # Complete API docs
|
|
79
|
+
├── troubleshooting.md # Common issues
|
|
80
|
+
└── contributing.md # How to contribute
|
|
15
81
|
```
|
|
16
82
|
|
|
17
|
-
|
|
83
|
+
## ✍️ **Contributing to Documentation**
|
|
18
84
|
|
|
19
|
-
|
|
85
|
+
We welcome documentation improvements! Here's how to contribute:
|
|
20
86
|
|
|
87
|
+
### **Making Changes**
|
|
88
|
+
|
|
89
|
+
1. **Fork the repository** and create a feature branch
|
|
90
|
+
2. **Edit documentation files** in the `docs/` directory
|
|
91
|
+
3. **Test locally** using the development server
|
|
92
|
+
4. **Submit a pull request** with your improvements
|
|
93
|
+
|
|
94
|
+
### **Writing Guidelines**
|
|
95
|
+
|
|
96
|
+
- ✅ **Clear, concise language** — Write for developers of all experience levels
|
|
97
|
+
- ✅ **Practical examples** — Include working code snippets
|
|
98
|
+
- ✅ **Cross-references** — Link to related documentation
|
|
99
|
+
- ✅ **Consistent formatting** — Follow existing style patterns
|
|
100
|
+
- ✅ **Test code examples** — Ensure all code works as shown
|
|
101
|
+
|
|
102
|
+
### **Content Types**
|
|
103
|
+
|
|
104
|
+
| Type | Purpose | Location |
|
|
105
|
+
|------|---------|----------|
|
|
106
|
+
| **Tutorials** | Step-by-step learning | `guides/` |
|
|
107
|
+
| **How-to Guides** | Specific task solutions | `wallet/`, `signers/` |
|
|
108
|
+
| **Reference** | Complete API documentation | `api-reference.md` |
|
|
109
|
+
| **Explanation** | Concepts and architecture | `provider-vs-signer.md` |
|
|
110
|
+
|
|
111
|
+
## 🎨 **Customization**
|
|
112
|
+
|
|
113
|
+
### **Docusaurus Configuration**
|
|
114
|
+
|
|
115
|
+
The site is configured via `docusaurus.config.js`:
|
|
116
|
+
|
|
117
|
+
- **Theme settings** — Colors, fonts, layout
|
|
118
|
+
- **Plugin configuration** — Search, analytics, etc.
|
|
119
|
+
- **Navigation structure** — Sidebar and navbar
|
|
120
|
+
- **SEO settings** — Meta tags and social cards
|
|
121
|
+
|
|
122
|
+
### **Styling**
|
|
123
|
+
|
|
124
|
+
Custom styles are in `src/css/custom.css`:
|
|
125
|
+
|
|
126
|
+
```css
|
|
127
|
+
/* Example customization */
|
|
128
|
+
:root {
|
|
129
|
+
--ifm-color-primary: #00d2ff;
|
|
130
|
+
--ifm-color-primary-dark: #00bdee;
|
|
131
|
+
/* ... more custom properties */
|
|
132
|
+
}
|
|
21
133
|
```
|
|
22
|
-
$ yarn build
|
|
23
|
-
```
|
|
24
134
|
|
|
25
|
-
|
|
135
|
+
## 🧪 **Testing**
|
|
136
|
+
|
|
137
|
+
### **Link Checking**
|
|
26
138
|
|
|
27
|
-
|
|
139
|
+
```bash
|
|
140
|
+
# Build and check for broken links manually
|
|
141
|
+
pnpm build
|
|
142
|
+
# Check console output for broken links
|
|
143
|
+
```
|
|
28
144
|
|
|
29
|
-
|
|
145
|
+
### **Build Testing**
|
|
30
146
|
|
|
147
|
+
```bash
|
|
148
|
+
# Test production build
|
|
149
|
+
pnpm build
|
|
150
|
+
pnpm serve
|
|
31
151
|
```
|
|
32
|
-
|
|
152
|
+
|
|
153
|
+
### **Accessibility**
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# Manual accessibility testing recommended
|
|
157
|
+
# Use browser dev tools accessibility tab
|
|
158
|
+
# Test with screen readers
|
|
33
159
|
```
|
|
34
160
|
|
|
35
|
-
|
|
161
|
+
## 📈 **Analytics & SEO**
|
|
162
|
+
|
|
163
|
+
### **Search Optimization**
|
|
164
|
+
|
|
165
|
+
The site includes:
|
|
166
|
+
- ✅ **Algolia DocSearch** for fast site search
|
|
167
|
+
- ✅ **Meta tags** for social sharing
|
|
168
|
+
- ✅ **Structured data** for search engines
|
|
169
|
+
- ✅ **Sitemap generation** for better indexing
|
|
170
|
+
|
|
171
|
+
### **Performance**
|
|
172
|
+
|
|
173
|
+
- ✅ **Static site generation** for fast loading
|
|
174
|
+
- ✅ **Image optimization** for better performance
|
|
175
|
+
- ✅ **Progressive web app** features
|
|
176
|
+
- ✅ **Offline support** for documentation access
|
|
36
177
|
|
|
178
|
+
## 🔧 **Troubleshooting**
|
|
179
|
+
|
|
180
|
+
### **Common Issues**
|
|
181
|
+
|
|
182
|
+
#### **Build Failures**
|
|
183
|
+
```bash
|
|
184
|
+
# Clear cache and rebuild
|
|
185
|
+
rm -rf .docusaurus build
|
|
186
|
+
pnpm install
|
|
187
|
+
pnpm build
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
#### **Port Conflicts**
|
|
191
|
+
```bash
|
|
192
|
+
# Use different port
|
|
193
|
+
pnpm start -- --port 3001
|
|
37
194
|
```
|
|
38
|
-
|
|
195
|
+
|
|
196
|
+
#### **Styling Issues**
|
|
197
|
+
```bash
|
|
198
|
+
# Clear browser cache
|
|
199
|
+
# Check custom.css for conflicts
|
|
200
|
+
# Restart development server
|
|
39
201
|
```
|
|
40
202
|
|
|
41
|
-
|
|
203
|
+
### **Getting Help**
|
|
204
|
+
|
|
205
|
+
- **📖 [Docusaurus Documentation](https://docusaurus.io/docs)**
|
|
206
|
+
- **💬 [tari.js Discussions](https://github.com/tari-project/tari.js/discussions)**
|
|
207
|
+
- **🐛 [Report Issues](https://github.com/tari-project/tari.js/issues)**
|
|
208
|
+
|
|
209
|
+
## 🌟 **Features**
|
|
210
|
+
|
|
211
|
+
This documentation site includes:
|
|
212
|
+
|
|
213
|
+
- **🔍 Instant Search** — Find content quickly with Algolia
|
|
214
|
+
- **🌙 Dark Mode** — Toggle between light and dark themes
|
|
215
|
+
- **📱 Mobile Responsive** — Optimized for all devices
|
|
216
|
+
- **🔗 Social Sharing** — Share documentation easily
|
|
217
|
+
- **📊 Analytics** — Track usage and improve content
|
|
218
|
+
- **♿ Accessibility** — WCAG 2.1 AA compliant
|
|
219
|
+
- **🚀 Fast Loading** — Optimized performance
|
|
220
|
+
- **📧 Edit Suggestions** — Easy contribution workflow
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
**Built with ❤️ using [Docusaurus](https://docusaurus.io/)** | **Hosted on [GitHub Pages](https://pages.github.com/)**
|