Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed integration tests with attested object #290

Merged
merged 1 commit into from
Aug 25, 2022

Conversation

jot2re
Copy link
Collaborator

@jot2re jot2re commented Aug 3, 2022

This closes issue #282

@jot2re jot2re requested a review from oleggrib August 3, 2022 08:56
@github-actions
Copy link

github-actions bot commented Aug 3, 2022

Unit Test Results

  34 files  ±0    34 suites  ±0   18s ⏱️ +2s
371 tests ±0  371 ✔️ ±0  0 💤 ±0  0 ±0 
375 runs  ±0  375 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit eb2c4ba. ± Comparison against base commit ac1827f.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Aug 3, 2022

Coverage report for src/main/javascript/crypto/

St.
Category Percentage Covered / Total
🟡 Statements
72.25% (+1.59% 🔼)
1906/2638
🔴 Branches 45.28% 254/561
🟡 Functions
78.48% (+2.69% 🔼)
350/446
🟡 Lines
72.46% (+1.63% 🔼)
1868/2578
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢 libs/utils.ts 87.16%
65.28% (-1.39% 🔻)
94.12% 88.44%
🟡
... / IdentifierAttestation.ts
76.09% (-3.26% 🔻)
43.75% (-12.5% 🔻)
86.67%
77.78% (-3.33% 🔻)
🟡 libs/Timestamp.ts
73.81% (-4.76% 🔻)
44.44% (-11.11% 🔻)
70%
73.17% (-4.88% 🔻)

Test suite run success

38 tests passing in 2 suites.

Report generated by 🧪jest coverage report action from eb2c4ba

Copy link
Collaborator

@oleggrib oleggrib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@jot2re jot2re merged commit a8ce290 into main Aug 25, 2022
jot2re added a commit that referenced this pull request Nov 14, 2022
* feat: added sourcify-verify

* chore: remove stub empty line

* fix: 🐛 issue#276 fix. Added eip712 domain validations

✅ Closes: #276

* docs: ✏️ removed commented code, added comment to explain undef

* fix: 🐛 add getters/setters for EIP712 params

* ci: 🎡 trigger tn CI after prerelease

* test: adding dumping of generated material for tests in attestation.jar (#283)

* test: implemented an object dumber and updated java tests to write object dumps, along with handling linter feedback on the touched files

* ci: 🎡 trigger tn CI after prerelease

Co-authored-by: Tore Kasper Frederiksen <[email protected]>
Co-authored-by: Feng Yu <[email protected]>

* bug: added domain validation to AttestationUsage and AttestationRequestWUsage (#285)

* ci: 🎡 trigger tn CI after prerelease

* test: adding dumping of generated material for tests in attestation.jar (#283)

* test: implemented an object dumber and updated java tests to write object dumps, along with handling linter feedback on the touched files

* ci: 🎡 trigger tn CI after prerelease

Co-authored-by: Tore Kasper Frederiksen <[email protected]>
Co-authored-by: Feng Yu <[email protected]>

* bug: added domain validation to AttestationUsage and AttestationRequestWUsage

* fix: 🐛 issue#276 fix. Added eip712 domain validations

✅ Closes: #276

* docs: ✏️ removed commented code, added comment to explain undef

* fix: 🐛 add getters/setters for EIP712 params

Co-authored-by: Feng Yu <[email protected]>
Co-authored-by: Tore Kasper Frederiksen <[email protected]>
Co-authored-by: Oleh Hryb <[email protected]>

* fix: added domain validation to AttestationRequestWithUsage and AttestationUsage

* fix: 🐛 asn_decoding fix(patch), attestation timestamp check (#273)

Added patch to fix ASN1_schema bug for Integers, added Attestation
validate timestamp

* fix: fixed integration tests with attested object (#290)

Co-authored-by: Tore Kasper Frederiksen <[email protected]>

* fix: updated peculiar asn1 to latest version which contains the fix that is otherwise included in the patch (#294)

Co-authored-by: Tore Kasper Frederiksen <[email protected]>

* feat: signature-based UN and possibility of adding context to UN (#284)

* feat: wrote a UN based on signature and refactored things to allow an optional context for both MAC-based UNs and signature-based UNs

* test: adding dumping of generated material for tests in attestation.jar (#283)

* test: implemented an object dumber and updated java tests to write object dumps, along with handling linter feedback on the touched files

* ci: 🎡 trigger tn CI after prerelease

Co-authored-by: Tore Kasper Frederiksen <[email protected]>
Co-authored-by: Feng Yu <[email protected]>

* feat: wrote a UN based on signature and refactored things to allow an optional context for both MAC-based UNs and signature-based UNs

* docs: added comments

* fix: made some fixes and tried to get a consistent version working between TS and Java

* fix: updated java code to be able to integration test JS generated UNs

* fix: updated JS code to be able to integration test with java generated UNs and added tests

* Removed unnneeded test

* test: updated tests and ensured consistent and deterministic code when needed

* test: updated and expanded integration tests to ensure consistency with Java implementation

* fix: fixed issues related to deterministic keys

* test: fixed missing references in js test

* fix: fixed directory typo

Co-authored-by: Feng Yu <[email protected]>

* feat: ✨ safeconnect (#279)

* docs(core): adding asn1 draft for nftownership attestation and ethereum linking attestation

* docs(core): adding asn1 draft for nftownership attestation and ethereum linking attestation in asd format as well

* docs(core): fixed typos in old asd format

* docs(core): updates description to reuse old type for erc721 token

* docs(core): updated asn format description after discussion with Miccy

* docs(core): fixed bug in old asn1 notation

* docs(core): updated asd format too

* refactor:core refactored representation of erc721 tokens to fit with what we also need

* feat(core): added first draft of signed NFT Ownership Attestation

* test(core): added sunshine tests to signed NFT Ownership Attestation

* Draft JS schemas.

* Bump version - JS patch release 0.3.8

* fix(core): updated format to match the new format from Miccy

* Update JS schemas for safe connect.

* feat(core) added draft of ethereum key link attestation along with refactoring

* fix(core) added missing file

* feat(core) added draft of ethereum address attestation

* refactor(core) removed redundant decoder code

* test(core) added test to ownership attestations

* test(core) added test to key linking attestation

* Fixes for node.js support

- Fix window debug ENV check.
- Fix uint8array to base64 encoding.

* refactor: refactoring and improved testing

* test: added more testing along with file writing and reading of test data

* fix: changed to assume the issuer uses Ethereum keys and refactored OID identification

* fix: updated failing tests

* Migrate safe connect attestation and verification code WIP.

* Migrate safe connect attestation and verification code WIP.

* Migrate safe connect attestation and verification code WIP.

* Fix parsing

* Add validity checking & optional parameter validFrom.

* feat: move smart contract

* chore: Refactor test attestations to be generated using javascript lib.

* chore: Add javascript lib tests

* feature: NFT Attestation solidity library

* chore: Add test mint contract & fix attestation validity issues with tests.

* fix: added missing tag to java version

* fix: added fixes to get the MVP integration working

* test: added integration test for JS safeconnect version

* feature: JS context & various other enhancements

- Add optional context field to Javascript attestation creation.
- Move signing function to AbstractLinkedAttestation.
- Add multi-token support to JS NFT attestation creation.
- Implement test to validate Java attestation in Javascript.
- Add method to get linked attestation data from EthereumKeyLinkingAttestation.

* chore: Bump JS pre-release version to 0.3.9-sc.3

* test: added more safeconnect integration tests

* test: added integration test of JS with Java

* test: added console printing of right value

* fix: missing NFT_ADDRESS variable in test

* test: enable JS -> Java test

* feat: made chainID mandatory on ERC721 tokens

* fix: make github CI/CD pass

* fix: added schema for address linking

* refactor: improved variable naming

* feat: added support for array of tokens in java version

* feature: multi-token ID support for JS and solidity library.

* refactor: changed format of Erc721 token to have IDs at the end and always store things as an array

* test: updated java test

* chore: bump version

* fix: silly bug :-(

* fix: context field type

* test: added test for context

* test: added test for context

* fix: issuer keys being overwritten when provided in base64/PEM format
feat: return attested object in validateUseTicket function.

* fix: remove temporary patch for asn1-schema integer parsing issue

ref: ae8c45b updated peculiar asn1
to latest version which contains the fix that is otherwise included
in the patch (#294).

Co-authored-by: Michael Wallace <[email protected]>
Co-authored-by: snowwhitedev <[email protected]>

* update contracts to use standard ERC721 and in-line library to reduce gas cost. Also update tests in line with these changes (#292)

* Various fixes & enhancements for Devcon use cases (#297)

* feature: validateUseTicket - allow validation to skip ethAddress check.

Allow skipping of ethereum address by explicitly passing null
as userEthKey value.

* Bump version for devcon release

* Bump version for devcon release

* feature: add getDevconId function to Ticket class

* build: updated dependencies

* build: updated dependencies

* build: updated version

* build: updated version

* Devcon (#299)

* feature: validateUseTicket - allow validation to skip ethAddress check.

Allow skipping of ethereum address by explicitly passing null
as userEthKey value.

* Bump version for devcon release

* Bump version for devcon release

* feature: add getDevconId function to Ticket class

* feature: allow multiple keys for validation of a single conference ID

* fix/disabled blockchain enabled tests (#303)

* build: upgraded dependencies

Co-authored-by: snowwhitedev <[email protected]>
Co-authored-by: oleggrib <[email protected]>
Co-authored-by: Feng Yu <[email protected]>
Co-authored-by: Michael Wallace <[email protected]>
Co-authored-by: James Brown <[email protected]>
@jot2re jot2re deleted the test/282-attestation-jar-integration branch November 14, 2022 15:08
jot2re added a commit that referenced this pull request Nov 17, 2022
* feat: added sourcify-verify

* chore: remove stub empty line

* fix: 🐛 issue#276 fix. Added eip712 domain validations

✅ Closes: #276

* docs: ✏️ removed commented code, added comment to explain undef

* fix: 🐛 add getters/setters for EIP712 params

* ci: 🎡 trigger tn CI after prerelease

* test: adding dumping of generated material for tests in attestation.jar (#283)

* test: implemented an object dumber and updated java tests to write object dumps, along with handling linter feedback on the touched files

* ci: 🎡 trigger tn CI after prerelease

Co-authored-by: Tore Kasper Frederiksen <[email protected]>
Co-authored-by: Feng Yu <[email protected]>

* bug: added domain validation to AttestationUsage and AttestationRequestWUsage (#285)

* ci: 🎡 trigger tn CI after prerelease

* test: adding dumping of generated material for tests in attestation.jar (#283)

* test: implemented an object dumber and updated java tests to write object dumps, along with handling linter feedback on the touched files

* ci: 🎡 trigger tn CI after prerelease

Co-authored-by: Tore Kasper Frederiksen <[email protected]>
Co-authored-by: Feng Yu <[email protected]>

* bug: added domain validation to AttestationUsage and AttestationRequestWUsage

* fix: 🐛 issue#276 fix. Added eip712 domain validations

✅ Closes: #276

* docs: ✏️ removed commented code, added comment to explain undef

* fix: 🐛 add getters/setters for EIP712 params

Co-authored-by: Feng Yu <[email protected]>
Co-authored-by: Tore Kasper Frederiksen <[email protected]>
Co-authored-by: Oleh Hryb <[email protected]>

* fix: added domain validation to AttestationRequestWithUsage and AttestationUsage

* fix: 🐛 asn_decoding fix(patch), attestation timestamp check (#273)

Added patch to fix ASN1_schema bug for Integers, added Attestation
validate timestamp

* fix: fixed integration tests with attested object (#290)

Co-authored-by: Tore Kasper Frederiksen <[email protected]>

* fix: updated peculiar asn1 to latest version which contains the fix that is otherwise included in the patch (#294)

Co-authored-by: Tore Kasper Frederiksen <[email protected]>

* feat: signature-based UN and possibility of adding context to UN (#284)

* feat: wrote a UN based on signature and refactored things to allow an optional context for both MAC-based UNs and signature-based UNs

* test: adding dumping of generated material for tests in attestation.jar (#283)

* test: implemented an object dumber and updated java tests to write object dumps, along with handling linter feedback on the touched files

* ci: 🎡 trigger tn CI after prerelease

Co-authored-by: Tore Kasper Frederiksen <[email protected]>
Co-authored-by: Feng Yu <[email protected]>

* feat: wrote a UN based on signature and refactored things to allow an optional context for both MAC-based UNs and signature-based UNs

* docs: added comments

* fix: made some fixes and tried to get a consistent version working between TS and Java

* fix: updated java code to be able to integration test JS generated UNs

* fix: updated JS code to be able to integration test with java generated UNs and added tests

* Removed unnneeded test

* test: updated tests and ensured consistent and deterministic code when needed

* test: updated and expanded integration tests to ensure consistency with Java implementation

* fix: fixed issues related to deterministic keys

* test: fixed missing references in js test

* fix: fixed directory typo

Co-authored-by: Feng Yu <[email protected]>

* feat: ✨ safeconnect (#279)

* docs(core): adding asn1 draft for nftownership attestation and ethereum linking attestation

* docs(core): adding asn1 draft for nftownership attestation and ethereum linking attestation in asd format as well

* docs(core): fixed typos in old asd format

* docs(core): updates description to reuse old type for erc721 token

* docs(core): updated asn format description after discussion with Miccy

* docs(core): fixed bug in old asn1 notation

* docs(core): updated asd format too

* refactor:core refactored representation of erc721 tokens to fit with what we also need

* feat(core): added first draft of signed NFT Ownership Attestation

* test(core): added sunshine tests to signed NFT Ownership Attestation

* Draft JS schemas.

* Bump version - JS patch release 0.3.8

* fix(core): updated format to match the new format from Miccy

* Update JS schemas for safe connect.

* feat(core) added draft of ethereum key link attestation along with refactoring

* fix(core) added missing file

* feat(core) added draft of ethereum address attestation

* refactor(core) removed redundant decoder code

* test(core) added test to ownership attestations

* test(core) added test to key linking attestation

* Fixes for node.js support

- Fix window debug ENV check.
- Fix uint8array to base64 encoding.

* refactor: refactoring and improved testing

* test: added more testing along with file writing and reading of test data

* fix: changed to assume the issuer uses Ethereum keys and refactored OID identification

* fix: updated failing tests

* Migrate safe connect attestation and verification code WIP.

* Migrate safe connect attestation and verification code WIP.

* Migrate safe connect attestation and verification code WIP.

* Fix parsing

* Add validity checking & optional parameter validFrom.

* feat: move smart contract

* chore: Refactor test attestations to be generated using javascript lib.

* chore: Add javascript lib tests

* feature: NFT Attestation solidity library

* chore: Add test mint contract & fix attestation validity issues with tests.

* fix: added missing tag to java version

* fix: added fixes to get the MVP integration working

* test: added integration test for JS safeconnect version

* feature: JS context & various other enhancements

- Add optional context field to Javascript attestation creation.
- Move signing function to AbstractLinkedAttestation.
- Add multi-token support to JS NFT attestation creation.
- Implement test to validate Java attestation in Javascript.
- Add method to get linked attestation data from EthereumKeyLinkingAttestation.

* chore: Bump JS pre-release version to 0.3.9-sc.3

* test: added more safeconnect integration tests

* test: added integration test of JS with Java

* test: added console printing of right value

* fix: missing NFT_ADDRESS variable in test

* test: enable JS -> Java test

* feat: made chainID mandatory on ERC721 tokens

* fix: make github CI/CD pass

* fix: added schema for address linking

* refactor: improved variable naming

* feat: added support for array of tokens in java version

* feature: multi-token ID support for JS and solidity library.

* refactor: changed format of Erc721 token to have IDs at the end and always store things as an array

* test: updated java test

* chore: bump version

* fix: silly bug :-(

* fix: context field type

* test: added test for context

* test: added test for context

* fix: issuer keys being overwritten when provided in base64/PEM format
feat: return attested object in validateUseTicket function.

* fix: remove temporary patch for asn1-schema integer parsing issue

ref: ae8c45b updated peculiar asn1
to latest version which contains the fix that is otherwise included
in the patch (#294).

Co-authored-by: Michael Wallace <[email protected]>
Co-authored-by: snowwhitedev <[email protected]>

* update contracts to use standard ERC721 and in-line library to reduce gas cost. Also update tests in line with these changes (#292)

* Various fixes & enhancements for Devcon use cases (#297)

* feature: validateUseTicket - allow validation to skip ethAddress check.

Allow skipping of ethereum address by explicitly passing null
as userEthKey value.

* Bump version for devcon release

* Bump version for devcon release

* feature: add getDevconId function to Ticket class

* build: updated dependencies

* build: updated dependencies

* build: updated version

* build: updated version

* Devcon (#299)

* feature: validateUseTicket - allow validation to skip ethAddress check.

Allow skipping of ethereum address by explicitly passing null
as userEthKey value.

* Bump version for devcon release

* Bump version for devcon release

* feature: add getDevconId function to Ticket class

* feature: allow multiple keys for validation of a single conference ID

* fix/disabled blockchain enabled tests (#303)

* build: upgraded dependencies

* fix: 🐛 hotfix - updated @types/node

* Fix/breaking change erc721 (#304)

* fix: changes to use a legacy format for ERC721 for legacy alchemy NFT tokens

* fix: added missing file

* fix: fix javascript to also use legacy format in the legacy setting

* build: updated versions

* fix: reversal experiment to appease github actions

* fix: second attempt

* build: updated non-breaking dependencies

* fix: changed access of ERC721

* fix: 🐛 hotfix - updated @types/node

Co-authored-by: Oleh Hryb <[email protected]>

Co-authored-by: snowwhitedev <[email protected]>
Co-authored-by: oleggrib <[email protected]>
Co-authored-by: Feng Yu <[email protected]>
Co-authored-by: Michael Wallace <[email protected]>
Co-authored-by: James Brown <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants