@plyaz/config 1.0.4 → 1.0.6
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/api.d.ts +22 -0
- package/dist/app.d.ts +12 -0
- package/dist/chains/contracts.d.ts +18 -0
- package/dist/chains/index.d.ts +2 -0
- package/dist/chains/supportedChains.d.ts +178 -0
- package/dist/constants.d.ts +3 -0
- package/dist/display/constants.d.ts +50 -0
- package/dist/display/index.d.ts +6 -0
- package/dist/domains.d.ts +4 -0
- package/dist/env.d.ts +4 -0
- package/dist/features.d.ts +30 -0
- package/dist/http/constants.d.ts +53 -0
- package/dist/http/index.d.ts +6 -0
- package/dist/index.cjs +3 -481
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.mjs +3 -447
- package/dist/index.mjs.map +1 -1
- package/dist/math/constants.d.ts +82 -0
- package/dist/math/index.d.ts +6 -0
- package/dist/network/constants.d.ts +37 -0
- package/dist/network/index.d.ts +6 -0
- package/dist/performance/index.d.ts +30 -0
- package/dist/providers/alchemy.d.ts +11 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/oauth.d.ts +20 -0
- package/dist/security.d.ts +3 -0
- package/dist/time/constants.d.ts +69 -0
- package/dist/time/index.d.ts +6 -0
- package/dist/utils/collection/constants.d.ts +33 -0
- package/dist/utils/collection/index.d.ts +6 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/string/constants.d.ts +37 -0
- package/dist/utils/string/index.d.ts +6 -0
- package/package.json +5 -3
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const API_CONFIG: {};
|
|
2
|
+
export declare const CACHE_CONFIG: {
|
|
3
|
+
readonly ttl: {
|
|
4
|
+
readonly short: 300;
|
|
5
|
+
readonly medium: 1800;
|
|
6
|
+
readonly long: 3600;
|
|
7
|
+
readonly extended: 86400;
|
|
8
|
+
};
|
|
9
|
+
readonly keys: {
|
|
10
|
+
readonly user: "user:";
|
|
11
|
+
readonly nft: "nft:";
|
|
12
|
+
readonly blockchain: "blockchain:";
|
|
13
|
+
readonly auth: "auth:";
|
|
14
|
+
};
|
|
15
|
+
readonly redis: {
|
|
16
|
+
readonly url: string;
|
|
17
|
+
readonly keyPrefix: "plyaz:";
|
|
18
|
+
readonly maxRetriesPerRequest: 3;
|
|
19
|
+
readonly lazyConnect: true;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare const WEBHOOK_CONFIG: {};
|
package/dist/app.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const LANDING_PAGE_APP: {
|
|
2
|
+
readonly NAME: "Plyaz";
|
|
3
|
+
readonly VERSION: "1.0.0";
|
|
4
|
+
readonly DEFAULT_LOCALE: "en";
|
|
5
|
+
readonly SUPPORTED_LOCALES: readonly ["en", "es", "pt"];
|
|
6
|
+
};
|
|
7
|
+
export declare const WEB_APP: {
|
|
8
|
+
readonly NAME: "Plyaz The App";
|
|
9
|
+
readonly VERSION: "1.0.0";
|
|
10
|
+
readonly DEFAULT_LOCALE: "en";
|
|
11
|
+
readonly SUPPORTED_LOCALES: readonly ["en", "es", "pt"];
|
|
12
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const CONTRACTS: {
|
|
2
|
+
readonly nftManager: {
|
|
3
|
+
readonly read: {
|
|
4
|
+
readonly arbitrum: "";
|
|
5
|
+
};
|
|
6
|
+
readonly write: {
|
|
7
|
+
readonly arbitrum: "";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
readonly tokenManager: {
|
|
11
|
+
readonly read: {
|
|
12
|
+
readonly arbitrum: "";
|
|
13
|
+
};
|
|
14
|
+
readonly write: {
|
|
15
|
+
readonly arbitrum: "";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
export declare const PROD_SUPPORTED_CHAINS: {
|
|
2
|
+
readonly ethereum: {
|
|
3
|
+
blockExplorers: {
|
|
4
|
+
readonly default: {
|
|
5
|
+
readonly name: "Etherscan";
|
|
6
|
+
readonly url: "https://etherscan.io";
|
|
7
|
+
readonly apiUrl: "https://api.etherscan.io/api";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
blockTime?: number | undefined | undefined;
|
|
11
|
+
contracts: {
|
|
12
|
+
readonly ensRegistry: {
|
|
13
|
+
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
14
|
+
};
|
|
15
|
+
readonly ensUniversalResolver: {
|
|
16
|
+
readonly address: "0xce01f8eee7E479C928F8919abD53E553a36CeF67";
|
|
17
|
+
readonly blockCreated: 19258213;
|
|
18
|
+
};
|
|
19
|
+
readonly multicall3: {
|
|
20
|
+
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
21
|
+
readonly blockCreated: 14353601;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
ensTlds?: readonly string[] | undefined;
|
|
25
|
+
id: 1;
|
|
26
|
+
name: "Ethereum";
|
|
27
|
+
nativeCurrency: {
|
|
28
|
+
readonly name: "Ether";
|
|
29
|
+
readonly symbol: "ETH";
|
|
30
|
+
readonly decimals: 18;
|
|
31
|
+
};
|
|
32
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
33
|
+
rpcUrls: {
|
|
34
|
+
readonly default: {
|
|
35
|
+
readonly http: readonly ["https://eth.merkle.io"];
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
sourceId?: number | undefined | undefined;
|
|
39
|
+
testnet?: boolean | undefined | undefined;
|
|
40
|
+
custom?: Record<string, unknown> | undefined;
|
|
41
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
42
|
+
formatters?: undefined;
|
|
43
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export declare const STAGING_SUPPORTED_CHAINS: {
|
|
47
|
+
readonly ethereum: {
|
|
48
|
+
blockExplorers: {
|
|
49
|
+
readonly default: {
|
|
50
|
+
readonly name: "Etherscan";
|
|
51
|
+
readonly url: "https://etherscan.io";
|
|
52
|
+
readonly apiUrl: "https://api.etherscan.io/api";
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
blockTime?: number | undefined | undefined;
|
|
56
|
+
contracts: {
|
|
57
|
+
readonly ensRegistry: {
|
|
58
|
+
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
59
|
+
};
|
|
60
|
+
readonly ensUniversalResolver: {
|
|
61
|
+
readonly address: "0xce01f8eee7E479C928F8919abD53E553a36CeF67";
|
|
62
|
+
readonly blockCreated: 19258213;
|
|
63
|
+
};
|
|
64
|
+
readonly multicall3: {
|
|
65
|
+
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
66
|
+
readonly blockCreated: 14353601;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
ensTlds?: readonly string[] | undefined;
|
|
70
|
+
id: 1;
|
|
71
|
+
name: "Ethereum";
|
|
72
|
+
nativeCurrency: {
|
|
73
|
+
readonly name: "Ether";
|
|
74
|
+
readonly symbol: "ETH";
|
|
75
|
+
readonly decimals: 18;
|
|
76
|
+
};
|
|
77
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
78
|
+
rpcUrls: {
|
|
79
|
+
readonly default: {
|
|
80
|
+
readonly http: readonly ["https://eth.merkle.io"];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
sourceId?: number | undefined | undefined;
|
|
84
|
+
testnet?: boolean | undefined | undefined;
|
|
85
|
+
custom?: Record<string, unknown> | undefined;
|
|
86
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
87
|
+
formatters?: undefined;
|
|
88
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
89
|
+
};
|
|
90
|
+
readonly sepolia: {
|
|
91
|
+
blockExplorers: {
|
|
92
|
+
readonly default: {
|
|
93
|
+
readonly name: "Etherscan";
|
|
94
|
+
readonly url: "https://sepolia.etherscan.io";
|
|
95
|
+
readonly apiUrl: "https://api-sepolia.etherscan.io/api";
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
blockTime?: number | undefined | undefined;
|
|
99
|
+
contracts: {
|
|
100
|
+
readonly multicall3: {
|
|
101
|
+
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
102
|
+
readonly blockCreated: 751532;
|
|
103
|
+
};
|
|
104
|
+
readonly ensRegistry: {
|
|
105
|
+
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
106
|
+
};
|
|
107
|
+
readonly ensUniversalResolver: {
|
|
108
|
+
readonly address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC";
|
|
109
|
+
readonly blockCreated: 5317080;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
ensTlds?: readonly string[] | undefined;
|
|
113
|
+
id: 11155111;
|
|
114
|
+
name: "Sepolia";
|
|
115
|
+
nativeCurrency: {
|
|
116
|
+
readonly name: "Sepolia Ether";
|
|
117
|
+
readonly symbol: "ETH";
|
|
118
|
+
readonly decimals: 18;
|
|
119
|
+
};
|
|
120
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
121
|
+
rpcUrls: {
|
|
122
|
+
readonly default: {
|
|
123
|
+
readonly http: readonly ["https://sepolia.drpc.org"];
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
sourceId?: number | undefined | undefined;
|
|
127
|
+
testnet: true;
|
|
128
|
+
custom?: Record<string, unknown> | undefined;
|
|
129
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
130
|
+
formatters?: undefined;
|
|
131
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export declare const DEV_SUPPORTED_CHAINS: {
|
|
135
|
+
readonly sepolia: {
|
|
136
|
+
blockExplorers: {
|
|
137
|
+
readonly default: {
|
|
138
|
+
readonly name: "Etherscan";
|
|
139
|
+
readonly url: "https://sepolia.etherscan.io";
|
|
140
|
+
readonly apiUrl: "https://api-sepolia.etherscan.io/api";
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
blockTime?: number | undefined | undefined;
|
|
144
|
+
contracts: {
|
|
145
|
+
readonly multicall3: {
|
|
146
|
+
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
147
|
+
readonly blockCreated: 751532;
|
|
148
|
+
};
|
|
149
|
+
readonly ensRegistry: {
|
|
150
|
+
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
151
|
+
};
|
|
152
|
+
readonly ensUniversalResolver: {
|
|
153
|
+
readonly address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC";
|
|
154
|
+
readonly blockCreated: 5317080;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
ensTlds?: readonly string[] | undefined;
|
|
158
|
+
id: 11155111;
|
|
159
|
+
name: "Sepolia";
|
|
160
|
+
nativeCurrency: {
|
|
161
|
+
readonly name: "Sepolia Ether";
|
|
162
|
+
readonly symbol: "ETH";
|
|
163
|
+
readonly decimals: 18;
|
|
164
|
+
};
|
|
165
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
166
|
+
rpcUrls: {
|
|
167
|
+
readonly default: {
|
|
168
|
+
readonly http: readonly ["https://sepolia.drpc.org"];
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
sourceId?: number | undefined | undefined;
|
|
172
|
+
testnet: true;
|
|
173
|
+
custom?: Record<string, unknown> | undefined;
|
|
174
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
175
|
+
formatters?: undefined;
|
|
176
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display and Character Constants
|
|
3
|
+
*
|
|
4
|
+
* Constants for display formatting, charting,
|
|
5
|
+
* and character code operations.
|
|
6
|
+
*
|
|
7
|
+
* @module display/constants
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Display and chart formatting constants
|
|
11
|
+
*/
|
|
12
|
+
export declare const DISPLAY_CONSTANTS: {
|
|
13
|
+
/**
|
|
14
|
+
* Maximum length for chart bar display
|
|
15
|
+
*/
|
|
16
|
+
readonly CHART_BAR_MAX_LENGTH: 40;
|
|
17
|
+
/**
|
|
18
|
+
* Length of chart separator lines
|
|
19
|
+
*/
|
|
20
|
+
readonly CHART_SEPARATOR_LENGTH: 60;
|
|
21
|
+
/**
|
|
22
|
+
* Number of decimal places for display precision
|
|
23
|
+
*/
|
|
24
|
+
readonly DECIMAL_PRECISION: 3;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Character code constants
|
|
28
|
+
*/
|
|
29
|
+
export declare const CHAR_CODES: {
|
|
30
|
+
/**
|
|
31
|
+
* ASCII code for lowercase 'a'
|
|
32
|
+
*/
|
|
33
|
+
readonly LOWERCASE_A: 97;
|
|
34
|
+
/**
|
|
35
|
+
* Number of letters in the alphabet
|
|
36
|
+
*/
|
|
37
|
+
readonly ALPHABET_SIZE: 26;
|
|
38
|
+
/**
|
|
39
|
+
* ASCII code for space character
|
|
40
|
+
*/
|
|
41
|
+
readonly SPACE: 32;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Type for display constant values
|
|
45
|
+
*/
|
|
46
|
+
export type DisplayConstant = (typeof DISPLAY_CONSTANTS)[keyof typeof DISPLAY_CONSTANTS];
|
|
47
|
+
/**
|
|
48
|
+
* Type for character code values
|
|
49
|
+
*/
|
|
50
|
+
export type CharCode = (typeof CHAR_CODES)[keyof typeof CHAR_CODES];
|
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const FEATURES: {
|
|
2
|
+
readonly AUTH_GOOGLE: true;
|
|
3
|
+
readonly AUTH_DISCORD: boolean;
|
|
4
|
+
readonly AUTH_FACEBOOK: false;
|
|
5
|
+
readonly AUTH_GITHUB: true;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Default backend configuration for feature flags.
|
|
9
|
+
* Optimized for server-side usage with reasonable defaults.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEFAULT_BACKEND_CONFIG: {
|
|
12
|
+
readonly provider: "database";
|
|
13
|
+
readonly isCacheEnabled: true;
|
|
14
|
+
readonly cacheTtl: 300;
|
|
15
|
+
readonly refreshInterval: 60;
|
|
16
|
+
readonly shouldFallbackToDefaults: true;
|
|
17
|
+
readonly isLoggingEnabled: boolean;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Default frontend configuration for feature flags.
|
|
21
|
+
* Optimized for client-side usage with reasonable defaults.
|
|
22
|
+
*/
|
|
23
|
+
export declare const DEFAULT_FRONTEND_CONFIG: {
|
|
24
|
+
readonly provider: "memory";
|
|
25
|
+
readonly isCacheEnabled: true;
|
|
26
|
+
readonly cacheTtl: 300;
|
|
27
|
+
readonly refreshInterval: 0;
|
|
28
|
+
readonly shouldFallbackToDefaults: true;
|
|
29
|
+
readonly isLoggingEnabled: false;
|
|
30
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP Status Code Constants
|
|
3
|
+
*
|
|
4
|
+
* Common HTTP status codes used throughout the application.
|
|
5
|
+
* Based on RFC 9110 (HTTP Semantics) and common usage patterns.
|
|
6
|
+
*
|
|
7
|
+
* @module http/constants
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Standard HTTP status codes
|
|
11
|
+
*/
|
|
12
|
+
export declare const HTTP_STATUS: {
|
|
13
|
+
/**
|
|
14
|
+
* 200 OK - The request succeeded
|
|
15
|
+
*/
|
|
16
|
+
readonly OK: 200;
|
|
17
|
+
/**
|
|
18
|
+
* 201 Created - The request succeeded and a new resource was created
|
|
19
|
+
*/
|
|
20
|
+
readonly CREATED: 201;
|
|
21
|
+
/**
|
|
22
|
+
* 302 Found - The resource resides temporarily under a different URI
|
|
23
|
+
*/
|
|
24
|
+
readonly FOUND: 302;
|
|
25
|
+
/**
|
|
26
|
+
* 307 Temporary Redirect - The request should be repeated with another URI
|
|
27
|
+
*/
|
|
28
|
+
readonly TEMPORARY_REDIRECT: 307;
|
|
29
|
+
/**
|
|
30
|
+
* 400 Bad Request - The server cannot process the request due to client error
|
|
31
|
+
*/
|
|
32
|
+
readonly BAD_REQUEST: 400;
|
|
33
|
+
/**
|
|
34
|
+
* 401 Unauthorized - Authentication is required and has failed or not been provided
|
|
35
|
+
*/
|
|
36
|
+
readonly UNAUTHORIZED: 401;
|
|
37
|
+
/**
|
|
38
|
+
* 403 Forbidden - The server understood the request but refuses to authorize it
|
|
39
|
+
*/
|
|
40
|
+
readonly FORBIDDEN: 403;
|
|
41
|
+
/**
|
|
42
|
+
* 404 Not Found - The server cannot find the requested resource
|
|
43
|
+
*/
|
|
44
|
+
readonly NOT_FOUND: 404;
|
|
45
|
+
/**
|
|
46
|
+
* 500 Internal Server Error - The server encountered an unexpected condition
|
|
47
|
+
*/
|
|
48
|
+
readonly INTERNAL_SERVER_ERROR: 500;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Type for HTTP status codes
|
|
52
|
+
*/
|
|
53
|
+
export type HttpStatusCode = (typeof HTTP_STATUS)[keyof typeof HTTP_STATUS];
|