vechain / vechain-sdk-js

The official JavaScript SDK for VeChain.
19 stars 6 forks source link

943 certificate sign/verify EIP-55 **thor-devkit** compatibility #985

Closed lucanicoladebiasi closed 2 weeks ago

lucanicoladebiasi commented 2 weeks ago

Description

The code at packages/core/src/certificate/certificate.ts introduces

The tests at packages/core/tests/certificate/certificate.unit.test.ts

NOTE: The sign method is introduced to avoid ambiguities in the transformation of a certificate from object to its byte representation through JSON and UTF8 encoding and decoding. If no UTF normalisation is enforced, 'high' Unicode planes (ideograms, emoticons) are not consistently represented with the same bytes because the normalisation is demanded to the runtime.

Fixes # 943

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration:

Checklist:

github-actions[bot] commented 2 weeks ago

Test Coverage

Summary

Lines Statements Branches Functions
Coverage: 100%
100% (3404/3404) 100% (794/794) 100% (705/705)
Title Tests Skipped Failures Errors Time
core 495 0 :zzz: 0 :x: 0 :fire: 1m 7s :stopwatch:
network 658 0 :zzz: 0 :x: 0 :fire: 4m 11s :stopwatch:
errors 48 0 :zzz: 0 :x: 0 :fire: 11.704s :stopwatch:
lucanicoladebiasi commented 2 weeks ago

Accurate revision with @rodolfopietro97 shows the introduction of thor-devkit dependency in test code messes lint behaviour. Lint configuration must be changed, a specific ticket will be assigned for the task. Rodolfo and I decided to proceed to promote this PR to review to include the fixes.