minimal-xec-wallet 1.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/LICENSE +21 -0
- package/README.md +241 -0
- package/dist/minimal-xec-wallet.js +66268 -0
- package/dist/minimal-xec-wallet.min.js +55 -0
- package/examples/README.md +380 -0
- package/examples/advanced/browser-compatibility-test.js +263 -0
- package/examples/advanced/get-xec-price.js +149 -0
- package/examples/advanced/optimize-utxos.js +255 -0
- package/examples/advanced/send-op-return.js +216 -0
- package/examples/browser-test.html +350 -0
- package/examples/key-management/derive-addresses.js +191 -0
- package/examples/key-management/export-to-wif.js +114 -0
- package/examples/key-management/validate-address.js +214 -0
- package/examples/optimization/simple-consolidation-test.js +79 -0
- package/examples/optimization/test-utxo-consolidation.js +179 -0
- package/examples/test-examples.js +1204 -0
- package/examples/tokens/burn-tokens.js +293 -0
- package/examples/tokens/get-token-balance.js +169 -0
- package/examples/tokens/get-token-info.js +269 -0
- package/examples/tokens/list-all-tokens.js +162 -0
- package/examples/tokens/send-any-token.js +260 -0
- package/examples/tokens/test-main-wallet-integration.js +193 -0
- package/examples/transactions/send-all-xec.js +205 -0
- package/examples/transactions/send-to-multiple.js +217 -0
- package/examples/transactions/send-xec.js +191 -0
- package/examples/utils/show-qr.js +119 -0
- package/examples/utils/wallet-helper.js +176 -0
- package/examples/validation/comprehensive-infrastructure-test.js +210 -0
- package/examples/wallet-creation/create-new-wallet.js +67 -0
- package/examples/wallet-creation/import-from-wif.js +135 -0
- package/examples/wallet-creation/restore-from-mnemonic.js +100 -0
- package/examples/wallet-info/get-balance.js +99 -0
- package/examples/wallet-info/get-transactions.js +157 -0
- package/examples/wallet-info/get-utxos.js +145 -0
- package/examples/wallet.json +11 -0
- package/lib/adapters/robust-chronik-router.js +507 -0
- package/lib/adapters/router.js +651 -0
- package/lib/alp-token-handler.js +581 -0
- package/lib/browser-wasm-loader.js +271 -0
- package/lib/consolidate-utxos.js +338 -0
- package/lib/hybrid-token-manager.js +322 -0
- package/lib/key-derivation.js +466 -0
- package/lib/op-return.js +314 -0
- package/lib/security.js +270 -0
- package/lib/send-xec.js +396 -0
- package/lib/slp-token-handler.js +572 -0
- package/lib/token-protocol-detector.js +307 -0
- package/lib/utxos.js +303 -0
- package/package.json +125 -0
package/package.json
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "minimal-xec-wallet",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "A minimalist eCash (XEC) wallet npm library, for use in web apps. Supports eTokens.",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"module": "./dist/minimal-xec-wallet.min.js",
|
|
7
|
+
"directories": {
|
|
8
|
+
"examples": "examples",
|
|
9
|
+
"lib": "lib"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/",
|
|
13
|
+
"examples/",
|
|
14
|
+
"lib/"
|
|
15
|
+
],
|
|
16
|
+
"unpkg": "dist/minimal-xec-wallet.min.js",
|
|
17
|
+
"scripts": {
|
|
18
|
+
"start": "node index.js",
|
|
19
|
+
"test": "TEST=unit nyc mocha test/unit/ --timeout 10000 --require test/setup.js",
|
|
20
|
+
"test:unit": "TEST=unit mocha test/unit/ --timeout 10000 --require test/setup.js",
|
|
21
|
+
"test:integration": "TEST=integration mocha --timeout 35000 --require test/setup.js test/integration/",
|
|
22
|
+
"test:integration:xec": "TEST=integration mocha --timeout 35000 test/integration/xec-wallet-integration.test.js",
|
|
23
|
+
"test:all": "npm run test:unit && npm run test:integration",
|
|
24
|
+
"test:watch": "TEST=unit mocha test/unit/ --timeout 10000 --watch --require test/setup.js",
|
|
25
|
+
"test:coverage": "TEST=unit nyc mocha test/unit/ --timeout 10000 --require test/setup.js",
|
|
26
|
+
"lint": "standard --env mocha --fix index.js lib examples test",
|
|
27
|
+
"docs": "./node_modules/.bin/apidoc -i lib/ -o docs",
|
|
28
|
+
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
|
29
|
+
"coverage:report": "nyc --reporter=html mocha test/unit/ --exit",
|
|
30
|
+
"build:dev": "browserify index.js --browser-field -t [ ./transform-import-meta.js --global ] -p esmify -t [ babelify --global true --presets [ @babel/preset-env ] --sourceType unambiguous ] --s MinimalXecWallet -o dist/minimal-xec-wallet.js",
|
|
31
|
+
"build": "browserify index.js --browser-field -t [ ./transform-import-meta.js --global ] -p esmify -t [ babelify --global true --presets [ @babel/preset-env ] --sourceType unambiguous ] --s MinimalXecWallet | terser --compress --mangle -o dist/minimal-xec-wallet.min.js"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"ecash",
|
|
35
|
+
"xec",
|
|
36
|
+
"wallet",
|
|
37
|
+
"javascript",
|
|
38
|
+
"cryptocurrency",
|
|
39
|
+
"react",
|
|
40
|
+
"front end",
|
|
41
|
+
"client",
|
|
42
|
+
"apidoc",
|
|
43
|
+
"etoken",
|
|
44
|
+
"tokens",
|
|
45
|
+
"avalanche",
|
|
46
|
+
"alp"
|
|
47
|
+
],
|
|
48
|
+
"author": "Stoyan Zhekov",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"apidoc": {
|
|
51
|
+
"title": "minimal-xec-wallet",
|
|
52
|
+
"url": "localhost:5000"
|
|
53
|
+
},
|
|
54
|
+
"repository": "github:minimal-xec-wallet",
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@chris.troutner/retry-queue-commonjs": "1.0.8",
|
|
57
|
+
"@scure/bip39": "^1.6.0",
|
|
58
|
+
"bignumber.js": "^9.0.0",
|
|
59
|
+
"bs58": "^5.0.0",
|
|
60
|
+
"chronik-client": "^3.4.0",
|
|
61
|
+
"crypto-js": "4.0.0",
|
|
62
|
+
"ecash-lib": "^4.3.1",
|
|
63
|
+
"ecashaddrjs": "^2.0.0",
|
|
64
|
+
"qrcode-terminal": "^0.12.0",
|
|
65
|
+
"terser": "^5.43.1",
|
|
66
|
+
"uglifyify": "^5.0.2"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@babel/core": "^7.28.3",
|
|
70
|
+
"@babel/plugin-syntax-import-meta": "^7.10.4",
|
|
71
|
+
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
|
|
72
|
+
"@babel/preset-env": "^7.28.3",
|
|
73
|
+
"babel-plugin-transform-import-meta": "^2.3.3",
|
|
74
|
+
"babelify": "^10.0.0",
|
|
75
|
+
"browser-resolve": "^2.0.0",
|
|
76
|
+
"browserify": "17.0.0",
|
|
77
|
+
"chai": "4.2.0",
|
|
78
|
+
"coveralls": "3.1.0",
|
|
79
|
+
"eslint": "7.17.0",
|
|
80
|
+
"eslint-config-prettier": "7.1.0",
|
|
81
|
+
"eslint-config-standard": "16.0.2",
|
|
82
|
+
"eslint-plugin-node": "11.1.0",
|
|
83
|
+
"eslint-plugin-prettier": "3.3.1",
|
|
84
|
+
"eslint-plugin-standard": "4.0.1",
|
|
85
|
+
"esmify": "^2.1.1",
|
|
86
|
+
"husky": "4.3.8",
|
|
87
|
+
"lodash.clonedeep": "4.5.0",
|
|
88
|
+
"mocha": "9.2.1",
|
|
89
|
+
"nyc": "15.1.0",
|
|
90
|
+
"semantic-release": "19.0.3",
|
|
91
|
+
"sinon": "9.2.0",
|
|
92
|
+
"standard": "16.0.4",
|
|
93
|
+
"through2": "^4.0.2",
|
|
94
|
+
"tinyify": "3.0.0"
|
|
95
|
+
},
|
|
96
|
+
"release": {
|
|
97
|
+
"publish": [
|
|
98
|
+
{
|
|
99
|
+
"path": "@semantic-release/npm",
|
|
100
|
+
"npmPublish": true
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"browser": {
|
|
105
|
+
"ecash-lib": "ecash-lib/dist/indexBrowser.js",
|
|
106
|
+
"ecash-lib/dist/ffi/ecash_lib_wasm_browser.js": "./browser-shims/ecash_lib_wasm_browser.js"
|
|
107
|
+
},
|
|
108
|
+
"husky": {
|
|
109
|
+
"hooks": {
|
|
110
|
+
"pre-commit": "npm run lint && npm run build"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"exports": {
|
|
114
|
+
".": {
|
|
115
|
+
"import": {
|
|
116
|
+
"browser": "./dist/minimal-xec-wallet.min.js",
|
|
117
|
+
"node": "./index.js",
|
|
118
|
+
"default": "./index.js"
|
|
119
|
+
},
|
|
120
|
+
"require": {
|
|
121
|
+
"default": "./index.js"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|