mirror of
https://github.com/Permissionless-Software-Foundation/bch-js.git
synced 2026-09-21 16:51:59 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae30b89d68 | ||
|
|
2e88d26ff2 | ||
|
|
b1745d37e0 | ||
|
|
9733c07e04 | ||
|
|
430f5f015e | ||
|
|
9e76b34d05 | ||
|
|
61078b2e91 | ||
|
|
82733a7e1a | ||
|
|
3685ea1541 | ||
|
|
5f217af3e9 | ||
|
|
e2ca3cfb00 | ||
|
|
690520d72e | ||
|
|
36660f3bc9 | ||
|
|
80ee5c8d31 | ||
|
|
b7e04522ce | ||
|
|
19f243428d | ||
|
|
16079c8d04 | ||
|
|
6743ca5fa9 | ||
|
|
ec046d3ef7 |
Generated
+105
-50
@@ -32,7 +32,7 @@
|
|||||||
"slp-mdm": "0.0.7",
|
"slp-mdm": "0.0.7",
|
||||||
"slp-parser": "0.0.4",
|
"slp-parser": "0.0.4",
|
||||||
"wif": "2.0.6",
|
"wif": "2.0.6",
|
||||||
"x402-bch-axios": "1.1.2"
|
"x402-bch-axios": "2.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"apidoc": "1.2.0",
|
"apidoc": "1.2.0",
|
||||||
@@ -779,9 +779,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint-community/eslint-utils": {
|
"node_modules/@eslint-community/eslint-utils": {
|
||||||
"version": "4.9.0",
|
"version": "4.9.1",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz",
|
||||||
"integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==",
|
"integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -1447,6 +1447,38 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js": {
|
"node_modules/@psf/bch-js": {
|
||||||
|
"version": "7.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@psf/bch-js/-/bch-js-7.1.4.tgz",
|
||||||
|
"integrity": "sha512-/+5mbg6RFybKPNtB/m0NEOJYVyT4Rosy/GHGjHknOEkBRF2Xd0/pZTtPAd+BtvzePDki4c2KyL13VkF5XghFyw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@chris.troutner/bip32-utils": "1.0.5",
|
||||||
|
"@psf/bip21": "2.0.1",
|
||||||
|
"@psf/bitcoincashjs-lib": "4.0.3",
|
||||||
|
"@psf/coininfo": "4.0.0",
|
||||||
|
"axios": "1.13.2",
|
||||||
|
"bc-bip68": "1.0.5",
|
||||||
|
"bchaddrjs-slp": "0.2.14",
|
||||||
|
"bigi": "1.4.2",
|
||||||
|
"bignumber.js": "9.3.1",
|
||||||
|
"bip-schnorr": "0.6.7",
|
||||||
|
"bip38": "3.1.1",
|
||||||
|
"bip39": "3.1.0",
|
||||||
|
"bip66": "1.1.5",
|
||||||
|
"bitcoinjs-message": "2.2.0",
|
||||||
|
"bs58": "4.0.1",
|
||||||
|
"ecashaddrjs": "1.0.7",
|
||||||
|
"ini": "6.0.0",
|
||||||
|
"randombytes": "2.1.0",
|
||||||
|
"safe-buffer": "5.2.1",
|
||||||
|
"satoshi-bitcoin": "1.0.5",
|
||||||
|
"slp-mdm": "0.0.7",
|
||||||
|
"slp-parser": "0.0.4",
|
||||||
|
"wif": "2.0.6",
|
||||||
|
"x402-bch-axios": "2.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js": {
|
||||||
"version": "7.1.1",
|
"version": "7.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@psf/bch-js/-/bch-js-7.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@psf/bch-js/-/bch-js-7.1.1.tgz",
|
||||||
"integrity": "sha512-Wknq+q418Zb2Hmb6aDmxt/6VLrU81N+Iq9KP0KHGo1lFHeupJJonBkVt74R1ulry61F7MNRr39iDCTQsMM0ctg==",
|
"integrity": "sha512-Wknq+q418Zb2Hmb6aDmxt/6VLrU81N+Iq9KP0KHGo1lFHeupJJonBkVt74R1ulry61F7MNRr39iDCTQsMM0ctg==",
|
||||||
@@ -1478,7 +1510,7 @@
|
|||||||
"x402-bch-axios": "1.1.1"
|
"x402-bch-axios": "1.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@psf/bch-js": {
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/@psf/bch-js": {
|
||||||
"version": "6.8.1",
|
"version": "6.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/@psf/bch-js/-/bch-js-6.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/@psf/bch-js/-/bch-js-6.8.1.tgz",
|
||||||
"integrity": "sha512-xu5YT9L3OhdILwJUmkV7Pg/WZ3r2aA6jD7fr5WMvo0OJSzzBBbXGShIbQNZp9+Vv9BoeVLCMqpZoW1Fp7OLCbg==",
|
"integrity": "sha512-xu5YT9L3OhdILwJUmkV7Pg/WZ3r2aA6jD7fr5WMvo0OJSzzBBbXGShIbQNZp9+Vv9BoeVLCMqpZoW1Fp7OLCbg==",
|
||||||
@@ -1510,7 +1542,7 @@
|
|||||||
"wif": "2.0.6"
|
"wif": "2.0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/axios": {
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/axios": {
|
||||||
"version": "0.26.1",
|
"version": "0.26.1",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
|
||||||
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
|
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
|
||||||
@@ -1519,7 +1551,7 @@
|
|||||||
"follow-redirects": "^1.14.8"
|
"follow-redirects": "^1.14.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/bchaddrjs-slp": {
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/bchaddrjs-slp": {
|
||||||
"version": "0.2.5",
|
"version": "0.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/bchaddrjs-slp/-/bchaddrjs-slp-0.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/bchaddrjs-slp/-/bchaddrjs-slp-0.2.5.tgz",
|
||||||
"integrity": "sha512-33flmPcqMFswerKu7477DSUNMVMQR3tHDk3lvbmsdkEva+TxVGGWWE/p5Lqx9M/8t3vkbe7fzmVhj4QhChcCyA==",
|
"integrity": "sha512-33flmPcqMFswerKu7477DSUNMVMQR3tHDk3lvbmsdkEva+TxVGGWWE/p5Lqx9M/8t3vkbe7fzmVhj4QhChcCyA==",
|
||||||
@@ -1532,7 +1564,7 @@
|
|||||||
"node": ">= 6.0.0"
|
"node": ">= 6.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/bignumber.js": {
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/bignumber.js": {
|
||||||
"version": "9.0.0",
|
"version": "9.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz",
|
||||||
"integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==",
|
"integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==",
|
||||||
@@ -1541,7 +1573,7 @@
|
|||||||
"node": "*"
|
"node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/bip-schnorr": {
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/bip-schnorr": {
|
||||||
"version": "0.3.0",
|
"version": "0.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/bip-schnorr/-/bip-schnorr-0.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/bip-schnorr/-/bip-schnorr-0.3.0.tgz",
|
||||||
"integrity": "sha512-Sc1Hn2+1n+okPEW8G+JLjeaM12dsUOwr+oFlMDSKR9wYwNGMw0alskeBIHTmXxBxMZSWKhCW7PwKQVDyGmnaVg==",
|
"integrity": "sha512-Sc1Hn2+1n+okPEW8G+JLjeaM12dsUOwr+oFlMDSKR9wYwNGMw0alskeBIHTmXxBxMZSWKhCW7PwKQVDyGmnaVg==",
|
||||||
@@ -1556,7 +1588,7 @@
|
|||||||
"node": ">=8.0.0"
|
"node": ">=8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/bip38": {
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/bip38": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/bip38/-/bip38-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/bip38/-/bip38-2.0.2.tgz",
|
||||||
"integrity": "sha512-22KDak0RDyghFbR0Si7wyq9IgY423YzGYzWLpGeofH3DaolOQqjD3mNN08eFoubKlbyclOQKFwtONMv2SD9V3A==",
|
"integrity": "sha512-22KDak0RDyghFbR0Si7wyq9IgY423YzGYzWLpGeofH3DaolOQqjD3mNN08eFoubKlbyclOQKFwtONMv2SD9V3A==",
|
||||||
@@ -1570,7 +1602,7 @@
|
|||||||
"scryptsy": "^2.0.0"
|
"scryptsy": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/bip39": {
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/bip39": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.2.tgz",
|
||||||
"integrity": "sha512-J4E1r2N0tUylTKt07ibXvhpT2c5pyAFgvuA5q1H9uDy6dEGpjV8jmymh3MTYJDLCNbIVClSB9FbND49I6N24MQ==",
|
"integrity": "sha512-J4E1r2N0tUylTKt07ibXvhpT2c5pyAFgvuA5q1H9uDy6dEGpjV8jmymh3MTYJDLCNbIVClSB9FbND49I6N24MQ==",
|
||||||
@@ -1582,7 +1614,7 @@
|
|||||||
"randombytes": "^2.0.1"
|
"randombytes": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/bitcoinjs-message": {
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/bitcoinjs-message": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/bitcoinjs-message/-/bitcoinjs-message-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/bitcoinjs-message/-/bitcoinjs-message-2.0.0.tgz",
|
||||||
"integrity": "sha512-H5pJC7/eSqVjREiEOZ4jifX+7zXYP3Y28GIOIqg9hrgE7Vj8Eva9+HnVqnxwA1rJPOwZKuw0vo6k0UxgVc6q1A==",
|
"integrity": "sha512-H5pJC7/eSqVjREiEOZ4jifX+7zXYP3Y28GIOIqg9hrgE7Vj8Eva9+HnVqnxwA1rJPOwZKuw0vo6k0UxgVc6q1A==",
|
||||||
@@ -1598,13 +1630,13 @@
|
|||||||
"node": ">=0.10"
|
"node": ">=0.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/ini": {
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/ini": {
|
||||||
"version": "1.3.8",
|
"version": "1.3.8",
|
||||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
|
||||||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
|
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/randombytes": {
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/randombytes": {
|
||||||
"version": "2.0.6",
|
"version": "2.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz",
|
||||||
"integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==",
|
"integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==",
|
||||||
@@ -1613,13 +1645,13 @@
|
|||||||
"safe-buffer": "^5.1.0"
|
"safe-buffer": "^5.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/safe-buffer": {
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/safe-buffer": {
|
||||||
"version": "5.1.2",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/satoshi-bitcoin": {
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/satoshi-bitcoin": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/satoshi-bitcoin/-/satoshi-bitcoin-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/satoshi-bitcoin/-/satoshi-bitcoin-1.0.4.tgz",
|
||||||
"integrity": "sha512-YuHOmw5wsz6wuHIQdsz5b2cgtuKtV/jEcZ4NGmWN5tM/gz5T9Q+DSuLlnuf5BP/jsQWgR0ofmY4f8Dm6JnqSug==",
|
"integrity": "sha512-YuHOmw5wsz6wuHIQdsz5b2cgtuKtV/jEcZ4NGmWN5tM/gz5T9Q+DSuLlnuf5BP/jsQWgR0ofmY4f8Dm6JnqSug==",
|
||||||
@@ -1628,7 +1660,7 @@
|
|||||||
"big.js": "^3.1.3"
|
"big.js": "^3.1.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/slp-mdm": {
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/slp-mdm": {
|
||||||
"version": "0.0.6",
|
"version": "0.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/slp-mdm/-/slp-mdm-0.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/slp-mdm/-/slp-mdm-0.0.6.tgz",
|
||||||
"integrity": "sha512-fbjlIg/o8OtzgK2JydC6POJp3Qup/rLgy4yB5hoLgxWRlERyJyE29ScwS3r9TTwPxe12qK55pyivAdNOZZXL0A==",
|
"integrity": "sha512-fbjlIg/o8OtzgK2JydC6POJp3Qup/rLgy4yB5hoLgxWRlERyJyE29ScwS3r9TTwPxe12qK55pyivAdNOZZXL0A==",
|
||||||
@@ -1637,6 +1669,30 @@
|
|||||||
"bignumber.js": "^9.0.0"
|
"bignumber.js": "^9.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/minimal-slp-wallet": {
|
||||||
|
"version": "6.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimal-slp-wallet/-/minimal-slp-wallet-6.1.0.tgz",
|
||||||
|
"integrity": "sha512-P24WzJu2kHg5aQtKkIVJ42Gu1dsYXWAc0z5MCmlinjDq11Bgy4ICBu73YxpNTB3TQwrWIIi2LJgsuQa/dqH50Q==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@chris.troutner/retry-queue-commonjs": "1.0.8",
|
||||||
|
"@psf/bch-js": "6.8.1",
|
||||||
|
"apidoc": "0.51.0",
|
||||||
|
"bch-consumer": "1.6.2",
|
||||||
|
"bch-donation": "1.1.2",
|
||||||
|
"crypto-js": "4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@psf/bch-js/node_modules/@psf/bch-js/node_modules/x402-bch-axios": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/x402-bch-axios/-/x402-bch-axios-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-jQ0AyjAzvyTw7ejTTvUSIQiH8//wVn/SRwSgcJ3LeM38SJlJWpTMvvNpOpcjcZ+kFKOe4SsurOy/AcH7o+akjQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@chris.troutner/retry-queue": "1.0.11",
|
||||||
|
"minimal-slp-wallet": "6.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/@types/node": {
|
"node_modules/@psf/bch-js/node_modules/@types/node": {
|
||||||
"version": "11.11.6",
|
"version": "11.11.6",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz",
|
||||||
@@ -1789,14 +1845,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/minimal-slp-wallet": {
|
"node_modules/@psf/bch-js/node_modules/minimal-slp-wallet": {
|
||||||
"version": "6.1.0",
|
"version": "7.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/minimal-slp-wallet/-/minimal-slp-wallet-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/minimal-slp-wallet/-/minimal-slp-wallet-7.0.2.tgz",
|
||||||
"integrity": "sha512-P24WzJu2kHg5aQtKkIVJ42Gu1dsYXWAc0z5MCmlinjDq11Bgy4ICBu73YxpNTB3TQwrWIIi2LJgsuQa/dqH50Q==",
|
"integrity": "sha512-H3H46VXXhvHF/1EKIaAVpBXevX5Bmt1SYqpfQFIcb7JSajXwwncQv7gmhf5Q9H3jtwdY43YWq2TFoeLUkI7E4g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chris.troutner/retry-queue-commonjs": "1.0.8",
|
"@chris.troutner/retry-queue": "1.0.11",
|
||||||
"@psf/bch-js": "6.8.1",
|
"@psf/bch-js": "7.1.1",
|
||||||
"apidoc": "0.51.0",
|
|
||||||
"bch-consumer": "1.6.2",
|
"bch-consumer": "1.6.2",
|
||||||
"bch-donation": "1.1.2",
|
"bch-donation": "1.1.2",
|
||||||
"crypto-js": "4.0.0"
|
"crypto-js": "4.0.0"
|
||||||
@@ -1891,13 +1946,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bch-js/node_modules/x402-bch-axios": {
|
"node_modules/@psf/bch-js/node_modules/x402-bch-axios": {
|
||||||
"version": "1.1.1",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/x402-bch-axios/-/x402-bch-axios-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/x402-bch-axios/-/x402-bch-axios-2.1.0.tgz",
|
||||||
"integrity": "sha512-jQ0AyjAzvyTw7ejTTvUSIQiH8//wVn/SRwSgcJ3LeM38SJlJWpTMvvNpOpcjcZ+kFKOe4SsurOy/AcH7o+akjQ==",
|
"integrity": "sha512-6IE6tUmg/+W4Poi6JBs5z0xjSOhvouzea9IH6BUnuBIdXDm0wv5cwT0cN5qAA4k7BE7hiB98LPiG6QIIkoGjVA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chris.troutner/retry-queue": "1.0.11",
|
"@chris.troutner/retry-queue": "1.0.11",
|
||||||
"minimal-slp-wallet": "6.1.0"
|
"minimal-slp-wallet": "7.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@psf/bip21": {
|
"node_modules/@psf/bip21": {
|
||||||
@@ -4243,9 +4298,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001761",
|
"version": "1.0.30001762",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001761.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001762.tgz",
|
||||||
"integrity": "sha512-JF9ptu1vP2coz98+5051jZ4PwQgd2ni8A+gYSN7EA7dPKIMf0pDlSUxhdmVOaV3/fYK5uWBkgSXJaRLr4+3A6g==",
|
"integrity": "sha512-PxZwGNvH7Ak8WX5iXzoK1KPZttBXNPuaOvI2ZYU7NrlM+d9Ov+TUvlLOBNGzVXAntMSMMlJPd+jY6ovrVjSmUw==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -6222,9 +6277,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/esquery": {
|
"node_modules/esquery": {
|
||||||
"version": "1.6.0",
|
"version": "1.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz",
|
||||||
"integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==",
|
"integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -6427,9 +6482,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/fastq": {
|
"node_modules/fastq": {
|
||||||
"version": "1.19.1",
|
"version": "1.20.1",
|
||||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
|
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz",
|
||||||
"integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
|
"integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -9184,13 +9239,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/minimal-slp-wallet": {
|
"node_modules/minimal-slp-wallet": {
|
||||||
"version": "7.0.2",
|
"version": "7.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/minimal-slp-wallet/-/minimal-slp-wallet-7.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/minimal-slp-wallet/-/minimal-slp-wallet-7.0.5.tgz",
|
||||||
"integrity": "sha512-H3H46VXXhvHF/1EKIaAVpBXevX5Bmt1SYqpfQFIcb7JSajXwwncQv7gmhf5Q9H3jtwdY43YWq2TFoeLUkI7E4g==",
|
"integrity": "sha512-yrWQwXrtUZYvB6mWe3HTBzQGK1oEjgHuXkanx94tejPR3N8nJLmRRMQu27oWIYD/m3wm0wU8UreYXPIA0iN/iw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chris.troutner/retry-queue": "1.0.11",
|
"@chris.troutner/retry-queue": "1.0.11",
|
||||||
"@psf/bch-js": "7.1.1",
|
"@psf/bch-js": "7.1.4",
|
||||||
"bch-consumer": "1.6.2",
|
"bch-consumer": "1.6.2",
|
||||||
"bch-donation": "1.1.2",
|
"bch-donation": "1.1.2",
|
||||||
"crypto-js": "4.0.0"
|
"crypto-js": "4.0.0"
|
||||||
@@ -13436,9 +13491,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/qs": {
|
"node_modules/qs": {
|
||||||
"version": "6.14.0",
|
"version": "6.14.1",
|
||||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz",
|
||||||
"integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
|
"integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"side-channel": "^1.1.0"
|
"side-channel": "^1.1.0"
|
||||||
@@ -16301,9 +16356,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/watchpack": {
|
"node_modules/watchpack": {
|
||||||
"version": "2.4.4",
|
"version": "2.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.4.tgz",
|
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.0.tgz",
|
||||||
"integrity": "sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==",
|
"integrity": "sha512-e6vZvY6xboSwLz2GD36c16+O/2Z6fKvIf4pOXptw2rY9MVwE/TXc6RGqxD3I3x0a28lwBY7DE+76uTPSsBrrCA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"glob-to-regexp": "^0.4.1",
|
"glob-to-regexp": "^0.4.1",
|
||||||
@@ -16749,13 +16804,13 @@
|
|||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/x402-bch-axios": {
|
"node_modules/x402-bch-axios": {
|
||||||
"version": "1.1.2",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/x402-bch-axios/-/x402-bch-axios-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/x402-bch-axios/-/x402-bch-axios-2.2.1.tgz",
|
||||||
"integrity": "sha512-HG44zvQZJDHIjLN79ZCubFdMDpanhGJT+n5iyIyy6ni8S2bLDwKJeAyqhNMlTIPKjcZD9JLyyxU6iWtqxjUXOw==",
|
"integrity": "sha512-N23DpQRA746bqGDTCJYVQ8QL55PoxE6LTSNMFzx5sySsvnBem6H0hQLSf2N9e45O8xPVw3ulSvXncgTcVM8ikw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chris.troutner/retry-queue": "1.0.11",
|
"@chris.troutner/retry-queue": "1.0.11",
|
||||||
"minimal-slp-wallet": "7.0.2"
|
"minimal-slp-wallet": "7.0.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/xdg-basedir": {
|
"node_modules/xdg-basedir": {
|
||||||
|
|||||||
+2
-2
@@ -13,7 +13,7 @@
|
|||||||
"test": "export RESTURL=http://localhost:5942/v6 && c8 mocha --trace-warnings --unhandled-rejections=strict --timeout 30000 test/unit/",
|
"test": "export RESTURL=http://localhost:5942/v6 && c8 mocha --trace-warnings --unhandled-rejections=strict --timeout 30000 test/unit/",
|
||||||
"test:integration": "npm run test:integration:local:noauth",
|
"test:integration": "npm run test:integration:local:noauth",
|
||||||
"test:integration:fullstack:free": "export RESTURL=https://bch.fullstack.cash/v6 && mocha --timeout 60000 test/integration/",
|
"test:integration:fullstack:free": "export RESTURL=https://bch.fullstack.cash/v6 && mocha --timeout 60000 test/integration/",
|
||||||
"test:integration:fullstack:x402": "export RESTURL=https://x402-bch.fullstack.cash/v6 && export BCHJSWIF=L1eYaneXDDXy8VDig4Arwe8wYHbhtsA5wuQvwsKwhaYeneoZuKG4 && mocha --timeout 30000 test/integration/",
|
"test:integration:fullstack:x402": "export RESTURL=https://x402-bch.fullstack.cash/v6 && export BCHJSWIF=L1eYaneXDDXy8VDig4Arwe8wYHbhtsA5wuQvwsKwhaYeneoZuKG4 && mocha --timeout 120000 test/integration/",
|
||||||
"test:integration:local:noauth": "export RESTURL=http://localhost:5942/v6 && mocha --timeout 30000 test/integration/",
|
"test:integration:local:noauth": "export RESTURL=http://localhost:5942/v6 && mocha --timeout 30000 test/integration/",
|
||||||
"test:integration:local:auth": "export RESTURL=http://192.168.1.115:5942/v6 && export BCHJSBEARERTOKEN=temp01 && mocha --timeout 30000 test/integration/",
|
"test:integration:local:auth": "export RESTURL=http://192.168.1.115:5942/v6 && export BCHJSBEARERTOKEN=temp01 && mocha --timeout 30000 test/integration/",
|
||||||
"test:integration:local:x402": "export RESTURL=http://localhost:5942/v6 && export BCHJSWIF=L1eYaneXDDXy8VDig4Arwe8wYHbhtsA5wuQvwsKwhaYeneoZuKG4 && mocha --timeout 1200000 test/integration/",
|
"test:integration:local:x402": "export RESTURL=http://localhost:5942/v6 && export BCHJSWIF=L1eYaneXDDXy8VDig4Arwe8wYHbhtsA5wuQvwsKwhaYeneoZuKG4 && mocha --timeout 1200000 test/integration/",
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
"slp-mdm": "0.0.7",
|
"slp-mdm": "0.0.7",
|
||||||
"slp-parser": "0.0.4",
|
"slp-parser": "0.0.4",
|
||||||
"wif": "2.0.6",
|
"wif": "2.0.6",
|
||||||
"x402-bch-axios": "1.1.2"
|
"x402-bch-axios": "2.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"apidoc": "1.2.0",
|
"apidoc": "1.2.0",
|
||||||
|
|||||||
+5
-2
@@ -86,7 +86,10 @@ class BCHJS {
|
|||||||
} else if (process.env.BCHJSWIF && process.env.BCHJSWIF !== '') {
|
} else if (process.env.BCHJSWIF && process.env.BCHJSWIF !== '') {
|
||||||
this.wif = process.env.BCHJSWIF
|
this.wif = process.env.BCHJSWIF
|
||||||
}
|
}
|
||||||
this.paymentAmountSats = (config && config.paymentAmountSats) || 2000 * 5
|
|
||||||
|
// Most TXs cost about 250 sats. So we'll set the default to 25000 sats,
|
||||||
|
// so the mining fee is 1% of the transaction.
|
||||||
|
this.paymentAmountSats = (config && config.paymentAmountSats) || 25000
|
||||||
|
|
||||||
// BCH server URL for x402 payments (separate from REST API server)
|
// BCH server URL for x402 payments (separate from REST API server)
|
||||||
// This is used when broadcasting payment transactions to the blockchain
|
// This is used when broadcasting payment transactions to the blockchain
|
||||||
@@ -95,7 +98,7 @@ class BCHJS {
|
|||||||
} else if (process.env.BCHJSBCHSERVERURL && process.env.BCHJSBCHSERVERURL !== '') {
|
} else if (process.env.BCHJSBCHSERVERURL && process.env.BCHJSBCHSERVERURL !== '') {
|
||||||
this.bchServerURL = process.env.BCHJSBCHSERVERURL
|
this.bchServerURL = process.env.BCHJSBCHSERVERURL
|
||||||
} else {
|
} else {
|
||||||
this.bchServerURL = 'https://bch.fullstack.cash/v6/'
|
this.bchServerURL = 'https://bch.fullstack.cash/v6'
|
||||||
}
|
}
|
||||||
|
|
||||||
const libConfig = {
|
const libConfig = {
|
||||||
|
|||||||
+2
-1
@@ -6,7 +6,8 @@ class DSProof {
|
|||||||
constructor (config) {
|
constructor (config) {
|
||||||
this.restURL = config.restURL
|
this.restURL = config.restURL
|
||||||
this.authToken = config.authToken
|
this.authToken = config.authToken
|
||||||
this.axios = axios
|
// Use the shared axios instance if provided, otherwise fall back to axios
|
||||||
|
this.axios = config.axios || axios
|
||||||
|
|
||||||
this.axiosOptions = {
|
this.axiosOptions = {
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
+23
-5
@@ -12,6 +12,7 @@ import axios from 'axios'
|
|||||||
// Local libraries
|
// Local libraries
|
||||||
import RawTransaction from './raw-transactions.js'
|
import RawTransaction from './raw-transactions.js'
|
||||||
import SlpUtils from './slp/utils.js'
|
import SlpUtils from './slp/utils.js'
|
||||||
|
import Blockchain from './blockchain.js'
|
||||||
|
|
||||||
// let _this
|
// let _this
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ class PsfSlpIndexer {
|
|||||||
// Encapsulate dependencies
|
// Encapsulate dependencies
|
||||||
this.rawTransaction = new RawTransaction(config)
|
this.rawTransaction = new RawTransaction(config)
|
||||||
this.slpUtils = new SlpUtils(config)
|
this.slpUtils = new SlpUtils(config)
|
||||||
|
this.blockchain = new Blockchain(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,7 +68,7 @@ class PsfSlpIndexer {
|
|||||||
)
|
)
|
||||||
return response.data
|
return response.data
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.response && error.response.data) throw error.response.data
|
if (error.response && error.response.data && error.response.data.error) throw new Error(error.response.data.error)
|
||||||
else throw error
|
else throw error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -134,7 +136,7 @@ class PsfSlpIndexer {
|
|||||||
}
|
}
|
||||||
throw new Error('Input address must be a string.')
|
throw new Error('Input address must be a string.')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.response && error.response.data) throw error.response.data
|
if (error.response && error.response.data && error.response.data.error) throw new Error(error.response.data.error)
|
||||||
else throw error
|
else throw error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -199,7 +201,7 @@ class PsfSlpIndexer {
|
|||||||
}
|
}
|
||||||
throw new Error('Input tokenId must be a string.')
|
throw new Error('Input tokenId must be a string.')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.response && error.response.data) throw error.response.data
|
if (error.response && error.response.data && error.response.data.error) throw new Error(error.response.data.error)
|
||||||
else throw error
|
else throw error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -317,6 +319,22 @@ class PsfSlpIndexer {
|
|||||||
const txDetails = await this.rawTransaction.getTxData(txid)
|
const txDetails = await this.rawTransaction.getTxData(txid)
|
||||||
// console.log(`txDetails: ${JSON.stringify(txDetails, null, 2)}`)
|
// console.log(`txDetails: ${JSON.stringify(txDetails, null, 2)}`)
|
||||||
|
|
||||||
|
// Add blockheight, height, time, and blocktime to the txDetails object.
|
||||||
|
if (txDetails.height === null) {
|
||||||
|
// Get current block height and increment by 1
|
||||||
|
const currentBlockHeight = await this.blockchain.getBlockCount()
|
||||||
|
const estimatedHeight = currentBlockHeight + 1
|
||||||
|
|
||||||
|
// Set height and blockheight
|
||||||
|
txDetails.height = estimatedHeight
|
||||||
|
txDetails.blockheight = estimatedHeight
|
||||||
|
|
||||||
|
// Set time and blocktime to current unix timestamp
|
||||||
|
const currentTime = Math.floor(Date.now() / 1000)
|
||||||
|
txDetails.time = currentTime
|
||||||
|
txDetails.blocktime = currentTime
|
||||||
|
}
|
||||||
|
|
||||||
if (isInBlacklist) {
|
if (isInBlacklist) {
|
||||||
txDetails.isValidSlp = null
|
txDetails.isValidSlp = null
|
||||||
} else {
|
} else {
|
||||||
@@ -427,7 +445,7 @@ class PsfSlpIndexer {
|
|||||||
}
|
}
|
||||||
throw new Error('Input tokenId must be a string.')
|
throw new Error('Input tokenId must be a string.')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.response && error.response.data) throw error.response.data
|
if (error.response && error.response.data && error.response.data.error) throw new Error(error.response.data.error)
|
||||||
else throw error
|
else throw error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -522,7 +540,7 @@ class PsfSlpIndexer {
|
|||||||
throw new Error('Input tokenId must be a string.')
|
throw new Error('Input tokenId must be a string.')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// console.log('error: ', error)
|
// console.log('error: ', error)
|
||||||
if (error.response && error.response.data) throw error.response.data
|
if (error.response && error.response.data && error.response.data.error) throw new Error(error.response.data.error)
|
||||||
else throw error
|
else throw error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ describe('#price', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('#getPsffppPrice', () => {
|
describe('#getPsffppPrice', () => {
|
||||||
it('should get the price of BCH in several currencies', async () => {
|
it('should get the price to write 1MB to the PSFFPP', async () => {
|
||||||
const result = await bchjs.Price.getPsffppPrice()
|
const result = await bchjs.Price.getPsffppPrice()
|
||||||
// console.log(result)
|
// console.log(result)
|
||||||
|
|
||||||
|
|||||||
@@ -43,14 +43,14 @@ describe('#PsfSlpIndexer', () => {
|
|||||||
try {
|
try {
|
||||||
// Stub the network call.
|
// Stub the network call.
|
||||||
const testErr = new Error()
|
const testErr = new Error()
|
||||||
testErr.response = { data: { status: 422 } }
|
testErr.response = { data: { error: 'Status 422' } }
|
||||||
sandbox.stub(axios, 'get').throws(testErr)
|
sandbox.stub(axios, 'get').throws(testErr)
|
||||||
|
|
||||||
await bchjs.PsfSlpIndexer.status()
|
await bchjs.PsfSlpIndexer.status()
|
||||||
// console.log(`result: ${JSON.stringify(result, null, 2)}`)
|
// console.log(`result: ${JSON.stringify(result, null, 2)}`)
|
||||||
assert.equal(true, false, 'Unexpected result!')
|
assert.equal(true, false, 'Unexpected result!')
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
assert.equal(err.status, 422)
|
assert.equal(err.message, 'Status 422')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -103,7 +103,7 @@ describe('#PsfSlpIndexer', () => {
|
|||||||
try {
|
try {
|
||||||
// Stub the network call.
|
// Stub the network call.
|
||||||
const testErr = new Error()
|
const testErr = new Error()
|
||||||
testErr.response = { data: { status: 422 } }
|
testErr.response = { data: { error: 'Status 422' } }
|
||||||
sandbox.stub(axios, 'post').throws(testErr)
|
sandbox.stub(axios, 'post').throws(testErr)
|
||||||
|
|
||||||
const addr = 'bitcoincash:qzmd5vxgh9m22m6fgvm57yd6kjnjl9qnwywsf3583n'
|
const addr = 'bitcoincash:qzmd5vxgh9m22m6fgvm57yd6kjnjl9qnwywsf3583n'
|
||||||
@@ -112,7 +112,7 @@ describe('#PsfSlpIndexer', () => {
|
|||||||
// console.log(`result: ${JSON.stringify(result, null, 2)}`)
|
// console.log(`result: ${JSON.stringify(result, null, 2)}`)
|
||||||
assert.equal(true, false, 'Unexpected result!')
|
assert.equal(true, false, 'Unexpected result!')
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
assert.equal(err.status, 422)
|
assert.equal(err.message, 'Status 422')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -174,7 +174,7 @@ describe('#PsfSlpIndexer', () => {
|
|||||||
try {
|
try {
|
||||||
// Stub the network call.
|
// Stub the network call.
|
||||||
const testErr = new Error()
|
const testErr = new Error()
|
||||||
testErr.response = { data: { status: 422 } }
|
testErr.response = { data: { error: 'Status 422' } }
|
||||||
sandbox.stub(axios, 'post').throws(testErr)
|
sandbox.stub(axios, 'post').throws(testErr)
|
||||||
|
|
||||||
const tokenId =
|
const tokenId =
|
||||||
@@ -182,7 +182,7 @@ describe('#PsfSlpIndexer', () => {
|
|||||||
await bchjs.PsfSlpIndexer.tokenStats(tokenId)
|
await bchjs.PsfSlpIndexer.tokenStats(tokenId)
|
||||||
assert.equal(true, false, 'Unexpected result!')
|
assert.equal(true, false, 'Unexpected result!')
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
assert.equal(err.status, 422)
|
assert.equal(err.message, 'Status 422')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -399,7 +399,7 @@ describe('#PsfSlpIndexer', () => {
|
|||||||
try {
|
try {
|
||||||
// Stub the network call.
|
// Stub the network call.
|
||||||
const testErr = new Error()
|
const testErr = new Error()
|
||||||
testErr.response = { data: { status: 422 } }
|
testErr.response = { data: { error: 'Status 422' } }
|
||||||
sandbox.stub(axios, 'post').throws(testErr)
|
sandbox.stub(axios, 'post').throws(testErr)
|
||||||
|
|
||||||
const tokenId =
|
const tokenId =
|
||||||
@@ -407,7 +407,7 @@ describe('#PsfSlpIndexer', () => {
|
|||||||
await bchjs.PsfSlpIndexer.getTokenData(tokenId)
|
await bchjs.PsfSlpIndexer.getTokenData(tokenId)
|
||||||
assert.equal(true, false, 'Unexpected result!')
|
assert.equal(true, false, 'Unexpected result!')
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
assert.equal(err.status, 422)
|
assert.equal(err.message, 'Status 422')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
+9
-5
@@ -20,8 +20,10 @@ describe('#X402 Integration', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
assert.strictEqual(bchjs.wif, '')
|
assert.strictEqual(bchjs.wif, '')
|
||||||
assert.strictEqual(bchjs.paymentAmountSats, 10000)
|
// assert.strictEqual(bchjs.paymentAmountSats, 10000)
|
||||||
assert.strictEqual(bchjs.bchServerURL, 'https://bch.fullstack.cash/v6/')
|
assert.strictEqual(typeof bchjs.paymentAmountSats, 'number')
|
||||||
|
assert.ok(Number.isInteger(bchjs.paymentAmountSats) && bchjs.paymentAmountSats > 0)
|
||||||
|
assert.strictEqual(bchjs.bchServerURL, 'https://bch.fullstack.cash/v6')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should accept wif in config', () => {
|
it('should accept wif in config', () => {
|
||||||
@@ -59,8 +61,10 @@ describe('#X402 Integration', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
assert.strictEqual(bchjs.wif, '')
|
assert.strictEqual(bchjs.wif, '')
|
||||||
assert.strictEqual(bchjs.paymentAmountSats, 10000)
|
// assert.strictEqual(bchjs.paymentAmountSats, 10000)
|
||||||
assert.strictEqual(bchjs.bchServerURL, 'https://bch.fullstack.cash/v6/')
|
assert.strictEqual(typeof bchjs.paymentAmountSats, 'number')
|
||||||
|
assert.ok(Number.isInteger(bchjs.paymentAmountSats) && bchjs.paymentAmountSats > 0)
|
||||||
|
assert.strictEqual(bchjs.bchServerURL, 'https://bch.fullstack.cash/v6')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should read WIF from BCHJSWIF environment variable', () => {
|
it('should read WIF from BCHJSWIF environment variable', () => {
|
||||||
@@ -168,7 +172,7 @@ describe('#X402 Integration', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
assert.strictEqual(bchjs.restURL, customRestURL)
|
assert.strictEqual(bchjs.restURL, customRestURL)
|
||||||
assert.strictEqual(bchjs.bchServerURL, 'https://bch.fullstack.cash/v6/')
|
assert.strictEqual(bchjs.bchServerURL, 'https://bch.fullstack.cash/v6')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user