Skip to content

getCreator and ProposedCreator documentation looks to be incorrect #308

Open
@davidkel

Description

@davidkel

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions