bsv-bap 0.0.1
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/.babelrc +20 -0
- package/.eslintrc +46 -0
- package/LICENSE +25 -0
- package/README.md +819 -0
- package/babel.config.js +6 -0
- package/bun.lockb +0 -0
- package/coverage/clover.xml +6 -0
- package/coverage/coverage-final.json +1 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +101 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/constants.ts.html +113 -0
- package/coverage/lcov-report/src/id.ts.html +2207 -0
- package/coverage/lcov-report/src/index.html +156 -0
- package/coverage/lcov-report/src/index.ts.html +1877 -0
- package/coverage/lcov-report/src/utils.ts.html +404 -0
- package/coverage/lcov-report/tests/data/index.html +111 -0
- package/coverage/lcov-report/tests/data/keys.js.html +86 -0
- package/coverage/lcov.info +0 -0
- package/dist/jest.config.d.ts +8 -0
- package/dist/src/constants.d.ts +8 -0
- package/dist/src/id.d.ts +295 -0
- package/dist/src/index.d.ts +238 -0
- package/dist/src/interface.d.ts +23 -0
- package/dist/src/poa.d.ts +6 -0
- package/dist/src/utils.d.ts +54 -0
- package/dist/typescript-npm-package.cjs.d.ts +554 -0
- package/dist/typescript-npm-package.cjs.js +1320 -0
- package/dist/typescript-npm-package.cjs.js.map +1 -0
- package/dist/typescript-npm-package.esm.d.ts +554 -0
- package/dist/typescript-npm-package.esm.js +1312 -0
- package/dist/typescript-npm-package.esm.js.map +1 -0
- package/dist/typescript-npm-package.umd.d.ts +554 -0
- package/dist/typescript-npm-package.umd.js +110193 -0
- package/dist/typescript-npm-package.umd.js.map +1 -0
- package/jest.config.ts +196 -0
- package/jsdoc.json +16 -0
- package/package.json +80 -0
- package/rollup.config.js +64 -0
- package/setup-jest.js +1 -0
- package/src/README.md +80 -0
- package/src/attributes.json +119 -0
- package/src/constants.ts +11 -0
- package/src/id.ts +783 -0
- package/src/index.ts +631 -0
- package/src/interface.ts +26 -0
- package/src/poa.ts +9 -0
- package/src/utils.ts +111 -0
- package/tests/data/ids.json +30 -0
- package/tests/data/keys.js +2 -0
- package/tests/data/old-ids.json +25 -0
- package/tests/data/test-vectors.json +122 -0
- package/tests/id.test.js +286 -0
- package/tests/index.test.js +335 -0
- package/tests/regression.test.js +28 -0
- package/tests/utils.test.js +27 -0
- package/tsconfig.json +17 -0
package/.babelrc
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"presets": [
|
3
|
+
"@babel/preset-env"
|
4
|
+
],
|
5
|
+
"plugins": [
|
6
|
+
[
|
7
|
+
"@babel/plugin-transform-runtime"
|
8
|
+
],
|
9
|
+
[
|
10
|
+
"@babel/plugin-proposal-class-properties",
|
11
|
+
{
|
12
|
+
"loose": true
|
13
|
+
}
|
14
|
+
]
|
15
|
+
],
|
16
|
+
"ignore": [],
|
17
|
+
"sourceMaps": true,
|
18
|
+
"retainLines": false,
|
19
|
+
"comments": false
|
20
|
+
}
|
package/.eslintrc
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
{
|
2
|
+
"parser": "@typescript-eslint/parser",
|
3
|
+
"env": {
|
4
|
+
"browser": true,
|
5
|
+
"es2021": true,
|
6
|
+
"node": true
|
7
|
+
},
|
8
|
+
"parserOptions": {
|
9
|
+
"ecmaVersion": 12,
|
10
|
+
"sourceType": "module",
|
11
|
+
"allowImportExportEverywhere": true
|
12
|
+
},
|
13
|
+
"extends": [
|
14
|
+
"eslint:recommended",
|
15
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
16
|
+
"plugin:@typescript-eslint/recommended"
|
17
|
+
],
|
18
|
+
"plugins": [
|
19
|
+
"@typescript-eslint"
|
20
|
+
],
|
21
|
+
"rules": {
|
22
|
+
"arrow-body-style": ["error", "always"],
|
23
|
+
"class-methods-use-this": "off",
|
24
|
+
"func-names": "off",
|
25
|
+
"max-len": ["error", {
|
26
|
+
"code": 120,
|
27
|
+
"ignoreComments": true
|
28
|
+
}],
|
29
|
+
"prefer-template": "off",
|
30
|
+
"no-await-in-loop": "off",
|
31
|
+
"no-console": "off",
|
32
|
+
"no-control-regex": "off",
|
33
|
+
"no-new-func": "off",
|
34
|
+
"no-param-reassign": "off",
|
35
|
+
"no-plusplus": "off",
|
36
|
+
"no-prototype-builtins": "off",
|
37
|
+
"no-underscore-dangle": "off",
|
38
|
+
"no-undef": "off",
|
39
|
+
"no-useless-escape": "off",
|
40
|
+
"import/extensions": "off",
|
41
|
+
"import/no-extraneous-dependencies": "off",
|
42
|
+
"import/prefer-default-export": "off",
|
43
|
+
"@typescript-eslint/no-explicit-any": "off",
|
44
|
+
"@typescript-eslint/ban-ts-comment": "off"
|
45
|
+
}
|
46
|
+
}
|
package/LICENSE
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
Open BSV License
|
2
|
+
Copyright (c) 2019 Bitcoin Association
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
6
|
+
in the Software without restriction, including without limitation the rights
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
9
|
+
furnished to do so, subject to the following conditions:
|
10
|
+
|
11
|
+
1 - The above copyright notice and this permission notice shall be included in
|
12
|
+
all copies or substantial portions of the Software.
|
13
|
+
2 - The Software, and any software that is derived from the Software or parts thereof,
|
14
|
+
can only be used on the Bitcoin SV blockchains. The Bitcoin SV blockchains are defined,
|
15
|
+
for purposes of this license, as the Bitcoin blockchain containing block height #556767
|
16
|
+
with the hash "000000000000000001d956714215d96ffc00e0afda4cd0a96c96f8d802b1662b" and
|
17
|
+
the test blockchains that are supported by the un-modified Software.
|
18
|
+
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
25
|
+
THE SOFTWARE.
|