@tari-project/wallet-daemon-signer 0.12.2 → 0.13.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/dist/signer.d.ts CHANGED
@@ -2,7 +2,7 @@ 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
4
  import { AccountData, GetTransactionResultResponse, SubmitTransactionRequest, SubmitTransactionResponse, VaultBalances, TemplateDefinition, Substate, ListSubstatesResponse, ListSubstatesRequest } from "@tari-project/tarijs-types";
5
- import { ConfidentialViewVaultBalanceRequest, ListAccountNftRequest, ListAccountNftResponse } from "@tari-project/typescript-bindings";
5
+ import { AccountGetResponse, AccountsListRequest, AccountsListResponse, ConfidentialViewVaultBalanceRequest, ListAccountNftRequest, ListAccountNftResponse, 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 {
@@ -32,7 +32,9 @@ export declare class WalletDaemonTariSigner implements TariSigner {
32
32
  get tokenUrl(): string | undefined;
33
33
  isConnected(): boolean;
34
34
  createFreeTestCoins(): Promise<AccountData>;
35
+ accountsList(req: AccountsListRequest): Promise<AccountsListResponse>;
35
36
  getAccount(): Promise<AccountData>;
37
+ getAccountByAddress(address: string): Promise<AccountGetResponse>;
36
38
  getAccountBalances(componentAddress: string): Promise<unknown>;
37
39
  getSubstate(substateId: string): Promise<Substate>;
38
40
  submitTransaction(req: SubmitTransactionRequest): Promise<SubmitTransactionResponse>;
@@ -42,4 +44,5 @@ export declare class WalletDaemonTariSigner implements TariSigner {
42
44
  getConfidentialVaultBalances({ vault_id, view_key_id, maximum_expected_value, minimum_expected_value, }: ConfidentialViewVaultBalanceRequest): Promise<VaultBalances>;
43
45
  listSubstates({ filter_by_template, filter_by_type, limit, offset, }: ListSubstatesRequest): Promise<ListSubstatesResponse>;
44
46
  getNftsList(req: ListAccountNftRequest): Promise<ListAccountNftResponse>;
47
+ getWalletInfo(): Promise<WalletGetInfoResponse>;
45
48
  }
package/dist/signer.js CHANGED
@@ -81,6 +81,10 @@ export class WalletDaemonTariSigner {
81
81
  vaults: [],
82
82
  };
83
83
  }
84
+ async accountsList(req) {
85
+ const resp = await this.client.accountsList(req);
86
+ return resp;
87
+ }
84
88
  async getAccount() {
85
89
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
86
90
  const { account, public_key } = (await this.client.accountsGetDefault({}));
@@ -103,6 +107,14 @@ export class WalletDaemonTariSigner {
103
107
  })),
104
108
  };
105
109
  }
110
+ async getAccountByAddress(address) {
111
+ const resp = await this.client.accountsGet({
112
+ name_or_address: {
113
+ ComponentAddress: address,
114
+ },
115
+ });
116
+ return resp;
117
+ }
106
118
  async getAccountBalances(componentAddress) {
107
119
  return await this.client.accountsGetBalances({ account: { ComponentAddress: componentAddress }, refresh: true });
108
120
  }
@@ -177,4 +189,8 @@ export class WalletDaemonTariSigner {
177
189
  async getNftsList(req) {
178
190
  return await this.client.nftsList(req);
179
191
  }
192
+ async getWalletInfo() {
193
+ const resp = await this.client.walletGetInfo();
194
+ return resp;
195
+ }
180
196
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/wallet-daemon-signer",
3
- "version": "0.12.2",
3
+ "version": "0.13.0",
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.14.0",
13
+ "@tari-project/typescript-bindings": ">=1.15.0",
14
14
  "@tari-project/wallet_jrpc_client": "^1.7.2",
15
- "@tari-project/tari-permissions": "^0.12.2",
16
- "@tari-project/tari-provider": "^0.12.2",
17
- "@tari-project/tarijs-types": "^0.12.2",
18
- "@tari-project/tari-signer": "^0.12.2"
15
+ "@tari-project/tari-permissions": "^0.13.0",
16
+ "@tari-project/tari-provider": "^0.13.0",
17
+ "@tari-project/tari-signer": "^0.13.0",
18
+ "@tari-project/tarijs-types": "^0.13.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/node": "^22.13.1",