@@ -27,7 +27,7 @@ public function isReturn(): bool
2727 /**
2828 * @return bool
2929 */
30- public function isP2PK (): bool
30+ public function isPayToPubKey (): bool
3131 {
3232 $ operations = $ this ->parse ();
3333
@@ -39,7 +39,7 @@ public function isP2PK(): bool
3939 /**
4040 * @return bool
4141 */
42- public function isP2PKH (): bool
42+ public function isPayToPubKeyHash (): bool
4343 {
4444 $ operations = $ this ->parse ();
4545
@@ -54,7 +54,7 @@ public function isP2PKH(): bool
5454 /**
5555 * @return bool
5656 */
57- public function isP2SH (): bool
57+ public function isPayToScriptHash (): bool
5858 {
5959 $ operations = $ this ->parse ();
6060
@@ -80,7 +80,7 @@ public function isMultisig(): bool
8080 /**
8181 * @return bool
8282 */
83- public function isP2WPKH (): bool
83+ public function isPayToWitnessPubKeyHash (): bool
8484 {
8585 $ operations = $ this ->parse ();
8686
@@ -92,7 +92,7 @@ public function isP2WPKH(): bool
9292 /**
9393 * @return bool
9494 */
95- public function isP2WSH (): bool
95+ public function isPayToWitnessScriptHash (): bool
9696 {
9797 $ operations = $ this ->parse ();
9898
@@ -115,23 +115,23 @@ public function getOutputAddress(Bitcoin $network = null): string
115115
116116 $ operations = $ this ->parse ();
117117
118- if ($ this ->isP2PK ()) {
118+ if ($ this ->isPayToPubKey ()) {
119119 return Utils::pubKeyToAddress ($ operations [0 ]->data , $ network ::P2PKH_PREFIX );
120120 }
121121
122- if ($ this ->isP2PKH ()) {
122+ if ($ this ->isPayToPubKeyHash ()) {
123123 return Utils::hash160ToAddress ($ operations [2 ]->data , $ network ::P2PKH_PREFIX );
124124 }
125125
126- if ($ this ->isP2SH ()) {
126+ if ($ this ->isPayToScriptHash ()) {
127127 return Utils::hash160ToAddress ($ operations [1 ]->data , $ network ::P2SH_PREFIX );
128128 }
129129
130- if ($ this ->isP2WPKH ()) {
130+ if ($ this ->isPayToWitnessPubKeyHash ()) {
131131 return encodeSegwit ($ network ::BECH32_HRP , $ operations [0 ]->data , $ operations [1 ]->data );
132132 }
133133
134- if ($ this ->isP2WSH ()) {
134+ if ($ this ->isPayToWitnessScriptHash ()) {
135135 return encodeSegwit ($ network ::BECH32_HRP , $ operations [0 ]->data , $ operations [1 ]->data );
136136 }
137137
0 commit comments