I'm not a lawyer, I'm certainly not your lawyer and I don't know the laws in your city. That said, my advice is that you shouldn't try to hop on the curb/sidewalk at high speed. In my city there is an ordinance against riding recklessly on sidewalks. Whether or not "doing tricks" while commuting is actually reckless, I believe that a police officer could plausibly cite you if your city has a similar ordinance. If that happened, you would, at the minimum, waste a day of your time in court (and possibly pay a fine if you can't convince the judge that you were riding responsibly). So, from a purely legal perspective, it seems like a bad risk.
Curb hopping also seems like a bad idea from a safety standpoint. There's always a chance you could miss and crash, hurting yourself and others. Also, pedestrians aren't always visible from the road, so you risk running over someone when you ride fast onto the sidewalk. Additionally, most automobile drivers don't watch the sidewalk and are not expecting a bicycle to transition to the road at 15 to 20 mph, so you risk colliding with an auto. One of the most common types of collisions is where a motorist makes a right-turn into a cyclist who is riding through a crosswalk or across a driveway.
Most state's vehicle codes allow bicycles to use the roadway in a similar manner as if you were driving a (slow) farm implement. Doing so is probably the safest way to ride for you and those around you. Remember to stop at red lights and obey the speed limit (probably not a problem unless you have a nice long, steep hill with good pavement). If your jurisdiction allows cycles to "take the lane," don't be afraid to use it when appropriate[1]: it's safer for everyone when drivers don't try to squeeze through a substandard lane without changing lanes.
[1] Where I live, for example, cyclists can take the lane when it is less than a certain width and where there is no designated bike lane. There are certain stipulations, however, like pulling over to let cars pass when there is only one lane and more than a certain number are following.