From the Super Mario Wiki
Hope Chest is a Gaddget in Mario Party Advance. It can be obtained by completing the quest Love That Princess. Hope Chest can be used to activate a two player minigame. It is intended to test the players' affinity for each other. One player must lock a treasure chest by inputting a series of five buttons. The other player must guess and input the correct series of buttons to unlock the chest.
"Make a wish and close the lid with any button. Have someone you like open it!"