PrivateKey
public struct PrivateKey : Equatable
A Steem private key.
-
Create a new private key instance from a byte buffer.
Declaration
Swift
public init?(_ data: Data)Parameters
dataThe 33-byte private key where the first byte is the network id (0x80).
-
Create a new private key instance from a WIF-encoded string.
Declaration
Swift
public init?(_ wif: String)Parameters
wifThe base58check-encoded string.
-
Create a new private key instance from a seed.
Declaration
Swift
public init?(seed: String)Parameters
seedString that is hashed and used as secret.
-
Sign a message.
Declaration
Swift
public func sign(message: Data) throws -> SignatureParameters
messageThe 32-byte message to sign.
-
The 33-byte private key where the first byte is the network id (0x80).
Declaration
Swift
public var data: Data { get } -
WIF-encoded string representation of private key.
Declaration
Swift
public var wif: String { get }
-
Declaration
Swift
public var description: String { get }
View on GitHub
PrivateKey Structure Reference