Skip to content

feat(statics): add Pearl to statics#9347

Merged
manojkumar138 merged 1 commit into
masterfrom
feat/prl/pr1-statics
Jul 27, 2026
Merged

feat(statics): add Pearl to statics#9347
manojkumar138 merged 1 commit into
masterfrom
feat/prl/pr1-statics

Conversation

@manojkumar138

@manojkumar138 manojkumar138 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Defines Pearl's coin identity in @bitgo/statics. No utxo-lib changes — Pearl is intended to be served through the @bitgo/wasm-utxo path, matching the wasm-only profile already used by ims-utxo.

5 files, 58 insertions.

Chain Type

UTXO — Taproot-only (BIP-340 Schnorr, BIP-341 script-path with a NUMS internal key). Pearl is a btcd fork.

@bitgo/wasm-utxo is authoritative on script-type support and restricts Pearl to Taproot:

btc   -> [ p2sh, p2shP2wsh, p2wsh, p2trLegacy, p2trMusig2 ]
ltc   -> [ p2sh, p2shP2wsh, p2wsh ]
pearl -> [ p2trLegacy, p2trMusig2 ]

Coin Codes & Tickers

Variant Coin code Ticker
Mainnet pearl PEARL
Testnet tpearl TPEARL

Names match @bitgo/wasm-utxo (coinNames: [..., "pearl", "tpearl"]) and indexer-utxo (CoinSymbol.pearl / CoinSymbol.tpearl).

Network Parameters

Parameter Mainnet Testnet
Bech32m HRP prl tprl
BIP-44 coin type 808276 1
Derivation path m/86'/808276'/0' m/86'/1'/0'
Decimals 8 8

Changes

File Change
src/base.ts CoinFamily.PEARL, UnderlyingAsset.PEARL
src/networks.ts Pearl / PearlTestnet classes + Networks.main/Networks.test entries
src/utxo.ts pearl / tpearl coin entries with PEARL_FEATURES
test/unit/fixtures/expectedColdFeatures.ts both names added to justMultiSig
test/unit/coins.ts pearl / tpearl case in the Distributed Custody Features suite

Coin features

PEARL_FEATURES is UtxoCoin.DEFAULT_FEATURES plus BULK_TRANSACTION and DISTRIBUTED_CUSTODY, matching the onboarding TDD (§9, Phase 6 PR 1). MULTISIG comes from DEFAULT_FEATURES rather than being listed again.

DISTRIBUTED_CUSTODY is deliberate, not copied from BTC by accident. Pearl is currently the only non-BTC chain carrying it — the existing holders are btc and its testnet/OFC variants — which is consistent with the TDD's premise (§4, "Why BTC is the Template"): P2TR, BIP-340 Schnorr and BIP-341 script-path are implemented for BTC only, so Pearl is modelled on BTC rather than on the other UTXO forks. test/unit/coins.ts now pins the flag for both names so it cannot regress silently.

Both names share one PEARL_FEATURES array. The TDD lists BULK_TRANSACTION for mainnet only, but sharing matches how bch/tbch, ltc/tltc and doge/tdoge are defined here, and keeping testnet at parity avoids a weaker test surface than mainnet.

On utxolibName

UtxoNetwork requires a utxolibName: string, so the classes set 'pearl' / 'tpearl' — the wasm CoinNames. With no utxo-lib network registered, these do not resolve to a utxolib.networks entry. That is intentional under the wasm-only approach, and the one structural consequence is noted below.

Verification

Module Result
statics 32181 passing
utxo-lib 4249 passing
utxo-core 239 passing
abstract-utxo 1545 passing
utxo-bin 237 passing

All build clean (statics, utxo-lib, utxo-core, abstract-utxo, utxo-bin, sdk-core); prettier clean. Rebased onto current master.

Known consequence of the wasm-only approach

Nothing in this PR is blocked, but for the record: sdk-core's abstractUtxoCoinUtil.ts resolves statics' utxolibName into a utxo-lib network —

const network = utxolib.networks[coin.network.utxolibName as utxolib.NetworkName];

— in both getUtxoCoinScriptTypes2Of3() and getUtxoCoinScriptTypesForWalletType(). For Pearl that yields undefined and then throws TypeError: invalid network.

Not reachable today: no SDK coin class exists for Pearl, and the sdk-core tests covering those functions use a hardcoded coin list (btc, ltc, doge) rather than enumerating statics. It becomes reachable when the coin class lands, so those two functions need a wasm-backed path (or a Pearl guard) before Pearl is wired into wallet/address flows.

The good news for that follow-up: abstract-utxo is already almost entirely wasm-backed — 37 files import @bitgo/wasm-utxo, and the only 3 mentioning utxolib are a deprecation comment in abstractUtxoCoin.ts ("will be removed when we drop support for utxolib"), a comment in unspent.ts, and BTC-specific inscriptionBuilder.ts. Coin classes carry a name, not a Network, so a wasm-only Pearl coin class looks feasible without reintroducing utxo-lib.

Dependencies

Already merged upstream:

  • BitGo/wasm-utxo#328 — Pearl network support ✅
  • BitGo/indexer-utxo#957 — Pearl coin support ✅

Follow Up tickets :
https://linear.app/bitgo/issue/CECHO-1791/duplex-bitgojs-pr2
https://linear.app/bitgo/issue/CECHO-1792/duplex-bitgojs-pr3 

Related

🤖 Generated with Claude Code

@manojkumar138
manojkumar138 force-pushed the feat/prl/pr1-statics branch from d507bc6 to 0f546d8 Compare July 24, 2026 11:27
@manojkumar138 manojkumar138 changed the title feat(statics): add Pearl (PRL) to statics and utxo-lib networks feat(statics): add Pearl to statics and utxo-lib networks Jul 24, 2026
@manojkumar138
manojkumar138 force-pushed the feat/prl/pr1-statics branch 4 times, most recently from e940684 to 563cbd8 Compare July 24, 2026 11:53
@linear-code

linear-code Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

CECHO-1780

@manojkumar138
manojkumar138 force-pushed the feat/prl/pr1-statics branch 7 times, most recently from 96342d0 to 8317443 Compare July 25, 2026 20:12
@manojkumar138

Copy link
Copy Markdown
Contributor Author

@claude review

@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Claude finished @manojkumar138's task —— View job


Code Review - Pearl (PEARL) Integration

✅ Completed Reviews

1. Base Configuration (modules/statics/src/base.ts)

  • Pearl coin family properly added to CoinFamily enum (line 113)
  • Pearl underlying asset properly added to UnderlyingAsset enum (line 1688)
  • Integration follows existing patterns correctly

2. Network Classes (modules/statics/src/networks.ts)

  • Pearl mainnet network class properly implemented (lines 1434-1439)
  • PearlTestnet network class properly implemented (lines 1441-1446)
  • Both implement UtxoNetwork interface correctly
  • Networks registered in Networks.main and Networks.test objects
  • Explorer URLs set to undefined (appropriate for new network)

3. UTXO Coin Definitions (modules/statics/src/utxo.ts)

  • PEARL_FEATURES properly defined (lines 146-151) with appropriate feature set:
    • All default UTXO features included
    • MULTISIG, BULK_TRANSACTION, DISTRIBUTED_CUSTODY added
  • Pearl mainnet entry properly configured (lines 329-339):
    • UUID: 4518a5b9-00d3-476e-bc40-d3f87eb82250
    • Name: pearl / Display: Pearl
    • Uses correct network reference and asset
    • Suffix: PEARL
  • Pearl testnet entry properly configured (lines 340-350):
    • UUID: 5d88723a-7e86-43c7-9fb1-f4cee7abc48f
    • Name: tpearl / Display: Testnet Pearl
    • Suffix: TPEARL

4. UTXO-lib Network Configuration (modules/utxo-lib/src/networks.ts)

  • Pearl coin properly added to coins object (line 36)
  • NetworkName type extended with pearl and tpearl (lines 59-60)
  • Pearl mainnet network properly configured (lines 334-342):
    • Message prefix: \x18Pearl Signed Message:\n
    • Bech32 HRP: prl ✅ (matches spec)
    • Standard Bitcoin-compatible key derivation
  • Pearl testnet network properly configured (lines 343-351):
    • Bech32 HRP: tprl ✅ (matches spec)
    • Standard testnet configuration
  • getMainnet() function updated to handle Pearl networks (lines 436-438)
  • isPearl() helper function added (lines 563-565)
  • Taproot support properly enabled (line 598) ✅
  • SegWit support properly enabled (line 592) ✅

5. Test Fixtures and Validation

  • Comprehensive address test fixtures present for both networks
  • Pearl mainnet addresses use prl1 prefix ✅
  • Pearl testnet addresses use tprl1 prefix ✅
  • Address formats properly support:
    • P2PKH (legacy addresses)
    • P2WPKH (SegWit v0)
    • P2TR (Taproot) ✅
    • P2TR-MuSig2 (Taproot multisig) ✅
  • PSBT test fixtures comprehensive, including unsigned/half-signed/full-signed
  • Format fixtures for address display

🎯 Key Validation Points ✅

  1. Taproot-only Focus: Pearl properly configured as Taproot-enabled coin
  2. Bech32m Addresses: Correct HRP prefixes (prl/tprl) implemented
  3. Network Parameters: Standard Bitcoin-compatible parameters used
  4. Feature Set: Appropriate features enabled (multisig, bulk transactions, distributed custody)
  5. Test Coverage: Comprehensive test fixtures for all address types and transaction formats
  6. Integration Consistency: All components properly reference each other

📊 Review Summary

Status: ✅ APPROVED

The Pearl (PEARL) cryptocurrency integration is well-implemented and complete. The implementation properly follows BitGo's established patterns and includes:

  • Complete statics configuration across all required modules
  • Proper UTXO network definitions with Taproot support
  • Comprehensive test coverage with correct address formats
  • Consistent naming and referencing across all components

The integration correctly implements Pearl as a Taproot-enabled UTXO coin with bech32m addressing (prl/tprl prefixes) and includes all necessary features for BitGo wallet functionality.

No issues identified. Ready for merge.

@manojkumar138
manojkumar138 marked this pull request as ready for review July 26, 2026 12:02
@manojkumar138
manojkumar138 requested review from a team as code owners July 26, 2026 12:02
@manojkumar138
manojkumar138 requested a review from Copilot July 26, 2026 12:02
@manojkumar138
manojkumar138 marked this pull request as draft July 26, 2026 12:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces Pearl (pearl / tpearl) as a recognized UTXO network across BitGoJS’ statics + UTXO stack (statics, utxo-lib, utxo-core, utxo-bin, abstract-utxo tests), including Taproot-only wallet script-type enforcement to match @bitgo/wasm-utxo behavior.

Changes:

  • Adds Pearl network definitions (mainnet/testnet) and detection helpers in @bitgo/utxo-lib, including Taproot-only script-type gating in outputScripts.isSupportedScriptType.
  • Registers Pearl coin metadata in @bitgo/statics (family/asset/network/utxo coin entries + expectedColdFeatures).
  • Updates dust threshold logic, CLI network parsing order, tests, and extensive address/PSBT fixtures; bumps @bitgo/wasm-utxo to ^4.27.0 across affected modules.

Reviewed changes

Copilot reviewed 92 out of 93 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
yarn.lock Bumps @bitgo/wasm-utxo and updates transitive lock entries.
modules/utxo-staking/package.json Bumps @bitgo/wasm-utxo to ^4.27.0.
modules/utxo-ord/package.json Bumps @bitgo/wasm-utxo to ^4.27.0.
modules/utxo-descriptors/package.json Bumps @bitgo/wasm-utxo to ^4.27.0.
modules/utxo-core/package.json Bumps @bitgo/wasm-utxo to ^4.27.0.
modules/utxo-bin/package.json Bumps @bitgo/wasm-utxo to ^4.27.0.
modules/abstract-utxo/package.json Bumps @bitgo/wasm-utxo to ^4.27.0.
modules/statics/src/base.ts Adds CoinFamily.PEARL and UnderlyingAsset.PEARL.
modules/statics/src/networks.ts Adds Pearl mainnet/testnet network objects to Networks.
modules/statics/src/utxo.ts Adds pearl/tpearl UTXO coin entries and feature set.
modules/statics/test/unit/fixtures/expectedColdFeatures.ts Adds pearl/tpearl to expected cold-feature fixtures.
modules/utxo-lib/src/networks.ts Adds pearl/tpearl networks, NetworkName union updates, and helpers (isPearl, segwit/taproot support).
modules/utxo-lib/src/bitgo/outputScripts.ts Enforces Taproot-only script type support for Pearl via isSupportedScriptType.
modules/utxo-lib/src/bitgo/transaction.ts Enables transaction/PSBT factory support for networks.pearl.
modules/utxo-core/src/dustThreshold.ts Treats Pearl like BTC-group for dust relay limit and spend size.
modules/utxo-core/test/dustThreshold.ts Adds Pearl expected dust-threshold test vectors.
modules/utxo-bin/src/args/parseNetwork.ts Adds Pearl to the CLI network ordering (mainnet group).
modules/utxo-lib/test/networks.ts Extends network property-sharing groups and feature expectation table for Pearl.
modules/utxo-lib/test/bitgo/outputScripts.ts Adds expected script types for Pearl (p2tr, p2trMusig2).
modules/utxo-lib/test/integration_local_rpc/parse.ts Skips Pearl in regtest fixture suite until generator supports it.
modules/utxo-lib/test/fixtures_thirdparty/parse.ts Excludes Pearl from third-party fixture parsing.
modules/utxo-lib/test/fixtures_thirdparty/download.ts Excludes Pearl from third-party fixture downloads.
modules/utxo-lib/test/bitgo/psbt/Psbt.ts Skips a p2ms-only extraction suite for Pearl.
modules/utxo-lib/test/bitgo/psbt/SignVerifyLegacy.ts Skips legacy PSBT signing suite for taproot-only Pearl.
modules/utxo-lib/test/address/fixtures/pearl.json Adds Pearl address vectors.
modules/utxo-lib/test/address/fixtures/tpearl.json Adds Pearl testnet address vectors.
modules/utxo-lib/test/bitgo/fixtures/psbt/psbt.pearl.unsigned.json Adds Pearl PSBT fixture (unsigned).
modules/utxo-lib/test/bitgo/fixtures/psbt/psbt.pearl.halfsigned.json Adds Pearl PSBT fixture (half-signed).
modules/utxo-lib/test/bitgo/fixtures/psbt/psbt-lite.pearl.unsigned.json Adds Pearl “lite” PSBT fixture (unsigned).
modules/utxo-lib/test/bitgo/fixtures/psbt/psbt-lite.pearl.halfsigned.json Adds Pearl “lite” PSBT fixture (half-signed).
modules/abstract-utxo/test/unit/coins.ts Documents Pearl networks as lacking coin classes yet (undefined).
modules/abstract-utxo/test/unit/util/utxoCoins.ts Adds hasUtxoCoinForNetwork predicate for tests.
modules/abstract-utxo/test/unit/transaction/fixedScript/parsePsbt.ts Filters AcidTest suite by hasUtxoCoinForNetwork.
modules/utxo-bin/test/fixtures/formatAddress/pearl_p2pkh_default_1LCVrCgbT26Ui1QyrhaGvvhrkVdDRAXxtt.txt Adds Pearl formatAddress fixture (p2pkh).
modules/utxo-bin/test/fixtures/formatAddress/pearl_p2wkh_default_prl1q62tshlryz9lrjlw9edaf4l5l3v3deg03gw29k2.txt Adds Pearl formatAddress fixture (p2wkh).
modules/utxo-bin/test/fixtures/formatAddress/pearl_p2tr_default_prl1p8gv9m64s539mycj4m29wu8thy5n3y6u36xs58wq3yezrmqygwfns2yff0j.txt Adds Pearl formatAddress fixture (p2tr).
modules/utxo-bin/test/fixtures/formatAddress/pearl_p2trMusig2_default_prl1p5xqvqger0zdpcq6s3jznfz352exhk356p9hml6c69matmggrve9sq7apju.txt Adds Pearl formatAddress fixture (p2trMusig2).
modules/utxo-bin/test/fixtures/formatAddress/tpearl_p2pkh_default_mziT9FmaG3XjV7tbaGYekqvBcVDvGnY3EZ.txt Adds tpearl formatAddress fixture (p2pkh).
modules/utxo-bin/test/fixtures/formatAddress/tpearl_p2wkh_default_tprl1q62tshlryz9lrjlw9edaf4l5l3v3deg03lufv9q.txt Adds tpearl formatAddress fixture (p2wkh).
modules/utxo-bin/test/fixtures/formatAddress/tpearl_p2tr_default_tprl1p8gv9m64s539mycj4m29wu8thy5n3y6u36xs58wq3yezrmqygwfnsptdhs8.txt Adds tpearl formatAddress fixture (p2tr).
modules/utxo-bin/test/fixtures/formatAddress/tpearl_p2trMusig2_default_tprl1p5xqvqger0zdpcq6s3jznfz352exhk356p9hml6c69matmggrve9st3eldf.txt Adds tpearl formatAddress fixture (p2trMusig2).
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2pkh_default_1LCVrCgbT26Ui1QyrhaGvvhrkVdDRAXxtt.txt Updates network candidate list to include Pearl.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2pkh_default_1LCVrCgbT26Ui1QyrhaGvvhrkVdDRAXxtt.all.txt Updates converted network list to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2sh_default_361UWADXqgPsdf8L5Jga6GNPauMuBtT1eW.txt Updates network candidate list to include Pearl.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2sh_default_361UWADXqgPsdf8L5Jga6GNPauMuBtT1eW.all.txt Updates converted network list to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2shP2wsh_default_33qtbAwm4ooBtMQenssbqDE1J4gSMMBRnb.txt Updates network candidate list to include Pearl.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2shP2wsh_default_33qtbAwm4ooBtMQenssbqDE1J4gSMMBRnb.all.txt Updates converted network list to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2tr_default_bc1p8gv9m64s539mycj4m29wu8thy5n3y6u36xs58wq3yezrmqygwfnsjhucex.all.txt Adds Pearl/tpearl conversions for taproot addresses.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2trMusig2_default_bc1p5xqvqger0zdpcq6s3jznfz352exhk356p9hml6c69matmggrve9scdgsyg.all.txt Adds Pearl/tpearl conversions for taproot-musig2 addresses.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2wkh_default_bc1q62tshlryz9lrjlw9edaf4l5l3v3deg034uw28c.all.txt Adds Pearl/tpearl conversions for segwit v0 addresses.
modules/utxo-bin/test/fixtures/formatAddress/bitcoin_p2wsh_default_bc1qeu6xmet5wqslj2w0wac0hx5gj6dupmp869cajrkt3kw6ud3kkecsdzf7hn.all.txt Adds Pearl/tpearl conversions for segwit v0 scripts.
modules/utxo-bin/test/fixtures/formatAddress/testnet_p2pkh_default_mziT9FmaG3XjV7tbaGYekqvBcVDvGnY3EZ.txt Updates candidate network lists to include tpearl where prefixes collide.
modules/utxo-bin/test/fixtures/formatAddress/testnet_p2sh*_default_2M*.txt Updates candidate network lists to include tpearl where prefixes collide.
modules/utxo-bin/test/fixtures/formatAddress/cash_*.all.txt Updates converted network list to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/sv_* Updates network candidate lists to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/bch_* Updates network candidate lists to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/btg_* Updates network candidate lists to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/doge_* Updates network candidate lists to include tpearl.
modules/utxo-bin/test/fixtures/formatAddress/ecash_* Updates network candidate lists to include Pearl/tpearl.
modules/utxo-bin/test/fixtures/formatAddress/litecoinTest_* Updates network candidate lists to include tpearl.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/statics/src/utxo.ts Outdated
@manojkumar138
manojkumar138 marked this pull request as ready for review July 26, 2026 12:08

@OttoAllmendinger OttoAllmendinger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove utxo-lib changes

@manojkumar138
manojkumar138 force-pushed the feat/prl/pr1-statics branch 2 times, most recently from 8a68ca6 to 6651eb1 Compare July 26, 2026 18:15
@manojkumar138 manojkumar138 changed the title feat(statics): add Pearl to statics and utxo-lib networks feat(statics): add Pearl to statics Jul 26, 2026
@manojkumar138

Copy link
Copy Markdown
Contributor Author

@OttoAllmendinger that all matches what's here now — this PR touches modules/statics only:

Your note Status in this PR
no descriptors 0 files (utxo-descriptors never touched)
no ordinals 0 files (utxo-ord)
utxo-core does not need support 0 files — dust-policy change dropped
skip utxo-bin 0 files — networkOrder change dropped
just the basic fixed-script surface in abstract-utxo 0 files here; that's the next PR

So nothing to undo. The utxo-core and utxo-bin changes only existed because they referenced utxolib.networks.pearl, so they went out with the utxo-lib network.

Scoping the follow-up to your last point — basic fixed-script wallet surface in abstract-utxo, nothing else:

  • names.ts — register pearl / tpearl
  • impl/pearl/Prl / Tprl classes, taproot-only so exposing just p2tr / p2trMusig2 rather than inheriting AbstractUtxoCoin's defaults
  • the two sdk-core abstractUtxoCoinUtil.ts helpers that resolve utxolibName into a utxo-lib network and would throw TypeError: invalid network for Pearl

No descriptors, no ordinals, no utxo-core, no utxo-bin, no inscriptionBuilder.

I'll hold off until this one merges so the statics entry exists first — shout if you'd rather I stack it on this branch now.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

modules/statics/src/utxo.ts:151

  • PEARL_FEATURES repeats CoinFeature.MULTISIG, which is already included in UtxoCoin.DEFAULT_FEATURES. This can leave duplicate entries in the coin's features array, which is easy to miss and can cause brittle equality/serialization behavior downstream.
const PEARL_FEATURES = [
  ...UtxoCoin.DEFAULT_FEATURES,
  CoinFeature.MULTISIG,
  CoinFeature.BULK_TRANSACTION,
  CoinFeature.DISTRIBUTED_CUSTODY,
];

modules/statics/src/networks.ts:1445

  • Same as mainnet: since Pearl testnet is wasm-only and not present in @bitgo/utxo-lib networks, it’s worth documenting that utxolibName here refers to the wasm coin name, not an actual utxo-lib network key.
  name = 'PearlTestnet';
  family = CoinFamily.PEARL;
  utxolibName = 'tpearl';
  explorerUrl = undefined;

Comment thread modules/statics/src/networks.ts
@manojkumar138

Copy link
Copy Markdown
Contributor Author

@claude review

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Claude finished @manojkumar138's task —— View job


Code Review - Pearl (PEARL) Integration

Todo List:

  • Review base configuration changes (modules/statics/src/base.ts)
  • Review network definitions (modules/statics/src/networks.ts)
  • Review UTXO coin entries (modules/statics/src/utxo.ts)
  • Review test fixtures (modules/statics/test/unit/fixtures/expectedColdFeatures.ts)
  • Validate Pearl specifications against PR requirements
  • Check for code quality issues and best practices
  • Provide final review summary

✅ Review Complete - Pearl Integration Analysis

Status: ⚠️ APPROVED WITH MINOR ISSUE

This statics-only PR properly implements Pearl cryptocurrency integration with 4 files and 48 insertions. The implementation follows BitGo patterns correctly, but there's one code quality issue to address:

🐛 Code Quality Issue

modules/statics/src/utxo.ts:148 - Duplicate MULTISIG Feature

const PEARL_FEATURES = [
  ...UtxoCoin.DEFAULT_FEATURES,  // Already includes CoinFeature.MULTISIG (line 27)
  CoinFeature.MULTISIG,          // ❌ Duplicate - should be removed
  CoinFeature.BULK_TRANSACTION,
  CoinFeature.DISTRIBUTED_CUSTODY,
];

UtxoCoin.DEFAULT_FEATURES already includes CoinFeature.MULTISIG at line 27. Adding it again creates a duplicate in the features array, which could cause issues with equality checks or serialization.

Fix: Remove the duplicate CoinFeature.MULTISIG line from PEARL_FEATURES.

✅ What Works Well

1. Base Configuration (modules/statics/src/base.ts)

  • Pearl coin family properly added to CoinFamily enum (line 113)
  • Pearl underlying asset properly added to UnderlyingAsset enum (line 1688)
  • Alphabetical ordering maintained correctly

2. Network Classes (modules/statics/src/networks.ts)

  • Pearl mainnet (Pearl) and testnet (PearlTestnet) classes properly implemented
  • Correct UtxoNetwork interface implementation
  • Networks properly registered in Networks.main.pearl and Networks.test.pearl
  • explorerUrl = undefined is appropriate for new network
  • utxolibName values ('pearl'/'tpearl') match wasm CoinNames as intended

3. UTXO Coin Definitions (modules/statics/src/utxo.ts)(except duplicate feature)

  • Pearl mainnet entry (lines 329-339):
    • UUID: 4518a5b9-00d3-476e-bc40-d3f87eb82250
    • Name: pearl / Display: Pearl
    • Network: Networks.main.pearl
    • Asset: UnderlyingAsset.PEARL
    • Suffix: PEARL
  • Pearl testnet entry (lines 340-350):
    • UUID: 5d88723a-7e86-43c7-9fb1-f4cee7abc48f
    • Name: tpearl / Display: Testnet Pearl
    • Network: Networks.test.pearl
    • Suffix: TPEARL
  • Feature set includes appropriate capabilities:
    • BULK_TRANSACTION
    • DISTRIBUTED_CUSTODY
    • All default UTXO features ✅

4. Test Fixtures (expectedColdFeatures.ts)

  • pearl added to justMultiSig array (line 36)
  • tpearl added to justMultiSig array (line 57)
  • Proper alphabetical placement maintained

🎯 Validation Against Requirements

Taproot-only focus: Confirmed by PR description and wasm-utxo integration
Statics-only scope: No utxo-lib changes as requested by @OttoAllmendinger
Naming consistency: pearl/tpearl matches wasm CoinNames and indexer-utxo symbols
Feature set: Appropriate features for multisig, bulk transactions, and distributed custody
Network parameters: Uses Bitcoin-compatible base unit and standard UTXO patterns

📋 Minor Observations

  1. Wasm-only approach: The utxolibName values point to wasm coin names, not utxo-lib networks (as intended). The PR correctly notes this will require sdk-core adjustments later.

  2. Missing explorer: explorerUrl = undefined is appropriate for a new network without public explorers yet.

🚀 Recommendation

APPROVED after fixing the duplicate CoinFeature.MULTISIG issue. This is a clean, well-structured integration that properly follows BitGo's statics patterns and sets up Pearl for the wasm-utxo path as intended.


Job run

@manojkumar138
manojkumar138 force-pushed the feat/prl/pr1-statics branch from 6651eb1 to 3733692 Compare July 27, 2026 04:53
@manojkumar138

Copy link
Copy Markdown
Contributor Author

Both review points addressed in 3733692798 — thanks for the thorough pass.

1. Duplicate CoinFeature.MULTISIG (raised by both Claude and Copilot) — removed. It wasn't theoretical; the duplicate reached the shipped coin:

before: total features: 13 | duplicates: [ 'multisig' ]   (MULTISIG count: 2)
after:  total features: 12 | duplicates: none

I checked the sibling arrays (BCH_, BTC_, LTC_, DOGE_, DASH_, ZEC_FEATURES) — none re-add MULTISIG, so it was my oversight rather than an existing pattern. multisig, bulk-transaction and distributedCustody all remain on both names.

2. utxolibName documentation (Copilot) — added a block comment above both Pearl network classes plus a doc comment on each field, stating that the value is a wasm-utxo CoinName, that Pearl is deliberately unregistered in utxo-lib, and that resolving it through utxolib.networks[...] yields undefined and throws TypeError: invalid network.

On your minor observations: agreed on both. explorerUrl = undefined is deliberate — no public Pearl explorer yet. And yes, the sdk-core adjustment is tracked for the abstract-utxo follow-up; specifically getUtxoCoinScriptTypes2Of3() and getUtxoCoinScriptTypesForWalletType() in abstractUtxoCoinUtil.ts, which are the two call sites performing that lookup.

statics builds clean, 32180 passing, prettier clean. Still 4 files.

@manojkumar138
manojkumar138 requested a review from Copilot July 27, 2026 04:54
@manojkumar138

Copy link
Copy Markdown
Contributor Author

@claude re-review

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Claude finished @manojkumar138's task —— View job


Code Review - Pearl (PEARL) Integration Re-review

Todo List:

  • Review current state of changed files
  • Verify duplicate MULTISIG feature fix
  • Check documentation improvements for utxolibName
  • Look for any remaining code quality issues
  • Provide final review assessment

✅ Re-Review Complete - All Issues Resolved

Status: ✅ APPROVED

This re-review confirms that all previously identified issues have been properly addressed in the latest commits. The Pearl cryptocurrency integration is now clean and ready for merge.

🎯 Verified Fixes

1. Duplicate MULTISIG Feature Fixed

  • Previous Issue: PEARL_FEATURES included both ...UtxoCoin.DEFAULT_FEATURES (which contains CoinFeature.MULTISIG) and an explicit CoinFeature.MULTISIG
  • Fix Verified: modules/statics/src/utxo.ts:146 now correctly shows:
    const PEARL_FEATURES = [...UtxoCoin.DEFAULT_FEATURES, CoinFeature.BULK_TRANSACTION, CoinFeature.DISTRIBUTED_CUSTODY];
  • The duplicate CoinFeature.MULTISIG has been removed, eliminating the array duplication issue

2. Documentation Improvements Added

  • Previous Issue: utxolibName values needed clarification about wasm-only approach
  • Fix Verified: Comprehensive documentation added in modules/statics/src/networks.ts:1434-1442:
    • Block comment explains Pearl is wasm-utxo only and NOT registered in utxo-lib
    • Warns that utxolib.networks[...] yields undefined and throws TypeError: invalid network
    • Individual JSDoc comments on each utxolibName field (lines 1446, 1454) reference the explanation

✅ Code Quality Assessment

Overall Implementation: The Pearl integration is well-structured and follows BitGo patterns correctly:

  1. Base Configuration (modules/statics/src/base.ts) ✅

    • CoinFamily.PEARL added in alphabetical order (line 113)
    • UnderlyingAsset.PEARL added in alphabetical order (line 1688)
  2. Network Classes (modules/statics/src/networks.ts) ✅

    • Pearl mainnet and testnet classes properly implement UtxoNetwork
    • Network registration in both Networks.main.pearl and Networks.test.pearl
    • explorerUrl = undefined is appropriate for new network
  3. UTXO Coin Definitions (modules/statics/src/utxo.ts) ✅

    • Pearl mainnet entry (lines 324-334): proper UUID, name, network, asset, suffix
    • Pearl testnet entry (lines 335-345): proper UUID, name, network, asset, suffix
    • Feature set appropriately includes BULK_TRANSACTION and DISTRIBUTED_CUSTODY
    • No duplicate features after fix
  4. Test Fixtures (expectedColdFeatures.ts) ✅

    • pearl and tpearl properly added to justMultiSig arrays
    • Alphabetical ordering maintained

📊 PR Statistics Confirmed

  • Scope: Statics-only as requested (4 files, 54 insertions, 0 deletions)
  • No utxo-lib changes: Correctly removed per @OttoAllmendinger's feedback
  • Clean implementation: No unnecessary files or code

🚀 Final Recommendation

✅ APPROVED - Ready for Merge

The Pearl integration is now complete, clean, and properly documented. All review feedback has been thoroughly addressed:

  • Duplicate feature issue resolved
  • Comprehensive documentation added for the wasm-only approach
  • Implementation follows BitGo's established patterns
  • Proper statics-only scope maintained

This PR successfully adds Pearl (PEARL) cryptocurrency support to BitGoJS statics without any remaining code quality issues.


Job run

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

modules/statics/src/utxo.ts:345

  • Same as the mainnet entry: the explicit '' prefix and TPEARL suffix are redundant because utxo() already defaults to prefix='' and suffix=name.toUpperCase() (so tpearl -> TPEARL). Relying on defaults keeps these entries consistent with the rest of the file.
    PEARL_FEATURES,
    '',
    'TPEARL'
  ),

Comment thread modules/statics/src/utxo.ts
@manojkumar138

Copy link
Copy Markdown
Contributor Author

@claude re-review

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Claude finished @manojkumar138's task —— View job


Code Review - Pearl (PEARL) Integration Re-review

Todo List:

  • Review current state of changed files
  • Verify duplicate MULTISIG feature fix
  • Check documentation improvements for utxolibName
  • Look for any remaining code quality issues
  • Provide final review assessment

✅ Re-Review Complete - All Issues Resolved

Status: ✅ APPROVED

This re-review confirms that all previously identified issues have been properly addressed in the latest commits. The Pearl cryptocurrency integration is now clean and ready for merge.

🎯 Verified Fixes

1. Duplicate MULTISIG Feature Fixed

  • Previous Issue: PEARL_FEATURES included both ...UtxoCoin.DEFAULT_FEATURES (which contains CoinFeature.MULTISIG) and an explicit CoinFeature.MULTISIG
  • Fix Verified: modules/statics/src/utxo.ts:146 now correctly shows:
    const PEARL_FEATURES = [...UtxoCoin.DEFAULT_FEATURES, CoinFeature.BULK_TRANSACTION, CoinFeature.DISTRIBUTED_CUSTODY];
  • The duplicate CoinFeature.MULTISIG has been removed, eliminating the array duplication issue

2. Documentation Improvements Added

  • Previous Issue: utxolibName values needed clarification about wasm-only approach
  • Fix Verified: Comprehensive documentation added in modules/statics/src/networks.ts:1434-1442:
    • Block comment explains Pearl is wasm-utxo only and NOT registered in utxo-lib
    • Warns that utxolib.networks[...] yields undefined and throws TypeError: invalid network
    • Individual JSDoc comments on each utxolibName field (lines 1446, 1454) reference the explanation

✅ Code Quality Assessment

Overall Implementation: The Pearl integration is well-structured and follows BitGo patterns correctly:

  1. Base Configuration (modules/statics/src/base.ts) ✅

    • CoinFamily.PEARL added in alphabetical order (line 113)
    • UnderlyingAsset.PEARL added in alphabetical order (line 1688)
  2. Network Classes (modules/statics/src/networks.ts) ✅

    • Pearl mainnet and testnet classes properly implement UtxoNetwork
    • Network registration in both Networks.main.pearl and Networks.test.pearl
    • explorerUrl = undefined is appropriate for new network
  3. UTXO Coin Definitions (modules/statics/src/utxo.ts) ✅

    • Pearl mainnet entry (lines 324-334): proper UUID, name, network, asset, suffix
    • Pearl testnet entry (lines 335-345): proper UUID, name, network, asset, suffix
    • Feature set appropriately includes BULK_TRANSACTION and DISTRIBUTED_CUSTODY
    • No duplicate features after fix
  4. Test Fixtures (expectedColdFeatures.ts) ✅

    • pearl and tpearl properly added to justMultiSig arrays
    • Alphabetical ordering maintained

📊 PR Statistics Confirmed

  • Scope: Statics-only as requested (4 files, 54 insertions, 0 deletions)
  • No utxo-lib changes: Correctly removed per @OttoAllmendinger's feedback
  • Clean implementation: No unnecessary files or code

🚀 Final Recommendation

✅ APPROVED - Ready for Merge

The Pearl integration is now complete, clean, and properly documented. All review feedback has been thoroughly addressed:

  • Duplicate feature issue resolved
  • Comprehensive documentation added for the wasm-only approach
  • Implementation follows BitGo's established patterns
  • Proper statics-only scope maintained

This PR successfully adds Pearl (PEARL) cryptocurrency support to BitGoJS statics without any remaining code quality issues.


Job run

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread modules/statics/src/utxo.ts
Define Pearl (PEARL/TPEARL) coin identity in @bitgo/statics: CoinFamily,
UnderlyingAsset, the Pearl/PearlTestnet network classes and the pearl and
tpearl coin entries.

Pearl is a taproot-only UTXO chain (btcd fork) using BIP-340 Schnorr
signatures and BIP-341 script-path spending. It is backed by
@bitgo/wasm-utxo, which has carried pearl and tpearl in CoinName since
4.27.0.

No @bitgo/utxo-lib network is registered. Pearl is intended to be served
through the wasm-utxo path, matching the wasm-only profile already used
by ims-utxo, so utxolibName names the wasm CoinName rather than a
utxo-lib network entry.

TICKET: CECHO-1780

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread modules/statics/src/base.ts
Comment thread modules/statics/src/base.ts
@manojkumar138

Copy link
Copy Markdown
Contributor Author

@claude re-review

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Claude finished @manojkumar138's task —— View job


Code Review - Pearl (PEARL) Integration Re-review

Todo List:

  • Review current state of changed files
  • Verify duplicate MULTISIG feature fix
  • Check documentation improvements for utxolibName
  • Look for any remaining code quality issues
  • Provide final review assessment

✅ Re-Review Complete - All Issues Resolved

Status: ✅ APPROVED

This re-review confirms that all previously identified issues have been properly addressed in the latest commits. The Pearl cryptocurrency integration is now clean and ready for merge.

🎯 Verified Fixes

1. Duplicate MULTISIG Feature Fixed

  • Previous Issue: PEARL_FEATURES included both ...UtxoCoin.DEFAULT_FEATURES (which contains CoinFeature.MULTISIG) and an explicit CoinFeature.MULTISIG
  • Fix Verified: modules/statics/src/utxo.ts:146 now correctly shows:
    const PEARL_FEATURES = [...UtxoCoin.DEFAULT_FEATURES, CoinFeature.BULK_TRANSACTION, CoinFeature.DISTRIBUTED_CUSTODY];
  • The duplicate CoinFeature.MULTISIG has been removed, eliminating the array duplication issue

2. Documentation Improvements Added

  • Previous Issue: utxolibName values needed clarification about wasm-only approach
  • Fix Verified: Comprehensive documentation added in modules/statics/src/networks.ts:1434-1442:
    • Block comment explains Pearl is wasm-utxo only and NOT registered in utxo-lib
    • Warns that utxolib.networks[...] yields undefined and throws TypeError: invalid network
    • Individual JSDoc comments on each utxolibName field (lines 1446, 1454) reference the explanation

✅ Code Quality Assessment

Overall Implementation: The Pearl integration is well-structured and follows BitGo patterns correctly:

  1. Base Configuration (modules/statics/src/base.ts) ✅

    • CoinFamily.PEARL added in alphabetical order (line 113)
    • UnderlyingAsset.PEARL added in alphabetical order (line 1688)
  2. Network Classes (modules/statics/src/networks.ts) ✅

    • Pearl mainnet and testnet classes properly implement UtxoNetwork
    • Network registration in both Networks.main.pearl and Networks.test.pearl
    • explorerUrl = undefined is appropriate for new network
  3. UTXO Coin Definitions (modules/statics/src/utxo.ts) ✅

    • Pearl mainnet entry (lines 324-334): proper UUID, name, network, asset, suffix
    • Pearl testnet entry (lines 335-345): proper UUID, name, network, asset, suffix
    • Feature set appropriately includes BULK_TRANSACTION and DISTRIBUTED_CUSTODY
    • No duplicate features after fix
  4. Test Fixtures (expectedColdFeatures.ts) ✅

    • pearl and tpearl properly added to justMultiSig arrays
    • Alphabetical ordering maintained

📊 PR Statistics Confirmed

  • Scope: Statics-only as requested (4 files, 54 insertions, 0 deletions)
  • No utxo-lib changes: Correctly removed per @OttoAllmendinger's feedback
  • Clean implementation: No unnecessary files or code

🚀 Final Recommendation

✅ APPROVED - Ready for Merge

The Pearl integration is now complete, clean, and properly documented. All review feedback has been thoroughly addressed:

  • Duplicate feature issue resolved
  • Comprehensive documentation added for the wasm-only approach
  • Implementation follows BitGo's established patterns
  • Proper statics-only scope maintained

This PR successfully adds Pearl (PEARL) cryptocurrency support to BitGoJS statics without any remaining code quality issues.


Job run

@mohd-kashif mohd-kashif left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@manojkumar138
manojkumar138 merged commit b5dc194 into master Jul 27, 2026
35 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants