SigningKey
public protocol SigningKey
Defines a type that is used by a Client
to sign keys and messages.
You can use Account
for an easier WalletConnect flow, or PrivateKey
for quick key generation.
Tip
You can make your own object that conforms to SigningKey
if you want to
handle key management yourself.
-
A wallet address for this key
Declaration
Swift
var address: String { get }
-
sign(_:
Asynchronous) Sign the data and return a secp256k1 compact recoverable signature.
Declaration
Swift
func sign(_ data: Data) async throws -> Signature
-
sign(message:
Asynchronous) Pass a personal Ethereum signed message string text to be signed, returning a secp256k1 compact recoverable signature. You can use
Signature.ethPersonalMessage
to generate this text.Declaration
Swift
func sign(message: String) async throws -> Signature