1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | let values = Object.freeze({
|
10 |
|
11 |
|
12 |
|
13 | zeroX: '0x',
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | nat: {
|
19 | zero: '0x0',
|
20 | one: '0x1'
|
21 | },
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | hex: {
|
27 | zero: '0x00',
|
28 | one: '0x01',
|
29 |
|
30 |
|
31 |
|
32 | randomHexSize: 32
|
33 | },
|
34 |
|
35 |
|
36 |
|
37 | maxIntSize: 128,
|
38 | rpc: {
|
39 | url: 'http://127.0.0.1:8545'
|
40 | },
|
41 | addresses: {
|
42 |
|
43 | identifier: new Buffer('a0', 'hex'),
|
44 |
|
45 | nonNumericLength: 64,
|
46 |
|
47 | numericLength: 66,
|
48 | bytesLength: 32
|
49 | },
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 | crypto: {
|
56 | saltLength: 32,
|
57 | ivLength: 16,
|
58 | kdf: 'script',
|
59 | dklen: 32,
|
60 | pbkdf2: {
|
61 | c: 262144,
|
62 | prf: 'hmac-sha256',
|
63 | digest: 'sha256'
|
64 | },
|
65 | scrypt: {
|
66 | n: 8192,
|
67 | r: 8,
|
68 | p: 2
|
69 | },
|
70 | cipherIvAlgorithm: 'aes-128-ctr',
|
71 | uuidRandomBytes: 16
|
72 | },
|
73 |
|
74 |
|
75 |
|
76 | solidity: {
|
77 |
|
78 |
|
79 |
|
80 | pack: {
|
81 | zero: '00',
|
82 | one: '01'
|
83 | },
|
84 |
|
85 | dimensionStartChar: '[',
|
86 | dimensionEndChar: ']',
|
87 | dimensionsDynamic: '[]',
|
88 | |
89 |
|
90 |
|
91 |
|
92 |
|
93 | types: {
|
94 | function: {
|
95 |
|
96 | byteLengthEncoded: 4,
|
97 | bytelength: 16
|
98 | },
|
99 | bool: {
|
100 | pad: 'left',
|
101 | byteLength: 16,
|
102 | stringLength: 32,
|
103 | zero: '00000000000000000000000000000000',
|
104 | one: '00000000000000000000000000000001'
|
105 | },
|
106 | uint: {
|
107 | pad: 'left',
|
108 | byteLength: 16,
|
109 | stringLength: 32,
|
110 | numeric: true
|
111 | },
|
112 | int: {
|
113 | pad: 'left',
|
114 | byteLength: 16,
|
115 | stringLength: 32,
|
116 | numeric: true
|
117 | },
|
118 | fixed: {
|
119 | pad: 'left',
|
120 | byteLength: 16,
|
121 | stringLength: 32,
|
122 | numeric: true
|
123 | },
|
124 | ufixed: {
|
125 | pad: 'left',
|
126 | byteLength: 16,
|
127 | stringLength: 32,
|
128 | numeric: true
|
129 | },
|
130 | address: {
|
131 |
|
132 |
|
133 | pad: 'left',
|
134 | byteLength: 32,
|
135 | stringLength: 64
|
136 | },
|
137 | bytes: {
|
138 | pad: 'right',
|
139 | dynamic: true,
|
140 | byteLength: 32,
|
141 | stringLength: 64
|
142 | },
|
143 | string: {
|
144 | pad: 'right',
|
145 | dynamic: true,
|
146 | byteLength: 32,
|
147 | stringLength: 64
|
148 | }
|
149 | },
|
150 | numericTypes: ['uint', 'int', 'fixed', 'ufixed']
|
151 | }
|
152 | })
|
153 |
|
154 | module.exports = values
|