openwallet-foundation / openwallet-foundation/askar-wrapper-javascript
Cannot read property 'storeOpen' of undefined
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
When I run my app, I get an error because I haven't installed @hyperledger/aries-askar-shared@0.2.3, which is required by @credo-ts/askar@0.5.15.
After installing that dependency, I run into a TypeScript incompatibility:
Type 'Askar' is not assignable to type 'AriesAskar'.
The types returned by 'keyAeadEncrypt(...)' are incompatible between these types.
Type '.../node_modules/@openwallet-foundation/askar-shared/build/crypto/EncryptedBuffer'.EncryptedBuffer
is not assignable to type '.../node_modules/@hyperledger/aries-askar-shared/build/types'.EncryptedBuffer.
Types have separate declarations of a private property 'buffer'.ts(2322)
AskarModuleConfig.d.ts(47, 5): The expected type comes from property 'ariesAskar' which is declared here
As a last resort, I tried casting the module:
ariesAskar: askar as any
But this causes a runtime error:
Error opening wallet mobile-wallet: Cannot read property 'storeOpen' of undefined
However, the native module doesn't seem to be undefined, because I'm able to call other methods like version:
Askar native module loaded: 0.4.1
How should I integrate @openwallet-foundation/askar-react-native with credo-ts?
Environment
- Platform: Android
- React Native: 0.77.0
@credo-ts/askar:0.5.15@credo-ts/core:0.5.15@credo-ts/react-native:0.5.15@openwallet-foundation/askar-react-native:0.3.2@hyperledger/aries-askar-shared:0.2.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Android setup with @credo-ts/askar 0.5.15, @credo-ts/react-native 0.5.15, and @openwallet-foundation/askar-react-native 0.3.2. Inspect AskarModuleConfig.d.ts and the keyAeadEncrypt and storeOpen entry points, then verify that the configured module passes TypeScript checks and opens the wallet without the runtime error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native, typescript
- Domain
- mobile, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100