func GenerateKeyFromSeed(seed string) (publicKey PublicKey, privateKey PrivateKey, err error) { decoded, err := strkey.Decode(strkey.VersionByteSeed, seed) if err != nil { return } rawSeed, err := NewRawSeed(decoded) if err != nil { return } return GenerateKeyFromRawSeed(rawSeed) }
// AddressToAccountId converts the provided address into a xdr.AccountId func AddressToAccountId(address string) (result xdr.AccountId, err error) { bytes, err := strkey.Decode(strkey.VersionByteAccountID, address) if err != nil { return } var raw xdr.Uint256 copy(raw[:], bytes) pk, err := xdr.NewPublicKey(xdr.CryptoKeyTypeKeyTypeEd25519, raw) if err != nil { return } result = xdr.AccountId(pk) return }