diff --git a/wrappers/javascript/packages/anoncreds-nodejs/src/NodeJSAnoncreds.ts b/wrappers/javascript/packages/anoncreds-nodejs/src/NodeJSAnoncreds.ts index 56e4a1e0..fe7c76a9 100644 --- a/wrappers/javascript/packages/anoncreds-nodejs/src/NodeJSAnoncreds.ts +++ b/wrappers/javascript/packages/anoncreds-nodejs/src/NodeJSAnoncreds.ts @@ -163,8 +163,8 @@ export class NodeJSAnoncreds implements Anoncreds { credentialDefinitionPrivate, credentialOffer, credentialRequest, - attributeNames as unknown as Buffer, - attributeRawValues as unknown as Buffer, + attributeNames, + attributeRawValues, attributeEncodedValues as unknown as Buffer, revocationConfiguration?.ref().address() ?? 0, credentialPtr @@ -296,15 +296,15 @@ export class NodeJSAnoncreds implements Anoncreds { this.nativeAnoncreds.anoncreds_create_presentation( presentationRequest, - credentialEntryList as unknown as Buffer, - credentialProveList as unknown as Buffer, + credentialEntryList, + credentialProveList, selfAttestNames as unknown as Buffer, selfAttestValues as unknown as Buffer, linkSecret, - schemas as unknown as Buffer, - schemaIds as unknown as Buffer, - credentialDefinitions as unknown as Buffer, - credentialDefinitionIds as unknown as Buffer, + schemas, + schemaIds, + credentialDefinitions, + credentialDefinitionIds, ret ) this.handleError() @@ -350,7 +350,7 @@ export class NodeJSAnoncreds implements Anoncreds { revocationRegistryDefinitions, revocationRegistryDefinitionIds, revocationStatusLists, - nonRevokedIntervalOverrideList as unknown as Buffer, + nonRevokedIntervalOverrideList, ret ) this.handleError() @@ -540,8 +540,8 @@ export class NodeJSAnoncreds implements Anoncreds { credentialDefinitionPrivate, credentialOffer, credentialRequest, - attributeNames as unknown as Buffer, - attributeRawValues as unknown as Buffer, + attributeNames, + attributeRawValues, revocationConfiguration?.ref().address() ?? 0, w3cVersion, credentialPtr @@ -595,13 +595,13 @@ export class NodeJSAnoncreds implements Anoncreds { this.nativeAnoncreds.anoncreds_create_w3c_presentation( presentationRequest, - credentialEntryList as unknown as Buffer, - credentialProveList as unknown as Buffer, + credentialEntryList, + credentialProveList, linkSecret, - schemas as unknown as Buffer, - schemaIds as unknown as Buffer, - credentialDefinitions as unknown as Buffer, - credentialDefinitionIds as unknown as Buffer, + schemas, + schemaIds, + credentialDefinitions, + credentialDefinitionIds, w3cVersion, ret ) @@ -648,7 +648,7 @@ export class NodeJSAnoncreds implements Anoncreds { revocationRegistryDefinitions, revocationRegistryDefinitionIds, revocationStatusLists, - nonRevokedIntervalOverrideList as unknown as Buffer, + nonRevokedIntervalOverrideList, ret ) this.handleError() @@ -850,7 +850,7 @@ export class NodeJSAnoncreds implements Anoncreds { rev_state: number }> > - }) + }) as unknown as Buffer } private convertCredentialProves(credentialsProve: NativeCredentialProve[]) { @@ -869,7 +869,7 @@ export class NodeJSAnoncreds implements Anoncreds { reveal: number }> > - }) + }) as unknown as Buffer } private convertSchemas(schemas: Record) { @@ -877,13 +877,13 @@ export class NodeJSAnoncreds implements Anoncreds { const schemaIds = StringListStruct({ count: schemaKeys.length, data: schemaKeys as unknown as TypedArray - }) + }) as unknown as Buffer const schemaValues = Object.values(schemas) const schemasList = ObjectHandleListStruct({ count: schemaValues.length, data: ObjectHandleArray(schemaValues.map((o) => o.handle)) - }) + }) as unknown as Buffer return { schemaIds, schemas: schemasList @@ -895,13 +895,13 @@ export class NodeJSAnoncreds implements Anoncreds { const credentialDefinitionIds = StringListStruct({ count: credentialDefinitionKeys.length, data: credentialDefinitionKeys as unknown as TypedArray - }) + }) as unknown as Buffer const credentialDefinitionValues = Object.values(credentialDefinitions) const credentialDefinitionsList = ObjectHandleListStruct({ count: credentialDefinitionValues.length, data: ObjectHandleArray(credentialDefinitionValues.map((o) => o.handle)) - }) + }) as unknown as Buffer return { credentialDefinitionIds, credentialDefinitions: credentialDefinitionsList @@ -928,21 +928,21 @@ export class NodeJSAnoncreds implements Anoncreds { override_rev_status_list_ts: number }> > - }) + }) as unknown as Buffer } private convertAttributeNames(attributeRawValues: Record) { return StringListStruct({ count: Object.keys(attributeRawValues).length, data: Object.keys(attributeRawValues) as unknown as TypedArray - }) + }) as unknown as Buffer } private convertAttributeRawValues(attributeRawValues: Record) { return StringListStruct({ count: Object.keys(attributeRawValues).length, data: Object.values(attributeRawValues) as unknown as TypedArray - }) + }) as unknown as Buffer } private convertAttributeEncodedValues(attributeEncodedValues?: Record) { diff --git a/wrappers/javascript/packages/anoncreds-shared/src/api/index.ts b/wrappers/javascript/packages/anoncreds-shared/src/api/index.ts index f32c0bc4..e5e3239c 100644 --- a/wrappers/javascript/packages/anoncreds-shared/src/api/index.ts +++ b/wrappers/javascript/packages/anoncreds-shared/src/api/index.ts @@ -16,5 +16,4 @@ export * from './RevocationRegistryDefinition' export * from './RevocationRegistryDefinitionPrivate' export * from './RevocationStatusList' export * from './W3cCredential' -export * from './CredentialOffer' export * from './W3cPresentation' diff --git a/wrappers/python/anoncreds/types.py b/wrappers/python/anoncreds/types.py index 3410396e..ab49bf93 100644 --- a/wrappers/python/anoncreds/types.py +++ b/wrappers/python/anoncreds/types.py @@ -445,7 +445,7 @@ def from_legacy( return cred.to_w3c(cred_def, w3c_version) def _get_proof_details(self) -> bindings.ObjectHandle: - if self._proof_details == None: + if self._proof_details is None: self._proof_details = bindings.w3c_credential_get_integrity_proof_details(self.handle) return self._proof_details