Read White v. Texas to determine the legality of secession.
The Supreme Court of the United States does not agree with your judicial ruling.
Ah yes, White v Texas, the prize case that every one of you has heard of but obviously never read. The party appearing before the bench claiming that the secession of Texas was illegal and that the government of Texas, at the time of the issuance of some bonds he had purchased, was consequently still part of the US and therefore subject to a compulsion to honor and reimburse, LOST the case. This is because the Supreme Court at the time was seduced by the “states suicide” theory of secession which held that there was no legal reality to the existence of sovereign states outside the scope of constitutional jurisdiction that courts within their purview were obligated to recognize. Well, no shit. Absent some treaty mechanism to create legal recognition within a foreign legal framework, no nation is obligated to recognize the legal creation of governments outside their domestic power to do so. Texas v White turned the issue of Texas’ external existence into a Schroedinger’s cat of no certain fate.