@sonarwatch/portfolio-plugins 0.12.23 → 0.12.25
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +8 -0
- package/package.json +2 -2
- package/src/utils/aptos/getAccountResources.d.ts +1 -1
- package/src/utils/aptos/getCoinStoreResources.d.ts +1 -1
- package/src/utils/aptos/getView.d.ts +1 -1
- package/src/utils/name-service/services/aptos.js +9 -8
- package/src/utils/name-service/services/aptos.js.map +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.12.25](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.24...plugins-0.12.25) (2024-06-13)
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
## [0.12.24](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.23...plugins-0.12.24) (2024-06-13)
|
10
|
+
|
11
|
+
|
12
|
+
|
5
13
|
## [0.12.23](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.22...plugins-0.12.23) (2024-06-10)
|
6
14
|
|
7
15
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sonarwatch/portfolio-plugins",
|
3
|
-
"version": "0.12.
|
3
|
+
"version": "0.12.25",
|
4
4
|
"type": "commonjs",
|
5
5
|
"types": "./src/index.d.ts",
|
6
6
|
"peerDependencies": {
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"dependencies": {
|
10
10
|
"@aave/contract-helpers": "^1.28.2",
|
11
11
|
"@aave/math-utils": "^1.28.2",
|
12
|
-
"@aptos-labs/ts-sdk": "^1.
|
12
|
+
"@aptos-labs/ts-sdk": "^1.19.0",
|
13
13
|
"@bonfida/spl-name-service": "^1.0.10",
|
14
14
|
"@cosmjs/cosmwasm-stargate": "^0.31.1",
|
15
15
|
"ethers": "^5.7.2",
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { AptosClient } from '../clients/types';
|
2
|
-
export declare function getAccountResources(client: AptosClient, accountAddress: string): Promise<import("@aptos-labs/ts-sdk/dist/common/accountAddress-
|
2
|
+
export declare function getAccountResources(client: AptosClient, accountAddress: string): Promise<import("@aptos-labs/ts-sdk/dist/common/accountAddress-Lv-GSihU").w[] | null>;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { AptosClient } from '../clients/types';
|
2
|
-
export declare function getCoinStoreResources(client: AptosClient, owner: string): Promise<import("@aptos-labs/ts-sdk/dist/common/accountAddress-
|
2
|
+
export declare function getCoinStoreResources(client: AptosClient, owner: string): Promise<import("@aptos-labs/ts-sdk/dist/common/accountAddress-Lv-GSihU").w[] | null>;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { InputViewFunctionData } from '@aptos-labs/ts-sdk';
|
2
2
|
import { AptosClient } from '../clients/types';
|
3
|
-
export declare function getView(client: AptosClient, payload: InputViewFunctionData): Promise<import("@aptos-labs/ts-sdk/dist/common/accountAddress-
|
3
|
+
export declare function getView(client: AptosClient, payload: InputViewFunctionData): Promise<import("@aptos-labs/ts-sdk/dist/common/accountAddress-Lv-GSihU").a7[] | null>;
|
@@ -11,22 +11,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
exports.nameService = void 0;
|
13
13
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
14
|
+
const clients_1 = require("../../clients");
|
14
15
|
function getOwner(name) {
|
15
16
|
return __awaiter(this, void 0, void 0, function* () {
|
16
|
-
const
|
17
|
-
|
18
|
-
if (!address)
|
17
|
+
const res = yield (0, clients_1.getClientAptos)().getName({ name });
|
18
|
+
if (!(res === null || res === void 0 ? void 0 : res.owner_address))
|
19
19
|
return null;
|
20
|
-
return
|
20
|
+
return res.owner_address;
|
21
21
|
});
|
22
22
|
}
|
23
23
|
function getNames(address) {
|
24
24
|
return __awaiter(this, void 0, void 0, function* () {
|
25
|
-
const
|
26
|
-
|
27
|
-
|
25
|
+
const res = yield (0, clients_1.getClientAptos)().getAccountNames({
|
26
|
+
accountAddress: address,
|
27
|
+
});
|
28
|
+
if (res.length === 0)
|
28
29
|
return [];
|
29
|
-
return
|
30
|
+
return res.map((el) => (el.domain ? `${el.domain}.apt` : [])).flat();
|
30
31
|
});
|
31
32
|
}
|
32
33
|
exports.nameService = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"aptos.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/name-service/services/aptos.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA8D;
|
1
|
+
{"version":3,"file":"aptos.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/name-service/services/aptos.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA8D;AAE9D,2CAA+C;AAE/C,SAAe,QAAQ,CAAC,IAAY;;QAClC,MAAM,GAAG,GAAG,MAAM,IAAA,wBAAc,GAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,aAAa,CAAA;YAAE,OAAO,IAAI,CAAC;QAErC,OAAO,GAAG,CAAC,aAAa,CAAC;IAC3B,CAAC;CAAA;AAED,SAAe,QAAQ,CAAC,OAAe;;QACrC,MAAM,GAAG,GAAG,MAAM,IAAA,wBAAc,GAAE,CAAC,eAAe,CAAC;YACjD,cAAc,EAAE,OAAO;SACxB,CAAC,CAAC;QAEH,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAChC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACvE,CAAC;CAAA;AAEY,QAAA,WAAW,GAAgB;IACtC,EAAE,EAAE,OAAO;IACX,OAAO,EAAE,iCAAgB;IACzB,QAAQ;IACR,QAAQ;CACT,CAAC"}
|