What purpose does "The Custom House" seem to serve?I need references from the story to prove my point

I think Hawthorne does this to prove he has gone to great lengths to research for his writing before he put it in context. He hopes to validate and give credibility to the expertise he has in creating a historical novel for we the readers.

The Custom House he spent time in had stacks and stacks of old papers and records. One item he found in particular gave him great motivation for the book:

But...

I think Hawthorne does this to prove he has gone to great lengths to research for his writing before he put it in context. He hopes to validate and give credibility to the expertise he has in creating a historical novel for we the readers.

The Custom House he spent time in had stacks and stacks of old papers and records. One item he found in particular gave him great motivation for the book:

But the object that most drew my attention, in the mysterious package, was a certain affair of fine red cloth, much worn and faded. There were traces about it of gold embroidery, which, however, was greatly frayed and defaced.

After revealing that this displayed a particular letter 'A', the author later notes that he found more twisted papers that gave explanation for the letter:

There were several foolscap sheets containing many particulars respecting the life and conversation of one Hester Prynne... prying further into the manuscript, I found the record of other doings and sufferings of this singular woman.

The sufferings and doings he learned of give credence to Hawthorne's account entitled The Scarlet Letter. He is trying to point out with the Custom House that he journeyed and learned about the real life person who was Hester.