@@ -922,21 +922,30 @@ export const isStandardMultisig = (lockingBytecode: Uint8Array) => {
922922 return true ;
923923} ;
924924
925- export const isStandardOutputBytecode = ( lockingBytecode : Uint8Array ) =>
925+ /**
926+ * Test that the provided locking bytecode matches one of the standard output
927+ * bytecode patterns prior to the `BCH_2023_05` upgrade (following
928+ * P2SH32 activation).
929+ * @param lockingBytecode - the locking bytecode to test for standardness
930+ */
931+ export const isStandardOutputBytecodePre2023 = ( lockingBytecode : Uint8Array ) =>
926932 isPayToPublicKeyHash ( lockingBytecode ) ||
927933 isPayToScriptHash20 ( lockingBytecode ) ||
928934 isPayToPublicKey ( lockingBytecode ) ||
929935 isArbitraryDataOutput ( lockingBytecode ) ||
930936 isStandardMultisig ( lockingBytecode ) ;
931937
932- // eslint-disable-next-line complexity
933- export const isStandardOutputBytecode2023 = ( lockingBytecode : Uint8Array ) =>
934- isPayToPublicKeyHash ( lockingBytecode ) ||
935- isPayToScriptHash20 ( lockingBytecode ) ||
936- isPayToScriptHash32 ( lockingBytecode ) ||
937- isPayToPublicKey ( lockingBytecode ) ||
938- isArbitraryDataOutput ( lockingBytecode ) ||
939- isStandardMultisig ( lockingBytecode ) ;
938+ /**
939+ * Test that the provided locking bytecode matches one of the standard output
940+ * bytecode patterns as of the `BCH_2023_05` upgrade (following
941+ * P2SH32 activation).
942+ * @param lockingBytecode - the locking bytecode to test for standardness
943+ */
944+ export const isStandardOutputBytecode = ( lockingBytecode : Uint8Array ) =>
945+ isStandardOutputBytecodePre2023 ( lockingBytecode ) ||
946+ isPayToScriptHash32 ( lockingBytecode ) ;
947+
948+ export const isStandardOutputBytecode2023 = isStandardOutputBytecode ;
940949
941950const enum SegWit {
942951 minimumLength = 4 ,
0 commit comments