zano_web3 6.3.0 → 6.5.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/package.json +1 -1
- package/server/src/server.ts +17 -0
- package/web/src/zanoWallet.ts +2 -0
package/package.json
CHANGED
package/server/src/server.ts
CHANGED
|
@@ -158,6 +158,23 @@ class ServerWallet {
|
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
160
|
|
|
161
|
+
async getAliasByAddress(address: string) {
|
|
162
|
+
try {
|
|
163
|
+
const response = await this.fetchDaemon("get_alias_by_address", address);
|
|
164
|
+
|
|
165
|
+
if (response.data.result) {
|
|
166
|
+
return response.data.result;
|
|
167
|
+
} else {
|
|
168
|
+
throw new ZanoError(
|
|
169
|
+
`Error fetching alias for address ${address}`,
|
|
170
|
+
"ALIAS_FETCH_ERROR"
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
} catch (error) {
|
|
174
|
+
throw new ZanoError("Failed to fetch alias", "ALIAS_FETCH_ERROR");
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
161
178
|
async getBalances() {
|
|
162
179
|
try {
|
|
163
180
|
const response = await this.fetchWallet("getbalance", {});
|