From 3cc5b409ea9981d4cd78cea30b67dbb297fe64b6 Mon Sep 17 00:00:00 2001 From: Zahin Mohammad Date: Fri, 4 Dec 2026 10:48:01 -0500 Subject: [PATCH 1/2] chore: bump @bitgo/public-types to 7.6.5 Align every module on 7.6.5, which declares the Apache-2.0 license and ships a LICENSE file (earlier 6.90.0 and 7.1.0 tarballs declared UNLICENSED, which a customer license scanner flagged). Collapses three resolved versions in yarn.lock into one. The only breaking change between 6.90.0 and 7.6.5 is 7.0.0 requiring all defiParams fields in TxSendBody; no module in this repo references defiParams or TxSendBody, and no symbol imported from the package was removed. TICKET: WCN-5332 Co-Authored-By: Claude Sonnet 5.5 --- modules/abstract-lightning/package.json | 2 +- modules/bitgo/package.json | 2 +- modules/express/package.json | 2 +- modules/passkey-crypto/package.json | 2 +- modules/sdk-coin-canton/package.json | 2 +- modules/sdk-coin-flrp/package.json | 2 +- modules/sdk-coin-sol/package.json | 2 +- modules/sdk-core/package.json | 2 +- modules/sdk-lib-safes/package.json | 2 +- yarn.lock | 30 ++++--------------------- 10 files changed, 13 insertions(+), 35 deletions(-) diff --git a/modules/abstract-lightning/package.json b/modules/abstract-lightning/package.json index a43c9f302e..1d0be7c435 100644 --- a/modules/abstract-lightning/package.json +++ b/modules/abstract-lightning/package.json @@ -39,7 +39,7 @@ ] }, "dependencies": { - "@bitgo/public-types": "6.90.0", + "@bitgo/public-types": "7.6.5", "@bitgo/sdk-core": "^40.11.0", "@bitgo/statics": "^59.35.0", "@bitgo/utxo-lib": "^11.25.2", diff --git a/modules/bitgo/package.json b/modules/bitgo/package.json index 2356543f49..7439608c6b 100644 --- a/modules/bitgo/package.json +++ b/modules/bitgo/package.json @@ -144,7 +144,7 @@ "superagent": "^9.0.1" }, "devDependencies": { - "@bitgo/public-types": "6.90.0", + "@bitgo/public-types": "7.6.5", "@bitgo/sdk-opensslbytes": "^2.1.0", "@bitgo/sdk-test": "^9.1.101", "@openpgp/web-stream-tools": "0.0.14", diff --git a/modules/express/package.json b/modules/express/package.json index bf7df9ca16..a6e0e9a7ab 100644 --- a/modules/express/package.json +++ b/modules/express/package.json @@ -43,7 +43,7 @@ "@api-ts/typed-express-router": "2.0.0", "@bitgo/abstract-lightning": "^8.7.7", "@bitgo/logger": "^1.4.0", - "@bitgo/public-types": "7.1.0", + "@bitgo/public-types": "7.6.5", "@bitgo/sdk-core": "^40.11.0", "@bitgo/utxo-lib": "^11.25.2", "@types/proxyquire": "^1.3.31", diff --git a/modules/passkey-crypto/package.json b/modules/passkey-crypto/package.json index 846d0e2658..8416a5a732 100644 --- a/modules/passkey-crypto/package.json +++ b/modules/passkey-crypto/package.json @@ -35,7 +35,7 @@ "access": "public" }, "dependencies": { - "@bitgo/public-types": "6.90.0", + "@bitgo/public-types": "7.6.5", "@bitgo/sdk-core": "^40.11.0" }, "devDependencies": { diff --git a/modules/sdk-coin-canton/package.json b/modules/sdk-coin-canton/package.json index a3872f9ee7..0e8549fc2d 100644 --- a/modules/sdk-coin-canton/package.json +++ b/modules/sdk-coin-canton/package.json @@ -58,7 +58,7 @@ ] }, "dependencies": { - "@bitgo/public-types": "7.6.0", + "@bitgo/public-types": "7.6.5", "@bitgo/sdk-core": "^40.11.0", "@bitgo/statics": "^59.35.0", "@protobuf-ts/runtime": "^2.11.1", diff --git a/modules/sdk-coin-flrp/package.json b/modules/sdk-coin-flrp/package.json index 009ed70588..1677e06d09 100644 --- a/modules/sdk-coin-flrp/package.json +++ b/modules/sdk-coin-flrp/package.json @@ -48,7 +48,7 @@ "nock": "^13.3.1" }, "dependencies": { - "@bitgo/public-types": "6.90.0", + "@bitgo/public-types": "7.6.5", "@bitgo/sdk-core": "^40.11.0", "@bitgo/secp256k1": "^1.11.1", "@bitgo/statics": "^59.35.0", diff --git a/modules/sdk-coin-sol/package.json b/modules/sdk-coin-sol/package.json index 547ae5a2a7..1951e83067 100644 --- a/modules/sdk-coin-sol/package.json +++ b/modules/sdk-coin-sol/package.json @@ -57,7 +57,7 @@ }, "dependencies": { "@bitgo/logger": "^1.4.0", - "@bitgo/public-types": "6.90.0", + "@bitgo/public-types": "7.6.5", "@bitgo/sdk-core": "^40.11.0", "@bitgo/sdk-lib-mpc": "^11.7.1", "@bitgo/statics": "^59.35.0", diff --git a/modules/sdk-core/package.json b/modules/sdk-core/package.json index cd9ad0fa54..d63c859403 100644 --- a/modules/sdk-core/package.json +++ b/modules/sdk-core/package.json @@ -40,7 +40,7 @@ ] }, "dependencies": { - "@bitgo/public-types": "7.6.0", + "@bitgo/public-types": "7.6.5", "@bitgo/sdk-lib-mpc": "^11.7.1", "@bitgo/sdk-lib-safes": "^1.11.3", "@bitgo/secp256k1": "^1.11.1", diff --git a/modules/sdk-lib-safes/package.json b/modules/sdk-lib-safes/package.json index cb73987704..f1bf0ba9bb 100644 --- a/modules/sdk-lib-safes/package.json +++ b/modules/sdk-lib-safes/package.json @@ -31,7 +31,7 @@ "access": "public" }, "dependencies": { - "@bitgo/public-types": "7.1.0", + "@bitgo/public-types": "7.6.5", "@bitgo/secp256k1": "^1.11.1", "@bitgo/statics": "^59.35.0", "create-hmac": "^1.1.7", diff --git a/yarn.lock b/yarn.lock index 4166e6d004..7e8cc19ab7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1034,32 +1034,10 @@ "@scure/base" "1.1.5" micro-eth-signer "0.7.2" -"@bitgo/public-types@6.90.0": - version "6.90.0" - resolved "https://registry.npmjs.org/@bitgo/public-types/-/public-types-6.90.0.tgz#01cbded37315be24451c0e357df57f99dc7668ca" - integrity sha512-8JmcPhiovAjfm75/z5/BCtFJC/jjyCL6D52yE+LtQL2T2A58XccNrzEQZey5Ndo5gs1ARyFqxatL3CD8CZkoGw== - dependencies: - fp-ts "^2.0.0" - io-ts "npm:@bitgo-forks/io-ts@2.1.4" - io-ts-types "^0.5.16" - monocle-ts "^2.3.13" - newtype-ts "^0.3.5" - -"@bitgo/public-types@7.1.0": - version "7.1.0" - resolved "https://registry.npmjs.org/@bitgo/public-types/-/public-types-7.1.0.tgz#659956b7dd280d5ba2f191783cf7e66af9dedaff" - integrity sha512-7HiK2ajVN2TVDc/YphQy/xPRAzoRIWsIMWLFn1k7ad/nnXYTtioTwrBIg2NzWSjaz2lAGy2hS2AkgBuf3x4GfQ== - dependencies: - fp-ts "^2.0.0" - io-ts "npm:@bitgo-forks/io-ts@2.1.4" - io-ts-types "^0.5.16" - monocle-ts "^2.3.13" - newtype-ts "^0.3.5" - -"@bitgo/public-types@7.6.0": - version "7.6.0" - resolved "https://registry.npmjs.org/@bitgo/public-types/-/public-types-7.6.0.tgz#4e4bc12c105b5785928df3cc7c4288a3c8089e63" - integrity sha512-QHjU8Xj++gCU86AZv9uHEhh68ulYSiER15Sg7GtzZwpox0J7++SelytyQJ4PUwNETJ57spDeiNqAismwqmAzQA== +"@bitgo/public-types@7.6.5": + version "7.6.5" + resolved "https://registry.npmjs.org/@bitgo/public-types/-/public-types-7.6.5.tgz#6e9727fcc841911d3a98945eaf8706e4090920a4" + integrity sha512-E+gGIcFEQL+lZvANH2IGpfqxxIrooe3uzebiwZ19v7BvNGQ9GsyeQ7aaVhHg6L+2KYM35XC9SclZpYR9ZFPNCw== dependencies: fp-ts "^2.0.0" io-ts "npm:@bitgo-forks/io-ts@2.1.4" From b949a4e842adae4c30ae6e4459c596d664a46d65 Mon Sep 17 00:00:00 2001 From: Zahin Mohammad Date: Fri, 4 Dec 2026 11:01:39 -0500 Subject: [PATCH 2/2] fix(express): resolve io-ts refinement in OpenAPI generation public-types 7.6.x defines `BaseIntentCatchAll` with `t.refinement`, which the OpenAPI generator has no handler for. It emitted a dangling `#/components/schemas/refinement` reference, failing the Vacuum audit and reporting the catch-all intent's fields as removed in the breaking-change check. Register a `refinement` handler that returns the wrapped codec's schema, since a refinement only narrows decoding at runtime and leaves the wire shape unchanged. The generator merges custom handlers per package, so an `io-ts` entry would drop every built-in io-ts handler; fall back to them through the public `Project#resolveKnownImport` rather than importing the generator's `dist` internals. TICKET: WCN-5332 Co-Authored-By: Claude Sonnet 5.5 --- modules/express/openapi-generator.rc.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/express/openapi-generator.rc.js b/modules/express/openapi-generator.rc.js index 9eb2b4ff79..7a6cfdbd0b 100644 --- a/modules/express/openapi-generator.rc.js +++ b/modules/express/openapi-generator.rc.js @@ -3,8 +3,24 @@ * Custom codec handlers for OpenAPI generation */ +const { Project } = require('@api-ts/openapi-generator'); + +// The CLI merges this file over its built-in table one package key deep, so an 'io-ts' entry +// replaces every built-in io-ts handler. Fall back to the built-ins through the public +// Project#resolveKnownImport instead of copying them or importing the generator's dist internals. +const builtins = new Project(); +const withBuiltins = (pkg, overrides) => + new Proxy(overrides, { + get: (target, name) => + typeof name === 'string' && !(name in target) ? builtins.resolveKnownImport(pkg, name) : target[name], + }); + module.exports = (E) => { return { + 'io-ts': withBuiltins('io-ts', { + // A refinement only narrows decoding at runtime; its wire shape is the inner codec's. + refinement: (_, innerSchema) => E.right(innerSchema), + }), '.': { JsonFromStringifiedJson: () => E.right({ type: 'string' }), Optional: (_, innerSchema) => E.right({ type: 'union', schemas: [innerSchema, { type: 'undefined' }] }),