@socket.tech/dl-common 1.0.16 → 1.0.17
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/confirmations.d.ts +5 -0
- package/dist/constants/confirmations.js +17 -0
- package/dist/constants/enums.d.ts +44 -0
- package/dist/constants/enums.js +52 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.js +19 -0
- package/dist/constants/types.d.ts +136 -0
- package/dist/constants/types.js +53 -0
- package/dist/constants/waitTime.d.ts +8 -0
- package/dist/constants/waitTime.js +45 -0
- package/dist/dl-common/constants/index.d.ts +1 -0
- package/dist/dl-common/constants/index.js +1 -0
- package/dist/dl-common/constants/index.js.map +1 -1
- package/dist/dl-common/constants/relay-types.d.ts +70 -0
- package/dist/dl-common/constants/relay-types.js +23 -0
- package/dist/dl-common/constants/relay-types.js.map +1 -0
- package/dist/dl-common/utils/index.d.ts +1 -0
- package/dist/dl-common/utils/index.js +1 -0
- package/dist/dl-common/utils/index.js.map +1 -1
- package/dist/dl-common/utils/relaySigner.d.ts +2 -0
- package/dist/dl-common/utils/relaySigner.js +16 -0
- package/dist/dl-common/utils/relaySigner.js.map +1 -1
- package/dist/dl-common/utils/relayUtils.d.ts +2 -0
- package/dist/dl-common/utils/relayUtils.js +21 -0
- package/dist/dl-common/utils/relayUtils.js.map +1 -0
- package/dist/dl-common/utils/signer/adapter.js.map +1 -1
- package/dist/dl-common/utils/signer/kms-ethers-signer.js.map +1 -1
- package/dist/dl-common/utils/signer/kms-signer.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +36 -0
- package/dist/models/attestSignature.d.ts +35 -0
- package/dist/models/attestSignature.js +53 -0
- package/dist/models/attestation.d.ts +70 -0
- package/dist/models/attestation.js +86 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +23 -0
- package/dist/models/lastBlock.d.ts +28 -0
- package/dist/models/lastBlock.js +27 -0
- package/dist/models/message.d.ts +171 -0
- package/dist/models/message.js +193 -0
- package/dist/models/packet.d.ts +240 -0
- package/dist/models/packet.js +249 -0
- package/dist/models/proposal.d.ts +127 -0
- package/dist/models/proposal.js +141 -0
- package/dist/models/switchboard.d.ts +69 -0
- package/dist/models/switchboard.js +92 -0
- package/dist/models/transaction.d.ts +0 -0
- package/dist/models/transaction.js +280 -0
- package/dist/services/cacheService.d.ts +14 -0
- package/dist/services/cacheService.js +77 -0
- package/dist/services/eventBridgeService.d.ts +8 -0
- package/dist/services/eventBridgeService.js +40 -0
- package/dist/services/index.d.ts +3 -0
- package/dist/services/index.js +20 -0
- package/dist/services/queueService.d.ts +10 -0
- package/dist/services/queueService.js +62 -0
- package/dist/src/constants/gasEstimation.d.ts +8 -0
- package/dist/src/constants/gasEstimation.js +61 -0
- package/dist/src/relayers/propose/main.js.map +1 -1
- package/dist/src/relayers/proposeRelayer.d.ts +7 -0
- package/dist/src/relayers/proposeRelayer.js +587 -0
- package/dist/src/services/batcherService.d.ts +9 -0
- package/dist/src/services/batcherService.js +197 -0
- package/dist/src/services/executeService.d.ts +16 -0
- package/dist/src/services/executeService.js +209 -0
- package/dist/utils/address.d.ts +2 -0
- package/dist/utils/address.js +8 -0
- package/dist/utils/axios.d.ts +2 -0
- package/dist/utils/axios.js +54 -0
- package/dist/utils/dataStructHelper.d.ts +2 -0
- package/dist/utils/dataStructHelper.js +10 -0
- package/dist/utils/discord.d.ts +2 -0
- package/dist/utils/discord.js +43 -0
- package/dist/utils/ethersAwsKmsSigner.d.ts +2 -0
- package/dist/utils/ethersAwsKmsSigner.js +26 -0
- package/dist/utils/eventGetter.d.ts +4 -0
- package/dist/utils/eventGetter.js +50 -0
- package/dist/utils/extraUtils.d.ts +32 -0
- package/dist/utils/extraUtils.js +103 -0
- package/dist/utils/idUtils.d.ts +14 -0
- package/dist/utils/idUtils.js +50 -0
- package/dist/utils/index.d.ts +13 -0
- package/dist/utils/index.js +29 -0
- package/dist/utils/relaySigner.d.ts +21 -0
- package/dist/utils/relaySigner.js +68 -0
- package/dist/utils/s3Service.d.ts +11 -0
- package/dist/utils/s3Service.js +70 -0
- package/dist/utils/secretManagerService.d.ts +2 -0
- package/dist/utils/secretManagerService.js +33 -0
- package/dist/utils/signer/adapter.d.ts +18 -0
- package/dist/utils/signer/adapter.js +71 -0
- package/dist/utils/signer/address.d.ts +9 -0
- package/dist/utils/signer/address.js +42 -0
- package/dist/utils/signer/asn1-parser.d.ts +10 -0
- package/dist/utils/signer/asn1-parser.js +79 -0
- package/dist/utils/signer/crypto.d.ts +5 -0
- package/dist/utils/signer/crypto.js +33 -0
- package/dist/utils/signer/index.d.ts +5 -0
- package/dist/utils/signer/index.js +21 -0
- package/dist/utils/signer/kms-ethers-signer.d.ts +19 -0
- package/dist/utils/signer/kms-ethers-signer.js +32 -0
- package/dist/utils/signer/kms-signer.d.ts +13 -0
- package/dist/utils/signer/kms-signer.js +46 -0
- package/dist/utils/signer/signature.d.ts +16 -0
- package/dist/utils/signer/signature.js +65 -0
- package/dist/utils/signer/signer.d.ts +6 -0
- package/dist/utils/signer/signer.js +2 -0
- package/dist/utils/signer/socketSigner.d.ts +39 -0
- package/dist/utils/signer/socketSigner.js +153 -0
- package/dist/utils/time.d.ts +2 -0
- package/dist/utils/time.js +7 -0
- package/package.json +4 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (
|
|
9
|
+
!desc ||
|
|
10
|
+
("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
11
|
+
) {
|
|
12
|
+
desc = {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return m[k];
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}
|
|
21
|
+
: function (o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
});
|
|
25
|
+
var __exportStar =
|
|
26
|
+
(this && this.__exportStar) ||
|
|
27
|
+
function (m, exports) {
|
|
28
|
+
for (var p in m)
|
|
29
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p))
|
|
30
|
+
__createBinding(exports, m, p);
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
__exportStar(require("./models"), exports);
|
|
34
|
+
__exportStar(require("./services"), exports);
|
|
35
|
+
__exportStar(require("./utils"), exports);
|
|
36
|
+
__exportStar(require("./constants"), exports);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { DataTypes, Model } from "sequelize";
|
|
2
|
+
export declare class AttestSignature extends Model {
|
|
3
|
+
id: number;
|
|
4
|
+
packetId: string;
|
|
5
|
+
proposalCount: number;
|
|
6
|
+
root: string;
|
|
7
|
+
signature: string;
|
|
8
|
+
watcherId: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const AttestSignatureModel: {
|
|
11
|
+
id: {
|
|
12
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
13
|
+
autoIncrement: boolean;
|
|
14
|
+
primaryKey: boolean;
|
|
15
|
+
};
|
|
16
|
+
packetId: {
|
|
17
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
18
|
+
unique: string;
|
|
19
|
+
};
|
|
20
|
+
proposalCount: {
|
|
21
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
22
|
+
unique: string;
|
|
23
|
+
};
|
|
24
|
+
watcherId: {
|
|
25
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
26
|
+
unique: string;
|
|
27
|
+
};
|
|
28
|
+
root: {
|
|
29
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
30
|
+
};
|
|
31
|
+
signature: {
|
|
32
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare const addSignatureHooks: () => void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addSignatureHooks = exports.AttestSignatureModel = exports.AttestSignature = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
class AttestSignature extends sequelize_1.Model {
|
|
7
|
+
}
|
|
8
|
+
exports.AttestSignature = AttestSignature;
|
|
9
|
+
exports.AttestSignatureModel = {
|
|
10
|
+
id: {
|
|
11
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
12
|
+
autoIncrement: true,
|
|
13
|
+
primaryKey: true,
|
|
14
|
+
},
|
|
15
|
+
packetId: {
|
|
16
|
+
type: sequelize_1.DataTypes.STRING,
|
|
17
|
+
unique: "uniqueAttestSignPointer",
|
|
18
|
+
},
|
|
19
|
+
proposalCount: {
|
|
20
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
21
|
+
unique: "uniqueAttestSignPointer",
|
|
22
|
+
},
|
|
23
|
+
watcherId: {
|
|
24
|
+
type: sequelize_1.DataTypes.STRING,
|
|
25
|
+
unique: "uniqueAttestSignPointer",
|
|
26
|
+
},
|
|
27
|
+
root: {
|
|
28
|
+
type: sequelize_1.DataTypes.STRING,
|
|
29
|
+
},
|
|
30
|
+
signature: {
|
|
31
|
+
type: sequelize_1.DataTypes.STRING,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
function processStrings(attestSignature) {
|
|
35
|
+
if (attestSignature.packetId) {
|
|
36
|
+
attestSignature.packetId = (0, utils_1.toLowerCase)(attestSignature.packetId);
|
|
37
|
+
}
|
|
38
|
+
if (attestSignature.signature) {
|
|
39
|
+
attestSignature.signature = (0, utils_1.toLowerCase)(attestSignature.signature);
|
|
40
|
+
}
|
|
41
|
+
return attestSignature;
|
|
42
|
+
}
|
|
43
|
+
const addSignatureHooks = () => {
|
|
44
|
+
AttestSignature.beforeBulkCreate((attestSignature, options) => {
|
|
45
|
+
for (let index = 0; index < attestSignature.length; index++) {
|
|
46
|
+
attestSignature[index] = processStrings(attestSignature[index]);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
AttestSignature.beforeSave((attestSignature, options) => {
|
|
50
|
+
attestSignature = processStrings(attestSignature);
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
exports.addSignatureHooks = addSignatureHooks;
|
|
@@ -0,0 +1,70 @@
|
|
|
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.BigIntDataTypeConstructor;
|
|
37
|
+
};
|
|
38
|
+
dstChainSlug: {
|
|
39
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
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
|
+
};
|
|
70
|
+
export declare const addAttestationHooks: () => void;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addAttestationHooks = exports.AttestationModel = exports.Attestation = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
class Attestation extends sequelize_1.Model {
|
|
7
|
+
}
|
|
8
|
+
exports.Attestation = Attestation;
|
|
9
|
+
exports.AttestationModel = {
|
|
10
|
+
id: {
|
|
11
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
12
|
+
autoIncrement: true,
|
|
13
|
+
primaryKey: true,
|
|
14
|
+
},
|
|
15
|
+
packetId: {
|
|
16
|
+
type: sequelize_1.DataTypes.STRING,
|
|
17
|
+
unique: "uniqueAttestationPointer",
|
|
18
|
+
},
|
|
19
|
+
proposalCount: {
|
|
20
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
21
|
+
unique: "uniqueAttestationPointer",
|
|
22
|
+
},
|
|
23
|
+
switchboard: {
|
|
24
|
+
type: sequelize_1.DataTypes.STRING,
|
|
25
|
+
},
|
|
26
|
+
srcChainSlug: {
|
|
27
|
+
type: sequelize_1.DataTypes.BIGINT,
|
|
28
|
+
},
|
|
29
|
+
dstChainSlug: {
|
|
30
|
+
type: sequelize_1.DataTypes.BIGINT,
|
|
31
|
+
},
|
|
32
|
+
integrationType: {
|
|
33
|
+
type: sequelize_1.DataTypes.STRING,
|
|
34
|
+
},
|
|
35
|
+
root: {
|
|
36
|
+
type: sequelize_1.DataTypes.STRING,
|
|
37
|
+
unique: "uniqueAttestationPointer",
|
|
38
|
+
},
|
|
39
|
+
attester: {
|
|
40
|
+
type: sequelize_1.DataTypes.STRING,
|
|
41
|
+
defaultValue: "",
|
|
42
|
+
unique: "uniqueAttestationPointer",
|
|
43
|
+
},
|
|
44
|
+
attestTxId: {
|
|
45
|
+
type: sequelize_1.DataTypes.STRING,
|
|
46
|
+
defaultValue: "",
|
|
47
|
+
},
|
|
48
|
+
attestTxHash: {
|
|
49
|
+
type: sequelize_1.DataTypes.STRING,
|
|
50
|
+
defaultValue: "",
|
|
51
|
+
},
|
|
52
|
+
attestTime: {
|
|
53
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
54
|
+
defaultValue: 0,
|
|
55
|
+
},
|
|
56
|
+
numberOfAttestations: {
|
|
57
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
58
|
+
defaultValue: 0,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
const addAttestationHooks = () => {
|
|
62
|
+
Attestation.beforeBulkCreate((packet, options) => {
|
|
63
|
+
for (let index = 0; index < packet.length; index++) {
|
|
64
|
+
packet[index] = processStrings(packet[index]);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
Attestation.beforeSave((packet, options) => {
|
|
68
|
+
packet = processStrings(packet);
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
exports.addAttestationHooks = addAttestationHooks;
|
|
72
|
+
function processStrings(packet) {
|
|
73
|
+
if (packet.packetId)
|
|
74
|
+
packet.packetId = (0, utils_1.toLowerCase)(packet.packetId);
|
|
75
|
+
if (packet.root)
|
|
76
|
+
packet.root = (0, utils_1.toLowerCase)(packet.root);
|
|
77
|
+
if (packet.switchboard)
|
|
78
|
+
packet.switchboard = (0, utils_1.toLowerCase)(packet.switchboard);
|
|
79
|
+
if (packet.attester)
|
|
80
|
+
packet.attester = (0, utils_1.toLowerCase)(packet.attester);
|
|
81
|
+
if (packet.attestTxId)
|
|
82
|
+
packet.attestTxId = (0, utils_1.toLowerCase)(packet.attestTxId);
|
|
83
|
+
if (packet.attestTxHash)
|
|
84
|
+
packet.attestTxHash = (0, utils_1.toLowerCase)(packet.attestTxHash);
|
|
85
|
+
return packet;
|
|
86
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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("./packet"), exports);
|
|
18
|
+
__exportStar(require("./message"), exports);
|
|
19
|
+
__exportStar(require("./attestSignature"), exports);
|
|
20
|
+
__exportStar(require("./attestation"), exports);
|
|
21
|
+
__exportStar(require("./proposal"), exports);
|
|
22
|
+
__exportStar(require("./switchboard"), exports);
|
|
23
|
+
__exportStar(require("./lastBlock"), exports);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DataTypes, Model } from "sequelize";
|
|
2
|
+
export declare class LastBlock extends Model {
|
|
3
|
+
id: number;
|
|
4
|
+
chainSlug: number;
|
|
5
|
+
blockNumber: number;
|
|
6
|
+
isFullySynced: boolean;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const LastBlockModel: {
|
|
10
|
+
id: {
|
|
11
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
12
|
+
autoIncrement: boolean;
|
|
13
|
+
};
|
|
14
|
+
chainSlug: {
|
|
15
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
16
|
+
primaryKey: boolean;
|
|
17
|
+
};
|
|
18
|
+
blockNumber: {
|
|
19
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
20
|
+
};
|
|
21
|
+
isFullySynced: {
|
|
22
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
23
|
+
};
|
|
24
|
+
isActive: {
|
|
25
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
26
|
+
defaultValue: boolean;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LastBlockModel = exports.LastBlock = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class LastBlock extends sequelize_1.Model {
|
|
6
|
+
}
|
|
7
|
+
exports.LastBlock = LastBlock;
|
|
8
|
+
exports.LastBlockModel = {
|
|
9
|
+
id: {
|
|
10
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
11
|
+
autoIncrement: true,
|
|
12
|
+
},
|
|
13
|
+
chainSlug: {
|
|
14
|
+
type: sequelize_1.DataTypes.BIGINT,
|
|
15
|
+
primaryKey: true,
|
|
16
|
+
},
|
|
17
|
+
blockNumber: {
|
|
18
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
19
|
+
},
|
|
20
|
+
isFullySynced: {
|
|
21
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
22
|
+
},
|
|
23
|
+
isActive: {
|
|
24
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
25
|
+
defaultValue: true,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { DataTypes, Model } from "sequelize";
|
|
2
|
+
export declare enum ExecutionRelayStatus {
|
|
3
|
+
EXECUTED = "EXECUTED",
|
|
4
|
+
EXECUTING = "EXECUTING",
|
|
5
|
+
NO = "NO",
|
|
6
|
+
EXECUTE_FAILED = "EXECUTE_FAILED",
|
|
7
|
+
IGNORED = "IGNORED"
|
|
8
|
+
}
|
|
9
|
+
export declare class Message extends Model {
|
|
10
|
+
id: number;
|
|
11
|
+
packetId: string;
|
|
12
|
+
srcChainSlug: number;
|
|
13
|
+
dstChainSlug: number;
|
|
14
|
+
srcPlug: string;
|
|
15
|
+
destPlug: string;
|
|
16
|
+
messageId: string;
|
|
17
|
+
fees: string;
|
|
18
|
+
minMsgGasLimit: string;
|
|
19
|
+
executionParams: string;
|
|
20
|
+
transmissionParams: string;
|
|
21
|
+
executionFee: string;
|
|
22
|
+
transmissionFees: string;
|
|
23
|
+
switchboardFees: string;
|
|
24
|
+
decapacitorProof: string;
|
|
25
|
+
payload: string;
|
|
26
|
+
packedMessage: string;
|
|
27
|
+
retry: boolean;
|
|
28
|
+
firstSimulationTimestamp: number;
|
|
29
|
+
inboundSuccess: boolean;
|
|
30
|
+
inboundRevertString: string;
|
|
31
|
+
capacitorMsgCount: number;
|
|
32
|
+
capacitorPacketCount: number;
|
|
33
|
+
rootHash: string;
|
|
34
|
+
isExecuted: boolean;
|
|
35
|
+
isVerified: boolean;
|
|
36
|
+
executor: string;
|
|
37
|
+
executeTxId: string;
|
|
38
|
+
executeTxHash: string;
|
|
39
|
+
executeTime: number;
|
|
40
|
+
outboundTxHash: string;
|
|
41
|
+
outboundTime: number;
|
|
42
|
+
executeSignature: string;
|
|
43
|
+
executeMsgGasLimit: string;
|
|
44
|
+
executeRelayStatus: ExecutionRelayStatus;
|
|
45
|
+
executeData: string;
|
|
46
|
+
}
|
|
47
|
+
export declare const MessageModel: {
|
|
48
|
+
id: {
|
|
49
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
50
|
+
autoIncrement: boolean;
|
|
51
|
+
};
|
|
52
|
+
srcChainSlug: {
|
|
53
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
54
|
+
};
|
|
55
|
+
dstChainSlug: {
|
|
56
|
+
type: DataTypes.BigIntDataTypeConstructor;
|
|
57
|
+
};
|
|
58
|
+
srcPlug: {
|
|
59
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
60
|
+
};
|
|
61
|
+
destPlug: {
|
|
62
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
63
|
+
};
|
|
64
|
+
executeData: {
|
|
65
|
+
type: DataTypes.TextDataTypeConstructor;
|
|
66
|
+
defaultValue: string;
|
|
67
|
+
};
|
|
68
|
+
messageId: {
|
|
69
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
70
|
+
primaryKey: boolean;
|
|
71
|
+
};
|
|
72
|
+
minMsgGasLimit: {
|
|
73
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
74
|
+
};
|
|
75
|
+
executionParams: {
|
|
76
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
77
|
+
};
|
|
78
|
+
transmissionParams: {
|
|
79
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
80
|
+
};
|
|
81
|
+
fees: {
|
|
82
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
83
|
+
};
|
|
84
|
+
executionFee: {
|
|
85
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
86
|
+
};
|
|
87
|
+
transmissionFees: {
|
|
88
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
89
|
+
};
|
|
90
|
+
switchboardFees: {
|
|
91
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
92
|
+
};
|
|
93
|
+
decapacitorProof: {
|
|
94
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
95
|
+
defaultValue: string;
|
|
96
|
+
};
|
|
97
|
+
payload: {
|
|
98
|
+
type: DataTypes.TextDataTypeConstructor;
|
|
99
|
+
};
|
|
100
|
+
packedMessage: {
|
|
101
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
102
|
+
};
|
|
103
|
+
capacitorMsgCount: {
|
|
104
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
105
|
+
};
|
|
106
|
+
capacitorPacketCount: {
|
|
107
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
108
|
+
};
|
|
109
|
+
rootHash: {
|
|
110
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
111
|
+
};
|
|
112
|
+
isVerified: {
|
|
113
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
114
|
+
defaultValue: boolean;
|
|
115
|
+
};
|
|
116
|
+
isExecuted: {
|
|
117
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
118
|
+
defaultValue: boolean;
|
|
119
|
+
};
|
|
120
|
+
executeRelayStatus: {
|
|
121
|
+
type: DataTypes.EnumDataTypeConstructor;
|
|
122
|
+
values: ExecutionRelayStatus[];
|
|
123
|
+
defaultValue: ExecutionRelayStatus;
|
|
124
|
+
};
|
|
125
|
+
executor: {
|
|
126
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
127
|
+
defaultValue: string;
|
|
128
|
+
};
|
|
129
|
+
executeTxHash: {
|
|
130
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
131
|
+
defaultValue: string;
|
|
132
|
+
};
|
|
133
|
+
executeTxId: {
|
|
134
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
135
|
+
defaultValue: string;
|
|
136
|
+
};
|
|
137
|
+
executeTime: {
|
|
138
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
139
|
+
};
|
|
140
|
+
executeSignature: {
|
|
141
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
142
|
+
defaultValue: string;
|
|
143
|
+
};
|
|
144
|
+
executeMsgGasLimit: {
|
|
145
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
146
|
+
};
|
|
147
|
+
outboundTxHash: {
|
|
148
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
149
|
+
defaultValue: string;
|
|
150
|
+
};
|
|
151
|
+
outboundTime: {
|
|
152
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
153
|
+
};
|
|
154
|
+
firstSimulationTimestamp: {
|
|
155
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
156
|
+
defaultValue: number;
|
|
157
|
+
};
|
|
158
|
+
retry: {
|
|
159
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
160
|
+
defaultValue: boolean;
|
|
161
|
+
};
|
|
162
|
+
inboundSuccess: {
|
|
163
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
164
|
+
defaultValue: boolean;
|
|
165
|
+
};
|
|
166
|
+
inboundRevertString: {
|
|
167
|
+
type: DataTypes.TextDataTypeConstructor;
|
|
168
|
+
defaultValue: string;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
export declare const addMessageHooks: () => void;
|