Draft
Conversation
- Cleanup HTML test, move out of main class file. - Improve verbosity of API & private members. - Add hex & base64 format support.
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🟡 | Statements | 70.95% | 1903/2682 |
| 🔴 | Branches | 46.53% (+1.08% 🔼) |
275/591 |
| 🟡 | Functions | 76.26% | 347/455 |
| 🟡 | Lines | 71.11% | 1861/2617 |
Show new covered files 🐣
St.❔ |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🟢 | ... / SchemaGenerator.ts |
90.91% | 70% | 100% | 92.31% |
Show files with reduced coverage 🔻
St.❔ |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🟢 | libs/utils.ts | 87.16% | 65.28% (-1.39% 🔻) |
94.12% | 88.44% |
Test suite run failed
Failed tests: 1/39. Failed suites: 1/2.
● read attested object › validate attestation
Could not validate object
104 | me.fromBytes(bytes);
105 | if (!me.checkValidity()) {
> 106 | throw new Error("Could not validate object");
| ^
107 | }
108 | if (me.getVersion() == IdentifierAttestation.NFT_VERSION) {
109 | let x500Arr = Asn1Der.parseX500Names(me.getSubject());
at Function.fromBytes (src/libs/IdentifierAttestation.ts:106:19)
at Function.fromBytes [as fromASNType] (src/libs/SignedIdentifierAttestation.ts:33:40)
at Function.fromASNType [as fromBytes] (src/libs/SignedIdentifierAttestation.ts:25:21)
at Function.fromBytes (src/libs/AttestedObject.ts:144:46)
at Object.<anonymous> (src/main.spec.ts:668:37)
Report generated by 🧪jest coverage report action from e4e43ec
Collaborator
|
@micwallace what is the status on this PR? It seems to becoming stale 😅 |
Collaborator
Author
|
@jot2re We don't really have a use case at this stage but it will be needed if we want to integrate attestations into tokenscript XML or JSON config for example. |
Collaborator
|
@micwallace thanks for the update Miccy! I will keep the PR open then. |
d7bd286 to
e4e43ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey @weiwu-zhang
Here is an examples of how the asn1-schema library can be utilized to serialize & parse ASN using a schema provided at runtime.
The schema input is currently in JSON, but we can easily bridge the gap from .asd by writing an XML converter that can output this structure. Choice functionality will also need to be added to provide full support for ASN1.