@tari-project/tarijs 0.14.1 → 0.14.2
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 +115 -15
- package/docusaurus/tari-docs/package.json +1 -1
- package/package.json +2 -2
- package/packages/builders/package.json +1 -1
- package/packages/indexer_provider/package.json +1 -1
- package/packages/metamask_signer/package.json +1 -1
- package/packages/permissions/package.json +1 -1
- package/packages/react-mui-connect-button/package.json +1 -1
- package/packages/tari_provider/package.json +1 -1
- package/packages/tari_signer/package.json +1 -1
- package/packages/tari_universe/package.json +1 -1
- package/packages/tarijs/package.json +1 -1
- package/packages/tarijs_types/package.json +1 -1
- package/packages/tarijs_types/src/signer.ts +1 -0
- package/packages/wallet_daemon/package.json +1 -1
- package/packages/wallet_daemon/src/signer.ts +3 -4
- package/packages/walletconnect/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,17 +12,117 @@
|
|
|
12
12
|
- **📱 Developer Friendly** — Full TypeScript support, intuitive APIs, comprehensive docs
|
|
13
13
|
- **⚡ Production Ready** — Battle-tested, optimized, and actively maintained
|
|
14
14
|
|
|
15
|
+
## Installing Tari.js
|
|
16
|
+
|
|
17
|
+
Tari.js provides the following packages:
|
|
18
|
+
|
|
19
|
+
| Package Name | Description |
|
|
20
|
+
|----------------------------------------|------------------------------------------------------------|
|
|
21
|
+
| @tari-project/tarijs-all | Everything: core, signers, providers, builders, permissions|
|
|
22
|
+
| @tari-project/tarijs | Core Tari.js types and helpers |
|
|
23
|
+
| @tari-project/tarijs-builders | Transaction builder (fluent API) |
|
|
24
|
+
| @tari-project/indexer-provider | Read-only blockchain provider |
|
|
25
|
+
| @tari-project/wallet-daemon-signer | Wallet Daemon signer & provider |
|
|
26
|
+
| @tari-project/metamask-signer | MetaMask signer |
|
|
27
|
+
| @tari-project/tari-universe-signer | Tari Universe wallet signer |
|
|
28
|
+
| @tari-project/wallet-connect-signer | WalletConnect signer |
|
|
29
|
+
| @tari-project/tari-permissions | Permissions utility |
|
|
30
|
+
| @tari-project/typescript-bindings | TypeScript type definitions and low-level structures |
|
|
31
|
+
| @tari-project/tarijs-types | Re-exports typescript-bindings while adding tari.js specific types |
|
|
32
|
+
|
|
33
|
+
### Recommended: Use the Main Package
|
|
34
|
+
|
|
35
|
+
This installs everything (providers, signers, core modules, builders, types and permissions) with one package:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
npm install @tari-project/tarijs
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
You can then import any of the required packages in your application:
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import {
|
|
45
|
+
IndexerProvider,
|
|
46
|
+
WalletDaemonTariSigner,
|
|
47
|
+
TariUniverseSigner,
|
|
48
|
+
WalletConnectTariSigner,
|
|
49
|
+
TransactionBuilder,
|
|
50
|
+
TariPermissions,
|
|
51
|
+
} from "@tari-project/tarijs";
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
If you are interested in development on the bleeding edge, you can install the following:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
npm install @tari-project/tarijs-all
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This will install ALL tari.js modules. Some of these may be under active development, experimental or not properly documented.
|
|
61
|
+
|
|
62
|
+
### Optional: Install only the modules you require
|
|
63
|
+
|
|
64
|
+
If you require a minimal or custom setup, you can install the packages individually. This is not recommended unless you have a firm understanding of the purpose and function of the different packages.
|
|
65
|
+
|
|
66
|
+
Example of dependencies if you just wish to query Ootle states on the chain:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
npm install @tari-project/indexer-provider
|
|
70
|
+
npm install @tari-project/wallet-daemon-signer # Only if you need wallet data models/types
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### Core Packages
|
|
74
|
+
|
|
75
|
+
- **@tari-project/tarijs-builders**
|
|
76
|
+
```sh
|
|
77
|
+
npm install @tari-project/tarijs-builders
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
#### Providers
|
|
81
|
+
- **@tari-project/indexer-provider**
|
|
82
|
+
```sh
|
|
83
|
+
npm install @tari-project/indexer-provider
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
- **@tari-project/wallet-daemon-signer**
|
|
87
|
+
```sh
|
|
88
|
+
npm install @tari-project/wallet-daemon-signer
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
#### Signers
|
|
92
|
+
- **@tari-project/metamask-signer**
|
|
93
|
+
```sh
|
|
94
|
+
npm install @tari-project/metamask-signer
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- **@tari-project/tari-universe-signer**
|
|
98
|
+
```sh
|
|
99
|
+
npm install @tari-project/tari-universe-signer
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
- **@tari-project/wallet-connect-signer**
|
|
103
|
+
```sh
|
|
104
|
+
npm install @tari-project/wallet-connect-signer
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Helpers
|
|
108
|
+
|
|
109
|
+
- **@tari-project/tari-permissions**
|
|
110
|
+
```sh
|
|
111
|
+
npm install @tari-project/tari-permissions
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
|
|
15
115
|
## 🎯 Quick Start (5 minutes)
|
|
16
116
|
|
|
17
117
|
Get your first Tari app running in minutes:
|
|
18
118
|
|
|
19
119
|
```bash
|
|
20
120
|
# Install tari.js
|
|
21
|
-
npm install @tari-project/tarijs
|
|
121
|
+
npm install @tari-project/tarijs-all
|
|
22
122
|
|
|
23
123
|
# Run your first connection test
|
|
24
124
|
node -e "
|
|
25
|
-
import { WalletDaemonTariSigner, TariPermissions } from '@tari-project/tarijs';
|
|
125
|
+
import { WalletDaemonTariSigner, TariPermissions } from '@tari-project/tarijs-all';
|
|
26
126
|
const wallet = await WalletDaemonTariSigner.buildFetchSigner({
|
|
27
127
|
serverUrl: 'http://localhost:18103',
|
|
28
128
|
permissions: new TariPermissions()
|
|
@@ -31,7 +131,7 @@ console.log('Connected to Tari!');
|
|
|
31
131
|
"
|
|
32
132
|
```
|
|
33
133
|
|
|
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)**
|
|
134
|
+
**👉 [Complete Installation Guide](https://tari-project.github.io/tari.js/docs/installation) | [5-Minute Tutorial](https://tari-project.github.io/tari.js/docs/guides/getting-started-tutorial)**
|
|
35
135
|
|
|
36
136
|
## 🏗️ What You Can Build
|
|
37
137
|
|
|
@@ -73,26 +173,26 @@ const transaction = new TransactionBuilder()
|
|
|
73
173
|
|
|
74
174
|
| Wallet | Best For | Status |
|
|
75
175
|
|--------|----------|--------|
|
|
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 |
|
|
176
|
+
| **🖥️ [Tari Wallet Daemon](https://tari-project.github.io/tari.js/docs/signers/wallet-daemon)** | Servers, advanced features | ✅ Production |
|
|
177
|
+
| **🦊 [MetaMask](https://tari-project.github.io/tari.js/docs/signers/metamask)** | Browser apps, familiar UX | ✅ Production |
|
|
178
|
+
| **🌌 [Tari Universe](https://tari-project.github.io/tari.js/docs/signers/tari-universe)** | Mobile, native experience | ✅ Production |
|
|
179
|
+
| **📱 [WalletConnect](https://tari-project.github.io/tari.js/docs/signers/wallet-connect)** | Cross-platform, mobile-first | ✅ Production |
|
|
80
180
|
|
|
81
181
|
## 📚 Documentation Hub
|
|
82
182
|
|
|
83
183
|
### 🚀 **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
|
|
184
|
+
- **[Installation Guide](https://tari-project.github.io/tari.js/docs/installation)** — Set up your development environment
|
|
185
|
+
- **[First App Tutorial](https://tari-project.github.io/tari.js/docs/guides/getting-started-tutorial)** — Build a working wallet app
|
|
186
|
+
- **[Provider vs Signer](https://tari-project.github.io/tari.js/docs/provider-vs-signer)** — Understand the core concepts
|
|
87
187
|
|
|
88
188
|
### 📖 **Guides & Examples**
|
|
89
189
|
- **[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
|
|
190
|
+
- **[Transaction Building](https://tari-project.github.io/tari.js/docs/wallet/submit-transaction/transaction-builder/)** — Create complex transactions
|
|
191
|
+
- **[Production Deployment](https://tari-project.github.io/tari.js/docs/guides/production-deployment)** — Go live with confidence
|
|
92
192
|
|
|
93
193
|
### 🔧 **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
|
|
194
|
+
- **[Complete API Reference](https://tari-project.github.io/tari.js/docs/api-reference)** — Every method documented
|
|
195
|
+
- **[Troubleshooting](https://tari-project.github.io/tari.js/docs/troubleshooting)** — Common issues & solutions
|
|
96
196
|
- **[Templates & Examples](https://github.com/tari-project/tari.js/tree/main/examples)** — Copy-paste code snippets
|
|
97
197
|
|
|
98
198
|
---
|
|
@@ -139,7 +239,7 @@ docker cp tarijs-build:/app/combined_dist/ ./dist
|
|
|
139
239
|
moon tari-docs:start # http://localhost:3000/tari.js/
|
|
140
240
|
```
|
|
141
241
|
|
|
142
|
-
**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).
|
|
242
|
+
**Need help getting started?** Check our **[Contributing Guide](https://tari-project.github.io/tari.js/docs/contributing)** or ask in [GitHub Discussions](https://github.com/tari-project/tari.js/discussions).
|
|
143
243
|
|
|
144
244
|
## 🤝 Community & Support
|
|
145
245
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tari-project/tarijs",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [],
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"typescript-eslint": "^8.35.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@tari-project/tarijs-types": "^0.14.
|
|
22
|
+
"@tari-project/tarijs-types": "^0.14.2"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"docs": "typedoc",
|
|
@@ -154,13 +154,12 @@ export class WalletDaemonTariSigner implements TariSigner {
|
|
|
154
154
|
account_id: account.key_index,
|
|
155
155
|
component_address: account.component_address,
|
|
156
156
|
wallet_address: address,
|
|
157
|
-
// TODO: should be vaults not resources
|
|
158
157
|
vaults: balances.map((b: any) => ({
|
|
159
158
|
type: b.resource_type,
|
|
160
159
|
resource_address: b.resource_address,
|
|
161
|
-
balance: b.balance
|
|
162
|
-
|
|
163
|
-
|
|
160
|
+
balance: b.balance,
|
|
161
|
+
confidential_balance: b.confidential_balance,
|
|
162
|
+
vault_id: b.vault_address,
|
|
164
163
|
token_symbol: b.token_symbol,
|
|
165
164
|
})),
|
|
166
165
|
};
|