File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -49,18 +49,24 @@ class PSBTOutput
4949 * @param ScriptInterface|null $redeemScript
5050 * @param ScriptInterface|null $witnessScript
5151 * @param PSBTBip32Derivation[] $bip32Derivations
52- * @param BufferInterface[] $unknown
52+ * @param BufferInterface[] $unknowns
5353 */
5454 public function __construct (
5555 ScriptInterface $ redeemScript = null ,
5656 ScriptInterface $ witnessScript = null ,
5757 array $ bip32Derivations = [],
58- array $ unknown = []
58+ array $ unknowns = []
5959 ) {
60+ foreach ($ unknowns as $ key => $ unknown ) {
61+ if (!is_string ($ key ) || !($ unknown instanceof BufferInterface)) {
62+ throw new \RuntimeException ("Unknowns must be a map of string keys to Buffer values " );
63+ }
64+ }
65+
6066 $ this ->redeemScript = $ redeemScript ;
6167 $ this ->witnessScript = $ witnessScript ;
6268 $ this ->bip32Derivations = $ bip32Derivations ;
63- $ this ->unknown = $ unknown ;
69+ $ this ->unknown = $ unknowns ;
6470 }
6571
6672 /**
You can’t perform that action at this time.
0 commit comments