SmartTokenLabs / token-negotiator

The token-negotiator is an NPM package designed for use with TokenScript.
MIT License
19 stars 11 forks source link

Update ticket decode logic #155

Closed oleggrib closed 2 years ago

oleggrib commented 2 years ago

Currently Negotiator validate tickets(embedded inside MagicLink) with src/Attestation/SignedDevonTicket.ts

but tickets can have multiple schemas. for example - new ticket format is different, commitment moved inside ticket.

so would be good to use "asn1js" directly and avoid use "src/Attestation/SignedDevonTicket.ts"

we can use ticket reader from https://github.com/TokenScript/attestation/blob/js_pr212/src/main/javascript/crypto/src/Ticket.ts , its compatible with both ticket formats.

oleggrib commented 2 years ago

resolved in https://github.com/TokenScript/token-negotiator/pull/173