@levrbet/shared 0.1.91 → 0.1.92
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/server/config/index.d.ts +1 -0
- package/dist/server/config/index.js +1 -0
- package/dist/server/config/index.js.map +1 -1
- package/dist/server/config/prisma.d.ts +20 -0
- package/dist/server/config/prisma.js +33 -0
- package/dist/server/config/prisma.js.map +1 -0
- package/dist/server/config/redis.d.ts +53 -8
- package/dist/server/config/redis.js +80 -24
- package/dist/server/config/redis.js.map +1 -1
- package/dist/server/contracts/clients/ozRelayerService.d.ts +1 -2
- package/dist/server/contracts/clients/ozRelayerService.js +3 -4
- package/dist/server/contracts/clients/ozRelayerService.js.map +1 -1
- package/dist/server/middleware/rateLimit.middleware.d.ts +1 -2
- package/dist/server/middleware/rateLimit.middleware.js +3 -5
- package/dist/server/middleware/rateLimit.middleware.js.map +1 -1
- package/dist/server/test-relayers.js +14 -14
- package/dist/server/test-relayers.js.map +1 -1
- package/dist/server/utils/index.d.ts +0 -1
- package/dist/server/utils/index.js +0 -1
- package/dist/server/utils/index.js.map +1 -1
- package/package.json +5 -4
- package/dist/server/utils/constants.d.ts +0 -8
- package/dist/server/utils/constants.js +0 -9
- package/dist/server/utils/constants.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PrismaClient } from "../../core";
|
|
2
|
+
declare class PrismaClientManager {
|
|
3
|
+
private prisma;
|
|
4
|
+
private initialized;
|
|
5
|
+
/**
|
|
6
|
+
* Initializes the Prisma client for database operations.
|
|
7
|
+
*
|
|
8
|
+
* **Note:** Not all services that use this package require MongoDB, so initialization is opt-in.
|
|
9
|
+
* Call this method explicitly before using the Prisma client to avoid initialization errors.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* prismaClientManager.init();
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
init(): void;
|
|
17
|
+
get client(): PrismaClient;
|
|
18
|
+
}
|
|
19
|
+
export declare const prismaClientManager: PrismaClientManager;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PrismaClient } from "../../core";
|
|
2
|
+
class PrismaClientManager {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.prisma = null;
|
|
5
|
+
this.initialized = false;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Initializes the Prisma client for database operations.
|
|
9
|
+
*
|
|
10
|
+
* **Note:** Not all services that use this package require MongoDB, so initialization is opt-in.
|
|
11
|
+
* Call this method explicitly before using the Prisma client to avoid initialization errors.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* prismaClientManager.init();
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
init() {
|
|
19
|
+
if (this.initialized) {
|
|
20
|
+
console.log("PrismaClientManager already initialized, skipping...");
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
this.initialized = true;
|
|
24
|
+
this.prisma = new PrismaClient();
|
|
25
|
+
}
|
|
26
|
+
get client() {
|
|
27
|
+
if (!this.prisma)
|
|
28
|
+
throw new Error("PrismaClientManager is not initialized. Call init() first.");
|
|
29
|
+
return this.prisma;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export const prismaClientManager = new PrismaClientManager();
|
|
33
|
+
//# sourceMappingURL=prisma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prisma.js","sourceRoot":"","sources":["../../../src/server/config/prisma.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEzC,MAAM,mBAAmB;IAAzB;QACY,WAAM,GAAwB,IAAI,CAAA;QAClC,gBAAW,GAAG,KAAK,CAAA;IA4B/B,CAAC;IA1BG;;;;;;;;;;OAUG;IACH,IAAI;QACA,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAA;YACnE,OAAM;QACV,CAAC;QAED,IAAI,CAAC,WAAW,GAAG,IAAI,CAAA;QAEvB,IAAI,CAAC,MAAM,GAAG,IAAI,YAAY,EAAE,CAAA;IACpC,CAAC;IAED,IAAI,MAAM;QACN,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAA;QAC/F,OAAO,IAAI,CAAC,MAAM,CAAA;IACtB,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAA"}
|
|
@@ -1,12 +1,57 @@
|
|
|
1
1
|
import "dotenv/config";
|
|
2
2
|
import Redis, { type RedisOptions } from "ioredis";
|
|
3
|
-
export declare
|
|
4
|
-
|
|
3
|
+
export declare enum RedisDb {
|
|
4
|
+
ORACLE = 0,
|
|
5
|
+
ORDERBOOK = 1,
|
|
6
|
+
AUTH = 2,
|
|
7
|
+
LIQUIDATION_ENGINE = 3,
|
|
8
|
+
LEADERBOARD = 4,
|
|
9
|
+
LAB = 5
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Manages Redis client connections including a primary client and optional replica clients.
|
|
13
|
+
*
|
|
14
|
+
* This manager provides a singleton-like pattern for initializing and accessing Redis clients.
|
|
15
|
+
* It supports both primary and replica connections for load balancing read operations.
|
|
16
|
+
*
|
|
17
|
+
* **Note:** Not all services that use this package require Redis, so initialization is opt-in.
|
|
18
|
+
* Call `init()` explicitly before using any Redis clients.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* redisClientManager.init({ db: RedisDb.ORACLE });
|
|
23
|
+
*
|
|
24
|
+
* // Get primary client for write operations
|
|
25
|
+
* const primary = redisClientManager.primaryClient;
|
|
26
|
+
* await primary.set('key', 'value');
|
|
27
|
+
*
|
|
28
|
+
* // Get replica client for read operations (load balanced)
|
|
29
|
+
* const replica = redisClientManager.replicaClient;
|
|
30
|
+
* const value = await replica.get('key');
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare class RedisClientManager {
|
|
34
|
+
private _primaryClient;
|
|
5
35
|
private replicaClients;
|
|
6
|
-
private
|
|
7
|
-
dbIndex
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
36
|
+
private initialized;
|
|
37
|
+
private dbIndex;
|
|
38
|
+
/**
|
|
39
|
+
* Initializes the Redis client manager with primary and optional replica clients.
|
|
40
|
+
*
|
|
41
|
+
* **Note:** Not all services that use this package require Redis, so initialization is opt-in.
|
|
42
|
+
* Call this method explicitly before using any Redis clients to avoid initialization errors.
|
|
43
|
+
*
|
|
44
|
+
* @param options - Optional Redis configuration options including database index selection
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* // Initialize with a specific database
|
|
48
|
+
* redisClientManager.init({ db: RedisDb.AUTH });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
init(options?: RedisOptions): void;
|
|
52
|
+
get primaryClient(): Redis;
|
|
53
|
+
get replicaClient(): Redis;
|
|
54
|
+
duplicateClient: () => Redis;
|
|
12
55
|
}
|
|
56
|
+
export declare const redisClientManager: RedisClientManager;
|
|
57
|
+
export {};
|
|
@@ -1,40 +1,82 @@
|
|
|
1
|
-
import { Config } from "../../core";
|
|
2
1
|
import "dotenv/config";
|
|
3
2
|
import Redis from "ioredis";
|
|
4
3
|
import { redisSchema } from ".";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { Config } from "../../core";
|
|
5
|
+
export var RedisDb;
|
|
6
|
+
(function (RedisDb) {
|
|
7
|
+
RedisDb[RedisDb["ORACLE"] = 0] = "ORACLE";
|
|
8
|
+
RedisDb[RedisDb["ORDERBOOK"] = 1] = "ORDERBOOK";
|
|
9
|
+
RedisDb[RedisDb["AUTH"] = 2] = "AUTH";
|
|
10
|
+
RedisDb[RedisDb["LIQUIDATION_ENGINE"] = 3] = "LIQUIDATION_ENGINE";
|
|
11
|
+
RedisDb[RedisDb["LEADERBOARD"] = 4] = "LEADERBOARD";
|
|
12
|
+
RedisDb[RedisDb["LAB"] = 5] = "LAB";
|
|
13
|
+
})(RedisDb || (RedisDb = {}));
|
|
14
|
+
/**
|
|
15
|
+
* Manages Redis client connections including a primary client and optional replica clients.
|
|
16
|
+
*
|
|
17
|
+
* This manager provides a singleton-like pattern for initializing and accessing Redis clients.
|
|
18
|
+
* It supports both primary and replica connections for load balancing read operations.
|
|
19
|
+
*
|
|
20
|
+
* **Note:** Not all services that use this package require Redis, so initialization is opt-in.
|
|
21
|
+
* Call `init()` explicitly before using any Redis clients.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* redisClientManager.init({ db: RedisDb.ORACLE });
|
|
26
|
+
*
|
|
27
|
+
* // Get primary client for write operations
|
|
28
|
+
* const primary = redisClientManager.primaryClient;
|
|
29
|
+
* await primary.set('key', 'value');
|
|
30
|
+
*
|
|
31
|
+
* // Get replica client for read operations (load balanced)
|
|
32
|
+
* const replica = redisClientManager.replicaClient;
|
|
33
|
+
* const value = await replica.get('key');
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
class RedisClientManager {
|
|
37
|
+
constructor() {
|
|
38
|
+
this._primaryClient = null;
|
|
39
|
+
this.replicaClients = [];
|
|
40
|
+
this.initialized = false;
|
|
8
41
|
this.dbIndex = 0;
|
|
9
|
-
this.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
this.duplicateClient = async (db) => {
|
|
14
|
-
const client = await this.getPrimaryClient();
|
|
15
|
-
await client.select(db ?? this.dbIndex);
|
|
16
|
-
return client;
|
|
17
|
-
};
|
|
18
|
-
this.getReplicaClient = async (db) => {
|
|
19
|
-
if (!this.replicaClients.length)
|
|
20
|
-
return await this.getPrimaryClient(db ?? this.dbIndex);
|
|
21
|
-
const index = Math.floor(Math.random() * this.replicaClients.length);
|
|
22
|
-
const client = this.replicaClients[index];
|
|
23
|
-
await client.select(db ?? this.dbIndex);
|
|
42
|
+
this.duplicateClient = () => {
|
|
43
|
+
const client = this.primaryClient;
|
|
44
|
+
client.select(this.dbIndex);
|
|
24
45
|
return client;
|
|
25
46
|
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Initializes the Redis client manager with primary and optional replica clients.
|
|
50
|
+
*
|
|
51
|
+
* **Note:** Not all services that use this package require Redis, so initialization is opt-in.
|
|
52
|
+
* Call this method explicitly before using any Redis clients to avoid initialization errors.
|
|
53
|
+
*
|
|
54
|
+
* @param options - Optional Redis configuration options including database index selection
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* // Initialize with a specific database
|
|
58
|
+
* redisClientManager.init({ db: RedisDb.AUTH });
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
init(options) {
|
|
62
|
+
if (this.initialized) {
|
|
63
|
+
console.log("RedisClientManager already initialized, skipping...");
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
this.initialized = true;
|
|
67
|
+
const { REDIS_URL, REDIS_REPLICA_ENDPOINTS } = Config.init(redisSchema);
|
|
26
68
|
if (options?.db)
|
|
27
69
|
this.dbIndex = options.db;
|
|
28
|
-
this.
|
|
70
|
+
this._primaryClient = options ? new Redis(REDIS_URL, options) : new Redis(REDIS_URL);
|
|
29
71
|
if (options?.db)
|
|
30
|
-
void this.
|
|
31
|
-
this.
|
|
72
|
+
void this._primaryClient.select(options.db);
|
|
73
|
+
this._primaryClient.on("error", (err) => {
|
|
32
74
|
console.error("Redis primary client error:", err);
|
|
33
75
|
});
|
|
34
|
-
this.
|
|
76
|
+
this._primaryClient.on("connect", () => {
|
|
35
77
|
console.log("Connected to Redis primary");
|
|
36
78
|
});
|
|
37
|
-
const replicaEndpoints =
|
|
79
|
+
const replicaEndpoints = REDIS_REPLICA_ENDPOINTS.split(",").filter(Boolean); // Comma-separated list of replica endpoints
|
|
38
80
|
this.replicaClients = replicaEndpoints.map((url) => {
|
|
39
81
|
const client = options ? new Redis(url, options) : new Redis(url);
|
|
40
82
|
if (options?.db)
|
|
@@ -48,5 +90,19 @@ export class RedisClientManager {
|
|
|
48
90
|
return client;
|
|
49
91
|
});
|
|
50
92
|
}
|
|
93
|
+
get primaryClient() {
|
|
94
|
+
if (!this._primaryClient)
|
|
95
|
+
throw new Error("RedisClientManager is not initialized. Call init() first.");
|
|
96
|
+
return this._primaryClient;
|
|
97
|
+
}
|
|
98
|
+
get replicaClient() {
|
|
99
|
+
if (!this.replicaClients.length)
|
|
100
|
+
return this.primaryClient;
|
|
101
|
+
const index = Math.floor(Math.random() * this.replicaClients.length);
|
|
102
|
+
const client = this.replicaClients[index];
|
|
103
|
+
client.select(this.dbIndex);
|
|
104
|
+
return client;
|
|
105
|
+
}
|
|
51
106
|
}
|
|
107
|
+
export const redisClientManager = new RedisClientManager();
|
|
52
108
|
//# sourceMappingURL=redis.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis.js","sourceRoot":"","sources":["../../../src/server/config/redis.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"redis.js","sourceRoot":"","sources":["../../../src/server/config/redis.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAA;AACtB,OAAO,KAA4B,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAEnC,MAAM,CAAN,IAAY,OAOX;AAPD,WAAY,OAAO;IACf,yCAAU,CAAA;IACV,+CAAa,CAAA;IACb,qCAAQ,CAAA;IACR,iEAAsB,CAAA;IACtB,mDAAe,CAAA;IACf,mCAAO,CAAA;AACX,CAAC,EAPW,OAAO,KAAP,OAAO,QAOlB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,kBAAkB;IAAxB;QACY,mBAAc,GAAiB,IAAI,CAAA;QACnC,mBAAc,GAAY,EAAE,CAAA;QAC5B,gBAAW,GAAG,KAAK,CAAA;QACnB,YAAO,GAAG,CAAC,CAAA;QAkEnB,oBAAe,GAAG,GAAU,EAAE;YAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAA;YACjC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YAC3B,OAAO,MAAM,CAAA;QACjB,CAAC,CAAA;IACL,CAAC;IArEG;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,OAAsB;QACvB,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAA;YAClE,OAAM;QACV,CAAC;QAED,IAAI,CAAC,WAAW,GAAG,IAAI,CAAA;QAEvB,MAAM,EAAE,SAAS,EAAE,uBAAuB,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAEvE,IAAI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,OAAO,CAAC,IAAI,GAAG,EAAE,GAAG,CAAC,CAAA;YACvG,CAAC,CAAC,CAAA;YACF,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;gBACtB,OAAO,CAAC,GAAG,CAAC,iCAAiC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;YAC9F,CAAC,CAAC,CAAA;YAEF,OAAO,MAAM,CAAA;QACjB,CAAC,CAAC,CAAA;IACN,CAAC;IAED,IAAI,aAAa;QACb,IAAI,CAAC,IAAI,CAAC,cAAc;YAAE,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAA;QACtG,OAAO,IAAI,CAAC,cAAc,CAAA;IAC9B,CAAC;IAED,IAAI,aAAa;QACb,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC,aAAa,CAAA;QAE1D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;QACpE,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAE,CAAA;QAC1C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC3B,OAAO,MAAM,CAAA;IACjB,CAAC;CAOJ;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { LevrChain, LevrRelayerGroup } from "../../../core";
|
|
2
1
|
import type { WalletClient } from "viem";
|
|
2
|
+
import { LevrChain, LevrRelayerGroup } from "../../../core";
|
|
3
3
|
declare class OzRelayerService {
|
|
4
4
|
private relayerGroupSizes;
|
|
5
|
-
private redisClient;
|
|
6
5
|
private lastUsedIndexRedisKey;
|
|
7
6
|
getWalletClient: (chainId: LevrChain, relayerGroup: LevrRelayerGroup) => Promise<WalletClient>;
|
|
8
7
|
private createWalletClient;
|
|
@@ -4,14 +4,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { argHash, Config, levrChainIdToChain, LevrRelayerGroup } from "../../../core";
|
|
8
7
|
import { Configuration, RelayersApi, Speed, TransactionStatus, } from "@openzeppelin/relayer-sdk";
|
|
9
8
|
import { isAxiosError } from "axios";
|
|
10
9
|
import dayjs from "dayjs";
|
|
11
10
|
import ms from "ms";
|
|
12
11
|
import { Memoize } from "typescript-memoize";
|
|
13
12
|
import { createWalletClient, custom, toHex } from "viem";
|
|
14
|
-
import {
|
|
13
|
+
import { argHash, Config, levrChainIdToChain, LevrRelayerGroup } from "../../../core";
|
|
14
|
+
import { redisClientManager, relayerSchema, urls } from "../../config";
|
|
15
15
|
class OzRelayerService {
|
|
16
16
|
constructor() {
|
|
17
17
|
this.relayerGroupSizes = {
|
|
@@ -20,7 +20,6 @@ class OzRelayerService {
|
|
|
20
20
|
[LevrRelayerGroup.LIQUIDATOR]: 3,
|
|
21
21
|
[LevrRelayerGroup.MATCH_MAKER]: 3,
|
|
22
22
|
};
|
|
23
|
-
this.redisClient = new RedisClientManager().primaryClient;
|
|
24
23
|
this.lastUsedIndexRedisKey = `oz-relayer-last-used-index`;
|
|
25
24
|
this.getWalletClient = async (chainId, relayerGroup) => {
|
|
26
25
|
const index = await this.getNextIndex(chainId, relayerGroup);
|
|
@@ -116,7 +115,7 @@ class OzRelayerService {
|
|
|
116
115
|
|
|
117
116
|
return current
|
|
118
117
|
`;
|
|
119
|
-
const index = (await
|
|
118
|
+
const index = (await redisClientManager.primaryClient.eval(luaScript, 1, this.lastUsedIndexRedisKey, hashField, groupSize.toString()));
|
|
120
119
|
return index;
|
|
121
120
|
};
|
|
122
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ozRelayerService.js","sourceRoot":"","sources":["../../../../src/server/contracts/clients/ozRelayerService.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ozRelayerService.js","sourceRoot":"","sources":["../../../../src/server/contracts/clients/ozRelayerService.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACH,aAAa,EAEb,WAAW,EACX,KAAK,EACL,iBAAiB,GAEpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACpC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAE5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAa,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChG,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAQtE,MAAM,gBAAgB;IAAtB;QACY,sBAAiB,GAAG;YACxB,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAC;YAChC,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,CAAC;YACnC,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAC;YAChC,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAAE,CAAC;SACpC,CAAA;QACO,0BAAqB,GAAG,4BAA4B,CAAA;QAE5D,oBAAe,GAAG,KAAK,EAAE,OAAkB,EAAE,YAA8B,EAAyB,EAAE;YAClG,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,YA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MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QAC3D,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC,CAAA;QAC/F,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC;IAGa,AAAN,KAAK,CAAC,UAAU,CAAC,SAAiB;QACtC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;QAC/D,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAA;QAClC,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,SAAS,YAAY,CAAC,CAAA;QACvE,OAAO,OAAO,CAAA;IAClB,CAAC;IAkHO,WAAW,CAAC,MAAyB;QACzC,OAAO,CAAC,iBAAiB,CAAC,SAAS,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IAClF,CAAC;IAEO,UAAU,CAAC,MAAyB;QACxC,OAAO,CAAC,iBAAiB,CAAC,QAAQ,EAAE,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC7G,CAAC;CACJ;AAlJiB;IADb,OAAO,CAAC,OAAO,CAAC;0DAUhB;AAGO;IADP,OAAO,EAAE;mDAMT;AAGa;IADb,OAAO,EAAE;kDAMT;AA2HL,eAAe,IAAI,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const rateLimiter: (requestsWindow: number, maxRequests: number, client?: Redis) => import("express-rate-limit").RateLimitRequestHandler;
|
|
1
|
+
export declare const rateLimiter: (requestsWindow: number, maxRequests: number) => import("express-rate-limit").RateLimitRequestHandler;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { rateLimit } from "express-rate-limit";
|
|
2
2
|
import { RedisStore } from "rate-limit-redis";
|
|
3
|
-
import {
|
|
4
|
-
export const rateLimiter = (requestsWindow, maxRequests
|
|
5
|
-
if (!client)
|
|
6
|
-
client = new RedisClientManager().primaryClient;
|
|
3
|
+
import { redisClientManager } from "../config";
|
|
4
|
+
export const rateLimiter = (requestsWindow, maxRequests) => {
|
|
7
5
|
return rateLimit({
|
|
8
6
|
windowMs: requestsWindow,
|
|
9
7
|
max: maxRequests,
|
|
10
8
|
standardHeaders: true,
|
|
11
9
|
legacyHeaders: false,
|
|
12
10
|
store: new RedisStore({
|
|
13
|
-
sendCommand: (command, ...args) =>
|
|
11
|
+
sendCommand: (command, ...args) => redisClientManager.primaryClient.call(command, ...args),
|
|
14
12
|
}),
|
|
15
13
|
});
|
|
16
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rateLimit.middleware.js","sourceRoot":"","sources":["../../../src/server/middleware/rateLimit.middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"rateLimit.middleware.js","sourceRoot":"","sources":["../../../src/server/middleware/rateLimit.middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAc,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAE9C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,cAAsB,EAAE,WAAmB,EAAE,EAAE;IACvE,OAAO,SAAS,CAAC;QACb,QAAQ,EAAE,cAAc;QACxB,GAAG,EAAE,WAAW;QAChB,eAAe,EAAE,IAAI;QACrB,aAAa,EAAE,KAAK;QACpB,KAAK,EAAE,IAAI,UAAU,CAAC;YAClB,WAAW,EAAE,CAAC,OAAe,EAAE,GAAG,IAAc,EAAE,EAAE,CAChD,kBAAkB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAwB;SACrF,CAAC;KACL,CAAC,CAAA;AACN,CAAC,CAAA"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { getLevrContractWithRelayer, LevrChain, LevrRelayerGroup, redisClientManager, RedisDb } from "./index";
|
|
2
|
+
redisClientManager.init({ db: RedisDb.AUTH });
|
|
3
|
+
const test = async () => {
|
|
4
|
+
const storage = await getLevrContractWithRelayer("storage", LevrChain.MONAD_TESTNET, { relayer: LevrRelayerGroup.GAME_ADMIN });
|
|
5
|
+
const value = BigInt(Date.now());
|
|
6
|
+
console.log(`Storing value: ${value.toString()}`);
|
|
7
|
+
const hash = await storage.write.store([value, false]);
|
|
8
|
+
console.log("Transaction hash:", hash);
|
|
9
|
+
const result = await storage.read.retrieve();
|
|
10
|
+
console.log("Stored value:", result.toString());
|
|
11
|
+
};
|
|
12
|
+
Promise.all([test(), test() /*test(), test(), test(), test(), test(), test(), test(), test()*/])
|
|
13
|
+
.catch(console.error)
|
|
14
|
+
.finally(() => process.exit(0));
|
|
15
15
|
//# sourceMappingURL=test-relayers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-relayers.js","sourceRoot":"","sources":["../../src/server/test-relayers.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"test-relayers.js","sourceRoot":"","sources":["../../src/server/test-relayers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,SAAS,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAE9G,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;AAE7C,MAAM,IAAI,GAAG,KAAK,IAAmB,EAAE;IACnC,MAAM,OAAO,GAAG,MAAM,0BAA0B,CAAC,SAAS,EAAE,SAAS,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAA;IAC9H,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAA;IAChC,OAAO,CAAC,GAAG,CAAC,kBAAkB,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IACjD,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAA;IACtD,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAA;IACtC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAA;IAC5C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAA;AACnD,CAAC,CAAA;AAED,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,kEAAkE,CAAC,CAAC;KAC3F,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;KACpB,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oCAAoC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levrbet/shared",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"type": "module",
|
|
3
|
+
"version": "0.1.92",
|
|
5
4
|
"main": "dist/index.js",
|
|
6
5
|
"types": "dist/index.d.ts",
|
|
7
6
|
"exports": {
|
|
@@ -61,16 +60,18 @@
|
|
|
61
60
|
},
|
|
62
61
|
"devDependencies": {
|
|
63
62
|
"@privy-io/react-auth": ">=3.0.0",
|
|
63
|
+
"@swc-node/register": "^1.11.1",
|
|
64
64
|
"@tanstack/react-query": ">=5.0.0",
|
|
65
|
-
"@types/react": ">=18.0.0",
|
|
66
|
-
"react": ">=18.0.0",
|
|
67
65
|
"@types/express": "^5.0.3",
|
|
68
66
|
"@types/lodash": "^4.17.20",
|
|
69
67
|
"@types/ms": "^2.1.0",
|
|
70
68
|
"@types/node": "24.9.1",
|
|
71
69
|
"@types/object-hash": "^3.0.6",
|
|
70
|
+
"@types/react": ">=18.0.0",
|
|
72
71
|
"cross-fetch": "^4.1.0",
|
|
73
72
|
"prisma": "^6.17.1",
|
|
73
|
+
"react": ">=18.0.0",
|
|
74
|
+
"tsx": "^4.20.6",
|
|
74
75
|
"typescript": "^5.9.3"
|
|
75
76
|
},
|
|
76
77
|
"dependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/server/utils/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,MAAM,EAAE,CAAC;IACT,SAAS,EAAE,CAAC;IACZ,YAAY,EAAE,CAAC;IACf,kBAAkB,EAAE,CAAC;IACrB,WAAW,EAAE,CAAC;IACd,GAAG,EAAE,CAAC;CACA,CAAA"}
|