forked from tornado-packages/tornado-core
Rename DepositsService to TornadoService and export saveEventsPromise
This commit is contained in:
parent
e7412f3d98
commit
4623e386a1
7
dist/events/base.d.ts
vendored
7
dist/events/base.d.ts
vendored
@ -38,6 +38,7 @@ export declare class BaseEventsService<EventType extends MinimalEvents> {
|
|||||||
deployedBlock: number;
|
deployedBlock: number;
|
||||||
batchEventsService: BatchEventsService;
|
batchEventsService: BatchEventsService;
|
||||||
fetchDataOptions?: fetchDataOptions;
|
fetchDataOptions?: fetchDataOptions;
|
||||||
|
saveEventsPromise?: Promise<void>;
|
||||||
constructor({ netId, provider, graphApi, subgraphName, contract, type, deployedBlock, fetchDataOptions, }: BaseEventsServiceConstructor);
|
constructor({ netId, provider, graphApi, subgraphName, contract, type, deployedBlock, fetchDataOptions, }: BaseEventsServiceConstructor);
|
||||||
getInstanceName(): string;
|
getInstanceName(): string;
|
||||||
getType(): string;
|
getType(): string;
|
||||||
@ -81,7 +82,7 @@ export declare class BaseEventsService<EventType extends MinimalEvents> {
|
|||||||
lastBlock: number | null;
|
lastBlock: number | null;
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
export type BaseDepositsServiceConstructor = {
|
export type BaseTornadoServiceConstructor = {
|
||||||
netId: NetIdType;
|
netId: NetIdType;
|
||||||
provider: Provider;
|
provider: Provider;
|
||||||
graphApi?: string;
|
graphApi?: string;
|
||||||
@ -97,12 +98,12 @@ export type DepositsGraphParams = BaseGraphParams & {
|
|||||||
amount: string;
|
amount: string;
|
||||||
currency: string;
|
currency: string;
|
||||||
};
|
};
|
||||||
export declare class BaseDepositsService extends BaseEventsService<DepositsEvents | WithdrawalsEvents> {
|
export declare class BaseTornadoService extends BaseEventsService<DepositsEvents | WithdrawalsEvents> {
|
||||||
amount: string;
|
amount: string;
|
||||||
currency: string;
|
currency: string;
|
||||||
batchTransactionService: BatchTransactionService;
|
batchTransactionService: BatchTransactionService;
|
||||||
batchBlockService: BatchBlockService;
|
batchBlockService: BatchBlockService;
|
||||||
constructor({ netId, provider, graphApi, subgraphName, Tornado, type, amount, currency, deployedBlock, fetchDataOptions, }: BaseDepositsServiceConstructor);
|
constructor({ netId, provider, graphApi, subgraphName, Tornado, type, amount, currency, deployedBlock, fetchDataOptions, }: BaseTornadoServiceConstructor);
|
||||||
getInstanceName(): string;
|
getInstanceName(): string;
|
||||||
getGraphMethod(): string;
|
getGraphMethod(): string;
|
||||||
getGraphParams(): DepositsGraphParams;
|
getGraphParams(): DepositsGraphParams;
|
||||||
|
8
dist/events/node.d.ts
vendored
8
dist/events/node.d.ts
vendored
@ -1,14 +1,14 @@
|
|||||||
import { BatchBlockOnProgress, BatchEventOnProgress } from '../batch';
|
import { BatchBlockOnProgress, BatchEventOnProgress } from '../batch';
|
||||||
import { BaseDepositsService, BaseEncryptedNotesService, BaseGovernanceService, BaseRegistryService, BaseDepositsServiceConstructor, BaseEncryptedNotesServiceConstructor, BaseGovernanceServiceConstructor, BaseRegistryServiceConstructor, BaseEchoServiceConstructor, BaseEchoService } from './base';
|
import { BaseTornadoService, BaseEncryptedNotesService, BaseGovernanceService, BaseRegistryService, BaseTornadoServiceConstructor, BaseEncryptedNotesServiceConstructor, BaseGovernanceServiceConstructor, BaseRegistryServiceConstructor, BaseEchoServiceConstructor, BaseEchoService } from './base';
|
||||||
import type { BaseEvents, DepositsEvents, WithdrawalsEvents, EncryptedNotesEvents, RegistersEvents, AllGovernanceEvents, EchoEvents } from './types';
|
import type { BaseEvents, DepositsEvents, WithdrawalsEvents, EncryptedNotesEvents, RegistersEvents, AllGovernanceEvents, EchoEvents } from './types';
|
||||||
export type NodeDepositsServiceConstructor = BaseDepositsServiceConstructor & {
|
export type NodeTornadoServiceConstructor = BaseTornadoServiceConstructor & {
|
||||||
cacheDirectory?: string;
|
cacheDirectory?: string;
|
||||||
userDirectory?: string;
|
userDirectory?: string;
|
||||||
};
|
};
|
||||||
export declare class NodeDepositsService extends BaseDepositsService {
|
export declare class NodeTornadoService extends BaseTornadoService {
|
||||||
cacheDirectory?: string;
|
cacheDirectory?: string;
|
||||||
userDirectory?: string;
|
userDirectory?: string;
|
||||||
constructor({ netId, provider, graphApi, subgraphName, Tornado, type, amount, currency, deployedBlock, fetchDataOptions, cacheDirectory, userDirectory, }: NodeDepositsServiceConstructor);
|
constructor({ netId, provider, graphApi, subgraphName, Tornado, type, amount, currency, deployedBlock, fetchDataOptions, cacheDirectory, userDirectory, }: NodeTornadoServiceConstructor);
|
||||||
updateEventProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
|
updateEventProgress({ type, fromBlock, toBlock, count }: Parameters<BatchEventOnProgress>[0]): void;
|
||||||
updateTransactionProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
|
updateTransactionProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
|
||||||
updateBlockProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
|
updateBlockProgress({ currentIndex, totalIndex }: Parameters<BatchBlockOnProgress>[0]): void;
|
||||||
|
10
dist/index.js
vendored
10
dist/index.js
vendored
@ -4638,7 +4638,7 @@ class BaseEventsService {
|
|||||||
});
|
});
|
||||||
const lastBlock = newEvents ? newEvents.lastBlock : allEvents[allEvents.length - 1] ? allEvents[allEvents.length - 1].blockNumber : null;
|
const lastBlock = newEvents ? newEvents.lastBlock : allEvents[allEvents.length - 1] ? allEvents[allEvents.length - 1].blockNumber : null;
|
||||||
this.validateEvents({ events: allEvents, lastBlock });
|
this.validateEvents({ events: allEvents, lastBlock });
|
||||||
yield this.saveEvents({ events: allEvents, lastBlock });
|
this.saveEventsPromise = this.saveEvents({ events: allEvents, lastBlock });
|
||||||
return {
|
return {
|
||||||
events: allEvents,
|
events: allEvents,
|
||||||
lastBlock
|
lastBlock
|
||||||
@ -4646,7 +4646,7 @@ class BaseEventsService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class BaseDepositsService extends BaseEventsService {
|
class BaseTornadoService extends BaseEventsService {
|
||||||
constructor({
|
constructor({
|
||||||
netId,
|
netId,
|
||||||
provider,
|
provider,
|
||||||
@ -5144,7 +5144,7 @@ var __async$9 = (__this, __arguments, generator) => {
|
|||||||
step((generator = generator.apply(__this, __arguments)).next());
|
step((generator = generator.apply(__this, __arguments)).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
class NodeDepositsService extends BaseDepositsService {
|
class NodeTornadoService extends BaseTornadoService {
|
||||||
constructor({
|
constructor({
|
||||||
netId,
|
netId,
|
||||||
provider,
|
provider,
|
||||||
@ -7889,12 +7889,12 @@ function calculateSnarkProof(input, circuit, provingKey) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.BaseDepositsService = BaseDepositsService;
|
|
||||||
exports.BaseEchoService = BaseEchoService;
|
exports.BaseEchoService = BaseEchoService;
|
||||||
exports.BaseEncryptedNotesService = BaseEncryptedNotesService;
|
exports.BaseEncryptedNotesService = BaseEncryptedNotesService;
|
||||||
exports.BaseEventsService = BaseEventsService;
|
exports.BaseEventsService = BaseEventsService;
|
||||||
exports.BaseGovernanceService = BaseGovernanceService;
|
exports.BaseGovernanceService = BaseGovernanceService;
|
||||||
exports.BaseRegistryService = BaseRegistryService;
|
exports.BaseRegistryService = BaseRegistryService;
|
||||||
|
exports.BaseTornadoService = BaseTornadoService;
|
||||||
exports.BatchBlockService = BatchBlockService;
|
exports.BatchBlockService = BatchBlockService;
|
||||||
exports.BatchEventsService = BatchEventsService;
|
exports.BatchEventsService = BatchEventsService;
|
||||||
exports.BatchTransactionService = BatchTransactionService;
|
exports.BatchTransactionService = BatchTransactionService;
|
||||||
@ -7918,11 +7918,11 @@ exports.MerkleTreeService = MerkleTreeService;
|
|||||||
exports.Mimc = Mimc;
|
exports.Mimc = Mimc;
|
||||||
exports.Multicall__factory = Multicall__factory;
|
exports.Multicall__factory = Multicall__factory;
|
||||||
exports.NetId = NetId;
|
exports.NetId = NetId;
|
||||||
exports.NodeDepositsService = NodeDepositsService;
|
|
||||||
exports.NodeEchoService = NodeEchoService;
|
exports.NodeEchoService = NodeEchoService;
|
||||||
exports.NodeEncryptedNotesService = NodeEncryptedNotesService;
|
exports.NodeEncryptedNotesService = NodeEncryptedNotesService;
|
||||||
exports.NodeGovernanceService = NodeGovernanceService;
|
exports.NodeGovernanceService = NodeGovernanceService;
|
||||||
exports.NodeRegistryService = NodeRegistryService;
|
exports.NodeRegistryService = NodeRegistryService;
|
||||||
|
exports.NodeTornadoService = NodeTornadoService;
|
||||||
exports.NoteAccount = NoteAccount;
|
exports.NoteAccount = NoteAccount;
|
||||||
exports.OffchainOracle__factory = OffchainOracle__factory;
|
exports.OffchainOracle__factory = OffchainOracle__factory;
|
||||||
exports.OvmGasPriceOracle__factory = OvmGasPriceOracle__factory;
|
exports.OvmGasPriceOracle__factory = OvmGasPriceOracle__factory;
|
||||||
|
8
dist/index.mjs
vendored
8
dist/index.mjs
vendored
@ -4617,7 +4617,7 @@ class BaseEventsService {
|
|||||||
});
|
});
|
||||||
const lastBlock = newEvents ? newEvents.lastBlock : allEvents[allEvents.length - 1] ? allEvents[allEvents.length - 1].blockNumber : null;
|
const lastBlock = newEvents ? newEvents.lastBlock : allEvents[allEvents.length - 1] ? allEvents[allEvents.length - 1].blockNumber : null;
|
||||||
this.validateEvents({ events: allEvents, lastBlock });
|
this.validateEvents({ events: allEvents, lastBlock });
|
||||||
yield this.saveEvents({ events: allEvents, lastBlock });
|
this.saveEventsPromise = this.saveEvents({ events: allEvents, lastBlock });
|
||||||
return {
|
return {
|
||||||
events: allEvents,
|
events: allEvents,
|
||||||
lastBlock
|
lastBlock
|
||||||
@ -4625,7 +4625,7 @@ class BaseEventsService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class BaseDepositsService extends BaseEventsService {
|
class BaseTornadoService extends BaseEventsService {
|
||||||
constructor({
|
constructor({
|
||||||
netId,
|
netId,
|
||||||
provider,
|
provider,
|
||||||
@ -5123,7 +5123,7 @@ var __async$9 = (__this, __arguments, generator) => {
|
|||||||
step((generator = generator.apply(__this, __arguments)).next());
|
step((generator = generator.apply(__this, __arguments)).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
class NodeDepositsService extends BaseDepositsService {
|
class NodeTornadoService extends BaseTornadoService {
|
||||||
constructor({
|
constructor({
|
||||||
netId,
|
netId,
|
||||||
provider,
|
provider,
|
||||||
@ -7868,4 +7868,4 @@ function calculateSnarkProof(input, circuit, provingKey) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export { BaseDepositsService, BaseEchoService, BaseEncryptedNotesService, BaseEventsService, BaseGovernanceService, BaseRegistryService, BatchBlockService, BatchEventsService, BatchTransactionService, DEPOSIT, Deposit, ENS__factory, ERC20__factory, GET_DEPOSITS, GET_ECHO_EVENTS, GET_ENCRYPTED_NOTES, GET_GOVERNANCE_APY, GET_GOVERNANCE_EVENTS, GET_NOTE_ACCOUNTS, GET_REGISTERED, GET_STATISTIC, GET_WITHDRAWALS, GasPriceOracle__factory, Invoice, MIN_STAKE_BALANCE, MerkleTreeService, Mimc, Multicall__factory, NetId, NodeDepositsService, NodeEchoService, NodeEncryptedNotesService, NodeGovernanceService, NodeRegistryService, NoteAccount, OffchainOracle__factory, OvmGasPriceOracle__factory, Pedersen, RelayerClient, ReverseRecords__factory, TokenPriceOracle, TornadoBrowserProvider, TornadoFeeOracle, TornadoRpcSigner, TornadoVoidSigner, TornadoWallet, TreeCache, WITHDRAWAL, _META, addNetwork, ajv, base64ToBytes, bigIntReplacer, bnToBytes, buffPedersenHash, bufferToBytes, bytesToBN, bytesToBase64, bytesToHex, calculateScore, calculateSnarkProof, chunk, concatBytes, convertETHToTokenAmount, createDeposit, crypto, customConfig, defaultConfig, defaultUserAgent, download, enabledChains, existsAsync, index as factories, fetch, fetchData, fetchGetUrlFunc, getAllDeposits, getAllEncryptedNotes, getAllGovernanceEvents, getAllGraphEchoEvents, getAllRegisters, getAllWithdrawals, getConfig, getDeposits, getEncryptedNotes, getGasOraclePlugin, getGovernanceEvents, getGraphEchoEvents, getHttpAgent, getInstanceByAddress, getMeta, getNetworkConfig, getNoteAccounts, getProvider, getProviderWithNetId, getRegisters, getStatistic, getStatusSchema, getSubdomains, getSupportedInstances, getTokenBalances, getWeightRandom, getWithdrawals, hexToBytes, initGroth16, isNode, isRelayerUpdated, jobsSchema, leBuff2Int, leInt2Buff, loadCachedEvents, loadSavedEvents, mimc, multicall, packEncryptedMessage, parseAddress, parseKey, parseMnemonic, parseNumber, parseRecoveryKey, parseRelayer, parseSemanticVersion, parseUrl, pedersen, pickWeightedRandomRelayer, populateTransaction, queryGraph, rBigInt, saveUserFile, sleep, substring, toFixedHex, toFixedLength, unpackEncryptedMessage, unzipAsync, validateUrl, zipAsync };
|
export { BaseEchoService, BaseEncryptedNotesService, BaseEventsService, BaseGovernanceService, BaseRegistryService, BaseTornadoService, BatchBlockService, BatchEventsService, BatchTransactionService, DEPOSIT, Deposit, ENS__factory, ERC20__factory, GET_DEPOSITS, GET_ECHO_EVENTS, GET_ENCRYPTED_NOTES, GET_GOVERNANCE_APY, GET_GOVERNANCE_EVENTS, GET_NOTE_ACCOUNTS, GET_REGISTERED, GET_STATISTIC, GET_WITHDRAWALS, GasPriceOracle__factory, Invoice, MIN_STAKE_BALANCE, MerkleTreeService, Mimc, Multicall__factory, NetId, NodeEchoService, NodeEncryptedNotesService, NodeGovernanceService, NodeRegistryService, NodeTornadoService, NoteAccount, OffchainOracle__factory, OvmGasPriceOracle__factory, Pedersen, RelayerClient, ReverseRecords__factory, TokenPriceOracle, TornadoBrowserProvider, TornadoFeeOracle, TornadoRpcSigner, TornadoVoidSigner, TornadoWallet, TreeCache, WITHDRAWAL, _META, addNetwork, ajv, base64ToBytes, bigIntReplacer, bnToBytes, buffPedersenHash, bufferToBytes, bytesToBN, bytesToBase64, bytesToHex, calculateScore, calculateSnarkProof, chunk, concatBytes, convertETHToTokenAmount, createDeposit, crypto, customConfig, defaultConfig, defaultUserAgent, download, enabledChains, existsAsync, index as factories, fetch, fetchData, fetchGetUrlFunc, getAllDeposits, getAllEncryptedNotes, getAllGovernanceEvents, getAllGraphEchoEvents, getAllRegisters, getAllWithdrawals, getConfig, getDeposits, getEncryptedNotes, getGasOraclePlugin, getGovernanceEvents, getGraphEchoEvents, getHttpAgent, getInstanceByAddress, getMeta, getNetworkConfig, getNoteAccounts, getProvider, getProviderWithNetId, getRegisters, getStatistic, getStatusSchema, getSubdomains, getSupportedInstances, getTokenBalances, getWeightRandom, getWithdrawals, hexToBytes, initGroth16, isNode, isRelayerUpdated, jobsSchema, leBuff2Int, leInt2Buff, loadCachedEvents, loadSavedEvents, mimc, multicall, packEncryptedMessage, parseAddress, parseKey, parseMnemonic, parseNumber, parseRecoveryKey, parseRelayer, parseSemanticVersion, parseUrl, pedersen, pickWeightedRandomRelayer, populateTransaction, queryGraph, rBigInt, saveUserFile, sleep, substring, toFixedHex, toFixedLength, unpackEncryptedMessage, unzipAsync, validateUrl, zipAsync };
|
||||||
|
14
dist/index.umd.js
vendored
14
dist/index.umd.js
vendored
@ -63898,8 +63898,8 @@ class NoteAccount {
|
|||||||
/* harmony export */ Lx: () => (/* binding */ DEPOSIT),
|
/* harmony export */ Lx: () => (/* binding */ DEPOSIT),
|
||||||
/* harmony export */ O_: () => (/* binding */ BaseEncryptedNotesService),
|
/* harmony export */ O_: () => (/* binding */ BaseEncryptedNotesService),
|
||||||
/* harmony export */ cE: () => (/* binding */ BaseRegistryService),
|
/* harmony export */ cE: () => (/* binding */ BaseRegistryService),
|
||||||
|
/* harmony export */ e0: () => (/* binding */ BaseTornadoService),
|
||||||
/* harmony export */ oW: () => (/* binding */ WITHDRAWAL),
|
/* harmony export */ oW: () => (/* binding */ WITHDRAWAL),
|
||||||
/* harmony export */ qD: () => (/* binding */ BaseDepositsService),
|
|
||||||
/* harmony export */ uw: () => (/* binding */ BaseEventsService)
|
/* harmony export */ uw: () => (/* binding */ BaseEventsService)
|
||||||
/* harmony export */ });
|
/* harmony export */ });
|
||||||
/* harmony import */ var ethers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30031);
|
/* harmony import */ var ethers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30031);
|
||||||
@ -64154,7 +64154,7 @@ class BaseEventsService {
|
|||||||
});
|
});
|
||||||
const lastBlock = newEvents ? newEvents.lastBlock : allEvents[allEvents.length - 1] ? allEvents[allEvents.length - 1].blockNumber : null;
|
const lastBlock = newEvents ? newEvents.lastBlock : allEvents[allEvents.length - 1] ? allEvents[allEvents.length - 1].blockNumber : null;
|
||||||
this.validateEvents({ events: allEvents, lastBlock });
|
this.validateEvents({ events: allEvents, lastBlock });
|
||||||
yield this.saveEvents({ events: allEvents, lastBlock });
|
this.saveEventsPromise = this.saveEvents({ events: allEvents, lastBlock });
|
||||||
return {
|
return {
|
||||||
events: allEvents,
|
events: allEvents,
|
||||||
lastBlock
|
lastBlock
|
||||||
@ -64162,7 +64162,7 @@ class BaseEventsService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class BaseDepositsService extends BaseEventsService {
|
class BaseTornadoService extends BaseEventsService {
|
||||||
constructor({
|
constructor({
|
||||||
netId,
|
netId,
|
||||||
provider,
|
provider,
|
||||||
@ -64509,18 +64509,18 @@ class BaseRegistryService extends BaseEventsService {
|
|||||||
"use strict";
|
"use strict";
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
/* harmony export */ BaseDepositsService: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.qD),
|
|
||||||
/* harmony export */ BaseEchoService: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.GS),
|
/* harmony export */ BaseEchoService: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.GS),
|
||||||
/* harmony export */ BaseEncryptedNotesService: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.O_),
|
/* harmony export */ BaseEncryptedNotesService: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.O_),
|
||||||
/* harmony export */ BaseEventsService: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.uw),
|
/* harmony export */ BaseEventsService: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.uw),
|
||||||
/* harmony export */ BaseGovernanceService: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.JJ),
|
/* harmony export */ BaseGovernanceService: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.JJ),
|
||||||
/* harmony export */ BaseRegistryService: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.cE),
|
/* harmony export */ BaseRegistryService: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.cE),
|
||||||
|
/* harmony export */ BaseTornadoService: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.e0),
|
||||||
/* harmony export */ DEPOSIT: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.Lx),
|
/* harmony export */ DEPOSIT: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.Lx),
|
||||||
/* harmony export */ NodeDepositsService: () => (/* reexport safe */ _node__WEBPACK_IMPORTED_MODULE_2__.fD),
|
|
||||||
/* harmony export */ NodeEchoService: () => (/* reexport safe */ _node__WEBPACK_IMPORTED_MODULE_2__.Rl),
|
/* harmony export */ NodeEchoService: () => (/* reexport safe */ _node__WEBPACK_IMPORTED_MODULE_2__.Rl),
|
||||||
/* harmony export */ NodeEncryptedNotesService: () => (/* reexport safe */ _node__WEBPACK_IMPORTED_MODULE_2__.l5),
|
/* harmony export */ NodeEncryptedNotesService: () => (/* reexport safe */ _node__WEBPACK_IMPORTED_MODULE_2__.l5),
|
||||||
/* harmony export */ NodeGovernanceService: () => (/* reexport safe */ _node__WEBPACK_IMPORTED_MODULE_2__.Om),
|
/* harmony export */ NodeGovernanceService: () => (/* reexport safe */ _node__WEBPACK_IMPORTED_MODULE_2__.Om),
|
||||||
/* harmony export */ NodeRegistryService: () => (/* reexport safe */ _node__WEBPACK_IMPORTED_MODULE_2__.b5),
|
/* harmony export */ NodeRegistryService: () => (/* reexport safe */ _node__WEBPACK_IMPORTED_MODULE_2__.b5),
|
||||||
|
/* harmony export */ NodeTornadoService: () => (/* reexport safe */ _node__WEBPACK_IMPORTED_MODULE_2__.$X),
|
||||||
/* harmony export */ WITHDRAWAL: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.oW)
|
/* harmony export */ WITHDRAWAL: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_1__.oW)
|
||||||
/* harmony export */ });
|
/* harmony export */ });
|
||||||
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61060);
|
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61060);
|
||||||
@ -64543,10 +64543,10 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ $X: () => (/* binding */ NodeTornadoService),
|
||||||
/* harmony export */ Om: () => (/* binding */ NodeGovernanceService),
|
/* harmony export */ Om: () => (/* binding */ NodeGovernanceService),
|
||||||
/* harmony export */ Rl: () => (/* binding */ NodeEchoService),
|
/* harmony export */ Rl: () => (/* binding */ NodeEchoService),
|
||||||
/* harmony export */ b5: () => (/* binding */ NodeRegistryService),
|
/* harmony export */ b5: () => (/* binding */ NodeRegistryService),
|
||||||
/* harmony export */ fD: () => (/* binding */ NodeDepositsService),
|
|
||||||
/* harmony export */ l5: () => (/* binding */ NodeEncryptedNotesService)
|
/* harmony export */ l5: () => (/* binding */ NodeEncryptedNotesService)
|
||||||
/* harmony export */ });
|
/* harmony export */ });
|
||||||
/* harmony import */ var cli_table3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29530);
|
/* harmony import */ var cli_table3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29530);
|
||||||
@ -64581,7 +64581,7 @@ var __async = (__this, __arguments, generator) => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class NodeDepositsService extends _base__WEBPACK_IMPORTED_MODULE_3__/* .BaseDepositsService */ .qD {
|
class NodeTornadoService extends _base__WEBPACK_IMPORTED_MODULE_3__/* .BaseTornadoService */ .e0 {
|
||||||
constructor({
|
constructor({
|
||||||
netId,
|
netId,
|
||||||
provider,
|
provider,
|
||||||
|
@ -77,6 +77,8 @@ export class BaseEventsService<EventType extends MinimalEvents> {
|
|||||||
batchEventsService: BatchEventsService;
|
batchEventsService: BatchEventsService;
|
||||||
fetchDataOptions?: fetchDataOptions;
|
fetchDataOptions?: fetchDataOptions;
|
||||||
|
|
||||||
|
saveEventsPromise?: Promise<void>;
|
||||||
|
|
||||||
constructor({
|
constructor({
|
||||||
netId,
|
netId,
|
||||||
provider,
|
provider,
|
||||||
@ -315,7 +317,7 @@ export class BaseEventsService<EventType extends MinimalEvents> {
|
|||||||
|
|
||||||
this.validateEvents({ events: allEvents, lastBlock });
|
this.validateEvents({ events: allEvents, lastBlock });
|
||||||
|
|
||||||
await this.saveEvents({ events: allEvents, lastBlock });
|
this.saveEventsPromise = this.saveEvents({ events: allEvents, lastBlock });
|
||||||
|
|
||||||
return {
|
return {
|
||||||
events: allEvents,
|
events: allEvents,
|
||||||
@ -324,7 +326,7 @@ export class BaseEventsService<EventType extends MinimalEvents> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BaseDepositsServiceConstructor = {
|
export type BaseTornadoServiceConstructor = {
|
||||||
netId: NetIdType;
|
netId: NetIdType;
|
||||||
provider: Provider;
|
provider: Provider;
|
||||||
graphApi?: string;
|
graphApi?: string;
|
||||||
@ -342,7 +344,7 @@ export type DepositsGraphParams = BaseGraphParams & {
|
|||||||
currency: string;
|
currency: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export class BaseDepositsService extends BaseEventsService<DepositsEvents | WithdrawalsEvents> {
|
export class BaseTornadoService extends BaseEventsService<DepositsEvents | WithdrawalsEvents> {
|
||||||
amount: string;
|
amount: string;
|
||||||
currency: string;
|
currency: string;
|
||||||
batchTransactionService: BatchTransactionService;
|
batchTransactionService: BatchTransactionService;
|
||||||
@ -359,7 +361,7 @@ export class BaseDepositsService extends BaseEventsService<DepositsEvents | With
|
|||||||
currency,
|
currency,
|
||||||
deployedBlock,
|
deployedBlock,
|
||||||
fetchDataOptions,
|
fetchDataOptions,
|
||||||
}: BaseDepositsServiceConstructor) {
|
}: BaseTornadoServiceConstructor) {
|
||||||
super({ netId, provider, graphApi, subgraphName, contract: Tornado, type, deployedBlock, fetchDataOptions });
|
super({ netId, provider, graphApi, subgraphName, contract: Tornado, type, deployedBlock, fetchDataOptions });
|
||||||
|
|
||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
|
@ -3,11 +3,11 @@ import moment from 'moment';
|
|||||||
import { BatchBlockOnProgress, BatchEventOnProgress } from '../batch';
|
import { BatchBlockOnProgress, BatchEventOnProgress } from '../batch';
|
||||||
import { saveUserFile, loadSavedEvents, loadCachedEvents } from '../data';
|
import { saveUserFile, loadSavedEvents, loadCachedEvents } from '../data';
|
||||||
import {
|
import {
|
||||||
BaseDepositsService,
|
BaseTornadoService,
|
||||||
BaseEncryptedNotesService,
|
BaseEncryptedNotesService,
|
||||||
BaseGovernanceService,
|
BaseGovernanceService,
|
||||||
BaseRegistryService,
|
BaseRegistryService,
|
||||||
BaseDepositsServiceConstructor,
|
BaseTornadoServiceConstructor,
|
||||||
BaseEncryptedNotesServiceConstructor,
|
BaseEncryptedNotesServiceConstructor,
|
||||||
BaseGovernanceServiceConstructor,
|
BaseGovernanceServiceConstructor,
|
||||||
BaseRegistryServiceConstructor,
|
BaseRegistryServiceConstructor,
|
||||||
@ -24,12 +24,12 @@ import type {
|
|||||||
EchoEvents,
|
EchoEvents,
|
||||||
} from './types';
|
} from './types';
|
||||||
|
|
||||||
export type NodeDepositsServiceConstructor = BaseDepositsServiceConstructor & {
|
export type NodeTornadoServiceConstructor = BaseTornadoServiceConstructor & {
|
||||||
cacheDirectory?: string;
|
cacheDirectory?: string;
|
||||||
userDirectory?: string;
|
userDirectory?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export class NodeDepositsService extends BaseDepositsService {
|
export class NodeTornadoService extends BaseTornadoService {
|
||||||
cacheDirectory?: string;
|
cacheDirectory?: string;
|
||||||
userDirectory?: string;
|
userDirectory?: string;
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ export class NodeDepositsService extends BaseDepositsService {
|
|||||||
fetchDataOptions,
|
fetchDataOptions,
|
||||||
cacheDirectory,
|
cacheDirectory,
|
||||||
userDirectory,
|
userDirectory,
|
||||||
}: NodeDepositsServiceConstructor) {
|
}: NodeTornadoServiceConstructor) {
|
||||||
super({
|
super({
|
||||||
netId,
|
netId,
|
||||||
provider,
|
provider,
|
||||||
|
Loading…
Reference in New Issue
Block a user