add From Secret
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. Any persisted wallet connection for the same address is removed from storage to prevent it from reappearing on the next restoreConnections call.
Return
The derived G-address of the signer
Parameters
secret Key
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")Content copied to clipboard