@bsv/wallet-toolbox 1.5.8 → 1.5.9

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": "@bsv/wallet-toolbox",
3
- "version": "1.5.8",
3
+ "version": "1.5.9",
4
4
  "description": "BRC100 conforming wallet, wallet storage and wallet signer components",
5
5
  "main": "./out/src/index.js",
6
6
  "types": "./out/src/index.d.ts",
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "@bsv/auth-express-middleware": "^1.2.0",
34
34
  "@bsv/payment-express-middleware": "^1.2.1",
35
- "@bsv/sdk": "^1.6.11",
35
+ "@bsv/sdk": "^1.6.12",
36
36
  "express": "^4.21.2",
37
37
  "idb": "^8.0.2",
38
38
  "knex": "^3.1.0",
@@ -1,6 +1,7 @@
1
1
  import { Beef } from '@bsv/sdk'
2
2
  import { Services } from '../Services'
3
- import { logger } from '../../../test/utils/TestUtilsWalletStorage'
3
+ import { _tu, logger } from '../../../test/utils/TestUtilsWalletStorage'
4
+ import { verifyTruthy } from '../../utility/utilityHelpers'
4
5
 
5
6
  describe('verifyBeef tests', () => {
6
7
  jest.setTimeout(99999999)
@@ -14,6 +15,27 @@ describe('verifyBeef tests', () => {
14
15
  logger(beef.toLogString())
15
16
 
16
17
  const ok = await beef.verify(chaintracker, true)
17
- expect(ok)
18
+ expect(ok).toBe(true)
19
+ })
20
+
21
+ test('1_', async () => {
22
+ if (_tu.noEnv('main')) return
23
+ const { env, storage, services } = await _tu.createMainReviewSetup()
24
+
25
+ const getBeefForTxid = '4d9a1eff26bac99c7524cb7b2e808b77935d3d890562db2fefc6cb8cb92a6b16'
26
+ {
27
+ const beef = await services.getBeefForTxid(getBeefForTxid)
28
+ const chaintracker = await services.getChainTracker()
29
+ const ok = await beef.verify(chaintracker, true)
30
+ expect(ok).toBe(true)
31
+ }
32
+ {
33
+ const beef = verifyTruthy(
34
+ await storage.getValidBeefForTxid(getBeefForTxid, undefined, undefined, undefined, undefined, 1)
35
+ )
36
+ const chaintracker = await services.getChainTracker()
37
+ const ok = await beef.verify(chaintracker, true)
38
+ expect(ok).toBe(true)
39
+ }
18
40
  })
19
41
  })
@@ -1,9 +1,8 @@
1
- import { before } from 'node:test'
2
1
  import { _tu, TestWalletOnly } from '../../../test/utils/TestUtilsWalletStorage'
3
2
  import { Setup } from '../../Setup'
4
3
  import { StorageKnex } from '../StorageKnex'
5
- import { AuthFetch, WalletInterface } from '@bsv/sdk'
6
- import { StorageAdminStats, StorageClient } from '../index.client'
4
+ import { AuthFetch } from '@bsv/sdk'
5
+ import { StorageAdminStats } from '../index.client'
7
6
  import { Format } from '../../utility/Format'
8
7
 
9
8
  describe('storage adminStats tests', () => {
@@ -169,7 +169,7 @@ export abstract class TestUtilsWalletStorage {
169
169
  services: Services
170
170
  }> {
171
171
  const env = _tu.getEnv('main')
172
- if (!env.cloudMySQLConnection) throw new sdk.WERR_INVALID_PARAMETER('env.cloundMySQLConnection', 'valid')
172
+ if (!env.cloudMySQLConnection) throw new sdk.WERR_INVALID_PARAMETER('env.cloudMySQLConnection', 'valid')
173
173
  const knex = Setup.createMySQLKnex(env.cloudMySQLConnection)
174
174
  const storage = new StorageKnex({
175
175
  chain: env.chain,