@tari-project/wallet-daemon-signer 0.14.2 → 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.
package/dist/signer.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { TariPermissions } from "@tari-project/tari-permissions";
2
2
  import { TariSigner } from "@tari-project/tari-signer";
3
3
  import { WalletDaemonClient } from "@tari-project/wallet_jrpc_client";
4
- import { AccountData, GetTransactionResultResponse, SubmitTransactionRequest, SubmitTransactionResponse, VaultBalances, TemplateDefinition, Substate, ListSubstatesResponse, ListSubstatesRequest, ListNftsResponse, ListNftsRequest } from "@tari-project/tarijs-types";
5
- import { AccountGetResponse, AccountsListRequest, AccountsListResponse, ConfidentialViewVaultBalanceRequest, WalletGetInfoResponse } from "@tari-project/typescript-bindings";
4
+ import { AccountData, GetTransactionResultResponse, SubmitTransactionRequest, SubmitTransactionResponse, RevealedBalances, TemplateDefinition, Substate, ListSubstatesResponse, ListSubstatesRequest, ListNftsResponse, ListNftsRequest } from "@tari-project/tarijs-types";
5
+ import { AccountGetResponse, AccountsListRequest, AccountsListResponse, ConfidentialViewVaultBalanceRequest, UtxoId, WalletGetInfoResponse } from "@tari-project/typescript-bindings";
6
6
  export declare const WalletDaemonNotConnected = "WALLET_DAEMON_NOT_CONNECTED";
7
7
  export declare const Unsupported = "UNSUPPORTED";
8
8
  export interface WalletDaemonBaseParameters {
@@ -41,7 +41,8 @@ export declare class WalletDaemonTariSigner implements TariSigner {
41
41
  getTransactionResult(transactionId: string): Promise<GetTransactionResultResponse>;
42
42
  getPublicKey(branch: string, index: number): Promise<string>;
43
43
  getTemplateDefinition(template_address: string): Promise<TemplateDefinition>;
44
- getConfidentialVaultBalances({ vault_id, view_key_id, maximum_expected_value, minimum_expected_value, }: ConfidentialViewVaultBalanceRequest): Promise<VaultBalances>;
44
+ getConfidentialVaultBalances({ vault_id, view_key_id, maximum_expected_value, minimum_expected_value, }: ConfidentialViewVaultBalanceRequest): Promise<RevealedBalances>;
45
+ decryptUtxoValue(utxoId: UtxoId, viewKeyId: number, maximum_expected_value?: null, minimum_expected_value?: null): Promise<RevealedBalances>;
45
46
  listSubstates({ filter_by_template, filter_by_type, limit, offset, }: ListSubstatesRequest): Promise<ListSubstatesResponse>;
46
47
  getNftsList(req: ListNftsRequest): Promise<ListNftsResponse>;
47
48
  getWalletInfo(): Promise<WalletGetInfoResponse>;
package/dist/signer.js CHANGED
@@ -170,6 +170,15 @@ export class WalletDaemonTariSigner {
170
170
  });
171
171
  return { balances: res.balances };
172
172
  }
173
+ async decryptUtxoValue(utxoId, viewKeyId, maximum_expected_value = null, minimum_expected_value = null) {
174
+ const res = await this.client.stealthUtxosDecryptValue({
175
+ utxo_id: utxoId,
176
+ view_key_id: viewKeyId,
177
+ minimum_expected_value,
178
+ maximum_expected_value,
179
+ });
180
+ return { balances: res.balances };
181
+ }
173
182
  async listSubstates({ filter_by_template, filter_by_type, limit, offset, }) {
174
183
  const resp = await this.client.substatesList({
175
184
  filter_by_template,
@@ -186,7 +195,11 @@ export class WalletDaemonTariSigner {
186
195
  return { substates };
187
196
  }
188
197
  async getNftsList(req) {
189
- return await this.client.nftsList(req);
198
+ return await this.client.nftsList({
199
+ account: { ComponentAddress: req.accountAddress },
200
+ limit: req.limit || 100,
201
+ offset: req.offset || 0,
202
+ });
190
203
  }
191
204
  async getWalletInfo() {
192
205
  const resp = await this.client.walletGetInfo();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/wallet-daemon-signer",
3
- "version": "0.14.2",
3
+ "version": "0.14.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -10,12 +10,12 @@
10
10
  "author": "The Tari Community",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@tari-project/typescript-bindings": ">=1.17.0",
14
- "@tari-project/wallet_jrpc_client": "^1.7.2",
15
- "@tari-project/tari-signer": "^0.14.2",
16
- "@tari-project/tari-provider": "^0.14.2",
17
- "@tari-project/tari-permissions": "^0.14.2",
18
- "@tari-project/tarijs-types": "^0.14.2"
13
+ "@tari-project/typescript-bindings": ">=1.17.2",
14
+ "@tari-project/wallet_jrpc_client": "^1.9.2",
15
+ "@tari-project/tari-signer": "^0.14.3",
16
+ "@tari-project/tari-permissions": "^0.14.3",
17
+ "@tari-project/tari-provider": "^0.14.3",
18
+ "@tari-project/tarijs-types": "^0.14.3"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/node": "^22.13.1",