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%
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 Foundation111213public struct TransactionDecoder {1415 /// Decodes a transaction from a binary representation.16 ///17 /// - Parameter coin: coin type.18 /// - Parameter encodedTx: encoded transaction data.19 /// - Returns: serialized protobuf message specific for the given coin.20 public static func decode(coinType: CoinType, encodedTx: Data) -> Data {21 let encodedTxData = TWDataCreateWithNSData(encodedTx)22 defer {23 TWDataDelete(encodedTxData)24 }25 return TWDataNSData(TWTransactionDecoderDecode(TWCoinType(rawValue: coinType.rawValue), encodedTxData))26 }272829 init() {30 }313233}34