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: v3 to v4 (end of September 2024) #25

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

Migration support: v3 to v4 (end of September 2024) #25

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 v4:

  • 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 v3

const address = await ExtensionProvider.getInstance().login();

🟢 UPDATE - performing a login action in v4

const { address }  = await ExtensionProvider.getInstance().login
  • upgrade signMessage to use Message

🟡 BEFORE - signing a message in v3

const message = new SignableMessage({
            message: Buffer.from("hello")
        });

const signedMessage = await this.provider.signMessage(message);

🟢 UPDATE - signing a message in v7

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

const signedMessage = await this.provider.signMessage(messageToSign);

Additional non-breaking changes

  • added 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
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