@paintswap/estfor-definitions 0.1.30 → 0.1.35
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/.eslintrc.json +27 -27
- package/.github/workflows/publish_npm.yml +18 -0
- package/.prettierrc +6 -6
- package/LICENSE +21 -21
- package/README.md +135 -135
- package/asconfig.json +17 -17
- package/constants.d.ts +647 -647
- package/constants.js +719 -719
- package/index.d.ts +4 -4
- package/index.js +9 -9
- package/package.json +47 -47
- package/src/constants.ts +745 -745
- package/src/index.ts +5 -5
- package/src/types.ts +463 -452
- package/src/whitelisted_admins.ts +13 -13
- package/src/whitelisted_alpha_snapshot.ts +5484 -5484
- package/tsconfig.json +9 -9
- package/types.d.ts +406 -396
- package/types.d.ts.map +1 -1
- package/types.js +457 -446
- package/whitelisted_admins.d.ts +2 -2
- package/whitelisted_admins.js +16 -16
- package/whitelisted_alpha_snapshot.d.ts +2 -2
- package/whitelisted_alpha_snapshot.d.ts.map +1 -1
- package/whitelisted_alpha_snapshot.js +5487 -5487
package/.eslintrc.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"settings": {
|
|
3
|
-
"import/resolver": {
|
|
4
|
-
"node": {
|
|
5
|
-
"paths": ["./src"]
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
},
|
|
9
|
-
"env": {
|
|
10
|
-
"es6": true,
|
|
11
|
-
"browser": true,
|
|
12
|
-
"jest": true
|
|
13
|
-
},
|
|
14
|
-
"parser": "@typescript-eslint/parser",
|
|
15
|
-
"parserOptions": {
|
|
16
|
-
"ecmaVersion": 13,
|
|
17
|
-
"sourceType": "module"
|
|
18
|
-
},
|
|
19
|
-
"plugins": [
|
|
20
|
-
"@typescript-eslint"
|
|
21
|
-
],
|
|
22
|
-
"rules": {
|
|
23
|
-
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
|
|
24
|
-
"no-plusplus": 0,
|
|
25
|
-
"prefer-destructuring": ["warn", { "object": true, "array": false }],
|
|
26
|
-
"no-underscore-dangle": 0
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"settings": {
|
|
3
|
+
"import/resolver": {
|
|
4
|
+
"node": {
|
|
5
|
+
"paths": ["./src"]
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"env": {
|
|
10
|
+
"es6": true,
|
|
11
|
+
"browser": true,
|
|
12
|
+
"jest": true
|
|
13
|
+
},
|
|
14
|
+
"parser": "@typescript-eslint/parser",
|
|
15
|
+
"parserOptions": {
|
|
16
|
+
"ecmaVersion": 13,
|
|
17
|
+
"sourceType": "module"
|
|
18
|
+
},
|
|
19
|
+
"plugins": [
|
|
20
|
+
"@typescript-eslint"
|
|
21
|
+
],
|
|
22
|
+
"rules": {
|
|
23
|
+
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
|
|
24
|
+
"no-plusplus": 0,
|
|
25
|
+
"prefer-destructuring": ["warn", { "object": true, "array": false }],
|
|
26
|
+
"no-underscore-dangle": 0
|
|
27
|
+
}
|
|
28
28
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Publish NPM
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags:
|
|
5
|
+
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
6
|
+
jobs:
|
|
7
|
+
deploy:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v3
|
|
11
|
+
- uses: actions/setup-node@v3
|
|
12
|
+
with:
|
|
13
|
+
node-version: '14.x'
|
|
14
|
+
registry-url: 'https://registry.npmjs.org'
|
|
15
|
+
- run: yarn install --frozen-lockfile
|
|
16
|
+
- run: yarn publish
|
|
17
|
+
env:
|
|
18
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.prettierrc
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"trailingComma": "all",
|
|
3
|
-
"semi": false,
|
|
4
|
-
"singleQuote": true,
|
|
5
|
-
"printWidth": 120,
|
|
6
|
-
"tabWidth": 2
|
|
1
|
+
{
|
|
2
|
+
"trailingComma": "all",
|
|
3
|
+
"semi": false,
|
|
4
|
+
"singleQuote": true,
|
|
5
|
+
"printWidth": 120,
|
|
6
|
+
"tabWidth": 2
|
|
7
7
|
}
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 PaintSwap
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 PaintSwap
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
# Estfor Kingdom Types & Constants (estfor-definitions)
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<img src="https://user-images.githubusercontent.com/84033732/223739503-c53a888a-443f-4fb5-98a3-d40f94956799.png" height="100"/>
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
[Estfor Kingdom](https://estfor.com/) `types` and `constants` available for
|
|
8
|
-
[<img src="https://raw.githubusercontent.com/jpb06/jpb06/master/icons/JavaScript.svg" height="15"/> Javascript](https://developer.mozilla.org/en-US/docs/Learn/JavaScript),
|
|
9
|
-
[<img src="https://raw.githubusercontent.com/jpb06/jpb06/master/icons/TypeScript.svg" height="15"/> TypeScript](https://www.npmjs.com/package/typescript), and
|
|
10
|
-
[ <img src="https://avatars1.githubusercontent.com/u/28916798?s=15" height="15"/> AssemblyScript / <img src="https://raw.githubusercontent.com/jpb06/jpb06/master/icons/WebAssembly.svg" height="15"/> WebAssembly](https://www.npmjs.com/package/assemblyscript).
|
|
11
|
-
|
|
12
|
-
The items in this library will allow you to interact with Estfor Kingdom via:
|
|
13
|
-
|
|
14
|
-
- Vanilla JS applications
|
|
15
|
-
- React, Angular, and other front end frameworks
|
|
16
|
-
- NodeJS / Typescript back end services
|
|
17
|
-
- AssemblyScript / WebAssembly for use with [The Graph Protocol](https://github.com/graphprotocol/graph-node)'s web3 indexing
|
|
18
|
-
|
|
19
|
-
[NPMJS Package](https://www.npmjs.com/package/@paintswap/estfor-definitions)
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
22
|
-
|
|
23
|
-
To use Estfor Kingdom types and constants in your project, first import the dev dependency:
|
|
24
|
-
|
|
25
|
-
```shell
|
|
26
|
-
npm install -D @paintswap/estfor-definitions
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
```shell
|
|
30
|
-
yarn add -D @paintswap/estfor-definitions
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Once installed, the `EstforConstants`, `EstforTypes`, and `NONE` type will be exposed. You can then access the individual types from their parent.
|
|
34
|
-
|
|
35
|
-
```ts
|
|
36
|
-
import { EstforConstants, EstforTypes, NONE } from '@paintswap/estfor-definitions'
|
|
37
|
-
const { LOG } = EstforConstants
|
|
38
|
-
const MAPLE_LOG = EstforConstants.MAPLE_LOG
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
It is also possible to import specific items directly.
|
|
42
|
-
|
|
43
|
-
```ts
|
|
44
|
-
import { LOG } from '@paintswap/estfor-definitions/constants'
|
|
45
|
-
import { Skill } from '@paintswap/estfor-definitions/types'
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Development
|
|
49
|
-
|
|
50
|
-
### Build
|
|
51
|
-
|
|
52
|
-
```shell
|
|
53
|
-
npm run build
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
```shell
|
|
57
|
-
yarn build
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Use Locally
|
|
61
|
-
|
|
62
|
-
#### NPM
|
|
63
|
-
|
|
64
|
-
From library root:
|
|
65
|
-
|
|
66
|
-
```shell
|
|
67
|
-
npm link
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
From project root:
|
|
71
|
-
|
|
72
|
-
```shell
|
|
73
|
-
npm link @paintswap/estfor-definitions
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
#### Yarn
|
|
77
|
-
|
|
78
|
-
From library root:
|
|
79
|
-
|
|
80
|
-
```shell
|
|
81
|
-
yarn link
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
From project root:
|
|
85
|
-
|
|
86
|
-
```shell
|
|
87
|
-
yarn link @paintswap/estfor-definitions
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
#### Yalc
|
|
91
|
-
|
|
92
|
-
Install `yalc`
|
|
93
|
-
|
|
94
|
-
```shell
|
|
95
|
-
npm install -g yalc@latest
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
```shell
|
|
99
|
-
yarn add -g yalc@latest
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
From library root:
|
|
103
|
-
|
|
104
|
-
```shell
|
|
105
|
-
yalc publish
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
From project root:
|
|
109
|
-
|
|
110
|
-
```shell
|
|
111
|
-
yalc add @paintswap/estfor-definitions
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Use newly published updates to local yalc repository.
|
|
115
|
-
|
|
116
|
-
```shell
|
|
117
|
-
yalc update
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Revert to NPM Repository
|
|
121
|
-
|
|
122
|
-
```shell
|
|
123
|
-
yalc remove @paintswap/estfor-definitions
|
|
124
|
-
yarn add @paintswap/estfor-definitions
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Publish to NPM (--access=public needed the first time)
|
|
128
|
-
|
|
129
|
-
```shell
|
|
130
|
-
npm publish
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
```shell
|
|
134
|
-
yarn publish
|
|
135
|
-
```
|
|
1
|
+
# Estfor Kingdom Types & Constants (estfor-definitions)
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://user-images.githubusercontent.com/84033732/223739503-c53a888a-443f-4fb5-98a3-d40f94956799.png" height="100"/>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
[Estfor Kingdom](https://estfor.com/) `types` and `constants` available for
|
|
8
|
+
[<img src="https://raw.githubusercontent.com/jpb06/jpb06/master/icons/JavaScript.svg" height="15"/> Javascript](https://developer.mozilla.org/en-US/docs/Learn/JavaScript),
|
|
9
|
+
[<img src="https://raw.githubusercontent.com/jpb06/jpb06/master/icons/TypeScript.svg" height="15"/> TypeScript](https://www.npmjs.com/package/typescript), and
|
|
10
|
+
[ <img src="https://avatars1.githubusercontent.com/u/28916798?s=15" height="15"/> AssemblyScript / <img src="https://raw.githubusercontent.com/jpb06/jpb06/master/icons/WebAssembly.svg" height="15"/> WebAssembly](https://www.npmjs.com/package/assemblyscript).
|
|
11
|
+
|
|
12
|
+
The items in this library will allow you to interact with Estfor Kingdom via:
|
|
13
|
+
|
|
14
|
+
- Vanilla JS applications
|
|
15
|
+
- React, Angular, and other front end frameworks
|
|
16
|
+
- NodeJS / Typescript back end services
|
|
17
|
+
- AssemblyScript / WebAssembly for use with [The Graph Protocol](https://github.com/graphprotocol/graph-node)'s web3 indexing
|
|
18
|
+
|
|
19
|
+
[NPMJS Package](https://www.npmjs.com/package/@paintswap/estfor-definitions)
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
To use Estfor Kingdom types and constants in your project, first import the dev dependency:
|
|
24
|
+
|
|
25
|
+
```shell
|
|
26
|
+
npm install -D @paintswap/estfor-definitions
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```shell
|
|
30
|
+
yarn add -D @paintswap/estfor-definitions
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Once installed, the `EstforConstants`, `EstforTypes`, and `NONE` type will be exposed. You can then access the individual types from their parent.
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { EstforConstants, EstforTypes, NONE } from '@paintswap/estfor-definitions'
|
|
37
|
+
const { LOG } = EstforConstants
|
|
38
|
+
const MAPLE_LOG = EstforConstants.MAPLE_LOG
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
It is also possible to import specific items directly.
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import { LOG } from '@paintswap/estfor-definitions/constants'
|
|
45
|
+
import { Skill } from '@paintswap/estfor-definitions/types'
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Development
|
|
49
|
+
|
|
50
|
+
### Build
|
|
51
|
+
|
|
52
|
+
```shell
|
|
53
|
+
npm run build
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```shell
|
|
57
|
+
yarn build
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Use Locally
|
|
61
|
+
|
|
62
|
+
#### NPM
|
|
63
|
+
|
|
64
|
+
From library root:
|
|
65
|
+
|
|
66
|
+
```shell
|
|
67
|
+
npm link
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
From project root:
|
|
71
|
+
|
|
72
|
+
```shell
|
|
73
|
+
npm link @paintswap/estfor-definitions
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### Yarn
|
|
77
|
+
|
|
78
|
+
From library root:
|
|
79
|
+
|
|
80
|
+
```shell
|
|
81
|
+
yarn link
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
From project root:
|
|
85
|
+
|
|
86
|
+
```shell
|
|
87
|
+
yarn link @paintswap/estfor-definitions
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### Yalc
|
|
91
|
+
|
|
92
|
+
Install `yalc`
|
|
93
|
+
|
|
94
|
+
```shell
|
|
95
|
+
npm install -g yalc@latest
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```shell
|
|
99
|
+
yarn add -g yalc@latest
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
From library root:
|
|
103
|
+
|
|
104
|
+
```shell
|
|
105
|
+
yalc publish
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
From project root:
|
|
109
|
+
|
|
110
|
+
```shell
|
|
111
|
+
yalc add @paintswap/estfor-definitions
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Use newly published updates to local yalc repository.
|
|
115
|
+
|
|
116
|
+
```shell
|
|
117
|
+
yalc update
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Revert to NPM Repository
|
|
121
|
+
|
|
122
|
+
```shell
|
|
123
|
+
yalc remove @paintswap/estfor-definitions
|
|
124
|
+
yarn add @paintswap/estfor-definitions
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Publish to NPM (--access=public needed the first time)
|
|
128
|
+
|
|
129
|
+
```shell
|
|
130
|
+
npm publish
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
```shell
|
|
134
|
+
yarn publish
|
|
135
|
+
```
|
package/asconfig.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"entries": [
|
|
3
|
-
"./src/index.ts"
|
|
4
|
-
],
|
|
5
|
-
"options": {
|
|
6
|
-
"importTable": true
|
|
7
|
-
},
|
|
8
|
-
"targets": {
|
|
9
|
-
"release": {
|
|
10
|
-
"optimize": true,
|
|
11
|
-
"outFile": "build/index.wasm"
|
|
12
|
-
},
|
|
13
|
-
"debug": {
|
|
14
|
-
"debug": true,
|
|
15
|
-
"outFile": "build/debug.wasm"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
"./src/index.ts"
|
|
4
|
+
],
|
|
5
|
+
"options": {
|
|
6
|
+
"importTable": true
|
|
7
|
+
},
|
|
8
|
+
"targets": {
|
|
9
|
+
"release": {
|
|
10
|
+
"optimize": true,
|
|
11
|
+
"outFile": "build/index.wasm"
|
|
12
|
+
},
|
|
13
|
+
"debug": {
|
|
14
|
+
"debug": true,
|
|
15
|
+
"outFile": "build/debug.wasm"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
18
|
}
|