sicpa-dlab / peer-did-python

Peer DID method implementation in Python
Apache License 2.0
11 stars 10 forks source link

shorten python case names, handle if payload has an 'id' field. #51

Open Jsyro opened 1 year ago

Jsyro commented 1 year ago

service_endpoint is not abbreviated properly as it looking for serviceEndpoint instead, so serivce_endpoint gets added to extra and when it is decoded, this constructor gets passes multiple parameters with the name 1service_endpoint`.

https://github.com/sicpa-dlab/peer-did-python/blob/6bcfc4c8a282bc77ac2cea42fba558a0aa40da60/peerdid/core/peer_did_helper.py#L135

This change would abbreviate python and javascript naming conventions, which would be expanded to the pythonicly named class attributes on service_decode.

A simliar conflict exists if the service entry has an 'id' field, so if one exists, use it, otherwise generate one.