Problem: Script parsing helpers exist in src/utils/validateMultisigImport.ts but are not shared with wallet building.
Tasks:
- Extract reusable helpers (decode native script CBOR, detect script type, compute required signers, collect sig key hashes, detect hierarchical wrappers) into a shared module.
- Document behavior for nested
all/any/atLeast scripts, especially wrappers with a single child.
Affected files:
- src/utils/validateMultisigImport.ts
- src/utils/common.ts
- New shared utility (e.g.
src/utils/nativeScript.ts)
Acceptance:
- Shared helpers can parse the example script and return
required=2, type=atLeast, isHierarchical=true.
- No change in existing import validation behavior.
Problem: Script parsing helpers exist in src/utils/validateMultisigImport.ts but are not shared with wallet building.
Tasks:
all/any/atLeastscripts, especially wrappers with a single child.Affected files:
src/utils/nativeScript.ts)Acceptance:
required=2,type=atLeast,isHierarchical=true.