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

Fails to get schema #9

Open
skullquake opened this issue Aug 26, 2024 · 2 comments
Open

Fails to get schema #9

skullquake opened this issue Aug 26, 2024 · 2 comments

Comments

@skullquake
Copy link

For credo-ts-didweb-anoncreds 0.0.1-alpha.14 with credo-ts 0.5.10, we get the following error message when calling agent.credential.acceptOffer

h: Schema not found for id did:web:foo.bar.id:01234567-0123-0123-0123-0123456789ab?service=anoncreds&relativeRef=/credDef/0123456789abcdef0123456789abcdef0123456789ab: Wrong resource Id

Related, agent.modules.anoncreds.getSchema returns null.

Everything works well for credo-ts 0.5.6 and below, but not versions above

@genaris
Copy link
Contributor

genaris commented Sep 25, 2024

@jorgefl0 in latest Credo contributors call you mentioned you are facing this issue as well. However, I could not reproduce it in my projects (in both nodejs and React Native). Maybe it's because I'm forcing the credo-ts version to use in package.json's resolutions key?

If you could give me more details about the error (I remember it was on a crypto library for hashing but not exactly sure which one), it would be great so we can fix this. Thanks!

@jorgefl0
Copy link

jorgefl0 commented Sep 25, 2024

@genaris Thanks for looking into this. There appears to be a change to the Hasher.ts file introduced with v0.5.7

https://github.com/openwallet-foundation/credo-ts/blob/v0.5.7/packages/core/src/crypto/hashes/Hasher.ts

import { Sha256 } from './Sha256'

https://github.com/openwallet-foundation/credo-ts/blob/v0.5.6/packages/core/src/utils/Hasher.ts

import { hash as sha256 } from '@stablelib/sha256'

We observe the base58 encoded strings differ between the two versions.

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

No branches or pull requests

3 participants