Closed krpeacock closed 2 months ago
Path | Size |
---|---|
@dfinity/agent | 86.33 KB (+0.43% 🔺) |
@dfinity/candid | 13.58 KB (0%) |
@dfinity/principal | 4.97 KB (0%) |
@dfinity/auth-client | 60.42 KB (+0.1% 🔺) |
@dfinity/assets | 81.14 KB (+0.19% 🔺) |
@dfinity/identity | 57.65 KB (+0.16% 🔺) |
@dfinity/identity-secp256k1 | 131.89 KB (+0.57% 🔺) |
Description
Adds a new feature to set and read a specified
replicaTime
on theHttpAgent
. This is useful in situations where the device clock may not be accurate, such as in an airgapped device, since the agent needs to agree with the replica when creating anExpiry
or validating certificates.Also improves the error handling for replica time errors, throwing a new
ReplicaTimeError
, containing a reference back to theagent
that threw it, as well as a parsedreplicaTime
Date object from the error message.This replaces the
offset
strategy previously used.examples
Important: the error response cannot be certified. Using it directly could subject users to replay attacks
Fixes SDK-1812
How Has This Been Tested?
New e2e tests
Checklist: