felectronic_dnie_platform_interface 2.0.0
felectronic_dnie_platform_interface: ^2.0.0 copied to clipboard
A common platform interface for the felectronic_dnie plugin. Defines the shared API for Android and iOS DNIe NFC implementations.
Changelog #
2.0.0 #
Breaking changes #
- Every operation takes
timeoutas aDuration, defaulting to the newdnieDefaultTimeout(30 seconds). The unit used to live only in the docs. stopSign()must now end the stopped operation withDnieCancelledError.DnieWrongPinError.remainingRetriesisint?:nullwhen the card does not say, instead of-1.CertificateExpiryStatusis a plain enum;messageandwithDays()are replaced bydescribe(daysLeft).SignedData.fromMapandSignedData.fromJsonare removed. They predate the Pigeon bindings and had no callers.- Models and errors are
finalclasses, withconst factoryconstructors.
Added #
DnieCancelledError, for a stopped operation and for the user dismissing the iOS NFC sheet (which used to arrive asDnieUnknownError).DnieErrorX.isRetryableandisCredentialError, andDnieWrongPinErrorX.isLastAttempt.String.isValidNif, which checks a NIF or NIE control letter.PersonalData.certificateKindanddisplayName;DnieCertificateType.fromValue;CertificateInfo.isValidAtandremaining;SignedData.certificateDer.MethodChannelFelectronicDnieis exported, so platform implementations can extend it.
Fixed #
PersonalData.isAuthCertwas never true for a real card, which writes "AUTENTICACIÓN" with an accent.CertificateInfo.isValidForSigningfollows one rule,isValidAt(now).
1.0.0 #
- Pigeon-based type-safe platform interface for DNIe NFC operations.
- Sign data with SIGN or AUTH certificate selection.
- Read raw certificate, certificate details, and personal data.
- Card probe (no PIN required) with ATR and tag ID.
- PIN verification without signing.
- NFC hardware availability check.
- Typed error hierarchy with 14 error subclasses.
- Input validators for CAN and PIN with enum-based error codes.
- Model extensions for certificate expiry, NFC status, and signed data.
- X.509 certificate parsing via felectronic_x509 integration.