psf-bch-api 7.3.2 → 7.3.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "psf-bch-api",
3
- "version": "7.3.2",
3
+ "version": "7.3.4",
4
4
  "main": "psf-bch-api.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -15,12 +15,12 @@
15
15
  "license": "MIT",
16
16
  "description": "REST API proxy to Bitcoin Cash infrastructure",
17
17
  "dependencies": {
18
- "@psf/bch-js": "7.1.7",
18
+ "@psf/bch-js": "7.1.11",
19
19
  "axios": "1.7.7",
20
20
  "cors": "2.8.5",
21
21
  "dotenv": "16.3.1",
22
22
  "express": "5.1.0",
23
- "minimal-slp-wallet": "7.1.2",
23
+ "minimal-slp-wallet": "7.1.4",
24
24
  "psffpp": "1.2.1",
25
25
  "slp-token-media": "1.2.10",
26
26
  "winston": "3.11.0",
@@ -6,9 +6,14 @@ import wlogger from '../adapters/wlogger.js'
6
6
  import BCHJS from '@psf/bch-js'
7
7
  import config from '../config/index.js'
8
8
 
9
+ // Use RESTURL (from test) or REST_URL (from psf-bch-api config) or fallback to config
10
+ const restURL = process.env.RESTURL || process.env.REST_URL || process.env.LOCAL_RESTURL || config.restURL
11
+ // Use BCHJSBEARERTOKEN (from test) or BASIC_AUTH_TOKEN (from psf-bch-api config) or fallback to config
12
+ const bearerToken = process.env.BCHJSBEARERTOKEN || process.env.BASIC_AUTH_TOKEN || config.basicAuth.token
13
+
9
14
  const bchjs = new BCHJS({
10
- restURL: config.restURL,
11
- bearerToken: config.basicAuth.token
15
+ restURL,
16
+ bearerToken
12
17
  })
13
18
 
14
19
  class FulcrumUseCases {