@socket.tech/dl-common 1.0.3-test.41 → 1.0.3-test.45

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.
@@ -7,7 +7,8 @@ export declare enum tableNames {
7
7
  proposal = "proposals",
8
8
  switchboard = "switchboards",
9
9
  tripState = "trip_states",
10
- attestSignatures = "attest_signatures"
10
+ attestSignatures = "attest_signatures",
11
+ lastBlock = "last_blocks"
11
12
  }
12
13
  export declare enum MessageStatuses {
13
14
  RECEIVED = "RECEIVED",
@@ -12,6 +12,7 @@ var tableNames;
12
12
  tableNames["switchboard"] = "switchboards";
13
13
  tableNames["tripState"] = "trip_states";
14
14
  tableNames["attestSignatures"] = "attest_signatures";
15
+ tableNames["lastBlock"] = "last_blocks";
15
16
  })(tableNames || (exports.tableNames = tableNames = {}));
16
17
  var MessageStatuses;
17
18
  (function (MessageStatuses) {
@@ -97,6 +97,8 @@ export interface AttestRequest {
97
97
  packetId: string;
98
98
  root: string;
99
99
  proposalCount: number;
100
+ outboundTxHash: string;
101
+ sealTxHash: string;
100
102
  }
101
103
  export interface AttestSuccess {
102
104
  proposalValid: true;
@@ -29,11 +29,7 @@ exports.NativeWaitTime = {
29
29
  [dl_core_1.ChainSlug.ARBITRUM_GOERLI]: {
30
30
  [dl_core_1.ChainSlug.GOERLI]: 5 * 60,
31
31
  },
32
- [dl_core_1.ChainSlug.POLYGON_MUMBAI]: {
33
- [dl_core_1.ChainSlug.GOERLI]: 10 * 60,
34
- },
35
32
  [dl_core_1.ChainSlug.GOERLI]: {
36
- [dl_core_1.ChainSlug.POLYGON_MUMBAI]: 5 * 60,
37
33
  [dl_core_1.ChainSlug.ARBITRUM_GOERLI]: 5 * 60,
38
34
  [dl_core_1.ChainSlug.OPTIMISM_GOERLI]: 5 * 60,
39
35
  },
@@ -4,3 +4,4 @@ export * from "./attestSignature";
4
4
  export * from "./attestation";
5
5
  export * from "./proposal";
6
6
  export * from "./switchboard";
7
+ export * from "./lastBlock";
@@ -20,3 +20,4 @@ __exportStar(require("./attestSignature"), exports);
20
20
  __exportStar(require("./attestation"), exports);
21
21
  __exportStar(require("./proposal"), exports);
22
22
  __exportStar(require("./switchboard"), exports);
23
+ __exportStar(require("./lastBlock"), exports);
@@ -29,7 +29,10 @@ export declare enum AttestRelayStatus {
29
29
  export declare enum TripReason {
30
30
  SWITCHBOARD_MISMATCHED = "SWITCHBOARD_MISMATCHED",
31
31
  ROOT_MISMATCHED = "ROOT_MISMATCHED",
32
+ INVALID_MESSAGE_ROOT = "INVALID_MESSAGE_ROOT",
32
33
  MISSING_SEAL = "MISSING_SEAL",
34
+ PENDING_CONFIRMATIONS = "PENDING_CONFIRMATIONS",
35
+ INALID_SEAL_TX = "INALID_SEAL_TX",
33
36
  NO = "NO"
34
37
  }
35
38
  export declare class Packet extends Model {
@@ -38,7 +38,10 @@ var TripReason;
38
38
  (function (TripReason) {
39
39
  TripReason["SWITCHBOARD_MISMATCHED"] = "SWITCHBOARD_MISMATCHED";
40
40
  TripReason["ROOT_MISMATCHED"] = "ROOT_MISMATCHED";
41
+ TripReason["INVALID_MESSAGE_ROOT"] = "INVALID_MESSAGE_ROOT";
41
42
  TripReason["MISSING_SEAL"] = "MISSING_SEAL";
43
+ TripReason["PENDING_CONFIRMATIONS"] = "PENDING_CONFIRMATIONS";
44
+ TripReason["INALID_SEAL_TX"] = "INALID_SEAL_TX";
42
45
  TripReason["NO"] = "NO";
43
46
  })(TripReason || (exports.TripReason = TripReason = {}));
44
47
  class Packet extends sequelize_1.Model {
@@ -28,6 +28,7 @@ const sendEvents = async (events) => {
28
28
  const command = new client_eventbridge_1.PutEventsCommand(params);
29
29
  return await client.send(command);
30
30
  // process data.
31
+ // eslint-disable-next-line no-useless-catch
31
32
  }
32
33
  catch (error) {
33
34
  throw error;
@@ -1,5 +1,5 @@
1
1
  import { DeploymentMode } from "@socket.tech/dl-core";
2
2
  import { Accounts } from "..";
3
- export declare const initS3Client: (region: string) => Promise<void>;
3
+ export declare const initS3Client: (region: string) => void;
4
4
  export declare const getFileFromS3: (bucket: string, filePath: string) => Promise<any>;
5
5
  export declare const getS3Config: (deploymentMode: DeploymentMode, region?: string, account?: Accounts.dl | Accounts.ll) => Promise<any>;
@@ -6,7 +6,7 @@ const dl_core_1 = require("@socket.tech/dl-core");
6
6
  const __1 = require("..");
7
7
  // Set your AWS credentials and region
8
8
  let s3Client;
9
- const initS3Client = async (region) => {
9
+ const initS3Client = (region) => {
10
10
  s3Client = new client_s3_1.S3Client({
11
11
  region,
12
12
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socket.tech/dl-common",
3
- "version": "1.0.3-test.41",
3
+ "version": "1.0.3-test.45",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "description": "common utilities for socket data layer.",
@@ -13,7 +13,6 @@
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
16
-
17
16
  "url": "git+https://github.com/SocketDotTech/dl-batcher-service.git"
18
17
  },
19
18
  "license": "MIT",
@@ -21,19 +20,19 @@
21
20
  "start": "serverless offline start --reloadHandler -s dev",
22
21
  "start:dev": "serverless offline start -s dev",
23
22
  "deploy": "npm run lint && npx sls deploy -s dev --verbose",
24
- "deploy:prod": "npm run lint && export AWS_PROFILE=llprod && npx sls deploy -s prod --verbose",
23
+ "deploy:prod": "tsc && npm run lint && export AWS_PROFILE=llprod && npx sls deploy -s prod --verbose",
25
24
  "deploy:surge": "npx sls deploy -s surge --verbose",
26
25
  "build": "tsc --project lib.tsconfig.json",
27
26
  "build:clean": "rm -rf tsconfig.build.tsbuildinfo && rm -rf ./dist",
28
27
  "eslint:check": "npx eslint src/ --ext .ts,.js",
29
28
  "eslint:fix": "npx eslint src --ext ts,js --fix",
30
- "lint": "tsc && npm run prettier:fix",
29
+ "lint": "npm run prettier:fix",
31
30
  "prettier:fix": "npx prettier src dl-common __tests__ --write ./**/*.{ts,js,json,yml,md}",
32
31
  "format": "prettier \"./**\" --write --ignore-unknown",
33
32
  "format:check": "prettier \"./**\" --ignore-unknown --check",
34
33
  "prepare": "husky install",
35
34
  "publishp": "yarn lint && yarn build",
36
- "eslint:cachefix":"eslint --fix",
35
+ "eslint:cachefix": "eslint --fix",
37
36
  "testc": "jest --testPathIgnorePatterns '.db.test.ts$' --coverage",
38
37
  "testdb": "jest --testMatch **/*.db.test.ts --runInBand",
39
38
  "testdbc": "jest --testMatch **/*.db.test.ts --runInBand --coverage",
@@ -48,12 +47,12 @@
48
47
  "dependencies": {
49
48
  "@aws-sdk/client-eventbridge": "^3.449.0",
50
49
  "@aws-sdk/client-kms": "^3.454.0",
51
- "@aws-sdk/client-s3": "^3.550.0",
50
+ "@aws-sdk/client-s3": "^3.600.0",
52
51
  "@aws-sdk/client-secrets-manager": "^3.433.0",
53
52
  "@aws-sdk/client-sqs": "^3.421.0",
54
- "@aws-sdk/smithy-client": "^3.329.0",
53
+ "@aws-sdk/smithy-client": "^3.374.0",
55
54
  "@ethersproject/providers": "^5.7.2",
56
- "@socket.tech/dl-core": "2.4.37-test.2",
55
+ "@socket.tech/dl-core": "^2.7.0",
57
56
  "@socket.tech/ll-common": "^0.0.19",
58
57
  "async-redis": "^2.0.0",
59
58
  "aws-kms-ethers-signer": "^0.1.3",