Mina

The Mina blockchain uses a variant of Schnorr signatures over the PallasMina curve. Builder Vault supports this scheme and you can therefore use Builder Vault to build an MPC wallet for Mina.

When you generate a new wallet, you will need to generate a new Schnorr master key in Builder Vault as follows:

keyID, err := client.Schnorr().GenerateKey(context, sessionConfig, threshold, tsm.SchnorrMina, desiredKeyID)

To perform a transaction, you will need to generate the corresponding message to be signed in your application. You will also need to choose a particular derivation path, like m/44/0/0/1. Then you can produce a partial signature like this:

message = tsm.SchnorrMinaPrepareMessage(message)
derivationPath := []uint32{44, 0, 0, 1}
partialSignResult, err := client.Schnorr().Sign(context, sessionConfig, keyID, derivationPath, message)

Finally, when you have obtained a partial signature from each of the MPC nodes in the session, you can combine the partial signatures into the final signature using

signature, err := tsm.SchnorrFinalizeSignature(message, partialSignatures)

Given the signature, it is up to your application to use the signature to build and submit the signed transaction. You can use any available 3rd party library for this, but we recommend using Blockdaemon's API Suite.

📘

Using Blockdaemon's API Suite

Blockdaemon offers an API Suite with packaged solutions specifically designed to meet your unique needs. It helps you perform blockchain-specific tasks across multiple blockchains. The Blockdaemon API Suite works well in combination with the Builder Vault if you want to build a secure and flexible wallet.

You can learn more about key generation, signing and key derivation with Builder Vault here. There are also various code examples available, in Go, Java, Node.js and more, in our demo repository.