@bsv/wallet-toolbox 1.5.13 → 1.5.15

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.13",
3
+ "version": "1.5.15",
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",
@@ -6,7 +6,8 @@ import {
6
6
  Transaction,
7
7
  WalletProtocol,
8
8
  Base64String,
9
- PubKeyHex
9
+ PubKeyHex,
10
+ SecurityLevels
10
11
  } from '@bsv/sdk'
11
12
  import { validateCreateActionArgs } from './sdk'
12
13
 
@@ -1264,16 +1265,19 @@ export class WalletPermissionsManager implements WalletInterface {
1264
1265
  includeExpired: boolean
1265
1266
  ): Promise<PermissionToken | undefined> {
1266
1267
  const [secLevel, protoName] = protocolID
1268
+ const tags = [
1269
+ `originator ${originator}`,
1270
+ `privileged ${!!privileged}`,
1271
+ `protocolName ${protoName}`,
1272
+ `protocolSecurityLevel ${secLevel}`
1273
+ ]
1274
+ if (secLevel === 2) {
1275
+ tags.push(`counterparty ${counterparty}`)
1276
+ }
1267
1277
  const result = await this.underlying.listOutputs(
1268
1278
  {
1269
1279
  basket: BASKET_MAP.protocol,
1270
- tags: [
1271
- `originator ${originator}`,
1272
- `privileged ${!!privileged}`,
1273
- `protocolName ${protoName}`,
1274
- `protocolSecurityLevel ${secLevel}`,
1275
- `counterparty ${counterparty}`
1276
- ],
1280
+ tags,
1277
1281
  tagQueryMode: 'all',
1278
1282
  include: 'entire transactions'
1279
1283
  },
@@ -1307,7 +1311,7 @@ export class WalletPermissionsManager implements WalletInterface {
1307
1311
  privDecoded !== !!privileged ||
1308
1312
  secLevelDecoded !== secLevel ||
1309
1313
  protoNameDecoded !== protoName ||
1310
- cptyDecoded !== counterparty
1314
+ (secLevelDecoded === 2 && cptyDecoded !== counterparty)
1311
1315
  ) {
1312
1316
  continue
1313
1317
  }