Hello, I have a seed phrase (mnemonic). How I can convert it to Signature for sui json-rpc transactions? Can I use my software (for example - python) without sui cli-client? And how I can do this? For example, sui_executeTransactionSerializedSig need signature.
I also had a problem with access not with mnemonic. I tried to use keys from devnet to testnet and their types was different and there wasn’t instruction how to solve that. Only at the discord one of the moderators shared thу link. But I didn’t understand any word of this
Maybe someone help me finally
As far as keypairs go, prior to Sui 0.21.0 the keypair encoding structurally (using ed25519 as example):
- Keypair on disk is encoded as base64 string
- Decoding that string to bytes resulted in a 65 byte list
- Byte 0 contained the key scheme:
- For ed25519: The next 32 bytes were the Public key
- For ed25519: The remaining 32 bytes were the Private key
However; in 0.21.0 it was changed where the Public key was dropped.
Now the keystring decodes to a 33 byte list
The first byte is still the key scheme
The remaining 32 are the Private key
The seed phrase (words) need to be converted to bytes representing a
seed to your key generation.
You need to do this to get a private key and from that a public key
You also need to identify the derivation path, varies based on key type
You can generate the key pair using the sui keytool
sui keytool import -h on the command line.