Skip to content

refactor!: align issuer/holder interfaces #889

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

Merged
merged 6 commits into from
Jul 24, 2024

Conversation

rflechtner
Copy link
Contributor

@rflechtner rflechtner commented Jul 22, 2024

fixes https://github.com/KILTprotocol/ticket/issues/3533

Makes sure that issuer and holder interfaces integrate nicely with the DidHelpers.
To avoid imports from sdk-js, I moved DidHelper interfaces to the types package.

  • Holder / Issuer functions now take a didDocument and signers with typings identical to those used in DidHelpers; plain Dids are no longer accepted.
  • Credential issuance now allows customising the tx logic via a single callback, which can be easily implemented using transact.

How to test:

I added a DidHelpers integration tests that shows how transact can be used to build custom submission logic.

Checklist:

  • I have verified that the code works
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • I have left the code in a better state
  • I have documented the changes (where applicable)
    • Either PR or Ticket to update the Docs
    • Link the PR/Ticket here

@rflechtner rflechtner changed the base branch from develop to rf-did-helpers July 22, 2024 17:27
@rflechtner rflechtner marked this pull request as ready for review July 22, 2024 17:38
Copy link
Member

@Dudleyneedham Dudleyneedham 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 so far.

Do you want to sneak the CType export in somewhere?

Copy link
Member

@Dudleyneedham Dudleyneedham left a comment

Choose a reason for hiding this comment

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

LGTM

@rflechtner rflechtner merged commit 8b8c538 into rf-did-helpers Jul 24, 2024
1 check passed
@rflechtner rflechtner deleted the rf-align-issue-interface branch July 24, 2024 08:08
rflechtner added a commit that referenced this pull request Jul 24, 2024
* feat: create DID signers from signers or keypairs
* feat: transact did helper
* feat: createDid did helper
* feat: setVerificationMethod did helper
* feat: addService did helper
* feat: claimWeb3Name did helper
* feat: releaseWeb3Name did helper
* feat: removeVM did helper
* feat: implement deactivateDid
* feat: generateKeypair helper using multikey encoding
* fix: add missing implementation on getSignersForKeypair
* refactor!: align issuer/holder interfaces (#889)
* test: fix unit tests
* test: integration tests for did helpers
* chore(deps): bump jcs versions
* chore: set alpha.2 versions

---------

Co-authored-by: Raphael Flechtner <raphael@kilt.io>
Co-authored-by: Abdulrahim Al Methiab <abdul@kilt.io>
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.

3 participants