@proton/wrap-constants 0.2.187 → 0.2.189
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.
- package/README.md +14 -87
- package/dist/index.d.mts +13270 -0
- package/dist/index.d.ts +285 -286
- package/dist/index.js +97 -1514
- package/dist/index.mjs +94 -1511
- package/package.json +4 -7
- package/src/coins.ts +72 -0
- package/src/constants.ts +9 -10
package/README.md
CHANGED
|
@@ -1,103 +1,30 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Proton Wrap constants
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package provides a set of constants for MetalX DEX application like API endpoints, contract names etc.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### NPM
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The official distribution package can be found at [npm](https://www.npmjs.com/package/@proton/wrap-constants).
|
|
10
10
|
|
|
11
|
-
TSDX scaffolds your new library inside `/src`.
|
|
12
|
-
|
|
13
|
-
To run TSDX, use:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npm start # or yarn start
|
|
17
11
|
```
|
|
18
|
-
|
|
19
|
-
This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
|
|
20
|
-
|
|
21
|
-
To do a one-off build, use `npm run build` or `yarn build`.
|
|
22
|
-
|
|
23
|
-
To run tests, use `npm test` or `yarn test`.
|
|
24
|
-
|
|
25
|
-
## Configuration
|
|
26
|
-
|
|
27
|
-
Code quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.
|
|
28
|
-
|
|
29
|
-
### Jest
|
|
30
|
-
|
|
31
|
-
Jest tests are set up to run with `npm test` or `yarn test`.
|
|
32
|
-
|
|
33
|
-
### Bundle Analysis
|
|
34
|
-
|
|
35
|
-
[`size-limit`](https://github.com/ai/size-limit) is set up to calculate the real cost of your library with `npm run size` and visualize the bundle with `npm run analyze`.
|
|
36
|
-
|
|
37
|
-
#### Setup Files
|
|
38
|
-
|
|
39
|
-
This is the folder structure we set up for you:
|
|
40
|
-
|
|
41
|
-
```txt
|
|
42
|
-
/src
|
|
43
|
-
index.tsx # EDIT THIS
|
|
44
|
-
/test
|
|
45
|
-
blah.test.tsx # EDIT THIS
|
|
46
|
-
.gitignore
|
|
47
|
-
package.json
|
|
48
|
-
README.md # EDIT THIS
|
|
49
|
-
tsconfig.json
|
|
12
|
+
npm install @proton/wrap-constants
|
|
50
13
|
```
|
|
51
14
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.
|
|
55
|
-
|
|
56
|
-
### TypeScript
|
|
57
|
-
|
|
58
|
-
`tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.
|
|
59
|
-
|
|
60
|
-
## Continuous Integration
|
|
61
|
-
|
|
62
|
-
### GitHub Actions
|
|
63
|
-
|
|
64
|
-
Two actions are added by default:
|
|
65
|
-
|
|
66
|
-
- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix
|
|
67
|
-
- `size` which comments cost comparison of your library on every pull request using [`size-limit`](https://github.com/ai/size-limit)
|
|
68
|
-
|
|
69
|
-
## Optimizations
|
|
70
|
-
|
|
71
|
-
Please see the main `tsdx` [optimizations docs](https://github.com/palmerhq/tsdx#optimizations). In particular, know that you can take advantage of development-only optimizations:
|
|
72
|
-
|
|
73
|
-
```js
|
|
74
|
-
// ./types/index.d.ts
|
|
75
|
-
declare var __DEV__: boolean;
|
|
76
|
-
|
|
77
|
-
// inside your code...
|
|
78
|
-
if (__DEV__) {
|
|
79
|
-
console.log('foo');
|
|
80
|
-
}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
You can also choose to install and use [invariant](https://github.com/palmerhq/tsdx#invariant) and [warning](https://github.com/palmerhq/tsdx#warning) functions.
|
|
84
|
-
|
|
85
|
-
## Module Formats
|
|
86
|
-
|
|
87
|
-
CJS, ESModules, and UMD module formats are supported.
|
|
15
|
+
## Local Development
|
|
88
16
|
|
|
89
|
-
|
|
17
|
+
Below is a list of commands you will probably find useful.
|
|
90
18
|
|
|
91
|
-
|
|
19
|
+
### `pnpm run dev`
|
|
92
20
|
|
|
93
|
-
|
|
21
|
+
Runs the project in development/watch mode. Your project will be rebuilt upon changes.
|
|
94
22
|
|
|
95
|
-
|
|
23
|
+
Your library will be rebuilt if you make edits.
|
|
96
24
|
|
|
97
|
-
|
|
25
|
+
### `pnpm run build`
|
|
98
26
|
|
|
99
|
-
|
|
27
|
+
Bundles the package to the `dist` folder.
|
|
28
|
+
The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).
|
|
100
29
|
|
|
101
|
-
## Publishing to NPM
|
|
102
30
|
|
|
103
|
-
We recommend using [np](https://github.com/sindresorhus/np).
|