@@ -156,6 +156,7 @@ export interface ScriptPubkeyToAddressArgs {
156156 addressType : AddressTypeEnum
157157 coin : string
158158 redeemScript ?: string
159+ includeCashaddrPrefix ?: boolean
159160}
160161
161162export interface ScriptPubkeyToAddressReturn {
@@ -612,7 +613,8 @@ export function scriptPubkeyToAddress(
612613 coin : args . coin
613614 } ) ,
614615 CashaddrTypeEnum . pubkeyhash ,
615- standardPrefixes . cashaddr
616+ standardPrefixes . cashaddr ,
617+ args . includeCashaddrPrefix
616618 )
617619 }
618620 if ( legacyPrefixes . cashaddr != null ) {
@@ -623,7 +625,8 @@ export function scriptPubkeyToAddress(
623625 coin : args . coin
624626 } ) ,
625627 CashaddrTypeEnum . pubkeyhash ,
626- legacyPrefixes . cashaddr
628+ legacyPrefixes . cashaddr ,
629+ args . includeCashaddrPrefix
627630 )
628631 }
629632 payment = payments . p2pkh
@@ -637,7 +640,8 @@ export function scriptPubkeyToAddress(
637640 coin : args . coin
638641 } ) ,
639642 CashaddrTypeEnum . scripthash ,
640- standardPrefixes . cashaddr
643+ standardPrefixes . cashaddr ,
644+ args . includeCashaddrPrefix
641645 )
642646 }
643647 if ( legacyPrefixes . cashaddr != null ) {
@@ -648,7 +652,8 @@ export function scriptPubkeyToAddress(
648652 coin : args . coin
649653 } ) ,
650654 CashaddrTypeEnum . scripthash ,
651- legacyPrefixes . cashaddr
655+ legacyPrefixes . cashaddr ,
656+ args . includeCashaddrPrefix
652657 )
653658 }
654659 payment = payments . p2sh
0 commit comments