credo-ts
                                
                                
                                
                                    credo-ts copied to clipboard
                            
                            
                            
                        Support issuance of indy credential in React Native
I am trying to create a credential offer using AFJ
So far so good created the wallet with a public did seed but when attempting to publish the did on the ledger I get the error
"Undefined is not a function"
digging deep into the framework I found the function
const request = await this.indy.buildNymRequest(submitterDid, targetDid, verkey, alias, role || null)
That function is not available in "indy-sdk-react-native"
Can anybody correct me if am wrong or am I doing something wrong?
Are you trying to build an issuer wallet in AFJ? Do you want to publish the did using the mobile wallet? What's the use case?
We only support the holder (and I think verifier) roles for the indy-sdk for react-native. This will change when we add support for Indy CredX / Indy VDR in the coming months, but would be good to understand the use case first.
Yes I am trying to issue credentials using an AFJ mobile wallet. This is part of the effort to create a fully functional AIP1.0 flow (At least for now) then integrating BLE to the game so we can use in Kiosk and other hardware If it boils down to indy, it doesn't matter much if it was a mobile or web based I think its a matter of adding the missing wrapper functions to the npm package if it is not there If it will not be supported then why is the function there in the package
I agree with @MosCD3 that there should be a better handling of this error in aries-framework if it's not going to be supported in mobile environments (i.e. React Native). It does work in Node.js, so that's the reason why it is included in ledger module (the same as other ledger operations such as schema and credential definition registration).
I don't know the complexity of implementing these methods in react-native-indy-sdk but probably for the time being it would be nice to throw an "Unsupported operation" error such as the credential definition and schema case. This in indy-sdk-react-native, of course.
Should work with new shared components, we're not going to solve this for indy sdk