-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.ts
84 lines (77 loc) · 1.57 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
export type MetaData = {
[key: string]: string | number | boolean | DataWithRarity;
}[];
export type BlockStatsFields =
| "size"
| "transaction_count"
| "total_fee"
| "total_rewards"
| "mint_rewards"
| "stripped_size"
| "weight"
| "avg_fee"
| "avg_fee_rate"
| "avg_tx_size"
| "max_fee"
| "max_fee_rate"
| "max_transaction_size"
| "median_fee"
| "median_transaction_size"
| "min_fee"
| "min_fee_rate"
| "min_transaction_size"
| "ins"
| "outs"
| "subsidy"
| "segwit_total_size"
| "segwit_total_weight"
| "segwit_transaction_count"
| "total_out"
| "total_weight"
| "utxo_increase"
| "utxo_size_increase"
| "utxo_increase_actual"
| "utxo_size_increase_actual";
export type BlockTributesFields =
| "is_1_tx"
| "is_billionaire"
| "is_epic"
| "is_first_transaction"
| "is_miner_message"
| "is_palindrome"
| "is_patoshi"
| "is_patoshi_spent"
| "is_pizza"
| "is_rare"
| "is_vintage";
export type BlockCardData = {
rank: number;
block_height: number;
datetime: string;
blocktributes: BlockTributes;
stats: BlockStats;
miner_message: MinerMessage;
rarity: Rarity;
};
export type BlockTributes = {
[key in BlockTributesFields]: boolean;
};
export type MinerMessage = {
message: string;
description: string;
transaction_id: string;
};
export type BlockStats = {
[key in BlockStatsFields]: DataWithRarity;
};
export type DataWithRarity = {
value: number | null;
pr: number;
};
export type Rarity = {
rank: number;
score: number;
};
export type ParamsWithRarity = {
[key: string]: DataWithRarity;
};