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

getCreator and ProposedCreator documentation looks to be incorrect #308

Open
davidkel opened this issue Dec 14, 2021 · 0 comments
Open

getCreator and ProposedCreator documentation looks to be incorrect #308

davidkel opened this issue Dec 14, 2021 · 0 comments

Comments

@davidkel
Copy link

Looking at the docs for getCreator you see

getCreator()
Returns the identity object of the chaincode invocation's submitter
Returns:
Type
ProposalCreator

But the type of ProposalCreator doesn't match the typescript definition which shows

getCreator(): SerializedIdentity;

Looking at the docs about ProposalCreator gives

new ProposalCreator()
This object contains the essential identity information of the chaincode invocation's submitter, including its organizational affiliation (mspid) and certificate (id_bytes)
Properties:
Name	Type	Description
mspid	string	The unique ID of the Membership Service Provider instance that is associated to the identity's organization and is able to perform digital signing and signature verification

not sure you would ever want to create one of these in your code but also the description on what this object is is not correct as it doesn't list the certificate bytes in the properties but does refer to it incorrectly in the description as id_bytes. Looking at the typescript definition for SerializedIdentity it shows

 interface SerializedIdentity {
        mspid: string;
        idBytes: Uint8Array;
    }

which describes it correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants