@klappay/types 4.1.0 → 5.1.0

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,50 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- declare const EnvironmentSchema: z.ZodEnum<["live", "test"]>;
4
- type Environment = z.infer<typeof EnvironmentSchema>;
5
-
6
- declare const NetworkSchema: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
7
- type Network = z.infer<typeof NetworkSchema>;
8
-
9
- declare const NETWORK_LABELS: Record<Network, string>;
10
- declare const NETWORK_EXPLORERS: Record<Network, string>;
11
- declare const EVM_NETWORKS: readonly ["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"];
12
- type EvmNetwork = (typeof EVM_NETWORKS)[number];
13
- declare const OPERATIONAL_NETWORKS: readonly ["base", "arbitrum", "optimism", "polygon", "ethereum", "avalanche", "bnb"];
14
- type OperationalNetwork = (typeof OPERATIONAL_NETWORKS)[number];
15
- declare const CHAIN_IDS: Record<EvmNetwork, Partial<Record<Environment, number>>>;
16
-
17
- declare const TokenSchema: z.ZodEnum<["USDC", "USDT"]>;
18
- type Token = z.infer<typeof TokenSchema>;
19
-
20
- declare const TOKEN_DECIMALS = 6;
21
- type TokenDeployment = {
22
- address: `0x${string}`;
23
- decimals: number;
24
- };
25
- type DeploymentsByNetwork = Partial<Record<Network, Partial<Record<Environment, TokenDeployment>>>>;
26
- type AddressesByNetwork = Partial<Record<Network, Partial<Record<Environment, `0x${string}`>>>>;
27
- declare const TOKEN_DEPLOYMENTS: Record<Token, DeploymentsByNetwork>;
28
- declare function getTokenDeployment(token: Token, network: Network, environment: Environment): TokenDeployment | undefined;
29
- declare function isPaymentDeploymentEnabled(token: Token, network: Network, environment: Environment): boolean;
30
- declare const TOKEN_ADDRESSES: Record<Token, AddressesByNetwork>;
31
-
32
- declare const AltTokenSchema: z.ZodEnum<["ETH", "BNB", "MATIC", "AVAX", "BTC"]>;
33
- type AltToken = z.infer<typeof AltTokenSchema>;
34
- declare const SwapAlternativeSchema: z.ZodObject<{
35
- token: z.ZodEnum<["ETH", "BNB", "MATIC", "AVAX", "BTC"]>;
36
- network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
37
- }, "strip", z.ZodTypeAny, {
38
- token: "ETH" | "BNB" | "MATIC" | "AVAX" | "BTC";
39
- network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
40
- }, {
41
- token: "ETH" | "BNB" | "MATIC" | "AVAX" | "BTC";
42
- network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
43
- }>;
44
- type SwapAlternative = z.infer<typeof SwapAlternativeSchema>;
45
- declare function listSwapAlternatives(networks: readonly Network[]): SwapAlternative[];
46
-
47
- declare const ALT_TOKEN_DECIMALS: Record<AltToken, number>;
48
- declare const ALT_TOKEN_ADDRESSES: Record<Network, Partial<Record<AltToken, 'native' | `0x${string}`>>>;
49
-
50
- export { ALT_TOKEN_ADDRESSES as A, CHAIN_IDS as C, EVM_NETWORKS as E, NETWORK_EXPLORERS as N, OPERATIONAL_NETWORKS as O, type SwapAlternative as S, TOKEN_ADDRESSES as T, ALT_TOKEN_DECIMALS as a, type AltToken as b, AltTokenSchema as c, type Environment as d, EnvironmentSchema as e, type EvmNetwork as f, NETWORK_LABELS as g, type Network as h, NetworkSchema as i, type OperationalNetwork as j, SwapAlternativeSchema as k, TOKEN_DECIMALS as l, TOKEN_DEPLOYMENTS as m, type Token as n, type TokenDeployment as o, TokenSchema as p, getTokenDeployment as q, isPaymentDeploymentEnabled as r, listSwapAlternatives as s };
@@ -1,50 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- declare const EnvironmentSchema: z.ZodEnum<["live", "test"]>;
4
- type Environment = z.infer<typeof EnvironmentSchema>;
5
-
6
- declare const NetworkSchema: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
7
- type Network = z.infer<typeof NetworkSchema>;
8
-
9
- declare const NETWORK_LABELS: Record<Network, string>;
10
- declare const NETWORK_EXPLORERS: Record<Network, string>;
11
- declare const EVM_NETWORKS: readonly ["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"];
12
- type EvmNetwork = (typeof EVM_NETWORKS)[number];
13
- declare const OPERATIONAL_NETWORKS: readonly ["base", "arbitrum", "optimism", "polygon", "ethereum", "avalanche", "bnb"];
14
- type OperationalNetwork = (typeof OPERATIONAL_NETWORKS)[number];
15
- declare const CHAIN_IDS: Record<EvmNetwork, Partial<Record<Environment, number>>>;
16
-
17
- declare const TokenSchema: z.ZodEnum<["USDC", "USDT"]>;
18
- type Token = z.infer<typeof TokenSchema>;
19
-
20
- declare const TOKEN_DECIMALS = 6;
21
- type TokenDeployment = {
22
- address: `0x${string}`;
23
- decimals: number;
24
- };
25
- type DeploymentsByNetwork = Partial<Record<Network, Partial<Record<Environment, TokenDeployment>>>>;
26
- type AddressesByNetwork = Partial<Record<Network, Partial<Record<Environment, `0x${string}`>>>>;
27
- declare const TOKEN_DEPLOYMENTS: Record<Token, DeploymentsByNetwork>;
28
- declare function getTokenDeployment(token: Token, network: Network, environment: Environment): TokenDeployment | undefined;
29
- declare function isPaymentDeploymentEnabled(token: Token, network: Network, environment: Environment): boolean;
30
- declare const TOKEN_ADDRESSES: Record<Token, AddressesByNetwork>;
31
-
32
- declare const AltTokenSchema: z.ZodEnum<["ETH", "BNB", "MATIC", "AVAX", "BTC"]>;
33
- type AltToken = z.infer<typeof AltTokenSchema>;
34
- declare const SwapAlternativeSchema: z.ZodObject<{
35
- token: z.ZodEnum<["ETH", "BNB", "MATIC", "AVAX", "BTC"]>;
36
- network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
37
- }, "strip", z.ZodTypeAny, {
38
- token: "ETH" | "BNB" | "MATIC" | "AVAX" | "BTC";
39
- network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
40
- }, {
41
- token: "ETH" | "BNB" | "MATIC" | "AVAX" | "BTC";
42
- network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
43
- }>;
44
- type SwapAlternative = z.infer<typeof SwapAlternativeSchema>;
45
- declare function listSwapAlternatives(networks: readonly Network[]): SwapAlternative[];
46
-
47
- declare const ALT_TOKEN_DECIMALS: Record<AltToken, number>;
48
- declare const ALT_TOKEN_ADDRESSES: Record<Network, Partial<Record<AltToken, 'native' | `0x${string}`>>>;
49
-
50
- export { ALT_TOKEN_ADDRESSES as A, CHAIN_IDS as C, EVM_NETWORKS as E, NETWORK_EXPLORERS as N, OPERATIONAL_NETWORKS as O, type SwapAlternative as S, TOKEN_ADDRESSES as T, ALT_TOKEN_DECIMALS as a, type AltToken as b, AltTokenSchema as c, type Environment as d, EnvironmentSchema as e, type EvmNetwork as f, NETWORK_LABELS as g, type Network as h, NetworkSchema as i, type OperationalNetwork as j, SwapAlternativeSchema as k, TOKEN_DECIMALS as l, TOKEN_DEPLOYMENTS as m, type Token as n, type TokenDeployment as o, TokenSchema as p, getTokenDeployment as q, isPaymentDeploymentEnabled as r, listSwapAlternatives as s };