Closed yehjxraymond closed 3 years ago
wrong repo ? https://github.com/Open-Attestation/oa-did-sign/blob/master/src/signDocument/signDocument.ts
This could work:
export const signDocument = async (
document: SignedWrappedDocument<T extends v2.OpenAttestationDocument> | WrappedDocument<T extends v2.OpenAttestationDocument>,
algorithm: string,
publicKey: string,
privateKey: string
): Promise<SignedWrappedDocument<T>>
Added in https://github.com/Open-Attestation/oa-did-sign/pull/1/files
Thanks!
Current signDocument changes the type to a generic
Promise<SignedWrappedDocument<v2.OpenAttestationDocument>>
, add in generic to automatically update the type of output.