EosioSoftkeySignatureProvider
public final class EosioSoftkeySignatureProvider : EosioSignatureProviderProtocol
Example signature provider for EOSIO SDK for Swift for signing transactions using in-memory K1 private keys. This signature provider implementation stores keys in memory and is therefore not secure. Use only for development purposes.
-
Initializes the signature provider using the private keys in the given array.
Throws
Throws an error if any of the keys in the givenprivateKeysarray is not valid.Declaration
Swift
public init(privateKeys: [String]) throwsParameters
privateKeysArray of private keys in
Stringformat. -
Asynchronous method signing a transaction request. Invoked by an
EosioTransactionduring the signing process.Declaration
Swift
public func signTransaction(request: EosioTransactionSignatureRequest, prompt: String, completion: @escaping (EosioTransactionSignatureResponse) -> Void)Parameters
requestAn
EosioTransactionSignatureRequeststruct (as defined in theEosioSwiftlibrary).promptPrompt for biometric challenge if required. Ignored as softkey provider does no biometric auth.
completionCalls the completion with an
EosioTransactionSignatureResponsestruct (as defined in theEosioSwiftlibrary). -
Asynchronous method signing a transaction request. Invoked by an
EosioTransactionduring the signing process.Declaration
Swift
public func signTransaction(request: EosioTransactionSignatureRequest, completion: @escaping (EosioTransactionSignatureResponse) -> Void)Parameters
requestAn
EosioTransactionSignatureRequeststruct (as defined in theEosioSwiftlibrary).completionCalls the completion with an
EosioTransactionSignatureResponsestruct (as defined in theEosioSwiftlibrary). -
Asynchronous method that provides available public keys to the
EosioTransactionduring the signing preparation process.Declaration
Swift
public func getAvailableKeys(completion: @escaping (EosioAvailableKeysResponse) -> Void)Parameters
completionCalls the completion with an
EosioAvailableKeysResponsestuct containing an optional array of available public keys inStringformat.
View on GitHub
EosioSoftkeySignatureProvider Class Reference