bcnmy / bcnmy/useAA

✨ Feature Request: Create useAA v2.x for Nexus SDK

Open
#31 0 comments 0 reactions 1 assignee Claimed by @joepegler View on GitHub
Dominant language
TypeScript
Stars
5
Forks
4
PR merge metrics
No merged PRs in 30d

Description

# ✨ Feature Request: `useAA` v2 React Hooks Library for Nexus SDK

## What

Extend and enhance the existing `useAA` React Hooks library to support the Nexus SDK functionalities, effectively making it the next iteration of `useAA`. This includes integrating the module-based architecture of the Nexus SDK and providing hooks for new features while maintaining backward compatibility where possible.

## Why

- **Leverage Existing Work**: Building upon the established `useAA` library reduces duplication of effort and capitalizes on its existing features and user base.
- **Seamless Transition**: Provides a smooth upgrade path for developers already using `useAA`, encouraging adoption of the Nexus SDK.
- **Consistent Developer Experience**: Maintains familiar APIs and patterns to lower the learning curve.
- **Enhance Functionality**: Incorporates the advanced features of the Nexus SDK, such as smart sessions, passkey authentication, and module interactions.
- **Community Engagement**: Encourages contributions by building upon a known and trusted library within the community.

## How

1. **Evaluate the Current `useAA` Library**

- Review the existing `useAA` codebase to understand its architecture and functionalities.
- Identify areas that need modification or extension to support the Nexus SDK.

2. **Plan Integration with Nexus SDK**

- Map `useAA` functionalities to the Nexus SDK equivalents.
- Design how to integrate the module-based architecture and new features of the Nexus SDK into the hooks.

3. **Update Existing Hooks**

- Refactor existing hooks (e.g., `useSmartAccount`, `useSendTransaction`) to interact with the Nexus SDK instead of or in addition to the previous SDK.
- Ensure compatibility with the Nexus SDK's API and data structures.

4. **Implement New Hooks for Nexus SDK Features**

- Develop hooks for new functionalities introduced in the Nexus SDK:
- `useSession`: Manage smart sessions with support for USE and ENABLE modes.
- `usePasskey`: Handle passkey authentication flows.
- `useModule`: Interact with various Nexus SDK modules.
- `usePermission`: Manage permissions within the app.

5. **Maintain Backward Compatibility**

- Aim to keep existing hook APIs unchanged where possible to prevent breaking changes.
- Provide deprecation warnings and migration guides for any necessary changes.

6. **Enhance Documentation**

- Update the `useAA` README and documentation to reflect the new features and changes.
- Include migration guides for existing users to transition smoothly.
- Provide comprehensive examples showcasing both old and new functionalities.

7. **Update Examples and Tutorials**

- Revise existing examples to use the updated hooks and Nexus SDK.
- Create new examples demonstrating how to use Nexus SDK-specific features.

8. **Testing**

- Write unit and integration tests for new and updated hooks.
- Ensure thorough coverage of interactions with the Nexus SDK.
- Use testing tools like Jest and React Testing Library.

9. **Package and Release**

- Decide whether to release this as a new major version of `useAA` (e.g., `useAA` v2.0.0) or as a new package name (e.g., `useNexus`).
- Update package metadata, versioning, and change logs accordingly.
- Publish the updated package to npm.

10. **Community Communication**

- Communicate the updates to the community through blog posts, social media, and developer forums.
- Encourage feedback and contributions.
- Provide support channels for users upgrading to the new version.

## References

- [Nexus SDK Documentation](https://docs.biconomy.io/)
- [Biconomy React Documentation](https://docs.biconomy.io/smartAccountsV2/react)
- [useAA GitHub Repository](https://github.com/bcnmy/useAA)
- [useAA README](https://github.com/bcnmy/useAA/blob/develop/README.md)
- [React Hooks Official Documentation](https://reactjs.org/docs/hooks-intro.html)
- [TypeScript with React](https://www.typescriptlang.org/docs/handbook/react.html)

---

- [x] I agree to follow this project's Code of Conduct.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.