@bitgo/statics 6.15.1-rc.7 → 6.16.0-rc.10

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.
@@ -0,0 +1,3 @@
1
+ .nyc_output/
2
+ dist/
3
+ mochawesome-report/
package/README.md CHANGED
@@ -6,16 +6,18 @@
6
6
  </h3>
7
7
 
8
8
  ## Goals
9
- * Provide an "encyclopedia" of all relevant constants which are sprinkled throughout the BitGo stack.
10
- * Separate *static* config data from *dynamic* config data
11
- * Strong typing for static config properties, with full type information for configuration items
12
- * Ability to export static configuration as JSON for consumption by non-javascript projects
9
+
10
+ - Provide an "encyclopedia" of all relevant constants which are sprinkled throughout the BitGo stack.
11
+ - Separate _static_ config data from _dynamic_ config data
12
+ - Strong typing for static config properties, with full type information for configuration items
13
+ - Ability to export static configuration as JSON for consumption by non-javascript projects
13
14
 
14
15
  ## Examples
15
16
 
16
17
  ### Get the number of decimal places in a Bitcoin
17
18
 
18
- #### Javascript
19
+ #### JavaScript
20
+
19
21
  ```js
20
22
  const { coins } = require('@bitgo/statics');
21
23
 
@@ -23,7 +25,8 @@ const btc = coins.get('btc');
23
25
  console.log(btc.decimalPlaces);
24
26
  ```
25
27
 
26
- #### Typescript
28
+ #### TypeScript
29
+
27
30
  ```typescript
28
31
  import { coins } from '@bitgo/statics';
29
32
 
@@ -33,7 +36,8 @@ console.log(btc.decimalPlaces);
33
36
 
34
37
  ### Get the contract address for the OmiseGo ERC20 Token
35
38
 
36
- #### Javascript
39
+ #### JavaScript
40
+
37
41
  ```js
38
42
  const { coins } = require('@bitgo/statics');
39
43
 
@@ -41,7 +45,8 @@ const omg = coins.get('omg');
41
45
  console.log(omg.contractAddress);
42
46
  ```
43
47
 
44
- #### Typescript
48
+ #### TypeScript
49
+
45
50
  ```typescript
46
51
  import { coins, Erc20Coin } from '@bitgo/statics';
47
52
 
@@ -53,7 +58,8 @@ if (omg instanceof Erc20Coin) {
53
58
 
54
59
  ### List full names of all defined coins
55
60
 
56
- #### Javascript
61
+ #### JavaScript
62
+
57
63
  ```js
58
64
  const { coins } = require('@bitgo/statics');
59
65
 
@@ -62,7 +68,8 @@ coins.forEach((coin) => {
62
68
  });
63
69
  ```
64
70
 
65
- #### Typescript
71
+ #### TypeScript
72
+
66
73
  ```typescript
67
74
  import { coins } from '@bitgo/statics';
68
75
 
@@ -72,19 +79,22 @@ coins.forEach((coin) => {
72
79
  ```
73
80
 
74
81
  ## Repo Status
75
- * UTXO and account base types are defined
76
- * Documentation is mostly source code comments and README examples
77
- * This library can be depended on, but expect some changes going forward
82
+
83
+ - UTXO and account base types are defined
84
+ - Documentation is mostly source code comments and README examples
85
+ - This library can be depended on, but expect some changes going forward
78
86
 
79
87
  ## Project Structure
80
- * `src/base.ts`: Interfaces and enums used by coin implementation classes.
81
- * `src/coins.ts`: Coin definitions.
82
- * `src/networks.ts`: Network interfaces and implementation classes.
83
- * `src/utxo.ts`: Unspent Transaction Output (UTXO) based coin classes and factory function.
84
- * `src/account.ts`: Account-based coin classes and factory methods. Includes ERC20 factory functions.
85
- * `src/errors.ts`: Custom Error classes.
88
+
89
+ - `src/base.ts`: Interfaces and enums used by coin implementation classes.
90
+ - `src/coins.ts`: Coin definitions.
91
+ - `src/networks.ts`: Network interfaces and implementation classes.
92
+ - `src/utxo.ts`: Unspent Transaction Output (UTXO) based coin classes and factory function.
93
+ - `src/account.ts`: Account-based coin classes and factory methods. Includes ERC20 factory functions.
94
+ - `src/errors.ts`: Custom Error classes.
86
95
 
87
96
  ## Installation + Building
97
+
88
98
  To install the project locally, run the following steps:
89
99
 
90
100
  ```
@@ -97,14 +107,13 @@ $ # (optionally) nvm use 8.6.0
97
107
  $ npm install
98
108
  ```
99
109
 
100
- To build the project (from TypeScript to Javascript):
110
+ To build the project (from TypeScript to JavaScript):
101
111
 
102
112
  ```
103
113
  $ npm run build
104
114
  ```
105
115
 
106
- This builds the Javascript and adds it to `dist/src/`. You will receive compilation errors if you have invalid syntax.
107
-
116
+ This builds the JavaScript and adds it to `dist/src/`. You will receive compilation errors if you have invalid syntax.
108
117
 
109
118
  ## Tests
110
119