@mentaproject/client 0.1.28 → 0.1.29

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.
@@ -8,6 +8,7 @@ import { ContractManager } from "../managers/ContractManager";
8
8
  import { AccountManager } from "../managers/AccountManager";
9
9
  import { PersistenceManager } from "../managers/PersistenceManager";
10
10
  import { ClientEvents, GetListenerCallback, MentaClientConfig } from "../types/MentaClient";
11
+ import { Account } from "./Account";
11
12
  /**
12
13
  * The main client for interacting with the Menta API.
13
14
  * It provides managers for blocks, transactions, contracts, and accounts.
@@ -44,6 +45,7 @@ export declare class MentaClient {
44
45
  * @description Provides methods to manage and interact with blockchain accounts.
45
46
  */
46
47
  accounts: AccountManager;
48
+ account: Account;
47
49
  /**
48
50
  * Subscribes to a specific client event.
49
51
  * @template TEvent The type of the event to listen for.
@@ -88,6 +88,7 @@ export class MentaClient {
88
88
  else {
89
89
  this.accounts = new AccountManager(this);
90
90
  }
91
+ this.account = this.accounts.get(this.rpc.account.address);
91
92
  }
92
93
  async init() {
93
94
  let coreClient = createClient(this.params);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mentaproject/client",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "High level EVM library used into the Menta App to facilitate Blockchain interactions. ",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -16,6 +16,7 @@ import {
16
16
  } from "../types/MentaClient";
17
17
  import { withCache } from "../utils/withCache";
18
18
  import { createClient } from "@mentaproject/core";
19
+ import { Account } from "./Account";
19
20
 
20
21
  /**
21
22
  * The main client for interacting with the Menta API.
@@ -59,6 +60,8 @@ export class MentaClient {
59
60
  */
60
61
  public accounts!: AccountManager;
61
62
 
63
+ public account: Account;
64
+
62
65
  /**
63
66
  * Subscribes to a specific client event.
64
67
  * @template TEvent The type of the event to listen for.
@@ -128,6 +131,8 @@ export class MentaClient {
128
131
  } else {
129
132
  this.accounts = new AccountManager(this);
130
133
  }
134
+
135
+ this.account = this.accounts.get(this.rpc.account.address);
131
136
  }
132
137
 
133
138
  async init() {