Move.

Post

Share your knowledge.

Pluto Dev👽.
Apr 10, 2025
Expert Q&A

Converting a Public Key to Sui Address in Sui Move

I'm trying to convert a public key into a Sui address using Sui Move but can't find any built-in function. I understand it's quite important for my work. Could someone explain how exactly to do this conversion?

  • Move CLI
0
1
Share
Comments
.

Answers

1
dudley_smith.
Apr 10 2025, 22:16

To convert a public key into a Sui address, you need to hash the signature scheme flag byte concatenated with the public key bytes using the BLAKE2b hashing function. The resulting Sui address is a 32-byte hash. You can utilize the BLAKE2b function available in the Sui library, specifically in their 'crypto/hash.move' module. Here's a useful link with a Rust example for setting up Sui addresses: Rust Example.

0
Comments
.

Do you know the answer?

Please log in and share it.

Move is an executable bytecode language used to implement custom transactions and smart contracts.

148Posts231Answers
Sui.X.Peera.

Earn Your Share of 1000 Sui

Gain Reputation Points & Get Rewards for Helping the Sui Community Grow.

Reward CampaignJune
      We use cookies to ensure you get the best experience on our website.
      More info