Skip to content

schema hash code and docs are confusing #128

@sirpy

Description

@sirpy

In iden3 docs it says the schema hash is created from the hash of the LD document bytes
https://docs.iden3.io/protocol/claim-schema/#schema-hash

but looking at the code linked from the docs here: https://go.dev/play/p/3id7HAhf-Wi
it only uses the schema @id to create the hash
lastly iden3 bytes to bigint reverses the byte order which is also confusing, when trying to recreate the hash using other code
This happens also when verifying the challenge on chain

  1. iden3/polygon docs should be updated to reflect the correct way to calculate the hash
  2. the go code should just ask for credential type+id instead of pasting the whole credential
  3. the reversal of the bytes should be mentioned in multiple places, that would help future dev avoid this confusion

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions