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%
1.0 KB · 45 lines swift
Raw Blame History
1import WalletCoreC2import Foundation3// SPDX-License-Identifier: Apache-2.04//5// Copyright © 2017 Trust Wallet.6//7// This is a GENERATED FILE, changes made here WILL BE LOST.8//910import Foundation1112/// Represents a FIO Account name13public final class FIOAccount {1415    /// Returns the short account string representation.16    ///17    /// - Parameter account: Pointer to a non-null FIO Account18    /// - Returns: Account non-null string representation19    public var description: String {20        return TWStringNSString(TWFIOAccountDescription(rawValue))21    }2223    let rawValue: OpaquePointer2425    init(rawValue: OpaquePointer) {26        self.rawValue = rawValue27    }2829    public init?(string: String) {30        let stringString = TWStringCreateWithNSString(string)31        defer {32            TWStringDelete(stringString)33        }34        guard let rawValue = TWFIOAccountCreateWithString(stringString) else {35            return nil36        }37        self.rawValue = rawValue38    }3940    deinit {41        TWFIOAccountDelete(rawValue)42    }4344}45