@socket.tech/dl-common 1.0.3-test.26 → 1.0.3-test.28
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TripReason } from "../models";
|
|
2
2
|
import { StatusCodes } from "./enums";
|
|
3
|
-
import { IntegrationTypes } from "@socket.tech/dl-core";
|
|
3
|
+
import { ChainSlug, IntegrationTypes } from "@socket.tech/dl-core";
|
|
4
4
|
export type Speed = "safeLow" | "average" | "fast" | "fastest";
|
|
5
5
|
export declare enum InboundStatus {
|
|
6
6
|
NOT_TRIED = "NOT_TRIED",
|
|
@@ -116,3 +116,15 @@ export type MessageData = {
|
|
|
116
116
|
executionParams: string;
|
|
117
117
|
packedMessage: string;
|
|
118
118
|
};
|
|
119
|
+
export type S3Config = {
|
|
120
|
+
chains: {
|
|
121
|
+
[chainSlug in ChainSlug]?: {
|
|
122
|
+
rpc: string;
|
|
123
|
+
blockNumber: number;
|
|
124
|
+
confirmations: number;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
batcherSupportedChainSlugs: ChainSlug[];
|
|
128
|
+
watcherSupportedChainSlugs: ChainSlug[];
|
|
129
|
+
transmitterSupportedChainSlugs: ChainSlug[];
|
|
130
|
+
};
|
package/dist/utils/s3Service.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFileFromS3 = exports.initS3Client = void 0;
|
|
3
|
+
exports.getS3Config = exports.getFileFromS3 = exports.initS3Client = void 0;
|
|
4
4
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
5
|
// Set your AWS credentials and region
|
|
6
6
|
let s3Client;
|
|
@@ -32,3 +32,10 @@ const getFileFromS3 = async (bucket, filePath) => {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
exports.getFileFromS3 = getFileFromS3;
|
|
35
|
+
const getS3Config = async (deploymentMode, region = "us-east-1") => {
|
|
36
|
+
const S3_BUCKET_NAME = "socket-dl-" + deploymentMode;
|
|
37
|
+
const S3_RPC_CONFIG_FILE_PATH = deploymentMode + "RpcConfig.json";
|
|
38
|
+
(0, exports.initS3Client)(region);
|
|
39
|
+
return await (0, exports.getFileFromS3)(S3_BUCKET_NAME, S3_RPC_CONFIG_FILE_PATH);
|
|
40
|
+
};
|
|
41
|
+
exports.getS3Config = getS3Config;
|