Skip to content
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

Migration support: v6 to v7 (end of September 2024) #31

Open
arhtudormorar opened this issue Sep 23, 2024 · 0 comments
Open

Migration support: v6 to v7 (end of September 2024) #31

arhtudormorar opened this issue Sep 23, 2024 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@arhtudormorar
Copy link
Contributor

arhtudormorar commented Sep 23, 2024

Breaking changes brought by v7:

  • upgrade @multiversx/sdk-core peer dependecy to >= 13.5.0
  • make isConnected() return boolean instead of Promise<boolean>
  • make login return an IProviderAccount object instead of string

🟡 BEFORE - performing a login action in v6

const address = await hwApp.login({ addressIndex: 0 });

🟢 UPDATE - performing a login action in v7

const { address }  = await hwApp.login({ addressIndex: 0 });
  • upgrade signMessage to use Message

🟡 BEFORE - signing a message in v6

const message = new SignableMessage({
            message: Buffer.from("Hello World"),
            address: Address.fromBech32("erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th"),
            version: 42
});
const signedMessage = await hwProvider.signMessage(message);

🟢 UPDATE - signing a message in v7

const messageToSign = new Message({
            data: Buffer.from("Hello World"),
            address: Address.fromBech32("erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th"),
            version: 42
        }); 

const signedMessage = await hwProvider.signMessage(messageToSign);

Additional non-breaking changes

  • added private memeber account, with public methods getAccount and setAccount
@arhtudormorar arhtudormorar added the documentation Improvements or additions to documentation label Sep 23, 2024
@arhtudormorar arhtudormorar self-assigned this Sep 23, 2024
@arhtudormorar arhtudormorar changed the title Migration support: "v6" to "v7" (end of September 2024) Migration support: v6 to v7 (end of September 2024) Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant