stellar / basic-payment-app

An example payments application demonstrating integrations of various features and SEPs in a user-facing product.
https://github.com/stellar/basic-payment-app
Apache License 2.0
9 stars 27 forks source link

Migrate away from the current wallet SDK #18

Closed ElliotFriend closed 1 month ago

ElliotFriend commented 1 month ago

The package we're currently using for managing the user's keypair is the @stellar/wallet-sdk package, which has now been deprecated.

The recommended replacement is the @stellar/typescript-wallet-sdk-km package. My understanding is that it's meant to be quite similar if not identical to the previous one, though adapting to it might take some work.

Jemiiah commented 1 month ago

I would love to work on this issue @ElliotFriend when OD Hacks start

onlydustapp[bot] commented 1 month ago

Hi @Jemiiah! Maintainers during the ODHack # 8.0 will be tracking applications via OnlyDust. Therefore, in order for you to have a chance at being assigned to this issue, please apply directly here, or else your application may not be considered.

PoulavBhowmick03 commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm Poulav Bhowmick, a software engineer at Invisible Studios with a robust background in TypeScript, Rust, Solidity Cairo, fullstack development and blockchain technology. My experience includes building robust applications, optimizing functionalities and blockchain integration. I have actively participated in events and open source contributions, enhancing my capability to tackle real-world tech challenges. My projects can be viewed on my GitHub Profile and OnlyDust Profile. Plus I´m active member of Starknet, Ethereum ecosystem.

How I plan on tackling this issue

  1. Remove the Deprecated Package:

    • First, I will uninstall the deprecated @stellar/wallet-sdk from the project using the following command:
      npm uninstall @stellar/wallet-sdk
  2. Install the New Package:

    • I will install the recommended @stellar/typescript-wallet-sdk-km package:
      npm install @stellar/typescript-wallet-sdk-km
  3. Review Documentation for Changes:

    • I will review the documentation for @stellar/typescript-wallet-sdk-km to understand any key differences in usage or implementation compared to the old package. While the API is expected to be similar, I will verify the key areas like keypair generation, transaction signing, and account management.
  4. Update Imports:

    • I will go through the codebase and update all import statements that refer to @stellar/wallet-sdk and replace them with the new package:

      // Old import
      import { Wallet } from '@stellar/wallet-sdk';
      
      // New import
      import { Wallet } from '@stellar/typescript-wallet-sdk-km';
  5. Refactor Code to Match New SDK:

    • Next, I will refactor the necessary parts of the codebase to ensure compatibility with the new package. Since the new SDK is expected to be quite similar, changes will mostly involve updating the library references and minor adjustments to function calls if required.
  6. Testing and Validation:

    • After the refactor, I will thoroughly test the functionality where the wallet SDK is involved:
      • Keypair generation
      • Signing and submitting transactions
      • Wallet management features
      • Any other integration that utilizes the wallet SDK

ETA - 4 days

0xdevcollins commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

My name is Collins Ikechukwu. I'm a full stack blockchain developer developer.

How I plan on tackling this issue

  1. Review Documentation: Start by reading the documentation for @stellar/typescript-wallet-sdk-km to understand its structure and API.

  2. Identify Differences: Compare the API and functionality of both packages to identify any differences or deprecated features.

  3. Update Imports: Replace all instances of @stellar/wallet-sdk with @stellar/typescript-wallet-sdk-km in your code.

  4. Adapt Code: Modify your existing code to accommodate any changes in methods, classes, or parameters introduced by the new package.

  5. Test Functionality: Thoroughly test your application to ensure all keypair management functionalities work as expected after the migration.

  6. Check for Deprecations: Look for any features in the old SDK that may have been deprecated or replaced, and find alternatives in the new SDK.

  7. Performance Testing: If applicable, test for performance differences and optimize your implementation accordingly.

  8. Documentation Update: Update any internal documentation to reflect changes made during the migration process.

  9. Monitor for Issues: After deployment, monitor the application for any issues related to the new SDK implementation.

ScottyDavies commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have a strong background in JavaScript and TypeScript development, with experience in integrating SDKs and managing user authentication flows.

How I plan on tackling this issue

I would approach this issue with the following steps:

Start by reviewing the documentation for the new package to understand any differences or improvements.

Identify Usage: Audit the current codebase to identify all instances where @stellar/wallet-sdk is used.

Implement Changes: Gradually replace the deprecated package with the new one, adapting the code to fit the new API as needed.

Testing: Thoroughly test the application to ensure that all functionalities work correctly after the migration.

Update Dependencies: Finally, update the package.json to remove the deprecated package and include the new one.

SoarinSkySagar commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

GM, I am Sagar Rana, a smart contract developer and full stack engineer. I have 3 years of experience building robust full stack applications and over a year of writing smart contracts. You can see my projects and contributions to some major repos on my GitHub profile. The tech stack I use mainly includes Solidity, Rust, JavaScript and Typescript. I am also contributing to the Starknet and Rust ecosystems and building on Cairo and Rust languages. I am interested in contributing to projects like this to learn more about these technologies and help make these projects better. Please assign me as I would be really glad to be a contributor in this project! :)

How I plan on tackling this issue

Hi @ElliotFriend, this is how I would approach this issue:

Tasks:

ETA: 1 Day

Benjtalkshow commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm Benjamin, a full-stack JavaScript developer. I wanted to talk about our current situation with the @stellar/wallet-sdk package. Since it’s been deprecated, we need to move to the recommended replacement, which is the @stellar/typescript-wallet-sdk-km package.

How I plan on tackling this issue

First, I’ll take a close look at how we’re currently using the @stellar/wallet-sdk. This way, I can understand the features we rely on and how they’ll fit into the new package.

Next, I’ll dive into the documentation for @stellar/typescript-wallet-sdk-km to see what’s similar and what might be different. This will help me prepare for any changes we need to make in our code.

Once I’ve got a good grasp of both packages, I’ll start updating our code. I’ll replace the old package with the new one and adjust our implementation to match the new API. My goal here is to keep all our current functionalities, like user authentication and key management, working smoothly.

After I’ve made the updates, I’ll run thorough tests to make sure everything is functioning as it should. This means checking both individual components and how they work together in the application.

Finally, I’ll document the changes I’ve made, highlighting any new features or differences. This way, our team will have a clear reference for the future.

saimeunt commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have experience on full stack development building an EVM explorer and indexer: https://github.com/walnuthq/op-scan

How I plan on tackling this issue

I will carefully read the new package docs and follow the the steps required to integrate it successfully in replacement of the legacy package.

Jemiiah commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

@ElliotFriend I would love to work on this issue I'm a frontend web 3 developer with experience in only dust contributions and previous contributed to new repos every ODHack

How I plan on tackling this issue

  1. Install the New SDK First, I will install the typescript-wallet-sdk-km in the project, replacing the deprecated package:

using Yarn: yarn add @stellar/typescript-wallet-sdk

  1. Update Imports After installing, I need to go through the project files where js-stellar-wallets was previously imported and update the import statements to the new package:

import { Wallet } from "@stellar/typescript-wallet-sdk";

  1. Wallet Instantiation I will then adjust how the wallet is instantiated. Here's a basic example for connecting to the Stellar test network:

let wallet = Wallet.TestNet();

  1. Handling SEP-10 Authentication Since the authentication flow might remain unchanged, I will ensure the logic involving SEP-10 authentication works similarly to before:

const anchor = wallet.anchor({ homeDomain: "your-anchor-domain.com" });
const sep10 = await anchor.sep10();
const authToken = await sep10.authenticate({ accountKp: authKey }); ```

5. Testing and Adjusting
After refactoring, I will run the project tests to confirm everything works with the new SDK. It's important for me to validate that no methods have changed drastically or been deprecated.

6. Check Documentation
Lastly, I will refer to the officialhttps://developers.stellar.org/docs/category/build-a-wallet-with-the-wallet-sdk to ensure I'm aware of any new features or updates in the new SDK that might help improve the application.

Following these steps, I should be able to complete the migration without significant issues.