@bsv/sdk 1.4.11 → 1.4.12
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/dist/cjs/package.json +1 -1
- package/dist/cjs/src/registry/RegistryClient.js +5 -5
- package/dist/cjs/src/registry/RegistryClient.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/registry/RegistryClient.js +5 -5
- package/dist/esm/src/registry/RegistryClient.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/src/registry/RegistryClient.d.ts.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +1 -1
- package/package.json +1 -1
- package/src/registry/RegistryClient.ts +6 -6
package/package.json
CHANGED
|
@@ -199,6 +199,12 @@ export class RegistryClient {
|
|
|
199
199
|
throw new Error('Invalid registry record. Missing txid, outputIndex, or lockingScript.')
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
+
// Check if the registry record belongs to the current user
|
|
203
|
+
const currentIdentityKey = (await this.wallet.getPublicKey({ identityKey: true })).publicKey
|
|
204
|
+
if (registryRecord.registryOperator !== currentIdentityKey) {
|
|
205
|
+
throw new Error('This registry token does not belong to the current wallet.')
|
|
206
|
+
}
|
|
207
|
+
|
|
202
208
|
// Create a descriptive label for the item we’re revoking
|
|
203
209
|
const itemIdentifier =
|
|
204
210
|
registryRecord.definitionType === 'basket'
|
|
@@ -421,12 +427,6 @@ export class RegistryClient {
|
|
|
421
427
|
throw new Error(`Unsupported definition type: ${definitionType as string}`)
|
|
422
428
|
}
|
|
423
429
|
|
|
424
|
-
// Enforce that the pushdrop belongs to the CURRENT identity key
|
|
425
|
-
const currentIdentityKey = (await this.wallet.getPublicKey({ identityKey: true })).publicKey
|
|
426
|
-
if (registryOperator !== currentIdentityKey) {
|
|
427
|
-
throw new Error('This registry token does not belong to the current wallet.')
|
|
428
|
-
}
|
|
429
|
-
|
|
430
430
|
// Return the typed data plus the operator key
|
|
431
431
|
return { ...parsedData, registryOperator }
|
|
432
432
|
}
|