SPB Git

spb/os-vault Public

Self-custody, multi-chain crypto wallet for macOS. One recovery phrase, six chain families, zero API keys — nothing leaves your Mac.

Swift 96% Shell 3.4% Makefile 0.6%
580 B · 25 lines swift
Raw Blame History
1import Foundation23extension PublicKey: ExpressibleByStringLiteral,4    ExpressibleByUnicodeScalarLiteral,5    ExpressibleByExtendedGraphemeClusterLiteral6{7    public init(stringLiteral value: String) {8        self = try! .init(string: value)9    }1011    public init(unicodeScalarLiteral value: String) {12        self = .init(stringLiteral: value)13    }1415    public init(extendedGraphemeClusterLiteral value: String) {16        self = .init(stringLiteral: value)17    }18}1920extension String {21    func toPublicKey() throws -> PublicKey {22        try PublicKey(string: self)23    }24}25