@cityofzion/blockchain-service 1.21.2 → 1.22.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.
@@ -8,32 +8,32 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
11
16
  var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12
17
  if (kind === "m") throw new TypeError("Private method is not writable");
13
18
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14
19
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
20
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16
21
  };
17
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
18
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
19
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
20
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
21
- };
22
22
  var __importDefault = (this && this.__importDefault) || function (mod) {
23
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
24
  };
25
- var _CryptoCompareEDS_axiosInstance;
25
+ var _CryptoCompareEDS_instances, _CryptoCompareEDS_apiInstance, _CryptoCompareEDS_api_get;
26
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
27
  exports.CryptoCompareEDS = void 0;
28
28
  const axios_1 = __importDefault(require("axios"));
29
29
  class CryptoCompareEDS {
30
30
  constructor() {
31
- _CryptoCompareEDS_axiosInstance.set(this, void 0);
32
- __classPrivateFieldSet(this, _CryptoCompareEDS_axiosInstance, axios_1.default.create({ baseURL: 'https://min-api.cryptocompare.com' }), "f");
31
+ _CryptoCompareEDS_instances.add(this);
32
+ _CryptoCompareEDS_apiInstance.set(this, void 0);
33
33
  }
34
34
  getTokenPrices(params) {
35
35
  return __awaiter(this, void 0, void 0, function* () {
36
- const { data: prices } = yield __classPrivateFieldGet(this, _CryptoCompareEDS_axiosInstance, "f").get('/data/pricemultifull', {
36
+ const { data: prices } = yield __classPrivateFieldGet(this, _CryptoCompareEDS_instances, "a", _CryptoCompareEDS_api_get).get('/data/pricemultifull', {
37
37
  params: {
38
38
  fsyms: params.tokens.map(token => token.symbol).join(','),
39
39
  tsyms: 'USD',
@@ -49,7 +49,7 @@ class CryptoCompareEDS {
49
49
  getTokenPriceHistory(params) {
50
50
  return __awaiter(this, void 0, void 0, function* () {
51
51
  const path = `/data/${params.type === 'hour' ? 'histohour' : 'histoday'}`;
52
- const response = yield __classPrivateFieldGet(this, _CryptoCompareEDS_axiosInstance, "f").get(path, {
52
+ const response = yield __classPrivateFieldGet(this, _CryptoCompareEDS_instances, "a", _CryptoCompareEDS_api_get).get(path, {
53
53
  params: {
54
54
  fsym: params.token.symbol,
55
55
  tsym: 'USD',
@@ -75,4 +75,9 @@ class CryptoCompareEDS {
75
75
  }
76
76
  }
77
77
  exports.CryptoCompareEDS = CryptoCompareEDS;
78
- _CryptoCompareEDS_axiosInstance = new WeakMap();
78
+ _CryptoCompareEDS_apiInstance = new WeakMap(), _CryptoCompareEDS_instances = new WeakSet(), _CryptoCompareEDS_api_get = function _CryptoCompareEDS_api_get() {
79
+ if (!__classPrivateFieldGet(this, _CryptoCompareEDS_apiInstance, "f")) {
80
+ __classPrivateFieldSet(this, _CryptoCompareEDS_apiInstance, axios_1.default.create({ baseURL: 'https://min-api.cryptocompare.com' }), "f");
81
+ }
82
+ return __classPrivateFieldGet(this, _CryptoCompareEDS_apiInstance, "f");
83
+ };
@@ -1,7 +1,8 @@
1
- import { ExchangeDataService, GetTokenPricesParams, ITokenService, TokenPricesResponse } from '../../interfaces';
1
+ import { TGetTokenPricesParams, IBlockchainService, IExchangeDataService, TTokenPricesResponse } from '../../interfaces';
2
2
  import { CryptoCompareEDS } from './CryptoCompareEDS';
3
- export declare class FlamingoForthewinEDS extends CryptoCompareEDS implements ExchangeDataService {
3
+ export declare class FlamingoForthewinEDS<N extends string> extends CryptoCompareEDS implements IExchangeDataService {
4
4
  #private;
5
- constructor(tokenService: ITokenService);
6
- getTokenPrices({ tokens }: GetTokenPricesParams): Promise<TokenPricesResponse[]>;
5
+ readonly _service: IBlockchainService<N>;
6
+ constructor(service: IBlockchainService<N>);
7
+ getTokenPrices({ tokens }: TGetTokenPricesParams): Promise<TTokenPricesResponse[]>;
7
8
  }
@@ -8,56 +8,56 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
11
16
  var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12
17
  if (kind === "m") throw new TypeError("Private method is not writable");
13
18
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14
19
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
20
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16
21
  };
17
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
18
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
19
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
20
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
21
- };
22
22
  var __importDefault = (this && this.__importDefault) || function (mod) {
23
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
24
  };
25
- var _FlamingoForthewinEDS_flamingoAxiosInstance, _FlamingoForthewinEDS_forthewinAxiosInstance, _FlamingoForthewinEDS_tokenService;
25
+ var _FlamingoForthewinEDS_instances, _FlamingoForthewinEDS_forthewinApiInstance, _FlamingoForthewinEDS_flamingoApiInstance, _FlamingoForthewinEDS_forthewinApi_get, _FlamingoForthewinEDS_flamingoApi_get;
26
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
27
  exports.FlamingoForthewinEDS = void 0;
28
28
  const axios_1 = __importDefault(require("axios"));
29
29
  const CryptoCompareEDS_1 = require("./CryptoCompareEDS");
30
30
  class FlamingoForthewinEDS extends CryptoCompareEDS_1.CryptoCompareEDS {
31
- constructor(tokenService) {
31
+ constructor(service) {
32
32
  super();
33
- _FlamingoForthewinEDS_flamingoAxiosInstance.set(this, axios_1.default.create({ baseURL: 'https://neo-api.b-cdn.net/flamingo' }));
34
- _FlamingoForthewinEDS_forthewinAxiosInstance.set(this, axios_1.default.create({ baseURL: 'https://api.forthewin.network' }));
35
- _FlamingoForthewinEDS_tokenService.set(this, void 0);
36
- __classPrivateFieldSet(this, _FlamingoForthewinEDS_tokenService, tokenService, "f");
33
+ _FlamingoForthewinEDS_instances.add(this);
34
+ _FlamingoForthewinEDS_forthewinApiInstance.set(this, void 0);
35
+ _FlamingoForthewinEDS_flamingoApiInstance.set(this, void 0);
36
+ this._service = service;
37
37
  }
38
- getTokenPrices({ tokens }) {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- const { data: flamingoData } = yield __classPrivateFieldGet(this, _FlamingoForthewinEDS_flamingoAxiosInstance, "f").get('/live-data/prices/latest');
38
+ getTokenPrices(_a) {
39
+ return __awaiter(this, arguments, void 0, function* ({ tokens }) {
40
+ const { data: flamingoData } = yield __classPrivateFieldGet(this, _FlamingoForthewinEDS_instances, "a", _FlamingoForthewinEDS_flamingoApi_get).get('/live-data/prices/latest');
41
41
  const prices = [];
42
42
  const neoToken = tokens.find(({ symbol }) => symbol === 'NEO');
43
- if (neoToken && !flamingoData.find(token => __classPrivateFieldGet(this, _FlamingoForthewinEDS_tokenService, "f").predicate(neoToken, token)))
43
+ if (neoToken && !flamingoData.find(token => this._service.tokenService.predicate(neoToken, token)))
44
44
  flamingoData.forEach(item => {
45
45
  if (item.symbol === 'bNEO')
46
46
  flamingoData.push(Object.assign(Object.assign({}, item), { symbol: neoToken.symbol, hash: neoToken.hash }));
47
47
  });
48
48
  flamingoData.forEach(item => {
49
- const token = tokens.find(currentToken => __classPrivateFieldGet(this, _FlamingoForthewinEDS_tokenService, "f").predicate(item, currentToken));
49
+ const token = tokens.find(token => this._service.tokenService.predicate(item, token));
50
50
  if (!token)
51
51
  return;
52
52
  prices.push({ usdPrice: item.usd_price, token });
53
53
  });
54
54
  if (tokens.length > prices.length) {
55
- const { data: forthewinData } = yield __classPrivateFieldGet(this, _FlamingoForthewinEDS_forthewinAxiosInstance, "f").get('/mainnet/prices');
55
+ const { data: forthewinData } = yield __classPrivateFieldGet(this, _FlamingoForthewinEDS_instances, "a", _FlamingoForthewinEDS_forthewinApi_get).get('/mainnet/prices');
56
56
  Object.entries(forthewinData).forEach(([hash, usdPrice]) => {
57
- const hasPrice = !!prices.find(({ token }) => __classPrivateFieldGet(this, _FlamingoForthewinEDS_tokenService, "f").predicateByHash(hash, token));
57
+ const hasPrice = !!prices.find(({ token }) => this._service.tokenService.predicate({ hash }, token));
58
58
  if (hasPrice)
59
59
  return;
60
- const foundToken = tokens.find(token => __classPrivateFieldGet(this, _FlamingoForthewinEDS_tokenService, "f").predicateByHash(hash, token));
60
+ const foundToken = tokens.find(token => this._service.tokenService.predicate({ hash }, token));
61
61
  if (!foundToken)
62
62
  return;
63
63
  prices.push({ usdPrice, token: foundToken });
@@ -68,4 +68,14 @@ class FlamingoForthewinEDS extends CryptoCompareEDS_1.CryptoCompareEDS {
68
68
  }
69
69
  }
70
70
  exports.FlamingoForthewinEDS = FlamingoForthewinEDS;
71
- _FlamingoForthewinEDS_flamingoAxiosInstance = new WeakMap(), _FlamingoForthewinEDS_forthewinAxiosInstance = new WeakMap(), _FlamingoForthewinEDS_tokenService = new WeakMap();
71
+ _FlamingoForthewinEDS_forthewinApiInstance = new WeakMap(), _FlamingoForthewinEDS_flamingoApiInstance = new WeakMap(), _FlamingoForthewinEDS_instances = new WeakSet(), _FlamingoForthewinEDS_forthewinApi_get = function _FlamingoForthewinEDS_forthewinApi_get() {
72
+ if (!__classPrivateFieldGet(this, _FlamingoForthewinEDS_forthewinApiInstance, "f")) {
73
+ __classPrivateFieldSet(this, _FlamingoForthewinEDS_forthewinApiInstance, axios_1.default.create({ baseURL: 'https://api.forthewin.network' }), "f");
74
+ }
75
+ return __classPrivateFieldGet(this, _FlamingoForthewinEDS_forthewinApiInstance, "f");
76
+ }, _FlamingoForthewinEDS_flamingoApi_get = function _FlamingoForthewinEDS_flamingoApi_get() {
77
+ if (!__classPrivateFieldGet(this, _FlamingoForthewinEDS_flamingoApiInstance, "f")) {
78
+ __classPrivateFieldSet(this, _FlamingoForthewinEDS_flamingoApiInstance, axios_1.default.create({ baseURL: 'https://neo-api.b-cdn.net/flamingo' }), "f");
79
+ }
80
+ return __classPrivateFieldGet(this, _FlamingoForthewinEDS_flamingoApiInstance, "f");
81
+ };
@@ -0,0 +1,9 @@
1
+ import { TGetNftParam, TGetNftsByAddressParams, THasTokenParam, INftDataService, TNftResponse, TNftsResponse } from '../../interfaces';
2
+ export declare abstract class GhostMarketNDS implements INftDataService {
3
+ #private;
4
+ static readonly BASE_URL: string;
5
+ getNftsByAddress({ address, size, cursor }: TGetNftsByAddressParams): Promise<TNftsResponse>;
6
+ getNft({ collectionHash, tokenHash }: TGetNftParam): Promise<TNftResponse>;
7
+ abstract hasToken({ collectionHash, address }: THasTokenParam): Promise<boolean>;
8
+ abstract getChain(): string;
9
+ }
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
19
+ var _GhostMarketNDS_instances, _a, _GhostMarketNDS_treatGhostMarketImage, _GhostMarketNDS_getUrlWithParams, _GhostMarketNDS_parse;
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.GhostMarketNDS = void 0;
22
+ const axios_1 = __importDefault(require("axios"));
23
+ const query_string_1 = __importDefault(require("query-string"));
24
+ class GhostMarketNDS {
25
+ constructor() {
26
+ _GhostMarketNDS_instances.add(this);
27
+ }
28
+ getNftsByAddress(_b) {
29
+ return __awaiter(this, arguments, void 0, function* ({ address, size = 18, cursor }) {
30
+ var _c;
31
+ const url = __classPrivateFieldGet(this, _GhostMarketNDS_instances, "m", _GhostMarketNDS_getUrlWithParams).call(this, {
32
+ size,
33
+ owners: [address],
34
+ cursor: cursor,
35
+ });
36
+ const { data } = yield axios_1.default.get(url);
37
+ const nfts = (_c = data.assets) !== null && _c !== void 0 ? _c : [];
38
+ return { nextCursor: data.next, items: nfts.map(__classPrivateFieldGet(this, _GhostMarketNDS_instances, "m", _GhostMarketNDS_parse).bind(this)) };
39
+ });
40
+ }
41
+ getNft(_b) {
42
+ return __awaiter(this, arguments, void 0, function* ({ collectionHash, tokenHash }) {
43
+ const url = __classPrivateFieldGet(this, _GhostMarketNDS_instances, "m", _GhostMarketNDS_getUrlWithParams).call(this, {
44
+ contract: collectionHash,
45
+ tokenIds: [tokenHash],
46
+ });
47
+ const { data } = yield axios_1.default.get(url);
48
+ return __classPrivateFieldGet(this, _GhostMarketNDS_instances, "m", _GhostMarketNDS_parse).call(this, data.assets[0]);
49
+ });
50
+ }
51
+ }
52
+ exports.GhostMarketNDS = GhostMarketNDS;
53
+ _a = GhostMarketNDS, _GhostMarketNDS_instances = new WeakSet(), _GhostMarketNDS_treatGhostMarketImage = function _GhostMarketNDS_treatGhostMarketImage(srcImage) {
54
+ if (!srcImage) {
55
+ return;
56
+ }
57
+ if (srcImage.startsWith('ipfs://')) {
58
+ const splitImage = srcImage.split('/');
59
+ const imageId = splitImage.slice(-2).filter(Boolean).join('/');
60
+ return `https://ghostmarket.mypinata.cloud/ipfs/${imageId}`;
61
+ }
62
+ return srcImage;
63
+ }, _GhostMarketNDS_getUrlWithParams = function _GhostMarketNDS_getUrlWithParams(params) {
64
+ const chain = this.getChain();
65
+ if (!chain)
66
+ throw new Error('GhostMarketNDSNeo3 does not support this network');
67
+ const parameters = query_string_1.default.stringify(Object.assign({ chain, ownersChains: [chain] }, params), { arrayFormat: 'bracket' });
68
+ return `${_a.BASE_URL}/assets?${parameters}`;
69
+ }, _GhostMarketNDS_parse = function _GhostMarketNDS_parse(data) {
70
+ var _b, _c;
71
+ const nftResponse = {
72
+ hash: data.tokenId,
73
+ collection: {
74
+ hash: data.contract.hash,
75
+ name: (_b = data.collection) === null || _b === void 0 ? void 0 : _b.name,
76
+ image: __classPrivateFieldGet(this, _GhostMarketNDS_instances, "m", _GhostMarketNDS_treatGhostMarketImage).call(this, (_c = data.collection) === null || _c === void 0 ? void 0 : _c.logoUrl),
77
+ },
78
+ symbol: data.contract.symbol,
79
+ image: __classPrivateFieldGet(this, _GhostMarketNDS_instances, "m", _GhostMarketNDS_treatGhostMarketImage).call(this, data.metadata.mediaUri),
80
+ isSVG: String(data.metadata.mediaType).includes('svg+xml'),
81
+ name: data.metadata.name,
82
+ creator: {
83
+ address: data.creator.address,
84
+ name: data.creator.offchainName,
85
+ },
86
+ };
87
+ return nftResponse;
88
+ };
89
+ GhostMarketNDS.BASE_URL = 'https://api.ghostmarket.io/api/v2';
@@ -1,12 +1,8 @@
1
- import { ITokenService, Token, TTokenServicePredicateByHashParams, TTokenServicePredicateBySymbolParams, TTokenServicePredicateParams } from '../../interfaces';
2
- export type TBSTokenHelperPredicateParams = {
3
- hash: string;
4
- symbol?: string;
5
- };
1
+ import { ITokenService, TBSToken, TTokenServicePredicateByHashParams, TTokenServicePredicateBySymbolParams, TTokenServicePredicateParams } from '../../interfaces';
6
2
  export declare abstract class TokenService implements ITokenService {
7
- predicate(compareFrom: TTokenServicePredicateParams, compareTo: TBSTokenHelperPredicateParams): boolean;
3
+ predicate(compareFrom: TTokenServicePredicateParams, compareTo: TTokenServicePredicateParams): boolean;
8
4
  predicateByHash(compareFrom: TTokenServicePredicateByHashParams, compareTo: TTokenServicePredicateByHashParams): boolean;
9
5
  predicateBySymbol(compareFrom: TTokenServicePredicateBySymbolParams, compareTo: TTokenServicePredicateBySymbolParams): boolean;
10
- normalizeToken<T extends Token | Token[]>(token: T): T;
6
+ normalizeToken<T extends TBSToken | TBSToken[]>(token: T): T;
11
7
  abstract normalizeHash(hash: string): string;
12
8
  }
@@ -0,0 +1,57 @@
1
+ export type TGhostMarketNDSNeo3AssetApiResponse = {
2
+ tokenId: string;
3
+ contract: {
4
+ chain?: string;
5
+ hash: string;
6
+ symbol: string;
7
+ };
8
+ creator: {
9
+ address: string;
10
+ offchainName?: string;
11
+ };
12
+ apiUrl?: string;
13
+ ownerships: {
14
+ owner: {
15
+ address?: string;
16
+ };
17
+ }[];
18
+ collection: {
19
+ name?: string;
20
+ logoUrl?: string;
21
+ };
22
+ metadata: {
23
+ description: string;
24
+ mediaType: string;
25
+ mediaUri: string;
26
+ mintDate: number;
27
+ mintNumber: number;
28
+ name: string;
29
+ };
30
+ };
31
+ export type TGhostMarketNDSNeo3GetAssetsApiResponse = {
32
+ assets: TGhostMarketNDSNeo3AssetApiResponse[];
33
+ next: string;
34
+ };
35
+ export type TFlamingoForthewinEDSFlamingoPricesApiResponse = {
36
+ symbol: string;
37
+ usd_price: number;
38
+ hash: string;
39
+ }[];
40
+ export type TFlamingoForthewinEDSForthewinPricesApiResponse = {
41
+ [key: string]: number;
42
+ };
43
+ export type TCryptoCompareEDSDataResponse = {
44
+ RAW: {
45
+ [symbol: string]: {
46
+ [currency: string]: {
47
+ PRICE: number;
48
+ };
49
+ };
50
+ };
51
+ };
52
+ export type TCryptoCompareEDSHistoryResponse = {
53
+ Data: {
54
+ time: number;
55
+ close: number;
56
+ }[];
57
+ };
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/blockchain-service",
3
- "version": "1.21.2",
3
+ "version": "1.22.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": "https://github.com/CityOfZion/blockchain-services",
@@ -9,29 +9,34 @@
9
9
  "files": [
10
10
  "/dist"
11
11
  ],
12
+ "dependencies": {
13
+ "axios": "1.12.2",
14
+ "bignumber.js": "~9.3.1",
15
+ "bip39": "~3.1.0",
16
+ "date-fns": "~4.1.0",
17
+ "elliptic": "~6.6.1",
18
+ "lodash.isequal": "~4.5.0",
19
+ "query-string": "7.1.3"
20
+ },
12
21
  "devDependencies": {
13
- "@types/node": "~20.2.5",
14
- "@types/jest": "29.5.3",
15
- "@typescript-eslint/eslint-plugin": "^6.5.0",
16
- "@typescript-eslint/parser": "^6.5.0",
17
- "dotenv": "16.3.1",
18
- "eslint": "^8.48.0",
22
+ "@ledgerhq/hw-transport": "~6.31.11",
23
+ "@types/elliptic": "~6.4.18",
24
+ "@types/jest": "~30.0.0",
25
+ "@types/lodash.isequal": "~4.5.8",
26
+ "@types/node": "~24.5.2",
27
+ "dotenv": "17.2.2",
28
+ "eslint": "~9.36.0",
29
+ "jest": "30.1.3",
30
+ "ts-jest": "29.4.4",
19
31
  "ts-node": "~10.9.2",
20
- "typescript": "4.9.5",
21
32
  "typed-emitter": "~2.1.0",
22
- "jest": "29.6.2",
23
- "ts-jest": "29.1.1"
24
- },
25
- "dependencies": {
26
- "@ledgerhq/hw-transport": "~6.31.8",
27
- "axios": "1.8.2",
28
- "date-fns": "~4.1.0",
29
- "bignumber.js": "~9.3.0"
33
+ "typescript": "5.9.2"
30
34
  },
31
35
  "scripts": {
32
- "build": "tsc --project tsconfig.build.json",
33
- "test": "jest --config jest.config.ts",
36
+ "build": "rm -rf ./dist && tsc --project tsconfig.build.json",
37
+ "test": "jest -i --config jest.config.ts",
34
38
  "lint": "eslint .",
35
- "format": "eslint --fix"
39
+ "format": "eslint --fix",
40
+ "package": "npm run build && npm pack"
36
41
  }
37
42
  }