-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.h
45 lines (38 loc) · 883 Bytes
/
types.h
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
#ifndef TYPES_H
#define TYPES_H
#include <string>
#include <unordered_map>
enum TokenType
{
FUNCTION,
END_FUNC,
KEY,
CHECKSUM,
UNKNOWN
};
enum ScriptType
{
SH,
WSH,
PK,
PKH,
WPKH,
MULTI,
SORTEDMULTI,
ADDR,
UNKNOWN_SCRIPT
};
enum KeyType
{
COMPRESSED_PUBLIC_KEY,
UNCOMPRESSED_PUBLIC_KEY,
WIF_PK,
XPUB,
XPRV,
NUM, // This is technically not a key type
UNKNOWN_KEY
};
const std::unordered_map<std::string, ScriptType> script_types = {{"sh",ScriptType::SH}, {"wsh",ScriptType::WSH}, {"pk",ScriptType::PK}, {"pkh",ScriptType::PKH},
{"wpkh",ScriptType::WPKH}, {"multi",ScriptType::MULTI}, {"sortedmulti",ScriptType::SORTEDMULTI},
{"addr", ScriptType::ADDR}};
#endif