@socket.tech/dl-common 1.0.3-test.32 → 1.0.3-test.34
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/dist/constants/types.d.ts +2 -1
- package/dist/constants/types.js +1 -0
- package/dist/constants/waitTime.js +1 -14
- package/dist/models/attestation.d.ts +2 -2
- package/dist/models/attestation.js +2 -2
- package/dist/models/message.d.ts +2 -2
- package/dist/models/message.js +2 -2
- package/dist/models/packet.d.ts +2 -2
- package/dist/models/packet.js +2 -2
- package/dist/models/proposal.d.ts +2 -2
- package/dist/models/proposal.js +2 -2
- package/dist/models/switchboard.d.ts +2 -2
- package/dist/models/switchboard.js +2 -2
- package/package.json +2 -2
|
@@ -17,7 +17,8 @@ export interface FeeEstimate {
|
|
|
17
17
|
export declare enum RelayerAPIStatus {
|
|
18
18
|
FAILED = "FAILED",
|
|
19
19
|
SIMULATION_FAILED = "SIMULATION_FAILED",
|
|
20
|
-
COMPLETED = "COMPLETED"
|
|
20
|
+
COMPLETED = "COMPLETED",
|
|
21
|
+
DUPLICATE_NONCE_TX = "DUPLICATE_NONCE_TX"
|
|
21
22
|
}
|
|
22
23
|
export declare class ServerError {
|
|
23
24
|
code: Omit<StatusCodes, StatusCodes.SUCCESS>;
|
package/dist/constants/types.js
CHANGED
|
@@ -14,6 +14,7 @@ var RelayerAPIStatus;
|
|
|
14
14
|
RelayerAPIStatus["FAILED"] = "FAILED";
|
|
15
15
|
RelayerAPIStatus["SIMULATION_FAILED"] = "SIMULATION_FAILED";
|
|
16
16
|
RelayerAPIStatus["COMPLETED"] = "COMPLETED";
|
|
17
|
+
RelayerAPIStatus["DUPLICATE_NONCE_TX"] = "DUPLICATE_NONCE_TX";
|
|
17
18
|
})(RelayerAPIStatus || (exports.RelayerAPIStatus = RelayerAPIStatus = {}));
|
|
18
19
|
class ServerError {
|
|
19
20
|
constructor(code, message) {
|
|
@@ -19,14 +19,7 @@ const getWaitTime = (integrationType, srcChainSlug, dstChainSlug) => {
|
|
|
19
19
|
exports.getWaitTime = getWaitTime;
|
|
20
20
|
const getNativeWaitTime = (srcChainSlug, dstChainSlug) => {
|
|
21
21
|
var _a, _b;
|
|
22
|
-
|
|
23
|
-
if (dl_core_1.TestnetIds.includes(srcChainSlug))
|
|
24
|
-
defaultWaitTime = 5 * 60;
|
|
25
|
-
else if (srcChainSlug === dl_core_1.ChainSlug.MAINNET)
|
|
26
|
-
defaultWaitTime = 10 * 60;
|
|
27
|
-
else
|
|
28
|
-
defaultWaitTime = 2 * 3600;
|
|
29
|
-
return (_b = (_a = exports.NativeWaitTime[srcChainSlug]) === null || _a === void 0 ? void 0 : _a[dstChainSlug]) !== null && _b !== void 0 ? _b : defaultWaitTime;
|
|
22
|
+
return (_b = (_a = exports.NativeWaitTime[srcChainSlug]) === null || _a === void 0 ? void 0 : _a[dstChainSlug]) !== null && _b !== void 0 ? _b : 0;
|
|
30
23
|
};
|
|
31
24
|
exports.getNativeWaitTime = getNativeWaitTime;
|
|
32
25
|
exports.NativeWaitTime = {
|
|
@@ -53,10 +46,4 @@ exports.NativeWaitTime = {
|
|
|
53
46
|
[dl_core_1.ChainSlug.POLYGON_MAINNET]: {
|
|
54
47
|
[dl_core_1.ChainSlug.MAINNET]: 4 * 3600,
|
|
55
48
|
},
|
|
56
|
-
[dl_core_1.ChainSlug.MAINNET]: {
|
|
57
|
-
[dl_core_1.ChainSlug.ARBITRUM]: 10 * 60,
|
|
58
|
-
[dl_core_1.ChainSlug.OPTIMISM]: 10 * 60,
|
|
59
|
-
[dl_core_1.ChainSlug.POLYGON_MAINNET]: 10 * 60,
|
|
60
|
-
[dl_core_1.ChainSlug.LYRA]: 10 * 60,
|
|
61
|
-
},
|
|
62
49
|
};
|
|
@@ -33,10 +33,10 @@ export declare const AttestationModel: {
|
|
|
33
33
|
type: DataTypes.StringDataTypeConstructor;
|
|
34
34
|
};
|
|
35
35
|
srcChainSlug: {
|
|
36
|
-
type: DataTypes.
|
|
36
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
37
37
|
};
|
|
38
38
|
dstChainSlug: {
|
|
39
|
-
type: DataTypes.
|
|
39
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
40
40
|
};
|
|
41
41
|
integrationType: {
|
|
42
42
|
type: DataTypes.StringDataTypeConstructor;
|
|
@@ -24,10 +24,10 @@ exports.AttestationModel = {
|
|
|
24
24
|
type: sequelize_1.DataTypes.STRING,
|
|
25
25
|
},
|
|
26
26
|
srcChainSlug: {
|
|
27
|
-
type: sequelize_1.DataTypes.
|
|
27
|
+
type: sequelize_1.DataTypes.BIGINT,
|
|
28
28
|
},
|
|
29
29
|
dstChainSlug: {
|
|
30
|
-
type: sequelize_1.DataTypes.
|
|
30
|
+
type: sequelize_1.DataTypes.BIGINT,
|
|
31
31
|
},
|
|
32
32
|
integrationType: {
|
|
33
33
|
type: sequelize_1.DataTypes.STRING,
|
package/dist/models/message.d.ts
CHANGED
|
@@ -49,10 +49,10 @@ export declare const MessageModel: {
|
|
|
49
49
|
autoIncrement: boolean;
|
|
50
50
|
};
|
|
51
51
|
srcChainSlug: {
|
|
52
|
-
type: DataTypes.
|
|
52
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
53
53
|
};
|
|
54
54
|
dstChainSlug: {
|
|
55
|
-
type: DataTypes.
|
|
55
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
56
56
|
};
|
|
57
57
|
srcPlug: {
|
|
58
58
|
type: DataTypes.StringDataTypeConstructor;
|
package/dist/models/message.js
CHANGED
|
@@ -20,10 +20,10 @@ exports.MessageModel = {
|
|
|
20
20
|
autoIncrement: true,
|
|
21
21
|
},
|
|
22
22
|
srcChainSlug: {
|
|
23
|
-
type: sequelize_1.DataTypes.
|
|
23
|
+
type: sequelize_1.DataTypes.BIGINT,
|
|
24
24
|
},
|
|
25
25
|
dstChainSlug: {
|
|
26
|
-
type: sequelize_1.DataTypes.
|
|
26
|
+
type: sequelize_1.DataTypes.BIGINT,
|
|
27
27
|
},
|
|
28
28
|
srcPlug: {
|
|
29
29
|
type: sequelize_1.DataTypes.STRING,
|
package/dist/models/packet.d.ts
CHANGED
|
@@ -83,10 +83,10 @@ export declare const PacketModel: {
|
|
|
83
83
|
autoIncrement: boolean;
|
|
84
84
|
};
|
|
85
85
|
srcChainSlug: {
|
|
86
|
-
type: DataTypes.
|
|
86
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
87
87
|
};
|
|
88
88
|
dstChainSlug: {
|
|
89
|
-
type: DataTypes.
|
|
89
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
90
90
|
};
|
|
91
91
|
srcCapacitor: {
|
|
92
92
|
type: DataTypes.StringDataTypeConstructor;
|
package/dist/models/packet.js
CHANGED
|
@@ -50,10 +50,10 @@ exports.PacketModel = {
|
|
|
50
50
|
autoIncrement: true,
|
|
51
51
|
},
|
|
52
52
|
srcChainSlug: {
|
|
53
|
-
type: sequelize_1.DataTypes.
|
|
53
|
+
type: sequelize_1.DataTypes.BIGINT,
|
|
54
54
|
},
|
|
55
55
|
dstChainSlug: {
|
|
56
|
-
type: sequelize_1.DataTypes.
|
|
56
|
+
type: sequelize_1.DataTypes.BIGINT,
|
|
57
57
|
},
|
|
58
58
|
srcCapacitor: {
|
|
59
59
|
type: sequelize_1.DataTypes.STRING,
|
|
@@ -51,10 +51,10 @@ export declare const ProposalModel: {
|
|
|
51
51
|
primaryKey: boolean;
|
|
52
52
|
};
|
|
53
53
|
srcChainSlug: {
|
|
54
|
-
type: DataTypes.
|
|
54
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
55
55
|
};
|
|
56
56
|
dstChainSlug: {
|
|
57
|
-
type: DataTypes.
|
|
57
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
58
58
|
};
|
|
59
59
|
packetId: {
|
|
60
60
|
type: DataTypes.StringDataTypeConstructor;
|
package/dist/models/proposal.js
CHANGED
|
@@ -40,10 +40,10 @@ exports.ProposalModel = {
|
|
|
40
40
|
primaryKey: true,
|
|
41
41
|
},
|
|
42
42
|
srcChainSlug: {
|
|
43
|
-
type: sequelize_1.DataTypes.
|
|
43
|
+
type: sequelize_1.DataTypes.BIGINT,
|
|
44
44
|
},
|
|
45
45
|
dstChainSlug: {
|
|
46
|
-
type: sequelize_1.DataTypes.
|
|
46
|
+
type: sequelize_1.DataTypes.BIGINT,
|
|
47
47
|
},
|
|
48
48
|
packetId: {
|
|
49
49
|
type: sequelize_1.DataTypes.STRING,
|
|
@@ -28,11 +28,11 @@ export declare const SwitchboardModel: {
|
|
|
28
28
|
type: DataTypes.StringDataTypeConstructor;
|
|
29
29
|
};
|
|
30
30
|
srcChainSlug: {
|
|
31
|
-
type: DataTypes.
|
|
31
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
32
32
|
unique: string;
|
|
33
33
|
};
|
|
34
34
|
dstChainSlug: {
|
|
35
|
-
type: DataTypes.
|
|
35
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
36
36
|
unique: string;
|
|
37
37
|
};
|
|
38
38
|
maxPacketLength: {
|
|
@@ -22,11 +22,11 @@ exports.SwitchboardModel = {
|
|
|
22
22
|
type: sequelize_1.DataTypes.STRING,
|
|
23
23
|
},
|
|
24
24
|
srcChainSlug: {
|
|
25
|
-
type: sequelize_1.DataTypes.
|
|
25
|
+
type: sequelize_1.DataTypes.BIGINT,
|
|
26
26
|
unique: "uniqueSwitchboardPointer",
|
|
27
27
|
},
|
|
28
28
|
dstChainSlug: {
|
|
29
|
-
type: sequelize_1.DataTypes.
|
|
29
|
+
type: sequelize_1.DataTypes.BIGINT,
|
|
30
30
|
unique: "uniqueSwitchboardPointer",
|
|
31
31
|
},
|
|
32
32
|
maxPacketLength: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socket.tech/dl-common",
|
|
3
|
-
"version": "1.0.3-test.
|
|
3
|
+
"version": "1.0.3-test.34",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"description": "common utilities for socket data layer.",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@aws-sdk/client-sqs": "^3.421.0",
|
|
46
46
|
"@aws-sdk/smithy-client": "^3.329.0",
|
|
47
47
|
"@ethersproject/providers": "^5.7.2",
|
|
48
|
-
"@socket.tech/dl-core": "2.4.
|
|
48
|
+
"@socket.tech/dl-core": "2.4.16",
|
|
49
49
|
"@socket.tech/ll-common": "^0.0.19",
|
|
50
50
|
"async-redis": "^2.0.0",
|
|
51
51
|
"aws-kms-ethers-signer": "^0.1.3",
|