This repository was archived by the owner on Aug 27, 2024. It is now read-only.
Repository navigation
v2.0.0
What's Changed
- feat: canary by @ganchoradkov in #49
- feat: canary metrics by @ganchoradkov in #50
- fix: canary env params by @ganchoradkov in #51
- feat: multi address by @ganchoradkov in #53
Important changes when upgrading from 1.x to 2.0.0
- BREAKING CHANGE
authClient.respond(params, iss)requires an additional paramiss - new
formatMessage(payload, iss)added to format incomingauthrequests
Usage example
authClient.on("auth_request", async ({ id, args }) => {
// the user’s address
const iss = `did:pkh:eip155:1:${WALLET_ADDRESS}`;
// format the cacao payload with the user’s address
const message = authClient.formatMessage(args.params.cacaoPayload, iss);
// This is a good point to trigger a UI event to provide the user
// with a button to accept or reject the authentication request,
// instead of automatically responding.
const signature = await wallet.signMessage(params.message);
await authClient.respond({
id: id,
signature: {
s: signature,
t: "eip191",
},
iss,
});
});
Full Changelog: 1.0.1...v2.0.0