@@ -807,7 +807,26 @@ pub(crate) mod test {
807807 UncheckedProposal { psbt : PARSED_ORIGINAL_PSBT . clone ( ) , params }
808808 }
809809
810- fn wants_outputs_from_test_vector ( proposal : UncheckedProposal ) -> WantsOutputs {
810+ pub ( crate ) fn maybe_inputs_owned_from_test_vector ( ) -> MaybeInputsOwned {
811+ let proposal = unchecked_proposal_from_test_vector ( ) ;
812+ proposal
813+ . check_broadcast_suitability ( None , |_| Ok ( true ) )
814+ . expect ( "Broadcast suitability check should not fail" )
815+ }
816+
817+ pub ( crate ) fn maybe_inputs_seen_from_test_vector ( ) -> MaybeInputsSeen {
818+ let maybe_inputs_owned = maybe_inputs_owned_from_test_vector ( ) ;
819+ maybe_inputs_owned. check_inputs_not_owned ( |_| Ok ( false ) ) . expect ( "No inputs should be owned" )
820+ }
821+
822+ pub ( crate ) fn outputs_unknown_from_test_vector ( ) -> OutputsUnknown {
823+ let maybe_inputs_seen = maybe_inputs_seen_from_test_vector ( ) ;
824+ maybe_inputs_seen
825+ . check_no_inputs_seen_before ( |_| Ok ( false ) )
826+ . expect ( "No inputs should be seen before" )
827+ }
828+
829+ pub ( crate ) fn wants_outputs_from_test_vector ( proposal : UncheckedProposal ) -> WantsOutputs {
811830 proposal
812831 . assume_interactive_receiver ( )
813832 . check_inputs_not_owned ( |_| Ok ( false ) )
@@ -825,10 +844,25 @@ pub(crate) mod test {
825844 . expect ( "Receiver output should be identified" )
826845 }
827846
828- fn provisional_proposal_from_test_vector ( proposal : UncheckedProposal ) -> ProvisionalProposal {
847+ pub ( crate ) fn wants_inputs_from_test_vector ( ) -> WantsInputs {
848+ let proposal = unchecked_proposal_from_test_vector ( ) ;
849+ wants_outputs_from_test_vector ( proposal) . commit_outputs ( )
850+ }
851+
852+ pub ( crate ) fn provisional_proposal_from_test_vector (
853+ proposal : UncheckedProposal ,
854+ ) -> ProvisionalProposal {
829855 wants_outputs_from_test_vector ( proposal) . commit_outputs ( ) . commit_inputs ( )
830856 }
831857
858+ pub ( crate ) fn payjoin_proposal_from_test_vector (
859+ proposal : UncheckedProposal ,
860+ ) -> PayjoinProposal {
861+ provisional_proposal_from_test_vector ( proposal)
862+ . finalize_proposal ( |_| Ok ( PARSED_ORIGINAL_PSBT . clone ( ) ) , None , None )
863+ . expect ( "finalize_proposal should not fail" )
864+ }
865+
832866 #[ test]
833867 fn is_output_substitution_disabled ( ) {
834868 let mut proposal = unchecked_proposal_from_test_vector ( ) ;
0 commit comments