@rosen-bridge/tx-pot 1.0.0 → 1.0.2
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.
- package/CHANGELOG.md +13 -0
- package/README.md +436 -7
- package/dist/db/migrations/index.d.ts +3 -3
- package/dist/db/migrations/index.js +3 -3
- package/dist/db/migrations/postgres/1706350644686-migration.d.ts +4 -4
- package/dist/db/migrations/postgres/1706350644686-migration.js +8 -8
- package/dist/db/migrations/sqlite/1706007154531-migration.d.ts +4 -4
- package/dist/db/migrations/sqlite/1706007154531-migration.js +8 -8
- package/dist/index.d.ts +1 -1
- package/dist/network/AbstractPotChainManager.d.ts +33 -36
- package/dist/transaction/utils.d.ts +2 -4
- package/package.json +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,39 +1,36 @@
|
|
|
1
1
|
import { SigningStatus } from '../transaction/types';
|
|
2
2
|
export declare abstract class AbstractPotChainManager {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* @param txId
|
|
36
|
-
*/
|
|
37
|
-
abstract isTxInMempool: (txId: string) => Promise<boolean>;
|
|
3
|
+
/**
|
|
4
|
+
* gets the blockchain current height
|
|
5
|
+
*/
|
|
6
|
+
abstract getHeight: () => Promise<number>;
|
|
7
|
+
/**
|
|
8
|
+
* returns required number of confirmation
|
|
9
|
+
* @param txType
|
|
10
|
+
*/
|
|
11
|
+
abstract getTxRequiredConfirmation: (txType: string) => number;
|
|
12
|
+
/**
|
|
13
|
+
* gets number of confirmation for a tx
|
|
14
|
+
* returns -1 if tx is not in the blockchain
|
|
15
|
+
* @param txId
|
|
16
|
+
*/
|
|
17
|
+
abstract getTxConfirmation: (txId: string) => Promise<number>;
|
|
18
|
+
/**
|
|
19
|
+
* checks if a tx is still valid and can be sent to the network
|
|
20
|
+
* @param serializedTx
|
|
21
|
+
* @param signingStatus
|
|
22
|
+
*/
|
|
23
|
+
abstract isTxValid: (serializedTx: string, signingStatus: SigningStatus) => Promise<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* submits a tx to the blockchain
|
|
26
|
+
* @param serializedTx
|
|
27
|
+
*/
|
|
28
|
+
abstract submitTransaction: (serializedTx: string) => Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* checks if a tx is in mempool
|
|
31
|
+
* returns false if the chain has no mempool
|
|
32
|
+
* @param txId
|
|
33
|
+
*/
|
|
34
|
+
abstract isTxInMempool: (txId: string) => Promise<boolean>;
|
|
38
35
|
}
|
|
39
|
-
//# sourceMappingURL=AbstractPotChainManager.d.ts.map
|
|
36
|
+
//# sourceMappingURL=AbstractPotChainManager.d.ts.map
|
|
@@ -4,7 +4,5 @@ import { TxOptions } from './types';
|
|
|
4
4
|
* @param options
|
|
5
5
|
* @returns
|
|
6
6
|
*/
|
|
7
|
-
export declare const txOptionToClause: (
|
|
8
|
-
|
|
9
|
-
) => Record<string, any>;
|
|
10
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
7
|
+
export declare const txOptionToClause: (options: TxOptions) => Record<string, any>;
|
|
8
|
+
//# sourceMappingURL=utils.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rosen-bridge/tx-pot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "a Typescript package to manage transactions storage, sign, submit and related processes",
|
|
5
5
|
"repository": "@rosen-bridge/tx-pot",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"node": ">=18.12.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@rosen-bridge/abstract-logger": "^
|
|
37
|
-
"typeorm": "^0.3.
|
|
36
|
+
"@rosen-bridge/abstract-logger": "^2.0.0",
|
|
37
|
+
"typeorm": "^0.3.20"
|
|
38
38
|
}
|
|
39
39
|
}
|