@tari-project/tarijs 0.14.1 → 0.14.3

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.
Files changed (33) hide show
  1. package/.github/workflows/check-package-versions.yml +1 -1
  2. package/.github/workflows/ci.yml +1 -1
  3. package/.github/workflows/documentation-deploy.yml +1 -1
  4. package/.github/workflows/documentation-test-deploy.yml +1 -1
  5. package/.github/workflows/lint.yml +1 -1
  6. package/.github/workflows/npm_publish.yml +1 -1
  7. package/.prototools +2 -2
  8. package/README.md +115 -15
  9. package/docusaurus/tari-docs/package.json +1 -1
  10. package/package.json +2 -2
  11. package/packages/builders/package.json +1 -1
  12. package/packages/indexer_provider/package.json +1 -1
  13. package/packages/metamask_signer/package.json +1 -1
  14. package/packages/metamask_signer/src/index.ts +0 -18
  15. package/packages/permissions/package.json +1 -1
  16. package/packages/react-mui-connect-button/package.json +1 -1
  17. package/packages/tari_provider/package.json +1 -1
  18. package/packages/tari_provider/src/TariProvider.ts +4 -1
  19. package/packages/tari_signer/package.json +1 -1
  20. package/packages/tari_signer/src/TariSigner.ts +1 -3
  21. package/packages/tari_universe/package.json +1 -1
  22. package/packages/tari_universe/src/signer.ts +2 -2
  23. package/packages/tarijs/package.json +1 -1
  24. package/packages/tarijs/src/index.ts +1 -1
  25. package/packages/tarijs_types/package.json +1 -1
  26. package/packages/tarijs_types/src/ConfidentialOutput.ts +2 -2
  27. package/packages/tarijs_types/src/index.ts +1 -1
  28. package/packages/tarijs_types/src/signer.ts +4 -2
  29. package/packages/wallet_daemon/package.json +1 -1
  30. package/packages/wallet_daemon/src/signer.ts +27 -9
  31. package/packages/walletconnect/package.json +1 -1
  32. package/packages/walletconnect/src/index.ts +3 -3
  33. package/pnpm-workspace.yaml +2 -2
@@ -16,7 +16,7 @@ jobs:
16
16
  runs-on: ubuntu-latest
17
17
 
18
18
  steps:
19
- - uses: actions/checkout@v4
19
+ - uses: actions/checkout@v5
20
20
 
21
21
  - name: Check package.json versions
22
22
  run: ./scripts/check_versions.sh
@@ -17,7 +17,7 @@ jobs:
17
17
  build:
18
18
  runs-on: ubuntu-latest
19
19
  steps:
20
- - uses: actions/checkout@v4
20
+ - uses: actions/checkout@v5
21
21
  - uses: 'moonrepo/setup-toolchain@v0'
22
22
  with:
23
23
  auto-install: true
@@ -10,7 +10,7 @@ jobs:
10
10
  name: Build Docusaurus
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v4
13
+ - uses: actions/checkout@v5
14
14
  with:
15
15
  fetch-depth: 0
16
16
  - uses: 'moonrepo/setup-toolchain@v0'
@@ -10,7 +10,7 @@ jobs:
10
10
  name: Test documentation deployment
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v4
13
+ - uses: actions/checkout@v5
14
14
  with:
15
15
  fetch-depth: 0
16
16
  - uses: 'moonrepo/setup-toolchain@v0'
@@ -9,7 +9,7 @@ jobs:
9
9
  name: Run linters
10
10
  runs-on: ubuntu-latest
11
11
  steps:
12
- - uses: actions/checkout@v4
12
+ - uses: actions/checkout@v5
13
13
  with:
14
14
  fetch-depth: 0
15
15
  - uses: "moonrepo/setup-toolchain@v0"
@@ -11,7 +11,7 @@ jobs:
11
11
  publish:
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
- - uses: actions/checkout@v4
14
+ - uses: actions/checkout@v5
15
15
  - uses: 'moonrepo/setup-toolchain@v0'
16
16
  with:
17
17
  auto-install: true
package/.prototools CHANGED
@@ -1,4 +1,4 @@
1
- moon = "1.40.4"
1
+ moon = "1.40.5"
2
2
  node = "22.19.0"
3
3
  pnpm = "10.17"
4
4
 
@@ -6,4 +6,4 @@ pnpm = "10.17"
6
6
  moon = "https://raw.githubusercontent.com/moonrepo/moon/master/proto-plugin.toml"
7
7
 
8
8
  [settings]
9
- auto-install = true
9
+ auto-install = true
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 @tari-project/wallet-daemon-signer
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
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tari-docs",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "docusaurus": "docusaurus",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tarijs",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
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.1"
22
+ "@tari-project/tarijs-types": "^0.14.3"
23
23
  },
24
24
  "scripts": {
25
25
  "docs": "typedoc",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tarijs-builders",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/indexer-provider",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/metamask-signer",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -4,7 +4,6 @@ import {
4
4
  SubmitTransactionRequest,
5
5
  TransactionStatus,
6
6
  SubmitTransactionResponse,
7
- VaultBalances,
8
7
  TemplateDefinition,
9
8
  Substate,
10
9
  ListSubstatesResponse,
@@ -18,7 +17,6 @@ import {
18
17
  AccountGetResponse,
19
18
  AccountsListRequest,
20
19
  AccountsListResponse,
21
- ConfidentialViewVaultBalanceRequest,
22
20
  WalletGetInfoResponse,
23
21
  } from "@tari-project/typescript-bindings";
24
22
 
@@ -163,22 +161,6 @@ export class MetamaskTariSigner implements TariSigner {
163
161
  return resp.public_key;
164
162
  }
165
163
 
166
- public async getConfidentialVaultBalances({
167
- vault_id,
168
- maximum_expected_value,
169
- minimum_expected_value,
170
- view_key_id,
171
- }: ConfidentialViewVaultBalanceRequest): Promise<VaultBalances> {
172
- const resp = await this.metamaskRequest("getConfidentialVaultBalances", {
173
- view_key_id,
174
- vault_id,
175
- minimum_expected_value,
176
- maximum_expected_value,
177
- });
178
-
179
- return { balances: resp as Map<string, number | null> };
180
- }
181
-
182
164
  getTemplateDefinition(template_address: string): Promise<TemplateDefinition> {
183
165
  return this.metamaskRequest("getTemplateDefinition", { template_address }).then((resp) => {
184
166
  if (!resp) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tari-permissions",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/react-mui-connect-button",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "React component to connect your website to the Tari Ootle Wallet",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tari-provider",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,4 +1,7 @@
1
- import type { GetTemplateDefinitionResponse, ListTemplatesResponse } from "@tari-project/typescript-bindings";
1
+ import type {
2
+ GetTemplateDefinitionResponse,
3
+ ListTemplatesResponse,
4
+ } from "@tari-project/typescript-bindings";
2
5
  import {
3
6
  GetTransactionResultResponse,
4
7
  Substate,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tari-signer",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -2,7 +2,6 @@ import type {
2
2
  AccountGetResponse,
3
3
  AccountsListRequest,
4
4
  AccountsListResponse,
5
- ConfidentialViewVaultBalanceRequest,
6
5
  WalletGetInfoResponse,
7
6
  } from "@tari-project/typescript-bindings";
8
7
  import {
@@ -10,7 +9,6 @@ import {
10
9
  AccountData,
11
10
  SubmitTransactionRequest,
12
11
  SubmitTransactionResponse,
13
- VaultBalances,
14
12
  TemplateDefinition,
15
13
  Substate,
16
14
  ListSubstatesResponse,
@@ -22,6 +20,7 @@ import {
22
20
  export interface TariSigner {
23
21
  signerName: string;
24
22
  isConnected(): boolean;
23
+ // TODO: this should have signTransaction(UnsignedTransaction, keyId) and remove the rest of these
25
24
  accountsList(req: AccountsListRequest): Promise<AccountsListResponse>;
26
25
  getAccount(): Promise<AccountData>;
27
26
  getAccountByAddress(address: string): Promise<AccountGetResponse>;
@@ -30,7 +29,6 @@ export interface TariSigner {
30
29
  getTransactionResult(transactionId: string): Promise<GetTransactionResultResponse>;
31
30
  getTemplateDefinition(template_address: string): Promise<TemplateDefinition>;
32
31
  getPublicKey(branch: string, index: number): Promise<string>;
33
- getConfidentialVaultBalances(req: ConfidentialViewVaultBalanceRequest): Promise<VaultBalances>;
34
32
  listSubstates(req: ListSubstatesRequest): Promise<ListSubstatesResponse>;
35
33
  getNftsList(req: ListNftsRequest): Promise<ListNftsResponse>;
36
34
  getWalletInfo(): Promise<WalletGetInfoResponse>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tari-universe-signer",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -3,7 +3,7 @@ import {
3
3
  AccountData,
4
4
  Substate,
5
5
  TemplateDefinition,
6
- VaultBalances,
6
+ RevealedBalances,
7
7
  ListSubstatesResponse,
8
8
  SubmitTransactionRequest,
9
9
  ListSubstatesRequest,
@@ -73,7 +73,7 @@ export class TariUniverseSigner implements TariSigner {
73
73
  maximum_expected_value,
74
74
  minimum_expected_value,
75
75
  view_key_id,
76
- }: ConfidentialViewVaultBalanceRequest): Promise<VaultBalances> {
76
+ }: ConfidentialViewVaultBalanceRequest): Promise<RevealedBalances> {
77
77
  return this.sendRequest({
78
78
  methodName: "getConfidentialVaultBalances",
79
79
  args: [{ view_key_id, vault_id, minimum_expected_value, maximum_expected_value }],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tarijs-all",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -29,7 +29,7 @@ export {
29
29
  GetTransactionResultResponse,
30
30
  AccountData,
31
31
  SubmitTransactionRequest,
32
- VaultBalances,
32
+ RevealedBalances,
33
33
  VaultData,
34
34
  TemplateDefinition,
35
35
  Substate,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tarijs-types",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,9 +1,9 @@
1
- import { CompressedElgamalVerifiableBalance } from "@tari-project/typescript-bindings";
1
+ import { ElgamalVerifiableBalanceBytes } from "@tari-project/typescript-bindings";
2
2
 
3
3
  export interface ConfidentialOutput {
4
4
  commitment: string;
5
5
  stealthPublicNonce: string;
6
6
  encrypted_data: Array<number>;
7
7
  minimumValuePromise: number;
8
- viewableBalance?: CompressedElgamalVerifiableBalance;
8
+ viewableBalance?: ElgamalVerifiableBalanceBytes;
9
9
  }
@@ -33,7 +33,7 @@ export {
33
33
  Substate,
34
34
  SubstateMetadata,
35
35
  TemplateDefinition,
36
- VaultBalances,
36
+ RevealedBalances,
37
37
  VaultData,
38
38
  } from "./signer";
39
39
 
@@ -35,15 +35,17 @@ export interface AccountData {
35
35
  export interface VaultData {
36
36
  type: string;
37
37
  balance: number;
38
+ confidential_balance: number;
38
39
  resource_address: string;
39
40
  token_symbol: string;
40
41
  vault_id: string;
41
42
  }
42
43
 
43
- export interface VaultBalances {
44
- balances: Map<string, number | null>;
44
+ export interface RevealedBalances {
45
+ balances: Map<string, bigint | null>;
45
46
  }
46
47
 
48
+
47
49
  export type TemplateDefinition = TemplateDef;
48
50
 
49
51
  export interface Substate {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/wallet-daemon-signer",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -9,7 +9,7 @@ import {
9
9
  GetTransactionResultResponse,
10
10
  SubmitTransactionRequest,
11
11
  SubmitTransactionResponse,
12
- VaultBalances,
12
+ RevealedBalances,
13
13
  TemplateDefinition,
14
14
  Substate,
15
15
  ListSubstatesResponse,
@@ -24,7 +24,7 @@ import {
24
24
  ConfidentialViewVaultBalanceRequest,
25
25
  KeyBranch,
26
26
  substateIdToString,
27
- SubstatesListRequest,
27
+ SubstatesListRequest, UtxoId,
28
28
  WalletGetInfoResponse,
29
29
  } from "@tari-project/typescript-bindings";
30
30
 
@@ -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 + b.confidential_balance,
162
- vault_id:
163
- typeof b.vault_address === "object" && "Vault" in b.vault_address ? b.vault_address.Vault : b.vault_address,
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
  };
@@ -236,14 +235,29 @@ export class WalletDaemonTariSigner implements TariSigner {
236
235
  view_key_id,
237
236
  maximum_expected_value = null,
238
237
  minimum_expected_value = null,
239
- }: ConfidentialViewVaultBalanceRequest): Promise<VaultBalances> {
238
+ }: ConfidentialViewVaultBalanceRequest): Promise<RevealedBalances> {
240
239
  const res = await this.client.viewVaultBalance({
241
240
  view_key_id,
242
241
  vault_id,
243
242
  minimum_expected_value,
244
243
  maximum_expected_value,
245
244
  });
246
- return { balances: res.balances as unknown as Map<string, number | null> };
245
+ return { balances: res.balances as unknown as Map<string, bigint | null> };
246
+ }
247
+ public async decryptUtxoValue(
248
+ utxoId: UtxoId,
249
+ viewKeyId: number,
250
+ maximum_expected_value = null,
251
+ minimum_expected_value = null,
252
+ ): Promise<RevealedBalances> {
253
+ const res = await this.client.stealthUtxosDecryptValue({
254
+ utxo_id: utxoId,
255
+ view_key_id: viewKeyId,
256
+ minimum_expected_value,
257
+ maximum_expected_value,
258
+ });
259
+
260
+ return { balances: res.balances as unknown as Map<string, bigint | null> };
247
261
  }
248
262
 
249
263
  public async listSubstates({
@@ -270,7 +284,11 @@ export class WalletDaemonTariSigner implements TariSigner {
270
284
  }
271
285
 
272
286
  public async getNftsList(req: ListNftsRequest): Promise<ListNftsResponse> {
273
- return await this.client.nftsList(req);
287
+ return await this.client.nftsList({
288
+ account: {ComponentAddress: req.accountAddress},
289
+ limit: req.limit || 100,
290
+ offset: req.offset || 0,
291
+ });
274
292
  }
275
293
 
276
294
  public async getWalletInfo(): Promise<WalletGetInfoResponse> {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/wallet-connect-signer",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -6,7 +6,7 @@ import {
6
6
  convertStringToTransactionStatus,
7
7
  GetTransactionResultResponse,
8
8
  SubmitTransactionRequest,
9
- VaultBalances,
9
+ RevealedBalances,
10
10
  TemplateDefinition,
11
11
  Substate,
12
12
  AccountData,
@@ -290,7 +290,7 @@ export class WalletConnectTariSigner implements TariSigner {
290
290
  view_key_id,
291
291
  maximum_expected_value = null,
292
292
  minimum_expected_value = null,
293
- }: ConfidentialViewVaultBalanceRequest): Promise<VaultBalances> {
293
+ }: ConfidentialViewVaultBalanceRequest): Promise<RevealedBalances> {
294
294
  const method = "tari_viewConfidentialVaultBalance";
295
295
  const params = {
296
296
  view_key_id,
@@ -300,7 +300,7 @@ export class WalletConnectTariSigner implements TariSigner {
300
300
  };
301
301
 
302
302
  const res = await this.sendRequest(method, params);
303
- return { balances: res.balances as unknown as Map<string, number | null> };
303
+ return { balances: res.balances as unknown as Map<string, bigint | null> };
304
304
  }
305
305
 
306
306
  public async getNftsList(req: ListNftsRequest): Promise<ListNftsResponse> {
@@ -10,8 +10,8 @@ catalog:
10
10
  vitest: ^3.0.4
11
11
  vite: ^6.1.0
12
12
  "@types/node": ^22.13.1
13
- "@tari-project/typescript-bindings": ">=1.17.0"
14
- "@tari-project/wallet_jrpc_client": ^1.7.2
13
+ "@tari-project/typescript-bindings": ">=1.17.2"
14
+ "@tari-project/wallet_jrpc_client": ^1.9.2
15
15
  "@metamask/providers": ^18.2.0
16
16
  "@walletconnect/universal-provider": 2.21.3
17
17
  "@reown/appkit": "1.7.15"