Refining gold through electrolysis

I saw an interesting documentary on the Royal Canadian Mint on how they purify their gold into .9999 fine using electrolysis. I tried finding more information about the process online but a lot of the threads get confusing because people start discussing recovering the gold from scrap and THAT process. I’m interested in the process that assumes I have a dore ingot of scrap gold (so a block of gold, silver, platinum, copper, lead, etc.) already and want to extract the gold out of it through electrolysis. What would my solution be? Any acid and any pH levels and do I need aqua regia? How much electricity does it use? The dore would be the anode but what metal for the cathode? Stuff like that.

Any good references for what I’m looking for?

Here is the Wikipedia article on “electrowinning”, which is apparently the technical term for the process.

I think potassium cyanide is used as a solvent. Here is a video - YouTube