@ust-protocol/ots-verify 1.0.0-rc.2 → 1.0.0-rc.3

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.
Files changed (2) hide show
  1. package/index.mjs +4 -0
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -32,6 +32,10 @@ function bitcoinHeight(det) {
32
32
 
33
33
  export function makeSubstrateVerify({ upgrade = true } = {}) {
34
34
  return async function substrateVerify(anchor, root) {
35
+ // handle ONLY bitcoin-ots — return null for any other substrate so a multi-substrate router
36
+ // (ust-protocol combineSubstrates) can delegate to the next plugin.
37
+ const sub = anchor?.substrate ?? anchor?.anchor?.substrate;
38
+ if (sub && sub !== 'bitcoin-ots') return null;
35
39
  const otsB64 = anchor?.ots ?? anchor?.anchor?.ots;
36
40
  if (!otsB64 || typeof root !== 'string') return null;
37
41
  let det;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ust-protocol/ots-verify",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.3",
4
4
  "description": "Opt-in Bitcoin (OpenTimestamps) substrateVerify for UST anchors — the cross-check ust-protocol takes as an injection, so the zero-dep verifier never embeds a blockchain. #68 witness / TOP time.",
5
5
  "type": "module",
6
6
  "main": "index.mjs",