@cityofzion/bs-ethereum 2.12.8 → 2.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.
@@ -1,11 +1,12 @@
1
1
  import { RpcBDSEthereum } from './RpcBDSEthereum';
2
- import { ExplorerService, FullTransactionsByAddressParams, FullTransactionsByAddressResponse, Network, NetworkId, NftDataService } from '@cityofzion/blockchain-service';
3
- import { GetFullTransactionsByAddressResponse } from '@cityofzion/dora-ts/dist/interfaces/api/common';
2
+ import { FullTransactionsByAddressParams, Network, NetworkId } from '@cityofzion/blockchain-service';
4
3
  import { BSEthereumNetworkId } from '../../constants/BSEthereumConstants';
5
4
  export declare class DoraBDSEthereum<BSNetworkId extends NetworkId = BSEthereumNetworkId> extends RpcBDSEthereum {
6
- #private;
7
- constructor(network: Network<BSNetworkId>, supportedFullTransactionsByAddressNetworks: BSNetworkId[], nftDataService: NftDataService, explorerService: ExplorerService);
8
- _transformFullTransactionsByAddressResponse({ nextCursor, ...response }: GetFullTransactionsByAddressResponse): Promise<FullTransactionsByAddressResponse>;
5
+ readonly _supportedErc721Standards: string[];
6
+ readonly _supportedErc1155Standards: string[];
7
+ readonly _supportedErc20Standards: string[];
8
+ readonly _supportedFullTransactionsByAddressNetworks: BSNetworkId[];
9
+ constructor(network: Network<BSNetworkId>, supportedFullTransactionsByAddressNetworks: BSNetworkId[]);
9
10
  _validateFullTransactionsByAddressParams(params: Pick<FullTransactionsByAddressParams, 'address' | 'dateFrom' | 'dateTo'>): void;
10
11
  _validateGetFullTransactionsByAddressParams({ pageSize, ...params }: Pick<FullTransactionsByAddressParams, 'address' | 'dateFrom' | 'dateTo' | 'pageSize'>): void;
11
12
  }
@@ -1,24 +1,4 @@
1
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 __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12
- if (kind === "m") throw new TypeError("Private method is not writable");
13
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14
- 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
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16
- };
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
2
  var __rest = (this && this.__rest) || function (s, e) {
23
3
  var t = {};
24
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -30,120 +10,21 @@ var __rest = (this && this.__rest) || function (s, e) {
30
10
  }
31
11
  return t;
32
12
  };
33
- var _DoraBDSEthereum_supportedErc721Standards, _DoraBDSEthereum_supportedErc1155Standards, _DoraBDSEthereum_supportedErc20Standards, _DoraBDSEthereum_supportedFullTransactionsByAddressNetworks, _DoraBDSEthereum_nftDataService, _DoraBDSEthereum_explorerService;
34
13
  Object.defineProperty(exports, "__esModule", { value: true });
35
14
  exports.DoraBDSEthereum = void 0;
36
15
  const RpcBDSEthereum_1 = require("./RpcBDSEthereum");
37
16
  const blockchain_service_1 = require("@cityofzion/blockchain-service");
38
17
  const ethers_1 = require("ethers");
39
- const BSEthereumHelper_1 = require("../../helpers/BSEthereumHelper");
40
18
  class DoraBDSEthereum extends RpcBDSEthereum_1.RpcBDSEthereum {
41
- constructor(network, supportedFullTransactionsByAddressNetworks, nftDataService, explorerService) {
19
+ constructor(network, supportedFullTransactionsByAddressNetworks) {
42
20
  super(network);
43
- _DoraBDSEthereum_supportedErc721Standards.set(this, ['erc721', 'erc-721']);
44
- _DoraBDSEthereum_supportedErc1155Standards.set(this, ['erc1155', 'erc-1155']);
45
- _DoraBDSEthereum_supportedErc20Standards.set(this, ['erc20', 'erc-20']);
46
- _DoraBDSEthereum_supportedFullTransactionsByAddressNetworks.set(this, void 0);
47
- _DoraBDSEthereum_nftDataService.set(this, void 0);
48
- _DoraBDSEthereum_explorerService.set(this, void 0);
49
- __classPrivateFieldSet(this, _DoraBDSEthereum_supportedFullTransactionsByAddressNetworks, supportedFullTransactionsByAddressNetworks, "f");
50
- __classPrivateFieldSet(this, _DoraBDSEthereum_nftDataService, nftDataService, "f");
51
- __classPrivateFieldSet(this, _DoraBDSEthereum_explorerService, explorerService, "f");
52
- }
53
- _transformFullTransactionsByAddressResponse(_a) {
54
- var _b;
55
- var { nextCursor } = _a, response = __rest(_a, ["nextCursor"]);
56
- return __awaiter(this, void 0, void 0, function* () {
57
- const data = [];
58
- const items = (_b = response.data) !== null && _b !== void 0 ? _b : [];
59
- const nativeToken = BSEthereumHelper_1.BSEthereumHelper.getNativeAsset(this._network);
60
- const addressTemplateUrl = __classPrivateFieldGet(this, _DoraBDSEthereum_explorerService, "f").getAddressTemplateUrl();
61
- const txTemplateUrl = __classPrivateFieldGet(this, _DoraBDSEthereum_explorerService, "f").getTxTemplateUrl();
62
- const nftTemplateUrl = __classPrivateFieldGet(this, _DoraBDSEthereum_explorerService, "f").getNftTemplateUrl();
63
- const contractTemplateUrl = __classPrivateFieldGet(this, _DoraBDSEthereum_explorerService, "f").getContractTemplateUrl();
64
- const itemPromises = items.map((_c) => __awaiter(this, void 0, void 0, function* () {
65
- var { networkFeeAmount, systemFeeAmount } = _c, item = __rest(_c, ["networkFeeAmount", "systemFeeAmount"]);
66
- const txId = item.transactionID;
67
- const newItem = {
68
- txId,
69
- txIdUrl: txId ? txTemplateUrl === null || txTemplateUrl === void 0 ? void 0 : txTemplateUrl.replace('{txId}', txId) : undefined,
70
- block: item.block,
71
- date: item.date,
72
- invocationCount: item.invocationCount,
73
- notificationCount: item.notificationCount,
74
- networkFeeAmount: networkFeeAmount
75
- ? blockchain_service_1.BSBigNumberHelper.format(networkFeeAmount, { decimals: nativeToken.decimals })
76
- : undefined,
77
- systemFeeAmount: systemFeeAmount
78
- ? blockchain_service_1.BSBigNumberHelper.format(systemFeeAmount, { decimals: nativeToken.decimals })
79
- : undefined,
80
- events: [],
81
- };
82
- const eventPromises = item.events.map((event) => __awaiter(this, void 0, void 0, function* () {
83
- var _d, _e, _f, _g, _h, _j;
84
- let nftEvent;
85
- let assetEvent;
86
- const { methodName, tokenID: tokenId, contractHash: hash } = event;
87
- const from = (_d = event.from) !== null && _d !== void 0 ? _d : undefined;
88
- const to = (_e = event.to) !== null && _e !== void 0 ? _e : undefined;
89
- const standard = (_h = (_g = (_f = event.supportedStandards) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.toLowerCase()) !== null && _h !== void 0 ? _h : '';
90
- const isErc1155 = __classPrivateFieldGet(this, _DoraBDSEthereum_supportedErc1155Standards, "f").includes(standard);
91
- const isErc721 = __classPrivateFieldGet(this, _DoraBDSEthereum_supportedErc721Standards, "f").includes(standard);
92
- const isErc20 = __classPrivateFieldGet(this, _DoraBDSEthereum_supportedErc20Standards, "f").includes(standard);
93
- const isNft = (isErc1155 || isErc721) && !!tokenId;
94
- const fromUrl = from ? addressTemplateUrl === null || addressTemplateUrl === void 0 ? void 0 : addressTemplateUrl.replace('{address}', from) : undefined;
95
- const toUrl = to ? addressTemplateUrl === null || addressTemplateUrl === void 0 ? void 0 : addressTemplateUrl.replace('{address}', to) : undefined;
96
- const hashUrl = hash ? contractTemplateUrl === null || contractTemplateUrl === void 0 ? void 0 : contractTemplateUrl.replace('{hash}', hash) : undefined;
97
- if (isNft) {
98
- const [nft] = yield blockchain_service_1.BSPromisesHelper.tryCatch(() => __classPrivateFieldGet(this, _DoraBDSEthereum_nftDataService, "f").getNft({ contractHash: hash, tokenId }));
99
- const nftUrl = hash ? nftTemplateUrl === null || nftTemplateUrl === void 0 ? void 0 : nftTemplateUrl.replace('{hash}', hash).replace('{tokenId}', tokenId) : undefined;
100
- nftEvent = {
101
- eventType: 'nft',
102
- amount: undefined,
103
- methodName,
104
- from,
105
- fromUrl,
106
- to,
107
- toUrl,
108
- hash,
109
- hashUrl,
110
- tokenId,
111
- tokenType: isErc1155 ? 'erc-1155' : 'erc-721',
112
- nftImageUrl: nft === null || nft === void 0 ? void 0 : nft.image,
113
- nftUrl,
114
- name: nft === null || nft === void 0 ? void 0 : nft.name,
115
- collectionName: nft === null || nft === void 0 ? void 0 : nft.collectionName,
116
- };
117
- }
118
- else {
119
- const [token] = yield blockchain_service_1.BSPromisesHelper.tryCatch(() => this.getTokenInfo(hash));
120
- assetEvent = {
121
- eventType: 'token',
122
- amount: event.amount
123
- ? blockchain_service_1.BSBigNumberHelper.format(event.amount, { decimals: (_j = token === null || token === void 0 ? void 0 : token.decimals) !== null && _j !== void 0 ? _j : event.tokenDecimals })
124
- : undefined,
125
- methodName,
126
- from,
127
- fromUrl,
128
- to,
129
- toUrl,
130
- hash,
131
- hashUrl,
132
- token: token !== null && token !== void 0 ? token : undefined,
133
- tokenType: isErc20 ? 'erc-20' : 'generic',
134
- };
135
- }
136
- newItem.events.push(isNft ? nftEvent : assetEvent);
137
- }));
138
- yield Promise.allSettled(eventPromises);
139
- data.push(newItem);
140
- }));
141
- yield Promise.allSettled(itemPromises);
142
- return { nextCursor, data };
143
- });
21
+ this._supportedErc721Standards = ['erc721', 'erc-721'];
22
+ this._supportedErc1155Standards = ['erc1155', 'erc-1155'];
23
+ this._supportedErc20Standards = ['erc20', 'erc-20'];
24
+ this._supportedFullTransactionsByAddressNetworks = supportedFullTransactionsByAddressNetworks;
144
25
  }
145
26
  _validateFullTransactionsByAddressParams(params) {
146
- if (!__classPrivateFieldGet(this, _DoraBDSEthereum_supportedFullTransactionsByAddressNetworks, "f").includes(this._network.id))
27
+ if (!this._supportedFullTransactionsByAddressNetworks.includes(this._network.id))
147
28
  throw new Error('This network is not supported');
148
29
  blockchain_service_1.BSFullTransactionsByAddressHelper.validateFullTransactionsByAddressParams(params);
149
30
  if (!ethers_1.ethers.utils.isAddress(params.address))
@@ -157,4 +38,3 @@ class DoraBDSEthereum extends RpcBDSEthereum_1.RpcBDSEthereum {
157
38
  }
158
39
  }
159
40
  exports.DoraBDSEthereum = DoraBDSEthereum;
160
- _DoraBDSEthereum_supportedErc721Standards = new WeakMap(), _DoraBDSEthereum_supportedErc1155Standards = new WeakMap(), _DoraBDSEthereum_supportedErc20Standards = new WeakMap(), _DoraBDSEthereum_supportedFullTransactionsByAddressNetworks = new WeakMap(), _DoraBDSEthereum_nftDataService = new WeakMap(), _DoraBDSEthereum_explorerService = new WeakMap();
@@ -2,6 +2,7 @@ import { BalanceResponse, ContractResponse, Network, Token, TransactionResponse,
2
2
  import { BSEthereumNetworkId } from '../../constants/BSEthereumConstants';
3
3
  import { DoraBDSEthereum } from './DoraBDSEthereum';
4
4
  export declare class MoralisBDSEthereum extends DoraBDSEthereum {
5
+ #private;
5
6
  static BASE_URL: string;
6
7
  static SUPPORTED_CHAINS: string[];
7
8
  static getClient(network: Network<BSEthereumNetworkId>): import("axios").AxiosInstance;
@@ -8,6 +8,17 @@ 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 __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12
+ if (kind === "m") throw new TypeError("Private method is not writable");
13
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14
+ 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
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16
+ };
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
+ };
11
22
  var __rest = (this && this.__rest) || function (s, e) {
12
23
  var t = {};
13
24
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -22,6 +33,7 @@ var __rest = (this && this.__rest) || function (s, e) {
22
33
  var __importDefault = (this && this.__importDefault) || function (mod) {
23
34
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
35
  };
36
+ var _MoralisBDSEthereum_nftDataService, _MoralisBDSEthereum_explorerService;
25
37
  Object.defineProperty(exports, "__esModule", { value: true });
26
38
  exports.MoralisBDSEthereum = void 0;
27
39
  const blockchain_service_1 = require("@cityofzion/blockchain-service");
@@ -51,7 +63,11 @@ class MoralisBDSEthereum extends DoraBDSEthereum_1.DoraBDSEthereum {
51
63
  BSEthereumConstants_1.BSEthereumConstants.POLYGON_MAINNET_NETWORK_ID,
52
64
  BSEthereumConstants_1.BSEthereumConstants.BASE_MAINNET_NETWORK_ID,
53
65
  BSEthereumConstants_1.BSEthereumConstants.ARBITRUM_MAINNET_NETWORK_ID,
54
- ], nftDataService, explorerService);
66
+ ]);
67
+ _MoralisBDSEthereum_nftDataService.set(this, void 0);
68
+ _MoralisBDSEthereum_explorerService.set(this, void 0);
69
+ __classPrivateFieldSet(this, _MoralisBDSEthereum_nftDataService, nftDataService, "f");
70
+ __classPrivateFieldSet(this, _MoralisBDSEthereum_explorerService, explorerService, "f");
55
71
  }
56
72
  getBalance(address) {
57
73
  const _super = Object.create(null, {
@@ -184,6 +200,7 @@ class MoralisBDSEthereum extends DoraBDSEthereum_1.DoraBDSEthereum {
184
200
  time: new Date(data.block_timestamp).getTime() / 1000,
185
201
  transfers,
186
202
  fee: data.transaction_fee,
203
+ type: 'default',
187
204
  };
188
205
  });
189
206
  }
@@ -249,6 +266,7 @@ class MoralisBDSEthereum extends DoraBDSEthereum_1.DoraBDSEthereum {
249
266
  time: new Date(item.block_timestamp).getTime() / 1000,
250
267
  transfers,
251
268
  fee: item.transaction_fee,
269
+ type: 'default',
252
270
  });
253
271
  }));
254
272
  yield Promise.allSettled(promises);
@@ -259,10 +277,11 @@ class MoralisBDSEthereum extends DoraBDSEthereum_1.DoraBDSEthereum {
259
277
  });
260
278
  }
261
279
  getFullTransactionsByAddress(_a) {
262
- var _b;
280
+ var _b, _c;
263
281
  var { nextCursor } = _a, params = __rest(_a, ["nextCursor"]);
264
282
  return __awaiter(this, void 0, void 0, function* () {
265
283
  this._validateGetFullTransactionsByAddressParams(params);
284
+ const data = [];
266
285
  const response = yield dora_ts_1.api.EthereumREST.getFullTransactionsByAddress({
267
286
  address: params.address,
268
287
  timestampFrom: params.dateFrom,
@@ -271,7 +290,92 @@ class MoralisBDSEthereum extends DoraBDSEthereum_1.DoraBDSEthereum {
271
290
  cursor: nextCursor,
272
291
  pageLimit: (_b = params.pageSize) !== null && _b !== void 0 ? _b : 50,
273
292
  });
274
- return yield this._transformFullTransactionsByAddressResponse(response);
293
+ const items = (_c = response.data) !== null && _c !== void 0 ? _c : [];
294
+ const nativeToken = BSEthereumHelper_1.BSEthereumHelper.getNativeAsset(this._network);
295
+ const addressTemplateUrl = __classPrivateFieldGet(this, _MoralisBDSEthereum_explorerService, "f").getAddressTemplateUrl();
296
+ const txTemplateUrl = __classPrivateFieldGet(this, _MoralisBDSEthereum_explorerService, "f").getTxTemplateUrl();
297
+ const nftTemplateUrl = __classPrivateFieldGet(this, _MoralisBDSEthereum_explorerService, "f").getNftTemplateUrl();
298
+ const contractTemplateUrl = __classPrivateFieldGet(this, _MoralisBDSEthereum_explorerService, "f").getContractTemplateUrl();
299
+ const itemPromises = items.map((_d, index) => __awaiter(this, void 0, void 0, function* () {
300
+ var { networkFeeAmount, systemFeeAmount } = _d, item = __rest(_d, ["networkFeeAmount", "systemFeeAmount"]);
301
+ const txId = item.transactionID;
302
+ const newItem = {
303
+ txId,
304
+ txIdUrl: txId ? txTemplateUrl === null || txTemplateUrl === void 0 ? void 0 : txTemplateUrl.replace('{txId}', txId) : undefined,
305
+ block: item.block,
306
+ date: item.date,
307
+ invocationCount: item.invocationCount,
308
+ notificationCount: item.notificationCount,
309
+ networkFeeAmount: networkFeeAmount
310
+ ? blockchain_service_1.BSBigNumberHelper.format(networkFeeAmount, { decimals: nativeToken.decimals })
311
+ : undefined,
312
+ systemFeeAmount: systemFeeAmount
313
+ ? blockchain_service_1.BSBigNumberHelper.format(systemFeeAmount, { decimals: nativeToken.decimals })
314
+ : undefined,
315
+ events: [],
316
+ type: 'default',
317
+ };
318
+ const eventPromises = item.events.map((event, eventIndex) => __awaiter(this, void 0, void 0, function* () {
319
+ var _e, _f, _g, _h, _j, _k;
320
+ let nftEvent;
321
+ let assetEvent;
322
+ const { methodName, tokenID: tokenId, contractHash: hash } = event;
323
+ const from = (_e = event.from) !== null && _e !== void 0 ? _e : undefined;
324
+ const to = (_f = event.to) !== null && _f !== void 0 ? _f : undefined;
325
+ const standard = (_j = (_h = (_g = event.supportedStandards) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.toLowerCase()) !== null && _j !== void 0 ? _j : '';
326
+ const isErc1155 = this._supportedErc1155Standards.includes(standard);
327
+ const isErc721 = this._supportedErc721Standards.includes(standard);
328
+ const isErc20 = this._supportedErc20Standards.includes(standard);
329
+ const isNft = (isErc1155 || isErc721) && !!tokenId;
330
+ const fromUrl = from ? addressTemplateUrl === null || addressTemplateUrl === void 0 ? void 0 : addressTemplateUrl.replace('{address}', from) : undefined;
331
+ const toUrl = to ? addressTemplateUrl === null || addressTemplateUrl === void 0 ? void 0 : addressTemplateUrl.replace('{address}', to) : undefined;
332
+ const hashUrl = hash ? contractTemplateUrl === null || contractTemplateUrl === void 0 ? void 0 : contractTemplateUrl.replace('{hash}', hash) : undefined;
333
+ if (isNft) {
334
+ const [nft] = yield blockchain_service_1.BSPromisesHelper.tryCatch(() => __classPrivateFieldGet(this, _MoralisBDSEthereum_nftDataService, "f").getNft({ contractHash: hash, tokenId }));
335
+ const nftUrl = hash ? nftTemplateUrl === null || nftTemplateUrl === void 0 ? void 0 : nftTemplateUrl.replace('{hash}', hash).replace('{tokenId}', tokenId) : undefined;
336
+ nftEvent = {
337
+ eventType: 'nft',
338
+ amount: undefined,
339
+ methodName,
340
+ from,
341
+ fromUrl,
342
+ to,
343
+ toUrl,
344
+ hash,
345
+ hashUrl,
346
+ tokenId,
347
+ tokenType: isErc1155 ? 'erc-1155' : 'erc-721',
348
+ nftImageUrl: nft === null || nft === void 0 ? void 0 : nft.image,
349
+ nftUrl,
350
+ name: nft === null || nft === void 0 ? void 0 : nft.name,
351
+ collectionName: nft === null || nft === void 0 ? void 0 : nft.collectionName,
352
+ };
353
+ }
354
+ else {
355
+ const [token] = yield blockchain_service_1.BSPromisesHelper.tryCatch(() => this.getTokenInfo(hash));
356
+ assetEvent = {
357
+ eventType: 'token',
358
+ amount: event.amount
359
+ ? blockchain_service_1.BSBigNumberHelper.format(event.amount, { decimals: (_k = token === null || token === void 0 ? void 0 : token.decimals) !== null && _k !== void 0 ? _k : event.tokenDecimals })
360
+ : undefined,
361
+ methodName,
362
+ from,
363
+ fromUrl,
364
+ to,
365
+ toUrl,
366
+ hash,
367
+ hashUrl,
368
+ token: token !== null && token !== void 0 ? token : undefined,
369
+ tokenType: isErc20 ? 'erc-20' : 'generic',
370
+ };
371
+ }
372
+ newItem.events.splice(eventIndex, 0, isNft ? nftEvent : assetEvent);
373
+ }));
374
+ yield Promise.allSettled(eventPromises);
375
+ data.splice(index, 0, newItem);
376
+ }));
377
+ yield Promise.allSettled(itemPromises);
378
+ return { nextCursor: response.nextCursor, data };
275
379
  });
276
380
  }
277
381
  exportFullTransactionsByAddress(params) {
@@ -327,6 +431,7 @@ class MoralisBDSEthereum extends DoraBDSEthereum_1.DoraBDSEthereum {
327
431
  }
328
432
  }
329
433
  exports.MoralisBDSEthereum = MoralisBDSEthereum;
434
+ _MoralisBDSEthereum_nftDataService = new WeakMap(), _MoralisBDSEthereum_explorerService = new WeakMap();
330
435
  MoralisBDSEthereum.BASE_URL = `${blockchain_service_1.BSCommonConstants.DORA_URL}/api/v2/meta`;
331
436
  MoralisBDSEthereum.SUPPORTED_CHAINS = [
332
437
  BSEthereumConstants_1.BSEthereumConstants.ETHEREUM_MAINNET_NETWORK_ID,
@@ -45,6 +45,7 @@ class RpcBDSEthereum {
45
45
  },
46
46
  ],
47
47
  notifications: [],
48
+ type: 'default',
48
49
  };
49
50
  });
50
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-ethereum",
3
- "version": "2.12.8",
3
+ "version": "2.13.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": "https://github.com/CityOfZion/blockchain-services",
@@ -22,7 +22,7 @@
22
22
  "@ethersproject/properties": "~5.7.0",
23
23
  "@cityofzion/dora-ts": "0.5.1",
24
24
  "date-fns": "~4.1.0",
25
- "@cityofzion/blockchain-service": "1.19.3"
25
+ "@cityofzion/blockchain-service": "1.20.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@ledgerhq/hw-transport-node-hid": "~6.28.5",