@socket.tech/dl-common 1.0.2-test.2 → 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/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/models/index.d.ts +0 -2
- package/dist/models/index.js +0 -2
- package/dist/models/packet.d.ts +0 -4
- package/dist/models/packet.js +0 -3
- package/package.json +1 -1
- package/dist/constants/index.d.ts +0 -1
- package/dist/constants/index.js +0 -17
- package/dist/constants/waitTime.d.ts +0 -7
- package/dist/constants/waitTime.js +0 -35
- package/dist/models/attestation.d.ts +0 -69
- package/dist/models/attestation.js +0 -59
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/models/index.d.ts
CHANGED
package/dist/models/index.js
CHANGED
|
@@ -17,5 +17,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./packet"), exports);
|
|
18
18
|
__exportStar(require("./message"), exports);
|
|
19
19
|
__exportStar(require("./attestSignature"), exports);
|
|
20
|
-
__exportStar(require("./attestation"), exports);
|
|
21
|
-
__exportStar(require("./proposal"), exports);
|
package/dist/models/packet.d.ts
CHANGED
|
@@ -71,7 +71,6 @@ export declare class Packet extends Model {
|
|
|
71
71
|
isVerified: boolean;
|
|
72
72
|
isFullyExecuted: boolean;
|
|
73
73
|
tripreason: TripReason;
|
|
74
|
-
executionWaitTime: number;
|
|
75
74
|
}
|
|
76
75
|
export declare const PacketModel: {
|
|
77
76
|
id: {
|
|
@@ -200,9 +199,6 @@ export declare const PacketModel: {
|
|
|
200
199
|
selectedProposalCount: {
|
|
201
200
|
type: DataTypes.IntegerDataTypeConstructor;
|
|
202
201
|
};
|
|
203
|
-
executionWaitTime: {
|
|
204
|
-
type: DataTypes.IntegerDataTypeConstructor;
|
|
205
|
-
};
|
|
206
202
|
attestTxId: {
|
|
207
203
|
type: DataTypes.StringDataTypeConstructor;
|
|
208
204
|
defaultValue: string;
|
package/dist/models/packet.js
CHANGED
|
@@ -170,9 +170,6 @@ exports.PacketModel = {
|
|
|
170
170
|
selectedProposalCount: {
|
|
171
171
|
type: sequelize_1.DataTypes.INTEGER,
|
|
172
172
|
},
|
|
173
|
-
executionWaitTime: {
|
|
174
|
-
type: sequelize_1.DataTypes.INTEGER,
|
|
175
|
-
},
|
|
176
173
|
attestTxId: {
|
|
177
174
|
type: sequelize_1.DataTypes.STRING,
|
|
178
175
|
defaultValue: "",
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./waitTime";
|
package/dist/constants/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./waitTime"), exports);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ChainSlug, IntegrationTypes } from "@socket.tech/dl-core";
|
|
2
|
-
export declare const getWaitTime: (integrationType: IntegrationTypes, srcChainSlug: ChainSlug, dstChainSlug: ChainSlug) => number;
|
|
3
|
-
export declare const NativeWaitTime: {
|
|
4
|
-
[srcChain in ChainSlug]?: {
|
|
5
|
-
[dstChain in ChainSlug]?: number;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NativeWaitTime = exports.getWaitTime = void 0;
|
|
4
|
-
const dl_core_1 = require("@socket.tech/dl-core");
|
|
5
|
-
const getWaitTime = (integrationType, srcChainSlug, dstChainSlug) => {
|
|
6
|
-
var _a, _b;
|
|
7
|
-
switch (integrationType) {
|
|
8
|
-
case dl_core_1.IntegrationTypes.fast:
|
|
9
|
-
return 0;
|
|
10
|
-
case dl_core_1.IntegrationTypes.fast2:
|
|
11
|
-
return 0;
|
|
12
|
-
case dl_core_1.IntegrationTypes.optimistic:
|
|
13
|
-
return 2 * 3600;
|
|
14
|
-
case dl_core_1.IntegrationTypes.native:
|
|
15
|
-
return (_b = (_a = exports.NativeWaitTime[srcChainSlug]) === null || _a === void 0 ? void 0 : _a[dstChainSlug]) !== null && _b !== void 0 ? _b : 2 * 3600;
|
|
16
|
-
default:
|
|
17
|
-
return 0;
|
|
18
|
-
break;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
exports.getWaitTime = getWaitTime;
|
|
22
|
-
exports.NativeWaitTime = {
|
|
23
|
-
[dl_core_1.ChainSlug.OPTIMISM_GOERLI]: {
|
|
24
|
-
[dl_core_1.ChainSlug.GOERLI]: 15 * 60,
|
|
25
|
-
},
|
|
26
|
-
[dl_core_1.ChainSlug.ARBITRUM_GOERLI]: {
|
|
27
|
-
[dl_core_1.ChainSlug.GOERLI]: 15 * 60,
|
|
28
|
-
},
|
|
29
|
-
[dl_core_1.ChainSlug.ARBITRUM]: {
|
|
30
|
-
[dl_core_1.ChainSlug.MAINNET]: 7 * 24 * 3600,
|
|
31
|
-
},
|
|
32
|
-
[dl_core_1.ChainSlug.OPTIMISM]: {
|
|
33
|
-
[dl_core_1.ChainSlug.MAINNET]: 7 * 24 * 3600,
|
|
34
|
-
},
|
|
35
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { IntegrationTypes } from "@socket.tech/dl-core";
|
|
2
|
-
import { DataTypes, Model } from "sequelize";
|
|
3
|
-
export declare class Attestation extends Model {
|
|
4
|
-
id: number;
|
|
5
|
-
packetId: string;
|
|
6
|
-
proposalCount: number;
|
|
7
|
-
root: string;
|
|
8
|
-
switchboard: string;
|
|
9
|
-
integrationType: IntegrationTypes;
|
|
10
|
-
srcChainSlug: number;
|
|
11
|
-
dstChainSlug: number;
|
|
12
|
-
attester: string;
|
|
13
|
-
attestTxId: string;
|
|
14
|
-
attestTxHash: string;
|
|
15
|
-
attestTime: number;
|
|
16
|
-
numberOfAttestations: number;
|
|
17
|
-
}
|
|
18
|
-
export declare const AttestationModel: {
|
|
19
|
-
id: {
|
|
20
|
-
type: DataTypes.IntegerDataTypeConstructor;
|
|
21
|
-
autoIncrement: boolean;
|
|
22
|
-
primaryKey: boolean;
|
|
23
|
-
};
|
|
24
|
-
packetId: {
|
|
25
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
26
|
-
unique: string;
|
|
27
|
-
};
|
|
28
|
-
proposalCount: {
|
|
29
|
-
type: DataTypes.IntegerDataTypeConstructor;
|
|
30
|
-
unique: string;
|
|
31
|
-
};
|
|
32
|
-
switchboard: {
|
|
33
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
34
|
-
};
|
|
35
|
-
srcChainSlug: {
|
|
36
|
-
type: DataTypes.IntegerDataTypeConstructor;
|
|
37
|
-
};
|
|
38
|
-
dstChainSlug: {
|
|
39
|
-
type: DataTypes.IntegerDataTypeConstructor;
|
|
40
|
-
};
|
|
41
|
-
integrationType: {
|
|
42
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
43
|
-
};
|
|
44
|
-
root: {
|
|
45
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
46
|
-
unique: string;
|
|
47
|
-
};
|
|
48
|
-
attester: {
|
|
49
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
50
|
-
defaultValue: string;
|
|
51
|
-
unique: string;
|
|
52
|
-
};
|
|
53
|
-
attestTxId: {
|
|
54
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
55
|
-
defaultValue: string;
|
|
56
|
-
};
|
|
57
|
-
attestTxHash: {
|
|
58
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
59
|
-
defaultValue: string;
|
|
60
|
-
};
|
|
61
|
-
attestTime: {
|
|
62
|
-
type: DataTypes.IntegerDataTypeConstructor;
|
|
63
|
-
defaultValue: number;
|
|
64
|
-
};
|
|
65
|
-
numberOfAttestations: {
|
|
66
|
-
type: DataTypes.IntegerDataTypeConstructor;
|
|
67
|
-
defaultValue: number;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AttestationModel = exports.Attestation = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
class Attestation extends sequelize_1.Model {
|
|
6
|
-
}
|
|
7
|
-
exports.Attestation = Attestation;
|
|
8
|
-
exports.AttestationModel = {
|
|
9
|
-
id: {
|
|
10
|
-
type: sequelize_1.DataTypes.INTEGER,
|
|
11
|
-
autoIncrement: true,
|
|
12
|
-
primaryKey: true,
|
|
13
|
-
},
|
|
14
|
-
packetId: {
|
|
15
|
-
type: sequelize_1.DataTypes.STRING,
|
|
16
|
-
unique: "uniqueAttestationPointer",
|
|
17
|
-
},
|
|
18
|
-
proposalCount: {
|
|
19
|
-
type: sequelize_1.DataTypes.INTEGER,
|
|
20
|
-
unique: "uniqueAttestationPointer",
|
|
21
|
-
},
|
|
22
|
-
switchboard: {
|
|
23
|
-
type: sequelize_1.DataTypes.STRING,
|
|
24
|
-
},
|
|
25
|
-
srcChainSlug: {
|
|
26
|
-
type: sequelize_1.DataTypes.INTEGER,
|
|
27
|
-
},
|
|
28
|
-
dstChainSlug: {
|
|
29
|
-
type: sequelize_1.DataTypes.INTEGER,
|
|
30
|
-
},
|
|
31
|
-
integrationType: {
|
|
32
|
-
type: sequelize_1.DataTypes.STRING,
|
|
33
|
-
},
|
|
34
|
-
root: {
|
|
35
|
-
type: sequelize_1.DataTypes.STRING,
|
|
36
|
-
unique: "uniqueAttestationPointer",
|
|
37
|
-
},
|
|
38
|
-
attester: {
|
|
39
|
-
type: sequelize_1.DataTypes.STRING,
|
|
40
|
-
defaultValue: "",
|
|
41
|
-
unique: "uniqueAttestationPointer",
|
|
42
|
-
},
|
|
43
|
-
attestTxId: {
|
|
44
|
-
type: sequelize_1.DataTypes.STRING,
|
|
45
|
-
defaultValue: "",
|
|
46
|
-
},
|
|
47
|
-
attestTxHash: {
|
|
48
|
-
type: sequelize_1.DataTypes.STRING,
|
|
49
|
-
defaultValue: "",
|
|
50
|
-
},
|
|
51
|
-
attestTime: {
|
|
52
|
-
type: sequelize_1.DataTypes.INTEGER,
|
|
53
|
-
defaultValue: 0,
|
|
54
|
-
},
|
|
55
|
-
numberOfAttestations: {
|
|
56
|
-
type: sequelize_1.DataTypes.INTEGER,
|
|
57
|
-
defaultValue: 0,
|
|
58
|
-
},
|
|
59
|
-
};
|