Wallet
public protocol Wallet : Decodable, Encodable
Wallet protocol to allow generic handling of all wallets types for signing operations and caching data locally.
-
Which underlying
WalletTypeis the wallet usingDeclaration
Swift
var type: WalletType { get } -
The public TZ1 or TZ2 address of the wallet
Declaration
Swift
var address: String { get } -
Sign a hex string with the wallets private key
Declaration
Swift
func sign(_ hex: String, isOperation: Bool, completion: @escaping ((Result<[UInt8], KukaiError>) -> Void))Parameters
hexA hex encoded string, representing a forged operation payload.
isOperationA boolean to indicate whether its an operation or something else such as an expression to sign. So that the appropriate prefix can be added automatically
completionA completion block to run with the resulting signature, needs to be done async in order to support usecases such as signing with an external ledger.
-
Query which curve the given wallet is using
Declaration
Swift
func privateKeyCurve() -> EllipticalCurve -
Base58 encoded version of the publicKey, used when performing a reveal operation
Declaration
Swift
func publicKeyBase58encoded() -> String
Install in Dash