Wash the peanuts carefully and pick thorough them.
In a instant pot, add enough water to cover the peanuts and then pour in salt and place star anises. Cover and cook for 15 to 20 minutes. Let the peanuts soak in the salty liquid until is well flavored.