addFromSecret

suspend fun addFromSecret(secretKey: String): String

Adds an Ed25519 keypair signer from a raw secret key.

Creates a KeyPair from the provided Stellar secret key (S...) and stores it in memory. The keypair is never persisted to storage -- it is lost when the application terminates or the manager is garbage collected.

If a signer with the same G-address already exists (either keypair or wallet), the keypair signer takes precedence and overwrites the existing entry.

Return

The derived G-address of the signer

Parameters

secretKey

A valid Stellar secret key (S-address, 56 characters)

Throws

if the secret key is invalid or keypair creation fails

Example:

val address = manager.addFromSecret("SCZANGBA5YHTNYVVV3C7CAZMTQDBJHJG6C34REYB6WBMG7CKKFJHYAEGQ")
println("Added signer: $address")