@rosen-bridge/tx-pot 1.0.1 → 1.0.3

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,212 +1,284 @@
1
1
  import { DataSource, Repository } from 'typeorm';
2
2
  import { TransactionEntity } from '../db/entities/TransactionEntity';
3
3
  import { AbstractLogger } from '@rosen-bridge/abstract-logger';
4
- import { CallbackFunction, TransactionStatus, TxOptions, ValidatorFunction } from './types';
4
+ import {
5
+ CallbackFunction,
6
+ TransactionStatus,
7
+ TxOptions,
8
+ ValidatorFunction,
9
+ } from './types';
5
10
  import { AbstractPotChainManager } from '../network/AbstractPotChainManager';
6
11
  export declare class TxPot {
7
- protected static instance: TxPot;
8
- protected readonly txRepository: Repository<TransactionEntity>;
9
- protected chains: Map<string, AbstractPotChainManager>;
10
- protected validators: Map<string, Map<string, Map<string, ValidatorFunction>>>;
11
- protected txTypeCallbacks: Map<string, Map<TransactionStatus, Map<string, CallbackFunction>>>;
12
- protected submissionAllowance: Map<string, Map<string, ValidatorFunction>>;
13
- protected logger: AbstractLogger;
14
- protected constructor(dataSource: DataSource, logger?: AbstractLogger);
15
- /**
16
- * initiates TxPot
17
- * @param dataSource typeorm data source
18
- * @param logger
19
- * @returns
20
- */
21
- static setup: (dataSource: DataSource, logger?: AbstractLogger) => TxPot;
22
- /**
23
- * returns TxPot instance (throws error if none exists)
24
- * @returns TxPot instance
25
- */
26
- static getInstance: () => TxPot;
27
- /**
28
- * registers a chain to TxPot
29
- * @param chain
30
- * @param chainManager
31
- */
32
- registerChain: (chain: string, chainManager: AbstractPotChainManager) => void;
33
- /**
34
- * registers a validator function
35
- * @param chain
36
- * @param txType
37
- * @param id
38
- * @param validator
39
- */
40
- registerValidator: (chain: string, txType: string, id: string, validator: ValidatorFunction) => void;
41
- /**
42
- * removes a validator function
43
- * @param chain
44
- * @param txType
45
- * @param id
46
- */
47
- unregisterValidator: (chain: string, txType: string, id: string) => void;
48
- /**
49
- * registers a submit validator function
50
- * @param chain
51
- * @param id
52
- * @param validator
53
- */
54
- registerSubmitValidator: (chain: string, id: string, validator: ValidatorFunction) => void;
55
- /**
56
- * removes a submit validator function
57
- * @param chain
58
- * @param id
59
- */
60
- unregisterSubmitValidator: (chain: string, id: string) => void;
61
- /**
62
- * registers a callback function
63
- * the callback will be called when status of any transactions
64
- * of given type changes to given status
65
- * @param txType
66
- * @param status
67
- * @param id
68
- * @param callback
69
- */
70
- registerCallback: (txType: string, status: TransactionStatus, id: string, callback: CallbackFunction) => void;
71
- /**
72
- * removes a callback function
73
- * @param txType
74
- * @param status
75
- * @param id
76
- */
77
- unregisterCallback: (txType: string, status: TransactionStatus, id: string) => void;
78
- /**
79
- * returns chain manager for given chain
80
- * throws error if no manager is registered for it
81
- * @param chain
82
- */
83
- protected getChainManager: (chain: string) => AbstractPotChainManager;
84
- /**
85
- * sets the tx as invalid if enough blocks is passed from last check
86
- * @param tx
87
- */
88
- protected setTransactionAsInvalid: (tx: TransactionEntity) => Promise<void>;
89
- /**
90
- * validates a transaction
91
- * returns true if no validator functions is set or tx is valid
92
- * otherwise handle the tx as invalid and returns false
93
- * @param tx
94
- */
95
- protected validateTx: (tx: TransactionEntity) => Promise<boolean>;
96
- /**
97
- * checks a transaction for submission
98
- * returns true if no validator functions is set or all validators allow tx to submit
99
- * otherwise returns false
100
- * @param tx
101
- */
102
- protected isSubmitAllowed: (tx: TransactionEntity) => Promise<boolean>;
103
- /**
104
- * updates the status of a tx
105
- * @param txKey tx id and chain
106
- * @param status new status
107
- */
108
- protected setTxStatus: (tx: TransactionEntity, status: TransactionStatus) => Promise<void>;
109
- /**
110
- * @returns current timestamp in seconds and string format
111
- */
112
- protected currentTime: () => string;
113
- /**
114
- * submits the signed transaction to the blockchain
115
- * @param tx
116
- */
117
- protected processSignedTx: (tx: TransactionEntity) => Promise<void>;
118
- /**
119
- * processes the sent transaction
120
- * @param tx
121
- */
122
- protected processesSentTx: (tx: TransactionEntity) => Promise<void>;
123
- /**
124
- * runs all jobs of TxPot
125
- * - process signed txs
126
- * - process sent txs
127
- */
128
- update: () => Promise<void>;
129
- /**
130
- * gets transactions by status
131
- * @param status
132
- * @param validate
133
- * @returns
134
- */
135
- getTxsByStatus: (status: TransactionStatus, validate?: boolean) => Promise<Array<TransactionEntity>>;
136
- /**
137
- * inserts a new transaction into db
138
- * Note: make sure to set `lastCheck` field if initialStatus is `signed` or `sent`
139
- * @param txId
140
- * @param chain
141
- * @param txType
142
- * @param requiredSign
143
- * @param serializedTx
144
- * @param initialStatus
145
- * @param lastCheck last blockchain height that tx was valid
146
- * @param extra
147
- * @param extra2
148
- */
149
- addTx: (txId: string, chain: string, txType: string, requiredSign: number, serializedTx: string, initialStatus?: TransactionStatus, lastCheck?: number, extra?: string | null, extra2?: string | null) => Promise<void>;
150
- /**
151
- * updates the status of a tx
152
- * @param txId
153
- * @param chain
154
- * @param status new status
155
- */
156
- setTxStatusById: (txId: string, chain: string, status: TransactionStatus) => Promise<void>;
157
- /**
158
- * updates tx info when failed in sign process
159
- * @param txId
160
- * @param chain
161
- */
162
- setTxAsSignFailed: (txId: string, chain: string) => Promise<void>;
163
- /**
164
- * updates the tx and set status as signed
165
- * @param txId
166
- * @param chain
167
- * @param serializedTx
168
- * @param currentHeight current height of the blockchain
169
- * @param extra
170
- * @param extra2
171
- */
172
- setTxAsSigned: (txId: string, chain: string, serializedTx: string, currentHeight: number, extra?: string, extra2?: string) => Promise<void>;
173
- /**
174
- * updates last check value of a tx
175
- * @param txId
176
- * @param chain
177
- * @param currentHeight current height of the blockchain
178
- */
179
- updateTxLastCheck: (txId: string, chain: string, currentHeight: number) => Promise<void>;
180
- /**
181
- * updates failedInSign field of a transaction to false
182
- * @param txId
183
- * @param chain
184
- */
185
- resetFailedInSign: (txId: string, chain: string) => Promise<void>;
186
- /**
187
- * updates requiredSign field of a transaction
188
- * @param txId
189
- * @param chain
190
- * @param requiredSign
191
- */
192
- updateRequiredSign: (txId: string, chain: string, requiredSign: number) => Promise<void>;
193
- /**
194
- * gets the transaction by its id and chain
195
- * @param txId
196
- * @param chain
197
- */
198
- getTxByKey: (txId: string, chain: string) => Promise<TransactionEntity | null>;
199
- /**
200
- * @returns the transactions with valid status
201
- */
202
- getTxsQuery: (options?: Array<TxOptions>) => Promise<TransactionEntity[]>;
203
- /**
204
- * updates extra fields of a transaction
205
- * @param txId
206
- * @param chain
207
- * @param extra
208
- * @param extra2
209
- */
210
- updateExtra: (txId: string, chain: string, extra?: string | null, extra2?: string | null) => Promise<void>;
12
+ protected static instance: TxPot;
13
+ protected readonly txRepository: Repository<TransactionEntity>;
14
+ protected chains: Map<string, AbstractPotChainManager>;
15
+ protected validators: Map<
16
+ string,
17
+ Map<string, Map<string, ValidatorFunction>>
18
+ >;
19
+ protected txTypeCallbacks: Map<
20
+ string,
21
+ Map<TransactionStatus, Map<string, CallbackFunction>>
22
+ >;
23
+ protected submissionAllowance: Map<string, Map<string, ValidatorFunction>>;
24
+ protected logger: AbstractLogger;
25
+ protected constructor(dataSource: DataSource, logger?: AbstractLogger);
26
+ /**
27
+ * initiates TxPot
28
+ * @param dataSource typeorm data source
29
+ * @param logger
30
+ * @returns
31
+ */
32
+ static setup: (dataSource: DataSource, logger?: AbstractLogger) => TxPot;
33
+ /**
34
+ * returns TxPot instance (throws error if none exists)
35
+ * @returns TxPot instance
36
+ */
37
+ static getInstance: () => TxPot;
38
+ /**
39
+ * registers a chain to TxPot
40
+ * @param chain
41
+ * @param chainManager
42
+ */
43
+ registerChain: (chain: string, chainManager: AbstractPotChainManager) => void;
44
+ /**
45
+ * registers a validator function
46
+ * @param chain
47
+ * @param txType
48
+ * @param id
49
+ * @param validator
50
+ */
51
+ registerValidator: (
52
+ chain: string,
53
+ txType: string,
54
+ id: string,
55
+ validator: ValidatorFunction
56
+ ) => void;
57
+ /**
58
+ * removes a validator function
59
+ * @param chain
60
+ * @param txType
61
+ * @param id
62
+ */
63
+ unregisterValidator: (chain: string, txType: string, id: string) => void;
64
+ /**
65
+ * registers a submit validator function
66
+ * @param chain
67
+ * @param id
68
+ * @param validator
69
+ */
70
+ registerSubmitValidator: (
71
+ chain: string,
72
+ id: string,
73
+ validator: ValidatorFunction
74
+ ) => void;
75
+ /**
76
+ * removes a submit validator function
77
+ * @param chain
78
+ * @param id
79
+ */
80
+ unregisterSubmitValidator: (chain: string, id: string) => void;
81
+ /**
82
+ * registers a callback function
83
+ * the callback will be called when status of any transactions
84
+ * of given type changes to given status
85
+ * @param txType
86
+ * @param status
87
+ * @param id
88
+ * @param callback
89
+ */
90
+ registerCallback: (
91
+ txType: string,
92
+ status: TransactionStatus,
93
+ id: string,
94
+ callback: CallbackFunction
95
+ ) => void;
96
+ /**
97
+ * removes a callback function
98
+ * @param txType
99
+ * @param status
100
+ * @param id
101
+ */
102
+ unregisterCallback: (
103
+ txType: string,
104
+ status: TransactionStatus,
105
+ id: string
106
+ ) => void;
107
+ /**
108
+ * returns chain manager for given chain
109
+ * throws error if no manager is registered for it
110
+ * @param chain
111
+ */
112
+ protected getChainManager: (chain: string) => AbstractPotChainManager;
113
+ /**
114
+ * sets the tx as invalid if enough blocks is passed from last check
115
+ * @param tx
116
+ */
117
+ protected setTransactionAsInvalid: (tx: TransactionEntity) => Promise<void>;
118
+ /**
119
+ * validates a transaction
120
+ * returns true if no validator functions is set or tx is valid
121
+ * otherwise handle the tx as invalid and returns false
122
+ * @param tx
123
+ */
124
+ protected validateTx: (tx: TransactionEntity) => Promise<boolean>;
125
+ /**
126
+ * checks a transaction for submission
127
+ * returns true if no validator functions is set or all validators allow tx to submit
128
+ * otherwise returns false
129
+ * @param tx
130
+ */
131
+ protected isSubmitAllowed: (tx: TransactionEntity) => Promise<boolean>;
132
+ /**
133
+ * updates the status of a tx
134
+ * @param txKey tx id and chain
135
+ * @param status new status
136
+ */
137
+ protected setTxStatus: (
138
+ tx: TransactionEntity,
139
+ status: TransactionStatus
140
+ ) => Promise<void>;
141
+ /**
142
+ * @returns current timestamp in seconds and string format
143
+ */
144
+ protected currentTime: () => string;
145
+ /**
146
+ * submits the signed transaction to the blockchain
147
+ * @param tx
148
+ */
149
+ protected processSignedTx: (tx: TransactionEntity) => Promise<void>;
150
+ /**
151
+ * processes the sent transaction
152
+ * @param tx
153
+ */
154
+ protected processesSentTx: (tx: TransactionEntity) => Promise<void>;
155
+ /**
156
+ * runs all jobs of TxPot
157
+ * - process signed txs
158
+ * - process sent txs
159
+ */
160
+ update: () => Promise<void>;
161
+ /**
162
+ * gets transactions by status
163
+ * @param status
164
+ * @param validate
165
+ * @returns
166
+ */
167
+ getTxsByStatus: (
168
+ status: TransactionStatus,
169
+ validate?: boolean
170
+ ) => Promise<Array<TransactionEntity>>;
171
+ /**
172
+ * inserts a new transaction into db
173
+ * Note: make sure to set `lastCheck` field if initialStatus is `signed` or `sent`
174
+ * @param txId
175
+ * @param chain
176
+ * @param txType
177
+ * @param requiredSign
178
+ * @param serializedTx
179
+ * @param initialStatus
180
+ * @param lastCheck last blockchain height that tx was valid
181
+ * @param extra
182
+ * @param extra2
183
+ */
184
+ addTx: (
185
+ txId: string,
186
+ chain: string,
187
+ txType: string,
188
+ requiredSign: number,
189
+ serializedTx: string,
190
+ initialStatus?: TransactionStatus,
191
+ lastCheck?: number,
192
+ extra?: string | null,
193
+ extra2?: string | null
194
+ ) => Promise<void>;
195
+ /**
196
+ * updates the status of a tx
197
+ * @param txId
198
+ * @param chain
199
+ * @param status new status
200
+ */
201
+ setTxStatusById: (
202
+ txId: string,
203
+ chain: string,
204
+ status: TransactionStatus
205
+ ) => Promise<void>;
206
+ /**
207
+ * updates tx info when failed in sign process
208
+ * @param txId
209
+ * @param chain
210
+ */
211
+ setTxAsSignFailed: (txId: string, chain: string) => Promise<void>;
212
+ /**
213
+ * updates the tx and set status as signed
214
+ * @param txId
215
+ * @param chain
216
+ * @param serializedTx
217
+ * @param currentHeight current height of the blockchain
218
+ * @param extra
219
+ * @param extra2
220
+ */
221
+ setTxAsSigned: (
222
+ txId: string,
223
+ chain: string,
224
+ serializedTx: string,
225
+ currentHeight: number,
226
+ extra?: string,
227
+ extra2?: string
228
+ ) => Promise<void>;
229
+ /**
230
+ * updates last check value of a tx
231
+ * @param txId
232
+ * @param chain
233
+ * @param currentHeight current height of the blockchain
234
+ */
235
+ updateTxLastCheck: (
236
+ txId: string,
237
+ chain: string,
238
+ currentHeight: number
239
+ ) => Promise<void>;
240
+ /**
241
+ * updates failedInSign field of a transaction to false
242
+ * @param txId
243
+ * @param chain
244
+ */
245
+ resetFailedInSign: (txId: string, chain: string) => Promise<void>;
246
+ /**
247
+ * updates requiredSign field of a transaction
248
+ * @param txId
249
+ * @param chain
250
+ * @param requiredSign
251
+ */
252
+ updateRequiredSign: (
253
+ txId: string,
254
+ chain: string,
255
+ requiredSign: number
256
+ ) => Promise<void>;
257
+ /**
258
+ * gets the transaction by its id and chain
259
+ * @param txId
260
+ * @param chain
261
+ */
262
+ getTxByKey: (
263
+ txId: string,
264
+ chain: string
265
+ ) => Promise<TransactionEntity | null>;
266
+ /**
267
+ * @returns the transactions with valid status
268
+ */
269
+ getTxsQuery: (options?: Array<TxOptions>) => Promise<TransactionEntity[]>;
270
+ /**
271
+ * updates extra fields of a transaction
272
+ * @param txId
273
+ * @param chain
274
+ * @param extra
275
+ * @param extra2
276
+ */
277
+ updateExtra: (
278
+ txId: string,
279
+ chain: string,
280
+ extra?: string | null,
281
+ extra2?: string | null
282
+ ) => Promise<void>;
211
283
  }
212
- //# sourceMappingURL=TxPot.d.ts.map
284
+ //# sourceMappingURL=TxPot.d.ts.map
@@ -2,34 +2,37 @@ import { TransactionEntity } from '../db/entities/TransactionEntity';
2
2
  export type ChainRequiredConfirmations = Record<string, number>;
3
3
  export type RequiredConfirmations = Record<string, ChainRequiredConfirmations>;
4
4
  export type ValidatorFunction = (tx: TransactionEntity) => Promise<boolean>;
5
- export type CallbackFunction = (tx: TransactionEntity, newStatus: TransactionStatus) => Promise<void>;
5
+ export type CallbackFunction = (
6
+ tx: TransactionEntity,
7
+ newStatus: TransactionStatus
8
+ ) => Promise<void>;
6
9
  export declare enum TransactionStatus {
7
- APPROVED = "approved",
8
- IN_SIGN = "in-sign",
9
- SIGN_FAILED = "sign-failed",
10
- SIGNED = "signed",
11
- SENT = "sent",
12
- INVALID = "invalid",
13
- COMPLETED = "completed"
10
+ APPROVED = 'approved',
11
+ IN_SIGN = 'in-sign',
12
+ SIGN_FAILED = 'sign-failed',
13
+ SIGNED = 'signed',
14
+ SENT = 'sent',
15
+ INVALID = 'invalid',
16
+ COMPLETED = 'completed',
14
17
  }
15
18
  export declare enum SigningStatus {
16
- Signed = 0,
17
- UnSigned = 1
19
+ Signed = 0,
20
+ UnSigned = 1,
18
21
  }
19
22
  export type FieldValue<T> = T | Array<T>;
20
23
  export interface FieldOption<T> {
21
- not: boolean;
22
- value: FieldValue<T>;
24
+ not: boolean;
25
+ value: FieldValue<T>;
23
26
  }
24
27
  export interface TxOptions {
25
- txId?: FieldValue<string>;
26
- chain?: string;
27
- txType?: string;
28
- status?: FieldOption<TransactionStatus>;
29
- failedInSign?: boolean;
30
- extra?: FieldValue<string | null>;
28
+ txId?: FieldValue<string>;
29
+ chain?: string;
30
+ txType?: string;
31
+ status?: FieldOption<TransactionStatus>;
32
+ failedInSign?: boolean;
33
+ extra?: FieldValue<string | null>;
31
34
  }
32
35
  export declare class UnregisteredChain extends Error {
33
- constructor(msg: string);
36
+ constructor(msg: string);
34
37
  }
35
- //# sourceMappingURL=types.d.ts.map
38
+ //# sourceMappingURL=types.d.ts.map
@@ -1,21 +1,21 @@
1
1
  export var TransactionStatus;
2
2
  (function (TransactionStatus) {
3
- TransactionStatus["APPROVED"] = "approved";
4
- TransactionStatus["IN_SIGN"] = "in-sign";
5
- TransactionStatus["SIGN_FAILED"] = "sign-failed";
6
- TransactionStatus["SIGNED"] = "signed";
7
- TransactionStatus["SENT"] = "sent";
8
- TransactionStatus["INVALID"] = "invalid";
9
- TransactionStatus["COMPLETED"] = "completed";
3
+ TransactionStatus['APPROVED'] = 'approved';
4
+ TransactionStatus['IN_SIGN'] = 'in-sign';
5
+ TransactionStatus['SIGN_FAILED'] = 'sign-failed';
6
+ TransactionStatus['SIGNED'] = 'signed';
7
+ TransactionStatus['SENT'] = 'sent';
8
+ TransactionStatus['INVALID'] = 'invalid';
9
+ TransactionStatus['COMPLETED'] = 'completed';
10
10
  })(TransactionStatus || (TransactionStatus = {}));
11
11
  export var SigningStatus;
12
12
  (function (SigningStatus) {
13
- SigningStatus[SigningStatus["Signed"] = 0] = "Signed";
14
- SigningStatus[SigningStatus["UnSigned"] = 1] = "UnSigned";
13
+ SigningStatus[(SigningStatus['Signed'] = 0)] = 'Signed';
14
+ SigningStatus[(SigningStatus['UnSigned'] = 1)] = 'UnSigned';
15
15
  })(SigningStatus || (SigningStatus = {}));
16
16
  export class UnregisteredChain extends Error {
17
- constructor(msg) {
18
- super('UnregisteredChain: ' + msg);
19
- }
17
+ constructor(msg) {
18
+ super('UnregisteredChain: ' + msg);
19
+ }
20
20
  }
21
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvdHJhbnNhY3Rpb24vdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBV0EsTUFBTSxDQUFOLElBQVksaUJBUVg7QUFSRCxXQUFZLGlCQUFpQjtJQUMzQiwwQ0FBcUIsQ0FBQTtJQUNyQix3Q0FBbUIsQ0FBQTtJQUNuQixnREFBMkIsQ0FBQTtJQUMzQixzQ0FBaUIsQ0FBQTtJQUNqQixrQ0FBYSxDQUFBO0lBQ2Isd0NBQW1CLENBQUE7SUFDbkIsNENBQXVCLENBQUE7QUFDekIsQ0FBQyxFQVJXLGlCQUFpQixLQUFqQixpQkFBaUIsUUFRNUI7QUFFRCxNQUFNLENBQU4sSUFBWSxhQUdYO0FBSEQsV0FBWSxhQUFhO0lBQ3ZCLHFEQUF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