@plyaz/config 1.0.2 → 1.0.4
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/index.cjs +291 -83
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +448 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +18 -11
- package/dist/api.d.ts +0 -22
- package/dist/app.d.ts +0 -12
- package/dist/chains/contracts.d.ts +0 -18
- package/dist/chains/index.d.ts +0 -2
- package/dist/chains/supportedChains.d.ts +0 -178
- package/dist/constants.d.ts +0 -3
- package/dist/domains.d.ts +0 -4
- package/dist/env.d.ts +0 -4
- package/dist/features.d.ts +0 -28
- package/dist/index.d.ts +0 -9
- package/dist/index.js +0 -174
- package/dist/index.js.map +0 -1
- package/dist/providers/alchemy.d.ts +0 -11
- package/dist/providers/index.d.ts +0 -2
- package/dist/providers/oauth.d.ts +0 -20
- package/dist/security.d.ts +0 -3
|
@@ -1,178 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/constants.d.ts
DELETED
package/dist/domains.d.ts
DELETED
package/dist/env.d.ts
DELETED
package/dist/features.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export declare const FEATURES: {
|
|
2
|
-
readonly AUTH_GOOGLE: true;
|
|
3
|
-
readonly AUTH_DISCORD: boolean;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Default backend configuration for feature flags.
|
|
7
|
-
* Optimized for server-side usage with reasonable defaults.
|
|
8
|
-
*/
|
|
9
|
-
export declare const DEFAULT_BACKEND_CONFIG: {
|
|
10
|
-
readonly provider: "database";
|
|
11
|
-
readonly isCacheEnabled: true;
|
|
12
|
-
readonly cacheTtl: 300;
|
|
13
|
-
readonly refreshInterval: 60;
|
|
14
|
-
readonly shouldFallbackToDefaults: true;
|
|
15
|
-
readonly isLoggingEnabled: boolean;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Default frontend configuration for feature flags.
|
|
19
|
-
* Optimized for client-side usage with reasonable defaults.
|
|
20
|
-
*/
|
|
21
|
-
export declare const DEFAULT_FRONTEND_CONFIG: {
|
|
22
|
-
readonly provider: "memory";
|
|
23
|
-
readonly isCacheEnabled: true;
|
|
24
|
-
readonly cacheTtl: 300;
|
|
25
|
-
readonly refreshInterval: 0;
|
|
26
|
-
readonly shouldFallbackToDefaults: true;
|
|
27
|
-
readonly isLoggingEnabled: false;
|
|
28
|
-
};
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { sepolia, mainnet } from 'viem/chains';
|
|
2
|
-
|
|
3
|
-
// @plyaz package - Built with tsup
|
|
4
|
-
|
|
5
|
-
// src/env.ts
|
|
6
|
-
var isServer = typeof window === "undefined";
|
|
7
|
-
var isDev = globalThis.process.env.NODE_ENV === "development";
|
|
8
|
-
var isProd = globalThis.process.env.NODE_ENV === "production";
|
|
9
|
-
var isTest = globalThis.process.env.NODE_ENV === "test";
|
|
10
|
-
|
|
11
|
-
// src/providers/alchemy.ts
|
|
12
|
-
var ALCHEMY_CONFIG = {
|
|
13
|
-
apiKey: globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY,
|
|
14
|
-
rpcUrls: {
|
|
15
|
-
ethereum: `https://eth-mainnet.g.alchemy.com/v2/${globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY}`,
|
|
16
|
-
polygon: `https://polygon-mainnet.g.alchemy.com/v2/${globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY}`,
|
|
17
|
-
arbitrum: `https://arb-mainnet.g.alchemy.com/v2/${globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY}`,
|
|
18
|
-
optimism: `https://opt-mainnet.g.alchemy.com/v2/${globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY}`,
|
|
19
|
-
base: `https://base-mainnet.g.alchemy.com/v2/${globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY}`,
|
|
20
|
-
solana: `https://solana-mainnet.g.alchemy.com/v2/${globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY}`
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
// src/providers/oauth.ts
|
|
25
|
-
var OAUTH_PROVIDERS = {
|
|
26
|
-
google: {
|
|
27
|
-
clientId: globalThis.process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID,
|
|
28
|
-
clientSecret: globalThis.process.env.GOOGLE_CLIENT_SECRET,
|
|
29
|
-
redirectUri: globalThis.process.env.NEXT_PUBLIC_GOOGLE_REDIRECT_URI,
|
|
30
|
-
scopes: ["openid", "profile", "email"]
|
|
31
|
-
},
|
|
32
|
-
discord: {
|
|
33
|
-
clientId: globalThis.process.env.NEXT_PUBLIC_DISCORD_CLIENT_ID,
|
|
34
|
-
clientSecret: globalThis.process.env.DISCORD_CLIENT_SECRET,
|
|
35
|
-
redirectUri: globalThis.process.env.NEXT_PUBLIC_DISCORD_REDIRECT_URI,
|
|
36
|
-
scopes: ["identify", "email"]
|
|
37
|
-
},
|
|
38
|
-
facebook: {
|
|
39
|
-
clientId: globalThis.process.env.NEXT_PUBLIC_FACEBOOK_CLIENT_ID,
|
|
40
|
-
clientSecret: globalThis.process.env.FACEBOOK_CLIENT_SECRET,
|
|
41
|
-
redirectUri: globalThis.process.env.NEXT_PUBLIC_FACEBOOK_REDIRECT_URI,
|
|
42
|
-
scopes: ["public_profile", "email"]
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
// src/chains/contracts.ts
|
|
47
|
-
var CONTRACTS = {
|
|
48
|
-
nftManager: {
|
|
49
|
-
read: {
|
|
50
|
-
arbitrum: ""
|
|
51
|
-
},
|
|
52
|
-
write: {
|
|
53
|
-
arbitrum: ""
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
tokenManager: {
|
|
57
|
-
read: {
|
|
58
|
-
arbitrum: ""
|
|
59
|
-
},
|
|
60
|
-
write: {
|
|
61
|
-
arbitrum: ""
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
var PROD_SUPPORTED_CHAINS = {
|
|
66
|
-
// Mainnets
|
|
67
|
-
ethereum: mainnet
|
|
68
|
-
};
|
|
69
|
-
var STAGING_SUPPORTED_CHAINS = {
|
|
70
|
-
// Mainnets
|
|
71
|
-
ethereum: mainnet,
|
|
72
|
-
// Testnets
|
|
73
|
-
sepolia
|
|
74
|
-
};
|
|
75
|
-
var DEV_SUPPORTED_CHAINS = {
|
|
76
|
-
// Testnets
|
|
77
|
-
sepolia
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
// src/features.ts
|
|
81
|
-
var FEATURES = {
|
|
82
|
-
// Authentication & Auth Providers
|
|
83
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
84
|
-
AUTH_GOOGLE: true,
|
|
85
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
86
|
-
AUTH_DISCORD: isDev
|
|
87
|
-
};
|
|
88
|
-
var DEFAULT_BACKEND_CONFIG = {
|
|
89
|
-
provider: "database",
|
|
90
|
-
isCacheEnabled: true,
|
|
91
|
-
cacheTtl: 300,
|
|
92
|
-
// 5 minutes
|
|
93
|
-
refreshInterval: 60,
|
|
94
|
-
// 1 minute auto-refresh
|
|
95
|
-
shouldFallbackToDefaults: true,
|
|
96
|
-
isLoggingEnabled: globalThis.process.env.NODE_ENV === "development"
|
|
97
|
-
};
|
|
98
|
-
var DEFAULT_FRONTEND_CONFIG = {
|
|
99
|
-
provider: "memory",
|
|
100
|
-
isCacheEnabled: true,
|
|
101
|
-
cacheTtl: 300,
|
|
102
|
-
// 5 minutes
|
|
103
|
-
refreshInterval: 0,
|
|
104
|
-
// No auto-refresh for frontend
|
|
105
|
-
shouldFallbackToDefaults: true,
|
|
106
|
-
isLoggingEnabled: false
|
|
107
|
-
// Disabled in production
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
// src/domains.ts
|
|
111
|
-
var DOMAINS = {
|
|
112
|
-
app: "https://plyaz.co.uk",
|
|
113
|
-
api: globalThis.process.env.NEXT_PUBLIC_API_URL
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
// src/constants.ts
|
|
117
|
-
var DEFAULT_LOCALE = "en";
|
|
118
|
-
var SUPPORTED_LOCALES = ["en", "es", "pt"];
|
|
119
|
-
var TIMEZONE = "Europe/London";
|
|
120
|
-
|
|
121
|
-
// src/app.ts
|
|
122
|
-
var LANDING_PAGE_APP = {
|
|
123
|
-
NAME: "Plyaz",
|
|
124
|
-
VERSION: "1.0.0",
|
|
125
|
-
DEFAULT_LOCALE,
|
|
126
|
-
SUPPORTED_LOCALES
|
|
127
|
-
};
|
|
128
|
-
var WEB_APP = {
|
|
129
|
-
NAME: "Plyaz The App",
|
|
130
|
-
VERSION: "1.0.0",
|
|
131
|
-
DEFAULT_LOCALE,
|
|
132
|
-
SUPPORTED_LOCALES
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
// src/security.ts
|
|
136
|
-
var SECURITY = {
|
|
137
|
-
BLOCKED_REGIONS: ["KP", "SY", "IR", "CU", "SD", "SO", "UA-CR", "UA-DP", "UA-LU"]
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
// src/api.ts
|
|
141
|
-
var API_CONFIG = {};
|
|
142
|
-
var CACHE_CONFIG = {
|
|
143
|
-
// Cache TTL in seconds
|
|
144
|
-
ttl: {
|
|
145
|
-
short: 300,
|
|
146
|
-
// 5 minutes
|
|
147
|
-
medium: 1800,
|
|
148
|
-
// 30 minutes
|
|
149
|
-
long: 3600,
|
|
150
|
-
// 1 hour
|
|
151
|
-
extended: 86400
|
|
152
|
-
// 24 hours
|
|
153
|
-
},
|
|
154
|
-
// Cache keys
|
|
155
|
-
keys: {
|
|
156
|
-
user: "user:",
|
|
157
|
-
nft: "nft:",
|
|
158
|
-
blockchain: "blockchain:",
|
|
159
|
-
auth: "auth:"
|
|
160
|
-
},
|
|
161
|
-
// Redis configuration
|
|
162
|
-
redis: {
|
|
163
|
-
url: globalThis.process.env.REDIS_URL,
|
|
164
|
-
keyPrefix: "plyaz:",
|
|
165
|
-
maxRetriesPerRequest: 3,
|
|
166
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
167
|
-
lazyConnect: true
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
var WEBHOOK_CONFIG = {};
|
|
171
|
-
|
|
172
|
-
export { ALCHEMY_CONFIG, API_CONFIG, CACHE_CONFIG, CONTRACTS, DEFAULT_BACKEND_CONFIG, DEFAULT_FRONTEND_CONFIG, DEFAULT_LOCALE, DEV_SUPPORTED_CHAINS, DOMAINS, FEATURES, LANDING_PAGE_APP, OAUTH_PROVIDERS, PROD_SUPPORTED_CHAINS, SECURITY, STAGING_SUPPORTED_CHAINS, SUPPORTED_LOCALES, TIMEZONE, WEBHOOK_CONFIG, WEB_APP, isDev, isProd, isServer, isTest };
|
|
173
|
-
//# sourceMappingURL=index.js.map
|
|
174
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/env.ts","../src/providers/alchemy.ts","../src/providers/oauth.ts","../src/chains/contracts.ts","../src/chains/supportedChains.ts","../src/features.ts","../src/domains.ts","../src/constants.ts","../src/app.ts","../src/security.ts","../src/api.ts"],"names":[],"mappings":";;;;;AAAO,IAAM,QAAA,GAAW,OAAO,MAAA,KAAW;AACnC,IAAM,KAAA,GAAQ,UAAA,CAAW,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa;AAClD,IAAM,MAAA,GAAS,UAAA,CAAW,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa;AACnD,IAAM,MAAA,GAAS,UAAA,CAAW,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa;;;ACHnD,IAAM,cAAA,GAAiB;AAAA,EAC5B,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AAA,IACZ,IAAA,EAAM;AAAA,GACR;AAAA;AAAA,EAGA,KAAA,EAAO;AAAA,IACL,GAAA,EAAK,UAAA,CAAW,OAAA,CAAQ,GAAA,CAAI,SAAA;AAAA,IAC5B,SAAA,EAAW,QAAA;AAAA,IACX,oBAAA,EAAsB,CAAA;AAAA;AAAA,IAEtB,WAAA,EAAa;AAAA;AAEjB;AAEO,IAAM,iBAAiB","file":"index.js","sourcesContent":["export const isServer = typeof window === 'undefined';\nexport const isDev = globalThis.process.env.NODE_ENV === 'development';\nexport const isProd = globalThis.process.env.NODE_ENV === 'production';\nexport const isTest = globalThis.process.env.NODE_ENV === 'test';\n","export const ALCHEMY_CONFIG = {\n apiKey: globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY!,\n rpcUrls: {\n ethereum: `https://eth-mainnet.g.alchemy.com/v2/${globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY}`,\n polygon: `https://polygon-mainnet.g.alchemy.com/v2/${globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY}`,\n arbitrum: `https://arb-mainnet.g.alchemy.com/v2/${globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY}`,\n optimism: `https://opt-mainnet.g.alchemy.com/v2/${globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY}`,\n base: `https://base-mainnet.g.alchemy.com/v2/${globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY}`,\n solana: `https://solana-mainnet.g.alchemy.com/v2/${globalThis.process.env.NEXT_PUBLIC_ALCHEMY_KEY}`,\n },\n};\n","export const OAUTH_PROVIDERS = {\n google: {\n clientId: globalThis.process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID!,\n clientSecret: globalThis.process.env.GOOGLE_CLIENT_SECRET!,\n redirectUri: globalThis.process.env.NEXT_PUBLIC_GOOGLE_REDIRECT_URI!,\n scopes: ['openid', 'profile', 'email'],\n },\n discord: {\n clientId: globalThis.process.env.NEXT_PUBLIC_DISCORD_CLIENT_ID!,\n clientSecret: globalThis.process.env.DISCORD_CLIENT_SECRET!,\n redirectUri: globalThis.process.env.NEXT_PUBLIC_DISCORD_REDIRECT_URI!,\n scopes: ['identify', 'email'],\n },\n facebook: {\n clientId: globalThis.process.env.NEXT_PUBLIC_FACEBOOK_CLIENT_ID!,\n clientSecret: globalThis.process.env.FACEBOOK_CLIENT_SECRET!,\n redirectUri: globalThis.process.env.NEXT_PUBLIC_FACEBOOK_REDIRECT_URI!,\n scopes: ['public_profile', 'email'],\n },\n} as const;\n","export const CONTRACTS = {\n nftManager: {\n read: {\n arbitrum: '',\n },\n write: {\n arbitrum: '',\n },\n },\n tokenManager: {\n read: {\n arbitrum: '',\n },\n write: {\n arbitrum: '',\n },\n },\n} as const;\n","import { mainnet, sepolia } from 'viem/chains';\n\nexport const PROD_SUPPORTED_CHAINS = {\n // Mainnets\n ethereum: mainnet,\n} as const;\n\nexport const STAGING_SUPPORTED_CHAINS = {\n // Mainnets\n ethereum: mainnet,\n // Testnets\n sepolia,\n} as const;\n\nexport const DEV_SUPPORTED_CHAINS = {\n // Testnets\n sepolia,\n} as const;\n","import { isDev } from './env';\n\nexport const FEATURES = {\n // Authentication & Auth Providers\n // eslint-disable-next-line @typescript-eslint/naming-convention\n AUTH_GOOGLE: true,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n AUTH_DISCORD: isDev,\n} as const;\n\n/**\n * Default backend configuration for feature flags.\n * Optimized for server-side usage with reasonable defaults.\n */\nexport const DEFAULT_BACKEND_CONFIG = {\n provider: 'database',\n isCacheEnabled: true,\n cacheTtl: 300, // 5 minutes\n refreshInterval: 60, // 1 minute auto-refresh\n shouldFallbackToDefaults: true,\n isLoggingEnabled: globalThis.process.env.NODE_ENV === 'development',\n} as const;\n\n/**\n * Default frontend configuration for feature flags.\n * Optimized for client-side usage with reasonable defaults.\n */\nexport const DEFAULT_FRONTEND_CONFIG = {\n provider: 'memory',\n isCacheEnabled: true,\n cacheTtl: 300, // 5 minutes\n refreshInterval: 0, // No auto-refresh for frontend\n shouldFallbackToDefaults: true,\n isLoggingEnabled: false, // Disabled in production\n} as const;\n","export const DOMAINS = {\n app: 'https://plyaz.co.uk',\n api: globalThis.process.env.NEXT_PUBLIC_API_URL!,\n} as const;\n","export const DEFAULT_LOCALE = 'en';\nexport const SUPPORTED_LOCALES = ['en', 'es', 'pt'] as const;\nexport const TIMEZONE = 'Europe/London';","import { DEFAULT_LOCALE, SUPPORTED_LOCALES } from './constants';\n\nexport const LANDING_PAGE_APP = {\n NAME: 'Plyaz',\n VERSION: '1.0.0',\n DEFAULT_LOCALE,\n SUPPORTED_LOCALES,\n} as const;\n\nexport const WEB_APP = {\n NAME: 'Plyaz The App',\n VERSION: '1.0.0',\n DEFAULT_LOCALE,\n SUPPORTED_LOCALES,\n} as const;\n","export const SECURITY = {\n BLOCKED_REGIONS: ['KP', 'SY', 'IR', 'CU', 'SD', 'SO', 'UA-CR', 'UA-DP', 'UA-LU'],\n} as const;\n","export const API_CONFIG = {} as const;\n\nexport const CACHE_CONFIG = {\n // Cache TTL in seconds\n ttl: {\n short: 300, // 5 minutes\n medium: 1800, // 30 minutes\n long: 3600, // 1 hour\n extended: 86400, // 24 hours\n },\n\n // Cache keys\n keys: {\n user: 'user:',\n nft: 'nft:',\n blockchain: 'blockchain:',\n auth: 'auth:',\n },\n\n // Redis configuration\n redis: {\n url: globalThis.process.env.REDIS_URL!,\n keyPrefix: 'plyaz:',\n maxRetriesPerRequest: 3,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n lazyConnect: true,\n },\n} as const;\n\nexport const WEBHOOK_CONFIG = {} as const;\n"]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare const OAUTH_PROVIDERS: {
|
|
2
|
-
readonly google: {
|
|
3
|
-
readonly clientId: string;
|
|
4
|
-
readonly clientSecret: string;
|
|
5
|
-
readonly redirectUri: string;
|
|
6
|
-
readonly scopes: readonly ["openid", "profile", "email"];
|
|
7
|
-
};
|
|
8
|
-
readonly discord: {
|
|
9
|
-
readonly clientId: string;
|
|
10
|
-
readonly clientSecret: string;
|
|
11
|
-
readonly redirectUri: string;
|
|
12
|
-
readonly scopes: readonly ["identify", "email"];
|
|
13
|
-
};
|
|
14
|
-
readonly facebook: {
|
|
15
|
-
readonly clientId: string;
|
|
16
|
-
readonly clientSecret: string;
|
|
17
|
-
readonly redirectUri: string;
|
|
18
|
-
readonly scopes: readonly ["public_profile", "email"];
|
|
19
|
-
};
|
|
20
|
-
};
|
package/dist/security.d.ts
DELETED