@proton/wrap-constants 0.3.0 → 0.3.1

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,89 +0,0 @@
1
- import * as z from 'zod'
2
-
3
- export interface CurrencyStat {
4
- supply : string;
5
- max_supply: string;
6
- issuer : string;
7
- }
8
- export interface CurrencyStats {
9
- [key: string]: CurrencyStat;
10
- }
11
-
12
- export const rateParser = z.object({
13
- counterCurrency : z.string(),
14
- price : z.number(),
15
- priceChangePercent: z.number(),
16
- marketCap : z.number(),
17
- volume : z.number(),
18
- timestamp : z.number()
19
- })
20
- export type Rate = z.infer<typeof rateParser>
21
-
22
- export const exchangeRateParser = z.object({
23
- contract: z.string(),
24
- symbol : z.string(),
25
- rank : z.number(),
26
- rates : z.array(rateParser)
27
- })
28
- export type ExchangeRate = z.infer<typeof exchangeRateParser>
29
-
30
- export const exchangeRatesParser = z.array(exchangeRateParser)
31
- export type ExchangeRates = z.infer<typeof exchangeRatesParser>
32
-
33
- export const bloksRatesParser = z.array(z.object({
34
- contract: z.string(),
35
- symbol : z.string(),
36
- rank : z.number(),
37
- rates : z.array(rateParser)
38
- }))
39
-
40
- export type BloksRate = {
41
- key: string;
42
- symbol: string;
43
- account: string;
44
- chain: string;
45
- supply: {
46
- circulating: number;
47
- max: number;
48
- precision: number;
49
- last_update: string;
50
- };
51
- metadata: {
52
- name: string;
53
- website: string;
54
- logo: string;
55
- created_at: string;
56
- desc: string;
57
- };
58
- pairs: [
59
- {
60
- id: string;
61
- pair_base: string;
62
- pair_quote: string;
63
- exchange: string;
64
- quote:{
65
- price: number
66
- volume_base_24h: number
67
- volume_quote_24h: number
68
- market_cap: number
69
- price_usd: number
70
- volume_usd_24h: number
71
- },
72
- percentage_daily_volume: number
73
- },
74
- ];
75
- price: {
76
- quotes: {
77
- [key: string]: number
78
- },
79
- usd: number;
80
- volume_base_24h: number;
81
- volume_usd_24h: number;
82
- marketcap_usd: number;
83
- change_24hr: number;
84
- },
85
- rank: number;
86
- chain_rank: number;
87
- }
88
-
89
- export type BloksRates = BloksRate[]
@@ -1,31 +0,0 @@
1
- import * as z from "zod";
2
-
3
- export enum Type {
4
- RECEIVE = "receive",
5
- SEND = "send",
6
- }
7
-
8
- export const depositBodyParser = z.object({
9
- id: z.string(), // "0x000010203121388fac991"
10
- type: z.enum(Type), // "receive" or "send"
11
- hash: z.string(), // "0x000010203121388fac991"
12
- coin: z.string(), // "ETH" or "XPR"
13
- wallet: z.string(), // "ETH-SEPOLIA" or "XPR-MAINNET"
14
- network: z.string(), // "erc29"
15
- });
16
- export type DepositBody = z.infer<typeof depositBodyParser>;
17
-
18
- export const metalTransactionParser = z.object({
19
- id: z.string(), // "2629304740076324677"
20
- wallet: z.string(), // "ETH"
21
- value: z.number(), // 10000000000000000
22
- valueString: z.string(), // "10000000000000000"
23
- address: z.string(), // "0x0000"
24
- type: z.enum(Type), // "receive" or "send"
25
- state: z.string(), // "confirmed"
26
- confirmations: z.number(), // 1
27
- hash: z.string(), // "b4781422be95fee8fbbf720e3e0fa9705ae834474ef25f5724cdd0f5d23211ed"
28
- blockHash: z.string().optional().nullable(), // "000000000000000000089b270eb99f75107d6a9cde37ec944cb80a2998df7b43"
29
- blockHeight: z.number().optional().nullable(), // 643159
30
- });
31
- export type MetalTransaction = z.infer<typeof metalTransactionParser>;