feat: implementing deferred seeds (#544)
Signed-off-by: Francisco Javier Ribo Labrador <[email protected]>
Signed-off-by: Francisco Javier Ribo Labrador <[email protected]>
BREAKING CHANGES: * The Apollo key property, seed was sent as a hexString but is not UInt8Array. If you are creating private keys manually, please change seed from hexString to UInt8Array. * Agent.initialize now accepts an async function that returns a seed (UInt8Array) vs previous hexString, if no seed function is provided, will start with random seed Signed-off-by: Francisco Javier Ribo Labrador <[email protected]>
Signed-off-by: Francisco Javier Ribo Labrador <[email protected]>
Signed-off-by: Ritesh Pandit <[email protected]>
Replaces 13 instances of generic `throw new Error()` with domain-specific error types (`PolluxError.InvalidCredentialError`, `CastorError.NotPossibleToResolveDID`, `CastorError.InvalidKeyError`) across the JWT/SDJWT utility layer. This enables callers to programmatically distinguish between error types (e.g., invalid DID document vs invalid key vs invalid credential), which is essential for the Identity Portal to display meaningful error messages. Files changed: - SDJWT.ts: 6 errors replaced - JWT.ts: 4 errors replaced - ResolveDID.ts: 1 error replaced - CreateJwt.ts: 1 error replaced - CreateSDJWT.ts: 1 error replaced - Added tests for error type verification Signed-off-by: Abhigyan Singh <[email protected]>
Signed-off-by: Abhigyan Singh <[email protected]>
Signed-off-by: Abhigyan Singh <[email protected]>
Signed-off-by: Abhigyan Singh <[email protected]>
Signed-off-by: Yummy-Yums <[email protected]>
Signed-off-by: Abhigyan Singh <[email protected]>
Signed-off-by: Ritesh Pandit <[email protected]>
Signed-off-by: Zaid <[email protected]>
Signed-off-by: Zaid <[email protected]>
Signed-off-by: Zaid <[email protected]>
Signed-off-by: Francisco Javier Ribo Labrador <[email protected]> BREAKING CHANGE: * apollo.createPrivateKey becomes async, in order to support deferred seed values
Signed-off-by: Ritesh Pandit <[email protected]>
Signed-off-by: Ritesh Pandit <[email protected]>
Signed-off-by: Abhigyan Singh <[email protected]>
Adds exp claim validation to JWT.verify. Previously, JWT.verify validated the signature and DIDs but allowed expired JWTs to return true. This fix ensures that if an exp claim is present, it is validated against the current timestamp, returning false if the JWT is expired, while preserving the existing behavior for JWTs missing the exp claim. Fixes #489 Signed-off-by: YATIN JAMWAL <[email protected]>
Signed-off-by: Zaid <[email protected]>