-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(*): migrate to algosdk v3.0.0 #314
Conversation
BREAKING CHANGE: Update transaction handling to support algosdk v3.x API - Transaction properties renamed (from -> sender, firstRound -> firstValid) - New transaction construction format using type and params objects - Modified transaction signing and verification logic - Update all package.json files to use algosdk v3.0.0 - Refactor transaction creation and handling across all wallet implementations - Update test cases to use new transaction format and API
Update transaction parameter names in all example projects to match algosdk v3: - Rename 'from' to 'sender' - Rename 'to' to 'receiver' Affects examples in Next.js, Nuxt, React, Solid, Vue, and vanilla TS
Reviews welcome! I'll leave this PR open for ~24-48 hours, which is hopefully enough time to get some eyeballs on it before merging. Tagging a few contributors but anyone is welcome to submit a review. @SilentRhetoric After merging, I'll publish pre-release packages so developers can test v4's breaking changes in their projects. Thanks! 🙏 |
@@ -139,6 +139,7 @@ export class LiquidWallet extends BaseWallet { | |||
this.logger.debug('Signing transactions...', { txnGroup, indexesToSign }) | |||
|
|||
const authClient = this.authClient || (await this.initializeClient()) | |||
// @ts-expect-error - TODO: update liquid-auth-use-wallet-client to use algosdk v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HashMapsData2Value The liquid-auth-use-wallet-client
package will need to support algosdk
v3 in the next major release. The Transaction
interfaces are incompatible between v2 + v3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my first look into v3 and I am liking it. From the Kibisis side, I didn't see any problems jump out, migration looks fine to me!
If there are any problems, I am more than happy to debug. I am giving an approval.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in a few fresh vite projects and everything works as expected. The v3-sdk hooks library was able to use this build as well. I will try to use the latest algokit-utils this evening with it.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -67,7 +67,10 @@ export class LuteWallet extends BaseWallet { | |||
|
|||
private async getGenesisId(): Promise<string> { | |||
const algodClient = this.getAlgodClient() | |||
const genesis = await algodClient.genesis().do() | |||
const genesisStr = await algodClient.genesis().do() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This got way uglier--4 lines from 1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, like everything else this method used to return Promise<Record<string, any>>
which was parsable as JSON, but now returns Promise<string>
and so must be deserialized first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, yes 😅
The first beta release of v4.0.0 is now available! 🎉 To test the new version in your project, upgrade the appropriate framework adapter using the "beta" tag, e.g., npm install @txnlab/use-wallet@beta yarn upgrade @txnlab/use-wallet@beta pnpm update @txnlab/use-wallet@beta bun update @txnlab/use-wallet@beta Obviously, make sure you have |
Description
This PR initiates the v4.0.0 release by migrating from
algosdk
v2 to v3. This is a breaking change that requires updates to transaction handling across all packages, establishing the foundation for additional v4 changes.See the official migration guide for details about the underlying SDK changes.
algosdk
dependency to^3.0.0
as it is a required peer dependency for compatibility with v4.Details
package.json
dependencies toalgosdk@3.0.0
across all packagesfrom
->sender
,firstRound
->firstValid
)