Molly Bloom had celebrities by the score leaning over million-dollar piles of chips at her famous, underground high-stakes poker games.

But don’t expect to learn their names from “Molly’s Game,” the action-packed movie about Bloom’s wild life, which is earning raves for star Jessica Chastain and veteran screenwriter Aaron Sorkin, who is also making his directorial debut.

Sorkin keeps his A-lister cards close to the vest, naming no names in the flick, which has been screening in Manhattan and gets a wide release Friday.

For boldface names, you need to go to Bloom’s 2014 memoir, which inspired the movie, “Molly’s Game: From Hollywood’s Elite to Wall Street’s Billionaire Boys Club, My High-Stakes Adventure in the World of Underground Poker.”

While Bloom refused to be the first to reveal who sat at her table, she was willing to talk about her well-known clients once their names got out. And dish she did.

Bloom wrote that Hollywood hanger-on Rick Salomon, of Paris Hilton sex-tape fame, once walked in on one of her games and turned to poker-playing actor Ben Affleck, mischief in his eyes.

“Hey, yo, did Jennifer Lopez’s ass have cellulite on it, or was it nice?” Salomon shot at Affleck, who used to date Jenny from the Block.

The table went silent, Bloom noted in her memoir. “Ben looked at Rick,” she wrote. “ ‘It was nice,’ he said, and pushed into a huge pot.”

The other players — sitting at a table with $2 million in chips in front of them — erupted in laughter.

Bloom, the sister of Olympic skier Jeremy Bloom, grew up in small-town Colorado, where she had been a national-level skier herself before scoliosis cut her career short.

She moved to LA in 2003 — a 5-foot-4, green-eyed brunette in her early 20s, driven to succeed.

Bloom became a the tireless personal assistant to a real-estate investor who had bought a share in the Viper Room, the infamous Sunset strip nightclub where River Phoenix fatally overdosed in 1993.

Her rise to back-room “Poker Princess’’ began when her boss had her organize a “no-limit hold ’em” game in the Viper Room basement one night.

A-listers Leonardo DiCaprio and Tobey Maguire showed up to play, Bloom pocketed $3,000 in tips — and she was hooked.

Soon, her boss let her run the whole thing herself, and it was indeed Molly’s Game, with her own ingenious innovations.

Between 2005 and 2011, first in LA and later on the East Coast, Bloom began hosting games at a different luxury suite or millionaire’s house each week, hiring Playboy Playmates to serve drinks and caviar.

“The upgraded location and the fact that every man was treated like James Bond only made the game a hotter ticket,” she wrote in her memoir. On a good night, she’d net $50,000 in tips.

“I started making so much money that I barely knew what to do with it,” Bloom wrote.

Professional players weren’t invited — they’d only walk away with all the money and discourage everyone else. Bloom instead kept her game small, discreet and exclusive — stacked with celebrities, knowing that A-listers attract “whales,” the wealthy but mediocre players who could be feasted upon by everyone else at the table.

DiCaprio and Affleck repeatedly sweated over hands.

The “Titanic” star was a great draw for whales but a only mediocre player who folded early and kept a set of “huge headphones” on during games.

“It was almost as if he wasn’t trying to win or lose,” Bloom noted.

Bloom’s debut Manhattan game was held in September 2008 in a 4,300-square-foot suite at the Four Seasons, with 360-degree views of the city. The minimum buy-in was $250,000, and billionaires and millionaires played until sunrise.

Alex Rodriguez popped by, and not for his first time, just to watch.

The then-Yankees slugger — who had just hit his 549th home run against the Tampa Bay Rays — gazed at the seven figures in chips on the table and remarked, “What a game.”

Rap star Nelly also came to a game Bloom ran in the Hamptons, his posse in tow.

Even the Olsen twins once caught the action.

But Bloom’s most reliable LA A-lister, and her arch nemesis, was “Spider-Man” star and known poker fanatic Maguire, who is widely speculated to have inspired the movie’s celebrity villain, “Player X,” portrayed by Michael Cera.

In the movie, “Player X” brags about “destroying lives” by winning piles of chips from monied chumps. At one point, Player X, dripping sincerity, swears on his mother’s life that he’s not bluffing about his fabulous hand. The target whale believes him and folds a hand that would have won.

Delighted by his own twitchy evil, Player X tells the now-beached whale, “F–k you,” and shows his worthless hand.

Bloom recounts Maguire’s alleged stunt in her memoir.

“Tobey was incredibly convincing,” Bloom wrote, “and so earnest that the guy eventually, although reluctantly, gave in. To add insult to injury, Tobey then victoriously showed his bluff. To me, his actions were in really bad taste.”

She said she began calling Maguire “Hannibal Lecter,’’ after the “Silence of the Lambs’’ madman, because of the sadistic joy he took, not only in winning but in extracting what she called usurious payback deals from his victims.

Maguire — whom Bloom called “the worst tipper, the best player and the absolute worst loser’’ — turned his sadism on her, too, according to her memoir. One night in LA, Maguire, having just won a big hand, pushed himself away from a table that included billionaire Guy Laliberte, owner of Cirque du Soleil.

Bloom wrote of Maguire:

“He held a thousand-dollar chip in his hand. He flipped it over a couple times in his fingers.

“This is yours,” he said, holding it out to me.

“Thanks, Tobey,” I said, reaching my hand out. He yanked the chip back at the last second.

“If . . .” he said. “If you do something to earn these thousand dollars.”

His voice was loud enough that some of the guys looked up to see what was happening. I laughed, trying not to show my nerves.

“What do I want you to do?” he said, as if he were pondering. The whole table was watching us now.

“I know!” he said. “Get up on that desk and bark like a seal.”

I looked at him. His face was lit up like it was Christmas Eve.

“Bark like a seal who wants a fish,” he said. I laughed again, stalling, hoping he would play the joke out by himself and leave.

“I’m not kidding. What’s wrong? You’re too rich now? You won’t bark for a thousand dollars? Wowwww . . . you must be really rich.”

My face was burning. The room was silent. “C’mon,” he said, holding the chip above my head. “BARK.”

“No,” I said quietly “NO?” he asked. “Tobey,’’ I said. “I’m not going to bark like a seal. Keep your chip.”

It was soon after that, Bloom wrote, that Maguire, apparently incensed, “stole” her LA game out from under her.

He moved the game to the home of one of her most reliable wealthy whales, taking all the A-listers with him and disinviting her.

“F–k you,” she writes that he gloated as he broke the news over the phone.

So Bloom concentrated on her East Coast game.

But Manhattan — with its mobsters, cutthroat Wall Streeters and wealthy Russian oligarchs — would prove too much for her in the end.

“I succumbed to the greed, the money, the power, breaking the law and getting addicted to drugs,” Bloom told The Denver Post after her movie’s Dec. 13 premiere in New York at Manhattan’s Loews Lincoln Square.

Bloom had stopped paying taxes on her so-called “catering” income. She also started pocketing an illegal “rake,” or a percentage of her games’ big money pots.

Previously, she had only pocketed tips — a good tip meant an invitation back — at games where no actual cash was on the table and everyone settled up afterward like gentlemen.

“When the games started lasting more than 24 hours, my life was not sustainable,” she told the Denver paper. “I turned to drugs and alcohol to manage it . . . I went down that road, and I got very caught up in drugs and greed and money, bright lights and big city.”

The FBI would crash her game in 2011, and two years later, she was part of a 34-defendant indictment that charged her with helping to run an illegal $100 million gambling ring. Three years ago, at age 36 — right before her book came out — Bloom was sentenced to a year of probation.

A key consultant on her eponymous movie, Bloom is now living in Denver, where she said she is “finding the joy in having my feet on the ground again.”