parse

Parse raw and return the Ticket subclass whose service name matches the JWT's data.service claim. Throws InvalidTicketError for unknown services or malformed payloads.

Reach for this only when the calling code does not know the service ahead of time (generic dispatch, diagnostics). When the service is known, prefer the typed constructor: Accounts, Balances, CollectPayment, Transactions, or Transfer. Each typed constructor performs the same parsing and additionally enforces the expected service at the type level.