diff --git a/.gitignore b/.gitignore index b683fce1..fd6a8495 100644 --- a/.gitignore +++ b/.gitignore @@ -19,9 +19,6 @@ xcuserdata *.moved-aside *.xcuserstate .DS_Store -WalletCoreCommon.xcframework/ - -Secrets.swift # Bundler .bundle diff --git a/.swiftlint.yml b/.swiftlint.yml deleted file mode 100644 index 84fa0064..00000000 --- a/.swiftlint.yml +++ /dev/null @@ -1,33 +0,0 @@ -disabled_rules: - - trailing_whitespace - - file_length - - function_body_length - - function_parameter_count - - type_body_length - - line_length - - large_tuple - - nesting - - cyclomatic_complexity - - generic_type_name - - identifier_name - - type_name - - weak_delegate - - class_delegate_protocol - - first_where - - force_cast - - multiple_closures_with_trailing_closure - - force_try - - unused_setter_value - - no_space_in_method_call - -opt_in_rules: - - explicit_init - - fatal_error_message - - first_where - - operator_usage_whitespace - -excluded: - - Pods - -shorthand_operator: warning -dynamic_inline: warning diff --git a/Podfile b/Podfile deleted file mode 100644 index 96616f9a..00000000 --- a/Podfile +++ /dev/null @@ -1,18 +0,0 @@ -inhibit_all_warnings! -use_frameworks! - -def shared_pods - pod 'Kingfisher' - pod 'TrustWalletCore' - pod 'BigInt' -end - -target 'Tokenary' do - platform :osx, '11.4' - shared_pods -end - -target 'Tokenary iOS' do - platform :ios, '15.0' - shared_pods -end diff --git a/Podfile.lock b/Podfile.lock deleted file mode 100644 index f3271be1..00000000 --- a/Podfile.lock +++ /dev/null @@ -1,32 +0,0 @@ -PODS: - - BigInt (5.2.0) - - Kingfisher (7.10.0) - - SwiftProtobuf (1.25.1) - - TrustWalletCore (4.0.1): - - TrustWalletCore/Core (= 4.0.1) - - TrustWalletCore/Core (4.0.1): - - TrustWalletCore/Types - - TrustWalletCore/Types (4.0.1): - - SwiftProtobuf - -DEPENDENCIES: - - BigInt - - Kingfisher - - TrustWalletCore - -SPEC REPOS: - trunk: - - BigInt - - Kingfisher - - SwiftProtobuf - - TrustWalletCore - -SPEC CHECKSUMS: - BigInt: f668a80089607f521586bbe29513d708491ef2f7 - Kingfisher: a18f05d3b6d37d8650ee4a3e61d57a28fc6207f6 - SwiftProtobuf: 69f02cd54fb03201c5e6bf8b76f687c5ef7541a3 - TrustWalletCore: 77c78bda1d1a411390321b7d9f7b81bd1d547b71 - -PODFILE CHECKSUM: 63ae34d7b530436a1a7d72f33a0171a22f73d4ad - -COCOAPODS: 1.13.0 diff --git a/Pods/BigInt/LICENSE.md b/Pods/BigInt/LICENSE.md deleted file mode 100644 index 18cefd11..00000000 --- a/Pods/BigInt/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ - -Copyright (c) 2016-2017 Károly Lőrentey - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Pods/BigInt/README.md b/Pods/BigInt/README.md deleted file mode 100644 index 2256249c..00000000 --- a/Pods/BigInt/README.md +++ /dev/null @@ -1,430 +0,0 @@ -[![BigInt](https://github.com/attaswift/BigInt/raw/master/images/banner.png)](https://github.com/attaswift/BigInt) - -* [Overview](#overview) -* [API Documentation](#api) -* [License](#license) -* [Requirements and Integration](#integration) -* [Implementation Notes](#notes) - * [Full-width multiplication and division primitives](#fullwidth) - * [Why is there no generic `BigInt` type?](#generics) -* [Calculation Samples](#samples) - * [Obligatory factorial demo](#factorial) - * [RSA Cryptography](#rsa) - * [Calculating the Digits of π](#pi) - -[![Swift 3](https://img.shields.io/badge/Swift-5-blue.svg)](https://developer.apple.com/swift/) -[![License](https://img.shields.io/badge/licence-MIT-blue.svg)](http://cocoapods.org/pods/BigInt) -[![Platform](https://img.shields.io/cocoapods/p/BigInt.svg)](http://cocoapods.org/pods/BigInt) - -[![Build Status](https://travis-ci.org/attaswift/BigInt.svg?branch=master)](https://travis-ci.org/attaswift/BigInt) -[![Code Coverage](https://codecov.io/github/attaswift/BigInt/coverage.svg?branch=master)](https://codecov.io/github/attaswift/BigInt?branch=master) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)](https://github.com/Carthage/Carthage) -[![Version](https://img.shields.io/cocoapods/v/BigInt.svg)](http://cocoapods.org/pods/BigInt) - -## Overview - -This repository provides [integer types of arbitrary width][wiki] implemented -in 100% pure Swift. The underlying representation is in base 2^64, using `Array`. - -[wiki]: https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic - -This module is handy when you need an integer type that's wider than `UIntMax`, but -you don't want to add [The GNU Multiple Precision Arithmetic Library][GMP] -as a dependency. - -[GMP]: https://gmplib.org - -Two big integer types are included: [`BigUInt`][BigUInt] and [`BigInt`][BigInt], -the latter being the signed variant. -Both of these are Swift structs with copy-on-write value semantics, and they can be used much -like any other integer type. - -The library provides implementations for some of the most frequently useful functions on -big integers, including - -- All functionality from [`Comparable`][comparison] and [`Hashable`][hashing] - -- [The full set of arithmetic operators][addition]: `+`, `-`, `*`, `/`, `%`, `+=`, `-=`, `*=`, `/=`, `%=` - - [Addition][addition] and [subtraction][subtraction] have variants that allow for - shifting the digits of the second operand on the fly. - - Unsigned subtraction will trap when the result would be negative. - ([There are variants][subtraction] that return an overflow flag.) - - [Multiplication][mul] uses brute force for numbers up to 1024 digits, then switches to Karatsuba's recursive method. - (This limit is configurable, see `BigUInt.directMultiplicationLimit`.) - - A [fused multiply-add][fused] method is also available, along with other [special-case variants][multiplication]. - - [Division][division] uses Knuth's Algorithm D, with its 3/2 digits wide quotient approximation. - It will trap when the divisor is zero. - - [`BigUInt.divide`][divide] returns the quotient and - remainder at once; this is faster than calculating them separately. - -- [Bitwise operators][bitwise]: `~`, `|`, `&`, `^`, `|=`, `&=`, `^=`, plus the following read-only properties: - - [`width`][width]: the minimum number of bits required to store the integer, - - [`trailingZeroBitCount`][trailingZeroBitCount]: the number of trailing zero bits in the binary representation, - - [`leadingZeroBitCount`][leadingZeroBitCount]: the number of leading zero bits (when the last digit isn't full), - -- [Shift operators][shift]: `>>`, `<<`, `>>=`, `<<=` - -- Methods to [convert `NSData` to big integers][data] and vice versa. - -- Support for [generating random integers][random] of specified maximum width or magnitude. - -- Radix conversion to/from [`String`s][radix1] and [big integers][radix2] up to base 36 (using repeated divisions). - - Big integers use this to implement `StringLiteralConvertible` (in base 10). - -- [`sqrt(n)`][sqrt]: The square root of an integer (using Newton's method). - -- [`BigUInt.gcd(n, m)`][GCD]: The greatest common divisor of two integers (Stein's algorithm). - -- [`base.power(exponent, modulus)`][powmod]: Modular exponentiation (right-to-left binary method). - [Vanilla exponentiation][power] is also available. -- [`n.inverse(modulus)`][inverse]: Multiplicative inverse in modulo arithmetic (extended Euclidean algorithm). -- [`n.isPrime()`][prime]: Miller–Rabin primality test. - -The implementations are intended to be reasonably efficient, but they are unlikely to be -competitive with GMP at all, even when I happened to implement an algorithm with same asymptotic -behavior as GMP. (I haven't performed a comparison benchmark, though.) - -The library has 100% unit test coverage. Sadly this does not imply that there are no bugs -in it. - -## API Documentation - -Generated API docs are available at http://attaswift.github.io/BigInt/. - -## License - -BigInt can be used, distributed and modified under [the MIT license][license]. - -## Requirements and Integration - -BigInt 4.0.0 requires Swift 4.2 (The last version with support for Swift 3.x was BigInt 2.1.0. -The last version with support for Swift 2 was BigInt 1.3.0.) - -| Swift Version | last BigInt Version| -| ------------- |:-------------------| -| 3.x | 2.1.0 | -| 4.0 | 3.1.0 | -| 4.2 | 4.0.0 | -| 5.0 | 5.0.0 | - -BigInt deploys to macOS 10.10, iOS 9, watchOS 2 and tvOS 9. -It has been tested on the latest OS releases only---however, as the module uses very few platform-provided APIs, -there should be very few issues with earlier versions. - -BigInt uses no APIs specific to Apple platforms, so -it should be easy to port it to other operating systems. - -Setup instructions: - -- **Swift Package Manager:** - Although the Package Manager is still in its infancy, BigInt provides experimental support for it. - Add this to the dependency section of your `Package.swift` manifest: - - ```Swift - .package(url: "https://github.com/attaswift/BigInt.git", from: "5.0.0") - ``` - -- **CocoaPods:** Put this in your `Podfile`: - - ```Ruby - pod 'BigInt', '~> 5.0' - ``` - -- **Carthage:** Put this in your `Cartfile`: - - ``` - github "attaswift/BigInt" ~> 5.0 - ``` - -## Implementation notes - -[`BigUInt`][BigUInt] is a `MutableCollectionType` of its 64-bit digits, with the least significant -digit at index 0. As a convenience, [`BigUInt`][BigUInt] allows you to subscript it with indexes at -or above its `count`. [The subscript operator][subscript] returns 0 for out-of-bound `get`s and -automatically extends the array on out-of-bound `set`s. This makes memory management simpler. - -[`BigInt`][BigInt] is just a tiny wrapper around a `BigUInt` [absolute value][abs] and a -[sign bit][negative], both of which are accessible as public read-write properties. - -### Why is there no generic `BigInt` type? - -The types provided by `BigInt` are not parametric—this is very much intentional, as -Swift generics cost us dearly at runtime in this use case. In every approach I tried, -making arbitrary-precision arithmetic operations work with a generic `Digit` type parameter -resulted in code that was literally *ten times slower*. If you can make the algorithms generic -without such a huge performance hit, [please enlighten me][twitter]! - -This is an area that I plan to investigate more, as it would be useful to have generic -implementations for arbitrary-width arithmetic operations. (Polynomial division and decimal bases -are two examples.) The library already implements double-digit multiplication and division as -extension methods on a protocol with an associated type requirement; this has not measurably affected -performance. Unfortunately, the same is not true for `BigUInt`'s methods. - -Of course, as a last resort, we could just duplicate the code to create a separate -generic variant that was slower but more flexible. - -[license]: https://github.com/attaswift/BigInt/blob/master/LICENSE.md -[twitter]: https://twitter.com/lorentey -[BigUInt]: http://attaswift.github.io/BigInt/Structs/BigUInt.html -[BigInt]: http://attaswift.github.io/BigInt/Structs/BigInt.html -[comparison]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Comparison -[hashing]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Hashing -[addition]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Addition -[subtraction]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Subtraction -[mul]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:ZFV6BigInt7BigUIntoi1mFTS0_S0__S0_ -[fused]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt14multiplyAndAddFTS0_Vs6UInt6410atPositionSi_T_ -[multiplication]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Multiplication -[division]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Division -[divide]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt7dividedFT2byS0__T8quotientS0_9remainderS0__ -[bitwise]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Bitwise%20Operations -[width]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:vV6BigInt7BigUInt5widthSi -[leadingZeroBitCount]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:vV6BigInt7BigUInt13leadingZeroBitCountSi -[trailingZeroBitCount]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:vV6BigInt7BigUInt14trailingZeroBitCountSi -[shift]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Shift%20Operators -[data]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/NSData%20Conversion -[random]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Random%20Integers -[radix1]: http://attaswift.github.io/BigInt/Extensions/String.html#/s:FE6BigIntSScFTVS_7BigUInt5radixSi9uppercaseSb_SS -[radix2]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUIntcFTSS5radixSi_GSqS0__ -[sqrt]: http://attaswift.github.io/BigInt/Functions.html#/s:F6BigInt4sqrtFVS_7BigUIntS0_ -[GCD]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:ZFV6BigInt7BigUInt3gcdFTS0_S0__S0_ -[powmod]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt5powerFTS0_7modulusS0__S0_ -[power]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt5powerFSiS0_ -[inverse]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt7inverseFS0_GSqS0__ -[prime]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Primality%20Testing -[abs]: http://attaswift.github.io/BigInt/Structs/BigInt.html#/s:vV6BigInt6BigInt3absVS_7BigUInt -[negative]: http://attaswift.github.io/BigInt/Structs/BigInt.html#/s:vV6BigInt6BigInt8negativeSb -[subscript]: https://github.com/attaswift/BigInt/blob/v2.0.0/Sources/BigUInt.swift#L216-L239 -[fullmuldiv]: https://github.com/attaswift/BigInt/blob/v2.0.0/Sources/BigDigit.swift#L96-L167 - - -## Calculation Samples - -### Obligatory Factorial Demo - -It is easy to use `BigInt` to calculate the factorial function for any integer: - -```Swift -import BigInt - -func factorial(_ n: Int) -> BigInt { - return (1 ... n).map { BigInt($0) }.reduce(BigInt(1), *) -} - -print(factorial(10)) -==> 362880 - -print(factorial(100)) -==> 93326215443944152681699238856266700490715968264381621468592963895217599993229915 - 6089414639761565182862536979208272237582511852109168640000000000000000000000 - -print(factorial(1000)) -==> 40238726007709377354370243392300398571937486421071463254379991042993851239862902 - 05920442084869694048004799886101971960586316668729948085589013238296699445909974 - 24504087073759918823627727188732519779505950995276120874975462497043601418278094 - 64649629105639388743788648733711918104582578364784997701247663288983595573543251 - 31853239584630755574091142624174743493475534286465766116677973966688202912073791 - 43853719588249808126867838374559731746136085379534524221586593201928090878297308 - 43139284440328123155861103697680135730421616874760967587134831202547858932076716 - 91324484262361314125087802080002616831510273418279777047846358681701643650241536 - 91398281264810213092761244896359928705114964975419909342221566832572080821333186 - 11681155361583654698404670897560290095053761647584772842188967964624494516076535 - 34081989013854424879849599533191017233555566021394503997362807501378376153071277 - 61926849034352625200015888535147331611702103968175921510907788019393178114194545 - 25722386554146106289218796022383897147608850627686296714667469756291123408243920 - 81601537808898939645182632436716167621791689097799119037540312746222899880051954 - 44414282012187361745992642956581746628302955570299024324153181617210465832036786 - 90611726015878352075151628422554026517048330422614397428693306169089796848259012 - 54583271682264580665267699586526822728070757813918581788896522081643483448259932 - 66043367660176999612831860788386150279465955131156552036093988180612138558600301 - 43569452722420634463179746059468257310379008402443243846565724501440282188525247 - 09351906209290231364932734975655139587205596542287497740114133469627154228458623 - 77387538230483865688976461927383814900140767310446640259899490222221765904339901 - 88601856652648506179970235619389701786004081188972991831102117122984590164192106 - 88843871218556461249607987229085192968193723886426148396573822911231250241866493 - 53143970137428531926649875337218940694281434118520158014123344828015051399694290 - 15348307764456909907315243327828826986460278986432113908350621709500259738986355 - 42771967428222487575867657523442202075736305694988250879689281627538488633969099 - 59826280956121450994871701244516461260379029309120889086942028510640182154399457 - 15680594187274899809425474217358240106367740459574178516082923013535808184009699 - 63725242305608559037006242712434169090041536901059339838357779394109700277534720 - 00000000000000000000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000000000000000000000000 - 00000 -``` - -Well, I guess that's all right, but it's not very interesting. Let's try something more useful. - -### RSA Cryptography - -The `BigInt` module provides all necessary parts to implement an (overly) -simple [RSA cryptography system][RSA]. - -[RSA]: https://en.wikipedia.org/wiki/RSA_(cryptosystem) - -Let's start with a simple function that generates a random n-bit prime. The module -includes a function to generate random integers of a specific size, and also an -`isPrime` method that performs the Miller–Rabin primality test. These are all we need: - -```Swift -func generatePrime(_ width: Int) -> BigUInt { - while true { - var random = BigUInt.randomInteger(withExactWidth: width) - random |= BigUInt(1) - if random.isPrime() { - return random - } - } -} - -let p = generatePrime(1024) -==> 13308187650642192396256419911012544845370493728424936791561478318443071617242872 - 81980956747087187419914435169914161116601678883358611076800743580556055714173922 - 08406194264346635072293912609713085260354070700055888678514690878149253177960273 - 775659537560220378850112471985434373425534121373466492101182463962031 - -let q = generatePrime(1024) -==> 17072954422657145489547308812333368925007949054501204983863958355897172093173783 - 10108226596943999553784252564650624766276133157586733504784616138305701168410157 - 80784336308507083874651158029602582993233111593356512531869546706885170044355115 - 669728424124141763799008880327106952436883614887277350838425336156327 -``` - -Cool! Now that we have two large primes, we can produce an RSA public/private keypair -out of them. - -```Swift -typealias Key = (modulus: BigUInt, exponent: BigUInt) - -let n = p * q -==> 22721008120758282530010953362926306641542233757318103044313144976976529789946696 - 15454966720907712515917481418981591379647635391260569349099666410127279690367978 - 81184375533755888994370640857883754985364288413796100527262763202679037134021810 - 57933883525572232242690805678883227791774442041516929419640051653934584376704034 - 63953169772816907280591934423237977258358097846511079947337857778137177570668391 - 57455417707100275487770399281417352829897118140972240757708561027087217205975220 - 02207275447810167397968435583004676293892340103729490987263776871467057582629588 - 916498579594964478080508868267360515953225283461208420137 - -let e: BigUInt = 65537 -let phi = (p - 1) * (q - 1) -let d = e.inverse(phi)! // d * e % phi == 1 -==> 13964664343869014759736350480776837992604500903989703383202366291905558996277719 - 77822086142456362972689566985925179681282432115598451765899180050962461295573831 - 37069237934291884106584820998146965085531433195106686745474222222620986858696591 - 69836532468835154412554521152103642453158895363417640676611704542784576974374954 - 45789456921660619938185093118762690200980720312508614337759620606992462563490422 - 76669559556568917533268479190948959560397579572761529852891246283539604545691244 - 89999692877158676643042118662613875863504016129837099223040687512684532694527109 - 80742873307409704484365002175294665608486688146261327793 - -let publicKey: Key = (n, e) -let privateKey: Key = (n, d) -``` - -In RSA, modular exponentiation is used to encrypt (and decrypt) messages. - -```Swift -func encrypt(_ message: BigUInt, key: Key) -> BigUInt { - return message.power(key.exponent, modulus: key.modulus) -} -``` - -Let's try out our new keypair by converting a string into UTF-8, interpreting -the resulting binary representation as a big integer, and encrypting it with the -public key. `BigUInt` has an initializer that takes an `NSData`, so this is pretty -easy to do: - -```Swift -let secret: BigUInt = BigUInt("Arbitrary precision arithmetic is fun!".dataUsingEncoding(NSUTF8StringEncoding)!) -==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457 - 68818568737 - -let cyphertext = encrypt(secret, key: publicKey) -==> 95186982543485985200666516508066093880038842892337880561554910904277290917831453 - 54854954722744805432145474047391353716305176389470779020645959135298322520888633 - 61674945129099575943384767330342554525120384485469428048962027149169876127890306 - 77028183904699491962050888974524603226290836984166164759586952419343589385279641 - 47999991283152843977988979846238236160274201261075188190509539751990119132013021 - 74866638595734222867005089157198503204192264814750832072844208520394603054901706 - 06024394731371973402595826456435944968439153664617188570808940022471990638468783 - 49208193955207336172861151720299024935127021719852700882 -``` - -Well, it looks encrypted all right, but can we get the original message back? -In theory, encrypting the cyphertext with the private key returns the original message. -Let's see: - -```Swift -let plaintext = encrypt(cyphertext, key: privateKey) -==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457 - 68818568737 - -let received = String(data: plaintext.serialize(), encoding: NSUTF8StringEncoding) -==> "Arbitrary precision arithmetic is fun!" -``` - -Yay! This is truly terrific, but please don't use this example code in an actual -cryptography system. RSA has lots of subtle (and some not so subtle) complications -that we ignored to keep this example short. - -### Calculating the Digits of π - -Another fun activity to try with `BigInt`s is to generate the digits of π. -Let's try implementing [Jeremy Gibbon's spigot algorithm][spigot]. -This is a rather slow algorithm as π-generators go, but it makes up for it with its grooviness -factor: it's remarkably short, it only uses (big) integer arithmetic, and every iteration -produces a single new digit in the base-10 representation of π. This naturally leads to an -implementation as an infinite `GeneratorType`: - -[spigot]: http://www.cs.ox.ac.uk/jeremy.gibbons/publications/spigot.pdf - -```Swift -func digitsOfPi() -> AnyGenerator { - var q: BigUInt = 1 - var r: BigUInt = 180 - var t: BigUInt = 60 - var i: UInt64 = 2 // Does not overflow until digit #826_566_842 - return AnyIterator { - let u: UInt64 = 3 * (3 * i + 1) * (3 * i + 2) - let y = (q.multiplied(byDigit: 27 * i - 12) + 5 * r) / (5 * t) - (q, r, t) = ( - 10 * q.multiplied(byDigit: i * (2 * i - 1)), - 10 * (q.multiplied(byDigit: 5 * i - 2) + r - y * t).multiplied(byDigit: u), - t.multiplied(byDigit: u)) - i += 1 - return Int(y[0]) - } -} -``` - -Well, that was surprisingly easy. But does it work? Of course it does! - -```Swift -var digits = "π ≈ " -var count = 0 -for digit in digitsOfPi() { - assert(digit < 10) - digits += String(digit) - count += 1 - if count == 1 { digits += "." } - if count == 1000 { break } -} - -digits -==> π ≈ 3.14159265358979323846264338327950288419716939937510582097494459230781640628 - 62089986280348253421170679821480865132823066470938446095505822317253594081284811 - 17450284102701938521105559644622948954930381964428810975665933446128475648233786 - 78316527120190914564856692346034861045432664821339360726024914127372458700660631 - 55881748815209209628292540917153643678925903600113305305488204665213841469519415 - 11609433057270365759591953092186117381932611793105118548074462379962749567351885 - 75272489122793818301194912983367336244065664308602139494639522473719070217986094 - 37027705392171762931767523846748184676694051320005681271452635608277857713427577 - 89609173637178721468440901224953430146549585371050792279689258923542019956112129 - 02196086403441815981362977477130996051870721134999999837297804995105973173281609 - 63185950244594553469083026425223082533446850352619311881710100031378387528865875 - 33208381420617177669147303598253490428755468731159562863882353787593751957781857 - 780532171226806613001927876611195909216420198 -``` - -Now go and have some fun with big integers on your own! diff --git a/Pods/BigInt/Sources/Addition.swift b/Pods/BigInt/Sources/Addition.swift deleted file mode 100644 index 34f4d44e..00000000 --- a/Pods/BigInt/Sources/Addition.swift +++ /dev/null @@ -1,126 +0,0 @@ -// -// Addition.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - //MARK: Addition - - /// Add `word` to this integer in place. - /// `word` is shifted `shift` words to the left before being added. - /// - /// - Complexity: O(max(count, shift)) - internal mutating func addWord(_ word: Word, shiftedBy shift: Int = 0) { - precondition(shift >= 0) - var carry = word - var i = shift - while carry > 0 { - let (d, c) = self[i].addingReportingOverflow(carry) - self[i] = d - carry = (c ? 1 : 0) - i += 1 - } - } - - /// Add the digit `d` to this integer and return the result. - /// `d` is shifted `shift` words to the left before being added. - /// - /// - Complexity: O(max(count, shift)) - internal func addingWord(_ word: Word, shiftedBy shift: Int = 0) -> BigUInt { - var r = self - r.addWord(word, shiftedBy: shift) - return r - } - - /// Add `b` to this integer in place. - /// `b` is shifted `shift` words to the left before being added. - /// - /// - Complexity: O(max(count, b.count + shift)) - internal mutating func add(_ b: BigUInt, shiftedBy shift: Int = 0) { - precondition(shift >= 0) - var carry = false - var bi = 0 - let bc = b.count - while bi < bc || carry { - let ai = shift + bi - let (d, c) = self[ai].addingReportingOverflow(b[bi]) - if carry { - let (d2, c2) = d.addingReportingOverflow(1) - self[ai] = d2 - carry = c || c2 - } - else { - self[ai] = d - carry = c - } - bi += 1 - } - } - - /// Add `b` to this integer and return the result. - /// `b` is shifted `shift` words to the left before being added. - /// - /// - Complexity: O(max(count, b.count + shift)) - internal func adding(_ b: BigUInt, shiftedBy shift: Int = 0) -> BigUInt { - var r = self - r.add(b, shiftedBy: shift) - return r - } - - /// Increment this integer by one. If `shift` is non-zero, it selects - /// the word that is to be incremented. - /// - /// - Complexity: O(count + shift) - internal mutating func increment(shiftedBy shift: Int = 0) { - self.addWord(1, shiftedBy: shift) - } - - /// Add `a` and `b` together and return the result. - /// - /// - Complexity: O(max(a.count, b.count)) - public static func +(a: BigUInt, b: BigUInt) -> BigUInt { - return a.adding(b) - } - - /// Add `a` and `b` together, and store the sum in `a`. - /// - /// - Complexity: O(max(a.count, b.count)) - public static func +=(a: inout BigUInt, b: BigUInt) { - a.add(b, shiftedBy: 0) - } -} - -extension BigInt { - /// Add `a` to `b` and return the result. - public static func +(a: BigInt, b: BigInt) -> BigInt { - switch (a.sign, b.sign) { - case (.plus, .plus): - return BigInt(sign: .plus, magnitude: a.magnitude + b.magnitude) - case (.minus, .minus): - return BigInt(sign: .minus, magnitude: a.magnitude + b.magnitude) - case (.plus, .minus): - if a.magnitude >= b.magnitude { - return BigInt(sign: .plus, magnitude: a.magnitude - b.magnitude) - } - else { - return BigInt(sign: .minus, magnitude: b.magnitude - a.magnitude) - } - case (.minus, .plus): - if b.magnitude >= a.magnitude { - return BigInt(sign: .plus, magnitude: b.magnitude - a.magnitude) - } - else { - return BigInt(sign: .minus, magnitude: a.magnitude - b.magnitude) - } - } - } - - /// Add `b` to `a` in place. - public static func +=(a: inout BigInt, b: BigInt) { - a = a + b - } -} - diff --git a/Pods/BigInt/Sources/BigInt.swift b/Pods/BigInt/Sources/BigInt.swift deleted file mode 100644 index 11318ffc..00000000 --- a/Pods/BigInt/Sources/BigInt.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// BigInt.swift -// BigInt -// -// Created by Károly Lőrentey on 2015-12-27. -// Copyright © 2016-2017 Károly Lőrentey. -// - -//MARK: BigInt - -/// An arbitary precision signed integer type, also known as a "big integer". -/// -/// Operations on big integers never overflow, but they might take a long time to execute. -/// The amount of memory (and address space) available is the only constraint to the magnitude of these numbers. -/// -/// This particular big integer type uses base-2^64 digits to represent integers. -/// -/// `BigInt` is essentially a tiny wrapper that extends `BigUInt` with a sign bit and provides signed integer -/// operations. Both the underlying absolute value and the negative/positive flag are available as read-write -/// properties. -/// -/// Not all algorithms of `BigUInt` are available for `BigInt` values; for example, there is no square root or -/// primality test for signed integers. When you need to call one of these, just extract the absolute value: -/// -/// ```Swift -/// BigInt(255).abs.isPrime() // Returns false -/// ``` -/// -public struct BigInt: SignedInteger { - public enum Sign { - case plus - case minus - } - - public typealias Magnitude = BigUInt - - /// The type representing a digit in `BigInt`'s underlying number system. - public typealias Word = BigUInt.Word - - public static var isSigned: Bool { - return true - } - - /// The absolute value of this integer. - public var magnitude: BigUInt - - /// True iff the value of this integer is negative. - public var sign: Sign - - /// Initializes a new big integer with the provided absolute number and sign flag. - public init(sign: Sign, magnitude: BigUInt) { - self.sign = (magnitude.isZero ? .plus : sign) - self.magnitude = magnitude - } - - /// Return true iff this integer is zero. - /// - /// - Complexity: O(1) - public var isZero: Bool { - return magnitude.isZero - } - - /// Returns `-1` if this value is negative and `1` if it’s positive; otherwise, `0`. - /// - /// - Returns: The sign of this number, expressed as an integer of the same type. - public func signum() -> BigInt { - switch sign { - case .plus: - return isZero ? 0 : 1 - case .minus: - return -1 - } - } -} diff --git a/Pods/BigInt/Sources/BigUInt.swift b/Pods/BigInt/Sources/BigUInt.swift deleted file mode 100644 index 81aa9a83..00000000 --- a/Pods/BigInt/Sources/BigUInt.swift +++ /dev/null @@ -1,386 +0,0 @@ -// -// BigUInt.swift -// BigInt -// -// Created by Károly Lőrentey on 2015-12-26. -// Copyright © 2016-2017 Károly Lőrentey. -// - -/// An arbitary precision unsigned integer type, also known as a "big integer". -/// -/// Operations on big integers never overflow, but they may take a long time to execute. -/// The amount of memory (and address space) available is the only constraint to the magnitude of these numbers. -/// -/// This particular big integer type uses base-2^64 digits to represent integers; you can think of it as a wrapper -/// around `Array`. (In fact, `BigUInt` only uses an array if there are more than two digits.) -public struct BigUInt: UnsignedInteger { - /// The type representing a digit in `BigUInt`'s underlying number system. - public typealias Word = UInt - - /// The storage variants of a `BigUInt`. - enum Kind { - /// Value consists of the two specified words (low and high). Either or both words may be zero. - case inline(Word, Word) - /// Words are stored in a slice of the storage array. - case slice(from: Int, to: Int) - /// Words are stored in the storage array. - case array - } - - internal fileprivate (set) var kind: Kind // Internal for testing only - internal fileprivate (set) var storage: [Word] // Internal for testing only; stored separately to prevent COW copies - - /// Initializes a new BigUInt with value 0. - public init() { - self.kind = .inline(0, 0) - self.storage = [] - } - - internal init(word: Word) { - self.kind = .inline(word, 0) - self.storage = [] - } - - internal init(low: Word, high: Word) { - self.kind = .inline(low, high) - self.storage = [] - } - - /// Initializes a new BigUInt with the specified digits. The digits are ordered from least to most significant. - public init(words: [Word]) { - self.kind = .array - self.storage = words - normalize() - } - - internal init(words: [Word], from startIndex: Int, to endIndex: Int) { - self.kind = .slice(from: startIndex, to: endIndex) - self.storage = words - normalize() - } -} - -extension BigUInt { - public static var isSigned: Bool { - return false - } - - /// Return true iff this integer is zero. - /// - /// - Complexity: O(1) - var isZero: Bool { - switch kind { - case .inline(0, 0): return true - case .array: return storage.isEmpty - default: - return false - } - } - - /// Returns `1` if this value is, positive; otherwise, `0`. - /// - /// - Returns: The sign of this number, expressed as an integer of the same type. - public func signum() -> BigUInt { - return isZero ? 0 : 1 - } -} - -extension BigUInt { - mutating func ensureArray() { - switch kind { - case let .inline(w0, w1): - kind = .array - storage = w1 != 0 ? [w0, w1] - : w0 != 0 ? [w0] - : [] - case let .slice(from: start, to: end): - kind = .array - storage = Array(storage[start ..< end]) - case .array: - break - } - } - - var capacity: Int { - guard case .array = kind else { return 0 } - return storage.capacity - } - - mutating func reserveCapacity(_ minimumCapacity: Int) { - switch kind { - case let .inline(w0, w1): - kind = .array - storage.reserveCapacity(minimumCapacity) - if w1 != 0 { - storage.append(w0) - storage.append(w1) - } - else if w0 != 0 { - storage.append(w0) - } - case let .slice(from: start, to: end): - kind = .array - var words: [Word] = [] - words.reserveCapacity(Swift.max(end - start, minimumCapacity)) - words.append(contentsOf: storage[start ..< end]) - storage = words - case .array: - storage.reserveCapacity(minimumCapacity) - } - } - - /// Gets rid of leading zero digits in the digit array and converts slices into inline digits when possible. - internal mutating func normalize() { - switch kind { - case .slice(from: let start, to: var end): - assert(start >= 0 && end <= storage.count && start <= end) - while start < end, storage[end - 1] == 0 { - end -= 1 - } - switch end - start { - case 0: - kind = .inline(0, 0) - storage = [] - case 1: - kind = .inline(storage[start], 0) - storage = [] - case 2: - kind = .inline(storage[start], storage[start + 1]) - storage = [] - case storage.count: - assert(start == 0) - kind = .array - default: - kind = .slice(from: start, to: end) - } - case .array where storage.last == 0: - while storage.last == 0 { - storage.removeLast() - } - default: - break - } - } - - /// Set this integer to 0 without releasing allocated storage capacity (if any). - mutating func clear() { - self.load(0) - } - - /// Set this integer to `value` by copying its digits without releasing allocated storage capacity (if any). - mutating func load(_ value: BigUInt) { - switch kind { - case .inline, .slice: - self = value - case .array: - self.storage.removeAll(keepingCapacity: true) - self.storage.append(contentsOf: value.words) - } - } -} - -extension BigUInt { - //MARK: Collection-like members - - /// The number of digits in this integer, excluding leading zero digits. - var count: Int { - switch kind { - case let .inline(w0, w1): - return w1 != 0 ? 2 - : w0 != 0 ? 1 - : 0 - case let .slice(from: start, to: end): - return end - start - case .array: - return storage.count - } - } - - /// Get or set a digit at a given index. - /// - /// - Note: Unlike a normal collection, it is OK for the index to be greater than or equal to `endIndex`. - /// The subscripting getter returns zero for indexes beyond the most significant digit. - /// Setting these extended digits automatically appends new elements to the underlying digit array. - /// - Requires: index >= 0 - /// - Complexity: The getter is O(1). The setter is O(1) if the conditions below are true; otherwise it's O(count). - /// - The integer's storage is not shared with another integer - /// - The integer wasn't created as a slice of another integer - /// - `index < count` - subscript(_ index: Int) -> Word { - get { - precondition(index >= 0) - switch (kind, index) { - case (.inline(let w0, _), 0): return w0 - case (.inline(_, let w1), 1): return w1 - case (.slice(from: let start, to: let end), _) where index < end - start: - return storage[start + index] - case (.array, _) where index < storage.count: - return storage[index] - default: - return 0 - } - } - set(word) { - precondition(index >= 0) - switch (kind, index) { - case let (.inline(_, w1), 0): - kind = .inline(word, w1) - case let (.inline(w0, _), 1): - kind = .inline(w0, word) - case let (.slice(from: start, to: end), _) where index < end - start: - replace(at: index, with: word) - case (.array, _) where index < storage.count: - replace(at: index, with: word) - default: - extend(at: index, with: word) - } - } - } - - private mutating func replace(at index: Int, with word: Word) { - ensureArray() - precondition(index < storage.count) - storage[index] = word - if word == 0, index == storage.count - 1 { - normalize() - } - } - - private mutating func extend(at index: Int, with word: Word) { - guard word != 0 else { return } - reserveCapacity(index + 1) - precondition(index >= storage.count) - storage.append(contentsOf: repeatElement(0, count: index - storage.count)) - storage.append(word) - } - - /// Returns an integer built from the digits of this integer in the given range. - internal func extract(_ bounds: Range) -> BigUInt { - switch kind { - case let .inline(w0, w1): - let bounds = bounds.clamped(to: 0 ..< 2) - if bounds == 0 ..< 2 { - return BigUInt(low: w0, high: w1) - } - else if bounds == 0 ..< 1 { - return BigUInt(word: w0) - } - else if bounds == 1 ..< 2 { - return BigUInt(word: w1) - } - else { - return BigUInt() - } - case let .slice(from: start, to: end): - let s = Swift.min(end, start + Swift.max(bounds.lowerBound, 0)) - let e = Swift.max(s, (bounds.upperBound > end - start ? end : start + bounds.upperBound)) - return BigUInt(words: storage, from: s, to: e) - case .array: - let b = bounds.clamped(to: storage.startIndex ..< storage.endIndex) - return BigUInt(words: storage, from: b.lowerBound, to: b.upperBound) - } - } - - internal func extract(_ bounds: Bounds) -> BigUInt where Bounds.Bound == Int { - return self.extract(bounds.relative(to: 0 ..< Int.max)) - } -} - -extension BigUInt { - internal mutating func shiftRight(byWords amount: Int) { - assert(amount >= 0) - guard amount > 0 else { return } - switch kind { - case let .inline(_, w1) where amount == 1: - kind = .inline(w1, 0) - case .inline(_, _): - kind = .inline(0, 0) - case let .slice(from: start, to: end): - let s = start + amount - if s >= end { - kind = .inline(0, 0) - } - else { - kind = .slice(from: s, to: end) - normalize() - } - case .array: - if amount >= storage.count { - storage.removeAll(keepingCapacity: true) - } - else { - storage.removeFirst(amount) - } - } - } - - internal mutating func shiftLeft(byWords amount: Int) { - assert(amount >= 0) - guard amount > 0 else { return } - guard !isZero else { return } - switch kind { - case let .inline(w0, 0) where amount == 1: - kind = .inline(0, w0) - case let .inline(w0, w1): - let c = (w1 == 0 ? 1 : 2) - storage.reserveCapacity(amount + c) - storage.append(contentsOf: repeatElement(0, count: amount)) - storage.append(w0) - if w1 != 0 { - storage.append(w1) - } - kind = .array - case let .slice(from: start, to: end): - var words: [Word] = [] - words.reserveCapacity(amount + count) - words.append(contentsOf: repeatElement(0, count: amount)) - words.append(contentsOf: storage[start ..< end]) - storage = words - kind = .array - case .array: - storage.insert(contentsOf: repeatElement(0, count: amount), at: 0) - } - } -} - -extension BigUInt { - //MARK: Low and High - - /// Split this integer into a high-order and a low-order part. - /// - /// - Requires: count > 1 - /// - Returns: `(low, high)` such that - /// - `self == low.add(high, shiftedBy: middleIndex)` - /// - `high.width <= floor(width / 2)` - /// - `low.width <= ceil(width / 2)` - /// - Complexity: Typically O(1), but O(count) in the worst case, because high-order zero digits need to be removed after the split. - internal var split: (high: BigUInt, low: BigUInt) { - precondition(count > 1) - let mid = middleIndex - return (self.extract(mid...), self.extract(.. 1 - internal var low: BigUInt { - return self.extract(0 ..< middleIndex) - } - - /// The high-order half of this BigUInt. - /// - /// - Returns: `self[middleIndex ..< count]` - /// - Requires: count > 1 - internal var high: BigUInt { - return self.extract(middleIndex ..< count) - } -} - diff --git a/Pods/BigInt/Sources/Bitwise Ops.swift b/Pods/BigInt/Sources/Bitwise Ops.swift deleted file mode 100644 index 0d00148b..00000000 --- a/Pods/BigInt/Sources/Bitwise Ops.swift +++ /dev/null @@ -1,121 +0,0 @@ -// -// Bitwise Ops.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -//MARK: Bitwise Operations - -extension BigUInt { - /// Return the ones' complement of `a`. - /// - /// - Complexity: O(a.count) - public static prefix func ~(a: BigUInt) -> BigUInt { - return BigUInt(words: a.words.map { ~$0 }) - } - - /// Calculate the bitwise OR of `a` and `b`, and store the result in `a`. - /// - /// - Complexity: O(max(a.count, b.count)) - public static func |= (a: inout BigUInt, b: BigUInt) { - a.reserveCapacity(b.count) - for i in 0 ..< b.count { - a[i] |= b[i] - } - } - - /// Calculate the bitwise AND of `a` and `b` and return the result. - /// - /// - Complexity: O(max(a.count, b.count)) - public static func &= (a: inout BigUInt, b: BigUInt) { - for i in 0 ..< Swift.max(a.count, b.count) { - a[i] &= b[i] - } - } - - /// Calculate the bitwise XOR of `a` and `b` and return the result. - /// - /// - Complexity: O(max(a.count, b.count)) - public static func ^= (a: inout BigUInt, b: BigUInt) { - a.reserveCapacity(b.count) - for i in 0 ..< b.count { - a[i] ^= b[i] - } - } -} - -extension BigInt { - public static prefix func ~(x: BigInt) -> BigInt { - switch x.sign { - case .plus: - return BigInt(sign: .minus, magnitude: x.magnitude + 1) - case .minus: - return BigInt(sign: .plus, magnitude: x.magnitude - 1) - } - } - - public static func &(lhs: inout BigInt, rhs: BigInt) -> BigInt { - let left = lhs.words - let right = rhs.words - // Note we aren't using left.count/right.count here; we account for the sign bit separately later. - let count = Swift.max(lhs.magnitude.count, rhs.magnitude.count) - var words: [UInt] = [] - words.reserveCapacity(count) - for i in 0 ..< count { - words.append(left[i] & right[i]) - } - if lhs.sign == .minus && rhs.sign == .minus { - words.twosComplement() - return BigInt(sign: .minus, magnitude: BigUInt(words: words)) - } - return BigInt(sign: .plus, magnitude: BigUInt(words: words)) - } - - public static func |(lhs: inout BigInt, rhs: BigInt) -> BigInt { - let left = lhs.words - let right = rhs.words - // Note we aren't using left.count/right.count here; we account for the sign bit separately later. - let count = Swift.max(lhs.magnitude.count, rhs.magnitude.count) - var words: [UInt] = [] - words.reserveCapacity(count) - for i in 0 ..< count { - words.append(left[i] | right[i]) - } - if lhs.sign == .minus || rhs.sign == .minus { - words.twosComplement() - return BigInt(sign: .minus, magnitude: BigUInt(words: words)) - } - return BigInt(sign: .plus, magnitude: BigUInt(words: words)) - } - - public static func ^(lhs: inout BigInt, rhs: BigInt) -> BigInt { - let left = lhs.words - let right = rhs.words - // Note we aren't using left.count/right.count here; we account for the sign bit separately later. - let count = Swift.max(lhs.magnitude.count, rhs.magnitude.count) - var words: [UInt] = [] - words.reserveCapacity(count) - for i in 0 ..< count { - words.append(left[i] ^ right[i]) - } - if (lhs.sign == .minus) != (rhs.sign == .minus) { - words.twosComplement() - return BigInt(sign: .minus, magnitude: BigUInt(words: words)) - } - return BigInt(sign: .plus, magnitude: BigUInt(words: words)) - } - - public static func &=(lhs: inout BigInt, rhs: BigInt) { - lhs = lhs & rhs - } - - public static func |=(lhs: inout BigInt, rhs: BigInt) { - lhs = lhs | rhs - } - - public static func ^=(lhs: inout BigInt, rhs: BigInt) { - lhs = lhs ^ rhs - } -} diff --git a/Pods/BigInt/Sources/Codable.swift b/Pods/BigInt/Sources/Codable.swift deleted file mode 100644 index b53b30be..00000000 --- a/Pods/BigInt/Sources/Codable.swift +++ /dev/null @@ -1,155 +0,0 @@ -// -// Codable.swift -// BigInt -// -// Created by Károly Lőrentey on 2017-8-11. -// Copyright © 2016-2017 Károly Lőrentey. -// - - -// Little-endian to big-endian -struct Units: RandomAccessCollection -where Words.Element: FixedWidthInteger, Words.Index == Int { - typealias Word = Words.Element - let words: Words - init(of type: Unit.Type, _ words: Words) { - precondition(Word.bitWidth % Unit.bitWidth == 0 || Unit.bitWidth % Word.bitWidth == 0) - self.words = words - } - var count: Int { return (words.count * Word.bitWidth + Unit.bitWidth - 1) / Unit.bitWidth } - var startIndex: Int { return 0 } - var endIndex: Int { return count } - subscript(_ index: Int) -> Unit { - let index = count - 1 - index - if Unit.bitWidth == Word.bitWidth { - return Unit(words[index]) - } - else if Unit.bitWidth > Word.bitWidth { - let c = Unit.bitWidth / Word.bitWidth - var unit: Unit = 0 - var j = 0 - for i in (c * index) ..< Swift.min(c * (index + 1), words.endIndex) { - unit |= Unit(words[i]) << j - j += Word.bitWidth - } - return unit - } - // Unit.bitWidth < Word.bitWidth - let c = Word.bitWidth / Unit.bitWidth - let i = index / c - let j = index % c - return Unit(truncatingIfNeeded: words[i] >> (j * Unit.bitWidth)) - } -} - -extension Array where Element: FixedWidthInteger { - // Big-endian to little-endian - init(count: Int?, generator: () throws -> Unit?) rethrows { - typealias Word = Element - precondition(Word.bitWidth % Unit.bitWidth == 0 || Unit.bitWidth % Word.bitWidth == 0) - self = [] - if Unit.bitWidth == Word.bitWidth { - if let count = count { - self.reserveCapacity(count) - } - while let unit = try generator() { - self.append(Word(unit)) - } - } - else if Unit.bitWidth > Word.bitWidth { - let wordsPerUnit = Unit.bitWidth / Word.bitWidth - if let count = count { - self.reserveCapacity(count * wordsPerUnit) - } - while let unit = try generator() { - var shift = Unit.bitWidth - Word.bitWidth - while shift >= 0 { - self.append(Word(truncatingIfNeeded: unit >> shift)) - shift -= Word.bitWidth - } - } - } - else { - let unitsPerWord = Word.bitWidth / Unit.bitWidth - if let count = count { - self.reserveCapacity((count + unitsPerWord - 1) / unitsPerWord) - } - var word: Word = 0 - var c = 0 - while let unit = try generator() { - word <<= Unit.bitWidth - word |= Word(unit) - c += Unit.bitWidth - if c == Word.bitWidth { - self.append(word) - word = 0 - c = 0 - } - } - if c > 0 { - self.append(word << c) - var shifted: Word = 0 - for i in self.indices { - let word = self[i] - self[i] = shifted | (word >> c) - shifted = word << (Word.bitWidth - c) - } - } - } - self.reverse() - } -} - -extension BigInt: Codable { - public init(from decoder: Decoder) throws { - var container = try decoder.unkeyedContainer() - - // Decode sign - let sign: BigInt.Sign - switch try container.decode(String.self) { - case "+": - sign = .plus - case "-": - sign = .minus - default: - throw DecodingError.dataCorrupted(.init(codingPath: container.codingPath, - debugDescription: "Invalid big integer sign")) - } - - // Decode magnitude - let words = try [UInt](count: container.count?.advanced(by: -1)) { () -> UInt64? in - guard !container.isAtEnd else { return nil } - return try container.decode(UInt64.self) - } - let magnitude = BigUInt(words: words) - - self.init(sign: sign, magnitude: magnitude) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.unkeyedContainer() - try container.encode(sign == .plus ? "+" : "-") - let units = Units(of: UInt64.self, self.magnitude.words) - if units.isEmpty { - try container.encode(0 as UInt64) - } - else { - try container.encode(contentsOf: units) - } - } -} - -extension BigUInt: Codable { - public init(from decoder: Decoder) throws { - let value = try BigInt(from: decoder) - guard value.sign == .plus else { - throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath, - debugDescription: "BigUInt cannot hold a negative value")) - } - self = value.magnitude - } - - public func encode(to encoder: Encoder) throws { - try BigInt(sign: .plus, magnitude: self).encode(to: encoder) - } -} diff --git a/Pods/BigInt/Sources/Comparable.swift b/Pods/BigInt/Sources/Comparable.swift deleted file mode 100644 index d9ab87e7..00000000 --- a/Pods/BigInt/Sources/Comparable.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// Comparable.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -import Foundation - -extension BigUInt: Comparable { - //MARK: Comparison - - /// Compare `a` to `b` and return an `NSComparisonResult` indicating their order. - /// - /// - Complexity: O(count) - public static func compare(_ a: BigUInt, _ b: BigUInt) -> ComparisonResult { - if a.count != b.count { return a.count > b.count ? .orderedDescending : .orderedAscending } - for i in (0 ..< a.count).reversed() { - let ad = a[i] - let bd = b[i] - if ad != bd { return ad > bd ? .orderedDescending : .orderedAscending } - } - return .orderedSame - } - - /// Return true iff `a` is equal to `b`. - /// - /// - Complexity: O(count) - public static func ==(a: BigUInt, b: BigUInt) -> Bool { - return BigUInt.compare(a, b) == .orderedSame - } - - /// Return true iff `a` is less than `b`. - /// - /// - Complexity: O(count) - public static func <(a: BigUInt, b: BigUInt) -> Bool { - return BigUInt.compare(a, b) == .orderedAscending - } -} - -extension BigInt { - /// Return true iff `a` is equal to `b`. - public static func ==(a: BigInt, b: BigInt) -> Bool { - return a.sign == b.sign && a.magnitude == b.magnitude - } - - /// Return true iff `a` is less than `b`. - public static func <(a: BigInt, b: BigInt) -> Bool { - switch (a.sign, b.sign) { - case (.plus, .plus): - return a.magnitude < b.magnitude - case (.plus, .minus): - return false - case (.minus, .plus): - return true - case (.minus, .minus): - return a.magnitude > b.magnitude - } - } -} - - diff --git a/Pods/BigInt/Sources/Data Conversion.swift b/Pods/BigInt/Sources/Data Conversion.swift deleted file mode 100644 index 25c65521..00000000 --- a/Pods/BigInt/Sources/Data Conversion.swift +++ /dev/null @@ -1,179 +0,0 @@ -// -// Data Conversion.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-04. -// Copyright © 2016-2017 Károly Lőrentey. -// - -import Foundation - -extension BigUInt { - //MARK: NSData Conversion - - /// Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer - public init(_ buffer: UnsafeRawBufferPointer) { - // This assumes Word is binary. - precondition(Word.bitWidth % 8 == 0) - - self.init() - - let length = buffer.count - guard length > 0 else { return } - let bytesPerDigit = Word.bitWidth / 8 - var index = length / bytesPerDigit - var c = bytesPerDigit - length % bytesPerDigit - if c == bytesPerDigit { - c = 0 - index -= 1 - } - - var word: Word = 0 - for byte in buffer { - word <<= 8 - word += Word(byte) - c += 1 - if c == bytesPerDigit { - self[index] = word - index -= 1 - c = 0 - word = 0 - } - } - assert(c == 0 && word == 0 && index == -1) - } - - - /// Initializes an integer from the bits stored inside a piece of `Data`. - /// The data is assumed to be in network (big-endian) byte order. - public init(_ data: Data) { - // This assumes Word is binary. - precondition(Word.bitWidth % 8 == 0) - - self.init() - - let length = data.count - guard length > 0 else { return } - let bytesPerDigit = Word.bitWidth / 8 - var index = length / bytesPerDigit - var c = bytesPerDigit - length % bytesPerDigit - if c == bytesPerDigit { - c = 0 - index -= 1 - } - let word: Word = data.withUnsafeBytes { buffPtr in - var word: Word = 0 - let p = buffPtr.bindMemory(to: UInt8.self) - for byte in p { - word <<= 8 - word += Word(byte) - c += 1 - if c == bytesPerDigit { - self[index] = word - index -= 1 - c = 0 - word = 0 - } - } - return word - } - assert(c == 0 && word == 0 && index == -1) - } - - /// Return a `Data` value that contains the base-256 representation of this integer, in network (big-endian) byte order. - public func serialize() -> Data { - // This assumes Digit is binary. - precondition(Word.bitWidth % 8 == 0) - - let byteCount = (self.bitWidth + 7) / 8 - - guard byteCount > 0 else { return Data() } - - var data = Data(count: byteCount) - data.withUnsafeMutableBytes { buffPtr in - let p = buffPtr.bindMemory(to: UInt8.self) - var i = byteCount - 1 - for var word in self.words { - for _ in 0 ..< Word.bitWidth / 8 { - p[i] = UInt8(word & 0xFF) - word >>= 8 - if i == 0 { - assert(word == 0) - break - } - i -= 1 - } - } - } - return data - } -} - -extension BigInt { - - /// Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer, - /// where the first byte indicates sign (0 for positive, 1 for negative) - public init(_ buffer: UnsafeRawBufferPointer) { - // This assumes Word is binary. - precondition(Word.bitWidth % 8 == 0) - - self.init() - - let length = buffer.count - - // Serialized data for a BigInt should contain at least 2 bytes: one representing - // the sign, and another for the non-zero magnitude. Zero is represented by an - // empty Data struct, and negative zero is not supported. - guard length > 1, let firstByte = buffer.first else { return } - - // The first byte gives the sign - // This byte is compared to a bitmask to allow additional functionality to be added - // to this byte in the future. - self.sign = firstByte & 0b1 == 0 ? .plus : .minus - - self.magnitude = BigUInt(UnsafeRawBufferPointer(rebasing: buffer.dropFirst(1))) - } - - /// Initializes an integer from the bits stored inside a piece of `Data`. - /// The data is assumed to be in network (big-endian) byte order with a first - /// byte to represent the sign (0 for positive, 1 for negative) - public init(_ data: Data) { - // This assumes Word is binary. - // This is the same assumption made when initializing BigUInt from Data - precondition(Word.bitWidth % 8 == 0) - - self.init() - - // Serialized data for a BigInt should contain at least 2 bytes: one representing - // the sign, and another for the non-zero magnitude. Zero is represented by an - // empty Data struct, and negative zero is not supported. - guard data.count > 1, let firstByte = data.first else { return } - - // The first byte gives the sign - // This byte is compared to a bitmask to allow additional functionality to be added - // to this byte in the future. - self.sign = firstByte & 0b1 == 0 ? .plus : .minus - - // The remaining bytes are read and stored as the magnitude - self.magnitude = BigUInt(data.dropFirst(1)) - } - - /// Return a `Data` value that contains the base-256 representation of this integer, in network (big-endian) byte order and a prepended byte to indicate the sign (0 for positive, 1 for negative) - public func serialize() -> Data { - // Create a data object for the magnitude portion of the BigInt - let magnitudeData = self.magnitude.serialize() - - // Similar to BigUInt, a value of 0 should return an initialized, empty Data struct - guard magnitudeData.count > 0 else { return magnitudeData } - - // Create a new Data struct for the signed BigInt value - var data = Data(capacity: magnitudeData.count + 1) - - // The first byte should be 0 for a positive value, or 1 for a negative value - // i.e., the sign bit is the LSB - data.append(self.sign == .plus ? 0 : 1) - - data.append(magnitudeData) - return data - } -} diff --git a/Pods/BigInt/Sources/Division.swift b/Pods/BigInt/Sources/Division.swift deleted file mode 100644 index 4393f52e..00000000 --- a/Pods/BigInt/Sources/Division.swift +++ /dev/null @@ -1,374 +0,0 @@ -// -// Division.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -//MARK: Full-width multiplication and division - -extension FixedWidthInteger where Magnitude == Self { - private var halfShift: Self { - return Self(Self.bitWidth / 2) - - } - private var high: Self { - return self &>> halfShift - } - - private var low: Self { - let mask: Self = 1 &<< halfShift - 1 - return self & mask - } - - private var upshifted: Self { - return self &<< halfShift - } - - private var split: (high: Self, low: Self) { - return (self.high, self.low) - } - - private init(_ value: (high: Self, low: Self)) { - self = value.high.upshifted + value.low - } - - /// Divide the double-width integer `dividend` by `self` and return the quotient and remainder. - /// - /// - Requires: `dividend.high < self`, so that the result will fit in a single digit. - /// - Complexity: O(1) with 2 divisions, 6 multiplications and ~12 or so additions/subtractions. - internal func fastDividingFullWidth(_ dividend: (high: Self, low: Self.Magnitude)) -> (quotient: Self, remainder: Self) { - // Division is complicated; doing it with single-digit operations is maddeningly complicated. - // This is a Swift adaptation for "divlu2" in Hacker's Delight, - // which is in turn a C adaptation of Knuth's Algorithm D (TAOCP vol 2, 4.3.1). - precondition(dividend.high < self) - - // This replaces the implementation in stdlib, which is much slower. - // FIXME: Speed up stdlib. It should use full-width idiv on Intel processors, and - // fall back to a reasonably fast algorithm elsewhere. - - // The trick here is that we're actually implementing a 4/2 long division using half-words, - // with the long division loop unrolled into two 3/2 half-word divisions. - // Luckily, 3/2 half-word division can be approximated by a single full-word division operation - // that, when the divisor is normalized, differs from the correct result by at most 2. - - /// Find the half-word quotient in `u / vn`, which must be normalized. - /// `u` contains three half-words in the two halves of `u.high` and the lower half of - /// `u.low`. (The weird distribution makes for a slightly better fit with the input.) - /// `vn` contains the normalized divisor, consisting of two half-words. - /// - /// - Requires: u.high < vn && u.low.high == 0 && vn.leadingZeroBitCount == 0 - func quotient(dividing u: (high: Self, low: Self), by vn: Self) -> Self { - let (vn1, vn0) = vn.split - // Get approximate quotient. - let (q, r) = u.high.quotientAndRemainder(dividingBy: vn1) - let p = q * vn0 - // q is often already correct, but sometimes the approximation overshoots by at most 2. - // The code that follows checks for this while being careful to only perform single-digit operations. - if q.high == 0 && p <= r.upshifted + u.low { return q } - let r2 = r + vn1 - if r2.high != 0 { return q - 1 } - if (q - 1).high == 0 && p - vn0 <= r2.upshifted + u.low { return q - 1 } - //assert((r + 2 * vn1).high != 0 || p - 2 * vn0 <= (r + 2 * vn1).upshifted + u.low) - return q - 2 - } - /// Divide 3 half-digits by 2 half-digits to get a half-digit quotient and a full-digit remainder. - /// - /// - Requires: u.high < v && u.low.high == 0 && vn.width = width(Digit) - func quotientAndRemainder(dividing u: (high: Self, low: Self), by v: Self) -> (quotient: Self, remainder: Self) { - let q = quotient(dividing: u, by: v) - // Note that `uh.low` masks off a couple of bits, and `q * v` and the - // subtraction are likely to overflow. Despite this, the end result (remainder) will - // still be correct and it will fit inside a single (full) Digit. - let r = Self(u) &- q &* v - assert(r < v) - return (q, r) - } - - // Normalize the dividend and the divisor (self) such that the divisor has no leading zeroes. - let z = Self(self.leadingZeroBitCount) - let w = Self(Self.bitWidth) - z - let vn = self << z - - let un32 = (z == 0 ? dividend.high : (dividend.high &<< z) | (dividend.low &>> w)) // No bits are lost - let un10 = dividend.low &<< z - let (un1, un0) = un10.split - - // Divide `(un32,un10)` by `vn`, splitting the full 4/2 division into two 3/2 ones. - let (q1, un21) = quotientAndRemainder(dividing: (un32, un1), by: vn) - let (q0, rn) = quotientAndRemainder(dividing: (un21, un0), by: vn) - - // Undo normalization of the remainder and combine the two halves of the quotient. - let mod = rn >> z - let div = Self((q1, q0)) - return (div, mod) - } - - /// Return the quotient of the 3/2-word division `x/y` as a single word. - /// - /// - Requires: (x.0, x.1) <= y && y.0.high != 0 - /// - Returns: The exact value when it fits in a single word, otherwise `Self`. - static func approximateQuotient(dividing x: (Self, Self, Self), by y: (Self, Self)) -> Self { - // Start with q = (x.0, x.1) / y.0, (or Word.max on overflow) - var q: Self - var r: Self - if x.0 == y.0 { - q = Self.max - let (s, o) = x.0.addingReportingOverflow(x.1) - if o { return q } - r = s - } - else { - (q, r) = y.0.fastDividingFullWidth((x.0, x.1)) - } - // Now refine q by considering x.2 and y.1. - // Note that since y is normalized, q * y - x is between 0 and 2. - let (ph, pl) = q.multipliedFullWidth(by: y.1) - if ph < r || (ph == r && pl <= x.2) { return q } - - let (r1, ro) = r.addingReportingOverflow(y.0) - if ro { return q - 1 } - - let (pl1, so) = pl.subtractingReportingOverflow(y.1) - let ph1 = (so ? ph - 1 : ph) - - if ph1 < r1 || (ph1 == r1 && pl1 <= x.2) { return q - 1 } - return q - 2 - } -} - -extension BigUInt { - //MARK: Division - - /// Divide this integer by the word `y`, leaving the quotient in its place and returning the remainder. - /// - /// - Requires: y > 0 - /// - Complexity: O(count) - internal mutating func divide(byWord y: Word) -> Word { - precondition(y > 0) - if y == 1 { return 0 } - - var remainder: Word = 0 - for i in (0 ..< count).reversed() { - let u = self[i] - (self[i], remainder) = y.fastDividingFullWidth((remainder, u)) - } - return remainder - } - - /// Divide this integer by the word `y` and return the resulting quotient and remainder. - /// - /// - Requires: y > 0 - /// - Returns: (quotient, remainder) where quotient = floor(x/y), remainder = x - quotient * y - /// - Complexity: O(x.count) - internal func quotientAndRemainder(dividingByWord y: Word) -> (quotient: BigUInt, remainder: Word) { - var div = self - let mod = div.divide(byWord: y) - return (div, mod) - } - - /// Divide `x` by `y`, putting the quotient in `x` and the remainder in `y`. - /// Reusing integers like this reduces the number of allocations during the calculation. - static func divide(_ x: inout BigUInt, by y: inout BigUInt) { - // This is a Swift adaptation of "divmnu" from Hacker's Delight, which is in - // turn a C adaptation of Knuth's Algorithm D (TAOCP vol 2, 4.3.1). - - precondition(!y.isZero) - - // First, let's take care of the easy cases. - if x < y { - (x, y) = (0, x) - return - } - if y.count == 1 { - // The single-word case reduces to a simpler loop. - y = BigUInt(x.divide(byWord: y[0])) - return - } - - // In the hard cases, we will perform the long division algorithm we learned in school. - // It works by successively calculating the single-word quotient of the top y.count + 1 - // words of x divided by y, replacing the top of x with the remainder, and repeating - // the process one word lower. - // - // The tricky part is that the algorithm needs to be able to do n+1/n word divisions, - // but we only have a primitive for dividing two words by a single - // word. (Remember that this step is also tricky when we do it on paper!) - // - // The solution is that the long division can be approximated by a single full division - // using just the most significant words. We can then use multiplications and - // subtractions to refine the approximation until we get the correct quotient word. - // - // We could do this by doing a simple 2/1 full division, but Knuth goes one step further, - // and implements a 3/2 division. This results in an exact approximation in the - // vast majority of cases, eliminating an extra subtraction over big integers. - // - // The function `approximateQuotient` above implements Knuth's 3/2 division algorithm. - // It requires that the divisor's most significant word is larger than - // Word.max / 2. This ensures that the approximation has tiny error bounds, - // which is what makes this entire approach viable. - // To satisfy this requirement, we will normalize the division by multiplying - // both the divisor and the dividend by the same (small) factor. - let z = y.leadingZeroBitCount - y <<= z - x <<= z // We'll calculate the remainder in the normalized dividend. - var quotient = BigUInt() - assert(y.leadingZeroBitCount == 0) - - // We're ready to start the long division! - let dc = y.count - let d1 = y[dc - 1] - let d0 = y[dc - 2] - var product: BigUInt = 0 - for j in (dc ... x.count).reversed() { - // Approximate dividing the top dc+1 words of `remainder` using the topmost 3/2 words. - let r2 = x[j] - let r1 = x[j - 1] - let r0 = x[j - 2] - let q = Word.approximateQuotient(dividing: (r2, r1, r0), by: (d1, d0)) - - // Multiply the entire divisor with `q` and subtract the result from remainder. - // Normalization ensures the 3/2 quotient will either be exact for the full division, or - // it may overshoot by at most 1, in which case the product will be greater - // than the remainder. - product.load(y) - product.multiply(byWord: q) - if product <= x.extract(j - dc ..< j + 1) { - x.subtract(product, shiftedBy: j - dc) - quotient[j - dc] = q - } - else { - // This case is extremely rare -- it has a probability of 1/2^(Word.bitWidth - 1). - x.add(y, shiftedBy: j - dc) - x.subtract(product, shiftedBy: j - dc) - quotient[j - dc] = q - 1 - } - } - // The remainder's normalization needs to be undone, but otherwise we're done. - x >>= z - y = x - x = quotient - } - - /// Divide `x` by `y`, putting the remainder in `x`. - mutating func formRemainder(dividingBy y: BigUInt, normalizedBy shift: Int) { - precondition(!y.isZero) - assert(y.leadingZeroBitCount == 0) - if y.count == 1 { - let remainder = self.divide(byWord: y[0] >> shift) - self.load(BigUInt(remainder)) - return - } - self <<= shift - if self >= y { - let dc = y.count - let d1 = y[dc - 1] - let d0 = y[dc - 2] - var product: BigUInt = 0 - for j in (dc ... self.count).reversed() { - let r2 = self[j] - let r1 = self[j - 1] - let r0 = self[j - 2] - let q = Word.approximateQuotient(dividing: (r2, r1, r0), by: (d1, d0)) - product.load(y) - product.multiply(byWord: q) - if product <= self.extract(j - dc ..< j + 1) { - self.subtract(product, shiftedBy: j - dc) - } - else { - self.add(y, shiftedBy: j - dc) - self.subtract(product, shiftedBy: j - dc) - } - } - } - self >>= shift - } - - - /// Divide this integer by `y` and return the resulting quotient and remainder. - /// - /// - Requires: `y > 0` - /// - Returns: `(quotient, remainder)` where `quotient = floor(self/y)`, `remainder = self - quotient * y` - /// - Complexity: O(count^2) - public func quotientAndRemainder(dividingBy y: BigUInt) -> (quotient: BigUInt, remainder: BigUInt) { - var x = self - var y = y - BigUInt.divide(&x, by: &y) - return (x, y) - } - - /// Divide `x` by `y` and return the quotient. - /// - /// - Note: Use `divided(by:)` if you also need the remainder. - public static func /(x: BigUInt, y: BigUInt) -> BigUInt { - return x.quotientAndRemainder(dividingBy: y).quotient - } - - /// Divide `x` by `y` and return the remainder. - /// - /// - Note: Use `divided(by:)` if you also need the remainder. - public static func %(x: BigUInt, y: BigUInt) -> BigUInt { - var x = x - let shift = y.leadingZeroBitCount - x.formRemainder(dividingBy: y << shift, normalizedBy: shift) - return x - } - - /// Divide `x` by `y` and store the quotient in `x`. - /// - /// - Note: Use `divided(by:)` if you also need the remainder. - public static func /=(x: inout BigUInt, y: BigUInt) { - var y = y - BigUInt.divide(&x, by: &y) - } - - /// Divide `x` by `y` and store the remainder in `x`. - /// - /// - Note: Use `divided(by:)` if you also need the remainder. - public static func %=(x: inout BigUInt, y: BigUInt) { - let shift = y.leadingZeroBitCount - x.formRemainder(dividingBy: y << shift, normalizedBy: shift) - } -} - -extension BigInt { - /// Divide this integer by `y` and return the resulting quotient and remainder. - /// - /// - Requires: `y > 0` - /// - Returns: `(quotient, remainder)` where `quotient = floor(self/y)`, `remainder = self - quotient * y` - /// - Complexity: O(count^2) - public func quotientAndRemainder(dividingBy y: BigInt) -> (quotient: BigInt, remainder: BigInt) { - var a = self.magnitude - var b = y.magnitude - BigUInt.divide(&a, by: &b) - return (BigInt(sign: self.sign == y.sign ? .plus : .minus, magnitude: a), - BigInt(sign: self.sign, magnitude: b)) - } - - /// Divide `a` by `b` and return the quotient. Traps if `b` is zero. - public static func /(a: BigInt, b: BigInt) -> BigInt { - return BigInt(sign: a.sign == b.sign ? .plus : .minus, magnitude: a.magnitude / b.magnitude) - } - - /// Divide `a` by `b` and return the remainder. The result has the same sign as `a`. - public static func %(a: BigInt, b: BigInt) -> BigInt { - return BigInt(sign: a.sign, magnitude: a.magnitude % b.magnitude) - } - - /// Return the result of `a` mod `b`. The result is always a nonnegative integer that is less than the absolute value of `b`. - public func modulus(_ mod: BigInt) -> BigInt { - let remainder = self.magnitude % mod.magnitude - return BigInt( - self.sign == .minus && !remainder.isZero - ? mod.magnitude - remainder - : remainder) - } -} - -extension BigInt { - /// Divide `a` by `b` storing the quotient in `a`. - public static func /=(a: inout BigInt, b: BigInt) { a = a / b } - /// Divide `a` by `b` storing the remainder in `a`. - public static func %=(a: inout BigInt, b: BigInt) { a = a % b } -} diff --git a/Pods/BigInt/Sources/Exponentiation.swift b/Pods/BigInt/Sources/Exponentiation.swift deleted file mode 100644 index 9d7ee85d..00000000 --- a/Pods/BigInt/Sources/Exponentiation.swift +++ /dev/null @@ -1,119 +0,0 @@ -// -// Exponentiation.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - //MARK: Exponentiation - - /// Returns this integer raised to the power `exponent`. - /// - /// This function calculates the result by [successively squaring the base while halving the exponent][expsqr]. - /// - /// [expsqr]: https://en.wikipedia.org/wiki/Exponentiation_by_squaring - /// - /// - Note: This function can be unreasonably expensive for large exponents, which is why `exponent` is - /// a simple integer value. If you want to calculate big exponents, you'll probably need to use - /// the modulo arithmetic variant. - /// - Returns: 1 if `exponent == 0`, otherwise `self` raised to `exponent`. (This implies that `0.power(0) == 1`.) - /// - SeeAlso: `BigUInt.power(_:, modulus:)` - /// - Complexity: O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too. - public func power(_ exponent: Int) -> BigUInt { - if exponent == 0 { return 1 } - if exponent == 1 { return self } - if exponent < 0 { - precondition(!self.isZero) - return self == 1 ? 1 : 0 - } - if self <= 1 { return self } - var result = BigUInt(1) - var b = self - var e = exponent - while e > 0 { - if e & 1 == 1 { - result *= b - } - e >>= 1 - b *= b - } - return result - } - - /// Returns the remainder of this integer raised to the power `exponent` in modulo arithmetic under `modulus`. - /// - /// Uses the [right-to-left binary method][rtlb]. - /// - /// [rtlb]: https://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method - /// - /// - Complexity: O(exponent.count * modulus.count^log2(3)) or somesuch - public func power(_ exponent: BigUInt, modulus: BigUInt) -> BigUInt { - precondition(!modulus.isZero) - if modulus == (1 as BigUInt) { return 0 } - let shift = modulus.leadingZeroBitCount - let normalizedModulus = modulus << shift - var result = BigUInt(1) - var b = self - b.formRemainder(dividingBy: normalizedModulus, normalizedBy: shift) - for var e in exponent.words { - for _ in 0 ..< Word.bitWidth { - if e & 1 == 1 { - result *= b - result.formRemainder(dividingBy: normalizedModulus, normalizedBy: shift) - } - e >>= 1 - b *= b - b.formRemainder(dividingBy: normalizedModulus, normalizedBy: shift) - } - } - return result - } -} - -extension BigInt { - /// Returns this integer raised to the power `exponent`. - /// - /// This function calculates the result by [successively squaring the base while halving the exponent][expsqr]. - /// - /// [expsqr]: https://en.wikipedia.org/wiki/Exponentiation_by_squaring - /// - /// - Note: This function can be unreasonably expensive for large exponents, which is why `exponent` is - /// a simple integer value. If you want to calculate big exponents, you'll probably need to use - /// the modulo arithmetic variant. - /// - Returns: 1 if `exponent == 0`, otherwise `self` raised to `exponent`. (This implies that `0.power(0) == 1`.) - /// - SeeAlso: `BigUInt.power(_:, modulus:)` - /// - Complexity: O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too. - public func power(_ exponent: Int) -> BigInt { - return BigInt(sign: self.sign == .minus && exponent & 1 != 0 ? .minus : .plus, - magnitude: self.magnitude.power(exponent)) - } - - /// Returns the remainder of this integer raised to the power `exponent` in modulo arithmetic under `modulus`. - /// - /// Uses the [right-to-left binary method][rtlb]. - /// - /// [rtlb]: https://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method - /// - /// - Complexity: O(exponent.count * modulus.count^log2(3)) or somesuch - public func power(_ exponent: BigInt, modulus: BigInt) -> BigInt { - precondition(!modulus.isZero) - if modulus.magnitude == 1 { return 0 } - if exponent.isZero { return 1 } - if exponent == 1 { return self.modulus(modulus) } - if exponent < 0 { - precondition(!self.isZero) - guard magnitude == 1 else { return 0 } - guard sign == .minus else { return 1 } - guard exponent.magnitude[0] & 1 != 0 else { return 1 } - return BigInt(modulus.magnitude - 1) - } - let power = self.magnitude.power(exponent.magnitude, - modulus: modulus.magnitude) - if self.sign == .plus || exponent.magnitude[0] & 1 == 0 || power.isZero { - return BigInt(power) - } - return BigInt(modulus.magnitude - power) - } -} diff --git a/Pods/BigInt/Sources/Floating Point Conversion.swift b/Pods/BigInt/Sources/Floating Point Conversion.swift deleted file mode 100644 index 6c2395a3..00000000 --- a/Pods/BigInt/Sources/Floating Point Conversion.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// Floating Point Conversion.swift -// BigInt -// -// Created by Károly Lőrentey on 2017-08-11. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - public init?(exactly source: T) { - guard source.isFinite else { return nil } - guard !source.isZero else { self = 0; return } - guard source.sign == .plus else { return nil } - let value = source.rounded(.towardZero) - guard value == source else { return nil } - assert(value.floatingPointClass == .positiveNormal) - assert(value.exponent >= 0) - let significand = value.significandBitPattern - self = (BigUInt(1) << value.exponent) + BigUInt(significand) >> (T.significandBitCount - Int(value.exponent)) - } - - public init(_ source: T) { - self.init(exactly: source.rounded(.towardZero))! - } -} - -extension BigInt { - public init?(exactly source: T) { - switch source.sign{ - case .plus: - guard let magnitude = BigUInt(exactly: source) else { return nil } - self = BigInt(sign: .plus, magnitude: magnitude) - case .minus: - guard let magnitude = BigUInt(exactly: -source) else { return nil } - self = BigInt(sign: .minus, magnitude: magnitude) - } - } - - public init(_ source: T) { - self.init(exactly: source.rounded(.towardZero))! - } -} - -extension BinaryFloatingPoint where RawExponent: FixedWidthInteger, RawSignificand: FixedWidthInteger { - public init(_ value: BigInt) { - guard !value.isZero else { self = 0; return } - let v = value.magnitude - let bitWidth = v.bitWidth - var exponent = bitWidth - 1 - let shift = bitWidth - Self.significandBitCount - 1 - var significand = value.magnitude >> (shift - 1) - if significand[0] & 3 == 3 { // Handle rounding - significand >>= 1 - significand += 1 - if significand.trailingZeroBitCount >= Self.significandBitCount { - exponent += 1 - } - } - else { - significand >>= 1 - } - let bias = 1 << (Self.exponentBitCount - 1) - 1 - guard exponent <= bias else { self = Self.infinity; return } - significand &= 1 << Self.significandBitCount - 1 - self = Self.init(sign: value.sign == .plus ? .plus : .minus, - exponentBitPattern: RawExponent(bias + exponent), - significandBitPattern: RawSignificand(significand)) - } - - public init(_ value: BigUInt) { - self.init(BigInt(sign: .plus, magnitude: value)) - } -} diff --git a/Pods/BigInt/Sources/GCD.swift b/Pods/BigInt/Sources/GCD.swift deleted file mode 100644 index d55605dc..00000000 --- a/Pods/BigInt/Sources/GCD.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// GCD.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - //MARK: Greatest Common Divisor - - /// Returns the greatest common divisor of `self` and `b`. - /// - /// - Complexity: O(count^2) where count = max(self.count, b.count) - public func greatestCommonDivisor(with b: BigUInt) -> BigUInt { - // This is Stein's algorithm: https://en.wikipedia.org/wiki/Binary_GCD_algorithm - if self.isZero { return b } - if b.isZero { return self } - - let az = self.trailingZeroBitCount - let bz = b.trailingZeroBitCount - let twos = Swift.min(az, bz) - - var (x, y) = (self >> az, b >> bz) - if x < y { swap(&x, &y) } - - while !x.isZero { - x >>= x.trailingZeroBitCount - if x < y { swap(&x, &y) } - x -= y - } - return y << twos - } - - /// Returns the [multiplicative inverse of this integer in modulo `modulus` arithmetic][inverse], - /// or `nil` if there is no such number. - /// - /// [inverse]: https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Modular_integers - /// - /// - Returns: If `gcd(self, modulus) == 1`, the value returned is an integer `a < modulus` such that `(a * self) % modulus == 1`. If `self` and `modulus` aren't coprime, the return value is `nil`. - /// - Requires: modulus > 1 - /// - Complexity: O(count^3) - public func inverse(_ modulus: BigUInt) -> BigUInt? { - precondition(modulus > 1) - var t1 = BigInt(0) - var t2 = BigInt(1) - var r1 = modulus - var r2 = self - while !r2.isZero { - let quotient = r1 / r2 - (t1, t2) = (t2, t1 - BigInt(quotient) * t2) - (r1, r2) = (r2, r1 - quotient * r2) - } - if r1 > 1 { return nil } - if t1.sign == .minus { return modulus - t1.magnitude } - return t1.magnitude - } -} - -extension BigInt { - /// Returns the greatest common divisor of `a` and `b`. - /// - /// - Complexity: O(count^2) where count = max(a.count, b.count) - public func greatestCommonDivisor(with b: BigInt) -> BigInt { - return BigInt(self.magnitude.greatestCommonDivisor(with: b.magnitude)) - } - - /// Returns the [multiplicative inverse of this integer in modulo `modulus` arithmetic][inverse], - /// or `nil` if there is no such number. - /// - /// [inverse]: https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Modular_integers - /// - /// - Returns: If `gcd(self, modulus) == 1`, the value returned is an integer `a < modulus` such that `(a * self) % modulus == 1`. If `self` and `modulus` aren't coprime, the return value is `nil`. - /// - Requires: modulus.magnitude > 1 - /// - Complexity: O(count^3) - public func inverse(_ modulus: BigInt) -> BigInt? { - guard let inv = self.magnitude.inverse(modulus.magnitude) else { return nil } - return BigInt(self.sign == .plus || inv.isZero ? inv : modulus.magnitude - inv) - } -} diff --git a/Pods/BigInt/Sources/Hashable.swift b/Pods/BigInt/Sources/Hashable.swift deleted file mode 100644 index c5dc0e64..00000000 --- a/Pods/BigInt/Sources/Hashable.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// Hashable.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt: Hashable { - //MARK: Hashing - - /// Append this `BigUInt` to the specified hasher. - public func hash(into hasher: inout Hasher) { - for word in self.words { - hasher.combine(word) - } - } -} - -extension BigInt: Hashable { - /// Append this `BigInt` to the specified hasher. - public func hash(into hasher: inout Hasher) { - hasher.combine(sign) - hasher.combine(magnitude) - } -} diff --git a/Pods/BigInt/Sources/Integer Conversion.swift b/Pods/BigInt/Sources/Integer Conversion.swift deleted file mode 100644 index 9a210e4a..00000000 --- a/Pods/BigInt/Sources/Integer Conversion.swift +++ /dev/null @@ -1,89 +0,0 @@ -// -// Integer Conversion.swift -// BigInt -// -// Created by Károly Lőrentey on 2017-08-11. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - public init?(exactly source: T) { - guard source >= (0 as T) else { return nil } - if source.bitWidth <= 2 * Word.bitWidth { - var it = source.words.makeIterator() - self.init(low: it.next() ?? 0, high: it.next() ?? 0) - precondition(it.next() == nil, "Length of BinaryInteger.words is greater than its bitWidth") - } - else { - self.init(words: source.words) - } - } - - public init(_ source: T) { - precondition(source >= (0 as T), "BigUInt cannot represent negative values") - self.init(exactly: source)! - } - - public init(truncatingIfNeeded source: T) { - self.init(words: source.words) - } - - public init(clamping source: T) { - if source <= (0 as T) { - self.init() - } - else { - self.init(words: source.words) - } - } -} - -extension BigInt { - public init() { - self.init(sign: .plus, magnitude: 0) - } - - /// Initializes a new signed big integer with the same value as the specified unsigned big integer. - public init(_ integer: BigUInt) { - self.magnitude = integer - self.sign = .plus - } - - public init(_ source: T) where T : BinaryInteger { - if source >= (0 as T) { - self.init(sign: .plus, magnitude: BigUInt(source)) - } - else { - var words = Array(source.words) - words.twosComplement() - self.init(sign: .minus, magnitude: BigUInt(words: words)) - } - } - - public init?(exactly source: T) where T : BinaryInteger { - self.init(source) - } - - public init(clamping source: T) where T : BinaryInteger { - self.init(source) - } - - public init(truncatingIfNeeded source: T) where T : BinaryInteger { - self.init(source) - } -} - -extension BigUInt: ExpressibleByIntegerLiteral { - /// Initialize a new big integer from an integer literal. - public init(integerLiteral value: UInt64) { - self.init(value) - } -} - -extension BigInt: ExpressibleByIntegerLiteral { - /// Initialize a new big integer from an integer literal. - public init(integerLiteral value: Int64) { - self.init(value) - } -} - diff --git a/Pods/BigInt/Sources/Multiplication.swift b/Pods/BigInt/Sources/Multiplication.swift deleted file mode 100644 index 635c36a5..00000000 --- a/Pods/BigInt/Sources/Multiplication.swift +++ /dev/null @@ -1,165 +0,0 @@ -// -// Multiplication.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - - //MARK: Multiplication - - /// Multiply this big integer by a single word, and store the result in place of the original big integer. - /// - /// - Complexity: O(count) - public mutating func multiply(byWord y: Word) { - guard y != 0 else { self = 0; return } - guard y != 1 else { return } - var carry: Word = 0 - let c = self.count - for i in 0 ..< c { - let (h, l) = self[i].multipliedFullWidth(by: y) - let (low, o) = l.addingReportingOverflow(carry) - self[i] = low - carry = (o ? h + 1 : h) - } - self[c] = carry - } - - /// Multiply this big integer by a single Word, and return the result. - /// - /// - Complexity: O(count) - public func multiplied(byWord y: Word) -> BigUInt { - var r = self - r.multiply(byWord: y) - return r - } - - /// Multiply `x` by `y`, and add the result to this integer, optionally shifted `shift` words to the left. - /// - /// - Note: This is the fused multiply/shift/add operation; it is more efficient than doing the components - /// individually. (The fused operation doesn't need to allocate space for temporary big integers.) - /// - Returns: `self` is set to `self + (x * y) << (shift * 2^Word.bitWidth)` - /// - Complexity: O(count) - public mutating func multiplyAndAdd(_ x: BigUInt, _ y: Word, shiftedBy shift: Int = 0) { - precondition(shift >= 0) - guard y != 0 && x.count > 0 else { return } - guard y != 1 else { self.add(x, shiftedBy: shift); return } - var mulCarry: Word = 0 - var addCarry = false - let xc = x.count - var xi = 0 - while xi < xc || addCarry || mulCarry > 0 { - let (h, l) = x[xi].multipliedFullWidth(by: y) - let (low, o) = l.addingReportingOverflow(mulCarry) - mulCarry = (o ? h + 1 : h) - - let ai = shift + xi - let (sum1, so1) = self[ai].addingReportingOverflow(low) - if addCarry { - let (sum2, so2) = sum1.addingReportingOverflow(1) - self[ai] = sum2 - addCarry = so1 || so2 - } - else { - self[ai] = sum1 - addCarry = so1 - } - xi += 1 - } - } - - /// Multiply this integer by `y` and return the result. - /// - /// - Note: This uses the naive O(n^2) multiplication algorithm unless both arguments have more than - /// `BigUInt.directMultiplicationLimit` words. - /// - Complexity: O(n^log2(3)) - public func multiplied(by y: BigUInt) -> BigUInt { - // This method is mostly defined for symmetry with the rest of the arithmetic operations. - return self * y - } - - /// Multiplication switches to an asymptotically better recursive algorithm when arguments have more words than this limit. - public static var directMultiplicationLimit: Int = 1024 - - /// Multiply `a` by `b` and return the result. - /// - /// - Note: This uses the naive O(n^2) multiplication algorithm unless both arguments have more than - /// `BigUInt.directMultiplicationLimit` words. - /// - Complexity: O(n^log2(3)) - public static func *(x: BigUInt, y: BigUInt) -> BigUInt { - let xc = x.count - let yc = y.count - if xc == 0 { return BigUInt() } - if yc == 0 { return BigUInt() } - if yc == 1 { return x.multiplied(byWord: y[0]) } - if xc == 1 { return y.multiplied(byWord: x[0]) } - - if Swift.min(xc, yc) <= BigUInt.directMultiplicationLimit { - // Long multiplication. - let left = (xc < yc ? y : x) - let right = (xc < yc ? x : y) - var result = BigUInt() - for i in (0 ..< right.count).reversed() { - result.multiplyAndAdd(left, right[i], shiftedBy: i) - } - return result - } - - if yc < xc { - let (xh, xl) = x.split - var r = xl * y - r.add(xh * y, shiftedBy: x.middleIndex) - return r - } - else if xc < yc { - let (yh, yl) = y.split - var r = yl * x - r.add(yh * x, shiftedBy: y.middleIndex) - return r - } - - let shift = x.middleIndex - - // Karatsuba multiplication: - // x * y = * = (ignoring carry) - let (a, b) = x.split - let (c, d) = y.split - - let high = a * c - let low = b * d - let xp = a >= b - let yp = c >= d - let xm = (xp ? a - b : b - a) - let ym = (yp ? c - d : d - c) - let m = xm * ym - - var r = low - r.add(high, shiftedBy: 2 * shift) - r.add(low, shiftedBy: shift) - r.add(high, shiftedBy: shift) - if xp == yp { - r.subtract(m, shiftedBy: shift) - } - else { - r.add(m, shiftedBy: shift) - } - return r - } - - /// Multiply `a` by `b` and store the result in `a`. - public static func *=(a: inout BigUInt, b: BigUInt) { - a = a * b - } -} - -extension BigInt { - /// Multiply `a` with `b` and return the result. - public static func *(a: BigInt, b: BigInt) -> BigInt { - return BigInt(sign: a.sign == b.sign ? .plus : .minus, magnitude: a.magnitude * b.magnitude) - } - - /// Multiply `a` with `b` in place. - public static func *=(a: inout BigInt, b: BigInt) { a = a * b } -} diff --git a/Pods/BigInt/Sources/Prime Test.swift b/Pods/BigInt/Sources/Prime Test.swift deleted file mode 100644 index 7f187110..00000000 --- a/Pods/BigInt/Sources/Prime Test.swift +++ /dev/null @@ -1,153 +0,0 @@ -// -// Prime Test.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-04. -// Copyright © 2016-2017 Károly Lőrentey. -// - -/// The first several [prime numbers][primes]. -/// -/// [primes]: https://oeis.org/A000040 -let primes: [BigUInt.Word] = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41] - -/// The ith element in this sequence is the smallest composite number that passes the strong probable prime test -/// for all of the first (i+1) primes. -/// -/// This is sequence [A014233](http://oeis.org/A014233) on the [Online Encyclopaedia of Integer Sequences](http://oeis.org). -let pseudoPrimes: [BigUInt] = [ - /* 2 */ 2_047, - /* 3 */ 1_373_653, - /* 5 */ 25_326_001, - /* 7 */ 3_215_031_751, - /* 11 */ 2_152_302_898_747, - /* 13 */ 3_474_749_660_383, - /* 17 */ 341_550_071_728_321, - /* 19 */ 341_550_071_728_321, - /* 23 */ 3_825_123_056_546_413_051, - /* 29 */ 3_825_123_056_546_413_051, - /* 31 */ 3_825_123_056_546_413_051, - /* 37 */ "318665857834031151167461", - /* 41 */ "3317044064679887385961981", -] - -extension BigUInt { - //MARK: Primality Testing - - /// Returns true iff this integer passes the [strong probable prime test][sppt] for the specified base. - /// - /// [sppt]: https://en.wikipedia.org/wiki/Probable_prime - public func isStrongProbablePrime(_ base: BigUInt) -> Bool { - precondition(base > (1 as BigUInt)) - precondition(self > (0 as BigUInt)) - let dec = self - 1 - - let r = dec.trailingZeroBitCount - let d = dec >> r - - var test = base.power(d, modulus: self) - if test == 1 || test == dec { return true } - - if r > 0 { - let shift = self.leadingZeroBitCount - let normalized = self << shift - for _ in 1 ..< r { - test *= test - test.formRemainder(dividingBy: normalized, normalizedBy: shift) - if test == 1 { - return false - } - if test == dec { return true } - } - } - return false - } - - /// Returns true if this integer is probably prime. Returns false if this integer is definitely not prime. - /// - /// This function performs a probabilistic [Miller-Rabin Primality Test][mrpt], consisting of `rounds` iterations, - /// each calculating the strong probable prime test for a random base. The number of rounds is 10 by default, - /// but you may specify your own choice. - /// - /// To speed things up, the function checks if `self` is divisible by the first few prime numbers before - /// diving into (slower) Miller-Rabin testing. - /// - /// Also, when `self` is less than 82 bits wide, `isPrime` does a deterministic test that is guaranteed to - /// return a correct result. - /// - /// [mrpt]: https://en.wikipedia.org/wiki/Miller–Rabin_primality_test - public func isPrime(rounds: Int = 10) -> Bool { - if count <= 1 && self[0] < 2 { return false } - if count == 1 && self[0] < 4 { return true } - - // Even numbers above 2 aren't prime. - if self[0] & 1 == 0 { return false } - - // Quickly check for small primes. - for i in 1 ..< primes.count { - let p = primes[i] - if self.count == 1 && self[0] == p { - return true - } - if self.quotientAndRemainder(dividingByWord: p).remainder == 0 { - return false - } - } - - /// Give an exact answer when we can. - if self < pseudoPrimes.last! { - for i in 0 ..< pseudoPrimes.count { - guard isStrongProbablePrime(BigUInt(primes[i])) else { - break - } - if self < pseudoPrimes[i] { - // `self` is below the lowest pseudoprime corresponding to the prime bases we tested. It's a prime! - return true - } - } - return false - } - - /// Otherwise do as many rounds of random SPPT as required. - for _ in 0 ..< rounds { - let random = BigUInt.randomInteger(lessThan: self - 2) + 2 - guard isStrongProbablePrime(random) else { - return false - } - } - - // Well, it smells primey to me. - return true - } -} - -extension BigInt { - //MARK: Primality Testing - - /// Returns true iff this integer passes the [strong probable prime test][sppt] for the specified base. - /// - /// [sppt]: https://en.wikipedia.org/wiki/Probable_prime - public func isStrongProbablePrime(_ base: BigInt) -> Bool { - precondition(base.sign == .plus) - if self.sign == .minus { return false } - return self.magnitude.isStrongProbablePrime(base.magnitude) - } - - /// Returns true if this integer is probably prime. Returns false if this integer is definitely not prime. - /// - /// This function performs a probabilistic [Miller-Rabin Primality Test][mrpt], consisting of `rounds` iterations, - /// each calculating the strong probable prime test for a random base. The number of rounds is 10 by default, - /// but you may specify your own choice. - /// - /// To speed things up, the function checks if `self` is divisible by the first few prime numbers before - /// diving into (slower) Miller-Rabin testing. - /// - /// Also, when `self` is less than 82 bits wide, `isPrime` does a deterministic test that is guaranteed to - /// return a correct result. - /// - /// [mrpt]: https://en.wikipedia.org/wiki/Miller–Rabin_primality_test - public func isPrime(rounds: Int = 10) -> Bool { - if self.sign == .minus { return false } - return self.magnitude.isPrime(rounds: rounds) - } -} diff --git a/Pods/BigInt/Sources/Random.swift b/Pods/BigInt/Sources/Random.swift deleted file mode 100644 index bea98caf..00000000 --- a/Pods/BigInt/Sources/Random.swift +++ /dev/null @@ -1,101 +0,0 @@ -// -// Random.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-04. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - /// Create a big unsigned integer consisting of `width` uniformly distributed random bits. - /// - /// - Parameter width: The maximum number of one bits in the result. - /// - Parameter generator: The source of randomness. - /// - Returns: A big unsigned integer less than `1 << width`. - public static func randomInteger(withMaximumWidth width: Int, using generator: inout RNG) -> BigUInt { - var result = BigUInt.zero - var bitsLeft = width - var i = 0 - let wordsNeeded = (width + Word.bitWidth - 1) / Word.bitWidth - if wordsNeeded > 2 { - result.reserveCapacity(wordsNeeded) - } - while bitsLeft >= Word.bitWidth { - result[i] = generator.next() - i += 1 - bitsLeft -= Word.bitWidth - } - if bitsLeft > 0 { - let mask: Word = (1 << bitsLeft) - 1 - result[i] = (generator.next() as Word) & mask - } - return result - } - - /// Create a big unsigned integer consisting of `width` uniformly distributed random bits. - /// - /// - Note: I use a `SystemRandomGeneratorGenerator` as the source of randomness. - /// - /// - Parameter width: The maximum number of one bits in the result. - /// - Returns: A big unsigned integer less than `1 << width`. - public static func randomInteger(withMaximumWidth width: Int) -> BigUInt { - var rng = SystemRandomNumberGenerator() - return randomInteger(withMaximumWidth: width, using: &rng) - } - - /// Create a big unsigned integer consisting of `width-1` uniformly distributed random bits followed by a one bit. - /// - /// - Note: If `width` is zero, the result is zero. - /// - /// - Parameter width: The number of bits required to represent the answer. - /// - Parameter generator: The source of randomness. - /// - Returns: A random big unsigned integer whose width is `width`. - public static func randomInteger(withExactWidth width: Int, using generator: inout RNG) -> BigUInt { - // width == 0 -> return 0 because there is no room for a one bit. - // width == 1 -> return 1 because there is no room for any random bits. - guard width > 1 else { return BigUInt(width) } - var result = randomInteger(withMaximumWidth: width - 1, using: &generator) - result[(width - 1) / Word.bitWidth] |= 1 << Word((width - 1) % Word.bitWidth) - return result - } - - /// Create a big unsigned integer consisting of `width-1` uniformly distributed random bits followed by a one bit. - /// - /// - Note: If `width` is zero, the result is zero. - /// - Note: I use a `SystemRandomGeneratorGenerator` as the source of randomness. - /// - /// - Returns: A random big unsigned integer whose width is `width`. - public static func randomInteger(withExactWidth width: Int) -> BigUInt { - var rng = SystemRandomNumberGenerator() - return randomInteger(withExactWidth: width, using: &rng) - } - - /// Create a uniformly distributed random unsigned integer that's less than the specified limit. - /// - /// - Precondition: `limit > 0`. - /// - /// - Parameter limit: The upper bound on the result. - /// - Parameter generator: The source of randomness. - /// - Returns: A random big unsigned integer that is less than `limit`. - public static func randomInteger(lessThan limit: BigUInt, using generator: inout RNG) -> BigUInt { - precondition(limit > 0, "\(#function): 0 is not a valid limit") - let width = limit.bitWidth - var random = randomInteger(withMaximumWidth: width, using: &generator) - while random >= limit { - random = randomInteger(withMaximumWidth: width, using: &generator) - } - return random - } - - /// Create a uniformly distributed random unsigned integer that's less than the specified limit. - /// - /// - Precondition: `limit > 0`. - /// - Note: I use a `SystemRandomGeneratorGenerator` as the source of randomness. - /// - /// - Parameter limit: The upper bound on the result. - /// - Returns: A random big unsigned integer that is less than `limit`. - public static func randomInteger(lessThan limit: BigUInt) -> BigUInt { - var rng = SystemRandomNumberGenerator() - return randomInteger(lessThan: limit, using: &rng) - } -} diff --git a/Pods/BigInt/Sources/Shifts.swift b/Pods/BigInt/Sources/Shifts.swift deleted file mode 100644 index e676e414..00000000 --- a/Pods/BigInt/Sources/Shifts.swift +++ /dev/null @@ -1,211 +0,0 @@ -// -// Shifts.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - - //MARK: Shift Operators - - internal func shiftedLeft(by amount: Word) -> BigUInt { - guard amount > 0 else { return self } - - let ext = Int(amount / Word(Word.bitWidth)) // External shift amount (new words) - let up = Word(amount % Word(Word.bitWidth)) // Internal shift amount (subword shift) - let down = Word(Word.bitWidth) - up - - var result = BigUInt() - if up > 0 { - var i = 0 - var lowbits: Word = 0 - while i < self.count || lowbits > 0 { - let word = self[i] - result[i + ext] = word << up | lowbits - lowbits = word >> down - i += 1 - } - } - else { - for i in 0 ..< self.count { - result[i + ext] = self[i] - } - } - return result - } - - internal mutating func shiftLeft(by amount: Word) { - guard amount > 0 else { return } - - let ext = Int(amount / Word(Word.bitWidth)) // External shift amount (new words) - let up = Word(amount % Word(Word.bitWidth)) // Internal shift amount (subword shift) - let down = Word(Word.bitWidth) - up - - if up > 0 { - var i = 0 - var lowbits: Word = 0 - while i < self.count || lowbits > 0 { - let word = self[i] - self[i] = word << up | lowbits - lowbits = word >> down - i += 1 - } - } - if ext > 0 && self.count > 0 { - self.shiftLeft(byWords: ext) - } - } - - internal func shiftedRight(by amount: Word) -> BigUInt { - guard amount > 0 else { return self } - guard amount < self.bitWidth else { return 0 } - - let ext = Int(amount / Word(Word.bitWidth)) // External shift amount (new words) - let down = Word(amount % Word(Word.bitWidth)) // Internal shift amount (subword shift) - let up = Word(Word.bitWidth) - down - - var result = BigUInt() - if down > 0 { - var highbits: Word = 0 - for i in (ext ..< self.count).reversed() { - let word = self[i] - result[i - ext] = highbits | word >> down - highbits = word << up - } - } - else { - for i in (ext ..< self.count).reversed() { - result[i - ext] = self[i] - } - } - return result - } - - internal mutating func shiftRight(by amount: Word) { - guard amount > 0 else { return } - guard amount < self.bitWidth else { self.clear(); return } - - let ext = Int(amount / Word(Word.bitWidth)) // External shift amount (new words) - let down = Word(amount % Word(Word.bitWidth)) // Internal shift amount (subword shift) - let up = Word(Word.bitWidth) - down - - if ext > 0 { - self.shiftRight(byWords: ext) - } - if down > 0 { - var i = self.count - 1 - var highbits: Word = 0 - while i >= 0 { - let word = self[i] - self[i] = highbits | word >> down - highbits = word << up - i -= 1 - } - } - } - - public static func >>=(lhs: inout BigUInt, rhs: Other) { - if rhs < (0 as Other) { - lhs <<= (0 - rhs) - } - else if rhs >= lhs.bitWidth { - lhs.clear() - } - else { - lhs.shiftRight(by: UInt(rhs)) - } - } - - public static func <<=(lhs: inout BigUInt, rhs: Other) { - if rhs < (0 as Other) { - lhs >>= (0 - rhs) - return - } - lhs.shiftLeft(by: Word(exactly: rhs)!) - } - - public static func >>(lhs: BigUInt, rhs: Other) -> BigUInt { - if rhs < (0 as Other) { - return lhs << (0 - rhs) - } - if rhs > Word.max { - return 0 - } - return lhs.shiftedRight(by: UInt(rhs)) - } - - public static func <<(lhs: BigUInt, rhs: Other) -> BigUInt { - if rhs < (0 as Other) { - return lhs >> (0 - rhs) - } - return lhs.shiftedLeft(by: Word(exactly: rhs)!) - } -} - -extension BigInt { - func shiftedLeft(by amount: Word) -> BigInt { - return BigInt(sign: self.sign, magnitude: self.magnitude.shiftedLeft(by: amount)) - } - - mutating func shiftLeft(by amount: Word) { - self.magnitude.shiftLeft(by: amount) - } - - func shiftedRight(by amount: Word) -> BigInt { - let m = self.magnitude.shiftedRight(by: amount) - return BigInt(sign: self.sign, magnitude: self.sign == .minus && m.isZero ? 1 : m) - } - - mutating func shiftRight(by amount: Word) { - magnitude.shiftRight(by: amount) - if sign == .minus, magnitude.isZero { - magnitude.load(1) - } - } - - public static func &<<(left: BigInt, right: BigInt) -> BigInt { - return left.shiftedLeft(by: right.words[0]) - } - - public static func &<<=(left: inout BigInt, right: BigInt) { - left.shiftLeft(by: right.words[0]) - } - - public static func &>>(left: BigInt, right: BigInt) -> BigInt { - return left.shiftedRight(by: right.words[0]) - } - - public static func &>>=(left: inout BigInt, right: BigInt) { - left.shiftRight(by: right.words[0]) - } - - public static func <<(lhs: BigInt, rhs: Other) -> BigInt { - guard rhs >= (0 as Other) else { return lhs >> (0 - rhs) } - return lhs.shiftedLeft(by: Word(rhs)) - } - - public static func <<=(lhs: inout BigInt, rhs: Other) { - if rhs < (0 as Other) { - lhs >>= (0 - rhs) - } - else { - lhs.shiftLeft(by: Word(rhs)) - } - } - - public static func >>(lhs: BigInt, rhs: Other) -> BigInt { - guard rhs >= (0 as Other) else { return lhs << (0 - rhs) } - return lhs.shiftedRight(by: Word(rhs)) - } - - public static func >>=(lhs: inout BigInt, rhs: Other) { - if rhs < (0 as Other) { - lhs <<= (0 - rhs) - } - else { - lhs.shiftRight(by: Word(rhs)) - } - } -} diff --git a/Pods/BigInt/Sources/Square Root.swift b/Pods/BigInt/Sources/Square Root.swift deleted file mode 100644 index 68db0691..00000000 --- a/Pods/BigInt/Sources/Square Root.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// Square Root.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -//MARK: Square Root - -extension BigUInt { - /// Returns the integer square root of a big integer; i.e., the largest integer whose square isn't greater than `value`. - /// - /// - Returns: floor(sqrt(self)) - public func squareRoot() -> BigUInt { - // This implementation uses Newton's method. - guard !self.isZero else { return BigUInt() } - var x = BigUInt(1) << ((self.bitWidth + 1) / 2) - var y: BigUInt = 0 - while true { - y.load(self) - y /= x - y += x - y >>= 1 - if x == y || x == y - 1 { break } - x = y - } - return x - } -} - -extension BigInt { - /// Returns the integer square root of a big integer; i.e., the largest integer whose square isn't greater than `value`. - /// - /// - Requires: self >= 0 - /// - Returns: floor(sqrt(self)) - public func squareRoot() -> BigInt { - precondition(self.sign == .plus) - return BigInt(sign: .plus, magnitude: self.magnitude.squareRoot()) - } -} diff --git a/Pods/BigInt/Sources/Strideable.swift b/Pods/BigInt/Sources/Strideable.swift deleted file mode 100644 index 2b79babd..00000000 --- a/Pods/BigInt/Sources/Strideable.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Strideable.swift -// BigInt -// -// Created by Károly Lőrentey on 2017-08-11. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt: Strideable { - /// A type that can represent the distance between two values ofa `BigUInt`. - public typealias Stride = BigInt - - /// Adds `n` to `self` and returns the result. Traps if the result would be less than zero. - public func advanced(by n: BigInt) -> BigUInt { - return n.sign == .minus ? self - n.magnitude : self + n.magnitude - } - - /// Returns the (potentially negative) difference between `self` and `other` as a `BigInt`. Never traps. - public func distance(to other: BigUInt) -> BigInt { - return BigInt(other) - BigInt(self) - } -} - -extension BigInt: Strideable { - public typealias Stride = BigInt - - /// Returns `self + n`. - public func advanced(by n: Stride) -> BigInt { - return self + n - } - - /// Returns `other - self`. - public func distance(to other: BigInt) -> Stride { - return other - self - } -} - - diff --git a/Pods/BigInt/Sources/String Conversion.swift b/Pods/BigInt/Sources/String Conversion.swift deleted file mode 100644 index d6f340c9..00000000 --- a/Pods/BigInt/Sources/String Conversion.swift +++ /dev/null @@ -1,236 +0,0 @@ -// -// String Conversion.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - - //MARK: String Conversion - - /// Calculates the number of numerals in a given radix that fit inside a single `Word`. - /// - /// - Returns: (chars, power) where `chars` is highest that satisfy `radix^chars <= 2^Word.bitWidth`. `power` is zero - /// if radix is a power of two; otherwise `power == radix^chars`. - fileprivate static func charsPerWord(forRadix radix: Int) -> (chars: Int, power: Word) { - var power: Word = 1 - var overflow = false - var count = 0 - while !overflow { - let (p, o) = power.multipliedReportingOverflow(by: Word(radix)) - overflow = o - if !o || p == 0 { - count += 1 - power = p - } - } - return (count, power) - } - - /// Initialize a big integer from an ASCII representation in a given radix. Numerals above `9` are represented by - /// letters from the English alphabet. - /// - /// - Requires: `radix > 1 && radix < 36` - /// - Parameter `text`: A string consisting of characters corresponding to numerals in the given radix. (0-9, a-z, A-Z) - /// - Parameter `radix`: The base of the number system to use, or 10 if unspecified. - /// - Returns: The integer represented by `text`, or nil if `text` contains a character that does not represent a numeral in `radix`. - public init?(_ text: S, radix: Int = 10) { - precondition(radix > 1) - let (charsPerWord, power) = BigUInt.charsPerWord(forRadix: radix) - - var words: [Word] = [] - var end = text.endIndex - var start = end - var count = 0 - while start != text.startIndex { - start = text.index(before: start) - count += 1 - if count == charsPerWord { - guard let d = Word.init(text[start ..< end], radix: radix) else { return nil } - words.append(d) - end = start - count = 0 - } - } - if start != end { - guard let d = Word.init(text[start ..< end], radix: radix) else { return nil } - words.append(d) - } - - if power == 0 { - self.init(words: words) - } - else { - self.init() - for d in words.reversed() { - self.multiply(byWord: power) - self.addWord(d) - } - } - } -} - -extension BigInt { - /// Initialize a big integer from an ASCII representation in a given radix. Numerals above `9` are represented by - /// letters from the English alphabet. - /// - /// - Requires: `radix > 1 && radix < 36` - /// - Parameter `text`: A string optionally starting with "-" or "+" followed by characters corresponding to numerals in the given radix. (0-9, a-z, A-Z) - /// - Parameter `radix`: The base of the number system to use, or 10 if unspecified. - /// - Returns: The integer represented by `text`, or nil if `text` contains a character that does not represent a numeral in `radix`. - public init?(_ text: S, radix: Int = 10) { - var magnitude: BigUInt? - var sign: Sign = .plus - if text.first == "-" { - sign = .minus - let text = text.dropFirst() - magnitude = BigUInt(text, radix: radix) - } - else if text.first == "+" { - let text = text.dropFirst() - magnitude = BigUInt(text, radix: radix) - } - else { - magnitude = BigUInt(text, radix: radix) - } - guard let m = magnitude else { return nil } - self.magnitude = m - self.sign = sign - } -} - -extension String { - /// Initialize a new string with the base-10 representation of an unsigned big integer. - /// - /// - Complexity: O(v.count^2) - public init(_ v: BigUInt) { self.init(v, radix: 10, uppercase: false) } - - /// Initialize a new string representing an unsigned big integer in the given radix (base). - /// - /// Numerals greater than 9 are represented as letters from the English alphabet, - /// starting with `a` if `uppercase` is false or `A` otherwise. - /// - /// - Requires: radix > 1 && radix <= 36 - /// - Complexity: O(count) when radix is a power of two; otherwise O(count^2). - public init(_ v: BigUInt, radix: Int, uppercase: Bool = false) { - precondition(radix > 1) - let (charsPerWord, power) = BigUInt.charsPerWord(forRadix: radix) - - guard !v.isZero else { self = "0"; return } - - var parts: [String] - if power == 0 { - parts = v.words.map { String($0, radix: radix, uppercase: uppercase) } - } - else { - parts = [] - var rest = v - while !rest.isZero { - let mod = rest.divide(byWord: power) - parts.append(String(mod, radix: radix, uppercase: uppercase)) - } - } - assert(!parts.isEmpty) - - self = "" - var first = true - for part in parts.reversed() { - let zeroes = charsPerWord - part.count - assert(zeroes >= 0) - if !first && zeroes > 0 { - // Insert leading zeroes for mid-Words - self += String(repeating: "0", count: zeroes) - } - first = false - self += part - } - } - - /// Initialize a new string representing a signed big integer in the given radix (base). - /// - /// Numerals greater than 9 are represented as letters from the English alphabet, - /// starting with `a` if `uppercase` is false or `A` otherwise. - /// - /// - Requires: radix > 1 && radix <= 36 - /// - Complexity: O(count) when radix is a power of two; otherwise O(count^2). - public init(_ value: BigInt, radix: Int = 10, uppercase: Bool = false) { - self = String(value.magnitude, radix: radix, uppercase: uppercase) - if value.sign == .minus { - self = "-" + self - } - } -} - -extension BigUInt: ExpressibleByStringLiteral { - /// Initialize a new big integer from a Unicode scalar. - /// The scalar must represent a decimal digit. - public init(unicodeScalarLiteral value: UnicodeScalar) { - self = BigUInt(String(value), radix: 10)! - } - - /// Initialize a new big integer from an extended grapheme cluster. - /// The cluster must consist of a decimal digit. - public init(extendedGraphemeClusterLiteral value: String) { - self = BigUInt(value, radix: 10)! - } - - /// Initialize a new big integer from a decimal number represented by a string literal of arbitrary length. - /// The string must contain only decimal digits. - public init(stringLiteral value: StringLiteralType) { - self = BigUInt(value, radix: 10)! - } -} - -extension BigInt: ExpressibleByStringLiteral { - /// Initialize a new big integer from a Unicode scalar. - /// The scalar must represent a decimal digit. - public init(unicodeScalarLiteral value: UnicodeScalar) { - self = BigInt(String(value), radix: 10)! - } - - /// Initialize a new big integer from an extended grapheme cluster. - /// The cluster must consist of a decimal digit. - public init(extendedGraphemeClusterLiteral value: String) { - self = BigInt(value, radix: 10)! - } - - /// Initialize a new big integer from a decimal number represented by a string literal of arbitrary length. - /// The string must contain only decimal digits. - public init(stringLiteral value: StringLiteralType) { - self = BigInt(value, radix: 10)! - } -} - -extension BigUInt: CustomStringConvertible { - /// Return the decimal representation of this integer. - public var description: String { - return String(self, radix: 10) - } -} - -extension BigInt: CustomStringConvertible { - /// Return the decimal representation of this integer. - public var description: String { - return String(self, radix: 10) - } -} - -extension BigUInt: CustomPlaygroundDisplayConvertible { - - /// Return the playground quick look representation of this integer. - public var playgroundDescription: Any { - let text = String(self) - return text + " (\(self.bitWidth) bits)" - } -} - -extension BigInt: CustomPlaygroundDisplayConvertible { - - /// Return the playground quick look representation of this integer. - public var playgroundDescription: Any { - let text = String(self) - return text + " (\(self.magnitude.bitWidth) bits)" - } -} diff --git a/Pods/BigInt/Sources/Subtraction.swift b/Pods/BigInt/Sources/Subtraction.swift deleted file mode 100644 index 5ac872e6..00000000 --- a/Pods/BigInt/Sources/Subtraction.swift +++ /dev/null @@ -1,169 +0,0 @@ -// -// Subtraction.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - //MARK: Subtraction - - /// Subtract `word` from this integer in place, returning a flag indicating if the operation - /// caused an arithmetic overflow. `word` is shifted `shift` words to the left before being subtracted. - /// - /// - Note: If the result indicates an overflow, then `self` becomes the two's complement of the absolute difference. - /// - Complexity: O(count) - internal mutating func subtractWordReportingOverflow(_ word: Word, shiftedBy shift: Int = 0) -> Bool { - precondition(shift >= 0) - var carry: Word = word - var i = shift - let count = self.count - while carry > 0 && i < count { - let (d, c) = self[i].subtractingReportingOverflow(carry) - self[i] = d - carry = (c ? 1 : 0) - i += 1 - } - return carry > 0 - } - - /// Subtract `word` from this integer, returning the difference and a flag that is true if the operation - /// caused an arithmetic overflow. `word` is shifted `shift` words to the left before being subtracted. - /// - /// - Note: If `overflow` is true, then the returned value is the two's complement of the absolute difference. - /// - Complexity: O(count) - internal func subtractingWordReportingOverflow(_ word: Word, shiftedBy shift: Int = 0) -> (partialValue: BigUInt, overflow: Bool) { - var result = self - let overflow = result.subtractWordReportingOverflow(word, shiftedBy: shift) - return (result, overflow) - } - - /// Subtract a digit `d` from this integer in place. - /// `d` is shifted `shift` digits to the left before being subtracted. - /// - /// - Requires: self >= d * 2^shift - /// - Complexity: O(count) - internal mutating func subtractWord(_ word: Word, shiftedBy shift: Int = 0) { - let overflow = subtractWordReportingOverflow(word, shiftedBy: shift) - precondition(!overflow) - } - - /// Subtract a digit `d` from this integer and return the result. - /// `d` is shifted `shift` digits to the left before being subtracted. - /// - /// - Requires: self >= d * 2^shift - /// - Complexity: O(count) - internal func subtractingWord(_ word: Word, shiftedBy shift: Int = 0) -> BigUInt { - var result = self - result.subtractWord(word, shiftedBy: shift) - return result - } - - /// Subtract `other` from this integer in place, and return a flag indicating if the operation caused an - /// arithmetic overflow. `other` is shifted `shift` digits to the left before being subtracted. - /// - /// - Note: If the result indicates an overflow, then `self` becomes the twos' complement of the absolute difference. - /// - Complexity: O(count) - public mutating func subtractReportingOverflow(_ b: BigUInt, shiftedBy shift: Int = 0) -> Bool { - precondition(shift >= 0) - var carry = false - var bi = 0 - let bc = b.count - let count = self.count - while bi < bc || (shift + bi < count && carry) { - let ai = shift + bi - let (d, c) = self[ai].subtractingReportingOverflow(b[bi]) - if carry { - let (d2, c2) = d.subtractingReportingOverflow(1) - self[ai] = d2 - carry = c || c2 - } - else { - self[ai] = d - carry = c - } - bi += 1 - } - return carry - } - - /// Subtract `other` from this integer, returning the difference and a flag indicating arithmetic overflow. - /// `other` is shifted `shift` digits to the left before being subtracted. - /// - /// - Note: If `overflow` is true, then the result value is the twos' complement of the absolute value of the difference. - /// - Complexity: O(count) - public func subtractingReportingOverflow(_ other: BigUInt, shiftedBy shift: Int) -> (partialValue: BigUInt, overflow: Bool) { - var result = self - let overflow = result.subtractReportingOverflow(other, shiftedBy: shift) - return (result, overflow) - } - - /// Subtracts `other` from `self`, returning the result and a flag indicating arithmetic overflow. - /// - /// - Note: When the operation overflows, then `partialValue` is the twos' complement of the absolute value of the difference. - /// - Complexity: O(count) - public func subtractingReportingOverflow(_ other: BigUInt) -> (partialValue: BigUInt, overflow: Bool) { - return self.subtractingReportingOverflow(other, shiftedBy: 0) - } - - /// Subtract `other` from this integer in place. - /// `other` is shifted `shift` digits to the left before being subtracted. - /// - /// - Requires: self >= other * 2^shift - /// - Complexity: O(count) - public mutating func subtract(_ other: BigUInt, shiftedBy shift: Int = 0) { - let overflow = subtractReportingOverflow(other, shiftedBy: shift) - precondition(!overflow) - } - - /// Subtract `b` from this integer, and return the difference. - /// `b` is shifted `shift` digits to the left before being subtracted. - /// - /// - Requires: self >= b * 2^shift - /// - Complexity: O(count) - public func subtracting(_ other: BigUInt, shiftedBy shift: Int = 0) -> BigUInt { - var result = self - result.subtract(other, shiftedBy: shift) - return result - } - - /// Decrement this integer by one. - /// - /// - Requires: !isZero - /// - Complexity: O(count) - public mutating func decrement(shiftedBy shift: Int = 0) { - self.subtract(1, shiftedBy: shift) - } - - /// Subtract `b` from `a` and return the result. - /// - /// - Requires: a >= b - /// - Complexity: O(a.count) - public static func -(a: BigUInt, b: BigUInt) -> BigUInt { - return a.subtracting(b) - } - - /// Subtract `b` from `a` and store the result in `a`. - /// - /// - Requires: a >= b - /// - Complexity: O(a.count) - public static func -=(a: inout BigUInt, b: BigUInt) { - a.subtract(b) - } -} - -extension BigInt { - public mutating func negate() { - guard !magnitude.isZero else { return } - self.sign = self.sign == .plus ? .minus : .plus - } - - /// Subtract `b` from `a` and return the result. - public static func -(a: BigInt, b: BigInt) -> BigInt { - return a + -b - } - - /// Subtract `b` from `a` in place. - public static func -=(a: inout BigInt, b: BigInt) { a = a - b } -} diff --git a/Pods/BigInt/Sources/Words and Bits.swift b/Pods/BigInt/Sources/Words and Bits.swift deleted file mode 100644 index 4543c1bc..00000000 --- a/Pods/BigInt/Sources/Words and Bits.swift +++ /dev/null @@ -1,202 +0,0 @@ -// -// Words and Bits.swift -// BigInt -// -// Created by Károly Lőrentey on 2017-08-11. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension Array where Element == UInt { - mutating func twosComplement() { - var increment = true - for i in 0 ..< self.count { - if increment { - (self[i], increment) = (~self[i]).addingReportingOverflow(1) - } - else { - self[i] = ~self[i] - } - } - } -} - -extension BigUInt { - public subscript(bitAt index: Int) -> Bool { - get { - precondition(index >= 0) - let (i, j) = index.quotientAndRemainder(dividingBy: Word.bitWidth) - return self[i] & (1 << j) != 0 - } - set { - precondition(index >= 0) - let (i, j) = index.quotientAndRemainder(dividingBy: Word.bitWidth) - if newValue { - self[i] |= 1 << j - } - else { - self[i] &= ~(1 << j) - } - } - } -} - -extension BigUInt { - /// The minimum number of bits required to represent this integer in binary. - /// - /// - Returns: floor(log2(2 * self + 1)) - /// - Complexity: O(1) - public var bitWidth: Int { - guard count > 0 else { return 0 } - return count * Word.bitWidth - self[count - 1].leadingZeroBitCount - } - - /// The number of leading zero bits in the binary representation of this integer in base `2^(Word.bitWidth)`. - /// This is useful when you need to normalize a `BigUInt` such that the top bit of its most significant word is 1. - /// - /// - Note: 0 is considered to have zero leading zero bits. - /// - Returns: A value in `0...(Word.bitWidth - 1)`. - /// - SeeAlso: width - /// - Complexity: O(1) - public var leadingZeroBitCount: Int { - guard count > 0 else { return 0 } - return self[count - 1].leadingZeroBitCount - } - - /// The number of trailing zero bits in the binary representation of this integer. - /// - /// - Note: 0 is considered to have zero trailing zero bits. - /// - Returns: A value in `0...width`. - /// - Complexity: O(count) - public var trailingZeroBitCount: Int { - guard count > 0 else { return 0 } - let i = self.words.firstIndex { $0 != 0 }! - return i * Word.bitWidth + self[i].trailingZeroBitCount - } -} - -extension BigInt { - public var bitWidth: Int { - guard !magnitude.isZero else { return 0 } - return magnitude.bitWidth + 1 - } - - public var trailingZeroBitCount: Int { - // Amazingly, this works fine for negative numbers - return magnitude.trailingZeroBitCount - } -} - -extension BigUInt { - public struct Words: RandomAccessCollection { - private let value: BigUInt - - fileprivate init(_ value: BigUInt) { self.value = value } - - public var startIndex: Int { return 0 } - public var endIndex: Int { return value.count } - - public subscript(_ index: Int) -> Word { - return value[index] - } - } - - public var words: Words { return Words(self) } - - public init(words: Words) where Words.Element == Word { - let uc = words.underestimatedCount - if uc > 2 { - self.init(words: Array(words)) - } - else { - var it = words.makeIterator() - guard let w0 = it.next() else { - self.init() - return - } - guard let w1 = it.next() else { - self.init(word: w0) - return - } - if let w2 = it.next() { - var words: [UInt] = [] - words.reserveCapacity(Swift.max(3, uc)) - words.append(w0) - words.append(w1) - words.append(w2) - while let word = it.next() { - words.append(word) - } - self.init(words: words) - } - else { - self.init(low: w0, high: w1) - } - } - } -} - -extension BigInt { - public struct Words: RandomAccessCollection { - public typealias Indices = CountableRange - - private let value: BigInt - private let decrementLimit: Int - - fileprivate init(_ value: BigInt) { - self.value = value - switch value.sign { - case .plus: - self.decrementLimit = 0 - case .minus: - assert(!value.magnitude.isZero) - self.decrementLimit = value.magnitude.words.firstIndex(where: { $0 != 0 })! - } - } - - public var count: Int { - switch value.sign { - case .plus: - if let high = value.magnitude.words.last, high >> (Word.bitWidth - 1) != 0 { - return value.magnitude.count + 1 - } - return value.magnitude.count - case .minus: - let high = value.magnitude.words.last! - if high >> (Word.bitWidth - 1) != 0 { - return value.magnitude.count + 1 - } - return value.magnitude.count - } - } - - public var indices: Indices { return 0 ..< count } - public var startIndex: Int { return 0 } - public var endIndex: Int { return count } - - public subscript(_ index: Int) -> UInt { - // Note that indices above `endIndex` are accepted. - if value.sign == .plus { - return value.magnitude[index] - } - if index <= decrementLimit { - return ~(value.magnitude[index] &- 1) - } - return ~value.magnitude[index] - } - } - - public var words: Words { - return Words(self) - } - - public init(words: S) where S.Element == Word { - var words = Array(words) - if (words.last ?? 0) >> (Word.bitWidth - 1) == 0 { - self.init(sign: .plus, magnitude: BigUInt(words: words)) - } - else { - words.twosComplement() - self.init(sign: .minus, magnitude: BigUInt(words: words)) - } - } -} diff --git a/Pods/Kingfisher/LICENSE b/Pods/Kingfisher/LICENSE deleted file mode 100644 index 80888ba5..00000000 --- a/Pods/Kingfisher/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2019 Wei Wang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/Pods/Kingfisher/README.md b/Pods/Kingfisher/README.md deleted file mode 100644 index fcddcb5e..00000000 --- a/Pods/Kingfisher/README.md +++ /dev/null @@ -1,259 +0,0 @@ -

-Kingfisher -

- -

- - - - - -

- -Kingfisher is a powerful, pure-Swift library for downloading and caching images from the web. It provides you a chance to use a pure-Swift way to work with remote images in your next app. - -## Features - -- [x] Asynchronous image downloading and caching. -- [x] Loading image from either `URLSession`-based networking or local provided data. -- [x] Useful image processors and filters provided. -- [x] Multiple-layer hybrid cache for both memory and disk. -- [x] Fine control on cache behavior. Customizable expiration date and size limit. -- [x] Cancelable downloading and auto-reusing previous downloaded content to improve performance. -- [x] Independent components. Use the downloader, caching system, and image processors separately as you need. -- [x] Prefetching images and showing them from the cache to boost your app. -- [x] Extensions for `UIImageView`, `NSImageView`, `NSButton`, `UIButton`, `NSTextAttachment`, `WKInterfaceImage`, `TVMonogramView` and `CPListItem` to directly set an image from a URL. -- [x] Built-in transition animation when setting images. -- [x] Customizable placeholder and indicator while loading images. -- [x] Extensible image processing and image format easily. -- [x] Low Data Mode support. -- [x] SwiftUI support. - -### Kingfisher 101 - -The simplest use-case is setting an image to an image view with the `UIImageView` extension: - -```swift -import Kingfisher - -let url = URL(string: "https://example.com/image.png") -imageView.kf.setImage(with: url) -``` - -Kingfisher will download the image from `url`, send it to both memory cache and disk cache, and display it in `imageView`. -When you set it with the same URL later, the image will be retrieved from the cache and shown immediately. - -It also works if you use SwiftUI: - -```swift -var body: some View { - KFImage(URL(string: "https://example.com/image.png")!) -} -``` - -### A More Advanced Example - -With the powerful options, you can do hard tasks with Kingfisher in a simple way. For example, the code below: - -1. Downloads a high-resolution image. -2. Downsamples it to match the image view size. -3. Makes it round cornered with a given radius. -4. Shows a system indicator and a placeholder image while downloading. -5. When prepared, it animates the small thumbnail image with a "fade in" effect. -6. The original large image is also cached to disk for later use, to get rid of downloading it again in a detail view. -7. A console log is printed when the task finishes, either for success or failure. - -```swift -let url = URL(string: "https://example.com/high_resolution_image.png") -let processor = DownsamplingImageProcessor(size: imageView.bounds.size) - |> RoundCornerImageProcessor(cornerRadius: 20) -imageView.kf.indicatorType = .activity -imageView.kf.setImage( - with: url, - placeholder: UIImage(named: "placeholderImage"), - options: [ - .processor(processor), - .scaleFactor(UIScreen.main.scale), - .transition(.fade(1)), - .cacheOriginalImage - ]) -{ - result in - switch result { - case .success(let value): - print("Task done for: \(value.source.url?.absoluteString ?? "")") - case .failure(let error): - print("Job failed: \(error.localizedDescription)") - } -} -``` - -It is a common situation I can meet in my daily work. Think about how many lines you need to write without -Kingfisher! - -### Method Chaining - -If you are not a fan of the `kf` extension, you can also prefer to use the `KF` builder and chained the method -invocations. The code below is doing the same thing: - -```swift -// Use `kf` extension -imageView.kf.setImage( - with: url, - placeholder: placeholderImage, - options: [ - .processor(processor), - .loadDiskFileSynchronously, - .cacheOriginalImage, - .transition(.fade(0.25)), - .lowDataMode(.network(lowResolutionURL)) - ], - progressBlock: { receivedSize, totalSize in - // Progress updated - }, - completionHandler: { result in - // Done - } -) - -// Use `KF` builder -KF.url(url) - .placeholder(placeholderImage) - .setProcessor(processor) - .loadDiskFileSynchronously() - .cacheMemoryOnly() - .fade(duration: 0.25) - .lowDataModeSource(.network(lowResolutionURL)) - .onProgress { receivedSize, totalSize in } - .onSuccess { result in } - .onFailure { error in } - .set(to: imageView) -``` - -And even better, if later you want to switch to SwiftUI, just change the `KF` above to `KFImage`, and you've done: - -```swift -struct ContentView: View { - var body: some View { - KFImage.url(url) - .placeholder(placeholderImage) - .setProcessor(processor) - .loadDiskFileSynchronously() - .cacheMemoryOnly() - .fade(duration: 0.25) - .lowDataModeSource(.network(lowResolutionURL)) - .onProgress { receivedSize, totalSize in } - .onSuccess { result in } - .onFailure { error in } - } -} -``` - -### Learn More - -To learn the use of Kingfisher by more examples, take a look at the well-prepared [Cheat Sheet](https://github.com/onevcat/Kingfisher/wiki/Cheat-Sheet). -There we summarized the most common tasks in Kingfisher, you can get a better idea of what this framework can do. -There are also some performance tips, remember to check them too. - -## Requirements - -- iOS 12.0+ / macOS 10.14+ / tvOS 12.0+ / watchOS 5.0+ (if you use only UIKit/AppKit) -- iOS 14.0+ / macOS 11.0+ / tvOS 14.0+ / watchOS 7.0+ (if you use it in SwiftUI) -- Swift 5.0+ - -> If you need support from iOS 10 (UIKit/AppKit) or iOS 13 (SwiftUI), use Kingfisher version 6.x. But it won't work -> with Xcode 13.0 and Xcode 13.1 [#1802](https://github.com/onevcat/Kingfisher/issues/1802). -> -> If you need to use Xcode 13.0 and 13.1 but cannot upgrade to v7, use the `version6-xcode13` branch. However, you have to drop -> iOS 10 support due to another Xcode 13 bug. -> -> | UIKit | SwiftUI | Xcode | Kingfisher | -> |---|---|---|---| -> | iOS 10+ | iOS 13+ | 12 | ~> 6.3.1 | -> | iOS 11+ | iOS 13+ | 13 | `version6-xcode13` | -> | iOS 12+ | iOS 14+ | 13 | ~> 7.0 | - -### Installation - -A detailed guide for installation can be found in [Installation Guide](https://github.com/onevcat/Kingfisher/wiki/Installation-Guide). - -#### Swift Package Manager - -- File > Swift Packages > Add Package Dependency -- Add `https://github.com/onevcat/Kingfisher.git` -- Select "Up to Next Major" with "7.0.0" - -#### CocoaPods - -```ruby -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '12.0' -use_frameworks! - -target 'MyApp' do - pod 'Kingfisher', '~> 7.0' -end -``` - -#### Carthage - -``` -github "onevcat/Kingfisher" ~> 7.0 -``` - - -### Migrating - -[Kingfisher 7.0 Migration](https://github.com/onevcat/Kingfisher/wiki/Kingfisher-7.0-Migration-Guide) - Kingfisher 7.x is NOT fully compatible with the previous version. However, changes should be trivial or not required at all. Please follow the [migration guide](https://github.com/onevcat/Kingfisher/wiki/Kingfisher-7.0-Migration-Guide) when you prepare to upgrade Kingfisher in your project. - -If you are using an even earlier version, see the guides below to know the steps for migrating. - -> - [Kingfisher 6.0 Migration](https://github.com/onevcat/Kingfisher/wiki/Kingfisher-6.0-Migration-Guide) - Kingfisher 6.x is NOT fully compatible with the previous version. However, migration is not difficult. Depending on your use cases, it may take no effect or several minutes to modify your existing code for the new version. Please follow the [migration guide](https://github.com/onevcat/Kingfisher/wiki/Kingfisher-6.0-Migration-Guide) when you prepare to upgrade Kingfisher in your project. -> - [Kingfisher 5.0 Migration](https://github.com/onevcat/Kingfisher/wiki/Kingfisher-5.0-Migration-Guide) - If you are upgrading to Kingfisher 5.x from 4.x, please read this for more information. -> - Kingfisher 4.0 Migration - Kingfisher 3.x should be source compatible to Kingfisher 4. The reason for a major update is that we need to specify the Swift version explicitly for Xcode. All deprecated methods in Kingfisher 3 were removed, so please ensure you have no warning left before you migrate from Kingfisher 3 with Kingfisher 4. If you have any trouble when migrating, please open an issue to discuss. -> - [Kingfisher 3.0 Migration](https://github.com/onevcat/Kingfisher/wiki/Kingfisher-3.0-Migration-Guide) - If you are upgrading to Kingfisher 3.x from an earlier version, please read this for more information. - -## Next Steps - -We prepared a [wiki page](https://github.com/onevcat/Kingfisher/wiki). You can find tons of useful things there. - -* [Installation Guide](https://github.com/onevcat/Kingfisher/wiki/Installation-Guide) - Follow it to integrate Kingfisher into your project. -* [Cheat Sheet](https://github.com/onevcat/Kingfisher/wiki/Cheat-Sheet)- Curious about what Kingfisher could do and how would it look like when used in your project? See this page for useful code snippets. If you are already familiar with Kingfisher, you could also learn new tricks to improve the way you use Kingfisher! -* [API Reference](https://swiftpackageindex.com/onevcat/Kingfisher/master/documentation/kingfisher) - Lastly, please remember to read the full API reference whenever you need more detailed documentation. - -## Other - -### Future of Kingfisher - -I want to keep Kingfisher lightweight. This framework focuses on providing a simple solution for downloading and caching images. This doesn’t mean the framework can’t be improved. Kingfisher is far from perfect, so necessary and useful updates will be made to make it better. - -### Developments and Tests - -Any contributing and pull requests are warmly welcome. However, before you plan to implement some features or try to fix an uncertain issue, it is recommended to open a discussion first. It would be appreciated if your pull requests could build with all tests green. :) - -### About the logo - -The logo of Kingfisher is inspired by [Tangram (七巧板)](http://en.wikipedia.org/wiki/Tangram), a dissection puzzle consisting of seven flat shapes from China. I believe she's a kingfisher bird instead of a swift, but someone insists that she is a pigeon. I guess I should give her a name. Hi, guys, do you have any suggestions? - -### Contact - -Follow and contact me on [Twitter](http://twitter.com/onevcat) or [Sina Weibo](http://weibo.com/onevcat). If you find an issue, [open a ticket](https://github.com/onevcat/Kingfisher/issues/new). Pull requests are warmly welcome as well. - -## Backers & Sponsors - -Open-source projects cannot live long without your help. If you find Kingfisher to be useful, please consider supporting this -project by becoming a sponsor. Your user icon or company logo shows up [on my blog](https://onevcat.com/tabs/about/) with a link to your home page. - -Become a sponsor through [GitHub Sponsors](https://github.com/sponsors/onevcat). :heart: - -Special thanks to: - -[![imgly](https://user-images.githubusercontent.com/1812216/106253726-271ed000-6218-11eb-98e0-c9c681925770.png)](https://img.ly/) - -[![emergetools](https://github-production-user-asset-6210df.s3.amazonaws.com/1019875/254794187-d44f6f50-993f-42e3-b79c-960f69c4adc1.png)](https://www.emergetools.com) - - - -### License - -Kingfisher is released under the MIT license. See LICENSE for details. diff --git a/Pods/Kingfisher/Sources/Cache/CacheSerializer.swift b/Pods/Kingfisher/Sources/Cache/CacheSerializer.swift deleted file mode 100644 index c84913ff..00000000 --- a/Pods/Kingfisher/Sources/Cache/CacheSerializer.swift +++ /dev/null @@ -1,137 +0,0 @@ -// -// CacheSerializer.swift -// Kingfisher -// -// Created by Wei Wang on 2016/09/02. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation -import CoreGraphics -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -/// An `CacheSerializer` is used to convert some data to an image object after -/// retrieving it from disk storage, and vice versa, to convert an image to data object -/// for storing to the disk storage. -public protocol CacheSerializer { - - /// Gets the serialized data from a provided image - /// and optional original data for caching to disk. - /// - /// - Parameters: - /// - image: The image needed to be serialized. - /// - original: The original data which is just downloaded. - /// If the image is retrieved from cache instead of - /// downloaded, it will be `nil`. - /// - Returns: The data object for storing to disk, or `nil` when no valid - /// data could be serialized. - func data(with image: KFCrossPlatformImage, original: Data?) -> Data? - - /// Gets an image from provided serialized data. - /// - /// - Parameters: - /// - data: The data from which an image should be deserialized. - /// - options: The parsed options for deserialization. - /// - Returns: An image deserialized or `nil` when no valid image - /// could be deserialized. - func image(with data: Data, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? - - /// Whether this serializer prefers to cache the original data in its implementation. - /// If `true`, after creating the image from the disk data, Kingfisher will continue to apply the processor to get - /// the final image. - /// - /// By default, it is `false` and the actual processed image is assumed to be serialized to the disk. - var originalDataUsed: Bool { get } -} - -public extension CacheSerializer { - var originalDataUsed: Bool { false } -} - -/// Represents a basic and default `CacheSerializer` used in Kingfisher disk cache system. -/// It could serialize and deserialize images in PNG, JPEG and GIF format. For -/// image other than these formats, a normalized `pngRepresentation` will be used. -public struct DefaultCacheSerializer: CacheSerializer { - - /// The default general cache serializer used across Kingfisher's cache. - public static let `default` = DefaultCacheSerializer() - - /// The compression quality when converting image to a lossy format data. Default is 1.0. - public var compressionQuality: CGFloat = 1.0 - - /// Whether the original data should be preferred when serializing the image. - /// If `true`, the input original data will be checked first and used unless the data is `nil`. - /// In that case, the serialization will fall back to creating data from image. - public var preferCacheOriginalData: Bool = false - - /// Returnes the `preferCacheOriginalData` value. When the original data is used, Kingfisher needs to re-apply the - /// processors to get the desired final image. - public var originalDataUsed: Bool { preferCacheOriginalData } - - /// Creates a cache serializer that serialize and deserialize images in PNG, JPEG and GIF format. - /// - /// - Note: - /// Use `DefaultCacheSerializer.default` unless you need to specify your own properties. - /// - public init() { } - - /// - Parameters: - /// - image: The image needed to be serialized. - /// - original: The original data which is just downloaded. - /// If the image is retrieved from cache instead of - /// downloaded, it will be `nil`. - /// - Returns: The data object for storing to disk, or `nil` when no valid - /// data could be serialized. - /// - /// - Note: - /// Only when `original` contains valid PNG, JPEG and GIF format data, the `image` will be - /// converted to the corresponding data type. Otherwise, if the `original` is provided but it is not - /// If `original` is `nil`, the input `image` will be encoded as PNG data. - public func data(with image: KFCrossPlatformImage, original: Data?) -> Data? { - if preferCacheOriginalData { - return original ?? - image.kf.data( - format: original?.kf.imageFormat ?? .unknown, - compressionQuality: compressionQuality - ) - } else { - return image.kf.data( - format: original?.kf.imageFormat ?? .unknown, - compressionQuality: compressionQuality - ) - } - } - - /// Gets an image deserialized from provided data. - /// - /// - Parameters: - /// - data: The data from which an image should be deserialized. - /// - options: Options for deserialization. - /// - Returns: An image deserialized or `nil` when no valid image - /// could be deserialized. - public func image(with data: Data, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - return KingfisherWrapper.image(data: data, options: options.imageCreatingOptions) - } -} diff --git a/Pods/Kingfisher/Sources/Cache/DiskStorage.swift b/Pods/Kingfisher/Sources/Cache/DiskStorage.swift deleted file mode 100644 index 56ff8ab2..00000000 --- a/Pods/Kingfisher/Sources/Cache/DiskStorage.swift +++ /dev/null @@ -1,616 +0,0 @@ -// -// DiskStorage.swift -// Kingfisher -// -// Created by Wei Wang on 2018/10/15. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - - -/// Represents a set of conception related to storage which stores a certain type of value in disk. -/// This is a namespace for the disk storage types. A `Backend` with a certain `Config` will be used to describe the -/// storage. See these composed types for more information. -public enum DiskStorage { - - /// Represents a storage back-end for the `DiskStorage`. The value is serialized to data - /// and stored as file in the file system under a specified location. - /// - /// You can config a `DiskStorage.Backend` in its initializer by passing a `DiskStorage.Config` value. - /// or modifying the `config` property after it being created. `DiskStorage` will use file's attributes to keep - /// track of a file for its expiration or size limitation. - public class Backend { - /// The config used for this disk storage. - public var config: Config - - // The final storage URL on disk, with `name` and `cachePathBlock` considered. - public let directoryURL: URL - - let metaChangingQueue: DispatchQueue - - var maybeCached : Set? - let maybeCachedCheckingQueue = DispatchQueue(label: "com.onevcat.Kingfisher.maybeCachedCheckingQueue") - - // `false` if the storage initialized with an error. This prevents unexpected forcibly crash when creating - // storage in the default cache. - private var storageReady: Bool = true - - /// Creates a disk storage with the given `DiskStorage.Config`. - /// - /// - Parameter config: The config used for this disk storage. - /// - Throws: An error if the folder for storage cannot be got or created. - public convenience init(config: Config) throws { - self.init(noThrowConfig: config, creatingDirectory: false) - try prepareDirectory() - } - - // If `creatingDirectory` is `false`, the directory preparation will be skipped. - // We need to call `prepareDirectory` manually after this returns. - init(noThrowConfig config: Config, creatingDirectory: Bool) { - var config = config - - let creation = Creation(config) - self.directoryURL = creation.directoryURL - - // Break any possible retain cycle set by outside. - config.cachePathBlock = nil - self.config = config - - metaChangingQueue = DispatchQueue(label: creation.cacheName) - setupCacheChecking() - - if creatingDirectory { - try? prepareDirectory() - } - } - - private func setupCacheChecking() { - maybeCachedCheckingQueue.async { - do { - self.maybeCached = Set() - try self.config.fileManager.contentsOfDirectory(atPath: self.directoryURL.path).forEach { fileName in - self.maybeCached?.insert(fileName) - } - } catch { - // Just disable the functionality if we fail to initialize it properly. This will just revert to - // the behavior which is to check file existence on disk directly. - self.maybeCached = nil - } - } - } - - // Creates the storage folder. - private func prepareDirectory() throws { - let fileManager = config.fileManager - let path = directoryURL.path - - guard !fileManager.fileExists(atPath: path) else { return } - - do { - try fileManager.createDirectory( - atPath: path, - withIntermediateDirectories: true, - attributes: nil) - } catch { - self.storageReady = false - throw KingfisherError.cacheError(reason: .cannotCreateDirectory(path: path, error: error)) - } - } - - /// Stores a value to the storage under the specified key and expiration policy. - /// - Parameters: - /// - value: The value to be stored. - /// - key: The key to which the `value` will be stored. If there is already a value under the key, - /// the old value will be overwritten by `value`. - /// - expiration: The expiration policy used by this store action. - /// - writeOptions: Data writing options used the new files. - /// - Throws: An error during converting the value to a data format or during writing it to disk. - public func store( - value: T, - forKey key: String, - expiration: StorageExpiration? = nil, - writeOptions: Data.WritingOptions = []) throws - { - guard storageReady else { - throw KingfisherError.cacheError(reason: .diskStorageIsNotReady(cacheURL: directoryURL)) - } - - let expiration = expiration ?? config.expiration - // The expiration indicates that already expired, no need to store. - guard !expiration.isExpired else { return } - - let data: Data - do { - data = try value.toData() - } catch { - throw KingfisherError.cacheError(reason: .cannotConvertToData(object: value, error: error)) - } - - let fileURL = cacheFileURL(forKey: key) - do { - try data.write(to: fileURL, options: writeOptions) - } catch { - if error.isFolderMissing { - // The whole cache folder is deleted. Try to recreate it and write file again. - do { - try prepareDirectory() - try data.write(to: fileURL, options: writeOptions) - } catch { - throw KingfisherError.cacheError( - reason: .cannotCreateCacheFile(fileURL: fileURL, key: key, data: data, error: error) - ) - } - } else { - throw KingfisherError.cacheError( - reason: .cannotCreateCacheFile(fileURL: fileURL, key: key, data: data, error: error) - ) - } - } - - let now = Date() - let attributes: [FileAttributeKey : Any] = [ - // The last access date. - .creationDate: now.fileAttributeDate, - // The estimated expiration date. - .modificationDate: expiration.estimatedExpirationSinceNow.fileAttributeDate - ] - do { - try config.fileManager.setAttributes(attributes, ofItemAtPath: fileURL.path) - } catch { - try? config.fileManager.removeItem(at: fileURL) - throw KingfisherError.cacheError( - reason: .cannotSetCacheFileAttribute( - filePath: fileURL.path, - attributes: attributes, - error: error - ) - ) - } - - maybeCachedCheckingQueue.async { - self.maybeCached?.insert(fileURL.lastPathComponent) - } - } - - /// Gets a value from the storage. - /// - Parameters: - /// - key: The cache key of value. - /// - extendingExpiration: The expiration policy used by this getting action. - /// - Throws: An error during converting the data to a value or during operation of disk files. - /// - Returns: The value under `key` if it is valid and found in the storage. Otherwise, `nil`. - public func value(forKey key: String, extendingExpiration: ExpirationExtending = .cacheTime) throws -> T? { - return try value(forKey: key, referenceDate: Date(), actuallyLoad: true, extendingExpiration: extendingExpiration) - } - - func value( - forKey key: String, - referenceDate: Date, - actuallyLoad: Bool, - extendingExpiration: ExpirationExtending) throws -> T? - { - guard storageReady else { - throw KingfisherError.cacheError(reason: .diskStorageIsNotReady(cacheURL: directoryURL)) - } - - let fileManager = config.fileManager - let fileURL = cacheFileURL(forKey: key) - let filePath = fileURL.path - - let fileMaybeCached = maybeCachedCheckingQueue.sync { - return maybeCached?.contains(fileURL.lastPathComponent) ?? true - } - guard fileMaybeCached else { - return nil - } - guard fileManager.fileExists(atPath: filePath) else { - return nil - } - - let meta: FileMeta - do { - let resourceKeys: Set = [.contentModificationDateKey, .creationDateKey] - meta = try FileMeta(fileURL: fileURL, resourceKeys: resourceKeys) - } catch { - throw KingfisherError.cacheError( - reason: .invalidURLResource(error: error, key: key, url: fileURL)) - } - - if meta.expired(referenceDate: referenceDate) { - return nil - } - if !actuallyLoad { return T.empty } - - do { - let data = try Data(contentsOf: fileURL) - let obj = try T.fromData(data) - metaChangingQueue.async { - meta.extendExpiration(with: fileManager, extendingExpiration: extendingExpiration) - } - return obj - } catch { - throw KingfisherError.cacheError(reason: .cannotLoadDataFromDisk(url: fileURL, error: error)) - } - } - - /// Whether there is valid cached data under a given key. - /// - Parameter key: The cache key of value. - /// - Returns: If there is valid data under the key, `true`. Otherwise, `false`. - /// - /// - Note: - /// This method does not actually load the data from disk, so it is faster than directly loading the cached value - /// by checking the nullability of `value(forKey:extendingExpiration:)` method. - /// - public func isCached(forKey key: String) -> Bool { - return isCached(forKey: key, referenceDate: Date()) - } - - /// Whether there is valid cached data under a given key and a reference date. - /// - Parameters: - /// - key: The cache key of value. - /// - referenceDate: A reference date to check whether the cache is still valid. - /// - Returns: If there is valid data under the key, `true`. Otherwise, `false`. - /// - /// - Note: - /// If you pass `Date()` to `referenceDate`, this method is identical to `isCached(forKey:)`. Use the - /// `referenceDate` to determine whether the cache is still valid for a future date. - public func isCached(forKey key: String, referenceDate: Date) -> Bool { - do { - let result = try value( - forKey: key, - referenceDate: referenceDate, - actuallyLoad: false, - extendingExpiration: .none - ) - return result != nil - } catch { - return false - } - } - - /// Removes a value from a specified key. - /// - Parameter key: The cache key of value. - /// - Throws: An error during removing the value. - public func remove(forKey key: String) throws { - let fileURL = cacheFileURL(forKey: key) - try removeFile(at: fileURL) - } - - func removeFile(at url: URL) throws { - try config.fileManager.removeItem(at: url) - } - - /// Removes all values in this storage. - /// - Throws: An error during removing the values. - public func removeAll() throws { - try removeAll(skipCreatingDirectory: false) - } - - func removeAll(skipCreatingDirectory: Bool) throws { - try config.fileManager.removeItem(at: directoryURL) - if !skipCreatingDirectory { - try prepareDirectory() - } - } - - /// The URL of the cached file with a given computed `key`. - /// - /// - Parameter key: The final computed key used when caching the image. Please note that usually this is not - /// the `cacheKey` of an image `Source`. It is the computed key with processor identifier considered. - /// - /// - Note: - /// This method does not guarantee there is an image already cached in the returned URL. It just gives your - /// the URL that the image should be if it exists in disk storage, with the give key. - /// - public func cacheFileURL(forKey key: String) -> URL { - let fileName = cacheFileName(forKey: key) - return directoryURL.appendingPathComponent(fileName, isDirectory: false) - } - - func cacheFileName(forKey key: String) -> String { - if config.usesHashedFileName { - let hashedKey = key.kf.md5 - if let ext = config.pathExtension { - return "\(hashedKey).\(ext)" - } else if config.autoExtAfterHashedFileName, - let ext = key.kf.ext { - return "\(hashedKey).\(ext)" - } - return hashedKey - } else { - if let ext = config.pathExtension { - return "\(key).\(ext)" - } - return key - } - } - - func allFileURLs(for propertyKeys: [URLResourceKey]) throws -> [URL] { - let fileManager = config.fileManager - - guard let directoryEnumerator = fileManager.enumerator( - at: directoryURL, includingPropertiesForKeys: propertyKeys, options: .skipsHiddenFiles) else - { - throw KingfisherError.cacheError(reason: .fileEnumeratorCreationFailed(url: directoryURL)) - } - - guard let urls = directoryEnumerator.allObjects as? [URL] else { - throw KingfisherError.cacheError(reason: .invalidFileEnumeratorContent(url: directoryURL)) - } - return urls - } - - /// Removes all expired values from this storage. - /// - Throws: A file manager error during removing the file. - /// - Returns: The URLs for removed files. - public func removeExpiredValues() throws -> [URL] { - return try removeExpiredValues(referenceDate: Date()) - } - - func removeExpiredValues(referenceDate: Date) throws -> [URL] { - let propertyKeys: [URLResourceKey] = [ - .isDirectoryKey, - .contentModificationDateKey - ] - - let urls = try allFileURLs(for: propertyKeys) - let keys = Set(propertyKeys) - let expiredFiles = urls.filter { fileURL in - do { - let meta = try FileMeta(fileURL: fileURL, resourceKeys: keys) - if meta.isDirectory { - return false - } - return meta.expired(referenceDate: referenceDate) - } catch { - return true - } - } - try expiredFiles.forEach { url in - try removeFile(at: url) - } - return expiredFiles - } - - /// Removes all size exceeded values from this storage. - /// - Throws: A file manager error during removing the file. - /// - Returns: The URLs for removed files. - /// - /// - Note: This method checks `config.sizeLimit` and remove cached files in an LRU (Least Recently Used) way. - func removeSizeExceededValues() throws -> [URL] { - - if config.sizeLimit == 0 { return [] } // Back compatible. 0 means no limit. - - var size = try totalSize() - if size < config.sizeLimit { return [] } - - let propertyKeys: [URLResourceKey] = [ - .isDirectoryKey, - .creationDateKey, - .fileSizeKey - ] - let keys = Set(propertyKeys) - - let urls = try allFileURLs(for: propertyKeys) - var pendings: [FileMeta] = urls.compactMap { fileURL in - guard let meta = try? FileMeta(fileURL: fileURL, resourceKeys: keys) else { - return nil - } - return meta - } - // Sort by last access date. Most recent file first. - pendings.sort(by: FileMeta.lastAccessDate) - - var removed: [URL] = [] - let target = config.sizeLimit / 2 - while size > target, let meta = pendings.popLast() { - size -= UInt(meta.fileSize) - try removeFile(at: meta.url) - removed.append(meta.url) - } - return removed - } - - /// Gets the total file size of the folder in bytes. - public func totalSize() throws -> UInt { - let propertyKeys: [URLResourceKey] = [.fileSizeKey] - let urls = try allFileURLs(for: propertyKeys) - let keys = Set(propertyKeys) - let totalSize: UInt = urls.reduce(0) { size, fileURL in - do { - let meta = try FileMeta(fileURL: fileURL, resourceKeys: keys) - return size + UInt(meta.fileSize) - } catch { - return size - } - } - return totalSize - } - } -} - -extension DiskStorage { - /// Represents the config used in a `DiskStorage`. - public struct Config { - - /// The file size limit on disk of the storage in bytes. 0 means no limit. - public var sizeLimit: UInt - - /// The `StorageExpiration` used in this disk storage. Default is `.days(7)`, - /// means that the disk cache would expire in one week. - public var expiration: StorageExpiration = .days(7) - - /// The preferred extension of cache item. It will be appended to the file name as its extension. - /// Default is `nil`, means that the cache file does not contain a file extension. - public var pathExtension: String? = nil - - /// Default is `true`, means that the cache file name will be hashed before storing. - public var usesHashedFileName = true - - /// Default is `false` - /// If set to `true`, image extension will be extracted from original file name and append to - /// the hased file name and used as the cache key on disk. - public var autoExtAfterHashedFileName = false - - /// Closure that takes in initial directory path and generates - /// the final disk cache path. You can use it to fully customize your cache path. - public var cachePathBlock: ((_ directory: URL, _ cacheName: String) -> URL)! = { - (directory, cacheName) in - return directory.appendingPathComponent(cacheName, isDirectory: true) - } - - let name: String - let fileManager: FileManager - let directory: URL? - - /// Creates a config value based on given parameters. - /// - /// - Parameters: - /// - name: The name of cache. It is used as a part of storage folder. It is used to identify the disk - /// storage. Two storages with the same `name` would share the same folder in disk, and it should - /// be prevented. - /// - sizeLimit: The size limit in bytes for all existing files in the disk storage. - /// - fileManager: The `FileManager` used to manipulate files on disk. Default is `FileManager.default`. - /// - directory: The URL where the disk storage should live. The storage will use this as the root folder, - /// and append a path which is constructed by input `name`. Default is `nil`, indicates that - /// the cache directory under user domain mask will be used. - public init( - name: String, - sizeLimit: UInt, - fileManager: FileManager = .default, - directory: URL? = nil) - { - self.name = name - self.fileManager = fileManager - self.directory = directory - self.sizeLimit = sizeLimit - } - } -} - -extension DiskStorage { - struct FileMeta { - - let url: URL - - let lastAccessDate: Date? - let estimatedExpirationDate: Date? - let isDirectory: Bool - let fileSize: Int - - static func lastAccessDate(lhs: FileMeta, rhs: FileMeta) -> Bool { - return lhs.lastAccessDate ?? .distantPast > rhs.lastAccessDate ?? .distantPast - } - - init(fileURL: URL, resourceKeys: Set) throws { - let meta = try fileURL.resourceValues(forKeys: resourceKeys) - self.init( - fileURL: fileURL, - lastAccessDate: meta.creationDate, - estimatedExpirationDate: meta.contentModificationDate, - isDirectory: meta.isDirectory ?? false, - fileSize: meta.fileSize ?? 0) - } - - init( - fileURL: URL, - lastAccessDate: Date?, - estimatedExpirationDate: Date?, - isDirectory: Bool, - fileSize: Int) - { - self.url = fileURL - self.lastAccessDate = lastAccessDate - self.estimatedExpirationDate = estimatedExpirationDate - self.isDirectory = isDirectory - self.fileSize = fileSize - } - - func expired(referenceDate: Date) -> Bool { - return estimatedExpirationDate?.isPast(referenceDate: referenceDate) ?? true - } - - func extendExpiration(with fileManager: FileManager, extendingExpiration: ExpirationExtending) { - guard let lastAccessDate = lastAccessDate, - let lastEstimatedExpiration = estimatedExpirationDate else - { - return - } - - let attributes: [FileAttributeKey : Any] - - switch extendingExpiration { - case .none: - // not extending expiration time here - return - case .cacheTime: - let originalExpiration: StorageExpiration = - .seconds(lastEstimatedExpiration.timeIntervalSince(lastAccessDate)) - attributes = [ - .creationDate: Date().fileAttributeDate, - .modificationDate: originalExpiration.estimatedExpirationSinceNow.fileAttributeDate - ] - case .expirationTime(let expirationTime): - attributes = [ - .creationDate: Date().fileAttributeDate, - .modificationDate: expirationTime.estimatedExpirationSinceNow.fileAttributeDate - ] - } - - try? fileManager.setAttributes(attributes, ofItemAtPath: url.path) - } - } -} - -extension DiskStorage { - struct Creation { - let directoryURL: URL - let cacheName: String - - init(_ config: Config) { - let url: URL - if let directory = config.directory { - url = directory - } else { - url = config.fileManager.urls(for: .cachesDirectory, in: .userDomainMask)[0] - } - - cacheName = "com.onevcat.Kingfisher.ImageCache.\(config.name)" - directoryURL = config.cachePathBlock(url, cacheName) - } - } -} - -fileprivate extension Error { - var isFolderMissing: Bool { - let nsError = self as NSError - guard nsError.domain == NSCocoaErrorDomain, nsError.code == 4 else { - return false - } - guard let underlyingError = nsError.userInfo[NSUnderlyingErrorKey] as? NSError else { - return false - } - guard underlyingError.domain == NSPOSIXErrorDomain, underlyingError.code == 2 else { - return false - } - return true - } -} diff --git a/Pods/Kingfisher/Sources/Cache/FormatIndicatedCacheSerializer.swift b/Pods/Kingfisher/Sources/Cache/FormatIndicatedCacheSerializer.swift deleted file mode 100644 index aebc9c81..00000000 --- a/Pods/Kingfisher/Sources/Cache/FormatIndicatedCacheSerializer.swift +++ /dev/null @@ -1,123 +0,0 @@ -// -// RequestModifier.swift -// Kingfisher -// -// Created by Junyu Kuang on 5/28/17. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation -import CoreGraphics -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -/// `FormatIndicatedCacheSerializer` lets you indicate an image format for serialized caches. -/// -/// It could serialize and deserialize PNG, JPEG and GIF images. For -/// image other than these formats, a normalized `pngRepresentation` will be used. -/// -/// Example: -/// ```` -/// let profileImageSize = CGSize(width: 44, height: 44) -/// -/// // A round corner image. -/// let imageProcessor = RoundCornerImageProcessor( -/// cornerRadius: profileImageSize.width / 2, targetSize: profileImageSize) -/// -/// let optionsInfo: KingfisherOptionsInfo = [ -/// .cacheSerializer(FormatIndicatedCacheSerializer.png), -/// .processor(imageProcessor)] -/// -/// A URL pointing to a JPEG image. -/// let url = URL(string: "https://example.com/image.jpg")! -/// -/// // Image will be always cached as PNG format to preserve alpha channel for round rectangle. -/// // So when you load it from cache again later, it will be still round cornered. -/// // Otherwise, the corner part would be filled by white color (since JPEG does not contain an alpha channel). -/// imageView.kf.setImage(with: url, options: optionsInfo) -/// ```` -public struct FormatIndicatedCacheSerializer: CacheSerializer { - - /// A `FormatIndicatedCacheSerializer` which converts image from and to PNG format. If the image cannot be - /// represented by PNG format, it will fallback to its real format which is determined by `original` data. - public static let png = FormatIndicatedCacheSerializer(imageFormat: .PNG, jpegCompressionQuality: nil) - - /// A `FormatIndicatedCacheSerializer` which converts image from and to JPEG format. If the image cannot be - /// represented by JPEG format, it will fallback to its real format which is determined by `original` data. - /// The compression quality is 1.0 when using this serializer. If you need to set a customized compression quality, - /// use `jpeg(compressionQuality:)`. - public static let jpeg = FormatIndicatedCacheSerializer(imageFormat: .JPEG, jpegCompressionQuality: 1.0) - - /// A `FormatIndicatedCacheSerializer` which converts image from and to JPEG format with a settable compression - /// quality. If the image cannot be represented by JPEG format, it will fallback to its real format which is - /// determined by `original` data. - /// - Parameter compressionQuality: The compression quality when converting image to JPEG data. - public static func jpeg(compressionQuality: CGFloat) -> FormatIndicatedCacheSerializer { - return FormatIndicatedCacheSerializer(imageFormat: .JPEG, jpegCompressionQuality: compressionQuality) - } - - /// A `FormatIndicatedCacheSerializer` which converts image from and to GIF format. If the image cannot be - /// represented by GIF format, it will fallback to its real format which is determined by `original` data. - public static let gif = FormatIndicatedCacheSerializer(imageFormat: .GIF, jpegCompressionQuality: nil) - - /// The indicated image format. - private let imageFormat: ImageFormat - - /// The compression quality used for loss image format (like JPEG). - private let jpegCompressionQuality: CGFloat? - - /// Creates data which represents the given `image` under a format. - public func data(with image: KFCrossPlatformImage, original: Data?) -> Data? { - - func imageData(withFormat imageFormat: ImageFormat) -> Data? { - return autoreleasepool { () -> Data? in - switch imageFormat { - case .PNG: return image.kf.pngRepresentation() - case .JPEG: return image.kf.jpegRepresentation(compressionQuality: jpegCompressionQuality ?? 1.0) - case .GIF: return image.kf.gifRepresentation() - case .unknown: return nil - } - } - } - - // generate data with indicated image format - if let data = imageData(withFormat: imageFormat) { - return data - } - - let originalFormat = original?.kf.imageFormat ?? .unknown - - // generate data with original image's format - if originalFormat != imageFormat, let data = imageData(withFormat: originalFormat) { - return data - } - - return original ?? image.kf.normalized.kf.pngRepresentation() - } - - /// Same implementation as `DefaultCacheSerializer`. - public func image(with data: Data, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - return KingfisherWrapper.image(data: data, options: options.imageCreatingOptions) - } -} diff --git a/Pods/Kingfisher/Sources/Cache/ImageCache.swift b/Pods/Kingfisher/Sources/Cache/ImageCache.swift deleted file mode 100644 index 508c79a6..00000000 --- a/Pods/Kingfisher/Sources/Cache/ImageCache.swift +++ /dev/null @@ -1,882 +0,0 @@ -// -// ImageCache.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/6. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -extension Notification.Name { - /// This notification will be sent when the disk cache got cleaned either there are cached files expired or the - /// total size exceeding the max allowed size. The manually invoking of `clearDiskCache` method will not trigger - /// this notification. - /// - /// The `object` of this notification is the `ImageCache` object which sends the notification. - /// A list of removed hashes (files) could be retrieved by accessing the array under - /// `KingfisherDiskCacheCleanedHashKey` key in `userInfo` of the notification object you received. - /// By checking the array, you could know the hash codes of files are removed. - public static let KingfisherDidCleanDiskCache = - Notification.Name("com.onevcat.Kingfisher.KingfisherDidCleanDiskCache") -} - -/// Key for array of cleaned hashes in `userInfo` of `KingfisherDidCleanDiskCacheNotification`. -public let KingfisherDiskCacheCleanedHashKey = "com.onevcat.Kingfisher.cleanedHash" - -/// Cache type of a cached image. -/// - none: The image is not cached yet when retrieving it. -/// - memory: The image is cached in memory. -/// - disk: The image is cached in disk. -public enum CacheType { - /// The image is not cached yet when retrieving it. - case none - /// The image is cached in memory. - case memory - /// The image is cached in disk. - case disk - - /// Whether the cache type represents the image is already cached or not. - public var cached: Bool { - switch self { - case .memory, .disk: return true - case .none: return false - } - } -} - -/// Represents the caching operation result. -public struct CacheStoreResult { - - /// The cache result for memory cache. Caching an image to memory will never fail. - public let memoryCacheResult: Result<(), Never> - - /// The cache result for disk cache. If an error happens during caching operation, - /// you can get it from `.failure` case of this `diskCacheResult`. - public let diskCacheResult: Result<(), KingfisherError> -} - -extension KFCrossPlatformImage: CacheCostCalculable { - /// Cost of an image - public var cacheCost: Int { return kf.cost } -} - -extension Data: DataTransformable { - public func toData() throws -> Data { - return self - } - - public static func fromData(_ data: Data) throws -> Data { - return data - } - - public static let empty = Data() -} - - -/// Represents the getting image operation from the cache. -/// -/// - disk: The image can be retrieved from disk cache. -/// - memory: The image can be retrieved memory cache. -/// - none: The image does not exist in the cache. -public enum ImageCacheResult { - - /// The image can be retrieved from disk cache. - case disk(KFCrossPlatformImage) - - /// The image can be retrieved memory cache. - case memory(KFCrossPlatformImage) - - /// The image does not exist in the cache. - case none - - /// Extracts the image from cache result. It returns the associated `Image` value for - /// `.disk` and `.memory` case. For `.none` case, `nil` is returned. - public var image: KFCrossPlatformImage? { - switch self { - case .disk(let image): return image - case .memory(let image): return image - case .none: return nil - } - } - - /// Returns the corresponding `CacheType` value based on the result type of `self`. - public var cacheType: CacheType { - switch self { - case .disk: return .disk - case .memory: return .memory - case .none: return .none - } - } -} - -/// Represents a hybrid caching system which is composed by a `MemoryStorage.Backend` and a `DiskStorage.Backend`. -/// `ImageCache` is a high level abstract for storing an image as well as its data to memory and disk, and -/// retrieving them back. -/// -/// While a default image cache object will be used if you prefer the extension methods of Kingfisher, you can create -/// your own cache object and configure its storages as your need. This class also provide an interface for you to set -/// the memory and disk storage config. -open class ImageCache { - - // MARK: Singleton - /// The default `ImageCache` object. Kingfisher will use this cache for its related methods if there is no - /// other cache specified. The `name` of this default cache is "default", and you should not use this name - /// for any of your customize cache. - public static let `default` = ImageCache(name: "default") - - - // MARK: Public Properties - /// The `MemoryStorage.Backend` object used in this cache. This storage holds loaded images in memory with a - /// reasonable expire duration and a maximum memory usage. To modify the configuration of a storage, just set - /// the storage `config` and its properties. - public let memoryStorage: MemoryStorage.Backend - - /// The `DiskStorage.Backend` object used in this cache. This storage stores loaded images in disk with a - /// reasonable expire duration and a maximum disk usage. To modify the configuration of a storage, just set - /// the storage `config` and its properties. - public let diskStorage: DiskStorage.Backend - - private let ioQueue: DispatchQueue - - /// Closure that defines the disk cache path from a given path and cacheName. - public typealias DiskCachePathClosure = (URL, String) -> URL - - // MARK: Initializers - - /// Creates an `ImageCache` from a customized `MemoryStorage` and `DiskStorage`. - /// - /// - Parameters: - /// - memoryStorage: The `MemoryStorage.Backend` object to use in the image cache. - /// - diskStorage: The `DiskStorage.Backend` object to use in the image cache. - public init( - memoryStorage: MemoryStorage.Backend, - diskStorage: DiskStorage.Backend) - { - self.memoryStorage = memoryStorage - self.diskStorage = diskStorage - let ioQueueName = "com.onevcat.Kingfisher.ImageCache.ioQueue.\(UUID().uuidString)" - ioQueue = DispatchQueue(label: ioQueueName) - - let notifications: [(Notification.Name, Selector)] - #if !os(macOS) && !os(watchOS) - notifications = [ - (UIApplication.didReceiveMemoryWarningNotification, #selector(clearMemoryCache)), - (UIApplication.willTerminateNotification, #selector(cleanExpiredDiskCache)), - (UIApplication.didEnterBackgroundNotification, #selector(backgroundCleanExpiredDiskCache)) - ] - #elseif os(macOS) - notifications = [ - (NSApplication.willResignActiveNotification, #selector(cleanExpiredDiskCache)), - ] - #else - notifications = [] - #endif - notifications.forEach { - NotificationCenter.default.addObserver(self, selector: $0.1, name: $0.0, object: nil) - } - } - - /// Creates an `ImageCache` with a given `name`. Both `MemoryStorage` and `DiskStorage` will be created - /// with a default config based on the `name`. - /// - /// - Parameter name: The name of cache object. It is used to setup disk cache directories and IO queue. - /// You should not use the same `name` for different caches, otherwise, the disk storage would - /// be conflicting to each other. The `name` should not be an empty string. - public convenience init(name: String) { - self.init(noThrowName: name, cacheDirectoryURL: nil, diskCachePathClosure: nil) - } - - /// Creates an `ImageCache` with a given `name`, cache directory `path` - /// and a closure to modify the cache directory. - /// - /// - Parameters: - /// - name: The name of cache object. It is used to setup disk cache directories and IO queue. - /// You should not use the same `name` for different caches, otherwise, the disk storage would - /// be conflicting to each other. - /// - cacheDirectoryURL: Location of cache directory URL on disk. It will be internally pass to the - /// initializer of `DiskStorage` as the disk cache directory. If `nil`, the cache - /// directory under user domain mask will be used. - /// - diskCachePathClosure: Closure that takes in an optional initial path string and generates - /// the final disk cache path. You could use it to fully customize your cache path. - /// - Throws: An error that happens during image cache creating, such as unable to create a directory at the given - /// path. - public convenience init( - name: String, - cacheDirectoryURL: URL?, - diskCachePathClosure: DiskCachePathClosure? = nil - ) throws - { - if name.isEmpty { - fatalError("[Kingfisher] You should specify a name for the cache. A cache with empty name is not permitted.") - } - - let memoryStorage = ImageCache.createMemoryStorage() - - let config = ImageCache.createConfig( - name: name, cacheDirectoryURL: cacheDirectoryURL, diskCachePathClosure: diskCachePathClosure - ) - let diskStorage = try DiskStorage.Backend(config: config) - self.init(memoryStorage: memoryStorage, diskStorage: diskStorage) - } - - convenience init( - noThrowName name: String, - cacheDirectoryURL: URL?, - diskCachePathClosure: DiskCachePathClosure? - ) - { - if name.isEmpty { - fatalError("[Kingfisher] You should specify a name for the cache. A cache with empty name is not permitted.") - } - - let memoryStorage = ImageCache.createMemoryStorage() - - let config = ImageCache.createConfig( - name: name, cacheDirectoryURL: cacheDirectoryURL, diskCachePathClosure: diskCachePathClosure - ) - let diskStorage = DiskStorage.Backend(noThrowConfig: config, creatingDirectory: true) - self.init(memoryStorage: memoryStorage, diskStorage: diskStorage) - } - - private static func createMemoryStorage() -> MemoryStorage.Backend { - let totalMemory = ProcessInfo.processInfo.physicalMemory - let costLimit = totalMemory / 4 - let memoryStorage = MemoryStorage.Backend(config: - .init(totalCostLimit: (costLimit > Int.max) ? Int.max : Int(costLimit))) - return memoryStorage - } - - private static func createConfig( - name: String, - cacheDirectoryURL: URL?, - diskCachePathClosure: DiskCachePathClosure? = nil - ) -> DiskStorage.Config - { - var diskConfig = DiskStorage.Config( - name: name, - sizeLimit: 0, - directory: cacheDirectoryURL - ) - if let closure = diskCachePathClosure { - diskConfig.cachePathBlock = closure - } - return diskConfig - } - - deinit { - NotificationCenter.default.removeObserver(self) - } - - // MARK: Storing Images - - open func store(_ image: KFCrossPlatformImage, - original: Data? = nil, - forKey key: String, - options: KingfisherParsedOptionsInfo, - toDisk: Bool = true, - completionHandler: ((CacheStoreResult) -> Void)? = nil) - { - let identifier = options.processor.identifier - let callbackQueue = options.callbackQueue - - let computedKey = key.computedKey(with: identifier) - // Memory storage should not throw. - memoryStorage.storeNoThrow(value: image, forKey: computedKey, expiration: options.memoryCacheExpiration) - - guard toDisk else { - if let completionHandler = completionHandler { - let result = CacheStoreResult(memoryCacheResult: .success(()), diskCacheResult: .success(())) - callbackQueue.execute { completionHandler(result) } - } - return - } - - ioQueue.async { - let serializer = options.cacheSerializer - if let data = serializer.data(with: image, original: original) { - self.syncStoreToDisk( - data, - forKey: key, - processorIdentifier: identifier, - callbackQueue: callbackQueue, - expiration: options.diskCacheExpiration, - writeOptions: options.diskStoreWriteOptions, - completionHandler: completionHandler) - } else { - guard let completionHandler = completionHandler else { return } - - let diskError = KingfisherError.cacheError( - reason: .cannotSerializeImage(image: image, original: original, serializer: serializer)) - let result = CacheStoreResult( - memoryCacheResult: .success(()), - diskCacheResult: .failure(diskError)) - callbackQueue.execute { completionHandler(result) } - } - } - } - - /// Stores an image to the cache. - /// - /// - Parameters: - /// - image: The image to be stored. - /// - original: The original data of the image. This value will be forwarded to the provided `serializer` for - /// further use. By default, Kingfisher uses a `DefaultCacheSerializer` to serialize the image to - /// data for caching in disk, it checks the image format based on `original` data to determine in - /// which image format should be used. For other types of `serializer`, it depends on their - /// implementation detail on how to use this original data. - /// - key: The key used for caching the image. - /// - identifier: The identifier of processor being used for caching. If you are using a processor for the - /// image, pass the identifier of processor to this parameter. - /// - serializer: The `CacheSerializer` - /// - toDisk: Whether this image should be cached to disk or not. If `false`, the image is only cached in memory. - /// Otherwise, it is cached in both memory storage and disk storage. Default is `true`. - /// - callbackQueue: The callback queue on which `completionHandler` is invoked. Default is `.untouch`. For case - /// that `toDisk` is `false`, a `.untouch` queue means `callbackQueue` will be invoked from the - /// caller queue of this method. If `toDisk` is `true`, the `completionHandler` will be called - /// from an internal file IO queue. To change this behavior, specify another `CallbackQueue` - /// value. - /// - completionHandler: A closure which is invoked when the cache operation finishes. - open func store(_ image: KFCrossPlatformImage, - original: Data? = nil, - forKey key: String, - processorIdentifier identifier: String = "", - cacheSerializer serializer: CacheSerializer = DefaultCacheSerializer.default, - toDisk: Bool = true, - callbackQueue: CallbackQueue = .untouch, - completionHandler: ((CacheStoreResult) -> Void)? = nil) - { - struct TempProcessor: ImageProcessor { - let identifier: String - func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - return nil - } - } - - let options = KingfisherParsedOptionsInfo([ - .processor(TempProcessor(identifier: identifier)), - .cacheSerializer(serializer), - .callbackQueue(callbackQueue) - ]) - store(image, original: original, forKey: key, options: options, - toDisk: toDisk, completionHandler: completionHandler) - } - - open func storeToDisk( - _ data: Data, - forKey key: String, - processorIdentifier identifier: String = "", - expiration: StorageExpiration? = nil, - callbackQueue: CallbackQueue = .untouch, - completionHandler: ((CacheStoreResult) -> Void)? = nil) - { - ioQueue.async { - self.syncStoreToDisk( - data, - forKey: key, - processorIdentifier: identifier, - callbackQueue: callbackQueue, - expiration: expiration, - completionHandler: completionHandler) - } - } - - private func syncStoreToDisk( - _ data: Data, - forKey key: String, - processorIdentifier identifier: String = "", - callbackQueue: CallbackQueue = .untouch, - expiration: StorageExpiration? = nil, - writeOptions: Data.WritingOptions = [], - completionHandler: ((CacheStoreResult) -> Void)? = nil) - { - let computedKey = key.computedKey(with: identifier) - let result: CacheStoreResult - do { - try self.diskStorage.store(value: data, forKey: computedKey, expiration: expiration, writeOptions: writeOptions) - result = CacheStoreResult(memoryCacheResult: .success(()), diskCacheResult: .success(())) - } catch { - let diskError: KingfisherError - if let error = error as? KingfisherError { - diskError = error - } else { - diskError = .cacheError(reason: .cannotConvertToData(object: data, error: error)) - } - - result = CacheStoreResult( - memoryCacheResult: .success(()), - diskCacheResult: .failure(diskError) - ) - } - if let completionHandler = completionHandler { - callbackQueue.execute { completionHandler(result) } - } - } - - // MARK: Removing Images - - /// Removes the image for the given key from the cache. - /// - /// - Parameters: - /// - key: The key used for caching the image. - /// - identifier: The identifier of processor being used for caching. If you are using a processor for the - /// image, pass the identifier of processor to this parameter. - /// - fromMemory: Whether this image should be removed from memory storage or not. - /// If `false`, the image won't be removed from the memory storage. Default is `true`. - /// - fromDisk: Whether this image should be removed from disk storage or not. - /// If `false`, the image won't be removed from the disk storage. Default is `true`. - /// - callbackQueue: The callback queue on which `completionHandler` is invoked. Default is `.untouch`. - /// - completionHandler: A closure which is invoked when the cache removing operation finishes. - open func removeImage(forKey key: String, - processorIdentifier identifier: String = "", - fromMemory: Bool = true, - fromDisk: Bool = true, - callbackQueue: CallbackQueue = .untouch, - completionHandler: (() -> Void)? = nil) - { - let computedKey = key.computedKey(with: identifier) - - if fromMemory { - memoryStorage.remove(forKey: computedKey) - } - - if fromDisk { - ioQueue.async{ - try? self.diskStorage.remove(forKey: computedKey) - if let completionHandler = completionHandler { - callbackQueue.execute { completionHandler() } - } - } - } else { - if let completionHandler = completionHandler { - callbackQueue.execute { completionHandler() } - } - } - } - - // MARK: Getting Images - - /// Gets an image for a given key from the cache, either from memory storage or disk storage. - /// - /// - Parameters: - /// - key: The key used for caching the image. - /// - options: The `KingfisherParsedOptionsInfo` options setting used for retrieving the image. - /// - callbackQueue: The callback queue on which `completionHandler` is invoked. Default is `.mainCurrentOrAsync`. - /// - completionHandler: A closure which is invoked when the image getting operation finishes. If the - /// image retrieving operation finishes without problem, an `ImageCacheResult` value - /// will be sent to this closure as result. Otherwise, a `KingfisherError` result - /// with detail failing reason will be sent. - open func retrieveImage( - forKey key: String, - options: KingfisherParsedOptionsInfo, - callbackQueue: CallbackQueue = .mainCurrentOrAsync, - completionHandler: ((Result) -> Void)?) - { - // No completion handler. No need to start working and early return. - guard let completionHandler = completionHandler else { return } - - // Try to check the image from memory cache first. - if let image = retrieveImageInMemoryCache(forKey: key, options: options) { - callbackQueue.execute { completionHandler(.success(.memory(image))) } - } else if options.fromMemoryCacheOrRefresh { - callbackQueue.execute { completionHandler(.success(.none)) } - } else { - - // Begin to disk search. - self.retrieveImageInDiskCache(forKey: key, options: options, callbackQueue: callbackQueue) { - result in - switch result { - case .success(let image): - - guard let image = image else { - // No image found in disk storage. - callbackQueue.execute { completionHandler(.success(.none)) } - return - } - - // Cache the disk image to memory. - // We are passing `false` to `toDisk`, the memory cache does not change - // callback queue, we can call `completionHandler` without another dispatch. - var cacheOptions = options - cacheOptions.callbackQueue = .untouch - self.store( - image, - forKey: key, - options: cacheOptions, - toDisk: false) - { - _ in - callbackQueue.execute { completionHandler(.success(.disk(image))) } - } - case .failure(let error): - callbackQueue.execute { completionHandler(.failure(error)) } - } - } - } - } - - /// Gets an image for a given key from the cache, either from memory storage or disk storage. - /// - /// - Parameters: - /// - key: The key used for caching the image. - /// - options: The `KingfisherOptionsInfo` options setting used for retrieving the image. - /// - callbackQueue: The callback queue on which `completionHandler` is invoked. Default is `.mainCurrentOrAsync`. - /// - completionHandler: A closure which is invoked when the image getting operation finishes. If the - /// image retrieving operation finishes without problem, an `ImageCacheResult` value - /// will be sent to this closure as result. Otherwise, a `KingfisherError` result - /// with detail failing reason will be sent. - /// - /// Note: This method is marked as `open` for only compatible purpose. Do not overide this method. Instead, override - /// the version receives `KingfisherParsedOptionsInfo` instead. - open func retrieveImage(forKey key: String, - options: KingfisherOptionsInfo? = nil, - callbackQueue: CallbackQueue = .mainCurrentOrAsync, - completionHandler: ((Result) -> Void)?) - { - retrieveImage( - forKey: key, - options: KingfisherParsedOptionsInfo(options), - callbackQueue: callbackQueue, - completionHandler: completionHandler) - } - - /// Gets an image for a given key from the memory storage. - /// - /// - Parameters: - /// - key: The key used for caching the image. - /// - options: The `KingfisherParsedOptionsInfo` options setting used for retrieving the image. - /// - Returns: The image stored in memory cache, if exists and valid. Otherwise, if the image does not exist or - /// has already expired, `nil` is returned. - open func retrieveImageInMemoryCache( - forKey key: String, - options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? - { - let computedKey = key.computedKey(with: options.processor.identifier) - return memoryStorage.value(forKey: computedKey, extendingExpiration: options.memoryCacheAccessExtendingExpiration) - } - - /// Gets an image for a given key from the memory storage. - /// - /// - Parameters: - /// - key: The key used for caching the image. - /// - options: The `KingfisherOptionsInfo` options setting used for retrieving the image. - /// - Returns: The image stored in memory cache, if exists and valid. Otherwise, if the image does not exist or - /// has already expired, `nil` is returned. - /// - /// Note: This method is marked as `open` for only compatible purpose. Do not overide this method. Instead, override - /// the version receives `KingfisherParsedOptionsInfo` instead. - open func retrieveImageInMemoryCache( - forKey key: String, - options: KingfisherOptionsInfo? = nil) -> KFCrossPlatformImage? - { - return retrieveImageInMemoryCache(forKey: key, options: KingfisherParsedOptionsInfo(options)) - } - - func retrieveImageInDiskCache( - forKey key: String, - options: KingfisherParsedOptionsInfo, - callbackQueue: CallbackQueue = .untouch, - completionHandler: @escaping (Result) -> Void) - { - let computedKey = key.computedKey(with: options.processor.identifier) - let loadingQueue: CallbackQueue = options.loadDiskFileSynchronously ? .untouch : .dispatch(ioQueue) - loadingQueue.execute { - do { - var image: KFCrossPlatformImage? = nil - if let data = try self.diskStorage.value(forKey: computedKey, extendingExpiration: options.diskCacheAccessExtendingExpiration) { - image = options.cacheSerializer.image(with: data, options: options) - } - if options.backgroundDecode { - image = image?.kf.decoded(scale: options.scaleFactor) - } - callbackQueue.execute { completionHandler(.success(image)) } - } catch let error as KingfisherError { - callbackQueue.execute { completionHandler(.failure(error)) } - } catch { - assertionFailure("The internal thrown error should be a `KingfisherError`.") - } - } - } - - /// Gets an image for a given key from the disk storage. - /// - /// - Parameters: - /// - key: The key used for caching the image. - /// - options: The `KingfisherOptionsInfo` options setting used for retrieving the image. - /// - callbackQueue: The callback queue on which `completionHandler` is invoked. Default is `.untouch`. - /// - completionHandler: A closure which is invoked when the operation finishes. - open func retrieveImageInDiskCache( - forKey key: String, - options: KingfisherOptionsInfo? = nil, - callbackQueue: CallbackQueue = .untouch, - completionHandler: @escaping (Result) -> Void) - { - retrieveImageInDiskCache( - forKey: key, - options: KingfisherParsedOptionsInfo(options), - callbackQueue: callbackQueue, - completionHandler: completionHandler) - } - - // MARK: Cleaning - /// Clears the memory & disk storage of this cache. This is an async operation. - /// - /// - Parameter handler: A closure which is invoked when the cache clearing operation finishes. - /// This `handler` will be called from the main queue. - public func clearCache(completion handler: (() -> Void)? = nil) { - clearMemoryCache() - clearDiskCache(completion: handler) - } - - /// Clears the memory storage of this cache. - @objc public func clearMemoryCache() { - memoryStorage.removeAll() - } - - /// Clears the disk storage of this cache. This is an async operation. - /// - /// - Parameter handler: A closure which is invoked when the cache clearing operation finishes. - /// This `handler` will be called from the main queue. - open func clearDiskCache(completion handler: (() -> Void)? = nil) { - ioQueue.async { - do { - try self.diskStorage.removeAll() - } catch _ { } - if let handler = handler { - DispatchQueue.main.async { handler() } - } - } - } - - /// Clears the expired images from memory & disk storage. This is an async operation. - open func cleanExpiredCache(completion handler: (() -> Void)? = nil) { - cleanExpiredMemoryCache() - cleanExpiredDiskCache(completion: handler) - } - - /// Clears the expired images from disk storage. - open func cleanExpiredMemoryCache() { - memoryStorage.removeExpired() - } - - /// Clears the expired images from disk storage. This is an async operation. - @objc func cleanExpiredDiskCache() { - cleanExpiredDiskCache(completion: nil) - } - - /// Clears the expired images from disk storage. This is an async operation. - /// - /// - Parameter handler: A closure which is invoked when the cache clearing operation finishes. - /// This `handler` will be called from the main queue. - open func cleanExpiredDiskCache(completion handler: (() -> Void)? = nil) { - ioQueue.async { - do { - var removed: [URL] = [] - let removedExpired = try self.diskStorage.removeExpiredValues() - removed.append(contentsOf: removedExpired) - - let removedSizeExceeded = try self.diskStorage.removeSizeExceededValues() - removed.append(contentsOf: removedSizeExceeded) - - if !removed.isEmpty { - DispatchQueue.main.async { - let cleanedHashes = removed.map { $0.lastPathComponent } - NotificationCenter.default.post( - name: .KingfisherDidCleanDiskCache, - object: self, - userInfo: [KingfisherDiskCacheCleanedHashKey: cleanedHashes]) - } - } - - if let handler = handler { - DispatchQueue.main.async { handler() } - } - } catch {} - } - } - -#if !os(macOS) && !os(watchOS) - /// Clears the expired images from disk storage when app is in background. This is an async operation. - /// In most cases, you should not call this method explicitly. - /// It will be called automatically when `UIApplicationDidEnterBackgroundNotification` received. - @objc public func backgroundCleanExpiredDiskCache() { - // if 'sharedApplication()' is unavailable, then return - guard let sharedApplication = KingfisherWrapper.shared else { return } - - func endBackgroundTask(_ task: inout UIBackgroundTaskIdentifier) { - sharedApplication.endBackgroundTask(task) - task = UIBackgroundTaskIdentifier.invalid - } - - var backgroundTask: UIBackgroundTaskIdentifier! - backgroundTask = sharedApplication.beginBackgroundTask { - endBackgroundTask(&backgroundTask!) - } - - cleanExpiredDiskCache { - endBackgroundTask(&backgroundTask!) - } - } -#endif - - // MARK: Image Cache State - - /// Returns the cache type for a given `key` and `identifier` combination. - /// This method is used for checking whether an image is cached in current cache. - /// It also provides information on which kind of cache can it be found in the return value. - /// - /// - Parameters: - /// - key: The key used for caching the image. - /// - identifier: Processor identifier which used for this image. Default is the `identifier` of - /// `DefaultImageProcessor.default`. - /// - Returns: A `CacheType` instance which indicates the cache status. - /// `.none` means the image is not in cache or it is already expired. - open func imageCachedType( - forKey key: String, - processorIdentifier identifier: String = DefaultImageProcessor.default.identifier) -> CacheType - { - let computedKey = key.computedKey(with: identifier) - if memoryStorage.isCached(forKey: computedKey) { return .memory } - if diskStorage.isCached(forKey: computedKey) { return .disk } - return .none - } - - /// Returns whether the file exists in cache for a given `key` and `identifier` combination. - /// - /// - Parameters: - /// - key: The key used for caching the image. - /// - identifier: Processor identifier which used for this image. Default is the `identifier` of - /// `DefaultImageProcessor.default`. - /// - Returns: A `Bool` which indicates whether a cache could match the given `key` and `identifier` combination. - /// - /// - Note: - /// The return value does not contain information about from which kind of storage the cache matches. - /// To get the information about cache type according `CacheType`, - /// use `imageCachedType(forKey:processorIdentifier:)` instead. - public func isCached( - forKey key: String, - processorIdentifier identifier: String = DefaultImageProcessor.default.identifier) -> Bool - { - return imageCachedType(forKey: key, processorIdentifier: identifier).cached - } - - /// Gets the hash used as cache file name for the key. - /// - /// - Parameters: - /// - key: The key used for caching the image. - /// - identifier: Processor identifier which used for this image. Default is the `identifier` of - /// `DefaultImageProcessor.default`. - /// - Returns: The hash which is used as the cache file name. - /// - /// - Note: - /// By default, for a given combination of `key` and `identifier`, `ImageCache` will use the value - /// returned by this method as the cache file name. You can use this value to check and match cache file - /// if you need. - open func hash( - forKey key: String, - processorIdentifier identifier: String = DefaultImageProcessor.default.identifier) -> String - { - let computedKey = key.computedKey(with: identifier) - return diskStorage.cacheFileName(forKey: computedKey) - } - - /// Calculates the size taken by the disk storage. - /// It is the total file size of all cached files in the `diskStorage` on disk in bytes. - /// - /// - Parameter handler: Called with the size calculating finishes. This closure is invoked from the main queue. - open func calculateDiskStorageSize(completion handler: @escaping ((Result) -> Void)) { - ioQueue.async { - do { - let size = try self.diskStorage.totalSize() - DispatchQueue.main.async { handler(.success(size)) } - } catch let error as KingfisherError { - DispatchQueue.main.async { handler(.failure(error)) } - } catch { - assertionFailure("The internal thrown error should be a `KingfisherError`.") - } - } - } - - #if swift(>=5.5) - #if canImport(_Concurrency) - @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) - open var diskStorageSize: UInt { - get async throws { - try await withCheckedThrowingContinuation { continuation in - calculateDiskStorageSize { result in - continuation.resume(with: result) - } - } - } - } - #endif - #endif - - /// Gets the cache path for the key. - /// It is useful for projects with web view or anyone that needs access to the local file path. - /// - /// i.e. Replacing the `` tag in your HTML. - /// - /// - Parameters: - /// - key: The key used for caching the image. - /// - identifier: Processor identifier which used for this image. Default is the `identifier` of - /// `DefaultImageProcessor.default`. - /// - Returns: The disk path of cached image under the given `key` and `identifier`. - /// - /// - Note: - /// This method does not guarantee there is an image already cached in the returned path. It just gives your - /// the path that the image should be, if it exists in disk storage. - /// - /// You could use `isCached(forKey:)` method to check whether the image is cached under that key in disk. - open func cachePath( - forKey key: String, - processorIdentifier identifier: String = DefaultImageProcessor.default.identifier) -> String - { - let computedKey = key.computedKey(with: identifier) - return diskStorage.cacheFileURL(forKey: computedKey).path - } -} - -#if !os(macOS) && !os(watchOS) -// MARK: - For App Extensions -extension UIApplication: KingfisherCompatible { } -extension KingfisherWrapper where Base: UIApplication { - public static var shared: UIApplication? { - let selector = NSSelectorFromString("sharedApplication") - guard Base.responds(to: selector) else { return nil } - return Base.perform(selector).takeUnretainedValue() as? UIApplication - } -} -#endif - -extension String { - func computedKey(with identifier: String) -> String { - if identifier.isEmpty { - return self - } else { - return appending("@\(identifier)") - } - } -} diff --git a/Pods/Kingfisher/Sources/Cache/MemoryStorage.swift b/Pods/Kingfisher/Sources/Cache/MemoryStorage.swift deleted file mode 100644 index 10d92b18..00000000 --- a/Pods/Kingfisher/Sources/Cache/MemoryStorage.swift +++ /dev/null @@ -1,283 +0,0 @@ -// -// MemoryStorage.swift -// Kingfisher -// -// Created by Wei Wang on 2018/10/15. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -/// Represents a set of conception related to storage which stores a certain type of value in memory. -/// This is a namespace for the memory storage types. A `Backend` with a certain `Config` will be used to describe the -/// storage. See these composed types for more information. -public enum MemoryStorage { - - /// Represents a storage which stores a certain type of value in memory. It provides fast access, - /// but limited storing size. The stored value type needs to conform to `CacheCostCalculable`, - /// and its `cacheCost` will be used to determine the cost of size for the cache item. - /// - /// You can config a `MemoryStorage.Backend` in its initializer by passing a `MemoryStorage.Config` value. - /// or modifying the `config` property after it being created. The backend of `MemoryStorage` has - /// upper limitation on cost size in memory and item count. All items in the storage has an expiration - /// date. When retrieved, if the target item is already expired, it will be recognized as it does not - /// exist in the storage. The `MemoryStorage` also contains a scheduled self clean task, to evict expired - /// items from memory. - public class Backend { - let storage = NSCache>() - - // Keys trackes the objects once inside the storage. For object removing triggered by user, the corresponding - // key would be also removed. However, for the object removing triggered by cache rule/policy of system, the - // key will be remained there until next `removeExpired` happens. - // - // Breaking the strict tracking could save additional locking behaviors. - // See https://github.com/onevcat/Kingfisher/issues/1233 - var keys = Set() - - private var cleanTimer: Timer? = nil - private let lock = NSLock() - - /// The config used in this storage. It is a value you can set and - /// use to config the storage in air. - public var config: Config { - didSet { - storage.totalCostLimit = config.totalCostLimit - storage.countLimit = config.countLimit - } - } - - /// Creates a `MemoryStorage` with a given `config`. - /// - /// - Parameter config: The config used to create the storage. It determines the max size limitation, - /// default expiration setting and more. - public init(config: Config) { - self.config = config - storage.totalCostLimit = config.totalCostLimit - storage.countLimit = config.countLimit - - cleanTimer = .scheduledTimer(withTimeInterval: config.cleanInterval, repeats: true) { [weak self] _ in - guard let self = self else { return } - self.removeExpired() - } - } - - /// Removes the expired values from the storage. - public func removeExpired() { - lock.lock() - defer { lock.unlock() } - for key in keys { - let nsKey = key as NSString - guard let object = storage.object(forKey: nsKey) else { - // This could happen if the object is moved by cache `totalCostLimit` or `countLimit` rule. - // We didn't remove the key yet until now, since we do not want to introduce additional lock. - // See https://github.com/onevcat/Kingfisher/issues/1233 - keys.remove(key) - continue - } - if object.isExpired { - storage.removeObject(forKey: nsKey) - keys.remove(key) - } - } - } - - /// Stores a value to the storage under the specified key and expiration policy. - /// - Parameters: - /// - value: The value to be stored. - /// - key: The key to which the `value` will be stored. - /// - expiration: The expiration policy used by this store action. - /// - Throws: No error will - public func store( - value: T, - forKey key: String, - expiration: StorageExpiration? = nil) - { - storeNoThrow(value: value, forKey: key, expiration: expiration) - } - - // The no throw version for storing value in cache. Kingfisher knows the detail so it - // could use this version to make syntax simpler internally. - func storeNoThrow( - value: T, - forKey key: String, - expiration: StorageExpiration? = nil) - { - lock.lock() - defer { lock.unlock() } - let expiration = expiration ?? config.expiration - // The expiration indicates that already expired, no need to store. - guard !expiration.isExpired else { return } - - let object: StorageObject - if config.keepWhenEnteringBackground { - object = BackgroundKeepingStorageObject(value, expiration: expiration) - } else { - object = StorageObject(value, expiration: expiration) - } - storage.setObject(object, forKey: key as NSString, cost: value.cacheCost) - keys.insert(key) - } - - /// Gets a value from the storage. - /// - /// - Parameters: - /// - key: The cache key of value. - /// - extendingExpiration: The expiration policy used by this getting action. - /// - Returns: The value under `key` if it is valid and found in the storage. Otherwise, `nil`. - public func value(forKey key: String, extendingExpiration: ExpirationExtending = .cacheTime) -> T? { - guard let object = storage.object(forKey: key as NSString) else { - return nil - } - if object.isExpired { - return nil - } - object.extendExpiration(extendingExpiration) - return object.value - } - - /// Whether there is valid cached data under a given key. - /// - Parameter key: The cache key of value. - /// - Returns: If there is valid data under the key, `true`. Otherwise, `false`. - public func isCached(forKey key: String) -> Bool { - guard let _ = value(forKey: key, extendingExpiration: .none) else { - return false - } - return true - } - - /// Removes a value from a specified key. - /// - Parameter key: The cache key of value. - public func remove(forKey key: String) { - lock.lock() - defer { lock.unlock() } - storage.removeObject(forKey: key as NSString) - keys.remove(key) - } - - /// Removes all values in this storage. - public func removeAll() { - lock.lock() - defer { lock.unlock() } - storage.removeAllObjects() - keys.removeAll() - } - } -} - -extension MemoryStorage { - /// Represents the config used in a `MemoryStorage`. - public struct Config { - - /// Total cost limit of the storage in bytes. - public var totalCostLimit: Int - - /// The item count limit of the memory storage. - public var countLimit: Int = .max - - /// The `StorageExpiration` used in this memory storage. Default is `.seconds(300)`, - /// means that the memory cache would expire in 5 minutes. - public var expiration: StorageExpiration = .seconds(300) - - /// The time interval between the storage do clean work for swiping expired items. - public var cleanInterval: TimeInterval - - /// Whether the newly added items to memory cache should be purged when the app goes to background. - /// - /// By default, the cached items in memory will be purged as soon as the app goes to background to ensure - /// least memory footprint. Enabling this would prevent this behavior and keep the items alive in cache even - /// when your app is not in foreground anymore. - /// - /// Default is `false`. After setting `true`, only the newly added cache objects are affected. Existing - /// objects which are already in the cache while this value was `false` will be still be purged when entering - /// background. - public var keepWhenEnteringBackground: Bool = false - - /// Creates a config from a given `totalCostLimit` value. - /// - /// - Parameters: - /// - totalCostLimit: Total cost limit of the storage in bytes. - /// - cleanInterval: The time interval between the storage do clean work for swiping expired items. - /// Default is 120, means the auto eviction happens once per two minutes. - /// - /// - Note: - /// Other members of `MemoryStorage.Config` will use their default values when created. - public init(totalCostLimit: Int, cleanInterval: TimeInterval = 120) { - self.totalCostLimit = totalCostLimit - self.cleanInterval = cleanInterval - } - } -} - -extension MemoryStorage { - - class BackgroundKeepingStorageObject: StorageObject, NSDiscardableContent { - var accessing = true - func beginContentAccess() -> Bool { - if value != nil { - accessing = true - } else { - accessing = false - } - return accessing - } - - func endContentAccess() { - accessing = false - } - - func discardContentIfPossible() { - value = nil - } - - func isContentDiscarded() -> Bool { - return value == nil - } - } - - class StorageObject { - var value: T? - let expiration: StorageExpiration - - private(set) var estimatedExpiration: Date - - init(_ value: T, expiration: StorageExpiration) { - self.value = value - self.expiration = expiration - - self.estimatedExpiration = expiration.estimatedExpirationSinceNow - } - - func extendExpiration(_ extendingExpiration: ExpirationExtending = .cacheTime) { - switch extendingExpiration { - case .none: - return - case .cacheTime: - self.estimatedExpiration = expiration.estimatedExpirationSinceNow - case .expirationTime(let expirationTime): - self.estimatedExpiration = expirationTime.estimatedExpirationSinceNow - } - } - - var isExpired: Bool { - return estimatedExpiration.isPast - } - } -} diff --git a/Pods/Kingfisher/Sources/Cache/Storage.swift b/Pods/Kingfisher/Sources/Cache/Storage.swift deleted file mode 100644 index ad9d3263..00000000 --- a/Pods/Kingfisher/Sources/Cache/Storage.swift +++ /dev/null @@ -1,110 +0,0 @@ -// -// Storage.swift -// Kingfisher -// -// Created by Wei Wang on 2018/10/15. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -/// Constants for some time intervals -struct TimeConstants { - static let secondsInOneDay = 86_400 -} - -/// Represents the expiration strategy used in storage. -/// -/// - never: The item never expires. -/// - seconds: The item expires after a time duration of given seconds from now. -/// - days: The item expires after a time duration of given days from now. -/// - date: The item expires after a given date. -public enum StorageExpiration { - /// The item never expires. - case never - /// The item expires after a time duration of given seconds from now. - case seconds(TimeInterval) - /// The item expires after a time duration of given days from now. - case days(Int) - /// The item expires after a given date. - case date(Date) - /// Indicates the item is already expired. Use this to skip cache. - case expired - - func estimatedExpirationSince(_ date: Date) -> Date { - switch self { - case .never: return .distantFuture - case .seconds(let seconds): - return date.addingTimeInterval(seconds) - case .days(let days): - let duration: TimeInterval = TimeInterval(TimeConstants.secondsInOneDay) * TimeInterval(days) - return date.addingTimeInterval(duration) - case .date(let ref): - return ref - case .expired: - return .distantPast - } - } - - var estimatedExpirationSinceNow: Date { - return estimatedExpirationSince(Date()) - } - - var isExpired: Bool { - return timeInterval <= 0 - } - - var timeInterval: TimeInterval { - switch self { - case .never: return .infinity - case .seconds(let seconds): return seconds - case .days(let days): return TimeInterval(TimeConstants.secondsInOneDay) * TimeInterval(days) - case .date(let ref): return ref.timeIntervalSinceNow - case .expired: return -(.infinity) - } - } -} - -/// Represents the expiration extending strategy used in storage to after access. -/// -/// - none: The item expires after the original time, without extending after access. -/// - cacheTime: The item expiration extends by the original cache time after each access. -/// - expirationTime: The item expiration extends by the provided time after each access. -public enum ExpirationExtending { - /// The item expires after the original time, without extending after access. - case none - /// The item expiration extends by the original cache time after each access. - case cacheTime - /// The item expiration extends by the provided time after each access. - case expirationTime(_ expiration: StorageExpiration) -} - -/// Represents types which cost in memory can be calculated. -public protocol CacheCostCalculable { - var cacheCost: Int { get } -} - -/// Represents types which can be converted to and from data. -public protocol DataTransformable { - func toData() throws -> Data - static func fromData(_ data: Data) throws -> Self - static var empty: Self { get } -} diff --git a/Pods/Kingfisher/Sources/Extensions/CPListItem+Kingfisher.swift b/Pods/Kingfisher/Sources/Extensions/CPListItem+Kingfisher.swift deleted file mode 100644 index 085bead9..00000000 --- a/Pods/Kingfisher/Sources/Extensions/CPListItem+Kingfisher.swift +++ /dev/null @@ -1,245 +0,0 @@ - -// -// CPListItem+Kingfisher.swift -// Kingfisher -// -// Created by Wayne Hartman on 2021-08-29. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if canImport(CarPlay) && !targetEnvironment(macCatalyst) -import CarPlay - -@available(iOS 14.0, *) -extension KingfisherWrapper where Base: CPListItem { - - // MARK: Setting Image - - /// Sets an image to the image view with a source. - /// - /// - Parameters: - /// - source: The `Source` object contains information about the image. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// - /// Internally, this method will use `KingfisherManager` to get the requested source - /// Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with source: Source?, - placeholder: KFCrossPlatformImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - let options = KingfisherParsedOptionsInfo(KingfisherManager.shared.defaultOptions + (options ?? [])) - return setImage( - with: source, - placeholder: placeholder, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: completionHandler - ) - } - - /// Sets an image to the image view with a requested resource. - /// - /// - Parameters: - /// - resource: The `Resource` object contains information about the image. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// - /// Internally, this method will use `KingfisherManager` to get the requested resource, from either cache - /// or network. Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with resource: Resource?, - placeholder: KFCrossPlatformImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - return setImage( - with: resource?.convertToSource(), - placeholder: placeholder, - options: options, - progressBlock: progressBlock, - completionHandler: completionHandler) - } - - func setImage( - with source: Source?, - placeholder: KFCrossPlatformImage? = nil, - parsedOptions: KingfisherParsedOptionsInfo, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - var mutatingSelf = self - guard let source = source else { - /** - * In iOS SDK 14.0-14.4 the image param was non-`nil`. The SDK changed in 14.5 - * to allow `nil`. The compiler version 5.4 was introduced in this same SDK, - * which allows >=14.5 SDK to set a `nil` image. This compile check allows - * newer SDK users to set the image to `nil`, while still allowing older SDK - * users to compile the framework. - */ - #if compiler(>=5.4) - self.base.setImage(placeholder) - #else - if let placeholder = placeholder { - self.base.setImage(placeholder) - } - #endif - - mutatingSelf.taskIdentifier = nil - completionHandler?(.failure(KingfisherError.imageSettingError(reason: .emptySource))) - return nil - } - - var options = parsedOptions - if !options.keepCurrentImageWhileLoading { - /** - * In iOS SDK 14.0-14.4 the image param was non-`nil`. The SDK changed in 14.5 - * to allow `nil`. The compiler version 5.4 was introduced in this same SDK, - * which allows >=14.5 SDK to set a `nil` image. This compile check allows - * newer SDK users to set the image to `nil`, while still allowing older SDK - * users to compile the framework. - */ - #if compiler(>=5.4) - self.base.setImage(placeholder) - #else // Let older SDK users deal with the older behavior. - if let placeholder = placeholder { - self.base.setImage(placeholder) - } - #endif - } - - let issuedIdentifier = Source.Identifier.next() - mutatingSelf.taskIdentifier = issuedIdentifier - - if let block = progressBlock { - options.onDataReceived = (options.onDataReceived ?? []) + [ImageLoadingProgressSideEffect(block)] - } - - let task = KingfisherManager.shared.retrieveImage( - with: source, - options: options, - downloadTaskUpdated: { mutatingSelf.imageTask = $0 }, - progressiveImageSetter: { self.base.setImage($0) }, - referenceTaskIdentifierChecker: { issuedIdentifier == self.taskIdentifier }, - completionHandler: { result in - CallbackQueue.mainCurrentOrAsync.execute { - guard issuedIdentifier == self.taskIdentifier else { - let reason: KingfisherError.ImageSettingErrorReason - do { - let value = try result.get() - reason = .notCurrentSourceTask(result: value, error: nil, source: source) - } catch { - reason = .notCurrentSourceTask(result: nil, error: error, source: source) - } - let error = KingfisherError.imageSettingError(reason: reason) - completionHandler?(.failure(error)) - return - } - - mutatingSelf.imageTask = nil - mutatingSelf.taskIdentifier = nil - - switch result { - case .success(let value): - self.base.setImage(value.image) - completionHandler?(result) - - case .failure: - if let image = options.onFailureImage { - /** - * In iOS SDK 14.0-14.4 the image param was non-`nil`. The SDK changed in 14.5 - * to allow `nil`. The compiler version 5.4 was introduced in this same SDK, - * which allows >=14.5 SDK to set a `nil` image. This compile check allows - * newer SDK users to set the image to `nil`, while still allowing older SDK - * users to compile the framework. - */ - #if compiler(>=5.4) - self.base.setImage(image) - #else // Let older SDK users deal with the older behavior. - if let unwrapped = image { - self.base.setImage(unwrapped) - } - #endif - } - completionHandler?(result) - } - } - } - ) - - mutatingSelf.imageTask = task - return task - } - - // MARK: Cancelling Image - - /// Cancel the image download task bounded to the image view if it is running. - /// Nothing will happen if the downloading has already finished. - public func cancelDownloadTask() { - imageTask?.cancel() - } -} - -private var taskIdentifierKey: Void? -private var imageTaskKey: Void? - -// MARK: Properties -extension KingfisherWrapper where Base: CPListItem { - - public private(set) var taskIdentifier: Source.Identifier.Value? { - get { - let box: Box? = getAssociatedObject(base, &taskIdentifierKey) - return box?.value - } - set { - let box = newValue.map { Box($0) } - setRetainedAssociatedObject(base, &taskIdentifierKey, box) - } - } - - private var imageTask: DownloadTask? { - get { return getAssociatedObject(base, &imageTaskKey) } - set { setRetainedAssociatedObject(base, &imageTaskKey, newValue)} - } -} -#endif diff --git a/Pods/Kingfisher/Sources/Extensions/ImageView+Kingfisher.swift b/Pods/Kingfisher/Sources/Extensions/ImageView+Kingfisher.swift deleted file mode 100644 index 9378f192..00000000 --- a/Pods/Kingfisher/Sources/Extensions/ImageView+Kingfisher.swift +++ /dev/null @@ -1,537 +0,0 @@ -// -// ImageView+Kingfisher.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/6. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if !os(watchOS) - -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -extension KingfisherWrapper where Base: KFCrossPlatformImageView { - - // MARK: Setting Image - - /// Sets an image to the image view with a `Source`. - /// - /// - Parameters: - /// - source: The `Source` object defines data information from network or a data provider. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// This is the easiest way to use Kingfisher to boost the image setting process from a source. Since all parameters - /// have a default value except the `source`, you can set an image from a certain URL to an image view like this: - /// - /// ``` - /// // Set image from a network source. - /// let url = URL(string: "https://example.com/image.png")! - /// imageView.kf.setImage(with: .network(url)) - /// - /// // Or set image from a data provider. - /// let provider = LocalFileImageDataProvider(fileURL: fileURL) - /// imageView.kf.setImage(with: .provider(provider)) - /// ``` - /// - /// For both `.network` and `.provider` source, there are corresponding view extension methods. So the code - /// above is equivalent to: - /// - /// ``` - /// imageView.kf.setImage(with: url) - /// imageView.kf.setImage(with: provider) - /// ``` - /// - /// Internally, this method will use `KingfisherManager` to get the source. - /// Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with source: Source?, - placeholder: Placeholder? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - let options = KingfisherParsedOptionsInfo(KingfisherManager.shared.defaultOptions + (options ?? .empty)) - return setImage(with: source, placeholder: placeholder, parsedOptions: options, progressBlock: progressBlock, completionHandler: completionHandler) - } - - /// Sets an image to the image view with a `Source`. - /// - /// - Parameters: - /// - source: The `Source` object defines data information from network or a data provider. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// This is the easiest way to use Kingfisher to boost the image setting process from a source. Since all parameters - /// have a default value except the `source`, you can set an image from a certain URL to an image view like this: - /// - /// ``` - /// // Set image from a network source. - /// let url = URL(string: "https://example.com/image.png")! - /// imageView.kf.setImage(with: .network(url)) - /// - /// // Or set image from a data provider. - /// let provider = LocalFileImageDataProvider(fileURL: fileURL) - /// imageView.kf.setImage(with: .provider(provider)) - /// ``` - /// - /// For both `.network` and `.provider` source, there are corresponding view extension methods. So the code - /// above is equivalent to: - /// - /// ``` - /// imageView.kf.setImage(with: url) - /// imageView.kf.setImage(with: provider) - /// ``` - /// - /// Internally, this method will use `KingfisherManager` to get the source. - /// Since this method will perform UI changes, you must call it from the main thread. - /// The `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with source: Source?, - placeholder: Placeholder? = nil, - options: KingfisherOptionsInfo? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - return setImage( - with: source, - placeholder: placeholder, - options: options, - progressBlock: nil, - completionHandler: completionHandler - ) - } - - /// Sets an image to the image view with a requested resource. - /// - /// - Parameters: - /// - resource: The `Resource` object contains information about the resource. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// This is the easiest way to use Kingfisher to boost the image setting process from network. Since all parameters - /// have a default value except the `resource`, you can set an image from a certain URL to an image view like this: - /// - /// ``` - /// let url = URL(string: "https://example.com/image.png")! - /// imageView.kf.setImage(with: url) - /// ``` - /// - /// Internally, this method will use `KingfisherManager` to get the requested resource, from either cache - /// or network. Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with resource: Resource?, - placeholder: Placeholder? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - return setImage( - with: resource?.convertToSource(), - placeholder: placeholder, - options: options, - progressBlock: progressBlock, - completionHandler: completionHandler) - } - - /// Sets an image to the image view with a requested resource. - /// - /// - Parameters: - /// - resource: The `Resource` object contains information about the resource. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// This is the easiest way to use Kingfisher to boost the image setting process from network. Since all parameters - /// have a default value except the `resource`, you can set an image from a certain URL to an image view like this: - /// - /// ``` - /// let url = URL(string: "https://example.com/image.png")! - /// imageView.kf.setImage(with: url) - /// ``` - /// - /// Internally, this method will use `KingfisherManager` to get the requested resource, from either cache - /// or network. Since this method will perform UI changes, you must call it from the main thread. - /// The `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with resource: Resource?, - placeholder: Placeholder? = nil, - options: KingfisherOptionsInfo? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - return setImage( - with: resource, - placeholder: placeholder, - options: options, - progressBlock: nil, - completionHandler: completionHandler - ) - } - - /// Sets an image to the image view with a data provider. - /// - /// - Parameters: - /// - provider: The `ImageDataProvider` object contains information about the data. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// Internally, this method will use `KingfisherManager` to get the image data, from either cache - /// or the data provider. Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with provider: ImageDataProvider?, - placeholder: Placeholder? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - return setImage( - with: provider.map { .provider($0) }, - placeholder: placeholder, - options: options, - progressBlock: progressBlock, - completionHandler: completionHandler) - } - - /// Sets an image to the image view with a data provider. - /// - /// - Parameters: - /// - provider: The `ImageDataProvider` object contains information about the data. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// Internally, this method will use `KingfisherManager` to get the image data, from either cache - /// or the data provider. Since this method will perform UI changes, you must call it from the main thread. - /// The `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with provider: ImageDataProvider?, - placeholder: Placeholder? = nil, - options: KingfisherOptionsInfo? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - return setImage( - with: provider, - placeholder: placeholder, - options: options, - progressBlock: nil, - completionHandler: completionHandler - ) - } - - - func setImage( - with source: Source?, - placeholder: Placeholder? = nil, - parsedOptions: KingfisherParsedOptionsInfo, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - var mutatingSelf = self - guard let source = source else { - mutatingSelf.placeholder = placeholder - mutatingSelf.taskIdentifier = nil - completionHandler?(.failure(KingfisherError.imageSettingError(reason: .emptySource))) - return nil - } - - var options = parsedOptions - - let isEmptyImage = base.image == nil && self.placeholder == nil - if !options.keepCurrentImageWhileLoading || isEmptyImage { - // Always set placeholder while there is no image/placeholder yet. - mutatingSelf.placeholder = placeholder - } - - let maybeIndicator = indicator - maybeIndicator?.startAnimatingView() - - let issuedIdentifier = Source.Identifier.next() - mutatingSelf.taskIdentifier = issuedIdentifier - - if base.shouldPreloadAllAnimation() { - options.preloadAllAnimationData = true - } - - if let block = progressBlock { - options.onDataReceived = (options.onDataReceived ?? []) + [ImageLoadingProgressSideEffect(block)] - } - - let task = KingfisherManager.shared.retrieveImage( - with: source, - options: options, - downloadTaskUpdated: { mutatingSelf.imageTask = $0 }, - progressiveImageSetter: { self.base.image = $0 }, - referenceTaskIdentifierChecker: { issuedIdentifier == self.taskIdentifier }, - completionHandler: { result in - CallbackQueue.mainCurrentOrAsync.execute { - maybeIndicator?.stopAnimatingView() - guard issuedIdentifier == self.taskIdentifier else { - let reason: KingfisherError.ImageSettingErrorReason - do { - let value = try result.get() - reason = .notCurrentSourceTask(result: value, error: nil, source: source) - } catch { - reason = .notCurrentSourceTask(result: nil, error: error, source: source) - } - let error = KingfisherError.imageSettingError(reason: reason) - completionHandler?(.failure(error)) - return - } - - mutatingSelf.imageTask = nil - mutatingSelf.taskIdentifier = nil - - switch result { - case .success(let value): - guard self.needsTransition(options: options, cacheType: value.cacheType) else { - mutatingSelf.placeholder = nil - self.base.image = value.image - completionHandler?(result) - return - } - - self.makeTransition(image: value.image, transition: options.transition) { - completionHandler?(result) - } - - case .failure: - if let image = options.onFailureImage { - mutatingSelf.placeholder = nil - self.base.image = image - } - completionHandler?(result) - } - } - } - ) - mutatingSelf.imageTask = task - return task - } - - // MARK: Cancelling Downloading Task - - /// Cancels the image download task of the image view if it is running. - /// Nothing will happen if the downloading has already finished. - public func cancelDownloadTask() { - imageTask?.cancel() - } - - private func needsTransition(options: KingfisherParsedOptionsInfo, cacheType: CacheType) -> Bool { - switch options.transition { - case .none: - return false - #if os(macOS) - case .fade: // Fade is only a placeholder for SwiftUI on macOS. - return false - #else - default: - if options.forceTransition { return true } - if cacheType == .none { return true } - return false - #endif - } - } - - private func makeTransition(image: KFCrossPlatformImage, transition: ImageTransition, done: @escaping () -> Void) { - #if !os(macOS) - // Force hiding the indicator without transition first. - UIView.transition( - with: self.base, - duration: 0.0, - options: [], - animations: { self.indicator?.stopAnimatingView() }, - completion: { _ in - var mutatingSelf = self - mutatingSelf.placeholder = nil - UIView.transition( - with: self.base, - duration: transition.duration, - options: [transition.animationOptions, .allowUserInteraction], - animations: { transition.animations?(self.base, image) }, - completion: { finished in - transition.completion?(finished) - done() - } - ) - } - ) - #else - done() - #endif - } -} - -// MARK: - Associated Object -private var taskIdentifierKey: Void? -private var indicatorKey: Void? -private var indicatorTypeKey: Void? -private var placeholderKey: Void? -private var imageTaskKey: Void? - -extension KingfisherWrapper where Base: KFCrossPlatformImageView { - - // MARK: Properties - public private(set) var taskIdentifier: Source.Identifier.Value? { - get { - let box: Box? = getAssociatedObject(base, &taskIdentifierKey) - return box?.value - } - set { - let box = newValue.map { Box($0) } - setRetainedAssociatedObject(base, &taskIdentifierKey, box) - } - } - - /// Holds which indicator type is going to be used. - /// Default is `.none`, means no indicator will be shown while downloading. - public var indicatorType: IndicatorType { - get { - return getAssociatedObject(base, &indicatorTypeKey) ?? .none - } - - set { - switch newValue { - case .none: indicator = nil - case .activity: indicator = ActivityIndicator() - case .image(let data): indicator = ImageIndicator(imageData: data) - case .custom(let anIndicator): indicator = anIndicator - } - - setRetainedAssociatedObject(base, &indicatorTypeKey, newValue) - } - } - - /// Holds any type that conforms to the protocol `Indicator`. - /// The protocol `Indicator` has a `view` property that will be shown when loading an image. - /// It will be `nil` if `indicatorType` is `.none`. - public private(set) var indicator: Indicator? { - get { - let box: Box? = getAssociatedObject(base, &indicatorKey) - return box?.value - } - - set { - // Remove previous - if let previousIndicator = indicator { - previousIndicator.view.removeFromSuperview() - } - - // Add new - if let newIndicator = newValue { - // Set default indicator layout - let view = newIndicator.view - - base.addSubview(view) - view.translatesAutoresizingMaskIntoConstraints = false - view.centerXAnchor.constraint( - equalTo: base.centerXAnchor, constant: newIndicator.centerOffset.x).isActive = true - view.centerYAnchor.constraint( - equalTo: base.centerYAnchor, constant: newIndicator.centerOffset.y).isActive = true - - switch newIndicator.sizeStrategy(in: base) { - case .intrinsicSize: - break - case .full: - view.heightAnchor.constraint(equalTo: base.heightAnchor, constant: 0).isActive = true - view.widthAnchor.constraint(equalTo: base.widthAnchor, constant: 0).isActive = true - case .size(let size): - view.heightAnchor.constraint(equalToConstant: size.height).isActive = true - view.widthAnchor.constraint(equalToConstant: size.width).isActive = true - } - - newIndicator.view.isHidden = true - } - - // Save in associated object - // Wrap newValue with Box to workaround an issue that Swift does not recognize - // and casting protocol for associate object correctly. https://github.com/onevcat/Kingfisher/issues/872 - setRetainedAssociatedObject(base, &indicatorKey, newValue.map(Box.init)) - } - } - - private var imageTask: DownloadTask? { - get { return getAssociatedObject(base, &imageTaskKey) } - set { setRetainedAssociatedObject(base, &imageTaskKey, newValue)} - } - - /// Represents the `Placeholder` used for this image view. A `Placeholder` will be shown in the view while - /// it is downloading an image. - public private(set) var placeholder: Placeholder? { - get { return getAssociatedObject(base, &placeholderKey) } - set { - if let previousPlaceholder = placeholder { - previousPlaceholder.remove(from: base) - } - - if let newPlaceholder = newValue { - newPlaceholder.add(to: base) - } else { - base.image = nil - } - setRetainedAssociatedObject(base, &placeholderKey, newValue) - } - } -} - - -extension KFCrossPlatformImageView { - @objc func shouldPreloadAllAnimation() -> Bool { return true } -} - -#endif diff --git a/Pods/Kingfisher/Sources/Extensions/NSButton+Kingfisher.swift b/Pods/Kingfisher/Sources/Extensions/NSButton+Kingfisher.swift deleted file mode 100644 index d33d557d..00000000 --- a/Pods/Kingfisher/Sources/Extensions/NSButton+Kingfisher.swift +++ /dev/null @@ -1,362 +0,0 @@ -// -// NSButton+Kingfisher.swift -// Kingfisher -// -// Created by Jie Zhang on 14/04/2016. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if canImport(AppKit) && !targetEnvironment(macCatalyst) - -import AppKit - -extension KingfisherWrapper where Base: NSButton { - - // MARK: Setting Image - - /// Sets an image to the button with a source. - /// - /// - Parameters: - /// - source: The `Source` object contains information about how to get the image. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// Internally, this method will use `KingfisherManager` to get the requested source. - /// Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with source: Source?, - placeholder: KFCrossPlatformImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - let options = KingfisherParsedOptionsInfo(KingfisherManager.shared.defaultOptions + (options ?? .empty)) - return setImage( - with: source, - placeholder: placeholder, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: completionHandler - ) - } - - /// Sets an image to the button with a requested resource. - /// - /// - Parameters: - /// - resource: The `Resource` object contains information about the resource. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// Internally, this method will use `KingfisherManager` to get the requested resource, from either cache - /// or network. Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with resource: Resource?, - placeholder: KFCrossPlatformImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - return setImage( - with: resource?.convertToSource(), - placeholder: placeholder, - options: options, - progressBlock: progressBlock, - completionHandler: completionHandler) - } - - func setImage( - with source: Source?, - placeholder: KFCrossPlatformImage? = nil, - parsedOptions: KingfisherParsedOptionsInfo, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - var mutatingSelf = self - guard let source = source else { - base.image = placeholder - mutatingSelf.taskIdentifier = nil - completionHandler?(.failure(KingfisherError.imageSettingError(reason: .emptySource))) - return nil - } - - var options = parsedOptions - if !options.keepCurrentImageWhileLoading { - base.image = placeholder - } - - let issuedIdentifier = Source.Identifier.next() - mutatingSelf.taskIdentifier = issuedIdentifier - - if let block = progressBlock { - options.onDataReceived = (options.onDataReceived ?? []) + [ImageLoadingProgressSideEffect(block)] - } - - let task = KingfisherManager.shared.retrieveImage( - with: source, - options: options, - downloadTaskUpdated: { mutatingSelf.imageTask = $0 }, - progressiveImageSetter: { self.base.image = $0 }, - referenceTaskIdentifierChecker: { issuedIdentifier == self.taskIdentifier }, - completionHandler: { result in - CallbackQueue.mainCurrentOrAsync.execute { - guard issuedIdentifier == self.taskIdentifier else { - let reason: KingfisherError.ImageSettingErrorReason - do { - let value = try result.get() - reason = .notCurrentSourceTask(result: value, error: nil, source: source) - } catch { - reason = .notCurrentSourceTask(result: nil, error: error, source: source) - } - let error = KingfisherError.imageSettingError(reason: reason) - completionHandler?(.failure(error)) - return - } - - mutatingSelf.imageTask = nil - mutatingSelf.taskIdentifier = nil - - switch result { - case .success(let value): - self.base.image = value.image - completionHandler?(result) - - case .failure: - if let image = options.onFailureImage { - self.base.image = image - } - completionHandler?(result) - } - } - } - ) - - mutatingSelf.imageTask = task - return task - } - - // MARK: Cancelling Downloading Task - - /// Cancels the image download task of the button if it is running. - /// Nothing will happen if the downloading has already finished. - public func cancelImageDownloadTask() { - imageTask?.cancel() - } - - // MARK: Setting Alternate Image - - @discardableResult - public func setAlternateImage( - with source: Source?, - placeholder: KFCrossPlatformImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - let options = KingfisherParsedOptionsInfo(KingfisherManager.shared.defaultOptions + (options ?? .empty)) - return setAlternateImage( - with: source, - placeholder: placeholder, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: completionHandler - ) - } - - /// Sets an alternate image to the button with a requested resource. - /// - /// - Parameters: - /// - resource: The `Resource` object contains information about the resource. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// Internally, this method will use `KingfisherManager` to get the requested resource, from either cache - /// or network. Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setAlternateImage( - with resource: Resource?, - placeholder: KFCrossPlatformImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - return setAlternateImage( - with: resource?.convertToSource(), - placeholder: placeholder, - options: options, - progressBlock: progressBlock, - completionHandler: completionHandler) - } - - func setAlternateImage( - with source: Source?, - placeholder: KFCrossPlatformImage? = nil, - parsedOptions: KingfisherParsedOptionsInfo, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - var mutatingSelf = self - guard let source = source else { - base.alternateImage = placeholder - mutatingSelf.alternateTaskIdentifier = nil - completionHandler?(.failure(KingfisherError.imageSettingError(reason: .emptySource))) - return nil - } - - var options = parsedOptions - if !options.keepCurrentImageWhileLoading { - base.alternateImage = placeholder - } - - let issuedIdentifier = Source.Identifier.next() - mutatingSelf.alternateTaskIdentifier = issuedIdentifier - - if let block = progressBlock { - options.onDataReceived = (options.onDataReceived ?? []) + [ImageLoadingProgressSideEffect(block)] - } - - if let provider = ImageProgressiveProvider(options, refresh: { image in - self.base.alternateImage = image - }) { - options.onDataReceived = (options.onDataReceived ?? []) + [provider] - } - - options.onDataReceived?.forEach { - $0.onShouldApply = { issuedIdentifier == self.alternateTaskIdentifier } - } - - let task = KingfisherManager.shared.retrieveImage( - with: source, - options: options, - downloadTaskUpdated: { mutatingSelf.alternateImageTask = $0 }, - completionHandler: { result in - CallbackQueue.mainCurrentOrAsync.execute { - guard issuedIdentifier == self.alternateTaskIdentifier else { - let reason: KingfisherError.ImageSettingErrorReason - do { - let value = try result.get() - reason = .notCurrentSourceTask(result: value, error: nil, source: source) - } catch { - reason = .notCurrentSourceTask(result: nil, error: error, source: source) - } - let error = KingfisherError.imageSettingError(reason: reason) - completionHandler?(.failure(error)) - return - } - - mutatingSelf.alternateImageTask = nil - mutatingSelf.alternateTaskIdentifier = nil - - switch result { - case .success(let value): - self.base.alternateImage = value.image - completionHandler?(result) - - case .failure: - if let image = options.onFailureImage { - self.base.alternateImage = image - } - completionHandler?(result) - } - } - } - ) - - mutatingSelf.alternateImageTask = task - return task - } - - // MARK: Cancelling Alternate Image Downloading Task - - /// Cancels the alternate image download task of the button if it is running. - /// Nothing will happen if the downloading has already finished. - public func cancelAlternateImageDownloadTask() { - alternateImageTask?.cancel() - } -} - - -// MARK: - Associated Object -private var taskIdentifierKey: Void? -private var imageTaskKey: Void? - -private var alternateTaskIdentifierKey: Void? -private var alternateImageTaskKey: Void? - -extension KingfisherWrapper where Base: NSButton { - - // MARK: Properties - - public private(set) var taskIdentifier: Source.Identifier.Value? { - get { - let box: Box? = getAssociatedObject(base, &taskIdentifierKey) - return box?.value - } - set { - let box = newValue.map { Box($0) } - setRetainedAssociatedObject(base, &taskIdentifierKey, box) - } - } - - private var imageTask: DownloadTask? { - get { return getAssociatedObject(base, &imageTaskKey) } - set { setRetainedAssociatedObject(base, &imageTaskKey, newValue)} - } - - public private(set) var alternateTaskIdentifier: Source.Identifier.Value? { - get { - let box: Box? = getAssociatedObject(base, &alternateTaskIdentifierKey) - return box?.value - } - set { - let box = newValue.map { Box($0) } - setRetainedAssociatedObject(base, &alternateTaskIdentifierKey, box) - } - } - - private var alternateImageTask: DownloadTask? { - get { return getAssociatedObject(base, &alternateImageTaskKey) } - set { setRetainedAssociatedObject(base, &alternateImageTaskKey, newValue)} - } -} -#endif diff --git a/Pods/Kingfisher/Sources/Extensions/NSTextAttachment+Kingfisher.swift b/Pods/Kingfisher/Sources/Extensions/NSTextAttachment+Kingfisher.swift deleted file mode 100644 index 23f627eb..00000000 --- a/Pods/Kingfisher/Sources/Extensions/NSTextAttachment+Kingfisher.swift +++ /dev/null @@ -1,271 +0,0 @@ -// -// NSTextAttachment+Kingfisher.swift -// Kingfisher -// -// Created by Benjamin Briggs on 22/07/2019. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if !os(watchOS) - -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -extension KingfisherWrapper where Base: NSTextAttachment { - - // MARK: Setting Image - - /// Sets an image to the text attachment with a source. - /// - /// - Parameters: - /// - source: The `Source` object defines data information from network or a data provider. - /// - attributedView: The owner of the attributed string which this `NSTextAttachment` is added. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// - /// Internally, this method will use `KingfisherManager` to get the requested source - /// Since this method will perform UI changes, you must call it from the main thread. - /// - /// The retrieved image will be set to `NSTextAttachment.image` property. Because it is not an image view based - /// rendering, options related to view, such as `.transition`, are not supported. - /// - /// Kingfisher will call `setNeedsDisplay` on the `attributedView` when the image task done. It gives the view a - /// chance to render the attributed string again for displaying the downloaded image. For example, if you set an - /// attributed with this `NSTextAttachment` to a `UILabel` object, pass it as the `attributedView` parameter. - /// - /// Here is a typical use case: - /// - /// ```swift - /// let attributedText = NSMutableAttributedString(string: "Hello World") - /// let textAttachment = NSTextAttachment() - /// - /// textAttachment.kf.setImage( - /// with: URL(string: "https://onevcat.com/assets/images/avatar.jpg")!, - /// attributedView: label, - /// options: [ - /// .processor( - /// ResizingImageProcessor(referenceSize: .init(width: 30, height: 30)) - /// |> RoundCornerImageProcessor(cornerRadius: 15)) - /// ] - /// ) - /// attributedText.replaceCharacters(in: NSRange(), with: NSAttributedString(attachment: textAttachment)) - /// label.attributedText = attributedText - /// ``` - /// - @discardableResult - public func setImage( - with source: Source?, - attributedView: @autoclosure @escaping () -> KFCrossPlatformView, - placeholder: KFCrossPlatformImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - let options = KingfisherParsedOptionsInfo(KingfisherManager.shared.defaultOptions + (options ?? .empty)) - return setImage( - with: source, - attributedView: attributedView, - placeholder: placeholder, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: completionHandler - ) - } - - /// Sets an image to the text attachment with a source. - /// - /// - Parameters: - /// - resource: The `Resource` object contains information about the resource. - /// - attributedView: The owner of the attributed string which this `NSTextAttachment` is added. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// - /// Internally, this method will use `KingfisherManager` to get the requested source - /// Since this method will perform UI changes, you must call it from the main thread. - /// - /// The retrieved image will be set to `NSTextAttachment.image` property. Because it is not an image view based - /// rendering, options related to view, such as `.transition`, are not supported. - /// - /// Kingfisher will call `setNeedsDisplay` on the `attributedView` when the image task done. It gives the view a - /// chance to render the attributed string again for displaying the downloaded image. For example, if you set an - /// attributed with this `NSTextAttachment` to a `UILabel` object, pass it as the `attributedView` parameter. - /// - /// Here is a typical use case: - /// - /// ```swift - /// let attributedText = NSMutableAttributedString(string: "Hello World") - /// let textAttachment = NSTextAttachment() - /// - /// textAttachment.kf.setImage( - /// with: URL(string: "https://onevcat.com/assets/images/avatar.jpg")!, - /// attributedView: label, - /// options: [ - /// .processor( - /// ResizingImageProcessor(referenceSize: .init(width: 30, height: 30)) - /// |> RoundCornerImageProcessor(cornerRadius: 15)) - /// ] - /// ) - /// attributedText.replaceCharacters(in: NSRange(), with: NSAttributedString(attachment: textAttachment)) - /// label.attributedText = attributedText - /// ``` - /// - @discardableResult - public func setImage( - with resource: Resource?, - attributedView: @autoclosure @escaping () -> KFCrossPlatformView, - placeholder: KFCrossPlatformImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - let options = KingfisherParsedOptionsInfo(KingfisherManager.shared.defaultOptions + (options ?? .empty)) - return setImage( - with: resource.map { .network($0) }, - attributedView: attributedView, - placeholder: placeholder, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: completionHandler - ) - } - - func setImage( - with source: Source?, - attributedView: @escaping () -> KFCrossPlatformView, - placeholder: KFCrossPlatformImage? = nil, - parsedOptions: KingfisherParsedOptionsInfo, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - var mutatingSelf = self - guard let source = source else { - base.image = placeholder - mutatingSelf.taskIdentifier = nil - completionHandler?(.failure(KingfisherError.imageSettingError(reason: .emptySource))) - return nil - } - - var options = parsedOptions - if !options.keepCurrentImageWhileLoading { - base.image = placeholder - } - - let issuedIdentifier = Source.Identifier.next() - mutatingSelf.taskIdentifier = issuedIdentifier - - if let block = progressBlock { - options.onDataReceived = (options.onDataReceived ?? []) + [ImageLoadingProgressSideEffect(block)] - } - - let task = KingfisherManager.shared.retrieveImage( - with: source, - options: options, - progressiveImageSetter: { self.base.image = $0 }, - referenceTaskIdentifierChecker: { issuedIdentifier == self.taskIdentifier }, - completionHandler: { result in - CallbackQueue.mainCurrentOrAsync.execute { - guard issuedIdentifier == self.taskIdentifier else { - let reason: KingfisherError.ImageSettingErrorReason - do { - let value = try result.get() - reason = .notCurrentSourceTask(result: value, error: nil, source: source) - } catch { - reason = .notCurrentSourceTask(result: nil, error: error, source: source) - } - let error = KingfisherError.imageSettingError(reason: reason) - completionHandler?(.failure(error)) - return - } - - mutatingSelf.imageTask = nil - mutatingSelf.taskIdentifier = nil - - switch result { - case .success(let value): - self.base.image = value.image - let view = attributedView() - #if canImport(UIKit) - view.setNeedsDisplay() - #else - view.setNeedsDisplay(view.bounds) - #endif - case .failure: - if let image = options.onFailureImage { - self.base.image = image - } - } - completionHandler?(result) - } - } - ) - - mutatingSelf.imageTask = task - return task - } - - // MARK: Cancelling Image - - /// Cancel the image download task bounded to the text attachment if it is running. - /// Nothing will happen if the downloading has already finished. - public func cancelDownloadTask() { - imageTask?.cancel() - } -} - -private var taskIdentifierKey: Void? -private var imageTaskKey: Void? - -// MARK: Properties -extension KingfisherWrapper where Base: NSTextAttachment { - - public private(set) var taskIdentifier: Source.Identifier.Value? { - get { - let box: Box? = getAssociatedObject(base, &taskIdentifierKey) - return box?.value - } - set { - let box = newValue.map { Box($0) } - setRetainedAssociatedObject(base, &taskIdentifierKey, box) - } - } - - private var imageTask: DownloadTask? { - get { return getAssociatedObject(base, &imageTaskKey) } - set { setRetainedAssociatedObject(base, &imageTaskKey, newValue)} - } -} - -#endif diff --git a/Pods/Kingfisher/Sources/Extensions/TVMonogramView+Kingfisher.swift b/Pods/Kingfisher/Sources/Extensions/TVMonogramView+Kingfisher.swift deleted file mode 100644 index c0993cd6..00000000 --- a/Pods/Kingfisher/Sources/Extensions/TVMonogramView+Kingfisher.swift +++ /dev/null @@ -1,209 +0,0 @@ -// -// TVMonogramView+Kingfisher.swift -// Kingfisher -// -// Created by Marvin Nazari on 2020-12-07. -// -// Copyright (c) 2020 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -#if canImport(TVUIKit) - -import TVUIKit - -@available(tvOS 12.0, *) -extension KingfisherWrapper where Base: TVMonogramView { - - // MARK: Setting Image - - /// Sets an image to the image view with a source. - /// - /// - Parameters: - /// - source: The `Source` object contains information about the image. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// - /// Internally, this method will use `KingfisherManager` to get the requested source - /// Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with source: Source?, - placeholder: KFCrossPlatformImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - let options = KingfisherParsedOptionsInfo(KingfisherManager.shared.defaultOptions + (options ?? .empty)) - return setImage( - with: source, - placeholder: placeholder, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: completionHandler - ) - } - - func setImage( - with source: Source?, - placeholder: KFCrossPlatformImage? = nil, - parsedOptions: KingfisherParsedOptionsInfo, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - var mutatingSelf = self - guard let source = source else { - base.image = placeholder - mutatingSelf.taskIdentifier = nil - completionHandler?(.failure(KingfisherError.imageSettingError(reason: .emptySource))) - return nil - } - - var options = parsedOptions - if !options.keepCurrentImageWhileLoading { - base.image = placeholder - } - - let issuedIdentifier = Source.Identifier.next() - mutatingSelf.taskIdentifier = issuedIdentifier - - if let block = progressBlock { - options.onDataReceived = (options.onDataReceived ?? []) + [ImageLoadingProgressSideEffect(block)] - } - - let task = KingfisherManager.shared.retrieveImage( - with: source, - options: options, - downloadTaskUpdated: { mutatingSelf.imageTask = $0 }, - progressiveImageSetter: { self.base.image = $0 }, - referenceTaskIdentifierChecker: { issuedIdentifier == self.taskIdentifier }, - completionHandler: { result in - CallbackQueue.mainCurrentOrAsync.execute { - guard issuedIdentifier == self.taskIdentifier else { - let reason: KingfisherError.ImageSettingErrorReason - do { - let value = try result.get() - reason = .notCurrentSourceTask(result: value, error: nil, source: source) - } catch { - reason = .notCurrentSourceTask(result: nil, error: error, source: source) - } - let error = KingfisherError.imageSettingError(reason: reason) - completionHandler?(.failure(error)) - return - } - - mutatingSelf.imageTask = nil - mutatingSelf.taskIdentifier = nil - - switch result { - case .success(let value): - self.base.image = value.image - completionHandler?(result) - - case .failure: - if let image = options.onFailureImage { - self.base.image = image - } - completionHandler?(result) - } - } - } - ) - - mutatingSelf.imageTask = task - return task - } - - /// Sets an image to the image view with a requested resource. - /// - /// - Parameters: - /// - resource: The `Resource` object contains information about the image. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// - /// Internally, this method will use `KingfisherManager` to get the requested resource, from either cache - /// or network. Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with resource: Resource?, - placeholder: KFCrossPlatformImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - return setImage( - with: resource?.convertToSource(), - placeholder: placeholder, - options: options, - progressBlock: progressBlock, - completionHandler: completionHandler) - } - - // MARK: Cancelling Image - - /// Cancel the image download task bounded to the image view if it is running. - /// Nothing will happen if the downloading has already finished. - public func cancelDownloadTask() { - imageTask?.cancel() - } -} - -private var taskIdentifierKey: Void? -private var imageTaskKey: Void? - -// MARK: Properties -@available(tvOS 12.0, *) -extension KingfisherWrapper where Base: TVMonogramView { - - public private(set) var taskIdentifier: Source.Identifier.Value? { - get { - let box: Box? = getAssociatedObject(base, &taskIdentifierKey) - return box?.value - } - set { - let box = newValue.map { Box($0) } - setRetainedAssociatedObject(base, &taskIdentifierKey, box) - } - } - - private var imageTask: DownloadTask? { - get { return getAssociatedObject(base, &imageTaskKey) } - set { setRetainedAssociatedObject(base, &imageTaskKey, newValue)} - } -} - -#endif diff --git a/Pods/Kingfisher/Sources/Extensions/UIButton+Kingfisher.swift b/Pods/Kingfisher/Sources/Extensions/UIButton+Kingfisher.swift deleted file mode 100644 index d1e2dcbf..00000000 --- a/Pods/Kingfisher/Sources/Extensions/UIButton+Kingfisher.swift +++ /dev/null @@ -1,400 +0,0 @@ -// -// UIButton+Kingfisher.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/13. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if !os(watchOS) - -#if canImport(UIKit) -import UIKit - -extension KingfisherWrapper where Base: UIButton { - - // MARK: Setting Image - /// Sets an image to the button for a specified state with a source. - /// - /// - Parameters: - /// - source: The `Source` object contains information about the image. - /// - state: The button state to which the image should be set. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// Internally, this method will use `KingfisherManager` to get the requested source, from either cache - /// or network. Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with source: Source?, - for state: UIControl.State, - placeholder: UIImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - let options = KingfisherParsedOptionsInfo(KingfisherManager.shared.defaultOptions + (options ?? .empty)) - return setImage( - with: source, - for: state, - placeholder: placeholder, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: completionHandler - ) - } - - /// Sets an image to the button for a specified state with a requested resource. - /// - /// - Parameters: - /// - resource: The `Resource` object contains information about the resource. - /// - state: The button state to which the image should be set. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// Internally, this method will use `KingfisherManager` to get the requested resource, from either cache - /// or network. Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with resource: Resource?, - for state: UIControl.State, - placeholder: UIImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - return setImage( - with: resource?.convertToSource(), - for: state, - placeholder: placeholder, - options: options, - progressBlock: progressBlock, - completionHandler: completionHandler) - } - - @discardableResult - public func setImage( - with source: Source?, - for state: UIControl.State, - placeholder: UIImage? = nil, - parsedOptions: KingfisherParsedOptionsInfo, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - guard let source = source else { - base.setImage(placeholder, for: state) - setTaskIdentifier(nil, for: state) - completionHandler?(.failure(KingfisherError.imageSettingError(reason: .emptySource))) - return nil - } - - var options = parsedOptions - if !options.keepCurrentImageWhileLoading { - base.setImage(placeholder, for: state) - } - - var mutatingSelf = self - let issuedIdentifier = Source.Identifier.next() - setTaskIdentifier(issuedIdentifier, for: state) - - if let block = progressBlock { - options.onDataReceived = (options.onDataReceived ?? []) + [ImageLoadingProgressSideEffect(block)] - } - - let task = KingfisherManager.shared.retrieveImage( - with: source, - options: options, - downloadTaskUpdated: { mutatingSelf.imageTask = $0 }, - progressiveImageSetter: { self.base.setImage($0, for: state) }, - referenceTaskIdentifierChecker: { issuedIdentifier == self.taskIdentifier(for: state) }, - completionHandler: { result in - CallbackQueue.mainCurrentOrAsync.execute { - guard issuedIdentifier == self.taskIdentifier(for: state) else { - let reason: KingfisherError.ImageSettingErrorReason - do { - let value = try result.get() - reason = .notCurrentSourceTask(result: value, error: nil, source: source) - } catch { - reason = .notCurrentSourceTask(result: nil, error: error, source: source) - } - let error = KingfisherError.imageSettingError(reason: reason) - completionHandler?(.failure(error)) - return - } - - mutatingSelf.imageTask = nil - mutatingSelf.setTaskIdentifier(nil, for: state) - - switch result { - case .success(let value): - self.base.setImage(value.image, for: state) - completionHandler?(result) - - case .failure: - if let image = options.onFailureImage { - self.base.setImage(image, for: state) - } - completionHandler?(result) - } - } - } - ) - - mutatingSelf.imageTask = task - return task - } - - // MARK: Cancelling Downloading Task - - /// Cancels the image download task of the button if it is running. - /// Nothing will happen if the downloading has already finished. - public func cancelImageDownloadTask() { - imageTask?.cancel() - } - - // MARK: Setting Background Image - - /// Sets a background image to the button for a specified state with a source. - /// - /// - Parameters: - /// - source: The `Source` object contains information about the image. - /// - state: The button state to which the image should be set. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// Internally, this method will use `KingfisherManager` to get the requested source - /// Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setBackgroundImage( - with source: Source?, - for state: UIControl.State, - placeholder: UIImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - let options = KingfisherParsedOptionsInfo(KingfisherManager.shared.defaultOptions + (options ?? .empty)) - return setBackgroundImage( - with: source, - for: state, - placeholder: placeholder, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: completionHandler - ) - } - - /// Sets a background image to the button for a specified state with a requested resource. - /// - /// - Parameters: - /// - resource: The `Resource` object contains information about the resource. - /// - state: The button state to which the image should be set. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// Internally, this method will use `KingfisherManager` to get the requested resource, from either cache - /// or network. Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setBackgroundImage( - with resource: Resource?, - for state: UIControl.State, - placeholder: UIImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - return setBackgroundImage( - with: resource?.convertToSource(), - for: state, - placeholder: placeholder, - options: options, - progressBlock: progressBlock, - completionHandler: completionHandler) - } - - func setBackgroundImage( - with source: Source?, - for state: UIControl.State, - placeholder: UIImage? = nil, - parsedOptions: KingfisherParsedOptionsInfo, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - guard let source = source else { - base.setBackgroundImage(placeholder, for: state) - setBackgroundTaskIdentifier(nil, for: state) - completionHandler?(.failure(KingfisherError.imageSettingError(reason: .emptySource))) - return nil - } - - var options = parsedOptions - if !options.keepCurrentImageWhileLoading { - base.setBackgroundImage(placeholder, for: state) - } - - var mutatingSelf = self - let issuedIdentifier = Source.Identifier.next() - setBackgroundTaskIdentifier(issuedIdentifier, for: state) - - if let block = progressBlock { - options.onDataReceived = (options.onDataReceived ?? []) + [ImageLoadingProgressSideEffect(block)] - } - - let task = KingfisherManager.shared.retrieveImage( - with: source, - options: options, - downloadTaskUpdated: { mutatingSelf.backgroundImageTask = $0 }, - progressiveImageSetter: { self.base.setBackgroundImage($0, for: state) }, - referenceTaskIdentifierChecker: { issuedIdentifier == self.backgroundTaskIdentifier(for: state) }, - completionHandler: { result in - CallbackQueue.mainCurrentOrAsync.execute { - guard issuedIdentifier == self.backgroundTaskIdentifier(for: state) else { - let reason: KingfisherError.ImageSettingErrorReason - do { - let value = try result.get() - reason = .notCurrentSourceTask(result: value, error: nil, source: source) - } catch { - reason = .notCurrentSourceTask(result: nil, error: error, source: source) - } - let error = KingfisherError.imageSettingError(reason: reason) - completionHandler?(.failure(error)) - return - } - - mutatingSelf.backgroundImageTask = nil - mutatingSelf.setBackgroundTaskIdentifier(nil, for: state) - - switch result { - case .success(let value): - self.base.setBackgroundImage(value.image, for: state) - completionHandler?(result) - - case .failure: - if let image = options.onFailureImage { - self.base.setBackgroundImage(image, for: state) - } - completionHandler?(result) - } - } - } - ) - - mutatingSelf.backgroundImageTask = task - return task - } - - // MARK: Cancelling Background Downloading Task - - /// Cancels the background image download task of the button if it is running. - /// Nothing will happen if the downloading has already finished. - public func cancelBackgroundImageDownloadTask() { - backgroundImageTask?.cancel() - } -} - -// MARK: - Associated Object -private var taskIdentifierKey: Void? -private var imageTaskKey: Void? - -// MARK: Properties -extension KingfisherWrapper where Base: UIButton { - - private typealias TaskIdentifier = Box<[UInt: Source.Identifier.Value]> - - public func taskIdentifier(for state: UIControl.State) -> Source.Identifier.Value? { - return taskIdentifierInfo.value[state.rawValue] - } - - private func setTaskIdentifier(_ identifier: Source.Identifier.Value?, for state: UIControl.State) { - taskIdentifierInfo.value[state.rawValue] = identifier - } - - private var taskIdentifierInfo: TaskIdentifier { - return getAssociatedObject(base, &taskIdentifierKey) ?? { - setRetainedAssociatedObject(base, &taskIdentifierKey, $0) - return $0 - } (TaskIdentifier([:])) - } - - private var imageTask: DownloadTask? { - get { return getAssociatedObject(base, &imageTaskKey) } - set { setRetainedAssociatedObject(base, &imageTaskKey, newValue)} - } -} - - -private var backgroundTaskIdentifierKey: Void? -private var backgroundImageTaskKey: Void? - -// MARK: Background Properties -extension KingfisherWrapper where Base: UIButton { - - public func backgroundTaskIdentifier(for state: UIControl.State) -> Source.Identifier.Value? { - return backgroundTaskIdentifierInfo.value[state.rawValue] - } - - private func setBackgroundTaskIdentifier(_ identifier: Source.Identifier.Value?, for state: UIControl.State) { - backgroundTaskIdentifierInfo.value[state.rawValue] = identifier - } - - private var backgroundTaskIdentifierInfo: TaskIdentifier { - return getAssociatedObject(base, &backgroundTaskIdentifierKey) ?? { - setRetainedAssociatedObject(base, &backgroundTaskIdentifierKey, $0) - return $0 - } (TaskIdentifier([:])) - } - - private var backgroundImageTask: DownloadTask? { - get { return getAssociatedObject(base, &backgroundImageTaskKey) } - mutating set { setRetainedAssociatedObject(base, &backgroundImageTaskKey, newValue) } - } -} -#endif - -#endif diff --git a/Pods/Kingfisher/Sources/Extensions/WKInterfaceImage+Kingfisher.swift b/Pods/Kingfisher/Sources/Extensions/WKInterfaceImage+Kingfisher.swift deleted file mode 100644 index a24feeb3..00000000 --- a/Pods/Kingfisher/Sources/Extensions/WKInterfaceImage+Kingfisher.swift +++ /dev/null @@ -1,204 +0,0 @@ -// -// WKInterfaceImage+Kingfisher.swift -// Kingfisher -// -// Created by Rodrigo Borges Soares on 04/05/18. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if canImport(WatchKit) - -import WatchKit - -extension KingfisherWrapper where Base: WKInterfaceImage { - - // MARK: Setting Image - - /// Sets an image to the image view with a source. - /// - /// - Parameters: - /// - source: The `Source` object contains information about the image. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// - /// Internally, this method will use `KingfisherManager` to get the requested source - /// Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with source: Source?, - placeholder: KFCrossPlatformImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - let options = KingfisherParsedOptionsInfo(KingfisherManager.shared.defaultOptions + (options ?? .empty)) - return setImage( - with: source, - placeholder: placeholder, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: completionHandler - ) - } - - /// Sets an image to the image view with a requested resource. - /// - /// - Parameters: - /// - resource: The `Resource` object contains information about the image. - /// - placeholder: A placeholder to show while retrieving the image from the given `resource`. - /// - options: An options set to define image setting behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. - /// - completionHandler: Called when the image retrieved and set finished. - /// - Returns: A task represents the image downloading. - /// - /// - Note: - /// - /// Internally, this method will use `KingfisherManager` to get the requested resource, from either cache - /// or network. Since this method will perform UI changes, you must call it from the main thread. - /// Both `progressBlock` and `completionHandler` will be also executed in the main thread. - /// - @discardableResult - public func setImage( - with resource: Resource?, - placeholder: KFCrossPlatformImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - return setImage( - with: resource?.convertToSource(), - placeholder: placeholder, - options: options, - progressBlock: progressBlock, - completionHandler: completionHandler) - } - - func setImage( - with source: Source?, - placeholder: KFCrossPlatformImage? = nil, - parsedOptions: KingfisherParsedOptionsInfo, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - var mutatingSelf = self - guard let source = source else { - base.setImage(placeholder) - mutatingSelf.taskIdentifier = nil - completionHandler?(.failure(KingfisherError.imageSettingError(reason: .emptySource))) - return nil - } - - var options = parsedOptions - if !options.keepCurrentImageWhileLoading { - base.setImage(placeholder) - } - - let issuedIdentifier = Source.Identifier.next() - mutatingSelf.taskIdentifier = issuedIdentifier - - if let block = progressBlock { - options.onDataReceived = (options.onDataReceived ?? []) + [ImageLoadingProgressSideEffect(block)] - } - - let task = KingfisherManager.shared.retrieveImage( - with: source, - options: options, - downloadTaskUpdated: { mutatingSelf.imageTask = $0 }, - progressiveImageSetter: { self.base.setImage($0) }, - referenceTaskIdentifierChecker: { issuedIdentifier == self.taskIdentifier }, - completionHandler: { result in - CallbackQueue.mainCurrentOrAsync.execute { - guard issuedIdentifier == self.taskIdentifier else { - let reason: KingfisherError.ImageSettingErrorReason - do { - let value = try result.get() - reason = .notCurrentSourceTask(result: value, error: nil, source: source) - } catch { - reason = .notCurrentSourceTask(result: nil, error: error, source: source) - } - let error = KingfisherError.imageSettingError(reason: reason) - completionHandler?(.failure(error)) - return - } - - mutatingSelf.imageTask = nil - mutatingSelf.taskIdentifier = nil - - switch result { - case .success(let value): - self.base.setImage(value.image) - completionHandler?(result) - - case .failure: - if let image = options.onFailureImage { - self.base.setImage(image) - } - completionHandler?(result) - } - } - } - ) - - mutatingSelf.imageTask = task - return task - } - - // MARK: Cancelling Image - - /// Cancel the image download task bounded to the image view if it is running. - /// Nothing will happen if the downloading has already finished. - public func cancelDownloadTask() { - imageTask?.cancel() - } -} - -private var taskIdentifierKey: Void? -private var imageTaskKey: Void? - -// MARK: Properties -extension KingfisherWrapper where Base: WKInterfaceImage { - - public private(set) var taskIdentifier: Source.Identifier.Value? { - get { - let box: Box? = getAssociatedObject(base, &taskIdentifierKey) - return box?.value - } - set { - let box = newValue.map { Box($0) } - setRetainedAssociatedObject(base, &taskIdentifierKey, box) - } - } - - private var imageTask: DownloadTask? { - get { return getAssociatedObject(base, &imageTaskKey) } - set { setRetainedAssociatedObject(base, &imageTaskKey, newValue)} - } -} -#endif diff --git a/Pods/Kingfisher/Sources/General/ImageSource/AVAssetImageDataProvider.swift b/Pods/Kingfisher/Sources/General/ImageSource/AVAssetImageDataProvider.swift deleted file mode 100644 index 7dc35ff7..00000000 --- a/Pods/Kingfisher/Sources/General/ImageSource/AVAssetImageDataProvider.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// AVAssetImageDataProvider.swift -// Kingfisher -// -// Created by onevcat on 2020/08/09. -// -// Copyright (c) 2020 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if !os(watchOS) - -import Foundation -import AVKit - -#if canImport(MobileCoreServices) -import MobileCoreServices -#else -import CoreServices -#endif - -/// A data provider to provide thumbnail data from a given AVKit asset. -public struct AVAssetImageDataProvider: ImageDataProvider { - - /// The possible error might be caused by the `AVAssetImageDataProvider`. - /// - userCancelled: The data provider process is cancelled. - /// - invalidImage: The retrieved image is invalid. - public enum AVAssetImageDataProviderError: Error { - case userCancelled - case invalidImage(_ image: CGImage?) - } - - /// The asset image generator bound to `self`. - public let assetImageGenerator: AVAssetImageGenerator - - /// The time at which the image should be generate in the asset. - public let time: CMTime - - private var internalKey: String { - guard let url = (assetImageGenerator.asset as? AVURLAsset)?.url else { - return UUID().uuidString - } - return url.cacheKey - } - - /// The cache key used by `self`. - public var cacheKey: String { - return "\(internalKey)_\(time.seconds)" - } - - /// Creates an asset image data provider. - /// - Parameters: - /// - assetImageGenerator: The asset image generator controls data providing behaviors. - /// - time: At which time in the asset the image should be generated. - public init(assetImageGenerator: AVAssetImageGenerator, time: CMTime) { - self.assetImageGenerator = assetImageGenerator - self.time = time - } - - /// Creates an asset image data provider. - /// - Parameters: - /// - assetURL: The URL of asset for providing image data. - /// - time: At which time in the asset the image should be generated. - /// - /// This method uses `assetURL` to create an `AVAssetImageGenerator` object and calls - /// the `init(assetImageGenerator:time:)` initializer. - /// - public init(assetURL: URL, time: CMTime) { - let asset = AVAsset(url: assetURL) - let generator = AVAssetImageGenerator(asset: asset) - generator.appliesPreferredTrackTransform = true - self.init(assetImageGenerator: generator, time: time) - } - - /// Creates an asset image data provider. - /// - /// - Parameters: - /// - assetURL: The URL of asset for providing image data. - /// - seconds: At which time in seconds in the asset the image should be generated. - /// - /// This method uses `assetURL` to create an `AVAssetImageGenerator` object, uses `seconds` to create a `CMTime`, - /// and calls the `init(assetImageGenerator:time:)` initializer. - /// - public init(assetURL: URL, seconds: TimeInterval) { - let time = CMTime(seconds: seconds, preferredTimescale: 600) - self.init(assetURL: assetURL, time: time) - } - - public func data(handler: @escaping (Result) -> Void) { - assetImageGenerator.generateCGImagesAsynchronously(forTimes: [NSValue(time: time)]) { - (requestedTime, image, imageTime, result, error) in - if let error = error { - handler(.failure(error)) - return - } - - if result == .cancelled { - handler(.failure(AVAssetImageDataProviderError.userCancelled)) - return - } - - guard let cgImage = image, let data = cgImage.jpegData else { - handler(.failure(AVAssetImageDataProviderError.invalidImage(image))) - return - } - - handler(.success(data)) - } - } -} - -extension CGImage { - var jpegData: Data? { - guard let mutableData = CFDataCreateMutable(nil, 0) else { - return nil - } -#if os(visionOS) - guard let destination = CGImageDestinationCreateWithData( - mutableData, UTType.jpeg.identifier as CFString , 1, nil - ) else { - return nil - } -#else - guard let destination = CGImageDestinationCreateWithData(mutableData, kUTTypeJPEG, 1, nil) else { - return nil - } -#endif - - CGImageDestinationAddImage(destination, self, nil) - guard CGImageDestinationFinalize(destination) else { return nil } - return mutableData as Data - } -} - -#endif diff --git a/Pods/Kingfisher/Sources/General/ImageSource/ImageDataProvider.swift b/Pods/Kingfisher/Sources/General/ImageSource/ImageDataProvider.swift deleted file mode 100644 index dd34150c..00000000 --- a/Pods/Kingfisher/Sources/General/ImageSource/ImageDataProvider.swift +++ /dev/null @@ -1,190 +0,0 @@ -// -// ImageDataProvider.swift -// Kingfisher -// -// Created by onevcat on 2018/11/13. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -/// Represents a data provider to provide image data to Kingfisher when setting with -/// `Source.provider` source. Compared to `Source.network` member, it gives a chance -/// to load some image data in your own way, as long as you can provide the data -/// representation for the image. -public protocol ImageDataProvider { - - /// The key used in cache. - var cacheKey: String { get } - - /// Provides the data which represents image. Kingfisher uses the data you pass in the - /// handler to process images and caches it for later use. - /// - /// - Parameter handler: The handler you should call when you prepared your data. - /// If the data is loaded successfully, call the handler with - /// a `.success` with the data associated. Otherwise, call it - /// with a `.failure` and pass the error. - /// - /// - Note: - /// If the `handler` is called with a `.failure` with error, a `dataProviderError` of - /// `ImageSettingErrorReason` will be finally thrown out to you as the `KingfisherError` - /// from the framework. - func data(handler: @escaping (Result) -> Void) - - /// The content URL represents this provider, if exists. - var contentURL: URL? { get } -} - -public extension ImageDataProvider { - var contentURL: URL? { return nil } - func convertToSource() -> Source { - .provider(self) - } -} - -/// Represents an image data provider for loading from a local file URL on disk. -/// Uses this type for adding a disk image to Kingfisher. Compared to loading it -/// directly, you can get benefit of using Kingfisher's extension methods, as well -/// as applying `ImageProcessor`s and storing the image to `ImageCache` of Kingfisher. -public struct LocalFileImageDataProvider: ImageDataProvider { - - // MARK: Public Properties - - /// The file URL from which the image be loaded. - public let fileURL: URL - private let loadingQueue: ExecutionQueue - - // MARK: Initializers - - /// Creates an image data provider by supplying the target local file URL. - /// - /// - Parameters: - /// - fileURL: The file URL from which the image be loaded. - /// - cacheKey: The key is used for caching the image data. By default, - /// the `absoluteString` of `fileURL` is used. - /// - loadingQueue: The queue where the file loading should happen. By default, the dispatch queue of - /// `.global(qos: .userInitiated)` will be used. - public init( - fileURL: URL, - cacheKey: String? = nil, - loadingQueue: ExecutionQueue = .dispatch(DispatchQueue.global(qos: .userInitiated)) - ) { - self.fileURL = fileURL - self.cacheKey = cacheKey ?? fileURL.localFileCacheKey - self.loadingQueue = loadingQueue - } - - // MARK: Protocol Conforming - - /// The key used in cache. - public var cacheKey: String - - public func data(handler:@escaping (Result) -> Void) { - loadingQueue.execute { - handler(Result(catching: { try Data(contentsOf: fileURL) })) - } - } - - #if swift(>=5.5) - #if canImport(_Concurrency) - @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) - public var data: Data { - get async throws { - try await withCheckedThrowingContinuation { continuation in - loadingQueue.execute { - do { - let data = try Data(contentsOf: fileURL) - continuation.resume(returning: data) - } catch { - continuation.resume(throwing: error) - } - } - } - } - } - #endif - #endif - - /// The URL of the local file on the disk. - public var contentURL: URL? { - return fileURL - } -} - -/// Represents an image data provider for loading image from a given Base64 encoded string. -public struct Base64ImageDataProvider: ImageDataProvider { - - // MARK: Public Properties - /// The encoded Base64 string for the image. - public let base64String: String - - // MARK: Initializers - - /// Creates an image data provider by supplying the Base64 encoded string. - /// - /// - Parameters: - /// - base64String: The Base64 encoded string for an image. - /// - cacheKey: The key is used for caching the image data. You need a different key for any different image. - public init(base64String: String, cacheKey: String) { - self.base64String = base64String - self.cacheKey = cacheKey - } - - // MARK: Protocol Conforming - - /// The key used in cache. - public var cacheKey: String - - public func data(handler: (Result) -> Void) { - let data = Data(base64Encoded: base64String)! - handler(.success(data)) - } -} - -/// Represents an image data provider for a raw data object. -public struct RawImageDataProvider: ImageDataProvider { - - // MARK: Public Properties - - /// The raw data object to provide to Kingfisher image loader. - public let data: Data - - // MARK: Initializers - - /// Creates an image data provider by the given raw `data` value and a `cacheKey` be used in Kingfisher cache. - /// - /// - Parameters: - /// - data: The raw data reprensents an image. - /// - cacheKey: The key is used for caching the image data. You need a different key for any different image. - public init(data: Data, cacheKey: String) { - self.data = data - self.cacheKey = cacheKey - } - - // MARK: Protocol Conforming - - /// The key used in cache. - public var cacheKey: String - - public func data(handler: @escaping (Result) -> Void) { - handler(.success(data)) - } -} diff --git a/Pods/Kingfisher/Sources/General/ImageSource/Resource.swift b/Pods/Kingfisher/Sources/General/ImageSource/Resource.swift deleted file mode 100644 index f6c1a57d..00000000 --- a/Pods/Kingfisher/Sources/General/ImageSource/Resource.swift +++ /dev/null @@ -1,121 +0,0 @@ -// -// Resource.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/6. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -/// Represents an image resource at a certain url and a given cache key. -/// Kingfisher will use a `Resource` to download a resource from network and cache it with the cache key when -/// using `Source.network` as its image setting source. -public protocol Resource { - - /// The key used in cache. - var cacheKey: String { get } - - /// The target image URL. - var downloadURL: URL { get } -} - -extension Resource { - - /// Converts `self` to a valid `Source` based on its `downloadURL` scheme. A `.provider` with - /// `LocalFileImageDataProvider` associated will be returned if the URL points to a local file. Otherwise, - /// `.network` is returned. - public func convertToSource(overrideCacheKey: String? = nil) -> Source { - let key = overrideCacheKey ?? cacheKey - return downloadURL.isFileURL ? - .provider(LocalFileImageDataProvider(fileURL: downloadURL, cacheKey: key)) : - .network(KF.ImageResource(downloadURL: downloadURL, cacheKey: key)) - } -} - -@available(*, deprecated, message: "This type conflicts with `GeneratedAssetSymbols.ImageResource` in Swift 5.9. Renamed to avoid issues in the future.", renamed: "KF.ImageResource") -public typealias ImageResource = KF.ImageResource - - -extension KF { - /// ImageResource is a simple combination of `downloadURL` and `cacheKey`. - /// When passed to image view set methods, Kingfisher will try to download the target - /// image from the `downloadURL`, and then store it with the `cacheKey` as the key in cache. - public struct ImageResource: Resource { - - // MARK: - Initializers - - /// Creates an image resource. - /// - /// - Parameters: - /// - downloadURL: The target image URL from where the image can be downloaded. - /// - cacheKey: The cache key. If `nil`, Kingfisher will use the `absoluteString` of `downloadURL` as the key. - /// Default is `nil`. - public init(downloadURL: URL, cacheKey: String? = nil) { - self.downloadURL = downloadURL - self.cacheKey = cacheKey ?? downloadURL.cacheKey - } - - // MARK: Protocol Conforming - - /// The key used in cache. - public let cacheKey: String - - /// The target image URL. - public let downloadURL: URL - } -} - -/// URL conforms to `Resource` in Kingfisher. -/// The `absoluteString` of this URL is used as `cacheKey`. And the URL itself will be used as `downloadURL`. -/// If you need customize the url and/or cache key, use `ImageResource` instead. -extension URL: Resource { - public var cacheKey: String { return isFileURL ? localFileCacheKey : absoluteString } - public var downloadURL: URL { return self } -} - -extension URL { - static let localFileCacheKeyPrefix = "kingfisher.local.cacheKey" - - // The special version of cache key for a local file on disk. Every time the app is reinstalled on the disk, - // the system assigns a new container folder to hold the .app (and the extensions, .appex) folder. So the URL for - // the same image in bundle might be different. - // - // This getter only uses the fixed part in the URL (until the bundle name folder) to provide a stable cache key - // for the image under the same path inside the bundle. - // - // See #1825 (https://github.com/onevcat/Kingfisher/issues/1825) - var localFileCacheKey: String { - var validComponents: [String] = [] - for part in pathComponents.reversed() { - validComponents.append(part) - if part.hasSuffix(".app") || part.hasSuffix(".appex") { - break - } - } - let fixedPath = "\(Self.localFileCacheKeyPrefix)/\(validComponents.reversed().joined(separator: "/"))" - if let q = query { - return "\(fixedPath)?\(q)" - } else { - return fixedPath - } - } -} diff --git a/Pods/Kingfisher/Sources/General/ImageSource/Source.swift b/Pods/Kingfisher/Sources/General/ImageSource/Source.swift deleted file mode 100644 index e0684fb4..00000000 --- a/Pods/Kingfisher/Sources/General/ImageSource/Source.swift +++ /dev/null @@ -1,116 +0,0 @@ -// -// Source.swift -// Kingfisher -// -// Created by onevcat on 2018/11/17. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -/// Represents an image setting source for Kingfisher methods. -/// -/// A `Source` value indicates the way how the target image can be retrieved and cached. -/// -/// - network: The target image should be got from network remotely. The associated `Resource` -/// value defines detail information like image URL and cache key. -/// - provider: The target image should be provided in a data format. Normally, it can be an image -/// from local storage or in any other encoding format (like Base64). -public enum Source { - - /// Represents the source task identifier when setting an image to a view with extension methods. - public enum Identifier { - - /// The underlying value type of source identifier. - public typealias Value = UInt - static private(set) var current: Value = 0 - static func next() -> Value { - current += 1 - return current - } - } - - // MARK: Member Cases - - /// The target image should be got from network remotely. The associated `Resource` - /// value defines detail information like image URL and cache key. - case network(Resource) - - /// The target image should be provided in a data format. Normally, it can be an image - /// from local storage or in any other encoding format (like Base64). - case provider(ImageDataProvider) - - // MARK: Getting Properties - - /// The cache key defined for this source value. - public var cacheKey: String { - switch self { - case .network(let resource): return resource.cacheKey - case .provider(let provider): return provider.cacheKey - } - } - - /// The URL defined for this source value. - /// - /// For a `.network` source, it is the `downloadURL` of associated `Resource` instance. - /// For a `.provider` value, it is always `nil`. - public var url: URL? { - switch self { - case .network(let resource): return resource.downloadURL - case .provider(let provider): return provider.contentURL - } - } -} - -extension Source: Hashable { - public static func == (lhs: Source, rhs: Source) -> Bool { - switch (lhs, rhs) { - case (.network(let r1), .network(let r2)): - return r1.cacheKey == r2.cacheKey && r1.downloadURL == r2.downloadURL - case (.provider(let p1), .provider(let p2)): - return p1.cacheKey == p2.cacheKey && p1.contentURL == p2.contentURL - case (.provider(_), .network(_)): - return false - case (.network(_), .provider(_)): - return false - } - } - - public func hash(into hasher: inout Hasher) { - switch self { - case .network(let r): - hasher.combine(r.cacheKey) - hasher.combine(r.downloadURL) - case .provider(let p): - hasher.combine(p.cacheKey) - hasher.combine(p.contentURL) - } - } -} - -extension Source { - var asResource: Resource? { - guard case .network(let resource) = self else { - return nil - } - return resource - } -} diff --git a/Pods/Kingfisher/Sources/General/KF.swift b/Pods/Kingfisher/Sources/General/KF.swift deleted file mode 100644 index 0e6a9709..00000000 --- a/Pods/Kingfisher/Sources/General/KF.swift +++ /dev/null @@ -1,442 +0,0 @@ -// -// KF.swift -// Kingfisher -// -// Created by onevcat on 2020/09/21. -// -// Copyright (c) 2020 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if canImport(UIKit) -import UIKit -#endif - -#if canImport(CarPlay) && !targetEnvironment(macCatalyst) -import CarPlay -#endif - -#if canImport(AppKit) && !targetEnvironment(macCatalyst) -import AppKit -#endif - -#if canImport(WatchKit) -import WatchKit -#endif - -#if canImport(TVUIKit) -import TVUIKit -#endif - -/// A helper type to create image setting tasks in a builder pattern. -/// Use methods in this type to create a `KF.Builder` instance and configure image tasks there. -public enum KF { - - /// Creates a builder for a given `Source`. - /// - Parameter source: The `Source` object defines data information from network or a data provider. - /// - Returns: A `KF.Builder` for future configuration. After configuring the builder, call `set(to:)` - /// to start the image loading. - public static func source(_ source: Source?) -> KF.Builder { - Builder(source: source) - } - - /// Creates a builder for a given `Resource`. - /// - Parameter resource: The `Resource` object defines data information like key or URL. - /// - Returns: A `KF.Builder` for future configuration. After configuring the builder, call `set(to:)` - /// to start the image loading. - public static func resource(_ resource: Resource?) -> KF.Builder { - source(resource?.convertToSource()) - } - - /// Creates a builder for a given `URL` and an optional cache key. - /// - Parameters: - /// - url: The URL where the image should be downloaded. - /// - cacheKey: The key used to store the downloaded image in cache. - /// If `nil`, the `absoluteString` of `url` is used as the cache key. - /// - Returns: A `KF.Builder` for future configuration. After configuring the builder, call `set(to:)` - /// to start the image loading. - public static func url(_ url: URL?, cacheKey: String? = nil) -> KF.Builder { - source(url?.convertToSource(overrideCacheKey: cacheKey)) - } - - /// Creates a builder for a given `ImageDataProvider`. - /// - Parameter provider: The `ImageDataProvider` object contains information about the data. - /// - Returns: A `KF.Builder` for future configuration. After configuring the builder, call `set(to:)` - /// to start the image loading. - public static func dataProvider(_ provider: ImageDataProvider?) -> KF.Builder { - source(provider?.convertToSource()) - } - - /// Creates a builder for some given raw data and a cache key. - /// - Parameters: - /// - data: The data object from which the image should be created. - /// - cacheKey: The key used to store the downloaded image in cache. - /// - Returns: A `KF.Builder` for future configuration. After configuring the builder, call `set(to:)` - /// to start the image loading. - public static func data(_ data: Data?, cacheKey: String) -> KF.Builder { - if let data = data { - return dataProvider(RawImageDataProvider(data: data, cacheKey: cacheKey)) - } else { - return dataProvider(nil) - } - } -} - - -extension KF { - - /// A builder class to configure an image retrieving task and set it to a holder view or component. - public class Builder { - private let source: Source? - - #if os(watchOS) - private var placeholder: KFCrossPlatformImage? - #else - private var placeholder: Placeholder? - #endif - - public var options = KingfisherParsedOptionsInfo(KingfisherManager.shared.defaultOptions) - - public let onFailureDelegate = Delegate() - public let onSuccessDelegate = Delegate() - public let onProgressDelegate = Delegate<(Int64, Int64), Void>() - - init(source: Source?) { - self.source = source - } - - private var resultHandler: ((Result) -> Void)? { - { - switch $0 { - case .success(let result): - self.onSuccessDelegate(result) - case .failure(let error): - self.onFailureDelegate(error) - } - } - } - - private var progressBlock: DownloadProgressBlock { - { self.onProgressDelegate(($0, $1)) } - } - } -} - -extension KF.Builder { - #if !os(watchOS) - - /// Builds the image task request and sets it to an image view. - /// - Parameter imageView: The image view which loads the task and should be set with the image. - /// - Returns: A task represents the image downloading, if initialized. - /// This value is `nil` if the image is being loaded from cache. - @discardableResult - public func set(to imageView: KFCrossPlatformImageView) -> DownloadTask? { - imageView.kf.setImage( - with: source, - placeholder: placeholder, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: resultHandler - ) - } - - /// Builds the image task request and sets it to an `NSTextAttachment` object. - /// - Parameters: - /// - attachment: The text attachment object which loads the task and should be set with the image. - /// - attributedView: The owner of the attributed string which this `NSTextAttachment` is added. - /// - Returns: A task represents the image downloading, if initialized. - /// This value is `nil` if the image is being loaded from cache. - @discardableResult - public func set(to attachment: NSTextAttachment, attributedView: @autoclosure @escaping () -> KFCrossPlatformView) -> DownloadTask? { - let placeholderImage = placeholder as? KFCrossPlatformImage ?? nil - return attachment.kf.setImage( - with: source, - attributedView: attributedView, - placeholder: placeholderImage, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: resultHandler - ) - } - - #if canImport(UIKit) - - /// Builds the image task request and sets it to a button. - /// - Parameters: - /// - button: The button which loads the task and should be set with the image. - /// - state: The button state to which the image should be set. - /// - Returns: A task represents the image downloading, if initialized. - /// This value is `nil` if the image is being loaded from cache. - @discardableResult - public func set(to button: UIButton, for state: UIControl.State) -> DownloadTask? { - let placeholderImage = placeholder as? KFCrossPlatformImage ?? nil - return button.kf.setImage( - with: source, - for: state, - placeholder: placeholderImage, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: resultHandler - ) - } - - /// Builds the image task request and sets it to the background image for a button. - /// - Parameters: - /// - button: The button which loads the task and should be set with the image. - /// - state: The button state to which the image should be set. - /// - Returns: A task represents the image downloading, if initialized. - /// This value is `nil` if the image is being loaded from cache. - @discardableResult - public func setBackground(to button: UIButton, for state: UIControl.State) -> DownloadTask? { - let placeholderImage = placeholder as? KFCrossPlatformImage ?? nil - return button.kf.setBackgroundImage( - with: source, - for: state, - placeholder: placeholderImage, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: resultHandler - ) - } - #endif // end of canImport(UIKit) - - #if canImport(CarPlay) && !targetEnvironment(macCatalyst) - - /// Builds the image task request and sets it to the image for a list item. - /// - Parameters: - /// - listItem: The list item which loads the task and should be set with the image. - /// - Returns: A task represents the image downloading, if initialized. - /// This value is `nil` if the image is being loaded from cache. - @available(iOS 14.0, *) - @discardableResult - public func set(to listItem: CPListItem) -> DownloadTask? { - let placeholderImage = placeholder as? KFCrossPlatformImage ?? nil - return listItem.kf.setImage( - with: source, - placeholder: placeholderImage, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: resultHandler - ) - - } - - #endif - - #if canImport(AppKit) && !targetEnvironment(macCatalyst) - /// Builds the image task request and sets it to a button. - /// - Parameter button: The button which loads the task and should be set with the image. - /// - Returns: A task represents the image downloading, if initialized. - /// This value is `nil` if the image is being loaded from cache. - @discardableResult - public func set(to button: NSButton) -> DownloadTask? { - let placeholderImage = placeholder as? KFCrossPlatformImage ?? nil - return button.kf.setImage( - with: source, - placeholder: placeholderImage, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: resultHandler - ) - } - - /// Builds the image task request and sets it to the alternative image for a button. - /// - Parameter button: The button which loads the task and should be set with the image. - /// - Returns: A task represents the image downloading, if initialized. - /// This value is `nil` if the image is being loaded from cache. - @discardableResult - public func setAlternative(to button: NSButton) -> DownloadTask? { - let placeholderImage = placeholder as? KFCrossPlatformImage ?? nil - return button.kf.setAlternateImage( - with: source, - placeholder: placeholderImage, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: resultHandler - ) - } - #endif // end of canImport(AppKit) - #endif // end of !os(watchOS) - - #if canImport(WatchKit) - /// Builds the image task request and sets it to a `WKInterfaceImage` object. - /// - Parameter interfaceImage: The watch interface image which loads the task and should be set with the image. - /// - Returns: A task represents the image downloading, if initialized. - /// This value is `nil` if the image is being loaded from cache. - @discardableResult - public func set(to interfaceImage: WKInterfaceImage) -> DownloadTask? { - return interfaceImage.kf.setImage( - with: source, - placeholder: placeholder, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: resultHandler - ) - } - #endif // end of canImport(WatchKit) - - #if canImport(TVUIKit) - /// Builds the image task request and sets it to a TV monogram view. - /// - Parameter monogramView: The monogram view which loads the task and should be set with the image. - /// - Returns: A task represents the image downloading, if initialized. - /// This value is `nil` if the image is being loaded from cache. - @available(tvOS 12.0, *) - @discardableResult - public func set(to monogramView: TVMonogramView) -> DownloadTask? { - let placeholderImage = placeholder as? KFCrossPlatformImage ?? nil - return monogramView.kf.setImage( - with: source, - placeholder: placeholderImage, - parsedOptions: options, - progressBlock: progressBlock, - completionHandler: resultHandler - ) - } - #endif // end of canImport(TVUIKit) -} - -#if !os(watchOS) -extension KF.Builder { - #if os(iOS) || os(tvOS) || os(visionOS) - - /// Sets a placeholder which is used while retrieving the image. - /// - Parameter placeholder: A placeholder to show while retrieving the image from its source. - /// - Returns: A `KF.Builder` with changes applied. - public func placeholder(_ placeholder: Placeholder?) -> Self { - self.placeholder = placeholder - return self - } - #endif - - /// Sets a placeholder image which is used while retrieving the image. - /// - Parameter placeholder: An image to show while retrieving the image from its source. - /// - Returns: A `KF.Builder` with changes applied. - public func placeholder(_ image: KFCrossPlatformImage?) -> Self { - self.placeholder = image - return self - } -} -#endif - -extension KF.Builder { - - #if os(iOS) || os(tvOS) || os(visionOS) - /// Sets the transition for the image task. - /// - Parameter transition: The desired transition effect when setting the image to image view. - /// - Returns: A `KF.Builder` with changes applied. - /// - /// Kingfisher will use the `transition` to animate the image in if it is downloaded from web. - /// The transition will not happen when the - /// image is retrieved from either memory or disk cache by default. If you need to do the transition even when - /// the image being retrieved from cache, also call `forceRefresh()` on the returned `KF.Builder`. - public func transition(_ transition: ImageTransition) -> Self { - options.transition = transition - return self - } - - /// Sets a fade transition for the image task. - /// - Parameter duration: The duration of the fade transition. - /// - Returns: A `KF.Builder` with changes applied. - /// - /// Kingfisher will use the fade transition to animate the image in if it is downloaded from web. - /// The transition will not happen when the - /// image is retrieved from either memory or disk cache by default. If you need to do the transition even when - /// the image being retrieved from cache, also call `forceRefresh()` on the returned `KF.Builder`. - public func fade(duration: TimeInterval) -> Self { - options.transition = .fade(duration) - return self - } - #endif - - /// Sets whether keeping the existing image of image view while setting another image to it. - /// - Parameter enabled: Whether the existing image should be kept. - /// - Returns: A `KF.Builder` with changes applied. - /// - /// By setting this option, the placeholder image parameter of image view extension method - /// will be ignored and the current image will be kept while loading or downloading the new image. - /// - public func keepCurrentImageWhileLoading(_ enabled: Bool = true) -> Self { - options.keepCurrentImageWhileLoading = enabled - return self - } - - /// Sets whether only the first frame from an animated image file should be loaded as a single image. - /// - Parameter enabled: Whether the only the first frame should be loaded. - /// - Returns: A `KF.Builder` with changes applied. - /// - /// Loading an animated images may take too much memory. It will be useful when you want to display a - /// static preview of the first frame from an animated image. - /// - /// This option will be ignored if the target image is not animated image data. - /// - public func onlyLoadFirstFrame(_ enabled: Bool = true) -> Self { - options.onlyLoadFirstFrame = enabled - return self - } - - /// Enables progressive image loading with a specified `ImageProgressive` setting to process the - /// progressive JPEG data and display it in a progressive way. - /// - Parameter progressive: The progressive settings which is used while loading. - /// - Returns: A `KF.Builder` with changes applied. - public func progressiveJPEG(_ progressive: ImageProgressive? = .init()) -> Self { - options.progressiveJPEG = progressive - return self - } -} - -// MARK: - Deprecated -extension KF.Builder { - /// Starts the loading process of `self` immediately. - /// - /// By default, a `KFImage` will not load its source until the `onAppear` is called. This is a lazily loading - /// behavior and provides better performance. However, when you refresh the view, the lazy loading also causes a - /// flickering since the loading does not happen immediately. Call this method if you want to start the load at once - /// could help avoiding the flickering, with some performance trade-off. - /// - /// - Deprecated: This is not necessary anymore since `@StateObject` is used for holding the image data. - /// It does nothing now and please just remove it. - /// - /// - Returns: The `Self` value with changes applied. - @available(*, deprecated, message: "This is not necessary anymore since `@StateObject` is used. It does nothing now and please just remove it.") - public func loadImmediately(_ start: Bool = true) -> Self { - return self - } -} - -// MARK: - Redirect Handler -extension KF { - - /// Represents the detail information when a task redirect happens. It is wrapping necessary information for a - /// `ImageDownloadRedirectHandler`. See that protocol for more information. - public struct RedirectPayload { - - /// The related session data task when the redirect happens. It is - /// the current `SessionDataTask` which triggers this redirect. - public let task: SessionDataTask - - /// The response received during redirection. - public let response: HTTPURLResponse - - /// The request for redirection which can be modified. - public let newRequest: URLRequest - - /// A closure for being called with modified request. - public let completionHandler: (URLRequest?) -> Void - } -} diff --git a/Pods/Kingfisher/Sources/General/KFOptionsSetter.swift b/Pods/Kingfisher/Sources/General/KFOptionsSetter.swift deleted file mode 100644 index 979ed272..00000000 --- a/Pods/Kingfisher/Sources/General/KFOptionsSetter.swift +++ /dev/null @@ -1,711 +0,0 @@ -// -// KFOptionsSetter.swift -// Kingfisher -// -// Created by onevcat on 2020/12/22. -// -// Copyright (c) 2020 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation -import CoreGraphics -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -public protocol KFOptionSetter { - var options: KingfisherParsedOptionsInfo { get nonmutating set } - - var onFailureDelegate: Delegate { get } - var onSuccessDelegate: Delegate { get } - var onProgressDelegate: Delegate<(Int64, Int64), Void> { get } - - var delegateObserver: AnyObject { get } -} - -extension KF.Builder: KFOptionSetter { - public var delegateObserver: AnyObject { self } -} - -// MARK: - Life cycles -extension KFOptionSetter { - /// Sets the progress block to current builder. - /// - Parameter block: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. If `block` is `nil`, the callback - /// will be reset. - /// - Returns: A `Self` value with changes applied. - public func onProgress(_ block: DownloadProgressBlock?) -> Self { - onProgressDelegate.delegate(on: delegateObserver) { (observer, result) in - block?(result.0, result.1) - } - return self - } - - /// Sets the the done block to current builder. - /// - Parameter block: Called when the image task successfully completes and the the image set is done. If `block` - /// is `nil`, the callback will be reset. - /// - Returns: A `KF.Builder` with changes applied. - public func onSuccess(_ block: ((RetrieveImageResult) -> Void)?) -> Self { - onSuccessDelegate.delegate(on: delegateObserver) { (observer, result) in - block?(result) - } - return self - } - - /// Sets the catch block to current builder. - /// - Parameter block: Called when an error happens during the image task. If `block` - /// is `nil`, the callback will be reset. - /// - Returns: A `KF.Builder` with changes applied. - public func onFailure(_ block: ((KingfisherError) -> Void)?) -> Self { - onFailureDelegate.delegate(on: delegateObserver) { (observer, error) in - block?(error) - } - return self - } -} - -// MARK: - Basic options settings. -extension KFOptionSetter { - /// Sets the target image cache for this task. - /// - Parameter cache: The target cache is about to be used for the task. - /// - Returns: A `Self` value with changes applied. - /// - /// Kingfisher will use the associated `ImageCache` object when handling related operations, - /// including trying to retrieve the cached images and store the downloaded image to it. - /// - public func targetCache(_ cache: ImageCache) -> Self { - options.targetCache = cache - return self - } - - /// Sets the target image cache to store the original downloaded image for this task. - /// - Parameter cache: The target cache is about to be used for storing the original downloaded image from the task. - /// - Returns: A `Self` value with changes applied. - /// - /// The `ImageCache` for storing and retrieving original images. If `originalCache` is - /// contained in the options, it will be preferred for storing and retrieving original images. - /// If there is no `.originalCache` in the options, `.targetCache` will be used to store original images. - /// - /// When using KingfisherManager to download and store an image, if `cacheOriginalImage` is - /// applied in the option, the original image will be stored to this `originalCache`. At the - /// same time, if a requested final image (with processor applied) cannot be found in `targetCache`, - /// Kingfisher will try to search the original image to check whether it is already there. If found, - /// it will be used and applied with the given processor. It is an optimization for not downloading - /// the same image for multiple times. - /// - public func originalCache(_ cache: ImageCache) -> Self { - options.originalCache = cache - return self - } - - /// Sets the downloader used to perform the image download task. - /// - Parameter downloader: The downloader which is about to be used for downloading. - /// - Returns: A `Self` value with changes applied. - /// - /// Kingfisher will use the set `ImageDownloader` object to download the requested images. - public func downloader(_ downloader: ImageDownloader) -> Self { - options.downloader = downloader - return self - } - - /// Sets the download priority for the image task. - /// - Parameter priority: The download priority of image download task. - /// - Returns: A `Self` value with changes applied. - /// - /// The `priority` value will be set as the priority of the image download task. The value for it should be - /// between 0.0~1.0. You can choose a value between `URLSessionTask.defaultPriority`, `URLSessionTask.lowPriority` - /// or `URLSessionTask.highPriority`. If this option not set, the default value (`URLSessionTask.defaultPriority`) - /// will be used. - public func downloadPriority(_ priority: Float) -> Self { - options.downloadPriority = priority - return self - } - - /// Sets whether Kingfisher should ignore the cache and try to start a download task for the image source. - /// - Parameter enabled: Enable the force refresh or not. - /// - Returns: A `Self` value with changes applied. - public func forceRefresh(_ enabled: Bool = true) -> Self { - options.forceRefresh = enabled - return self - } - - /// Sets whether Kingfisher should try to retrieve the image from memory cache first. If not found, it ignores the - /// disk cache and starts a download task for the image source. - /// - Parameter enabled: Enable the memory-only cache searching or not. - /// - Returns: A `Self` value with changes applied. - /// - /// This is useful when you want to display a changeable image behind the same url at the same app session, while - /// avoiding download it for multiple times. - public func fromMemoryCacheOrRefresh(_ enabled: Bool = true) -> Self { - options.fromMemoryCacheOrRefresh = enabled - return self - } - - /// Sets whether the image should only be cached in memory but not in disk. - /// - Parameter enabled: Whether the image should be only cache in memory or not. - /// - Returns: A `Self` value with changes applied. - public func cacheMemoryOnly(_ enabled: Bool = true) -> Self { - options.cacheMemoryOnly = enabled - return self - } - - /// Sets whether Kingfisher should wait for caching operation to be completed before calling the - /// `onSuccess` or `onFailure` block. - /// - Parameter enabled: Whether Kingfisher should wait for caching operation. - /// - Returns: A `Self` value with changes applied. - public func waitForCache(_ enabled: Bool = true) -> Self { - options.waitForCache = enabled - return self - } - - /// Sets whether Kingfisher should only try to retrieve the image from cache, but not from network. - /// - Parameter enabled: Whether Kingfisher should only try to retrieve the image from cache. - /// - Returns: A `Self` value with changes applied. - /// - /// If the image is not in cache, the image retrieving will fail with the - /// `KingfisherError.cacheError` with `.imageNotExisting` as its reason. - public func onlyFromCache(_ enabled: Bool = true) -> Self { - options.onlyFromCache = enabled - return self - } - - /// Sets whether the image should be decoded in a background thread before using. - /// - Parameter enabled: Whether the image should be decoded in a background thread before using. - /// - Returns: A `Self` value with changes applied. - /// - /// Setting to `true` will decode the downloaded image data and do a off-screen rendering to extract pixel - /// information in background. This can speed up display, but will cost more time and memory to prepare the image - /// for using. - public func backgroundDecode(_ enabled: Bool = true) -> Self { - options.backgroundDecode = enabled - return self - } - - /// Sets the callback queue which is used as the target queue of dispatch callbacks when retrieving images from - /// cache. If not set, Kingfisher will use main queue for callbacks. - /// - Parameter queue: The target queue which the cache retrieving callback will be invoked on. - /// - Returns: A `Self` value with changes applied. - /// - /// - Note: - /// This option does not affect the callbacks for UI related extension methods or `KFImage` result handlers. - /// You will always get the callbacks called from main queue. - public func callbackQueue(_ queue: CallbackQueue) -> Self { - options.callbackQueue = queue - return self - } - - /// Sets the scale factor value when converting retrieved data to an image. - /// - Parameter factor: The scale factor value. - /// - Returns: A `Self` value with changes applied. - /// - /// Specify the image scale, instead of your screen scale. You may need to set the correct scale when you dealing - /// with 2x or 3x retina images. Otherwise, Kingfisher will convert the data to image object at `scale` 1.0. - /// - public func scaleFactor(_ factor: CGFloat) -> Self { - options.scaleFactor = factor - return self - } - - /// Sets whether the original image should be cached even when the original image has been processed by any other - /// `ImageProcessor`s. - /// - Parameter enabled: Whether the original image should be cached. - /// - Returns: A `Self` value with changes applied. - /// - /// If set and an `ImageProcessor` is used, Kingfisher will try to cache both the final result and original - /// image. Kingfisher will have a chance to use the original image when another processor is applied to the same - /// resource, instead of downloading it again. You can use `.originalCache` to specify a cache or the original - /// images if necessary. - /// - /// The original image will be only cached to disk storage. - /// - public func cacheOriginalImage(_ enabled: Bool = true) -> Self { - options.cacheOriginalImage = enabled - return self - } - - /// Sets writing options for an original image on a first write - /// - Parameter writingOptions: Options to control the writing of data to a disk storage. - /// - Returns: A `Self` value with changes applied. - /// If set, options will be passed the store operation for a new files. - /// - /// This is useful if you want to implement file enctyption on first write - eg [.completeFileProtection] - /// - public func diskStoreWriteOptions(_ writingOptions: Data.WritingOptions) -> Self { - options.diskStoreWriteOptions = writingOptions - return self - } - - /// Sets whether the disk storage loading should happen in the same calling queue. - /// - Parameter enabled: Whether the disk storage loading should happen in the same calling queue. - /// - Returns: A `Self` value with changes applied. - /// - /// By default, disk storage file loading - /// happens in its own queue with an asynchronous dispatch behavior. Although it provides better non-blocking disk - /// loading performance, it also causes a flickering when you reload an image from disk, if the image view already - /// has an image set. - /// - /// Set this options will stop that flickering by keeping all loading in the same queue (typically the UI queue - /// if you are using Kingfisher's extension methods to set an image), with a tradeoff of loading performance. - /// - public func loadDiskFileSynchronously(_ enabled: Bool = true) -> Self { - options.loadDiskFileSynchronously = enabled - return self - } - - /// Sets a queue on which the image processing should happen. - /// - Parameter queue: The queue on which the image processing should happen. - /// - Returns: A `Self` value with changes applied. - /// - /// By default, Kingfisher uses a pre-defined serial - /// queue to process images. Use this option to change this behavior. For example, specify a `.mainCurrentOrAsync` - /// to let the image be processed in main queue to prevent a possible flickering (but with a possibility of - /// blocking the UI, especially if the processor needs a lot of time to run). - public func processingQueue(_ queue: CallbackQueue?) -> Self { - options.processingQueue = queue - return self - } - - /// Sets the alternative sources that will be used when loading of the original input `Source` fails. - /// - Parameter sources: The alternative sources will be used. - /// - Returns: A `Self` value with changes applied. - /// - /// Values of the `sources` array will be used to start a new image loading task if the previous task - /// fails due to an error. The image source loading process will stop as soon as a source is loaded successfully. - /// If all `sources` are used but the loading is still failing, an `imageSettingError` with - /// `alternativeSourcesExhausted` as its reason will be given out in the `catch` block. - /// - /// This is useful if you want to implement a fallback solution for setting image. - /// - /// User cancellation will not trigger the alternative source loading. - public func alternativeSources(_ sources: [Source]?) -> Self { - options.alternativeSources = sources - return self - } - - /// Sets a retry strategy that will be used when something gets wrong during the image retrieving. - /// - Parameter strategy: The provided strategy to define how the retrying should happen. - /// - Returns: A `Self` value with changes applied. - public func retry(_ strategy: RetryStrategy?) -> Self { - options.retryStrategy = strategy - return self - } - - /// Sets a retry strategy with a max retry count and retrying interval. - /// - Parameters: - /// - maxCount: The maximum count before the retry stops. - /// - interval: The time interval between each retry attempt. - /// - Returns: A `Self` value with changes applied. - /// - /// This defines the simplest retry strategy, which retry a failing request for several times, with some certain - /// interval between each time. For example, `.retry(maxCount: 3, interval: .second(3))` means attempt for at most - /// three times, and wait for 3 seconds if a previous retry attempt fails, then start a new attempt. - public func retry(maxCount: Int, interval: DelayRetryStrategy.Interval = .seconds(3)) -> Self { - let strategy = DelayRetryStrategy(maxRetryCount: maxCount, retryInterval: interval) - options.retryStrategy = strategy - return self - } - - /// Sets the `Source` should be loaded when user enables Low Data Mode and the original source fails with an - /// `NSURLErrorNetworkUnavailableReason.constrained` error. - /// - Parameter source: The `Source` will be loaded under low data mode. - /// - Returns: A `Self` value with changes applied. - /// - /// When this option is set, the - /// `allowsConstrainedNetworkAccess` property of the request for the original source will be set to `false` and the - /// `Source` in associated value will be used to retrieve the image for low data mode. Usually, you can provide a - /// low-resolution version of your image or a local image provider to display a placeholder. - /// - /// If not set or the `source` is `nil`, the device Low Data Mode will be ignored and the original source will - /// be loaded following the system default behavior, in a normal way. - public func lowDataModeSource(_ source: Source?) -> Self { - options.lowDataModeSource = source - return self - } - - /// Sets whether the image setting for an image view should happen with transition even when retrieved from cache. - /// - Parameter enabled: Enable the force transition or not. - /// - Returns: A `Self` with changes applied. - public func forceTransition(_ enabled: Bool = true) -> Self { - options.forceTransition = enabled - return self - } - - /// Sets the image that will be used if an image retrieving task fails. - /// - Parameter image: The image that will be used when something goes wrong. - /// - Returns: A `Self` with changes applied. - /// - /// If set and an image retrieving error occurred Kingfisher will set provided image (or empty) - /// in place of requested one. It's useful when you don't want to show placeholder - /// during loading time but wants to use some default image when requests will be failed. - /// - public func onFailureImage(_ image: KFCrossPlatformImage?) -> Self { - options.onFailureImage = .some(image) - return self - } -} - -// MARK: - Request Modifier -extension KFOptionSetter { - /// Sets an `ImageDownloadRequestModifier` to change the image download request before it being sent. - /// - Parameter modifier: The modifier will be used to change the request before it being sent. - /// - Returns: A `Self` value with changes applied. - /// - /// This is the last chance you can modify the image download request. You can modify the request for some - /// customizing purpose, such as adding auth token to the header, do basic HTTP auth or something like url mapping. - /// - public func requestModifier(_ modifier: AsyncImageDownloadRequestModifier) -> Self { - options.requestModifier = modifier - return self - } - - /// Sets a block to change the image download request before it being sent. - /// - Parameter modifyBlock: The modifying block will be called to change the request before it being sent. - /// - Returns: A `Self` value with changes applied. - /// - /// This is the last chance you can modify the image download request. You can modify the request for some - /// customizing purpose, such as adding auth token to the header, do basic HTTP auth or something like url mapping. - /// - public func requestModifier(_ modifyBlock: @escaping (inout URLRequest) -> Void) -> Self { - options.requestModifier = AnyModifier { r -> URLRequest? in - var request = r - modifyBlock(&request) - return request - } - return self - } -} - -// MARK: - Redirect Handler -extension KFOptionSetter { - /// The `ImageDownloadRedirectHandler` argument will be used to change the request before redirection. - /// This is the possibility you can modify the image download request during redirect. You can modify the request for - /// some customizing purpose, such as adding auth token to the header, do basic HTTP auth or something like url - /// mapping. - /// The original redirection request will be sent without any modification by default. - /// - Parameter handler: The handler will be used for redirection. - /// - Returns: A `Self` value with changes applied. - public func redirectHandler(_ handler: ImageDownloadRedirectHandler) -> Self { - options.redirectHandler = handler - return self - } - - /// The `block` will be used to change the request before redirection. - /// This is the possibility you can modify the image download request during redirect. You can modify the request for - /// some customizing purpose, such as adding auth token to the header, do basic HTTP auth or something like url - /// mapping. - /// The original redirection request will be sent without any modification by default. - /// - Parameter block: The block will be used for redirection. - /// - Returns: A `Self` value with changes applied. - public func redirectHandler(_ block: @escaping (KF.RedirectPayload) -> Void) -> Self { - let redirectHandler = AnyRedirectHandler { (task, response, request, handler) in - let payload = KF.RedirectPayload( - task: task, response: response, newRequest: request, completionHandler: handler - ) - block(payload) - } - options.redirectHandler = redirectHandler - return self - } -} - -// MARK: - Processor -extension KFOptionSetter { - - /// Sets an image processor for the image task. It replaces the current image processor settings. - /// - /// - Parameter processor: The processor you want to use to process the image after it is downloaded. - /// - Returns: A `Self` value with changes applied. - /// - /// - Note: - /// To append a processor to current ones instead of replacing them all, use `appendProcessor(_:)`. - public func setProcessor(_ processor: ImageProcessor) -> Self { - options.processor = processor - return self - } - - /// Sets an array of image processors for the image task. It replaces the current image processor settings. - /// - Parameter processors: An array of processors. The processors inside this array will be concatenated one by one - /// to form a processor pipeline. - /// - Returns: A `Self` value with changes applied. - /// - /// - Note: To append processors to current ones instead of replacing them all, concatenate them by `|>`, then use - /// `appendProcessor(_:)`. - public func setProcessors(_ processors: [ImageProcessor]) -> Self { - switch processors.count { - case 0: - options.processor = DefaultImageProcessor.default - case 1...: - options.processor = processors.dropFirst().reduce(processors[0]) { $0 |> $1 } - default: - assertionFailure("Never happen") - } - return self - } - - /// Appends a processor to the current set processors. - /// - Parameter processor: The processor which will be appended to current processor settings. - /// - Returns: A `Self` value with changes applied. - public func appendProcessor(_ processor: ImageProcessor) -> Self { - options.processor = options.processor |> processor - return self - } - - /// Appends a `RoundCornerImageProcessor` to current processors. - /// - Parameters: - /// - radius: The radius will be applied in processing. Specify a certain point value with `.point`, or a fraction - /// of the target image with `.widthFraction`. or `.heightFraction`. For example, given a square image - /// with width and height equals, `.widthFraction(0.5)` means use half of the length of size and makes - /// the final image a round one. - /// - targetSize: Target size of output image should be. If `nil`, the image will keep its original size after processing. - /// - corners: The target corners which will be applied rounding. - /// - backgroundColor: Background color of the output image. If `nil`, it will use a transparent background. - /// - Returns: A `Self` value with changes applied. - public func roundCorner( - radius: Radius, - targetSize: CGSize? = nil, - roundingCorners corners: RectCorner = .all, - backgroundColor: KFCrossPlatformColor? = nil - ) -> Self - { - let processor = RoundCornerImageProcessor( - radius: radius, - targetSize: targetSize, - roundingCorners: corners, - backgroundColor: backgroundColor - ) - return appendProcessor(processor) - } - - /// Appends a `BlurImageProcessor` to current processors. - /// - Parameter radius: Blur radius for the simulated Gaussian blur. - /// - Returns: A `Self` value with changes applied. - public func blur(radius: CGFloat) -> Self { - appendProcessor( - BlurImageProcessor(blurRadius: radius) - ) - } - - /// Appends a `OverlayImageProcessor` to current processors. - /// - Parameters: - /// - color: Overlay color will be used to overlay the input image. - /// - fraction: Fraction will be used when overlay the color to image. - /// - Returns: A `Self` value with changes applied. - public func overlay(color: KFCrossPlatformColor, fraction: CGFloat = 0.5) -> Self { - appendProcessor( - OverlayImageProcessor(overlay: color, fraction: fraction) - ) - } - - /// Appends a `TintImageProcessor` to current processors. - /// - Parameter color: Tint color will be used to tint the input image. - /// - Returns: A `Self` value with changes applied. - public func tint(color: KFCrossPlatformColor) -> Self { - appendProcessor( - TintImageProcessor(tint: color) - ) - } - - /// Appends a `BlackWhiteProcessor` to current processors. - /// - Returns: A `Self` value with changes applied. - public func blackWhite() -> Self { - appendProcessor( - BlackWhiteProcessor() - ) - } - - /// Appends a `CroppingImageProcessor` to current processors. - /// - Parameters: - /// - size: Target size of output image should be. - /// - anchor: Anchor point from which the output size should be calculate. The anchor point is consisted by two - /// values between 0.0 and 1.0. It indicates a related point in current image. - /// See `CroppingImageProcessor.init(size:anchor:)` for more. - /// - Returns: A `Self` value with changes applied. - public func cropping(size: CGSize, anchor: CGPoint = .init(x: 0.5, y: 0.5)) -> Self { - appendProcessor( - CroppingImageProcessor(size: size, anchor: anchor) - ) - } - - /// Appends a `DownsamplingImageProcessor` to current processors. - /// - /// Compared to `ResizingImageProcessor`, the `DownsamplingImageProcessor` does not render the original images and - /// then resize it. Instead, it downsamples the input data directly to a thumbnail image. So it is a more efficient - /// than `ResizingImageProcessor`. Prefer to use `DownsamplingImageProcessor` as possible - /// as you can than the `ResizingImageProcessor`. - /// - /// Only CG-based images are supported. Animated images (like GIF) is not supported. - /// - /// - Parameter size: Target size of output image should be. It should be smaller than the size of input image. - /// If it is larger, the result image will be the same size of input data without downsampling. - /// - Returns: A `Self` value with changes applied. - public func downsampling(size: CGSize) -> Self { - let processor = DownsamplingImageProcessor(size: size) - if options.processor == DefaultImageProcessor.default { - return setProcessor(processor) - } else { - return appendProcessor(processor) - } - } - - - /// Appends a `ResizingImageProcessor` to current processors. - /// - /// If you need to resize a data represented image to a smaller size, use `DownsamplingImageProcessor` - /// instead, which is more efficient and uses less memory. - /// - /// - Parameters: - /// - referenceSize: The reference size for resizing operation in point. - /// - mode: Target content mode of output image should be. Default is `.none`. - /// - Returns: A `Self` value with changes applied. - public func resizing(referenceSize: CGSize, mode: ContentMode = .none) -> Self { - appendProcessor( - ResizingImageProcessor(referenceSize: referenceSize, mode: mode) - ) - } -} - -// MARK: - Cache Serializer -extension KFOptionSetter { - - /// Uses a given `CacheSerializer` to convert some data to an image object for retrieving from disk cache or vice - /// versa for storing to disk cache. - /// - Parameter cacheSerializer: The `CacheSerializer` which will be used. - /// - Returns: A `Self` value with changes applied. - public func serialize(by cacheSerializer: CacheSerializer) -> Self { - options.cacheSerializer = cacheSerializer - return self - } - - /// Uses a given format to serializer the image data to disk. It converts the image object to the give data format. - /// - Parameters: - /// - format: The desired data encoding format when store the image on disk. - /// - jpegCompressionQuality: If the format is `.JPEG`, it specify the compression quality when converting the - /// image to a JPEG data. Otherwise, it is ignored. - /// - Returns: A `Self` value with changes applied. - public func serialize(as format: ImageFormat, jpegCompressionQuality: CGFloat? = nil) -> Self { - let cacheSerializer: FormatIndicatedCacheSerializer - switch format { - case .JPEG: - cacheSerializer = .jpeg(compressionQuality: jpegCompressionQuality ?? 1.0) - case .PNG: - cacheSerializer = .png - case .GIF: - cacheSerializer = .gif - case .unknown: - cacheSerializer = .png - } - options.cacheSerializer = cacheSerializer - return self - } -} - -// MARK: - Image Modifier -extension KFOptionSetter { - - /// Sets an `ImageModifier` to the image task. Use this to modify the fetched image object properties if needed. - /// - /// If the image was fetched directly from the downloader, the modifier will run directly after the - /// `ImageProcessor`. If the image is being fetched from a cache, the modifier will run after the `CacheSerializer`. - /// - Parameter modifier: The `ImageModifier` which will be used to modify the image object. - /// - Returns: A `Self` value with changes applied. - public func imageModifier(_ modifier: ImageModifier?) -> Self { - options.imageModifier = modifier - return self - } - - /// Sets a block to modify the image object. Use this to modify the fetched image object properties if needed. - /// - /// If the image was fetched directly from the downloader, the modifier block will run directly after the - /// `ImageProcessor`. If the image is being fetched from a cache, the modifier will run after the `CacheSerializer`. - /// - /// - Parameter block: The block which is used to modify the image object. - /// - Returns: A `Self` value with changes applied. - public func imageModifier(_ block: @escaping (inout KFCrossPlatformImage) throws -> Void) -> Self { - let modifier = AnyImageModifier { image -> KFCrossPlatformImage in - var image = image - try block(&image) - return image - } - options.imageModifier = modifier - return self - } -} - - -// MARK: - Cache Expiration -extension KFOptionSetter { - - /// Sets the expiration setting for memory cache of this image task. - /// - /// By default, the underlying `MemoryStorage.Backend` uses the - /// expiration in its config for all items. If set, the `MemoryStorage.Backend` will use this value to overwrite - /// the config setting for this caching item. - /// - /// - Parameter expiration: The expiration setting used in cache storage. - /// - Returns: A `Self` value with changes applied. - public func memoryCacheExpiration(_ expiration: StorageExpiration?) -> Self { - options.memoryCacheExpiration = expiration - return self - } - - /// Sets the expiration extending setting for memory cache. The item expiration time will be incremented by this - /// value after access. - /// - /// By default, the underlying `MemoryStorage.Backend` uses the initial cache expiration as extending - /// value: .cacheTime. - /// - /// To disable extending option at all, sets `.none` to it. - /// - /// - Parameter extending: The expiration extending setting used in cache storage. - /// - Returns: A `Self` value with changes applied. - public func memoryCacheAccessExtending(_ extending: ExpirationExtending) -> Self { - options.memoryCacheAccessExtendingExpiration = extending - return self - } - - /// Sets the expiration setting for disk cache of this image task. - /// - /// By default, the underlying `DiskStorage.Backend` uses the expiration in its config for all items. If set, - /// the `DiskStorage.Backend` will use this value to overwrite the config setting for this caching item. - /// - /// - Parameter expiration: The expiration setting used in cache storage. - /// - Returns: A `Self` value with changes applied. - public func diskCacheExpiration(_ expiration: StorageExpiration?) -> Self { - options.diskCacheExpiration = expiration - return self - } - - /// Sets the expiration extending setting for disk cache. The item expiration time will be incremented by this - /// value after access. - /// - /// By default, the underlying `DiskStorage.Backend` uses the initial cache expiration as extending - /// value: .cacheTime. - /// - /// To disable extending option at all, sets `.none` to it. - /// - /// - Parameter extending: The expiration extending setting used in cache storage. - /// - Returns: A `Self` value with changes applied. - public func diskCacheAccessExtending(_ extending: ExpirationExtending) -> Self { - options.diskCacheAccessExtendingExpiration = extending - return self - } -} diff --git a/Pods/Kingfisher/Sources/General/Kingfisher.swift b/Pods/Kingfisher/Sources/General/Kingfisher.swift deleted file mode 100644 index f875e2af..00000000 --- a/Pods/Kingfisher/Sources/General/Kingfisher.swift +++ /dev/null @@ -1,106 +0,0 @@ -// -// Kingfisher.swift -// Kingfisher -// -// Created by Wei Wang on 16/9/14. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation -import ImageIO - -#if os(macOS) -import AppKit -public typealias KFCrossPlatformImage = NSImage -public typealias KFCrossPlatformView = NSView -public typealias KFCrossPlatformColor = NSColor -public typealias KFCrossPlatformImageView = NSImageView -public typealias KFCrossPlatformButton = NSButton -#else -import UIKit -public typealias KFCrossPlatformImage = UIImage -public typealias KFCrossPlatformColor = UIColor -#if !os(watchOS) -public typealias KFCrossPlatformImageView = UIImageView -public typealias KFCrossPlatformView = UIView -public typealias KFCrossPlatformButton = UIButton -#if canImport(TVUIKit) -import TVUIKit -#endif -#if canImport(CarPlay) && !targetEnvironment(macCatalyst) -import CarPlay -#endif -#else -import WatchKit -#endif -#endif - -/// Wrapper for Kingfisher compatible types. This type provides an extension point for -/// convenience methods in Kingfisher. -public struct KingfisherWrapper { - public let base: Base - public init(_ base: Base) { - self.base = base - } -} - -/// Represents an object type that is compatible with Kingfisher. You can use `kf` property to get a -/// value in the namespace of Kingfisher. -public protocol KingfisherCompatible: AnyObject { } - -/// Represents a value type that is compatible with Kingfisher. You can use `kf` property to get a -/// value in the namespace of Kingfisher. -public protocol KingfisherCompatibleValue {} - -extension KingfisherCompatible { - /// Gets a namespace holder for Kingfisher compatible types. - public var kf: KingfisherWrapper { - get { return KingfisherWrapper(self) } - set { } - } -} - -extension KingfisherCompatibleValue { - /// Gets a namespace holder for Kingfisher compatible types. - public var kf: KingfisherWrapper { - get { return KingfisherWrapper(self) } - set { } - } -} - -extension KFCrossPlatformImage: KingfisherCompatible { } -#if !os(watchOS) -extension KFCrossPlatformImageView: KingfisherCompatible { } -extension KFCrossPlatformButton: KingfisherCompatible { } -extension NSTextAttachment: KingfisherCompatible { } -#else -extension WKInterfaceImage: KingfisherCompatible { } -#endif - -#if os(tvOS) && canImport(TVUIKit) -@available(tvOS 12.0, *) -extension TVMonogramView: KingfisherCompatible { } -#endif - -#if canImport(CarPlay) && !targetEnvironment(macCatalyst) -@available(iOS 14.0, *) -extension CPListItem: KingfisherCompatible { } -#endif diff --git a/Pods/Kingfisher/Sources/General/KingfisherError.swift b/Pods/Kingfisher/Sources/General/KingfisherError.swift deleted file mode 100644 index c6e79145..00000000 --- a/Pods/Kingfisher/Sources/General/KingfisherError.swift +++ /dev/null @@ -1,474 +0,0 @@ -// -// KingfisherError.swift -// Kingfisher -// -// Created by onevcat on 2018/09/26. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -extension Never {} - -/// Represents all the errors which can happen in Kingfisher framework. -/// Kingfisher related methods always throw a `KingfisherError` or invoke the callback with `KingfisherError` -/// as its error type. To handle errors from Kingfisher, you switch over the error to get a reason catalog, -/// then switch over the reason to know error detail. -public enum KingfisherError: Error { - - // MARK: Error Reason Types - - /// Represents the error reason during networking request phase. - /// - /// - emptyRequest: The request is empty. Code 1001. - /// - invalidURL: The URL of request is invalid. Code 1002. - /// - taskCancelled: The downloading task is cancelled by user. Code 1003. - public enum RequestErrorReason { - - /// The request is empty. Code 1001. - case emptyRequest - - /// The URL of request is invalid. Code 1002. - /// - request: The request is tend to be sent but its URL is invalid. - case invalidURL(request: URLRequest) - - /// The downloading task is cancelled by user. Code 1003. - /// - task: The session data task which is cancelled. - /// - token: The cancel token which is used for cancelling the task. - case taskCancelled(task: SessionDataTask, token: SessionDataTask.CancelToken) - } - - /// Represents the error reason during networking response phase. - /// - /// - invalidURLResponse: The response is not a valid URL response. Code 2001. - /// - invalidHTTPStatusCode: The response contains an invalid HTTP status code. Code 2002. - /// - URLSessionError: An error happens in the system URL session. Code 2003. - /// - dataModifyingFailed: Data modifying fails on returning a valid data. Code 2004. - /// - noURLResponse: The task is done but no URL response found. Code 2005. - public enum ResponseErrorReason { - - /// The response is not a valid URL response. Code 2001. - /// - response: The received invalid URL response. - /// The response is expected to be an HTTP response, but it is not. - case invalidURLResponse(response: URLResponse) - - /// The response contains an invalid HTTP status code. Code 2002. - /// - Note: - /// By default, status code 200..<400 is recognized as valid. You can override - /// this behavior by conforming to the `ImageDownloaderDelegate`. - /// - response: The received response. - case invalidHTTPStatusCode(response: HTTPURLResponse) - - /// An error happens in the system URL session. Code 2003. - /// - error: The underlying URLSession error object. - case URLSessionError(error: Error) - - /// Data modifying fails on returning a valid data. Code 2004. - /// - task: The failed task. - case dataModifyingFailed(task: SessionDataTask) - - /// The task is done but no URL response found. Code 2005. - /// - task: The failed task. - case noURLResponse(task: SessionDataTask) - - /// The task is cancelled by `ImageDownloaderDelegate` due to the `.cancel` response disposition is - /// specified by the delegate method. Code 2006. - case cancelledByDelegate(response: URLResponse) - } - - /// Represents the error reason during Kingfisher caching system. - /// - /// - fileEnumeratorCreationFailed: Cannot create a file enumerator for a certain disk URL. Code 3001. - /// - invalidFileEnumeratorContent: Cannot get correct file contents from a file enumerator. Code 3002. - /// - invalidURLResource: The file at target URL exists, but its URL resource is unavailable. Code 3003. - /// - cannotLoadDataFromDisk: The file at target URL exists, but the data cannot be loaded from it. Code 3004. - /// - cannotCreateDirectory: Cannot create a folder at a given path. Code 3005. - /// - imageNotExisting: The requested image does not exist in cache. Code 3006. - /// - cannotConvertToData: Cannot convert an object to data for storing. Code 3007. - /// - cannotSerializeImage: Cannot serialize an image to data for storing. Code 3008. - /// - cannotCreateCacheFile: Cannot create the cache file at a certain fileURL under a key. Code 3009. - /// - cannotSetCacheFileAttribute: Cannot set file attributes to a cached file. Code 3010. - public enum CacheErrorReason { - - /// Cannot create a file enumerator for a certain disk URL. Code 3001. - /// - url: The target disk URL from which the file enumerator should be created. - case fileEnumeratorCreationFailed(url: URL) - - /// Cannot get correct file contents from a file enumerator. Code 3002. - /// - url: The target disk URL from which the content of a file enumerator should be got. - case invalidFileEnumeratorContent(url: URL) - - /// The file at target URL exists, but its URL resource is unavailable. Code 3003. - /// - error: The underlying error thrown by file manager. - /// - key: The key used to getting the resource from cache. - /// - url: The disk URL where the target cached file exists. - case invalidURLResource(error: Error, key: String, url: URL) - - /// The file at target URL exists, but the data cannot be loaded from it. Code 3004. - /// - url: The disk URL where the target cached file exists. - /// - error: The underlying error which describes why this error happens. - case cannotLoadDataFromDisk(url: URL, error: Error) - - /// Cannot create a folder at a given path. Code 3005. - /// - path: The disk path where the directory creating operation fails. - /// - error: The underlying error which describes why this error happens. - case cannotCreateDirectory(path: String, error: Error) - - /// The requested image does not exist in cache. Code 3006. - /// - key: Key of the requested image in cache. - case imageNotExisting(key: String) - - /// Cannot convert an object to data for storing. Code 3007. - /// - object: The object which needs be convert to data. - case cannotConvertToData(object: Any, error: Error) - - /// Cannot serialize an image to data for storing. Code 3008. - /// - image: The input image needs to be serialized to cache. - /// - original: The original image data, if exists. - /// - serializer: The `CacheSerializer` used for the image serializing. - case cannotSerializeImage(image: KFCrossPlatformImage?, original: Data?, serializer: CacheSerializer) - - /// Cannot create the cache file at a certain fileURL under a key. Code 3009. - /// - fileURL: The url where the cache file should be created. - /// - key: The cache key used for the cache. When caching a file through `KingfisherManager` and Kingfisher's - /// extension method, it is the resolved cache key based on your input `Source` and the image processors. - /// - data: The data to be cached. - /// - error: The underlying error originally thrown by Foundation when writing the `data` to the disk file at - /// `fileURL`. - case cannotCreateCacheFile(fileURL: URL, key: String, data: Data, error: Error) - - /// Cannot set file attributes to a cached file. Code 3010. - /// - filePath: The path of target cache file. - /// - attributes: The file attribute to be set to the target file. - /// - error: The underlying error originally thrown by Foundation when setting the `attributes` to the disk - /// file at `filePath`. - case cannotSetCacheFileAttribute(filePath: String, attributes: [FileAttributeKey : Any], error: Error) - - /// The disk storage of cache is not ready. Code 3011. - /// - /// This is usually due to extremely lack of space on disk storage, and - /// Kingfisher failed even when creating the cache folder. The disk storage will be in unusable state. Normally, - /// ask user to free some spaces and restart the app to make the disk storage work again. - /// - cacheURL: The intended URL which should be the storage folder. - case diskStorageIsNotReady(cacheURL: URL) - } - - - /// Represents the error reason during image processing phase. - /// - /// - processingFailed: Image processing fails. There is no valid output image from the processor. Code 4001. - public enum ProcessorErrorReason { - /// Image processing fails. There is no valid output image from the processor. Code 4001. - /// - processor: The `ImageProcessor` used to process the image or its data in `item`. - /// - item: The image or its data content. - case processingFailed(processor: ImageProcessor, item: ImageProcessItem) - } - - /// Represents the error reason during image setting in a view related class. - /// - /// - emptySource: The input resource is empty or `nil`. Code 5001. - /// - notCurrentSourceTask: The source task is finished, but it is not the one expected now. Code 5002. - /// - dataProviderError: An error happens during getting data from an `ImageDataProvider`. Code 5003. - public enum ImageSettingErrorReason { - - /// The input resource is empty or `nil`. Code 5001. - case emptySource - - /// The resource task is finished, but it is not the one expected now. This usually happens when you set another - /// resource on the view without cancelling the current on-going one. The previous setting task will fail with - /// this `.notCurrentSourceTask` error when a result got, regardless of it being successful or not for that task. - /// The result of this original task is contained in the associated value. - /// Code 5002. - /// - result: The `RetrieveImageResult` if the source task is finished without problem. `nil` if an error - /// happens. - /// - error: The `Error` if an issue happens during image setting task. `nil` if the task finishes without - /// problem. - /// - source: The original source value of the task. - case notCurrentSourceTask(result: RetrieveImageResult?, error: Error?, source: Source) - - /// An error happens during getting data from an `ImageDataProvider`. Code 5003. - case dataProviderError(provider: ImageDataProvider, error: Error) - - /// No more alternative `Source` can be used in current loading process. It means that the - /// `.alternativeSources` are used and Kingfisher tried to recovery from the original error, but still - /// fails for all the given alternative sources. The associated value holds all the errors encountered during - /// the load process, including the original source loading error and all the alternative sources errors. - /// Code 5004. - case alternativeSourcesExhausted([PropagationError]) - } - - // MARK: Member Cases - - /// Represents the error reason during networking request phase. - case requestError(reason: RequestErrorReason) - /// Represents the error reason during networking response phase. - case responseError(reason: ResponseErrorReason) - /// Represents the error reason during Kingfisher caching system. - case cacheError(reason: CacheErrorReason) - /// Represents the error reason during image processing phase. - case processorError(reason: ProcessorErrorReason) - /// Represents the error reason during image setting in a view related class. - case imageSettingError(reason: ImageSettingErrorReason) - - // MARK: Helper Properties & Methods - - /// Helper property to check whether this error is a `RequestErrorReason.taskCancelled` or not. - public var isTaskCancelled: Bool { - if case .requestError(reason: .taskCancelled) = self { - return true - } - return false - } - - /// Helper method to check whether this error is a `ResponseErrorReason.invalidHTTPStatusCode` and the - /// associated value is a given status code. - /// - /// - Parameter code: The given status code. - /// - Returns: If `self` is a `ResponseErrorReason.invalidHTTPStatusCode` error - /// and its status code equals to `code`, `true` is returned. Otherwise, `false`. - public func isInvalidResponseStatusCode(_ code: Int) -> Bool { - if case .responseError(reason: .invalidHTTPStatusCode(let response)) = self { - return response.statusCode == code - } - return false - } - - public var isInvalidResponseStatusCode: Bool { - if case .responseError(reason: .invalidHTTPStatusCode) = self { - return true - } - return false - } - - /// Helper property to check whether this error is a `ImageSettingErrorReason.notCurrentSourceTask` or not. - /// When a new image setting task starts while the old one is still running, the new task identifier will be - /// set and the old one is overwritten. A `.notCurrentSourceTask` error will be raised when the old task finishes - /// to let you know the setting process finishes with a certain result, but the image view or button is not set. - public var isNotCurrentTask: Bool { - if case .imageSettingError(reason: .notCurrentSourceTask(_, _, _)) = self { - return true - } - return false - } - - var isLowDataModeConstrained: Bool { - if #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *), - case .responseError(reason: .URLSessionError(let sessionError)) = self, - let urlError = sessionError as? URLError, - urlError.networkUnavailableReason == .constrained - { - return true - } - return false - } - -} - -// MARK: - LocalizedError Conforming -extension KingfisherError: LocalizedError { - - /// A localized message describing what error occurred. - public var errorDescription: String? { - switch self { - case .requestError(let reason): return reason.errorDescription - case .responseError(let reason): return reason.errorDescription - case .cacheError(let reason): return reason.errorDescription - case .processorError(let reason): return reason.errorDescription - case .imageSettingError(let reason): return reason.errorDescription - } - } -} - - -// MARK: - CustomNSError Conforming -extension KingfisherError: CustomNSError { - - /// The error domain of `KingfisherError`. All errors from Kingfisher is under this domain. - public static let domain = "com.onevcat.Kingfisher.Error" - - /// The error code within the given domain. - public var errorCode: Int { - switch self { - case .requestError(let reason): return reason.errorCode - case .responseError(let reason): return reason.errorCode - case .cacheError(let reason): return reason.errorCode - case .processorError(let reason): return reason.errorCode - case .imageSettingError(let reason): return reason.errorCode - } - } -} - -extension KingfisherError.RequestErrorReason { - var errorDescription: String? { - switch self { - case .emptyRequest: - return "The request is empty or `nil`." - case .invalidURL(let request): - return "The request contains an invalid or empty URL. Request: \(request)." - case .taskCancelled(let task, let token): - return "The session task was cancelled. Task: \(task), cancel token: \(token)." - } - } - - var errorCode: Int { - switch self { - case .emptyRequest: return 1001 - case .invalidURL: return 1002 - case .taskCancelled: return 1003 - } - } -} - -extension KingfisherError.ResponseErrorReason { - var errorDescription: String? { - switch self { - case .invalidURLResponse(let response): - return "The URL response is invalid: \(response)" - case .invalidHTTPStatusCode(let response): - return "The HTTP status code in response is invalid. Code: \(response.statusCode), response: \(response)." - case .URLSessionError(let error): - return "A URL session error happened. The underlying error: \(error)" - case .dataModifyingFailed(let task): - return "The data modifying delegate returned `nil` for the downloaded data. Task: \(task)." - case .noURLResponse(let task): - return "No URL response received. Task: \(task)." - case .cancelledByDelegate(let response): - return "The downloading task is cancelled by the downloader delegate. Response: \(response)." - - } - } - - var errorCode: Int { - switch self { - case .invalidURLResponse: return 2001 - case .invalidHTTPStatusCode: return 2002 - case .URLSessionError: return 2003 - case .dataModifyingFailed: return 2004 - case .noURLResponse: return 2005 - case .cancelledByDelegate: return 2006 - } - } -} - -extension KingfisherError.CacheErrorReason { - var errorDescription: String? { - switch self { - case .fileEnumeratorCreationFailed(let url): - return "Cannot create file enumerator for URL: \(url)." - case .invalidFileEnumeratorContent(let url): - return "Cannot get contents from the file enumerator at URL: \(url)." - case .invalidURLResource(let error, let key, let url): - return "Cannot get URL resource values or data for the given URL: \(url). " + - "Cache key: \(key). Underlying error: \(error)" - case .cannotLoadDataFromDisk(let url, let error): - return "Cannot load data from disk at URL: \(url). Underlying error: \(error)" - case .cannotCreateDirectory(let path, let error): - return "Cannot create directory at given path: Path: \(path). Underlying error: \(error)" - case .imageNotExisting(let key): - return "The image is not in cache, but you requires it should only be " + - "from cache by enabling the `.onlyFromCache` option. Key: \(key)." - case .cannotConvertToData(let object, let error): - return "Cannot convert the input object to a `Data` object when storing it to disk cache. " + - "Object: \(object). Underlying error: \(error)" - case .cannotSerializeImage(let image, let originalData, let serializer): - return "Cannot serialize an image due to the cache serializer returning `nil`. " + - "Image: \(String(describing:image)), original data: \(String(describing: originalData)), " + - "serializer: \(serializer)." - case .cannotCreateCacheFile(let fileURL, let key, let data, let error): - return "Cannot create cache file at url: \(fileURL), key: \(key), data length: \(data.count). " + - "Underlying foundation error: \(error)." - case .cannotSetCacheFileAttribute(let filePath, let attributes, let error): - return "Cannot set file attribute for the cache file at path: \(filePath), attributes: \(attributes)." + - "Underlying foundation error: \(error)." - case .diskStorageIsNotReady(let cacheURL): - return "The disk storage is not ready to use yet at URL: '\(cacheURL)'. " + - "This is usually caused by extremely lack of disk space. Ask users to free up some space and restart the app." - } - } - - var errorCode: Int { - switch self { - case .fileEnumeratorCreationFailed: return 3001 - case .invalidFileEnumeratorContent: return 3002 - case .invalidURLResource: return 3003 - case .cannotLoadDataFromDisk: return 3004 - case .cannotCreateDirectory: return 3005 - case .imageNotExisting: return 3006 - case .cannotConvertToData: return 3007 - case .cannotSerializeImage: return 3008 - case .cannotCreateCacheFile: return 3009 - case .cannotSetCacheFileAttribute: return 3010 - case .diskStorageIsNotReady: return 3011 - } - } -} - -extension KingfisherError.ProcessorErrorReason { - var errorDescription: String? { - switch self { - case .processingFailed(let processor, let item): - return "Processing image failed. Processor: \(processor). Processing item: \(item)." - } - } - - var errorCode: Int { - switch self { - case .processingFailed: return 4001 - } - } -} - -extension KingfisherError.ImageSettingErrorReason { - var errorDescription: String? { - switch self { - case .emptySource: - return "The input resource is empty." - case .notCurrentSourceTask(let result, let error, let resource): - if let result = result { - return "Retrieving resource succeeded, but this source is " + - "not the one currently expected. Result: \(result). Resource: \(resource)." - } else if let error = error { - return "Retrieving resource failed, and this resource is " + - "not the one currently expected. Error: \(error). Resource: \(resource)." - } else { - return nil - } - case .dataProviderError(let provider, let error): - return "Image data provider fails to provide data. Provider: \(provider), error: \(error)" - case .alternativeSourcesExhausted(let errors): - return "Image setting from alternaive sources failed: \(errors)" - } - } - - var errorCode: Int { - switch self { - case .emptySource: return 5001 - case .notCurrentSourceTask: return 5002 - case .dataProviderError: return 5003 - case .alternativeSourcesExhausted: return 5004 - } - } -} diff --git a/Pods/Kingfisher/Sources/General/KingfisherManager.swift b/Pods/Kingfisher/Sources/General/KingfisherManager.swift deleted file mode 100644 index 1979a8f7..00000000 --- a/Pods/Kingfisher/Sources/General/KingfisherManager.swift +++ /dev/null @@ -1,807 +0,0 @@ -// -// KingfisherManager.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/6. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - - -import Foundation -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -/// The downloading progress block type. -/// The parameter value is the `receivedSize` of current response. -/// The second parameter is the total expected data length from response's "Content-Length" header. -/// If the expected length is not available, this block will not be called. -public typealias DownloadProgressBlock = ((_ receivedSize: Int64, _ totalSize: Int64) -> Void) - -/// Represents the result of a Kingfisher retrieving image task. -public struct RetrieveImageResult { - /// Gets the image object of this result. - public let image: KFCrossPlatformImage - - /// Gets the cache source of the image. It indicates from which layer of cache this image is retrieved. - /// If the image is just downloaded from network, `.none` will be returned. - public let cacheType: CacheType - - /// The `Source` which this result is related to. This indicated where the `image` of `self` is referring. - public let source: Source - - /// The original `Source` from which the retrieve task begins. It can be different from the `source` property. - /// When an alternative source loading happened, the `source` will be the replacing loading target, while the - /// `originalSource` will be kept as the initial `source` which issued the image loading process. - public let originalSource: Source - - /// Gets the data behind the result. - /// - /// If this result is from a network downloading (when `cacheType == .none`), calling this returns the downloaded - /// data. If the reuslt is from cache, it serializes the image with the given cache serializer in the loading option - /// and returns the result. - /// - /// - Note: - /// This can be a time-consuming action, so if you need to use the data for multiple times, it is suggested to hold - /// it and prevent keeping calling this too frequently. - public let data: () -> Data? -} - -/// A struct that stores some related information of an `KingfisherError`. It provides some context information for -/// a pure error so you can identify the error easier. -public struct PropagationError { - - /// The `Source` to which current `error` is bound. - public let source: Source - - /// The actual error happens in framework. - public let error: KingfisherError -} - - -/// The downloading task updated block type. The parameter `newTask` is the updated new task of image setting process. -/// It is a `nil` if the image loading does not require an image downloading process. If an image downloading is issued, -/// this value will contain the actual `DownloadTask` for you to keep and cancel it later if you need. -public typealias DownloadTaskUpdatedBlock = ((_ newTask: DownloadTask?) -> Void) - -/// Main manager class of Kingfisher. It connects Kingfisher downloader and cache, -/// to provide a set of convenience methods to use Kingfisher for tasks. -/// You can use this class to retrieve an image via a specified URL from web or cache. -public class KingfisherManager { - - /// Represents a shared manager used across Kingfisher. - /// Use this instance for getting or storing images with Kingfisher. - public static let shared = KingfisherManager() - - // Mark: Public Properties - /// The `ImageCache` used by this manager. It is `ImageCache.default` by default. - /// If a cache is specified in `KingfisherManager.defaultOptions`, the value in `defaultOptions` will be - /// used instead. - public var cache: ImageCache - - /// The `ImageDownloader` used by this manager. It is `ImageDownloader.default` by default. - /// If a downloader is specified in `KingfisherManager.defaultOptions`, the value in `defaultOptions` will be - /// used instead. - public var downloader: ImageDownloader - - /// Default options used by the manager. This option will be used in - /// Kingfisher manager related methods, as well as all view extension methods. - /// You can also passing other options for each image task by sending an `options` parameter - /// to Kingfisher's APIs. The per image options will overwrite the default ones, - /// if the option exists in both. - public var defaultOptions = KingfisherOptionsInfo.empty - - // Use `defaultOptions` to overwrite the `downloader` and `cache`. - private var currentDefaultOptions: KingfisherOptionsInfo { - return [.downloader(downloader), .targetCache(cache)] + defaultOptions - } - - private let processingQueue: CallbackQueue - - private convenience init() { - self.init(downloader: .default, cache: .default) - } - - /// Creates an image setting manager with specified downloader and cache. - /// - /// - Parameters: - /// - downloader: The image downloader used to download images. - /// - cache: The image cache which stores memory and disk images. - public init(downloader: ImageDownloader, cache: ImageCache) { - self.downloader = downloader - self.cache = cache - - let processQueueName = "com.onevcat.Kingfisher.KingfisherManager.processQueue.\(UUID().uuidString)" - processingQueue = .dispatch(DispatchQueue(label: processQueueName)) - } - - // MARK: - Getting Images - - /// Gets an image from a given resource. - /// - Parameters: - /// - resource: The `Resource` object defines data information like key or URL. - /// - options: Options to use when creating the image. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. `progressBlock` is always called in - /// main queue. - /// - downloadTaskUpdated: Called when a new image downloading task is created for current image retrieving. This - /// usually happens when an alternative source is used to replace the original (failed) - /// task. You can update your reference of `DownloadTask` if you want to manually `cancel` - /// the new task. - /// - completionHandler: Called when the image retrieved and set finished. This completion handler will be invoked - /// from the `options.callbackQueue`. If not specified, the main queue will be used. - /// - Returns: A task represents the image downloading. If there is a download task starts for `.network` resource, - /// the started `DownloadTask` is returned. Otherwise, `nil` is returned. - /// - /// - Note: - /// This method will first check whether the requested `resource` is already in cache or not. If cached, - /// it returns `nil` and invoke the `completionHandler` after the cached image retrieved. Otherwise, it - /// will download the `resource`, store it in cache, then call `completionHandler`. - @discardableResult - public func retrieveImage( - with resource: Resource, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - downloadTaskUpdated: DownloadTaskUpdatedBlock? = nil, - completionHandler: ((Result) -> Void)?) -> DownloadTask? - { - return retrieveImage( - with: resource.convertToSource(), - options: options, - progressBlock: progressBlock, - downloadTaskUpdated: downloadTaskUpdated, - completionHandler: completionHandler - ) - } - - /// Gets an image from a given resource. - /// - /// - Parameters: - /// - source: The `Source` object defines data information from network or a data provider. - /// - options: Options to use when creating the image. - /// - progressBlock: Called when the image downloading progress gets updated. If the response does not contain an - /// `expectedContentLength`, this block will not be called. `progressBlock` is always called in - /// main queue. - /// - downloadTaskUpdated: Called when a new image downloading task is created for current image retrieving. This - /// usually happens when an alternative source is used to replace the original (failed) - /// task. You can update your reference of `DownloadTask` if you want to manually `cancel` - /// the new task. - /// - completionHandler: Called when the image retrieved and set finished. This completion handler will be invoked - /// from the `options.callbackQueue`. If not specified, the main queue will be used. - /// - Returns: A task represents the image downloading. If there is a download task starts for `.network` resource, - /// the started `DownloadTask` is returned. Otherwise, `nil` is returned. - /// - /// - Note: - /// This method will first check whether the requested `source` is already in cache or not. If cached, - /// it returns `nil` and invoke the `completionHandler` after the cached image retrieved. Otherwise, it - /// will try to load the `source`, store it in cache, then call `completionHandler`. - /// - @discardableResult - public func retrieveImage( - with source: Source, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - downloadTaskUpdated: DownloadTaskUpdatedBlock? = nil, - completionHandler: ((Result) -> Void)?) -> DownloadTask? - { - let options = currentDefaultOptions + (options ?? .empty) - let info = KingfisherParsedOptionsInfo(options) - return retrieveImage( - with: source, - options: info, - progressBlock: progressBlock, - downloadTaskUpdated: downloadTaskUpdated, - completionHandler: completionHandler) - } - - func retrieveImage( - with source: Source, - options: KingfisherParsedOptionsInfo, - progressBlock: DownloadProgressBlock? = nil, - downloadTaskUpdated: DownloadTaskUpdatedBlock? = nil, - completionHandler: ((Result) -> Void)?) -> DownloadTask? - { - var info = options - if let block = progressBlock { - info.onDataReceived = (info.onDataReceived ?? []) + [ImageLoadingProgressSideEffect(block)] - } - return retrieveImage( - with: source, - options: info, - downloadTaskUpdated: downloadTaskUpdated, - progressiveImageSetter: nil, - completionHandler: completionHandler) - } - - func retrieveImage( - with source: Source, - options: KingfisherParsedOptionsInfo, - downloadTaskUpdated: DownloadTaskUpdatedBlock? = nil, - progressiveImageSetter: ((KFCrossPlatformImage?) -> Void)? = nil, - referenceTaskIdentifierChecker: (() -> Bool)? = nil, - completionHandler: ((Result) -> Void)?) -> DownloadTask? - { - var options = options - if let provider = ImageProgressiveProvider(options, refresh: { image in - guard let setter = progressiveImageSetter else { - return - } - guard let strategy = options.progressiveJPEG?.onImageUpdated(image) else { - setter(image) - return - } - switch strategy { - case .default: setter(image) - case .keepCurrent: break - case .replace(let newImage): setter(newImage) - } - }) { - options.onDataReceived = (options.onDataReceived ?? []) + [provider] - } - if let checker = referenceTaskIdentifierChecker { - options.onDataReceived?.forEach { - $0.onShouldApply = checker - } - } - - let retrievingContext = RetrievingContext(options: options, originalSource: source) - var retryContext: RetryContext? - - func startNewRetrieveTask( - with source: Source, - downloadTaskUpdated: DownloadTaskUpdatedBlock? - ) { - let newTask = self.retrieveImage(with: source, context: retrievingContext) { result in - handler(currentSource: source, result: result) - } - downloadTaskUpdated?(newTask) - } - - func failCurrentSource(_ source: Source, with error: KingfisherError) { - // Skip alternative sources if the user cancelled it. - guard !error.isTaskCancelled else { - completionHandler?(.failure(error)) - return - } - // When low data mode constrained error, retry with the low data mode source instead of use alternative on fly. - guard !error.isLowDataModeConstrained else { - if let source = retrievingContext.options.lowDataModeSource { - retrievingContext.options.lowDataModeSource = nil - startNewRetrieveTask(with: source, downloadTaskUpdated: downloadTaskUpdated) - } else { - // This should not happen. - completionHandler?(.failure(error)) - } - return - } - if let nextSource = retrievingContext.popAlternativeSource() { - retrievingContext.appendError(error, to: source) - startNewRetrieveTask(with: nextSource, downloadTaskUpdated: downloadTaskUpdated) - } else { - // No other alternative source. Finish with error. - if retrievingContext.propagationErrors.isEmpty { - completionHandler?(.failure(error)) - } else { - retrievingContext.appendError(error, to: source) - let finalError = KingfisherError.imageSettingError( - reason: .alternativeSourcesExhausted(retrievingContext.propagationErrors) - ) - completionHandler?(.failure(finalError)) - } - } - } - - func handler(currentSource: Source, result: (Result)) -> Void { - switch result { - case .success: - completionHandler?(result) - case .failure(let error): - if let retryStrategy = options.retryStrategy { - let context = retryContext?.increaseRetryCount() ?? RetryContext(source: source, error: error) - retryContext = context - - retryStrategy.retry(context: context) { decision in - switch decision { - case .retry(let userInfo): - retryContext?.userInfo = userInfo - startNewRetrieveTask(with: source, downloadTaskUpdated: downloadTaskUpdated) - case .stop: - failCurrentSource(currentSource, with: error) - } - } - } else { - failCurrentSource(currentSource, with: error) - } - } - } - - return retrieveImage( - with: source, - context: retrievingContext) - { - result in - handler(currentSource: source, result: result) - } - - } - - private func retrieveImage( - with source: Source, - context: RetrievingContext, - completionHandler: ((Result) -> Void)?) -> DownloadTask? - { - let options = context.options - if options.forceRefresh { - return loadAndCacheImage( - source: source, - context: context, - completionHandler: completionHandler)?.value - - } else { - let loadedFromCache = retrieveImageFromCache( - source: source, - context: context, - completionHandler: completionHandler) - - if loadedFromCache { - return nil - } - - if options.onlyFromCache { - let error = KingfisherError.cacheError(reason: .imageNotExisting(key: source.cacheKey)) - completionHandler?(.failure(error)) - return nil - } - - return loadAndCacheImage( - source: source, - context: context, - completionHandler: completionHandler)?.value - } - } - - func provideImage( - provider: ImageDataProvider, - options: KingfisherParsedOptionsInfo, - completionHandler: ((Result) -> Void)?) - { - guard let completionHandler = completionHandler else { return } - provider.data { result in - switch result { - case .success(let data): - (options.processingQueue ?? self.processingQueue).execute { - let processor = options.processor - let processingItem = ImageProcessItem.data(data) - guard let image = processor.process(item: processingItem, options: options) else { - options.callbackQueue.execute { - let error = KingfisherError.processorError( - reason: .processingFailed(processor: processor, item: processingItem)) - completionHandler(.failure(error)) - } - return - } - - options.callbackQueue.execute { - let result = ImageLoadingResult(image: image, url: nil, originalData: data) - completionHandler(.success(result)) - } - } - case .failure(let error): - options.callbackQueue.execute { - let error = KingfisherError.imageSettingError( - reason: .dataProviderError(provider: provider, error: error)) - completionHandler(.failure(error)) - } - - } - } - } - - private func cacheImage( - source: Source, - options: KingfisherParsedOptionsInfo, - context: RetrievingContext, - result: Result, - completionHandler: ((Result) -> Void)? - ) - { - switch result { - case .success(let value): - let needToCacheOriginalImage = options.cacheOriginalImage && - options.processor != DefaultImageProcessor.default - let coordinator = CacheCallbackCoordinator( - shouldWaitForCache: options.waitForCache, shouldCacheOriginal: needToCacheOriginalImage) - let result = RetrieveImageResult( - image: options.imageModifier?.modify(value.image) ?? value.image, - cacheType: .none, - source: source, - originalSource: context.originalSource, - data: { value.originalData } - ) - // Add image to cache. - let targetCache = options.targetCache ?? self.cache - targetCache.store( - value.image, - original: value.originalData, - forKey: source.cacheKey, - options: options, - toDisk: !options.cacheMemoryOnly) - { - _ in - coordinator.apply(.cachingImage) { - completionHandler?(.success(result)) - } - } - - // Add original image to cache if necessary. - - if needToCacheOriginalImage { - let originalCache = options.originalCache ?? targetCache - originalCache.storeToDisk( - value.originalData, - forKey: source.cacheKey, - processorIdentifier: DefaultImageProcessor.default.identifier, - expiration: options.diskCacheExpiration) - { - _ in - coordinator.apply(.cachingOriginalImage) { - completionHandler?(.success(result)) - } - } - } - - coordinator.apply(.cacheInitiated) { - completionHandler?(.success(result)) - } - - case .failure(let error): - completionHandler?(.failure(error)) - } - } - - @discardableResult - func loadAndCacheImage( - source: Source, - context: RetrievingContext, - completionHandler: ((Result) -> Void)?) -> DownloadTask.WrappedTask? - { - let options = context.options - func _cacheImage(_ result: Result) { - cacheImage( - source: source, - options: options, - context: context, - result: result, - completionHandler: completionHandler - ) - } - - switch source { - case .network(let resource): - let downloader = options.downloader ?? self.downloader - let task = downloader.downloadImage( - with: resource.downloadURL, options: options, completionHandler: _cacheImage - ) - - - // The code below is neat, but it fails the Swift 5.2 compiler with a runtime crash when - // `BUILD_LIBRARY_FOR_DISTRIBUTION` is turned on. I believe it is a bug in the compiler. - // Let's fallback to a traditional style before it can be fixed in Swift. - // - // https://github.com/onevcat/Kingfisher/issues/1436 - // - // return task.map(DownloadTask.WrappedTask.download) - - if let task = task { - return .download(task) - } else { - return nil - } - - case .provider(let provider): - provideImage(provider: provider, options: options, completionHandler: _cacheImage) - return .dataProviding - } - } - - /// Retrieves image from memory or disk cache. - /// - /// - Parameters: - /// - source: The target source from which to get image. - /// - key: The key to use when caching the image. - /// - url: Image request URL. This is not used when retrieving image from cache. It is just used for - /// `RetrieveImageResult` callback compatibility. - /// - options: Options on how to get the image from image cache. - /// - completionHandler: Called when the image retrieving finishes, either with succeeded - /// `RetrieveImageResult` or an error. - /// - Returns: `true` if the requested image or the original image before being processed is existing in cache. - /// Otherwise, this method returns `false`. - /// - /// - Note: - /// The image retrieving could happen in either memory cache or disk cache. The `.processor` option in - /// `options` will be considered when searching in the cache. If no processed image is found, Kingfisher - /// will try to check whether an original version of that image is existing or not. If there is already an - /// original, Kingfisher retrieves it from cache and processes it. Then, the processed image will be store - /// back to cache for later use. - func retrieveImageFromCache( - source: Source, - context: RetrievingContext, - completionHandler: ((Result) -> Void)?) -> Bool - { - let options = context.options - // 1. Check whether the image was already in target cache. If so, just get it. - let targetCache = options.targetCache ?? cache - let key = source.cacheKey - let targetImageCached = targetCache.imageCachedType( - forKey: key, processorIdentifier: options.processor.identifier) - - let validCache = targetImageCached.cached && - (options.fromMemoryCacheOrRefresh == false || targetImageCached == .memory) - if validCache { - targetCache.retrieveImage(forKey: key, options: options) { result in - guard let completionHandler = completionHandler else { return } - - // TODO: Optimize it when we can use async across all the project. - func checkResultImageAndCallback(_ inputImage: KFCrossPlatformImage) { - var image = inputImage - if image.kf.imageFrameCount != nil && image.kf.imageFrameCount != 1, let data = image.kf.animatedImageData { - // Always recreate animated image representation since it is possible to be loaded in different options. - // https://github.com/onevcat/Kingfisher/issues/1923 - image = options.processor.process(item: .data(data), options: options) ?? .init() - } - if let modifier = options.imageModifier { - image = modifier.modify(image) - } - let value = result.map { - RetrieveImageResult( - image: image, - cacheType: $0.cacheType, - source: source, - originalSource: context.originalSource, - data: { options.cacheSerializer.data(with: image, original: nil) } - ) - } - completionHandler(value) - } - - result.match { cacheResult in - options.callbackQueue.execute { - guard let image = cacheResult.image else { - completionHandler(.failure(KingfisherError.cacheError(reason: .imageNotExisting(key: key)))) - return - } - - if options.cacheSerializer.originalDataUsed { - let processor = options.processor - (options.processingQueue ?? self.processingQueue).execute { - let item = ImageProcessItem.image(image) - guard let processedImage = processor.process(item: item, options: options) else { - let error = KingfisherError.processorError( - reason: .processingFailed(processor: processor, item: item)) - options.callbackQueue.execute { completionHandler(.failure(error)) } - return - } - options.callbackQueue.execute { - checkResultImageAndCallback(processedImage) - } - } - } else { - checkResultImageAndCallback(image) - } - } - } onFailure: { error in - options.callbackQueue.execute { - completionHandler(.failure(KingfisherError.cacheError(reason: .imageNotExisting(key: key)))) - } - } - } - return true - } - - // 2. Check whether the original image exists. If so, get it, process it, save to storage and return. - let originalCache = options.originalCache ?? targetCache - // No need to store the same file in the same cache again. - if originalCache === targetCache && options.processor == DefaultImageProcessor.default { - return false - } - - // Check whether the unprocessed image existing or not. - let originalImageCacheType = originalCache.imageCachedType( - forKey: key, processorIdentifier: DefaultImageProcessor.default.identifier) - let canAcceptDiskCache = !options.fromMemoryCacheOrRefresh - - let canUseOriginalImageCache = - (canAcceptDiskCache && originalImageCacheType.cached) || - (!canAcceptDiskCache && originalImageCacheType == .memory) - - if canUseOriginalImageCache { - // Now we are ready to get found the original image from cache. We need the unprocessed image, so remove - // any processor from options first. - var optionsWithoutProcessor = options - optionsWithoutProcessor.processor = DefaultImageProcessor.default - originalCache.retrieveImage(forKey: key, options: optionsWithoutProcessor) { result in - - result.match( - onSuccess: { cacheResult in - guard let image = cacheResult.image else { - assertionFailure("The image (under key: \(key) should be existing in the original cache.") - return - } - - let processor = options.processor - (options.processingQueue ?? self.processingQueue).execute { - let item = ImageProcessItem.image(image) - guard let processedImage = processor.process(item: item, options: options) else { - let error = KingfisherError.processorError( - reason: .processingFailed(processor: processor, item: item)) - options.callbackQueue.execute { completionHandler?(.failure(error)) } - return - } - - var cacheOptions = options - cacheOptions.callbackQueue = .untouch - - let coordinator = CacheCallbackCoordinator( - shouldWaitForCache: options.waitForCache, shouldCacheOriginal: false) - - let image = options.imageModifier?.modify(processedImage) ?? processedImage - let result = RetrieveImageResult( - image: image, - cacheType: .none, - source: source, - originalSource: context.originalSource, - data: { options.cacheSerializer.data(with: processedImage, original: nil) } - ) - - targetCache.store( - processedImage, - forKey: key, - options: cacheOptions, - toDisk: !options.cacheMemoryOnly) - { - _ in - coordinator.apply(.cachingImage) { - options.callbackQueue.execute { completionHandler?(.success(result)) } - } - } - - coordinator.apply(.cacheInitiated) { - options.callbackQueue.execute { completionHandler?(.success(result)) } - } - } - }, - onFailure: { _ in - // This should not happen actually, since we already confirmed `originalImageCached` is `true`. - // Just in case... - options.callbackQueue.execute { - completionHandler?( - .failure(KingfisherError.cacheError(reason: .imageNotExisting(key: key))) - ) - } - } - ) - } - return true - } - - return false - } -} - -class RetrievingContext { - - var options: KingfisherParsedOptionsInfo - - let originalSource: Source - var propagationErrors: [PropagationError] = [] - - init(options: KingfisherParsedOptionsInfo, originalSource: Source) { - self.originalSource = originalSource - self.options = options - } - - func popAlternativeSource() -> Source? { - guard var alternativeSources = options.alternativeSources, !alternativeSources.isEmpty else { - return nil - } - let nextSource = alternativeSources.removeFirst() - options.alternativeSources = alternativeSources - return nextSource - } - - @discardableResult - func appendError(_ error: KingfisherError, to source: Source) -> [PropagationError] { - let item = PropagationError(source: source, error: error) - propagationErrors.append(item) - return propagationErrors - } -} - -class CacheCallbackCoordinator { - - enum State { - case idle - case imageCached - case originalImageCached - case done - } - - enum Action { - case cacheInitiated - case cachingImage - case cachingOriginalImage - } - - private let shouldWaitForCache: Bool - private let shouldCacheOriginal: Bool - private let stateQueue: DispatchQueue - private var threadSafeState: State = .idle - - private (set) var state: State { - set { stateQueue.sync { threadSafeState = newValue } } - get { stateQueue.sync { threadSafeState } } - } - - init(shouldWaitForCache: Bool, shouldCacheOriginal: Bool) { - self.shouldWaitForCache = shouldWaitForCache - self.shouldCacheOriginal = shouldCacheOriginal - let stateQueueName = "com.onevcat.Kingfisher.CacheCallbackCoordinator.stateQueue.\(UUID().uuidString)" - self.stateQueue = DispatchQueue(label: stateQueueName) - } - - func apply(_ action: Action, trigger: () -> Void) { - switch (state, action) { - case (.done, _): - break - - // From .idle - case (.idle, .cacheInitiated): - if !shouldWaitForCache { - state = .done - trigger() - } - case (.idle, .cachingImage): - if shouldCacheOriginal { - state = .imageCached - } else { - state = .done - trigger() - } - case (.idle, .cachingOriginalImage): - state = .originalImageCached - - // From .imageCached - case (.imageCached, .cachingOriginalImage): - state = .done - trigger() - - // From .originalImageCached - case (.originalImageCached, .cachingImage): - state = .done - trigger() - - default: - assertionFailure("This case should not happen in CacheCallbackCoordinator: \(state) - \(action)") - } - } -} diff --git a/Pods/Kingfisher/Sources/General/KingfisherOptionsInfo.swift b/Pods/Kingfisher/Sources/General/KingfisherOptionsInfo.swift deleted file mode 100644 index 5f2aea63..00000000 --- a/Pods/Kingfisher/Sources/General/KingfisherOptionsInfo.swift +++ /dev/null @@ -1,400 +0,0 @@ -// -// KingfisherOptionsInfo.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/23. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if os(macOS) -import AppKit -#else -import UIKit -#endif - - -/// KingfisherOptionsInfo is a typealias for [KingfisherOptionsInfoItem]. -/// You can use the enum of option item with value to control some behaviors of Kingfisher. -public typealias KingfisherOptionsInfo = [KingfisherOptionsInfoItem] - -extension Array where Element == KingfisherOptionsInfoItem { - static let empty: KingfisherOptionsInfo = [] -} - -/// Represents the available option items could be used in `KingfisherOptionsInfo`. -public enum KingfisherOptionsInfoItem { - - /// Kingfisher will use the associated `ImageCache` object when handling related operations, - /// including trying to retrieve the cached images and store the downloaded image to it. - case targetCache(ImageCache) - - /// The `ImageCache` for storing and retrieving original images. If `originalCache` is - /// contained in the options, it will be preferred for storing and retrieving original images. - /// If there is no `.originalCache` in the options, `.targetCache` will be used to store original images. - /// - /// When using KingfisherManager to download and store an image, if `cacheOriginalImage` is - /// applied in the option, the original image will be stored to this `originalCache`. At the - /// same time, if a requested final image (with processor applied) cannot be found in `targetCache`, - /// Kingfisher will try to search the original image to check whether it is already there. If found, - /// it will be used and applied with the given processor. It is an optimization for not downloading - /// the same image for multiple times. - case originalCache(ImageCache) - - /// Kingfisher will use the associated `ImageDownloader` object to download the requested images. - case downloader(ImageDownloader) - - /// Member for animation transition when using `UIImageView`. Kingfisher will use the `ImageTransition` of - /// this enum to animate the image in if it is downloaded from web. The transition will not happen when the - /// image is retrieved from either memory or disk cache by default. If you need to do the transition even when - /// the image being retrieved from cache, set `.forceRefresh` as well. - case transition(ImageTransition) - - /// Associated `Float` value will be set as the priority of image download task. The value for it should be - /// between 0.0~1.0. If this option not set, the default value (`URLSessionTask.defaultPriority`) will be used. - case downloadPriority(Float) - - /// If set, Kingfisher will ignore the cache and try to start a download task for the image source. - case forceRefresh - - /// If set, Kingfisher will try to retrieve the image from memory cache first. If the image is not in memory - /// cache, then it will ignore the disk cache but download the image again from network. This is useful when - /// you want to display a changeable image behind the same url at the same app session, while avoiding download - /// it for multiple times. - case fromMemoryCacheOrRefresh - - /// If set, setting the image to an image view will happen with transition even when retrieved from cache. - /// See `.transition` option for more. - case forceTransition - - /// If set, Kingfisher will only cache the value in memory but not in disk. - case cacheMemoryOnly - - /// If set, Kingfisher will wait for caching operation to be completed before calling the completion block. - case waitForCache - - /// If set, Kingfisher will only try to retrieve the image from cache, but not from network. If the image is not in - /// cache, the image retrieving will fail with the `KingfisherError.cacheError` with `.imageNotExisting` as its - /// reason. - case onlyFromCache - - /// Decode the image in background thread before using. It will decode the downloaded image data and do a off-screen - /// rendering to extract pixel information in background. This can speed up display, but will cost more time to - /// prepare the image for using. - case backgroundDecode - - /// The associated value will be used as the target queue of dispatch callbacks when retrieving images from - /// cache. If not set, Kingfisher will use `.mainCurrentOrAsync` for callbacks. - /// - /// - Note: - /// This option does not affect the callbacks for UI related extension methods. You will always get the - /// callbacks called from main queue. - case callbackQueue(CallbackQueue) - - /// The associated value will be used as the scale factor when converting retrieved data to an image. - /// Specify the image scale, instead of your screen scale. You may need to set the correct scale when you dealing - /// with 2x or 3x retina images. Otherwise, Kingfisher will convert the data to image object at `scale` 1.0. - case scaleFactor(CGFloat) - - /// Whether all the animated image data should be preloaded. Default is `false`, which means only following frames - /// will be loaded on need. If `true`, all the animated image data will be loaded and decoded into memory. - /// - /// This option is mainly used for back compatibility internally. You should not set it directly. Instead, - /// you should choose the image view class to control the GIF data loading. There are two classes in Kingfisher - /// support to display a GIF image. `AnimatedImageView` does not preload all data, it takes much less memory, but - /// uses more CPU when display. While a normal image view (`UIImageView` or `NSImageView`) loads all data at once, - /// which uses more memory but only decode image frames once. - case preloadAllAnimationData - - /// The `ImageDownloadRequestModifier` contained will be used to change the request before it being sent. - /// This is the last chance you can modify the image download request. You can modify the request for some - /// customizing purpose, such as adding auth token to the header, do basic HTTP auth or something like url mapping. - /// The original request will be sent without any modification by default. - case requestModifier(AsyncImageDownloadRequestModifier) - - /// The `ImageDownloadRedirectHandler` contained will be used to change the request before redirection. - /// This is the possibility you can modify the image download request during redirect. You can modify the request for - /// some customizing purpose, such as adding auth token to the header, do basic HTTP auth or something like url - /// mapping. - /// The original redirection request will be sent without any modification by default. - case redirectHandler(ImageDownloadRedirectHandler) - - /// Processor for processing when the downloading finishes, a processor will convert the downloaded data to an image - /// and/or apply some filter on it. If a cache is connected to the downloader (it happens when you are using - /// KingfisherManager or any of the view extension methods), the converted image will also be sent to cache as well. - /// If not set, the `DefaultImageProcessor.default` will be used. - case processor(ImageProcessor) - - /// Provides a `CacheSerializer` to convert some data to an image object for - /// retrieving from disk cache or vice versa for storing to disk cache. - /// If not set, the `DefaultCacheSerializer.default` will be used. - case cacheSerializer(CacheSerializer) - - /// An `ImageModifier` is for modifying an image as needed right before it is used. If the image was fetched - /// directly from the downloader, the modifier will run directly after the `ImageProcessor`. If the image is being - /// fetched from a cache, the modifier will run after the `CacheSerializer`. - /// - /// Use `ImageModifier` when you need to set properties that do not persist when caching the image on a concrete - /// type of `Image`, such as the `renderingMode` or the `alignmentInsets` of `UIImage`. - case imageModifier(ImageModifier) - - /// Keep the existing image of image view while setting another image to it. - /// By setting this option, the placeholder image parameter of image view extension method - /// will be ignored and the current image will be kept while loading or downloading the new image. - case keepCurrentImageWhileLoading - - /// If set, Kingfisher will only load the first frame from an animated image file as a single image. - /// Loading an animated images may take too much memory. It will be useful when you want to display a - /// static preview of the first frame from an animated image. - /// - /// This option will be ignored if the target image is not animated image data. - case onlyLoadFirstFrame - - /// If set and an `ImageProcessor` is used, Kingfisher will try to cache both the final result and original - /// image. Kingfisher will have a chance to use the original image when another processor is applied to the same - /// resource, instead of downloading it again. You can use `.originalCache` to specify a cache or the original - /// images if necessary. - /// - /// The original image will be only cached to disk storage. - case cacheOriginalImage - - /// If set and an image retrieving error occurred Kingfisher will set provided image (or empty) - /// in place of requested one. It's useful when you don't want to show placeholder - /// during loading time but wants to use some default image when requests will be failed. - case onFailureImage(KFCrossPlatformImage?) - - /// If set and used in `ImagePrefetcher`, the prefetching operation will load the images into memory storage - /// aggressively. By default this is not contained in the options, that means if the requested image is already - /// in disk cache, Kingfisher will not try to load it to memory. - case alsoPrefetchToMemory - - /// If set, the disk storage loading will happen in the same calling queue. By default, disk storage file loading - /// happens in its own queue with an asynchronous dispatch behavior. Although it provides better non-blocking disk - /// loading performance, it also causes a flickering when you reload an image from disk, if the image view already - /// has an image set. - /// - /// Set this options will stop that flickering by keeping all loading in the same queue (typically the UI queue - /// if you are using Kingfisher's extension methods to set an image), with a tradeoff of loading performance. - case loadDiskFileSynchronously - - /// Options to control the writing of data to disk storage - /// If set, options will be passed the store operation for a new files. - case diskStoreWriteOptions(Data.WritingOptions) - - /// The expiration setting for memory cache. By default, the underlying `MemoryStorage.Backend` uses the - /// expiration in its config for all items. If set, the `MemoryStorage.Backend` will use this associated - /// value to overwrite the config setting for this caching item. - case memoryCacheExpiration(StorageExpiration) - - /// The expiration extending setting for memory cache. The item expiration time will be incremented by this - /// value after access. - /// By default, the underlying `MemoryStorage.Backend` uses the initial cache expiration as extending - /// value: .cacheTime. - /// - /// To disable extending option at all add memoryCacheAccessExtendingExpiration(.none) to options. - case memoryCacheAccessExtendingExpiration(ExpirationExtending) - - /// The expiration setting for disk cache. By default, the underlying `DiskStorage.Backend` uses the - /// expiration in its config for all items. If set, the `DiskStorage.Backend` will use this associated - /// value to overwrite the config setting for this caching item. - case diskCacheExpiration(StorageExpiration) - - /// The expiration extending setting for disk cache. The item expiration time will be incremented by this value after access. - /// By default, the underlying `DiskStorage.Backend` uses the initial cache expiration as extending value: .cacheTime. - /// To disable extending option at all add diskCacheAccessExtendingExpiration(.none) to options. - case diskCacheAccessExtendingExpiration(ExpirationExtending) - - /// Decides on which queue the image processing should happen. By default, Kingfisher uses a pre-defined serial - /// queue to process images. Use this option to change this behavior. For example, specify a `.mainCurrentOrAsync` - /// to let the image be processed in main queue to prevent a possible flickering (but with a possibility of - /// blocking the UI, especially if the processor needs a lot of time to run). - case processingQueue(CallbackQueue) - - /// Enable progressive image loading, Kingfisher will use the associated `ImageProgressive` value to process the - /// progressive JPEG data and display it in a progressive way. - case progressiveJPEG(ImageProgressive) - - /// The alternative sources will be used when the original input `Source` fails. The `Source`s in the associated - /// array will be used to start a new image loading task if the previous task fails due to an error. The image - /// source loading process will stop as soon as a source is loaded successfully. If all `[Source]`s are used but - /// the loading is still failing, an `imageSettingError` with `alternativeSourcesExhausted` as its reason will be - /// thrown out. - /// - /// This option is useful if you want to implement a fallback solution for setting image. - /// - /// User cancellation will not trigger the alternative source loading. - case alternativeSources([Source]) - - /// Provide a retry strategy which will be used when something gets wrong during the image retrieving process from - /// `KingfisherManager`. You can define a strategy by create a type conforming to the `RetryStrategy` protocol. - /// - /// - Note: - /// - /// All extension methods of Kingfisher (`kf` extensions on `UIImageView` or `UIButton`) retrieve images through - /// `KingfisherManager`, so the retry strategy also applies when using them. However, this option does not apply - /// when pass to an `ImageDownloader` or `ImageCache`. - /// - case retryStrategy(RetryStrategy) - - /// The `Source` should be loaded when user enables Low Data Mode and the original source fails with an - /// `NSURLErrorNetworkUnavailableReason.constrained` error. When this option is set, the - /// `allowsConstrainedNetworkAccess` property of the request for the original source will be set to `false` and the - /// `Source` in associated value will be used to retrieve the image for low data mode. Usually, you can provide a - /// low-resolution version of your image or a local image provider to display a placeholder. - /// - /// If not set or the `source` is `nil`, the device Low Data Mode will be ignored and the original source will - /// be loaded following the system default behavior, in a normal way. - case lowDataMode(Source?) -} - -// Improve performance by parsing the input `KingfisherOptionsInfo` (self) first. -// So we can prevent the iterating over the options array again and again. -/// The parsed options info used across Kingfisher methods. Each property in this type corresponds a case member -/// in `KingfisherOptionsInfoItem`. When a `KingfisherOptionsInfo` sent to Kingfisher related methods, it will be -/// parsed and converted to a `KingfisherParsedOptionsInfo` first, and pass through the internal methods. -public struct KingfisherParsedOptionsInfo { - - public var targetCache: ImageCache? = nil - public var originalCache: ImageCache? = nil - public var downloader: ImageDownloader? = nil - public var transition: ImageTransition = .none - public var downloadPriority: Float = URLSessionTask.defaultPriority - public var forceRefresh = false - public var fromMemoryCacheOrRefresh = false - public var forceTransition = false - public var cacheMemoryOnly = false - public var waitForCache = false - public var onlyFromCache = false - public var backgroundDecode = false - public var preloadAllAnimationData = false - public var callbackQueue: CallbackQueue = .mainCurrentOrAsync - public var scaleFactor: CGFloat = 1.0 - public var requestModifier: AsyncImageDownloadRequestModifier? = nil - public var redirectHandler: ImageDownloadRedirectHandler? = nil - public var processor: ImageProcessor = DefaultImageProcessor.default - public var imageModifier: ImageModifier? = nil - public var cacheSerializer: CacheSerializer = DefaultCacheSerializer.default - public var keepCurrentImageWhileLoading = false - public var onlyLoadFirstFrame = false - public var cacheOriginalImage = false - public var onFailureImage: Optional = .none - public var alsoPrefetchToMemory = false - public var loadDiskFileSynchronously = false - public var diskStoreWriteOptions: Data.WritingOptions = [] - public var memoryCacheExpiration: StorageExpiration? = nil - public var memoryCacheAccessExtendingExpiration: ExpirationExtending = .cacheTime - public var diskCacheExpiration: StorageExpiration? = nil - public var diskCacheAccessExtendingExpiration: ExpirationExtending = .cacheTime - public var processingQueue: CallbackQueue? = nil - public var progressiveJPEG: ImageProgressive? = nil - public var alternativeSources: [Source]? = nil - public var retryStrategy: RetryStrategy? = nil - public var lowDataModeSource: Source? = nil - - var onDataReceived: [DataReceivingSideEffect]? = nil - - public init(_ info: KingfisherOptionsInfo?) { - guard let info = info else { return } - for option in info { - switch option { - case .targetCache(let value): targetCache = value - case .originalCache(let value): originalCache = value - case .downloader(let value): downloader = value - case .transition(let value): transition = value - case .downloadPriority(let value): downloadPriority = value - case .forceRefresh: forceRefresh = true - case .fromMemoryCacheOrRefresh: fromMemoryCacheOrRefresh = true - case .forceTransition: forceTransition = true - case .cacheMemoryOnly: cacheMemoryOnly = true - case .waitForCache: waitForCache = true - case .onlyFromCache: onlyFromCache = true - case .backgroundDecode: backgroundDecode = true - case .preloadAllAnimationData: preloadAllAnimationData = true - case .callbackQueue(let value): callbackQueue = value - case .scaleFactor(let value): scaleFactor = value - case .requestModifier(let value): requestModifier = value - case .redirectHandler(let value): redirectHandler = value - case .processor(let value): processor = value - case .imageModifier(let value): imageModifier = value - case .cacheSerializer(let value): cacheSerializer = value - case .keepCurrentImageWhileLoading: keepCurrentImageWhileLoading = true - case .onlyLoadFirstFrame: onlyLoadFirstFrame = true - case .cacheOriginalImage: cacheOriginalImage = true - case .onFailureImage(let value): onFailureImage = .some(value) - case .alsoPrefetchToMemory: alsoPrefetchToMemory = true - case .loadDiskFileSynchronously: loadDiskFileSynchronously = true - case .diskStoreWriteOptions(let options): diskStoreWriteOptions = options - case .memoryCacheExpiration(let expiration): memoryCacheExpiration = expiration - case .memoryCacheAccessExtendingExpiration(let expirationExtending): memoryCacheAccessExtendingExpiration = expirationExtending - case .diskCacheExpiration(let expiration): diskCacheExpiration = expiration - case .diskCacheAccessExtendingExpiration(let expirationExtending): diskCacheAccessExtendingExpiration = expirationExtending - case .processingQueue(let queue): processingQueue = queue - case .progressiveJPEG(let value): progressiveJPEG = value - case .alternativeSources(let sources): alternativeSources = sources - case .retryStrategy(let strategy): retryStrategy = strategy - case .lowDataMode(let source): lowDataModeSource = source - } - } - - if originalCache == nil { - originalCache = targetCache - } - } -} - -extension KingfisherParsedOptionsInfo { - var imageCreatingOptions: ImageCreatingOptions { - return ImageCreatingOptions( - scale: scaleFactor, - duration: 0.0, - preloadAll: preloadAllAnimationData, - onlyFirstFrame: onlyLoadFirstFrame) - } -} - -protocol DataReceivingSideEffect: AnyObject { - var onShouldApply: () -> Bool { get set } - func onDataReceived(_ session: URLSession, task: SessionDataTask, data: Data) -} - -class ImageLoadingProgressSideEffect: DataReceivingSideEffect { - - var onShouldApply: () -> Bool = { return true } - - let block: DownloadProgressBlock - - init(_ block: @escaping DownloadProgressBlock) { - self.block = block - } - - func onDataReceived(_ session: URLSession, task: SessionDataTask, data: Data) { - guard self.onShouldApply() else { return } - guard let expectedContentLength = task.task.response?.expectedContentLength, - expectedContentLength != -1 else - { - return - } - - let dataLength = Int64(task.mutableData.count) - DispatchQueue.main.async { - self.block(dataLength, expectedContentLength) - } - } -} diff --git a/Pods/Kingfisher/Sources/Image/Filter.swift b/Pods/Kingfisher/Sources/Image/Filter.swift deleted file mode 100644 index be357ceb..00000000 --- a/Pods/Kingfisher/Sources/Image/Filter.swift +++ /dev/null @@ -1,152 +0,0 @@ -// -// Filter.swift -// Kingfisher -// -// Created by Wei Wang on 2016/08/31. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if !os(watchOS) - -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -import CoreImage - -// Reuse the same CI Context for all CI drawing. -private let ciContext = CIContext(options: nil) - -/// Represents the type of transformer method, which will be used in to provide a `Filter`. -public typealias Transformer = (CIImage) -> CIImage? - -/// Represents a processor based on a `CIImage` `Filter`. -/// It requires a filter to create an `ImageProcessor`. -public protocol CIImageProcessor: ImageProcessor { - var filter: Filter { get } -} - -extension CIImageProcessor { - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: Options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - switch item { - case .image(let image): - return image.kf.apply(filter) - case .data: - return (DefaultImageProcessor.default |> self).process(item: item, options: options) - } - } -} - -/// A wrapper struct for a `Transformer` of CIImage filters. A `Filter` -/// value could be used to create a `CIImage` processor. -public struct Filter { - - let transform: Transformer - - public init(transform: @escaping Transformer) { - self.transform = transform - } - - /// Tint filter which will apply a tint color to images. - public static var tint: (KFCrossPlatformColor) -> Filter = { - color in - Filter { - input in - - let colorFilter = CIFilter(name: "CIConstantColorGenerator")! - colorFilter.setValue(CIColor(color: color), forKey: kCIInputColorKey) - - let filter = CIFilter(name: "CISourceOverCompositing")! - - let colorImage = colorFilter.outputImage - filter.setValue(colorImage, forKey: kCIInputImageKey) - filter.setValue(input, forKey: kCIInputBackgroundImageKey) - - return filter.outputImage?.cropped(to: input.extent) - } - } - - /// Represents color control elements. It is a tuple of - /// `(brightness, contrast, saturation, inputEV)` - public typealias ColorElement = (CGFloat, CGFloat, CGFloat, CGFloat) - - /// Color control filter which will apply color control change to images. - public static var colorControl: (ColorElement) -> Filter = { arg -> Filter in - let (brightness, contrast, saturation, inputEV) = arg - return Filter { input in - let paramsColor = [kCIInputBrightnessKey: brightness, - kCIInputContrastKey: contrast, - kCIInputSaturationKey: saturation] - let blackAndWhite = input.applyingFilter("CIColorControls", parameters: paramsColor) - let paramsExposure = [kCIInputEVKey: inputEV] - return blackAndWhite.applyingFilter("CIExposureAdjust", parameters: paramsExposure) - } - } -} - -extension KingfisherWrapper where Base: KFCrossPlatformImage { - - /// Applies a `Filter` containing `CIImage` transformer to `self`. - /// - /// - Parameter filter: The filter used to transform `self`. - /// - Returns: A transformed image by input `Filter`. - /// - /// - Note: - /// Only CG-based images are supported. If any error happens - /// during transforming, `self` will be returned. - public func apply(_ filter: Filter) -> KFCrossPlatformImage { - - guard let cgImage = cgImage else { - assertionFailure("[Kingfisher] Tint image only works for CG-based image.") - return base - } - - let inputImage = CIImage(cgImage: cgImage) - guard let outputImage = filter.transform(inputImage) else { - return base - } - - guard let result = ciContext.createCGImage(outputImage, from: outputImage.extent) else { - assertionFailure("[Kingfisher] Can not make an tint image within context.") - return base - } - - #if os(macOS) - return fixedForRetinaPixel(cgImage: result, to: size) - #else - return KFCrossPlatformImage(cgImage: result, scale: base.scale, orientation: base.imageOrientation) - #endif - } - -} - -#endif diff --git a/Pods/Kingfisher/Sources/Image/GIFAnimatedImage.swift b/Pods/Kingfisher/Sources/Image/GIFAnimatedImage.swift deleted file mode 100644 index 323fe429..00000000 --- a/Pods/Kingfisher/Sources/Image/GIFAnimatedImage.swift +++ /dev/null @@ -1,177 +0,0 @@ -// -// AnimatedImage.swift -// Kingfisher -// -// Created by onevcat on 2018/09/26. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation -import ImageIO - -/// Represents a set of image creating options used in Kingfisher. -public struct ImageCreatingOptions { - - /// The target scale of image needs to be created. - public let scale: CGFloat - - /// The expected animation duration if an animated image being created. - public let duration: TimeInterval - - /// For an animated image, whether or not all frames should be loaded before displaying. - public let preloadAll: Bool - - /// For an animated image, whether or not only the first image should be - /// loaded as a static image. It is useful for preview purpose of an animated image. - public let onlyFirstFrame: Bool - - /// Creates an `ImageCreatingOptions` object. - /// - /// - Parameters: - /// - scale: The target scale of image needs to be created. Default is `1.0`. - /// - duration: The expected animation duration if an animated image being created. - /// A value less or equal to `0.0` means the animated image duration will - /// be determined by the frame data. Default is `0.0`. - /// - preloadAll: For an animated image, whether or not all frames should be loaded before displaying. - /// Default is `false`. - /// - onlyFirstFrame: For an animated image, whether or not only the first image should be - /// loaded as a static image. It is useful for preview purpose of an animated image. - /// Default is `false`. - public init( - scale: CGFloat = 1.0, - duration: TimeInterval = 0.0, - preloadAll: Bool = false, - onlyFirstFrame: Bool = false) - { - self.scale = scale - self.duration = duration - self.preloadAll = preloadAll - self.onlyFirstFrame = onlyFirstFrame - } -} - -/// Represents the decoding for a GIF image. This class extracts frames from an `imageSource`, then -/// hold the images for later use. -public class GIFAnimatedImage { - let images: [KFCrossPlatformImage] - let duration: TimeInterval - - init?(from frameSource: ImageFrameSource, options: ImageCreatingOptions) { - let frameCount = frameSource.frameCount - var images = [KFCrossPlatformImage]() - var gifDuration = 0.0 - - for i in 0 ..< frameCount { - guard let imageRef = frameSource.frame(at: i) else { - return nil - } - - if frameCount == 1 { - gifDuration = .infinity - } else { - // Get current animated GIF frame duration - gifDuration += frameSource.duration(at: i) - } - images.append(KingfisherWrapper.image(cgImage: imageRef, scale: options.scale, refImage: nil)) - if options.onlyFirstFrame { break } - } - self.images = images - self.duration = gifDuration - } - - convenience init?(from imageSource: CGImageSource, for info: [String: Any], options: ImageCreatingOptions) { - let frameSource = CGImageFrameSource(data: nil, imageSource: imageSource, options: info) - self.init(from: frameSource, options: options) - } - - /// Calculates frame duration for a gif frame out of the kCGImagePropertyGIFDictionary dictionary. - public static func getFrameDuration(from gifInfo: [String: Any]?) -> TimeInterval { - let defaultFrameDuration = 0.1 - guard let gifInfo = gifInfo else { return defaultFrameDuration } - - let unclampedDelayTime = gifInfo[kCGImagePropertyGIFUnclampedDelayTime as String] as? NSNumber - let delayTime = gifInfo[kCGImagePropertyGIFDelayTime as String] as? NSNumber - let duration = unclampedDelayTime ?? delayTime - - guard let frameDuration = duration else { return defaultFrameDuration } - return frameDuration.doubleValue > 0.011 ? frameDuration.doubleValue : defaultFrameDuration - } - - /// Calculates frame duration at a specific index for a gif from an `imageSource`. - public static func getFrameDuration(from imageSource: CGImageSource, at index: Int) -> TimeInterval { - guard let properties = CGImageSourceCopyPropertiesAtIndex(imageSource, index, nil) - as? [String: Any] else { return 0.0 } - - let gifInfo = properties[kCGImagePropertyGIFDictionary as String] as? [String: Any] - return getFrameDuration(from: gifInfo) - } -} - -/// Represents a frame source for animated image -public protocol ImageFrameSource { - /// Source data associated with this frame source. - var data: Data? { get } - - /// Count of total frames in this frame source. - var frameCount: Int { get } - - /// Retrieves the frame at a specific index. The result image is expected to be - /// no larger than `maxSize`. If the index is invalid, implementors should return `nil`. - func frame(at index: Int, maxSize: CGSize?) -> CGImage? - - /// Retrieves the duration at a specific index. If the index is invalid, implementors should return `0.0`. - func duration(at index: Int) -> TimeInterval -} - -public extension ImageFrameSource { - /// Retrieves the frame at a specific index. If the index is invalid, implementors should return `nil`. - func frame(at index: Int) -> CGImage? { - return frame(at: index, maxSize: nil) - } -} - -struct CGImageFrameSource: ImageFrameSource { - let data: Data? - let imageSource: CGImageSource - let options: [String: Any]? - - var frameCount: Int { - return CGImageSourceGetCount(imageSource) - } - - func frame(at index: Int, maxSize: CGSize?) -> CGImage? { - var options = self.options as? [CFString: Any] - if let maxSize = maxSize, maxSize != .zero { - options = (options ?? [:]).merging([ - kCGImageSourceCreateThumbnailFromImageIfAbsent: true, - kCGImageSourceCreateThumbnailWithTransform: true, - kCGImageSourceShouldCacheImmediately: true, - kCGImageSourceThumbnailMaxPixelSize: max(maxSize.width, maxSize.height) - ], uniquingKeysWith: { $1 }) - } - return CGImageSourceCreateImageAtIndex(imageSource, index, options as CFDictionary?) - } - - func duration(at index: Int) -> TimeInterval { - return GIFAnimatedImage.getFrameDuration(from: imageSource, at: index) - } -} - diff --git a/Pods/Kingfisher/Sources/Image/GraphicsContext.swift b/Pods/Kingfisher/Sources/Image/GraphicsContext.swift deleted file mode 100644 index 6d8443c6..00000000 --- a/Pods/Kingfisher/Sources/Image/GraphicsContext.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// GraphicsContext.swift -// Kingfisher -// -// Created by taras on 19/04/2021. -// -// Copyright (c) 2021 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if canImport(AppKit) && !targetEnvironment(macCatalyst) -import AppKit -#endif -#if canImport(UIKit) -import UIKit -#endif - -enum GraphicsContext { - static func begin(size: CGSize, scale: CGFloat) { - #if os(macOS) - NSGraphicsContext.saveGraphicsState() - #else - UIGraphicsBeginImageContextWithOptions(size, false, scale) - #endif - } - - static func current(size: CGSize, scale: CGFloat, inverting: Bool, cgImage: CGImage?) -> CGContext? { - #if os(macOS) - guard let rep = NSBitmapImageRep( - bitmapDataPlanes: nil, - pixelsWide: Int(size.width), - pixelsHigh: Int(size.height), - bitsPerSample: cgImage?.bitsPerComponent ?? 8, - samplesPerPixel: 4, - hasAlpha: true, - isPlanar: false, - colorSpaceName: .calibratedRGB, - bytesPerRow: 0, - bitsPerPixel: 0) else - { - assertionFailure("[Kingfisher] Image representation cannot be created.") - return nil - } - rep.size = size - guard let context = NSGraphicsContext(bitmapImageRep: rep) else { - assertionFailure("[Kingfisher] Image context cannot be created.") - return nil - } - - NSGraphicsContext.current = context - return context.cgContext - #else - guard let context = UIGraphicsGetCurrentContext() else { - return nil - } - if inverting { // If drawing a CGImage, we need to make context flipped. - context.scaleBy(x: 1.0, y: -1.0) - context.translateBy(x: 0, y: -size.height) - } - return context - #endif - } - - static func end() { - #if os(macOS) - NSGraphicsContext.restoreGraphicsState() - #else - UIGraphicsEndImageContext() - #endif - } -} - diff --git a/Pods/Kingfisher/Sources/Image/Image.swift b/Pods/Kingfisher/Sources/Image/Image.swift deleted file mode 100644 index 5f9f2395..00000000 --- a/Pods/Kingfisher/Sources/Image/Image.swift +++ /dev/null @@ -1,426 +0,0 @@ -// -// Image.swift -// Kingfisher -// -// Created by Wei Wang on 16/1/6. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - - -#if os(macOS) -import AppKit -private var imagesKey: Void? -private var durationKey: Void? -#else -import UIKit -import MobileCoreServices -private var imageSourceKey: Void? -#endif - -#if !os(watchOS) -import CoreImage -#endif - -import CoreGraphics -import ImageIO - -#if canImport(UniformTypeIdentifiers) -import UniformTypeIdentifiers -#endif - -private var animatedImageDataKey: Void? -private var imageFrameCountKey: Void? - -// MARK: - Image Properties -extension KingfisherWrapper where Base: KFCrossPlatformImage { - private(set) var animatedImageData: Data? { - get { return getAssociatedObject(base, &animatedImageDataKey) } - set { setRetainedAssociatedObject(base, &animatedImageDataKey, newValue) } - } - - public var imageFrameCount: Int? { - get { return getAssociatedObject(base, &imageFrameCountKey) } - set { setRetainedAssociatedObject(base, &imageFrameCountKey, newValue) } - } - - #if os(macOS) - var cgImage: CGImage? { - return base.cgImage(forProposedRect: nil, context: nil, hints: nil) - } - - var scale: CGFloat { - return 1.0 - } - - private(set) var images: [KFCrossPlatformImage]? { - get { return getAssociatedObject(base, &imagesKey) } - set { setRetainedAssociatedObject(base, &imagesKey, newValue) } - } - - private(set) var duration: TimeInterval { - get { return getAssociatedObject(base, &durationKey) ?? 0.0 } - set { setRetainedAssociatedObject(base, &durationKey, newValue) } - } - - var size: CGSize { - return base.representations.reduce(.zero) { size, rep in - let width = max(size.width, CGFloat(rep.pixelsWide)) - let height = max(size.height, CGFloat(rep.pixelsHigh)) - return CGSize(width: width, height: height) - } - } - #else - var cgImage: CGImage? { return base.cgImage } - var scale: CGFloat { return base.scale } - var images: [KFCrossPlatformImage]? { return base.images } - var duration: TimeInterval { return base.duration } - var size: CGSize { return base.size } - - /// The image source reference of current image. - public var imageSource: CGImageSource? { - get { - guard let frameSource = frameSource as? CGImageFrameSource else { return nil } - return frameSource.imageSource - } - } - - /// The custom frame source of current image. - public private(set) var frameSource: ImageFrameSource? { - get { return getAssociatedObject(base, &imageSourceKey) } - set { setRetainedAssociatedObject(base, &imageSourceKey, newValue) } - } - #endif - - // Bitmap memory cost with bytes. - var cost: Int { - let pixel = Int(size.width * size.height * scale * scale) - guard let cgImage = cgImage else { - return pixel * 4 - } - let bytesPerPixel = cgImage.bitsPerPixel / 8 - guard let imageCount = images?.count else { - return pixel * bytesPerPixel - } - return pixel * bytesPerPixel * imageCount - } -} - -// MARK: - Image Conversion -extension KingfisherWrapper where Base: KFCrossPlatformImage { - #if os(macOS) - static func image(cgImage: CGImage, scale: CGFloat, refImage: KFCrossPlatformImage?) -> KFCrossPlatformImage { - return KFCrossPlatformImage(cgImage: cgImage, size: .zero) - } - - /// Normalize the image. This getter does nothing on macOS but return the image itself. - public var normalized: KFCrossPlatformImage { return base } - - #else - /// Creating an image from a give `CGImage` at scale and orientation for refImage. The method signature is for - /// compatibility of macOS version. - static func image(cgImage: CGImage, scale: CGFloat, refImage: KFCrossPlatformImage?) -> KFCrossPlatformImage { - return KFCrossPlatformImage(cgImage: cgImage, scale: scale, orientation: refImage?.imageOrientation ?? .up) - } - - /// Returns normalized image for current `base` image. - /// This method will try to redraw an image with orientation and scale considered. - public var normalized: KFCrossPlatformImage { - // prevent animated image (GIF) lose it's images - guard images == nil else { return base.copy() as! KFCrossPlatformImage } - // No need to do anything if already up - guard base.imageOrientation != .up else { return base.copy() as! KFCrossPlatformImage } - - return draw(to: size, inverting: true, refImage: KFCrossPlatformImage()) { - fixOrientation(in: $0) - return true - } - } - - func fixOrientation(in context: CGContext) { - - var transform = CGAffineTransform.identity - - let orientation = base.imageOrientation - - switch orientation { - case .down, .downMirrored: - transform = transform.translatedBy(x: size.width, y: size.height) - transform = transform.rotated(by: .pi) - case .left, .leftMirrored: - transform = transform.translatedBy(x: size.width, y: 0) - transform = transform.rotated(by: .pi / 2.0) - case .right, .rightMirrored: - transform = transform.translatedBy(x: 0, y: size.height) - transform = transform.rotated(by: .pi / -2.0) - case .up, .upMirrored: - break - #if compiler(>=5) - @unknown default: - break - #endif - } - - //Flip image one more time if needed to, this is to prevent flipped image - switch orientation { - case .upMirrored, .downMirrored: - transform = transform.translatedBy(x: size.width, y: 0) - transform = transform.scaledBy(x: -1, y: 1) - case .leftMirrored, .rightMirrored: - transform = transform.translatedBy(x: size.height, y: 0) - transform = transform.scaledBy(x: -1, y: 1) - case .up, .down, .left, .right: - break - #if compiler(>=5) - @unknown default: - break - #endif - } - - context.concatenate(transform) - switch orientation { - case .left, .leftMirrored, .right, .rightMirrored: - context.draw(cgImage!, in: CGRect(x: 0, y: 0, width: size.height, height: size.width)) - default: - context.draw(cgImage!, in: CGRect(x: 0, y: 0, width: size.width, height: size.height)) - } - } - #endif -} - -// MARK: - Image Representation -extension KingfisherWrapper where Base: KFCrossPlatformImage { - /// Returns PNG representation of `base` image. - /// - /// - Returns: PNG data of image. - public func pngRepresentation() -> Data? { - #if os(macOS) - guard let cgImage = cgImage else { - return nil - } - let rep = NSBitmapImageRep(cgImage: cgImage) - return rep.representation(using: .png, properties: [:]) - #else - return base.pngData() - #endif - } - - /// Returns JPEG representation of `base` image. - /// - /// - Parameter compressionQuality: The compression quality when converting image to JPEG data. - /// - Returns: JPEG data of image. - public func jpegRepresentation(compressionQuality: CGFloat) -> Data? { - #if os(macOS) - guard let cgImage = cgImage else { - return nil - } - let rep = NSBitmapImageRep(cgImage: cgImage) - return rep.representation(using:.jpeg, properties: [.compressionFactor: compressionQuality]) - #else - return base.jpegData(compressionQuality: compressionQuality) - #endif - } - - /// Returns GIF representation of `base` image. - /// - /// - Returns: Original GIF data of image. - public func gifRepresentation() -> Data? { - return animatedImageData - } - - /// Returns a data representation for `base` image, with the `format` as the format indicator. - /// - Parameters: - /// - format: The format in which the output data should be. If `unknown`, the `base` image will be - /// converted in the PNG representation. - /// - compressionQuality: The compression quality when converting image to a lossy format data. - /// - /// - Returns: The output data representing. - public func data(format: ImageFormat, compressionQuality: CGFloat = 1.0) -> Data? { - return autoreleasepool { () -> Data? in - let data: Data? - switch format { - case .PNG: data = pngRepresentation() - case .JPEG: data = jpegRepresentation(compressionQuality: compressionQuality) - case .GIF: data = gifRepresentation() - case .unknown: data = normalized.kf.pngRepresentation() - } - - return data - } - } -} - -// MARK: - Creating Images -extension KingfisherWrapper where Base: KFCrossPlatformImage { - - /// Creates an animated image from a given data and options. Currently only GIF data is supported. - /// - /// - Parameters: - /// - data: The animated image data. - /// - options: Options to use when creating the animated image. - /// - Returns: An `Image` object represents the animated image. It is in form of an array of image frames with a - /// certain duration. `nil` if anything wrong when creating animated image. - public static func animatedImage(data: Data, options: ImageCreatingOptions) -> KFCrossPlatformImage? { - #if os(visionOS) - let info: [String: Any] = [ - kCGImageSourceShouldCache as String: true, - kCGImageSourceTypeIdentifierHint as String: UTType.gif.identifier - ] - #else - let info: [String: Any] = [ - kCGImageSourceShouldCache as String: true, - kCGImageSourceTypeIdentifierHint as String: kUTTypeGIF - ] - #endif - - guard let imageSource = CGImageSourceCreateWithData(data as CFData, info as CFDictionary) else { - return nil - } - let frameSource = CGImageFrameSource(data: data, imageSource: imageSource, options: info) - #if os(macOS) - let baseImage = KFCrossPlatformImage(data: data) - #else - let baseImage = KFCrossPlatformImage(data: data, scale: options.scale) - #endif - return animatedImage(source: frameSource, options: options, baseImage: baseImage) - } - - /// Creates an animated image from a given frame source. - /// - /// - Parameters: - /// - source: The frame source to create animated image from. - /// - options: Options to use when creating the animated image. - /// - baseImage: An optional image object to be used as the key frame of the animated image. If `nil`, the first - /// frame of the `source` will be used. - /// - Returns: An `Image` object represents the animated image. It is in form of an array of image frames with a - /// certain duration. `nil` if anything wrong when creating animated image. - public static func animatedImage(source: ImageFrameSource, options: ImageCreatingOptions, baseImage: KFCrossPlatformImage? = nil) -> KFCrossPlatformImage? { - #if os(macOS) - guard let animatedImage = GIFAnimatedImage(from: source, options: options) else { - return nil - } - var image: KFCrossPlatformImage? - if options.onlyFirstFrame { - image = animatedImage.images.first - } else { - if let baseImage = baseImage { - image = baseImage - } else { - image = animatedImage.images.first - } - var kf = image?.kf - kf?.images = animatedImage.images - kf?.duration = animatedImage.duration - } - image?.kf.animatedImageData = source.data - image?.kf.imageFrameCount = source.frameCount - return image - #else - - var image: KFCrossPlatformImage? - if options.preloadAll || options.onlyFirstFrame { - // Use `images` image if you want to preload all animated data - guard let animatedImage = GIFAnimatedImage(from: source, options: options) else { - return nil - } - if options.onlyFirstFrame { - image = animatedImage.images.first - } else { - let duration = options.duration <= 0.0 ? animatedImage.duration : options.duration - image = .animatedImage(with: animatedImage.images, duration: duration) - } - image?.kf.animatedImageData = source.data - } else { - if let baseImage = baseImage { - image = baseImage - } else { - guard let firstFrame = source.frame(at: 0) else { - return nil - } - image = KFCrossPlatformImage(cgImage: firstFrame, scale: options.scale, orientation: .up) - } - var kf = image?.kf - kf?.frameSource = source - kf?.animatedImageData = source.data - } - - image?.kf.imageFrameCount = source.frameCount - return image - #endif - } - - /// Creates an image from a given data and options. `.JPEG`, `.PNG` or `.GIF` is supported. For other - /// image format, image initializer from system will be used. If no image object could be created from - /// the given `data`, `nil` will be returned. - /// - /// - Parameters: - /// - data: The image data representation. - /// - options: Options to use when creating the image. - /// - Returns: An `Image` object represents the image if created. If the `data` is invalid or not supported, `nil` - /// will be returned. - public static func image(data: Data, options: ImageCreatingOptions) -> KFCrossPlatformImage? { - var image: KFCrossPlatformImage? - switch data.kf.imageFormat { - case .JPEG: - image = KFCrossPlatformImage(data: data, scale: options.scale) - case .PNG: - image = KFCrossPlatformImage(data: data, scale: options.scale) - case .GIF: - image = KingfisherWrapper.animatedImage(data: data, options: options) - case .unknown: - image = KFCrossPlatformImage(data: data, scale: options.scale) - } - return image - } - - /// Creates a downsampled image from given data to a certain size and scale. - /// - /// - Parameters: - /// - data: The image data contains a JPEG or PNG image. - /// - pointSize: The target size in point to which the image should be downsampled. - /// - scale: The scale of result image. - /// - Returns: A downsampled `Image` object following the input conditions. - /// - /// - Note: - /// Different from image `resize` methods, downsampling will not render the original - /// input image in pixel format. It does downsampling from the image data, so it is much - /// more memory efficient and friendly. Choose to use downsampling as possible as you can. - /// - /// The pointsize should be smaller than the size of input image. If it is larger than the - /// original image size, the result image will be the same size of input without downsampling. - public static func downsampledImage(data: Data, to pointSize: CGSize, scale: CGFloat) -> KFCrossPlatformImage? { - let imageSourceOptions = [kCGImageSourceShouldCache: false] as CFDictionary - guard let imageSource = CGImageSourceCreateWithData(data as CFData, imageSourceOptions) else { - return nil - } - - let maxDimensionInPixels = max(pointSize.width, pointSize.height) * scale - let downsampleOptions: [CFString : Any] = [ - kCGImageSourceCreateThumbnailFromImageAlways: true, - kCGImageSourceShouldCacheImmediately: true, - kCGImageSourceCreateThumbnailWithTransform: true, - kCGImageSourceThumbnailMaxPixelSize: maxDimensionInPixels - ] - guard let downsampledImage = CGImageSourceCreateThumbnailAtIndex(imageSource, 0, downsampleOptions as CFDictionary) else { - return nil - } - return KingfisherWrapper.image(cgImage: downsampledImage, scale: scale, refImage: nil) - } -} diff --git a/Pods/Kingfisher/Sources/Image/ImageDrawing.swift b/Pods/Kingfisher/Sources/Image/ImageDrawing.swift deleted file mode 100644 index 9fc1af6f..00000000 --- a/Pods/Kingfisher/Sources/Image/ImageDrawing.swift +++ /dev/null @@ -1,636 +0,0 @@ -// -// ImageDrawing.swift -// Kingfisher -// -// Created by onevcat on 2018/09/28. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Accelerate - -#if canImport(AppKit) && !targetEnvironment(macCatalyst) -import AppKit -#endif -#if canImport(UIKit) -import UIKit -#endif - -// MARK: - Image Transforming -extension KingfisherWrapper where Base: KFCrossPlatformImage { - // MARK: Blend Mode - /// Create image from `base` image and apply blend mode. - /// - /// - parameter blendMode: The blend mode of creating image. - /// - parameter alpha: The alpha should be used for image. - /// - parameter backgroundColor: The background color for the output image. - /// - /// - returns: An image with blend mode applied. - /// - /// - Note: This method only works for CG-based image. - #if !os(macOS) - public func image(withBlendMode blendMode: CGBlendMode, - alpha: CGFloat = 1.0, - backgroundColor: KFCrossPlatformColor? = nil) -> KFCrossPlatformImage - { - guard let _ = cgImage else { - assertionFailure("[Kingfisher] Blend mode image only works for CG-based image.") - return base - } - - let rect = CGRect(origin: .zero, size: size) - return draw(to: rect.size, inverting: false) { _ in - if let backgroundColor = backgroundColor { - backgroundColor.setFill() - UIRectFill(rect) - } - - base.draw(in: rect, blendMode: blendMode, alpha: alpha) - return false - } - } - #endif - - #if os(macOS) - // MARK: Compositing - /// Creates image from `base` image and apply compositing operation. - /// - /// - Parameters: - /// - compositingOperation: The compositing operation of creating image. - /// - alpha: The alpha should be used for image. - /// - backgroundColor: The background color for the output image. - /// - Returns: An image with compositing operation applied. - /// - /// - Note: This method only works for CG-based image. For any non-CG-based image, `base` itself is returned. - public func image(withCompositingOperation compositingOperation: NSCompositingOperation, - alpha: CGFloat = 1.0, - backgroundColor: KFCrossPlatformColor? = nil) -> KFCrossPlatformImage - { - guard let _ = cgImage else { - assertionFailure("[Kingfisher] Compositing Operation image only works for CG-based image.") - return base - } - - let rect = CGRect(origin: .zero, size: size) - return draw(to: rect.size, inverting: false) { _ in - if let backgroundColor = backgroundColor { - backgroundColor.setFill() - rect.fill() - } - base.draw(in: rect, from: .zero, operation: compositingOperation, fraction: alpha) - return false - } - } - #endif - - // MARK: Round Corner - - /// Creates a round corner image from on `base` image. - /// - /// - Parameters: - /// - radius: The round corner radius of creating image. - /// - size: The target size of creating image. - /// - corners: The target corners which will be applied rounding. - /// - backgroundColor: The background color for the output image - /// - Returns: An image with round corner of `self`. - /// - /// - Note: This method only works for CG-based image. The current image scale is kept. - /// For any non-CG-based image, `base` itself is returned. - public func image( - withRadius radius: Radius, - fit size: CGSize, - roundingCorners corners: RectCorner = .all, - backgroundColor: KFCrossPlatformColor? = nil - ) -> KFCrossPlatformImage - { - - guard let _ = cgImage else { - assertionFailure("[Kingfisher] Round corner image only works for CG-based image.") - return base - } - - let rect = CGRect(origin: CGPoint(x: 0, y: 0), size: size) - return draw(to: size, inverting: false) { _ in - #if os(macOS) - if let backgroundColor = backgroundColor { - let rectPath = NSBezierPath(rect: rect) - backgroundColor.setFill() - rectPath.fill() - } - - let path = pathForRoundCorner(rect: rect, radius: radius, corners: corners) - path.addClip() - base.draw(in: rect) - #else - guard let context = UIGraphicsGetCurrentContext() else { - assertionFailure("[Kingfisher] Failed to create CG context for image.") - return false - } - - if let backgroundColor = backgroundColor { - let rectPath = UIBezierPath(rect: rect) - backgroundColor.setFill() - rectPath.fill() - } - - let path = pathForRoundCorner(rect: rect, radius: radius, corners: corners) - context.addPath(path.cgPath) - context.clip() - base.draw(in: rect) - #endif - return false - } - } - - /// Creates a round corner image from on `base` image. - /// - /// - Parameters: - /// - radius: The round corner radius of creating image. - /// - size: The target size of creating image. - /// - corners: The target corners which will be applied rounding. - /// - backgroundColor: The background color for the output image - /// - Returns: An image with round corner of `self`. - /// - /// - Note: This method only works for CG-based image. The current image scale is kept. - /// For any non-CG-based image, `base` itself is returned. - public func image( - withRoundRadius radius: CGFloat, - fit size: CGSize, - roundingCorners corners: RectCorner = .all, - backgroundColor: KFCrossPlatformColor? = nil - ) -> KFCrossPlatformImage - { - image(withRadius: .point(radius), fit: size, roundingCorners: corners, backgroundColor: backgroundColor) - } - - #if os(macOS) - func pathForRoundCorner(rect: CGRect, radius: Radius, corners: RectCorner, offsetBase: CGFloat = 0) -> NSBezierPath { - let cornerRadius = radius.compute(with: rect.size) - let path = NSBezierPath(roundedRect: rect, byRoundingCorners: corners, radius: cornerRadius - offsetBase / 2) - path.windingRule = .evenOdd - return path - } - #else - func pathForRoundCorner(rect: CGRect, radius: Radius, corners: RectCorner, offsetBase: CGFloat = 0) -> UIBezierPath { - let cornerRadius = radius.compute(with: rect.size) - return UIBezierPath( - roundedRect: rect, - byRoundingCorners: corners.uiRectCorner, - cornerRadii: CGSize( - width: cornerRadius - offsetBase / 2, - height: cornerRadius - offsetBase / 2 - ) - ) - } - #endif - - #if os(iOS) || os(tvOS) || os(visionOS) - func resize(to size: CGSize, for contentMode: UIView.ContentMode) -> KFCrossPlatformImage { - switch contentMode { - case .scaleAspectFit: - return resize(to: size, for: .aspectFit) - case .scaleAspectFill: - return resize(to: size, for: .aspectFill) - default: - return resize(to: size) - } - } - #endif - - // MARK: Resizing - /// Resizes `base` image to an image with new size. - /// - /// - Parameter size: The target size in point. - /// - Returns: An image with new size. - /// - Note: This method only works for CG-based image. The current image scale is kept. - /// For any non-CG-based image, `base` itself is returned. - public func resize(to size: CGSize) -> KFCrossPlatformImage { - guard let _ = cgImage else { - assertionFailure("[Kingfisher] Resize only works for CG-based image.") - return base - } - - let rect = CGRect(origin: CGPoint(x: 0, y: 0), size: size) - return draw(to: size, inverting: false) { _ in - #if os(macOS) - base.draw(in: rect, from: .zero, operation: .copy, fraction: 1.0) - #else - base.draw(in: rect) - #endif - return false - } - } - - /// Resizes `base` image to an image of new size, respecting the given content mode. - /// - /// - Parameters: - /// - targetSize: The target size in point. - /// - contentMode: Content mode of output image should be. - /// - Returns: An image with new size. - /// - /// - Note: This method only works for CG-based image. The current image scale is kept. - /// For any non-CG-based image, `base` itself is returned. - public func resize(to targetSize: CGSize, for contentMode: ContentMode) -> KFCrossPlatformImage { - let newSize = size.kf.resize(to: targetSize, for: contentMode) - return resize(to: newSize) - } - - // MARK: Cropping - /// Crops `base` image to a new size with a given anchor. - /// - /// - Parameters: - /// - size: The target size. - /// - anchor: The anchor point from which the size should be calculated. - /// - Returns: An image with new size. - /// - /// - Note: This method only works for CG-based image. The current image scale is kept. - /// For any non-CG-based image, `base` itself is returned. - public func crop(to size: CGSize, anchorOn anchor: CGPoint) -> KFCrossPlatformImage { - guard let cgImage = cgImage else { - assertionFailure("[Kingfisher] Crop only works for CG-based image.") - return base - } - - let rect = self.size.kf.constrainedRect(for: size, anchor: anchor) - guard let image = cgImage.cropping(to: rect.scaled(scale)) else { - assertionFailure("[Kingfisher] Cropping image failed.") - return base - } - - return KingfisherWrapper.image(cgImage: image, scale: scale, refImage: base) - } - - // MARK: Blur - /// Creates an image with blur effect based on `base` image. - /// - /// - Parameter radius: The blur radius should be used when creating blur effect. - /// - Returns: An image with blur effect applied. - /// - /// - Note: This method only works for CG-based image. The current image scale is kept. - /// For any non-CG-based image, `base` itself is returned. - public func blurred(withRadius radius: CGFloat) -> KFCrossPlatformImage { - - guard let cgImage = cgImage else { - assertionFailure("[Kingfisher] Blur only works for CG-based image.") - return base - } - - // http://www.w3.org/TR/SVG/filters.html#feGaussianBlurElement - // let d = floor(s * 3*sqrt(2*pi)/4 + 0.5) - // if d is odd, use three box-blurs of size 'd', centered on the output pixel. - let s = max(radius, 2.0) - // We will do blur on a resized image (*0.5), so the blur radius could be half as well. - - // Fix the slow compiling time for Swift 3. - // See https://github.com/onevcat/Kingfisher/issues/611 - let pi2 = 2 * CGFloat.pi - let sqrtPi2 = sqrt(pi2) - var targetRadius = floor(s * 3.0 * sqrtPi2 / 4.0 + 0.5) - - if targetRadius.isEven { targetRadius += 1 } - - // Determine necessary iteration count by blur radius. - let iterations: Int - if radius < 0.5 { - iterations = 1 - } else if radius < 1.5 { - iterations = 2 - } else { - iterations = 3 - } - - let w = Int(size.width) - let h = Int(size.height) - - func createEffectBuffer(_ context: CGContext) -> vImage_Buffer { - let data = context.data - let width = vImagePixelCount(context.width) - let height = vImagePixelCount(context.height) - let rowBytes = context.bytesPerRow - - return vImage_Buffer(data: data, height: height, width: width, rowBytes: rowBytes) - } - GraphicsContext.begin(size: size, scale: scale) - guard let context = GraphicsContext.current(size: size, scale: scale, inverting: true, cgImage: cgImage) else { - assertionFailure("[Kingfisher] Failed to create CG context for blurring image.") - return base - } - context.draw(cgImage, in: CGRect(x: 0, y: 0, width: w, height: h)) - GraphicsContext.end() - - var inBuffer = createEffectBuffer(context) - - GraphicsContext.begin(size: size, scale: scale) - guard let outContext = GraphicsContext.current(size: size, scale: scale, inverting: true, cgImage: cgImage) else { - assertionFailure("[Kingfisher] Failed to create CG context for blurring image.") - return base - } - defer { GraphicsContext.end() } - var outBuffer = createEffectBuffer(outContext) - - for _ in 0 ..< iterations { - let flag = vImage_Flags(kvImageEdgeExtend) - vImageBoxConvolve_ARGB8888( - &inBuffer, &outBuffer, nil, 0, 0, UInt32(targetRadius), UInt32(targetRadius), nil, flag) - // Next inBuffer should be the outButter of current iteration - (inBuffer, outBuffer) = (outBuffer, inBuffer) - } - - #if os(macOS) - let result = outContext.makeImage().flatMap { - fixedForRetinaPixel(cgImage: $0, to: size) - } - #else - let result = outContext.makeImage().flatMap { - KFCrossPlatformImage(cgImage: $0, scale: base.scale, orientation: base.imageOrientation) - } - #endif - guard let blurredImage = result else { - assertionFailure("[Kingfisher] Can not make an blurred image within this context.") - return base - } - - return blurredImage - } - - public func addingBorder(_ border: Border) -> KFCrossPlatformImage - { - guard let _ = cgImage else { - assertionFailure("[Kingfisher] Blend mode image only works for CG-based image.") - return base - } - - let rect = CGRect(origin: .zero, size: size) - return draw(to: rect.size, inverting: false) { context in - - #if os(macOS) - base.draw(in: rect) - #else - base.draw(in: rect, blendMode: .normal, alpha: 1.0) - #endif - - - let strokeRect = rect.insetBy(dx: border.lineWidth / 2, dy: border.lineWidth / 2) - context.setStrokeColor(border.color.cgColor) - context.setAlpha(border.color.rgba.a) - - let line = pathForRoundCorner( - rect: strokeRect, - radius: border.radius, - corners: border.roundingCorners, - offsetBase: border.lineWidth - ) - line.lineCapStyle = .square - line.lineWidth = border.lineWidth - line.stroke() - - return false - } - } - - // MARK: Overlay - /// Creates an image from `base` image with a color overlay layer. - /// - /// - Parameters: - /// - color: The color should be use to overlay. - /// - fraction: Fraction of input color. From 0.0 to 1.0. 0.0 means solid color, - /// 1.0 means transparent overlay. - /// - Returns: An image with a color overlay applied. - /// - /// - Note: This method only works for CG-based image. The current image scale is kept. - /// For any non-CG-based image, `base` itself is returned. - public func overlaying(with color: KFCrossPlatformColor, fraction: CGFloat) -> KFCrossPlatformImage { - - guard let _ = cgImage else { - assertionFailure("[Kingfisher] Overlaying only works for CG-based image.") - return base - } - - let rect = CGRect(x: 0, y: 0, width: size.width, height: size.height) - return draw(to: rect.size, inverting: false) { context in - #if os(macOS) - base.draw(in: rect) - if fraction > 0 { - color.withAlphaComponent(1 - fraction).set() - rect.fill(using: .sourceAtop) - } - #else - color.set() - UIRectFill(rect) - base.draw(in: rect, blendMode: .destinationIn, alpha: 1.0) - - if fraction > 0 { - base.draw(in: rect, blendMode: .sourceAtop, alpha: fraction) - } - #endif - return false - } - } - - // MARK: Tint - /// Creates an image from `base` image with a color tint. - /// - /// - Parameter color: The color should be used to tint `base` - /// - Returns: An image with a color tint applied. - public func tinted(with color: KFCrossPlatformColor) -> KFCrossPlatformImage { - #if os(watchOS) - return base - #else - return apply(.tint(color)) - #endif - } - - // MARK: Color Control - - /// Create an image from `self` with color control. - /// - /// - Parameters: - /// - brightness: Brightness changing to image. - /// - contrast: Contrast changing to image. - /// - saturation: Saturation changing to image. - /// - inputEV: InputEV changing to image. - /// - Returns: An image with color control applied. - public func adjusted(brightness: CGFloat, contrast: CGFloat, saturation: CGFloat, inputEV: CGFloat) -> KFCrossPlatformImage { - #if os(watchOS) - return base - #else - return apply(.colorControl((brightness, contrast, saturation, inputEV))) - #endif - } - - /// Return an image with given scale. - /// - /// - Parameter scale: Target scale factor the new image should have. - /// - Returns: The image with target scale. If the base image is already in the scale, `base` will be returned. - public func scaled(to scale: CGFloat) -> KFCrossPlatformImage { - guard scale != self.scale else { - return base - } - guard let cgImage = cgImage else { - assertionFailure("[Kingfisher] Scaling only works for CG-based image.") - return base - } - return KingfisherWrapper.image(cgImage: cgImage, scale: scale, refImage: base) - } -} - -// MARK: - Decoding Image -extension KingfisherWrapper where Base: KFCrossPlatformImage { - - /// Returns the decoded image of the `base` image. It will draw the image in a plain context and return the data - /// from it. This could improve the drawing performance when an image is just created from data but not yet - /// displayed for the first time. - /// - /// - Note: This method only works for CG-based image. The current image scale is kept. - /// For any non-CG-based image or animated image, `base` itself is returned. - public var decoded: KFCrossPlatformImage { return decoded(scale: scale) } - - /// Returns decoded image of the `base` image at a given scale. It will draw the image in a plain context and - /// return the data from it. This could improve the drawing performance when an image is just created from - /// data but not yet displayed for the first time. - /// - /// - Parameter scale: The given scale of target image should be. - /// - Returns: The decoded image ready to be displayed. - /// - /// - Note: This method only works for CG-based image. The current image scale is kept. - /// For any non-CG-based image or animated image, `base` itself is returned. - public func decoded(scale: CGFloat) -> KFCrossPlatformImage { - // Prevent animated image (GIF) losing it's images - #if os(iOS) || os(visionOS) - if frameSource != nil { return base } - #else - if images != nil { return base } - #endif - - guard let imageRef = cgImage else { - assertionFailure("[Kingfisher] Decoding only works for CG-based image.") - return base - } - - let size = CGSize(width: CGFloat(imageRef.width) / scale, height: CGFloat(imageRef.height) / scale) - return draw(to: size, inverting: true, scale: scale) { context in - context.draw(imageRef, in: CGRect(origin: .zero, size: size)) - return true - } - } - - /// Returns decoded image of the `base` image at a given scale. It will draw the image in a plain context and - /// return the data from it. This could improve the drawing performance when an image is just created from - /// data but not yet displayed for the first time. - /// - /// - Parameter context: The context for drawing. - /// - Returns: The decoded image ready to be displayed. - /// - /// - Note: This method only works for CG-based image. The current image scale is kept. - /// For any non-CG-based image or animated image, `base` itself is returned. - public func decoded(on context: CGContext) -> KFCrossPlatformImage { - // Prevent animated image (GIF) losing it's images - #if os(iOS) || os(visionOS) - if frameSource != nil { return base } - #else - if images != nil { return base } - #endif - - guard let refImage = cgImage, - let decodedRefImage = refImage.decoded(on: context, scale: scale) else - { - assertionFailure("[Kingfisher] Decoding only works for CG-based image.") - return base - } - return KingfisherWrapper.image(cgImage: decodedRefImage, scale: scale, refImage: base) - } -} - -extension CGImage { - func decoded(on context: CGContext, scale: CGFloat) -> CGImage? { - let size = CGSize(width: CGFloat(self.width) / scale, height: CGFloat(self.height) / scale) - context.draw(self, in: CGRect(origin: .zero, size: size)) - guard let decodedImageRef = context.makeImage() else { - return nil - } - return decodedImageRef - } -} - -extension KingfisherWrapper where Base: KFCrossPlatformImage { - func draw( - to size: CGSize, - inverting: Bool, - scale: CGFloat? = nil, - refImage: KFCrossPlatformImage? = nil, - draw: (CGContext) -> Bool // Whether use the refImage (`true`) or ignore image orientation (`false`) - ) -> KFCrossPlatformImage - { - #if os(macOS) || os(watchOS) - let targetScale = scale ?? self.scale - GraphicsContext.begin(size: size, scale: targetScale) - guard let context = GraphicsContext.current(size: size, scale: targetScale, inverting: inverting, cgImage: cgImage) else { - assertionFailure("[Kingfisher] Failed to create CG context for blurring image.") - return base - } - defer { GraphicsContext.end() } - let useRefImage = draw(context) - guard let cgImage = context.makeImage() else { - return base - } - let ref = useRefImage ? (refImage ?? base) : nil - return KingfisherWrapper.image(cgImage: cgImage, scale: targetScale, refImage: ref) - #else - - let format = UIGraphicsImageRendererFormat.preferred() - format.scale = scale ?? self.scale - let renderer = UIGraphicsImageRenderer(size: size, format: format) - - var useRefImage: Bool = false - let image = renderer.image { rendererContext in - - let context = rendererContext.cgContext - if inverting { // If drawing a CGImage, we need to make context flipped. - context.scaleBy(x: 1.0, y: -1.0) - context.translateBy(x: 0, y: -size.height) - } - - useRefImage = draw(context) - } - if useRefImage { - guard let cgImage = image.cgImage else { - return base - } - let ref = refImage ?? base - return KingfisherWrapper.image(cgImage: cgImage, scale: format.scale, refImage: ref) - } else { - return image - } - #endif - } - - #if os(macOS) - func fixedForRetinaPixel(cgImage: CGImage, to size: CGSize) -> KFCrossPlatformImage { - - let image = KFCrossPlatformImage(cgImage: cgImage, size: base.size) - let rect = CGRect(origin: CGPoint(x: 0, y: 0), size: size) - - return draw(to: self.size, inverting: false) { context in - image.draw(in: rect, from: .zero, operation: .copy, fraction: 1.0) - return false - } - } - #endif -} diff --git a/Pods/Kingfisher/Sources/Image/ImageFormat.swift b/Pods/Kingfisher/Sources/Image/ImageFormat.swift deleted file mode 100644 index 464a855d..00000000 --- a/Pods/Kingfisher/Sources/Image/ImageFormat.swift +++ /dev/null @@ -1,130 +0,0 @@ -// -// ImageFormat.swift -// Kingfisher -// -// Created by onevcat on 2018/09/28. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -/// Represents image format. -/// -/// - unknown: The format cannot be recognized or not supported yet. -/// - PNG: PNG image format. -/// - JPEG: JPEG image format. -/// - GIF: GIF image format. -public enum ImageFormat { - /// The format cannot be recognized or not supported yet. - case unknown - /// PNG image format. - case PNG - /// JPEG image format. - case JPEG - /// GIF image format. - case GIF - - struct HeaderData { - static var PNG: [UInt8] = [0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A] - static var JPEG_SOI: [UInt8] = [0xFF, 0xD8] - static var JPEG_IF: [UInt8] = [0xFF] - static var GIF: [UInt8] = [0x47, 0x49, 0x46] - } - - /// https://en.wikipedia.org/wiki/JPEG - public enum JPEGMarker { - case SOF0 //baseline - case SOF2 //progressive - case DHT //Huffman Table - case DQT //Quantization Table - case DRI //Restart Interval - case SOS //Start Of Scan - case RSTn(UInt8) //Restart - case APPn //Application-specific - case COM //Comment - case EOI //End Of Image - - var bytes: [UInt8] { - switch self { - case .SOF0: return [0xFF, 0xC0] - case .SOF2: return [0xFF, 0xC2] - case .DHT: return [0xFF, 0xC4] - case .DQT: return [0xFF, 0xDB] - case .DRI: return [0xFF, 0xDD] - case .SOS: return [0xFF, 0xDA] - case .RSTn(let n): return [0xFF, 0xD0 + n] - case .APPn: return [0xFF, 0xE0] - case .COM: return [0xFF, 0xFE] - case .EOI: return [0xFF, 0xD9] - } - } - } -} - - -extension Data: KingfisherCompatibleValue {} - -// MARK: - Misc Helpers -extension KingfisherWrapper where Base == Data { - /// Gets the image format corresponding to the data. - public var imageFormat: ImageFormat { - guard base.count > 8 else { return .unknown } - - var buffer = [UInt8](repeating: 0, count: 8) - base.copyBytes(to: &buffer, count: 8) - - if buffer == ImageFormat.HeaderData.PNG { - return .PNG - - } else if buffer[0] == ImageFormat.HeaderData.JPEG_SOI[0], - buffer[1] == ImageFormat.HeaderData.JPEG_SOI[1], - buffer[2] == ImageFormat.HeaderData.JPEG_IF[0] - { - return .JPEG - - } else if buffer[0] == ImageFormat.HeaderData.GIF[0], - buffer[1] == ImageFormat.HeaderData.GIF[1], - buffer[2] == ImageFormat.HeaderData.GIF[2] - { - return .GIF - } - - return .unknown - } - - public func contains(jpeg marker: ImageFormat.JPEGMarker) -> Bool { - guard imageFormat == .JPEG else { - return false - } - - let bytes = [UInt8](base) - let markerBytes = marker.bytes - for (index, item) in bytes.enumerated() where bytes.count > index + 1 { - guard - item == markerBytes.first, - bytes[index + 1] == markerBytes[1] else { - continue - } - return true - } - return false - } -} diff --git a/Pods/Kingfisher/Sources/Image/ImageProcessor.swift b/Pods/Kingfisher/Sources/Image/ImageProcessor.swift deleted file mode 100644 index 0a5dc0b4..00000000 --- a/Pods/Kingfisher/Sources/Image/ImageProcessor.swift +++ /dev/null @@ -1,922 +0,0 @@ -// -// ImageProcessor.swift -// Kingfisher -// -// Created by Wei Wang on 2016/08/26. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation -import CoreGraphics - -#if canImport(AppKit) && !targetEnvironment(macCatalyst) -import AppKit -#else -import UIKit -#endif - -/// Represents an item which could be processed by an `ImageProcessor`. -/// -/// - image: Input image. The processor should provide a way to apply -/// processing on this `image` and return the result image. -/// - data: Input data. The processor should provide a way to apply -/// processing on this `data` and return the result image. -public enum ImageProcessItem { - - /// Input image. The processor should provide a way to apply - /// processing on this `image` and return the result image. - case image(KFCrossPlatformImage) - - /// Input data. The processor should provide a way to apply - /// processing on this `data` and return the result image. - case data(Data) -} - -/// An `ImageProcessor` would be used to convert some downloaded data to an image. -public protocol ImageProcessor { - /// Identifier of the processor. It will be used to identify the processor when - /// caching and retrieving an image. You might want to make sure that processors with - /// same properties/functionality have the same identifiers, so correct processed images - /// could be retrieved with proper key. - /// - /// - Note: Do not supply an empty string for a customized processor, which is already reserved by - /// the `DefaultImageProcessor`. It is recommended to use a reverse domain name notation string of - /// your own for the identifier. - var identifier: String { get } - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: The parsed options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: The return value should be `nil` if processing failed while converting an input item to image. - /// If `nil` received by the processing caller, an error will be reported and the process flow stops. - /// If the processing flow is not critical for your flow, then when the input item is already an image - /// (`.image` case) and there is any errors in the processing, you could return the input image itself - /// to keep the processing pipeline continuing. - /// - Note: Most processor only supports CG-based images. watchOS is not supported for processors containing - /// a filter, the input image will be returned directly on watchOS. - func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? -} - -extension ImageProcessor { - - /// Appends an `ImageProcessor` to another. The identifier of the new `ImageProcessor` - /// will be "\(self.identifier)|>\(another.identifier)". - /// - /// - Parameter another: An `ImageProcessor` you want to append to `self`. - /// - Returns: The new `ImageProcessor` will process the image in the order - /// of the two processors concatenated. - public func append(another: ImageProcessor) -> ImageProcessor { - let newIdentifier = identifier.appending("|>\(another.identifier)") - return GeneralProcessor(identifier: newIdentifier) { - item, options in - if let image = self.process(item: item, options: options) { - return another.process(item: .image(image), options: options) - } else { - return nil - } - } - } -} - -func ==(left: ImageProcessor, right: ImageProcessor) -> Bool { - return left.identifier == right.identifier -} - -func !=(left: ImageProcessor, right: ImageProcessor) -> Bool { - return !(left == right) -} - -typealias ProcessorImp = ((ImageProcessItem, KingfisherParsedOptionsInfo) -> KFCrossPlatformImage?) -struct GeneralProcessor: ImageProcessor { - let identifier: String - let p: ProcessorImp - func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - return p(item, options) - } -} - -/// The default processor. It converts the input data to a valid image. -/// Images of .PNG, .JPEG and .GIF format are supported. -/// If an image item is given as `.image` case, `DefaultImageProcessor` will -/// do nothing on it and return the associated image. -public struct DefaultImageProcessor: ImageProcessor { - - /// A default `DefaultImageProcessor` could be used across. - public static let `default` = DefaultImageProcessor() - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier = "" - - /// Creates a `DefaultImageProcessor`. Use `DefaultImageProcessor.default` to get an instance, - /// if you do not have a good reason to create your own `DefaultImageProcessor`. - public init() {} - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: Options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - switch item { - case .image(let image): - return image.kf.scaled(to: options.scaleFactor) - case .data(let data): - return KingfisherWrapper.image(data: data, options: options.imageCreatingOptions) - } - } -} - -/// Represents the rect corner setting when processing a round corner image. -public struct RectCorner: OptionSet { - - /// Raw value of the rect corner. - public let rawValue: Int - - /// Represents the top left corner. - public static let topLeft = RectCorner(rawValue: 1 << 0) - - /// Represents the top right corner. - public static let topRight = RectCorner(rawValue: 1 << 1) - - /// Represents the bottom left corner. - public static let bottomLeft = RectCorner(rawValue: 1 << 2) - - /// Represents the bottom right corner. - public static let bottomRight = RectCorner(rawValue: 1 << 3) - - /// Represents all corners. - public static let all: RectCorner = [.topLeft, .topRight, .bottomLeft, .bottomRight] - - /// Creates a `RectCorner` option set with a given value. - /// - /// - Parameter rawValue: The value represents a certain corner option. - public init(rawValue: Int) { - self.rawValue = rawValue - } - - var cornerIdentifier: String { - if self == .all { - return "" - } - return "_corner(\(rawValue))" - } -} - -#if !os(macOS) -/// Processor for adding an blend mode to images. Only CG-based images are supported. -public struct BlendImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Blend Mode will be used to blend the input image. - public let blendMode: CGBlendMode - - /// Alpha will be used when blend image. - public let alpha: CGFloat - - /// Background color of the output image. If `nil`, it will stay transparent. - public let backgroundColor: KFCrossPlatformColor? - - /// Creates a `BlendImageProcessor`. - /// - /// - Parameters: - /// - blendMode: Blend Mode will be used to blend the input image. - /// - alpha: Alpha will be used when blend image. From 0.0 to 1.0. 1.0 means solid image, - /// 0.0 means transparent image (not visible at all). Default is 1.0. - /// - backgroundColor: Background color to apply for the output image. Default is `nil`. - public init(blendMode: CGBlendMode, alpha: CGFloat = 1.0, backgroundColor: KFCrossPlatformColor? = nil) { - self.blendMode = blendMode - self.alpha = alpha - self.backgroundColor = backgroundColor - var identifier = "com.onevcat.Kingfisher.BlendImageProcessor(\(blendMode.rawValue),\(alpha))" - if let color = backgroundColor { - identifier.append("_\(color.rgbaDescription)") - } - self.identifier = identifier - } - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: Options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - switch item { - case .image(let image): - return image.kf.scaled(to: options.scaleFactor) - .kf.image(withBlendMode: blendMode, alpha: alpha, backgroundColor: backgroundColor) - case .data: - return (DefaultImageProcessor.default |> self).process(item: item, options: options) - } - } -} -#endif - -#if os(macOS) -/// Processor for adding an compositing operation to images. Only CG-based images are supported in macOS. -public struct CompositingImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Compositing operation will be used to the input image. - public let compositingOperation: NSCompositingOperation - - /// Alpha will be used when compositing image. - public let alpha: CGFloat - - /// Background color of the output image. If `nil`, it will stay transparent. - public let backgroundColor: KFCrossPlatformColor? - - /// Creates a `CompositingImageProcessor` - /// - /// - Parameters: - /// - compositingOperation: Compositing operation will be used to the input image. - /// - alpha: Alpha will be used when compositing image. - /// From 0.0 to 1.0. 1.0 means solid image, 0.0 means transparent image. - /// Default is 1.0. - /// - backgroundColor: Background color to apply for the output image. Default is `nil`. - public init(compositingOperation: NSCompositingOperation, - alpha: CGFloat = 1.0, - backgroundColor: KFCrossPlatformColor? = nil) - { - self.compositingOperation = compositingOperation - self.alpha = alpha - self.backgroundColor = backgroundColor - var identifier = "com.onevcat.Kingfisher.CompositingImageProcessor(\(compositingOperation.rawValue),\(alpha))" - if let color = backgroundColor { - identifier.append("_\(color.rgbaDescription)") - } - self.identifier = identifier - } - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: Options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - switch item { - case .image(let image): - return image.kf.scaled(to: options.scaleFactor) - .kf.image( - withCompositingOperation: compositingOperation, - alpha: alpha, - backgroundColor: backgroundColor) - case .data: - return (DefaultImageProcessor.default |> self).process(item: item, options: options) - } - } -} -#endif - -/// Represents a radius specified in a `RoundCornerImageProcessor`. -public enum Radius { - /// The radius should be calculated as a fraction of the image width. Typically the associated value should be - /// between 0 and 0.5, where 0 represents no radius and 0.5 represents using half of the image width. - case widthFraction(CGFloat) - /// The radius should be calculated as a fraction of the image height. Typically the associated value should be - /// between 0 and 0.5, where 0 represents no radius and 0.5 represents using half of the image height. - case heightFraction(CGFloat) - /// Use a fixed point value as the round corner radius. - case point(CGFloat) - - var radiusIdentifier: String { - switch self { - case .widthFraction(let f): - return "w_frac_\(f)" - case .heightFraction(let f): - return "h_frac_\(f)" - case .point(let p): - return p.description - } - } - - public func compute(with size: CGSize) -> CGFloat { - let cornerRadius: CGFloat - switch self { - case .point(let point): - cornerRadius = point - case .widthFraction(let widthFraction): - cornerRadius = size.width * widthFraction - case .heightFraction(let heightFraction): - cornerRadius = size.height * heightFraction - } - return cornerRadius - } -} - -/// Processor for making round corner images. Only CG-based images are supported in macOS, -/// if a non-CG image passed in, the processor will do nothing. -/// -/// - Note: The input image will be rendered with round corner pixels removed. If the image itself does not contain -/// alpha channel (for example, a JPEG image), the processed image will contain an alpha channel in memory in order -/// to show correctly. However, when cached to disk, Kingfisher respects the original image format by default. That -/// means the alpha channel will be removed for these images. When you load the processed image from cache again, you -/// will lose transparent corner. -/// -/// You could use `FormatIndicatedCacheSerializer.png` to force Kingfisher to serialize the image to PNG format in this -/// case. -/// -public struct RoundCornerImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// The radius will be applied in processing. Specify a certain point value with `.point`, or a fraction of the - /// target image with `.widthFraction`. or `.heightFraction`. For example, given a square image with width and - /// height equals, `.widthFraction(0.5)` means use half of the length of size and makes the final image a round one. - public let radius: Radius - - /// The target corners which will be applied rounding. - public let roundingCorners: RectCorner - - /// Target size of output image should be. If `nil`, the image will keep its original size after processing. - public let targetSize: CGSize? - - /// Background color of the output image. If `nil`, it will use a transparent background. - public let backgroundColor: KFCrossPlatformColor? - - /// Creates a `RoundCornerImageProcessor`. - /// - /// - Parameters: - /// - cornerRadius: Corner radius in point will be applied in processing. - /// - targetSize: Target size of output image should be. If `nil`, - /// the image will keep its original size after processing. - /// Default is `nil`. - /// - corners: The target corners which will be applied rounding. Default is `.all`. - /// - backgroundColor: Background color to apply for the output image. Default is `nil`. - /// - /// - Note: - /// - /// This initializer accepts a concrete point value for `cornerRadius`. If you do not know the image size, but still - /// want to apply a full round-corner (making the final image a round one), or specify the corner radius as a - /// fraction of one dimension of the target image, use the `Radius` version instead. - /// - public init( - cornerRadius: CGFloat, - targetSize: CGSize? = nil, - roundingCorners corners: RectCorner = .all, - backgroundColor: KFCrossPlatformColor? = nil - ) - { - let radius = Radius.point(cornerRadius) - self.init(radius: radius, targetSize: targetSize, roundingCorners: corners, backgroundColor: backgroundColor) - } - - /// Creates a `RoundCornerImageProcessor`. - /// - /// - Parameters: - /// - radius: The radius will be applied in processing. - /// - targetSize: Target size of output image should be. If `nil`, - /// the image will keep its original size after processing. - /// Default is `nil`. - /// - corners: The target corners which will be applied rounding. Default is `.all`. - /// - backgroundColor: Background color to apply for the output image. Default is `nil`. - public init( - radius: Radius, - targetSize: CGSize? = nil, - roundingCorners corners: RectCorner = .all, - backgroundColor: KFCrossPlatformColor? = nil - ) - { - self.radius = radius - self.targetSize = targetSize - self.roundingCorners = corners - self.backgroundColor = backgroundColor - - self.identifier = { - var identifier = "" - - if let size = targetSize { - identifier = "com.onevcat.Kingfisher.RoundCornerImageProcessor" + - "(\(radius.radiusIdentifier)_\(size)\(corners.cornerIdentifier))" - } else { - identifier = "com.onevcat.Kingfisher.RoundCornerImageProcessor" + - "(\(radius.radiusIdentifier)\(corners.cornerIdentifier))" - } - if let backgroundColor = backgroundColor { - identifier += "_\(backgroundColor)" - } - - return identifier - }() - } - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: Options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - switch item { - case .image(let image): - let size = targetSize ?? image.kf.size - return image.kf.scaled(to: options.scaleFactor) - .kf.image( - withRadius: radius, - fit: size, - roundingCorners: roundingCorners, - backgroundColor: backgroundColor) - case .data: - return (DefaultImageProcessor.default |> self).process(item: item, options: options) - } - } -} - -public struct Border { - public var color: KFCrossPlatformColor - public var lineWidth: CGFloat - - /// The radius will be applied in processing. Specify a certain point value with `.point`, or a fraction of the - /// target image with `.widthFraction`. or `.heightFraction`. For example, given a square image with width and - /// height equals, `.widthFraction(0.5)` means use half of the length of size and makes the final image a round one. - public var radius: Radius - - /// The target corners which will be applied rounding. - public var roundingCorners: RectCorner - - public init( - color: KFCrossPlatformColor = .black, - lineWidth: CGFloat = 4, - radius: Radius = .point(0), - roundingCorners: RectCorner = .all - ) { - self.color = color - self.lineWidth = lineWidth - self.radius = radius - self.roundingCorners = roundingCorners - } - - var identifier: String { - "\(color.rgbaDescription)_\(lineWidth)_\(radius.radiusIdentifier)_\(roundingCorners.cornerIdentifier)" - } -} - -public struct BorderImageProcessor: ImageProcessor { - public var identifier: String { "com.onevcat.Kingfisher.RoundCornerImageProcessor(\(border)" } - public let border: Border - - public init(border: Border) { - self.border = border - } - - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - switch item { - case .image(let image): - return image.kf.addingBorder(border) - case .data: - return (DefaultImageProcessor.default |> self).process(item: item, options: options) - } - } -} - -/// Represents how a size adjusts itself to fit a target size. -/// -/// - none: Not scale the content. -/// - aspectFit: Scales the content to fit the size of the view by maintaining the aspect ratio. -/// - aspectFill: Scales the content to fill the size of the view. -public enum ContentMode { - /// Not scale the content. - case none - /// Scales the content to fit the size of the view by maintaining the aspect ratio. - case aspectFit - /// Scales the content to fill the size of the view. - case aspectFill -} - -/// Processor for resizing images. -/// If you need to resize a data represented image to a smaller size, use `DownsamplingImageProcessor` -/// instead, which is more efficient and uses less memory. -public struct ResizingImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// The reference size for resizing operation in point. - public let referenceSize: CGSize - - /// Target content mode of output image should be. - /// Default is `.none`. - public let targetContentMode: ContentMode - - /// Creates a `ResizingImageProcessor`. - /// - /// - Parameters: - /// - referenceSize: The reference size for resizing operation in point. - /// - mode: Target content mode of output image should be. - /// - /// - Note: - /// The instance of `ResizingImageProcessor` will follow its `mode` property - /// and try to resizing the input images to fit or fill the `referenceSize`. - /// That means if you are using a `mode` besides of `.none`, you may get an - /// image with its size not be the same as the `referenceSize`. - /// - /// **Example**: With input image size: {100, 200}, - /// `referenceSize`: {100, 100}, `mode`: `.aspectFit`, - /// you will get an output image with size of {50, 100}, which "fit"s - /// the `referenceSize`. - /// - /// If you need an output image exactly to be a specified size, append or use - /// a `CroppingImageProcessor`. - public init(referenceSize: CGSize, mode: ContentMode = .none) { - self.referenceSize = referenceSize - self.targetContentMode = mode - - if mode == .none { - self.identifier = "com.onevcat.Kingfisher.ResizingImageProcessor(\(referenceSize))" - } else { - self.identifier = "com.onevcat.Kingfisher.ResizingImageProcessor(\(referenceSize), \(mode))" - } - } - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: Options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - switch item { - case .image(let image): - return image.kf.scaled(to: options.scaleFactor) - .kf.resize(to: referenceSize, for: targetContentMode) - case .data: - return (DefaultImageProcessor.default |> self).process(item: item, options: options) - } - } -} - -/// Processor for adding blur effect to images. `Accelerate.framework` is used underhood for -/// a better performance. A simulated Gaussian blur with specified blur radius will be applied. -public struct BlurImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Blur radius for the simulated Gaussian blur. - public let blurRadius: CGFloat - - /// Creates a `BlurImageProcessor` - /// - /// - parameter blurRadius: Blur radius for the simulated Gaussian blur. - public init(blurRadius: CGFloat) { - self.blurRadius = blurRadius - self.identifier = "com.onevcat.Kingfisher.BlurImageProcessor(\(blurRadius))" - } - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: Options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - switch item { - case .image(let image): - let radius = blurRadius * options.scaleFactor - return image.kf.scaled(to: options.scaleFactor) - .kf.blurred(withRadius: radius) - case .data: - return (DefaultImageProcessor.default |> self).process(item: item, options: options) - } - } -} - -/// Processor for adding an overlay to images. Only CG-based images are supported in macOS. -public struct OverlayImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Overlay color will be used to overlay the input image. - public let overlay: KFCrossPlatformColor - - /// Fraction will be used when overlay the color to image. - public let fraction: CGFloat - - /// Creates an `OverlayImageProcessor` - /// - /// - parameter overlay: Overlay color will be used to overlay the input image. - /// - parameter fraction: Fraction will be used when overlay the color to image. - /// From 0.0 to 1.0. 0.0 means solid color, 1.0 means transparent overlay. - public init(overlay: KFCrossPlatformColor, fraction: CGFloat = 0.5) { - self.overlay = overlay - self.fraction = fraction - self.identifier = "com.onevcat.Kingfisher.OverlayImageProcessor(\(overlay.rgbaDescription)_\(fraction))" - } - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: Options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - switch item { - case .image(let image): - return image.kf.scaled(to: options.scaleFactor) - .kf.overlaying(with: overlay, fraction: fraction) - case .data: - return (DefaultImageProcessor.default |> self).process(item: item, options: options) - } - } -} - -/// Processor for tint images with color. Only CG-based images are supported. -public struct TintImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Tint color will be used to tint the input image. - public let tint: KFCrossPlatformColor - - /// Creates a `TintImageProcessor` - /// - /// - parameter tint: Tint color will be used to tint the input image. - public init(tint: KFCrossPlatformColor) { - self.tint = tint - self.identifier = "com.onevcat.Kingfisher.TintImageProcessor(\(tint.rgbaDescription))" - } - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: Options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - switch item { - case .image(let image): - return image.kf.scaled(to: options.scaleFactor) - .kf.tinted(with: tint) - case .data: - return (DefaultImageProcessor.default |> self).process(item: item, options: options) - } - } -} - -/// Processor for applying some color control to images. Only CG-based images are supported. -/// watchOS is not supported. -public struct ColorControlsProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Brightness changing to image. - public let brightness: CGFloat - - /// Contrast changing to image. - public let contrast: CGFloat - - /// Saturation changing to image. - public let saturation: CGFloat - - /// InputEV changing to image. - public let inputEV: CGFloat - - /// Creates a `ColorControlsProcessor` - /// - /// - Parameters: - /// - brightness: Brightness changing to image. - /// - contrast: Contrast changing to image. - /// - saturation: Saturation changing to image. - /// - inputEV: InputEV changing to image. - public init(brightness: CGFloat, contrast: CGFloat, saturation: CGFloat, inputEV: CGFloat) { - self.brightness = brightness - self.contrast = contrast - self.saturation = saturation - self.inputEV = inputEV - self.identifier = "com.onevcat.Kingfisher.ColorControlsProcessor(\(brightness)_\(contrast)_\(saturation)_\(inputEV))" - } - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: Options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - switch item { - case .image(let image): - return image.kf.scaled(to: options.scaleFactor) - .kf.adjusted(brightness: brightness, contrast: contrast, saturation: saturation, inputEV: inputEV) - case .data: - return (DefaultImageProcessor.default |> self).process(item: item, options: options) - } - } -} - -/// Processor for applying black and white effect to images. Only CG-based images are supported. -/// watchOS is not supported. -public struct BlackWhiteProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier = "com.onevcat.Kingfisher.BlackWhiteProcessor" - - /// Creates a `BlackWhiteProcessor` - public init() {} - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: Options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - return ColorControlsProcessor(brightness: 0.0, contrast: 1.0, saturation: 0.0, inputEV: 0.7) - .process(item: item, options: options) - } -} - -/// Processor for cropping an image. Only CG-based images are supported. -/// watchOS is not supported. -public struct CroppingImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Target size of output image should be. - public let size: CGSize - - /// Anchor point from which the output size should be calculate. - /// The anchor point is consisted by two values between 0.0 and 1.0. - /// It indicates a related point in current image. - /// See `CroppingImageProcessor.init(size:anchor:)` for more. - public let anchor: CGPoint - - /// Creates a `CroppingImageProcessor`. - /// - /// - Parameters: - /// - size: Target size of output image should be. - /// - anchor: The anchor point from which the size should be calculated. - /// Default is `CGPoint(x: 0.5, y: 0.5)`, which means the center of input image. - /// - Note: - /// The anchor point is consisted by two values between 0.0 and 1.0. - /// It indicates a related point in current image, eg: (0.0, 0.0) for top-left - /// corner, (0.5, 0.5) for center and (1.0, 1.0) for bottom-right corner. - /// The `size` property of `CroppingImageProcessor` will be used along with - /// `anchor` to calculate a target rectangle in the size of image. - /// - /// The target size will be automatically calculated with a reasonable behavior. - /// For example, when you have an image size of `CGSize(width: 100, height: 100)`, - /// and a target size of `CGSize(width: 20, height: 20)`: - /// - with a (0.0, 0.0) anchor (top-left), the crop rect will be `{0, 0, 20, 20}`; - /// - with a (0.5, 0.5) anchor (center), it will be `{40, 40, 20, 20}` - /// - while with a (1.0, 1.0) anchor (bottom-right), it will be `{80, 80, 20, 20}` - public init(size: CGSize, anchor: CGPoint = CGPoint(x: 0.5, y: 0.5)) { - self.size = size - self.anchor = anchor - self.identifier = "com.onevcat.Kingfisher.CroppingImageProcessor(\(size)_\(anchor))" - } - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: Options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - switch item { - case .image(let image): - return image.kf.scaled(to: options.scaleFactor) - .kf.crop(to: size, anchorOn: anchor) - case .data: return (DefaultImageProcessor.default |> self).process(item: item, options: options) - } - } -} - -/// Processor for downsampling an image. Compared to `ResizingImageProcessor`, this processor -/// does not render the images to resize. Instead, it downsamples the input data directly to an -/// image. It is a more efficient than `ResizingImageProcessor`. Prefer to use `DownsamplingImageProcessor` as possible -/// as you can than the `ResizingImageProcessor`. -/// -/// Only CG-based images are supported. Animated images (like GIF) is not supported. -public struct DownsamplingImageProcessor: ImageProcessor { - - /// Target size of output image should be. It should be smaller than the size of - /// input image. If it is larger, the result image will be the same size of input - /// data without downsampling. - public let size: CGSize - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Creates a `DownsamplingImageProcessor`. - /// - /// - Parameter size: The target size of the downsample operation. - public init(size: CGSize) { - self.size = size - self.identifier = "com.onevcat.Kingfisher.DownsamplingImageProcessor(\(size))" - } - - /// Processes the input `ImageProcessItem` with this processor. - /// - /// - Parameters: - /// - item: Input item which will be processed by `self`. - /// - options: Options when processing the item. - /// - Returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage? { - switch item { - case .image(let image): - guard let data = image.kf.data(format: .unknown) else { - return nil - } - return KingfisherWrapper.downsampledImage(data: data, to: size, scale: options.scaleFactor) - case .data(let data): - return KingfisherWrapper.downsampledImage(data: data, to: size, scale: options.scaleFactor) - } - } -} - -infix operator |>: AdditionPrecedence -public func |>(left: ImageProcessor, right: ImageProcessor) -> ImageProcessor { - return left.append(another: right) -} - -extension KFCrossPlatformColor { - - var rgba: (r: CGFloat, g: CGFloat, b: CGFloat, a: CGFloat) { - var r: CGFloat = 0 - var g: CGFloat = 0 - var b: CGFloat = 0 - var a: CGFloat = 0 - - #if os(macOS) - (usingColorSpace(.extendedSRGB) ?? self).getRed(&r, green: &g, blue: &b, alpha: &a) - #else - getRed(&r, green: &g, blue: &b, alpha: &a) - #endif - - return (r, g, b, a) - } - - var rgbaDescription: String { - let components = self.rgba - return String(format: "(%.2f,%.2f,%.2f,%.2f)", components.r, components.g, components.b, components.a) - } -} diff --git a/Pods/Kingfisher/Sources/Image/ImageProgressive.swift b/Pods/Kingfisher/Sources/Image/ImageProgressive.swift deleted file mode 100644 index 8ce8f323..00000000 --- a/Pods/Kingfisher/Sources/Image/ImageProgressive.swift +++ /dev/null @@ -1,353 +0,0 @@ -// -// ImageProgressive.swift -// Kingfisher -// -// Created by lixiang on 2019/5/10. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation -import CoreGraphics -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -private let sharedProcessingQueue: CallbackQueue = - .dispatch(DispatchQueue(label: "com.onevcat.Kingfisher.ImageDownloader.Process")) - -public struct ImageProgressive { - - /// The updating strategy when an intermediate progressive image is generated and about to be set to the hosting view. - /// - /// - default: Use the progressive image as it is. It is the standard behavior when handling the progressive image. - /// - keepCurrent: Discard this progressive image and keep the current displayed one. - /// - replace: Replace the image to a new one. If the progressive loading is initialized by a view extension in - /// Kingfisher, the replacing image will be used to update the view. - public enum UpdatingStrategy { - case `default` - case keepCurrent - case replace(KFCrossPlatformImage?) - } - - /// A default `ImageProgressive` could be used across. It blurs the progressive loading with the fastest - /// scan enabled and scan interval as 0. - @available(*, deprecated, message: "Getting a default `ImageProgressive` is deprecated due to its syntax symatic is not clear. Use `ImageProgressive.init` instead.", renamed: "init()") - public static let `default` = ImageProgressive( - isBlur: true, - isFastestScan: true, - scanInterval: 0 - ) - - /// Whether to enable blur effect processing - let isBlur: Bool - /// Whether to enable the fastest scan - let isFastestScan: Bool - /// Minimum time interval for each scan - let scanInterval: TimeInterval - - /// Called when an intermediate image is prepared and about to be set to the image view. The return value of this - /// delegate will be used to update the hosting view, if any. Otherwise, if there is no hosting view (a.k.a the - /// image retrieving is not happening from a view extension method), the returned `UpdatingStrategy` is ignored. - public let onImageUpdated = Delegate() - - /// Creates an `ImageProgressive` value with default sets. It blurs the progressive loading with the fastest - /// scan enabled and scan interval as 0. - public init() { - self.init(isBlur: true, isFastestScan: true, scanInterval: 0) - } - - /// Creates an `ImageProgressive` value the given values. - /// - Parameters: - /// - isBlur: Whether to enable blur effect processing. - /// - isFastestScan: Whether to enable the fastest scan. - /// - scanInterval: Minimum time interval for each scan. - public init(isBlur: Bool, - isFastestScan: Bool, - scanInterval: TimeInterval - ) - { - self.isBlur = isBlur - self.isFastestScan = isFastestScan - self.scanInterval = scanInterval - } -} - -final class ImageProgressiveProvider: DataReceivingSideEffect { - - var onShouldApply: () -> Bool = { return true } - - func onDataReceived(_ session: URLSession, task: SessionDataTask, data: Data) { - - DispatchQueue.main.async { - guard self.onShouldApply() else { return } - self.update(data: task.mutableData, with: task.callbacks) - } - } - - private let option: ImageProgressive - private let refresh: (KFCrossPlatformImage) -> Void - - private let decoder: ImageProgressiveDecoder - private let queue = ImageProgressiveSerialQueue() - - init?(_ options: KingfisherParsedOptionsInfo, - refresh: @escaping (KFCrossPlatformImage) -> Void) { - guard let option = options.progressiveJPEG else { return nil } - - self.option = option - self.refresh = refresh - self.decoder = ImageProgressiveDecoder( - option, - processingQueue: options.processingQueue ?? sharedProcessingQueue, - creatingOptions: options.imageCreatingOptions - ) - } - - func update(data: Data, with callbacks: [SessionDataTask.TaskCallback]) { - guard !data.isEmpty else { return } - - queue.add(minimum: option.scanInterval) { completion in - - func decode(_ data: Data) { - self.decoder.decode(data, with: callbacks) { image in - defer { completion() } - guard self.onShouldApply() else { return } - guard let image = image else { return } - self.refresh(image) - } - } - - let semaphore = DispatchSemaphore(value: 0) - var onShouldApply: Bool = false - - CallbackQueue.mainAsync.execute { - onShouldApply = self.onShouldApply() - semaphore.signal() - } - semaphore.wait() - guard onShouldApply else { - self.queue.clean() - completion() - return - } - - if self.option.isFastestScan { - decode(self.decoder.scanning(data) ?? Data()) - } else { - self.decoder.scanning(data).forEach { decode($0) } - } - } - } -} - -private final class ImageProgressiveDecoder { - - private let option: ImageProgressive - private let processingQueue: CallbackQueue - private let creatingOptions: ImageCreatingOptions - private(set) var scannedCount = 0 - private(set) var scannedIndex = -1 - - init(_ option: ImageProgressive, - processingQueue: CallbackQueue, - creatingOptions: ImageCreatingOptions) { - self.option = option - self.processingQueue = processingQueue - self.creatingOptions = creatingOptions - } - - func scanning(_ data: Data) -> [Data] { - guard data.kf.contains(jpeg: .SOF2) else { - return [] - } - guard scannedIndex + 1 < data.count else { - return [] - } - - var datas: [Data] = [] - var index = scannedIndex + 1 - var count = scannedCount - - while index < data.count - 1 { - scannedIndex = index - // 0xFF, 0xDA - Start Of Scan - let SOS = ImageFormat.JPEGMarker.SOS.bytes - if data[index] == SOS[0], data[index + 1] == SOS[1] { - if count > 0 { - datas.append(data[0 ..< index]) - } - count += 1 - } - index += 1 - } - - // Found more scans this the previous time - guard count > scannedCount else { return [] } - scannedCount = count - - // `> 1` checks that we've received a first scan (SOS) and then received - // and also received a second scan (SOS). This way we know that we have - // at least one full scan available. - guard count > 1 else { return [] } - return datas - } - - func scanning(_ data: Data) -> Data? { - guard data.kf.contains(jpeg: .SOF2) else { - return nil - } - guard scannedIndex + 1 < data.count else { - return nil - } - - var index = scannedIndex + 1 - var count = scannedCount - var lastSOSIndex = 0 - - while index < data.count - 1 { - scannedIndex = index - // 0xFF, 0xDA - Start Of Scan - let SOS = ImageFormat.JPEGMarker.SOS.bytes - if data[index] == SOS[0], data[index + 1] == SOS[1] { - lastSOSIndex = index - count += 1 - } - index += 1 - } - - // Found more scans this the previous time - guard count > scannedCount else { return nil } - scannedCount = count - - // `> 1` checks that we've received a first scan (SOS) and then received - // and also received a second scan (SOS). This way we know that we have - // at least one full scan available. - guard count > 1 && lastSOSIndex > 0 else { return nil } - return data[0 ..< lastSOSIndex] - } - - func decode(_ data: Data, - with callbacks: [SessionDataTask.TaskCallback], - completion: @escaping (KFCrossPlatformImage?) -> Void) { - guard data.kf.contains(jpeg: .SOF2) else { - CallbackQueue.mainCurrentOrAsync.execute { completion(nil) } - return - } - - func processing(_ data: Data) { - let processor = ImageDataProcessor( - data: data, - callbacks: callbacks, - processingQueue: processingQueue - ) - processor.onImageProcessed.delegate(on: self) { (self, result) in - guard let image = try? result.0.get() else { - CallbackQueue.mainCurrentOrAsync.execute { completion(nil) } - return - } - - CallbackQueue.mainCurrentOrAsync.execute { completion(image) } - } - processor.process() - } - - // Blur partial images. - let count = scannedCount - - if option.isBlur, count < 6 { - processingQueue.execute { - // Progressively reduce blur as we load more scans. - let image = KingfisherWrapper.image( - data: data, - options: self.creatingOptions - ) - let radius = max(2, 14 - count * 4) - let temp = image?.kf.blurred(withRadius: CGFloat(radius)) - processing(temp?.kf.data(format: .JPEG) ?? data) - } - - } else { - processing(data) - } - } -} - -private final class ImageProgressiveSerialQueue { - typealias ClosureCallback = ((@escaping () -> Void)) -> Void - - private let queue: DispatchQueue - private var items: [DispatchWorkItem] = [] - private var notify: (() -> Void)? - private var lastTime: TimeInterval? - - init() { - self.queue = DispatchQueue(label: "com.onevcat.Kingfisher.ImageProgressive.SerialQueue") - } - - func add(minimum interval: TimeInterval, closure: @escaping ClosureCallback) { - let completion = { [weak self] in - guard let self = self else { return } - - self.queue.async { [weak self] in - guard let self = self else { return } - guard !self.items.isEmpty else { return } - - self.items.removeFirst() - - if let next = self.items.first { - self.queue.asyncAfter( - deadline: .now() + interval, - execute: next - ) - - } else { - self.lastTime = Date().timeIntervalSince1970 - self.notify?() - self.notify = nil - } - } - } - - queue.async { [weak self] in - guard let self = self else { return } - - let item = DispatchWorkItem { - closure(completion) - } - if self.items.isEmpty { - let difference = Date().timeIntervalSince1970 - (self.lastTime ?? 0) - let delay = difference < interval ? interval - difference : 0 - self.queue.asyncAfter(deadline: .now() + delay, execute: item) - } - self.items.append(item) - } - } - - func clean() { - queue.async { [weak self] in - guard let self = self else { return } - self.items.forEach { $0.cancel() } - self.items.removeAll() - } - } -} diff --git a/Pods/Kingfisher/Sources/Image/ImageTransition.swift b/Pods/Kingfisher/Sources/Image/ImageTransition.swift deleted file mode 100644 index 3080995f..00000000 --- a/Pods/Kingfisher/Sources/Image/ImageTransition.swift +++ /dev/null @@ -1,118 +0,0 @@ -// -// ImageTransition.swift -// Kingfisher -// -// Created by Wei Wang on 15/9/18. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation -#if os(iOS) || os(tvOS) || os(visionOS) -import UIKit - -/// Transition effect which will be used when an image downloaded and set by `UIImageView` -/// extension API in Kingfisher. You can assign an enum value with transition duration as -/// an item in `KingfisherOptionsInfo` to enable the animation transition. -/// -/// Apple's UIViewAnimationOptions is used under the hood. -/// For custom transition, you should specified your own transition options, animations and -/// completion handler as well. -/// -/// - none: No animation transition. -/// - fade: Fade in the loaded image in a given duration. -/// - flipFromLeft: Flip from left transition. -/// - flipFromRight: Flip from right transition. -/// - flipFromTop: Flip from top transition. -/// - flipFromBottom: Flip from bottom transition. -/// - custom: Custom transition. -public enum ImageTransition { - /// No animation transition. - case none - /// Fade in the loaded image in a given duration. - case fade(TimeInterval) - /// Flip from left transition. - case flipFromLeft(TimeInterval) - /// Flip from right transition. - case flipFromRight(TimeInterval) - /// Flip from top transition. - case flipFromTop(TimeInterval) - /// Flip from bottom transition. - case flipFromBottom(TimeInterval) - /// Custom transition defined by a general animation block. - /// - duration: The time duration of this custom transition. - /// - options: `UIView.AnimationOptions` should be used in the transition. - /// - animations: The animation block will be applied when setting image. - /// - completion: A block called when the transition animation finishes. - case custom(duration: TimeInterval, - options: UIView.AnimationOptions, - animations: ((UIImageView, UIImage) -> Void)?, - completion: ((Bool) -> Void)?) - - var duration: TimeInterval { - switch self { - case .none: return 0 - case .fade(let duration): return duration - - case .flipFromLeft(let duration): return duration - case .flipFromRight(let duration): return duration - case .flipFromTop(let duration): return duration - case .flipFromBottom(let duration): return duration - - case .custom(let duration, _, _, _): return duration - } - } - - var animationOptions: UIView.AnimationOptions { - switch self { - case .none: return [] - case .fade: return .transitionCrossDissolve - - case .flipFromLeft: return .transitionFlipFromLeft - case .flipFromRight: return .transitionFlipFromRight - case .flipFromTop: return .transitionFlipFromTop - case .flipFromBottom: return .transitionFlipFromBottom - - case .custom(_, let options, _, _): return options - } - } - - var animations: ((UIImageView, UIImage) -> Void)? { - switch self { - case .custom(_, _, let animations, _): return animations - default: return { $0.image = $1 } - } - } - - var completion: ((Bool) -> Void)? { - switch self { - case .custom(_, _, _, let completion): return completion - default: return nil - } - } -} -#else -// Just a placeholder for compiling on macOS. -public enum ImageTransition { - case none - /// This is a placeholder on macOS now. It is for SwiftUI (KFImage) to identify the fade option only. - case fade(TimeInterval) -} -#endif diff --git a/Pods/Kingfisher/Sources/Image/Placeholder.swift b/Pods/Kingfisher/Sources/Image/Placeholder.swift deleted file mode 100644 index 94d9e3a4..00000000 --- a/Pods/Kingfisher/Sources/Image/Placeholder.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// Placeholder.swift -// Kingfisher -// -// Created by Tieme van Veen on 28/08/2017. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if !os(watchOS) - -#if canImport(AppKit) && !targetEnvironment(macCatalyst) -import AppKit -#endif - -#if canImport(UIKit) -import UIKit -#endif - -/// Represents a placeholder type which could be set while loading as well as -/// loading finished without getting an image. -public protocol Placeholder { - - /// How the placeholder should be added to a given image view. - func add(to imageView: KFCrossPlatformImageView) - - /// How the placeholder should be removed from a given image view. - func remove(from imageView: KFCrossPlatformImageView) -} - -/// Default implementation of an image placeholder. The image will be set or -/// reset directly for `image` property of the image view. -extension KFCrossPlatformImage: Placeholder { - /// How the placeholder should be added to a given image view. - public func add(to imageView: KFCrossPlatformImageView) { imageView.image = self } - - /// How the placeholder should be removed from a given image view. - public func remove(from imageView: KFCrossPlatformImageView) { imageView.image = nil } -} - -/// Default implementation of an arbitrary view as placeholder. The view will be -/// added as a subview when adding and be removed from its super view when removing. -/// -/// To use your customize View type as placeholder, simply let it conforming to -/// `Placeholder` by `extension MyView: Placeholder {}`. -extension Placeholder where Self: KFCrossPlatformView { - - /// How the placeholder should be added to a given image view. - public func add(to imageView: KFCrossPlatformImageView) { - imageView.addSubview(self) - translatesAutoresizingMaskIntoConstraints = false - - centerXAnchor.constraint(equalTo: imageView.centerXAnchor).isActive = true - centerYAnchor.constraint(equalTo: imageView.centerYAnchor).isActive = true - heightAnchor.constraint(equalTo: imageView.heightAnchor).isActive = true - widthAnchor.constraint(equalTo: imageView.widthAnchor).isActive = true - } - - /// How the placeholder should be removed from a given image view. - public func remove(from imageView: KFCrossPlatformImageView) { - removeFromSuperview() - } -} - -#endif diff --git a/Pods/Kingfisher/Sources/Networking/AuthenticationChallengeResponsable.swift b/Pods/Kingfisher/Sources/Networking/AuthenticationChallengeResponsable.swift deleted file mode 100644 index d3b3ea18..00000000 --- a/Pods/Kingfisher/Sources/Networking/AuthenticationChallengeResponsable.swift +++ /dev/null @@ -1,94 +0,0 @@ -// -// AuthenticationChallengeResponsable.swift -// Kingfisher -// -// Created by Wei Wang on 2018/10/11. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -@available(*, deprecated, message: "Typo. Use `AuthenticationChallengeResponsible` instead", renamed: "AuthenticationChallengeResponsible") -public typealias AuthenticationChallengeResponsable = AuthenticationChallengeResponsible - -/// Protocol indicates that an authentication challenge could be handled. -public protocol AuthenticationChallengeResponsible: AnyObject { - - /// Called when a session level authentication challenge is received. - /// This method provide a chance to handle and response to the authentication - /// challenge before downloading could start. - /// - /// - Parameters: - /// - downloader: The downloader which receives this challenge. - /// - challenge: An object that contains the request for authentication. - /// - completionHandler: A handler that your delegate method must call. - /// - /// - Note: This method is a forward from `URLSessionDelegate.urlSession(:didReceiveChallenge:completionHandler:)`. - /// Please refer to the document of it in `URLSessionDelegate`. - func downloader( - _ downloader: ImageDownloader, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - - /// Called when a task level authentication challenge is received. - /// This method provide a chance to handle and response to the authentication - /// challenge before downloading could start. - /// - /// - Parameters: - /// - downloader: The downloader which receives this challenge. - /// - task: The task whose request requires authentication. - /// - challenge: An object that contains the request for authentication. - /// - completionHandler: A handler that your delegate method must call. - func downloader( - _ downloader: ImageDownloader, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -} - -extension AuthenticationChallengeResponsible { - - public func downloader( - _ downloader: ImageDownloader, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - if let trustedHosts = downloader.trustedHosts, trustedHosts.contains(challenge.protectionSpace.host) { - let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!) - completionHandler(.useCredential, credential) - return - } - } - - completionHandler(.performDefaultHandling, nil) - } - - public func downloader( - _ downloader: ImageDownloader, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - completionHandler(.performDefaultHandling, nil) - } - -} diff --git a/Pods/Kingfisher/Sources/Networking/ImageDataProcessor.swift b/Pods/Kingfisher/Sources/Networking/ImageDataProcessor.swift deleted file mode 100644 index b3689729..00000000 --- a/Pods/Kingfisher/Sources/Networking/ImageDataProcessor.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// ImageDataProcessor.swift -// Kingfisher -// -// Created by Wei Wang on 2018/10/11. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -private let sharedProcessingQueue: CallbackQueue = - .dispatch(DispatchQueue(label: "com.onevcat.Kingfisher.ImageDownloader.Process")) - -// Handles image processing work on an own process queue. -class ImageDataProcessor { - let data: Data - let callbacks: [SessionDataTask.TaskCallback] - let queue: CallbackQueue - - // Note: We have an optimization choice there, to reduce queue dispatch by checking callback - // queue settings in each option... - let onImageProcessed = Delegate<(Result, SessionDataTask.TaskCallback), Void>() - - init(data: Data, callbacks: [SessionDataTask.TaskCallback], processingQueue: CallbackQueue?) { - self.data = data - self.callbacks = callbacks - self.queue = processingQueue ?? sharedProcessingQueue - } - - func process() { - queue.execute(doProcess) - } - - private func doProcess() { - var processedImages = [String: KFCrossPlatformImage]() - for callback in callbacks { - let processor = callback.options.processor - var image = processedImages[processor.identifier] - if image == nil { - image = processor.process(item: .data(data), options: callback.options) - processedImages[processor.identifier] = image - } - - let result: Result - if let image = image { - let finalImage = callback.options.backgroundDecode ? image.kf.decoded : image - result = .success(finalImage) - } else { - let error = KingfisherError.processorError( - reason: .processingFailed(processor: processor, item: .data(data))) - result = .failure(error) - } - onImageProcessed.call((result, callback)) - } - } -} diff --git a/Pods/Kingfisher/Sources/Networking/ImageDownloader.swift b/Pods/Kingfisher/Sources/Networking/ImageDownloader.swift deleted file mode 100644 index 7078d885..00000000 --- a/Pods/Kingfisher/Sources/Networking/ImageDownloader.swift +++ /dev/null @@ -1,502 +0,0 @@ -// -// ImageDownloader.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/6. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -typealias DownloadResult = Result - -/// Represents a success result of an image downloading progress. -public struct ImageLoadingResult { - - /// The downloaded image. - public let image: KFCrossPlatformImage - - /// Original URL of the image request. - public let url: URL? - - /// The raw data received from downloader. - public let originalData: Data - - /// Creates an `ImageDownloadResult` - /// - /// - parameter image: Image of the download result - /// - parameter url: URL from where the image was downloaded from - /// - parameter originalData: The image's binary data - public init(image: KFCrossPlatformImage, url: URL? = nil, originalData: Data) { - self.image = image - self.url = url - self.originalData = originalData - } -} - -/// Represents a task of an image downloading process. -public struct DownloadTask { - - /// The `SessionDataTask` object bounded to this download task. Multiple `DownloadTask`s could refer - /// to a same `sessionTask`. This is an optimization in Kingfisher to prevent multiple downloading task - /// for the same URL resource at the same time. - /// - /// When you `cancel` a `DownloadTask`, this `SessionDataTask` and its cancel token will be pass through. - /// You can use them to identify the cancelled task. - public let sessionTask: SessionDataTask - - /// The cancel token which is used to cancel the task. This is only for identify the task when it is cancelled. - /// To cancel a `DownloadTask`, use `cancel` instead. - public let cancelToken: SessionDataTask.CancelToken - - /// Cancel this task if it is running. It will do nothing if this task is not running. - /// - /// - Note: - /// In Kingfisher, there is an optimization to prevent starting another download task if the target URL is being - /// downloading. However, even when internally no new session task created, a `DownloadTask` will be still created - /// and returned when you call related methods, but it will share the session downloading task with a previous task. - /// In this case, if multiple `DownloadTask`s share a single session download task, cancelling a `DownloadTask` - /// does not affect other `DownloadTask`s. - /// - /// If you need to cancel all `DownloadTask`s of a url, use `ImageDownloader.cancel(url:)`. If you need to cancel - /// all downloading tasks of an `ImageDownloader`, use `ImageDownloader.cancelAll()`. - public func cancel() { - sessionTask.cancel(token: cancelToken) - } -} - -extension DownloadTask { - enum WrappedTask { - case download(DownloadTask) - case dataProviding - - func cancel() { - switch self { - case .download(let task): task.cancel() - case .dataProviding: break - } - } - - var value: DownloadTask? { - switch self { - case .download(let task): return task - case .dataProviding: return nil - } - } - } -} - -/// Represents a downloading manager for requesting the image with a URL from server. -open class ImageDownloader { - - // MARK: Singleton - /// The default downloader. - public static let `default` = ImageDownloader(name: "default") - - // MARK: Public Properties - /// The duration before the downloading is timeout. Default is 15 seconds. - open var downloadTimeout: TimeInterval = 15.0 - - /// A set of trusted hosts when receiving server trust challenges. A challenge with host name contained in this - /// set will be ignored. You can use this set to specify the self-signed site. It only will be used if you don't - /// specify the `authenticationChallengeResponder`. - /// - /// If `authenticationChallengeResponder` is set, this property will be ignored and the implementation of - /// `authenticationChallengeResponder` will be used instead. - open var trustedHosts: Set? - - /// Use this to set supply a configuration for the downloader. By default, - /// NSURLSessionConfiguration.ephemeralSessionConfiguration() will be used. - /// - /// You could change the configuration before a downloading task starts. - /// A configuration without persistent storage for caches is requested for downloader working correctly. - open var sessionConfiguration = URLSessionConfiguration.ephemeral { - didSet { - session.invalidateAndCancel() - session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil) - } - } - open var sessionDelegate: SessionDelegate { - didSet { - session.invalidateAndCancel() - session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil) - setupSessionHandler() - } - } - - /// Whether the download requests should use pipeline or not. Default is false. - open var requestsUsePipelining = false - - /// Delegate of this `ImageDownloader` object. See `ImageDownloaderDelegate` protocol for more. - open weak var delegate: ImageDownloaderDelegate? - - /// A responder for authentication challenge. - /// Downloader will forward the received authentication challenge for the downloading session to this responder. - open weak var authenticationChallengeResponder: AuthenticationChallengeResponsible? - - private let name: String - private var session: URLSession - - // MARK: Initializers - - /// Creates a downloader with name. - /// - /// - Parameter name: The name for the downloader. It should not be empty. - public init(name: String) { - if name.isEmpty { - fatalError("[Kingfisher] You should specify a name for the downloader. " - + "A downloader with empty name is not permitted.") - } - - self.name = name - - sessionDelegate = SessionDelegate() - session = URLSession( - configuration: sessionConfiguration, - delegate: sessionDelegate, - delegateQueue: nil) - - authenticationChallengeResponder = self - setupSessionHandler() - } - - deinit { session.invalidateAndCancel() } - - private func setupSessionHandler() { - sessionDelegate.onReceiveSessionChallenge.delegate(on: self) { (self, invoke) in - self.authenticationChallengeResponder?.downloader(self, didReceive: invoke.1, completionHandler: invoke.2) - } - sessionDelegate.onReceiveSessionTaskChallenge.delegate(on: self) { (self, invoke) in - self.authenticationChallengeResponder?.downloader( - self, task: invoke.1, didReceive: invoke.2, completionHandler: invoke.3) - } - sessionDelegate.onValidStatusCode.delegate(on: self) { (self, code) in - return (self.delegate ?? self).isValidStatusCode(code, for: self) - } - sessionDelegate.onResponseReceived.delegate(on: self) { (self, invoke) in - (self.delegate ?? self).imageDownloader(self, didReceive: invoke.0, completionHandler: invoke.1) - } - sessionDelegate.onDownloadingFinished.delegate(on: self) { (self, value) in - let (url, result) = value - do { - let value = try result.get() - self.delegate?.imageDownloader(self, didFinishDownloadingImageForURL: url, with: value, error: nil) - } catch { - self.delegate?.imageDownloader(self, didFinishDownloadingImageForURL: url, with: nil, error: error) - } - } - sessionDelegate.onDidDownloadData.delegate(on: self) { (self, task) in - return (self.delegate ?? self).imageDownloader(self, didDownload: task.mutableData, with: task) - } - } - - // Wraps `completionHandler` to `onCompleted` respectively. - private func createCompletionCallBack(_ completionHandler: ((DownloadResult) -> Void)?) -> Delegate? { - return completionHandler.map { block -> Delegate in - - let delegate = Delegate, Void>() - delegate.delegate(on: self) { (self, callback) in - block(callback) - } - return delegate - } - } - - private func createTaskCallback( - _ completionHandler: ((DownloadResult) -> Void)?, - options: KingfisherParsedOptionsInfo - ) -> SessionDataTask.TaskCallback - { - return SessionDataTask.TaskCallback( - onCompleted: createCompletionCallBack(completionHandler), - options: options - ) - } - - private func createDownloadContext( - with url: URL, - options: KingfisherParsedOptionsInfo, - done: @escaping ((Result) -> Void) - ) - { - func checkRequestAndDone(r: URLRequest) { - - // There is a possibility that request modifier changed the url to `nil` or empty. - // In this case, throw an error. - guard let url = r.url, !url.absoluteString.isEmpty else { - done(.failure(KingfisherError.requestError(reason: .invalidURL(request: r)))) - return - } - - done(.success(DownloadingContext(url: url, request: r, options: options))) - } - - // Creates default request. - var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: downloadTimeout) - request.httpShouldUsePipelining = requestsUsePipelining - if #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) , options.lowDataModeSource != nil { - request.allowsConstrainedNetworkAccess = false - } - - if let requestModifier = options.requestModifier { - // Modifies request before sending. - requestModifier.modified(for: request) { result in - guard let finalRequest = result else { - done(.failure(KingfisherError.requestError(reason: .emptyRequest))) - return - } - checkRequestAndDone(r: finalRequest) - } - } else { - checkRequestAndDone(r: request) - } - } - - private func addDownloadTask( - context: DownloadingContext, - callback: SessionDataTask.TaskCallback - ) -> DownloadTask - { - // Ready to start download. Add it to session task manager (`sessionHandler`) - let downloadTask: DownloadTask - if let existingTask = sessionDelegate.task(for: context.url) { - downloadTask = sessionDelegate.append(existingTask, callback: callback) - } else { - let sessionDataTask = session.dataTask(with: context.request) - sessionDataTask.priority = context.options.downloadPriority - downloadTask = sessionDelegate.add(sessionDataTask, url: context.url, callback: callback) - } - return downloadTask - } - - - private func reportWillDownloadImage(url: URL, request: URLRequest) { - delegate?.imageDownloader(self, willDownloadImageForURL: url, with: request) - } - - private func reportDidDownloadImageData(result: Result<(Data, URLResponse?), KingfisherError>, url: URL) { - var response: URLResponse? - var err: Error? - do { - response = try result.get().1 - } catch { - err = error - } - self.delegate?.imageDownloader( - self, - didFinishDownloadingImageForURL: url, - with: response, - error: err - ) - } - - private func reportDidProcessImage( - result: Result, url: URL, response: URLResponse? - ) - { - if let image = try? result.get() { - self.delegate?.imageDownloader(self, didDownload: image, for: url, with: response) - } - - } - - private func startDownloadTask( - context: DownloadingContext, - callback: SessionDataTask.TaskCallback - ) -> DownloadTask - { - - let downloadTask = addDownloadTask(context: context, callback: callback) - - let sessionTask = downloadTask.sessionTask - guard !sessionTask.started else { - return downloadTask - } - - sessionTask.onTaskDone.delegate(on: self) { (self, done) in - // Underlying downloading finishes. - // result: Result<(Data, URLResponse?)>, callbacks: [TaskCallback] - let (result, callbacks) = done - - // Before processing the downloaded data. - self.reportDidDownloadImageData(result: result, url: context.url) - - switch result { - // Download finished. Now process the data to an image. - case .success(let (data, response)): - let processor = ImageDataProcessor( - data: data, callbacks: callbacks, processingQueue: context.options.processingQueue - ) - processor.onImageProcessed.delegate(on: self) { (self, done) in - // `onImageProcessed` will be called for `callbacks.count` times, with each - // `SessionDataTask.TaskCallback` as the input parameter. - // result: Result, callback: SessionDataTask.TaskCallback - let (result, callback) = done - - self.reportDidProcessImage(result: result, url: context.url, response: response) - - let imageResult = result.map { ImageLoadingResult(image: $0, url: context.url, originalData: data) } - let queue = callback.options.callbackQueue - queue.execute { callback.onCompleted?.call(imageResult) } - } - processor.process() - - case .failure(let error): - callbacks.forEach { callback in - let queue = callback.options.callbackQueue - queue.execute { callback.onCompleted?.call(.failure(error)) } - } - } - } - - reportWillDownloadImage(url: context.url, request: context.request) - sessionTask.resume() - return downloadTask - } - - // MARK: Downloading Task - /// Downloads an image with a URL and option. Invoked internally by Kingfisher. Subclasses must invoke super. - /// - /// - Parameters: - /// - url: Target URL. - /// - options: The options could control download behavior. See `KingfisherOptionsInfo`. - /// - completionHandler: Called when the download progress finishes. This block will be called in the queue - /// defined in `.callbackQueue` in `options` parameter. - /// - Returns: A downloading task. You could call `cancel` on it to stop the download task. - @discardableResult - open func downloadImage( - with url: URL, - options: KingfisherParsedOptionsInfo, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - var downloadTask: DownloadTask? - createDownloadContext(with: url, options: options) { result in - switch result { - case .success(let context): - // `downloadTask` will be set if the downloading started immediately. This is the case when no request - // modifier or a sync modifier (`ImageDownloadRequestModifier`) is used. Otherwise, when an - // `AsyncImageDownloadRequestModifier` is used the returned `downloadTask` of this method will be `nil` - // and the actual "delayed" task is given in `AsyncImageDownloadRequestModifier.onDownloadTaskStarted` - // callback. - downloadTask = self.startDownloadTask( - context: context, - callback: self.createTaskCallback(completionHandler, options: options) - ) - if let modifier = options.requestModifier { - modifier.onDownloadTaskStarted?(downloadTask) - } - case .failure(let error): - options.callbackQueue.execute { - completionHandler?(.failure(error)) - } - } - } - - return downloadTask - } - - /// Downloads an image with a URL and option. - /// - /// - Parameters: - /// - url: Target URL. - /// - options: The options could control download behavior. See `KingfisherOptionsInfo`. - /// - progressBlock: Called when the download progress updated. This block will be always be called in main queue. - /// - completionHandler: Called when the download progress finishes. This block will be called in the queue - /// defined in `.callbackQueue` in `options` parameter. - /// - Returns: A downloading task. You could call `cancel` on it to stop the download task. - @discardableResult - open func downloadImage( - with url: URL, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - var info = KingfisherParsedOptionsInfo(options) - if let block = progressBlock { - info.onDataReceived = (info.onDataReceived ?? []) + [ImageLoadingProgressSideEffect(block)] - } - return downloadImage( - with: url, - options: info, - completionHandler: completionHandler) - } - - /// Downloads an image with a URL and option. - /// - /// - Parameters: - /// - url: Target URL. - /// - options: The options could control download behavior. See `KingfisherOptionsInfo`. - /// - completionHandler: Called when the download progress finishes. This block will be called in the queue - /// defined in `.callbackQueue` in `options` parameter. - /// - Returns: A downloading task. You could call `cancel` on it to stop the download task. - @discardableResult - open func downloadImage( - with url: URL, - options: KingfisherOptionsInfo? = nil, - completionHandler: ((Result) -> Void)? = nil) -> DownloadTask? - { - downloadImage( - with: url, - options: KingfisherParsedOptionsInfo(options), - completionHandler: completionHandler - ) - } -} - -// MARK: Cancelling Task -extension ImageDownloader { - - /// Cancel all downloading tasks for this `ImageDownloader`. It will trigger the completion handlers - /// for all not-yet-finished downloading tasks. - /// - /// If you need to only cancel a certain task, call `cancel()` on the `DownloadTask` - /// returned by the downloading methods. If you need to cancel all `DownloadTask`s of a certain url, - /// use `ImageDownloader.cancel(url:)`. - public func cancelAll() { - sessionDelegate.cancelAll() - } - - /// Cancel all downloading tasks for a given URL. It will trigger the completion handlers for - /// all not-yet-finished downloading tasks for the URL. - /// - /// - Parameter url: The URL which you want to cancel downloading. - public func cancel(url: URL) { - sessionDelegate.cancel(url: url) - } -} - -// Use the default implementation from extension of `AuthenticationChallengeResponsible`. -extension ImageDownloader: AuthenticationChallengeResponsible {} - -// Use the default implementation from extension of `ImageDownloaderDelegate`. -extension ImageDownloader: ImageDownloaderDelegate {} - -extension ImageDownloader { - struct DownloadingContext { - let url: URL - let request: URLRequest - let options: KingfisherParsedOptionsInfo - } -} diff --git a/Pods/Kingfisher/Sources/Networking/ImageDownloaderDelegate.swift b/Pods/Kingfisher/Sources/Networking/ImageDownloaderDelegate.swift deleted file mode 100644 index 7343a249..00000000 --- a/Pods/Kingfisher/Sources/Networking/ImageDownloaderDelegate.swift +++ /dev/null @@ -1,189 +0,0 @@ -// -// ImageDownloaderDelegate.swift -// Kingfisher -// -// Created by Wei Wang on 2018/10/11. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -/// Protocol of `ImageDownloader`. This protocol provides a set of methods which are related to image downloader -/// working stages and rules. -public protocol ImageDownloaderDelegate: AnyObject { - - /// Called when the `ImageDownloader` object will start downloading an image from a specified URL. - /// - /// - Parameters: - /// - downloader: The `ImageDownloader` object which is used for the downloading operation. - /// - url: URL of the starting request. - /// - request: The request object for the download process. - /// - func imageDownloader(_ downloader: ImageDownloader, willDownloadImageForURL url: URL, with request: URLRequest?) - - /// Called when the `ImageDownloader` completes a downloading request with success or failure. - /// - /// - Parameters: - /// - downloader: The `ImageDownloader` object which is used for the downloading operation. - /// - url: URL of the original request URL. - /// - response: The response object of the downloading process. - /// - error: The error in case of failure. - /// - func imageDownloader( - _ downloader: ImageDownloader, - didFinishDownloadingImageForURL url: URL, - with response: URLResponse?, - error: Error?) - - /// Called when the `ImageDownloader` object successfully downloaded image data from specified URL. This is - /// your last chance to verify or modify the downloaded data before Kingfisher tries to perform addition - /// processing on the image data. - /// - /// - Parameters: - /// - downloader: The `ImageDownloader` object which is used for the downloading operation. - /// - data: The original downloaded data. - /// - dataTask: The data task contains request and response information of the download. - /// - Note: - /// This can be used to pre-process raw image data before creation of `Image` instance (i.e. - /// decrypting or verification). If `nil` returned, the processing is interrupted and a `KingfisherError` with - /// `ResponseErrorReason.dataModifyingFailed` will be raised. You could use this fact to stop the image - /// processing flow if you find the data is corrupted or malformed. - /// - /// If this method is implemented, `imageDownloader(_:didDownload:for:)` will not be called anymore. - func imageDownloader(_ downloader: ImageDownloader, didDownload data: Data, with dataTask: SessionDataTask) -> Data? - - /// Called when the `ImageDownloader` object successfully downloaded image data from specified URL. This is - /// your last chance to verify or modify the downloaded data before Kingfisher tries to perform addition - /// processing on the image data. - /// - /// - Parameters: - /// - downloader: The `ImageDownloader` object which is used for the downloading operation. - /// - data: The original downloaded data. - /// - url: The URL of the original request URL. - /// - Returns: The data from which Kingfisher should use to create an image. You need to provide valid data - /// which content is one of the supported image file format. Kingfisher will perform process on this - /// data and try to convert it to an image object. - /// - Note: - /// This can be used to pre-process raw image data before creation of `Image` instance (i.e. - /// decrypting or verification). If `nil` returned, the processing is interrupted and a `KingfisherError` with - /// `ResponseErrorReason.dataModifyingFailed` will be raised. You could use this fact to stop the image - /// processing flow if you find the data is corrupted or malformed. - /// - /// If `imageDownloader(_:didDownload:with:)` is implemented, this method will not be called anymore. - func imageDownloader(_ downloader: ImageDownloader, didDownload data: Data, for url: URL) -> Data? - - /// Called when the `ImageDownloader` object successfully downloads and processes an image from specified URL. - /// - /// - Parameters: - /// - downloader: The `ImageDownloader` object which is used for the downloading operation. - /// - image: The downloaded and processed image. - /// - url: URL of the original request URL. - /// - response: The original response object of the downloading process. - /// - func imageDownloader( - _ downloader: ImageDownloader, - didDownload image: KFCrossPlatformImage, - for url: URL, - with response: URLResponse?) - - /// Checks if a received HTTP status code is valid or not. - /// By default, a status code in range 200..<400 is considered as valid. - /// If an invalid code is received, the downloader will raise an `KingfisherError` with - /// `ResponseErrorReason.invalidHTTPStatusCode` as its reason. - /// - /// - Parameters: - /// - code: The received HTTP status code. - /// - downloader: The `ImageDownloader` object asks for validate status code. - /// - Returns: Returns a value to indicate whether this HTTP status code is valid or not. - /// - Note: If the default 200 to 400 valid code does not suit your need, - /// you can implement this method to change that behavior. - func isValidStatusCode(_ code: Int, for downloader: ImageDownloader) -> Bool - - /// Called when the task has received a valid HTTP response after it passes other checks such as the status code. - /// You can perform additional checks or verification on the response to determine if the download should be allowed. - /// - /// For example, it is useful if you want to verify some header values in the response before actually starting the - /// download. - /// - /// If implemented, it is your responsibility to call the `completionHandler` with a proper response disposition, - /// such as `.allow` to start the actual downloading or `.cancel` to cancel the task. If `.cancel` is used as the - /// disposition, the downloader will raise an `KingfisherError` with - /// `ResponseErrorReason.cancelledByDelegate` as its reason. If not implemented, any response which passes other - /// checked will be allowed and the download starts. - /// - /// - Parameters: - /// - downloader: The `ImageDownloader` object which is used for the downloading operation. - /// - response: The original response object of the downloading process. - /// - completionHandler: A completion handler that receives the disposition for the download task. You must call - /// this handler with either `.allow` or `.cancel`. - func imageDownloader( - _ downloader: ImageDownloader, - didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) -} - -// Default implementation for `ImageDownloaderDelegate`. -extension ImageDownloaderDelegate { - public func imageDownloader( - _ downloader: ImageDownloader, - willDownloadImageForURL url: URL, - with request: URLRequest?) {} - - public func imageDownloader( - _ downloader: ImageDownloader, - didFinishDownloadingImageForURL url: URL, - with response: URLResponse?, - error: Error?) {} - - public func imageDownloader( - _ downloader: ImageDownloader, - didDownload image: KFCrossPlatformImage, - for url: URL, - with response: URLResponse?) {} - - public func isValidStatusCode(_ code: Int, for downloader: ImageDownloader) -> Bool { - return (200..<400).contains(code) - } - - public func imageDownloader(_ downloader: ImageDownloader, didDownload data: Data, with task: SessionDataTask) -> Data? { - guard let url = task.originalURL else { - return data - } - return imageDownloader(downloader, didDownload: data, for: url) - } - - public func imageDownloader(_ downloader: ImageDownloader, didDownload data: Data, for url: URL) -> Data? { - return data - } - - public func imageDownloader( - _ downloader: ImageDownloader, - didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) { - completionHandler(.allow) - } - -} diff --git a/Pods/Kingfisher/Sources/Networking/ImageModifier.swift b/Pods/Kingfisher/Sources/Networking/ImageModifier.swift deleted file mode 100644 index 955ab76e..00000000 --- a/Pods/Kingfisher/Sources/Networking/ImageModifier.swift +++ /dev/null @@ -1,120 +0,0 @@ -// -// ImageModifier.swift -// Kingfisher -// -// Created by Ethan Gill on 2017/11/28. -// -// Copyright (c) 2019 Ethan Gill -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -/// An `ImageModifier` can be used to change properties on an image between cache serialization and the actual use of -/// the image. The `modify(_:)` method will be called after the image retrieved from its source and before it returned -/// to the caller. This modified image is expected to be only used for rendering purpose, any changes applied by the -/// `ImageModifier` will not be serialized or cached. -public protocol ImageModifier { - /// Modify an input `Image`. - /// - /// - parameter image: Image which will be modified by `self` - /// - /// - returns: The modified image. - /// - /// - Note: The return value will be unmodified if modifying is not possible on - /// the current platform. - /// - Note: Most modifiers support UIImage or NSImage, but not CGImage. - func modify(_ image: KFCrossPlatformImage) -> KFCrossPlatformImage -} - -/// A wrapper for creating an `ImageModifier` easier. -/// This type conforms to `ImageModifier` and wraps an image modify block. -/// If the `block` throws an error, the original image will be used. -public struct AnyImageModifier: ImageModifier { - - /// A block which modifies images, or returns the original image - /// if modification cannot be performed with an error. - let block: (KFCrossPlatformImage) throws -> KFCrossPlatformImage - - /// Creates an `AnyImageModifier` with a given `modify` block. - public init(modify: @escaping (KFCrossPlatformImage) throws -> KFCrossPlatformImage) { - block = modify - } - - /// Modify an input `Image`. See `ImageModifier` protocol for more. - public func modify(_ image: KFCrossPlatformImage) -> KFCrossPlatformImage { - return (try? block(image)) ?? image - } -} - -#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS) -import UIKit - -/// Modifier for setting the rendering mode of images. -public struct RenderingModeImageModifier: ImageModifier { - - /// The rendering mode to apply to the image. - public let renderingMode: UIImage.RenderingMode - - /// Creates a `RenderingModeImageModifier`. - /// - /// - Parameter renderingMode: The rendering mode to apply to the image. Default is `.automatic`. - public init(renderingMode: UIImage.RenderingMode = .automatic) { - self.renderingMode = renderingMode - } - - /// Modify an input `Image`. See `ImageModifier` protocol for more. - public func modify(_ image: KFCrossPlatformImage) -> KFCrossPlatformImage { - return image.withRenderingMode(renderingMode) - } -} - -/// Modifier for setting the `flipsForRightToLeftLayoutDirection` property of images. -public struct FlipsForRightToLeftLayoutDirectionImageModifier: ImageModifier { - - /// Creates a `FlipsForRightToLeftLayoutDirectionImageModifier`. - public init() {} - - /// Modify an input `Image`. See `ImageModifier` protocol for more. - public func modify(_ image: KFCrossPlatformImage) -> KFCrossPlatformImage { - return image.imageFlippedForRightToLeftLayoutDirection() - } -} - -/// Modifier for setting the `alignmentRectInsets` property of images. -public struct AlignmentRectInsetsImageModifier: ImageModifier { - - /// The alignment insets to apply to the image - public let alignmentInsets: UIEdgeInsets - - /// Creates an `AlignmentRectInsetsImageModifier`. - public init(alignmentInsets: UIEdgeInsets) { - self.alignmentInsets = alignmentInsets - } - - /// Modify an input `Image`. See `ImageModifier` protocol for more. - public func modify(_ image: KFCrossPlatformImage) -> KFCrossPlatformImage { - return image.withAlignmentRectInsets(alignmentInsets) - } -} -#endif diff --git a/Pods/Kingfisher/Sources/Networking/ImagePrefetcher.swift b/Pods/Kingfisher/Sources/Networking/ImagePrefetcher.swift deleted file mode 100644 index e8011ed4..00000000 --- a/Pods/Kingfisher/Sources/Networking/ImagePrefetcher.swift +++ /dev/null @@ -1,442 +0,0 @@ -// -// ImagePrefetcher.swift -// Kingfisher -// -// Created by Claire Knight on 24/02/2016 -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - - -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -/// Progress update block of prefetcher when initialized with a list of resources. -/// -/// - `skippedResources`: An array of resources that are already cached before the prefetching starting. -/// - `failedResources`: An array of resources that fail to be downloaded. It could because of being cancelled while -/// downloading, encountered an error when downloading or the download not being started at all. -/// - `completedResources`: An array of resources that are downloaded and cached successfully. -public typealias PrefetcherProgressBlock = - ((_ skippedResources: [Resource], _ failedResources: [Resource], _ completedResources: [Resource]) -> Void) - -/// Progress update block of prefetcher when initialized with a list of resources. -/// -/// - `skippedSources`: An array of sources that are already cached before the prefetching starting. -/// - `failedSources`: An array of sources that fail to be fetched. -/// - `completedResources`: An array of sources that are fetched and cached successfully. -public typealias PrefetcherSourceProgressBlock = - ((_ skippedSources: [Source], _ failedSources: [Source], _ completedSources: [Source]) -> Void) - -/// Completion block of prefetcher when initialized with a list of sources. -/// -/// - `skippedResources`: An array of resources that are already cached before the prefetching starting. -/// - `failedResources`: An array of resources that fail to be downloaded. It could because of being cancelled while -/// downloading, encountered an error when downloading or the download not being started at all. -/// - `completedResources`: An array of resources that are downloaded and cached successfully. -public typealias PrefetcherCompletionHandler = - ((_ skippedResources: [Resource], _ failedResources: [Resource], _ completedResources: [Resource]) -> Void) - -/// Completion block of prefetcher when initialized with a list of sources. -/// -/// - `skippedSources`: An array of sources that are already cached before the prefetching starting. -/// - `failedSources`: An array of sources that fail to be fetched. -/// - `completedSources`: An array of sources that are fetched and cached successfully. -public typealias PrefetcherSourceCompletionHandler = - ((_ skippedSources: [Source], _ failedSources: [Source], _ completedSources: [Source]) -> Void) - -/// `ImagePrefetcher` represents a downloading manager for requesting many images via URLs, then caching them. -/// This is useful when you know a list of image resources and want to download them before showing. It also works with -/// some Cocoa prefetching mechanism like table view or collection view `prefetchDataSource`, to start image downloading -/// and caching before they display on screen. -public class ImagePrefetcher: CustomStringConvertible { - - public var description: String { - return "\(Unmanaged.passUnretained(self).toOpaque())" - } - - /// The maximum concurrent downloads to use when prefetching images. Default is 5. - public var maxConcurrentDownloads = 5 - - private let prefetchSources: [Source] - private let optionsInfo: KingfisherParsedOptionsInfo - - private var progressBlock: PrefetcherProgressBlock? - private var completionHandler: PrefetcherCompletionHandler? - - private var progressSourceBlock: PrefetcherSourceProgressBlock? - private var completionSourceHandler: PrefetcherSourceCompletionHandler? - - private var tasks = [String: DownloadTask.WrappedTask]() - - private var pendingSources: ArraySlice - private var skippedSources = [Source]() - private var completedSources = [Source]() - private var failedSources = [Source]() - - private var stopped = false - - // A manager used for prefetching. We will use the helper methods in manager. - private let manager: KingfisherManager - - private let prefetchQueue = DispatchQueue(label: "com.onevcat.Kingfisher.ImagePrefetcher.prefetchQueue") - private static let requestingQueue = DispatchQueue(label: "com.onevcat.Kingfisher.ImagePrefetcher.requestingQueue") - - private var finished: Bool { - let totalFinished: Int = failedSources.count + skippedSources.count + completedSources.count - return totalFinished == prefetchSources.count && tasks.isEmpty - } - - /// Creates an image prefetcher with an array of URLs. - /// - /// The prefetcher should be initiated with a list of prefetching targets. The URLs list is immutable. - /// After you get a valid `ImagePrefetcher` object, you call `start()` on it to begin the prefetching process. - /// The images which are already cached will be skipped without downloading again. - /// - /// - Parameters: - /// - urls: The URLs which should be prefetched. - /// - options: Options could control some behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called every time an resource is downloaded, skipped or cancelled. - /// - completionHandler: Called when the whole prefetching process finished. - /// - /// - Note: - /// By default, the `ImageDownloader.defaultDownloader` and `ImageCache.defaultCache` will be used as - /// the downloader and cache target respectively. You can specify another downloader or cache by using - /// a customized `KingfisherOptionsInfo`. Both the progress and completion block will be invoked in - /// main thread. The `.callbackQueue` value in `optionsInfo` will be ignored in this method. - public convenience init( - urls: [URL], - options: KingfisherOptionsInfo? = nil, - progressBlock: PrefetcherProgressBlock? = nil, - completionHandler: PrefetcherCompletionHandler? = nil) - { - let resources: [Resource] = urls.map { $0 } - self.init( - resources: resources, - options: options, - progressBlock: progressBlock, - completionHandler: completionHandler) - } - - /// Creates an image prefetcher with an array of URLs. - /// - /// The prefetcher should be initiated with a list of prefetching targets. The URLs list is immutable. - /// After you get a valid `ImagePrefetcher` object, you call `start()` on it to begin the prefetching process. - /// The images which are already cached will be skipped without downloading again. - /// - /// - Parameters: - /// - urls: The URLs which should be prefetched. - /// - options: Options could control some behaviors. See `KingfisherOptionsInfo` for more. - /// - completionHandler: Called when the whole prefetching process finished. - /// - /// - Note: - /// By default, the `ImageDownloader.defaultDownloader` and `ImageCache.defaultCache` will be used as - /// the downloader and cache target respectively. You can specify another downloader or cache by using - /// a customized `KingfisherOptionsInfo`. Both the progress and completion block will be invoked in - /// main thread. The `.callbackQueue` value in `optionsInfo` will be ignored in this method. - public convenience init( - urls: [URL], - options: KingfisherOptionsInfo? = nil, - completionHandler: PrefetcherCompletionHandler? = nil) - { - let resources: [Resource] = urls.map { $0 } - self.init( - resources: resources, - options: options, - progressBlock: nil, - completionHandler: completionHandler) - } - - /// Creates an image prefetcher with an array of resources. - /// - /// - Parameters: - /// - resources: The resources which should be prefetched. See `Resource` type for more. - /// - options: Options could control some behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called every time an resource is downloaded, skipped or cancelled. - /// - completionHandler: Called when the whole prefetching process finished. - /// - /// - Note: - /// By default, the `ImageDownloader.defaultDownloader` and `ImageCache.defaultCache` will be used as - /// the downloader and cache target respectively. You can specify another downloader or cache by using - /// a customized `KingfisherOptionsInfo`. Both the progress and completion block will be invoked in - /// main thread. The `.callbackQueue` value in `optionsInfo` will be ignored in this method. - public convenience init( - resources: [Resource], - options: KingfisherOptionsInfo? = nil, - progressBlock: PrefetcherProgressBlock? = nil, - completionHandler: PrefetcherCompletionHandler? = nil) - { - self.init(sources: resources.map { $0.convertToSource() }, options: options) - self.progressBlock = progressBlock - self.completionHandler = completionHandler - } - - /// Creates an image prefetcher with an array of resources. - /// - /// - Parameters: - /// - resources: The resources which should be prefetched. See `Resource` type for more. - /// - options: Options could control some behaviors. See `KingfisherOptionsInfo` for more. - /// - completionHandler: Called when the whole prefetching process finished. - /// - /// - Note: - /// By default, the `ImageDownloader.defaultDownloader` and `ImageCache.defaultCache` will be used as - /// the downloader and cache target respectively. You can specify another downloader or cache by using - /// a customized `KingfisherOptionsInfo`. Both the progress and completion block will be invoked in - /// main thread. The `.callbackQueue` value in `optionsInfo` will be ignored in this method. - public convenience init( - resources: [Resource], - options: KingfisherOptionsInfo? = nil, - completionHandler: PrefetcherCompletionHandler? = nil) - { - self.init(sources: resources.map { $0.convertToSource() }, options: options) - self.completionHandler = completionHandler - } - - /// Creates an image prefetcher with an array of sources. - /// - /// - Parameters: - /// - sources: The sources which should be prefetched. See `Source` type for more. - /// - options: Options could control some behaviors. See `KingfisherOptionsInfo` for more. - /// - progressBlock: Called every time an source fetching successes, fails, is skipped. - /// - completionHandler: Called when the whole prefetching process finished. - /// - /// - Note: - /// By default, the `ImageDownloader.defaultDownloader` and `ImageCache.defaultCache` will be used as - /// the downloader and cache target respectively. You can specify another downloader or cache by using - /// a customized `KingfisherOptionsInfo`. Both the progress and completion block will be invoked in - /// main thread. The `.callbackQueue` value in `optionsInfo` will be ignored in this method. - public convenience init(sources: [Source], - options: KingfisherOptionsInfo? = nil, - progressBlock: PrefetcherSourceProgressBlock? = nil, - completionHandler: PrefetcherSourceCompletionHandler? = nil) - { - self.init(sources: sources, options: options) - self.progressSourceBlock = progressBlock - self.completionSourceHandler = completionHandler - } - - /// Creates an image prefetcher with an array of sources. - /// - /// - Parameters: - /// - sources: The sources which should be prefetched. See `Source` type for more. - /// - options: Options could control some behaviors. See `KingfisherOptionsInfo` for more. - /// - completionHandler: Called when the whole prefetching process finished. - /// - /// - Note: - /// By default, the `ImageDownloader.defaultDownloader` and `ImageCache.defaultCache` will be used as - /// the downloader and cache target respectively. You can specify another downloader or cache by using - /// a customized `KingfisherOptionsInfo`. Both the progress and completion block will be invoked in - /// main thread. The `.callbackQueue` value in `optionsInfo` will be ignored in this method. - public convenience init(sources: [Source], - options: KingfisherOptionsInfo? = nil, - completionHandler: PrefetcherSourceCompletionHandler? = nil) - { - self.init(sources: sources, options: options) - self.completionSourceHandler = completionHandler - } - - init(sources: [Source], options: KingfisherOptionsInfo?) { - var options = KingfisherParsedOptionsInfo(options) - prefetchSources = sources - pendingSources = ArraySlice(sources) - - // We want all callbacks from our prefetch queue, so we should ignore the callback queue in options. - // Add our own callback dispatch queue to make sure all internal callbacks are - // coming back in our expected queue. - options.callbackQueue = .dispatch(prefetchQueue) - optionsInfo = options - - let cache = optionsInfo.targetCache ?? .default - let downloader = optionsInfo.downloader ?? .default - manager = KingfisherManager(downloader: downloader, cache: cache) - } - - /// Starts to download the resources and cache them. This can be useful for background downloading - /// of assets that are required for later use in an app. This code will not try and update any UI - /// with the results of the process. - public func start() { - prefetchQueue.async { - guard !self.stopped else { - assertionFailure("You can not restart the same prefetcher. Try to create a new prefetcher.") - self.handleComplete() - return - } - - guard self.maxConcurrentDownloads > 0 else { - assertionFailure("There should be concurrent downloads value should be at least 1.") - self.handleComplete() - return - } - - // Empty case. - guard self.prefetchSources.count > 0 else { - self.handleComplete() - return - } - - let initialConcurrentDownloads = min(self.prefetchSources.count, self.maxConcurrentDownloads) - for _ in 0 ..< initialConcurrentDownloads { - if let resource = self.pendingSources.popFirst() { - self.startPrefetching(resource) - } - } - } - } - - /// Stops current downloading progress, and cancel any future prefetching activity that might be occuring. - public func stop() { - prefetchQueue.async { - if self.finished { return } - self.stopped = true - self.tasks.values.forEach { $0.cancel() } - } - } - - private func downloadAndCache(_ source: Source) { - - let downloadTaskCompletionHandler: ((Result) -> Void) = { result in - self.tasks.removeValue(forKey: source.cacheKey) - do { - let _ = try result.get() - self.completedSources.append(source) - } catch { - self.failedSources.append(source) - } - - self.reportProgress() - if self.stopped { - if self.tasks.isEmpty { - self.failedSources.append(contentsOf: self.pendingSources) - self.handleComplete() - } - } else { - self.reportCompletionOrStartNext() - } - } - - var downloadTask: DownloadTask.WrappedTask? - ImagePrefetcher.requestingQueue.sync { - let context = RetrievingContext( - options: optionsInfo, originalSource: source - ) - downloadTask = manager.loadAndCacheImage( - source: source, - context: context, - completionHandler: downloadTaskCompletionHandler) - } - - if let downloadTask = downloadTask { - tasks[source.cacheKey] = downloadTask - } - } - - private func append(cached source: Source) { - skippedSources.append(source) - - reportProgress() - reportCompletionOrStartNext() - } - - private func startPrefetching(_ source: Source) - { - if optionsInfo.forceRefresh { - downloadAndCache(source) - return - } - - let cacheType = manager.cache.imageCachedType( - forKey: source.cacheKey, - processorIdentifier: optionsInfo.processor.identifier) - switch cacheType { - case .memory: - append(cached: source) - case .disk: - if optionsInfo.alsoPrefetchToMemory { - let context = RetrievingContext(options: optionsInfo, originalSource: source) - _ = manager.retrieveImageFromCache( - source: source, - context: context) - { - _ in - self.append(cached: source) - } - } else { - append(cached: source) - } - case .none: - downloadAndCache(source) - } - } - - private func reportProgress() { - - if progressBlock == nil && progressSourceBlock == nil { - return - } - - let skipped = self.skippedSources - let failed = self.failedSources - let completed = self.completedSources - CallbackQueue.mainCurrentOrAsync.execute { - self.progressSourceBlock?(skipped, failed, completed) - self.progressBlock?( - skipped.compactMap { $0.asResource }, - failed.compactMap { $0.asResource }, - completed.compactMap { $0.asResource } - ) - } - } - - private func reportCompletionOrStartNext() { - if let resource = self.pendingSources.popFirst() { - // Loose call stack for huge ammount of sources. - prefetchQueue.async { self.startPrefetching(resource) } - } else { - guard allFinished else { return } - self.handleComplete() - } - } - - var allFinished: Bool { - return skippedSources.count + failedSources.count + completedSources.count == prefetchSources.count - } - - private func handleComplete() { - - if completionHandler == nil && completionSourceHandler == nil { - return - } - - // The completion handler should be called on the main thread - CallbackQueue.mainCurrentOrAsync.execute { - self.completionSourceHandler?(self.skippedSources, self.failedSources, self.completedSources) - self.completionHandler?( - self.skippedSources.compactMap { $0.asResource }, - self.failedSources.compactMap { $0.asResource }, - self.completedSources.compactMap { $0.asResource } - ) - self.completionHandler = nil - self.progressBlock = nil - } - } -} diff --git a/Pods/Kingfisher/Sources/Networking/RedirectHandler.swift b/Pods/Kingfisher/Sources/Networking/RedirectHandler.swift deleted file mode 100644 index 0d13cbe5..00000000 --- a/Pods/Kingfisher/Sources/Networking/RedirectHandler.swift +++ /dev/null @@ -1,76 +0,0 @@ -// -// RedirectHandler.swift -// Kingfisher -// -// Created by Roman Maidanovych on 2018/12/10. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -/// Represents and wraps a method for modifying request during an image download request redirection. -public protocol ImageDownloadRedirectHandler { - - /// The `ImageDownloadRedirectHandler` contained will be used to change the request before redirection. - /// This is the posibility you can modify the image download request during redirection. You can modify the - /// request for some customizing purpose, such as adding auth token to the header, do basic HTTP auth or - /// something like url mapping. - /// - /// Usually, you pass an `ImageDownloadRedirectHandler` as the associated value of - /// `KingfisherOptionsInfoItem.redirectHandler` and use it as the `options` parameter in related methods. - /// - /// If you do nothing with the input `request` and return it as is, a downloading process will redirect with it. - /// - /// - Parameters: - /// - task: The current `SessionDataTask` which triggers this redirect. - /// - response: The response received during redirection. - /// - newRequest: The request for redirection which can be modified. - /// - completionHandler: A closure for being called with modified request. - func handleHTTPRedirection( - for task: SessionDataTask, - response: HTTPURLResponse, - newRequest: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) -} - -/// A wrapper for creating an `ImageDownloadRedirectHandler` easier. -/// This type conforms to `ImageDownloadRedirectHandler` and wraps a redirect request modify block. -public struct AnyRedirectHandler: ImageDownloadRedirectHandler { - - let block: (SessionDataTask, HTTPURLResponse, URLRequest, @escaping (URLRequest?) -> Void) -> Void - - public func handleHTTPRedirection( - for task: SessionDataTask, - response: HTTPURLResponse, - newRequest: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { - block(task, response, newRequest, completionHandler) - } - - /// Creates a value of `ImageDownloadRedirectHandler` which runs `modify` block. - /// - /// - Parameter modify: The request modifying block runs when a request modifying task comes. - /// - public init(handle: @escaping (SessionDataTask, HTTPURLResponse, URLRequest, @escaping (URLRequest?) -> Void) -> Void) { - block = handle - } -} diff --git a/Pods/Kingfisher/Sources/Networking/RequestModifier.swift b/Pods/Kingfisher/Sources/Networking/RequestModifier.swift deleted file mode 100644 index a1d972df..00000000 --- a/Pods/Kingfisher/Sources/Networking/RequestModifier.swift +++ /dev/null @@ -1,108 +0,0 @@ -// -// RequestModifier.swift -// Kingfisher -// -// Created by Wei Wang on 2016/09/05. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -/// Represents and wraps a method for modifying request before an image download request starts in an asynchronous way. -public protocol AsyncImageDownloadRequestModifier { - - /// This method will be called just before the `request` being sent. - /// This is the last chance you can modify the image download request. You can modify the request for some - /// customizing purpose, such as adding auth token to the header, do basic HTTP auth or something like url mapping. - /// When you have done with the modification, call the `reportModified` block with the modified request and the data - /// download will happen with this request. - /// - /// Usually, you pass an `AsyncImageDownloadRequestModifier` as the associated value of - /// `KingfisherOptionsInfoItem.requestModifier` and use it as the `options` parameter in related methods. - /// - /// If you do nothing with the input `request` and return it as is, a downloading process will start with it. - /// - /// - Parameters: - /// - request: The input request contains necessary information like `url`. This request is generated - /// according to your resource url as a GET request. - /// - reportModified: The callback block you need to call after the asynchronous modifying done. - /// - func modified(for request: URLRequest, reportModified: @escaping (URLRequest?) -> Void) - - /// A block will be called when the download task started. - /// - /// If an `AsyncImageDownloadRequestModifier` and the asynchronous modification happens before the download, the - /// related download method will not return a valid `DownloadTask` value. Instead, you can get one from this method. - var onDownloadTaskStarted: ((DownloadTask?) -> Void)? { get } -} - -/// Represents and wraps a method for modifying request before an image download request starts. -public protocol ImageDownloadRequestModifier: AsyncImageDownloadRequestModifier { - - /// This method will be called just before the `request` being sent. - /// This is the last chance you can modify the image download request. You can modify the request for some - /// customizing purpose, such as adding auth token to the header, do basic HTTP auth or something like url mapping. - /// - /// Usually, you pass an `ImageDownloadRequestModifier` as the associated value of - /// `KingfisherOptionsInfoItem.requestModifier` and use it as the `options` parameter in related methods. - /// - /// If you do nothing with the input `request` and return it as is, a downloading process will start with it. - /// - /// - Parameter request: The input request contains necessary information like `url`. This request is generated - /// according to your resource url as a GET request. - /// - Returns: A modified version of request, which you wish to use for downloading an image. If `nil` returned, - /// a `KingfisherError.requestError` with `.emptyRequest` as its reason will occur. - /// - func modified(for request: URLRequest) -> URLRequest? -} - -extension ImageDownloadRequestModifier { - public func modified(for request: URLRequest, reportModified: @escaping (URLRequest?) -> Void) { - let request = modified(for: request) - reportModified(request) - } - - /// This is `nil` for a sync `ImageDownloadRequestModifier` by default. You can get the `DownloadTask` from the - /// return value of downloader method. - public var onDownloadTaskStarted: ((DownloadTask?) -> Void)? { return nil } -} - -/// A wrapper for creating an `ImageDownloadRequestModifier` easier. -/// This type conforms to `ImageDownloadRequestModifier` and wraps an image modify block. -public struct AnyModifier: ImageDownloadRequestModifier { - - let block: (URLRequest) -> URLRequest? - - /// For `ImageDownloadRequestModifier` conformation. - public func modified(for request: URLRequest) -> URLRequest? { - return block(request) - } - - /// Creates a value of `ImageDownloadRequestModifier` which runs `modify` block. - /// - /// - Parameter modify: The request modifying block runs when a request modifying task comes. - /// The return `URLRequest?` value of this block will be used as the image download request. - /// If `nil` returned, a `KingfisherError.requestError` with `.emptyRequest` as its - /// reason will occur. - public init(modify: @escaping (URLRequest) -> URLRequest?) { - block = modify - } -} diff --git a/Pods/Kingfisher/Sources/Networking/RetryStrategy.swift b/Pods/Kingfisher/Sources/Networking/RetryStrategy.swift deleted file mode 100644 index 1ab5a2e1..00000000 --- a/Pods/Kingfisher/Sources/Networking/RetryStrategy.swift +++ /dev/null @@ -1,153 +0,0 @@ -// -// RetryStrategy.swift -// Kingfisher -// -// Created by onevcat on 2020/05/04. -// -// Copyright (c) 2020 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -/// Represents a retry context which could be used to determine the current retry status. -public class RetryContext { - - /// The source from which the target image should be retrieved. - public let source: Source - - /// The last error which caused current retry behavior. - public let error: KingfisherError - - /// The retried count before current retry happens. This value is `0` if the current retry is for the first time. - public var retriedCount: Int - - /// A user set value for passing any other information during the retry. If you choose to use `RetryDecision.retry` - /// as the retry decision for `RetryStrategy.retry(context:retryHandler:)`, the associated value of - /// `RetryDecision.retry` will be delivered to you in the next retry. - public internal(set) var userInfo: Any? = nil - - init(source: Source, error: KingfisherError) { - self.source = source - self.error = error - self.retriedCount = 0 - } - - @discardableResult - func increaseRetryCount() -> RetryContext { - retriedCount += 1 - return self - } -} - -/// Represents decision of behavior on the current retry. -public enum RetryDecision { - /// A retry should happen. The associated `userInfo` will be pass to the next retry in the `RetryContext` parameter. - case retry(userInfo: Any?) - /// There should be no more retry attempt. The image retrieving process will fail with an error. - case stop -} - -/// Defines a retry strategy can be applied to a `.retryStrategy` option. -public protocol RetryStrategy { - - /// Kingfisher calls this method if an error happens during the image retrieving process from a `KingfisherManager`. - /// You implement this method to provide necessary logic based on the `context` parameter. Then you need to call - /// `retryHandler` to pass the retry decision back to Kingfisher. - /// - /// - Parameters: - /// - context: The retry context containing information of current retry attempt. - /// - retryHandler: A block you need to call with a decision of whether the retry should happen or not. - func retry(context: RetryContext, retryHandler: @escaping (RetryDecision) -> Void) -} - -/// A retry strategy that guides Kingfisher to retry when a `.responseError` happens, with a specified max retry count -/// and a certain interval mechanism. -public struct DelayRetryStrategy: RetryStrategy { - - /// Represents the interval mechanism which used in a `DelayRetryStrategy`. - public enum Interval { - /// The next retry attempt should happen in fixed seconds. For example, if the associated value is 3, the - /// attempts happens after 3 seconds after the previous decision is made. - case seconds(TimeInterval) - /// The next retry attempt should happen in an accumulated duration. For example, if the associated value is 3, - /// the attempts happens with interval of 3, 6, 9, 12, ... seconds. - case accumulated(TimeInterval) - /// Uses a block to determine the next interval. The current retry count is given as a parameter. - case custom(block: (_ retriedCount: Int) -> TimeInterval) - - func timeInterval(for retriedCount: Int) -> TimeInterval { - let retryAfter: TimeInterval - switch self { - case .seconds(let interval): - retryAfter = interval - case .accumulated(let interval): - retryAfter = Double(retriedCount + 1) * interval - case .custom(let block): - retryAfter = block(retriedCount) - } - return retryAfter - } - } - - /// The max retry count defined for the retry strategy - public let maxRetryCount: Int - - /// The retry interval mechanism defined for the retry strategy. - public let retryInterval: Interval - - /// Creates a delay retry strategy. - /// - Parameters: - /// - maxRetryCount: The max retry count. - /// - retryInterval: The retry interval mechanism. By default, `.seconds(3)` is used to provide a constant retry - /// interval. - public init(maxRetryCount: Int, retryInterval: Interval = .seconds(3)) { - self.maxRetryCount = maxRetryCount - self.retryInterval = retryInterval - } - - public func retry(context: RetryContext, retryHandler: @escaping (RetryDecision) -> Void) { - // Retry count exceeded. - guard context.retriedCount < maxRetryCount else { - retryHandler(.stop) - return - } - - // User cancel the task. No retry. - guard !context.error.isTaskCancelled else { - retryHandler(.stop) - return - } - - // Only retry for a response error. - guard case KingfisherError.responseError = context.error else { - retryHandler(.stop) - return - } - - let interval = retryInterval.timeInterval(for: context.retriedCount) - if interval == 0 { - retryHandler(.retry(userInfo: nil)) - } else { - DispatchQueue.main.asyncAfter(deadline: .now() + interval) { - retryHandler(.retry(userInfo: nil)) - } - } - } -} diff --git a/Pods/Kingfisher/Sources/Networking/SessionDataTask.swift b/Pods/Kingfisher/Sources/Networking/SessionDataTask.swift deleted file mode 100644 index 8932bd54..00000000 --- a/Pods/Kingfisher/Sources/Networking/SessionDataTask.swift +++ /dev/null @@ -1,127 +0,0 @@ -// -// SessionDataTask.swift -// Kingfisher -// -// Created by Wei Wang on 2018/11/1. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -/// Represents a session data task in `ImageDownloader`. It consists of an underlying `URLSessionDataTask` and -/// an array of `TaskCallback`. Multiple `TaskCallback`s could be added for a single downloading data task. -public class SessionDataTask { - - /// Represents the type of token which used for cancelling a task. - public typealias CancelToken = Int - - struct TaskCallback { - let onCompleted: Delegate, Void>? - let options: KingfisherParsedOptionsInfo - } - - /// Downloaded raw data of current task. - public private(set) var mutableData: Data - - // This is a copy of `task.originalRequest?.url`. It is for getting a race-safe behavior for a pitfall on iOS 13. - // Ref: https://github.com/onevcat/Kingfisher/issues/1511 - public let originalURL: URL? - - /// The underlying download task. It is only for debugging purpose when you encountered an error. You should not - /// modify the content of this task or start it yourself. - public let task: URLSessionDataTask - private var callbacksStore = [CancelToken: TaskCallback]() - - var callbacks: [SessionDataTask.TaskCallback] { - lock.lock() - defer { lock.unlock() } - return Array(callbacksStore.values) - } - - private var currentToken = 0 - private let lock = NSLock() - - let onTaskDone = Delegate<(Result<(Data, URLResponse?), KingfisherError>, [TaskCallback]), Void>() - let onCallbackCancelled = Delegate<(CancelToken, TaskCallback), Void>() - - var started = false - var containsCallbacks: Bool { - // We should be able to use `task.state != .running` to check it. - // However, in some rare cases, cancelling the task does not change - // task state to `.cancelling` immediately, but still in `.running`. - // So we need to check callbacks count to for sure that it is safe to remove the - // task in delegate. - return !callbacks.isEmpty - } - - init(task: URLSessionDataTask) { - self.task = task - self.originalURL = task.originalRequest?.url - mutableData = Data() - } - - func addCallback(_ callback: TaskCallback) -> CancelToken { - lock.lock() - defer { lock.unlock() } - callbacksStore[currentToken] = callback - defer { currentToken += 1 } - return currentToken - } - - func removeCallback(_ token: CancelToken) -> TaskCallback? { - lock.lock() - defer { lock.unlock() } - if let callback = callbacksStore[token] { - callbacksStore[token] = nil - return callback - } - return nil - } - - func removeAllCallbacks() -> Void { - lock.lock() - defer { lock.unlock() } - callbacksStore.removeAll() - } - - func resume() { - guard !started else { return } - started = true - task.resume() - } - - func cancel(token: CancelToken) { - guard let callback = removeCallback(token) else { - return - } - onCallbackCancelled.call((token, callback)) - } - - func forceCancel() { - for token in callbacksStore.keys { - cancel(token: token) - } - } - - func didReceiveData(_ data: Data) { - mutableData.append(data) - } -} diff --git a/Pods/Kingfisher/Sources/Networking/SessionDelegate.swift b/Pods/Kingfisher/Sources/Networking/SessionDelegate.swift deleted file mode 100644 index a4f6bf48..00000000 --- a/Pods/Kingfisher/Sources/Networking/SessionDelegate.swift +++ /dev/null @@ -1,271 +0,0 @@ -// -// SessionDelegate.swift -// Kingfisher -// -// Created by Wei Wang on 2018/11/1. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -// Represents the delegate object of downloader session. It also behave like a task manager for downloading. -@objc(KFSessionDelegate) // Fix for ObjC header name conflicting. https://github.com/onevcat/Kingfisher/issues/1530 -open class SessionDelegate: NSObject { - - typealias SessionChallengeFunc = ( - URLSession, - URLAuthenticationChallenge, - (URLSession.AuthChallengeDisposition, URLCredential?) -> Void - ) - - typealias SessionTaskChallengeFunc = ( - URLSession, - URLSessionTask, - URLAuthenticationChallenge, - (URLSession.AuthChallengeDisposition, URLCredential?) -> Void - ) - - private var tasks: [URL: SessionDataTask] = [:] - private let lock = NSLock() - - let onValidStatusCode = Delegate() - let onResponseReceived = Delegate<(URLResponse, (URLSession.ResponseDisposition) -> Void), Void>() - let onDownloadingFinished = Delegate<(URL, Result), Void>() - let onDidDownloadData = Delegate() - - let onReceiveSessionChallenge = Delegate() - let onReceiveSessionTaskChallenge = Delegate() - - func add( - _ dataTask: URLSessionDataTask, - url: URL, - callback: SessionDataTask.TaskCallback) -> DownloadTask - { - lock.lock() - defer { lock.unlock() } - - // Create a new task if necessary. - let task = SessionDataTask(task: dataTask) - task.onCallbackCancelled.delegate(on: self) { [weak task] (self, value) in - guard let task = task else { return } - - let (token, callback) = value - - let error = KingfisherError.requestError(reason: .taskCancelled(task: task, token: token)) - task.onTaskDone.call((.failure(error), [callback])) - // No other callbacks waiting, we can clear the task now. - if !task.containsCallbacks { - let dataTask = task.task - - self.cancelTask(dataTask) - self.remove(task) - } - } - let token = task.addCallback(callback) - tasks[url] = task - return DownloadTask(sessionTask: task, cancelToken: token) - } - - private func cancelTask(_ dataTask: URLSessionDataTask) { - lock.lock() - defer { lock.unlock() } - dataTask.cancel() - } - - func append( - _ task: SessionDataTask, - callback: SessionDataTask.TaskCallback) -> DownloadTask - { - let token = task.addCallback(callback) - return DownloadTask(sessionTask: task, cancelToken: token) - } - - private func remove(_ task: SessionDataTask) { - lock.lock() - defer { lock.unlock() } - - guard let url = task.originalURL else { - return - } - task.removeAllCallbacks() - tasks[url] = nil - } - - private func task(for task: URLSessionTask) -> SessionDataTask? { - lock.lock() - defer { lock.unlock() } - - guard let url = task.originalRequest?.url else { - return nil - } - guard let sessionTask = tasks[url] else { - return nil - } - guard sessionTask.task.taskIdentifier == task.taskIdentifier else { - return nil - } - return sessionTask - } - - func task(for url: URL) -> SessionDataTask? { - lock.lock() - defer { lock.unlock() } - return tasks[url] - } - - func cancelAll() { - lock.lock() - let taskValues = tasks.values - lock.unlock() - for task in taskValues { - task.forceCancel() - } - } - - func cancel(url: URL) { - lock.lock() - let task = tasks[url] - lock.unlock() - task?.forceCancel() - } -} - -extension SessionDelegate: URLSessionDataDelegate { - - open func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { - guard let httpResponse = response as? HTTPURLResponse else { - let error = KingfisherError.responseError(reason: .invalidURLResponse(response: response)) - onCompleted(task: dataTask, result: .failure(error)) - completionHandler(.cancel) - return - } - - let httpStatusCode = httpResponse.statusCode - guard onValidStatusCode.call(httpStatusCode) == true else { - let error = KingfisherError.responseError(reason: .invalidHTTPStatusCode(response: httpResponse)) - onCompleted(task: dataTask, result: .failure(error)) - completionHandler(.cancel) - return - } - - let inspectedHandler: (URLSession.ResponseDisposition) -> Void = { disposition in - if disposition == .cancel { - let error = KingfisherError.responseError(reason: .cancelledByDelegate(response: response)) - self.onCompleted(task: dataTask, result: .failure(error)) - } - completionHandler(disposition) - } - onResponseReceived.call((response, inspectedHandler)) - } - - open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - guard let task = self.task(for: dataTask) else { - return - } - - task.didReceiveData(data) - - task.callbacks.forEach { callback in - callback.options.onDataReceived?.forEach { sideEffect in - sideEffect.onDataReceived(session, task: task, data: data) - } - } - } - - open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - guard let sessionTask = self.task(for: task) else { return } - - if let url = sessionTask.originalURL { - let result: Result - if let error = error { - result = .failure(KingfisherError.responseError(reason: .URLSessionError(error: error))) - } else if let response = task.response { - result = .success(response) - } else { - result = .failure(KingfisherError.responseError(reason: .noURLResponse(task: sessionTask))) - } - onDownloadingFinished.call((url, result)) - } - - let result: Result<(Data, URLResponse?), KingfisherError> - if let error = error { - result = .failure(KingfisherError.responseError(reason: .URLSessionError(error: error))) - } else { - if let data = onDidDownloadData.call(sessionTask) { - result = .success((data, task.response)) - } else { - result = .failure(KingfisherError.responseError(reason: .dataModifyingFailed(task: sessionTask))) - } - } - onCompleted(task: task, result: result) - } - - open func urlSession( - _ session: URLSession, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - onReceiveSessionChallenge.call((session, challenge, completionHandler)) - } - - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - onReceiveSessionTaskChallenge.call((session, task, challenge, completionHandler)) - } - - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { - guard let sessionDataTask = self.task(for: task), - let redirectHandler = Array(sessionDataTask.callbacks).last?.options.redirectHandler else - { - completionHandler(request) - return - } - - redirectHandler.handleHTTPRedirection( - for: sessionDataTask, - response: response, - newRequest: request, - completionHandler: completionHandler) - } - - private func onCompleted(task: URLSessionTask, result: Result<(Data, URLResponse?), KingfisherError>) { - guard let sessionTask = self.task(for: task) else { - return - } - sessionTask.onTaskDone.call((result, sessionTask.callbacks)) - remove(sessionTask) - } -} diff --git a/Pods/Kingfisher/Sources/PrivacyInfo.xcprivacy b/Pods/Kingfisher/Sources/PrivacyInfo.xcprivacy deleted file mode 100644 index 993e1f60..00000000 --- a/Pods/Kingfisher/Sources/PrivacyInfo.xcprivacy +++ /dev/null @@ -1,25 +0,0 @@ - - - - - NSPrivacyAccessedAPITypes - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategoryFileTimestamp - NSPrivacyAccessedAPITypeReasons - - C617.1 - - - - NSPrivacyTracking - - NSPrivacyTrackingDomains - - - NSPrivacyCollectedDataTypes - - - - diff --git a/Pods/Kingfisher/Sources/SwiftUI/ImageBinder.swift b/Pods/Kingfisher/Sources/SwiftUI/ImageBinder.swift deleted file mode 100644 index 61144794..00000000 --- a/Pods/Kingfisher/Sources/SwiftUI/ImageBinder.swift +++ /dev/null @@ -1,149 +0,0 @@ -// -// ImageBinder.swift -// Kingfisher -// -// Created by onevcat on 2019/06/27. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if canImport(SwiftUI) && canImport(Combine) -import SwiftUI -import Combine - -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -extension KFImage { - - /// Represents a binder for `KFImage`. It takes responsibility as an `ObjectBinding` and performs - /// image downloading and progress reporting based on `KingfisherManager`. - class ImageBinder: ObservableObject { - - init() {} - - var downloadTask: DownloadTask? - private var loading = false - - var loadingOrSucceeded: Bool { - return loading || loadedImage != nil - } - - // Do not use @Published due to https://github.com/onevcat/Kingfisher/issues/1717. Revert to @Published once - // we can drop iOS 12. - private(set) var loaded = false - - private(set) var animating = false - - var loadedImage: KFCrossPlatformImage? = nil { willSet { objectWillChange.send() } } - var progress: Progress = .init() - - func markLoading() { - loading = true - } - - func markLoaded(sendChangeEvent: Bool) { - loaded = true - if sendChangeEvent { - objectWillChange.send() - } - } - - func start(context: Context) { - guard let source = context.source else { - CallbackQueue.mainCurrentOrAsync.execute { - context.onFailureDelegate.call(KingfisherError.imageSettingError(reason: .emptySource)) - if let image = context.options.onFailureImage { - self.loadedImage = image - } - self.loading = false - self.markLoaded(sendChangeEvent: false) - } - return - } - - loading = true - - progress = .init() - downloadTask = KingfisherManager.shared - .retrieveImage( - with: source, - options: context.options, - progressBlock: { size, total in - self.updateProgress(downloaded: size, total: total) - context.onProgressDelegate.call((size, total)) - }, - completionHandler: { [weak self] result in - - guard let self = self else { return } - - CallbackQueue.mainCurrentOrAsync.execute { - self.downloadTask = nil - self.loading = false - } - - switch result { - case .success(let value): - CallbackQueue.mainCurrentOrAsync.execute { - if let fadeDuration = context.fadeTransitionDuration(cacheType: value.cacheType) { - self.animating = true - let animation = Animation.linear(duration: fadeDuration) - withAnimation(animation) { - // Trigger the view render to apply the animation. - self.markLoaded(sendChangeEvent: true) - } - } else { - self.markLoaded(sendChangeEvent: false) - } - self.loadedImage = value.image - self.animating = false - } - - CallbackQueue.mainAsync.execute { - context.onSuccessDelegate.call(value) - } - case .failure(let error): - CallbackQueue.mainCurrentOrAsync.execute { - if let image = context.options.onFailureImage { - self.loadedImage = image - } - self.markLoaded(sendChangeEvent: true) - } - - CallbackQueue.mainAsync.execute { - context.onFailureDelegate.call(error) - } - } - }) - } - - private func updateProgress(downloaded: Int64, total: Int64) { - progress.totalUnitCount = total - progress.completedUnitCount = downloaded - objectWillChange.send() - } - - /// Cancels the download task if it is in progress. - func cancel() { - downloadTask?.cancel() - downloadTask = nil - loading = false - } - } -} -#endif diff --git a/Pods/Kingfisher/Sources/SwiftUI/ImageContext.swift b/Pods/Kingfisher/Sources/SwiftUI/ImageContext.swift deleted file mode 100644 index 730477b3..00000000 --- a/Pods/Kingfisher/Sources/SwiftUI/ImageContext.swift +++ /dev/null @@ -1,102 +0,0 @@ -// -// ImageContext.swift -// Kingfisher -// -// Created by onevcat on 2021/05/08. -// -// Copyright (c) 2021 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if canImport(SwiftUI) && canImport(Combine) -import SwiftUI -import Combine - -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -extension KFImage { - public class Context { - let source: Source? - var options = KingfisherParsedOptionsInfo( - KingfisherManager.shared.defaultOptions + [.loadDiskFileSynchronously] - ) - - var configurations: [(HoldingView) -> HoldingView] = [] - var renderConfigurations: [(HoldingView.RenderingView) -> Void] = [] - var contentConfiguration: ((HoldingView) -> AnyView)? = nil - - var cancelOnDisappear: Bool = false - var placeholder: ((Progress) -> AnyView)? = nil - - let onFailureDelegate = Delegate() - let onSuccessDelegate = Delegate() - let onProgressDelegate = Delegate<(Int64, Int64), Void>() - - var startLoadingBeforeViewAppear: Bool = false - - init(source: Source?) { - self.source = source - } - - func shouldApplyFade(cacheType: CacheType) -> Bool { - options.forceTransition || cacheType == .none - } - - func fadeTransitionDuration(cacheType: CacheType) -> TimeInterval? { - shouldApplyFade(cacheType: cacheType) - ? options.transition.fadeDuration - : nil - } - } -} - -extension ImageTransition { - // Only for fade effect in SwiftUI. - fileprivate var fadeDuration: TimeInterval? { - switch self { - case .fade(let duration): - return duration - default: - return nil - } - } -} - - -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -extension KFImage.Context: Hashable { - public static func == (lhs: KFImage.Context, rhs: KFImage.Context) -> Bool { - lhs.source == rhs.source && - lhs.options.processor.identifier == rhs.options.processor.identifier - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(source) - hasher.combine(options.processor.identifier) - } -} - -#if canImport(UIKit) && !os(watchOS) -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -extension KFAnimatedImage { - public typealias Context = KFImage.Context - typealias ImageBinder = KFImage.ImageBinder -} -#endif - -#endif diff --git a/Pods/Kingfisher/Sources/SwiftUI/KFAnimatedImage.swift b/Pods/Kingfisher/Sources/SwiftUI/KFAnimatedImage.swift deleted file mode 100644 index ad25eb23..00000000 --- a/Pods/Kingfisher/Sources/SwiftUI/KFAnimatedImage.swift +++ /dev/null @@ -1,96 +0,0 @@ -// -// KFAnimatedImage.swift -// Kingfisher -// -// Created by wangxingbin on 2021/4/29. -// -// Copyright (c) 2021 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if canImport(SwiftUI) && canImport(Combine) && canImport(UIKit) && !os(watchOS) -import SwiftUI -import Combine - -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -public struct KFAnimatedImage: KFImageProtocol { - public typealias HoldingView = KFAnimatedImageViewRepresenter - public var context: Context - public init(context: KFImage.Context) { - self.context = context - } - - /// Configures current rendering view with a `block`. This block will be applied when the under-hood - /// `AnimatedImageView` is created in `UIViewRepresentable.makeUIView(context:)` - /// - /// - Parameter block: The block applies to the animated image view. - /// - Returns: A `KFAnimatedImage` view that being configured by the `block`. - public func configure(_ block: @escaping (HoldingView.RenderingView) -> Void) -> Self { - context.renderConfigurations.append(block) - return self - } -} - -/// A wrapped `UIViewRepresentable` of `AnimatedImageView` -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -public struct KFAnimatedImageViewRepresenter: UIViewRepresentable, KFImageHoldingView { - public typealias RenderingView = AnimatedImageView - public static func created(from image: KFCrossPlatformImage?, context: KFImage.Context) -> KFAnimatedImageViewRepresenter { - KFAnimatedImageViewRepresenter(image: image, context: context) - } - - var image: KFCrossPlatformImage? - let context: KFImage.Context - - public func makeUIView(context: Context) -> AnimatedImageView { - let view = AnimatedImageView() - - self.context.renderConfigurations.forEach { $0(view) } - - view.image = image - - // Allow SwiftUI scale (fit/fill) working fine. - view.setContentCompressionResistancePriority(.defaultLow, for: .horizontal) - view.setContentCompressionResistancePriority(.defaultLow, for: .vertical) - return view - } - - public func updateUIView(_ uiView: AnimatedImageView, context: Context) { - uiView.image = image - } -} - -#if DEBUG -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -struct KFAnimatedImage_Previews: PreviewProvider { - static var previews: some View { - Group { - KFAnimatedImage(source: .network(URL(string: "https://raw.githubusercontent.com/onevcat/Kingfisher-TestImages/master/DemoAppImage/GIF/1.gif")!)) - .onSuccess { r in - print(r) - } - .placeholder { - ProgressView() - } - .padding() - } - } -} -#endif -#endif diff --git a/Pods/Kingfisher/Sources/SwiftUI/KFImage.swift b/Pods/Kingfisher/Sources/SwiftUI/KFImage.swift deleted file mode 100644 index 67f1c19a..00000000 --- a/Pods/Kingfisher/Sources/SwiftUI/KFImage.swift +++ /dev/null @@ -1,106 +0,0 @@ -// -// KFImage.swift -// Kingfisher -// -// Created by onevcat on 2019/06/26. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if canImport(SwiftUI) && canImport(Combine) -import SwiftUI -import Combine - -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -public struct KFImage: KFImageProtocol { - public var context: Context - public init(context: Context) { - self.context = context - } -} - -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -extension Image: KFImageHoldingView { - public typealias RenderingView = Image - public static func created(from image: KFCrossPlatformImage?, context: KFImage.Context) -> Image { - Image(crossPlatformImage: image) - } -} - -// MARK: - Image compatibility. -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -extension KFImage { - - public func resizable( - capInsets: EdgeInsets = EdgeInsets(), - resizingMode: Image.ResizingMode = .stretch) -> KFImage - { - configure { $0.resizable(capInsets: capInsets, resizingMode: resizingMode) } - } - - public func renderingMode(_ renderingMode: Image.TemplateRenderingMode?) -> KFImage { - configure { $0.renderingMode(renderingMode) } - } - - public func interpolation(_ interpolation: Image.Interpolation) -> KFImage { - configure { $0.interpolation(interpolation) } - } - - public func antialiased(_ isAntialiased: Bool) -> KFImage { - configure { $0.antialiased(isAntialiased) } - } - - /// Starts the loading process of `self` immediately. - /// - /// By default, a `KFImage` will not load its source until the `onAppear` is called. This is a lazily loading - /// behavior and provides better performance. However, when you refresh the view, the lazy loading also causes a - /// flickering since the loading does not happen immediately. Call this method if you want to start the load at once - /// could help avoiding the flickering, with some performance trade-off. - /// - /// - Deprecated: This is not necessary anymore since `@StateObject` is used for holding the image data. - /// It does nothing now and please just remove it. - /// - /// - Returns: The `Self` value with changes applied. - @available(*, deprecated, message: "This is not necessary anymore since `@StateObject` is used. It does nothing now and please just remove it.") - public func loadImmediately(_ start: Bool = true) -> KFImage { - return self - } -} - -#if DEBUG -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -struct KFImage_Previews: PreviewProvider { - static var previews: some View { - Group { - KFImage.url(URL(string: "https://raw.githubusercontent.com/onevcat/Kingfisher/master/images/logo.png")!) - .onSuccess { r in - print(r) - } - .placeholder { p in - ProgressView(p) - } - .resizable() - .aspectRatio(contentMode: .fit) - .padding() - } - } -} -#endif -#endif diff --git a/Pods/Kingfisher/Sources/SwiftUI/KFImageOptions.swift b/Pods/Kingfisher/Sources/SwiftUI/KFImageOptions.swift deleted file mode 100644 index a63d9097..00000000 --- a/Pods/Kingfisher/Sources/SwiftUI/KFImageOptions.swift +++ /dev/null @@ -1,158 +0,0 @@ -// -// KFImageOptions.swift -// Kingfisher -// -// Created by onevcat on 2020/12/20. -// -// Copyright (c) 2020 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if canImport(SwiftUI) && canImport(Combine) -import SwiftUI -import Combine - -// MARK: - KFImage creating. -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -extension KFImageProtocol { - - /// Creates a `KFImage` for a given `Source`. - /// - Parameters: - /// - source: The `Source` object defines data information from network or a data provider. - /// - Returns: A `KFImage` for future configuration or embedding to a `SwiftUI.View`. - public static func source( - _ source: Source? - ) -> Self - { - Self.init(source: source) - } - - /// Creates a `KFImage` for a given `Resource`. - /// - Parameters: - /// - source: The `Resource` object defines data information like key or URL. - /// - Returns: A `KFImage` for future configuration or embedding to a `SwiftUI.View`. - public static func resource( - _ resource: Resource? - ) -> Self - { - source(resource?.convertToSource()) - } - - /// Creates a `KFImage` for a given `URL`. - /// - Parameters: - /// - url: The URL where the image should be downloaded. - /// - cacheKey: The key used to store the downloaded image in cache. - /// If `nil`, the `absoluteString` of `url` is used as the cache key. - /// - Returns: A `KFImage` for future configuration or embedding to a `SwiftUI.View`. - public static func url( - _ url: URL?, cacheKey: String? = nil - ) -> Self - { - source(url?.convertToSource(overrideCacheKey: cacheKey)) - } - - /// Creates a `KFImage` for a given `ImageDataProvider`. - /// - Parameters: - /// - provider: The `ImageDataProvider` object contains information about the data. - /// - Returns: A `KFImage` for future configuration or embedding to a `SwiftUI.View`. - public static func dataProvider( - _ provider: ImageDataProvider? - ) -> Self - { - source(provider?.convertToSource()) - } - - /// Creates a builder for some given raw data and a cache key. - /// - Parameters: - /// - data: The data object from which the image should be created. - /// - cacheKey: The key used to store the downloaded image in cache. - /// - Returns: A `KFImage` for future configuration or embedding to a `SwiftUI.View`. - public static func data( - _ data: Data?, cacheKey: String - ) -> Self - { - if let data = data { - return dataProvider(RawImageDataProvider(data: data, cacheKey: cacheKey)) - } else { - return dataProvider(nil) - } - } -} - -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -extension KFImageProtocol { - /// Sets a placeholder `View` which shows when loading the image, with a progress parameter as input. - /// - Parameter content: A view that describes the placeholder. - /// - Returns: A `KFImage` view that contains `content` as its placeholder. - public func placeholder(@ViewBuilder _ content: @escaping (Progress) -> P) -> Self { - context.placeholder = { progress in - return AnyView(content(progress)) - } - return self - } - - /// Sets a placeholder `View` which shows when loading the image. - /// - Parameter content: A view that describes the placeholder. - /// - Returns: A `KFImage` view that contains `content` as its placeholder. - public func placeholder(@ViewBuilder _ content: @escaping () -> P) -> Self { - placeholder { _ in content() } - } - - /// Sets cancelling the download task bound to `self` when the view disappearing. - /// - Parameter flag: Whether cancel the task or not. - /// - Returns: A `KFImage` view that cancels downloading task when disappears. - public func cancelOnDisappear(_ flag: Bool) -> Self { - context.cancelOnDisappear = flag - return self - } - - /// Sets a fade transition for the image task. - /// - Parameter duration: The duration of the fade transition. - /// - Returns: A `KFImage` with changes applied. - /// - /// Kingfisher will use the fade transition to animate the image in if it is downloaded from web. - /// The transition will not happen when the - /// image is retrieved from either memory or disk cache by default. If you need to do the transition even when - /// the image being retrieved from cache, also call `forceRefresh()` on the returned `KFImage`. - public func fade(duration: TimeInterval) -> Self { - context.options.transition = .fade(duration) - return self - } - - /// Sets whether to start the image loading before the view actually appears. - /// - /// By default, Kingfisher performs a lazy loading for `KFImage`. The image loading won't start until the view's - /// `onAppear` is called. However, sometimes you may want to trigger an aggressive loading for the view. By enabling - /// this, the `KFImage` will try to load the view when its `body` is evaluated when the image loading is not yet - /// started or a previous loading did fail. - /// - /// - Parameter flag: Whether the image loading should happen before view appear. Default is `true`. - /// - Returns: A `KFImage` with changes applied. - /// - /// - Note: This is a temporary workaround for an issue from iOS 16, where the SwiftUI view's `onAppear` is not - /// called when it is deeply embedded inside a `List` or `ForEach`. - /// See [#1988](https://github.com/onevcat/Kingfisher/issues/1988). It may cause performance regression, especially - /// if you have a lot of images to load in the view. Use it as your own risk. - /// - public func startLoadingBeforeViewAppear(_ flag: Bool = true) -> Self { - context.startLoadingBeforeViewAppear = flag - return self - } -} -#endif diff --git a/Pods/Kingfisher/Sources/SwiftUI/KFImageProtocol.swift b/Pods/Kingfisher/Sources/SwiftUI/KFImageProtocol.swift deleted file mode 100644 index 5a5ad4ba..00000000 --- a/Pods/Kingfisher/Sources/SwiftUI/KFImageProtocol.swift +++ /dev/null @@ -1,112 +0,0 @@ -// -// KFImageProtocol.swift -// Kingfisher -// -// Created by onevcat on 2021/05/08. -// -// Copyright (c) 2021 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if canImport(SwiftUI) && canImport(Combine) -import SwiftUI -import Combine - -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -public protocol KFImageProtocol: View, KFOptionSetter { - associatedtype HoldingView: KFImageHoldingView - var context: KFImage.Context { get set } - init(context: KFImage.Context) -} - -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -extension KFImageProtocol { - public var body: some View { - ZStack { - KFImageRenderer( - context: context - ).id(context) - } - } - - /// Creates a Kingfisher compatible image view to load image from the given `Source`. - /// - Parameters: - /// - source: The image `Source` defining where to load the target image. - public init(source: Source?) { - let context = KFImage.Context(source: source) - self.init(context: context) - } - - /// Creates a Kingfisher compatible image view to load image from the given `URL`. - /// - Parameters: - /// - source: The image `Source` defining where to load the target image. - public init(_ url: URL?) { - self.init(source: url?.convertToSource()) - } - - /// Configures current image with a `block` and return another `Image` to use as the final content. - /// - /// This block will be lazily applied when creating the final `Image`. - /// - /// If multiple `configure` modifiers are added to the image, they will be evaluated by order. If you want to - /// configure the input image (which is usually an `Image` value) to a non-`Image` value, use `contentConfigure`. - /// - /// - Parameter block: The block applies to loaded image. The block should return an `Image` that is configured. - /// - Returns: A `KFImage` view that configures internal `Image` with `block`. - public func configure(_ block: @escaping (HoldingView) -> HoldingView) -> Self { - context.configurations.append(block) - return self - } - - /// Configures current image with a `block` and return a `View` to use as the final content. - /// - /// This block will be lazily applied when creating the final `Image`. - /// - /// If multiple `contentConfigure` modifiers are added to the image, only the last one will be stored and used. - /// - /// - Parameter block: The block applies to the loaded image. The block should return a `View` that is configured. - /// - Returns: A `KFImage` view that configures internal `Image` with `block`. - public func contentConfigure(_ block: @escaping (HoldingView) -> V) -> Self { - context.contentConfiguration = { AnyView(block($0)) } - return self - } -} - -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -public protocol KFImageHoldingView: View { - associatedtype RenderingView - static func created(from image: KFCrossPlatformImage?, context: KFImage.Context) -> Self -} - -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -extension KFImageProtocol { - public var options: KingfisherParsedOptionsInfo { - get { context.options } - nonmutating set { context.options = newValue } - } - - public var onFailureDelegate: Delegate { context.onFailureDelegate } - public var onSuccessDelegate: Delegate { context.onSuccessDelegate } - public var onProgressDelegate: Delegate<(Int64, Int64), Void> { context.onProgressDelegate } - - public var delegateObserver: AnyObject { context } -} - - -#endif diff --git a/Pods/Kingfisher/Sources/SwiftUI/KFImageRenderer.swift b/Pods/Kingfisher/Sources/SwiftUI/KFImageRenderer.swift deleted file mode 100644 index 5203b4ed..00000000 --- a/Pods/Kingfisher/Sources/SwiftUI/KFImageRenderer.swift +++ /dev/null @@ -1,129 +0,0 @@ -// -// KFImageRenderer.swift -// Kingfisher -// -// Created by onevcat on 2021/05/08. -// -// Copyright (c) 2021 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if canImport(SwiftUI) && canImport(Combine) -import SwiftUI -import Combine - -/// A Kingfisher compatible SwiftUI `View` to load an image from a `Source`. -/// Declaring a `KFImage` in a `View`'s body to trigger loading from the given `Source`. -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -struct KFImageRenderer : View where HoldingView: KFImageHoldingView { - - @StateObject var binder: KFImage.ImageBinder = .init() - let context: KFImage.Context - - var body: some View { - if context.startLoadingBeforeViewAppear && !binder.loadingOrSucceeded && !binder.animating { - binder.markLoading() - DispatchQueue.main.async { binder.start(context: context) } - } - - return ZStack { - renderedImage().opacity(binder.loaded ? 1.0 : 0.0) - if binder.loadedImage == nil { - ZStack { - if let placeholder = context.placeholder { - placeholder(binder.progress) - } else { - Color.clear - } - } - .onAppear { [weak binder = self.binder] in - guard let binder = binder else { - return - } - if !binder.loadingOrSucceeded { - binder.start(context: context) - } - } - .onDisappear { [weak binder = self.binder] in - guard let binder = binder else { - return - } - if context.cancelOnDisappear { - binder.cancel() - } - } - } - } - // Workaround for https://github.com/onevcat/Kingfisher/issues/1988 - // on iOS 16 there seems to be a bug that when in a List, the `onAppear` of the `ZStack` above in the - // `binder.loadedImage == nil` not get called. Adding this empty `onAppear` fixes it and the life cycle can - // work again. - // - // There is another "fix": adding an `else` clause and put a `Color.clear` there. But I believe this `onAppear` - // should work better. - // - // It should be a bug in iOS 16, I guess it is some kinds of over-optimization in list cell loading caused it. - .onAppear() - } - - @ViewBuilder - private func renderedImage() -> some View { - let configuredImage = context.configurations - .reduce(HoldingView.created(from: binder.loadedImage, context: context)) { - current, config in config(current) - } - if let contentConfiguration = context.contentConfiguration { - contentConfiguration(configuredImage) - } else { - configuredImage - } - } -} - -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -extension Image { - // Creates an Image with either UIImage or NSImage. - init(crossPlatformImage: KFCrossPlatformImage?) { - #if canImport(UIKit) - self.init(uiImage: crossPlatformImage ?? KFCrossPlatformImage()) - #elseif canImport(AppKit) - self.init(nsImage: crossPlatformImage ?? KFCrossPlatformImage()) - #endif - } -} - -#if canImport(UIKit) -@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) -extension UIImage.Orientation { - func toSwiftUI() -> Image.Orientation { - switch self { - case .down: return .down - case .up: return .up - case .left: return .left - case .right: return .right - case .upMirrored: return .upMirrored - case .downMirrored: return .downMirrored - case .leftMirrored: return .leftMirrored - case .rightMirrored: return .rightMirrored - @unknown default: return .up - } - } -} -#endif -#endif diff --git a/Pods/Kingfisher/Sources/Utility/Box.swift b/Pods/Kingfisher/Sources/Utility/Box.swift deleted file mode 100644 index 0303a6e4..00000000 --- a/Pods/Kingfisher/Sources/Utility/Box.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Box.swift -// Kingfisher -// -// Created by Wei Wang on 2018/3/17. -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -class Box { - var value: T - - init(_ value: T) { - self.value = value - } -} diff --git a/Pods/Kingfisher/Sources/Utility/CallbackQueue.swift b/Pods/Kingfisher/Sources/Utility/CallbackQueue.swift deleted file mode 100644 index 822af28e..00000000 --- a/Pods/Kingfisher/Sources/Utility/CallbackQueue.swift +++ /dev/null @@ -1,83 +0,0 @@ -// -// CallbackQueue.swift -// Kingfisher -// -// Created by onevcat on 2018/10/15. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -public typealias ExecutionQueue = CallbackQueue - -/// Represents callback queue behaviors when an calling of closure be dispatched. -/// -/// - asyncMain: Dispatch the calling to `DispatchQueue.main` with an `async` behavior. -/// - currentMainOrAsync: Dispatch the calling to `DispatchQueue.main` with an `async` behavior if current queue is not -/// `.main`. Otherwise, call the closure immediately in current main queue. -/// - untouch: Do not change the calling queue for closure. -/// - dispatch: Dispatches to a specified `DispatchQueue`. -public enum CallbackQueue { - /// Dispatch the calling to `DispatchQueue.main` with an `async` behavior. - case mainAsync - /// Dispatch the calling to `DispatchQueue.main` with an `async` behavior if current queue is not - /// `.main`. Otherwise, call the closure immediately in current main queue. - case mainCurrentOrAsync - /// Do not change the calling queue for closure. - case untouch - /// Dispatches to a specified `DispatchQueue`. - case dispatch(DispatchQueue) - - public func execute(_ block: @escaping () -> Void) { - switch self { - case .mainAsync: - DispatchQueue.main.async { block() } - case .mainCurrentOrAsync: - DispatchQueue.main.safeAsync { block() } - case .untouch: - block() - case .dispatch(let queue): - queue.async { block() } - } - } - - var queue: DispatchQueue { - switch self { - case .mainAsync: return .main - case .mainCurrentOrAsync: return .main - case .untouch: return OperationQueue.current?.underlyingQueue ?? .main - case .dispatch(let queue): return queue - } - } -} - -extension DispatchQueue { - // This method will dispatch the `block` to self. - // If `self` is the main queue, and current thread is main thread, the block - // will be invoked immediately instead of being dispatched. - func safeAsync(_ block: @escaping () -> Void) { - if self === DispatchQueue.main && Thread.isMainThread { - block() - } else { - async { block() } - } - } -} diff --git a/Pods/Kingfisher/Sources/Utility/Delegate.swift b/Pods/Kingfisher/Sources/Utility/Delegate.swift deleted file mode 100644 index 9caa1a61..00000000 --- a/Pods/Kingfisher/Sources/Utility/Delegate.swift +++ /dev/null @@ -1,132 +0,0 @@ -// -// Delegate.swift -// Kingfisher -// -// Created by onevcat on 2018/10/10. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation -/// A class that keeps a weakly reference for `self` when implementing `onXXX` behaviors. -/// Instead of remembering to keep `self` as weak in a stored closure: -/// -/// ```swift -/// // MyClass.swift -/// var onDone: (() -> Void)? -/// func done() { -/// onDone?() -/// } -/// -/// // ViewController.swift -/// var obj: MyClass? -/// -/// func doSomething() { -/// obj = MyClass() -/// obj!.onDone = { [weak self] in -/// self?.reportDone() -/// } -/// } -/// ``` -/// -/// You can create a `Delegate` and observe on `self`. Now, there is no retain cycle inside: -/// -/// ```swift -/// // MyClass.swift -/// let onDone = Delegate<(), Void>() -/// func done() { -/// onDone.call() -/// } -/// -/// // ViewController.swift -/// var obj: MyClass? -/// -/// func doSomething() { -/// obj = MyClass() -/// obj!.onDone.delegate(on: self) { (self, _) -/// // `self` here is shadowed and does not keep a strong ref. -/// // So you can release both `MyClass` instance and `ViewController` instance. -/// self.reportDone() -/// } -/// } -/// ``` -/// -public class Delegate { - public init() {} - - private var block: ((Input) -> Output?)? - public func delegate(on target: T, block: ((T, Input) -> Output)?) { - self.block = { [weak target] input in - guard let target = target else { return nil } - return block?(target, input) - } - } - - public func call(_ input: Input) -> Output? { - return block?(input) - } - - public func callAsFunction(_ input: Input) -> Output? { - return call(input) - } -} - -extension Delegate where Input == Void { - public func call() -> Output? { - return call(()) - } - - public func callAsFunction() -> Output? { - return call() - } -} - -extension Delegate where Input == Void, Output: OptionalProtocol { - public func call() -> Output { - return call(()) - } - - public func callAsFunction() -> Output { - return call() - } -} - -extension Delegate where Output: OptionalProtocol { - public func call(_ input: Input) -> Output { - if let result = block?(input) { - return result - } else { - return Output._createNil - } - } - - public func callAsFunction(_ input: Input) -> Output { - return call(input) - } -} - -public protocol OptionalProtocol { - static var _createNil: Self { get } -} -extension Optional : OptionalProtocol { - public static var _createNil: Optional { - return nil - } -} diff --git a/Pods/Kingfisher/Sources/Utility/ExtensionHelpers.swift b/Pods/Kingfisher/Sources/Utility/ExtensionHelpers.swift deleted file mode 100644 index 22b20638..00000000 --- a/Pods/Kingfisher/Sources/Utility/ExtensionHelpers.swift +++ /dev/null @@ -1,117 +0,0 @@ -// -// ExtensionHelpers.swift -// Kingfisher -// -// Created by onevcat on 2018/09/28. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -extension CGFloat { - var isEven: Bool { - return truncatingRemainder(dividingBy: 2.0) == 0 - } -} - -#if canImport(AppKit) && !targetEnvironment(macCatalyst) -import AppKit -extension NSBezierPath { - convenience init(roundedRect rect: NSRect, topLeftRadius: CGFloat, topRightRadius: CGFloat, - bottomLeftRadius: CGFloat, bottomRightRadius: CGFloat) - { - self.init() - - let maxCorner = min(rect.width, rect.height) / 2 - - let radiusTopLeft = min(maxCorner, max(0, topLeftRadius)) - let radiusTopRight = min(maxCorner, max(0, topRightRadius)) - let radiusBottomLeft = min(maxCorner, max(0, bottomLeftRadius)) - let radiusBottomRight = min(maxCorner, max(0, bottomRightRadius)) - - guard !rect.isEmpty else { - return - } - - let topLeft = NSPoint(x: rect.minX, y: rect.maxY) - let topRight = NSPoint(x: rect.maxX, y: rect.maxY) - let bottomRight = NSPoint(x: rect.maxX, y: rect.minY) - - move(to: NSPoint(x: rect.midX, y: rect.maxY)) - appendArc(from: topLeft, to: rect.origin, radius: radiusTopLeft) - appendArc(from: rect.origin, to: bottomRight, radius: radiusBottomLeft) - appendArc(from: bottomRight, to: topRight, radius: radiusBottomRight) - appendArc(from: topRight, to: topLeft, radius: radiusTopRight) - close() - } - - convenience init(roundedRect rect: NSRect, byRoundingCorners corners: RectCorner, radius: CGFloat) { - let radiusTopLeft = corners.contains(.topLeft) ? radius : 0 - let radiusTopRight = corners.contains(.topRight) ? radius : 0 - let radiusBottomLeft = corners.contains(.bottomLeft) ? radius : 0 - let radiusBottomRight = corners.contains(.bottomRight) ? radius : 0 - - self.init(roundedRect: rect, topLeftRadius: radiusTopLeft, topRightRadius: radiusTopRight, - bottomLeftRadius: radiusBottomLeft, bottomRightRadius: radiusBottomRight) - } -} - -extension KFCrossPlatformImage { - // macOS does not support scale. This is just for code compatibility across platforms. - convenience init?(data: Data, scale: CGFloat) { - self.init(data: data) - } -} -#endif - -#if canImport(UIKit) -import UIKit -extension RectCorner { - var uiRectCorner: UIRectCorner { - - var result: UIRectCorner = [] - - if contains(.topLeft) { result.insert(.topLeft) } - if contains(.topRight) { result.insert(.topRight) } - if contains(.bottomLeft) { result.insert(.bottomLeft) } - if contains(.bottomRight) { result.insert(.bottomRight) } - - return result - } -} -#endif - -extension Date { - var isPast: Bool { - return isPast(referenceDate: Date()) - } - - func isPast(referenceDate: Date) -> Bool { - return timeIntervalSince(referenceDate) <= 0 - } - - // `Date` in memory is a wrap for `TimeInterval`. But in file attribute it can only accept `Int` number. - // By default the system will `round` it. But it is not friendly for testing purpose. - // So we always `ceil` the value when used for file attributes. - var fileAttributeDate: Date { - return Date(timeIntervalSince1970: ceil(timeIntervalSince1970)) - } -} diff --git a/Pods/Kingfisher/Sources/Utility/Result.swift b/Pods/Kingfisher/Sources/Utility/Result.swift deleted file mode 100644 index dcdb08bd..00000000 --- a/Pods/Kingfisher/Sources/Utility/Result.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// Result.swift -// Kingfisher -// -// Created by onevcat on 2018/09/22. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -// These helper methods are not public since we do not want them to be exposed or cause any conflicting. -// However, they are just wrapper of `ResultUtil` static methods. -extension Result where Failure: Error { - - /// Evaluates the given transform closures to create a single output value. - /// - /// - Parameters: - /// - onSuccess: A closure that transforms the success value. - /// - onFailure: A closure that transforms the error value. - /// - Returns: A single `Output` value. - func match( - onSuccess: (Success) -> Output, - onFailure: (Failure) -> Output) -> Output - { - switch self { - case let .success(value): - return onSuccess(value) - case let .failure(error): - return onFailure(error) - } - } -} diff --git a/Pods/Kingfisher/Sources/Utility/Runtime.swift b/Pods/Kingfisher/Sources/Utility/Runtime.swift deleted file mode 100644 index d5818e2a..00000000 --- a/Pods/Kingfisher/Sources/Utility/Runtime.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Runtime.swift -// Kingfisher -// -// Created by Wei Wang on 2018/10/12. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation - -func getAssociatedObject(_ object: Any, _ key: UnsafeRawPointer) -> T? { - return objc_getAssociatedObject(object, key) as? T -} - -func setRetainedAssociatedObject(_ object: Any, _ key: UnsafeRawPointer, _ value: T) { - objc_setAssociatedObject(object, key, value, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) -} diff --git a/Pods/Kingfisher/Sources/Utility/SizeExtensions.swift b/Pods/Kingfisher/Sources/Utility/SizeExtensions.swift deleted file mode 100644 index 19d05d6b..00000000 --- a/Pods/Kingfisher/Sources/Utility/SizeExtensions.swift +++ /dev/null @@ -1,110 +0,0 @@ -// -// SizeExtensions.swift -// Kingfisher -// -// Created by onevcat on 2018/09/28. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import CoreGraphics - -extension CGSize: KingfisherCompatibleValue {} -extension KingfisherWrapper where Base == CGSize { - - /// Returns a size by resizing the `base` size to a target size under a given content mode. - /// - /// - Parameters: - /// - size: The target size to resize to. - /// - contentMode: Content mode of the target size should be when resizing. - /// - Returns: The resized size under the given `ContentMode`. - public func resize(to size: CGSize, for contentMode: ContentMode) -> CGSize { - switch contentMode { - case .aspectFit: - return constrained(size) - case .aspectFill: - return filling(size) - case .none: - return size - } - } - - /// Returns a size by resizing the `base` size by making it aspect fitting the given `size`. - /// - /// - Parameter size: The size in which the `base` should fit in. - /// - Returns: The size fitted in by the input `size`, while keeps `base` aspect. - public func constrained(_ size: CGSize) -> CGSize { - let aspectWidth = round(aspectRatio * size.height) - let aspectHeight = round(size.width / aspectRatio) - - return aspectWidth > size.width ? - CGSize(width: size.width, height: aspectHeight) : - CGSize(width: aspectWidth, height: size.height) - } - - /// Returns a size by resizing the `base` size by making it aspect filling the given `size`. - /// - /// - Parameter size: The size in which the `base` should fill. - /// - Returns: The size be filled by the input `size`, while keeps `base` aspect. - public func filling(_ size: CGSize) -> CGSize { - let aspectWidth = round(aspectRatio * size.height) - let aspectHeight = round(size.width / aspectRatio) - - return aspectWidth < size.width ? - CGSize(width: size.width, height: aspectHeight) : - CGSize(width: aspectWidth, height: size.height) - } - - /// Returns a `CGRect` for which the `base` size is constrained to an input `size` at a given `anchor` point. - /// - /// - Parameters: - /// - size: The size in which the `base` should be constrained to. - /// - anchor: An anchor point in which the size constraint should happen. - /// - Returns: The result `CGRect` for the constraint operation. - public func constrainedRect(for size: CGSize, anchor: CGPoint) -> CGRect { - - let unifiedAnchor = CGPoint(x: anchor.x.clamped(to: 0.0...1.0), - y: anchor.y.clamped(to: 0.0...1.0)) - - let x = unifiedAnchor.x * base.width - unifiedAnchor.x * size.width - let y = unifiedAnchor.y * base.height - unifiedAnchor.y * size.height - let r = CGRect(x: x, y: y, width: size.width, height: size.height) - - let ori = CGRect(origin: .zero, size: base) - return ori.intersection(r) - } - - private var aspectRatio: CGFloat { - return base.height == 0.0 ? 1.0 : base.width / base.height - } -} - -extension CGRect { - func scaled(_ scale: CGFloat) -> CGRect { - return CGRect(x: origin.x * scale, y: origin.y * scale, - width: size.width * scale, height: size.height * scale) - } -} - -extension Comparable { - func clamped(to limits: ClosedRange) -> Self { - return min(max(self, limits.lowerBound), limits.upperBound) - } -} diff --git a/Pods/Kingfisher/Sources/Utility/String+MD5.swift b/Pods/Kingfisher/Sources/Utility/String+MD5.swift deleted file mode 100644 index 59586b5c..00000000 --- a/Pods/Kingfisher/Sources/Utility/String+MD5.swift +++ /dev/null @@ -1,278 +0,0 @@ -// -// String+MD5.swift -// Kingfisher -// -// Created by Wei Wang on 18/09/25. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -import Foundation -import CommonCrypto - -extension String: KingfisherCompatibleValue { } -extension KingfisherWrapper where Base == String { - var md5: String { - guard let data = base.data(using: .utf8) else { - return base - } - - let message = data.withUnsafeBytes { (bytes: UnsafeRawBufferPointer) in - return [UInt8](bytes) - } - - let MD5Calculator = MD5(message) - let MD5Data = MD5Calculator.calculate() - - var MD5String = String() - for c in MD5Data { - MD5String += String(format: "%02x", c) - } - return MD5String - } - - var ext: String? { - var ext = "" - if let index = base.lastIndex(of: ".") { - let extRange = base.index(index, offsetBy: 1).. 0 ? String(firstSeg) : nil - } -} - -// array of bytes, little-endian representation -func arrayOfBytes(_ value: T, length: Int? = nil) -> [UInt8] { - let totalBytes = length ?? (MemoryLayout.size * 8) - - let valuePointer = UnsafeMutablePointer.allocate(capacity: 1) - valuePointer.pointee = value - - let bytes = valuePointer.withMemoryRebound(to: UInt8.self, capacity: totalBytes) { (bytesPointer) -> [UInt8] in - var bytes = [UInt8](repeating: 0, count: totalBytes) - for j in 0...size, totalBytes) { - bytes[totalBytes - 1 - j] = (bytesPointer + j).pointee - } - return bytes - } - - valuePointer.deinitialize(count: 1) - valuePointer.deallocate() - - return bytes -} - -extension Int { - // Array of bytes with optional padding (little-endian) - func bytes(_ totalBytes: Int = MemoryLayout.size) -> [UInt8] { - return arrayOfBytes(self, length: totalBytes) - } - -} - -protocol HashProtocol { - var message: [UInt8] { get } - // Common part for hash calculation. Prepare header data. - func prepare(_ len: Int) -> [UInt8] -} - -extension HashProtocol { - - func prepare(_ len: Int) -> [UInt8] { - var tmpMessage = message - - // Step 1. Append Padding Bits - tmpMessage.append(0x80) // append one bit (UInt8 with one bit) to message - - // append "0" bit until message length in bits ≡ 448 (mod 512) - var msgLength = tmpMessage.count - var counter = 0 - - while msgLength % len != (len - 8) { - counter += 1 - msgLength += 1 - } - - tmpMessage += [UInt8](repeating: 0, count: counter) - return tmpMessage - } -} - -func toUInt32Array(_ slice: ArraySlice) -> [UInt32] { - var result = [UInt32]() - result.reserveCapacity(16) - - for idx in stride(from: slice.startIndex, to: slice.endIndex, by: MemoryLayout.size) { - let d0 = UInt32(slice[idx.advanced(by: 3)]) << 24 - let d1 = UInt32(slice[idx.advanced(by: 2)]) << 16 - let d2 = UInt32(slice[idx.advanced(by: 1)]) << 8 - let d3 = UInt32(slice[idx]) - let val: UInt32 = d0 | d1 | d2 | d3 - - result.append(val) - } - return result -} - -struct BytesIterator: IteratorProtocol { - - let chunkSize: Int - let data: [UInt8] - - init(chunkSize: Int, data: [UInt8]) { - self.chunkSize = chunkSize - self.data = data - } - - var offset = 0 - - mutating func next() -> ArraySlice? { - let end = min(chunkSize, data.count - offset) - let result = data[offset.. 0 ? result : nil - } -} - -struct BytesSequence: Sequence { - let chunkSize: Int - let data: [UInt8] - - func makeIterator() -> BytesIterator { - return BytesIterator(chunkSize: chunkSize, data: data) - } -} - -func rotateLeft(_ value: UInt32, bits: UInt32) -> UInt32 { - return ((value << bits) & 0xFFFFFFFF) | (value >> (32 - bits)) -} - -class MD5: HashProtocol { - - let message: [UInt8] - - init (_ message: [UInt8]) { - self.message = message - } - - // specifies the per-round shift amounts - private let shifts: [UInt32] = [7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, - 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, - 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, - 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21] - - // binary integer part of the sines of integers (Radians) - private let sines: [UInt32] = [0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, - 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, - 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, - 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, - 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, - 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8, - 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, - 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, - 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, - 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, - 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x4881d05, - 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, - 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, - 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, - 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, - 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391] - - private let hashes: [UInt32] = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476] - - func calculate() -> [UInt8] { - var tmpMessage = prepare(64) - tmpMessage.reserveCapacity(tmpMessage.count + 4) - - // hash values - var hh = hashes - - // Step 2. Append Length a 64-bit representation of lengthInBits - let lengthInBits = (message.count * 8) - let lengthBytes = lengthInBits.bytes(64 / 8) - tmpMessage += lengthBytes.reversed() - - // Process the message in successive 512-bit chunks: - let chunkSizeBytes = 512 / 8 // 64 - - for chunk in BytesSequence(chunkSize: chunkSizeBytes, data: tmpMessage) { - // break chunk into sixteen 32-bit words M[j], 0 ≤ j ≤ 15 - let M = toUInt32Array(chunk) - assert(M.count == 16, "Invalid array") - - // Initialize hash value for this chunk: - var A: UInt32 = hh[0] - var B: UInt32 = hh[1] - var C: UInt32 = hh[2] - var D: UInt32 = hh[3] - - var dTemp: UInt32 = 0 - - // Main loop - for j in 0 ..< sines.count { - var g = 0 - var F: UInt32 = 0 - - switch j { - case 0...15: - F = (B & C) | ((~B) & D) - g = j - case 16...31: - F = (D & B) | (~D & C) - g = (5 * j + 1) % 16 - case 32...47: - F = B ^ C ^ D - g = (3 * j + 5) % 16 - case 48...63: - F = C ^ (B | (~D)) - g = (7 * j) % 16 - default: - break - } - dTemp = D - D = C - C = B - B = B &+ rotateLeft((A &+ F &+ sines[j] &+ M[g]), bits: shifts[j]) - A = dTemp - } - - hh[0] = hh[0] &+ A - hh[1] = hh[1] &+ B - hh[2] = hh[2] &+ C - hh[3] = hh[3] &+ D - } - var result = [UInt8]() - result.reserveCapacity(hh.count / 4) - - hh.forEach { - let itemLE = $0.littleEndian - let r1 = UInt8(itemLE & 0xff) - let r2 = UInt8((itemLE >> 8) & 0xff) - let r3 = UInt8((itemLE >> 16) & 0xff) - let r4 = UInt8((itemLE >> 24) & 0xff) - result += [r1, r2, r3, r4] - } - return result - } -} diff --git a/Pods/Kingfisher/Sources/Views/AnimatedImageView.swift b/Pods/Kingfisher/Sources/Views/AnimatedImageView.swift deleted file mode 100644 index 65f1846e..00000000 --- a/Pods/Kingfisher/Sources/Views/AnimatedImageView.swift +++ /dev/null @@ -1,732 +0,0 @@ -// -// AnimatableImageView.swift -// Kingfisher -// -// Created by bl4ckra1sond3tre on 4/22/16. -// -// The AnimatableImageView, AnimatedFrame and Animator is a modified version of -// some classes from kaishin's Gifu project (https://github.com/kaishin/Gifu) -// -// The MIT License (MIT) -// -// Copyright (c) 2019 Reda Lemeden. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// The name and characters used in the demo of this software are property of their -// respective owners. - -#if !os(watchOS) -#if canImport(UIKit) -import UIKit -import ImageIO - -/// Protocol of `AnimatedImageView`. -public protocol AnimatedImageViewDelegate: AnyObject { - - /// Called after the animatedImageView has finished each animation loop. - /// - /// - Parameters: - /// - imageView: The `AnimatedImageView` that is being animated. - /// - count: The looped count. - func animatedImageView(_ imageView: AnimatedImageView, didPlayAnimationLoops count: UInt) - - /// Called after the `AnimatedImageView` has reached the max repeat count. - /// - /// - Parameter imageView: The `AnimatedImageView` that is being animated. - func animatedImageViewDidFinishAnimating(_ imageView: AnimatedImageView) -} - -extension AnimatedImageViewDelegate { - public func animatedImageView(_ imageView: AnimatedImageView, didPlayAnimationLoops count: UInt) {} - public func animatedImageViewDidFinishAnimating(_ imageView: AnimatedImageView) {} -} - -let KFRunLoopModeCommon = RunLoop.Mode.common - -/// Represents a subclass of `UIImageView` for displaying animated image. -/// Different from showing animated image in a normal `UIImageView` (which load all frames at one time), -/// `AnimatedImageView` only tries to load several frames (defined by `framePreloadCount`) to reduce memory usage. -/// It provides a tradeoff between memory usage and CPU time. If you have a memory issue when using a normal image -/// view to load GIF data, you could give this class a try. -/// -/// Kingfisher supports setting GIF animated data to either `UIImageView` and `AnimatedImageView` out of box. So -/// it would be fairly easy to switch between them. -open class AnimatedImageView: UIImageView { - /// Proxy object for preventing a reference cycle between the `CADDisplayLink` and `AnimatedImageView`. - class TargetProxy { - private weak var target: AnimatedImageView? - - init(target: AnimatedImageView) { - self.target = target - } - - @objc func onScreenUpdate() { - target?.updateFrameIfNeeded() - } - } - - /// Enumeration that specifies repeat count of GIF - public enum RepeatCount: Equatable { - case once - case finite(count: UInt) - case infinite - - public static func ==(lhs: RepeatCount, rhs: RepeatCount) -> Bool { - switch (lhs, rhs) { - case let (.finite(l), .finite(r)): - return l == r - case (.once, .once), - (.infinite, .infinite): - return true - case (.once, .finite(let count)), - (.finite(let count), .once): - return count == 1 - case (.once, _), - (.infinite, _), - (.finite, _): - return false - } - } - } - - // MARK: - Public property - /// Whether automatically play the animation when the view become visible. Default is `true`. - public var autoPlayAnimatedImage = true - - /// The count of the frames should be preloaded before shown. - public var framePreloadCount = 10 - - /// Specifies whether the GIF frames should be pre-scaled to the image view's size or not. - /// If the downloaded image is larger than the image view's size, it will help to reduce some memory use. - /// Default is `true`. - public var needsPrescaling = true - - /// Decode the GIF frames in background thread before using. It will decode frames data and do a off-screen - /// rendering to extract pixel information in background. This can reduce the main thread CPU usage. - public var backgroundDecode = true - - /// The animation timer's run loop mode. Default is `RunLoop.Mode.common`. - /// Set this property to `RunLoop.Mode.default` will make the animation pause during UIScrollView scrolling. - public var runLoopMode = KFRunLoopModeCommon { - willSet { - guard runLoopMode != newValue else { return } - stopAnimating() - displayLink.remove(from: .main, forMode: runLoopMode) - displayLink.add(to: .main, forMode: newValue) - startAnimating() - } - } - - /// The repeat count. The animated image will keep animate until it the loop count reaches this value. - /// Setting this value to another one will reset current animation. - /// - /// Default is `.infinite`, which means the animation will last forever. - public var repeatCount = RepeatCount.infinite { - didSet { - if oldValue != repeatCount { - reset() - setNeedsDisplay() - layer.setNeedsDisplay() - } - } - } - - /// Delegate of this `AnimatedImageView` object. See `AnimatedImageViewDelegate` protocol for more. - public weak var delegate: AnimatedImageViewDelegate? - - /// The `Animator` instance that holds the frames of a specific image in memory. - public private(set) var animator: Animator? - - // MARK: - Private property - // Dispatch queue used for preloading images. - private lazy var preloadQueue: DispatchQueue = { - return DispatchQueue(label: "com.onevcat.Kingfisher.Animator.preloadQueue") - }() - - // A flag to avoid invalidating the displayLink on deinit if it was never created, because displayLink is so lazy. - private var isDisplayLinkInitialized: Bool = false - - // A display link that keeps calling the `updateFrame` method on every screen refresh. - private lazy var displayLink: CADisplayLink = { - isDisplayLinkInitialized = true - let displayLink = CADisplayLink(target: TargetProxy(target: self), selector: #selector(TargetProxy.onScreenUpdate)) - displayLink.add(to: .main, forMode: runLoopMode) - displayLink.isPaused = true - return displayLink - }() - - // MARK: - Override - override open var image: KFCrossPlatformImage? { - didSet { - if image != oldValue { - reset() - } - setNeedsDisplay() - layer.setNeedsDisplay() - } - } - - open override var isHighlighted: Bool { - get { - super.isHighlighted - } - set { - // Highlighted image is unsupported for animated images. - // See https://github.com/onevcat/Kingfisher/issues/1679 - if displayLink.isPaused { - super.isHighlighted = newValue - } - } - } - -// Workaround for Apple xcframework creating issue on Apple TV in Swift 5.8. -// https://github.com/apple/swift/issues/66015 -#if os(tvOS) - public override init(image: UIImage?, highlightedImage: UIImage?) { - super.init(image: image, highlightedImage: highlightedImage) - } - - required public init?(coder: NSCoder) { - super.init(coder: coder) - } - - init() { - super.init(frame: .zero) - } -#endif - - deinit { - if isDisplayLinkInitialized { - displayLink.invalidate() - } - } - - override open var isAnimating: Bool { - if isDisplayLinkInitialized { - return !displayLink.isPaused - } else { - return super.isAnimating - } - } - - /// Starts the animation. - override open func startAnimating() { - guard !isAnimating else { return } - guard let animator = animator else { return } - guard !animator.isReachMaxRepeatCount else { return } - - displayLink.isPaused = false - } - - /// Stops the animation. - override open func stopAnimating() { - super.stopAnimating() - if isDisplayLinkInitialized { - displayLink.isPaused = true - } - } - - override open func display(_ layer: CALayer) { - layer.contents = animator?.currentFrameImage?.cgImage ?? image?.cgImage - } - - override open func didMoveToWindow() { - super.didMoveToWindow() - didMove() - } - - override open func didMoveToSuperview() { - super.didMoveToSuperview() - didMove() - } - - // This is for back compatibility that using regular `UIImageView` to show animated image. - override func shouldPreloadAllAnimation() -> Bool { - return false - } - - // Reset the animator. - private func reset() { - animator = nil - if let image = image, let frameSource = image.kf.frameSource { - #if os(visionOS) - let targetSize = bounds.scaled(UITraitCollection.current.displayScale).size - #else - var scale: CGFloat = 0 - - if #available(iOS 13.0, tvOS 13.0, *) { - scale = UITraitCollection.current.displayScale - } else { - scale = UIScreen.main.scale - } - let targetSize = bounds.scaled(scale).size - #endif - let animator = Animator( - frameSource: frameSource, - contentMode: contentMode, - size: targetSize, - imageSize: image.kf.size, - imageScale: image.kf.scale, - framePreloadCount: framePreloadCount, - repeatCount: repeatCount, - preloadQueue: preloadQueue) - animator.delegate = self - animator.needsPrescaling = needsPrescaling - animator.backgroundDecode = backgroundDecode - animator.prepareFramesAsynchronously() - self.animator = animator - } - didMove() - } - - private func didMove() { - if autoPlayAnimatedImage && animator != nil { - if let _ = superview, let _ = window { - startAnimating() - } else { - stopAnimating() - } - } - } - - /// Update the current frame with the displayLink duration. - private func updateFrameIfNeeded() { - guard let animator = animator else { - return - } - - guard !animator.isFinished else { - stopAnimating() - delegate?.animatedImageViewDidFinishAnimating(self) - return - } - - let duration: CFTimeInterval - - // CA based display link is opt-out from ProMotion by default. - // So the duration and its FPS might not match. - // See [#718](https://github.com/onevcat/Kingfisher/issues/718) - // By setting CADisableMinimumFrameDuration to YES in Info.plist may - // cause the preferredFramesPerSecond being 0 - let preferredFramesPerSecond = displayLink.preferredFramesPerSecond - if preferredFramesPerSecond == 0 { - duration = displayLink.duration - } else { - // Some devices (like iPad Pro 10.5) will have a different FPS. - duration = 1.0 / TimeInterval(preferredFramesPerSecond) - } - - animator.shouldChangeFrame(with: duration) { [weak self] hasNewFrame in - if hasNewFrame { - self?.layer.setNeedsDisplay() - } - } - } -} - -protocol AnimatorDelegate: AnyObject { - func animator(_ animator: AnimatedImageView.Animator, didPlayAnimationLoops count: UInt) -} - -extension AnimatedImageView: AnimatorDelegate { - func animator(_ animator: Animator, didPlayAnimationLoops count: UInt) { - delegate?.animatedImageView(self, didPlayAnimationLoops: count) - } -} - -extension AnimatedImageView { - - // Represents a single frame in a GIF. - struct AnimatedFrame { - - // The image to display for this frame. Its value is nil when the frame is removed from the buffer. - let image: UIImage? - - // The duration that this frame should remain active. - let duration: TimeInterval - - // A placeholder frame with no image assigned. - // Used to replace frames that are no longer needed in the animation. - var placeholderFrame: AnimatedFrame { - return AnimatedFrame(image: nil, duration: duration) - } - - // Whether this frame instance contains an image or not. - var isPlaceholder: Bool { - return image == nil - } - - // Returns a new instance from an optional image. - // - // - parameter image: An optional `UIImage` instance to be assigned to the new frame. - // - returns: An `AnimatedFrame` instance. - func makeAnimatedFrame(image: UIImage?) -> AnimatedFrame { - return AnimatedFrame(image: image, duration: duration) - } - } -} - -extension AnimatedImageView { - - // MARK: - Animator - - /// An animator which used to drive the data behind `AnimatedImageView`. - public class Animator { - private let size: CGSize - - private let imageSize: CGSize - private let imageScale: CGFloat - - /// The maximum count of image frames that needs preload. - public let maxFrameCount: Int - - private let frameSource: ImageFrameSource - private let maxRepeatCount: RepeatCount - - private let maxTimeStep: TimeInterval = 1.0 - private let animatedFrames = SafeArray() - private var frameCount = 0 - private var timeSinceLastFrameChange: TimeInterval = 0.0 - private var currentRepeatCount: UInt = 0 - - var isFinished: Bool = false - - var needsPrescaling = true - - var backgroundDecode = true - - weak var delegate: AnimatorDelegate? - - // Total duration of one animation loop - var loopDuration: TimeInterval = 0 - - /// The image of the current frame. - public var currentFrameImage: UIImage? { - return frame(at: currentFrameIndex) - } - - /// The duration of the current active frame duration. - public var currentFrameDuration: TimeInterval { - return duration(at: currentFrameIndex) - } - - /// The index of the current animation frame. - public internal(set) var currentFrameIndex = 0 { - didSet { - previousFrameIndex = oldValue - } - } - - var previousFrameIndex = 0 { - didSet { - preloadQueue.async { - self.updatePreloadedFrames() - } - } - } - - var isReachMaxRepeatCount: Bool { - switch maxRepeatCount { - case .once: - return currentRepeatCount >= 1 - case .finite(let maxCount): - return currentRepeatCount >= maxCount - case .infinite: - return false - } - } - - /// Whether the current frame is the last frame or not in the animation sequence. - public var isLastFrame: Bool { - return currentFrameIndex == frameCount - 1 - } - - var preloadingIsNeeded: Bool { - return maxFrameCount < frameCount - 1 - } - - var contentMode = UIView.ContentMode.scaleToFill - - private lazy var preloadQueue: DispatchQueue = { - return DispatchQueue(label: "com.onevcat.Kingfisher.Animator.preloadQueue") - }() - - /// Creates an animator with image source reference. - /// - /// - Parameters: - /// - source: The reference of animated image. - /// - mode: Content mode of the `AnimatedImageView`. - /// - size: Size of the `AnimatedImageView`. - /// - imageSize: Size of the `KingfisherWrapper`. - /// - imageScale: Scale of the `KingfisherWrapper`. - /// - count: Count of frames needed to be preloaded. - /// - repeatCount: The repeat count should this animator uses. - /// - preloadQueue: Dispatch queue used for preloading images. - convenience init(imageSource source: CGImageSource, - contentMode mode: UIView.ContentMode, - size: CGSize, - imageSize: CGSize, - imageScale: CGFloat, - framePreloadCount count: Int, - repeatCount: RepeatCount, - preloadQueue: DispatchQueue) { - let frameSource = CGImageFrameSource(data: nil, imageSource: source, options: nil) - self.init(frameSource: frameSource, - contentMode: mode, - size: size, - imageSize: imageSize, - imageScale: imageScale, - framePreloadCount: count, - repeatCount: repeatCount, - preloadQueue: preloadQueue) - } - - /// Creates an animator with a custom image frame source. - /// - /// - Parameters: - /// - frameSource: The reference of animated image. - /// - mode: Content mode of the `AnimatedImageView`. - /// - size: Size of the `AnimatedImageView`. - /// - imageSize: Size of the `KingfisherWrapper`. - /// - imageScale: Scale of the `KingfisherWrapper`. - /// - count: Count of frames needed to be preloaded. - /// - repeatCount: The repeat count should this animator uses. - /// - preloadQueue: Dispatch queue used for preloading images. - init(frameSource source: ImageFrameSource, - contentMode mode: UIView.ContentMode, - size: CGSize, - imageSize: CGSize, - imageScale: CGFloat, - framePreloadCount count: Int, - repeatCount: RepeatCount, - preloadQueue: DispatchQueue) { - self.frameSource = source - self.contentMode = mode - self.size = size - self.imageSize = imageSize - self.imageScale = imageScale - self.maxFrameCount = count - self.maxRepeatCount = repeatCount - self.preloadQueue = preloadQueue - - GraphicsContext.begin(size: imageSize, scale: imageScale) - } - - deinit { - resetAnimatedFrames() - GraphicsContext.end() - } - - /// Gets the image frame of a given index. - /// - Parameter index: The index of desired image. - /// - Returns: The decoded image at the frame. `nil` if the index is out of bound or the image is not yet loaded. - public func frame(at index: Int) -> KFCrossPlatformImage? { - return animatedFrames[index]?.image - } - - public func duration(at index: Int) -> TimeInterval { - return animatedFrames[index]?.duration ?? .infinity - } - - func prepareFramesAsynchronously() { - frameCount = frameSource.frameCount - animatedFrames.reserveCapacity(frameCount) - preloadQueue.async { [weak self] in - self?.setupAnimatedFrames() - } - } - - func shouldChangeFrame(with duration: CFTimeInterval, handler: (Bool) -> Void) { - incrementTimeSinceLastFrameChange(with: duration) - - if currentFrameDuration > timeSinceLastFrameChange { - handler(false) - } else { - resetTimeSinceLastFrameChange() - incrementCurrentFrameIndex() - handler(true) - } - } - - private func setupAnimatedFrames() { - resetAnimatedFrames() - - var duration: TimeInterval = 0 - - (0.. maxFrameCount { return } - animatedFrames[index] = animatedFrames[index]?.makeAnimatedFrame(image: loadFrame(at: index)) - } - - self.loopDuration = duration - } - - private func resetAnimatedFrames() { - animatedFrames.removeAll() - } - - private func loadFrame(at index: Int) -> UIImage? { - let resize = needsPrescaling && size != .zero - let maxSize = resize ? size : nil - guard let cgImage = frameSource.frame(at: index, maxSize: maxSize) else { - return nil - } - - if #available(iOS 15, tvOS 15, *) { - // From iOS 15, a plain image loading causes iOS calling `-[_UIImageCGImageContent initWithCGImage:scale:]` - // in ImageIO, which holds the image ref on the creating thread. - // To get a workaround, create another image ref and use that to create the final image. This leads to - // some performance loss, but there is little we can do. - // https://github.com/onevcat/Kingfisher/issues/1844 - guard let context = GraphicsContext.current(size: imageSize, scale: imageScale, inverting: true, cgImage: cgImage), - let decodedImageRef = cgImage.decoded(on: context, scale: imageScale) - else { - return KFCrossPlatformImage(cgImage: cgImage) - } - - return KFCrossPlatformImage(cgImage: decodedImageRef) - } else { - let image = KFCrossPlatformImage(cgImage: cgImage) - if backgroundDecode { - guard let context = GraphicsContext.current(size: imageSize, scale: imageScale, inverting: true, cgImage: cgImage) else { - return image - } - return image.kf.decoded(on: context) - } else { - return image - } - } - } - - private func updatePreloadedFrames() { - guard preloadingIsNeeded else { - return - } - - let previousFrame = animatedFrames[previousFrameIndex] - animatedFrames[previousFrameIndex] = previousFrame?.placeholderFrame - // ensure the image dealloc in main thread - defer { - if let image = previousFrame?.image { - DispatchQueue.main.async { - _ = image - } - } - } - - preloadIndexes(start: currentFrameIndex).forEach { index in - guard let currentAnimatedFrame = animatedFrames[index] else { return } - if !currentAnimatedFrame.isPlaceholder { return } - animatedFrames[index] = currentAnimatedFrame.makeAnimatedFrame(image: loadFrame(at: index)) - } - } - - private func incrementCurrentFrameIndex() { - let wasLastFrame = isLastFrame - currentFrameIndex = increment(frameIndex: currentFrameIndex) - if isLastFrame { - currentRepeatCount += 1 - if isReachMaxRepeatCount { - isFinished = true - - // Notify the delegate here because the animation is stopping. - delegate?.animator(self, didPlayAnimationLoops: currentRepeatCount) - } - } else if wasLastFrame { - - // Notify the delegate that the loop completed - delegate?.animator(self, didPlayAnimationLoops: currentRepeatCount) - } - } - - private func incrementTimeSinceLastFrameChange(with duration: TimeInterval) { - timeSinceLastFrameChange += min(maxTimeStep, duration) - } - - private func resetTimeSinceLastFrameChange() { - timeSinceLastFrameChange -= currentFrameDuration - } - - private func increment(frameIndex: Int, by value: Int = 1) -> Int { - return (frameIndex + value) % frameCount - } - - private func preloadIndexes(start index: Int) -> [Int] { - let nextIndex = increment(frameIndex: index) - let lastIndex = increment(frameIndex: index, by: maxFrameCount) - - if lastIndex >= nextIndex { - return [Int](nextIndex...lastIndex) - } else { - return [Int](nextIndex.. { - private var array: Array = [] - private let lock = NSLock() - - subscript(index: Int) -> Element? { - get { - lock.lock() - defer { lock.unlock() } - return array.indices ~= index ? array[index] : nil - } - - set { - lock.lock() - defer { lock.unlock() } - if let newValue = newValue, array.indices ~= index { - array[index] = newValue - } - } - } - - var count : Int { - lock.lock() - defer { lock.unlock() } - return array.count - } - - func reserveCapacity(_ count: Int) { - lock.lock() - defer { lock.unlock() } - array.reserveCapacity(count) - } - - func append(_ element: Element) { - lock.lock() - defer { lock.unlock() } - array += [element] - } - - func removeAll() { - lock.lock() - defer { lock.unlock() } - array = [] - } -} -#endif -#endif diff --git a/Pods/Kingfisher/Sources/Views/Indicator.swift b/Pods/Kingfisher/Sources/Views/Indicator.swift deleted file mode 100644 index f44721e5..00000000 --- a/Pods/Kingfisher/Sources/Views/Indicator.swift +++ /dev/null @@ -1,233 +0,0 @@ -// -// Indicator.swift -// Kingfisher -// -// Created by João D. Moreira on 30/08/16. -// -// Copyright (c) 2019 Wei Wang -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if !os(watchOS) - -#if canImport(AppKit) && !targetEnvironment(macCatalyst) -import AppKit -public typealias IndicatorView = NSView -#else -import UIKit -public typealias IndicatorView = UIView -#endif - -/// Represents the activity indicator type which should be added to -/// an image view when an image is being downloaded. -/// -/// - none: No indicator. -/// - activity: Uses the system activity indicator. -/// - image: Uses an image as indicator. GIF is supported. -/// - custom: Uses a custom indicator. The type of associated value should conform to the `Indicator` protocol. -public enum IndicatorType { - /// No indicator. - case none - /// Uses the system activity indicator. - case activity - /// Uses an image as indicator. GIF is supported. - case image(imageData: Data) - /// Uses a custom indicator. The type of associated value should conform to the `Indicator` protocol. - case custom(indicator: Indicator) -} - -/// An indicator type which can be used to show the download task is in progress. -public protocol Indicator { - - /// Called when the indicator should start animating. - func startAnimatingView() - - /// Called when the indicator should stop animating. - func stopAnimatingView() - - /// Center offset of the indicator. Kingfisher will use this value to determine the position of - /// indicator in the super view. - var centerOffset: CGPoint { get } - - /// The indicator view which would be added to the super view. - var view: IndicatorView { get } - - /// The size strategy used when adding the indicator to image view. - /// - Parameter imageView: The super view of indicator. - func sizeStrategy(in imageView: KFCrossPlatformImageView) -> IndicatorSizeStrategy -} - -public enum IndicatorSizeStrategy { - case intrinsicSize - case full - case size(CGSize) -} - -extension Indicator { - - /// Default implementation of `centerOffset` of `Indicator`. The default value is `.zero`, means that there is - /// no offset for the indicator view. - public var centerOffset: CGPoint { return .zero } - - /// Default implementation of `centerOffset` of `Indicator`. The default value is `.full`, means that the indicator - /// will pin to the same height and width as the image view. - public func sizeStrategy(in imageView: KFCrossPlatformImageView) -> IndicatorSizeStrategy { - return .full - } -} - -// Displays a NSProgressIndicator / UIActivityIndicatorView -final class ActivityIndicator: Indicator { - - #if os(macOS) - private let activityIndicatorView: NSProgressIndicator - #else - private let activityIndicatorView: UIActivityIndicatorView - #endif - private var animatingCount = 0 - - var view: IndicatorView { - return activityIndicatorView - } - - func startAnimatingView() { - if animatingCount == 0 { - #if os(macOS) - activityIndicatorView.startAnimation(nil) - #else - activityIndicatorView.startAnimating() - #endif - activityIndicatorView.isHidden = false - } - animatingCount += 1 - } - - func stopAnimatingView() { - animatingCount = max(animatingCount - 1, 0) - if animatingCount == 0 { - #if os(macOS) - activityIndicatorView.stopAnimation(nil) - #else - activityIndicatorView.stopAnimating() - #endif - activityIndicatorView.isHidden = true - } - } - - func sizeStrategy(in imageView: KFCrossPlatformImageView) -> IndicatorSizeStrategy { - return .intrinsicSize - } - - init() { - #if os(macOS) - activityIndicatorView = NSProgressIndicator(frame: CGRect(x: 0, y: 0, width: 16, height: 16)) - activityIndicatorView.controlSize = .small - activityIndicatorView.style = .spinning - #else - let indicatorStyle: UIActivityIndicatorView.Style - - #if os(tvOS) - if #available(tvOS 13.0, *) { - indicatorStyle = UIActivityIndicatorView.Style.large - } else { - indicatorStyle = UIActivityIndicatorView.Style.white - } - #elseif os(visionOS) - indicatorStyle = UIActivityIndicatorView.Style.medium - #else - if #available(iOS 13.0, * ) { - indicatorStyle = UIActivityIndicatorView.Style.medium - } else { - indicatorStyle = UIActivityIndicatorView.Style.gray - } - #endif - - activityIndicatorView = UIActivityIndicatorView(style: indicatorStyle) - #endif - } -} - -#if canImport(UIKit) -extension UIActivityIndicatorView.Style { - #if compiler(>=5.1) - #else - static let large = UIActivityIndicatorView.Style.white - #if !os(tvOS) - static let medium = UIActivityIndicatorView.Style.gray - #endif - #endif -} -#endif - -// MARK: - ImageIndicator -// Displays an ImageView. Supports gif -final class ImageIndicator: Indicator { - private let animatedImageIndicatorView: KFCrossPlatformImageView - - var view: IndicatorView { - return animatedImageIndicatorView - } - - init?( - imageData data: Data, - processor: ImageProcessor = DefaultImageProcessor.default, - options: KingfisherParsedOptionsInfo? = nil) - { - var options = options ?? KingfisherParsedOptionsInfo(nil) - // Use normal image view to show animations, so we need to preload all animation data. - if !options.preloadAllAnimationData { - options.preloadAllAnimationData = true - } - - guard let image = processor.process(item: .data(data), options: options) else { - return nil - } - - animatedImageIndicatorView = KFCrossPlatformImageView() - animatedImageIndicatorView.image = image - - #if os(macOS) - // Need for gif to animate on macOS - animatedImageIndicatorView.imageScaling = .scaleNone - animatedImageIndicatorView.canDrawSubviewsIntoLayer = true - #else - animatedImageIndicatorView.contentMode = .center - #endif - } - - func startAnimatingView() { - #if os(macOS) - animatedImageIndicatorView.animates = true - #else - animatedImageIndicatorView.startAnimating() - #endif - animatedImageIndicatorView.isHidden = false - } - - func stopAnimatingView() { - #if os(macOS) - animatedImageIndicatorView.animates = false - #else - animatedImageIndicatorView.stopAnimating() - #endif - animatedImageIndicatorView.isHidden = true - } -} - -#endif diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock deleted file mode 100644 index f3271be1..00000000 --- a/Pods/Manifest.lock +++ /dev/null @@ -1,32 +0,0 @@ -PODS: - - BigInt (5.2.0) - - Kingfisher (7.10.0) - - SwiftProtobuf (1.25.1) - - TrustWalletCore (4.0.1): - - TrustWalletCore/Core (= 4.0.1) - - TrustWalletCore/Core (4.0.1): - - TrustWalletCore/Types - - TrustWalletCore/Types (4.0.1): - - SwiftProtobuf - -DEPENDENCIES: - - BigInt - - Kingfisher - - TrustWalletCore - -SPEC REPOS: - trunk: - - BigInt - - Kingfisher - - SwiftProtobuf - - TrustWalletCore - -SPEC CHECKSUMS: - BigInt: f668a80089607f521586bbe29513d708491ef2f7 - Kingfisher: a18f05d3b6d37d8650ee4a3e61d57a28fc6207f6 - SwiftProtobuf: 69f02cd54fb03201c5e6bf8b76f687c5ef7541a3 - TrustWalletCore: 77c78bda1d1a411390321b7d9f7b81bd1d547b71 - -PODFILE CHECKSUM: 63ae34d7b530436a1a7d72f33a0171a22f73d4ad - -COCOAPODS: 1.13.0 diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index fe2331f0..00000000 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,5175 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 002E122626CCCEA0920173D0ACB19D56 /* EOS.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4B0DFB19B2765A6B966DA33A1896C2B /* EOS.pb.swift */; }; - 003786AE08E1D0681F4FB6D868351DFC /* TWTronProto.h in Headers */ = {isa = PBXBuildFile; fileRef = AF047CF67D4C5EE1611FB5CC926A88B8 /* TWTronProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 007AC41B87CEF07467D73B76263C5A30 /* Cosmos.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 720CD84CCDF712F01402DED67E2C2BBE /* Cosmos.pb.swift */; }; - 008C51DEA90B91E500D81F01D77A76AB /* Google_Protobuf_FieldMask+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69550BF425C701F89716029D94A38603 /* Google_Protobuf_FieldMask+Extensions.swift */; }; - 011D0EA10728EE3C67250628E896A901 /* AnyMessageStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D0BE2664911FF690E8852DDB010DA39 /* AnyMessageStorage.swift */; }; - 01467324479375D7823E65ED15F88D38 /* TWPrivateKeyType.h in Headers */ = {isa = PBXBuildFile; fileRef = 78E1AE742575E960FDE2A440E7A144CC /* TWPrivateKeyType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 01F1AEC5A2BFA0A1C3D40FA8C61E06CB /* Tron.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BCC37628020C73BDC04FF352CBC29B /* Tron.pb.swift */; }; - 0204BB53584970544BC0296B45C28C6B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BD7E218AAA978568DF29A6653DBA30E7 /* Foundation.framework */; }; - 023990656F3DE7BC986CF5A034FA6D1A /* BinaryEncodingVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752820D333566556D461186C664F52F9 /* BinaryEncodingVisitor.swift */; }; - 023C10C52B2FBB07186FFB570322A06F /* TWDerivation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FE2CDE1BA3795B1FDE18662C42D3B88 /* TWDerivation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 027A954AA19A77133EB16D1208183A9F /* CoinType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C44BB0D31B0BB69F2BD2D84BFB7397 /* CoinType.swift */; }; - 029FFF23D93CC8F66E9C799E134AB72A /* ImageView+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DD7D25BCFA9751819BCD3F2BDC1DADF /* ImageView+Kingfisher.swift */; }; - 02F90270BD45F882C03E36749770020E /* StoredKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFF83FE4668E7031BF6A5714F8A7791E /* StoredKey.swift */; }; - 02FE4236689712276FE80AD582399EAC /* SegwitAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68A669A0F27F135643F970132BF9F522 /* SegwitAddress.swift */; }; - 044E794E9215AB8AB5E1898220CBA528 /* NervosAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32DC10FFE739671242A8BD9C46832BE4 /* NervosAddress.swift */; }; - 0509FF91167AA083947C8A011D4229BB /* Message+JSONArrayAdditions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24F7147722EDF445861B97965050C096 /* Message+JSONArrayAdditions.swift */; }; - 0513CC3D35666CF4834A7B4B5E04233E /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3479A3217066A19B2638C8216B9770C /* Bitwise Ops.swift */; }; - 05560B66ACF66C100B0B86AF8EB15BED /* VeChain.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BDD2E02577BA52A2CBF06B1E751B6BE /* VeChain.pb.swift */; }; - 0605F91336E5CCABDC692CE325DF49BF /* TrustWalletCore-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F96288B61E8FDA839F477E4E6E5B7912 /* TrustWalletCore-macOS-dummy.m */; }; - 061E53FD092AA5E1B4CC7CB0F4E7CEEF /* TWCoinType.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FA6A69B28B7A23F2425170E393537B4 /* TWCoinType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 062B47B98FDE668ADB938666A59F8A4A /* EthereumAbi.swift in Sources */ = {isa = PBXBuildFile; fileRef = B757EE5C007ECF51A7987A6307CB9503 /* EthereumAbi.swift */; }; - 07457F62C7DBB9F58F5869D49CF43731 /* TWFIOProto.h in Headers */ = {isa = PBXBuildFile; fileRef = EFEA13C1C2D5BA7DADF18D9E4FB2E0C2 /* TWFIOProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 07C6A704238D718E0878AEFB6398FA2C /* Aion+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51B1F162C0E5B47CDE7039E086277F16 /* Aion+Proto.swift */; }; - 0806F2D7F4C8362465B3FFEC271673B0 /* Aeternity.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 705178BBD27C499C1D546F0A115272FB /* Aeternity.pb.swift */; }; - 087673C6150283515860447052DEFA56 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2FE5163FF67ABEE80F6B357370594B1 /* Image.swift */; }; - 087FC4DE2FDCD6DE46922D4E634A23D0 /* TWEthereum.h in Headers */ = {isa = PBXBuildFile; fileRef = B4A4AC094E72C6670E83472EB987FBDC /* TWEthereum.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 08B4765246C2D8BA811E26E61E815B8B /* Solana+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CD18FEDFB27D51B90D18C5F21CC9612 /* Solana+Proto.swift */; }; - 08C5F4B56BB7E9C36FB2F674BB41E1BE /* Polkadot.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF6A0DFC94DC5AB3FDA72BBD2609E432 /* Polkadot.pb.swift */; }; - 090DAC841D7A549BBFF6129124A6BDDC /* TextFormatEncodingOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 093B20C257A1B4EB85BD7FA52CEC8522 /* TextFormatEncodingOptions.swift */; }; - 09117B656B4DFD6853AF1DF9A992C817 /* TWIconProto.h in Headers */ = {isa = PBXBuildFile; fileRef = BA05E6FABD933FE88AE74B6F611DBF2E /* TWIconProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0953EDF7F603E4550C3851055206F86F /* StringUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23DCBA704DB69643799A4F296305D03 /* StringUtils.swift */; }; - 0A28702E61E614CF5838AFBF239F5796 /* TextFormatDecodingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = F68D21332FD5A04A2A2EC76704BD57B6 /* TextFormatDecodingError.swift */; }; - 0B067F5E23F638653368AF4BB40CB39B /* TWPurpose.h in Headers */ = {isa = PBXBuildFile; fileRef = 259C324F1850397A45B2ED949517750E /* TWPurpose.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0B1109F949F5067A81FA881176FAFACB /* EthereumAbiValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC658E731F79F058F6303160A319D473 /* EthereumAbiValue.swift */; }; - 0B2DF249412DB6271C7008C2FF821DFA /* BitcoinSigHashType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E48ECEA22C76D471E8C2CD6004AE4EAB /* BitcoinSigHashType.swift */; }; - 0B468364F72D457F56601DC0F3E5B646 /* Solana.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 182DF9072796D05693E1CB60B20B48CD /* Solana.pb.swift */; }; - 0BA35A7BBC38B2C73B763A8FCC4F4D89 /* TWHDVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D2BDBB5FC2D531E8D2B0A0DB4958A23 /* TWHDVersion.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0C28BF2A37FA001B0A547BAB23C98C45 /* TransactionCompiler+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6796316430087AFAB7E717FFED618E61 /* TransactionCompiler+Proto.swift */; }; - 0CB8EEE6EA3223E2C4CB42D780961655 /* KFImageOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDDC146350E08D667CAC39E090C75C2D /* KFImageOptions.swift */; }; - 0CC23366D8BA2DEDAEA3F09BA26CDCB0 /* Base32.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53A8BEBA7CD55234B26C1F4335352436 /* Base32.swift */; }; - 0CE6957F957EC7A880FF303B64EA3993 /* StellarPassphrase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FF027466542135796C1C996E649E15A /* StellarPassphrase.swift */; }; - 0D0C2CD5EDD307C05C6D2E552F2B6627 /* SizeExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07E551D848FF88A302FF821108CCD775 /* SizeExtensions.swift */; }; - 0D61E23B5A85FD479066C080A01BDA9F /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07827EA561AB1431A4A6D9FA4E92EB70 /* Accelerate.framework */; }; - 0D784D2F32A17A084A5606B030CFBC1C /* Filecoin+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = F91277E7ABFC9430D4AC99F3DF18C19B /* Filecoin+Proto.swift */; }; - 0DA3720C42D0158BDFB482F8C3525051 /* PrivateKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0771AE7532A3F97CD329B4440438C9EA /* PrivateKey.swift */; }; - 0E3B699BE8D4C27407CDDF23361AA805 /* TWBase32.h in Headers */ = {isa = PBXBuildFile; fileRef = E333936D9B9CF3967A7950FFC908492E /* TWBase32.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0EC10F1C66DF1B2E1ADE771690208BBC /* Harmony.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3085F10E052BA25632809F3542D65F20 /* Harmony.pb.swift */; }; - 0F1AEEBB57241B05818524F2EA5329A9 /* NEARAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3615E6A06B43DBF36B5916B7C514EE7B /* NEARAccount.swift */; }; - 0F30102B64BDCA9B775D560B5A8D708E /* Algorand.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4385282B45988556A472090C286D620 /* Algorand.pb.swift */; }; - 0F49CF7379F4533BD72DFFED001631D1 /* Hedera.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE42F079ED4CF8CFA9C12444B1CB5C87 /* Hedera.pb.swift */; }; - 0F70A9D753A1D939E79F7D0DE9FCD290 /* Ethereum+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28D6388940928A84ECE212B8F5FBA1B6 /* Ethereum+Proto.swift */; }; - 0F857825CBAF038A8693783BBD4C40DE /* wrappers.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4068258E6EF294F076AFC67B2B92713 /* wrappers.pb.swift */; }; - 0FA58362A525755439ED770A03C4F24D /* TWAnySigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 9950FB5AA58FBB836C49BBF432A0F3FB /* TWAnySigner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0FF45656B5CEE98F32D3328955E9FF66 /* Theta+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380778018196417D97B7D095CC541514 /* Theta+Proto.swift */; }; - 104173024A97B30DAF7D22C36FBEFDED /* KFImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF57BFFD3162D2B980770D0A406CFD34 /* KFImage.swift */; }; - 1076FA35049E50D7B35CE447DDA807CC /* TWZilliqaProto.h in Headers */ = {isa = PBXBuildFile; fileRef = B4A5EE9966F24D6E13183AB23662F708 /* TWZilliqaProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 10C98B5AF88BA619D395173908D804F0 /* FIO+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 342F51CEBBB103CCFC326BE1D39B88DE /* FIO+Proto.swift */; }; - 10F1D0A75C3928D95C0415F337A41387 /* TWDecredProto.h in Headers */ = {isa = PBXBuildFile; fileRef = C9E3D989D91EBC53D874232F839B4A9C /* TWDecredProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 110B765B85DF9B47E6B61B1D62831F9E /* TWBarzProto.h in Headers */ = {isa = PBXBuildFile; fileRef = F929CD96AE82416D88639C5349B0F8DF /* TWBarzProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1127E6F45B409F7B9361A88095571730 /* Aion+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51B1F162C0E5B47CDE7039E086277F16 /* Aion+Proto.swift */; }; - 11B785814FF2BCE0EBE7E5E1F566EECE /* TWBinanceProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B84234C62053507827617AE6EA65CBF /* TWBinanceProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 12453AB7CBBF11688F377C7498DDC6FD /* Sui.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5BA138568C7C92D1A2CFCFE08F64BEC /* Sui.pb.swift */; }; - 1296991D86D4242D604271C2E90C1A65 /* TWZilliqaProto.h in Headers */ = {isa = PBXBuildFile; fileRef = B4A5EE9966F24D6E13183AB23662F708 /* TWZilliqaProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 12F9D3BB5BD1A065C717387322661A48 /* TWBitcoinAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D1F2230999C27DCAA7F40F75FA312A0 /* TWBitcoinAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 136A60558AC853C90A06BB2B6145B8BA /* FilecoinAddressConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10C2B2FA911E78816E6C6E750F84A8BF /* FilecoinAddressConverter.swift */; }; - 1452293AD3C5FE37F2CCF46079502FDD /* BinaryDelimited.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD391FEA8F7F1694ECFD478154C8E3DB /* BinaryDelimited.swift */; }; - 1463809B426DDAD65F669B839AA021FD /* EthereumAbi.swift in Sources */ = {isa = PBXBuildFile; fileRef = B757EE5C007ECF51A7987A6307CB9503 /* EthereumAbi.swift */; }; - 147EE73DF24642839173D5BFDBE54E63 /* ImageDownloaderDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19630D7EED70F5054C4937BF82B65967 /* ImageDownloaderDelegate.swift */; }; - 14BC5E6287077519602A078EF4BAE83A /* TWCardanoProto.h in Headers */ = {isa = PBXBuildFile; fileRef = C497A825F0F288655644A67DF63C8D62 /* TWCardanoProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 15066BF87BD0B41B80055571264CA539 /* UnsafeRawPointer+Shims.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D31EEFFEBC60F302E182A3101A0EC4A /* UnsafeRawPointer+Shims.swift */; }; - 152CD918C32923D9AD042BE70CB9F44E /* TWUtxoProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 741A961FD62CD2174612D245938D1986 /* TWUtxoProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 15770BD6F979E2DD6E52FC2631AAF3F5 /* TWCommonProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 26EA5B9F879590AF9B6A4F08B90EE2D9 /* TWCommonProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 15A18399125F7E83432CD4437A9195E7 /* KFOptionsSetter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70B587E605F520B99D8C9612368E06B1 /* KFOptionsSetter.swift */; }; - 15B3FC128AF031966347883702F50D9A /* TWNEOProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 51ADD5B2E3B53B1DBC942E101177647C /* TWNEOProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 15BD6C4C24E7C6BB53DFD64805C57591 /* TWBitcoinAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D1F2230999C27DCAA7F40F75FA312A0 /* TWBitcoinAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 16229AB61E90428D9DADE98C4C929A7D /* TWIOSTProto.h in Headers */ = {isa = PBXBuildFile; fileRef = A2ED4E67C1F930F40BFB763C9EBA9DBE /* TWIOSTProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 16355709E85AB677FBE753A56582C40E /* Message+JSONAdditions.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB18C1C68A595FB6DA0B6DCC68A655C2 /* Message+JSONAdditions.swift */; }; - 16517B749DEB7D44BD0738DE9803DF18 /* ImageDataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 792B8DE3A8EA740C156954EBA50E6C71 /* ImageDataProvider.swift */; }; - 17523A6CA4277BDFEDD5F67972C5693B /* CPListItem+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A72A27DE702C7D6F4549B27EBAD19AB /* CPListItem+Kingfisher.swift */; }; - 176235E513F919943E09023554A31540 /* TextFormatEncodingVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CF04E1D6F32C6315DB91F83DE2ED391 /* TextFormatEncodingVisitor.swift */; }; - 180AAD0AD49A5002748E364DB10ACDAE /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = D458B1D164B5324CD308686DF5023E94 /* GCD.swift */; }; - 18116787C804ED38F559A9D7DB28372D /* Derivation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6517ACB63CBFFF085786EE068E92BD07 /* Derivation.swift */; }; - 18363CA3983862EF8FC30587BB896380 /* NameMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B0265BAA695FAD715C19E275889A637 /* NameMap.swift */; }; - 1850236025D7A1EECDBA670D479C79B2 /* Cosmos+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75C68D1A26AF31A8A83DE4973626EEC1 /* Cosmos+Proto.swift */; }; - 18A70D42F71F83F8069638DEDABB770C /* WKInterfaceImage+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 491B3DEAE0F347AFBF91231A409B1459 /* WKInterfaceImage+Kingfisher.swift */; }; - 18F50C6F6BF16586C7BE3E9B77F97F57 /* TextFormatDecodingOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E14980C2C39C88F8F0ED8E30F556D68 /* TextFormatDecodingOptions.swift */; }; - 19169C53B1E84FFF97305FE7779ECD00 /* JSONMapEncodingVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB6BD5A749390FC806EC8A5FE2244EA9 /* JSONMapEncodingVisitor.swift */; }; - 194CCD388E0F6C82441F220F9E2C65B0 /* Google_Protobuf_Any+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10C539C5715FF822EA9A79893CAB496D /* Google_Protobuf_Any+Extensions.swift */; }; - 198FFC75ECF3BAA8590A606B679040B8 /* TextFormatEncodingOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 093B20C257A1B4EB85BD7FA52CEC8522 /* TextFormatEncodingOptions.swift */; }; - 1A2A5D3983F86DF96A801C9065737C95 /* TWCosmosProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 3DE991C2878CAB5722A856BD79C24BB1 /* TWCosmosProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1A550D7E44D11C6FC8B2826A23BC8355 /* Mnemonic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74B19D9426C753156D891128B648D604 /* Mnemonic.swift */; }; - 1A57B1E36E002121AE58D0258DC82E2A /* RedirectHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = A79E053CDC7BAF20105F35325F64A81E /* RedirectHandler.swift */; }; - 1A81E0FF2F652E9EF043D036FD7C9D1A /* RippleXAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C12E7907A13A46A72EFED7F4AD0347D /* RippleXAddress.swift */; }; - 1A953D758282ECB40C1AE752164046D1 /* WebAuthn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 317AE04B87B518B31CE3AA76C44DC680 /* WebAuthn.swift */; }; - 1AD40CDC58220309DAAAF28C65A0BAEE /* JSONEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 643B04AC6F0EA9BF74879E2BF5585540 /* JSONEncoder.swift */; }; - 1AE5A4532403E0AD2D188BED0476AE03 /* TWStarkExMessageSigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 610AFFF63F0D24E18042D05B28D7B342 /* TWStarkExMessageSigner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1BD6DBB1C2D03BEF1017792194976B07 /* Sui+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = D304A4B15F992738B9FE6FF5F41C1120 /* Sui+Proto.swift */; }; - 1C22DAB4A9B5456974CF1450D3908FF6 /* Google_Protobuf_FieldMask+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69550BF425C701F89716029D94A38603 /* Google_Protobuf_FieldMask+Extensions.swift */; }; - 1C3670CDECD894B439F2E95410C4C5BA /* JSONScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305B67F58BAEDFED379C07322D6BD1A4 /* JSONScanner.swift */; }; - 1C9777CEF88893F0BB92080F689FEF38 /* TWNanoProto.h in Headers */ = {isa = PBXBuildFile; fileRef = E7CB5857BECCFF631803958E6E96A346 /* TWNanoProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1D516A18272C623586E3C1AEAAD69054 /* TWData.h in Headers */ = {isa = PBXBuildFile; fileRef = 22C6A10B37713663222A90451C0B9663 /* TWData.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1D93DBBC5E72012224512E88DA6928DB /* descriptor.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53CA3FEEC9DA71BA9198FBBDC3C3DFB2 /* descriptor.pb.swift */; }; - 1DAF8239B6AF9D26FECC9974A74CDF4D /* Zilliqa.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9170CB305C589344477565CB0CE92809 /* Zilliqa.pb.swift */; }; - 1E373B5421DD94ECB1666BA27D6F10EB /* Nano+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC5D96C0A23604413A8E2B45EF4D15A /* Nano+Proto.swift */; }; - 1E54C81264CDF6FF81265913811FCCF1 /* TWEthereumAbiProto.h in Headers */ = {isa = PBXBuildFile; fileRef = A302209356A00095DC4D7D624AD9D031 /* TWEthereumAbiProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1E8DB15C8D310A32EBA83BEEB98D2F49 /* Ethereum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38CB28FA7BFFFE538922344E0837B0E1 /* Ethereum.swift */; }; - 1E94E6402ABEDD1F147D6BDF60B592B9 /* Message+AnyAdditions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 805C07DD521AD2FC73EF307C3265C0EF /* Message+AnyAdditions.swift */; }; - 1EC237C9683ACDF66CB97935820E0242 /* IOST.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 177E4A198FCB00E45F7EB51F247F932A /* IOST.pb.swift */; }; - 1EC8E1E5D866687B6935597AEBDC3728 /* NEO.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 528301163D9C04043976B9CEB1089FC8 /* NEO.pb.swift */; }; - 1F06A75F9A6ECBFCEF62DDDECAB758CE /* TWBase32.h in Headers */ = {isa = PBXBuildFile; fileRef = E333936D9B9CF3967A7950FFC908492E /* TWBase32.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1F959FD27F63F07340BF6A81F1265CB9 /* PublicKey+Bitcoin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2462917A79F9BC368B26B1F833938AD3 /* PublicKey+Bitcoin.swift */; }; - 1FE5FB8D599675B1F34C7DA85384DB8F /* TWSolanaAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = F882B4988A6D219219D31C0F38028F0D /* TWSolanaAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 20024074D0CB342E968144AE070B1042 /* source_context.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90C5B348B6AEF95161AE17A57698C992 /* source_context.pb.swift */; }; - 2022C195D65734FE55AB596E09ED7CF4 /* empty.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 720C9C7CF3322A59901BAA55579980C1 /* empty.pb.swift */; }; - 20D2E6082426AB619DDB6A5871B9C93A /* TWLiquidStaking.h in Headers */ = {isa = PBXBuildFile; fileRef = B242B045BD1A542445B3993708D671C5 /* TWLiquidStaking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2127508578A30360BF0FFD6D733D242F /* ImageTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FBE3CC825141C29EA61B91028C4B641 /* ImageTransition.swift */; }; - 213ED3C13764BD88E3E9FF27F9E342C4 /* BitcoinV2+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C9411B2A94F551D7C4375B128146037 /* BitcoinV2+Proto.swift */; }; - 22BC6161C75AE95DEFBDC4AD5B034D36 /* TWPurpose.h in Headers */ = {isa = PBXBuildFile; fileRef = 259C324F1850397A45B2ED949517750E /* TWPurpose.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 230C4E0F2029085B58288AF7A4D7A49D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BD7E218AAA978568DF29A6653DBA30E7 /* Foundation.framework */; }; - 2332D23A040F2956D206D09A4A372B8C /* TWAlgorandProto.h in Headers */ = {isa = PBXBuildFile; fileRef = EC55B36E81CD31A719890ED6972B9D59 /* TWAlgorandProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 237C27C4D01761F2D925D86DB06241B5 /* BinaryDecodingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE1FD2D9F4D6550C4F7C662BF3A6798C /* BinaryDecodingError.swift */; }; - 245AE345CCBA7777A5F86FB6090C021B /* Cardano+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC43C8573E234E59D2F4E3E73FA25CB0 /* Cardano+Proto.swift */; }; - 246B3C33ACB5562BDA4419011852C1DB /* Cardano.swift in Sources */ = {isa = PBXBuildFile; fileRef = 008343E9B8EC5141FA8E723F86D0B794 /* Cardano.swift */; }; - 24D25AF8F3846A8AE9B4AD4D86676CEA /* TWFIOAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = 28EBF0C5FF0FF9CF3E278D9539AD4DCF /* TWFIOAccount.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25111A9F057FE27CEB56D5C7439CBA13 /* JSONDecodingOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC8AB8A06C292D26EE4D4A11FA5FF3EC /* JSONDecodingOptions.swift */; }; - 2590D15A59D7D3633F95EFF7AC6CD229 /* CoinTypeConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24C76B776BEBB37B0FDAEC3B8E0349F6 /* CoinTypeConfiguration.swift */; }; - 25A92C5C0AF10C434F092BF3025D1805 /* TWAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = D600B12007BA37EEBB2E3A08DF5458F8 /* TWAccount.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25AF86547F70C85965634A959712F04E /* JSONEncodingVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBB49DD5A438A326F2A3F3CB758ACC26 /* JSONEncodingVisitor.swift */; }; - 25FEEB2EEF95D8A7C10D36B53CDD7F91 /* THORChainSwap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 912A5F4E13FFDB1560A2716409B2A394 /* THORChainSwap.swift */; }; - 269ECCA34D774F790EAA2F73EC4B06ED /* Cosmos+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75C68D1A26AF31A8A83DE4973626EEC1 /* Cosmos+Proto.swift */; }; - 26C76394649A07111FCDE0967A88EDE6 /* Ethereum.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844F1ABB1BBE571EB79940E2E56B4D3C /* Ethereum.pb.swift */; }; - 26F315FF6AFC0D8933DF7D63608D037A /* ImageProgressive.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBE7CFB4F528B21B079FEDC9409CAFE4 /* ImageProgressive.swift */; }; - 26F8A807FC9B8C068D74CF7C3CA80F61 /* Utxo.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC3757D8648FEA103B3848822088E9BC /* Utxo.pb.swift */; }; - 26FF03869C0B13C9D03789A7B698E75C /* TWSolanaAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = F882B4988A6D219219D31C0F38028F0D /* TWSolanaAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2749160BB14CE1DF01F25DA280E6A0A1 /* StellarMemoType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F740D6B02F281E33B35E9E7AC427016E /* StellarMemoType.swift */; }; - 27ED5CFDFEBBA3BAAA907C24DABE7FBF /* TWStellarPassphrase.h in Headers */ = {isa = PBXBuildFile; fileRef = ADA70292123B0F8EB42A41EFB046CDD7 /* TWStellarPassphrase.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 27F28DD3A4EF3E6273BDFD154BBF1028 /* CoinTypeConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24C76B776BEBB37B0FDAEC3B8E0349F6 /* CoinTypeConfiguration.swift */; }; - 288F3969CE7168765F088B71299BCB93 /* TWStoredKeyEncryption.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E27E6DF7A806D288ADEF2A99B99DD75 /* TWStoredKeyEncryption.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 28B73194049D116A3345503C2D67E8C2 /* TWTransactionCompilerProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B353854C116EF27EA6DF3B3D3A263C1 /* TWTransactionCompilerProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 28B8C01ECF851391F947352F0FB779B9 /* TWVeChainProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E5C6948B98BE431E93D86DD1FD4C054 /* TWVeChainProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 28CAF126C7ACA9AC4886F36341A8DC00 /* RippleXAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C12E7907A13A46A72EFED7F4AD0347D /* RippleXAddress.swift */; }; - 28CF778309B32080090C3D8729F20C49 /* GraphicsContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7CE1301BCB66F40CE8196CAB3F24EA3 /* GraphicsContext.swift */; }; - 2916E38B7D1815876A5E8C0335CF23E9 /* BinaryDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7848F8E0AB945162099F90633F81690 /* BinaryDecoder.swift */; }; - 29284A889463278AC47FD5BD81E275F1 /* TimeUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF55D8C6335E8874725734EB504BA0C /* TimeUtils.swift */; }; - 29B561D731C49DEF52343B81CC6BA4DA /* Tron+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA1C093DCEC99DD364F6C0DC1343154F /* Tron+Proto.swift */; }; - 2A07D631883A9F22733917E302A34CDB /* Polkadot+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42E070726C86BB7C5E60E3A0A6C5AC3 /* Polkadot+Proto.swift */; }; - 2AA509D9B4E1FF4B44E0A4433D681604 /* GIFAnimatedImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCFE61E19E75EEF0E487755BC3FC3821 /* GIFAnimatedImage.swift */; }; - 2B131967377E702B4820CD364D3A97BF /* Icon+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AC85B22832230B0F4C523704BF98A5C /* Icon+Proto.swift */; }; - 2B2612B02F7EEB07E6CD828535A7CFAD /* Bitcoin.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91089210F4F0602D96AEA02FD1900BD8 /* Bitcoin.pb.swift */; }; - 2B5C73FE41BCB17CD31AD315A3B4591E /* TWString.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3A6D5A6AFB14F549189C4D2455C4B7F /* TWString.swift */; }; - 2BAB7814B25D7129F467BD7C51558718 /* TWIOSTProto.h in Headers */ = {isa = PBXBuildFile; fileRef = A2ED4E67C1F930F40BFB763C9EBA9DBE /* TWIOSTProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2BD50CED7DEFF1201E92C40C6C69A204 /* PublicKeyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B102322934FEB6EB8B8E85E62D5031 /* PublicKeyType.swift */; }; - 2BDB99B83F43507AB3F2FFCACDB6B7D5 /* TWBitcoinV2Proto.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FD40E6437D301ED405B05FA5CFD2D08 /* TWBitcoinV2Proto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2BE99D2F55D426776A4019773778DECB /* TWFilecoinProto.h in Headers */ = {isa = PBXBuildFile; fileRef = C76262F5326D0DEAC0325217E2CA6627 /* TWFilecoinProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2C014498F99A90051CBD9AD2D4DADBB0 /* Icon.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73C6AB7BA99B976057BB8C7247904E9 /* Icon.pb.swift */; }; - 2C0891333A3D1B55B4BB25EF14757757 /* ImageDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83C0492624A62D333A78A26B8F3D022B /* ImageDownloader.swift */; }; - 2C5F1E3B9F730433F579D532376748FA /* Bitcoin.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91089210F4F0602D96AEA02FD1900BD8 /* Bitcoin.pb.swift */; }; - 2C8250AA4AF363C7E4948DDB5A166F55 /* NEO+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C08858C3F2E80CF11B9C5039BD0CD41 /* NEO+Proto.swift */; }; - 2CF2691012C94F7F6565A6281A4CFA45 /* Internal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FB7B9C7D1F8FCDFF47453F49CA67F5B /* Internal.swift */; }; - 2CF4011991826E8F0569644F24FABC7E /* AnyUnpackError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32461E1AECF5A48A5763CE5A7269C6AA /* AnyUnpackError.swift */; }; - 2D6CA0C3EB8948EDCFB1766CD7E5F01A /* TWPublicKeyType.h in Headers */ = {isa = PBXBuildFile; fileRef = D3F52A45C5C80C8CD48299B8B9F00A5F /* TWPublicKeyType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2D823ABC9C76E56D33289964A1EA519A /* NEAR.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8419E9D434FAF23A78DF801602D4E0A2 /* NEAR.pb.swift */; }; - 2D8F7DE4D95763A541CD0E731D2E5B62 /* TWStellarMemoType.h in Headers */ = {isa = PBXBuildFile; fileRef = 784F9D8EB78658C13E4C3E234A4B9616 /* TWStellarMemoType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2DBC5D04447933DDE22DE7FBEFDA789A /* AsnParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB0EB4FEB001355FAD0C330490CCB4A /* AsnParser.swift */; }; - 2E4D708731DE6BBF504ECFC9FEB24DF7 /* Nebulas.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5961ED8B13E584B76BE678E69845EDC8 /* Nebulas.pb.swift */; }; - 2EBFEA0219169D97FC3614CCE8226E87 /* Ontology+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B88398A2932B054105E20FAF7D4E4E2 /* Ontology+Proto.swift */; }; - 2ECEFBD7F388CFEC65CB844EC828A7CB /* FIOAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71B78753C2A9821337517F82CEA73CDD /* FIOAccount.swift */; }; - 2F1F9A49868D7021B259D3F13166A044 /* ExtensionHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12ADC7BD936CBFEFD5A5916F828A7B4B /* ExtensionHelpers.swift */; }; - 2F8C89A38FA1078FBD686907C7A2C45A /* CoinType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C44BB0D31B0BB69F2BD2D84BFB7397 /* CoinType.swift */; }; - 2F90D4514CA2FCF1C306823D7509E063 /* BinaryEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DDB7A88B15D46561468D364A2BBE1B1 /* BinaryEncoder.swift */; }; - 2F9532110130ACBA206DE17FA26B1823 /* ExtensionMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6035A5375CCAC1108A5256A5E4D443FA /* ExtensionMap.swift */; }; - 2FC03836589A988B8AEFB82A414A4AE8 /* Kingfisher-macOS-Kingfisher in Resources */ = {isa = PBXBuildFile; fileRef = 5DEA2DA8FDA7BAA10038CC169BBB4E50 /* Kingfisher-macOS-Kingfisher */; }; - 300712E3E5B9A26028DEA68E8DCE97E1 /* TWEthereumProto.h in Headers */ = {isa = PBXBuildFile; fileRef = EBC8B3F766C9E534385BF5B9CAD1504F /* TWEthereumProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 30110CB5269D9462E5A0A6E6AA5AF5E2 /* TWEOSProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C066BD92281FA6A549B8DC21E86DFDF /* TWEOSProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3034E2D14B3134762802DDAF9A5B416F /* TWNEARAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FC84B3093A848901AC994234867BC93 /* TWNEARAccount.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 30E8932A456FE321D38B6807F9152333 /* Zilliqa+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCA2D123643021357A6002D71F4374FE /* Zilliqa+Proto.swift */; }; - 311A67B6D769439AB7F56C58CF37BE4A /* SolanaAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6B20CD1932CAB0ED77D30DB2B7FFFB7 /* SolanaAddress.swift */; }; - 311BA547F5EA987ADF20AFC0B2F133B9 /* Greenfield+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 874BD391756CD973258C28F72E55F80B /* Greenfield+Proto.swift */; }; - 31630C4A81D8CE296CB78581175E93FF /* PublicKeyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B102322934FEB6EB8B8E85E62D5031 /* PublicKeyType.swift */; }; - 31BB7FCB4902051E8B01B8B0DB0BABE2 /* FilecoinAddressConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10C2B2FA911E78816E6C6E750F84A8BF /* FilecoinAddressConverter.swift */; }; - 31C06FB1373832A76B720F7331E0C751 /* Sui.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5BA138568C7C92D1A2CFCFE08F64BEC /* Sui.pb.swift */; }; - 31E781D84C51AB8E8D0D5A81BA801126 /* TWDerivationPathIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDEF4B73B700A075972D201D1F9A71D /* TWDerivationPathIndex.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 31EFBE8EC14EC57000DCD33339CF5A4F /* Visitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFC8A0852EA83A05E870AA4B7BAA4304 /* Visitor.swift */; }; - 332A341CDD5B4611C1186B3593D37F7C /* BinaryEncodingOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1F5519F4B87146A47383D368268E667 /* BinaryEncodingOptions.swift */; }; - 333C1377ED58430BFB2415F36DDD3BF0 /* KFOptionsSetter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70B587E605F520B99D8C9612368E06B1 /* KFOptionsSetter.swift */; }; - 334293D5CA57CCC191A3A7E90E30B034 /* Google_Protobuf_NullValue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8E2CF966BAECD47C86B309C16F3D4A /* Google_Protobuf_NullValue+Extensions.swift */; }; - 33594342772F4FE95B93977600A7CE57 /* BitcoinAddress+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62B12CFC3DF417D774B463DB206FC399 /* BitcoinAddress+Extension.swift */; }; - 336FD0EA8FB6F73CD73E418C042F7D2F /* EthereumAbi.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = E73851AA06C56AE1FEAE9AB143291422 /* EthereumAbi.pb.swift */; }; - 346524E9F9AB544D6874416B1EE9EBA5 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276651878187C7E173EEF1033FE2647C /* Strideable.swift */; }; - 34A2A3B5B0CA50B787DA208757C657C6 /* TWOntologyProto.h in Headers */ = {isa = PBXBuildFile; fileRef = CAF9C6F39102C871BFAA9E9C84F5BE4B /* TWOntologyProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3525793549CD07C01164481632EE2AE0 /* Base64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72225E44C1CA748460E83DD91517A13A /* Base64.swift */; }; - 35A3D319079716934271F3B832C1DEB5 /* Waves.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9E6495281D0E9AC3575EEB5FB1C3EAD /* Waves.pb.swift */; }; - 35A61BE9D5E2C932C8F0C5566C9F2046 /* AVAssetImageDataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76A9191ABB4D7BD2B89F5B14BE9907FA /* AVAssetImageDataProvider.swift */; }; - 35ECB1320EC5EECC79D86E16F31EE77D /* TWNervosProto.h in Headers */ = {isa = PBXBuildFile; fileRef = C258B90CEF2C67C03AC715D80EFBD761 /* TWNervosProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 360AE7AB9FAD51DC0671F3AA211DA73A /* ExtensibleMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56415FEBB5DBEC5E2033330ECB7A3591 /* ExtensibleMessage.swift */; }; - 36B6C2A3D3525FC85ADF859C994AF8A5 /* Curve.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2C3A27FA603C119187AD4A1BBFD8F7B /* Curve.swift */; }; - 36C3EED5B251FFE360745F12162E0A85 /* DiskStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF604D64AF4BF89ED27A81E021E2B890 /* DiskStorage.swift */; }; - 370DF7749B50A01D76E621DBA6CED1DA /* FIO.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F55B52F956B1FCAB0C7714B9A83A6A6 /* FIO.pb.swift */; }; - 375DD2C0FEA7EC4F93F10BFDDE239310 /* Aion.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5DF41A48A74AA8257F405288E2A9D0 /* Aion.pb.swift */; }; - 379AF7794D9BA266476E6DDD3BC0164E /* TWBitcoinFee.h in Headers */ = {isa = PBXBuildFile; fileRef = C41145FF94EEB0FA964BB9D404F1B5F9 /* TWBitcoinFee.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 37CD43CBE2E5ACBF7FD9B74184C5D9CD /* Decred.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58B9A6C6F70D0DF41697F67031EF350C /* Decred.pb.swift */; }; - 389CE3F0CA937242EEFD41772DB7F3C4 /* Resource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42FD3E72F2FC57B66B065A5AC16736B4 /* Resource.swift */; }; - 38D762DA637CBA016F533D04464B9DD3 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 689BEA9360638EE3FFDB2D5173580B65 /* Words and Bits.swift */; }; - 3927EFB62A493A1C84822AE59B2E11BF /* BigInt-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FF7317094748576D7A29A024E61D5BCD /* BigInt-iOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 397C42DA63BA65B3FEE952942E199967 /* ProtobufAPIVersionCheck.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E4218178771B8858487124793820486 /* ProtobufAPIVersionCheck.swift */; }; - 3980EA3EA404EBF6B4BB1F55DFBCB10A /* ProtoNameProviding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D7FFEDB1639E36F1275A04B6DB0053C /* ProtoNameProviding.swift */; }; - 3986561660B9D411F28CD62AA1DDF9DC /* TWSuiProto.h in Headers */ = {isa = PBXBuildFile; fileRef = C7616CBC03A662AC42CF93AE82997068 /* TWSuiProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 39F2376063A18E062AD36BE84E6B2028 /* GroestlcoinAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 932D38DB63D551DA0601B2CA780AAF45 /* GroestlcoinAddress.swift */; }; - 3A6D33C2032E1011A25D2FE6AFA69AED /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CAA7AEFEA5DF4E03E0AEF3C931C0B207 /* Accelerate.framework */; }; - 3A94A5767C9D083DC47D7D9EAB207958 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B49EBAAB30E14DD0F6107211CB9355F /* Box.swift */; }; - 3AD6E8FA600B2398E7FF015CAD0DD05F /* TWBitcoinProto.h in Headers */ = {isa = PBXBuildFile; fileRef = AD8F695F6839DB10326BD70CA74ACABD /* TWBitcoinProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3BA692637B06A7D6E11DC95C9527E284 /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 829250A578FE8926F326268E6ED3DDFB /* Floating Point Conversion.swift */; }; - 3BF5D3BF8C0F7BAEAFD953A6C7A59EC4 /* Cardano.swift in Sources */ = {isa = PBXBuildFile; fileRef = 008343E9B8EC5141FA8E723F86D0B794 /* Cardano.swift */; }; - 3C00119B6C911CD3F12B33ADF17312D9 /* TWEOSProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C066BD92281FA6A549B8DC21E86DFDF /* TWEOSProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3CE48C3EAA5F1A72382338780CA6C084 /* TransactionCompiler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F36B486041210A661C5E0AE5ABC94B73 /* TransactionCompiler.swift */; }; - 3D96100731A13D707E73531435DB4F41 /* Everscale.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8694A8463DF8EE1E0A9C1D1EC5DDBBBB /* Everscale.pb.swift */; }; - 3E1CFDEB46BEFAF578588B0657849868 /* JSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEEE315830FE4302666A00152CC31A9 /* JSONDecoder.swift */; }; - 3E366954CE51D034D4FAE4CDB647B89F /* TWFilecoinAddressType.h in Headers */ = {isa = PBXBuildFile; fileRef = A16B9F4FFDF3A24F7F14E1E5FAC217F7 /* TWFilecoinAddressType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E489874277D705758CB10CC932F6D68 /* NSButton+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32D70BFC272B306916DD7B139CF2ECB3 /* NSButton+Kingfisher.swift */; }; - 3F3CB5D19828BA59F3B241D04AD67080 /* Nano.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF743E4F94135DCD94F75FA4B4958584 /* Nano.pb.swift */; }; - 3F43807F68BBED4A85DDD12923177AB8 /* JSONDecodingOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC8AB8A06C292D26EE4D4A11FA5FF3EC /* JSONDecodingOptions.swift */; }; - 3F5463FE970DD323DEC278457AB56C02 /* VeChain.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BDD2E02577BA52A2CBF06B1E751B6BE /* VeChain.pb.swift */; }; - 3F8C8015811043F53097E1B775B22387 /* RetryStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 227F53DD32685A5DFB4AFADC157F5533 /* RetryStrategy.swift */; }; - 3FEF8EF7FA2A0728F3ABA6A2FF24BB86 /* StoredKeyEncryptionLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123377509B0905F2ACF841441C9C9316 /* StoredKeyEncryptionLevel.swift */; }; - 401146F41C3B096653CF5DBE5E82D404 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BD7E218AAA978568DF29A6653DBA30E7 /* Foundation.framework */; }; - 40567EA82E4A3EBC81D973A198DEDF98 /* BinaryEncodingVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752820D333566556D461186C664F52F9 /* BinaryEncodingVisitor.swift */; }; - 406F8D6E72AD2DCF7FA28F5B2397B768 /* VeChain+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3298A5F988361B72E8C0C33E9076C397 /* VeChain+Proto.swift */; }; - 4088F55E96323C494C8042854901C968 /* TWPolkadotProto.h in Headers */ = {isa = PBXBuildFile; fileRef = C2DB32119B22835AF16B536AC949A967 /* TWPolkadotProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 40D5364D06930CD65DD59E3BBD460994 /* DerivationPath+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5BFDE56CE91672F5F7ED3013C6EFC1F /* DerivationPath+Extension.swift */; }; - 411CCA040387B22F5F16BD667613B38D /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C3B0003639A0DD0C5F7DA5EDD6DD772 /* BigUInt.swift */; }; - 41619493E40D03A6499C36BF1BE743A1 /* Zilliqa+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCA2D123643021357A6002D71F4374FE /* Zilliqa+Proto.swift */; }; - 419744FC2153FCEBE804340759D80E08 /* PublicKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EB022C9C09FED36EFF5EC4382E5C80D /* PublicKey.swift */; }; - 41CACAE0C9961B79DC69C23C300BAC2D /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5F137CB38313890F0CDC781B466C3B6 /* Filter.swift */; }; - 41D623B7ED39869A022C7585EDA38262 /* TWDerivation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FE2CDE1BA3795B1FDE18662C42D3B88 /* TWDerivation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 422D63C83469BAACFEA27485EAFE52F1 /* PrivateKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0771AE7532A3F97CD329B4440438C9EA /* PrivateKey.swift */; }; - 425F32B287E1DD55748830769D96C68F /* Binance.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96162B21DA75C0CB210F3FC177DB6DFE /* Binance.pb.swift */; }; - 42DA9A7123746B0D4D1E035D72AF6F59 /* TWCardano.h in Headers */ = {isa = PBXBuildFile; fileRef = AC701DF09C9E06CA7D9517F92023D14C /* TWCardano.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 430E6D1F43119AFD87411308C55E194E /* KF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80DE412ABB3BCE2F9CB926D3216AE310 /* KF.swift */; }; - 433899B1F34DDBD56CCA179C855F8D28 /* field_mask.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C6F88366BF058CFD919C633C2665081 /* field_mask.pb.swift */; }; - 4362019E663ACA5385046706EE66919C /* TWCoinTypeConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 993C856FBB41BAA25BA0C3462D14CD58 /* TWCoinTypeConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 43C3D659834550972C055EFE4A5E0D1F /* BigInt-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EAECB0BE76113437487ADB52B7F2B3F9 /* BigInt-macOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 43EF78EE1DE04D506642E94FEBE2ADB4 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = C58EC158C1155FAAB6CED0C211D5DCF8 /* Random.swift */; }; - 4428D4406CA67BD2C4C730F9E2FE86CC /* JSONEncodingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95724038B225C802D5E5B24C41F29CD0 /* JSONEncodingError.swift */; }; - 44381E1CB3F1B29BCFFEE24E390E5486 /* Utxo+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 502B72EC7D6FBABECE36E634249DF5DB /* Utxo+Proto.swift */; }; - 443F48CFD7099C89B5289BB481BA4B26 /* TWThetaProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A3815CA79AD33CED38B16DB1155A841 /* TWThetaProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 446971D9D337972F1DA1644BF1F13637 /* BitcoinAddress+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62B12CFC3DF417D774B463DB206FC399 /* BitcoinAddress+Extension.swift */; }; - 449831BAF049DCE0928B2D05C2947A22 /* Kingfisher-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C5D6A42F362A7212C10CC5517CA43DBB /* Kingfisher-macOS-dummy.m */; }; - 449AB7FF11D0C09425D4AF6F84F5C84B /* ImageContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BB143A46CBE58355B339EA4AED2785E /* ImageContext.swift */; }; - 450C8753D2EEE3EC1C3446230A27D8E8 /* source_context.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90C5B348B6AEF95161AE17A57698C992 /* source_context.pb.swift */; }; - 454C87DA65D31F0AC002A8DCB97EC755 /* EthereumMessageSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66929AB0E516AE0F67EAE05485C0D152 /* EthereumMessageSigner.swift */; }; - 459CE9DF410F2EC2E861340E9C85A4E5 /* any.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9DC3491FFD77D87118FD764798BA62A /* any.pb.swift */; }; - 4625A3384A06886608F8D1064C611093 /* FIO+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 342F51CEBBB103CCFC326BE1D39B88DE /* FIO+Proto.swift */; }; - 462D609B09F8DD74605EC0C15BDD5693 /* Greenfield.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DE4BCA5BE0B9812703C3F09373EF54F /* Greenfield.pb.swift */; }; - 4663D0DA66F890B2992A571D97F7F369 /* TWTronProto.h in Headers */ = {isa = PBXBuildFile; fileRef = AF047CF67D4C5EE1611FB5CC926A88B8 /* TWTronProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4715D93BD936773665B02F96EE9152EE /* TVMonogramView+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7FC5C68B02094F1AAB56B0EA7FB5AEF /* TVMonogramView+Kingfisher.swift */; }; - 4718FA3BB1379DE7853F2418EA2E9F14 /* WireFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB4427502F9D14C9BA0D97E37A0152B7 /* WireFormat.swift */; }; - 47210FE7148CFEBF8085DC5129C2ADCA /* TronMessageSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = A247AD0A96589E0F1299D871972FA037 /* TronMessageSigner.swift */; }; - 474F60E9CE0B35B27850FB988464A900 /* AnyUnpackError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32461E1AECF5A48A5763CE5A7269C6AA /* AnyUnpackError.swift */; }; - 4767194E44BDCC18E8EB935AF4F17D35 /* TWTHORChainSwap.h in Headers */ = {isa = PBXBuildFile; fileRef = 8859F555F96A70FC9E9CFB1E46BD302E /* TWTHORChainSwap.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4772A722ACAB044A689A2FCE06F2B2E6 /* Oasis.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = F50B712B248A10A0EAFD8ED60747F099 /* Oasis.pb.swift */; }; - 477713AD03D8FE3B934F460DC496B868 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A862CCA152713345E3E79313F2F5276 /* Hashable.swift */; }; - 478C5BBCD3A4C92F4913D4D8F732DD6C /* descriptor.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53CA3FEEC9DA71BA9198FBBDC3C3DFB2 /* descriptor.pb.swift */; }; - 4808315C7B5D2BF2B46A71C49651DCD4 /* Base64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72225E44C1CA748460E83DD91517A13A /* Base64.swift */; }; - 480905CB56A0D17F09BB0CEDC454C14F /* KingfisherManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC71AE8F0385A5FDE80EE316A2E8BA05 /* KingfisherManager.swift */; }; - 484BEE23B7E3BF27B3EAB3650F300947 /* Account+Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C63EEC03E8DF0127878414DD44F7EB2D /* Account+Codable.swift */; }; - 487784F071AA5480DC26F96C3000B271 /* Delegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 437871F52ACCCF7134F2298F6032751A /* Delegate.swift */; }; - 488F57624445C00654062750F39105F7 /* TheOpenNetwork+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF1011675B3FC98E8AFCF71BBF5C1693 /* TheOpenNetwork+Proto.swift */; }; - 48FF4677D70FDAE7057D52C67EF26140 /* Harmony+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C34B5ADF85C0400281EBD527FD8B237 /* Harmony+Proto.swift */; }; - 490DBAB72E8551B29F7052953AA0CF00 /* RequestModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4853560BBBA31D1D64F4BE6BD468A7A /* RequestModifier.swift */; }; - 4A42A5DEFF810BD0A574E057EA44D81D /* TWStarkExMessageSigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 610AFFF63F0D24E18042D05B28D7B342 /* TWStarkExMessageSigner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4A7A8771B7C727359C91CA00CED9B925 /* DerivationPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AC52B88F52C8803909DB0DF2A75E994 /* DerivationPath.swift */; }; - 4B1617B89284D7500B1B061081B0AC79 /* Ripple.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33AF882026976B1C595B00D0BACEA92C /* Ripple.pb.swift */; }; - 4B39992CDD7AA71BBB9B8E1CDABD7176 /* type.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 572BEA04E861ADA1CAE65662914C6EB7 /* type.pb.swift */; }; - 4B72905E08B7DA4A351BEE29BF257D84 /* Greenfield+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 874BD391756CD973258C28F72E55F80B /* Greenfield+Proto.swift */; }; - 4B7CEC8363BE37C51D92FE16E779C002 /* Harmony+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C34B5ADF85C0400281EBD527FD8B237 /* Harmony+Proto.swift */; }; - 4BC74C208E8A4E24C4B8191E80747F59 /* TWNebulasProto.h in Headers */ = {isa = PBXBuildFile; fileRef = A22E3F85014372A714A65F1A82064D4F /* TWNebulasProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4C1422199B3511E212ACBD81D1EFE2B3 /* Ripple+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9CFA4A4340A997744FA24D41F11B266 /* Ripple+Proto.swift */; }; - 4C1F89BA2D199A90BF21F5A236B3F625 /* TWAionProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C74AE56ADB950BEF977CDFE3F67DD8 /* TWAionProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4C4A6A94ABE3C91D8DDF6C80CB315118 /* CustomJSONCodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F31C58C0BC905D0070DBFA500D239EED /* CustomJSONCodable.swift */; }; - 4C4A81BD3A6D2DB6A11985493A03371D /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B2773F0C23CF91E3B3CB5EA1CC511EA /* PBKDF2.swift */; }; - 4CDAEAD4B694812DC0A514FB16CC60F5 /* AddressProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1462B48420A4B2D2079AE0E6D4959503 /* AddressProtocol.swift */; }; - 4CF54231A20A8797FDA906ECC871606B /* UnknownStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = E238883C9985B02CCA03EF6EC98F394F /* UnknownStorage.swift */; }; - 4D1AEF600978BB5C707FE86A2757604E /* BitcoinMessageSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ED3371A76D4AC11090BFE126C93B43A /* BitcoinMessageSigner.swift */; }; - 4D59DB8591A7BF4F7837ADFAD053D01A /* Polkadot+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42E070726C86BB7C5E60E3A0A6C5AC3 /* Polkadot+Proto.swift */; }; - 4DA6DC7E1A5AB35574F55CE13E43AAB8 /* LiquidStaking.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0516AF1CF82BF55913E5A715CBA737F /* LiquidStaking.swift */; }; - 4E01D3B2FDA6E314309D90B3EC9D9848 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE192A4884D18DA7A597BA774031EF00 /* Result.swift */; }; - 4E43A38A4C1C7CF8A4B5574B2D130A24 /* TWTezosMessageSigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 128B5796EAD3AB6E94BE20744DB691A5 /* TWTezosMessageSigner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4F25A1AC619D9E10880252A39E76E14F /* BigInt-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FD44332A389096F1A8B05A00DE164D7F /* BigInt-iOS-dummy.m */; }; - 4F462617E4A35C5770536F97C91F0354 /* TWMultiversXProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 6030EF5A34D3268961C3610E8396B16E /* TWMultiversXProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4F67F07C7DAC75922AEF0A568D63402C /* TWSS58AddressType.h in Headers */ = {isa = PBXBuildFile; fileRef = CDBFB272E5E82E1411EBC2CCD0E12155 /* TWSS58AddressType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4F6C41AF21B7B33B871BEC8FA6F50722 /* Barz.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB7F62F979DF2D5A4EF5507EFB433843 /* Barz.pb.swift */; }; - 4F74D06C29F21670BCC4BE61B694CAD4 /* TWData.h in Headers */ = {isa = PBXBuildFile; fileRef = 22C6A10B37713663222A90451C0B9663 /* TWData.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4FC3F2E55EC677158EDD1132A29EA271 /* TWBitcoinScript.h in Headers */ = {isa = PBXBuildFile; fileRef = D47EBA8BD5C102BD72B3A7BCD84B9DA4 /* TWBitcoinScript.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 50140F58AD4A7C3F1245249A53812BA3 /* EthereumAbiFunction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CFBD8F75A217AC76114D09B2809FFA2 /* EthereumAbiFunction.swift */; }; - 50B258FBC078A3B44C4BD55BEA80A282 /* UIButton+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC7F635E85D6AFAA4C8BB12A35989E0 /* UIButton+Kingfisher.swift */; }; - 510D231AF0D62515747D8C9455438057 /* WKInterfaceImage+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 491B3DEAE0F347AFBF91231A409B1459 /* WKInterfaceImage+Kingfisher.swift */; }; - 518213EA3C70CE0F240293C1768DCE25 /* NULS.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCF6D3F6BD6E796A62491080ECC096D8 /* NULS.pb.swift */; }; - 51914E14A052A8CA77B2E246D2F5B830 /* BitcoinAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C6A8A5336D312900E308A2C36E9F08D /* BitcoinAddress.swift */; }; - 51D5AF5865B303696E09E0B4FD171497 /* TWAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = D600B12007BA37EEBB2E3A08DF5458F8 /* TWAccount.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 51D748221A4CF9A867E460361A66C9DC /* ExtensionFields.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6F901649F1F1E3E246F1D2AADFC43CD /* ExtensionFields.swift */; }; - 523B6D90EE1203F9F07C7FF848A8E058 /* wrappers.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4068258E6EF294F076AFC67B2B92713 /* wrappers.pb.swift */; }; - 5288A542B45C4913A906C92274BAC0F0 /* TWFilecoinAddressType.h in Headers */ = {isa = PBXBuildFile; fileRef = A16B9F4FFDF3A24F7F14E1E5FAC217F7 /* TWFilecoinAddressType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 52A3D0042EE21AEA099AC860315EFC45 /* Storage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DAA9132FC83BC8605EE7D9293A0BE2B /* Storage.swift */; }; - 52A678BCB5F2E0CB18E5821014D5696C /* String+MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEF87AB08D43D3CE238E19DD48FBFD15 /* String+MD5.swift */; }; - 52F6FA2C50239DB6CCD6E18BFFDFE9B3 /* TWDataVector.h in Headers */ = {isa = PBXBuildFile; fileRef = ABFE41AC94FB9C0C623518E14769DE3C /* TWDataVector.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 52FE5D4594BC28ECC5E78D379BFF93F5 /* TWCosmosProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 3DE991C2878CAB5722A856BD79C24BB1 /* TWCosmosProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 541EF66739E82673D79F50DC828859E0 /* Google_Protobuf_ListValue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA50553A86292E8C435065CE5A25D1F /* Google_Protobuf_ListValue+Extensions.swift */; }; - 54BCF8F1F8058D8EA7B52E35F47BDA44 /* TWRippleProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 833E85FEAF03071EA15B10818E8BFD27 /* TWRippleProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 54D9BC195D7D8688B5D83A8BC413C5AC /* KFImageOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDDC146350E08D667CAC39E090C75C2D /* KFImageOptions.swift */; }; - 550F22BA846D547147879B28024D77E6 /* Base58.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93CE734EFDA99626A19F3559E42C1274 /* Base58.swift */; }; - 55E6D7FF05DD27B3C781EB7D615840D8 /* AuthenticationChallengeResponsable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11DD64221DEC012A79E687A19A97D324 /* AuthenticationChallengeResponsable.swift */; }; - 55E6E1B7D2B53EA92E50882CF8995505 /* ProtoNameProviding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D7FFEDB1639E36F1275A04B6DB0053C /* ProtoNameProviding.swift */; }; - 55F7A6BF11754B8D841357F502316288 /* TheOpenNetwork.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67B1E975CF716511F1903BD81FE55195 /* TheOpenNetwork.pb.swift */; }; - 562E0620788B3D1EC21721C8517F9B0A /* TWBarz.h in Headers */ = {isa = PBXBuildFile; fileRef = 123C965CACF3E25DF64CFD572E100C2D /* TWBarz.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56642A194012A91637CE147B590106AF /* TWBase64.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F16FE5ECC32411CC2A87385E931C504 /* TWBase64.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 566D54B9DBA348C07127EF96807FA9DD /* ImagePrefetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38168313036BB1FE5EAC38FF616B4FD3 /* ImagePrefetcher.swift */; }; - 568B1AE65C67A7E31DE85FC246CD1022 /* EthereumAbiFunction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CFBD8F75A217AC76114D09B2809FFA2 /* EthereumAbiFunction.swift */; }; - 56B73D6F4E6F857C927428FE53E8A47C /* IOST+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 083ECFFFFE5ABBA8D824C5A9CA98CADC /* IOST+Proto.swift */; }; - 56BD3F974F63A98212F606578701DD16 /* SolanaAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6B20CD1932CAB0ED77D30DB2B7FFFB7 /* SolanaAddress.swift */; }; - 56C5DB7121C6E286DC9CB5911BD74A5D /* Everscale+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = B54F9E1433261C9DCFF935AAB1A25984 /* Everscale+Proto.swift */; }; - 57BBFC8905453711FA32CDA21035E058 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A842F59040F4ECA334A99E5AE36D1CF5 /* Cocoa.framework */; }; - 57C77C9E2999ED8D90FD25D85995C9B6 /* Ripple+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9CFA4A4340A997744FA24D41F11B266 /* Ripple+Proto.swift */; }; - 57D4A7F7D40690929540ECECA1A560F2 /* ImageDrawing.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4FFD051C251EFC1A510196800AD75D5 /* ImageDrawing.swift */; }; - 57F9B37C5468209C0507C4A9DD9F4A1D /* BitcoinAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C6A8A5336D312900E308A2C36E9F08D /* BitcoinAddress.swift */; }; - 5842DE6D0CCB95EE95254788F75811F0 /* Runtime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AE827B962C8B3FD4C601A505D9FE9F5 /* Runtime.swift */; }; - 586FF65A3879EF0EBC7361FAD3BE014A /* HashVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB2D50DDF9382E5F874EDDFFCD764AD9 /* HashVisitor.swift */; }; - 58F4FBFC8E177CF50E62CE6CE2293B84 /* DoubleParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E1546D69D5F2CAF17A226475A18B58F /* DoubleParser.swift */; }; - 591C73B5D1218CCFA65FF071AE91DA44 /* TWTransactionCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 09E928CFF866DEA0C41577591F53158C /* TWTransactionCompiler.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 592A0A516C86B2B686234A6D592EAEF8 /* Hedera.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE42F079ED4CF8CFA9C12444B1CB5C87 /* Hedera.pb.swift */; }; - 592C6F981894462D6819BC9B34D6D309 /* LiquidStaking.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0516AF1CF82BF55913E5A715CBA737F /* LiquidStaking.swift */; }; - 594D890F583B6D59710126360BA5EFEF /* TWTransactionCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 09E928CFF866DEA0C41577591F53158C /* TWTransactionCompiler.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5995C52C8EF03377CC52AA591398BB83 /* TransactionCompiler.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = A11BAE5E8F998ADA63E63DE60486B6DF /* TransactionCompiler.pb.swift */; }; - 599EC409193D61670662EABEEB7C3E63 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2FE5163FF67ABEE80F6B357370594B1 /* Image.swift */; }; - 59A54B2B5744F98F38C9A0ABD226512F /* Message+AnyAdditions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 805C07DD521AD2FC73EF307C3265C0EF /* Message+AnyAdditions.swift */; }; - 5AC5A2BB31034D89BE94F5043704CF0D /* TWSolanaProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F39BE4B2C547598667F86EE47AF4773 /* TWSolanaProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5B2C966D6E02BE0200F99416F612F038 /* LiquidStaking.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43FA0A4C15DE1B1F6DFD0ECD0BA95D6F /* LiquidStaking.pb.swift */; }; - 5B64D12847806AC1DD41C0773BE27974 /* Stellar+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12707ED03FD5BDBAEE5061FDA5D8115 /* Stellar+Proto.swift */; }; - 5C01E714120DCD771F034DAFD3A6A437 /* NameMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B0265BAA695FAD715C19E275889A637 /* NameMap.swift */; }; - 5C9B2F5702A6F4C580946BA12FBBAE8F /* CoinType+Address.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89D0C9706D28A9F88B636580476B121E /* CoinType+Address.swift */; }; - 5CD6109B038FA1928DA7F0CA583319CC /* TransactionCompiler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F36B486041210A661C5E0AE5ABC94B73 /* TransactionCompiler.swift */; }; - 5D5F521678BF978DB37A62A22AF8B7B7 /* Hash.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA31FF7CD8C8401984CDD24437CAAB76 /* Hash.swift */; }; - 5D631C38C5E087B2236230A8BC88947B /* TWCardano.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0E45F829A2F6E68818572967D91E4A1 /* TWCardano.swift */; }; - 5D9EFCBB1B071F3D8DEFA1A2052DAC55 /* Everscale+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = B54F9E1433261C9DCFF935AAB1A25984 /* Everscale+Proto.swift */; }; - 5E4243C0516491E0D72130A0595D3BA0 /* TWTHORChainSwapProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 45F476E40E6BA725295757E3C48EA675 /* TWTHORChainSwapProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5E51ACFFA15D3131F2684BDD7CB62F5B /* ImagePrefetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38168313036BB1FE5EAC38FF616B4FD3 /* ImagePrefetcher.swift */; }; - 5E69897C6EA88A657B685FBEF7840BBA /* Indicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B7B1C545376B4206153C71BE40C5AEC /* Indicator.swift */; }; - 5E96800D7698F81B7138E4ACBAFC4E31 /* ImageView+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DD7D25BCFA9751819BCD3F2BDC1DADF /* ImageView+Kingfisher.swift */; }; - 5EAB8B8E70DD7F51343509A6905A204F /* ImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68EA378435D05826C64F994495439AD3 /* ImageCache.swift */; }; - 5EC2A331E1016DC7E02A8545416DD565 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22DA17C7FF836BFD78FFE6DCE9134F4A /* Subtraction.swift */; }; - 5F1883256D639E9DDC7B58F8DB88B970 /* Placeholder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 038B27C26CCB6F3BDEF6C13ADA63C42A /* Placeholder.swift */; }; - 5FB645C437B1F5B3CF016D54979435F1 /* NervosAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32DC10FFE739671242A8BD9C46832BE4 /* NervosAddress.swift */; }; - 601A8FB16365D6C4C82BDE64CF78143F /* Ontology.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1C727651BC16D0B0D8FFD7C559A0B61 /* Ontology.pb.swift */; }; - 6063F452C9BC213904FE0D3EC4069C10 /* Utxo+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 502B72EC7D6FBABECE36E634249DF5DB /* Utxo+Proto.swift */; }; - 6091DC149188133045302E7121B9FA29 /* ProtobufAPIVersionCheck.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E4218178771B8858487124793820486 /* ProtobufAPIVersionCheck.swift */; }; - 60B56B8B6E737746F233D2C564030548 /* TWCommonProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 26EA5B9F879590AF9B6A4F08B90EE2D9 /* TWCommonProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 60BBD6F71C733A110F99D6A5F8B22D94 /* KeyStore.Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03C323AECE33AE438F09C9E3C8553DAD /* KeyStore.Error.swift */; }; - 60F70D32ED67B3EC2DE2D52D7119A842 /* BitcoinSigHashType+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78ED7ECAE693119606FD0E2E9B93653B /* BitcoinSigHashType+Extension.swift */; }; - 616B273F89B3EEE34AEE2C6B833DD83B /* EthereumRlp+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 102B16B1582786362B83B35D5D9A4E2D /* EthereumRlp+Proto.swift */; }; - 617FD84708090B20E098317FC00DE607 /* Nimiq+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = E955C0A5555D919B63B4EDA3D2AB067C /* Nimiq+Proto.swift */; }; - 62CB70BDBB2C4EBFD29CDF1DBD582675 /* Nebulas+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CDAA112E8DC8803E1EAAB9C257674EF /* Nebulas+Proto.swift */; }; - 6304E5F82BA35561F652C83752323D3F /* Nano.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF743E4F94135DCD94F75FA4B4958584 /* Nano.pb.swift */; }; - 63681DB20C4B91A82068C02542E110E4 /* Watch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A2F72B33064CF980E48FA2BFF28041B /* Watch.swift */; }; - 63C6182C2DCEE8508F7BCF1CC15D89A3 /* BitcoinScript.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89FB513248D38132ABC7C70801715C72 /* BitcoinScript.swift */; }; - 6427AB3F78A63395FCEBB3C8CDC3AE1F /* Pods-Tokenary-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 18DEE602508105D8432D2424E1452D97 /* Pods-Tokenary-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 64ECA489C2F146B97F17B1EA0E0485C8 /* timestamp.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB543B10EC028E43FEC119864BBC4A7D /* timestamp.pb.swift */; }; - 652BB8A140ECF09FF11E83B9FA523803 /* NEARAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3615E6A06B43DBF36B5916B7C514EE7B /* NEARAccount.swift */; }; - 652F9D3EFA5AA86E874793BA3338BBEA /* TWSolanaProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F39BE4B2C547598667F86EE47AF4773 /* TWSolanaProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 654E300AA235478EB153B576B01E71EA /* DerivationPathIndex.swift in Sources */ = {isa = PBXBuildFile; fileRef = E601F85BF7C31E5CAED0909A081AFBA2 /* DerivationPathIndex.swift */; }; - 658FEC92E3864102E2E23E2D92B72D95 /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 886F3524AD0CE136C282038BB836E0A9 /* Addition.swift */; }; - 65EF505BD87A8A6ACFCA295D047ABCDA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A842F59040F4ECA334A99E5AE36D1CF5 /* Cocoa.framework */; }; - 66052A6ED0B31C2E791664E0FFCABA00 /* TWAESPaddingMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 032D71292B3ACEE3F5FDC0577029332C /* TWAESPaddingMode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 660B2B77699B0FA5D37A8B0D8888D8F6 /* NEAR+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = F132AE6DB6D382838A013EC50E6F3E38 /* NEAR+Proto.swift */; }; - 663A8EBD8FE2D4C550A38D1EA58B9CAD /* Ethereum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38CB28FA7BFFFE538922344E0837B0E1 /* Ethereum.swift */; }; - 665A527F690D4CE9FDD99CF32CB35DDB /* TWTezosMessageSigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 128B5796EAD3AB6E94BE20744DB691A5 /* TWTezosMessageSigner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6660CB8AF001BDDA2FF15586C6BB7E37 /* BinaryDecodingOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 081F0711363B18D0FD70A1DD4AAF3E7F /* BinaryDecodingOptions.swift */; }; - 667626DBCF4BA626421065AC63CE6249 /* ImageProgressive.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBE7CFB4F528B21B079FEDC9409CAFE4 /* ImageProgressive.swift */; }; - 6682B9C48F1DF16C29D32D7EFB04BC45 /* TWStellarProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 4663DB9782B4B88B39DF04FD2E55B5FC /* TWStellarProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66A108968E1BB5B1E6FDE39D7F6B9D6C /* TWLiquidStaking.h in Headers */ = {isa = PBXBuildFile; fileRef = B242B045BD1A542445B3993708D671C5 /* TWLiquidStaking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 67A0A899B41557C42534D22A7403F3A3 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DA28D27CE4CDA760D691469B73855B5 /* Comparable.swift */; }; - 681C553670A8A9EDCBBC4BE28D93AABF /* TWEthereumAbiProto.h in Headers */ = {isa = PBXBuildFile; fileRef = A302209356A00095DC4D7D624AD9D031 /* TWEthereumAbiProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 686CD9D2D39FFEF97BBE558F1A38D4BE /* TWVeChainProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E5C6948B98BE431E93D86DD1FD4C054 /* TWVeChainProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 68708D23002966183663AB9C7BF0AFDD /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B49EBAAB30E14DD0F6107211CB9355F /* Box.swift */; }; - 68C30C737080DEECAD17A98436A8F638 /* TWStellarPassphrase.h in Headers */ = {isa = PBXBuildFile; fileRef = ADA70292123B0F8EB42A41EFB046CDD7 /* TWStellarPassphrase.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 68D6A3648A29A19D0B56103F1C7DA858 /* Decred+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = B72E5AA17ABFA95C39678336F43F2B33 /* Decred+Proto.swift */; }; - 691839D3A9E2A0F70C2782335B861444 /* Icon+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AC85B22832230B0F4C523704BF98A5C /* Icon+Proto.swift */; }; - 6975BB32B1DAD3CE35FD434DB1010C48 /* WireFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB4427502F9D14C9BA0D97E37A0152B7 /* WireFormat.swift */; }; - 6999C251914FF2B25DE7AC6D7F8BD9BC /* SimpleExtensionMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE5A5DF4A5764318378BE545367933E2 /* SimpleExtensionMap.swift */; }; - 69B5585B934F0E0E56C589C40ABCA8DF /* TWEthereumAbiFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = BA1D3FEE26E2A5122BAD317D565B4820 /* TWEthereumAbiFunction.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6A1AEE5D7C2A32A6F81BB604D48EDF57 /* StellarVersionByte.swift in Sources */ = {isa = PBXBuildFile; fileRef = 363C4C83E98EBE40017C27F8F03AEA93 /* StellarVersionByte.swift */; }; - 6A404A5EED212EAB4EBCE5A8AB9A01D5 /* ImageDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83C0492624A62D333A78A26B8F3D022B /* ImageDownloader.swift */; }; - 6A624831DCFCA30DB66F110DBF708D00 /* KFImageRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CF5623EF8000ECBAA5B21C6A5EE3BE /* KFImageRenderer.swift */; }; - 6A78E87CD95D2A5BB7BE2E759A3DDB4B /* TWBase.h in Headers */ = {isa = PBXBuildFile; fileRef = D96702779FB41560EBEB18E94B0F47E7 /* TWBase.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6AFF5B6B753B7CF80886EED34420E950 /* KeyStore.Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03C323AECE33AE438F09C9E3C8553DAD /* KeyStore.Error.swift */; }; - 6B4FEE625FDF4E884EAF341906DBF262 /* ImageBinder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5481C88B09DF44E486BBA146554E7958 /* ImageBinder.swift */; }; - 6B736B2A796793CD7782AF55CD4AC80F /* BinaryDecodingOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 081F0711363B18D0FD70A1DD4AAF3E7F /* BinaryDecodingOptions.swift */; }; - 6B78DE5AB26CA2749592C84EE66606A7 /* Harmony.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3085F10E052BA25632809F3542D65F20 /* Harmony.pb.swift */; }; - 6BFB87D9D0091BCCA7520DD4ACED7836 /* DerivationPathIndex.swift in Sources */ = {isa = PBXBuildFile; fileRef = E601F85BF7C31E5CAED0909A081AFBA2 /* DerivationPathIndex.swift */; }; - 6C0EB6D7EC6003131E2BE864040CFB10 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A842F59040F4ECA334A99E5AE36D1CF5 /* Cocoa.framework */; }; - 6C28D50A190DD763196CD8F46C3FCAE1 /* TWOntologyProto.h in Headers */ = {isa = PBXBuildFile; fileRef = CAF9C6F39102C871BFAA9E9C84F5BE4B /* TWOntologyProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6CA0B6622AF41D626038D762199870DE /* Google_Protobuf_Wrappers+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 665EDC07E1D1ECFD22B09B93D61A3C58 /* Google_Protobuf_Wrappers+Extensions.swift */; }; - 6CEDDE007D4D5C22AA5DBCA27DD29EE8 /* TWAptosProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B8DB7152CEBDA1B9F9BFBD91E36A9C1 /* TWAptosProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6CFEF50AA959E431884A4E3A106739B5 /* BinaryEncodingOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1F5519F4B87146A47383D368268E667 /* BinaryEncodingOptions.swift */; }; - 6D15B824851FF0FE50ADA4295D0F7276 /* empty.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 720C9C7CF3322A59901BAA55579980C1 /* empty.pb.swift */; }; - 6D9E6F6B836A097E6FD44D9E4B5AC9B9 /* TWFIOProto.h in Headers */ = {isa = PBXBuildFile; fileRef = EFEA13C1C2D5BA7DADF18D9E4FB2E0C2 /* TWFIOProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6DAA3CD5307F8BAC7338217E0B5956CC /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE192A4884D18DA7A597BA774031EF00 /* Result.swift */; }; - 6DF1B2C930EFB774B02E1705291E5C28 /* JSONMapEncodingVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB6BD5A749390FC806EC8A5FE2244EA9 /* JSONMapEncodingVisitor.swift */; }; - 6ED3D4E08CC7472AE0C1D91DAA9CB4B1 /* TWHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 207E832E129737BBBFA697D306AB6C84 /* TWHash.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EF19F9601D42B24AECCFAF9608B80C1 /* TWNEARAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FC84B3093A848901AC994234867BC93 /* TWNEARAccount.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EF1D4E95D4561A49B2A4FCC14ED7C3A /* SelectiveVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34E2565A43CCADBFFF2D63038364E192 /* SelectiveVisitor.swift */; }; - 6F480EA79002212DCFF90D232AF089C0 /* Base58.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93CE734EFDA99626A19F3559E42C1274 /* Base58.swift */; }; - 6FCD564D37539B240F6CC7B09C1C4680 /* TWTheOpenNetworkProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 7FE293D5501643C4803EA3327D9F9DD3 /* TWTheOpenNetworkProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6FE929C82C6DDE1BE085F2CB810B494F /* TWMnemonic.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D869323A343F3BE1463AED7F59D5F4F /* TWMnemonic.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 710CAC5C04E3E0AC69CD8B7ED5A6D2FC /* TWThetaProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A3815CA79AD33CED38B16DB1155A841 /* TWThetaProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 710EB8B7102DA339120A8A4350423DB1 /* TVMonogramView+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7FC5C68B02094F1AAB56B0EA7FB5AEF /* TVMonogramView+Kingfisher.swift */; }; - 71624923E5ACA725FCC96D5FBCD8F510 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 002B59B1C5346996B396069FF5C2ED4F /* String Conversion.swift */; }; - 716EA164B1563B6A88FE0F82A5DE8BD4 /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C8EE235D97488B3920ABF00A25EDEED /* Integer Conversion.swift */; }; - 71AE3B10EC9EE26FC4A996CB930E4DDC /* RedirectHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = A79E053CDC7BAF20105F35325F64A81E /* RedirectHandler.swift */; }; - 71B94544EDA80ED3FDB8D8C52A22AE76 /* UniversalAssetID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AB81CFA8EA50C0AF3211B5404670DE7 /* UniversalAssetID.swift */; }; - 725B5270C0A164C9FE37A9CB45579AAD /* TWBarzProto.h in Headers */ = {isa = PBXBuildFile; fileRef = F929CD96AE82416D88639C5349B0F8DF /* TWBarzProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7269F4619348F8815493CDBE9AEA8226 /* FieldTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AD0E1BCC2EB545E03E7B239BCC8D8E6 /* FieldTag.swift */; }; - 73F3A28A90FE4FF0C271C2EC551B2C35 /* ImageContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BB143A46CBE58355B339EA4AED2785E /* ImageContext.swift */; }; - 740922BE8B672ECE84E1040042480B44 /* FieldTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B834D424680C126A5AB061997265979 /* FieldTypes.swift */; }; - 743B0DCCFC394C26B9C0DF171879E3A5 /* TWTHORChainSwap.h in Headers */ = {isa = PBXBuildFile; fileRef = 8859F555F96A70FC9E9CFB1E46BD302E /* TWTHORChainSwap.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 74474FB0CC1AFD90EBB57AAD2F2F6A62 /* AnySigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9278BD31E7B1D297ECE838F10291E4E5 /* AnySigner.swift */; }; - 744DA1479EAC55BA8A7333D190DAD881 /* TWAeternityProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 05C50A492C2A145B91683E80C1856047 /* TWAeternityProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 746F34331947C3328012A3F1691EE226 /* Bitcoin+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D065B07FE812987B5098636289FF42A /* Bitcoin+Proto.swift */; }; - 74AA921924DD214BC00ED78CB2D8074A /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = D009038B8154F126496AD472961F904B /* BigInt.swift */; }; - 74CB157ADBDA5AF128753E67B79FDB6C /* ImageDataProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAD573CF11AEAFF499E0798FE1A7363 /* ImageDataProcessor.swift */; }; - 750DCAC6A92D16252903518170BABBA9 /* DerivationPath+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5BFDE56CE91672F5F7ED3013C6EFC1F /* DerivationPath+Extension.swift */; }; - 75295BF00B128EE181F4D1504406BB99 /* Placeholder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 038B27C26CCB6F3BDEF6C13ADA63C42A /* Placeholder.swift */; }; - 753B26A8F9C7A49323255AAA9ECE32CE /* TWGroestlcoinAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C19C295E6C1CDA92EE78DADA9F10BE0 /* TWGroestlcoinAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 755CB40AC7969FF604707CA665FA180C /* TWIoTeXProto.h in Headers */ = {isa = PBXBuildFile; fileRef = BE801000FD5DF98D88CAE1E3157A3CBC /* TWIoTeXProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7572A133DA0947D433C53552B46E3461 /* FIO.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F55B52F956B1FCAB0C7714B9A83A6A6 /* FIO.pb.swift */; }; - 75918C5DB8B37EA83BD416E921BF9633 /* EthereumAbi.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = E73851AA06C56AE1FEAE9AB143291422 /* EthereumAbi.pb.swift */; }; - 75B1FC18317D01DEFE7D80D52096634C /* ImageTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FBE3CC825141C29EA61B91028C4B641 /* ImageTransition.swift */; }; - 75C2EE1909653E4056F8F61AF65ED81F /* TWPublicKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 6AB75F39A8C7A86D2D401DE40E2F2565 /* TWPublicKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 76454D9E17F7B04BC2ECE79EC84D0321 /* TWEthereum.h in Headers */ = {isa = PBXBuildFile; fileRef = B4A4AC094E72C6670E83472EB987FBDC /* TWEthereum.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 76985547B597FC9384095F42283FCC3A /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22DA17C7FF836BFD78FFE6DCE9134F4A /* Subtraction.swift */; }; - 77164B953D90EF5B839B7A2EFF3595EB /* TWEthereumChainID.h in Headers */ = {isa = PBXBuildFile; fileRef = A1B9B7B66E157DA1707A97B9B4DF8570 /* TWEthereumChainID.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 771B60DC5741C81A87CDC401BD660019 /* KeyStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = E12805B28BB706E5AE09D6668603522C /* KeyStore.swift */; }; - 7749DD20CDDCA8BF410B08B3D0C7A797 /* Theta.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CCF353B366CA359985A466D17FD11B /* Theta.pb.swift */; }; - 78406B693FA5D3F8F390CB6AE3CC06BD /* TWAionProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C74AE56ADB950BEF977CDFE3F67DD8 /* TWAionProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 78C78E719275712CB19E84C74DD632CF /* TWAES.h in Headers */ = {isa = PBXBuildFile; fileRef = EF68B8080F716B96A94474174AF96108 /* TWAES.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7933796D4045F3C60B471A577AC9BCF3 /* TextFormatDecodingOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E14980C2C39C88F8F0ED8E30F556D68 /* TextFormatDecodingOptions.swift */; }; - 793D85B0453667D13062BA0D02B5E3A0 /* BitcoinSigHashType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E48ECEA22C76D471E8C2CD6004AE4EAB /* BitcoinSigHashType.swift */; }; - 794A7ED743E24FAC59D6AECE61D5A1C7 /* FormatIndicatedCacheSerializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CAD01D0F5924ECAC9393C0BA64944ED /* FormatIndicatedCacheSerializer.swift */; }; - 79545542BAFEDE034BF426AE78CE3C6C /* Aeternity+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8F05D0A750849560AD9434D75C7198E /* Aeternity+Proto.swift */; }; - 796EA50EB48265F8EEDD00026815169D /* Tezos.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5744FFD4E3E63605DAC77CC8B4CEC18 /* Tezos.pb.swift */; }; - 7981ADA2C80F4C7409AD3214065DA5EC /* ExtensionFieldValueSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20F20507ABFA06B2BB4823E1B9F3A04D /* ExtensionFieldValueSet.swift */; }; - 79A5AB459B70029E0BD51ABC6F6D3C0F /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3214B869B27DDDD9D4B9820CA8F58C8 /* AES.swift */; }; - 79BC9812962E0DE5B0DEC2C79ECE017A /* AsnParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB0EB4FEB001355FAD0C330490CCB4A /* AsnParser.swift */; }; - 79BF3BB61CD67E586EF6C60144F1B093 /* Cardano+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC43C8573E234E59D2F4E3E73FA25CB0 /* Cardano+Proto.swift */; }; - 79DFBFDFCA6F4925FB6295C48F093F8B /* LiquidStaking.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43FA0A4C15DE1B1F6DFD0ECD0BA95D6F /* LiquidStaking.pb.swift */; }; - 7A7FE406F33548C8276A7696A8F1E510 /* SwiftProtobuf-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0598539458AAA2AAF6173D37EB1E926D /* SwiftProtobuf-macOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7AA6F68B19A84C42FFA0689732F6CF65 /* SwiftProtobuf-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C7907B894A03B342CE1C03AA84747F3 /* SwiftProtobuf-iOS-dummy.m */; }; - 7ABBFC909F883DEBC2FD8A91FD6CA361 /* HRP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25F1961FC5A23DA3EE85F800B6CA3098 /* HRP.swift */; }; - 7ADFA1E9DD782489547C371A932B3BA7 /* KFAnimatedImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8333AF2A67DB0B10A1EC1CFCA9695C5C /* KFAnimatedImage.swift */; }; - 7AE17100E32E1B54B97F9247F79880BB /* KFImageProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAA57CEFD7A7AFC8744CDCEBF92CF26 /* KFImageProtocol.swift */; }; - 7B2D70436301751457E7A4CAAAE65CED /* TransactionCompiler+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6796316430087AFAB7E717FFED618E61 /* TransactionCompiler+Proto.swift */; }; - 7B63BA1E87B74AEB27E8ED9494CD3323 /* Ethereum+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28D6388940928A84ECE212B8F5FBA1B6 /* Ethereum+Proto.swift */; }; - 7B6F7069451DFC345E5E8520FD17AD4D /* Nano+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC5D96C0A23604413A8E2B45EF4D15A /* Nano+Proto.swift */; }; - 7B7C416FBA8F74697EB8F966B5286677 /* TWTransactionCompilerProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B353854C116EF27EA6DF3B3D3A263C1 /* TWTransactionCompilerProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7B8FC6CD3C89AC01E6BC18C5FD938937 /* SS58AddressType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CDE66CAB35FCDF8F8FE96AD900A6B25 /* SS58AddressType.swift */; }; - 7B9C56CBEFEB954A0E3F4D42F436AC31 /* TWAES.h in Headers */ = {isa = PBXBuildFile; fileRef = EF68B8080F716B96A94474174AF96108 /* TWAES.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7BA4961044629DC2843F582CE51E923D /* Google_Protobuf_Struct+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CCABC9836B32D09A771DAF2816B01BC /* Google_Protobuf_Struct+Extensions.swift */; }; - 7BC8E110F4A711DDF2E64731D005C3D2 /* TWStoredKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 69FA87A03BA5A8A3DBF795F2EEFFEB61 /* TWStoredKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7BCBAE5373FDF615D31B10D2BAFEE91B /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A862CCA152713345E3E79313F2F5276 /* Hashable.swift */; }; - 7CDD0BEC3015D558CAB53DB38A623C82 /* EthereumAbi+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = B881AAEFF827D3C55C495A77E1CB5516 /* EthereumAbi+Proto.swift */; }; - 7CF464BEB8A4BE6216B892A02DE34495 /* Tezos+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C71C7B316B2BC77686826A04FC493D3 /* Tezos+Proto.swift */; }; - 7D12B8E94F73B93C1024676E83763EF2 /* Bitcoin+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D065B07FE812987B5098636289FF42A /* Bitcoin+Proto.swift */; }; - 7DAB3040DA39DB7921FC318830D43162 /* RequestModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4853560BBBA31D1D64F4BE6BD468A7A /* RequestModifier.swift */; }; - 7E0D332C452D6BF49CC9BB7AEF423DA6 /* EthereumAbi+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = B881AAEFF827D3C55C495A77E1CB5516 /* EthereumAbi+Proto.swift */; }; - 7E2E7EFFFA6F5B83818161DF9E099F71 /* FilecoinAddressType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ECA8E299B8C244AA6848A7EB6BC761 /* FilecoinAddressType.swift */; }; - 7E302FB9E3794ABBB3EFC66941A7787E /* SecRandom.m in Sources */ = {isa = PBXBuildFile; fileRef = C26BF9BC8A9CDD8E46E1F5B8E582783C /* SecRandom.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 7E669D92820BBA5F8EE6C1D18D1C98A4 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C370BFDC01F7A74A137ADE4007BE750D /* Codable.swift */; }; - 7E8866ACB01FF6B501E40A0AD9C2E4DE /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276651878187C7E173EEF1033FE2647C /* Strideable.swift */; }; - 7ECD6A1F0F69D30EF211ADF83C4C5BBF /* BitcoinV2+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C9411B2A94F551D7C4375B128146037 /* BitcoinV2+Proto.swift */; }; - 7EDD28BC8BF1F15B0958FF2492140ED6 /* TWGroestlcoinAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C19C295E6C1CDA92EE78DADA9F10BE0 /* TWGroestlcoinAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7EDEDF99B6ECD0F81C846FF6E14E4561 /* NSTextAttachment+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5991DD00FFD8600C5D6FEE044B86C80 /* NSTextAttachment+Kingfisher.swift */; }; - 7F07BB52F0E8F15ED9251912C6011F3A /* TWEverscaleProto.h in Headers */ = {isa = PBXBuildFile; fileRef = A201934B5C9F7B9A30181A50A97F5906 /* TWEverscaleProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7F12D90D401D23C5DE40EC89023035D5 /* TextFormatScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DC40554F5072F0E18A8C5FE76916510 /* TextFormatScanner.swift */; }; - 7F3E76C23BE246AF0E45C393B14D7BB0 /* SessionDataTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FBE8665476CB5F9522F7E496FF9C528 /* SessionDataTask.swift */; }; - 7F8BEF6222972DD78A65343BAEF6F262 /* AnyAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = E08D5B416ABA8C696EC71FD6B17BECCF /* AnyAddress.swift */; }; - 80332037C7DE6D6FB78C5B806B6EFE82 /* Binance+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2687F760EAFFE874772C932D400905E8 /* Binance+Proto.swift */; }; - 80391A2FC41167EB55704BF0E22D2C73 /* PublicKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EB022C9C09FED36EFF5EC4382E5C80D /* PublicKey.swift */; }; - 80F4B4FFD809FBB8023B5ED133950932 /* Utxo.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC3757D8648FEA103B3848822088E9BC /* Utxo.pb.swift */; }; - 810C7591531E6AF2B90B1115F8EDDD3E /* Curve.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2C3A27FA603C119187AD4A1BBFD8F7B /* Curve.swift */; }; - 810C8F2812D8A4902FF27D852241CB85 /* Message+TextFormatAdditions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21C76D728654A8B1D51B0EF5350BF2DC /* Message+TextFormatAdditions.swift */; }; - 814BA59E24C4617CE991550C38E55D53 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 509BF995B0D852C779E89CBD3D808CF3 /* CFNetwork.framework */; }; - 8154E367C037B57F6E8A9D9F32A5AF34 /* PrivateKeyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D99BD4E02C7EB8A65D457D1285ADB905 /* PrivateKeyType.swift */; }; - 8190618E0C34972873B8B6141D090CF9 /* KingfisherManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC71AE8F0385A5FDE80EE316A2E8BA05 /* KingfisherManager.swift */; }; - 82D30C6AB6267F38B056350BCCFA356B /* TWHRP.h in Headers */ = {isa = PBXBuildFile; fileRef = 64E4E5260567D87102F99275973B6FA2 /* TWHRP.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 82E09900A0CB91B7F5190518319E8D3F /* CacheSerializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC439B9BC2E3BCD1D027D855BB14D98 /* CacheSerializer.swift */; }; - 82E34CEB36C190971B92A1D536843394 /* TWAsnParser.h in Headers */ = {isa = PBXBuildFile; fileRef = D89BD6C5B8B5AA05B2554E7A26093B7C /* TWAsnParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 82FA2C7D41191239C2296961016D03E4 /* api.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 500DC4908D321D0036B86023C3DE980B /* api.pb.swift */; }; - 836C106B7ECFADB21A44F6E0CA7F940F /* Hedera+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21B9F23278C0A14EC7B8583F108B3F11 /* Hedera+Proto.swift */; }; - 83859389525DD1213609DEDAE7A818D7 /* EthereumRlp.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC5A4966727F266DA89586C51E7A5B82 /* EthereumRlp.swift */; }; - 839725933435E35CAB77A61F0865C73F /* TWCurve.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C6C62D872FA2C2D48B4F1F13716645 /* TWCurve.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 83AAA612DBFB8597592BF22D7A6F33B0 /* FormatIndicatedCacheSerializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CAD01D0F5924ECAC9393C0BA64944ED /* FormatIndicatedCacheSerializer.swift */; }; - 83B80E4833B7EE1122E1C91B8A0F2B30 /* TWWebAuthn.h in Headers */ = {isa = PBXBuildFile; fileRef = 703463228786F4945B5497FEEBF5D8DE /* TWWebAuthn.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 840B45160CAF270F11F0E961EEBF32DB /* Google_Protobuf_Any+Registry.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEFA44D6DA05BB5DE3483DD4C29D50DA /* Google_Protobuf_Any+Registry.swift */; }; - 841A5370765571A6E96DA6174CE0626E /* BitcoinFee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B27C8EB84AB59FB71E403D1E3295DC9 /* BitcoinFee.swift */; }; - 84A6A38ACE47A53FC5C9BB31A50B7543 /* LiquidStaking+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23E9DD9D99AA09FF9D623CCDB0828D83 /* LiquidStaking+Proto.swift */; }; - 84F38077AB944BA18335397058D83224 /* AnimatedImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E1E000D7EFDC8AE72F241BD1BC3DF55 /* AnimatedImageView.swift */; }; - 8525717401B5E1B16E0356BD8347C194 /* ZigZag.swift in Sources */ = {isa = PBXBuildFile; fileRef = D81702FD9A3E32F2A582309FF30EA3AF /* ZigZag.swift */; }; - 8534C76020A9BF937B8AEC592EE3D65B /* Waves.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9E6495281D0E9AC3575EEB5FB1C3EAD /* Waves.pb.swift */; }; - 858801BD68726EC7A7155F1B892F39DA /* Derivation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6517ACB63CBFFF085786EE068E92BD07 /* Derivation.swift */; }; - 860BD1A8ECDD52A6A0468BF21D383F7F /* Pods-Tokenary-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = CDB6E8FBBC079A910F15FC78DCE5399E /* Pods-Tokenary-dummy.m */; }; - 86685BA5D769FC9B2AA40816763A0B80 /* SS58AddressType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CDE66CAB35FCDF8F8FE96AD900A6B25 /* SS58AddressType.swift */; }; - 8672D9F1CBBE551838E09C2BF43E0E45 /* GraphicsContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7CE1301BCB66F40CE8196CAB3F24EA3 /* GraphicsContext.swift */; }; - 86797FEC49AB7B055B954AD88060D607 /* ImageBinder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5481C88B09DF44E486BBA146554E7958 /* ImageBinder.swift */; }; - 868878F4F80DD1DA2C19B7215D973A38 /* TWEthereumRlp.h in Headers */ = {isa = PBXBuildFile; fileRef = DA76E597BDAF4804577A3E813C43A506 /* TWEthereumRlp.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 872CDB0C58246142545BBC9E3AB14F43 /* Nebulas.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5961ED8B13E584B76BE678E69845EDC8 /* Nebulas.pb.swift */; }; - 875236A59B78DA1EA7C63F2C6AD352C2 /* Enum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 725F89687254C664F94D44D4C675185D /* Enum.swift */; }; - 877FA629FAF5B35F960307BD85AB9872 /* Aion.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5DF41A48A74AA8257F405288E2A9D0 /* Aion.pb.swift */; }; - 8786358F65F435152EB3F58DB5EE80A1 /* Cardano.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05C4AC95214C5BB1E6B970254BD0D1C0 /* Cardano.pb.swift */; }; - 87BF0210E0EFC038F21CB82DC26B19DB /* Aptos.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20092DBF43DB8CCE2322C5E4ED2950 /* Aptos.pb.swift */; }; - 87D63DDC827789191E6A51AA958D9E16 /* MemoryStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = F86FEEBD6F89B9185BB390D9E9E136C6 /* MemoryStorage.swift */; }; - 8803CDDF266B1A0AD17BB4728093923E /* BinaryEncodingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EBD06B016E8E81A6466BAFFA9192F0D /* BinaryEncodingError.swift */; }; - 88361EB477DAE1A781054607E3D7459B /* TWEthereumRlpProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 1DF52178386C075DA3857336307F8E58 /* TWEthereumRlpProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 88568199087495E00DDB03CC9F43F615 /* Tron+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA1C093DCEC99DD364F6C0DC1343154F /* Tron+Proto.swift */; }; - 88707AD7625FD83B5EB94569BDDD6065 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A842F59040F4ECA334A99E5AE36D1CF5 /* Cocoa.framework */; }; - 88C65B09548941C57DE2EB01B9587938 /* SizeExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07E551D848FF88A302FF821108CCD775 /* SizeExtensions.swift */; }; - 895183AA411E9B1B10B467BB98DDBF0B /* TWAlgorandProto.h in Headers */ = {isa = PBXBuildFile; fileRef = EC55B36E81CD31A719890ED6972B9D59 /* TWAlgorandProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 89B6251B7061DFD214B95DE0683670B0 /* Google_Protobuf_Value+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A2E743E360E4C33C6B5E931DF17F8CB /* Google_Protobuf_Value+Extensions.swift */; }; - 89F1F84A00C05A1D4CC37A06625DE753 /* KingfisherOptionsInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9288637E310976581EB191445117591 /* KingfisherOptionsInfo.swift */; }; - 8B0C07771D6F5D1FC88AE2F091D33D90 /* Account+Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C63EEC03E8DF0127878414DD44F7EB2D /* Account+Codable.swift */; }; - 8BB08F0D38FCC712D825385C9F1E39DA /* Common+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF1FE8FD9DEEB30FFB056435CADD4543 /* Common+Proto.swift */; }; - 8C80CD76734DE8CCA552C720173E7178 /* TWTronMessageSigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C7D9D46FB69A4413668BD335E7B216A /* TWTronMessageSigner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8C8DB63A622185CB2299C54AF12A2E74 /* EthereumMessageSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66929AB0E516AE0F67EAE05485C0D152 /* EthereumMessageSigner.swift */; }; - 8CA4033157AF2FAF156203FB264B2BC8 /* Zilliqa.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9170CB305C589344477565CB0CE92809 /* Zilliqa.pb.swift */; }; - 8CB4D867328DA1E7FC718FC406D421C4 /* TWHederaProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 3835A2A5C5C0B7626AC3A68882E93249 /* TWHederaProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8D1D57184FE43E97A413D8A93FAD2078 /* TWStoredKeyEncryptionLevel.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BF96F25FA20FA87C41337488496873D /* TWStoredKeyEncryptionLevel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8D258B1FAE99F470537EFE4EA0DE466E /* TWAptosProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B8DB7152CEBDA1B9F9BFBD91E36A9C1 /* TWAptosProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8DE6540FC8179796AFF1957BE3F5C3A3 /* SimpleExtensionMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE5A5DF4A5764318378BE545367933E2 /* SimpleExtensionMap.swift */; }; - 8E0333DECF25219B4115327909219046 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C370BFDC01F7A74A137ADE4007BE750D /* Codable.swift */; }; - 8E49129A648A549B58DD90DD6B119AC8 /* TextFormatDecodingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = F68D21332FD5A04A2A2EC76704BD57B6 /* TextFormatDecodingError.swift */; }; - 8E60C028138AFC6D564FD583B6165697 /* TWNULSProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 9569F26AB766917EE6CF7BB561241439 /* TWNULSProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8E6311926D99FD4F26E0018D1C1F2068 /* TWEthereumRlp.h in Headers */ = {isa = PBXBuildFile; fileRef = DA76E597BDAF4804577A3E813C43A506 /* TWEthereumRlp.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8EABD9EEF56F42C6C8E88DD6F736EF5E /* Data+Hex.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7E33D0260C00CA2D756156684831BC2 /* Data+Hex.swift */; }; - 8F440CBCE87100DBD568FDBA07E29934 /* Stellar.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5BFC00410F341D246BEEB142DBC239B /* Stellar.pb.swift */; }; - 8F50323B199D0DF5536BFD93E581B49F /* TWSegwitAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 3267AC2A904A8D61A9A5CC64AC5D3940 /* TWSegwitAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8FA04A1AFDCEE412CD04A34D4E00B0AD /* Ontology.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1C727651BC16D0B0D8FFD7C559A0B61 /* Ontology.pb.swift */; }; - 9077CBA418D29564472DE2312E36812D /* Oasis+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CFDD1B000F85A766B620818507E7DE1 /* Oasis+Proto.swift */; }; - 910925AD8088D9F833B9727DF020B1DF /* StoredKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFF83FE4668E7031BF6A5714F8A7791E /* StoredKey.swift */; }; - 912192E5DCB87EDC5136673C2F389030 /* TWStoredKeyEncryption.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E27E6DF7A806D288ADEF2A99B99DD75 /* TWStoredKeyEncryption.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9196D65E3752D8989AAE484F54947600 /* BitcoinV2.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31EE44B9D977593E770CE5A90BB4E13B /* BitcoinV2.pb.swift */; }; - 92008664B2714E91A0FE98C510D9CD75 /* TWNEARProto.h in Headers */ = {isa = PBXBuildFile; fileRef = DE4099911825248EF5F4348826B1602F /* TWNEARProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 923CCCEBB8928EAA853189B5C0A51FB6 /* Message+BinaryAdditions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A8B7C1888CB4E7CB263E98509CC35D6 /* Message+BinaryAdditions.swift */; }; - 9243E6D1DA94115265C5DA8088D1F8EB /* TWStoredKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 69FA87A03BA5A8A3DBF795F2EEFFEB61 /* TWStoredKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 924FDB5FFE22039DB258BB793D9E7C17 /* SelectiveVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34E2565A43CCADBFFF2D63038364E192 /* SelectiveVisitor.swift */; }; - 92570A9BF8896703FBFE0ED6E6BC20BB /* Base32.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53A8BEBA7CD55234B26C1F4335352436 /* Base32.swift */; }; - 92627BBA2BD98E57AB0EA309EB3F21E5 /* ExtensibleMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56415FEBB5DBEC5E2033330ECB7A3591 /* ExtensibleMessage.swift */; }; - 9362FD0A9B9951BDBA872A3B3B49C119 /* Message.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25D46F8A8DFE004A33EF15C95D66587D /* Message.swift */; }; - 9369C812D89AA99D24D8A99885942064 /* TWEthereumRlpProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 1DF52178386C075DA3857336307F8E58 /* TWEthereumRlpProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 93D8242B37682C434E4039EDE5FE9802 /* TWGreenfieldProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF0D7E5C822BBF3FAC2DDF8C55BF849 /* TWGreenfieldProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 943D9EFEEDB7B5C925B29BA65FB3FACA /* TWUtxoProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 741A961FD62CD2174612D245938D1986 /* TWUtxoProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 944A661E919FDB822CA6FE4CC78118CB /* TWEthereumAbi.h in Headers */ = {isa = PBXBuildFile; fileRef = 614C96527E78504BBB98D74BB34F7E71 /* TWEthereumAbi.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 94702E63CFF075499A7DE99A4DE31B7F /* Sui+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = D304A4B15F992738B9FE6FF5F41C1120 /* Sui+Proto.swift */; }; - 94F849AE4D1B295169FBFAD64154EAD5 /* Google_Protobuf_Value+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A2E743E360E4C33C6B5E931DF17F8CB /* Google_Protobuf_Value+Extensions.swift */; }; - 950764E910EFF56C9B57D252E8A4A373 /* Solana+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CD18FEDFB27D51B90D18C5F21CC9612 /* Solana+Proto.swift */; }; - 956407AF28A7A6D6D1082B4F95E162EA /* TWBarz.h in Headers */ = {isa = PBXBuildFile; fileRef = 123C965CACF3E25DF64CFD572E100C2D /* TWBarz.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 95F8E385C9119C01B439ED63A5029C58 /* Barz.swift in Sources */ = {isa = PBXBuildFile; fileRef = 669F2D97B5DFB7BC8B91F031310EAC27 /* Barz.swift */; }; - 96535146121CC4533E37353AC31B472D /* Message+BinaryAdditions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A8B7C1888CB4E7CB263E98509CC35D6 /* Message+BinaryAdditions.swift */; }; - 968AFECBAEA95F6993EEF7CA0C0C293A /* RetryStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 227F53DD32685A5DFB4AFADC157F5533 /* RetryStrategy.swift */; }; - 96C6C1013F53FE8E9511C74DFD0AAA61 /* Greenfield.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DE4BCA5BE0B9812703C3F09373EF54F /* Greenfield.pb.swift */; }; - 96D9864C62B06AB4886E09C2932A0027 /* MathUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0EA2FAA76548F4961F9FAC5A4A88B98 /* MathUtils.swift */; }; - 96E3EDE15CFD17A7393386869AD59138 /* Account.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAA8199DC1571D84E4679E0F32C669E5 /* Account.swift */; }; - 971D1A7AAB43F940B0613AF295D50B49 /* TWStellarMemoType.h in Headers */ = {isa = PBXBuildFile; fileRef = 784F9D8EB78658C13E4C3E234A4B9616 /* TWStellarMemoType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 97AC5CC8691683C221E81F4A2DAA086D /* TWLiquidStakingProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D770EE3F5C51A97EAE2ABC0F0089054 /* TWLiquidStakingProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 98B03CA87C53F1D3C8348CC18BF20DB0 /* ImageProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DD786233C16BFB0599CA37F8A09F1D2 /* ImageProcessor.swift */; }; - 98B5893BFDD0A6EEF8FDD4A5FFB93B94 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = D458B1D164B5324CD308686DF5023E94 /* GCD.swift */; }; - 992C9B6B2C6D8153CDA71580F41FB42E /* THORChainSwap.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = E57BEF85A522E65DE3C8C21237C3F1A3 /* THORChainSwap.pb.swift */; }; - 99C0F0518048E3DBF3F5DE703748D9F2 /* ImageDrawing.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4FFD051C251EFC1A510196800AD75D5 /* ImageDrawing.swift */; }; - 99F9B4ED034CDADF134F02E8C693725E /* TransactionCompiler.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = A11BAE5E8F998ADA63E63DE60486B6DF /* TransactionCompiler.pb.swift */; }; - 9A1011F104A8F3728117F224A448CB79 /* Mnemonic+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA0D76D75214B59A126E49C6EC93BDB2 /* Mnemonic+Extension.swift */; }; - 9A952E826493AC549C9B122D8473AAA9 /* TWEthereumAbiValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DE5011464A84FEA139058BA0473F966 /* TWEthereumAbiValue.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9ABB6D378AD2EDDC222C36BCF3134B84 /* TWTronMessageSigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C7D9D46FB69A4413668BD335E7B216A /* TWTronMessageSigner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9C35C76B32BCAA460075ECC3154CF905 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194E8378791E7484EC73DB4FAAF0EADA /* Square Root.swift */; }; - 9C4DBF61396D28084EADA8470353FCC3 /* ExtensionHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12ADC7BD936CBFEFD5A5916F828A7B4B /* ExtensionHelpers.swift */; }; - 9CEC3CFF09A558A2481A2783A155A337 /* TextFormatEncodingVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CF04E1D6F32C6315DB91F83DE2ED391 /* TextFormatEncodingVisitor.swift */; }; - 9D7A2E36B1706A5BD9E23183962C0E77 /* api.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 500DC4908D321D0036B86023C3DE980B /* api.pb.swift */; }; - 9D863E3D97CC5B3EF97131428F03C02D /* TWBitcoinV2Proto.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FD40E6437D301ED405B05FA5CFD2D08 /* TWBitcoinV2Proto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9D9E4D6A5BA15C811D42EE2171A9954C /* Icon.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73C6AB7BA99B976057BB8C7247904E9 /* Icon.pb.swift */; }; - 9DDBA8D3CD1CFBE5E1CA569E90303DA0 /* Google_Protobuf_Timestamp+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7CD145328B23220F48D8E84CC3CD82 /* Google_Protobuf_Timestamp+Extensions.swift */; }; - 9DF3D7E2A27F75B7A76E849E723972BD /* MathUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0EA2FAA76548F4961F9FAC5A4A88B98 /* MathUtils.swift */; }; - 9E37676A3C883BA96737E276502B9203 /* Common+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF1FE8FD9DEEB30FFB056435CADD4543 /* Common+Proto.swift */; }; - 9E3F36B152794C7563ADD11F93C59D1A /* Message+JSONArrayAdditions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24F7147722EDF445861B97965050C096 /* Message+JSONArrayAdditions.swift */; }; - 9E45BA46985A4112B0A3FBB109434B07 /* THORChainSwap.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = E57BEF85A522E65DE3C8C21237C3F1A3 /* THORChainSwap.pb.swift */; }; - 9E5BDC0FAC31932ED9EF264C8B920795 /* HDVersion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90146CC5EFF9A29A6EC2082EFB787951 /* HDVersion.swift */; }; - 9E6F574ED2CAE3945C73C3D7C70F2CDA /* TWNimiqProto.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC31531743A524B032477A4828A7D53 /* TWNimiqProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9E956EFD560A82659EEAC83C14DBDE7D /* Source.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4FDD0D0E2BFB68A5ADDFEA3DC752350 /* Source.swift */; }; - 9F0023ECC93EEBC683FF6A7031A52BDE /* Tezos.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5744FFD4E3E63605DAC77CC8B4CEC18 /* Tezos.pb.swift */; }; - 9F17F5D6EBEA627E9D346C65C3591D1D /* TWBase64.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F16FE5ECC32411CC2A87385E931C504 /* TWBase64.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9F1DCE0266CE8267BE77C729CA2B8259 /* TWEthereumProto.h in Headers */ = {isa = PBXBuildFile; fileRef = EBC8B3F766C9E534385BF5B9CAD1504F /* TWEthereumProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9F31910DD9DCD0EACCFA72FC4EC87F6C /* THORChainSwap+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC2D594919426C8103AAC0B31D1912B1 /* THORChainSwap+Proto.swift */; }; - 9F4AD2DAEE8BBD8A0DB327C22ABCBF49 /* Algorand+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4C0F02594B7103FDCF68421763DBFD /* Algorand+Proto.swift */; }; - A03B7E0B3453A0CDCDF55F9E02022AF3 /* TextFormatEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F4D1447EAC541483D73DF084BA34F4A /* TextFormatEncoder.swift */; }; - A07D3E326BDCCA94E7776B977CF234BB /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DA28D27CE4CDA760D691469B73855B5 /* Comparable.swift */; }; - A0BFBA8B8DC654E02355F5B8BA4E14D4 /* TWTheOpenNetworkProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 7FE293D5501643C4803EA3327D9F9DD3 /* TWTheOpenNetworkProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A0E6184584890C6880647FCB64BF7EF9 /* ImageDataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 792B8DE3A8EA740C156954EBA50E6C71 /* ImageDataProvider.swift */; }; - A12A7ED87D8B1FBE582D955B2B91FB15 /* KeyStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = E12805B28BB706E5AE09D6668603522C /* KeyStore.swift */; }; - A27239EBA798A3525585022830854025 /* TWCardano.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0E45F829A2F6E68818572967D91E4A1 /* TWCardano.swift */; }; - A28763AB3906E49FC8311DF2A4A3E590 /* TWBase.h in Headers */ = {isa = PBXBuildFile; fileRef = D96702779FB41560EBEB18E94B0F47E7 /* TWBase.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A2924EB5A3BFFF8823DFC256CC3439D6 /* TWDerivationPathIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FDEF4B73B700A075972D201D1F9A71D /* TWDerivationPathIndex.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A2F464EA7894F525BBDEB341888E9129 /* TezosMessageSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5261E92D52DC301F8A5A282C09AB4AC7 /* TezosMessageSigner.swift */; }; - A31D1A00FE3230AF510AA833E7FA919B /* FIOAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71B78753C2A9821337517F82CEA73CDD /* FIOAccount.swift */; }; - A3D2D286870ACAEB28282B8DB2C47DD3 /* Indicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B7B1C545376B4206153C71BE40C5AEC /* Indicator.swift */; }; - A3DF6D6DB0CC3C869E76F8732AA3ADC8 /* THORChainSwap+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC2D594919426C8103AAC0B31D1912B1 /* THORChainSwap+Proto.swift */; }; - A4153D0BFC28761C1F0A90171CF9061D /* ImageDownloaderDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19630D7EED70F5054C4937BF82B65967 /* ImageDownloaderDelegate.swift */; }; - A42D2118F62928981B008152FD8167DB /* ImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68EA378435D05826C64F994495439AD3 /* ImageCache.swift */; }; - A4486F7B16336038369C9A3D556B3EDE /* TWString.h in Headers */ = {isa = PBXBuildFile; fileRef = 310906C62D8BC77FA09EDE7A300A2B60 /* TWString.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A4640FF4E49DC5DF878EEAE78B70AFAA /* field_mask.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C6F88366BF058CFD919C633C2665081 /* field_mask.pb.swift */; }; - A4AC2834F3D5EF504D6EFB1A50BEFFA2 /* Barz.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB7F62F979DF2D5A4EF5507EFB433843 /* Barz.pb.swift */; }; - A5181DF30CEB43AE8AB3A81ACF8DA80C /* GroestlcoinAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 932D38DB63D551DA0601B2CA780AAF45 /* GroestlcoinAddress.swift */; }; - A5366940196C8BDFBEDE15DE192D8166 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A842F59040F4ECA334A99E5AE36D1CF5 /* Cocoa.framework */; }; - A56960634D93A2622CF9DB02B9B455D1 /* Stellar.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5BFC00410F341D246BEEB142DBC239B /* Stellar.pb.swift */; }; - A56A19395C8D7DFF8FF4357FD81F6128 /* Varint.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD1BBF528E3DA56648A1DC964C83773B /* Varint.swift */; }; - A593F7B8975317B2D8835ED1FA0C419D /* TWBitcoinFee.h in Headers */ = {isa = PBXBuildFile; fileRef = C41145FF94EEB0FA964BB9D404F1B5F9 /* TWBitcoinFee.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A60AF78D55268B19FF8131ADFC700EF8 /* JSONEncodingVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBB49DD5A438A326F2A3F3CB758ACC26 /* JSONEncodingVisitor.swift */; }; - A64A3B88285A0E98693D4BFE892968E5 /* TWStoredKeyEncryptionLevel.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BF96F25FA20FA87C41337488496873D /* TWStoredKeyEncryptionLevel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A68B2A1E0D791B47B1835054873DB1E9 /* CoinType+Address.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89D0C9706D28A9F88B636580476B121E /* CoinType+Address.swift */; }; - A6CA35A94394D5B5AF2555CA767F1FA7 /* struct.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6330966403211B35C9F223F24FD7FCD6 /* struct.pb.swift */; }; - A6D8A16DE0582104088A4A1990F799EA /* TWStellarVersionByte.h in Headers */ = {isa = PBXBuildFile; fileRef = F4176613D79D5BC5F00DB66414A35601 /* TWStellarVersionByte.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A6D95F51214163E0124C58D4729FB84E /* Filecoin.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E6823C89AB8AF6757ED9FD07040705 /* Filecoin.pb.swift */; }; - A6FB94F74DD4455BC4F5ABE49AC894FA /* JSONEncodingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95724038B225C802D5E5B24C41F29CD0 /* JSONEncodingError.swift */; }; - A7AE3804C07DF45C5951B5AD4C042476 /* Source.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4FDD0D0E2BFB68A5ADDFEA3DC752350 /* Source.swift */; }; - A819CB0A3EDE72352601CA5B4BF21FFF /* JSONEncodingOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D78D407747D8005F8138C4E32FACF0D7 /* JSONEncodingOptions.swift */; }; - A86E696645EA0BF31A256BF5DCE53BF9 /* BitcoinV2.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31EE44B9D977593E770CE5A90BB4E13B /* BitcoinV2.pb.swift */; }; - A8B375B024F87E1C35518ABCBA54177D /* TWRippleXAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 21F1BFCEC82F915FA850C75C5EDF7B4E /* TWRippleXAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A90CB260F4DD53AE25179CC4F7DC2B35 /* TWPublicKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 6AB75F39A8C7A86D2D401DE40E2F2565 /* TWPublicKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A91944B38074D64992CE8CBB941149E9 /* TWDecredProto.h in Headers */ = {isa = PBXBuildFile; fileRef = C9E3D989D91EBC53D874232F839B4A9C /* TWDecredProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A922190FE1575D354A789A0ACAACA323 /* struct.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6330966403211B35C9F223F24FD7FCD6 /* struct.pb.swift */; }; - A9330470550EA75B0D25F0D7861128D6 /* TWFilecoinAddressConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B62FEE0A024A32D47490F7376A84215 /* TWFilecoinAddressConverter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A9758C6E961BA69848BF27A3E4201375 /* TWHDWallet.h in Headers */ = {isa = PBXBuildFile; fileRef = 9503FFEB0900749ABC5B06ACBC0AD3E2 /* TWHDWallet.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A9C8E08563A571BE6C7887BDDC01D82D /* VeChain+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3298A5F988361B72E8C0C33E9076C397 /* VeChain+Proto.swift */; }; - A9DC44F2585948BBCFC50D26DFE44149 /* Decoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8C90350789E192BA11EB3D792F4C568 /* Decoder.swift */; }; - AA8476680D174F67A76E81EF8073BE1E /* Barz.swift in Sources */ = {isa = PBXBuildFile; fileRef = 669F2D97B5DFB7BC8B91F031310EAC27 /* Barz.swift */; }; - AB4462152B89A09422A535E8C351EFD0 /* AnySigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9278BD31E7B1D297ECE838F10291E4E5 /* AnySigner.swift */; }; - AB9DD6AF16B173FB686E4372B681C5B2 /* Delegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 437871F52ACCCF7134F2298F6032751A /* Delegate.swift */; }; - ABFB084CB69978CA0E9554CC4CC2E517 /* TWTezosProto.h in Headers */ = {isa = PBXBuildFile; fileRef = FECAF54D40D1473719E1C968E57BEAC7 /* TWTezosProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AC36C62BF9BFDCD9E0E60F5B07B7020F /* TextFormatDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44D45260F8E9B64B4046E63CC386C674 /* TextFormatDecoder.swift */; }; - AC399FC1DB0A23D4FCD75D12D2098471 /* TWTHORChainSwapProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 45F476E40E6BA725295757E3C48EA675 /* TWTHORChainSwapProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AC7F7A57A703AA1EB9D1CCEDA483E807 /* StellarMemoType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F740D6B02F281E33B35E9E7AC427016E /* StellarMemoType.swift */; }; - AC8BC39CCC6EC56BA1856EF04AF06866 /* Visitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFC8A0852EA83A05E870AA4B7BAA4304 /* Visitor.swift */; }; - ACC7E584A75F3028EF142CD23C46A252 /* DataVector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88ED7522C81BEBF610E9772BBC330782 /* DataVector.swift */; }; - ACDCB936C7F9BB8EFCAB416F5E98724B /* HDVersion+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EF47005622E8E512CDAF13AE70A944B /* HDVersion+Extension.swift */; }; - AD151842000A902CF99795BC3F2E9AD1 /* TWMnemonic.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D869323A343F3BE1463AED7F59D5F4F /* TWMnemonic.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AD1F3035B9A8DF41544694D366AE980A /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8FF5B9F55078B4A8A95A6C74569A5F /* Multiplication.swift */; }; - AD2662434C55ABD29C70880A673AEF0E /* TWNebulasProto.h in Headers */ = {isa = PBXBuildFile; fileRef = A22E3F85014372A714A65F1A82064D4F /* TWNebulasProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AD2F88CFEF2128EB3FD00198910B1196 /* HashVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB2D50DDF9382E5F874EDDFFCD764AD9 /* HashVisitor.swift */; }; - ADFAB9E3974E33AFE96D4C64596EF090 /* FilecoinAddressType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ECA8E299B8C244AA6848A7EB6BC761 /* FilecoinAddressType.swift */; }; - AE8E8D94EE5F9546E409594A74908CFE /* TWCardanoProto.h in Headers */ = {isa = PBXBuildFile; fileRef = C497A825F0F288655644A67DF63C8D62 /* TWCardanoProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AEE4DD81209E245BB6A9BE18ED4F7759 /* PrivateKeyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D99BD4E02C7EB8A65D457D1285ADB905 /* PrivateKeyType.swift */; }; - AEF4E8DE9F87D0998FBE45C41593BD90 /* BinaryEncodingSizeVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 507D103F7FD6EA4DC49C8B5EAFDEE13B /* BinaryEncodingSizeVisitor.swift */; }; - AF03FD9B0C81A33679079104259ABEE2 /* Google_Protobuf_Struct+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CCABC9836B32D09A771DAF2816B01BC /* Google_Protobuf_Struct+Extensions.swift */; }; - AF0C6D96AF5259A38118E3AE438A283A /* StoredKeyEncryptionLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123377509B0905F2ACF841441C9C9316 /* StoredKeyEncryptionLevel.swift */; }; - AF83505CA503D6AA49C4E311EFFC0FB6 /* Waves+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = B56D7C16C0B60B5A6C967C3B0C661AAF /* Waves+Proto.swift */; }; - AFAAD545C154B2769EBA76164D2F3D13 /* Pods-Tokenary iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF3A88A10643A0290B0D72F59EC081F /* Pods-Tokenary iOS-dummy.m */; }; - AFB9D817A09283527D65751102C05FFF /* TWOasisProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 1DEDBBCD3733146815DEFBCB91AC236B /* TWOasisProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AFEE200A989D04A18B7DCB58CEDA4973 /* Hedera+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21B9F23278C0A14EC7B8583F108B3F11 /* Hedera+Proto.swift */; }; - B0280A5F0084B9D0E85C6BDF9655BBC5 /* StellarVersionByte.swift in Sources */ = {isa = PBXBuildFile; fileRef = 363C4C83E98EBE40017C27F8F03AEA93 /* StellarVersionByte.swift */; }; - B0333D2093A385604CDC9EEA4301FB1C /* CallbackQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD96ACD261584F033B651C700ACAAE1 /* CallbackQueue.swift */; }; - B051F8A35F88D34DD5C2D7E390295BDB /* JSONDecodingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = C76E63722BC023380717327F514F75B1 /* JSONDecodingError.swift */; }; - B05327FF1824CF0359A214DBB82E495C /* Ripple.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33AF882026976B1C595B00D0BACEA92C /* Ripple.pb.swift */; }; - B093AB28F6C3EBA7BA6A2417C3E599A5 /* TWStellarProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 4663DB9782B4B88B39DF04FD2E55B5FC /* TWStellarProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B0B07C7C89AABD1A0588F91F2550C0FF /* TrustWalletCore-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 19D583380E87444FAFF145DF4351FAAD /* TrustWalletCore-iOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B118D18E9280EFE9001E1D44BA0A6B79 /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 829250A578FE8926F326268E6ED3DDFB /* Floating Point Conversion.swift */; }; - B12815F5EDBF37AB1C035FB9D1CA9E5B /* TWIoTeXProto.h in Headers */ = {isa = PBXBuildFile; fileRef = BE801000FD5DF98D88CAE1E3157A3CBC /* TWIoTeXProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B13F87265F20CBAE3DFD2CC0411BDC70 /* BitcoinSigHashType+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78ED7ECAE693119606FD0E2E9B93653B /* BitcoinSigHashType+Extension.swift */; }; - B19F61DF7B8A3525F0CABA425B69CBD6 /* IoTeX+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8B8E71487737D810614FF0298F95C13 /* IoTeX+Proto.swift */; }; - B21AE1F924DF5B3130156E9D7B845C27 /* TWHarmonyProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 70803E3FDA9AF941337F0942E50D3D03 /* TWHarmonyProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B27AC2F43646A97F954D5C7D9C5A154D /* Data+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6AD1E0FF5895F3741DD1E5038EFE1C9 /* Data+Extensions.swift */; }; - B29D1FFC1A4B8646E1602A175772DF41 /* Nervos+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB7508A0E862687EFE674FE0E37DEF75 /* Nervos+Proto.swift */; }; - B35BA7A3A6E39F56D9D7FBC5EE1405A5 /* TWBlockchain.h in Headers */ = {isa = PBXBuildFile; fileRef = BB3151674830695AD98ACEF0182C28B5 /* TWBlockchain.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B362A1EDC581248804CEE8D7527A54E5 /* Nebulas+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CDAA112E8DC8803E1EAAB9C257674EF /* Nebulas+Proto.swift */; }; - B36F14DB116F09B4DE730CABF2CC3B84 /* TWNervosAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 910FEDDBD72574C6249A10EB0941D7C5 /* TWNervosAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B3CB027D051B10D88D88DC6164F7B4BB /* Purpose.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0102F29CD7FAFC33F333D59421471DE /* Purpose.swift */; }; - B3E09D4DE5283676566ACFAA664DA9E0 /* TWWebAuthn.h in Headers */ = {isa = PBXBuildFile; fileRef = 703463228786F4945B5497FEEBF5D8DE /* TWWebAuthn.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B44A0BDD3FAEF86715CD20B2FA91FB73 /* TWPrivateKeyType.h in Headers */ = {isa = PBXBuildFile; fileRef = 78E1AE742575E960FDE2A440E7A144CC /* TWPrivateKeyType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B467289F38F43671BF5B9719FA13FF47 /* TWDataVector.h in Headers */ = {isa = PBXBuildFile; fileRef = ABFE41AC94FB9C0C623518E14769DE3C /* TWDataVector.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B46B3284AE4654C7F5908E9A6EA9A4B4 /* DataVector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88ED7522C81BEBF610E9772BBC330782 /* DataVector.swift */; }; - B4B8C627DC60179D354AF1D2CCBD4192 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15EA94F2C1EEE737C985D8E1EAFED2AC /* Prime Test.swift */; }; - B4C48E44F67BD0DEBAE292045F8A53B3 /* TWPBKDF2.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EFF3AB6BDD4384A6DAB3ED30CA17155 /* TWPBKDF2.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B4CD96A8573434A51C004C525F392663 /* TWBitcoinSigHashType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6752EA648F3610499F67A5C39009EFD4 /* TWBitcoinSigHashType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B52531D0C775C5DB6DCBF9D65BAC68CA /* TWNimiqProto.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC31531743A524B032477A4828A7D53 /* TWNimiqProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B54431AA5BF6450D499A8B6D118260B7 /* StarkExMessageSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5D7470038583B7116C04EF668F8AAE2 /* StarkExMessageSigner.swift */; }; - B58D0371BEF7994E8E1BBE3D01E95282 /* TWStellarVersionByte.h in Headers */ = {isa = PBXBuildFile; fileRef = F4176613D79D5BC5F00DB66414A35601 /* TWStellarVersionByte.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B594EAD2541666D1F8F56468C966685E /* Google_Protobuf_Timestamp+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7CD145328B23220F48D8E84CC3CD82 /* Google_Protobuf_Timestamp+Extensions.swift */; }; - B616D9819CDA8A8DB7DC030C965FE357 /* TWAeternityProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 05C50A492C2A145B91683E80C1856047 /* TWAeternityProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B680ED32FA0B8CECD276B5257650D85E /* TWBase58.h in Headers */ = {isa = PBXBuildFile; fileRef = 18A9E81106903BEC79C4CF1EB92699E6 /* TWBase58.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B6824ED1D9CA0A2127CD226B0F475839 /* TWCardano.h in Headers */ = {isa = PBXBuildFile; fileRef = AC701DF09C9E06CA7D9517F92023D14C /* TWCardano.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B6A77025A5EF591256AA683BA40D7C5E /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54A84C468FE01C9F47FB7DDACF4CD775 /* SessionDelegate.swift */; }; - B6D7E4251EFE4DBACDE94DABE05BA546 /* Nervos+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB7508A0E862687EFE674FE0E37DEF75 /* Nervos+Proto.swift */; }; - B71CEE72F3E392D109A8C0782BDCFFA8 /* TWHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 207E832E129737BBBFA697D306AB6C84 /* TWHash.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B76A2076F6381A805904D83BBE178FE6 /* StringUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23DCBA704DB69643799A4F296305D03 /* StringUtils.swift */; }; - B7F558967D8530ED415B6EEC31C339DE /* DerivationPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AC52B88F52C8803909DB0DF2A75E994 /* DerivationPath.swift */; }; - B99FCD9A731E14FC7364312A66D8373E /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = A022661FF56B9080175E4CAB4758183D /* Data Conversion.swift */; }; - B9A3F7232CA4BBAD7C3962635AD9AB97 /* TWHDWallet.h in Headers */ = {isa = PBXBuildFile; fileRef = 9503FFEB0900749ABC5B06ACBC0AD3E2 /* TWHDWallet.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B9EF3C2A32DE441B66F3DB74FF3F3283 /* Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D7780E35F2A38ACD6F4916FB6CFB54A /* Kingfisher.swift */; }; - BA3C4648EA788B2B2EC3C9950956DBD9 /* Decred.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58B9A6C6F70D0DF41697F67031EF350C /* Decred.pb.swift */; }; - BA462449F28E21450E3E25B8246386A5 /* HDWallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA10C0DDDA0BEABF5BFCCF97CB47F841 /* HDWallet.swift */; }; - BA8E11726A5E420ACF6DD1A024616210 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194E8378791E7484EC73DB4FAAF0EADA /* Square Root.swift */; }; - BABFEC230C131E45643FB5A4697ABADD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BD7E218AAA978568DF29A6653DBA30E7 /* Foundation.framework */; }; - BB42BED20628D9DDB0FE32F64B32F5F1 /* CoinType+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4978FB55EFC3394F55F896472E3FA0B3 /* CoinType+Extension.swift */; }; - BB7168C79C4AC88C9236CCA6A06FBCEE /* TWAnySigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 9950FB5AA58FBB836C49BBF432A0F3FB /* TWAnySigner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BBBBDB605F6C85629E1473F82C0C0189 /* Kingfisher-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FA6270A8BABBB26C50F3435BFB37BF7A /* Kingfisher-iOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BBBDE32C26523C6FBD930A04EC2215C6 /* JSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCEEE315830FE4302666A00152CC31A9 /* JSONDecoder.swift */; }; - BBD8605A0A3EAE9C52C490655FA88AEE /* FieldTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B834D424680C126A5AB061997265979 /* FieldTypes.swift */; }; - BBE009A52892325BEDB3FC6BE94E0706 /* TWLiquidStakingProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D770EE3F5C51A97EAE2ABC0F0089054 /* TWLiquidStakingProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BBF5F12D53181F7F6E33A96C0AB5D4A8 /* Message+TextFormatAdditions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21C76D728654A8B1D51B0EF5350BF2DC /* Message+TextFormatAdditions.swift */; }; - BC46BD2E9446BAA33FF84C9406D66CF4 /* TWSS58AddressType.h in Headers */ = {isa = PBXBuildFile; fileRef = CDBFB272E5E82E1411EBC2CCD0E12155 /* TWSS58AddressType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BCACA380816ABD2B56157170F1384601 /* TWNEOProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 51ADD5B2E3B53B1DBC942E101177647C /* TWNEOProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BCB0CD6973A3094218BA63E6AA969672 /* BitcoinMessageSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ED3371A76D4AC11090BFE126C93B43A /* BitcoinMessageSigner.swift */; }; - BCE10C12AA295623DCD9E9EFD224A063 /* Polkadot.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF6A0DFC94DC5AB3FDA72BBD2609E432 /* Polkadot.pb.swift */; }; - BD4E8797E10DB95A991722F109BCCB9E /* EthereumRlp.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9FD122C74103F42AC0F3AF16365429 /* EthereumRlp.pb.swift */; }; - BDCC1F2D0031BC992D85C3D9DA0A84C8 /* EOS+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682B98EE94C05147DBE2D2A16EF9D340 /* EOS+Proto.swift */; }; - BE0656CD68B7EDD7864671518FD6247F /* BinaryDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7848F8E0AB945162099F90633F81690 /* BinaryDecoder.swift */; }; - BE16F4824CC3221A6FEAD36E72D79334 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 87601A1F0DAC6747565BE384EC2E639A /* PrivacyInfo.xcprivacy */; }; - BEE71871F21B043242AF732E0D9924DC /* duration.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51D8DDBE6FBDB9BFF593D642A2864F2 /* duration.pb.swift */; }; - BF4CDE5C30FD4B74C132E47DB51E4429 /* AnyAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = E08D5B416ABA8C696EC71FD6B17BECCF /* AnyAddress.swift */; }; - C004CF537B78E685131999B5469BAFFE /* CustomJSONCodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F31C58C0BC905D0070DBFA500D239EED /* CustomJSONCodable.swift */; }; - C0284A0A774382D332CC9F3DB4E5BE89 /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B2773F0C23CF91E3B3CB5EA1CC511EA /* PBKDF2.swift */; }; - C02B0CA223960FE1D1DBE5668104D885 /* Google_Protobuf_Any+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10C539C5715FF822EA9A79893CAB496D /* Google_Protobuf_Any+Extensions.swift */; }; - C03A9D25EE29EB03AD97DC6FF10DFCF6 /* Google_Protobuf_ListValue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA50553A86292E8C435065CE5A25D1F /* Google_Protobuf_ListValue+Extensions.swift */; }; - C0806B7D5E7DA7D6698448C81C400B7D /* JSONDecodingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = C76E63722BC023380717327F514F75B1 /* JSONDecodingError.swift */; }; - C08B4B383BA209F2820F3EE84972F8D5 /* TWNervosProto.h in Headers */ = {isa = PBXBuildFile; fileRef = C258B90CEF2C67C03AC715D80EFBD761 /* TWNervosProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C08D27A6105F694CD337E75A120B4078 /* AnimatedImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E1E000D7EFDC8AE72F241BD1BC3DF55 /* AnimatedImageView.swift */; }; - C09EC3FBB4B86421C29326932ABB0B4A /* HRP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25F1961FC5A23DA3EE85F800B6CA3098 /* HRP.swift */; }; - C0CF286E899C8DD96272605A53E76496 /* Theta+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380778018196417D97B7D095CC541514 /* Theta+Proto.swift */; }; - C0D0955CADA3CAFB5A458C60687AB0FE /* TWBitcoinMessageSigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 33244974D009E1E13A9F72DD4D12DBB2 /* TWBitcoinMessageSigner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C0DF9D19015CE1D318799959F9DA2CFD /* TWCoinTypeConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 993C856FBB41BAA25BA0C3462D14CD58 /* TWCoinTypeConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C0DFAB698EECC57D7E67A7D6007FC841 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9D979A6D100A301EABE1F1E2E9A58A8 /* Division.swift */; }; - C0E69DACC0A99519671226C7343635D8 /* Aptos+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = D574CD9AA95787BAE0984A508099F91A /* Aptos+Proto.swift */; }; - C128E46A847ED5A30ACCE1CD6F8346B7 /* JSONEncodingOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D78D407747D8005F8138C4E32FACF0D7 /* JSONEncodingOptions.swift */; }; - C13AC60FA0C789F4DC77F4400F0D41CD /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3479A3217066A19B2638C8216B9770C /* Bitwise Ops.swift */; }; - C14493D7114BBDA35DC286CB6BC37019 /* DiskStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF604D64AF4BF89ED27A81E021E2B890 /* DiskStorage.swift */; }; - C1E868FD5A446330237DC7B0B00B949B /* Purpose.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0102F29CD7FAFC33F333D59421471DE /* Purpose.swift */; }; - C1F24D9309DFBF7ED95E2D2CAD824C5C /* TWHDVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D2BDBB5FC2D531E8D2B0A0DB4958A23 /* TWHDVersion.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C22C4EC93F698F8F3E78B037791FF4F2 /* NEO+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C08858C3F2E80CF11B9C5039BD0CD41 /* NEO+Proto.swift */; }; - C24262B49D37473E232CA304F0C317E1 /* TWNervosAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 910FEDDBD72574C6249A10EB0941D7C5 /* TWNervosAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C2EBAA09F3A796A9B7F156762E12FFB0 /* DoubleParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E1546D69D5F2CAF17A226475A18B58F /* DoubleParser.swift */; }; - C3C6DA01FD9583876B01482C1343FC36 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9D979A6D100A301EABE1F1E2E9A58A8 /* Division.swift */; }; - C43C3D3F8176655C665B22BB1556478D /* TWCoinType.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FA6A69B28B7A23F2425170E393537B4 /* TWCoinType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C484E4681E427FA7AFC3B751DD4581C4 /* GIFAnimatedImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCFE61E19E75EEF0E487755BC3FC3821 /* GIFAnimatedImage.swift */; }; - C55D5DB7F16D0E1FFC705D201A35C450 /* TWHarmonyProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 70803E3FDA9AF941337F0942E50D3D03 /* TWHarmonyProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C575B4A83363C2E88B4F12E231AAD2AD /* HDVersion+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EF47005622E8E512CDAF13AE70A944B /* HDVersion+Extension.swift */; }; - C58CA5F6D49831223CBF4280162D4C8A /* CoinType+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4978FB55EFC3394F55F896472E3FA0B3 /* CoinType+Extension.swift */; }; - C5AA3A734032224F2207C342EF7AE525 /* Resource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42FD3E72F2FC57B66B065A5AC16736B4 /* Resource.swift */; }; - C5E723DDD415BE8A2540A88AAE521102 /* TrustWalletCore-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CD66814EB232CA088A8B6D967EB110 /* TrustWalletCore-iOS-dummy.m */; }; - C6446B1A61CE367593B253A2C91B1B0D /* KingfisherError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E0E3B7CDD5E18DF9FB389779843C4B5 /* KingfisherError.swift */; }; - C648C94BD2B35BF5726AD271D8EE07B6 /* Wallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD05E192AE16FDBC2AD332533D18466F /* Wallet.swift */; }; - C669BDAF9BB5463F7EA59BA44C68B432 /* IoTeX.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FD8E17BBEAA574BB136AA1AC5471CA5 /* IoTeX.pb.swift */; }; - C67461D3F4852FE5C4893D7C37C7267B /* Ontology+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B88398A2932B054105E20FAF7D4E4E2 /* Ontology+Proto.swift */; }; - C6C31896350D58950C1D4C9A517F564E /* TWIconProto.h in Headers */ = {isa = PBXBuildFile; fileRef = BA05E6FABD933FE88AE74B6F611DBF2E /* TWIconProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C6D03322E6C7A81B5DEDC620D4302200 /* TWStarkWare.h in Headers */ = {isa = PBXBuildFile; fileRef = 57BF9921E1767EB59ABD94DB5BCB076B /* TWStarkWare.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C70DCF291B1185AE5AF79657B2B16F74 /* Nimiq.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D99B2B5939EEB6D0B4178AD410EC01F /* Nimiq.pb.swift */; }; - C732B358F9C906CEBA111B5104DA6B59 /* EthereumChainID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 861BABE75142AE9C4FF12B4178B02F59 /* EthereumChainID.swift */; }; - C7587C74B3148C9D2C798315797F0AEA /* Message+JSONAdditions.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB18C1C68A595FB6DA0B6DCC68A655C2 /* Message+JSONAdditions.swift */; }; - C78746139AFDF6E249E5583A474B86AA /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24B6B130D979310638B362CB555BD8F7 /* Shifts.swift */; }; - C7DF8744E902CBE4FDAF32A815891B29 /* AnyMessageStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D0BE2664911FF690E8852DDB010DA39 /* AnyMessageStorage.swift */; }; - C7FA465A1C6D186C3E43CC670D8D59CD /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 680B7CE27E02B8073C3494C5020C6F77 /* Exponentiation.swift */; }; - C8781B7B41F8C6F86DFE98BBA07329A4 /* Google_Protobuf_Any+Registry.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEFA44D6DA05BB5DE3483DD4C29D50DA /* Google_Protobuf_Any+Registry.swift */; }; - C88231E913AD129235FA62465E939F9B /* TWEthereumAbiFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = BA1D3FEE26E2A5122BAD317D565B4820 /* TWEthereumAbiFunction.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C89A07BBC2DD2D602C4E9F20A25D0582 /* AESPaddingMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F6C91BABC308199D68EACF5281CFDC7 /* AESPaddingMode.swift */; }; - C8D644D630F8AF4D6CE67A2594F15525 /* HDWallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA10C0DDDA0BEABF5BFCCF97CB47F841 /* HDWallet.swift */; }; - C8FEB134BDAA482F9A2AD445FF9C614E /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 002B59B1C5346996B396069FF5C2ED4F /* String Conversion.swift */; }; - C961633AF3304BBE4C42E3C5CD6A00D3 /* TWBitcoinMessageSigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 33244974D009E1E13A9F72DD4D12DBB2 /* TWBitcoinMessageSigner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C98B65F019E4D966182685EC7B80294B /* Wallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD05E192AE16FDBC2AD332533D18466F /* Wallet.swift */; }; - CA37D1EDF118B041E2DC26201930A2DC /* TheOpenNetwork.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67B1E975CF716511F1903BD81FE55195 /* TheOpenNetwork.pb.swift */; }; - CA67619FBFFA2A2100813306B2B64361 /* Nervos.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCD33F6B949215197076E4396FC32FB /* Nervos.pb.swift */; }; - CA7AC1D6F331F9D32CD480CECF8911DB /* TronMessageSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = A247AD0A96589E0F1299D871972FA037 /* TronMessageSigner.swift */; }; - CA93A6BB059E7129C15771EF2D11AD67 /* Oasis+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CFDD1B000F85A766B620818507E7DE1 /* Oasis+Proto.swift */; }; - CA944E425D7C017D83692EE81D6F1F0E /* Common.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC6D8D24033F0CEE089DD3B0E9A4EFF9 /* Common.pb.swift */; }; - CAC15365813FEDCBF6632AA31770BCDA /* ImageModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = F65C75408C457BD348AC5EB8EF159A98 /* ImageModifier.swift */; }; - CB090718C3017E296D3756BDDDD10F73 /* UnsafeRawPointer+Shims.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D31EEFFEBC60F302E182A3101A0EC4A /* UnsafeRawPointer+Shims.swift */; }; - CB2308ADA9BC9FE496B4C146D97A99AF /* TWAsnParser.h in Headers */ = {isa = PBXBuildFile; fileRef = D89BD6C5B8B5AA05B2554E7A26093B7C /* TWAsnParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CB2DFA585EA57D5976F4DE3A9CA57209 /* Data+Hex.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7E33D0260C00CA2D756156684831BC2 /* Data+Hex.swift */; }; - CBC8617152F8EAA7FBC8BD86A99F5F87 /* IOST.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 177E4A198FCB00E45F7EB51F247F932A /* IOST.pb.swift */; }; - CC43A74CC408F4AF2D988D05B069F33E /* ExtensionMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6035A5375CCAC1108A5256A5E4D443FA /* ExtensionMap.swift */; }; - CC67D699C5AEBBD6A9ADB46F624A2C23 /* Filecoin+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = F91277E7ABFC9430D4AC99F3DF18C19B /* Filecoin+Proto.swift */; }; - CC7386397848B5D84EA3FFFB35CC12FE /* Kingfisher-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 29BAE74F61BA265ED2D9B02FFDB94C8A /* Kingfisher-macOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CC8442AC57F685626453D80B3CCC25F9 /* BinaryDelimited.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD391FEA8F7F1694ECFD478154C8E3DB /* BinaryDelimited.swift */; }; - CCB35F96F4B304A3F8F83F6E40A58671 /* Decoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8C90350789E192BA11EB3D792F4C568 /* Decoder.swift */; }; - CCD8F2BA6DD1BFA4D6154FD140FE1A94 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 87601A1F0DAC6747565BE384EC2E639A /* PrivacyInfo.xcprivacy */; }; - CCE9142FF4EAEB00D8B5F50992C4E6AC /* TWEthereumMessageSigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 923253720A7EAEE48C4EAA35D4C9558C /* TWEthereumMessageSigner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CCF43D7960AC4ADF3933423F695C2D2B /* TWEthereumAbi.h in Headers */ = {isa = PBXBuildFile; fileRef = 614C96527E78504BBB98D74BB34F7E71 /* TWEthereumAbi.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CD495E3D39CE0A790E641087E6D28398 /* StarkWare.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A65B2DC6654207A6996E11E02CE9324 /* StarkWare.swift */; }; - CD5CE6A3A0623EF748AF1512598AAB37 /* ImageModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = F65C75408C457BD348AC5EB8EF159A98 /* ImageModifier.swift */; }; - CD626FC2F016328E9EB1A84AC7C9B102 /* NSTextAttachment+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5991DD00FFD8600C5D6FEE044B86C80 /* NSTextAttachment+Kingfisher.swift */; }; - CDA967EC5B178A998AAC0290AEAE566D /* TWNEARProto.h in Headers */ = {isa = PBXBuildFile; fileRef = DE4099911825248EF5F4348826B1602F /* TWNEARProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CDDA06B19A08178EBDF1295EE78ECFC6 /* Mnemonic+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA0D76D75214B59A126E49C6EC93BDB2 /* Mnemonic+Extension.swift */; }; - CE13F2ACAD693937AEA54A16782E3D8C /* IoTeX.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FD8E17BBEAA574BB136AA1AC5471CA5 /* IoTeX.pb.swift */; }; - CE399239B312BD58E94D9FDCD102FD59 /* MultiversX+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46FE95F7A628D3E41D0CBBCC26A4972F /* MultiversX+Proto.swift */; }; - CE79E4688B923027AC5CBFD5009073E9 /* NSButton+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32D70BFC272B306916DD7B139CF2ECB3 /* NSButton+Kingfisher.swift */; }; - CEA068836A39CD10A92809C40CFD9A47 /* Kingfisher-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FB9BC41F811D91E8457B049FB3BAD483 /* Kingfisher-iOS-dummy.m */; }; - CEB0A8DBF457BC1380F03350B903ABF9 /* TWAnyAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 14717DEE21E75CAC72AA1D8DB5AB4206 /* TWAnyAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CEBFCF5EFB31D05F23173789A5BC634C /* TWHederaProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 3835A2A5C5C0B7626AC3A68882E93249 /* TWHederaProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CF027C849750E1B921B473725AF9DA26 /* UniversalAssetID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AB81CFA8EA50C0AF3211B5404670DE7 /* UniversalAssetID.swift */; }; - CF0A01096E7795249F2502E61E96F9D1 /* Version.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18281CCC50839F349BD2014775006139 /* Version.swift */; }; - CF11D606BFD0994B0A539D2A8C3EA4C4 /* duration.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51D8DDBE6FBDB9BFF593D642A2864F2 /* duration.pb.swift */; }; - CF1A9E14133DA83DCA8691EFDC2C8CF3 /* Cardano.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05C4AC95214C5BB1E6B970254BD0D1C0 /* Cardano.pb.swift */; }; - CFF01EB5F8849EEE65717D526DA2F3B3 /* NEAR+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = F132AE6DB6D382838A013EC50E6F3E38 /* NEAR+Proto.swift */; }; - D02C0118D9E6136D61DF7C660005D5B4 /* Blockchain.swift in Sources */ = {isa = PBXBuildFile; fileRef = BACEE9ED175755B9BDF245B1B2DC280D /* Blockchain.swift */; }; - D02F2A30CB6E9AE1CF4FA57A84A8C7BE /* MessageExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 064DC889ACD509F29619F2EC8C614644 /* MessageExtension.swift */; }; - D061ECE3D6E6BAB228826B14DFC0DB34 /* TWSuiProto.h in Headers */ = {isa = PBXBuildFile; fileRef = C7616CBC03A662AC42CF93AE82997068 /* TWSuiProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D0B231AA4455D06347935E6C859CC421 /* BinaryEncodingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EBD06B016E8E81A6466BAFFA9192F0D /* BinaryEncodingError.swift */; }; - D0B9E1D781DB497EEDD30A2965DE904E /* TWNULSProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 9569F26AB766917EE6CF7BB561241439 /* TWNULSProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D0DFBEA1357F6F4D18585B28CBC4C08C /* TWMultiversXProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 6030EF5A34D3268961C3610E8396B16E /* TWMultiversXProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D0F9EBB40AED2318736B6104B2BD71B7 /* Solana.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 182DF9072796D05693E1CB60B20B48CD /* Solana.pb.swift */; }; - D1477EC51B808E9E62FFF713F84F9E08 /* EthereumRlp.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC5A4966727F266DA89586C51E7A5B82 /* EthereumRlp.swift */; }; - D166FE6F550C82D1A64CD411A3AA37CD /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 886F3524AD0CE136C282038BB836E0A9 /* Addition.swift */; }; - D1A1A33102EAEA5D8CB268AFFCF97295 /* Nervos.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCD33F6B949215197076E4396FC32FB /* Nervos.pb.swift */; }; - D21F4B19748D48A0BA13C47A4D331406 /* TWBase58.h in Headers */ = {isa = PBXBuildFile; fileRef = 18A9E81106903BEC79C4CF1EB92699E6 /* TWBase58.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D2458A1DD3F416CEA15319FD9B682AEE /* ProtobufMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F4DCD6BF7F15B30A311AA557CBC3221 /* ProtobufMap.swift */; }; - D2CC465B22F356B7DAA599AAA53BAFFF /* BitcoinScript.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89FB513248D38132ABC7C70801715C72 /* BitcoinScript.swift */; }; - D3205A32BACCC1CA854421CBB8A07EA1 /* StarkWare.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A65B2DC6654207A6996E11E02CE9324 /* StarkWare.swift */; }; - D3A55219E6D5B7B3E45BB8F085DEABA0 /* UnknownStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = E238883C9985B02CCA03EF6EC98F394F /* UnknownStorage.swift */; }; - D3C9245C469B3C310BA50C838887F96B /* TWHRP.h in Headers */ = {isa = PBXBuildFile; fileRef = 64E4E5260567D87102F99275973B6FA2 /* TWHRP.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D428BC0C2CD676E2FD5CA02C24D88D5A /* TezosMessageSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5261E92D52DC301F8A5A282C09AB4AC7 /* TezosMessageSigner.swift */; }; - D46ED32EF87BCB4C39AE4DDDF94741A1 /* TWSegwitAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 3267AC2A904A8D61A9A5CC64AC5D3940 /* TWSegwitAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D4AFD4A487551FDEF8E23FF31FF1CB26 /* TWGreenfieldProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF0D7E5C822BBF3FAC2DDF8C55BF849 /* TWGreenfieldProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D4BCCC5740282FD7BE6FA565556DB828 /* UnsafeBufferPointer+Shims.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B2373712ED36232FA70A8BD9B69C973 /* UnsafeBufferPointer+Shims.swift */; }; - D4F7F3846E58C6C340A68A25495C75EC /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5F137CB38313890F0CDC781B466C3B6 /* Filter.swift */; }; - D5A60D3FF526A2B44FBE0E80FA4F259D /* TWPublicKeyType.h in Headers */ = {isa = PBXBuildFile; fileRef = D3F52A45C5C80C8CD48299B8B9F00A5F /* TWPublicKeyType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D5B1F61B26D424B7505AE23F645FF43B /* JSONEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 643B04AC6F0EA9BF74879E2BF5585540 /* JSONEncoder.swift */; }; - D5B62721201A62DB98046C7ED14FC443 /* TWEverscaleProto.h in Headers */ = {isa = PBXBuildFile; fileRef = A201934B5C9F7B9A30181A50A97F5906 /* TWEverscaleProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D61F9A580613522E412B60B5DE591115 /* StellarPassphrase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FF027466542135796C1C996E649E15A /* StellarPassphrase.swift */; }; - D696284E68AB7B84A550F561913D574E /* TWStarkWare.h in Headers */ = {isa = PBXBuildFile; fileRef = 57BF9921E1767EB59ABD94DB5BCB076B /* TWStarkWare.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D72411DAB8D4AFCAEC60C8B11F532E1A /* KFImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF57BFFD3162D2B980770D0A406CFD34 /* KFImage.swift */; }; - D7881D4CE9DD02793778483265EBCCEA /* TWPBKDF2.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EFF3AB6BDD4384A6DAB3ED30CA17155 /* TWPBKDF2.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D7E2ED15D8FF9CD59A508436BBA1ABC9 /* CPListItem+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A72A27DE702C7D6F4549B27EBAD19AB /* CPListItem+Kingfisher.swift */; }; - D811097934D114D5AC5F20ED5890F988 /* Google_Protobuf_NullValue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8E2CF966BAECD47C86B309C16F3D4A /* Google_Protobuf_NullValue+Extensions.swift */; }; - D880A4549D48D5C6C4DE1360334C878F /* SessionDataTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FBE8665476CB5F9522F7E496FF9C528 /* SessionDataTask.swift */; }; - D892EE8B39455C3E2E2F0F34A1CE7464 /* Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D7780E35F2A38ACD6F4916FB6CFB54A /* Kingfisher.swift */; }; - D9415924A385272C664B1D7C400F1344 /* SecRandom.m in Sources */ = {isa = PBXBuildFile; fileRef = C26BF9BC8A9CDD8E46E1F5B8E582783C /* SecRandom.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - D99B41494773ADDFD1C887B0D559D891 /* KF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80DE412ABB3BCE2F9CB926D3216AE310 /* KF.swift */; }; - D9B85A7DB0CFE567251F31B3E15458F7 /* Mnemonic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74B19D9426C753156D891128B648D604 /* Mnemonic.swift */; }; - DA034132FB2B024B04E840449D16ACE7 /* AVAssetImageDataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76A9191ABB4D7BD2B89F5B14BE9907FA /* AVAssetImageDataProvider.swift */; }; - DA2C4659E7B10100CA27F8F9F68A1533 /* THORChainSwap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 912A5F4E13FFDB1560A2716409B2A394 /* THORChainSwap.swift */; }; - DA6EA831AD908CA5D14FF24C4417CE51 /* AESPaddingMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F6C91BABC308199D68EACF5281CFDC7 /* AESPaddingMode.swift */; }; - DBC384C337C7D5B4486B81167D3BAA5D /* TWEthereumAbiValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DE5011464A84FEA139058BA0473F966 /* TWEthereumAbiValue.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DBD178CB0E8F9A05EDE33A99718A2BFD /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = A022661FF56B9080175E4CAB4758183D /* Data Conversion.swift */; }; - DBE43848EFAC2A2154460F326F64BE9F /* TWPolkadotProto.h in Headers */ = {isa = PBXBuildFile; fileRef = C2DB32119B22835AF16B536AC949A967 /* TWPolkadotProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DBF5456C1BE0384AAD6FA2D3775DFD5F /* String+MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEF87AB08D43D3CE238E19DD48FBFD15 /* String+MD5.swift */; }; - DC2DDA48354325DEB06840D5DB3506E7 /* Enum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 725F89687254C664F94D44D4C675185D /* Enum.swift */; }; - DC44FAFF6EEC3E8A93897D5F4F047303 /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3214B869B27DDDD9D4B9820CA8F58C8 /* AES.swift */; }; - DC6439190214E7EB6E40D1BD1AC9C570 /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24B6B130D979310638B362CB555BD8F7 /* Shifts.swift */; }; - DCB0A2CE9530ED8E91C6BEEBA39CA33C /* TWFilecoinAddressConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B62FEE0A024A32D47490F7376A84215 /* TWFilecoinAddressConverter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DD2FBEEECC9E93B1697E65A4B161B8CA /* TWBitcoinSigHashType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6752EA648F3610499F67A5C39009EFD4 /* TWBitcoinSigHashType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DDAE2F48672EB0EB817FEDB9A5F8B6DD /* Aptos.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20092DBF43DB8CCE2322C5E4ED2950 /* Aptos.pb.swift */; }; - DDBD8BE0DFF5980A0D19CCBC980C7B88 /* SwiftProtobuf-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = CA50D7F1E73FE4A516647985741C26A8 /* SwiftProtobuf-macOS-dummy.m */; }; - DE4F3C8B92C47E29394B1D72DB2BBB0C /* TWDerivationPath.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD880101532C37B5963A31C4E6C6B48 /* TWDerivationPath.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DEA2761C6E23D7DFA4BE78A749DC0549 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = D009038B8154F126496AD472961F904B /* BigInt.swift */; }; - DF49E9798F8B090D5DE527506E916BBB /* Everscale.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8694A8463DF8EE1E0A9C1D1EC5DDBBBB /* Everscale.pb.swift */; }; - DF6F363651238F77B09D436B7445BA80 /* TWOasisProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 1DEDBBCD3733146815DEFBCB91AC236B /* TWOasisProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DF9AF72C0934A9F98C4A090BE45046B3 /* ExtensionFields.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6F901649F1F1E3E246F1D2AADFC43CD /* ExtensionFields.swift */; }; - DFB68DD397D943D1CBE781681F00529F /* TWAnyAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 14717DEE21E75CAC72AA1D8DB5AB4206 /* TWAnyAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DFD49319C34CFFC603E45148173D4F9F /* EthereumRlp.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9FD122C74103F42AC0F3AF16365429 /* EthereumRlp.pb.swift */; }; - E019CA1F27A2D148B7A92635BD619257 /* ExtensionFieldValueSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20F20507ABFA06B2BB4823E1B9F3A04D /* ExtensionFieldValueSet.swift */; }; - E02A4C270E1F8C40A4C3C97A6C149589 /* NULS+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = FADE8EDBBA797D0D38E086FD2E4A047C /* NULS+Proto.swift */; }; - E02E7A52C2E28558AD9A5D90BCC21A97 /* BigInt-macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 887E99CEBC059806E355F163AE2B1628 /* BigInt-macOS-dummy.m */; }; - E094899FFBB188B3F9427E448748A615 /* BitcoinFee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B27C8EB84AB59FB71E403D1E3295DC9 /* BitcoinFee.swift */; }; - E0DC24BA0E2AEEFBAE60B8253F9334A3 /* Tron.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BCC37628020C73BDC04FF352CBC29B /* Tron.pb.swift */; }; - E15F629003D02D50A2EFCE19E6072E0C /* Google_Protobuf_Duration+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E90848F2B2114098341EE243B4F46B5 /* Google_Protobuf_Duration+Extensions.swift */; }; - E1A0086E9D26507367638A442925B930 /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 689BEA9360638EE3FFDB2D5173580B65 /* Words and Bits.swift */; }; - E1E8E06763ECEFD0C0B7B168F79109E4 /* Theta.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CCF353B366CA359985A466D17FD11B /* Theta.pb.swift */; }; - E28271F168ABBAE1ADFFD4019781D553 /* Waves+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = B56D7C16C0B60B5A6C967C3B0C661AAF /* Waves+Proto.swift */; }; - E2BDFBC6AF974AAAB8CF499FD1A8F2DB /* MultiversX.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A91984FF18242590E5D3522423008B2 /* MultiversX.pb.swift */; }; - E2F11ECD2739FBB1A71507EAAAA45903 /* TheOpenNetwork+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF1011675B3FC98E8AFCF71BBF5C1693 /* TheOpenNetwork+Proto.swift */; }; - E3020707D6509098A87242F9B9782A10 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = C58EC158C1155FAAB6CED0C211D5DCF8 /* Random.swift */; }; - E3E80FD33179644F205753F327B5C9B6 /* TWBlockchain.h in Headers */ = {isa = PBXBuildFile; fileRef = BB3151674830695AD98ACEF0182C28B5 /* TWBlockchain.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E41E2E99BEFCF0717948A16CCC886965 /* KFImageRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CF5623EF8000ECBAA5B21C6A5EE3BE /* KFImageRenderer.swift */; }; - E42795993FCA9AC34AC703E136869855 /* Binance.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96162B21DA75C0CB210F3FC177DB6DFE /* Binance.pb.swift */; }; - E5299C450DD678D539854051F06D70A5 /* Common.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC6D8D24033F0CEE089DD3B0E9A4EFF9 /* Common.pb.swift */; }; - E557F5095C1A8FFDAE2A06CF690DEF2D /* Data+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6AD1E0FF5895F3741DD1E5038EFE1C9 /* Data+Extensions.swift */; }; - E58DB42AF836FEE6210D480D40CD06CF /* TWAESPaddingMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 032D71292B3ACEE3F5FDC0577029332C /* TWAESPaddingMode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E5E8D46DE9763AF20BFC86590BD7B6A5 /* TWDerivationPath.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD880101532C37B5963A31C4E6C6B48 /* TWDerivationPath.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E5F574916CCAB3FD538787A621C40C3C /* TWString.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3A6D5A6AFB14F549189C4D2455C4B7F /* TWString.swift */; }; - E6825738D9FB13EF60CF5D82FAA9F50E /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8FF5B9F55078B4A8A95A6C74569A5F /* Multiplication.swift */; }; - E6AFE4476B97D3141ADF9AB3FDEE98AC /* AddressProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1462B48420A4B2D2079AE0E6D4959503 /* AddressProtocol.swift */; }; - E6DF167E837310A67A46E37A904B9DAF /* CallbackQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD96ACD261584F033B651C700ACAAE1 /* CallbackQueue.swift */; }; - E7208636E7342553DD680811E1204C2B /* UnsafeBufferPointer+Shims.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B2373712ED36232FA70A8BD9B69C973 /* UnsafeBufferPointer+Shims.swift */; }; - E7971FAB3555852FDEDD03DCAD04A00C /* Ethereum.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844F1ABB1BBE571EB79940E2E56B4D3C /* Ethereum.pb.swift */; }; - E7F1B99839FEC9ADDDEF3155D10C5FF9 /* TWData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 348938B0EE4CBAD68416414BC9FA737A /* TWData.swift */; }; - E8490415BFC01A17D8D8C27CA3C5B3A4 /* SwiftProtobuf-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8EF5DF35E731A51646BDC19FB68E313D /* SwiftProtobuf-iOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E84E3B503D89BB1519D3CE39C5247610 /* TWBitcoinScript.h in Headers */ = {isa = PBXBuildFile; fileRef = D47EBA8BD5C102BD72B3A7BCD84B9DA4 /* TWBitcoinScript.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E8DF23AD07FDD99640DEAE462F895E98 /* TWRippleXAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 21F1BFCEC82F915FA850C75C5EDF7B4E /* TWRippleXAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E8F6806D62D1D6EE2A3A53F1A7CF373D /* Google_Protobuf_Wrappers+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 665EDC07E1D1ECFD22B09B93D61A3C58 /* Google_Protobuf_Wrappers+Extensions.swift */; }; - E98944A7EEFDB76E3B18D503B7039BCA /* Stellar+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12707ED03FD5BDBAEE5061FDA5D8115 /* Stellar+Proto.swift */; }; - E9B8877C14C21852DFDFD4585AFD8BAC /* Barz+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3E2C62A6E668C9FF46C28B4CEF01399 /* Barz+Proto.swift */; }; - E9BF695121D71529412B5910115E2E9D /* Storage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DAA9132FC83BC8605EE7D9293A0BE2B /* Storage.swift */; }; - E9E77E2962A1CFD9ADFC6D1BDC23CE9E /* TrustWalletCore-macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D77F8AE6372DDF824D7B123AEE98EFF5 /* TrustWalletCore-macOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E9EC7E083290927ADCE250D0859F5BF8 /* TWWavesProto.h in Headers */ = {isa = PBXBuildFile; fileRef = A51BA1BBBE35D62921371714A0854CFC /* TWWavesProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EA0F72D5C8C33F55D0621774F6166982 /* IOST+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 083ECFFFFE5ABBA8D824C5A9CA98CADC /* IOST+Proto.swift */; }; - EA11E9207E1A36C47E9A3671BAC84C55 /* NEAR.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8419E9D434FAF23A78DF801602D4E0A2 /* NEAR.pb.swift */; }; - EA9EB5E840CFDE551FC8D606737BF15F /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15EA94F2C1EEE737C985D8E1EAFED2AC /* Prime Test.swift */; }; - EAF0B0AD4029A684DAFBDE3AD29DF680 /* PublicKey+Bitcoin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2462917A79F9BC368B26B1F833938AD3 /* PublicKey+Bitcoin.swift */; }; - EB03F4181102077E846DFCAEE14648BE /* Oasis.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = F50B712B248A10A0EAFD8ED60747F099 /* Oasis.pb.swift */; }; - EB1DB2692BF02C84BCC6F21CE162A9B5 /* Tezos+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C71C7B316B2BC77686826A04FC493D3 /* Tezos+Proto.swift */; }; - EB287D1AED107CECBA659EF98880B080 /* TWFIOAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = 28EBF0C5FF0FF9CF3E278D9539AD4DCF /* TWFIOAccount.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EB5DB97719F570A1FE73CB4A9458DCB3 /* Google_Protobuf_Duration+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E90848F2B2114098341EE243B4F46B5 /* Google_Protobuf_Duration+Extensions.swift */; }; - EB8670EBA22008102C81F162F218C190 /* UIButton+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC7F635E85D6AFAA4C8BB12A35989E0 /* UIButton+Kingfisher.swift */; }; - EB988FD9864B3DCBF72B4DC88C2BDBC1 /* EthereumChainID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 861BABE75142AE9C4FF12B4178B02F59 /* EthereumChainID.swift */; }; - EBFC4C98AC60CB6F056AC5CD864D8683 /* KFImageProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAA57CEFD7A7AFC8744CDCEBF92CF26 /* KFImageProtocol.swift */; }; - EC0CBC52D7A313D62822596B48659DEF /* FieldTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AD0E1BCC2EB545E03E7B239BCC8D8E6 /* FieldTag.swift */; }; - EC100333339B648812374B119706A2D1 /* Hash.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA31FF7CD8C8401984CDD24437CAAB76 /* Hash.swift */; }; - EC34BC14F6B26491E208D67DF17ED512 /* Filecoin.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E6823C89AB8AF6757ED9FD07040705 /* Filecoin.pb.swift */; }; - EC3E7109E6E03C032F2F19F84B65C060 /* NEO.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 528301163D9C04043976B9CEB1089FC8 /* NEO.pb.swift */; }; - ECBD65FB0F1B63387E813C3AF0A2D88C /* Blockchain.swift in Sources */ = {isa = PBXBuildFile; fileRef = BACEE9ED175755B9BDF245B1B2DC280D /* Blockchain.swift */; }; - ECFB3B908AD207E14E098F2E4A3E4821 /* Kingfisher-iOS-Kingfisher in Resources */ = {isa = PBXBuildFile; fileRef = D8CBDEF9B0EB359E8FD0F5FA8C86428A /* Kingfisher-iOS-Kingfisher */; }; - ED07C5128D68804E4A05C9A717715A58 /* MessageExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 064DC889ACD509F29619F2EC8C614644 /* MessageExtension.swift */; }; - ED25A63A9BEC4D142169C91A65710E5B /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 680B7CE27E02B8073C3494C5020C6F77 /* Exponentiation.swift */; }; - ED59EF47E8A805CB79DDE8CE35E47A36 /* Algorand.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4385282B45988556A472090C286D620 /* Algorand.pb.swift */; }; - ED621863B13E4EDF22D4821E906612F2 /* ImageProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DD786233C16BFB0599CA37F8A09F1D2 /* ImageProcessor.swift */; }; - EDA0ECCB70529CC7ED96095AFFA4BDF4 /* HDVersion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90146CC5EFF9A29A6EC2082EFB787951 /* HDVersion.swift */; }; - EDCA930C5A183B826F9448066406FC40 /* StarkExMessageSigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5D7470038583B7116C04EF668F8AAE2 /* StarkExMessageSigner.swift */; }; - EDD28C3764230485FD5D98A4F400E51C /* Pods-Tokenary iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EF9A09D2880AFB578DB9E0853050647B /* Pods-Tokenary iOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EE166C482DE38C15334D00F5A98343DE /* Nimiq.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D99B2B5939EEB6D0B4178AD410EC01F /* Nimiq.pb.swift */; }; - EE4E4ACA59334D2821FC3EAC0C7AF6A0 /* type.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 572BEA04E861ADA1CAE65662914C6EB7 /* type.pb.swift */; }; - EF30FFC2DFBA25E89DB73DC03685C079 /* MemoryStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = F86FEEBD6F89B9185BB390D9E9E136C6 /* MemoryStorage.swift */; }; - F06FC5ED42BE38FADBA98A08129FA3F1 /* Watch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A2F72B33064CF980E48FA2BFF28041B /* Watch.swift */; }; - F07FB1A8F41AB6AE02610EA0825B1190 /* BinaryEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DDB7A88B15D46561468D364A2BBE1B1 /* BinaryEncoder.swift */; }; - F08B1B60364AE3B7DB3BB64EB7B2BEB8 /* Aeternity.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 705178BBD27C499C1D546F0A115272FB /* Aeternity.pb.swift */; }; - F0C8A0314E4645A9E8B8C885B6F7747C /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54A84C468FE01C9F47FB7DDACF4CD775 /* SessionDelegate.swift */; }; - F0CBB016ECEB85A5DA2D07C034331323 /* Binance+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2687F760EAFFE874772C932D400905E8 /* Binance+Proto.swift */; }; - F15091469D955DABAB73B770D6BAB69C /* TextFormatDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44D45260F8E9B64B4046E63CC386C674 /* TextFormatDecoder.swift */; }; - F361923D2BEBB394D546444D9F34A8DA /* Runtime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AE827B962C8B3FD4C601A505D9FE9F5 /* Runtime.swift */; }; - F388247F281211F93766089159248FCD /* TextFormatScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DC40554F5072F0E18A8C5FE76916510 /* TextFormatScanner.swift */; }; - F3AFA12CCF7B519B7F66D43D3B468776 /* Version.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18281CCC50839F349BD2014775006139 /* Version.swift */; }; - F3BA9AD389086E5CB9BB5CAD8EDEA789 /* NULS.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCF6D3F6BD6E796A62491080ECC096D8 /* NULS.pb.swift */; }; - F3F479988907BA551579ADD0C64A6900 /* KingfisherError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E0E3B7CDD5E18DF9FB389779843C4B5 /* KingfisherError.swift */; }; - F409D7E074D698F605B8B207FC7C46B3 /* StoredKeyEncryption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DAF680AA5A704652B50A7749E1E7C67 /* StoredKeyEncryption.swift */; }; - F44A529BED45F60A9FDF39CDEB2F92BD /* TWEthereumMessageSigner.h in Headers */ = {isa = PBXBuildFile; fileRef = 923253720A7EAEE48C4EAA35D4C9558C /* TWEthereumMessageSigner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F44F3E167345EE94AD02A8063672C176 /* Barz+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3E2C62A6E668C9FF46C28B4CEF01399 /* Barz+Proto.swift */; }; - F45119FEC2F0B744E6D0287B64A66D5B /* any.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9DC3491FFD77D87118FD764798BA62A /* any.pb.swift */; }; - F48FBFC1229A17AC04575310F4548852 /* Decred+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = B72E5AA17ABFA95C39678336F43F2B33 /* Decred+Proto.swift */; }; - F4E2A09694F62DF760C536DAC13A0DEC /* TWPrivateKey.h in Headers */ = {isa = PBXBuildFile; fileRef = AE3A26F9188FB213D66358D4EBDFEBD6 /* TWPrivateKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F4FCC3E77775CAB9422D15293500C399 /* KingfisherOptionsInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9288637E310976581EB191445117591 /* KingfisherOptionsInfo.swift */; }; - F518AE3FD28F56A4A746E13DD1AAD16C /* EOS+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682B98EE94C05147DBE2D2A16EF9D340 /* EOS+Proto.swift */; }; - F5F8C305777FC386C92F746CB4D9E469 /* JSONScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305B67F58BAEDFED379C07322D6BD1A4 /* JSONScanner.swift */; }; - F66D80687A7823B359D09D6A9C3B3A44 /* MultiversX.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A91984FF18242590E5D3522423008B2 /* MultiversX.pb.swift */; }; - F6A87BCB2916271157634DBA5D7D30FC /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C3B0003639A0DD0C5F7DA5EDD6DD772 /* BigUInt.swift */; }; - F6CF04451DD1A4DB7A3150311D819E0A /* IoTeX+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8B8E71487737D810614FF0298F95C13 /* IoTeX+Proto.swift */; }; - F6F208490258BDD08EB75C861CC93432 /* TWRippleProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 833E85FEAF03071EA15B10818E8BFD27 /* TWRippleProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F73CFFA4D5689D35CF76EC1529923D0E /* Aeternity+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8F05D0A750849560AD9434D75C7198E /* Aeternity+Proto.swift */; }; - F77CF7E21882E968A125D88D969D8C5E /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C8EE235D97488B3920ABF00A25EDEED /* Integer Conversion.swift */; }; - F787D2135FBD838DD38A81494FEE5198 /* EthereumAbiValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC658E731F79F058F6303160A319D473 /* EthereumAbiValue.swift */; }; - F792F7810A316D0360FC2C73DA0E3676 /* TWString.h in Headers */ = {isa = PBXBuildFile; fileRef = 310906C62D8BC77FA09EDE7A300A2B60 /* TWString.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F7A06A95C6DE113EA4AC1B63C692CF06 /* BinaryEncodingSizeVisitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 507D103F7FD6EA4DC49C8B5EAFDEE13B /* BinaryEncodingSizeVisitor.swift */; }; - F7D9B3F9037CEC4866F358EB2D42265E /* Varint.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD1BBF528E3DA56648A1DC964C83773B /* Varint.swift */; }; - F7FB1D21B68F20A2F1624A804ECA838B /* TWWavesProto.h in Headers */ = {isa = PBXBuildFile; fileRef = A51BA1BBBE35D62921371714A0854CFC /* TWWavesProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F8285DD12FB6F93B177CC13322DD9D99 /* MultiversX+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46FE95F7A628D3E41D0CBBCC26A4972F /* MultiversX+Proto.swift */; }; - F836FD2E3811E7C8BDEA4C3C720266DC /* Aptos+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = D574CD9AA95787BAE0984A508099F91A /* Aptos+Proto.swift */; }; - F8C0A943FADBEA4044B8B4E326EC027E /* TWBinanceProto.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B84234C62053507827617AE6EA65CBF /* TWBinanceProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F8FDCD34CF147FDE40FC14244C3B5533 /* timestamp.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB543B10EC028E43FEC119864BBC4A7D /* timestamp.pb.swift */; }; - F90371412FE321ECAAE29EEF50748932 /* LiquidStaking+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23E9DD9D99AA09FF9D623CCDB0828D83 /* LiquidStaking+Proto.swift */; }; - F93A015B5A8155C4A7E571ACC92803C6 /* TimeUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FF55D8C6335E8874725734EB504BA0C /* TimeUtils.swift */; }; - F949E1CE489F7F07AF9C2315C35EAE7F /* TWPrivateKey.h in Headers */ = {isa = PBXBuildFile; fileRef = AE3A26F9188FB213D66358D4EBDFEBD6 /* TWPrivateKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F98D47A436C3004C5CE073BF2E74C241 /* ImageDataProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAD573CF11AEAFF499E0798FE1A7363 /* ImageDataProcessor.swift */; }; - FA37FF81DCC8292055524C33B42BB1B9 /* TWEthereumChainID.h in Headers */ = {isa = PBXBuildFile; fileRef = A1B9B7B66E157DA1707A97B9B4DF8570 /* TWEthereumChainID.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FA7AF7D052C02AF300CD2915C0525CE3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BD7E218AAA978568DF29A6653DBA30E7 /* Foundation.framework */; }; - FA841A50C561645689E4685EB485BFD7 /* KFAnimatedImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8333AF2A67DB0B10A1EC1CFCA9695C5C /* KFAnimatedImage.swift */; }; - FAA08EEC2169DB79EAD54874986F5843 /* Internal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FB7B9C7D1F8FCDFF47453F49CA67F5B /* Internal.swift */; }; - FAE4FE2F1BCDC0ECF7AE6ECB7392BAA2 /* TWBitcoinProto.h in Headers */ = {isa = PBXBuildFile; fileRef = AD8F695F6839DB10326BD70CA74ACABD /* TWBitcoinProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FAEAE10588DE8A52A46C4069E0222E1A /* ProtobufMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F4DCD6BF7F15B30A311AA557CBC3221 /* ProtobufMap.swift */; }; - FB19AE6F11AB3B12BE824C3061C33982 /* BinaryDecodingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE1FD2D9F4D6550C4F7C662BF3A6798C /* BinaryDecodingError.swift */; }; - FB39D75E19CA7BE889104BE63FA736B2 /* SegwitAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68A669A0F27F135643F970132BF9F522 /* SegwitAddress.swift */; }; - FB71A9D97D3FB9BFB41FCA8367A560A5 /* Cosmos.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 720CD84CCDF712F01402DED67E2C2BBE /* Cosmos.pb.swift */; }; - FB74DB0934513A8482AF36A8142CD1DD /* TWNanoProto.h in Headers */ = {isa = PBXBuildFile; fileRef = E7CB5857BECCFF631803958E6E96A346 /* TWNanoProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FBC812B22797604FC78D43583634002F /* TWTezosProto.h in Headers */ = {isa = PBXBuildFile; fileRef = FECAF54D40D1473719E1C968E57BEAC7 /* TWTezosProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FBE34F02658A7ADB597331B90A291B47 /* EthereumRlp+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 102B16B1582786362B83B35D5D9A4E2D /* EthereumRlp+Proto.swift */; }; - FC06F1D439D750B257F9A374CE050ECF /* WebAuthn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 317AE04B87B518B31CE3AA76C44DC680 /* WebAuthn.swift */; }; - FC12C5344BFE73775F8C37573A2308F8 /* Nimiq+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = E955C0A5555D919B63B4EDA3D2AB067C /* Nimiq+Proto.swift */; }; - FC8BED8713C0EE641CC172D911FC4BE4 /* ZigZag.swift in Sources */ = {isa = PBXBuildFile; fileRef = D81702FD9A3E32F2A582309FF30EA3AF /* ZigZag.swift */; }; - FCB2BD51468D1586DDA42A2C91B2CF2A /* CacheSerializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC439B9BC2E3BCD1D027D855BB14D98 /* CacheSerializer.swift */; }; - FD167A813E40312055EEB65F3C98DACA /* NULS+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = FADE8EDBBA797D0D38E086FD2E4A047C /* NULS+Proto.swift */; }; - FD22AB264F5C13CD67A94A5C9E53327E /* AuthenticationChallengeResponsable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11DD64221DEC012A79E687A19A97D324 /* AuthenticationChallengeResponsable.swift */; }; - FD2CAF8188F5EDB101F174EF8456D8A4 /* EOS.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4B0DFB19B2765A6B966DA33A1896C2B /* EOS.pb.swift */; }; - FD3F76A4C00D39CCFEE46AE4D336E35A /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 268C4DC58835F8E3ED97580D835F3291 /* CFNetwork.framework */; }; - FD5595094650266B4D2358E722510669 /* ImageFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00DD953C5E1E18C601F1022450A5FB6E /* ImageFormat.swift */; }; - FD95E57CF157136D0F72AD6AC563F394 /* TWData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 348938B0EE4CBAD68416414BC9FA737A /* TWData.swift */; }; - FDD1489807B670D5350B325EB95B156B /* TextFormatEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F4D1447EAC541483D73DF084BA34F4A /* TextFormatEncoder.swift */; }; - FEB895A4AA2EFB05FE4A6922F6D8B25E /* ImageFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00DD953C5E1E18C601F1022450A5FB6E /* ImageFormat.swift */; }; - FEBED6C9506F17029498296F4426BA8F /* StoredKeyEncryption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DAF680AA5A704652B50A7749E1E7C67 /* StoredKeyEncryption.swift */; }; - FEE8CD74C76A1F5451F44E15F7FFA535 /* TWCurve.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C6C62D872FA2C2D48B4F1F13716645 /* TWCurve.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FEF41CFD00D04DD65830790D28C3F555 /* Algorand+Proto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4C0F02594B7103FDCF68421763DBFD /* Algorand+Proto.swift */; }; - FF9FC6298D03E5F86A342DE31151DC76 /* TWFilecoinProto.h in Headers */ = {isa = PBXBuildFile; fileRef = C76262F5326D0DEAC0325217E2CA6627 /* TWFilecoinProto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FFA91DD43ACC5862A9DAB37D41D5E0E1 /* Message.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25D46F8A8DFE004A33EF15C95D66587D /* Message.swift */; }; - FFAE18C17EDD41655FF236976139BE5D /* Account.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAA8199DC1571D84E4679E0F32C669E5 /* Account.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1C0D136FBA340E3B3558BAFC2C9927D9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = DC6F436FE9D7D62655988D0B8E3A24DE; - remoteInfo = "TrustWalletCore-iOS"; - }; - 31ACE27DAA26FFD0C5140527768E2BA0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 7B76B3A65EC90BE00011B16DE4F49E38; - remoteInfo = "Kingfisher-iOS-Kingfisher"; - }; - 3EB5BFA96AEBE32431365196DAAD06BA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 357D7AA757B0ED4603C9CD1523BC234E; - remoteInfo = "SwiftProtobuf-iOS"; - }; - 4008E19D2EAC0FF1444B181F0811051C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = B2085DBECFAD83713FC1BE448B7882B0; - remoteInfo = "Kingfisher-macOS-Kingfisher"; - }; - 8BD1BBE88A3489AD678A963F4C90536F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 65AA93B2B9CF39819DBD1DDF58FCBC15; - remoteInfo = "Kingfisher-macOS"; - }; - 8D01F3CFBEB4553399A7D6D452331852 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = D84FF1ABB5E840CFBA9F610D26DFB42D; - remoteInfo = "TrustWalletCore-macOS"; - }; - 9404F7C0524BFAB25A4D52F5B5447D27 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = AA186741961F10502016CE44BFED6684; - remoteInfo = "SwiftProtobuf-macOS"; - }; - 9C7E59A394790E7EC70A279B233CE7C8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 889A3C6D0A70D789D17B7BFFE160AD76; - remoteInfo = "BigInt-iOS"; - }; - B3B2A967605ABA852DDD95ACDB84CF8A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 685A5AC5E317EE1D980ECCFE9E6EB08A; - remoteInfo = "Kingfisher-iOS"; - }; - BA97322D9F7AD9D41B357B554C0B7EE4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 357D7AA757B0ED4603C9CD1523BC234E; - remoteInfo = "SwiftProtobuf-iOS"; - }; - DAA1A4B6A4CD977AEF723ADD00FBBF4D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63F854E532D7CBA393D37B6C84E1F23F; - remoteInfo = "BigInt-macOS"; - }; - F3016EC094FD30D87573954D3C1F74AE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = AA186741961F10502016CE44BFED6684; - remoteInfo = "SwiftProtobuf-macOS"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 002B59B1C5346996B396069FF5C2ED4F /* String Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String Conversion.swift"; path = "Sources/String Conversion.swift"; sourceTree = ""; }; - 008343E9B8EC5141FA8E723F86D0B794 /* Cardano.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cardano.swift; path = Sources/Generated/Cardano.swift; sourceTree = ""; }; - 00DD953C5E1E18C601F1022450A5FB6E /* ImageFormat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageFormat.swift; path = Sources/Image/ImageFormat.swift; sourceTree = ""; }; - 01F2AC03788CFD2342BD9B66A6525800 /* Pods-Tokenary-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Tokenary-Info.plist"; sourceTree = ""; }; - 032D71292B3ACEE3F5FDC0577029332C /* TWAESPaddingMode.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWAESPaddingMode.h; path = include/TrustWalletCore/TWAESPaddingMode.h; sourceTree = ""; }; - 038B27C26CCB6F3BDEF6C13ADA63C42A /* Placeholder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Placeholder.swift; path = Sources/Image/Placeholder.swift; sourceTree = ""; }; - 03C323AECE33AE438F09C9E3C8553DAD /* KeyStore.Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KeyStore.Error.swift; path = Sources/KeyStore.Error.swift; sourceTree = ""; }; - 03C74AE56ADB950BEF977CDFE3F67DD8 /* TWAionProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWAionProto.h; path = include/TrustWalletCore/TWAionProto.h; sourceTree = ""; }; - 04CF5623EF8000ECBAA5B21C6A5EE3BE /* KFImageRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KFImageRenderer.swift; path = Sources/SwiftUI/KFImageRenderer.swift; sourceTree = ""; }; - 0598539458AAA2AAF6173D37EB1E926D /* SwiftProtobuf-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftProtobuf-macOS-umbrella.h"; path = "../SwiftProtobuf-macOS/SwiftProtobuf-macOS-umbrella.h"; sourceTree = ""; }; - 05C4AC95214C5BB1E6B970254BD0D1C0 /* Cardano.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cardano.pb.swift; path = Sources/Generated/Protobuf/Cardano.pb.swift; sourceTree = ""; }; - 05C50A492C2A145B91683E80C1856047 /* TWAeternityProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWAeternityProto.h; path = include/TrustWalletCore/TWAeternityProto.h; sourceTree = ""; }; - 064DC889ACD509F29619F2EC8C614644 /* MessageExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MessageExtension.swift; path = Sources/SwiftProtobuf/MessageExtension.swift; sourceTree = ""; }; - 0771AE7532A3F97CD329B4440438C9EA /* PrivateKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrivateKey.swift; path = Sources/Generated/PrivateKey.swift; sourceTree = ""; }; - 07827EA561AB1431A4A6D9FA4E92EB70 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Accelerate.framework; sourceTree = DEVELOPER_DIR; }; - 07E551D848FF88A302FF821108CCD775 /* SizeExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SizeExtensions.swift; path = Sources/Utility/SizeExtensions.swift; sourceTree = ""; }; - 081F0711363B18D0FD70A1DD4AAF3E7F /* BinaryDecodingOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDecodingOptions.swift; path = Sources/SwiftProtobuf/BinaryDecodingOptions.swift; sourceTree = ""; }; - 083ECFFFFE5ABBA8D824C5A9CA98CADC /* IOST+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "IOST+Proto.swift"; path = "Sources/Generated/Protobuf/IOST+Proto.swift"; sourceTree = ""; }; - 08D293986EF6AE47ECEB68D97EDFC3E7 /* SwiftProtobuf-macOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "SwiftProtobuf-macOS-Info.plist"; path = "../SwiftProtobuf-macOS/SwiftProtobuf-macOS-Info.plist"; sourceTree = ""; }; - 093B20C257A1B4EB85BD7FA52CEC8522 /* TextFormatEncodingOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextFormatEncodingOptions.swift; path = Sources/SwiftProtobuf/TextFormatEncodingOptions.swift; sourceTree = ""; }; - 09E928CFF866DEA0C41577591F53158C /* TWTransactionCompiler.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWTransactionCompiler.h; path = include/TrustWalletCore/TWTransactionCompiler.h; sourceTree = ""; }; - 0A90AABC168E7ACBF249426FCA99F19B /* WalletCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WalletCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 0AC52B88F52C8803909DB0DF2A75E994 /* DerivationPath.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DerivationPath.swift; path = Sources/Generated/DerivationPath.swift; sourceTree = ""; }; - 0AD0E1BCC2EB545E03E7B239BCC8D8E6 /* FieldTag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FieldTag.swift; path = Sources/SwiftProtobuf/FieldTag.swift; sourceTree = ""; }; - 0AF0D7E5C822BBF3FAC2DDF8C55BF849 /* TWGreenfieldProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWGreenfieldProto.h; path = include/TrustWalletCore/TWGreenfieldProto.h; sourceTree = ""; }; - 0B8DB7152CEBDA1B9F9BFBD91E36A9C1 /* TWAptosProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWAptosProto.h; path = include/TrustWalletCore/TWAptosProto.h; sourceTree = ""; }; - 0BC5D96C0A23604413A8E2B45EF4D15A /* Nano+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Nano+Proto.swift"; path = "Sources/Generated/Protobuf/Nano+Proto.swift"; sourceTree = ""; }; - 0C37C0511F5A16369B30672CB6BA6D00 /* Kingfisher.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Kingfisher.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 0CD18FEDFB27D51B90D18C5F21CC9612 /* Solana+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Solana+Proto.swift"; path = "Sources/Generated/Protobuf/Solana+Proto.swift"; sourceTree = ""; }; - 0E27E6DF7A806D288ADEF2A99B99DD75 /* TWStoredKeyEncryption.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWStoredKeyEncryption.h; path = include/TrustWalletCore/TWStoredKeyEncryption.h; sourceTree = ""; }; - 0F4D1447EAC541483D73DF084BA34F4A /* TextFormatEncoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextFormatEncoder.swift; path = Sources/SwiftProtobuf/TextFormatEncoder.swift; sourceTree = ""; }; - 0F6C91BABC308199D68EACF5281CFDC7 /* AESPaddingMode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AESPaddingMode.swift; path = Sources/Generated/Enums/AESPaddingMode.swift; sourceTree = ""; }; - 0FBE8665476CB5F9522F7E496FF9C528 /* SessionDataTask.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDataTask.swift; path = Sources/Networking/SessionDataTask.swift; sourceTree = ""; }; - 100453D81A211F4E47D53E573150E1BF /* SwiftProtobuf-iOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SwiftProtobuf-iOS-Info.plist"; sourceTree = ""; }; - 102B16B1582786362B83B35D5D9A4E2D /* EthereumRlp+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "EthereumRlp+Proto.swift"; path = "Sources/Generated/Protobuf/EthereumRlp+Proto.swift"; sourceTree = ""; }; - 10C2B2FA911E78816E6C6E750F84A8BF /* FilecoinAddressConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FilecoinAddressConverter.swift; path = Sources/Generated/FilecoinAddressConverter.swift; sourceTree = ""; }; - 10C539C5715FF822EA9A79893CAB496D /* Google_Protobuf_Any+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Google_Protobuf_Any+Extensions.swift"; path = "Sources/SwiftProtobuf/Google_Protobuf_Any+Extensions.swift"; sourceTree = ""; }; - 11DD64221DEC012A79E687A19A97D324 /* AuthenticationChallengeResponsable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AuthenticationChallengeResponsable.swift; path = Sources/Networking/AuthenticationChallengeResponsable.swift; sourceTree = ""; }; - 123377509B0905F2ACF841441C9C9316 /* StoredKeyEncryptionLevel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StoredKeyEncryptionLevel.swift; path = Sources/Generated/Enums/StoredKeyEncryptionLevel.swift; sourceTree = ""; }; - 123C965CACF3E25DF64CFD572E100C2D /* TWBarz.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBarz.h; path = include/TrustWalletCore/TWBarz.h; sourceTree = ""; }; - 128B5796EAD3AB6E94BE20744DB691A5 /* TWTezosMessageSigner.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWTezosMessageSigner.h; path = include/TrustWalletCore/TWTezosMessageSigner.h; sourceTree = ""; }; - 12ADC7BD936CBFEFD5A5916F828A7B4B /* ExtensionHelpers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExtensionHelpers.swift; path = Sources/Utility/ExtensionHelpers.swift; sourceTree = ""; }; - 1462B48420A4B2D2079AE0E6D4959503 /* AddressProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddressProtocol.swift; path = Sources/Extensions/AddressProtocol.swift; sourceTree = ""; }; - 14717DEE21E75CAC72AA1D8DB5AB4206 /* TWAnyAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWAnyAddress.h; path = include/TrustWalletCore/TWAnyAddress.h; sourceTree = ""; }; - 15EA94F2C1EEE737C985D8E1EAFED2AC /* Prime Test.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Prime Test.swift"; path = "Sources/Prime Test.swift"; sourceTree = ""; }; - 177E4A198FCB00E45F7EB51F247F932A /* IOST.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IOST.pb.swift; path = Sources/Generated/Protobuf/IOST.pb.swift; sourceTree = ""; }; - 18281CCC50839F349BD2014775006139 /* Version.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Version.swift; path = Sources/SwiftProtobuf/Version.swift; sourceTree = ""; }; - 182DF9072796D05693E1CB60B20B48CD /* Solana.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Solana.pb.swift; path = Sources/Generated/Protobuf/Solana.pb.swift; sourceTree = ""; }; - 18A9E81106903BEC79C4CF1EB92699E6 /* TWBase58.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBase58.h; path = include/TrustWalletCore/TWBase58.h; sourceTree = ""; }; - 18DEE602508105D8432D2424E1452D97 /* Pods-Tokenary-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Tokenary-umbrella.h"; sourceTree = ""; }; - 194E8378791E7484EC73DB4FAAF0EADA /* Square Root.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Square Root.swift"; path = "Sources/Square Root.swift"; sourceTree = ""; }; - 19630D7EED70F5054C4937BF82B65967 /* ImageDownloaderDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageDownloaderDelegate.swift; path = Sources/Networking/ImageDownloaderDelegate.swift; sourceTree = ""; }; - 19D583380E87444FAFF145DF4351FAAD /* TrustWalletCore-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TrustWalletCore-iOS-umbrella.h"; sourceTree = ""; }; - 1A2E743E360E4C33C6B5E931DF17F8CB /* Google_Protobuf_Value+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Google_Protobuf_Value+Extensions.swift"; path = "Sources/SwiftProtobuf/Google_Protobuf_Value+Extensions.swift"; sourceTree = ""; }; - 1A65B2DC6654207A6996E11E02CE9324 /* StarkWare.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StarkWare.swift; path = Sources/Generated/StarkWare.swift; sourceTree = ""; }; - 1A91984FF18242590E5D3522423008B2 /* MultiversX.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultiversX.pb.swift; path = Sources/Generated/Protobuf/MultiversX.pb.swift; sourceTree = ""; }; - 1B27C8EB84AB59FB71E403D1E3295DC9 /* BitcoinFee.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BitcoinFee.swift; path = Sources/Generated/BitcoinFee.swift; sourceTree = ""; }; - 1B49EBAAB30E14DD0F6107211CB9355F /* Box.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Sources/Utility/Box.swift; sourceTree = ""; }; - 1B7B1C545376B4206153C71BE40C5AEC /* Indicator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Indicator.swift; path = Sources/Views/Indicator.swift; sourceTree = ""; }; - 1BB143A46CBE58355B339EA4AED2785E /* ImageContext.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageContext.swift; path = Sources/SwiftUI/ImageContext.swift; sourceTree = ""; }; - 1C3B0003639A0DD0C5F7DA5EDD6DD772 /* BigUInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigUInt.swift; path = Sources/BigUInt.swift; sourceTree = ""; }; - 1C6A8A5336D312900E308A2C36E9F08D /* BitcoinAddress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BitcoinAddress.swift; path = Sources/Generated/BitcoinAddress.swift; sourceTree = ""; }; - 1C71C7B316B2BC77686826A04FC493D3 /* Tezos+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Tezos+Proto.swift"; path = "Sources/Generated/Protobuf/Tezos+Proto.swift"; sourceTree = ""; }; - 1D770EE3F5C51A97EAE2ABC0F0089054 /* TWLiquidStakingProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWLiquidStakingProto.h; path = include/TrustWalletCore/TWLiquidStakingProto.h; sourceTree = ""; }; - 1DEDBBCD3733146815DEFBCB91AC236B /* TWOasisProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWOasisProto.h; path = include/TrustWalletCore/TWOasisProto.h; sourceTree = ""; }; - 1DF52178386C075DA3857336307F8E58 /* TWEthereumRlpProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWEthereumRlpProto.h; path = include/TrustWalletCore/TWEthereumRlpProto.h; sourceTree = ""; }; - 1EBD06B016E8E81A6466BAFFA9192F0D /* BinaryEncodingError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryEncodingError.swift; path = Sources/SwiftProtobuf/BinaryEncodingError.swift; sourceTree = ""; }; - 1F55B52F956B1FCAB0C7714B9A83A6A6 /* FIO.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FIO.pb.swift; path = Sources/Generated/Protobuf/FIO.pb.swift; sourceTree = ""; }; - 1FD96ACD261584F033B651C700ACAAE1 /* CallbackQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CallbackQueue.swift; path = Sources/Utility/CallbackQueue.swift; sourceTree = ""; }; - 207E832E129737BBBFA697D306AB6C84 /* TWHash.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWHash.h; path = include/TrustWalletCore/TWHash.h; sourceTree = ""; }; - 20F20507ABFA06B2BB4823E1B9F3A04D /* ExtensionFieldValueSet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExtensionFieldValueSet.swift; path = Sources/SwiftProtobuf/ExtensionFieldValueSet.swift; sourceTree = ""; }; - 21B9F23278C0A14EC7B8583F108B3F11 /* Hedera+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Hedera+Proto.swift"; path = "Sources/Generated/Protobuf/Hedera+Proto.swift"; sourceTree = ""; }; - 21C6C62D872FA2C2D48B4F1F13716645 /* TWCurve.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWCurve.h; path = include/TrustWalletCore/TWCurve.h; sourceTree = ""; }; - 21C76D728654A8B1D51B0EF5350BF2DC /* Message+TextFormatAdditions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Message+TextFormatAdditions.swift"; path = "Sources/SwiftProtobuf/Message+TextFormatAdditions.swift"; sourceTree = ""; }; - 21F1BFCEC82F915FA850C75C5EDF7B4E /* TWRippleXAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWRippleXAddress.h; path = include/TrustWalletCore/TWRippleXAddress.h; sourceTree = ""; }; - 227F53DD32685A5DFB4AFADC157F5533 /* RetryStrategy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryStrategy.swift; path = Sources/Networking/RetryStrategy.swift; sourceTree = ""; }; - 22C6A10B37713663222A90451C0B9663 /* TWData.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWData.h; path = include/TrustWalletCore/TWData.h; sourceTree = ""; }; - 22DA17C7FF836BFD78FFE6DCE9134F4A /* Subtraction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Subtraction.swift; path = Sources/Subtraction.swift; sourceTree = ""; }; - 23E9DD9D99AA09FF9D623CCDB0828D83 /* LiquidStaking+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "LiquidStaking+Proto.swift"; path = "Sources/Generated/Protobuf/LiquidStaking+Proto.swift"; sourceTree = ""; }; - 2462917A79F9BC368B26B1F833938AD3 /* PublicKey+Bitcoin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "PublicKey+Bitcoin.swift"; path = "Sources/Extensions/PublicKey+Bitcoin.swift"; sourceTree = ""; }; - 24B6B130D979310638B362CB555BD8F7 /* Shifts.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Shifts.swift; path = Sources/Shifts.swift; sourceTree = ""; }; - 24C76B776BEBB37B0FDAEC3B8E0349F6 /* CoinTypeConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CoinTypeConfiguration.swift; path = Sources/Generated/CoinTypeConfiguration.swift; sourceTree = ""; }; - 24F7147722EDF445861B97965050C096 /* Message+JSONArrayAdditions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Message+JSONArrayAdditions.swift"; path = "Sources/SwiftProtobuf/Message+JSONArrayAdditions.swift"; sourceTree = ""; }; - 250E7B71EF2D86E6D80942F9B6C1460C /* ResourceBundle-Kingfisher-Kingfisher-macOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "ResourceBundle-Kingfisher-Kingfisher-macOS-Info.plist"; path = "../Kingfisher-macOS/ResourceBundle-Kingfisher-Kingfisher-macOS-Info.plist"; sourceTree = ""; }; - 259C324F1850397A45B2ED949517750E /* TWPurpose.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWPurpose.h; path = include/TrustWalletCore/TWPurpose.h; sourceTree = ""; }; - 25D46F8A8DFE004A33EF15C95D66587D /* Message.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Message.swift; path = Sources/SwiftProtobuf/Message.swift; sourceTree = ""; }; - 25F1961FC5A23DA3EE85F800B6CA3098 /* HRP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HRP.swift; path = Sources/Generated/Enums/HRP.swift; sourceTree = ""; }; - 2687F760EAFFE874772C932D400905E8 /* Binance+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Binance+Proto.swift"; path = "Sources/Generated/Protobuf/Binance+Proto.swift"; sourceTree = ""; }; - 268C4DC58835F8E3ED97580D835F3291 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; - 26EA5B9F879590AF9B6A4F08B90EE2D9 /* TWCommonProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWCommonProto.h; path = include/TrustWalletCore/TWCommonProto.h; sourceTree = ""; }; - 27315C8C7EF44BB4A9FAF21E8BD4AD72 /* TrustWalletCore-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "TrustWalletCore-iOS.debug.xcconfig"; sourceTree = ""; }; - 276651878187C7E173EEF1033FE2647C /* Strideable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Strideable.swift; path = Sources/Strideable.swift; sourceTree = ""; }; - 27B102322934FEB6EB8B8E85E62D5031 /* PublicKeyType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublicKeyType.swift; path = Sources/Generated/Enums/PublicKeyType.swift; sourceTree = ""; }; - 28C4F7FA258406940F554DB65CBDDB88 /* TrustWalletCore-iOS-xcframeworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "TrustWalletCore-iOS-xcframeworks.sh"; sourceTree = ""; }; - 28D6388940928A84ECE212B8F5FBA1B6 /* Ethereum+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Ethereum+Proto.swift"; path = "Sources/Generated/Protobuf/Ethereum+Proto.swift"; sourceTree = ""; }; - 28EBF0C5FF0FF9CF3E278D9539AD4DCF /* TWFIOAccount.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWFIOAccount.h; path = include/TrustWalletCore/TWFIOAccount.h; sourceTree = ""; }; - 29BAE74F61BA265ED2D9B02FFDB94C8A /* Kingfisher-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Kingfisher-macOS-umbrella.h"; path = "../Kingfisher-macOS/Kingfisher-macOS-umbrella.h"; sourceTree = ""; }; - 2A0665D9FB706A6556EB2E071F2F0E1B /* WalletCoreCommon.xcframework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.xcframework; path = WalletCoreCommon.xcframework; sourceTree = ""; }; - 2A862CCA152713345E3E79313F2F5276 /* Hashable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Hashable.swift; path = Sources/Hashable.swift; sourceTree = ""; }; - 2AC85B22832230B0F4C523704BF98A5C /* Icon+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Icon+Proto.swift"; path = "Sources/Generated/Protobuf/Icon+Proto.swift"; sourceTree = ""; }; - 2AE827B962C8B3FD4C601A505D9FE9F5 /* Runtime.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Runtime.swift; path = Sources/Utility/Runtime.swift; sourceTree = ""; }; - 2B0265BAA695FAD715C19E275889A637 /* NameMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NameMap.swift; path = Sources/SwiftProtobuf/NameMap.swift; sourceTree = ""; }; - 2C12E7907A13A46A72EFED7F4AD0347D /* RippleXAddress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RippleXAddress.swift; path = Sources/Generated/RippleXAddress.swift; sourceTree = ""; }; - 2C19C295E6C1CDA92EE78DADA9F10BE0 /* TWGroestlcoinAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWGroestlcoinAddress.h; path = include/TrustWalletCore/TWGroestlcoinAddress.h; sourceTree = ""; }; - 2C7907B894A03B342CE1C03AA84747F3 /* SwiftProtobuf-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftProtobuf-iOS-dummy.m"; sourceTree = ""; }; - 2CA50553A86292E8C435065CE5A25D1F /* Google_Protobuf_ListValue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Google_Protobuf_ListValue+Extensions.swift"; path = "Sources/SwiftProtobuf/Google_Protobuf_ListValue+Extensions.swift"; sourceTree = ""; }; - 2CFFCFF067B691C42A7F5F54CAAA241D /* BigInt-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "BigInt-macOS.release.xcconfig"; path = "../BigInt-macOS/BigInt-macOS.release.xcconfig"; sourceTree = ""; }; - 2D7780E35F2A38ACD6F4916FB6CFB54A /* Kingfisher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Kingfisher.swift; path = Sources/General/Kingfisher.swift; sourceTree = ""; }; - 2DC40554F5072F0E18A8C5FE76916510 /* TextFormatScanner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextFormatScanner.swift; path = Sources/SwiftProtobuf/TextFormatScanner.swift; sourceTree = ""; }; - 2DE4BCA5BE0B9812703C3F09373EF54F /* Greenfield.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Greenfield.pb.swift; path = Sources/Generated/Protobuf/Greenfield.pb.swift; sourceTree = ""; }; - 2FAD573CF11AEAFF499E0798FE1A7363 /* ImageDataProcessor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageDataProcessor.swift; path = Sources/Networking/ImageDataProcessor.swift; sourceTree = ""; }; - 2FE2CDE1BA3795B1FDE18662C42D3B88 /* TWDerivation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWDerivation.h; path = include/TrustWalletCore/TWDerivation.h; sourceTree = ""; }; - 305B67F58BAEDFED379C07322D6BD1A4 /* JSONScanner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONScanner.swift; path = Sources/SwiftProtobuf/JSONScanner.swift; sourceTree = ""; }; - 3085F10E052BA25632809F3542D65F20 /* Harmony.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Harmony.pb.swift; path = Sources/Generated/Protobuf/Harmony.pb.swift; sourceTree = ""; }; - 30D51229828A86E2758735FEAD988F18 /* SwiftProtobuf-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SwiftProtobuf-iOS.debug.xcconfig"; sourceTree = ""; }; - 310906C62D8BC77FA09EDE7A300A2B60 /* TWString.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWString.h; path = include/TrustWalletCore/TWString.h; sourceTree = ""; }; - 31129A29AFE1B2AF4B9A0F05ECB7AA03 /* BigInt-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "BigInt-macOS-prefix.pch"; path = "../BigInt-macOS/BigInt-macOS-prefix.pch"; sourceTree = ""; }; - 317AE04B87B518B31CE3AA76C44DC680 /* WebAuthn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WebAuthn.swift; path = Sources/Generated/WebAuthn.swift; sourceTree = ""; }; - 31EE44B9D977593E770CE5A90BB4E13B /* BitcoinV2.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BitcoinV2.pb.swift; path = Sources/Generated/Protobuf/BitcoinV2.pb.swift; sourceTree = ""; }; - 32461E1AECF5A48A5763CE5A7269C6AA /* AnyUnpackError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyUnpackError.swift; path = Sources/SwiftProtobuf/AnyUnpackError.swift; sourceTree = ""; }; - 3267AC2A904A8D61A9A5CC64AC5D3940 /* TWSegwitAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWSegwitAddress.h; path = include/TrustWalletCore/TWSegwitAddress.h; sourceTree = ""; }; - 3298A5F988361B72E8C0C33E9076C397 /* VeChain+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "VeChain+Proto.swift"; path = "Sources/Generated/Protobuf/VeChain+Proto.swift"; sourceTree = ""; }; - 32D70BFC272B306916DD7B139CF2ECB3 /* NSButton+Kingfisher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSButton+Kingfisher.swift"; path = "Sources/Extensions/NSButton+Kingfisher.swift"; sourceTree = ""; }; - 32DC10FFE739671242A8BD9C46832BE4 /* NervosAddress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NervosAddress.swift; path = Sources/Generated/NervosAddress.swift; sourceTree = ""; }; - 33244974D009E1E13A9F72DD4D12DBB2 /* TWBitcoinMessageSigner.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBitcoinMessageSigner.h; path = include/TrustWalletCore/TWBitcoinMessageSigner.h; sourceTree = ""; }; - 33AF882026976B1C595B00D0BACEA92C /* Ripple.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Ripple.pb.swift; path = Sources/Generated/Protobuf/Ripple.pb.swift; sourceTree = ""; }; - 33DA99B277C4621ED7513831A7D1F291 /* Pods-Tokenary.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-Tokenary.modulemap"; sourceTree = ""; }; - 342F51CEBBB103CCFC326BE1D39B88DE /* FIO+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "FIO+Proto.swift"; path = "Sources/Generated/Protobuf/FIO+Proto.swift"; sourceTree = ""; }; - 343D79E7292C13F1CC024AB35D5305F5 /* Kingfisher-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Kingfisher-macOS.release.xcconfig"; path = "../Kingfisher-macOS/Kingfisher-macOS.release.xcconfig"; sourceTree = ""; }; - 348938B0EE4CBAD68416414BC9FA737A /* TWData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TWData.swift; path = Sources/TWData.swift; sourceTree = ""; }; - 34B5CC64CC16B9BC1C39FC27D4FD9DDD /* TrustWalletCore-macOS-xcframeworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; name = "TrustWalletCore-macOS-xcframeworks.sh"; path = "../TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks.sh"; sourceTree = ""; }; - 34E2565A43CCADBFFF2D63038364E192 /* SelectiveVisitor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SelectiveVisitor.swift; path = Sources/SwiftProtobuf/SelectiveVisitor.swift; sourceTree = ""; }; - 3615E6A06B43DBF36B5916B7C514EE7B /* NEARAccount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NEARAccount.swift; path = Sources/Generated/NEARAccount.swift; sourceTree = ""; }; - 363C4C83E98EBE40017C27F8F03AEA93 /* StellarVersionByte.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StellarVersionByte.swift; path = Sources/Generated/Enums/StellarVersionByte.swift; sourceTree = ""; }; - 37F715D9963765B2EEAA9F7766C7D941 /* Pods-Tokenary.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Tokenary.debug.xcconfig"; sourceTree = ""; }; - 380778018196417D97B7D095CC541514 /* Theta+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Theta+Proto.swift"; path = "Sources/Generated/Protobuf/Theta+Proto.swift"; sourceTree = ""; }; - 38168313036BB1FE5EAC38FF616B4FD3 /* ImagePrefetcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImagePrefetcher.swift; path = Sources/Networking/ImagePrefetcher.swift; sourceTree = ""; }; - 3835A2A5C5C0B7626AC3A68882E93249 /* TWHederaProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWHederaProto.h; path = include/TrustWalletCore/TWHederaProto.h; sourceTree = ""; }; - 38CB28FA7BFFFE538922344E0837B0E1 /* Ethereum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Ethereum.swift; path = Sources/Generated/Ethereum.swift; sourceTree = ""; }; - 3A3815CA79AD33CED38B16DB1155A841 /* TWThetaProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWThetaProto.h; path = include/TrustWalletCore/TWThetaProto.h; sourceTree = ""; }; - 3B2373712ED36232FA70A8BD9B69C973 /* UnsafeBufferPointer+Shims.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UnsafeBufferPointer+Shims.swift"; path = "Sources/SwiftProtobuf/UnsafeBufferPointer+Shims.swift"; sourceTree = ""; }; - 3BF3A88A10643A0290B0D72F59EC081F /* Pods-Tokenary iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Tokenary iOS-dummy.m"; sourceTree = ""; }; - 3CAD01D0F5924ECAC9393C0BA64944ED /* FormatIndicatedCacheSerializer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormatIndicatedCacheSerializer.swift; path = Sources/Cache/FormatIndicatedCacheSerializer.swift; sourceTree = ""; }; - 3D1F2230999C27DCAA7F40F75FA312A0 /* TWBitcoinAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBitcoinAddress.h; path = include/TrustWalletCore/TWBitcoinAddress.h; sourceTree = ""; }; - 3D869323A343F3BE1463AED7F59D5F4F /* TWMnemonic.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWMnemonic.h; path = include/TrustWalletCore/TWMnemonic.h; sourceTree = ""; }; - 3D99B2B5939EEB6D0B4178AD410EC01F /* Nimiq.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Nimiq.pb.swift; path = Sources/Generated/Protobuf/Nimiq.pb.swift; sourceTree = ""; }; - 3DD7D25BCFA9751819BCD3F2BDC1DADF /* ImageView+Kingfisher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ImageView+Kingfisher.swift"; path = "Sources/Extensions/ImageView+Kingfisher.swift"; sourceTree = ""; }; - 3DE991C2878CAB5722A856BD79C24BB1 /* TWCosmosProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWCosmosProto.h; path = include/TrustWalletCore/TWCosmosProto.h; sourceTree = ""; }; - 3E14980C2C39C88F8F0ED8E30F556D68 /* TextFormatDecodingOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextFormatDecodingOptions.swift; path = Sources/SwiftProtobuf/TextFormatDecodingOptions.swift; sourceTree = ""; }; - 3E1E000D7EFDC8AE72F241BD1BC3DF55 /* AnimatedImageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimatedImageView.swift; path = Sources/Views/AnimatedImageView.swift; sourceTree = ""; }; - 3E5C6948B98BE431E93D86DD1FD4C054 /* TWVeChainProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWVeChainProto.h; path = include/TrustWalletCore/TWVeChainProto.h; sourceTree = ""; }; - 3E90848F2B2114098341EE243B4F46B5 /* Google_Protobuf_Duration+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Google_Protobuf_Duration+Extensions.swift"; path = "Sources/SwiftProtobuf/Google_Protobuf_Duration+Extensions.swift"; sourceTree = ""; }; - 3FBE3CC825141C29EA61B91028C4B641 /* ImageTransition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageTransition.swift; path = Sources/Image/ImageTransition.swift; sourceTree = ""; }; - 3FD40E6437D301ED405B05FA5CFD2D08 /* TWBitcoinV2Proto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBitcoinV2Proto.h; path = include/TrustWalletCore/TWBitcoinV2Proto.h; sourceTree = ""; }; - 415174A54ECF3C00EFAAA9F86B07550A /* BigInt-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "BigInt-iOS.modulemap"; sourceTree = ""; }; - 41CCF353B366CA359985A466D17FD11B /* Theta.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Theta.pb.swift; path = Sources/Generated/Protobuf/Theta.pb.swift; sourceTree = ""; }; - 42FD3E72F2FC57B66B065A5AC16736B4 /* Resource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Resource.swift; path = Sources/General/ImageSource/Resource.swift; sourceTree = ""; }; - 437871F52ACCCF7134F2298F6032751A /* Delegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Delegate.swift; path = Sources/Utility/Delegate.swift; sourceTree = ""; }; - 43FA0A4C15DE1B1F6DFD0ECD0BA95D6F /* LiquidStaking.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LiquidStaking.pb.swift; path = Sources/Generated/Protobuf/LiquidStaking.pb.swift; sourceTree = ""; }; - 44D45260F8E9B64B4046E63CC386C674 /* TextFormatDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextFormatDecoder.swift; path = Sources/SwiftProtobuf/TextFormatDecoder.swift; sourceTree = ""; }; - 44F4DBDA37E03292BBB491724C6CD696 /* BigInt-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-prefix.pch"; sourceTree = ""; }; - 45F476E40E6BA725295757E3C48EA675 /* TWTHORChainSwapProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWTHORChainSwapProto.h; path = include/TrustWalletCore/TWTHORChainSwapProto.h; sourceTree = ""; }; - 4663DB9782B4B88B39DF04FD2E55B5FC /* TWStellarProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWStellarProto.h; path = include/TrustWalletCore/TWStellarProto.h; sourceTree = ""; }; - 46FE95F7A628D3E41D0CBBCC26A4972F /* MultiversX+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MultiversX+Proto.swift"; path = "Sources/Generated/Protobuf/MultiversX+Proto.swift"; sourceTree = ""; }; - 491B3DEAE0F347AFBF91231A409B1459 /* WKInterfaceImage+Kingfisher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "WKInterfaceImage+Kingfisher.swift"; path = "Sources/Extensions/WKInterfaceImage+Kingfisher.swift"; sourceTree = ""; }; - 4978FB55EFC3394F55F896472E3FA0B3 /* CoinType+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CoinType+Extension.swift"; path = "Sources/Generated/CoinType+Extension.swift"; sourceTree = ""; }; - 4AE0B1168CF4E0DD2EC366235E91C343 /* TrustWalletCore-macOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "TrustWalletCore-macOS-Info.plist"; path = "../TrustWalletCore-macOS/TrustWalletCore-macOS-Info.plist"; sourceTree = ""; }; - 4B84234C62053507827617AE6EA65CBF /* TWBinanceProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBinanceProto.h; path = include/TrustWalletCore/TWBinanceProto.h; sourceTree = ""; }; - 4C08858C3F2E80CF11B9C5039BD0CD41 /* NEO+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NEO+Proto.swift"; path = "Sources/Generated/Protobuf/NEO+Proto.swift"; sourceTree = ""; }; - 4C34B5ADF85C0400281EBD527FD8B237 /* Harmony+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Harmony+Proto.swift"; path = "Sources/Generated/Protobuf/Harmony+Proto.swift"; sourceTree = ""; }; - 4C4C0F02594B7103FDCF68421763DBFD /* Algorand+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Algorand+Proto.swift"; path = "Sources/Generated/Protobuf/Algorand+Proto.swift"; sourceTree = ""; }; - 4C6F88366BF058CFD919C633C2665081 /* field_mask.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = field_mask.pb.swift; path = Sources/SwiftProtobuf/field_mask.pb.swift; sourceTree = ""; }; - 4C8EE235D97488B3920ABF00A25EDEED /* Integer Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Integer Conversion.swift"; path = "Sources/Integer Conversion.swift"; sourceTree = ""; }; - 4C9411B2A94F551D7C4375B128146037 /* BitcoinV2+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "BitcoinV2+Proto.swift"; path = "Sources/Generated/Protobuf/BitcoinV2+Proto.swift"; sourceTree = ""; }; - 4CCABC9836B32D09A771DAF2816B01BC /* Google_Protobuf_Struct+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Google_Protobuf_Struct+Extensions.swift"; path = "Sources/SwiftProtobuf/Google_Protobuf_Struct+Extensions.swift"; sourceTree = ""; }; - 4CFBD8F75A217AC76114D09B2809FFA2 /* EthereumAbiFunction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumAbiFunction.swift; path = Sources/Generated/EthereumAbiFunction.swift; sourceTree = ""; }; - 4D0BE2664911FF690E8852DDB010DA39 /* AnyMessageStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyMessageStorage.swift; path = Sources/SwiftProtobuf/AnyMessageStorage.swift; sourceTree = ""; }; - 4DDB7A88B15D46561468D364A2BBE1B1 /* BinaryEncoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryEncoder.swift; path = Sources/SwiftProtobuf/BinaryEncoder.swift; sourceTree = ""; }; - 4EC439B9BC2E3BCD1D027D855BB14D98 /* CacheSerializer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CacheSerializer.swift; path = Sources/Cache/CacheSerializer.swift; sourceTree = ""; }; - 4EC7F635E85D6AFAA4C8BB12A35989E0 /* UIButton+Kingfisher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIButton+Kingfisher.swift"; path = "Sources/Extensions/UIButton+Kingfisher.swift"; sourceTree = ""; }; - 4F16FE5ECC32411CC2A87385E931C504 /* TWBase64.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBase64.h; path = include/TrustWalletCore/TWBase64.h; sourceTree = ""; }; - 4F39BE4B2C547598667F86EE47AF4773 /* TWSolanaProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWSolanaProto.h; path = include/TrustWalletCore/TWSolanaProto.h; sourceTree = ""; }; - 4FA6A69B28B7A23F2425170E393537B4 /* TWCoinType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWCoinType.h; path = include/TrustWalletCore/TWCoinType.h; sourceTree = ""; }; - 4FDEF4B73B700A075972D201D1F9A71D /* TWDerivationPathIndex.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWDerivationPathIndex.h; path = include/TrustWalletCore/TWDerivationPathIndex.h; sourceTree = ""; }; - 500DC4908D321D0036B86023C3DE980B /* api.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = api.pb.swift; path = Sources/SwiftProtobuf/api.pb.swift; sourceTree = ""; }; - 502B72EC7D6FBABECE36E634249DF5DB /* Utxo+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Utxo+Proto.swift"; path = "Sources/Generated/Protobuf/Utxo+Proto.swift"; sourceTree = ""; }; - 507D103F7FD6EA4DC49C8B5EAFDEE13B /* BinaryEncodingSizeVisitor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryEncodingSizeVisitor.swift; path = Sources/SwiftProtobuf/BinaryEncodingSizeVisitor.swift; sourceTree = ""; }; - 509BF995B0D852C779E89CBD3D808CF3 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; - 51ADD5B2E3B53B1DBC942E101177647C /* TWNEOProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWNEOProto.h; path = include/TrustWalletCore/TWNEOProto.h; sourceTree = ""; }; - 51B1F162C0E5B47CDE7039E086277F16 /* Aion+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Aion+Proto.swift"; path = "Sources/Generated/Protobuf/Aion+Proto.swift"; sourceTree = ""; }; - 5261E92D52DC301F8A5A282C09AB4AC7 /* TezosMessageSigner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TezosMessageSigner.swift; path = Sources/Generated/TezosMessageSigner.swift; sourceTree = ""; }; - 528301163D9C04043976B9CEB1089FC8 /* NEO.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NEO.pb.swift; path = Sources/Generated/Protobuf/NEO.pb.swift; sourceTree = ""; }; - 53A8BEBA7CD55234B26C1F4335352436 /* Base32.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Base32.swift; path = Sources/Generated/Base32.swift; sourceTree = ""; }; - 53CA3FEEC9DA71BA9198FBBDC3C3DFB2 /* descriptor.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = descriptor.pb.swift; path = Sources/SwiftProtobuf/descriptor.pb.swift; sourceTree = ""; }; - 5481C88B09DF44E486BBA146554E7958 /* ImageBinder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageBinder.swift; path = Sources/SwiftUI/ImageBinder.swift; sourceTree = ""; }; - 54A84C468FE01C9F47FB7DDACF4CD775 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Sources/Networking/SessionDelegate.swift; sourceTree = ""; }; - 56415FEBB5DBEC5E2033330ECB7A3591 /* ExtensibleMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExtensibleMessage.swift; path = Sources/SwiftProtobuf/ExtensibleMessage.swift; sourceTree = ""; }; - 572BEA04E861ADA1CAE65662914C6EB7 /* type.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = type.pb.swift; path = Sources/SwiftProtobuf/type.pb.swift; sourceTree = ""; }; - 57BF9921E1767EB59ABD94DB5BCB076B /* TWStarkWare.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWStarkWare.h; path = include/TrustWalletCore/TWStarkWare.h; sourceTree = ""; }; - 580B97BF3D9DE91BF6F4581A07FC8AA9 /* BigInt-iOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "BigInt-iOS-Info.plist"; sourceTree = ""; }; - 58B9A6C6F70D0DF41697F67031EF350C /* Decred.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Decred.pb.swift; path = Sources/Generated/Protobuf/Decred.pb.swift; sourceTree = ""; }; - 5961ED8B13E584B76BE678E69845EDC8 /* Nebulas.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Nebulas.pb.swift; path = Sources/Generated/Protobuf/Nebulas.pb.swift; sourceTree = ""; }; - 59C5DD41EE313A65C03650784BF278F3 /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5BCD33F6B949215197076E4396FC32FB /* Nervos.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Nervos.pb.swift; path = Sources/Generated/Protobuf/Nervos.pb.swift; sourceTree = ""; }; - 5D065B07FE812987B5098636289FF42A /* Bitcoin+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bitcoin+Proto.swift"; path = "Sources/Generated/Protobuf/Bitcoin+Proto.swift"; sourceTree = ""; }; - 5D2BDBB5FC2D531E8D2B0A0DB4958A23 /* TWHDVersion.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWHDVersion.h; path = include/TrustWalletCore/TWHDVersion.h; sourceTree = ""; }; - 5D7FFEDB1639E36F1275A04B6DB0053C /* ProtoNameProviding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ProtoNameProviding.swift; path = Sources/SwiftProtobuf/ProtoNameProviding.swift; sourceTree = ""; }; - 5DAF680AA5A704652B50A7749E1E7C67 /* StoredKeyEncryption.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StoredKeyEncryption.swift; path = Sources/Generated/Enums/StoredKeyEncryption.swift; sourceTree = ""; }; - 5DEA2DA8FDA7BAA10038CC169BBB4E50 /* Kingfisher-macOS-Kingfisher */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "Kingfisher-macOS-Kingfisher"; path = Kingfisher.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - 5F18B835F60CBEFE8D0AAE093F26B41C /* BigInt-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "BigInt-macOS.debug.xcconfig"; path = "../BigInt-macOS/BigInt-macOS.debug.xcconfig"; sourceTree = ""; }; - 5F52C76D0CC7F92C551EC2E40D9320AB /* SwiftProtobuf.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftProtobuf.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5F5DF41A48A74AA8257F405288E2A9D0 /* Aion.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Aion.pb.swift; path = Sources/Generated/Protobuf/Aion.pb.swift; sourceTree = ""; }; - 5FB7B9C7D1F8FCDFF47453F49CA67F5B /* Internal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Internal.swift; path = Sources/SwiftProtobuf/Internal.swift; sourceTree = ""; }; - 5FC84B3093A848901AC994234867BC93 /* TWNEARAccount.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWNEARAccount.h; path = include/TrustWalletCore/TWNEARAccount.h; sourceTree = ""; }; - 5FD8E17BBEAA574BB136AA1AC5471CA5 /* IoTeX.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IoTeX.pb.swift; path = Sources/Generated/Protobuf/IoTeX.pb.swift; sourceTree = ""; }; - 6030EF5A34D3268961C3610E8396B16E /* TWMultiversXProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWMultiversXProto.h; path = include/TrustWalletCore/TWMultiversXProto.h; sourceTree = ""; }; - 6035A5375CCAC1108A5256A5E4D443FA /* ExtensionMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExtensionMap.swift; path = Sources/SwiftProtobuf/ExtensionMap.swift; sourceTree = ""; }; - 60CD9336BF0D87EB43F318C3C417DB66 /* WalletCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WalletCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 610AFFF63F0D24E18042D05B28D7B342 /* TWStarkExMessageSigner.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWStarkExMessageSigner.h; path = include/TrustWalletCore/TWStarkExMessageSigner.h; sourceTree = ""; }; - 614C96527E78504BBB98D74BB34F7E71 /* TWEthereumAbi.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWEthereumAbi.h; path = include/TrustWalletCore/TWEthereumAbi.h; sourceTree = ""; }; - 62B12CFC3DF417D774B463DB206FC399 /* BitcoinAddress+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "BitcoinAddress+Extension.swift"; path = "Sources/Extensions/BitcoinAddress+Extension.swift"; sourceTree = ""; }; - 6330966403211B35C9F223F24FD7FCD6 /* struct.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = struct.pb.swift; path = Sources/SwiftProtobuf/struct.pb.swift; sourceTree = ""; }; - 643B04AC6F0EA9BF74879E2BF5585540 /* JSONEncoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncoder.swift; path = Sources/SwiftProtobuf/JSONEncoder.swift; sourceTree = ""; }; - 64E4E5260567D87102F99275973B6FA2 /* TWHRP.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWHRP.h; path = include/TrustWalletCore/TWHRP.h; sourceTree = ""; }; - 6517ACB63CBFFF085786EE068E92BD07 /* Derivation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Derivation.swift; path = Sources/Generated/Enums/Derivation.swift; sourceTree = ""; }; - 665EDC07E1D1ECFD22B09B93D61A3C58 /* Google_Protobuf_Wrappers+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Google_Protobuf_Wrappers+Extensions.swift"; path = "Sources/SwiftProtobuf/Google_Protobuf_Wrappers+Extensions.swift"; sourceTree = ""; }; - 66929AB0E516AE0F67EAE05485C0D152 /* EthereumMessageSigner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumMessageSigner.swift; path = Sources/Generated/EthereumMessageSigner.swift; sourceTree = ""; }; - 669F2D97B5DFB7BC8B91F031310EAC27 /* Barz.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Barz.swift; path = Sources/Generated/Barz.swift; sourceTree = ""; }; - 66CD66814EB232CA088A8B6D967EB110 /* TrustWalletCore-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "TrustWalletCore-iOS-dummy.m"; sourceTree = ""; }; - 6752EA648F3610499F67A5C39009EFD4 /* TWBitcoinSigHashType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBitcoinSigHashType.h; path = include/TrustWalletCore/TWBitcoinSigHashType.h; sourceTree = ""; }; - 6796316430087AFAB7E717FFED618E61 /* TransactionCompiler+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "TransactionCompiler+Proto.swift"; path = "Sources/Generated/Protobuf/TransactionCompiler+Proto.swift"; sourceTree = ""; }; - 67B1E975CF716511F1903BD81FE55195 /* TheOpenNetwork.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TheOpenNetwork.pb.swift; path = Sources/Generated/Protobuf/TheOpenNetwork.pb.swift; sourceTree = ""; }; - 680B7CE27E02B8073C3494C5020C6F77 /* Exponentiation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Exponentiation.swift; path = Sources/Exponentiation.swift; sourceTree = ""; }; - 682B98EE94C05147DBE2D2A16EF9D340 /* EOS+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "EOS+Proto.swift"; path = "Sources/Generated/Protobuf/EOS+Proto.swift"; sourceTree = ""; }; - 689BEA9360638EE3FFDB2D5173580B65 /* Words and Bits.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Words and Bits.swift"; path = "Sources/Words and Bits.swift"; sourceTree = ""; }; - 68A669A0F27F135643F970132BF9F522 /* SegwitAddress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SegwitAddress.swift; path = Sources/Generated/SegwitAddress.swift; sourceTree = ""; }; - 68EA378435D05826C64F994495439AD3 /* ImageCache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageCache.swift; path = Sources/Cache/ImageCache.swift; sourceTree = ""; }; - 69550BF425C701F89716029D94A38603 /* Google_Protobuf_FieldMask+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Google_Protobuf_FieldMask+Extensions.swift"; path = "Sources/SwiftProtobuf/Google_Protobuf_FieldMask+Extensions.swift"; sourceTree = ""; }; - 69FA87A03BA5A8A3DBF795F2EEFFEB61 /* TWStoredKey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWStoredKey.h; path = include/TrustWalletCore/TWStoredKey.h; sourceTree = ""; }; - 6A2F72B33064CF980E48FA2BFF28041B /* Watch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Watch.swift; path = Sources/Watch.swift; sourceTree = ""; }; - 6AB75F39A8C7A86D2D401DE40E2F2565 /* TWPublicKey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWPublicKey.h; path = include/TrustWalletCore/TWPublicKey.h; sourceTree = ""; }; - 6B2773F0C23CF91E3B3CB5EA1CC511EA /* PBKDF2.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PBKDF2.swift; path = Sources/Generated/PBKDF2.swift; sourceTree = ""; }; - 6C79B6EDDAC5013D98434F63A8C458B6 /* Pods-Tokenary.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Tokenary.release.xcconfig"; sourceTree = ""; }; - 6CF12A9C9C36B60BE950F994C6819D32 /* BigInt-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "BigInt-iOS.debug.xcconfig"; sourceTree = ""; }; - 6CFDD1B000F85A766B620818507E7DE1 /* Oasis+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Oasis+Proto.swift"; path = "Sources/Generated/Protobuf/Oasis+Proto.swift"; sourceTree = ""; }; - 6EFF3AB6BDD4384A6DAB3ED30CA17155 /* TWPBKDF2.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWPBKDF2.h; path = include/TrustWalletCore/TWPBKDF2.h; sourceTree = ""; }; - 6F0498A7E7D53E85DF3243E71163ABC9 /* TrustWalletCore-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "TrustWalletCore-iOS.release.xcconfig"; sourceTree = ""; }; - 703463228786F4945B5497FEEBF5D8DE /* TWWebAuthn.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWWebAuthn.h; path = include/TrustWalletCore/TWWebAuthn.h; sourceTree = ""; }; - 705178BBD27C499C1D546F0A115272FB /* Aeternity.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Aeternity.pb.swift; path = Sources/Generated/Protobuf/Aeternity.pb.swift; sourceTree = ""; }; - 70803E3FDA9AF941337F0942E50D3D03 /* TWHarmonyProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWHarmonyProto.h; path = include/TrustWalletCore/TWHarmonyProto.h; sourceTree = ""; }; - 70B587E605F520B99D8C9612368E06B1 /* KFOptionsSetter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KFOptionsSetter.swift; path = Sources/General/KFOptionsSetter.swift; sourceTree = ""; }; - 71B78753C2A9821337517F82CEA73CDD /* FIOAccount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FIOAccount.swift; path = Sources/Generated/FIOAccount.swift; sourceTree = ""; }; - 720C9C7CF3322A59901BAA55579980C1 /* empty.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = empty.pb.swift; path = Sources/SwiftProtobuf/empty.pb.swift; sourceTree = ""; }; - 720CD84CCDF712F01402DED67E2C2BBE /* Cosmos.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cosmos.pb.swift; path = Sources/Generated/Protobuf/Cosmos.pb.swift; sourceTree = ""; }; - 72225E44C1CA748460E83DD91517A13A /* Base64.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Base64.swift; path = Sources/Generated/Base64.swift; sourceTree = ""; }; - 725F89687254C664F94D44D4C675185D /* Enum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Enum.swift; path = Sources/SwiftProtobuf/Enum.swift; sourceTree = ""; }; - 741A961FD62CD2174612D245938D1986 /* TWUtxoProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWUtxoProto.h; path = include/TrustWalletCore/TWUtxoProto.h; sourceTree = ""; }; - 74B19D9426C753156D891128B648D604 /* Mnemonic.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Mnemonic.swift; path = Sources/Generated/Mnemonic.swift; sourceTree = ""; }; - 752820D333566556D461186C664F52F9 /* BinaryEncodingVisitor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryEncodingVisitor.swift; path = Sources/SwiftProtobuf/BinaryEncodingVisitor.swift; sourceTree = ""; }; - 75C68D1A26AF31A8A83DE4973626EEC1 /* Cosmos+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Cosmos+Proto.swift"; path = "Sources/Generated/Protobuf/Cosmos+Proto.swift"; sourceTree = ""; }; - 76A9191ABB4D7BD2B89F5B14BE9907FA /* AVAssetImageDataProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AVAssetImageDataProvider.swift; path = Sources/General/ImageSource/AVAssetImageDataProvider.swift; sourceTree = ""; }; - 784F9D8EB78658C13E4C3E234A4B9616 /* TWStellarMemoType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWStellarMemoType.h; path = include/TrustWalletCore/TWStellarMemoType.h; sourceTree = ""; }; - 78E1AE742575E960FDE2A440E7A144CC /* TWPrivateKeyType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWPrivateKeyType.h; path = include/TrustWalletCore/TWPrivateKeyType.h; sourceTree = ""; }; - 78ED7ECAE693119606FD0E2E9B93653B /* BitcoinSigHashType+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "BitcoinSigHashType+Extension.swift"; path = "Sources/Generated/BitcoinSigHashType+Extension.swift"; sourceTree = ""; }; - 792B8DE3A8EA740C156954EBA50E6C71 /* ImageDataProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageDataProvider.swift; path = Sources/General/ImageSource/ImageDataProvider.swift; sourceTree = ""; }; - 7944105E73D128DCABD3237C26233DF1 /* TrustWalletCore-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "TrustWalletCore-macOS.release.xcconfig"; path = "../TrustWalletCore-macOS/TrustWalletCore-macOS.release.xcconfig"; sourceTree = ""; }; - 7AB81CFA8EA50C0AF3211B5404670DE7 /* UniversalAssetID.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UniversalAssetID.swift; path = Sources/Types/UniversalAssetID.swift; sourceTree = ""; }; - 7B88398A2932B054105E20FAF7D4E4E2 /* Ontology+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Ontology+Proto.swift"; path = "Sources/Generated/Protobuf/Ontology+Proto.swift"; sourceTree = ""; }; - 7BDD2E02577BA52A2CBF06B1E751B6BE /* VeChain.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VeChain.pb.swift; path = Sources/Generated/Protobuf/VeChain.pb.swift; sourceTree = ""; }; - 7BE739F12791EB233F4B5B874300DD5E /* Pods-Tokenary iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Tokenary iOS.release.xcconfig"; sourceTree = ""; }; - 7C066BD92281FA6A549B8DC21E86DFDF /* TWEOSProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWEOSProto.h; path = include/TrustWalletCore/TWEOSProto.h; sourceTree = ""; }; - 7CDAA112E8DC8803E1EAAB9C257674EF /* Nebulas+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Nebulas+Proto.swift"; path = "Sources/Generated/Protobuf/Nebulas+Proto.swift"; sourceTree = ""; }; - 7CF04E1D6F32C6315DB91F83DE2ED391 /* TextFormatEncodingVisitor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextFormatEncodingVisitor.swift; path = Sources/SwiftProtobuf/TextFormatEncodingVisitor.swift; sourceTree = ""; }; - 7D2A880D5A6A5149F0A3C96FC28BFB36 /* Pods-Tokenary iOS-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Tokenary iOS-acknowledgements.plist"; sourceTree = ""; }; - 7E0E3B7CDD5E18DF9FB389779843C4B5 /* KingfisherError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KingfisherError.swift; path = Sources/General/KingfisherError.swift; sourceTree = ""; }; - 7EF88C73FDAD30713F6A3EB9F848C6E3 /* Pods-Tokenary-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Tokenary-acknowledgements.markdown"; sourceTree = ""; }; - 7F8FF5B9F55078B4A8A95A6C74569A5F /* Multiplication.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multiplication.swift; path = Sources/Multiplication.swift; sourceTree = ""; }; - 7FE293D5501643C4803EA3327D9F9DD3 /* TWTheOpenNetworkProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWTheOpenNetworkProto.h; path = include/TrustWalletCore/TWTheOpenNetworkProto.h; sourceTree = ""; }; - 805C07DD521AD2FC73EF307C3265C0EF /* Message+AnyAdditions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Message+AnyAdditions.swift"; path = "Sources/SwiftProtobuf/Message+AnyAdditions.swift"; sourceTree = ""; }; - 80DE412ABB3BCE2F9CB926D3216AE310 /* KF.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KF.swift; path = Sources/General/KF.swift; sourceTree = ""; }; - 81E6823C89AB8AF6757ED9FD07040705 /* Filecoin.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filecoin.pb.swift; path = Sources/Generated/Protobuf/Filecoin.pb.swift; sourceTree = ""; }; - 829250A578FE8926F326268E6ED3DDFB /* Floating Point Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Floating Point Conversion.swift"; path = "Sources/Floating Point Conversion.swift"; sourceTree = ""; }; - 8333AF2A67DB0B10A1EC1CFCA9695C5C /* KFAnimatedImage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KFAnimatedImage.swift; path = Sources/SwiftUI/KFAnimatedImage.swift; sourceTree = ""; }; - 833E85FEAF03071EA15B10818E8BFD27 /* TWRippleProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWRippleProto.h; path = include/TrustWalletCore/TWRippleProto.h; sourceTree = ""; }; - 83C0492624A62D333A78A26B8F3D022B /* ImageDownloader.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageDownloader.swift; path = Sources/Networking/ImageDownloader.swift; sourceTree = ""; }; - 8419E9D434FAF23A78DF801602D4E0A2 /* NEAR.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NEAR.pb.swift; path = Sources/Generated/Protobuf/NEAR.pb.swift; sourceTree = ""; }; - 844F1ABB1BBE571EB79940E2E56B4D3C /* Ethereum.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Ethereum.pb.swift; path = Sources/Generated/Protobuf/Ethereum.pb.swift; sourceTree = ""; }; - 84722E292A5B690DAE20B5B109A178A8 /* SwiftProtobuf-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftProtobuf-iOS-prefix.pch"; sourceTree = ""; }; - 84BCC37628020C73BDC04FF352CBC29B /* Tron.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Tron.pb.swift; path = Sources/Generated/Protobuf/Tron.pb.swift; sourceTree = ""; }; - 861BABE75142AE9C4FF12B4178B02F59 /* EthereumChainID.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumChainID.swift; path = Sources/Generated/Enums/EthereumChainID.swift; sourceTree = ""; }; - 8694A8463DF8EE1E0A9C1D1EC5DDBBBB /* Everscale.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Everscale.pb.swift; path = Sources/Generated/Protobuf/Everscale.pb.swift; sourceTree = ""; }; - 86C44BB0D31B0BB69F2BD2D84BFB7397 /* CoinType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CoinType.swift; path = Sources/Generated/Enums/CoinType.swift; sourceTree = ""; }; - 874BD391756CD973258C28F72E55F80B /* Greenfield+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Greenfield+Proto.swift"; path = "Sources/Generated/Protobuf/Greenfield+Proto.swift"; sourceTree = ""; }; - 87601A1F0DAC6747565BE384EC2E639A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = Sources/PrivacyInfo.xcprivacy; sourceTree = ""; }; - 8859F555F96A70FC9E9CFB1E46BD302E /* TWTHORChainSwap.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWTHORChainSwap.h; path = include/TrustWalletCore/TWTHORChainSwap.h; sourceTree = ""; }; - 886F3524AD0CE136C282038BB836E0A9 /* Addition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Addition.swift; path = Sources/Addition.swift; sourceTree = ""; }; - 887E99CEBC059806E355F163AE2B1628 /* BigInt-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "BigInt-macOS-dummy.m"; path = "../BigInt-macOS/BigInt-macOS-dummy.m"; sourceTree = ""; }; - 88ED7522C81BEBF610E9772BBC330782 /* DataVector.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DataVector.swift; path = Sources/Generated/DataVector.swift; sourceTree = ""; }; - 89D0C9706D28A9F88B636580476B121E /* CoinType+Address.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CoinType+Address.swift"; path = "Sources/Extensions/CoinType+Address.swift"; sourceTree = ""; }; - 89FB513248D38132ABC7C70801715C72 /* BitcoinScript.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BitcoinScript.swift; path = Sources/Generated/BitcoinScript.swift; sourceTree = ""; }; - 8A8B7C1888CB4E7CB263E98509CC35D6 /* Message+BinaryAdditions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Message+BinaryAdditions.swift"; path = "Sources/SwiftProtobuf/Message+BinaryAdditions.swift"; sourceTree = ""; }; - 8AF0E4BE6CB89D1A02A14081360DFD8C /* SwiftProtobuf.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftProtobuf.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8B353854C116EF27EA6DF3B3D3A263C1 /* TWTransactionCompilerProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWTransactionCompilerProto.h; path = include/TrustWalletCore/TWTransactionCompilerProto.h; sourceTree = ""; }; - 8B834D424680C126A5AB061997265979 /* FieldTypes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FieldTypes.swift; path = Sources/SwiftProtobuf/FieldTypes.swift; sourceTree = ""; }; - 8BF96F25FA20FA87C41337488496873D /* TWStoredKeyEncryptionLevel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWStoredKeyEncryptionLevel.h; path = include/TrustWalletCore/TWStoredKeyEncryptionLevel.h; sourceTree = ""; }; - 8C7D9D46FB69A4413668BD335E7B216A /* TWTronMessageSigner.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWTronMessageSigner.h; path = include/TrustWalletCore/TWTronMessageSigner.h; sourceTree = ""; }; - 8D31EEFFEBC60F302E182A3101A0EC4A /* UnsafeRawPointer+Shims.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UnsafeRawPointer+Shims.swift"; path = "Sources/SwiftProtobuf/UnsafeRawPointer+Shims.swift"; sourceTree = ""; }; - 8DAA9132FC83BC8605EE7D9293A0BE2B /* Storage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Storage.swift; path = Sources/Cache/Storage.swift; sourceTree = ""; }; - 8DD786233C16BFB0599CA37F8A09F1D2 /* ImageProcessor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageProcessor.swift; path = Sources/Image/ImageProcessor.swift; sourceTree = ""; }; - 8E46A6E5002095EFFEA6E8C7E99E6A33 /* Kingfisher-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "Kingfisher-macOS-prefix.pch"; path = "../Kingfisher-macOS/Kingfisher-macOS-prefix.pch"; sourceTree = ""; }; - 8EB022C9C09FED36EFF5EC4382E5C80D /* PublicKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublicKey.swift; path = Sources/Generated/PublicKey.swift; sourceTree = ""; }; - 8ED3371A76D4AC11090BFE126C93B43A /* BitcoinMessageSigner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BitcoinMessageSigner.swift; path = Sources/Generated/BitcoinMessageSigner.swift; sourceTree = ""; }; - 8EF5DF35E731A51646BDC19FB68E313D /* SwiftProtobuf-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftProtobuf-iOS-umbrella.h"; sourceTree = ""; }; - 8F4DCD6BF7F15B30A311AA557CBC3221 /* ProtobufMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ProtobufMap.swift; path = Sources/SwiftProtobuf/ProtobufMap.swift; sourceTree = ""; }; - 8FF027466542135796C1C996E649E15A /* StellarPassphrase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StellarPassphrase.swift; path = Sources/Generated/Enums/StellarPassphrase.swift; sourceTree = ""; }; - 90146CC5EFF9A29A6EC2082EFB787951 /* HDVersion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HDVersion.swift; path = Sources/Generated/Enums/HDVersion.swift; sourceTree = ""; }; - 90C5B348B6AEF95161AE17A57698C992 /* source_context.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = source_context.pb.swift; path = Sources/SwiftProtobuf/source_context.pb.swift; sourceTree = ""; }; - 91089210F4F0602D96AEA02FD1900BD8 /* Bitcoin.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bitcoin.pb.swift; path = Sources/Generated/Protobuf/Bitcoin.pb.swift; sourceTree = ""; }; - 910F79E12AF23ABA664E11A6DA26F0A0 /* ResourceBundle-Kingfisher-Kingfisher-iOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-Kingfisher-Kingfisher-iOS-Info.plist"; sourceTree = ""; }; - 910FEDDBD72574C6249A10EB0941D7C5 /* TWNervosAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWNervosAddress.h; path = include/TrustWalletCore/TWNervosAddress.h; sourceTree = ""; }; - 912A5F4E13FFDB1560A2716409B2A394 /* THORChainSwap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = THORChainSwap.swift; path = Sources/Generated/THORChainSwap.swift; sourceTree = ""; }; - 9170CB305C589344477565CB0CE92809 /* Zilliqa.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zilliqa.pb.swift; path = Sources/Generated/Protobuf/Zilliqa.pb.swift; sourceTree = ""; }; - 923253720A7EAEE48C4EAA35D4C9558C /* TWEthereumMessageSigner.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWEthereumMessageSigner.h; path = include/TrustWalletCore/TWEthereumMessageSigner.h; sourceTree = ""; }; - 9278BD31E7B1D297ECE838F10291E4E5 /* AnySigner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnySigner.swift; path = Sources/AnySigner.swift; sourceTree = ""; }; - 932D38DB63D551DA0601B2CA780AAF45 /* GroestlcoinAddress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroestlcoinAddress.swift; path = Sources/Generated/GroestlcoinAddress.swift; sourceTree = ""; }; - 93396CE20DA4FC01C1606D079DA3E362 /* Kingfisher-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Kingfisher-iOS.modulemap"; sourceTree = ""; }; - 93CE734EFDA99626A19F3559E42C1274 /* Base58.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Base58.swift; path = Sources/Generated/Base58.swift; sourceTree = ""; }; - 9503FFEB0900749ABC5B06ACBC0AD3E2 /* TWHDWallet.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWHDWallet.h; path = include/TrustWalletCore/TWHDWallet.h; sourceTree = ""; }; - 9537468CF4D5C16DB31E0F967000827C /* Kingfisher.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Kingfisher.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9569F26AB766917EE6CF7BB561241439 /* TWNULSProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWNULSProto.h; path = include/TrustWalletCore/TWNULSProto.h; sourceTree = ""; }; - 95724038B225C802D5E5B24C41F29CD0 /* JSONEncodingError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodingError.swift; path = Sources/SwiftProtobuf/JSONEncodingError.swift; sourceTree = ""; }; - 95BAA53196A79D500C92AFCCDED26039 /* Pods-Tokenary */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-Tokenary"; path = Pods_Tokenary.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 96162B21DA75C0CB210F3FC177DB6DFE /* Binance.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Binance.pb.swift; path = Sources/Generated/Protobuf/Binance.pb.swift; sourceTree = ""; }; - 985063CF25F026FD329CB9B4D9F3E0A6 /* Pods-Tokenary iOS */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-Tokenary iOS"; path = Pods_Tokenary_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 993C856FBB41BAA25BA0C3462D14CD58 /* TWCoinTypeConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWCoinTypeConfiguration.h; path = include/TrustWalletCore/TWCoinTypeConfiguration.h; sourceTree = ""; }; - 9950FB5AA58FBB836C49BBF432A0F3FB /* TWAnySigner.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWAnySigner.h; path = include/TrustWalletCore/TWAnySigner.h; sourceTree = ""; }; - 9A72A27DE702C7D6F4549B27EBAD19AB /* CPListItem+Kingfisher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CPListItem+Kingfisher.swift"; path = "Sources/Extensions/CPListItem+Kingfisher.swift"; sourceTree = ""; }; - 9B62FEE0A024A32D47490F7376A84215 /* TWFilecoinAddressConverter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWFilecoinAddressConverter.h; path = include/TrustWalletCore/TWFilecoinAddressConverter.h; sourceTree = ""; }; - 9CDE66CAB35FCDF8F8FE96AD900A6B25 /* SS58AddressType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SS58AddressType.swift; path = Sources/Generated/Enums/SS58AddressType.swift; sourceTree = ""; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9DA28D27CE4CDA760D691469B73855B5 /* Comparable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Comparable.swift; path = Sources/Comparable.swift; sourceTree = ""; }; - 9DE5011464A84FEA139058BA0473F966 /* TWEthereumAbiValue.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWEthereumAbiValue.h; path = include/TrustWalletCore/TWEthereumAbiValue.h; sourceTree = ""; }; - 9E1546D69D5F2CAF17A226475A18B58F /* DoubleParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DoubleParser.swift; path = Sources/SwiftProtobuf/DoubleParser.swift; sourceTree = ""; }; - 9E4218178771B8858487124793820486 /* ProtobufAPIVersionCheck.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ProtobufAPIVersionCheck.swift; path = Sources/SwiftProtobuf/ProtobufAPIVersionCheck.swift; sourceTree = ""; }; - 9EF47005622E8E512CDAF13AE70A944B /* HDVersion+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "HDVersion+Extension.swift"; path = "Sources/Generated/HDVersion+Extension.swift"; sourceTree = ""; }; - 9FF55D8C6335E8874725734EB504BA0C /* TimeUtils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TimeUtils.swift; path = Sources/SwiftProtobuf/TimeUtils.swift; sourceTree = ""; }; - A022661FF56B9080175E4CAB4758183D /* Data Conversion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data Conversion.swift"; path = "Sources/Data Conversion.swift"; sourceTree = ""; }; - A0516AF1CF82BF55913E5A715CBA737F /* LiquidStaking.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LiquidStaking.swift; path = Sources/Generated/LiquidStaking.swift; sourceTree = ""; }; - A11BAE5E8F998ADA63E63DE60486B6DF /* TransactionCompiler.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransactionCompiler.pb.swift; path = Sources/Generated/Protobuf/TransactionCompiler.pb.swift; sourceTree = ""; }; - A16B9F4FFDF3A24F7F14E1E5FAC217F7 /* TWFilecoinAddressType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWFilecoinAddressType.h; path = include/TrustWalletCore/TWFilecoinAddressType.h; sourceTree = ""; }; - A1B9B7B66E157DA1707A97B9B4DF8570 /* TWEthereumChainID.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWEthereumChainID.h; path = include/TrustWalletCore/TWEthereumChainID.h; sourceTree = ""; }; - A201934B5C9F7B9A30181A50A97F5906 /* TWEverscaleProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWEverscaleProto.h; path = include/TrustWalletCore/TWEverscaleProto.h; sourceTree = ""; }; - A22E3F85014372A714A65F1A82064D4F /* TWNebulasProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWNebulasProto.h; path = include/TrustWalletCore/TWNebulasProto.h; sourceTree = ""; }; - A247AD0A96589E0F1299D871972FA037 /* TronMessageSigner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TronMessageSigner.swift; path = Sources/Generated/TronMessageSigner.swift; sourceTree = ""; }; - A25DCFAA20CE6EE261D6AE35172B8014 /* SwiftProtobuf-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SwiftProtobuf-macOS.release.xcconfig"; path = "../SwiftProtobuf-macOS/SwiftProtobuf-macOS.release.xcconfig"; sourceTree = ""; }; - A2ED4E67C1F930F40BFB763C9EBA9DBE /* TWIOSTProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWIOSTProto.h; path = include/TrustWalletCore/TWIOSTProto.h; sourceTree = ""; }; - A302209356A00095DC4D7D624AD9D031 /* TWEthereumAbiProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWEthereumAbiProto.h; path = include/TrustWalletCore/TWEthereumAbiProto.h; sourceTree = ""; }; - A51BA1BBBE35D62921371714A0854CFC /* TWWavesProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWWavesProto.h; path = include/TrustWalletCore/TWWavesProto.h; sourceTree = ""; }; - A5BA138568C7C92D1A2CFCFE08F64BEC /* Sui.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sui.pb.swift; path = Sources/Generated/Protobuf/Sui.pb.swift; sourceTree = ""; }; - A5EBE6AE0D7BD0F4C3FA15F952DB8DF6 /* Pods-Tokenary iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-Tokenary iOS.modulemap"; sourceTree = ""; }; - A5ECA8E299B8C244AA6848A7EB6BC761 /* FilecoinAddressType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FilecoinAddressType.swift; path = Sources/Generated/Enums/FilecoinAddressType.swift; sourceTree = ""; }; - A732EE7CA8D337F3C569664B7F178300 /* TrustWalletCore-iOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "TrustWalletCore-iOS-Info.plist"; sourceTree = ""; }; - A73C6AB7BA99B976057BB8C7247904E9 /* Icon.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Icon.pb.swift; path = Sources/Generated/Protobuf/Icon.pb.swift; sourceTree = ""; }; - A79E053CDC7BAF20105F35325F64A81E /* RedirectHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RedirectHandler.swift; path = Sources/Networking/RedirectHandler.swift; sourceTree = ""; }; - A7C0BA2294F6EA8BF8D186D68963FB55 /* Kingfisher-iOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Kingfisher-iOS-Info.plist"; sourceTree = ""; }; - A842F59040F4ECA334A99E5AE36D1CF5 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; }; - A8C90350789E192BA11EB3D792F4C568 /* Decoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Decoder.swift; path = Sources/SwiftProtobuf/Decoder.swift; sourceTree = ""; }; - AA1C093DCEC99DD364F6C0DC1343154F /* Tron+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Tron+Proto.swift"; path = "Sources/Generated/Protobuf/Tron+Proto.swift"; sourceTree = ""; }; - ABFE41AC94FB9C0C623518E14769DE3C /* TWDataVector.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWDataVector.h; path = include/TrustWalletCore/TWDataVector.h; sourceTree = ""; }; - AC2D594919426C8103AAC0B31D1912B1 /* THORChainSwap+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "THORChainSwap+Proto.swift"; path = "Sources/Generated/Protobuf/THORChainSwap+Proto.swift"; sourceTree = ""; }; - AC3757D8648FEA103B3848822088E9BC /* Utxo.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Utxo.pb.swift; path = Sources/Generated/Protobuf/Utxo.pb.swift; sourceTree = ""; }; - AC60B4B774C8FDDC5BFDF7A2BAE25D88 /* SwiftProtobuf-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "SwiftProtobuf-macOS.modulemap"; path = "../SwiftProtobuf-macOS/SwiftProtobuf-macOS.modulemap"; sourceTree = ""; }; - AC6D8D24033F0CEE089DD3B0E9A4EFF9 /* Common.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Common.pb.swift; path = Sources/Generated/Protobuf/Common.pb.swift; sourceTree = ""; }; - AC701DF09C9E06CA7D9517F92023D14C /* TWCardano.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWCardano.h; path = include/TrustWalletCore/TWCardano.h; sourceTree = ""; }; - AD1BBF528E3DA56648A1DC964C83773B /* Varint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Varint.swift; path = Sources/SwiftProtobuf/Varint.swift; sourceTree = ""; }; - AD8F695F6839DB10326BD70CA74ACABD /* TWBitcoinProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBitcoinProto.h; path = include/TrustWalletCore/TWBitcoinProto.h; sourceTree = ""; }; - ADA70292123B0F8EB42A41EFB046CDD7 /* TWStellarPassphrase.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWStellarPassphrase.h; path = include/TrustWalletCore/TWStellarPassphrase.h; sourceTree = ""; }; - AE192A4884D18DA7A597BA774031EF00 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Sources/Utility/Result.swift; sourceTree = ""; }; - AE3A26F9188FB213D66358D4EBDFEBD6 /* TWPrivateKey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWPrivateKey.h; path = include/TrustWalletCore/TWPrivateKey.h; sourceTree = ""; }; - AF047CF67D4C5EE1611FB5CC926A88B8 /* TWTronProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWTronProto.h; path = include/TrustWalletCore/TWTronProto.h; sourceTree = ""; }; - AF1011675B3FC98E8AFCF71BBF5C1693 /* TheOpenNetwork+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "TheOpenNetwork+Proto.swift"; path = "Sources/Generated/Protobuf/TheOpenNetwork+Proto.swift"; sourceTree = ""; }; - AF1FE8FD9DEEB30FFB056435CADD4543 /* Common+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Common+Proto.swift"; path = "Sources/Generated/Protobuf/Common+Proto.swift"; sourceTree = ""; }; - B0D798A41A25E9EB9A2CAB7EF7612392 /* Kingfisher-macOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "Kingfisher-macOS-Info.plist"; path = "../Kingfisher-macOS/Kingfisher-macOS-Info.plist"; sourceTree = ""; }; - B0E45F829A2F6E68818572967D91E4A1 /* TWCardano.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TWCardano.swift; path = Sources/TWCardano.swift; sourceTree = ""; }; - B242B045BD1A542445B3993708D671C5 /* TWLiquidStaking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWLiquidStaking.h; path = include/TrustWalletCore/TWLiquidStaking.h; sourceTree = ""; }; - B3479A3217066A19B2638C8216B9770C /* Bitwise Ops.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bitwise Ops.swift"; path = "Sources/Bitwise Ops.swift"; sourceTree = ""; }; - B3A6D5A6AFB14F549189C4D2455C4B7F /* TWString.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TWString.swift; path = Sources/TWString.swift; sourceTree = ""; }; - B4A4AC094E72C6670E83472EB987FBDC /* TWEthereum.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWEthereum.h; path = include/TrustWalletCore/TWEthereum.h; sourceTree = ""; }; - B4A5EE9966F24D6E13183AB23662F708 /* TWZilliqaProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWZilliqaProto.h; path = include/TrustWalletCore/TWZilliqaProto.h; sourceTree = ""; }; - B4FDD0D0E2BFB68A5ADDFEA3DC752350 /* Source.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Source.swift; path = Sources/General/ImageSource/Source.swift; sourceTree = ""; }; - B54F9E1433261C9DCFF935AAB1A25984 /* Everscale+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Everscale+Proto.swift"; path = "Sources/Generated/Protobuf/Everscale+Proto.swift"; sourceTree = ""; }; - B56D7C16C0B60B5A6C967C3B0C661AAF /* Waves+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Waves+Proto.swift"; path = "Sources/Generated/Protobuf/Waves+Proto.swift"; sourceTree = ""; }; - B5991DD00FFD8600C5D6FEE044B86C80 /* NSTextAttachment+Kingfisher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSTextAttachment+Kingfisher.swift"; path = "Sources/Extensions/NSTextAttachment+Kingfisher.swift"; sourceTree = ""; }; - B5A54E93E0197855B585F5721CBB6E3B /* Kingfisher-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Kingfisher-iOS.debug.xcconfig"; sourceTree = ""; }; - B5A7D32EE5D6F77DF2F73B856171C0C1 /* Kingfisher-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Kingfisher-macOS.debug.xcconfig"; path = "../Kingfisher-macOS/Kingfisher-macOS.debug.xcconfig"; sourceTree = ""; }; - B5F137CB38313890F0CDC781B466C3B6 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Image/Filter.swift; sourceTree = ""; }; - B6AD1E0FF5895F3741DD1E5038EFE1C9 /* Data+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Extensions.swift"; path = "Sources/SwiftProtobuf/Data+Extensions.swift"; sourceTree = ""; }; - B72E5AA17ABFA95C39678336F43F2B33 /* Decred+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Decred+Proto.swift"; path = "Sources/Generated/Protobuf/Decred+Proto.swift"; sourceTree = ""; }; - B757EE5C007ECF51A7987A6307CB9503 /* EthereumAbi.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumAbi.swift; path = Sources/Generated/EthereumAbi.swift; sourceTree = ""; }; - B7CE1301BCB66F40CE8196CAB3F24EA3 /* GraphicsContext.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GraphicsContext.swift; path = Sources/Image/GraphicsContext.swift; sourceTree = ""; }; - B7E33D0260C00CA2D756156684831BC2 /* Data+Hex.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Hex.swift"; path = "Sources/Extensions/Data+Hex.swift"; sourceTree = ""; }; - B7FC5C68B02094F1AAB56B0EA7FB5AEF /* TVMonogramView+Kingfisher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "TVMonogramView+Kingfisher.swift"; path = "Sources/Extensions/TVMonogramView+Kingfisher.swift"; sourceTree = ""; }; - B881AAEFF827D3C55C495A77E1CB5516 /* EthereumAbi+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "EthereumAbi+Proto.swift"; path = "Sources/Generated/Protobuf/EthereumAbi+Proto.swift"; sourceTree = ""; }; - B9288637E310976581EB191445117591 /* KingfisherOptionsInfo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KingfisherOptionsInfo.swift; path = Sources/General/KingfisherOptionsInfo.swift; sourceTree = ""; }; - BA05E6FABD933FE88AE74B6F611DBF2E /* TWIconProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWIconProto.h; path = include/TrustWalletCore/TWIconProto.h; sourceTree = ""; }; - BA10C0DDDA0BEABF5BFCCF97CB47F841 /* HDWallet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HDWallet.swift; path = Sources/Generated/HDWallet.swift; sourceTree = ""; }; - BA1D3FEE26E2A5122BAD317D565B4820 /* TWEthereumAbiFunction.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWEthereumAbiFunction.h; path = include/TrustWalletCore/TWEthereumAbiFunction.h; sourceTree = ""; }; - BAA8199DC1571D84E4679E0F32C669E5 /* Account.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Account.swift; path = Sources/Generated/Account.swift; sourceTree = ""; }; - BACEE9ED175755B9BDF245B1B2DC280D /* Blockchain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Blockchain.swift; path = Sources/Generated/Enums/Blockchain.swift; sourceTree = ""; }; - BB2D50DDF9382E5F874EDDFFCD764AD9 /* HashVisitor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HashVisitor.swift; path = Sources/SwiftProtobuf/HashVisitor.swift; sourceTree = ""; }; - BB3151674830695AD98ACEF0182C28B5 /* TWBlockchain.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBlockchain.h; path = include/TrustWalletCore/TWBlockchain.h; sourceTree = ""; }; - BCA2D123643021357A6002D71F4374FE /* Zilliqa+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zilliqa+Proto.swift"; path = "Sources/Generated/Protobuf/Zilliqa+Proto.swift"; sourceTree = ""; }; - BCD880101532C37B5963A31C4E6C6B48 /* TWDerivationPath.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWDerivationPath.h; path = include/TrustWalletCore/TWDerivationPath.h; sourceTree = ""; }; - BD391FEA8F7F1694ECFD478154C8E3DB /* BinaryDelimited.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDelimited.swift; path = Sources/SwiftProtobuf/BinaryDelimited.swift; sourceTree = ""; }; - BD7E218AAA978568DF29A6653DBA30E7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - BDDC146350E08D667CAC39E090C75C2D /* KFImageOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KFImageOptions.swift; path = Sources/SwiftUI/KFImageOptions.swift; sourceTree = ""; }; - BE801000FD5DF98D88CAE1E3157A3CBC /* TWIoTeXProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWIoTeXProto.h; path = include/TrustWalletCore/TWIoTeXProto.h; sourceTree = ""; }; - BF743E4F94135DCD94F75FA4B4958584 /* Nano.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Nano.pb.swift; path = Sources/Generated/Protobuf/Nano.pb.swift; sourceTree = ""; }; - BFB725051CBCCAA34C651013E0A4D09C /* TrustWalletCore-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "TrustWalletCore-macOS-prefix.pch"; path = "../TrustWalletCore-macOS/TrustWalletCore-macOS-prefix.pch"; sourceTree = ""; }; - BFFB82C52A4C2622214088703B3D4AFE /* Pods-Tokenary-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Tokenary-frameworks.sh"; sourceTree = ""; }; - C12707ED03FD5BDBAEE5061FDA5D8115 /* Stellar+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Stellar+Proto.swift"; path = "Sources/Generated/Protobuf/Stellar+Proto.swift"; sourceTree = ""; }; - C258B90CEF2C67C03AC715D80EFBD761 /* TWNervosProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWNervosProto.h; path = include/TrustWalletCore/TWNervosProto.h; sourceTree = ""; }; - C26BF9BC8A9CDD8E46E1F5B8E582783C /* SecRandom.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SecRandom.m; path = Sources/SecRandom.m; sourceTree = ""; }; - C2DB32119B22835AF16B536AC949A967 /* TWPolkadotProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWPolkadotProto.h; path = include/TrustWalletCore/TWPolkadotProto.h; sourceTree = ""; }; - C370BFDC01F7A74A137ADE4007BE750D /* Codable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Codable.swift; path = Sources/Codable.swift; sourceTree = ""; }; - C3E2C62A6E668C9FF46C28B4CEF01399 /* Barz+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Barz+Proto.swift"; path = "Sources/Generated/Protobuf/Barz+Proto.swift"; sourceTree = ""; }; - C41145FF94EEB0FA964BB9D404F1B5F9 /* TWBitcoinFee.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBitcoinFee.h; path = include/TrustWalletCore/TWBitcoinFee.h; sourceTree = ""; }; - C4385282B45988556A472090C286D620 /* Algorand.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Algorand.pb.swift; path = Sources/Generated/Protobuf/Algorand.pb.swift; sourceTree = ""; }; - C46846A6B6844EA75D4B73021ACB0CEE /* Kingfisher-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Kingfisher-iOS.release.xcconfig"; sourceTree = ""; }; - C4853560BBBA31D1D64F4BE6BD468A7A /* RequestModifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestModifier.swift; path = Sources/Networking/RequestModifier.swift; sourceTree = ""; }; - C497A825F0F288655644A67DF63C8D62 /* TWCardanoProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWCardanoProto.h; path = include/TrustWalletCore/TWCardanoProto.h; sourceTree = ""; }; - C58EC158C1155FAAB6CED0C211D5DCF8 /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Random.swift; path = Sources/Random.swift; sourceTree = ""; }; - C5BFC00410F341D246BEEB142DBC239B /* Stellar.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stellar.pb.swift; path = Sources/Generated/Protobuf/Stellar.pb.swift; sourceTree = ""; }; - C5D6A42F362A7212C10CC5517CA43DBB /* Kingfisher-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "Kingfisher-macOS-dummy.m"; path = "../Kingfisher-macOS/Kingfisher-macOS-dummy.m"; sourceTree = ""; }; - C63EEC03E8DF0127878414DD44F7EB2D /* Account+Codable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Account+Codable.swift"; path = "Sources/Extensions/Account+Codable.swift"; sourceTree = ""; }; - C66B95942F55CE08405B50757A9A3583 /* Pods-Tokenary iOS-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Tokenary iOS-acknowledgements.markdown"; sourceTree = ""; }; - C6A741BE90701364C1E97801F6B25322 /* Pods-Tokenary-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Tokenary-acknowledgements.plist"; sourceTree = ""; }; - C7616CBC03A662AC42CF93AE82997068 /* TWSuiProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWSuiProto.h; path = include/TrustWalletCore/TWSuiProto.h; sourceTree = ""; }; - C76262F5326D0DEAC0325217E2CA6627 /* TWFilecoinProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWFilecoinProto.h; path = include/TrustWalletCore/TWFilecoinProto.h; sourceTree = ""; }; - C76E63722BC023380717327F514F75B1 /* JSONDecodingError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONDecodingError.swift; path = Sources/SwiftProtobuf/JSONDecodingError.swift; sourceTree = ""; }; - C7848F8E0AB945162099F90633F81690 /* BinaryDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDecoder.swift; path = Sources/SwiftProtobuf/BinaryDecoder.swift; sourceTree = ""; }; - C8F05D0A750849560AD9434D75C7198E /* Aeternity+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Aeternity+Proto.swift"; path = "Sources/Generated/Protobuf/Aeternity+Proto.swift"; sourceTree = ""; }; - C9E3D989D91EBC53D874232F839B4A9C /* TWDecredProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWDecredProto.h; path = include/TrustWalletCore/TWDecredProto.h; sourceTree = ""; }; - C9E6495281D0E9AC3575EEB5FB1C3EAD /* Waves.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Waves.pb.swift; path = Sources/Generated/Protobuf/Waves.pb.swift; sourceTree = ""; }; - CA31FF7CD8C8401984CDD24437CAAB76 /* Hash.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Hash.swift; path = Sources/Generated/Hash.swift; sourceTree = ""; }; - CA50D7F1E73FE4A516647985741C26A8 /* SwiftProtobuf-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "SwiftProtobuf-macOS-dummy.m"; path = "../SwiftProtobuf-macOS/SwiftProtobuf-macOS-dummy.m"; sourceTree = ""; }; - CAA7AEFEA5DF4E03E0AEF3C931C0B207 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Accelerate.framework; sourceTree = DEVELOPER_DIR; }; - CAF9C6F39102C871BFAA9E9C84F5BE4B /* TWOntologyProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWOntologyProto.h; path = include/TrustWalletCore/TWOntologyProto.h; sourceTree = ""; }; - CB18C1C68A595FB6DA0B6DCC68A655C2 /* Message+JSONAdditions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Message+JSONAdditions.swift"; path = "Sources/SwiftProtobuf/Message+JSONAdditions.swift"; sourceTree = ""; }; - CB7508A0E862687EFE674FE0E37DEF75 /* Nervos+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Nervos+Proto.swift"; path = "Sources/Generated/Protobuf/Nervos+Proto.swift"; sourceTree = ""; }; - CB7F62F979DF2D5A4EF5507EFB433843 /* Barz.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Barz.pb.swift; path = Sources/Generated/Protobuf/Barz.pb.swift; sourceTree = ""; }; - CC2B9F105E3156CE2447EA81037C1B0F /* TrustWalletCore-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "TrustWalletCore-iOS.modulemap"; sourceTree = ""; }; - CC8AB8A06C292D26EE4D4A11FA5FF3EC /* JSONDecodingOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONDecodingOptions.swift; path = Sources/SwiftProtobuf/JSONDecodingOptions.swift; sourceTree = ""; }; - CDB6E8FBBC079A910F15FC78DCE5399E /* Pods-Tokenary-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Tokenary-dummy.m"; sourceTree = ""; }; - CDBFB272E5E82E1411EBC2CCD0E12155 /* TWSS58AddressType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWSS58AddressType.h; path = include/TrustWalletCore/TWSS58AddressType.h; sourceTree = ""; }; - CDC31531743A524B032477A4828A7D53 /* TWNimiqProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWNimiqProto.h; path = include/TrustWalletCore/TWNimiqProto.h; sourceTree = ""; }; - CE42F079ED4CF8CFA9C12444B1CB5C87 /* Hedera.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Hedera.pb.swift; path = Sources/Generated/Protobuf/Hedera.pb.swift; sourceTree = ""; }; - D008E080F72C1CD5CEC40E098C9B274E /* SwiftProtobuf-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "SwiftProtobuf-macOS.debug.xcconfig"; path = "../SwiftProtobuf-macOS/SwiftProtobuf-macOS.debug.xcconfig"; sourceTree = ""; }; - D009038B8154F126496AD472961F904B /* BigInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BigInt.swift; path = Sources/BigInt.swift; sourceTree = ""; }; - D1C727651BC16D0B0D8FFD7C559A0B61 /* Ontology.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Ontology.pb.swift; path = Sources/Generated/Protobuf/Ontology.pb.swift; sourceTree = ""; }; - D2DD4129539BBDCE9682F2E3B3EBD0E1 /* Kingfisher-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Kingfisher-iOS-prefix.pch"; sourceTree = ""; }; - D304A4B15F992738B9FE6FF5F41C1120 /* Sui+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Sui+Proto.swift"; path = "Sources/Generated/Protobuf/Sui+Proto.swift"; sourceTree = ""; }; - D3F52A45C5C80C8CD48299B8B9F00A5F /* TWPublicKeyType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWPublicKeyType.h; path = include/TrustWalletCore/TWPublicKeyType.h; sourceTree = ""; }; - D458B1D164B5324CD308686DF5023E94 /* GCD.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GCD.swift; path = Sources/GCD.swift; sourceTree = ""; }; - D47EBA8BD5C102BD72B3A7BCD84B9DA4 /* TWBitcoinScript.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBitcoinScript.h; path = include/TrustWalletCore/TWBitcoinScript.h; sourceTree = ""; }; - D4FFD051C251EFC1A510196800AD75D5 /* ImageDrawing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageDrawing.swift; path = Sources/Image/ImageDrawing.swift; sourceTree = ""; }; - D51D8DDBE6FBDB9BFF593D642A2864F2 /* duration.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = duration.pb.swift; path = Sources/SwiftProtobuf/duration.pb.swift; sourceTree = ""; }; - D5744FFD4E3E63605DAC77CC8B4CEC18 /* Tezos.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Tezos.pb.swift; path = Sources/Generated/Protobuf/Tezos.pb.swift; sourceTree = ""; }; - D574CD9AA95787BAE0984A508099F91A /* Aptos+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Aptos+Proto.swift"; path = "Sources/Generated/Protobuf/Aptos+Proto.swift"; sourceTree = ""; }; - D600B12007BA37EEBB2E3A08DF5458F8 /* TWAccount.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWAccount.h; path = include/TrustWalletCore/TWAccount.h; sourceTree = ""; }; - D75BB3D33AB861634FA10CFA04E56333 /* Pods-Tokenary iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Tokenary iOS.debug.xcconfig"; sourceTree = ""; }; - D77F8AE6372DDF824D7B123AEE98EFF5 /* TrustWalletCore-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "TrustWalletCore-macOS-umbrella.h"; path = "../TrustWalletCore-macOS/TrustWalletCore-macOS-umbrella.h"; sourceTree = ""; }; - D78D407747D8005F8138C4E32FACF0D7 /* JSONEncodingOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodingOptions.swift; path = Sources/SwiftProtobuf/JSONEncodingOptions.swift; sourceTree = ""; }; - D81702FD9A3E32F2A582309FF30EA3AF /* ZigZag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZigZag.swift; path = Sources/SwiftProtobuf/ZigZag.swift; sourceTree = ""; }; - D89BD6C5B8B5AA05B2554E7A26093B7C /* TWAsnParser.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWAsnParser.h; path = include/TrustWalletCore/TWAsnParser.h; sourceTree = ""; }; - D8B8E71487737D810614FF0298F95C13 /* IoTeX+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "IoTeX+Proto.swift"; path = "Sources/Generated/Protobuf/IoTeX+Proto.swift"; sourceTree = ""; }; - D8CBDEF9B0EB359E8FD0F5FA8C86428A /* Kingfisher-iOS-Kingfisher */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "Kingfisher-iOS-Kingfisher"; path = Kingfisher.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - D900453DC4867A6FC049C688DF4CE413 /* Pods-Tokenary iOS-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Tokenary iOS-frameworks.sh"; sourceTree = ""; }; - D96702779FB41560EBEB18E94B0F47E7 /* TWBase.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBase.h; path = include/TrustWalletCore/TWBase.h; sourceTree = ""; }; - D99BD4E02C7EB8A65D457D1285ADB905 /* PrivateKeyType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrivateKeyType.swift; path = Sources/Generated/Enums/PrivateKeyType.swift; sourceTree = ""; }; - D9CFA4A4340A997744FA24D41F11B266 /* Ripple+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Ripple+Proto.swift"; path = "Sources/Generated/Protobuf/Ripple+Proto.swift"; sourceTree = ""; }; - D9DC3491FFD77D87118FD764798BA62A /* any.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = any.pb.swift; path = Sources/SwiftProtobuf/any.pb.swift; sourceTree = ""; }; - DA0D76D75214B59A126E49C6EC93BDB2 /* Mnemonic+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Mnemonic+Extension.swift"; path = "Sources/Extensions/Mnemonic+Extension.swift"; sourceTree = ""; }; - DA20092DBF43DB8CCE2322C5E4ED2950 /* Aptos.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Aptos.pb.swift; path = Sources/Generated/Protobuf/Aptos.pb.swift; sourceTree = ""; }; - DA76E597BDAF4804577A3E813C43A506 /* TWEthereumRlp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWEthereumRlp.h; path = include/TrustWalletCore/TWEthereumRlp.h; sourceTree = ""; }; - DB225B5FE5781FF966C8C41D7094ABC2 /* BigInt-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "BigInt-iOS.release.xcconfig"; sourceTree = ""; }; - DB475367F16A82A29D8B1F3A0314EA8E /* SwiftProtobuf-macOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "SwiftProtobuf-macOS-prefix.pch"; path = "../SwiftProtobuf-macOS/SwiftProtobuf-macOS-prefix.pch"; sourceTree = ""; }; - DB8A11D58DEE8F5651A83854BD0AB9B9 /* TrustWalletCore-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TrustWalletCore-iOS-prefix.pch"; sourceTree = ""; }; - DBDFEAA37C01F8B03800500746BE26E1 /* TrustWalletCore-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "TrustWalletCore-macOS.modulemap"; path = "../TrustWalletCore-macOS/TrustWalletCore-macOS.modulemap"; sourceTree = ""; }; - DC5A4966727F266DA89586C51E7A5B82 /* EthereumRlp.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumRlp.swift; path = Sources/Generated/EthereumRlp.swift; sourceTree = ""; }; - DC658E731F79F058F6303160A319D473 /* EthereumAbiValue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumAbiValue.swift; path = Sources/Generated/EthereumAbiValue.swift; sourceTree = ""; }; - DCEEE315830FE4302666A00152CC31A9 /* JSONDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONDecoder.swift; path = Sources/SwiftProtobuf/JSONDecoder.swift; sourceTree = ""; }; - DCF6D3F6BD6E796A62491080ECC096D8 /* NULS.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NULS.pb.swift; path = Sources/Generated/Protobuf/NULS.pb.swift; sourceTree = ""; }; - DCFE61E19E75EEF0E487755BC3FC3821 /* GIFAnimatedImage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GIFAnimatedImage.swift; path = Sources/Image/GIFAnimatedImage.swift; sourceTree = ""; }; - DD05E192AE16FDBC2AD332533D18466F /* Wallet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Wallet.swift; path = Sources/Wallet.swift; sourceTree = ""; }; - DD8E2CF966BAECD47C86B309C16F3D4A /* Google_Protobuf_NullValue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Google_Protobuf_NullValue+Extensions.swift"; path = "Sources/SwiftProtobuf/Google_Protobuf_NullValue+Extensions.swift"; sourceTree = ""; }; - DDAA57CEFD7A7AFC8744CDCEBF92CF26 /* KFImageProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KFImageProtocol.swift; path = Sources/SwiftUI/KFImageProtocol.swift; sourceTree = ""; }; - DE4099911825248EF5F4348826B1602F /* TWNEARProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWNEARProto.h; path = include/TrustWalletCore/TWNEARProto.h; sourceTree = ""; }; - DE9FD122C74103F42AC0F3AF16365429 /* EthereumRlp.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumRlp.pb.swift; path = Sources/Generated/Protobuf/EthereumRlp.pb.swift; sourceTree = ""; }; - DFC8A0852EA83A05E870AA4B7BAA4304 /* Visitor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Visitor.swift; path = Sources/SwiftProtobuf/Visitor.swift; sourceTree = ""; }; - DFEF16E1BA71D75FF45D346A390B0A85 /* Kingfisher-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "Kingfisher-macOS.modulemap"; path = "../Kingfisher-macOS/Kingfisher-macOS.modulemap"; sourceTree = ""; }; - E08D5B416ABA8C696EC71FD6B17BECCF /* AnyAddress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyAddress.swift; path = Sources/Generated/AnyAddress.swift; sourceTree = ""; }; - E0EA2FAA76548F4961F9FAC5A4A88B98 /* MathUtils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MathUtils.swift; path = Sources/SwiftProtobuf/MathUtils.swift; sourceTree = ""; }; - E12805B28BB706E5AE09D6668603522C /* KeyStore.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KeyStore.swift; path = Sources/KeyStore.swift; sourceTree = ""; }; - E238883C9985B02CCA03EF6EC98F394F /* UnknownStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UnknownStorage.swift; path = Sources/SwiftProtobuf/UnknownStorage.swift; sourceTree = ""; }; - E23DCBA704DB69643799A4F296305D03 /* StringUtils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StringUtils.swift; path = Sources/SwiftProtobuf/StringUtils.swift; sourceTree = ""; }; - E3214B869B27DDDD9D4B9820CA8F58C8 /* AES.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AES.swift; path = Sources/Generated/AES.swift; sourceTree = ""; }; - E333936D9B9CF3967A7950FFC908492E /* TWBase32.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBase32.h; path = include/TrustWalletCore/TWBase32.h; sourceTree = ""; }; - E48ECEA22C76D471E8C2CD6004AE4EAB /* BitcoinSigHashType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BitcoinSigHashType.swift; path = Sources/Generated/Enums/BitcoinSigHashType.swift; sourceTree = ""; }; - E4B0DFB19B2765A6B966DA33A1896C2B /* EOS.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EOS.pb.swift; path = Sources/Generated/Protobuf/EOS.pb.swift; sourceTree = ""; }; - E57BEF85A522E65DE3C8C21237C3F1A3 /* THORChainSwap.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = THORChainSwap.pb.swift; path = Sources/Generated/Protobuf/THORChainSwap.pb.swift; sourceTree = ""; }; - E601F85BF7C31E5CAED0909A081AFBA2 /* DerivationPathIndex.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DerivationPathIndex.swift; path = Sources/Generated/DerivationPathIndex.swift; sourceTree = ""; }; - E65F4372F4AFADD8E6F7EAA6997B05CC /* Pods-Tokenary iOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Tokenary iOS-Info.plist"; sourceTree = ""; }; - E6F901649F1F1E3E246F1D2AADFC43CD /* ExtensionFields.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExtensionFields.swift; path = Sources/SwiftProtobuf/ExtensionFields.swift; sourceTree = ""; }; - E708D2C176EE56185B1968BE06322B0D /* BigInt-macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = "BigInt-macOS.modulemap"; path = "../BigInt-macOS/BigInt-macOS.modulemap"; sourceTree = ""; }; - E73851AA06C56AE1FEAE9AB143291422 /* EthereumAbi.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EthereumAbi.pb.swift; path = Sources/Generated/Protobuf/EthereumAbi.pb.swift; sourceTree = ""; }; - E7CB5857BECCFF631803958E6E96A346 /* TWNanoProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWNanoProto.h; path = include/TrustWalletCore/TWNanoProto.h; sourceTree = ""; }; - E8E14EC9CDEB775F325A615ECCC2ACBF /* BigInt-macOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "BigInt-macOS-Info.plist"; path = "../BigInt-macOS/BigInt-macOS-Info.plist"; sourceTree = ""; }; - E955C0A5555D919B63B4EDA3D2AB067C /* Nimiq+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Nimiq+Proto.swift"; path = "Sources/Generated/Protobuf/Nimiq+Proto.swift"; sourceTree = ""; }; - EAECB0BE76113437487ADB52B7F2B3F9 /* BigInt-macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "BigInt-macOS-umbrella.h"; path = "../BigInt-macOS/BigInt-macOS-umbrella.h"; sourceTree = ""; }; - EB6BD5A749390FC806EC8A5FE2244EA9 /* JSONMapEncodingVisitor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONMapEncodingVisitor.swift; path = Sources/SwiftProtobuf/JSONMapEncodingVisitor.swift; sourceTree = ""; }; - EBB49DD5A438A326F2A3F3CB758ACC26 /* JSONEncodingVisitor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodingVisitor.swift; path = Sources/SwiftProtobuf/JSONEncodingVisitor.swift; sourceTree = ""; }; - EBC8B3F766C9E534385BF5B9CAD1504F /* TWEthereumProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWEthereumProto.h; path = include/TrustWalletCore/TWEthereumProto.h; sourceTree = ""; }; - EBE7CFB4F528B21B079FEDC9409CAFE4 /* ImageProgressive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageProgressive.swift; path = Sources/Image/ImageProgressive.swift; sourceTree = ""; }; - EC43C8573E234E59D2F4E3E73FA25CB0 /* Cardano+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Cardano+Proto.swift"; path = "Sources/Generated/Protobuf/Cardano+Proto.swift"; sourceTree = ""; }; - EC55B36E81CD31A719890ED6972B9D59 /* TWAlgorandProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWAlgorandProto.h; path = include/TrustWalletCore/TWAlgorandProto.h; sourceTree = ""; }; - EE1FD2D9F4D6550C4F7C662BF3A6798C /* BinaryDecodingError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDecodingError.swift; path = Sources/SwiftProtobuf/BinaryDecodingError.swift; sourceTree = ""; }; - EE5A5DF4A5764318378BE545367933E2 /* SimpleExtensionMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SimpleExtensionMap.swift; path = Sources/SwiftProtobuf/SimpleExtensionMap.swift; sourceTree = ""; }; - EF57BFFD3162D2B980770D0A406CFD34 /* KFImage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KFImage.swift; path = Sources/SwiftUI/KFImage.swift; sourceTree = ""; }; - EF68B8080F716B96A94474174AF96108 /* TWAES.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWAES.h; path = include/TrustWalletCore/TWAES.h; sourceTree = ""; }; - EF6A0DFC94DC5AB3FDA72BBD2609E432 /* Polkadot.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Polkadot.pb.swift; path = Sources/Generated/Protobuf/Polkadot.pb.swift; sourceTree = ""; }; - EF9A09D2880AFB578DB9E0853050647B /* Pods-Tokenary iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Tokenary iOS-umbrella.h"; sourceTree = ""; }; - EFEA13C1C2D5BA7DADF18D9E4FB2E0C2 /* TWFIOProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWFIOProto.h; path = include/TrustWalletCore/TWFIOProto.h; sourceTree = ""; }; - EFF83FE4668E7031BF6A5714F8A7791E /* StoredKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StoredKey.swift; path = Sources/Generated/StoredKey.swift; sourceTree = ""; }; - F0102F29CD7FAFC33F333D59421471DE /* Purpose.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Purpose.swift; path = Sources/Generated/Enums/Purpose.swift; sourceTree = ""; }; - F132AE6DB6D382838A013EC50E6F3E38 /* NEAR+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NEAR+Proto.swift"; path = "Sources/Generated/Protobuf/NEAR+Proto.swift"; sourceTree = ""; }; - F1F5519F4B87146A47383D368268E667 /* BinaryEncodingOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryEncodingOptions.swift; path = Sources/SwiftProtobuf/BinaryEncodingOptions.swift; sourceTree = ""; }; - F2C3A27FA603C119187AD4A1BBFD8F7B /* Curve.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Curve.swift; path = Sources/Generated/Enums/Curve.swift; sourceTree = ""; }; - F2FE5163FF67ABEE80F6B357370594B1 /* Image.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Image.swift; path = Sources/Image/Image.swift; sourceTree = ""; }; - F31C58C0BC905D0070DBFA500D239EED /* CustomJSONCodable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomJSONCodable.swift; path = Sources/SwiftProtobuf/CustomJSONCodable.swift; sourceTree = ""; }; - F36678441168BA9C38F90E2D9DD3E311 /* SwiftProtobuf-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "SwiftProtobuf-iOS.modulemap"; sourceTree = ""; }; - F36B486041210A661C5E0AE5ABC94B73 /* TransactionCompiler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransactionCompiler.swift; path = Sources/Generated/TransactionCompiler.swift; sourceTree = ""; }; - F3E0621221B49CBB46826033D3DEB84B /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F4068258E6EF294F076AFC67B2B92713 /* wrappers.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = wrappers.pb.swift; path = Sources/SwiftProtobuf/wrappers.pb.swift; sourceTree = ""; }; - F4176613D79D5BC5F00DB66414A35601 /* TWStellarVersionByte.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWStellarVersionByte.h; path = include/TrustWalletCore/TWStellarVersionByte.h; sourceTree = ""; }; - F42E070726C86BB7C5E60E3A0A6C5AC3 /* Polkadot+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Polkadot+Proto.swift"; path = "Sources/Generated/Protobuf/Polkadot+Proto.swift"; sourceTree = ""; }; - F50B712B248A10A0EAFD8ED60747F099 /* Oasis.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Oasis.pb.swift; path = Sources/Generated/Protobuf/Oasis.pb.swift; sourceTree = ""; }; - F5BFDE56CE91672F5F7ED3013C6EFC1F /* DerivationPath+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DerivationPath+Extension.swift"; path = "Sources/Extensions/DerivationPath+Extension.swift"; sourceTree = ""; }; - F5D7470038583B7116C04EF668F8AAE2 /* StarkExMessageSigner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StarkExMessageSigner.swift; path = Sources/Generated/StarkExMessageSigner.swift; sourceTree = ""; }; - F65C75408C457BD348AC5EB8EF159A98 /* ImageModifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageModifier.swift; path = Sources/Networking/ImageModifier.swift; sourceTree = ""; }; - F68D21332FD5A04A2A2EC76704BD57B6 /* TextFormatDecodingError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextFormatDecodingError.swift; path = Sources/SwiftProtobuf/TextFormatDecodingError.swift; sourceTree = ""; }; - F6B20CD1932CAB0ED77D30DB2B7FFFB7 /* SolanaAddress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SolanaAddress.swift; path = Sources/Generated/SolanaAddress.swift; sourceTree = ""; }; - F740D6B02F281E33B35E9E7AC427016E /* StellarMemoType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StellarMemoType.swift; path = Sources/Generated/Enums/StellarMemoType.swift; sourceTree = ""; }; - F86FEEBD6F89B9185BB390D9E9E136C6 /* MemoryStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MemoryStorage.swift; path = Sources/Cache/MemoryStorage.swift; sourceTree = ""; }; - F882B4988A6D219219D31C0F38028F0D /* TWSolanaAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWSolanaAddress.h; path = include/TrustWalletCore/TWSolanaAddress.h; sourceTree = ""; }; - F8E87126EE361122618FFE15CFA51C12 /* SwiftProtobuf-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SwiftProtobuf-iOS.release.xcconfig"; sourceTree = ""; }; - F91277E7ABFC9430D4AC99F3DF18C19B /* Filecoin+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Filecoin+Proto.swift"; path = "Sources/Generated/Protobuf/Filecoin+Proto.swift"; sourceTree = ""; }; - F929CD96AE82416D88639C5349B0F8DF /* TWBarzProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWBarzProto.h; path = include/TrustWalletCore/TWBarzProto.h; sourceTree = ""; }; - F96288B61E8FDA839F477E4E6E5B7912 /* TrustWalletCore-macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "TrustWalletCore-macOS-dummy.m"; path = "../TrustWalletCore-macOS/TrustWalletCore-macOS-dummy.m"; sourceTree = ""; }; - F9D979A6D100A301EABE1F1E2E9A58A8 /* Division.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Division.swift; path = Sources/Division.swift; sourceTree = ""; }; - FA6270A8BABBB26C50F3435BFB37BF7A /* Kingfisher-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Kingfisher-iOS-umbrella.h"; sourceTree = ""; }; - FADE8EDBBA797D0D38E086FD2E4A047C /* NULS+Proto.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NULS+Proto.swift"; path = "Sources/Generated/Protobuf/NULS+Proto.swift"; sourceTree = ""; }; - FB4427502F9D14C9BA0D97E37A0152B7 /* WireFormat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WireFormat.swift; path = Sources/SwiftProtobuf/WireFormat.swift; sourceTree = ""; }; - FB543B10EC028E43FEC119864BBC4A7D /* timestamp.pb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = timestamp.pb.swift; path = Sources/SwiftProtobuf/timestamp.pb.swift; sourceTree = ""; }; - FB9BC41F811D91E8457B049FB3BAD483 /* Kingfisher-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Kingfisher-iOS-dummy.m"; sourceTree = ""; }; - FC71AE8F0385A5FDE80EE316A2E8BA05 /* KingfisherManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KingfisherManager.swift; path = Sources/General/KingfisherManager.swift; sourceTree = ""; }; - FCD68B89B047C8C858D8A92AC01124EF /* TrustWalletCore-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "TrustWalletCore-macOS.debug.xcconfig"; path = "../TrustWalletCore-macOS/TrustWalletCore-macOS.debug.xcconfig"; sourceTree = ""; }; - FD44332A389096F1A8B05A00DE164D7F /* BigInt-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BigInt-iOS-dummy.m"; sourceTree = ""; }; - FD7CD145328B23220F48D8E84CC3CD82 /* Google_Protobuf_Timestamp+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Google_Protobuf_Timestamp+Extensions.swift"; path = "Sources/SwiftProtobuf/Google_Protobuf_Timestamp+Extensions.swift"; sourceTree = ""; }; - FECAF54D40D1473719E1C968E57BEAC7 /* TWTezosProto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TWTezosProto.h; path = include/TrustWalletCore/TWTezosProto.h; sourceTree = ""; }; - FEF87AB08D43D3CE238E19DD48FBFD15 /* String+MD5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+MD5.swift"; path = "Sources/Utility/String+MD5.swift"; sourceTree = ""; }; - FEFA44D6DA05BB5DE3483DD4C29D50DA /* Google_Protobuf_Any+Registry.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Google_Protobuf_Any+Registry.swift"; path = "Sources/SwiftProtobuf/Google_Protobuf_Any+Registry.swift"; sourceTree = ""; }; - FF604D64AF4BF89ED27A81E021E2B890 /* DiskStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DiskStorage.swift; path = Sources/Cache/DiskStorage.swift; sourceTree = ""; }; - FF7317094748576D7A29A024E61D5BCD /* BigInt-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BigInt-iOS-umbrella.h"; sourceTree = ""; }; - FFB0EB4FEB001355FAD0C330490CCB4A /* AsnParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsnParser.swift; path = Sources/Generated/AsnParser.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 43BE89B9A177D0DFDD7E3CCD275F71F8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4BF75EB7EA3D671A783A5A3AE47C2D28 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A5366940196C8BDFBEDE15DE192D8166 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4D8E03313B374036A678C33A5D72D7D0 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 230C4E0F2029085B58288AF7A4D7A49D /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5ADD0AEAA01EAAB7518BED62091DD8AF /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 0204BB53584970544BC0296B45C28C6B /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 60F370B0AC87A8DB786A896C86F76EB6 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3A6D33C2032E1011A25D2FE6AFA69AED /* Accelerate.framework in Frameworks */, - FD3F76A4C00D39CCFEE46AE4D336E35A /* CFNetwork.framework in Frameworks */, - 88707AD7625FD83B5EB94569BDDD6065 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6C1B7096411BCB5077FA9E34BF3CBDFB /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 65EF505BD87A8A6ACFCA295D047ABCDA /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8D1193D5565FDF4E920B2EEC8D777512 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - FA7AF7D052C02AF300CD2915C0525CE3 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 945ABB419AEFD873484B57BA749F5530 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C1C6D8A7DDE5BBCAC3DB8BE09757CCB2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 0D61E23B5A85FD479066C080A01BDA9F /* Accelerate.framework in Frameworks */, - 814BA59E24C4617CE991550C38E55D53 /* CFNetwork.framework in Frameworks */, - 401146F41C3B096653CF5DBE5E82D404 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D5CA893B60276474155111B744B76F54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 57BBFC8905453711FA32CDA21035E058 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E54A44C1AD16FC8F9A7341EA035DBB41 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BABFEC230C131E45643FB5A4697ABADD /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F59FDF0A0781E05136524ECD000226E0 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6C0EB6D7EC6003131E2BE864040CFB10 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 161C1A8E772FC1DDA824FE4855FFE551 /* Support Files */ = { - isa = PBXGroup; - children = ( - 93396CE20DA4FC01C1606D079DA3E362 /* Kingfisher-iOS.modulemap */, - FB9BC41F811D91E8457B049FB3BAD483 /* Kingfisher-iOS-dummy.m */, - A7C0BA2294F6EA8BF8D186D68963FB55 /* Kingfisher-iOS-Info.plist */, - D2DD4129539BBDCE9682F2E3B3EBD0E1 /* Kingfisher-iOS-prefix.pch */, - FA6270A8BABBB26C50F3435BFB37BF7A /* Kingfisher-iOS-umbrella.h */, - B5A54E93E0197855B585F5721CBB6E3B /* Kingfisher-iOS.debug.xcconfig */, - C46846A6B6844EA75D4B73021ACB0CEE /* Kingfisher-iOS.release.xcconfig */, - DFEF16E1BA71D75FF45D346A390B0A85 /* Kingfisher-macOS.modulemap */, - C5D6A42F362A7212C10CC5517CA43DBB /* Kingfisher-macOS-dummy.m */, - B0D798A41A25E9EB9A2CAB7EF7612392 /* Kingfisher-macOS-Info.plist */, - 8E46A6E5002095EFFEA6E8C7E99E6A33 /* Kingfisher-macOS-prefix.pch */, - 29BAE74F61BA265ED2D9B02FFDB94C8A /* Kingfisher-macOS-umbrella.h */, - B5A7D32EE5D6F77DF2F73B856171C0C1 /* Kingfisher-macOS.debug.xcconfig */, - 343D79E7292C13F1CC024AB35D5305F5 /* Kingfisher-macOS.release.xcconfig */, - 910F79E12AF23ABA664E11A6DA26F0A0 /* ResourceBundle-Kingfisher-Kingfisher-iOS-Info.plist */, - 250E7B71EF2D86E6D80942F9B6C1460C /* ResourceBundle-Kingfisher-Kingfisher-macOS-Info.plist */, - ); - name = "Support Files"; - path = "../Target Support Files/Kingfisher-iOS"; - sourceTree = ""; - }; - 16FBA4647D9EBC4608490CD6DFFC9F71 /* Support Files */ = { - isa = PBXGroup; - children = ( - F36678441168BA9C38F90E2D9DD3E311 /* SwiftProtobuf-iOS.modulemap */, - 2C7907B894A03B342CE1C03AA84747F3 /* SwiftProtobuf-iOS-dummy.m */, - 100453D81A211F4E47D53E573150E1BF /* SwiftProtobuf-iOS-Info.plist */, - 84722E292A5B690DAE20B5B109A178A8 /* SwiftProtobuf-iOS-prefix.pch */, - 8EF5DF35E731A51646BDC19FB68E313D /* SwiftProtobuf-iOS-umbrella.h */, - 30D51229828A86E2758735FEAD988F18 /* SwiftProtobuf-iOS.debug.xcconfig */, - F8E87126EE361122618FFE15CFA51C12 /* SwiftProtobuf-iOS.release.xcconfig */, - AC60B4B774C8FDDC5BFDF7A2BAE25D88 /* SwiftProtobuf-macOS.modulemap */, - CA50D7F1E73FE4A516647985741C26A8 /* SwiftProtobuf-macOS-dummy.m */, - 08D293986EF6AE47ECEB68D97EDFC3E7 /* SwiftProtobuf-macOS-Info.plist */, - DB475367F16A82A29D8B1F3A0314EA8E /* SwiftProtobuf-macOS-prefix.pch */, - 0598539458AAA2AAF6173D37EB1E926D /* SwiftProtobuf-macOS-umbrella.h */, - D008E080F72C1CD5CEC40E098C9B274E /* SwiftProtobuf-macOS.debug.xcconfig */, - A25DCFAA20CE6EE261D6AE35172B8014 /* SwiftProtobuf-macOS.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/SwiftProtobuf-iOS"; - sourceTree = ""; - }; - 1866938FC8C286B5808CD4F8FD23548C /* Support Files */ = { - isa = PBXGroup; - children = ( - 415174A54ECF3C00EFAAA9F86B07550A /* BigInt-iOS.modulemap */, - FD44332A389096F1A8B05A00DE164D7F /* BigInt-iOS-dummy.m */, - 580B97BF3D9DE91BF6F4581A07FC8AA9 /* BigInt-iOS-Info.plist */, - 44F4DBDA37E03292BBB491724C6CD696 /* BigInt-iOS-prefix.pch */, - FF7317094748576D7A29A024E61D5BCD /* BigInt-iOS-umbrella.h */, - 6CF12A9C9C36B60BE950F994C6819D32 /* BigInt-iOS.debug.xcconfig */, - DB225B5FE5781FF966C8C41D7094ABC2 /* BigInt-iOS.release.xcconfig */, - E708D2C176EE56185B1968BE06322B0D /* BigInt-macOS.modulemap */, - 887E99CEBC059806E355F163AE2B1628 /* BigInt-macOS-dummy.m */, - E8E14EC9CDEB775F325A615ECCC2ACBF /* BigInt-macOS-Info.plist */, - 31129A29AFE1B2AF4B9A0F05ECB7AA03 /* BigInt-macOS-prefix.pch */, - EAECB0BE76113437487ADB52B7F2B3F9 /* BigInt-macOS-umbrella.h */, - 5F18B835F60CBEFE8D0AAE093F26B41C /* BigInt-macOS.debug.xcconfig */, - 2CFFCFF067B691C42A7F5F54CAAA241D /* BigInt-macOS.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/BigInt-iOS"; - sourceTree = ""; - }; - 2EB5F2E2E766653D1C718074EF939FF8 /* TrustWalletCore */ = { - isa = PBXGroup; - children = ( - 79435DC58065AAE0B477F48D6598E463 /* Core */, - E824BFB912E1270DE94348EC111A377D /* Support Files */, - D1FF2543D15F2B7A54A1FF3C9263780F /* Types */, - ); - path = TrustWalletCore; - sourceTree = ""; - }; - 312B48D08B6C882DD9406CF191DCA5CC /* Frameworks */ = { - isa = PBXGroup; - children = ( - 8B61EADF214BC8D1C8E79DA3582C47B3 /* iOS */, - C5DC402A2497BB776E6C4691ECCE74AF /* OS X */, - ); - name = Frameworks; - sourceTree = ""; - }; - 36561E969AE55B5C27B627035BD309A2 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 2A0665D9FB706A6556EB2E071F2F0E1B /* WalletCoreCommon.xcframework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 79435DC58065AAE0B477F48D6598E463 /* Core */ = { - isa = PBXGroup; - children = ( - BAA8199DC1571D84E4679E0F32C669E5 /* Account.swift */, - C63EEC03E8DF0127878414DD44F7EB2D /* Account+Codable.swift */, - 1462B48420A4B2D2079AE0E6D4959503 /* AddressProtocol.swift */, - E3214B869B27DDDD9D4B9820CA8F58C8 /* AES.swift */, - E08D5B416ABA8C696EC71FD6B17BECCF /* AnyAddress.swift */, - 9278BD31E7B1D297ECE838F10291E4E5 /* AnySigner.swift */, - FFB0EB4FEB001355FAD0C330490CCB4A /* AsnParser.swift */, - 669F2D97B5DFB7BC8B91F031310EAC27 /* Barz.swift */, - 53A8BEBA7CD55234B26C1F4335352436 /* Base32.swift */, - 93CE734EFDA99626A19F3559E42C1274 /* Base58.swift */, - 72225E44C1CA748460E83DD91517A13A /* Base64.swift */, - 1C6A8A5336D312900E308A2C36E9F08D /* BitcoinAddress.swift */, - 62B12CFC3DF417D774B463DB206FC399 /* BitcoinAddress+Extension.swift */, - 1B27C8EB84AB59FB71E403D1E3295DC9 /* BitcoinFee.swift */, - 8ED3371A76D4AC11090BFE126C93B43A /* BitcoinMessageSigner.swift */, - 89FB513248D38132ABC7C70801715C72 /* BitcoinScript.swift */, - 78ED7ECAE693119606FD0E2E9B93653B /* BitcoinSigHashType+Extension.swift */, - 008343E9B8EC5141FA8E723F86D0B794 /* Cardano.swift */, - 89D0C9706D28A9F88B636580476B121E /* CoinType+Address.swift */, - 4978FB55EFC3394F55F896472E3FA0B3 /* CoinType+Extension.swift */, - 24C76B776BEBB37B0FDAEC3B8E0349F6 /* CoinTypeConfiguration.swift */, - B7E33D0260C00CA2D756156684831BC2 /* Data+Hex.swift */, - 88ED7522C81BEBF610E9772BBC330782 /* DataVector.swift */, - 0AC52B88F52C8803909DB0DF2A75E994 /* DerivationPath.swift */, - F5BFDE56CE91672F5F7ED3013C6EFC1F /* DerivationPath+Extension.swift */, - E601F85BF7C31E5CAED0909A081AFBA2 /* DerivationPathIndex.swift */, - 38CB28FA7BFFFE538922344E0837B0E1 /* Ethereum.swift */, - B757EE5C007ECF51A7987A6307CB9503 /* EthereumAbi.swift */, - 4CFBD8F75A217AC76114D09B2809FFA2 /* EthereumAbiFunction.swift */, - DC658E731F79F058F6303160A319D473 /* EthereumAbiValue.swift */, - 66929AB0E516AE0F67EAE05485C0D152 /* EthereumMessageSigner.swift */, - DC5A4966727F266DA89586C51E7A5B82 /* EthereumRlp.swift */, - 10C2B2FA911E78816E6C6E750F84A8BF /* FilecoinAddressConverter.swift */, - 71B78753C2A9821337517F82CEA73CDD /* FIOAccount.swift */, - 932D38DB63D551DA0601B2CA780AAF45 /* GroestlcoinAddress.swift */, - CA31FF7CD8C8401984CDD24437CAAB76 /* Hash.swift */, - 9EF47005622E8E512CDAF13AE70A944B /* HDVersion+Extension.swift */, - BA10C0DDDA0BEABF5BFCCF97CB47F841 /* HDWallet.swift */, - E12805B28BB706E5AE09D6668603522C /* KeyStore.swift */, - 03C323AECE33AE438F09C9E3C8553DAD /* KeyStore.Error.swift */, - A0516AF1CF82BF55913E5A715CBA737F /* LiquidStaking.swift */, - 74B19D9426C753156D891128B648D604 /* Mnemonic.swift */, - DA0D76D75214B59A126E49C6EC93BDB2 /* Mnemonic+Extension.swift */, - 3615E6A06B43DBF36B5916B7C514EE7B /* NEARAccount.swift */, - 32DC10FFE739671242A8BD9C46832BE4 /* NervosAddress.swift */, - 6B2773F0C23CF91E3B3CB5EA1CC511EA /* PBKDF2.swift */, - 0771AE7532A3F97CD329B4440438C9EA /* PrivateKey.swift */, - 8EB022C9C09FED36EFF5EC4382E5C80D /* PublicKey.swift */, - 2462917A79F9BC368B26B1F833938AD3 /* PublicKey+Bitcoin.swift */, - 2C12E7907A13A46A72EFED7F4AD0347D /* RippleXAddress.swift */, - C26BF9BC8A9CDD8E46E1F5B8E582783C /* SecRandom.m */, - 68A669A0F27F135643F970132BF9F522 /* SegwitAddress.swift */, - F6B20CD1932CAB0ED77D30DB2B7FFFB7 /* SolanaAddress.swift */, - F5D7470038583B7116C04EF668F8AAE2 /* StarkExMessageSigner.swift */, - 1A65B2DC6654207A6996E11E02CE9324 /* StarkWare.swift */, - EFF83FE4668E7031BF6A5714F8A7791E /* StoredKey.swift */, - 5261E92D52DC301F8A5A282C09AB4AC7 /* TezosMessageSigner.swift */, - 912A5F4E13FFDB1560A2716409B2A394 /* THORChainSwap.swift */, - F36B486041210A661C5E0AE5ABC94B73 /* TransactionCompiler.swift */, - A247AD0A96589E0F1299D871972FA037 /* TronMessageSigner.swift */, - D600B12007BA37EEBB2E3A08DF5458F8 /* TWAccount.h */, - EF68B8080F716B96A94474174AF96108 /* TWAES.h */, - 032D71292B3ACEE3F5FDC0577029332C /* TWAESPaddingMode.h */, - 05C50A492C2A145B91683E80C1856047 /* TWAeternityProto.h */, - 03C74AE56ADB950BEF977CDFE3F67DD8 /* TWAionProto.h */, - EC55B36E81CD31A719890ED6972B9D59 /* TWAlgorandProto.h */, - 14717DEE21E75CAC72AA1D8DB5AB4206 /* TWAnyAddress.h */, - 9950FB5AA58FBB836C49BBF432A0F3FB /* TWAnySigner.h */, - 0B8DB7152CEBDA1B9F9BFBD91E36A9C1 /* TWAptosProto.h */, - D89BD6C5B8B5AA05B2554E7A26093B7C /* TWAsnParser.h */, - 123C965CACF3E25DF64CFD572E100C2D /* TWBarz.h */, - F929CD96AE82416D88639C5349B0F8DF /* TWBarzProto.h */, - D96702779FB41560EBEB18E94B0F47E7 /* TWBase.h */, - E333936D9B9CF3967A7950FFC908492E /* TWBase32.h */, - 18A9E81106903BEC79C4CF1EB92699E6 /* TWBase58.h */, - 4F16FE5ECC32411CC2A87385E931C504 /* TWBase64.h */, - 4B84234C62053507827617AE6EA65CBF /* TWBinanceProto.h */, - 3D1F2230999C27DCAA7F40F75FA312A0 /* TWBitcoinAddress.h */, - C41145FF94EEB0FA964BB9D404F1B5F9 /* TWBitcoinFee.h */, - 33244974D009E1E13A9F72DD4D12DBB2 /* TWBitcoinMessageSigner.h */, - AD8F695F6839DB10326BD70CA74ACABD /* TWBitcoinProto.h */, - D47EBA8BD5C102BD72B3A7BCD84B9DA4 /* TWBitcoinScript.h */, - 6752EA648F3610499F67A5C39009EFD4 /* TWBitcoinSigHashType.h */, - 3FD40E6437D301ED405B05FA5CFD2D08 /* TWBitcoinV2Proto.h */, - BB3151674830695AD98ACEF0182C28B5 /* TWBlockchain.h */, - AC701DF09C9E06CA7D9517F92023D14C /* TWCardano.h */, - B0E45F829A2F6E68818572967D91E4A1 /* TWCardano.swift */, - C497A825F0F288655644A67DF63C8D62 /* TWCardanoProto.h */, - 4FA6A69B28B7A23F2425170E393537B4 /* TWCoinType.h */, - 993C856FBB41BAA25BA0C3462D14CD58 /* TWCoinTypeConfiguration.h */, - 26EA5B9F879590AF9B6A4F08B90EE2D9 /* TWCommonProto.h */, - 3DE991C2878CAB5722A856BD79C24BB1 /* TWCosmosProto.h */, - 21C6C62D872FA2C2D48B4F1F13716645 /* TWCurve.h */, - 22C6A10B37713663222A90451C0B9663 /* TWData.h */, - 348938B0EE4CBAD68416414BC9FA737A /* TWData.swift */, - ABFE41AC94FB9C0C623518E14769DE3C /* TWDataVector.h */, - C9E3D989D91EBC53D874232F839B4A9C /* TWDecredProto.h */, - 2FE2CDE1BA3795B1FDE18662C42D3B88 /* TWDerivation.h */, - BCD880101532C37B5963A31C4E6C6B48 /* TWDerivationPath.h */, - 4FDEF4B73B700A075972D201D1F9A71D /* TWDerivationPathIndex.h */, - 7C066BD92281FA6A549B8DC21E86DFDF /* TWEOSProto.h */, - B4A4AC094E72C6670E83472EB987FBDC /* TWEthereum.h */, - 614C96527E78504BBB98D74BB34F7E71 /* TWEthereumAbi.h */, - BA1D3FEE26E2A5122BAD317D565B4820 /* TWEthereumAbiFunction.h */, - A302209356A00095DC4D7D624AD9D031 /* TWEthereumAbiProto.h */, - 9DE5011464A84FEA139058BA0473F966 /* TWEthereumAbiValue.h */, - A1B9B7B66E157DA1707A97B9B4DF8570 /* TWEthereumChainID.h */, - 923253720A7EAEE48C4EAA35D4C9558C /* TWEthereumMessageSigner.h */, - EBC8B3F766C9E534385BF5B9CAD1504F /* TWEthereumProto.h */, - DA76E597BDAF4804577A3E813C43A506 /* TWEthereumRlp.h */, - 1DF52178386C075DA3857336307F8E58 /* TWEthereumRlpProto.h */, - A201934B5C9F7B9A30181A50A97F5906 /* TWEverscaleProto.h */, - 9B62FEE0A024A32D47490F7376A84215 /* TWFilecoinAddressConverter.h */, - A16B9F4FFDF3A24F7F14E1E5FAC217F7 /* TWFilecoinAddressType.h */, - C76262F5326D0DEAC0325217E2CA6627 /* TWFilecoinProto.h */, - 28EBF0C5FF0FF9CF3E278D9539AD4DCF /* TWFIOAccount.h */, - EFEA13C1C2D5BA7DADF18D9E4FB2E0C2 /* TWFIOProto.h */, - 0AF0D7E5C822BBF3FAC2DDF8C55BF849 /* TWGreenfieldProto.h */, - 2C19C295E6C1CDA92EE78DADA9F10BE0 /* TWGroestlcoinAddress.h */, - 70803E3FDA9AF941337F0942E50D3D03 /* TWHarmonyProto.h */, - 207E832E129737BBBFA697D306AB6C84 /* TWHash.h */, - 5D2BDBB5FC2D531E8D2B0A0DB4958A23 /* TWHDVersion.h */, - 9503FFEB0900749ABC5B06ACBC0AD3E2 /* TWHDWallet.h */, - 3835A2A5C5C0B7626AC3A68882E93249 /* TWHederaProto.h */, - 64E4E5260567D87102F99275973B6FA2 /* TWHRP.h */, - BA05E6FABD933FE88AE74B6F611DBF2E /* TWIconProto.h */, - A2ED4E67C1F930F40BFB763C9EBA9DBE /* TWIOSTProto.h */, - BE801000FD5DF98D88CAE1E3157A3CBC /* TWIoTeXProto.h */, - B242B045BD1A542445B3993708D671C5 /* TWLiquidStaking.h */, - 1D770EE3F5C51A97EAE2ABC0F0089054 /* TWLiquidStakingProto.h */, - 3D869323A343F3BE1463AED7F59D5F4F /* TWMnemonic.h */, - 6030EF5A34D3268961C3610E8396B16E /* TWMultiversXProto.h */, - E7CB5857BECCFF631803958E6E96A346 /* TWNanoProto.h */, - 5FC84B3093A848901AC994234867BC93 /* TWNEARAccount.h */, - DE4099911825248EF5F4348826B1602F /* TWNEARProto.h */, - A22E3F85014372A714A65F1A82064D4F /* TWNebulasProto.h */, - 51ADD5B2E3B53B1DBC942E101177647C /* TWNEOProto.h */, - 910FEDDBD72574C6249A10EB0941D7C5 /* TWNervosAddress.h */, - C258B90CEF2C67C03AC715D80EFBD761 /* TWNervosProto.h */, - CDC31531743A524B032477A4828A7D53 /* TWNimiqProto.h */, - 9569F26AB766917EE6CF7BB561241439 /* TWNULSProto.h */, - 1DEDBBCD3733146815DEFBCB91AC236B /* TWOasisProto.h */, - CAF9C6F39102C871BFAA9E9C84F5BE4B /* TWOntologyProto.h */, - 6EFF3AB6BDD4384A6DAB3ED30CA17155 /* TWPBKDF2.h */, - C2DB32119B22835AF16B536AC949A967 /* TWPolkadotProto.h */, - AE3A26F9188FB213D66358D4EBDFEBD6 /* TWPrivateKey.h */, - 78E1AE742575E960FDE2A440E7A144CC /* TWPrivateKeyType.h */, - 6AB75F39A8C7A86D2D401DE40E2F2565 /* TWPublicKey.h */, - D3F52A45C5C80C8CD48299B8B9F00A5F /* TWPublicKeyType.h */, - 259C324F1850397A45B2ED949517750E /* TWPurpose.h */, - 833E85FEAF03071EA15B10818E8BFD27 /* TWRippleProto.h */, - 21F1BFCEC82F915FA850C75C5EDF7B4E /* TWRippleXAddress.h */, - 3267AC2A904A8D61A9A5CC64AC5D3940 /* TWSegwitAddress.h */, - F882B4988A6D219219D31C0F38028F0D /* TWSolanaAddress.h */, - 4F39BE4B2C547598667F86EE47AF4773 /* TWSolanaProto.h */, - CDBFB272E5E82E1411EBC2CCD0E12155 /* TWSS58AddressType.h */, - 610AFFF63F0D24E18042D05B28D7B342 /* TWStarkExMessageSigner.h */, - 57BF9921E1767EB59ABD94DB5BCB076B /* TWStarkWare.h */, - 784F9D8EB78658C13E4C3E234A4B9616 /* TWStellarMemoType.h */, - ADA70292123B0F8EB42A41EFB046CDD7 /* TWStellarPassphrase.h */, - 4663DB9782B4B88B39DF04FD2E55B5FC /* TWStellarProto.h */, - F4176613D79D5BC5F00DB66414A35601 /* TWStellarVersionByte.h */, - 69FA87A03BA5A8A3DBF795F2EEFFEB61 /* TWStoredKey.h */, - 0E27E6DF7A806D288ADEF2A99B99DD75 /* TWStoredKeyEncryption.h */, - 8BF96F25FA20FA87C41337488496873D /* TWStoredKeyEncryptionLevel.h */, - 310906C62D8BC77FA09EDE7A300A2B60 /* TWString.h */, - B3A6D5A6AFB14F549189C4D2455C4B7F /* TWString.swift */, - C7616CBC03A662AC42CF93AE82997068 /* TWSuiProto.h */, - 128B5796EAD3AB6E94BE20744DB691A5 /* TWTezosMessageSigner.h */, - FECAF54D40D1473719E1C968E57BEAC7 /* TWTezosProto.h */, - 7FE293D5501643C4803EA3327D9F9DD3 /* TWTheOpenNetworkProto.h */, - 3A3815CA79AD33CED38B16DB1155A841 /* TWThetaProto.h */, - 8859F555F96A70FC9E9CFB1E46BD302E /* TWTHORChainSwap.h */, - 45F476E40E6BA725295757E3C48EA675 /* TWTHORChainSwapProto.h */, - 09E928CFF866DEA0C41577591F53158C /* TWTransactionCompiler.h */, - 8B353854C116EF27EA6DF3B3D3A263C1 /* TWTransactionCompilerProto.h */, - 8C7D9D46FB69A4413668BD335E7B216A /* TWTronMessageSigner.h */, - AF047CF67D4C5EE1611FB5CC926A88B8 /* TWTronProto.h */, - 741A961FD62CD2174612D245938D1986 /* TWUtxoProto.h */, - 3E5C6948B98BE431E93D86DD1FD4C054 /* TWVeChainProto.h */, - A51BA1BBBE35D62921371714A0854CFC /* TWWavesProto.h */, - 703463228786F4945B5497FEEBF5D8DE /* TWWebAuthn.h */, - B4A5EE9966F24D6E13183AB23662F708 /* TWZilliqaProto.h */, - DD05E192AE16FDBC2AD332533D18466F /* Wallet.swift */, - 6A2F72B33064CF980E48FA2BFF28041B /* Watch.swift */, - 317AE04B87B518B31CE3AA76C44DC680 /* WebAuthn.swift */, - 36561E969AE55B5C27B627035BD309A2 /* Frameworks */, - ); - name = Core; - sourceTree = ""; - }; - 7A41A66AFA20671F5C9568E5DCE566DC /* BigInt */ = { - isa = PBXGroup; - children = ( - 886F3524AD0CE136C282038BB836E0A9 /* Addition.swift */, - D009038B8154F126496AD472961F904B /* BigInt.swift */, - 1C3B0003639A0DD0C5F7DA5EDD6DD772 /* BigUInt.swift */, - B3479A3217066A19B2638C8216B9770C /* Bitwise Ops.swift */, - C370BFDC01F7A74A137ADE4007BE750D /* Codable.swift */, - 9DA28D27CE4CDA760D691469B73855B5 /* Comparable.swift */, - A022661FF56B9080175E4CAB4758183D /* Data Conversion.swift */, - F9D979A6D100A301EABE1F1E2E9A58A8 /* Division.swift */, - 680B7CE27E02B8073C3494C5020C6F77 /* Exponentiation.swift */, - 829250A578FE8926F326268E6ED3DDFB /* Floating Point Conversion.swift */, - D458B1D164B5324CD308686DF5023E94 /* GCD.swift */, - 2A862CCA152713345E3E79313F2F5276 /* Hashable.swift */, - 4C8EE235D97488B3920ABF00A25EDEED /* Integer Conversion.swift */, - 7F8FF5B9F55078B4A8A95A6C74569A5F /* Multiplication.swift */, - 15EA94F2C1EEE737C985D8E1EAFED2AC /* Prime Test.swift */, - C58EC158C1155FAAB6CED0C211D5DCF8 /* Random.swift */, - 24B6B130D979310638B362CB555BD8F7 /* Shifts.swift */, - 194E8378791E7484EC73DB4FAAF0EADA /* Square Root.swift */, - 276651878187C7E173EEF1033FE2647C /* Strideable.swift */, - 002B59B1C5346996B396069FF5C2ED4F /* String Conversion.swift */, - 22DA17C7FF836BFD78FFE6DCE9134F4A /* Subtraction.swift */, - 689BEA9360638EE3FFDB2D5173580B65 /* Words and Bits.swift */, - 1866938FC8C286B5808CD4F8FD23548C /* Support Files */, - ); - path = BigInt; - sourceTree = ""; - }; - 7D45BD6BE14FB45E70427F54E7F13021 /* Pods */ = { - isa = PBXGroup; - children = ( - 7A41A66AFA20671F5C9568E5DCE566DC /* BigInt */, - DA6CEE48261BD67171506267324BFE90 /* Kingfisher */, - 8685FB35BB10C504D82FCB264532B60A /* SwiftProtobuf */, - 2EB5F2E2E766653D1C718074EF939FF8 /* TrustWalletCore */, - ); - name = Pods; - sourceTree = ""; - }; - 8685FB35BB10C504D82FCB264532B60A /* SwiftProtobuf */ = { - isa = PBXGroup; - children = ( - D9DC3491FFD77D87118FD764798BA62A /* any.pb.swift */, - 4D0BE2664911FF690E8852DDB010DA39 /* AnyMessageStorage.swift */, - 32461E1AECF5A48A5763CE5A7269C6AA /* AnyUnpackError.swift */, - 500DC4908D321D0036B86023C3DE980B /* api.pb.swift */, - C7848F8E0AB945162099F90633F81690 /* BinaryDecoder.swift */, - EE1FD2D9F4D6550C4F7C662BF3A6798C /* BinaryDecodingError.swift */, - 081F0711363B18D0FD70A1DD4AAF3E7F /* BinaryDecodingOptions.swift */, - BD391FEA8F7F1694ECFD478154C8E3DB /* BinaryDelimited.swift */, - 4DDB7A88B15D46561468D364A2BBE1B1 /* BinaryEncoder.swift */, - 1EBD06B016E8E81A6466BAFFA9192F0D /* BinaryEncodingError.swift */, - F1F5519F4B87146A47383D368268E667 /* BinaryEncodingOptions.swift */, - 507D103F7FD6EA4DC49C8B5EAFDEE13B /* BinaryEncodingSizeVisitor.swift */, - 752820D333566556D461186C664F52F9 /* BinaryEncodingVisitor.swift */, - F31C58C0BC905D0070DBFA500D239EED /* CustomJSONCodable.swift */, - B6AD1E0FF5895F3741DD1E5038EFE1C9 /* Data+Extensions.swift */, - A8C90350789E192BA11EB3D792F4C568 /* Decoder.swift */, - 53CA3FEEC9DA71BA9198FBBDC3C3DFB2 /* descriptor.pb.swift */, - 9E1546D69D5F2CAF17A226475A18B58F /* DoubleParser.swift */, - D51D8DDBE6FBDB9BFF593D642A2864F2 /* duration.pb.swift */, - 720C9C7CF3322A59901BAA55579980C1 /* empty.pb.swift */, - 725F89687254C664F94D44D4C675185D /* Enum.swift */, - 56415FEBB5DBEC5E2033330ECB7A3591 /* ExtensibleMessage.swift */, - E6F901649F1F1E3E246F1D2AADFC43CD /* ExtensionFields.swift */, - 20F20507ABFA06B2BB4823E1B9F3A04D /* ExtensionFieldValueSet.swift */, - 6035A5375CCAC1108A5256A5E4D443FA /* ExtensionMap.swift */, - 4C6F88366BF058CFD919C633C2665081 /* field_mask.pb.swift */, - 0AD0E1BCC2EB545E03E7B239BCC8D8E6 /* FieldTag.swift */, - 8B834D424680C126A5AB061997265979 /* FieldTypes.swift */, - 10C539C5715FF822EA9A79893CAB496D /* Google_Protobuf_Any+Extensions.swift */, - FEFA44D6DA05BB5DE3483DD4C29D50DA /* Google_Protobuf_Any+Registry.swift */, - 3E90848F2B2114098341EE243B4F46B5 /* Google_Protobuf_Duration+Extensions.swift */, - 69550BF425C701F89716029D94A38603 /* Google_Protobuf_FieldMask+Extensions.swift */, - 2CA50553A86292E8C435065CE5A25D1F /* Google_Protobuf_ListValue+Extensions.swift */, - DD8E2CF966BAECD47C86B309C16F3D4A /* Google_Protobuf_NullValue+Extensions.swift */, - 4CCABC9836B32D09A771DAF2816B01BC /* Google_Protobuf_Struct+Extensions.swift */, - FD7CD145328B23220F48D8E84CC3CD82 /* Google_Protobuf_Timestamp+Extensions.swift */, - 1A2E743E360E4C33C6B5E931DF17F8CB /* Google_Protobuf_Value+Extensions.swift */, - 665EDC07E1D1ECFD22B09B93D61A3C58 /* Google_Protobuf_Wrappers+Extensions.swift */, - BB2D50DDF9382E5F874EDDFFCD764AD9 /* HashVisitor.swift */, - 5FB7B9C7D1F8FCDFF47453F49CA67F5B /* Internal.swift */, - DCEEE315830FE4302666A00152CC31A9 /* JSONDecoder.swift */, - C76E63722BC023380717327F514F75B1 /* JSONDecodingError.swift */, - CC8AB8A06C292D26EE4D4A11FA5FF3EC /* JSONDecodingOptions.swift */, - 643B04AC6F0EA9BF74879E2BF5585540 /* JSONEncoder.swift */, - 95724038B225C802D5E5B24C41F29CD0 /* JSONEncodingError.swift */, - D78D407747D8005F8138C4E32FACF0D7 /* JSONEncodingOptions.swift */, - EBB49DD5A438A326F2A3F3CB758ACC26 /* JSONEncodingVisitor.swift */, - EB6BD5A749390FC806EC8A5FE2244EA9 /* JSONMapEncodingVisitor.swift */, - 305B67F58BAEDFED379C07322D6BD1A4 /* JSONScanner.swift */, - E0EA2FAA76548F4961F9FAC5A4A88B98 /* MathUtils.swift */, - 25D46F8A8DFE004A33EF15C95D66587D /* Message.swift */, - 805C07DD521AD2FC73EF307C3265C0EF /* Message+AnyAdditions.swift */, - 8A8B7C1888CB4E7CB263E98509CC35D6 /* Message+BinaryAdditions.swift */, - CB18C1C68A595FB6DA0B6DCC68A655C2 /* Message+JSONAdditions.swift */, - 24F7147722EDF445861B97965050C096 /* Message+JSONArrayAdditions.swift */, - 21C76D728654A8B1D51B0EF5350BF2DC /* Message+TextFormatAdditions.swift */, - 064DC889ACD509F29619F2EC8C614644 /* MessageExtension.swift */, - 2B0265BAA695FAD715C19E275889A637 /* NameMap.swift */, - 9E4218178771B8858487124793820486 /* ProtobufAPIVersionCheck.swift */, - 8F4DCD6BF7F15B30A311AA557CBC3221 /* ProtobufMap.swift */, - 5D7FFEDB1639E36F1275A04B6DB0053C /* ProtoNameProviding.swift */, - 34E2565A43CCADBFFF2D63038364E192 /* SelectiveVisitor.swift */, - EE5A5DF4A5764318378BE545367933E2 /* SimpleExtensionMap.swift */, - 90C5B348B6AEF95161AE17A57698C992 /* source_context.pb.swift */, - E23DCBA704DB69643799A4F296305D03 /* StringUtils.swift */, - 6330966403211B35C9F223F24FD7FCD6 /* struct.pb.swift */, - 44D45260F8E9B64B4046E63CC386C674 /* TextFormatDecoder.swift */, - F68D21332FD5A04A2A2EC76704BD57B6 /* TextFormatDecodingError.swift */, - 3E14980C2C39C88F8F0ED8E30F556D68 /* TextFormatDecodingOptions.swift */, - 0F4D1447EAC541483D73DF084BA34F4A /* TextFormatEncoder.swift */, - 093B20C257A1B4EB85BD7FA52CEC8522 /* TextFormatEncodingOptions.swift */, - 7CF04E1D6F32C6315DB91F83DE2ED391 /* TextFormatEncodingVisitor.swift */, - 2DC40554F5072F0E18A8C5FE76916510 /* TextFormatScanner.swift */, - FB543B10EC028E43FEC119864BBC4A7D /* timestamp.pb.swift */, - 9FF55D8C6335E8874725734EB504BA0C /* TimeUtils.swift */, - 572BEA04E861ADA1CAE65662914C6EB7 /* type.pb.swift */, - E238883C9985B02CCA03EF6EC98F394F /* UnknownStorage.swift */, - 3B2373712ED36232FA70A8BD9B69C973 /* UnsafeBufferPointer+Shims.swift */, - 8D31EEFFEBC60F302E182A3101A0EC4A /* UnsafeRawPointer+Shims.swift */, - AD1BBF528E3DA56648A1DC964C83773B /* Varint.swift */, - 18281CCC50839F349BD2014775006139 /* Version.swift */, - DFC8A0852EA83A05E870AA4B7BAA4304 /* Visitor.swift */, - FB4427502F9D14C9BA0D97E37A0152B7 /* WireFormat.swift */, - F4068258E6EF294F076AFC67B2B92713 /* wrappers.pb.swift */, - D81702FD9A3E32F2A582309FF30EA3AF /* ZigZag.swift */, - 16FBA4647D9EBC4608490CD6DFFC9F71 /* Support Files */, - ); - path = SwiftProtobuf; - sourceTree = ""; - }; - 89E00C814905D02D895199F4222EA42D /* Pods-Tokenary iOS */ = { - isa = PBXGroup; - children = ( - A5EBE6AE0D7BD0F4C3FA15F952DB8DF6 /* Pods-Tokenary iOS.modulemap */, - C66B95942F55CE08405B50757A9A3583 /* Pods-Tokenary iOS-acknowledgements.markdown */, - 7D2A880D5A6A5149F0A3C96FC28BFB36 /* Pods-Tokenary iOS-acknowledgements.plist */, - 3BF3A88A10643A0290B0D72F59EC081F /* Pods-Tokenary iOS-dummy.m */, - D900453DC4867A6FC049C688DF4CE413 /* Pods-Tokenary iOS-frameworks.sh */, - E65F4372F4AFADD8E6F7EAA6997B05CC /* Pods-Tokenary iOS-Info.plist */, - EF9A09D2880AFB578DB9E0853050647B /* Pods-Tokenary iOS-umbrella.h */, - D75BB3D33AB861634FA10CFA04E56333 /* Pods-Tokenary iOS.debug.xcconfig */, - 7BE739F12791EB233F4B5B874300DD5E /* Pods-Tokenary iOS.release.xcconfig */, - ); - name = "Pods-Tokenary iOS"; - path = "Target Support Files/Pods-Tokenary iOS"; - sourceTree = ""; - }; - 8B61EADF214BC8D1C8E79DA3582C47B3 /* iOS */ = { - isa = PBXGroup; - children = ( - 07827EA561AB1431A4A6D9FA4E92EB70 /* Accelerate.framework */, - 509BF995B0D852C779E89CBD3D808CF3 /* CFNetwork.framework */, - BD7E218AAA978568DF29A6653DBA30E7 /* Foundation.framework */, - ); - name = iOS; - sourceTree = ""; - }; - 9BB051A4C11109F733AB1DD99A332C1C /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - FC576CD2BC722F8019484B0783085785 /* Pods-Tokenary */, - 89E00C814905D02D895199F4222EA42D /* Pods-Tokenary iOS */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - AAB1325170E1C9438786C17F0FC8C19C /* Resources */ = { - isa = PBXGroup; - children = ( - 87601A1F0DAC6747565BE384EC2E639A /* PrivacyInfo.xcprivacy */, - ); - name = Resources; - sourceTree = ""; - }; - B78DABFD0FF99A4E1D9017C73F2ABA12 /* Products */ = { - isa = PBXGroup; - children = ( - F3E0621221B49CBB46826033D3DEB84B /* BigInt.framework */, - 59C5DD41EE313A65C03650784BF278F3 /* BigInt.framework */, - 0C37C0511F5A16369B30672CB6BA6D00 /* Kingfisher.framework */, - D8CBDEF9B0EB359E8FD0F5FA8C86428A /* Kingfisher-iOS-Kingfisher */, - 9537468CF4D5C16DB31E0F967000827C /* Kingfisher.framework */, - 5DEA2DA8FDA7BAA10038CC169BBB4E50 /* Kingfisher-macOS-Kingfisher */, - 95BAA53196A79D500C92AFCCDED26039 /* Pods-Tokenary */, - 985063CF25F026FD329CB9B4D9F3E0A6 /* Pods-Tokenary iOS */, - 8AF0E4BE6CB89D1A02A14081360DFD8C /* SwiftProtobuf.framework */, - 5F52C76D0CC7F92C551EC2E40D9320AB /* SwiftProtobuf.framework */, - 60CD9336BF0D87EB43F318C3C417DB66 /* WalletCore.framework */, - 0A90AABC168E7ACBF249426FCA99F19B /* WalletCore.framework */, - ); - name = Products; - sourceTree = ""; - }; - C5DC402A2497BB776E6C4691ECCE74AF /* OS X */ = { - isa = PBXGroup; - children = ( - CAA7AEFEA5DF4E03E0AEF3C931C0B207 /* Accelerate.framework */, - 268C4DC58835F8E3ED97580D835F3291 /* CFNetwork.framework */, - A842F59040F4ECA334A99E5AE36D1CF5 /* Cocoa.framework */, - ); - name = "OS X"; - sourceTree = ""; - }; - CF1408CF629C7361332E53B88F7BD30C = { - isa = PBXGroup; - children = ( - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - 312B48D08B6C882DD9406CF191DCA5CC /* Frameworks */, - 7D45BD6BE14FB45E70427F54E7F13021 /* Pods */, - B78DABFD0FF99A4E1D9017C73F2ABA12 /* Products */, - 9BB051A4C11109F733AB1DD99A332C1C /* Targets Support Files */, - ); - sourceTree = ""; - }; - D1FF2543D15F2B7A54A1FF3C9263780F /* Types */ = { - isa = PBXGroup; - children = ( - 0F6C91BABC308199D68EACF5281CFDC7 /* AESPaddingMode.swift */, - C8F05D0A750849560AD9434D75C7198E /* Aeternity+Proto.swift */, - 705178BBD27C499C1D546F0A115272FB /* Aeternity.pb.swift */, - 51B1F162C0E5B47CDE7039E086277F16 /* Aion+Proto.swift */, - 5F5DF41A48A74AA8257F405288E2A9D0 /* Aion.pb.swift */, - 4C4C0F02594B7103FDCF68421763DBFD /* Algorand+Proto.swift */, - C4385282B45988556A472090C286D620 /* Algorand.pb.swift */, - D574CD9AA95787BAE0984A508099F91A /* Aptos+Proto.swift */, - DA20092DBF43DB8CCE2322C5E4ED2950 /* Aptos.pb.swift */, - C3E2C62A6E668C9FF46C28B4CEF01399 /* Barz+Proto.swift */, - CB7F62F979DF2D5A4EF5507EFB433843 /* Barz.pb.swift */, - 2687F760EAFFE874772C932D400905E8 /* Binance+Proto.swift */, - 96162B21DA75C0CB210F3FC177DB6DFE /* Binance.pb.swift */, - 5D065B07FE812987B5098636289FF42A /* Bitcoin+Proto.swift */, - 91089210F4F0602D96AEA02FD1900BD8 /* Bitcoin.pb.swift */, - E48ECEA22C76D471E8C2CD6004AE4EAB /* BitcoinSigHashType.swift */, - 4C9411B2A94F551D7C4375B128146037 /* BitcoinV2+Proto.swift */, - 31EE44B9D977593E770CE5A90BB4E13B /* BitcoinV2.pb.swift */, - BACEE9ED175755B9BDF245B1B2DC280D /* Blockchain.swift */, - EC43C8573E234E59D2F4E3E73FA25CB0 /* Cardano+Proto.swift */, - 05C4AC95214C5BB1E6B970254BD0D1C0 /* Cardano.pb.swift */, - 86C44BB0D31B0BB69F2BD2D84BFB7397 /* CoinType.swift */, - AF1FE8FD9DEEB30FFB056435CADD4543 /* Common+Proto.swift */, - AC6D8D24033F0CEE089DD3B0E9A4EFF9 /* Common.pb.swift */, - 75C68D1A26AF31A8A83DE4973626EEC1 /* Cosmos+Proto.swift */, - 720CD84CCDF712F01402DED67E2C2BBE /* Cosmos.pb.swift */, - F2C3A27FA603C119187AD4A1BBFD8F7B /* Curve.swift */, - B72E5AA17ABFA95C39678336F43F2B33 /* Decred+Proto.swift */, - 58B9A6C6F70D0DF41697F67031EF350C /* Decred.pb.swift */, - 6517ACB63CBFFF085786EE068E92BD07 /* Derivation.swift */, - 682B98EE94C05147DBE2D2A16EF9D340 /* EOS+Proto.swift */, - E4B0DFB19B2765A6B966DA33A1896C2B /* EOS.pb.swift */, - 28D6388940928A84ECE212B8F5FBA1B6 /* Ethereum+Proto.swift */, - 844F1ABB1BBE571EB79940E2E56B4D3C /* Ethereum.pb.swift */, - B881AAEFF827D3C55C495A77E1CB5516 /* EthereumAbi+Proto.swift */, - E73851AA06C56AE1FEAE9AB143291422 /* EthereumAbi.pb.swift */, - 861BABE75142AE9C4FF12B4178B02F59 /* EthereumChainID.swift */, - 102B16B1582786362B83B35D5D9A4E2D /* EthereumRlp+Proto.swift */, - DE9FD122C74103F42AC0F3AF16365429 /* EthereumRlp.pb.swift */, - B54F9E1433261C9DCFF935AAB1A25984 /* Everscale+Proto.swift */, - 8694A8463DF8EE1E0A9C1D1EC5DDBBBB /* Everscale.pb.swift */, - F91277E7ABFC9430D4AC99F3DF18C19B /* Filecoin+Proto.swift */, - 81E6823C89AB8AF6757ED9FD07040705 /* Filecoin.pb.swift */, - A5ECA8E299B8C244AA6848A7EB6BC761 /* FilecoinAddressType.swift */, - 342F51CEBBB103CCFC326BE1D39B88DE /* FIO+Proto.swift */, - 1F55B52F956B1FCAB0C7714B9A83A6A6 /* FIO.pb.swift */, - 874BD391756CD973258C28F72E55F80B /* Greenfield+Proto.swift */, - 2DE4BCA5BE0B9812703C3F09373EF54F /* Greenfield.pb.swift */, - 4C34B5ADF85C0400281EBD527FD8B237 /* Harmony+Proto.swift */, - 3085F10E052BA25632809F3542D65F20 /* Harmony.pb.swift */, - 90146CC5EFF9A29A6EC2082EFB787951 /* HDVersion.swift */, - 21B9F23278C0A14EC7B8583F108B3F11 /* Hedera+Proto.swift */, - CE42F079ED4CF8CFA9C12444B1CB5C87 /* Hedera.pb.swift */, - 25F1961FC5A23DA3EE85F800B6CA3098 /* HRP.swift */, - 2AC85B22832230B0F4C523704BF98A5C /* Icon+Proto.swift */, - A73C6AB7BA99B976057BB8C7247904E9 /* Icon.pb.swift */, - 083ECFFFFE5ABBA8D824C5A9CA98CADC /* IOST+Proto.swift */, - 177E4A198FCB00E45F7EB51F247F932A /* IOST.pb.swift */, - D8B8E71487737D810614FF0298F95C13 /* IoTeX+Proto.swift */, - 5FD8E17BBEAA574BB136AA1AC5471CA5 /* IoTeX.pb.swift */, - 23E9DD9D99AA09FF9D623CCDB0828D83 /* LiquidStaking+Proto.swift */, - 43FA0A4C15DE1B1F6DFD0ECD0BA95D6F /* LiquidStaking.pb.swift */, - 46FE95F7A628D3E41D0CBBCC26A4972F /* MultiversX+Proto.swift */, - 1A91984FF18242590E5D3522423008B2 /* MultiversX.pb.swift */, - 0BC5D96C0A23604413A8E2B45EF4D15A /* Nano+Proto.swift */, - BF743E4F94135DCD94F75FA4B4958584 /* Nano.pb.swift */, - F132AE6DB6D382838A013EC50E6F3E38 /* NEAR+Proto.swift */, - 8419E9D434FAF23A78DF801602D4E0A2 /* NEAR.pb.swift */, - 7CDAA112E8DC8803E1EAAB9C257674EF /* Nebulas+Proto.swift */, - 5961ED8B13E584B76BE678E69845EDC8 /* Nebulas.pb.swift */, - 4C08858C3F2E80CF11B9C5039BD0CD41 /* NEO+Proto.swift */, - 528301163D9C04043976B9CEB1089FC8 /* NEO.pb.swift */, - CB7508A0E862687EFE674FE0E37DEF75 /* Nervos+Proto.swift */, - 5BCD33F6B949215197076E4396FC32FB /* Nervos.pb.swift */, - E955C0A5555D919B63B4EDA3D2AB067C /* Nimiq+Proto.swift */, - 3D99B2B5939EEB6D0B4178AD410EC01F /* Nimiq.pb.swift */, - FADE8EDBBA797D0D38E086FD2E4A047C /* NULS+Proto.swift */, - DCF6D3F6BD6E796A62491080ECC096D8 /* NULS.pb.swift */, - 6CFDD1B000F85A766B620818507E7DE1 /* Oasis+Proto.swift */, - F50B712B248A10A0EAFD8ED60747F099 /* Oasis.pb.swift */, - 7B88398A2932B054105E20FAF7D4E4E2 /* Ontology+Proto.swift */, - D1C727651BC16D0B0D8FFD7C559A0B61 /* Ontology.pb.swift */, - F42E070726C86BB7C5E60E3A0A6C5AC3 /* Polkadot+Proto.swift */, - EF6A0DFC94DC5AB3FDA72BBD2609E432 /* Polkadot.pb.swift */, - D99BD4E02C7EB8A65D457D1285ADB905 /* PrivateKeyType.swift */, - 27B102322934FEB6EB8B8E85E62D5031 /* PublicKeyType.swift */, - F0102F29CD7FAFC33F333D59421471DE /* Purpose.swift */, - D9CFA4A4340A997744FA24D41F11B266 /* Ripple+Proto.swift */, - 33AF882026976B1C595B00D0BACEA92C /* Ripple.pb.swift */, - 0CD18FEDFB27D51B90D18C5F21CC9612 /* Solana+Proto.swift */, - 182DF9072796D05693E1CB60B20B48CD /* Solana.pb.swift */, - 9CDE66CAB35FCDF8F8FE96AD900A6B25 /* SS58AddressType.swift */, - C12707ED03FD5BDBAEE5061FDA5D8115 /* Stellar+Proto.swift */, - C5BFC00410F341D246BEEB142DBC239B /* Stellar.pb.swift */, - F740D6B02F281E33B35E9E7AC427016E /* StellarMemoType.swift */, - 8FF027466542135796C1C996E649E15A /* StellarPassphrase.swift */, - 363C4C83E98EBE40017C27F8F03AEA93 /* StellarVersionByte.swift */, - 5DAF680AA5A704652B50A7749E1E7C67 /* StoredKeyEncryption.swift */, - 123377509B0905F2ACF841441C9C9316 /* StoredKeyEncryptionLevel.swift */, - D304A4B15F992738B9FE6FF5F41C1120 /* Sui+Proto.swift */, - A5BA138568C7C92D1A2CFCFE08F64BEC /* Sui.pb.swift */, - 1C71C7B316B2BC77686826A04FC493D3 /* Tezos+Proto.swift */, - D5744FFD4E3E63605DAC77CC8B4CEC18 /* Tezos.pb.swift */, - AF1011675B3FC98E8AFCF71BBF5C1693 /* TheOpenNetwork+Proto.swift */, - 67B1E975CF716511F1903BD81FE55195 /* TheOpenNetwork.pb.swift */, - 380778018196417D97B7D095CC541514 /* Theta+Proto.swift */, - 41CCF353B366CA359985A466D17FD11B /* Theta.pb.swift */, - AC2D594919426C8103AAC0B31D1912B1 /* THORChainSwap+Proto.swift */, - E57BEF85A522E65DE3C8C21237C3F1A3 /* THORChainSwap.pb.swift */, - 6796316430087AFAB7E717FFED618E61 /* TransactionCompiler+Proto.swift */, - A11BAE5E8F998ADA63E63DE60486B6DF /* TransactionCompiler.pb.swift */, - AA1C093DCEC99DD364F6C0DC1343154F /* Tron+Proto.swift */, - 84BCC37628020C73BDC04FF352CBC29B /* Tron.pb.swift */, - 7AB81CFA8EA50C0AF3211B5404670DE7 /* UniversalAssetID.swift */, - 502B72EC7D6FBABECE36E634249DF5DB /* Utxo+Proto.swift */, - AC3757D8648FEA103B3848822088E9BC /* Utxo.pb.swift */, - 3298A5F988361B72E8C0C33E9076C397 /* VeChain+Proto.swift */, - 7BDD2E02577BA52A2CBF06B1E751B6BE /* VeChain.pb.swift */, - B56D7C16C0B60B5A6C967C3B0C661AAF /* Waves+Proto.swift */, - C9E6495281D0E9AC3575EEB5FB1C3EAD /* Waves.pb.swift */, - BCA2D123643021357A6002D71F4374FE /* Zilliqa+Proto.swift */, - 9170CB305C589344477565CB0CE92809 /* Zilliqa.pb.swift */, - ); - name = Types; - sourceTree = ""; - }; - DA6CEE48261BD67171506267324BFE90 /* Kingfisher */ = { - isa = PBXGroup; - children = ( - 3E1E000D7EFDC8AE72F241BD1BC3DF55 /* AnimatedImageView.swift */, - 11DD64221DEC012A79E687A19A97D324 /* AuthenticationChallengeResponsable.swift */, - 76A9191ABB4D7BD2B89F5B14BE9907FA /* AVAssetImageDataProvider.swift */, - 1B49EBAAB30E14DD0F6107211CB9355F /* Box.swift */, - 4EC439B9BC2E3BCD1D027D855BB14D98 /* CacheSerializer.swift */, - 1FD96ACD261584F033B651C700ACAAE1 /* CallbackQueue.swift */, - 9A72A27DE702C7D6F4549B27EBAD19AB /* CPListItem+Kingfisher.swift */, - 437871F52ACCCF7134F2298F6032751A /* Delegate.swift */, - FF604D64AF4BF89ED27A81E021E2B890 /* DiskStorage.swift */, - 12ADC7BD936CBFEFD5A5916F828A7B4B /* ExtensionHelpers.swift */, - B5F137CB38313890F0CDC781B466C3B6 /* Filter.swift */, - 3CAD01D0F5924ECAC9393C0BA64944ED /* FormatIndicatedCacheSerializer.swift */, - DCFE61E19E75EEF0E487755BC3FC3821 /* GIFAnimatedImage.swift */, - B7CE1301BCB66F40CE8196CAB3F24EA3 /* GraphicsContext.swift */, - F2FE5163FF67ABEE80F6B357370594B1 /* Image.swift */, - 5481C88B09DF44E486BBA146554E7958 /* ImageBinder.swift */, - 68EA378435D05826C64F994495439AD3 /* ImageCache.swift */, - 1BB143A46CBE58355B339EA4AED2785E /* ImageContext.swift */, - 2FAD573CF11AEAFF499E0798FE1A7363 /* ImageDataProcessor.swift */, - 792B8DE3A8EA740C156954EBA50E6C71 /* ImageDataProvider.swift */, - 83C0492624A62D333A78A26B8F3D022B /* ImageDownloader.swift */, - 19630D7EED70F5054C4937BF82B65967 /* ImageDownloaderDelegate.swift */, - D4FFD051C251EFC1A510196800AD75D5 /* ImageDrawing.swift */, - 00DD953C5E1E18C601F1022450A5FB6E /* ImageFormat.swift */, - F65C75408C457BD348AC5EB8EF159A98 /* ImageModifier.swift */, - 38168313036BB1FE5EAC38FF616B4FD3 /* ImagePrefetcher.swift */, - 8DD786233C16BFB0599CA37F8A09F1D2 /* ImageProcessor.swift */, - EBE7CFB4F528B21B079FEDC9409CAFE4 /* ImageProgressive.swift */, - 3FBE3CC825141C29EA61B91028C4B641 /* ImageTransition.swift */, - 3DD7D25BCFA9751819BCD3F2BDC1DADF /* ImageView+Kingfisher.swift */, - 1B7B1C545376B4206153C71BE40C5AEC /* Indicator.swift */, - 80DE412ABB3BCE2F9CB926D3216AE310 /* KF.swift */, - 8333AF2A67DB0B10A1EC1CFCA9695C5C /* KFAnimatedImage.swift */, - EF57BFFD3162D2B980770D0A406CFD34 /* KFImage.swift */, - BDDC146350E08D667CAC39E090C75C2D /* KFImageOptions.swift */, - DDAA57CEFD7A7AFC8744CDCEBF92CF26 /* KFImageProtocol.swift */, - 04CF5623EF8000ECBAA5B21C6A5EE3BE /* KFImageRenderer.swift */, - 70B587E605F520B99D8C9612368E06B1 /* KFOptionsSetter.swift */, - 2D7780E35F2A38ACD6F4916FB6CFB54A /* Kingfisher.swift */, - 7E0E3B7CDD5E18DF9FB389779843C4B5 /* KingfisherError.swift */, - FC71AE8F0385A5FDE80EE316A2E8BA05 /* KingfisherManager.swift */, - B9288637E310976581EB191445117591 /* KingfisherOptionsInfo.swift */, - F86FEEBD6F89B9185BB390D9E9E136C6 /* MemoryStorage.swift */, - 32D70BFC272B306916DD7B139CF2ECB3 /* NSButton+Kingfisher.swift */, - B5991DD00FFD8600C5D6FEE044B86C80 /* NSTextAttachment+Kingfisher.swift */, - 038B27C26CCB6F3BDEF6C13ADA63C42A /* Placeholder.swift */, - A79E053CDC7BAF20105F35325F64A81E /* RedirectHandler.swift */, - C4853560BBBA31D1D64F4BE6BD468A7A /* RequestModifier.swift */, - 42FD3E72F2FC57B66B065A5AC16736B4 /* Resource.swift */, - AE192A4884D18DA7A597BA774031EF00 /* Result.swift */, - 227F53DD32685A5DFB4AFADC157F5533 /* RetryStrategy.swift */, - 2AE827B962C8B3FD4C601A505D9FE9F5 /* Runtime.swift */, - 0FBE8665476CB5F9522F7E496FF9C528 /* SessionDataTask.swift */, - 54A84C468FE01C9F47FB7DDACF4CD775 /* SessionDelegate.swift */, - 07E551D848FF88A302FF821108CCD775 /* SizeExtensions.swift */, - B4FDD0D0E2BFB68A5ADDFEA3DC752350 /* Source.swift */, - 8DAA9132FC83BC8605EE7D9293A0BE2B /* Storage.swift */, - FEF87AB08D43D3CE238E19DD48FBFD15 /* String+MD5.swift */, - B7FC5C68B02094F1AAB56B0EA7FB5AEF /* TVMonogramView+Kingfisher.swift */, - 4EC7F635E85D6AFAA4C8BB12A35989E0 /* UIButton+Kingfisher.swift */, - 491B3DEAE0F347AFBF91231A409B1459 /* WKInterfaceImage+Kingfisher.swift */, - AAB1325170E1C9438786C17F0FC8C19C /* Resources */, - 161C1A8E772FC1DDA824FE4855FFE551 /* Support Files */, - ); - path = Kingfisher; - sourceTree = ""; - }; - E824BFB912E1270DE94348EC111A377D /* Support Files */ = { - isa = PBXGroup; - children = ( - CC2B9F105E3156CE2447EA81037C1B0F /* TrustWalletCore-iOS.modulemap */, - 66CD66814EB232CA088A8B6D967EB110 /* TrustWalletCore-iOS-dummy.m */, - A732EE7CA8D337F3C569664B7F178300 /* TrustWalletCore-iOS-Info.plist */, - DB8A11D58DEE8F5651A83854BD0AB9B9 /* TrustWalletCore-iOS-prefix.pch */, - 19D583380E87444FAFF145DF4351FAAD /* TrustWalletCore-iOS-umbrella.h */, - 28C4F7FA258406940F554DB65CBDDB88 /* TrustWalletCore-iOS-xcframeworks.sh */, - 27315C8C7EF44BB4A9FAF21E8BD4AD72 /* TrustWalletCore-iOS.debug.xcconfig */, - 6F0498A7E7D53E85DF3243E71163ABC9 /* TrustWalletCore-iOS.release.xcconfig */, - DBDFEAA37C01F8B03800500746BE26E1 /* TrustWalletCore-macOS.modulemap */, - F96288B61E8FDA839F477E4E6E5B7912 /* TrustWalletCore-macOS-dummy.m */, - 4AE0B1168CF4E0DD2EC366235E91C343 /* TrustWalletCore-macOS-Info.plist */, - BFB725051CBCCAA34C651013E0A4D09C /* TrustWalletCore-macOS-prefix.pch */, - D77F8AE6372DDF824D7B123AEE98EFF5 /* TrustWalletCore-macOS-umbrella.h */, - 34B5CC64CC16B9BC1C39FC27D4FD9DDD /* TrustWalletCore-macOS-xcframeworks.sh */, - FCD68B89B047C8C858D8A92AC01124EF /* TrustWalletCore-macOS.debug.xcconfig */, - 7944105E73D128DCABD3237C26233DF1 /* TrustWalletCore-macOS.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/TrustWalletCore-iOS"; - sourceTree = ""; - }; - FC576CD2BC722F8019484B0783085785 /* Pods-Tokenary */ = { - isa = PBXGroup; - children = ( - 33DA99B277C4621ED7513831A7D1F291 /* Pods-Tokenary.modulemap */, - 7EF88C73FDAD30713F6A3EB9F848C6E3 /* Pods-Tokenary-acknowledgements.markdown */, - C6A741BE90701364C1E97801F6B25322 /* Pods-Tokenary-acknowledgements.plist */, - CDB6E8FBBC079A910F15FC78DCE5399E /* Pods-Tokenary-dummy.m */, - BFFB82C52A4C2622214088703B3D4AFE /* Pods-Tokenary-frameworks.sh */, - 01F2AC03788CFD2342BD9B66A6525800 /* Pods-Tokenary-Info.plist */, - 18DEE602508105D8432D2424E1452D97 /* Pods-Tokenary-umbrella.h */, - 37F715D9963765B2EEAA9F7766C7D941 /* Pods-Tokenary.debug.xcconfig */, - 6C79B6EDDAC5013D98434F63A8C458B6 /* Pods-Tokenary.release.xcconfig */, - ); - name = "Pods-Tokenary"; - path = "Target Support Files/Pods-Tokenary"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 27A71408152D4CDDC8F6199FA583CED6 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - E9E77E2962A1CFD9ADFC6D1BDC23CE9E /* TrustWalletCore-macOS-umbrella.h in Headers */, - 51D5AF5865B303696E09E0B4FD171497 /* TWAccount.h in Headers */, - 7B9C56CBEFEB954A0E3F4D42F436AC31 /* TWAES.h in Headers */, - E58DB42AF836FEE6210D480D40CD06CF /* TWAESPaddingMode.h in Headers */, - 744DA1479EAC55BA8A7333D190DAD881 /* TWAeternityProto.h in Headers */, - 4C1F89BA2D199A90BF21F5A236B3F625 /* TWAionProto.h in Headers */, - 2332D23A040F2956D206D09A4A372B8C /* TWAlgorandProto.h in Headers */, - CEB0A8DBF457BC1380F03350B903ABF9 /* TWAnyAddress.h in Headers */, - 0FA58362A525755439ED770A03C4F24D /* TWAnySigner.h in Headers */, - 8D258B1FAE99F470537EFE4EA0DE466E /* TWAptosProto.h in Headers */, - 82E34CEB36C190971B92A1D536843394 /* TWAsnParser.h in Headers */, - 562E0620788B3D1EC21721C8517F9B0A /* TWBarz.h in Headers */, - 110B765B85DF9B47E6B61B1D62831F9E /* TWBarzProto.h in Headers */, - 6A78E87CD95D2A5BB7BE2E759A3DDB4B /* TWBase.h in Headers */, - 1F06A75F9A6ECBFCEF62DDDECAB758CE /* TWBase32.h in Headers */, - B680ED32FA0B8CECD276B5257650D85E /* TWBase58.h in Headers */, - 9F17F5D6EBEA627E9D346C65C3591D1D /* TWBase64.h in Headers */, - F8C0A943FADBEA4044B8B4E326EC027E /* TWBinanceProto.h in Headers */, - 15BD6C4C24E7C6BB53DFD64805C57591 /* TWBitcoinAddress.h in Headers */, - 379AF7794D9BA266476E6DDD3BC0164E /* TWBitcoinFee.h in Headers */, - C0D0955CADA3CAFB5A458C60687AB0FE /* TWBitcoinMessageSigner.h in Headers */, - 3AD6E8FA600B2398E7FF015CAD0DD05F /* TWBitcoinProto.h in Headers */, - 4FC3F2E55EC677158EDD1132A29EA271 /* TWBitcoinScript.h in Headers */, - DD2FBEEECC9E93B1697E65A4B161B8CA /* TWBitcoinSigHashType.h in Headers */, - 9D863E3D97CC5B3EF97131428F03C02D /* TWBitcoinV2Proto.h in Headers */, - B35BA7A3A6E39F56D9D7FBC5EE1405A5 /* TWBlockchain.h in Headers */, - B6824ED1D9CA0A2127CD226B0F475839 /* TWCardano.h in Headers */, - 14BC5E6287077519602A078EF4BAE83A /* TWCardanoProto.h in Headers */, - 061E53FD092AA5E1B4CC7CB0F4E7CEEF /* TWCoinType.h in Headers */, - 4362019E663ACA5385046706EE66919C /* TWCoinTypeConfiguration.h in Headers */, - 15770BD6F979E2DD6E52FC2631AAF3F5 /* TWCommonProto.h in Headers */, - 1A2A5D3983F86DF96A801C9065737C95 /* TWCosmosProto.h in Headers */, - 839725933435E35CAB77A61F0865C73F /* TWCurve.h in Headers */, - 4F74D06C29F21670BCC4BE61B694CAD4 /* TWData.h in Headers */, - B467289F38F43671BF5B9719FA13FF47 /* TWDataVector.h in Headers */, - A91944B38074D64992CE8CBB941149E9 /* TWDecredProto.h in Headers */, - 41D623B7ED39869A022C7585EDA38262 /* TWDerivation.h in Headers */, - E5E8D46DE9763AF20BFC86590BD7B6A5 /* TWDerivationPath.h in Headers */, - 31E781D84C51AB8E8D0D5A81BA801126 /* TWDerivationPathIndex.h in Headers */, - 3C00119B6C911CD3F12B33ADF17312D9 /* TWEOSProto.h in Headers */, - 76454D9E17F7B04BC2ECE79EC84D0321 /* TWEthereum.h in Headers */, - 944A661E919FDB822CA6FE4CC78118CB /* TWEthereumAbi.h in Headers */, - 69B5585B934F0E0E56C589C40ABCA8DF /* TWEthereumAbiFunction.h in Headers */, - 681C553670A8A9EDCBBC4BE28D93AABF /* TWEthereumAbiProto.h in Headers */, - 9A952E826493AC549C9B122D8473AAA9 /* TWEthereumAbiValue.h in Headers */, - 77164B953D90EF5B839B7A2EFF3595EB /* TWEthereumChainID.h in Headers */, - F44A529BED45F60A9FDF39CDEB2F92BD /* TWEthereumMessageSigner.h in Headers */, - 300712E3E5B9A26028DEA68E8DCE97E1 /* TWEthereumProto.h in Headers */, - 8E6311926D99FD4F26E0018D1C1F2068 /* TWEthereumRlp.h in Headers */, - 88361EB477DAE1A781054607E3D7459B /* TWEthereumRlpProto.h in Headers */, - 7F07BB52F0E8F15ED9251912C6011F3A /* TWEverscaleProto.h in Headers */, - A9330470550EA75B0D25F0D7861128D6 /* TWFilecoinAddressConverter.h in Headers */, - 3E366954CE51D034D4FAE4CDB647B89F /* TWFilecoinAddressType.h in Headers */, - FF9FC6298D03E5F86A342DE31151DC76 /* TWFilecoinProto.h in Headers */, - EB287D1AED107CECBA659EF98880B080 /* TWFIOAccount.h in Headers */, - 07457F62C7DBB9F58F5869D49CF43731 /* TWFIOProto.h in Headers */, - D4AFD4A487551FDEF8E23FF31FF1CB26 /* TWGreenfieldProto.h in Headers */, - 7EDD28BC8BF1F15B0958FF2492140ED6 /* TWGroestlcoinAddress.h in Headers */, - C55D5DB7F16D0E1FFC705D201A35C450 /* TWHarmonyProto.h in Headers */, - 6ED3D4E08CC7472AE0C1D91DAA9CB4B1 /* TWHash.h in Headers */, - 0BA35A7BBC38B2C73B763A8FCC4F4D89 /* TWHDVersion.h in Headers */, - B9A3F7232CA4BBAD7C3962635AD9AB97 /* TWHDWallet.h in Headers */, - CEBFCF5EFB31D05F23173789A5BC634C /* TWHederaProto.h in Headers */, - D3C9245C469B3C310BA50C838887F96B /* TWHRP.h in Headers */, - 09117B656B4DFD6853AF1DF9A992C817 /* TWIconProto.h in Headers */, - 16229AB61E90428D9DADE98C4C929A7D /* TWIOSTProto.h in Headers */, - B12815F5EDBF37AB1C035FB9D1CA9E5B /* TWIoTeXProto.h in Headers */, - 66A108968E1BB5B1E6FDE39D7F6B9D6C /* TWLiquidStaking.h in Headers */, - BBE009A52892325BEDB3FC6BE94E0706 /* TWLiquidStakingProto.h in Headers */, - AD151842000A902CF99795BC3F2E9AD1 /* TWMnemonic.h in Headers */, - D0DFBEA1357F6F4D18585B28CBC4C08C /* TWMultiversXProto.h in Headers */, - FB74DB0934513A8482AF36A8142CD1DD /* TWNanoProto.h in Headers */, - 6EF19F9601D42B24AECCFAF9608B80C1 /* TWNEARAccount.h in Headers */, - CDA967EC5B178A998AAC0290AEAE566D /* TWNEARProto.h in Headers */, - AD2662434C55ABD29C70880A673AEF0E /* TWNebulasProto.h in Headers */, - BCACA380816ABD2B56157170F1384601 /* TWNEOProto.h in Headers */, - B36F14DB116F09B4DE730CABF2CC3B84 /* TWNervosAddress.h in Headers */, - 35ECB1320EC5EECC79D86E16F31EE77D /* TWNervosProto.h in Headers */, - B52531D0C775C5DB6DCBF9D65BAC68CA /* TWNimiqProto.h in Headers */, - 8E60C028138AFC6D564FD583B6165697 /* TWNULSProto.h in Headers */, - AFB9D817A09283527D65751102C05FFF /* TWOasisProto.h in Headers */, - 6C28D50A190DD763196CD8F46C3FCAE1 /* TWOntologyProto.h in Headers */, - D7881D4CE9DD02793778483265EBCCEA /* TWPBKDF2.h in Headers */, - DBE43848EFAC2A2154460F326F64BE9F /* TWPolkadotProto.h in Headers */, - F949E1CE489F7F07AF9C2315C35EAE7F /* TWPrivateKey.h in Headers */, - B44A0BDD3FAEF86715CD20B2FA91FB73 /* TWPrivateKeyType.h in Headers */, - A90CB260F4DD53AE25179CC4F7DC2B35 /* TWPublicKey.h in Headers */, - 2D6CA0C3EB8948EDCFB1766CD7E5F01A /* TWPublicKeyType.h in Headers */, - 0B067F5E23F638653368AF4BB40CB39B /* TWPurpose.h in Headers */, - F6F208490258BDD08EB75C861CC93432 /* TWRippleProto.h in Headers */, - A8B375B024F87E1C35518ABCBA54177D /* TWRippleXAddress.h in Headers */, - 8F50323B199D0DF5536BFD93E581B49F /* TWSegwitAddress.h in Headers */, - 26FF03869C0B13C9D03789A7B698E75C /* TWSolanaAddress.h in Headers */, - 652F9D3EFA5AA86E874793BA3338BBEA /* TWSolanaProto.h in Headers */, - BC46BD2E9446BAA33FF84C9406D66CF4 /* TWSS58AddressType.h in Headers */, - 1AE5A4532403E0AD2D188BED0476AE03 /* TWStarkExMessageSigner.h in Headers */, - D696284E68AB7B84A550F561913D574E /* TWStarkWare.h in Headers */, - 2D8F7DE4D95763A541CD0E731D2E5B62 /* TWStellarMemoType.h in Headers */, - 27ED5CFDFEBBA3BAAA907C24DABE7FBF /* TWStellarPassphrase.h in Headers */, - B093AB28F6C3EBA7BA6A2417C3E599A5 /* TWStellarProto.h in Headers */, - B58D0371BEF7994E8E1BBE3D01E95282 /* TWStellarVersionByte.h in Headers */, - 9243E6D1DA94115265C5DA8088D1F8EB /* TWStoredKey.h in Headers */, - 912192E5DCB87EDC5136673C2F389030 /* TWStoredKeyEncryption.h in Headers */, - A64A3B88285A0E98693D4BFE892968E5 /* TWStoredKeyEncryptionLevel.h in Headers */, - A4486F7B16336038369C9A3D556B3EDE /* TWString.h in Headers */, - 3986561660B9D411F28CD62AA1DDF9DC /* TWSuiProto.h in Headers */, - 665A527F690D4CE9FDD99CF32CB35DDB /* TWTezosMessageSigner.h in Headers */, - FBC812B22797604FC78D43583634002F /* TWTezosProto.h in Headers */, - A0BFBA8B8DC654E02355F5B8BA4E14D4 /* TWTheOpenNetworkProto.h in Headers */, - 710CAC5C04E3E0AC69CD8B7ED5A6D2FC /* TWThetaProto.h in Headers */, - 743B0DCCFC394C26B9C0DF171879E3A5 /* TWTHORChainSwap.h in Headers */, - AC399FC1DB0A23D4FCD75D12D2098471 /* TWTHORChainSwapProto.h in Headers */, - 594D890F583B6D59710126360BA5EFEF /* TWTransactionCompiler.h in Headers */, - 7B7C416FBA8F74697EB8F966B5286677 /* TWTransactionCompilerProto.h in Headers */, - 8C80CD76734DE8CCA552C720173E7178 /* TWTronMessageSigner.h in Headers */, - 003786AE08E1D0681F4FB6D868351DFC /* TWTronProto.h in Headers */, - 943D9EFEEDB7B5C925B29BA65FB3FACA /* TWUtxoProto.h in Headers */, - 28B8C01ECF851391F947352F0FB779B9 /* TWVeChainProto.h in Headers */, - E9EC7E083290927ADCE250D0859F5BF8 /* TWWavesProto.h in Headers */, - B3E09D4DE5283676566ACFAA664DA9E0 /* TWWebAuthn.h in Headers */, - 1076FA35049E50D7B35CE447DDA807CC /* TWZilliqaProto.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4A1D97EBF4CF69644A3D977EA067EC30 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 7A7FE406F33548C8276A7696A8F1E510 /* SwiftProtobuf-macOS-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 90814B0D68ED5E9B62D4DB3145ECCCE4 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - E8490415BFC01A17D8D8C27CA3C5B3A4 /* SwiftProtobuf-iOS-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A71E039760FB02BC60EBDCE5DAFF5CE7 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CC7386397848B5D84EA3FFFB35CC12FE /* Kingfisher-macOS-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - AC417E8D763157F1647B1AF3AC83E967 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - EDD28C3764230485FD5D98A4F400E51C /* Pods-Tokenary iOS-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - AF10B3C0BA110E83F636851B3DB41174 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 3927EFB62A493A1C84822AE59B2E11BF /* BigInt-iOS-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B659461AD23CFEAFFDE5E76D039208D8 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - B0B07C7C89AABD1A0588F91F2550C0FF /* TrustWalletCore-iOS-umbrella.h in Headers */, - 25A92C5C0AF10C434F092BF3025D1805 /* TWAccount.h in Headers */, - 78C78E719275712CB19E84C74DD632CF /* TWAES.h in Headers */, - 66052A6ED0B31C2E791664E0FFCABA00 /* TWAESPaddingMode.h in Headers */, - B616D9819CDA8A8DB7DC030C965FE357 /* TWAeternityProto.h in Headers */, - 78406B693FA5D3F8F390CB6AE3CC06BD /* TWAionProto.h in Headers */, - 895183AA411E9B1B10B467BB98DDBF0B /* TWAlgorandProto.h in Headers */, - DFB68DD397D943D1CBE781681F00529F /* TWAnyAddress.h in Headers */, - BB7168C79C4AC88C9236CCA6A06FBCEE /* TWAnySigner.h in Headers */, - 6CEDDE007D4D5C22AA5DBCA27DD29EE8 /* TWAptosProto.h in Headers */, - CB2308ADA9BC9FE496B4C146D97A99AF /* TWAsnParser.h in Headers */, - 956407AF28A7A6D6D1082B4F95E162EA /* TWBarz.h in Headers */, - 725B5270C0A164C9FE37A9CB45579AAD /* TWBarzProto.h in Headers */, - A28763AB3906E49FC8311DF2A4A3E590 /* TWBase.h in Headers */, - 0E3B699BE8D4C27407CDDF23361AA805 /* TWBase32.h in Headers */, - D21F4B19748D48A0BA13C47A4D331406 /* TWBase58.h in Headers */, - 56642A194012A91637CE147B590106AF /* TWBase64.h in Headers */, - 11B785814FF2BCE0EBE7E5E1F566EECE /* TWBinanceProto.h in Headers */, - 12F9D3BB5BD1A065C717387322661A48 /* TWBitcoinAddress.h in Headers */, - A593F7B8975317B2D8835ED1FA0C419D /* TWBitcoinFee.h in Headers */, - C961633AF3304BBE4C42E3C5CD6A00D3 /* TWBitcoinMessageSigner.h in Headers */, - FAE4FE2F1BCDC0ECF7AE6ECB7392BAA2 /* TWBitcoinProto.h in Headers */, - E84E3B503D89BB1519D3CE39C5247610 /* TWBitcoinScript.h in Headers */, - B4CD96A8573434A51C004C525F392663 /* TWBitcoinSigHashType.h in Headers */, - 2BDB99B83F43507AB3F2FFCACDB6B7D5 /* TWBitcoinV2Proto.h in Headers */, - E3E80FD33179644F205753F327B5C9B6 /* TWBlockchain.h in Headers */, - 42DA9A7123746B0D4D1E035D72AF6F59 /* TWCardano.h in Headers */, - AE8E8D94EE5F9546E409594A74908CFE /* TWCardanoProto.h in Headers */, - C43C3D3F8176655C665B22BB1556478D /* TWCoinType.h in Headers */, - C0DF9D19015CE1D318799959F9DA2CFD /* TWCoinTypeConfiguration.h in Headers */, - 60B56B8B6E737746F233D2C564030548 /* TWCommonProto.h in Headers */, - 52FE5D4594BC28ECC5E78D379BFF93F5 /* TWCosmosProto.h in Headers */, - FEE8CD74C76A1F5451F44E15F7FFA535 /* TWCurve.h in Headers */, - 1D516A18272C623586E3C1AEAAD69054 /* TWData.h in Headers */, - 52F6FA2C50239DB6CCD6E18BFFDFE9B3 /* TWDataVector.h in Headers */, - 10F1D0A75C3928D95C0415F337A41387 /* TWDecredProto.h in Headers */, - 023C10C52B2FBB07186FFB570322A06F /* TWDerivation.h in Headers */, - DE4F3C8B92C47E29394B1D72DB2BBB0C /* TWDerivationPath.h in Headers */, - A2924EB5A3BFFF8823DFC256CC3439D6 /* TWDerivationPathIndex.h in Headers */, - 30110CB5269D9462E5A0A6E6AA5AF5E2 /* TWEOSProto.h in Headers */, - 087FC4DE2FDCD6DE46922D4E634A23D0 /* TWEthereum.h in Headers */, - CCF43D7960AC4ADF3933423F695C2D2B /* TWEthereumAbi.h in Headers */, - C88231E913AD129235FA62465E939F9B /* TWEthereumAbiFunction.h in Headers */, - 1E54C81264CDF6FF81265913811FCCF1 /* TWEthereumAbiProto.h in Headers */, - DBC384C337C7D5B4486B81167D3BAA5D /* TWEthereumAbiValue.h in Headers */, - FA37FF81DCC8292055524C33B42BB1B9 /* TWEthereumChainID.h in Headers */, - CCE9142FF4EAEB00D8B5F50992C4E6AC /* TWEthereumMessageSigner.h in Headers */, - 9F1DCE0266CE8267BE77C729CA2B8259 /* TWEthereumProto.h in Headers */, - 868878F4F80DD1DA2C19B7215D973A38 /* TWEthereumRlp.h in Headers */, - 9369C812D89AA99D24D8A99885942064 /* TWEthereumRlpProto.h in Headers */, - D5B62721201A62DB98046C7ED14FC443 /* TWEverscaleProto.h in Headers */, - DCB0A2CE9530ED8E91C6BEEBA39CA33C /* TWFilecoinAddressConverter.h in Headers */, - 5288A542B45C4913A906C92274BAC0F0 /* TWFilecoinAddressType.h in Headers */, - 2BE99D2F55D426776A4019773778DECB /* TWFilecoinProto.h in Headers */, - 24D25AF8F3846A8AE9B4AD4D86676CEA /* TWFIOAccount.h in Headers */, - 6D9E6F6B836A097E6FD44D9E4B5AC9B9 /* TWFIOProto.h in Headers */, - 93D8242B37682C434E4039EDE5FE9802 /* TWGreenfieldProto.h in Headers */, - 753B26A8F9C7A49323255AAA9ECE32CE /* TWGroestlcoinAddress.h in Headers */, - B21AE1F924DF5B3130156E9D7B845C27 /* TWHarmonyProto.h in Headers */, - B71CEE72F3E392D109A8C0782BDCFFA8 /* TWHash.h in Headers */, - C1F24D9309DFBF7ED95E2D2CAD824C5C /* TWHDVersion.h in Headers */, - A9758C6E961BA69848BF27A3E4201375 /* TWHDWallet.h in Headers */, - 8CB4D867328DA1E7FC718FC406D421C4 /* TWHederaProto.h in Headers */, - 82D30C6AB6267F38B056350BCCFA356B /* TWHRP.h in Headers */, - C6C31896350D58950C1D4C9A517F564E /* TWIconProto.h in Headers */, - 2BAB7814B25D7129F467BD7C51558718 /* TWIOSTProto.h in Headers */, - 755CB40AC7969FF604707CA665FA180C /* TWIoTeXProto.h in Headers */, - 20D2E6082426AB619DDB6A5871B9C93A /* TWLiquidStaking.h in Headers */, - 97AC5CC8691683C221E81F4A2DAA086D /* TWLiquidStakingProto.h in Headers */, - 6FE929C82C6DDE1BE085F2CB810B494F /* TWMnemonic.h in Headers */, - 4F462617E4A35C5770536F97C91F0354 /* TWMultiversXProto.h in Headers */, - 1C9777CEF88893F0BB92080F689FEF38 /* TWNanoProto.h in Headers */, - 3034E2D14B3134762802DDAF9A5B416F /* TWNEARAccount.h in Headers */, - 92008664B2714E91A0FE98C510D9CD75 /* TWNEARProto.h in Headers */, - 4BC74C208E8A4E24C4B8191E80747F59 /* TWNebulasProto.h in Headers */, - 15B3FC128AF031966347883702F50D9A /* TWNEOProto.h in Headers */, - C24262B49D37473E232CA304F0C317E1 /* TWNervosAddress.h in Headers */, - C08B4B383BA209F2820F3EE84972F8D5 /* TWNervosProto.h in Headers */, - 9E6F574ED2CAE3945C73C3D7C70F2CDA /* TWNimiqProto.h in Headers */, - D0B9E1D781DB497EEDD30A2965DE904E /* TWNULSProto.h in Headers */, - DF6F363651238F77B09D436B7445BA80 /* TWOasisProto.h in Headers */, - 34A2A3B5B0CA50B787DA208757C657C6 /* TWOntologyProto.h in Headers */, - B4C48E44F67BD0DEBAE292045F8A53B3 /* TWPBKDF2.h in Headers */, - 4088F55E96323C494C8042854901C968 /* TWPolkadotProto.h in Headers */, - F4E2A09694F62DF760C536DAC13A0DEC /* TWPrivateKey.h in Headers */, - 01467324479375D7823E65ED15F88D38 /* TWPrivateKeyType.h in Headers */, - 75C2EE1909653E4056F8F61AF65ED81F /* TWPublicKey.h in Headers */, - D5A60D3FF526A2B44FBE0E80FA4F259D /* TWPublicKeyType.h in Headers */, - 22BC6161C75AE95DEFBDC4AD5B034D36 /* TWPurpose.h in Headers */, - 54BCF8F1F8058D8EA7B52E35F47BDA44 /* TWRippleProto.h in Headers */, - E8DF23AD07FDD99640DEAE462F895E98 /* TWRippleXAddress.h in Headers */, - D46ED32EF87BCB4C39AE4DDDF94741A1 /* TWSegwitAddress.h in Headers */, - 1FE5FB8D599675B1F34C7DA85384DB8F /* TWSolanaAddress.h in Headers */, - 5AC5A2BB31034D89BE94F5043704CF0D /* TWSolanaProto.h in Headers */, - 4F67F07C7DAC75922AEF0A568D63402C /* TWSS58AddressType.h in Headers */, - 4A42A5DEFF810BD0A574E057EA44D81D /* TWStarkExMessageSigner.h in Headers */, - C6D03322E6C7A81B5DEDC620D4302200 /* TWStarkWare.h in Headers */, - 971D1A7AAB43F940B0613AF295D50B49 /* TWStellarMemoType.h in Headers */, - 68C30C737080DEECAD17A98436A8F638 /* TWStellarPassphrase.h in Headers */, - 6682B9C48F1DF16C29D32D7EFB04BC45 /* TWStellarProto.h in Headers */, - A6D8A16DE0582104088A4A1990F799EA /* TWStellarVersionByte.h in Headers */, - 7BC8E110F4A711DDF2E64731D005C3D2 /* TWStoredKey.h in Headers */, - 288F3969CE7168765F088B71299BCB93 /* TWStoredKeyEncryption.h in Headers */, - 8D1D57184FE43E97A413D8A93FAD2078 /* TWStoredKeyEncryptionLevel.h in Headers */, - F792F7810A316D0360FC2C73DA0E3676 /* TWString.h in Headers */, - D061ECE3D6E6BAB228826B14DFC0DB34 /* TWSuiProto.h in Headers */, - 4E43A38A4C1C7CF8A4B5574B2D130A24 /* TWTezosMessageSigner.h in Headers */, - ABFB084CB69978CA0E9554CC4CC2E517 /* TWTezosProto.h in Headers */, - 6FCD564D37539B240F6CC7B09C1C4680 /* TWTheOpenNetworkProto.h in Headers */, - 443F48CFD7099C89B5289BB481BA4B26 /* TWThetaProto.h in Headers */, - 4767194E44BDCC18E8EB935AF4F17D35 /* TWTHORChainSwap.h in Headers */, - 5E4243C0516491E0D72130A0595D3BA0 /* TWTHORChainSwapProto.h in Headers */, - 591C73B5D1218CCFA65FF071AE91DA44 /* TWTransactionCompiler.h in Headers */, - 28B73194049D116A3345503C2D67E8C2 /* TWTransactionCompilerProto.h in Headers */, - 9ABB6D378AD2EDDC222C36BCF3134B84 /* TWTronMessageSigner.h in Headers */, - 4663D0DA66F890B2992A571D97F7F369 /* TWTronProto.h in Headers */, - 152CD918C32923D9AD042BE70CB9F44E /* TWUtxoProto.h in Headers */, - 686CD9D2D39FFEF97BBE558F1A38D4BE /* TWVeChainProto.h in Headers */, - F7FB1D21B68F20A2F1624A804ECA838B /* TWWavesProto.h in Headers */, - 83B80E4833B7EE1122E1C91B8A0F2B30 /* TWWebAuthn.h in Headers */, - 1296991D86D4242D604271C2E90C1A65 /* TWZilliqaProto.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C07AF2FB2D13B39B2BF89A55A612C8C7 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 43C3D659834550972C055EFE4A5E0D1F /* BigInt-macOS-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F694563FC94D01B6F42D8C58638CD42D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6427AB3F78A63395FCEBB3C8CDC3AE1F /* Pods-Tokenary-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FB4B5432AE101454E2B7416422C7E4E4 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - BBBBDB605F6C85629E1473F82C0C0189 /* Kingfisher-iOS-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 357D7AA757B0ED4603C9CD1523BC234E /* SwiftProtobuf-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = FEE4952B3E7B87C982FC623FE25108C7 /* Build configuration list for PBXNativeTarget "SwiftProtobuf-iOS" */; - buildPhases = ( - 90814B0D68ED5E9B62D4DB3145ECCCE4 /* Headers */, - 7DD4D55C2F2D6DA20324BCB0A2C02CB8 /* Sources */, - 5ADD0AEAA01EAAB7518BED62091DD8AF /* Frameworks */, - F16C3FAB1A9D5E98CDC2D3E1FF89105D /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "SwiftProtobuf-iOS"; - productName = SwiftProtobuf; - productReference = 8AF0E4BE6CB89D1A02A14081360DFD8C /* SwiftProtobuf.framework */; - productType = "com.apple.product-type.framework"; - }; - 63F854E532D7CBA393D37B6C84E1F23F /* BigInt-macOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2A0AB7877638824B76668926D08268E2 /* Build configuration list for PBXNativeTarget "BigInt-macOS" */; - buildPhases = ( - C07AF2FB2D13B39B2BF89A55A612C8C7 /* Headers */, - 8A29990D2605C5BB8FBFA93455DF37D5 /* Sources */, - D5CA893B60276474155111B744B76F54 /* Frameworks */, - B15526C1D4D63DCB2496947F0D87EA71 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "BigInt-macOS"; - productName = BigInt; - productReference = 59C5DD41EE313A65C03650784BF278F3 /* BigInt.framework */; - productType = "com.apple.product-type.framework"; - }; - 65AA93B2B9CF39819DBD1DDF58FCBC15 /* Kingfisher-macOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 245A53667EC4962A9A202364BE68E650 /* Build configuration list for PBXNativeTarget "Kingfisher-macOS" */; - buildPhases = ( - A71E039760FB02BC60EBDCE5DAFF5CE7 /* Headers */, - D61130416DB2FFFDDCB8AC721FAC490C /* Sources */, - 60F370B0AC87A8DB786A896C86F76EB6 /* Frameworks */, - F8EF325E3DB01FF703611BBA2E285EE3 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - C498783FD4DB8D702869FC72A48519F5 /* PBXTargetDependency */, - ); - name = "Kingfisher-macOS"; - productName = Kingfisher; - productReference = 9537468CF4D5C16DB31E0F967000827C /* Kingfisher.framework */; - productType = "com.apple.product-type.framework"; - }; - 685A5AC5E317EE1D980ECCFE9E6EB08A /* Kingfisher-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5D8F9D17BE2EC05AD83C8FBD44624A73 /* Build configuration list for PBXNativeTarget "Kingfisher-iOS" */; - buildPhases = ( - FB4B5432AE101454E2B7416422C7E4E4 /* Headers */, - E51D884523487E3FB1958B5C189D9349 /* Sources */, - C1C6D8A7DDE5BBCAC3DB8BE09757CCB2 /* Frameworks */, - 849EFFFE29FEB5D08B9C94440FB0C037 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - F60D9692BB2A04859B066EDACEE46C00 /* PBXTargetDependency */, - ); - name = "Kingfisher-iOS"; - productName = Kingfisher; - productReference = 0C37C0511F5A16369B30672CB6BA6D00 /* Kingfisher.framework */; - productType = "com.apple.product-type.framework"; - }; - 7B76B3A65EC90BE00011B16DE4F49E38 /* Kingfisher-iOS-Kingfisher */ = { - isa = PBXNativeTarget; - buildConfigurationList = 373CDCBE6DCD1CD9E45B43BB90ECBD19 /* Build configuration list for PBXNativeTarget "Kingfisher-iOS-Kingfisher" */; - buildPhases = ( - D2D24F6965FCEB759F45BFD39E338ECC /* Sources */, - 43BE89B9A177D0DFDD7E3CCD275F71F8 /* Frameworks */, - 01A0AEE54B5691DC9735769BC0766E09 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Kingfisher-iOS-Kingfisher"; - productName = Kingfisher; - productReference = D8CBDEF9B0EB359E8FD0F5FA8C86428A /* Kingfisher-iOS-Kingfisher */; - productType = "com.apple.product-type.bundle"; - }; - 889A3C6D0A70D789D17B7BFFE160AD76 /* BigInt-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = BD65D1C1142848D64515247057F83113 /* Build configuration list for PBXNativeTarget "BigInt-iOS" */; - buildPhases = ( - AF10B3C0BA110E83F636851B3DB41174 /* Headers */, - 89FFD51E5DC04DA0571E450676865A25 /* Sources */, - E54A44C1AD16FC8F9A7341EA035DBB41 /* Frameworks */, - C66E754E592A8010CADC3D055BB5C5FC /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "BigInt-iOS"; - productName = BigInt; - productReference = F3E0621221B49CBB46826033D3DEB84B /* BigInt.framework */; - productType = "com.apple.product-type.framework"; - }; - AA186741961F10502016CE44BFED6684 /* SwiftProtobuf-macOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = BB16C76B183D3F6072E5A755D4F31FB2 /* Build configuration list for PBXNativeTarget "SwiftProtobuf-macOS" */; - buildPhases = ( - 4A1D97EBF4CF69644A3D977EA067EC30 /* Headers */, - E2BE38F0B0884AECC6E36B93D5B9F281 /* Sources */, - F59FDF0A0781E05136524ECD000226E0 /* Frameworks */, - 14A8AB0F5FA4A05C998267580EDC7BFD /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "SwiftProtobuf-macOS"; - productName = SwiftProtobuf; - productReference = 5F52C76D0CC7F92C551EC2E40D9320AB /* SwiftProtobuf.framework */; - productType = "com.apple.product-type.framework"; - }; - AA69821F03C2BC35F1E5A4AF5FE590CA /* Pods-Tokenary */ = { - isa = PBXNativeTarget; - buildConfigurationList = B2DE3ECFE17BADA76CA213792EAF61FE /* Build configuration list for PBXNativeTarget "Pods-Tokenary" */; - buildPhases = ( - F694563FC94D01B6F42D8C58638CD42D /* Headers */, - 79A5EE341BF03B2C5C58751DDABC543D /* Sources */, - 4BF75EB7EA3D671A783A5A3AE47C2D28 /* Frameworks */, - ED8D67F0550B560EAD17173721C0E7F2 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - AFC30FE7E9E5AC151AA5A3E82C39480B /* PBXTargetDependency */, - 675FF77F3794C7567EA7C541FE0089C4 /* PBXTargetDependency */, - 88CAF40609C92C796DB1375CCD537280 /* PBXTargetDependency */, - E3C2506DB0269D2B93CA23BA426576DE /* PBXTargetDependency */, - ); - name = "Pods-Tokenary"; - productName = Pods_Tokenary; - productReference = 95BAA53196A79D500C92AFCCDED26039 /* Pods-Tokenary */; - productType = "com.apple.product-type.framework"; - }; - B2085DBECFAD83713FC1BE448B7882B0 /* Kingfisher-macOS-Kingfisher */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1450C517A56545505AA528DE55B390AB /* Build configuration list for PBXNativeTarget "Kingfisher-macOS-Kingfisher" */; - buildPhases = ( - 9915D07EE484F93A414C557527B06A1C /* Sources */, - 945ABB419AEFD873484B57BA749F5530 /* Frameworks */, - 2DDD227DDF6D88D7ABC9933E32851FEC /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Kingfisher-macOS-Kingfisher"; - productName = Kingfisher; - productReference = 5DEA2DA8FDA7BAA10038CC169BBB4E50 /* Kingfisher-macOS-Kingfisher */; - productType = "com.apple.product-type.bundle"; - }; - CE0DF9902CC5CC81D77770A1E35CCFDE /* Pods-Tokenary iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 051A3664284FD94EF21F59CA3E7680D7 /* Build configuration list for PBXNativeTarget "Pods-Tokenary iOS" */; - buildPhases = ( - AC417E8D763157F1647B1AF3AC83E967 /* Headers */, - CAA775C982B733CD9CCFBC90C82A2C2E /* Sources */, - 4D8E03313B374036A678C33A5D72D7D0 /* Frameworks */, - A3BCCA9D6FB37EC3A81B9802D621C78C /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 75813E9BD28B7ABFB7E2A86A0400E822 /* PBXTargetDependency */, - 05735F0E0C09BED2575045B0BA961A02 /* PBXTargetDependency */, - B857EEB8ED8D6A2AC36E86D737D358E6 /* PBXTargetDependency */, - DC15C11FD181AC4DFB2305CAEC2D9AE5 /* PBXTargetDependency */, - ); - name = "Pods-Tokenary iOS"; - productName = Pods_Tokenary_iOS; - productReference = 985063CF25F026FD329CB9B4D9F3E0A6 /* Pods-Tokenary iOS */; - productType = "com.apple.product-type.framework"; - }; - D84FF1ABB5E840CFBA9F610D26DFB42D /* TrustWalletCore-macOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 42ACB9D81C1D57B6E091C452C1994761 /* Build configuration list for PBXNativeTarget "TrustWalletCore-macOS" */; - buildPhases = ( - 27A71408152D4CDDC8F6199FA583CED6 /* Headers */, - 44E34B0D1211B204F7D09E2CDFC75DB3 /* [CP] Copy XCFrameworks */, - EEF6B8BC508A9DED31D6BC7685A8B86C /* Sources */, - 6C1B7096411BCB5077FA9E34BF3CBDFB /* Frameworks */, - 026F0FF3D1CE5F58248FA2ECAB747005 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - FE64FBC8848EF31F57F06D287B6F53F0 /* PBXTargetDependency */, - ); - name = "TrustWalletCore-macOS"; - productName = WalletCore; - productReference = 0A90AABC168E7ACBF249426FCA99F19B /* WalletCore.framework */; - productType = "com.apple.product-type.framework"; - }; - DC6F436FE9D7D62655988D0B8E3A24DE /* TrustWalletCore-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = C8291E1E98ACB4F162DC260A885FFE2B /* Build configuration list for PBXNativeTarget "TrustWalletCore-iOS" */; - buildPhases = ( - B659461AD23CFEAFFDE5E76D039208D8 /* Headers */, - FDAF0B55A7C13AD9A2122138E85D0CE9 /* [CP] Copy XCFrameworks */, - 4A428C4EEF6C047ED12264DE1310839E /* Sources */, - 8D1193D5565FDF4E920B2EEC8D777512 /* Frameworks */, - F2158E9EC36A7EA92F45020BC1DD82C1 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - F585E7B7CDA2D0A3A032DBB462466983 /* PBXTargetDependency */, - ); - name = "TrustWalletCore-iOS"; - productName = WalletCore; - productReference = 60CD9336BF0D87EB43F318C3C417DB66 /* WalletCore.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BFDFE7DC352907FC980B868725387E98 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1500; - LastUpgradeCheck = 1500; - }; - buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 12.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - Base, - en, - ); - mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = B78DABFD0FF99A4E1D9017C73F2ABA12 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 889A3C6D0A70D789D17B7BFFE160AD76 /* BigInt-iOS */, - 63F854E532D7CBA393D37B6C84E1F23F /* BigInt-macOS */, - 685A5AC5E317EE1D980ECCFE9E6EB08A /* Kingfisher-iOS */, - 7B76B3A65EC90BE00011B16DE4F49E38 /* Kingfisher-iOS-Kingfisher */, - 65AA93B2B9CF39819DBD1DDF58FCBC15 /* Kingfisher-macOS */, - B2085DBECFAD83713FC1BE448B7882B0 /* Kingfisher-macOS-Kingfisher */, - AA69821F03C2BC35F1E5A4AF5FE590CA /* Pods-Tokenary */, - CE0DF9902CC5CC81D77770A1E35CCFDE /* Pods-Tokenary iOS */, - 357D7AA757B0ED4603C9CD1523BC234E /* SwiftProtobuf-iOS */, - AA186741961F10502016CE44BFED6684 /* SwiftProtobuf-macOS */, - DC6F436FE9D7D62655988D0B8E3A24DE /* TrustWalletCore-iOS */, - D84FF1ABB5E840CFBA9F610D26DFB42D /* TrustWalletCore-macOS */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 01A0AEE54B5691DC9735769BC0766E09 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BE16F4824CC3221A6FEAD36E72D79334 /* PrivacyInfo.xcprivacy in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 026F0FF3D1CE5F58248FA2ECAB747005 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 14A8AB0F5FA4A05C998267580EDC7BFD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2DDD227DDF6D88D7ABC9933E32851FEC /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - CCD8F2BA6DD1BFA4D6154FD140FE1A94 /* PrivacyInfo.xcprivacy in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 849EFFFE29FEB5D08B9C94440FB0C037 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ECFB3B908AD207E14E098F2E4A3E4821 /* Kingfisher-iOS-Kingfisher in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A3BCCA9D6FB37EC3A81B9802D621C78C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B15526C1D4D63DCB2496947F0D87EA71 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C66E754E592A8010CADC3D055BB5C5FC /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - ED8D67F0550B560EAD17173721C0E7F2 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F16C3FAB1A9D5E98CDC2D3E1FF89105D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F2158E9EC36A7EA92F45020BC1DD82C1 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F8EF325E3DB01FF703611BBA2E285EE3 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2FC03836589A988B8AEFB82A414A4AE8 /* Kingfisher-macOS-Kingfisher in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 44E34B0D1211B204F7D09E2CDFC75DB3 /* [CP] Copy XCFrameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks-input-files.xcfilelist", - ); - name = "[CP] Copy XCFrameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - FDAF0B55A7C13AD9A2122138E85D0CE9 /* [CP] Copy XCFrameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-xcframeworks-input-files.xcfilelist", - ); - name = "[CP] Copy XCFrameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-xcframeworks-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-xcframeworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 4A428C4EEF6C047ED12264DE1310839E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FFAE18C17EDD41655FF236976139BE5D /* Account.swift in Sources */, - 8B0C07771D6F5D1FC88AE2F091D33D90 /* Account+Codable.swift in Sources */, - 4CDAEAD4B694812DC0A514FB16CC60F5 /* AddressProtocol.swift in Sources */, - DC44FAFF6EEC3E8A93897D5F4F047303 /* AES.swift in Sources */, - C89A07BBC2DD2D602C4E9F20A25D0582 /* AESPaddingMode.swift in Sources */, - 79545542BAFEDE034BF426AE78CE3C6C /* Aeternity+Proto.swift in Sources */, - F08B1B60364AE3B7DB3BB64EB7B2BEB8 /* Aeternity.pb.swift in Sources */, - 1127E6F45B409F7B9361A88095571730 /* Aion+Proto.swift in Sources */, - 375DD2C0FEA7EC4F93F10BFDDE239310 /* Aion.pb.swift in Sources */, - 9F4AD2DAEE8BBD8A0DB327C22ABCBF49 /* Algorand+Proto.swift in Sources */, - ED59EF47E8A805CB79DDE8CE35E47A36 /* Algorand.pb.swift in Sources */, - BF4CDE5C30FD4B74C132E47DB51E4429 /* AnyAddress.swift in Sources */, - AB4462152B89A09422A535E8C351EFD0 /* AnySigner.swift in Sources */, - C0E69DACC0A99519671226C7343635D8 /* Aptos+Proto.swift in Sources */, - 87BF0210E0EFC038F21CB82DC26B19DB /* Aptos.pb.swift in Sources */, - 79BC9812962E0DE5B0DEC2C79ECE017A /* AsnParser.swift in Sources */, - AA8476680D174F67A76E81EF8073BE1E /* Barz.swift in Sources */, - F44F3E167345EE94AD02A8063672C176 /* Barz+Proto.swift in Sources */, - 4F6C41AF21B7B33B871BEC8FA6F50722 /* Barz.pb.swift in Sources */, - 92570A9BF8896703FBFE0ED6E6BC20BB /* Base32.swift in Sources */, - 550F22BA846D547147879B28024D77E6 /* Base58.swift in Sources */, - 3525793549CD07C01164481632EE2AE0 /* Base64.swift in Sources */, - F0CBB016ECEB85A5DA2D07C034331323 /* Binance+Proto.swift in Sources */, - E42795993FCA9AC34AC703E136869855 /* Binance.pb.swift in Sources */, - 7D12B8E94F73B93C1024676E83763EF2 /* Bitcoin+Proto.swift in Sources */, - 2B2612B02F7EEB07E6CD828535A7CFAD /* Bitcoin.pb.swift in Sources */, - 51914E14A052A8CA77B2E246D2F5B830 /* BitcoinAddress.swift in Sources */, - 33594342772F4FE95B93977600A7CE57 /* BitcoinAddress+Extension.swift in Sources */, - E094899FFBB188B3F9427E448748A615 /* BitcoinFee.swift in Sources */, - 4D1AEF600978BB5C707FE86A2757604E /* BitcoinMessageSigner.swift in Sources */, - 63C6182C2DCEE8508F7BCF1CC15D89A3 /* BitcoinScript.swift in Sources */, - 0B2DF249412DB6271C7008C2FF821DFA /* BitcoinSigHashType.swift in Sources */, - B13F87265F20CBAE3DFD2CC0411BDC70 /* BitcoinSigHashType+Extension.swift in Sources */, - 213ED3C13764BD88E3E9FF27F9E342C4 /* BitcoinV2+Proto.swift in Sources */, - 9196D65E3752D8989AAE484F54947600 /* BitcoinV2.pb.swift in Sources */, - D02C0118D9E6136D61DF7C660005D5B4 /* Blockchain.swift in Sources */, - 3BF5D3BF8C0F7BAEAFD953A6C7A59EC4 /* Cardano.swift in Sources */, - 79BF3BB61CD67E586EF6C60144F1B093 /* Cardano+Proto.swift in Sources */, - CF1A9E14133DA83DCA8691EFDC2C8CF3 /* Cardano.pb.swift in Sources */, - 027A954AA19A77133EB16D1208183A9F /* CoinType.swift in Sources */, - 5C9B2F5702A6F4C580946BA12FBBAE8F /* CoinType+Address.swift in Sources */, - BB42BED20628D9DDB0FE32F64B32F5F1 /* CoinType+Extension.swift in Sources */, - 2590D15A59D7D3633F95EFF7AC6CD229 /* CoinTypeConfiguration.swift in Sources */, - 8BB08F0D38FCC712D825385C9F1E39DA /* Common+Proto.swift in Sources */, - E5299C450DD678D539854051F06D70A5 /* Common.pb.swift in Sources */, - 269ECCA34D774F790EAA2F73EC4B06ED /* Cosmos+Proto.swift in Sources */, - 007AC41B87CEF07467D73B76263C5A30 /* Cosmos.pb.swift in Sources */, - 36B6C2A3D3525FC85ADF859C994AF8A5 /* Curve.swift in Sources */, - 8EABD9EEF56F42C6C8E88DD6F736EF5E /* Data+Hex.swift in Sources */, - B46B3284AE4654C7F5908E9A6EA9A4B4 /* DataVector.swift in Sources */, - 68D6A3648A29A19D0B56103F1C7DA858 /* Decred+Proto.swift in Sources */, - 37CD43CBE2E5ACBF7FD9B74184C5D9CD /* Decred.pb.swift in Sources */, - 858801BD68726EC7A7155F1B892F39DA /* Derivation.swift in Sources */, - 4A7A8771B7C727359C91CA00CED9B925 /* DerivationPath.swift in Sources */, - 40D5364D06930CD65DD59E3BBD460994 /* DerivationPath+Extension.swift in Sources */, - 654E300AA235478EB153B576B01E71EA /* DerivationPathIndex.swift in Sources */, - BDCC1F2D0031BC992D85C3D9DA0A84C8 /* EOS+Proto.swift in Sources */, - FD2CAF8188F5EDB101F174EF8456D8A4 /* EOS.pb.swift in Sources */, - 663A8EBD8FE2D4C550A38D1EA58B9CAD /* Ethereum.swift in Sources */, - 0F70A9D753A1D939E79F7D0DE9FCD290 /* Ethereum+Proto.swift in Sources */, - 26C76394649A07111FCDE0967A88EDE6 /* Ethereum.pb.swift in Sources */, - 1463809B426DDAD65F669B839AA021FD /* EthereumAbi.swift in Sources */, - 7CDD0BEC3015D558CAB53DB38A623C82 /* EthereumAbi+Proto.swift in Sources */, - 75918C5DB8B37EA83BD416E921BF9633 /* EthereumAbi.pb.swift in Sources */, - 568B1AE65C67A7E31DE85FC246CD1022 /* EthereumAbiFunction.swift in Sources */, - F787D2135FBD838DD38A81494FEE5198 /* EthereumAbiValue.swift in Sources */, - C732B358F9C906CEBA111B5104DA6B59 /* EthereumChainID.swift in Sources */, - 8C8DB63A622185CB2299C54AF12A2E74 /* EthereumMessageSigner.swift in Sources */, - 83859389525DD1213609DEDAE7A818D7 /* EthereumRlp.swift in Sources */, - FBE34F02658A7ADB597331B90A291B47 /* EthereumRlp+Proto.swift in Sources */, - BD4E8797E10DB95A991722F109BCCB9E /* EthereumRlp.pb.swift in Sources */, - 5D9EFCBB1B071F3D8DEFA1A2052DAC55 /* Everscale+Proto.swift in Sources */, - 3D96100731A13D707E73531435DB4F41 /* Everscale.pb.swift in Sources */, - 0D784D2F32A17A084A5606B030CFBC1C /* Filecoin+Proto.swift in Sources */, - A6D95F51214163E0124C58D4729FB84E /* Filecoin.pb.swift in Sources */, - 136A60558AC853C90A06BB2B6145B8BA /* FilecoinAddressConverter.swift in Sources */, - ADFAB9E3974E33AFE96D4C64596EF090 /* FilecoinAddressType.swift in Sources */, - 10C98B5AF88BA619D395173908D804F0 /* FIO+Proto.swift in Sources */, - 370DF7749B50A01D76E621DBA6CED1DA /* FIO.pb.swift in Sources */, - 2ECEFBD7F388CFEC65CB844EC828A7CB /* FIOAccount.swift in Sources */, - 4B72905E08B7DA4A351BEE29BF257D84 /* Greenfield+Proto.swift in Sources */, - 96C6C1013F53FE8E9511C74DFD0AAA61 /* Greenfield.pb.swift in Sources */, - 39F2376063A18E062AD36BE84E6B2028 /* GroestlcoinAddress.swift in Sources */, - 4B7CEC8363BE37C51D92FE16E779C002 /* Harmony+Proto.swift in Sources */, - 0EC10F1C66DF1B2E1ADE771690208BBC /* Harmony.pb.swift in Sources */, - 5D5F521678BF978DB37A62A22AF8B7B7 /* Hash.swift in Sources */, - EDA0ECCB70529CC7ED96095AFFA4BDF4 /* HDVersion.swift in Sources */, - ACDCB936C7F9BB8EFCAB416F5E98724B /* HDVersion+Extension.swift in Sources */, - BA462449F28E21450E3E25B8246386A5 /* HDWallet.swift in Sources */, - AFEE200A989D04A18B7DCB58CEDA4973 /* Hedera+Proto.swift in Sources */, - 0F49CF7379F4533BD72DFFED001631D1 /* Hedera.pb.swift in Sources */, - C09EC3FBB4B86421C29326932ABB0B4A /* HRP.swift in Sources */, - 691839D3A9E2A0F70C2782335B861444 /* Icon+Proto.swift in Sources */, - 2C014498F99A90051CBD9AD2D4DADBB0 /* Icon.pb.swift in Sources */, - 56B73D6F4E6F857C927428FE53E8A47C /* IOST+Proto.swift in Sources */, - 1EC237C9683ACDF66CB97935820E0242 /* IOST.pb.swift in Sources */, - B19F61DF7B8A3525F0CABA425B69CBD6 /* IoTeX+Proto.swift in Sources */, - CE13F2ACAD693937AEA54A16782E3D8C /* IoTeX.pb.swift in Sources */, - 771B60DC5741C81A87CDC401BD660019 /* KeyStore.swift in Sources */, - 60BBD6F71C733A110F99D6A5F8B22D94 /* KeyStore.Error.swift in Sources */, - 4DA6DC7E1A5AB35574F55CE13E43AAB8 /* LiquidStaking.swift in Sources */, - F90371412FE321ECAAE29EEF50748932 /* LiquidStaking+Proto.swift in Sources */, - 5B2C966D6E02BE0200F99416F612F038 /* LiquidStaking.pb.swift in Sources */, - D9B85A7DB0CFE567251F31B3E15458F7 /* Mnemonic.swift in Sources */, - CDDA06B19A08178EBDF1295EE78ECFC6 /* Mnemonic+Extension.swift in Sources */, - CE399239B312BD58E94D9FDCD102FD59 /* MultiversX+Proto.swift in Sources */, - F66D80687A7823B359D09D6A9C3B3A44 /* MultiversX.pb.swift in Sources */, - 1E373B5421DD94ECB1666BA27D6F10EB /* Nano+Proto.swift in Sources */, - 6304E5F82BA35561F652C83752323D3F /* Nano.pb.swift in Sources */, - CFF01EB5F8849EEE65717D526DA2F3B3 /* NEAR+Proto.swift in Sources */, - EA11E9207E1A36C47E9A3671BAC84C55 /* NEAR.pb.swift in Sources */, - 652BB8A140ECF09FF11E83B9FA523803 /* NEARAccount.swift in Sources */, - B362A1EDC581248804CEE8D7527A54E5 /* Nebulas+Proto.swift in Sources */, - 2E4D708731DE6BBF504ECFC9FEB24DF7 /* Nebulas.pb.swift in Sources */, - 2C8250AA4AF363C7E4948DDB5A166F55 /* NEO+Proto.swift in Sources */, - 1EC8E1E5D866687B6935597AEBDC3728 /* NEO.pb.swift in Sources */, - B29D1FFC1A4B8646E1602A175772DF41 /* Nervos+Proto.swift in Sources */, - CA67619FBFFA2A2100813306B2B64361 /* Nervos.pb.swift in Sources */, - 5FB645C437B1F5B3CF016D54979435F1 /* NervosAddress.swift in Sources */, - 617FD84708090B20E098317FC00DE607 /* Nimiq+Proto.swift in Sources */, - C70DCF291B1185AE5AF79657B2B16F74 /* Nimiq.pb.swift in Sources */, - FD167A813E40312055EEB65F3C98DACA /* NULS+Proto.swift in Sources */, - F3BA9AD389086E5CB9BB5CAD8EDEA789 /* NULS.pb.swift in Sources */, - CA93A6BB059E7129C15771EF2D11AD67 /* Oasis+Proto.swift in Sources */, - EB03F4181102077E846DFCAEE14648BE /* Oasis.pb.swift in Sources */, - C67461D3F4852FE5C4893D7C37C7267B /* Ontology+Proto.swift in Sources */, - 601A8FB16365D6C4C82BDE64CF78143F /* Ontology.pb.swift in Sources */, - 4C4A81BD3A6D2DB6A11985493A03371D /* PBKDF2.swift in Sources */, - 4D59DB8591A7BF4F7837ADFAD053D01A /* Polkadot+Proto.swift in Sources */, - BCE10C12AA295623DCD9E9EFD224A063 /* Polkadot.pb.swift in Sources */, - 0DA3720C42D0158BDFB482F8C3525051 /* PrivateKey.swift in Sources */, - AEE4DD81209E245BB6A9BE18ED4F7759 /* PrivateKeyType.swift in Sources */, - 419744FC2153FCEBE804340759D80E08 /* PublicKey.swift in Sources */, - EAF0B0AD4029A684DAFBDE3AD29DF680 /* PublicKey+Bitcoin.swift in Sources */, - 2BD50CED7DEFF1201E92C40C6C69A204 /* PublicKeyType.swift in Sources */, - B3CB027D051B10D88D88DC6164F7B4BB /* Purpose.swift in Sources */, - 57C77C9E2999ED8D90FD25D85995C9B6 /* Ripple+Proto.swift in Sources */, - B05327FF1824CF0359A214DBB82E495C /* Ripple.pb.swift in Sources */, - 1A81E0FF2F652E9EF043D036FD7C9D1A /* RippleXAddress.swift in Sources */, - 7E302FB9E3794ABBB3EFC66941A7787E /* SecRandom.m in Sources */, - FB39D75E19CA7BE889104BE63FA736B2 /* SegwitAddress.swift in Sources */, - 08B4765246C2D8BA811E26E61E815B8B /* Solana+Proto.swift in Sources */, - 0B468364F72D457F56601DC0F3E5B646 /* Solana.pb.swift in Sources */, - 311A67B6D769439AB7F56C58CF37BE4A /* SolanaAddress.swift in Sources */, - 86685BA5D769FC9B2AA40816763A0B80 /* SS58AddressType.swift in Sources */, - EDCA930C5A183B826F9448066406FC40 /* StarkExMessageSigner.swift in Sources */, - D3205A32BACCC1CA854421CBB8A07EA1 /* StarkWare.swift in Sources */, - E98944A7EEFDB76E3B18D503B7039BCA /* Stellar+Proto.swift in Sources */, - 8F440CBCE87100DBD568FDBA07E29934 /* Stellar.pb.swift in Sources */, - AC7F7A57A703AA1EB9D1CCEDA483E807 /* StellarMemoType.swift in Sources */, - 0CE6957F957EC7A880FF303B64EA3993 /* StellarPassphrase.swift in Sources */, - 6A1AEE5D7C2A32A6F81BB604D48EDF57 /* StellarVersionByte.swift in Sources */, - 02F90270BD45F882C03E36749770020E /* StoredKey.swift in Sources */, - F409D7E074D698F605B8B207FC7C46B3 /* StoredKeyEncryption.swift in Sources */, - AF0C6D96AF5259A38118E3AE438A283A /* StoredKeyEncryptionLevel.swift in Sources */, - 1BD6DBB1C2D03BEF1017792194976B07 /* Sui+Proto.swift in Sources */, - 31C06FB1373832A76B720F7331E0C751 /* Sui.pb.swift in Sources */, - EB1DB2692BF02C84BCC6F21CE162A9B5 /* Tezos+Proto.swift in Sources */, - 9F0023ECC93EEBC683FF6A7031A52BDE /* Tezos.pb.swift in Sources */, - A2F464EA7894F525BBDEB341888E9129 /* TezosMessageSigner.swift in Sources */, - E2F11ECD2739FBB1A71507EAAAA45903 /* TheOpenNetwork+Proto.swift in Sources */, - CA37D1EDF118B041E2DC26201930A2DC /* TheOpenNetwork.pb.swift in Sources */, - 0FF45656B5CEE98F32D3328955E9FF66 /* Theta+Proto.swift in Sources */, - E1E8E06763ECEFD0C0B7B168F79109E4 /* Theta.pb.swift in Sources */, - 25FEEB2EEF95D8A7C10D36B53CDD7F91 /* THORChainSwap.swift in Sources */, - 9F31910DD9DCD0EACCFA72FC4EC87F6C /* THORChainSwap+Proto.swift in Sources */, - 9E45BA46985A4112B0A3FBB109434B07 /* THORChainSwap.pb.swift in Sources */, - 5CD6109B038FA1928DA7F0CA583319CC /* TransactionCompiler.swift in Sources */, - 0C28BF2A37FA001B0A547BAB23C98C45 /* TransactionCompiler+Proto.swift in Sources */, - 99F9B4ED034CDADF134F02E8C693725E /* TransactionCompiler.pb.swift in Sources */, - 88568199087495E00DDB03CC9F43F615 /* Tron+Proto.swift in Sources */, - 01F1AEC5A2BFA0A1C3D40FA8C61E06CB /* Tron.pb.swift in Sources */, - 47210FE7148CFEBF8085DC5129C2ADCA /* TronMessageSigner.swift in Sources */, - C5E723DDD415BE8A2540A88AAE521102 /* TrustWalletCore-iOS-dummy.m in Sources */, - 5D631C38C5E087B2236230A8BC88947B /* TWCardano.swift in Sources */, - FD95E57CF157136D0F72AD6AC563F394 /* TWData.swift in Sources */, - 2B5C73FE41BCB17CD31AD315A3B4591E /* TWString.swift in Sources */, - CF027C849750E1B921B473725AF9DA26 /* UniversalAssetID.swift in Sources */, - 44381E1CB3F1B29BCFFEE24E390E5486 /* Utxo+Proto.swift in Sources */, - 80F4B4FFD809FBB8023B5ED133950932 /* Utxo.pb.swift in Sources */, - A9C8E08563A571BE6C7887BDDC01D82D /* VeChain+Proto.swift in Sources */, - 3F5463FE970DD323DEC278457AB56C02 /* VeChain.pb.swift in Sources */, - C648C94BD2B35BF5726AD271D8EE07B6 /* Wallet.swift in Sources */, - 63681DB20C4B91A82068C02542E110E4 /* Watch.swift in Sources */, - AF83505CA503D6AA49C4E311EFFC0FB6 /* Waves+Proto.swift in Sources */, - 35A3D319079716934271F3B832C1DEB5 /* Waves.pb.swift in Sources */, - 1A953D758282ECB40C1AE752164046D1 /* WebAuthn.swift in Sources */, - 30E8932A456FE321D38B6807F9152333 /* Zilliqa+Proto.swift in Sources */, - 8CA4033157AF2FAF156203FB264B2BC8 /* Zilliqa.pb.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 79A5EE341BF03B2C5C58751DDABC543D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 860BD1A8ECDD52A6A0468BF21D383F7F /* Pods-Tokenary-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7DD4D55C2F2D6DA20324BCB0A2C02CB8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 459CE9DF410F2EC2E861340E9C85A4E5 /* any.pb.swift in Sources */, - 011D0EA10728EE3C67250628E896A901 /* AnyMessageStorage.swift in Sources */, - 2CF4011991826E8F0569644F24FABC7E /* AnyUnpackError.swift in Sources */, - 9D7A2E36B1706A5BD9E23183962C0E77 /* api.pb.swift in Sources */, - BE0656CD68B7EDD7864671518FD6247F /* BinaryDecoder.swift in Sources */, - 237C27C4D01761F2D925D86DB06241B5 /* BinaryDecodingError.swift in Sources */, - 6660CB8AF001BDDA2FF15586C6BB7E37 /* BinaryDecodingOptions.swift in Sources */, - 1452293AD3C5FE37F2CCF46079502FDD /* BinaryDelimited.swift in Sources */, - 2F90D4514CA2FCF1C306823D7509E063 /* BinaryEncoder.swift in Sources */, - D0B231AA4455D06347935E6C859CC421 /* BinaryEncodingError.swift in Sources */, - 6CFEF50AA959E431884A4E3A106739B5 /* BinaryEncodingOptions.swift in Sources */, - F7A06A95C6DE113EA4AC1B63C692CF06 /* BinaryEncodingSizeVisitor.swift in Sources */, - 40567EA82E4A3EBC81D973A198DEDF98 /* BinaryEncodingVisitor.swift in Sources */, - C004CF537B78E685131999B5469BAFFE /* CustomJSONCodable.swift in Sources */, - B27AC2F43646A97F954D5C7D9C5A154D /* Data+Extensions.swift in Sources */, - A9DC44F2585948BBCFC50D26DFE44149 /* Decoder.swift in Sources */, - 478C5BBCD3A4C92F4913D4D8F732DD6C /* descriptor.pb.swift in Sources */, - 58F4FBFC8E177CF50E62CE6CE2293B84 /* DoubleParser.swift in Sources */, - BEE71871F21B043242AF732E0D9924DC /* duration.pb.swift in Sources */, - 2022C195D65734FE55AB596E09ED7CF4 /* empty.pb.swift in Sources */, - DC2DDA48354325DEB06840D5DB3506E7 /* Enum.swift in Sources */, - 360AE7AB9FAD51DC0671F3AA211DA73A /* ExtensibleMessage.swift in Sources */, - 51D748221A4CF9A867E460361A66C9DC /* ExtensionFields.swift in Sources */, - 7981ADA2C80F4C7409AD3214065DA5EC /* ExtensionFieldValueSet.swift in Sources */, - CC43A74CC408F4AF2D988D05B069F33E /* ExtensionMap.swift in Sources */, - A4640FF4E49DC5DF878EEAE78B70AFAA /* field_mask.pb.swift in Sources */, - 7269F4619348F8815493CDBE9AEA8226 /* FieldTag.swift in Sources */, - BBD8605A0A3EAE9C52C490655FA88AEE /* FieldTypes.swift in Sources */, - C02B0CA223960FE1D1DBE5668104D885 /* Google_Protobuf_Any+Extensions.swift in Sources */, - 840B45160CAF270F11F0E961EEBF32DB /* Google_Protobuf_Any+Registry.swift in Sources */, - EB5DB97719F570A1FE73CB4A9458DCB3 /* Google_Protobuf_Duration+Extensions.swift in Sources */, - 1C22DAB4A9B5456974CF1450D3908FF6 /* Google_Protobuf_FieldMask+Extensions.swift in Sources */, - C03A9D25EE29EB03AD97DC6FF10DFCF6 /* Google_Protobuf_ListValue+Extensions.swift in Sources */, - 334293D5CA57CCC191A3A7E90E30B034 /* Google_Protobuf_NullValue+Extensions.swift in Sources */, - 7BA4961044629DC2843F582CE51E923D /* Google_Protobuf_Struct+Extensions.swift in Sources */, - 9DDBA8D3CD1CFBE5E1CA569E90303DA0 /* Google_Protobuf_Timestamp+Extensions.swift in Sources */, - 89B6251B7061DFD214B95DE0683670B0 /* Google_Protobuf_Value+Extensions.swift in Sources */, - 6CA0B6622AF41D626038D762199870DE /* Google_Protobuf_Wrappers+Extensions.swift in Sources */, - AD2F88CFEF2128EB3FD00198910B1196 /* HashVisitor.swift in Sources */, - 2CF2691012C94F7F6565A6281A4CFA45 /* Internal.swift in Sources */, - BBBDE32C26523C6FBD930A04EC2215C6 /* JSONDecoder.swift in Sources */, - B051F8A35F88D34DD5C2D7E390295BDB /* JSONDecodingError.swift in Sources */, - 3F43807F68BBED4A85DDD12923177AB8 /* JSONDecodingOptions.swift in Sources */, - 1AD40CDC58220309DAAAF28C65A0BAEE /* JSONEncoder.swift in Sources */, - 4428D4406CA67BD2C4C730F9E2FE86CC /* JSONEncodingError.swift in Sources */, - C128E46A847ED5A30ACCE1CD6F8346B7 /* JSONEncodingOptions.swift in Sources */, - A60AF78D55268B19FF8131ADFC700EF8 /* JSONEncodingVisitor.swift in Sources */, - 6DF1B2C930EFB774B02E1705291E5C28 /* JSONMapEncodingVisitor.swift in Sources */, - 1C3670CDECD894B439F2E95410C4C5BA /* JSONScanner.swift in Sources */, - 96D9864C62B06AB4886E09C2932A0027 /* MathUtils.swift in Sources */, - 9362FD0A9B9951BDBA872A3B3B49C119 /* Message.swift in Sources */, - 59A54B2B5744F98F38C9A0ABD226512F /* Message+AnyAdditions.swift in Sources */, - 923CCCEBB8928EAA853189B5C0A51FB6 /* Message+BinaryAdditions.swift in Sources */, - C7587C74B3148C9D2C798315797F0AEA /* Message+JSONAdditions.swift in Sources */, - 0509FF91167AA083947C8A011D4229BB /* Message+JSONArrayAdditions.swift in Sources */, - BBF5F12D53181F7F6E33A96C0AB5D4A8 /* Message+TextFormatAdditions.swift in Sources */, - ED07C5128D68804E4A05C9A717715A58 /* MessageExtension.swift in Sources */, - 5C01E714120DCD771F034DAFD3A6A437 /* NameMap.swift in Sources */, - 6091DC149188133045302E7121B9FA29 /* ProtobufAPIVersionCheck.swift in Sources */, - D2458A1DD3F416CEA15319FD9B682AEE /* ProtobufMap.swift in Sources */, - 3980EA3EA404EBF6B4BB1F55DFBCB10A /* ProtoNameProviding.swift in Sources */, - 6EF1D4E95D4561A49B2A4FCC14ED7C3A /* SelectiveVisitor.swift in Sources */, - 6999C251914FF2B25DE7AC6D7F8BD9BC /* SimpleExtensionMap.swift in Sources */, - 20024074D0CB342E968144AE070B1042 /* source_context.pb.swift in Sources */, - B76A2076F6381A805904D83BBE178FE6 /* StringUtils.swift in Sources */, - A922190FE1575D354A789A0ACAACA323 /* struct.pb.swift in Sources */, - 7AA6F68B19A84C42FFA0689732F6CF65 /* SwiftProtobuf-iOS-dummy.m in Sources */, - AC36C62BF9BFDCD9E0E60F5B07B7020F /* TextFormatDecoder.swift in Sources */, - 8E49129A648A549B58DD90DD6B119AC8 /* TextFormatDecodingError.swift in Sources */, - 18F50C6F6BF16586C7BE3E9B77F97F57 /* TextFormatDecodingOptions.swift in Sources */, - A03B7E0B3453A0CDCDF55F9E02022AF3 /* TextFormatEncoder.swift in Sources */, - 090DAC841D7A549BBFF6129124A6BDDC /* TextFormatEncodingOptions.swift in Sources */, - 9CEC3CFF09A558A2481A2783A155A337 /* TextFormatEncodingVisitor.swift in Sources */, - 7F12D90D401D23C5DE40EC89023035D5 /* TextFormatScanner.swift in Sources */, - 64ECA489C2F146B97F17B1EA0E0485C8 /* timestamp.pb.swift in Sources */, - F93A015B5A8155C4A7E571ACC92803C6 /* TimeUtils.swift in Sources */, - 4B39992CDD7AA71BBB9B8E1CDABD7176 /* type.pb.swift in Sources */, - 4CF54231A20A8797FDA906ECC871606B /* UnknownStorage.swift in Sources */, - E7208636E7342553DD680811E1204C2B /* UnsafeBufferPointer+Shims.swift in Sources */, - 15066BF87BD0B41B80055571264CA539 /* UnsafeRawPointer+Shims.swift in Sources */, - F7D9B3F9037CEC4866F358EB2D42265E /* Varint.swift in Sources */, - F3AFA12CCF7B519B7F66D43D3B468776 /* Version.swift in Sources */, - AC8BC39CCC6EC56BA1856EF04AF06866 /* Visitor.swift in Sources */, - 6975BB32B1DAD3CE35FD434DB1010C48 /* WireFormat.swift in Sources */, - 0F857825CBAF038A8693783BBD4C40DE /* wrappers.pb.swift in Sources */, - 8525717401B5E1B16E0356BD8347C194 /* ZigZag.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 89FFD51E5DC04DA0571E450676865A25 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 658FEC92E3864102E2E23E2D92B72D95 /* Addition.swift in Sources */, - DEA2761C6E23D7DFA4BE78A749DC0549 /* BigInt.swift in Sources */, - 4F25A1AC619D9E10880252A39E76E14F /* BigInt-iOS-dummy.m in Sources */, - F6A87BCB2916271157634DBA5D7D30FC /* BigUInt.swift in Sources */, - 0513CC3D35666CF4834A7B4B5E04233E /* Bitwise Ops.swift in Sources */, - 8E0333DECF25219B4115327909219046 /* Codable.swift in Sources */, - 67A0A899B41557C42534D22A7403F3A3 /* Comparable.swift in Sources */, - DBD178CB0E8F9A05EDE33A99718A2BFD /* Data Conversion.swift in Sources */, - C0DFAB698EECC57D7E67A7D6007FC841 /* Division.swift in Sources */, - C7FA465A1C6D186C3E43CC670D8D59CD /* Exponentiation.swift in Sources */, - B118D18E9280EFE9001E1D44BA0A6B79 /* Floating Point Conversion.swift in Sources */, - 180AAD0AD49A5002748E364DB10ACDAE /* GCD.swift in Sources */, - 477713AD03D8FE3B934F460DC496B868 /* Hashable.swift in Sources */, - 716EA164B1563B6A88FE0F82A5DE8BD4 /* Integer Conversion.swift in Sources */, - E6825738D9FB13EF60CF5D82FAA9F50E /* Multiplication.swift in Sources */, - B4B8C627DC60179D354AF1D2CCBD4192 /* Prime Test.swift in Sources */, - 43EF78EE1DE04D506642E94FEBE2ADB4 /* Random.swift in Sources */, - C78746139AFDF6E249E5583A474B86AA /* Shifts.swift in Sources */, - 9C35C76B32BCAA460075ECC3154CF905 /* Square Root.swift in Sources */, - 7E8866ACB01FF6B501E40A0AD9C2E4DE /* Strideable.swift in Sources */, - C8FEB134BDAA482F9A2AD445FF9C614E /* String Conversion.swift in Sources */, - 76985547B597FC9384095F42283FCC3A /* Subtraction.swift in Sources */, - 38D762DA637CBA016F533D04464B9DD3 /* Words and Bits.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8A29990D2605C5BB8FBFA93455DF37D5 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D166FE6F550C82D1A64CD411A3AA37CD /* Addition.swift in Sources */, - 74AA921924DD214BC00ED78CB2D8074A /* BigInt.swift in Sources */, - E02E7A52C2E28558AD9A5D90BCC21A97 /* BigInt-macOS-dummy.m in Sources */, - 411CCA040387B22F5F16BD667613B38D /* BigUInt.swift in Sources */, - C13AC60FA0C789F4DC77F4400F0D41CD /* Bitwise Ops.swift in Sources */, - 7E669D92820BBA5F8EE6C1D18D1C98A4 /* Codable.swift in Sources */, - A07D3E326BDCCA94E7776B977CF234BB /* Comparable.swift in Sources */, - B99FCD9A731E14FC7364312A66D8373E /* Data Conversion.swift in Sources */, - C3C6DA01FD9583876B01482C1343FC36 /* Division.swift in Sources */, - ED25A63A9BEC4D142169C91A65710E5B /* Exponentiation.swift in Sources */, - 3BA692637B06A7D6E11DC95C9527E284 /* Floating Point Conversion.swift in Sources */, - 98B5893BFDD0A6EEF8FDD4A5FFB93B94 /* GCD.swift in Sources */, - 7BCBAE5373FDF615D31B10D2BAFEE91B /* Hashable.swift in Sources */, - F77CF7E21882E968A125D88D969D8C5E /* Integer Conversion.swift in Sources */, - AD1F3035B9A8DF41544694D366AE980A /* Multiplication.swift in Sources */, - EA9EB5E840CFDE551FC8D606737BF15F /* Prime Test.swift in Sources */, - E3020707D6509098A87242F9B9782A10 /* Random.swift in Sources */, - DC6439190214E7EB6E40D1BD1AC9C570 /* Shifts.swift in Sources */, - BA8E11726A5E420ACF6DD1A024616210 /* Square Root.swift in Sources */, - 346524E9F9AB544D6874416B1EE9EBA5 /* Strideable.swift in Sources */, - 71624923E5ACA725FCC96D5FBCD8F510 /* String Conversion.swift in Sources */, - 5EC2A331E1016DC7E02A8545416DD565 /* Subtraction.swift in Sources */, - E1A0086E9D26507367638A442925B930 /* Words and Bits.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9915D07EE484F93A414C557527B06A1C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CAA775C982B733CD9CCFBC90C82A2C2E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - AFAAD545C154B2769EBA76164D2F3D13 /* Pods-Tokenary iOS-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D2D24F6965FCEB759F45BFD39E338ECC /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D61130416DB2FFFDDCB8AC721FAC490C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 84F38077AB944BA18335397058D83224 /* AnimatedImageView.swift in Sources */, - FD22AB264F5C13CD67A94A5C9E53327E /* AuthenticationChallengeResponsable.swift in Sources */, - 35A61BE9D5E2C932C8F0C5566C9F2046 /* AVAssetImageDataProvider.swift in Sources */, - 3A94A5767C9D083DC47D7D9EAB207958 /* Box.swift in Sources */, - 82E09900A0CB91B7F5190518319E8D3F /* CacheSerializer.swift in Sources */, - B0333D2093A385604CDC9EEA4301FB1C /* CallbackQueue.swift in Sources */, - 17523A6CA4277BDFEDD5F67972C5693B /* CPListItem+Kingfisher.swift in Sources */, - AB9DD6AF16B173FB686E4372B681C5B2 /* Delegate.swift in Sources */, - 36C3EED5B251FFE360745F12162E0A85 /* DiskStorage.swift in Sources */, - 9C4DBF61396D28084EADA8470353FCC3 /* ExtensionHelpers.swift in Sources */, - 41CACAE0C9961B79DC69C23C300BAC2D /* Filter.swift in Sources */, - 83AAA612DBFB8597592BF22D7A6F33B0 /* FormatIndicatedCacheSerializer.swift in Sources */, - 2AA509D9B4E1FF4B44E0A4433D681604 /* GIFAnimatedImage.swift in Sources */, - 8672D9F1CBBE551838E09C2BF43E0E45 /* GraphicsContext.swift in Sources */, - 087673C6150283515860447052DEFA56 /* Image.swift in Sources */, - 6B4FEE625FDF4E884EAF341906DBF262 /* ImageBinder.swift in Sources */, - A42D2118F62928981B008152FD8167DB /* ImageCache.swift in Sources */, - 449AB7FF11D0C09425D4AF6F84F5C84B /* ImageContext.swift in Sources */, - 74CB157ADBDA5AF128753E67B79FDB6C /* ImageDataProcessor.swift in Sources */, - 16517B749DEB7D44BD0738DE9803DF18 /* ImageDataProvider.swift in Sources */, - 6A404A5EED212EAB4EBCE5A8AB9A01D5 /* ImageDownloader.swift in Sources */, - A4153D0BFC28761C1F0A90171CF9061D /* ImageDownloaderDelegate.swift in Sources */, - 57D4A7F7D40690929540ECECA1A560F2 /* ImageDrawing.swift in Sources */, - FEB895A4AA2EFB05FE4A6922F6D8B25E /* ImageFormat.swift in Sources */, - CAC15365813FEDCBF6632AA31770BCDA /* ImageModifier.swift in Sources */, - 566D54B9DBA348C07127EF96807FA9DD /* ImagePrefetcher.swift in Sources */, - 98B03CA87C53F1D3C8348CC18BF20DB0 /* ImageProcessor.swift in Sources */, - 667626DBCF4BA626421065AC63CE6249 /* ImageProgressive.swift in Sources */, - 75B1FC18317D01DEFE7D80D52096634C /* ImageTransition.swift in Sources */, - 5E96800D7698F81B7138E4ACBAFC4E31 /* ImageView+Kingfisher.swift in Sources */, - A3D2D286870ACAEB28282B8DB2C47DD3 /* Indicator.swift in Sources */, - 430E6D1F43119AFD87411308C55E194E /* KF.swift in Sources */, - 7ADFA1E9DD782489547C371A932B3BA7 /* KFAnimatedImage.swift in Sources */, - D72411DAB8D4AFCAEC60C8B11F532E1A /* KFImage.swift in Sources */, - 54D9BC195D7D8688B5D83A8BC413C5AC /* KFImageOptions.swift in Sources */, - EBFC4C98AC60CB6F056AC5CD864D8683 /* KFImageProtocol.swift in Sources */, - 6A624831DCFCA30DB66F110DBF708D00 /* KFImageRenderer.swift in Sources */, - 333C1377ED58430BFB2415F36DDD3BF0 /* KFOptionsSetter.swift in Sources */, - D892EE8B39455C3E2E2F0F34A1CE7464 /* Kingfisher.swift in Sources */, - 449831BAF049DCE0928B2D05C2947A22 /* Kingfisher-macOS-dummy.m in Sources */, - F3F479988907BA551579ADD0C64A6900 /* KingfisherError.swift in Sources */, - 480905CB56A0D17F09BB0CEDC454C14F /* KingfisherManager.swift in Sources */, - F4FCC3E77775CAB9422D15293500C399 /* KingfisherOptionsInfo.swift in Sources */, - EF30FFC2DFBA25E89DB73DC03685C079 /* MemoryStorage.swift in Sources */, - 3E489874277D705758CB10CC932F6D68 /* NSButton+Kingfisher.swift in Sources */, - 7EDEDF99B6ECD0F81C846FF6E14E4561 /* NSTextAttachment+Kingfisher.swift in Sources */, - 5F1883256D639E9DDC7B58F8DB88B970 /* Placeholder.swift in Sources */, - 1A57B1E36E002121AE58D0258DC82E2A /* RedirectHandler.swift in Sources */, - 7DAB3040DA39DB7921FC318830D43162 /* RequestModifier.swift in Sources */, - C5AA3A734032224F2207C342EF7AE525 /* Resource.swift in Sources */, - 4E01D3B2FDA6E314309D90B3EC9D9848 /* Result.swift in Sources */, - 968AFECBAEA95F6993EEF7CA0C0C293A /* RetryStrategy.swift in Sources */, - 5842DE6D0CCB95EE95254788F75811F0 /* Runtime.swift in Sources */, - 7F3E76C23BE246AF0E45C393B14D7BB0 /* SessionDataTask.swift in Sources */, - F0C8A0314E4645A9E8B8C885B6F7747C /* SessionDelegate.swift in Sources */, - 88C65B09548941C57DE2EB01B9587938 /* SizeExtensions.swift in Sources */, - 9E956EFD560A82659EEAC83C14DBDE7D /* Source.swift in Sources */, - E9BF695121D71529412B5910115E2E9D /* Storage.swift in Sources */, - DBF5456C1BE0384AAD6FA2D3775DFD5F /* String+MD5.swift in Sources */, - 710EB8B7102DA339120A8A4350423DB1 /* TVMonogramView+Kingfisher.swift in Sources */, - 50B258FBC078A3B44C4BD55BEA80A282 /* UIButton+Kingfisher.swift in Sources */, - 18A70D42F71F83F8069638DEDABB770C /* WKInterfaceImage+Kingfisher.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E2BE38F0B0884AECC6E36B93D5B9F281 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F45119FEC2F0B744E6D0287B64A66D5B /* any.pb.swift in Sources */, - C7DF8744E902CBE4FDAF32A815891B29 /* AnyMessageStorage.swift in Sources */, - 474F60E9CE0B35B27850FB988464A900 /* AnyUnpackError.swift in Sources */, - 82FA2C7D41191239C2296961016D03E4 /* api.pb.swift in Sources */, - 2916E38B7D1815876A5E8C0335CF23E9 /* BinaryDecoder.swift in Sources */, - FB19AE6F11AB3B12BE824C3061C33982 /* BinaryDecodingError.swift in Sources */, - 6B736B2A796793CD7782AF55CD4AC80F /* BinaryDecodingOptions.swift in Sources */, - CC8442AC57F685626453D80B3CCC25F9 /* BinaryDelimited.swift in Sources */, - F07FB1A8F41AB6AE02610EA0825B1190 /* BinaryEncoder.swift in Sources */, - 8803CDDF266B1A0AD17BB4728093923E /* BinaryEncodingError.swift in Sources */, - 332A341CDD5B4611C1186B3593D37F7C /* BinaryEncodingOptions.swift in Sources */, - AEF4E8DE9F87D0998FBE45C41593BD90 /* BinaryEncodingSizeVisitor.swift in Sources */, - 023990656F3DE7BC986CF5A034FA6D1A /* BinaryEncodingVisitor.swift in Sources */, - 4C4A6A94ABE3C91D8DDF6C80CB315118 /* CustomJSONCodable.swift in Sources */, - E557F5095C1A8FFDAE2A06CF690DEF2D /* Data+Extensions.swift in Sources */, - CCB35F96F4B304A3F8F83F6E40A58671 /* Decoder.swift in Sources */, - 1D93DBBC5E72012224512E88DA6928DB /* descriptor.pb.swift in Sources */, - C2EBAA09F3A796A9B7F156762E12FFB0 /* DoubleParser.swift in Sources */, - CF11D606BFD0994B0A539D2A8C3EA4C4 /* duration.pb.swift in Sources */, - 6D15B824851FF0FE50ADA4295D0F7276 /* empty.pb.swift in Sources */, - 875236A59B78DA1EA7C63F2C6AD352C2 /* Enum.swift in Sources */, - 92627BBA2BD98E57AB0EA309EB3F21E5 /* ExtensibleMessage.swift in Sources */, - DF9AF72C0934A9F98C4A090BE45046B3 /* ExtensionFields.swift in Sources */, - E019CA1F27A2D148B7A92635BD619257 /* ExtensionFieldValueSet.swift in Sources */, - 2F9532110130ACBA206DE17FA26B1823 /* ExtensionMap.swift in Sources */, - 433899B1F34DDBD56CCA179C855F8D28 /* field_mask.pb.swift in Sources */, - EC0CBC52D7A313D62822596B48659DEF /* FieldTag.swift in Sources */, - 740922BE8B672ECE84E1040042480B44 /* FieldTypes.swift in Sources */, - 194CCD388E0F6C82441F220F9E2C65B0 /* Google_Protobuf_Any+Extensions.swift in Sources */, - C8781B7B41F8C6F86DFE98BBA07329A4 /* Google_Protobuf_Any+Registry.swift in Sources */, - E15F629003D02D50A2EFCE19E6072E0C /* Google_Protobuf_Duration+Extensions.swift in Sources */, - 008C51DEA90B91E500D81F01D77A76AB /* Google_Protobuf_FieldMask+Extensions.swift in Sources */, - 541EF66739E82673D79F50DC828859E0 /* Google_Protobuf_ListValue+Extensions.swift in Sources */, - D811097934D114D5AC5F20ED5890F988 /* Google_Protobuf_NullValue+Extensions.swift in Sources */, - AF03FD9B0C81A33679079104259ABEE2 /* Google_Protobuf_Struct+Extensions.swift in Sources */, - B594EAD2541666D1F8F56468C966685E /* Google_Protobuf_Timestamp+Extensions.swift in Sources */, - 94F849AE4D1B295169FBFAD64154EAD5 /* Google_Protobuf_Value+Extensions.swift in Sources */, - E8F6806D62D1D6EE2A3A53F1A7CF373D /* Google_Protobuf_Wrappers+Extensions.swift in Sources */, - 586FF65A3879EF0EBC7361FAD3BE014A /* HashVisitor.swift in Sources */, - FAA08EEC2169DB79EAD54874986F5843 /* Internal.swift in Sources */, - 3E1CFDEB46BEFAF578588B0657849868 /* JSONDecoder.swift in Sources */, - C0806B7D5E7DA7D6698448C81C400B7D /* JSONDecodingError.swift in Sources */, - 25111A9F057FE27CEB56D5C7439CBA13 /* JSONDecodingOptions.swift in Sources */, - D5B1F61B26D424B7505AE23F645FF43B /* JSONEncoder.swift in Sources */, - A6FB94F74DD4455BC4F5ABE49AC894FA /* JSONEncodingError.swift in Sources */, - A819CB0A3EDE72352601CA5B4BF21FFF /* JSONEncodingOptions.swift in Sources */, - 25AF86547F70C85965634A959712F04E /* JSONEncodingVisitor.swift in Sources */, - 19169C53B1E84FFF97305FE7779ECD00 /* JSONMapEncodingVisitor.swift in Sources */, - F5F8C305777FC386C92F746CB4D9E469 /* JSONScanner.swift in Sources */, - 9DF3D7E2A27F75B7A76E849E723972BD /* MathUtils.swift in Sources */, - FFA91DD43ACC5862A9DAB37D41D5E0E1 /* Message.swift in Sources */, - 1E94E6402ABEDD1F147D6BDF60B592B9 /* Message+AnyAdditions.swift in Sources */, - 96535146121CC4533E37353AC31B472D /* Message+BinaryAdditions.swift in Sources */, - 16355709E85AB677FBE753A56582C40E /* Message+JSONAdditions.swift in Sources */, - 9E3F36B152794C7563ADD11F93C59D1A /* Message+JSONArrayAdditions.swift in Sources */, - 810C8F2812D8A4902FF27D852241CB85 /* Message+TextFormatAdditions.swift in Sources */, - D02F2A30CB6E9AE1CF4FA57A84A8C7BE /* MessageExtension.swift in Sources */, - 18363CA3983862EF8FC30587BB896380 /* NameMap.swift in Sources */, - 397C42DA63BA65B3FEE952942E199967 /* ProtobufAPIVersionCheck.swift in Sources */, - FAEAE10588DE8A52A46C4069E0222E1A /* ProtobufMap.swift in Sources */, - 55E6E1B7D2B53EA92E50882CF8995505 /* ProtoNameProviding.swift in Sources */, - 924FDB5FFE22039DB258BB793D9E7C17 /* SelectiveVisitor.swift in Sources */, - 8DE6540FC8179796AFF1957BE3F5C3A3 /* SimpleExtensionMap.swift in Sources */, - 450C8753D2EEE3EC1C3446230A27D8E8 /* source_context.pb.swift in Sources */, - 0953EDF7F603E4550C3851055206F86F /* StringUtils.swift in Sources */, - A6CA35A94394D5B5AF2555CA767F1FA7 /* struct.pb.swift in Sources */, - DDBD8BE0DFF5980A0D19CCBC980C7B88 /* SwiftProtobuf-macOS-dummy.m in Sources */, - F15091469D955DABAB73B770D6BAB69C /* TextFormatDecoder.swift in Sources */, - 0A28702E61E614CF5838AFBF239F5796 /* TextFormatDecodingError.swift in Sources */, - 7933796D4045F3C60B471A577AC9BCF3 /* TextFormatDecodingOptions.swift in Sources */, - FDD1489807B670D5350B325EB95B156B /* TextFormatEncoder.swift in Sources */, - 198FFC75ECF3BAA8590A606B679040B8 /* TextFormatEncodingOptions.swift in Sources */, - 176235E513F919943E09023554A31540 /* TextFormatEncodingVisitor.swift in Sources */, - F388247F281211F93766089159248FCD /* TextFormatScanner.swift in Sources */, - F8FDCD34CF147FDE40FC14244C3B5533 /* timestamp.pb.swift in Sources */, - 29284A889463278AC47FD5BD81E275F1 /* TimeUtils.swift in Sources */, - EE4E4ACA59334D2821FC3EAC0C7AF6A0 /* type.pb.swift in Sources */, - D3A55219E6D5B7B3E45BB8F085DEABA0 /* UnknownStorage.swift in Sources */, - D4BCCC5740282FD7BE6FA565556DB828 /* UnsafeBufferPointer+Shims.swift in Sources */, - CB090718C3017E296D3756BDDDD10F73 /* UnsafeRawPointer+Shims.swift in Sources */, - A56A19395C8D7DFF8FF4357FD81F6128 /* Varint.swift in Sources */, - CF0A01096E7795249F2502E61E96F9D1 /* Version.swift in Sources */, - 31EFBE8EC14EC57000DCD33339CF5A4F /* Visitor.swift in Sources */, - 4718FA3BB1379DE7853F2418EA2E9F14 /* WireFormat.swift in Sources */, - 523B6D90EE1203F9F07C7FF848A8E058 /* wrappers.pb.swift in Sources */, - FC8BED8713C0EE641CC172D911FC4BE4 /* ZigZag.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E51D884523487E3FB1958B5C189D9349 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C08D27A6105F694CD337E75A120B4078 /* AnimatedImageView.swift in Sources */, - 55E6D7FF05DD27B3C781EB7D615840D8 /* AuthenticationChallengeResponsable.swift in Sources */, - DA034132FB2B024B04E840449D16ACE7 /* AVAssetImageDataProvider.swift in Sources */, - 68708D23002966183663AB9C7BF0AFDD /* Box.swift in Sources */, - FCB2BD51468D1586DDA42A2C91B2CF2A /* CacheSerializer.swift in Sources */, - E6DF167E837310A67A46E37A904B9DAF /* CallbackQueue.swift in Sources */, - D7E2ED15D8FF9CD59A508436BBA1ABC9 /* CPListItem+Kingfisher.swift in Sources */, - 487784F071AA5480DC26F96C3000B271 /* Delegate.swift in Sources */, - C14493D7114BBDA35DC286CB6BC37019 /* DiskStorage.swift in Sources */, - 2F1F9A49868D7021B259D3F13166A044 /* ExtensionHelpers.swift in Sources */, - D4F7F3846E58C6C340A68A25495C75EC /* Filter.swift in Sources */, - 794A7ED743E24FAC59D6AECE61D5A1C7 /* FormatIndicatedCacheSerializer.swift in Sources */, - C484E4681E427FA7AFC3B751DD4581C4 /* GIFAnimatedImage.swift in Sources */, - 28CF778309B32080090C3D8729F20C49 /* GraphicsContext.swift in Sources */, - 599EC409193D61670662EABEEB7C3E63 /* Image.swift in Sources */, - 86797FEC49AB7B055B954AD88060D607 /* ImageBinder.swift in Sources */, - 5EAB8B8E70DD7F51343509A6905A204F /* ImageCache.swift in Sources */, - 73F3A28A90FE4FF0C271C2EC551B2C35 /* ImageContext.swift in Sources */, - F98D47A436C3004C5CE073BF2E74C241 /* ImageDataProcessor.swift in Sources */, - A0E6184584890C6880647FCB64BF7EF9 /* ImageDataProvider.swift in Sources */, - 2C0891333A3D1B55B4BB25EF14757757 /* ImageDownloader.swift in Sources */, - 147EE73DF24642839173D5BFDBE54E63 /* ImageDownloaderDelegate.swift in Sources */, - 99C0F0518048E3DBF3F5DE703748D9F2 /* ImageDrawing.swift in Sources */, - FD5595094650266B4D2358E722510669 /* ImageFormat.swift in Sources */, - CD5CE6A3A0623EF748AF1512598AAB37 /* ImageModifier.swift in Sources */, - 5E51ACFFA15D3131F2684BDD7CB62F5B /* ImagePrefetcher.swift in Sources */, - ED621863B13E4EDF22D4821E906612F2 /* ImageProcessor.swift in Sources */, - 26F315FF6AFC0D8933DF7D63608D037A /* ImageProgressive.swift in Sources */, - 2127508578A30360BF0FFD6D733D242F /* ImageTransition.swift in Sources */, - 029FFF23D93CC8F66E9C799E134AB72A /* ImageView+Kingfisher.swift in Sources */, - 5E69897C6EA88A657B685FBEF7840BBA /* Indicator.swift in Sources */, - D99B41494773ADDFD1C887B0D559D891 /* KF.swift in Sources */, - FA841A50C561645689E4685EB485BFD7 /* KFAnimatedImage.swift in Sources */, - 104173024A97B30DAF7D22C36FBEFDED /* KFImage.swift in Sources */, - 0CB8EEE6EA3223E2C4CB42D780961655 /* KFImageOptions.swift in Sources */, - 7AE17100E32E1B54B97F9247F79880BB /* KFImageProtocol.swift in Sources */, - E41E2E99BEFCF0717948A16CCC886965 /* KFImageRenderer.swift in Sources */, - 15A18399125F7E83432CD4437A9195E7 /* KFOptionsSetter.swift in Sources */, - B9EF3C2A32DE441B66F3DB74FF3F3283 /* Kingfisher.swift in Sources */, - CEA068836A39CD10A92809C40CFD9A47 /* Kingfisher-iOS-dummy.m in Sources */, - C6446B1A61CE367593B253A2C91B1B0D /* KingfisherError.swift in Sources */, - 8190618E0C34972873B8B6141D090CF9 /* KingfisherManager.swift in Sources */, - 89F1F84A00C05A1D4CC37A06625DE753 /* KingfisherOptionsInfo.swift in Sources */, - 87D63DDC827789191E6A51AA958D9E16 /* MemoryStorage.swift in Sources */, - CE79E4688B923027AC5CBFD5009073E9 /* NSButton+Kingfisher.swift in Sources */, - CD626FC2F016328E9EB1A84AC7C9B102 /* NSTextAttachment+Kingfisher.swift in Sources */, - 75295BF00B128EE181F4D1504406BB99 /* Placeholder.swift in Sources */, - 71AE3B10EC9EE26FC4A996CB930E4DDC /* RedirectHandler.swift in Sources */, - 490DBAB72E8551B29F7052953AA0CF00 /* RequestModifier.swift in Sources */, - 389CE3F0CA937242EEFD41772DB7F3C4 /* Resource.swift in Sources */, - 6DAA3CD5307F8BAC7338217E0B5956CC /* Result.swift in Sources */, - 3F8C8015811043F53097E1B775B22387 /* RetryStrategy.swift in Sources */, - F361923D2BEBB394D546444D9F34A8DA /* Runtime.swift in Sources */, - D880A4549D48D5C6C4DE1360334C878F /* SessionDataTask.swift in Sources */, - B6A77025A5EF591256AA683BA40D7C5E /* SessionDelegate.swift in Sources */, - 0D0C2CD5EDD307C05C6D2E552F2B6627 /* SizeExtensions.swift in Sources */, - A7AE3804C07DF45C5951B5AD4C042476 /* Source.swift in Sources */, - 52A3D0042EE21AEA099AC860315EFC45 /* Storage.swift in Sources */, - 52A678BCB5F2E0CB18E5821014D5696C /* String+MD5.swift in Sources */, - 4715D93BD936773665B02F96EE9152EE /* TVMonogramView+Kingfisher.swift in Sources */, - EB8670EBA22008102C81F162F218C190 /* UIButton+Kingfisher.swift in Sources */, - 510D231AF0D62515747D8C9455438057 /* WKInterfaceImage+Kingfisher.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EEF6B8BC508A9DED31D6BC7685A8B86C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 96E3EDE15CFD17A7393386869AD59138 /* Account.swift in Sources */, - 484BEE23B7E3BF27B3EAB3650F300947 /* Account+Codable.swift in Sources */, - E6AFE4476B97D3141ADF9AB3FDEE98AC /* AddressProtocol.swift in Sources */, - 79A5AB459B70029E0BD51ABC6F6D3C0F /* AES.swift in Sources */, - DA6EA831AD908CA5D14FF24C4417CE51 /* AESPaddingMode.swift in Sources */, - F73CFFA4D5689D35CF76EC1529923D0E /* Aeternity+Proto.swift in Sources */, - 0806F2D7F4C8362465B3FFEC271673B0 /* Aeternity.pb.swift in Sources */, - 07C6A704238D718E0878AEFB6398FA2C /* Aion+Proto.swift in Sources */, - 877FA629FAF5B35F960307BD85AB9872 /* Aion.pb.swift in Sources */, - FEF41CFD00D04DD65830790D28C3F555 /* Algorand+Proto.swift in Sources */, - 0F30102B64BDCA9B775D560B5A8D708E /* Algorand.pb.swift in Sources */, - 7F8BEF6222972DD78A65343BAEF6F262 /* AnyAddress.swift in Sources */, - 74474FB0CC1AFD90EBB57AAD2F2F6A62 /* AnySigner.swift in Sources */, - F836FD2E3811E7C8BDEA4C3C720266DC /* Aptos+Proto.swift in Sources */, - DDAE2F48672EB0EB817FEDB9A5F8B6DD /* Aptos.pb.swift in Sources */, - 2DBC5D04447933DDE22DE7FBEFDA789A /* AsnParser.swift in Sources */, - 95F8E385C9119C01B439ED63A5029C58 /* Barz.swift in Sources */, - E9B8877C14C21852DFDFD4585AFD8BAC /* Barz+Proto.swift in Sources */, - A4AC2834F3D5EF504D6EFB1A50BEFFA2 /* Barz.pb.swift in Sources */, - 0CC23366D8BA2DEDAEA3F09BA26CDCB0 /* Base32.swift in Sources */, - 6F480EA79002212DCFF90D232AF089C0 /* Base58.swift in Sources */, - 4808315C7B5D2BF2B46A71C49651DCD4 /* Base64.swift in Sources */, - 80332037C7DE6D6FB78C5B806B6EFE82 /* Binance+Proto.swift in Sources */, - 425F32B287E1DD55748830769D96C68F /* Binance.pb.swift in Sources */, - 746F34331947C3328012A3F1691EE226 /* Bitcoin+Proto.swift in Sources */, - 2C5F1E3B9F730433F579D532376748FA /* Bitcoin.pb.swift in Sources */, - 57F9B37C5468209C0507C4A9DD9F4A1D /* BitcoinAddress.swift in Sources */, - 446971D9D337972F1DA1644BF1F13637 /* BitcoinAddress+Extension.swift in Sources */, - 841A5370765571A6E96DA6174CE0626E /* BitcoinFee.swift in Sources */, - BCB0CD6973A3094218BA63E6AA969672 /* BitcoinMessageSigner.swift in Sources */, - D2CC465B22F356B7DAA599AAA53BAFFF /* BitcoinScript.swift in Sources */, - 793D85B0453667D13062BA0D02B5E3A0 /* BitcoinSigHashType.swift in Sources */, - 60F70D32ED67B3EC2DE2D52D7119A842 /* BitcoinSigHashType+Extension.swift in Sources */, - 7ECD6A1F0F69D30EF211ADF83C4C5BBF /* BitcoinV2+Proto.swift in Sources */, - A86E696645EA0BF31A256BF5DCE53BF9 /* BitcoinV2.pb.swift in Sources */, - ECBD65FB0F1B63387E813C3AF0A2D88C /* Blockchain.swift in Sources */, - 246B3C33ACB5562BDA4419011852C1DB /* Cardano.swift in Sources */, - 245AE345CCBA7777A5F86FB6090C021B /* Cardano+Proto.swift in Sources */, - 8786358F65F435152EB3F58DB5EE80A1 /* Cardano.pb.swift in Sources */, - 2F8C89A38FA1078FBD686907C7A2C45A /* CoinType.swift in Sources */, - A68B2A1E0D791B47B1835054873DB1E9 /* CoinType+Address.swift in Sources */, - C58CA5F6D49831223CBF4280162D4C8A /* CoinType+Extension.swift in Sources */, - 27F28DD3A4EF3E6273BDFD154BBF1028 /* CoinTypeConfiguration.swift in Sources */, - 9E37676A3C883BA96737E276502B9203 /* Common+Proto.swift in Sources */, - CA944E425D7C017D83692EE81D6F1F0E /* Common.pb.swift in Sources */, - 1850236025D7A1EECDBA670D479C79B2 /* Cosmos+Proto.swift in Sources */, - FB71A9D97D3FB9BFB41FCA8367A560A5 /* Cosmos.pb.swift in Sources */, - 810C7591531E6AF2B90B1115F8EDDD3E /* Curve.swift in Sources */, - CB2DFA585EA57D5976F4DE3A9CA57209 /* Data+Hex.swift in Sources */, - ACC7E584A75F3028EF142CD23C46A252 /* DataVector.swift in Sources */, - F48FBFC1229A17AC04575310F4548852 /* Decred+Proto.swift in Sources */, - BA3C4648EA788B2B2EC3C9950956DBD9 /* Decred.pb.swift in Sources */, - 18116787C804ED38F559A9D7DB28372D /* Derivation.swift in Sources */, - B7F558967D8530ED415B6EEC31C339DE /* DerivationPath.swift in Sources */, - 750DCAC6A92D16252903518170BABBA9 /* DerivationPath+Extension.swift in Sources */, - 6BFB87D9D0091BCCA7520DD4ACED7836 /* DerivationPathIndex.swift in Sources */, - F518AE3FD28F56A4A746E13DD1AAD16C /* EOS+Proto.swift in Sources */, - 002E122626CCCEA0920173D0ACB19D56 /* EOS.pb.swift in Sources */, - 1E8DB15C8D310A32EBA83BEEB98D2F49 /* Ethereum.swift in Sources */, - 7B63BA1E87B74AEB27E8ED9494CD3323 /* Ethereum+Proto.swift in Sources */, - E7971FAB3555852FDEDD03DCAD04A00C /* Ethereum.pb.swift in Sources */, - 062B47B98FDE668ADB938666A59F8A4A /* EthereumAbi.swift in Sources */, - 7E0D332C452D6BF49CC9BB7AEF423DA6 /* EthereumAbi+Proto.swift in Sources */, - 336FD0EA8FB6F73CD73E418C042F7D2F /* EthereumAbi.pb.swift in Sources */, - 50140F58AD4A7C3F1245249A53812BA3 /* EthereumAbiFunction.swift in Sources */, - 0B1109F949F5067A81FA881176FAFACB /* EthereumAbiValue.swift in Sources */, - EB988FD9864B3DCBF72B4DC88C2BDBC1 /* EthereumChainID.swift in Sources */, - 454C87DA65D31F0AC002A8DCB97EC755 /* EthereumMessageSigner.swift in Sources */, - D1477EC51B808E9E62FFF713F84F9E08 /* EthereumRlp.swift in Sources */, - 616B273F89B3EEE34AEE2C6B833DD83B /* EthereumRlp+Proto.swift in Sources */, - DFD49319C34CFFC603E45148173D4F9F /* EthereumRlp.pb.swift in Sources */, - 56C5DB7121C6E286DC9CB5911BD74A5D /* Everscale+Proto.swift in Sources */, - DF49E9798F8B090D5DE527506E916BBB /* Everscale.pb.swift in Sources */, - CC67D699C5AEBBD6A9ADB46F624A2C23 /* Filecoin+Proto.swift in Sources */, - EC34BC14F6B26491E208D67DF17ED512 /* Filecoin.pb.swift in Sources */, - 31BB7FCB4902051E8B01B8B0DB0BABE2 /* FilecoinAddressConverter.swift in Sources */, - 7E2E7EFFFA6F5B83818161DF9E099F71 /* FilecoinAddressType.swift in Sources */, - 4625A3384A06886608F8D1064C611093 /* FIO+Proto.swift in Sources */, - 7572A133DA0947D433C53552B46E3461 /* FIO.pb.swift in Sources */, - A31D1A00FE3230AF510AA833E7FA919B /* FIOAccount.swift in Sources */, - 311BA547F5EA987ADF20AFC0B2F133B9 /* Greenfield+Proto.swift in Sources */, - 462D609B09F8DD74605EC0C15BDD5693 /* Greenfield.pb.swift in Sources */, - A5181DF30CEB43AE8AB3A81ACF8DA80C /* GroestlcoinAddress.swift in Sources */, - 48FF4677D70FDAE7057D52C67EF26140 /* Harmony+Proto.swift in Sources */, - 6B78DE5AB26CA2749592C84EE66606A7 /* Harmony.pb.swift in Sources */, - EC100333339B648812374B119706A2D1 /* Hash.swift in Sources */, - 9E5BDC0FAC31932ED9EF264C8B920795 /* HDVersion.swift in Sources */, - C575B4A83363C2E88B4F12E231AAD2AD /* HDVersion+Extension.swift in Sources */, - C8D644D630F8AF4D6CE67A2594F15525 /* HDWallet.swift in Sources */, - 836C106B7ECFADB21A44F6E0CA7F940F /* Hedera+Proto.swift in Sources */, - 592A0A516C86B2B686234A6D592EAEF8 /* Hedera.pb.swift in Sources */, - 7ABBFC909F883DEBC2FD8A91FD6CA361 /* HRP.swift in Sources */, - 2B131967377E702B4820CD364D3A97BF /* Icon+Proto.swift in Sources */, - 9D9E4D6A5BA15C811D42EE2171A9954C /* Icon.pb.swift in Sources */, - EA0F72D5C8C33F55D0621774F6166982 /* IOST+Proto.swift in Sources */, - CBC8617152F8EAA7FBC8BD86A99F5F87 /* IOST.pb.swift in Sources */, - F6CF04451DD1A4DB7A3150311D819E0A /* IoTeX+Proto.swift in Sources */, - C669BDAF9BB5463F7EA59BA44C68B432 /* IoTeX.pb.swift in Sources */, - A12A7ED87D8B1FBE582D955B2B91FB15 /* KeyStore.swift in Sources */, - 6AFF5B6B753B7CF80886EED34420E950 /* KeyStore.Error.swift in Sources */, - 592C6F981894462D6819BC9B34D6D309 /* LiquidStaking.swift in Sources */, - 84A6A38ACE47A53FC5C9BB31A50B7543 /* LiquidStaking+Proto.swift in Sources */, - 79DFBFDFCA6F4925FB6295C48F093F8B /* LiquidStaking.pb.swift in Sources */, - 1A550D7E44D11C6FC8B2826A23BC8355 /* Mnemonic.swift in Sources */, - 9A1011F104A8F3728117F224A448CB79 /* Mnemonic+Extension.swift in Sources */, - F8285DD12FB6F93B177CC13322DD9D99 /* MultiversX+Proto.swift in Sources */, - E2BDFBC6AF974AAAB8CF499FD1A8F2DB /* MultiversX.pb.swift in Sources */, - 7B6F7069451DFC345E5E8520FD17AD4D /* Nano+Proto.swift in Sources */, - 3F3CB5D19828BA59F3B241D04AD67080 /* Nano.pb.swift in Sources */, - 660B2B77699B0FA5D37A8B0D8888D8F6 /* NEAR+Proto.swift in Sources */, - 2D823ABC9C76E56D33289964A1EA519A /* NEAR.pb.swift in Sources */, - 0F1AEEBB57241B05818524F2EA5329A9 /* NEARAccount.swift in Sources */, - 62CB70BDBB2C4EBFD29CDF1DBD582675 /* Nebulas+Proto.swift in Sources */, - 872CDB0C58246142545BBC9E3AB14F43 /* Nebulas.pb.swift in Sources */, - C22C4EC93F698F8F3E78B037791FF4F2 /* NEO+Proto.swift in Sources */, - EC3E7109E6E03C032F2F19F84B65C060 /* NEO.pb.swift in Sources */, - B6D7E4251EFE4DBACDE94DABE05BA546 /* Nervos+Proto.swift in Sources */, - D1A1A33102EAEA5D8CB268AFFCF97295 /* Nervos.pb.swift in Sources */, - 044E794E9215AB8AB5E1898220CBA528 /* NervosAddress.swift in Sources */, - FC12C5344BFE73775F8C37573A2308F8 /* Nimiq+Proto.swift in Sources */, - EE166C482DE38C15334D00F5A98343DE /* Nimiq.pb.swift in Sources */, - E02A4C270E1F8C40A4C3C97A6C149589 /* NULS+Proto.swift in Sources */, - 518213EA3C70CE0F240293C1768DCE25 /* NULS.pb.swift in Sources */, - 9077CBA418D29564472DE2312E36812D /* Oasis+Proto.swift in Sources */, - 4772A722ACAB044A689A2FCE06F2B2E6 /* Oasis.pb.swift in Sources */, - 2EBFEA0219169D97FC3614CCE8226E87 /* Ontology+Proto.swift in Sources */, - 8FA04A1AFDCEE412CD04A34D4E00B0AD /* Ontology.pb.swift in Sources */, - C0284A0A774382D332CC9F3DB4E5BE89 /* PBKDF2.swift in Sources */, - 2A07D631883A9F22733917E302A34CDB /* Polkadot+Proto.swift in Sources */, - 08C5F4B56BB7E9C36FB2F674BB41E1BE /* Polkadot.pb.swift in Sources */, - 422D63C83469BAACFEA27485EAFE52F1 /* PrivateKey.swift in Sources */, - 8154E367C037B57F6E8A9D9F32A5AF34 /* PrivateKeyType.swift in Sources */, - 80391A2FC41167EB55704BF0E22D2C73 /* PublicKey.swift in Sources */, - 1F959FD27F63F07340BF6A81F1265CB9 /* PublicKey+Bitcoin.swift in Sources */, - 31630C4A81D8CE296CB78581175E93FF /* PublicKeyType.swift in Sources */, - C1E868FD5A446330237DC7B0B00B949B /* Purpose.swift in Sources */, - 4C1422199B3511E212ACBD81D1EFE2B3 /* Ripple+Proto.swift in Sources */, - 4B1617B89284D7500B1B061081B0AC79 /* Ripple.pb.swift in Sources */, - 28CAF126C7ACA9AC4886F36341A8DC00 /* RippleXAddress.swift in Sources */, - D9415924A385272C664B1D7C400F1344 /* SecRandom.m in Sources */, - 02FE4236689712276FE80AD582399EAC /* SegwitAddress.swift in Sources */, - 950764E910EFF56C9B57D252E8A4A373 /* Solana+Proto.swift in Sources */, - D0F9EBB40AED2318736B6104B2BD71B7 /* Solana.pb.swift in Sources */, - 56BD3F974F63A98212F606578701DD16 /* SolanaAddress.swift in Sources */, - 7B8FC6CD3C89AC01E6BC18C5FD938937 /* SS58AddressType.swift in Sources */, - B54431AA5BF6450D499A8B6D118260B7 /* StarkExMessageSigner.swift in Sources */, - CD495E3D39CE0A790E641087E6D28398 /* StarkWare.swift in Sources */, - 5B64D12847806AC1DD41C0773BE27974 /* Stellar+Proto.swift in Sources */, - A56960634D93A2622CF9DB02B9B455D1 /* Stellar.pb.swift in Sources */, - 2749160BB14CE1DF01F25DA280E6A0A1 /* StellarMemoType.swift in Sources */, - D61F9A580613522E412B60B5DE591115 /* StellarPassphrase.swift in Sources */, - B0280A5F0084B9D0E85C6BDF9655BBC5 /* StellarVersionByte.swift in Sources */, - 910925AD8088D9F833B9727DF020B1DF /* StoredKey.swift in Sources */, - FEBED6C9506F17029498296F4426BA8F /* StoredKeyEncryption.swift in Sources */, - 3FEF8EF7FA2A0728F3ABA6A2FF24BB86 /* StoredKeyEncryptionLevel.swift in Sources */, - 94702E63CFF075499A7DE99A4DE31B7F /* Sui+Proto.swift in Sources */, - 12453AB7CBBF11688F377C7498DDC6FD /* Sui.pb.swift in Sources */, - 7CF464BEB8A4BE6216B892A02DE34495 /* Tezos+Proto.swift in Sources */, - 796EA50EB48265F8EEDD00026815169D /* Tezos.pb.swift in Sources */, - D428BC0C2CD676E2FD5CA02C24D88D5A /* TezosMessageSigner.swift in Sources */, - 488F57624445C00654062750F39105F7 /* TheOpenNetwork+Proto.swift in Sources */, - 55F7A6BF11754B8D841357F502316288 /* TheOpenNetwork.pb.swift in Sources */, - C0CF286E899C8DD96272605A53E76496 /* Theta+Proto.swift in Sources */, - 7749DD20CDDCA8BF410B08B3D0C7A797 /* Theta.pb.swift in Sources */, - DA2C4659E7B10100CA27F8F9F68A1533 /* THORChainSwap.swift in Sources */, - A3DF6D6DB0CC3C869E76F8732AA3ADC8 /* THORChainSwap+Proto.swift in Sources */, - 992C9B6B2C6D8153CDA71580F41FB42E /* THORChainSwap.pb.swift in Sources */, - 3CE48C3EAA5F1A72382338780CA6C084 /* TransactionCompiler.swift in Sources */, - 7B2D70436301751457E7A4CAAAE65CED /* TransactionCompiler+Proto.swift in Sources */, - 5995C52C8EF03377CC52AA591398BB83 /* TransactionCompiler.pb.swift in Sources */, - 29B561D731C49DEF52343B81CC6BA4DA /* Tron+Proto.swift in Sources */, - E0DC24BA0E2AEEFBAE60B8253F9334A3 /* Tron.pb.swift in Sources */, - CA7AC1D6F331F9D32CD480CECF8911DB /* TronMessageSigner.swift in Sources */, - 0605F91336E5CCABDC692CE325DF49BF /* TrustWalletCore-macOS-dummy.m in Sources */, - A27239EBA798A3525585022830854025 /* TWCardano.swift in Sources */, - E7F1B99839FEC9ADDDEF3155D10C5FF9 /* TWData.swift in Sources */, - E5F574916CCAB3FD538787A621C40C3C /* TWString.swift in Sources */, - 71B94544EDA80ED3FDB8D8C52A22AE76 /* UniversalAssetID.swift in Sources */, - 6063F452C9BC213904FE0D3EC4069C10 /* Utxo+Proto.swift in Sources */, - 26F8A807FC9B8C068D74CF7C3CA80F61 /* Utxo.pb.swift in Sources */, - 406F8D6E72AD2DCF7FA28F5B2397B768 /* VeChain+Proto.swift in Sources */, - 05560B66ACF66C100B0B86AF8EB15BED /* VeChain.pb.swift in Sources */, - C98B65F019E4D966182685EC7B80294B /* Wallet.swift in Sources */, - F06FC5ED42BE38FADBA98A08129FA3F1 /* Watch.swift in Sources */, - E28271F168ABBAE1ADFFD4019781D553 /* Waves+Proto.swift in Sources */, - 8534C76020A9BF937B8AEC592EE3D65B /* Waves.pb.swift in Sources */, - FC06F1D439D750B257F9A374CE050ECF /* WebAuthn.swift in Sources */, - 41619493E40D03A6499C36BF1BE743A1 /* Zilliqa+Proto.swift in Sources */, - 1DAF8239B6AF9D26FECC9974A74CDF4D /* Zilliqa.pb.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 05735F0E0C09BED2575045B0BA961A02 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "Kingfisher-iOS"; - target = 685A5AC5E317EE1D980ECCFE9E6EB08A /* Kingfisher-iOS */; - targetProxy = B3B2A967605ABA852DDD95ACDB84CF8A /* PBXContainerItemProxy */; - }; - 675FF77F3794C7567EA7C541FE0089C4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "Kingfisher-macOS"; - target = 65AA93B2B9CF39819DBD1DDF58FCBC15 /* Kingfisher-macOS */; - targetProxy = 8BD1BBE88A3489AD678A963F4C90536F /* PBXContainerItemProxy */; - }; - 75813E9BD28B7ABFB7E2A86A0400E822 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "BigInt-iOS"; - target = 889A3C6D0A70D789D17B7BFFE160AD76 /* BigInt-iOS */; - targetProxy = 9C7E59A394790E7EC70A279B233CE7C8 /* PBXContainerItemProxy */; - }; - 88CAF40609C92C796DB1375CCD537280 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "SwiftProtobuf-macOS"; - target = AA186741961F10502016CE44BFED6684 /* SwiftProtobuf-macOS */; - targetProxy = F3016EC094FD30D87573954D3C1F74AE /* PBXContainerItemProxy */; - }; - AFC30FE7E9E5AC151AA5A3E82C39480B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "BigInt-macOS"; - target = 63F854E532D7CBA393D37B6C84E1F23F /* BigInt-macOS */; - targetProxy = DAA1A4B6A4CD977AEF723ADD00FBBF4D /* PBXContainerItemProxy */; - }; - B857EEB8ED8D6A2AC36E86D737D358E6 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "SwiftProtobuf-iOS"; - target = 357D7AA757B0ED4603C9CD1523BC234E /* SwiftProtobuf-iOS */; - targetProxy = BA97322D9F7AD9D41B357B554C0B7EE4 /* PBXContainerItemProxy */; - }; - C498783FD4DB8D702869FC72A48519F5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "Kingfisher-macOS-Kingfisher"; - target = B2085DBECFAD83713FC1BE448B7882B0 /* Kingfisher-macOS-Kingfisher */; - targetProxy = 4008E19D2EAC0FF1444B181F0811051C /* PBXContainerItemProxy */; - }; - DC15C11FD181AC4DFB2305CAEC2D9AE5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "TrustWalletCore-iOS"; - target = DC6F436FE9D7D62655988D0B8E3A24DE /* TrustWalletCore-iOS */; - targetProxy = 1C0D136FBA340E3B3558BAFC2C9927D9 /* PBXContainerItemProxy */; - }; - E3C2506DB0269D2B93CA23BA426576DE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "TrustWalletCore-macOS"; - target = D84FF1ABB5E840CFBA9F610D26DFB42D /* TrustWalletCore-macOS */; - targetProxy = 8D01F3CFBEB4553399A7D6D452331852 /* PBXContainerItemProxy */; - }; - F585E7B7CDA2D0A3A032DBB462466983 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "SwiftProtobuf-iOS"; - target = 357D7AA757B0ED4603C9CD1523BC234E /* SwiftProtobuf-iOS */; - targetProxy = 3EB5BFA96AEBE32431365196DAAD06BA /* PBXContainerItemProxy */; - }; - F60D9692BB2A04859B066EDACEE46C00 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "Kingfisher-iOS-Kingfisher"; - target = 7B76B3A65EC90BE00011B16DE4F49E38 /* Kingfisher-iOS-Kingfisher */; - targetProxy = 31ACE27DAA26FFD0C5140527768E2BA0 /* PBXContainerItemProxy */; - }; - FE64FBC8848EF31F57F06D287B6F53F0 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "SwiftProtobuf-macOS"; - target = AA186741961F10502016CE44BFED6684 /* SwiftProtobuf-macOS */; - targetProxy = 9404F7C0524BFAB25A4D52F5B5447D27 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 01A529D2AB4E04B23367AFB9C0982301 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B5A7D32EE5D6F77DF2F73B856171C0C1 /* Kingfisher-macOS.debug.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Kingfisher-macOS/Kingfisher-macOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Kingfisher-macOS/Kingfisher-macOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/Kingfisher-macOS/Kingfisher-macOS.modulemap"; - PRODUCT_MODULE_NAME = Kingfisher; - PRODUCT_NAME = Kingfisher; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 173BB1FB60791D9EDCFF836734215FFF /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B5A54E93E0197855B585F5721CBB6E3B /* Kingfisher-iOS.debug.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Kingfisher-iOS/Kingfisher-iOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Kingfisher-iOS/Kingfisher-iOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/Kingfisher-iOS/Kingfisher-iOS.modulemap"; - PRODUCT_MODULE_NAME = Kingfisher; - PRODUCT_NAME = Kingfisher; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 28E1AB77EB4EDF6AAF39035E1FDF1A27 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 27315C8C7EF44BB4A9FAF21E8BD4AD72 /* TrustWalletCore-iOS.debug.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS.modulemap"; - PRODUCT_MODULE_NAME = WalletCore; - PRODUCT_NAME = WalletCore; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 2E1FFBA8EDFA57C885D27D5AABA49A04 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 2CFFCFF067B691C42A7F5F54CAAA241D /* BigInt-macOS.release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/BigInt-macOS/BigInt-macOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/BigInt-macOS/BigInt-macOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/BigInt-macOS/BigInt-macOS.modulemap"; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = BigInt; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 3844624B7DD09504CE225B7B8F167814 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 343D79E7292C13F1CC024AB35D5305F5 /* Kingfisher-macOS.release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Kingfisher-macOS/Kingfisher-macOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Kingfisher-macOS/Kingfisher-macOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/Kingfisher-macOS/Kingfisher-macOS.modulemap"; - PRODUCT_MODULE_NAME = Kingfisher; - PRODUCT_NAME = Kingfisher; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 3B06B0C3DA2A7ACC347B96B19AE1BAC5 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6C79B6EDDAC5013D98434F63A8C458B6 /* Pods-Tokenary.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-Tokenary/Pods-Tokenary-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/Frameworks", - ); - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/Pods-Tokenary/Pods-Tokenary.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 3D156A49A98E8816C1AD24D2ACE812C7 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D008E080F72C1CD5CEC40E098C9B274E /* SwiftProtobuf-macOS.debug.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS.modulemap"; - PRODUCT_MODULE_NAME = SwiftProtobuf; - PRODUCT_NAME = SwiftProtobuf; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 42723596D5F9E2E73319583FB3EF50FC /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 343D79E7292C13F1CC024AB35D5305F5 /* Kingfisher-macOS.release.xcconfig */; - buildSettings = { - CODE_SIGNING_ALLOWED = NO; - COMBINE_HIDPI_IMAGES = YES; - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Kingfisher-macOS"; - IBSC_MODULE = Kingfisher; - INFOPLIST_FILE = "Target Support Files/Kingfisher-macOS/ResourceBundle-Kingfisher-Kingfisher-macOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - MACOSX_DEPLOYMENT_TARGET = 10.14; - PRODUCT_NAME = Kingfisher; - SDKROOT = macosx; - SKIP_INSTALL = YES; - WRAPPER_EXTENSION = bundle; - }; - name = Release; - }; - 55276914F266D190AB904CCC02884B4D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 37F715D9963765B2EEAA9F7766C7D941 /* Pods-Tokenary.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-Tokenary/Pods-Tokenary-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/Frameworks", - ); - MACH_O_TYPE = staticlib; - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/Pods-Tokenary/Pods-Tokenary.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 5DDE99A10C73EA98465FBC7EFF872B04 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C46846A6B6844EA75D4B73021ACB0CEE /* Kingfisher-iOS.release.xcconfig */; - buildSettings = { - CODE_SIGNING_ALLOWED = NO; - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Kingfisher-iOS"; - IBSC_MODULE = Kingfisher; - INFOPLIST_FILE = "Target Support Files/Kingfisher-iOS/ResourceBundle-Kingfisher-Kingfisher-iOS-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - PRODUCT_NAME = Kingfisher; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; - }; - name = Release; - }; - 5FCF960F2927BAA304BD0235291BC604 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 30D51229828A86E2758735FEAD988F18 /* SwiftProtobuf-iOS.debug.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS.modulemap"; - PRODUCT_MODULE_NAME = SwiftProtobuf; - PRODUCT_NAME = SwiftProtobuf; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 6C5A199CE3A5A6D0608C13E8B518696F /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B5A7D32EE5D6F77DF2F73B856171C0C1 /* Kingfisher-macOS.debug.xcconfig */; - buildSettings = { - CODE_SIGNING_ALLOWED = NO; - COMBINE_HIDPI_IMAGES = YES; - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Kingfisher-macOS"; - IBSC_MODULE = Kingfisher; - INFOPLIST_FILE = "Target Support Files/Kingfisher-macOS/ResourceBundle-Kingfisher-Kingfisher-macOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - MACOSX_DEPLOYMENT_TARGET = 10.14; - PRODUCT_NAME = Kingfisher; - SDKROOT = macosx; - SKIP_INSTALL = YES; - WRAPPER_EXTENSION = bundle; - }; - name = Debug; - }; - 729C44129C34A80DC04BF870F82C72A3 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6F0498A7E7D53E85DF3243E71163ABC9 /* TrustWalletCore-iOS.release.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS.modulemap"; - PRODUCT_MODULE_NAME = WalletCore; - PRODUCT_NAME = WalletCore; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 85CC4EE19C2667D54B98AE457783F1FE /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7BE739F12791EB233F4B5B874300DD5E /* Pods-Tokenary iOS.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 89570C13943A4FB146D3EE1F95D45CEC /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D75BB3D33AB861634FA10CFA04E56333 /* Pods-Tokenary iOS.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 9023EFC8BC484F1C175E1850572982A6 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6CF12A9C9C36B60BE950F994C6819D32 /* BigInt-iOS.debug.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/BigInt-iOS/BigInt-iOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/BigInt-iOS/BigInt-iOS.modulemap"; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = BigInt; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 929A8B80DE20FF1029339D2B621A6A40 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B5A54E93E0197855B585F5721CBB6E3B /* Kingfisher-iOS.debug.xcconfig */; - buildSettings = { - CODE_SIGNING_ALLOWED = NO; - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Kingfisher-iOS"; - IBSC_MODULE = Kingfisher; - INFOPLIST_FILE = "Target Support Files/Kingfisher-iOS/ResourceBundle-Kingfisher-Kingfisher-iOS-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - PRODUCT_NAME = Kingfisher; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; - }; - name = Debug; - }; - 933AC7AEA486B4F87CEEB6FA4F56D8AB /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = FCD68B89B047C8C858D8A92AC01124EF /* TrustWalletCore-macOS.debug.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS.modulemap"; - PRODUCT_MODULE_NAME = WalletCore; - PRODUCT_NAME = WalletCore; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 9FD02DD5F73B220F724947593768DD11 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5F18B835F60CBEFE8D0AAE093F26B41C /* BigInt-macOS.debug.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/BigInt-macOS/BigInt-macOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/BigInt-macOS/BigInt-macOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/BigInt-macOS/BigInt-macOS.modulemap"; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = BigInt; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A2F46689017E6ACD05E2F4A6A635DA08 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MACOSX_DEPLOYMENT_TARGET = 11.4; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - A69B9AF52C315BD5DF0AC8C5758E92DB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MACOSX_DEPLOYMENT_TARGET = 11.4; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; - AF859BEFD4AB94A987963F9C84B3B399 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F8E87126EE361122618FFE15CFA51C12 /* SwiftProtobuf-iOS.release.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS.modulemap"; - PRODUCT_MODULE_NAME = SwiftProtobuf; - PRODUCT_NAME = SwiftProtobuf; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - BDA5FAE5D1C04921642E104ECF0FC515 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7944105E73D128DCABD3237C26233DF1 /* TrustWalletCore-macOS.release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS.modulemap"; - PRODUCT_MODULE_NAME = WalletCore; - PRODUCT_NAME = WalletCore; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - D455FB2C4606A125886BF0F706066D08 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C46846A6B6844EA75D4B73021ACB0CEE /* Kingfisher-iOS.release.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Kingfisher-iOS/Kingfisher-iOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Kingfisher-iOS/Kingfisher-iOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/Kingfisher-iOS/Kingfisher-iOS.modulemap"; - PRODUCT_MODULE_NAME = Kingfisher; - PRODUCT_NAME = Kingfisher; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - D91B95BB57F85C8659D341E604EE53EE /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A25DCFAA20CE6EE261D6AE35172B8014 /* SwiftProtobuf-macOS.release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS.modulemap"; - PRODUCT_MODULE_NAME = SwiftProtobuf; - PRODUCT_NAME = SwiftProtobuf; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - DA4CA0627E60F2FB2A6A47835A27041B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DB225B5FE5781FF966C8C41D7094ABC2 /* BigInt-iOS.release.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/BigInt-iOS/BigInt-iOS-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.4; - MODULEMAP_FILE = "Target Support Files/BigInt-iOS/BigInt-iOS.modulemap"; - PRODUCT_MODULE_NAME = BigInt; - PRODUCT_NAME = BigInt; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 051A3664284FD94EF21F59CA3E7680D7 /* Build configuration list for PBXNativeTarget "Pods-Tokenary iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 89570C13943A4FB146D3EE1F95D45CEC /* Debug */, - 85CC4EE19C2667D54B98AE457783F1FE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1450C517A56545505AA528DE55B390AB /* Build configuration list for PBXNativeTarget "Kingfisher-macOS-Kingfisher" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6C5A199CE3A5A6D0608C13E8B518696F /* Debug */, - 42723596D5F9E2E73319583FB3EF50FC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 245A53667EC4962A9A202364BE68E650 /* Build configuration list for PBXNativeTarget "Kingfisher-macOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 01A529D2AB4E04B23367AFB9C0982301 /* Debug */, - 3844624B7DD09504CE225B7B8F167814 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2A0AB7877638824B76668926D08268E2 /* Build configuration list for PBXNativeTarget "BigInt-macOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9FD02DD5F73B220F724947593768DD11 /* Debug */, - 2E1FFBA8EDFA57C885D27D5AABA49A04 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 373CDCBE6DCD1CD9E45B43BB90ECBD19 /* Build configuration list for PBXNativeTarget "Kingfisher-iOS-Kingfisher" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 929A8B80DE20FF1029339D2B621A6A40 /* Debug */, - 5DDE99A10C73EA98465FBC7EFF872B04 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 42ACB9D81C1D57B6E091C452C1994761 /* Build configuration list for PBXNativeTarget "TrustWalletCore-macOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 933AC7AEA486B4F87CEEB6FA4F56D8AB /* Debug */, - BDA5FAE5D1C04921642E104ECF0FC515 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A2F46689017E6ACD05E2F4A6A635DA08 /* Debug */, - A69B9AF52C315BD5DF0AC8C5758E92DB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5D8F9D17BE2EC05AD83C8FBD44624A73 /* Build configuration list for PBXNativeTarget "Kingfisher-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 173BB1FB60791D9EDCFF836734215FFF /* Debug */, - D455FB2C4606A125886BF0F706066D08 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - B2DE3ECFE17BADA76CA213792EAF61FE /* Build configuration list for PBXNativeTarget "Pods-Tokenary" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 55276914F266D190AB904CCC02884B4D /* Debug */, - 3B06B0C3DA2A7ACC347B96B19AE1BAC5 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BB16C76B183D3F6072E5A755D4F31FB2 /* Build configuration list for PBXNativeTarget "SwiftProtobuf-macOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 3D156A49A98E8816C1AD24D2ACE812C7 /* Debug */, - D91B95BB57F85C8659D341E604EE53EE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BD65D1C1142848D64515247057F83113 /* Build configuration list for PBXNativeTarget "BigInt-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9023EFC8BC484F1C175E1850572982A6 /* Debug */, - DA4CA0627E60F2FB2A6A47835A27041B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C8291E1E98ACB4F162DC260A885FFE2B /* Build configuration list for PBXNativeTarget "TrustWalletCore-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 28E1AB77EB4EDF6AAF39035E1FDF1A27 /* Debug */, - 729C44129C34A80DC04BF870F82C72A3 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - FEE4952B3E7B87C982FC623FE25108C7 /* Build configuration list for PBXNativeTarget "SwiftProtobuf-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5FCF960F2927BAA304BD0235291BC604 /* Debug */, - AF859BEFD4AB94A987963F9C84B3B399 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; -} diff --git a/Pods/SwiftProtobuf/LICENSE.txt b/Pods/SwiftProtobuf/LICENSE.txt deleted file mode 100644 index 4b3ed032..00000000 --- a/Pods/SwiftProtobuf/LICENSE.txt +++ /dev/null @@ -1,211 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - -## Runtime Library Exception to the Apache 2.0 License: ## - - - As an exception, if you use this Software to compile your source code and - portions of this Software are embedded into the binary product as a result, - you may redistribute such product without providing attribution as would - otherwise be required by Sections 4(a), 4(b) and 4(d) of the License. diff --git a/Pods/SwiftProtobuf/README.md b/Pods/SwiftProtobuf/README.md deleted file mode 100644 index 9956ee09..00000000 --- a/Pods/SwiftProtobuf/README.md +++ /dev/null @@ -1,303 +0,0 @@ -Swift logo - -# Swift Protobuf - -**Welcome to Swift Protobuf!** - -[Apple's Swift programming language](https://swift.org/) is a perfect -complement to [Google's Protocol -Buffer](https://developers.google.com/protocol-buffers/) ("protobuf") serialization -technology. -They both emphasize high performance and programmer safety. - -This project provides both the command-line program that adds Swift -code generation to Google's `protoc` and the runtime library that is -necessary for using the generated code. -After using the protoc plugin to generate Swift code from your .proto -files, you will need to add this library to your project. - -[![Build and Test](https://github.com/apple/swift-protobuf/workflows/Build%20and%20Test/badge.svg)](https://github.com/apple/swift-protobuf/actions?query=workflow%3A%22Build+and+Test%22) -[![Check Upstream Protos](https://github.com/apple/swift-protobuf/workflows/Check%20Upstream%20Proto%20Files/badge.svg)](https://github.com/apple/swift-protobuf/actions?query=workflow%3A%22Check+Upstream+Proto+Files%22) -[![Run Conformance Tests](https://github.com/apple/swift-protobuf/workflows/Run%20Conformance%20Tests/badge.svg)](https://github.com/apple/swift-protobuf/actions?query=workflow%3A%22Run+Conformance+Tests%22) - -# Features of SwiftProtobuf - -SwiftProtobuf offers many advantages over alternative serialization -systems: - -* Safety: The protobuf code-generation system avoids the - errors that are common with hand-built serialization code. -* Correctness: SwiftProtobuf passes both its own extensive - test suite and Google's full conformance test for protobuf - correctness. -* Schema-driven: Defining your data structures in a separate - `.proto` schema file clearly documents your communications - conventions. -* Idiomatic: SwiftProtobuf takes full advantage of the Swift language. - In particular, all generated types provide full Swift copy-on-write - value semantics. -* Efficient binary serialization: The `.serializedData()` - method returns a `Data` with a compact binary form of your data. - You can deserialize the data using the `init(serializedData:)` - initializer. -* Standard JSON serialization: The `.jsonUTF8Data()` method returns a JSON - form of your data that can be parsed with the `init(jsonUTF8Data:)` - initializer. -* Hashable, Equatable: The generated struct can be put into a - `Set<>` or `Dictionary<>`. -* Performant: The binary and JSON serializers have been - extensively optimized. -* Extensible: You can add your own Swift extensions to any - of the generated types. - -Best of all, you can take the same `.proto` file and generate -Java, C++, Python, or Objective-C for use on other platforms. The -generated code for those languages will use the exact same -serialization and deserialization conventions as SwiftProtobuf, making -it easy to exchange serialized data in binary or JSON forms, with no -additional effort on your part. - -# Documentation - -More information is available in the associated documentation: - - * [Google's protobuf documentation](https://developers.google.com/protocol-buffers/) - provides general information about protocol buffers, the protoc compiler, - and how to use protocol buffers with C++, Java, and other languages. - * [PLUGIN.md](Documentation/PLUGIN.md) documents the `protoc-gen-swift` - plugin that adds Swift support to the `protoc` program - * [API.md](Documentation/API.md) documents how to use the generated code. - This is recommended reading for anyone using SwiftProtobuf in their - project. - * [cocoadocs.org](http://cocoadocs.org/docsets/SwiftProtobuf/) has the generated - API documentation - * [INTERNALS.md](Documentation/INTERNALS.md) documents the internal structure - of the generated code and the library. This - should only be needed by folks interested in working on SwiftProtobuf - itself. - * [STYLE_GUIDELINES.md](Documentation/STYLE_GUIDELINES.md) documents the style - guidelines we have adopted in our codebase if you are interested in - contributing - -# Getting Started - -If you've worked with Protocol Buffers before, adding Swift support is very -simple: you just need to build the `protoc-gen-swift` program and copy it into -your PATH. -The `protoc` program will find and use it automatically, allowing you -to build Swift sources for your proto files. -You will also, of course, need to add the SwiftProtobuf runtime library to -your project as explained below. - -## System Requirements - -To use Swift with Protocol buffers, you'll need: - -* A Swift 4.2 or later compiler (Xcode 10.0 or later). Support is included -for the Swift Package Manager; or using the included Xcode project. The Swift -protobuf project is being developed and tested against the latest release -version of Swift available from [Swift.org](https://swift.org) - -* Google's protoc compiler. The Swift protoc plugin is being actively -developed and tested against the latest protobuf sources. -The SwiftProtobuf tests need a version of protoc which supports the -`swift_prefix` option (introduced in protoc 3.2.0). -It may work with earlier versions of protoc. -You can get recent versions from -[Google's github repository](https://github.com/protocolbuffers/protobuf). - -## Building and Installing the Code Generator Plugin - -To translate `.proto` files into Swift, you will need both Google's -protoc compiler and the SwiftProtobuf code generator plugin. - -Building the plugin should be simple on any supported Swift platform: - -``` -$ git clone https://github.com/apple/swift-protobuf.git -$ cd swift-protobuf -``` - -Pick what released version of SwiftProtobuf you are going to use. You can get -a list of tags with: - -``` -$ git tag -l -``` - -Once you pick the version you will use, set your local state to match, and -build the protoc plugin: - -``` -$ git checkout tags/[tag_name] -$ swift build -c release -``` - -This will create a binary called `protoc-gen-swift` in the `.build/release` -directory. - -To install, just copy this one executable into a directory that is -part of your `PATH` environment variable. - -NOTE: The Swift runtime support is now included with macOS. If you are -using old Xcode versions or are on older system versions, you might need -to use also use `--static-swift-stdlib` with `swift build`. - -### Alternatively install via Homebrew - -If you prefer using [Homebrew](https://brew.sh): - -``` -$ brew install swift-protobuf -``` - -This will install `protoc` compiler and Swift code generator plugin. - -## Converting .proto files into Swift - -To generate Swift output for your .proto files, you run the `protoc` command as -usual, using the `--swift_out=` option: - -``` -$ protoc --swift_out=. my.proto -``` - -The `protoc` program will automatically look for `protoc-gen-swift` in your -`PATH` and use it. - -Each `.proto` input file will get translated to a corresponding `.pb.swift` -file in the output directory. - -More information about building and using `protoc-gen-swift` can be found -in the [detailed Plugin documentation](Documentation/PLUGIN.md). - -## Adding the SwiftProtobuf library to your project... - -To use the generated code, you need to include the `SwiftProtobuf` library -module in your project. How you do this will vary depending on how -you're building your project. Note that in all cases, we strongly recommend -that you use the version of the SwiftProtobuf library that corresponds to -the version of `protoc-gen-swift` you used to generate the code. - -### ...using `swift build` - -After copying the `.pb.swift` files into your project, you will need to add the -[SwiftProtobuf library](https://github.com/apple/swift-protobuf) to your -project to support the generated code. -If you are using the Swift Package Manager, add a dependency to your -`Package.swift` file and import the `SwiftProtobuf` library into the desired -targets. Adjust the `"1.6.0"` here to match the `[tag_name]` you used to build -the plugin above: - -```swift -dependencies: [ - .package(name: "SwiftProtobuf", url: "https://github.com/apple/swift-protobuf.git", from: "1.6.0"), -], -targets: [ - .target(name: "MyTarget", dependencies: ["SwiftProtobuf"]), -] -``` - -### ...using Xcode - -If you are using Xcode, then you should: - -* Add the `.pb.swift` source files generated from your protos directly to your - project -* Add the appropriate `SwiftProtobuf_` target from the Xcode project - in this package to your project. - -### ...using CocoaPods - -If you're using CocoaPods, add this to your `Podfile` adjusting the `:tag` to -match the `[tag_name]` you used to build the plugin above: - -```ruby -pod 'SwiftProtobuf', '~> 1.0' -``` - -And run `pod install`. - -NOTE: CocoaPods 1.7 or newer is required. - -### ...using Carthage - -If you're using Carthage, add this to your `Cartfile` but adjust the tag to match the `[tag_name]` you used to build the plugin above: - -```ruby -github "apple/swift-protobuf" ~> 1.0 -``` - -Run `carthage update` and drag `SwiftProtobuf.framework` into your Xcode.project. - -# Quick Start - -Once you have installed the code generator, used it to -generate Swift code from your `.proto` file, and -added the SwiftProtobuf library to your project, you can -just use the generated types as you would any other Swift -struct. - -For example, you might start with the following very simple -proto file: -```protobuf -syntax = "proto3"; - -message BookInfo { - int64 id = 1; - string title = 2; - string author = 3; -} -``` - -Then generate Swift code using: -``` -$ protoc --swift_out=. DataModel.proto -``` - -The generated code will expose a Swift property for -each of the proto fields as well as a selection -of serialization and deserialization capabilities: -```swift -// Create a BookInfo object and populate it: -var info = BookInfo() -info.id = 1734 -info.title = "Really Interesting Book" -info.author = "Jane Smith" - -// As above, but generating a read-only value: -let info2 = BookInfo.with { - $0.id = 1735 - $0.title = "Even More Interesting" - $0.author = "Jane Q. Smith" - } - -// Serialize to binary protobuf format: -let binaryData: Data = try info.serializedData() - -// Deserialize a received Data object from `binaryData` -let decodedInfo = try BookInfo(serializedData: binaryData) - -// Serialize to JSON format as a Data object -let jsonData: Data = try info.jsonUTF8Data() - -// Deserialize from JSON format from `jsonData` -let receivedFromJSON = try BookInfo(jsonUTF8Data: jsonData) -``` - -You can find more information in the detailed -[API Documentation](Documentation/API.md). - -## Report any issues - -If you run into problems, please send us a detailed report. -At a minimum, please include: - -* The specific operating system and version (for example, "macOS 10.12.1" or - "Ubuntu 16.10") -* The version of Swift you have installed (from `swift --version`) -* The version of the protoc compiler you are working with from - `protoc --version` -* The specific version of this source code (you can use `git log -1` to get the - latest commit ID) -* Any local changes you may have diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/AnyMessageStorage.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/AnyMessageStorage.swift deleted file mode 100644 index 551c0fba..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/AnyMessageStorage.swift +++ /dev/null @@ -1,497 +0,0 @@ -// Sources/SwiftProtobuf/AnyMessageStorage.swift - Custom storage for Any WKT -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Hand written storage class for Google_Protobuf_Any to support on demand -/// transforms between the formats. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -#if !swift(>=4.2) -private let i_2166136261 = Int(bitPattern: 2166136261) -private let i_16777619 = Int(16777619) -#endif - -fileprivate func serializeAnyJSON( - for message: Message, - typeURL: String, - options: JSONEncodingOptions -) throws -> String { - var visitor = try JSONEncodingVisitor(type: type(of: message), options: options) - visitor.startObject(message: message) - visitor.encodeField(name: "@type", stringValue: typeURL) - if let m = message as? _CustomJSONCodable { - let value = try m.encodedJSONString(options: options) - visitor.encodeField(name: "value", jsonText: value) - } else { - try message.traverse(visitor: &visitor) - } - visitor.endObject() - return visitor.stringResult -} - -fileprivate func emitVerboseTextForm(visitor: inout TextFormatEncodingVisitor, message: Message, typeURL: String) { - let url: String - if typeURL.isEmpty { - url = buildTypeURL(forMessage: message, typePrefix: defaultAnyTypeURLPrefix) - } else { - url = typeURL - } - visitor.visitAnyVerbose(value: message, typeURL: url) -} - -fileprivate func asJSONObject(body: Data) -> Data { - let asciiOpenCurlyBracket = UInt8(ascii: "{") - let asciiCloseCurlyBracket = UInt8(ascii: "}") - var result = Data([asciiOpenCurlyBracket]) - result.append(body) - result.append(asciiCloseCurlyBracket) - return result -} - -fileprivate func unpack(contentJSON: Data, - extensions: ExtensionMap, - options: JSONDecodingOptions, - as messageType: Message.Type) throws -> Message { - guard messageType is _CustomJSONCodable.Type else { - let contentJSONAsObject = asJSONObject(body: contentJSON) - return try messageType.init(jsonUTF8Data: contentJSONAsObject, extensions: extensions, options: options) - } - - var value = String() - try contentJSON.withUnsafeBytes { (body: UnsafeRawBufferPointer) in - if body.count > 0 { - // contentJSON will be the valid JSON for inside an object (everything but - // the '{' and '}', so minimal validation is needed. - var scanner = JSONScanner(source: body, options: options, extensions: extensions) - while !scanner.complete { - let key = try scanner.nextQuotedString() - try scanner.skipRequiredColon() - if key == "value" { - value = try scanner.skip() - break - } - if !options.ignoreUnknownFields { - // The only thing within a WKT should be "value". - throw AnyUnpackError.malformedWellKnownTypeJSON - } - let _ = try scanner.skip() - try scanner.skipRequiredComma() - } - if !options.ignoreUnknownFields && !scanner.complete { - // If that wasn't the end, then there was another key, and WKTs should - // only have the one when not skipping unknowns. - throw AnyUnpackError.malformedWellKnownTypeJSON - } - } - } - return try messageType.init(jsonString: value, extensions: extensions, options: options) -} - -internal class AnyMessageStorage { - // The two properties generated Google_Protobuf_Any will reference. - var _typeURL = String() - var _value: Data { - // Remapped to the internal `state`. - get { - switch state { - case .binary(let value): - return value - case .message(let message): - do { - return try message.serializedData(partial: true) - } catch { - return Data() - } - case .contentJSON(let contentJSON, let options): - guard let messageType = Google_Protobuf_Any.messageType(forTypeURL: _typeURL) else { - return Data() - } - do { - let m = try unpack(contentJSON: contentJSON, - extensions: SimpleExtensionMap(), - options: options, - as: messageType) - return try m.serializedData(partial: true) - } catch { - return Data() - } - } - } - set { - state = .binary(newValue) - } - } - - enum InternalState { - // a serialized binary - // Note: Unlike contentJSON below, binary does not bother to capture the - // decoding options. This is because the actual binary format is the binary - // blob, i.e. - when decoding from binary, the spec doesn't include decoding - // the binary blob, it is pass through. Instead there is a public api for - // unpacking that takes new options when a developer decides to decode it. - case binary(Data) - // a message - case message(Message) - // parsed JSON with the @type removed and the decoding options. - case contentJSON(Data, JSONDecodingOptions) - } - var state: InternalState = .binary(Data()) - - static let defaultInstance = AnyMessageStorage() - - private init() {} - - init(copying source: AnyMessageStorage) { - _typeURL = source._typeURL - state = source.state - } - - func isA(_ type: M.Type) -> Bool { - if _typeURL.isEmpty { - return false - } - let encodedType = typeName(fromURL: _typeURL) - return encodedType == M.protoMessageName - } - - // This is only ever called with the expectation that target will be fully - // replaced during the unpacking and never as a merge. - func unpackTo( - target: inout M, - extensions: ExtensionMap?, - options: BinaryDecodingOptions - ) throws { - guard isA(M.self) else { - throw AnyUnpackError.typeMismatch - } - - switch state { - case .binary(let data): - target = try M(serializedData: data, extensions: extensions, partial: true, options: options) - - case .message(let msg): - if let message = msg as? M { - // Already right type, copy it over. - target = message - } else { - // Different type, serialize and parse. - let data = try msg.serializedData(partial: true) - target = try M(serializedData: data, extensions: extensions, partial: true) - } - - case .contentJSON(let contentJSON, let options): - target = try unpack(contentJSON: contentJSON, - extensions: extensions ?? SimpleExtensionMap(), - options: options, - as: M.self) as! M - } - } - - // Called before the message is traversed to do any error preflights. - // Since traverse() will use _value, this is our chance to throw - // when _value can't. - func preTraverse() throws { - switch state { - case .binary: - // Nothing to be checked. - break - - case .message: - // When set from a developer provided message, partial support - // is done. Any message that comes in from another format isn't - // checked, and transcoding the isInitialized requirement is - // never inserted. - break - - case .contentJSON(let contentJSON, let options): - // contentJSON requires we have the type available for decoding - guard let messageType = Google_Protobuf_Any.messageType(forTypeURL: _typeURL) else { - throw BinaryEncodingError.anyTranscodeFailure - } - do { - // Decodes the full JSON and then discard the result. - // The regular traversal will decode this again by querying the - // `value` field, but that has no way to fail. As a result, - // we need this to accurately handle decode errors. - _ = try unpack(contentJSON: contentJSON, - extensions: SimpleExtensionMap(), - options: options, - as: messageType) - } catch { - throw BinaryEncodingError.anyTranscodeFailure - } - } - } -} - -/// Custom handling for Text format. -extension AnyMessageStorage { - func decodeTextFormat(typeURL url: String, decoder: inout TextFormatDecoder) throws { - // Decoding the verbose form requires knowing the type. - _typeURL = url - guard let messageType = Google_Protobuf_Any.messageType(forTypeURL: url) else { - // The type wasn't registered, can't parse it. - throw TextFormatDecodingError.malformedText - } - let terminator = try decoder.scanner.skipObjectStart() - var subDecoder = try TextFormatDecoder(messageType: messageType, scanner: decoder.scanner, terminator: terminator) - if messageType == Google_Protobuf_Any.self { - var any = Google_Protobuf_Any() - try any.decodeTextFormat(decoder: &subDecoder) - state = .message(any) - } else { - var m = messageType.init() - try m.decodeMessage(decoder: &subDecoder) - state = .message(m) - } - decoder.scanner = subDecoder.scanner - if try decoder.nextFieldNumber() != nil { - // Verbose any can never have additional keys. - throw TextFormatDecodingError.malformedText - } - } - - // Specialized traverse for writing out a Text form of the Any. - // This prefers the more-legible "verbose" format if it can - // use it, otherwise will fall back to simpler forms. - internal func textTraverse(visitor: inout TextFormatEncodingVisitor) { - switch state { - case .binary(let valueData): - if let messageType = Google_Protobuf_Any.messageType(forTypeURL: _typeURL) { - // If we can decode it, we can write the readable verbose form: - do { - let m = try messageType.init(serializedData: valueData, partial: true) - emitVerboseTextForm(visitor: &visitor, message: m, typeURL: _typeURL) - return - } catch { - // Fall through to just print the type and raw binary data - } - } - if !_typeURL.isEmpty { - try! visitor.visitSingularStringField(value: _typeURL, fieldNumber: 1) - } - if !valueData.isEmpty { - try! visitor.visitSingularBytesField(value: valueData, fieldNumber: 2) - } - - case .message(let msg): - emitVerboseTextForm(visitor: &visitor, message: msg, typeURL: _typeURL) - - case .contentJSON(let contentJSON, let options): - // If we can decode it, we can write the readable verbose form: - if let messageType = Google_Protobuf_Any.messageType(forTypeURL: _typeURL) { - do { - let m = try unpack(contentJSON: contentJSON, - extensions: SimpleExtensionMap(), - options: options, - as: messageType) - emitVerboseTextForm(visitor: &visitor, message: m, typeURL: _typeURL) - return - } catch { - // Fall through to just print the raw JSON data - } - } - if !_typeURL.isEmpty { - try! visitor.visitSingularStringField(value: _typeURL, fieldNumber: 1) - } - // Build a readable form of the JSON: - let contentJSONAsObject = asJSONObject(body: contentJSON) - visitor.visitAnyJSONDataField(value: contentJSONAsObject) - } - } -} - -/// The obvious goal for Hashable/Equatable conformance would be for -/// hash and equality to behave as if we always decoded the inner -/// object and hashed or compared that. Unfortunately, Any typically -/// stores serialized contents and we don't always have the ability to -/// deserialize it. Since none of our supported serializations are -/// fully deterministic, we can't even ensure that equality will -/// behave this way when the Any contents are in the same -/// serialization. -/// -/// As a result, we can only really perform a "best effort" equality -/// test. Of course, regardless of the above, we must guarantee that -/// hashValue is compatible with equality. -extension AnyMessageStorage { -#if swift(>=4.2) - // Can't use _valueData for a few reasons: - // 1. Since decode is done on demand, two objects could be equal - // but created differently (one from JSON, one for Message, etc.), - // and the hash values have to be equal even if we don't have data - // yet. - // 2. map<> serialization order is undefined. At the time of writing - // the Swift, Objective-C, and Go runtimes all tend to have random - // orders, so the messages could be identical, but in binary form - // they could differ. - public func hash(into hasher: inout Hasher) { - if !_typeURL.isEmpty { - hasher.combine(_typeURL) - } - } -#else // swift(>=4.2) - var hashValue: Int { - var hash: Int = i_2166136261 - if !_typeURL.isEmpty { - hash = (hash &* i_16777619) ^ _typeURL.hashValue - } - return hash - } -#endif // swift(>=4.2) - - func isEqualTo(other: AnyMessageStorage) -> Bool { - if (_typeURL != other._typeURL) { - return false - } - - // Since the library does lazy Any decode, equality is a very hard problem. - // It things exactly match, that's pretty easy, otherwise, one ends up having - // to error on saying they aren't equal. - // - // The best option would be to have Message forms and compare those, as that - // removes issues like map<> serialization order, some other protocol buffer - // implementation details/bugs around serialized form order, etc.; but that - // would also greatly slow down equality tests. - // - // Do our best to compare what is present have... - - // If both have messages, check if they are the same. - if case .message(let myMsg) = state, case .message(let otherMsg) = other.state, type(of: myMsg) == type(of: otherMsg) { - // Since the messages are known to be same type, we can claim both equal and - // not equal based on the equality comparison. - return myMsg.isEqualTo(message: otherMsg) - } - - // If both have serialized data, and they exactly match; the messages are equal. - // Because there could be map in the message, the fact that the data isn't the - // same doesn't always mean the messages aren't equal. Likewise, the binary could - // have been created by a library that doesn't order the fields, or the binary was - // created using the appending ability in of the binary format. - if case .binary(let myValue) = state, case .binary(let otherValue) = other.state, myValue == otherValue { - return true - } - - // If both have contentJSON, and they exactly match; the messages are equal. - // Because there could be map in the message (or the JSON could just be in a different - // order), the fact that the JSON isn't the same doesn't always mean the messages - // aren't equal. - if case .contentJSON(let myJSON, _) = state, - case .contentJSON(let otherJSON, _) = other.state, - myJSON == otherJSON { - return true - } - - // Out of options. To do more compares, the states conversions would have to be - // done to do comparisons; and since equality can be used somewhat removed from - // a developer (if they put protos in a Set, use them as keys to a Dictionary, etc), - // the conversion cost might be to high for those uses. Give up and say they aren't equal. - return false - } -} - -// _CustomJSONCodable support for Google_Protobuf_Any -extension AnyMessageStorage { - // Override the traversal-based JSON encoding - // This builds an Any JSON representation from one of: - // * The message we were initialized with, - // * The JSON fields we last deserialized, or - // * The protobuf field we were deserialized from. - // The last case requires locating the type, deserializing - // into an object, then reserializing back to JSON. - func encodedJSONString(options: JSONEncodingOptions) throws -> String { - switch state { - case .binary(let valueData): - // Follow the C++ protostream_objectsource.cc's - // ProtoStreamObjectSource::RenderAny() special casing of an empty value. - guard !valueData.isEmpty else { - if _typeURL.isEmpty { - return "{}" - } - var jsonEncoder = JSONEncoder() - jsonEncoder.startField(name: "@type") - jsonEncoder.putStringValue(value: _typeURL) - jsonEncoder.endObject() - return jsonEncoder.stringResult - } - // Transcode by decoding the binary data to a message object - // and then recode back into JSON. - guard let messageType = Google_Protobuf_Any.messageType(forTypeURL: _typeURL) else { - // If we don't have the type available, we can't decode the - // binary value, so we're stuck. (The Google spec does not - // provide a way to just package the binary value for someone - // else to decode later.) - throw JSONEncodingError.anyTranscodeFailure - } - let m = try messageType.init(serializedData: valueData, partial: true) - return try serializeAnyJSON(for: m, typeURL: _typeURL, options: options) - - case .message(let msg): - // We should have been initialized with a typeURL, but - // ensure it wasn't cleared. - let url = !_typeURL.isEmpty ? _typeURL : buildTypeURL(forMessage: msg, typePrefix: defaultAnyTypeURLPrefix) - return try serializeAnyJSON(for: msg, typeURL: url, options: options) - - case .contentJSON(let contentJSON, _): - var jsonEncoder = JSONEncoder() - jsonEncoder.startObject() - jsonEncoder.startField(name: "@type") - jsonEncoder.putStringValue(value: _typeURL) - if !contentJSON.isEmpty { - jsonEncoder.append(staticText: ",") - // NOTE: This doesn't really take `options` into account since it is - // just reflecting out what was taken in originally. - jsonEncoder.append(utf8Data: contentJSON) - } - jsonEncoder.endObject() - return jsonEncoder.stringResult - } - } - - // TODO: If the type is well-known or has already been registered, - // we should consider decoding eagerly. Eager decoding would - // catch certain errors earlier (good) but would probably be - // a performance hit if the Any contents were never accessed (bad). - // Of course, we can't always decode eagerly (we don't always have the - // message type available), so the deferred logic here is still needed. - func decodeJSON(from decoder: inout JSONDecoder) throws { - try decoder.scanner.skipRequiredObjectStart() - // Reset state - _typeURL = String() - state = .binary(Data()) - if decoder.scanner.skipOptionalObjectEnd() { - return - } - - var jsonEncoder = JSONEncoder() - while true { - let key = try decoder.scanner.nextQuotedString() - try decoder.scanner.skipRequiredColon() - if key == "@type" { - _typeURL = try decoder.scanner.nextQuotedString() - } else { - jsonEncoder.startField(name: key) - let keyValueJSON = try decoder.scanner.skip() - jsonEncoder.append(text: keyValueJSON) - } - if decoder.scanner.skipOptionalObjectEnd() { - // Capture the options, but set the messageDepthLimit to be what - // was left right now, as that is the limit when the JSON is finally - // parsed. - var updatedOptions = decoder.options - updatedOptions.messageDepthLimit = decoder.scanner.recursionBudget - state = .contentJSON(jsonEncoder.dataResult, updatedOptions) - return - } - try decoder.scanner.skipRequiredComma() - } - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/AnyUnpackError.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/AnyUnpackError.swift deleted file mode 100644 index 738b0fe9..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/AnyUnpackError.swift +++ /dev/null @@ -1,37 +0,0 @@ -// Sources/SwiftProtobuf/AnyUnpackError.swift - Any Unpacking Errors -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Errors that can be throw when unpacking a Google_Protobuf_Any. -/// -// ----------------------------------------------------------------------------- - -/// Describes errors that can occur when unpacking an `Google_Protobuf_Any` -/// message. -/// -/// `Google_Protobuf_Any` messages can be decoded from protobuf binary, text -/// format, or JSON. The contents are not parsed immediately; the raw data is -/// held in the `Google_Protobuf_Any` message until you `unpack()` it into a -/// message. At this time, any error can occur that might have occurred from a -/// regular decoding operation. There are also other errors that can occur due -/// to problems with the `Any` value's structure. -public enum AnyUnpackError: Error { - /// The `type_url` field in the `Google_Protobuf_Any` message did not match - /// the message type provided to the `unpack()` method. - case typeMismatch - - /// Well-known types being decoded from JSON must have only two fields: the - /// `@type` field and a `value` field containing the specialized JSON coding - /// of the well-known type. - case malformedWellKnownTypeJSON - - /// The `Google_Protobuf_Any` message was malformed in some other way not - /// covered by the other error cases. - case malformedAnyField -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryDecoder.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryDecoder.swift deleted file mode 100644 index 32803261..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryDecoder.swift +++ /dev/null @@ -1,1497 +0,0 @@ -// Sources/SwiftProtobuf/BinaryDecoder.swift - Binary decoding -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Protobuf binary format decoding engine. -/// -/// This provides the Decoder interface that interacts directly -/// with the generated code. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -internal struct BinaryDecoder: Decoder { - // Current position - private var p : UnsafeRawPointer - // Remaining bytes in input. - private var available : Int - // Position of start of field currently being parsed - private var fieldStartP : UnsafeRawPointer - // Position of end of field currently being parsed, nil if we don't know. - private var fieldEndP : UnsafeRawPointer? - // Whether or not the field value has actually been parsed - private var consumed = true - // Wire format for last-examined field - internal var fieldWireFormat = WireFormat.varint - // Field number for last-parsed field tag - private var fieldNumber: Int = 0 - // Collection of extension fields for this decode - private var extensions: ExtensionMap? - // The current group number. See decodeFullGroup(group:fieldNumber:) for how - // this is used. - private var groupFieldNumber: Int? - // The options for decoding. - private var options: BinaryDecodingOptions - - private var recursionBudget: Int - - // Collects the unknown data found while decoding a message. - private var unknownData: Data? - // Custom data to use as the unknown data while parsing a field. Used only by - // packed repeated enums; see below - private var unknownOverride: Data? - - private var complete: Bool {return available == 0} - - internal init( - forReadingFrom pointer: UnsafeRawPointer, - count: Int, - options: BinaryDecodingOptions, - extensions: ExtensionMap? = nil - ) { - // Assuming baseAddress is not nil. - p = pointer - available = count - fieldStartP = p - self.extensions = extensions - self.options = options - recursionBudget = options.messageDepthLimit - } - - internal init( - forReadingFrom pointer: UnsafeRawPointer, - count: Int, - parent: BinaryDecoder - ) { - self.init(forReadingFrom: pointer, - count: count, - options: parent.options, - extensions: parent.extensions) - recursionBudget = parent.recursionBudget - } - - private mutating func incrementRecursionDepth() throws { - recursionBudget -= 1 - if recursionBudget < 0 { - throw BinaryDecodingError.messageDepthLimit - } - } - - private mutating func decrementRecursionDepth() { - recursionBudget += 1 - // This should never happen, if it does, something is probably corrupting memory, and - // simply throwing doesn't make much sense. - if recursionBudget > options.messageDepthLimit { - fatalError("Somehow BinaryDecoding unwound more objects than it started") - } - } - - internal mutating func handleConflictingOneOf() throws { - /// Protobuf simply allows conflicting oneof values to overwrite - } - - /// Return the next field number or nil if there are no more fields. - internal mutating func nextFieldNumber() throws -> Int? { - // Since this is called for every field, I've taken some pains - // to optimize it, including unrolling a tweaked version of - // the varint parser. - if fieldNumber > 0 { - if let override = unknownOverride { - assert(!options.discardUnknownFields) - assert(fieldWireFormat != .startGroup && fieldWireFormat != .endGroup) - if unknownData == nil { - unknownData = override - } else { - unknownData!.append(override) - } - unknownOverride = nil - } else if !consumed { - if options.discardUnknownFields { - try skip() - } else { - let u = try getRawField() - if unknownData == nil { - unknownData = u - } else { - unknownData!.append(u) - } - } - } - } - - // Quit if end of input - if available == 0 { - return nil - } - - // Get the next field number - fieldStartP = p - fieldEndP = nil - let start = p - let c0 = start[0] - if let wireFormat = WireFormat(rawValue: c0 & 7) { - fieldWireFormat = wireFormat - } else { - throw BinaryDecodingError.malformedProtobuf - } - if (c0 & 0x80) == 0 { - p += 1 - available -= 1 - fieldNumber = Int(c0) >> 3 - } else { - fieldNumber = Int(c0 & 0x7f) >> 3 - if available < 2 { - throw BinaryDecodingError.malformedProtobuf - } - let c1 = start[1] - if (c1 & 0x80) == 0 { - p += 2 - available -= 2 - fieldNumber |= Int(c1) << 4 - } else { - fieldNumber |= Int(c1 & 0x7f) << 4 - if available < 3 { - throw BinaryDecodingError.malformedProtobuf - } - let c2 = start[2] - fieldNumber |= Int(c2 & 0x7f) << 11 - if (c2 & 0x80) == 0 { - p += 3 - available -= 3 - } else { - if available < 4 { - throw BinaryDecodingError.malformedProtobuf - } - let c3 = start[3] - fieldNumber |= Int(c3 & 0x7f) << 18 - if (c3 & 0x80) == 0 { - p += 4 - available -= 4 - } else { - if available < 5 { - throw BinaryDecodingError.malformedProtobuf - } - let c4 = start[4] - if c4 > 15 { - throw BinaryDecodingError.malformedProtobuf - } - fieldNumber |= Int(c4 & 0x7f) << 25 - p += 5 - available -= 5 - } - } - } - } - if fieldNumber != 0 { - consumed = false - - if fieldWireFormat == .endGroup { - if groupFieldNumber == fieldNumber { - // Reached the end of the current group, single the - // end of the message. - return nil - } else { - // .endGroup when not in a group or for a different - // group is an invalid binary. - throw BinaryDecodingError.malformedProtobuf - } - } - return fieldNumber - } - throw BinaryDecodingError.malformedProtobuf - } - - internal mutating func decodeSingularFloatField(value: inout Float) throws { - guard fieldWireFormat == WireFormat.fixed32 else { - return - } - try decodeFourByteNumber(value: &value) - consumed = true - } - - internal mutating func decodeSingularFloatField(value: inout Float?) throws { - guard fieldWireFormat == WireFormat.fixed32 else { - return - } - value = try decodeFloat() - consumed = true - } - - internal mutating func decodeRepeatedFloatField(value: inout [Float]) throws { - switch fieldWireFormat { - case WireFormat.fixed32: - let i = try decodeFloat() - value.append(i) - consumed = true - case WireFormat.lengthDelimited: - let bodyBytes = try decodeVarint() - if bodyBytes > 0 { - let itemSize = UInt64(MemoryLayout.size) - let itemCount = bodyBytes / itemSize - if bodyBytes % itemSize != 0 || bodyBytes > available { - throw BinaryDecodingError.truncated - } - value.reserveCapacity(value.count + Int(truncatingIfNeeded: itemCount)) - for _ in 1...itemCount { - value.append(try decodeFloat()) - } - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularDoubleField(value: inout Double) throws { - guard fieldWireFormat == WireFormat.fixed64 else { - return - } - value = try decodeDouble() - consumed = true - } - - internal mutating func decodeSingularDoubleField(value: inout Double?) throws { - guard fieldWireFormat == WireFormat.fixed64 else { - return - } - value = try decodeDouble() - consumed = true - } - - internal mutating func decodeRepeatedDoubleField(value: inout [Double]) throws { - switch fieldWireFormat { - case WireFormat.fixed64: - let i = try decodeDouble() - value.append(i) - consumed = true - case WireFormat.lengthDelimited: - let bodyBytes = try decodeVarint() - if bodyBytes > 0 { - let itemSize = UInt64(MemoryLayout.size) - let itemCount = bodyBytes / itemSize - if bodyBytes % itemSize != 0 || bodyBytes > available { - throw BinaryDecodingError.truncated - } - value.reserveCapacity(value.count + Int(truncatingIfNeeded: itemCount)) - for _ in 1...itemCount { - let i = try decodeDouble() - value.append(i) - } - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularInt32Field(value: inout Int32) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - let varint = try decodeVarint() - value = Int32(truncatingIfNeeded: varint) - consumed = true - } - - internal mutating func decodeSingularInt32Field(value: inout Int32?) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - let varint = try decodeVarint() - value = Int32(truncatingIfNeeded: varint) - consumed = true - } - - internal mutating func decodeRepeatedInt32Field(value: inout [Int32]) throws { - switch fieldWireFormat { - case WireFormat.varint: - let varint = try decodeVarint() - value.append(Int32(truncatingIfNeeded: varint)) - consumed = true - case WireFormat.lengthDelimited: - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - let ints = Varint.countVarintsInBuffer(start: p, count: n) - value.reserveCapacity(value.count + ints) - var decoder = BinaryDecoder(forReadingFrom: p, count: n, parent: self) - while !decoder.complete { - let varint = try decoder.decodeVarint() - value.append(Int32(truncatingIfNeeded: varint)) - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularInt64Field(value: inout Int64) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - let v = try decodeVarint() - value = Int64(bitPattern: v) - consumed = true - } - - internal mutating func decodeSingularInt64Field(value: inout Int64?) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - let varint = try decodeVarint() - value = Int64(bitPattern: varint) - consumed = true - } - - internal mutating func decodeRepeatedInt64Field(value: inout [Int64]) throws { - switch fieldWireFormat { - case WireFormat.varint: - let varint = try decodeVarint() - value.append(Int64(bitPattern: varint)) - consumed = true - case WireFormat.lengthDelimited: - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - let ints = Varint.countVarintsInBuffer(start: p, count: n) - value.reserveCapacity(value.count + ints) - var decoder = BinaryDecoder(forReadingFrom: p, count: n, parent: self) - while !decoder.complete { - let varint = try decoder.decodeVarint() - value.append(Int64(bitPattern: varint)) - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularUInt32Field(value: inout UInt32) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - let varint = try decodeVarint() - value = UInt32(truncatingIfNeeded: varint) - consumed = true - } - - internal mutating func decodeSingularUInt32Field(value: inout UInt32?) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - let varint = try decodeVarint() - value = UInt32(truncatingIfNeeded: varint) - consumed = true - } - - internal mutating func decodeRepeatedUInt32Field(value: inout [UInt32]) throws { - switch fieldWireFormat { - case WireFormat.varint: - let varint = try decodeVarint() - value.append(UInt32(truncatingIfNeeded: varint)) - consumed = true - case WireFormat.lengthDelimited: - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - let ints = Varint.countVarintsInBuffer(start: p, count: n) - value.reserveCapacity(value.count + ints) - var decoder = BinaryDecoder(forReadingFrom: p, count: n, parent: self) - while !decoder.complete { - let t = try decoder.decodeVarint() - value.append(UInt32(truncatingIfNeeded: t)) - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularUInt64Field(value: inout UInt64) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - value = try decodeVarint() - consumed = true - } - - internal mutating func decodeSingularUInt64Field(value: inout UInt64?) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - value = try decodeVarint() - consumed = true - } - - internal mutating func decodeRepeatedUInt64Field(value: inout [UInt64]) throws { - switch fieldWireFormat { - case WireFormat.varint: - let varint = try decodeVarint() - value.append(varint) - consumed = true - case WireFormat.lengthDelimited: - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - let ints = Varint.countVarintsInBuffer(start: p, count: n) - value.reserveCapacity(value.count + ints) - var decoder = BinaryDecoder(forReadingFrom: p, count: n, parent: self) - while !decoder.complete { - let t = try decoder.decodeVarint() - value.append(t) - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularSInt32Field(value: inout Int32) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - let varint = try decodeVarint() - let t = UInt32(truncatingIfNeeded: varint) - value = ZigZag.decoded(t) - consumed = true - } - - internal mutating func decodeSingularSInt32Field(value: inout Int32?) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - let varint = try decodeVarint() - let t = UInt32(truncatingIfNeeded: varint) - value = ZigZag.decoded(t) - consumed = true - } - - internal mutating func decodeRepeatedSInt32Field(value: inout [Int32]) throws { - switch fieldWireFormat { - case WireFormat.varint: - let varint = try decodeVarint() - let t = UInt32(truncatingIfNeeded: varint) - value.append(ZigZag.decoded(t)) - consumed = true - case WireFormat.lengthDelimited: - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - let ints = Varint.countVarintsInBuffer(start: p, count: n) - value.reserveCapacity(value.count + ints) - var decoder = BinaryDecoder(forReadingFrom: p, count: n, parent: self) - while !decoder.complete { - let varint = try decoder.decodeVarint() - let t = UInt32(truncatingIfNeeded: varint) - value.append(ZigZag.decoded(t)) - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularSInt64Field(value: inout Int64) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - let varint = try decodeVarint() - value = ZigZag.decoded(varint) - consumed = true - } - - internal mutating func decodeSingularSInt64Field(value: inout Int64?) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - let varint = try decodeVarint() - value = ZigZag.decoded(varint) - consumed = true - } - - internal mutating func decodeRepeatedSInt64Field(value: inout [Int64]) throws { - switch fieldWireFormat { - case WireFormat.varint: - let varint = try decodeVarint() - value.append(ZigZag.decoded(varint)) - consumed = true - case WireFormat.lengthDelimited: - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - let ints = Varint.countVarintsInBuffer(start: p, count: n) - value.reserveCapacity(value.count + ints) - var decoder = BinaryDecoder(forReadingFrom: p, count: n, parent: self) - while !decoder.complete { - let varint = try decoder.decodeVarint() - value.append(ZigZag.decoded(varint)) - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularFixed32Field(value: inout UInt32) throws { - guard fieldWireFormat == WireFormat.fixed32 else { - return - } - var i: UInt32 = 0 - try decodeFourByteNumber(value: &i) - value = UInt32(littleEndian: i) - consumed = true - } - - internal mutating func decodeSingularFixed32Field(value: inout UInt32?) throws { - guard fieldWireFormat == WireFormat.fixed32 else { - return - } - var i: UInt32 = 0 - try decodeFourByteNumber(value: &i) - value = UInt32(littleEndian: i) - consumed = true - } - - internal mutating func decodeRepeatedFixed32Field(value: inout [UInt32]) throws { - switch fieldWireFormat { - case WireFormat.fixed32: - var i: UInt32 = 0 - try decodeFourByteNumber(value: &i) - value.append(UInt32(littleEndian: i)) - consumed = true - case WireFormat.lengthDelimited: - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - value.reserveCapacity(value.count + n / MemoryLayout.size) - var decoder = BinaryDecoder(forReadingFrom: p, count: n, parent: self) - var i: UInt32 = 0 - while !decoder.complete { - try decoder.decodeFourByteNumber(value: &i) - value.append(UInt32(littleEndian: i)) - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularFixed64Field(value: inout UInt64) throws { - guard fieldWireFormat == WireFormat.fixed64 else { - return - } - var i: UInt64 = 0 - try decodeEightByteNumber(value: &i) - value = UInt64(littleEndian: i) - consumed = true - } - - internal mutating func decodeSingularFixed64Field(value: inout UInt64?) throws { - guard fieldWireFormat == WireFormat.fixed64 else { - return - } - var i: UInt64 = 0 - try decodeEightByteNumber(value: &i) - value = UInt64(littleEndian: i) - consumed = true - } - - internal mutating func decodeRepeatedFixed64Field(value: inout [UInt64]) throws { - switch fieldWireFormat { - case WireFormat.fixed64: - var i: UInt64 = 0 - try decodeEightByteNumber(value: &i) - value.append(UInt64(littleEndian: i)) - consumed = true - case WireFormat.lengthDelimited: - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - value.reserveCapacity(value.count + n / MemoryLayout.size) - var decoder = BinaryDecoder(forReadingFrom: p, count: n, parent: self) - var i: UInt64 = 0 - while !decoder.complete { - try decoder.decodeEightByteNumber(value: &i) - value.append(UInt64(littleEndian: i)) - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularSFixed32Field(value: inout Int32) throws { - guard fieldWireFormat == WireFormat.fixed32 else { - return - } - var i: Int32 = 0 - try decodeFourByteNumber(value: &i) - value = Int32(littleEndian: i) - consumed = true - } - - internal mutating func decodeSingularSFixed32Field(value: inout Int32?) throws { - guard fieldWireFormat == WireFormat.fixed32 else { - return - } - var i: Int32 = 0 - try decodeFourByteNumber(value: &i) - value = Int32(littleEndian: i) - consumed = true - } - - internal mutating func decodeRepeatedSFixed32Field(value: inout [Int32]) throws { - switch fieldWireFormat { - case WireFormat.fixed32: - var i: Int32 = 0 - try decodeFourByteNumber(value: &i) - value.append(Int32(littleEndian: i)) - consumed = true - case WireFormat.lengthDelimited: - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - value.reserveCapacity(value.count + n / MemoryLayout.size) - var decoder = BinaryDecoder(forReadingFrom: p, count: n, parent: self) - var i: Int32 = 0 - while !decoder.complete { - try decoder.decodeFourByteNumber(value: &i) - value.append(Int32(littleEndian: i)) - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularSFixed64Field(value: inout Int64) throws { - guard fieldWireFormat == WireFormat.fixed64 else { - return - } - var i: Int64 = 0 - try decodeEightByteNumber(value: &i) - value = Int64(littleEndian: i) - consumed = true - } - - internal mutating func decodeSingularSFixed64Field(value: inout Int64?) throws { - guard fieldWireFormat == WireFormat.fixed64 else { - return - } - var i: Int64 = 0 - try decodeEightByteNumber(value: &i) - value = Int64(littleEndian: i) - consumed = true - } - - internal mutating func decodeRepeatedSFixed64Field(value: inout [Int64]) throws { - switch fieldWireFormat { - case WireFormat.fixed64: - var i: Int64 = 0 - try decodeEightByteNumber(value: &i) - value.append(Int64(littleEndian: i)) - consumed = true - case WireFormat.lengthDelimited: - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - value.reserveCapacity(value.count + n / MemoryLayout.size) - var decoder = BinaryDecoder(forReadingFrom: p, count: n, parent: self) - var i: Int64 = 0 - while !decoder.complete { - try decoder.decodeEightByteNumber(value: &i) - value.append(Int64(littleEndian: i)) - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularBoolField(value: inout Bool) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - value = try decodeVarint() != 0 - consumed = true - } - - internal mutating func decodeSingularBoolField(value: inout Bool?) throws { - guard fieldWireFormat == WireFormat.varint else { - return - } - value = try decodeVarint() != 0 - consumed = true - } - - internal mutating func decodeRepeatedBoolField(value: inout [Bool]) throws { - switch fieldWireFormat { - case WireFormat.varint: - let varint = try decodeVarint() - value.append(varint != 0) - consumed = true - case WireFormat.lengthDelimited: - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - let ints = Varint.countVarintsInBuffer(start: p, count: n) - value.reserveCapacity(value.count + ints) - var decoder = BinaryDecoder(forReadingFrom: p, count: n, parent: self) - while !decoder.complete { - let t = try decoder.decodeVarint() - value.append(t != 0) - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularStringField(value: inout String) throws { - guard fieldWireFormat == WireFormat.lengthDelimited else { - return - } - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - if let s = utf8ToString(bytes: p, count: n) { - value = s - consumed = true - } else { - throw BinaryDecodingError.invalidUTF8 - } - } - - internal mutating func decodeSingularStringField(value: inout String?) throws { - guard fieldWireFormat == WireFormat.lengthDelimited else { - return - } - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - if let s = utf8ToString(bytes: p, count: n) { - value = s - consumed = true - } else { - throw BinaryDecodingError.invalidUTF8 - } - } - - internal mutating func decodeRepeatedStringField(value: inout [String]) throws { - switch fieldWireFormat { - case WireFormat.lengthDelimited: - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - if let s = utf8ToString(bytes: p, count: n) { - value.append(s) - consumed = true - } else { - throw BinaryDecodingError.invalidUTF8 - } - default: - return - } - } - - internal mutating func decodeSingularBytesField(value: inout Data) throws { - guard fieldWireFormat == WireFormat.lengthDelimited else { - return - } - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - value = Data(bytes: p, count: n) - consumed = true - } - - internal mutating func decodeSingularBytesField(value: inout Data?) throws { - guard fieldWireFormat == WireFormat.lengthDelimited else { - return - } - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - value = Data(bytes: p, count: n) - consumed = true - } - - internal mutating func decodeRepeatedBytesField(value: inout [Data]) throws { - switch fieldWireFormat { - case WireFormat.lengthDelimited: - var n: Int = 0 - let p = try getFieldBodyBytes(count: &n) - value.append(Data(bytes: p, count: n)) - consumed = true - default: - return - } - } - - internal mutating func decodeSingularEnumField(value: inout E?) throws where E.RawValue == Int { - guard fieldWireFormat == WireFormat.varint else { - return - } - let varint = try decodeVarint() - if let v = E(rawValue: Int(Int32(truncatingIfNeeded: varint))) { - value = v - consumed = true - } - } - - internal mutating func decodeSingularEnumField(value: inout E) throws where E.RawValue == Int { - guard fieldWireFormat == WireFormat.varint else { - return - } - let varint = try decodeVarint() - if let v = E(rawValue: Int(Int32(truncatingIfNeeded: varint))) { - value = v - consumed = true - } - } - - internal mutating func decodeRepeatedEnumField(value: inout [E]) throws where E.RawValue == Int { - switch fieldWireFormat { - case WireFormat.varint: - let varint = try decodeVarint() - if let v = E(rawValue: Int(Int32(truncatingIfNeeded: varint))) { - value.append(v) - consumed = true - } - case WireFormat.lengthDelimited: - var n: Int = 0 - var extras: [Int32]? - let p = try getFieldBodyBytes(count: &n) - let ints = Varint.countVarintsInBuffer(start: p, count: n) - value.reserveCapacity(value.count + ints) - var subdecoder = BinaryDecoder(forReadingFrom: p, count: n, parent: self) - while !subdecoder.complete { - let u64 = try subdecoder.decodeVarint() - let i32 = Int32(truncatingIfNeeded: u64) - if let v = E(rawValue: Int(i32)) { - value.append(v) - } else if !options.discardUnknownFields { - if extras == nil { - extras = [] - } - extras!.append(i32) - } - } - if let extras = extras { - let fieldTag = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - let bodySize = extras.reduce(0) { $0 + Varint.encodedSize(of: Int64($1)) } - let fieldSize = Varint.encodedSize(of: fieldTag.rawValue) + Varint.encodedSize(of: Int64(bodySize)) + bodySize - var field = Data(count: fieldSize) - field.withUnsafeMutableBytes { (body: UnsafeMutableRawBufferPointer) in - if let baseAddress = body.baseAddress, body.count > 0 { - var encoder = BinaryEncoder(forWritingInto: baseAddress) - encoder.startField(tag: fieldTag) - encoder.putVarInt(value: Int64(bodySize)) - for v in extras { - encoder.putVarInt(value: Int64(v)) - } - } - } - unknownOverride = field - } - consumed = true - default: - return - } - } - - internal mutating func decodeSingularMessageField(value: inout M?) throws { - guard fieldWireFormat == WireFormat.lengthDelimited else { - return - } - var count: Int = 0 - let p = try getFieldBodyBytes(count: &count) - if value == nil { - value = M() - } - var subDecoder = BinaryDecoder(forReadingFrom: p, count: count, parent: self) - try subDecoder.decodeFullMessage(message: &value!) - consumed = true - } - - internal mutating func decodeRepeatedMessageField(value: inout [M]) throws { - guard fieldWireFormat == WireFormat.lengthDelimited else { - return - } - var count: Int = 0 - let p = try getFieldBodyBytes(count: &count) - var newValue = M() - var subDecoder = BinaryDecoder(forReadingFrom: p, count: count, parent: self) - try subDecoder.decodeFullMessage(message: &newValue) - value.append(newValue) - consumed = true - } - - internal mutating func decodeFullMessage(message: inout M) throws { - assert(unknownData == nil) - try incrementRecursionDepth() - try message.decodeMessage(decoder: &self) - decrementRecursionDepth() - guard complete else { - throw BinaryDecodingError.trailingGarbage - } - if let unknownData = unknownData { - message.unknownFields.append(protobufData: unknownData) - } - } - - internal mutating func decodeSingularGroupField(value: inout G?) throws { - var group = value ?? G() - if try decodeFullGroup(group: &group, fieldNumber: fieldNumber) { - value = group - consumed = true - } - } - - internal mutating func decodeRepeatedGroupField(value: inout [G]) throws { - var group = G() - if try decodeFullGroup(group: &group, fieldNumber: fieldNumber) { - value.append(group) - consumed = true - } - } - - private mutating func decodeFullGroup(group: inout G, fieldNumber: Int) throws -> Bool { - guard fieldWireFormat == WireFormat.startGroup else { - return false - } - try incrementRecursionDepth() - - // This works by making a clone of the current decoder state and - // setting `groupFieldNumber` to signal `nextFieldNumber()` to watch - // for that as a marker for having reached the end of a group/message. - // Groups within groups works because this effectively makes a stack - // of decoders, each one looking for their ending tag. - - var subDecoder = self - subDecoder.groupFieldNumber = fieldNumber - // startGroup was read, so current tag/data is done (otherwise the - // startTag will end up in the unknowns of the first thing decoded). - subDecoder.consumed = true - // The group (message) doesn't get any existing unknown fields from - // the parent. - subDecoder.unknownData = nil - try group.decodeMessage(decoder: &subDecoder) - guard subDecoder.fieldNumber == fieldNumber && subDecoder.fieldWireFormat == .endGroup else { - throw BinaryDecodingError.truncated - } - if let groupUnknowns = subDecoder.unknownData { - group.unknownFields.append(protobufData: groupUnknowns) - } - // Advance over what was parsed. - consume(length: available - subDecoder.available) - assert(recursionBudget == subDecoder.recursionBudget) - decrementRecursionDepth() - return true - } - - internal mutating func decodeMapField(fieldType: _ProtobufMap.Type, value: inout _ProtobufMap.BaseType) throws { - guard fieldWireFormat == WireFormat.lengthDelimited else { - return - } - var k: KeyType.BaseType? - var v: ValueType.BaseType? - var count: Int = 0 - let p = try getFieldBodyBytes(count: &count) - var subdecoder = BinaryDecoder(forReadingFrom: p, count: count, parent: self) - while let tag = try subdecoder.getTag() { - if tag.wireFormat == .endGroup { - throw BinaryDecodingError.malformedProtobuf - } - let fieldNumber = tag.fieldNumber - switch fieldNumber { - case 1: - try KeyType.decodeSingular(value: &k, from: &subdecoder) - case 2: - try ValueType.decodeSingular(value: &v, from: &subdecoder) - default: // Skip any other fields within the map entry object - try subdecoder.skip() - } - } - if !subdecoder.complete { - throw BinaryDecodingError.trailingGarbage - } - // A map<> definition can't provide a default value for the keys/values, - // so it is safe to use the proto3 default to get the right - // integer/string/bytes. The one catch is a proto2 enum (which can be the - // value) can have a non zero value, but that case is the next - // custom decodeMapField<>() method and handles it. - value[k ?? KeyType.proto3DefaultValue] = v ?? ValueType.proto3DefaultValue - consumed = true - } - - internal mutating func decodeMapField(fieldType: _ProtobufEnumMap.Type, value: inout _ProtobufEnumMap.BaseType) throws where ValueType.RawValue == Int { - guard fieldWireFormat == WireFormat.lengthDelimited else { - return - } - var k: KeyType.BaseType? - var v: ValueType? - var count: Int = 0 - let p = try getFieldBodyBytes(count: &count) - var subdecoder = BinaryDecoder(forReadingFrom: p, count: count, parent: self) - while let tag = try subdecoder.getTag() { - if tag.wireFormat == .endGroup { - throw BinaryDecodingError.malformedProtobuf - } - let fieldNumber = tag.fieldNumber - switch fieldNumber { - case 1: // Keys are basic types - try KeyType.decodeSingular(value: &k, from: &subdecoder) - case 2: // Value is an Enum type - try subdecoder.decodeSingularEnumField(value: &v) - if v == nil && tag.wireFormat == .varint { - // Enum decode fail and wire format was varint, so this had to - // have been a proto2 unknown enum value. This whole map entry - // into the parent message's unknown fields. If the wire format - // was wrong, treat it like an unknown field and drop it with - // the map entry. - return - } - default: // Skip any other fields within the map entry object - try subdecoder.skip() - } - } - if !subdecoder.complete { - throw BinaryDecodingError.trailingGarbage - } - // A map<> definition can't provide a default value for the keys, so it - // is safe to use the proto3 default to get the right integer/string/bytes. - value[k ?? KeyType.proto3DefaultValue] = v ?? ValueType() - consumed = true - } - - internal mutating func decodeMapField(fieldType: _ProtobufMessageMap.Type, value: inout _ProtobufMessageMap.BaseType) throws { - guard fieldWireFormat == WireFormat.lengthDelimited else { - return - } - var k: KeyType.BaseType? - var v: ValueType? - var count: Int = 0 - let p = try getFieldBodyBytes(count: &count) - var subdecoder = BinaryDecoder(forReadingFrom: p, count: count, parent: self) - while let tag = try subdecoder.getTag() { - if tag.wireFormat == .endGroup { - throw BinaryDecodingError.malformedProtobuf - } - let fieldNumber = tag.fieldNumber - switch fieldNumber { - case 1: // Keys are basic types - try KeyType.decodeSingular(value: &k, from: &subdecoder) - case 2: // Value is a message type - try subdecoder.decodeSingularMessageField(value: &v) - default: // Skip any other fields within the map entry object - try subdecoder.skip() - } - } - if !subdecoder.complete { - throw BinaryDecodingError.trailingGarbage - } - // A map<> definition can't provide a default value for the keys, so it - // is safe to use the proto3 default to get the right integer/string/bytes. - value[k ?? KeyType.proto3DefaultValue] = v ?? ValueType() - consumed = true - } - - internal mutating func decodeExtensionField( - values: inout ExtensionFieldValueSet, - messageType: Message.Type, - fieldNumber: Int - ) throws { - if let ext = extensions?[messageType, fieldNumber] { - try decodeExtensionField(values: &values, - messageType: messageType, - fieldNumber: fieldNumber, - messageExtension: ext) - } - } - - /// Helper to reuse between Extension decoding and MessageSet Extension decoding. - private mutating func decodeExtensionField( - values: inout ExtensionFieldValueSet, - messageType: Message.Type, - fieldNumber: Int, - messageExtension ext: AnyMessageExtension - ) throws { - assert(!consumed) - assert(fieldNumber == ext.fieldNumber) - - try values.modify(index: fieldNumber) { fieldValue in - // Message/Group extensions both will call back into the matching - // decode methods, so the recursion depth will be tracked there. - if fieldValue != nil { - try fieldValue!.decodeExtensionField(decoder: &self) - } else { - fieldValue = try ext._protobuf_newField(decoder: &self) - } - if consumed && fieldValue == nil { - // Really things should never get here, if the decoder says - // the bytes were consumed, then there should have been a - // field that consumed them (existing or created). This - // specific error result is to allow this to be more detectable. - throw BinaryDecodingError.internalExtensionError - } - } - } - - internal mutating func decodeExtensionFieldsAsMessageSet( - values: inout ExtensionFieldValueSet, - messageType: Message.Type - ) throws { - // Spin looking for the Item group, everything else will end up in unknown fields. - while let fieldNumber = try self.nextFieldNumber() { - guard fieldNumber == WireFormat.MessageSet.FieldNumbers.item && - fieldWireFormat == WireFormat.startGroup else { - continue - } - - // This is similiar to decodeFullGroup - - try incrementRecursionDepth() - var subDecoder = self - subDecoder.groupFieldNumber = fieldNumber - subDecoder.consumed = true - - let itemResult = try subDecoder.decodeMessageSetItem(values: &values, - messageType: messageType) - switch itemResult { - case .success: - // Advance over what was parsed. - consume(length: available - subDecoder.available) - consumed = true - case .handleAsUnknown: - // Nothing to do. - break - - case .malformed: - throw BinaryDecodingError.malformedProtobuf - } - - assert(recursionBudget == subDecoder.recursionBudget) - decrementRecursionDepth() - } - } - - private enum DecodeMessageSetItemResult { - case success - case handleAsUnknown - case malformed - } - - private mutating func decodeMessageSetItem( - values: inout ExtensionFieldValueSet, - messageType: Message.Type - ) throws -> DecodeMessageSetItemResult { - // This is loosely based on the C++: - // ExtensionSet::ParseMessageSetItem() - // WireFormat::ParseAndMergeMessageSetItem() - // (yes, there have two versions that are almost the same) - - var msgExtension: AnyMessageExtension? - var fieldData: Data? - - // In this loop, if wire types are wrong, things don't decode, - // just bail instead of letting things go into unknown fields. - // Wrongly formed MessageSets don't seem don't have real - // spelled out behaviors. - while let fieldNumber = try self.nextFieldNumber() { - switch fieldNumber { - case WireFormat.MessageSet.FieldNumbers.typeId: - var extensionFieldNumber: Int32 = 0 - try decodeSingularInt32Field(value: &extensionFieldNumber) - if extensionFieldNumber == 0 { return .malformed } - guard let ext = extensions?[messageType, Int(extensionFieldNumber)] else { - return .handleAsUnknown // Unknown extension. - } - msgExtension = ext - - // If there already was fieldData, decode it. - if let data = fieldData { - var wasDecoded = false - try data.withUnsafeBytes { (body: UnsafeRawBufferPointer) in - if let baseAddress = body.baseAddress, body.count > 0 { - var extDecoder = BinaryDecoder(forReadingFrom: baseAddress, - count: body.count, - parent: self) - // Prime the decode to be correct. - extDecoder.consumed = false - extDecoder.fieldWireFormat = .lengthDelimited - try extDecoder.decodeExtensionField(values: &values, - messageType: messageType, - fieldNumber: fieldNumber, - messageExtension: ext) - wasDecoded = extDecoder.consumed - } - } - if !wasDecoded { - return .malformed - } - fieldData = nil - } - - case WireFormat.MessageSet.FieldNumbers.message: - if let ext = msgExtension { - assert(consumed == false) - try decodeExtensionField(values: &values, - messageType: messageType, - fieldNumber: ext.fieldNumber, - messageExtension: ext) - if !consumed { - return .malformed - } - } else { - // The C++ references ends up appending the blocks together as length - // delimited blocks, but the parsing will only use the first block. - // So just capture a block, and then skip any others that happen to - // be found. - if fieldData == nil { - var d: Data? - try decodeSingularBytesField(value: &d) - guard let data = d else { return .malformed } - // Save it as length delimited - let payloadSize = Varint.encodedSize(of: Int64(data.count)) + data.count - var payload = Data(count: payloadSize) - payload.withUnsafeMutableBytes { (body: UnsafeMutableRawBufferPointer) in - if let baseAddress = body.baseAddress, body.count > 0 { - var encoder = BinaryEncoder(forWritingInto: baseAddress) - encoder.putBytesValue(value: data) - } - } - fieldData = payload - } else { - guard fieldWireFormat == .lengthDelimited else { return .malformed } - try skip() - consumed = true - } - } - - default: - // Skip everything else - try skip() - consumed = true - } - } - - return .success - } - - // - // Private building blocks for the parsing above. - // - // Having these be private gives the compiler maximum latitude for - // inlining. - // - - /// Private: Advance the current position. - private mutating func consume(length: Int) { - available -= length - p += length - } - - /// Private: Skip the body for the given tag. If the given tag is - /// a group, it parses up through the corresponding group end. - private mutating func skipOver(tag: FieldTag) throws { - switch tag.wireFormat { - case .varint: - // Don't need the value, just ensuring it is validly encoded. - let _ = try decodeVarint() - case .fixed64: - if available < 8 { - throw BinaryDecodingError.truncated - } - p += 8 - available -= 8 - case .lengthDelimited: - let n = try decodeVarint() - if n <= UInt64(available) { - p += Int(n) - available -= Int(n) - } else { - throw BinaryDecodingError.truncated - } - case .startGroup: - try incrementRecursionDepth() - while true { - if let innerTag = try getTagWithoutUpdatingFieldStart() { - if innerTag.wireFormat == .endGroup { - if innerTag.fieldNumber == tag.fieldNumber { - decrementRecursionDepth() - break - } else { - // .endGroup for a something other than the current - // group is an invalid binary. - throw BinaryDecodingError.malformedProtobuf - } - } else { - try skipOver(tag: innerTag) - } - } else { - throw BinaryDecodingError.truncated - } - } - case .endGroup: - throw BinaryDecodingError.malformedProtobuf - case .fixed32: - if available < 4 { - throw BinaryDecodingError.truncated - } - p += 4 - available -= 4 - } - } - - /// Private: Skip to the end of the current field. - /// - /// Assumes that fieldStartP was bookmarked by a previous - /// call to getTagType(). - /// - /// On exit, fieldStartP points to the first byte of the tag, fieldEndP points - /// to the first byte after the field contents, and p == fieldEndP. - private mutating func skip() throws { - if let end = fieldEndP { - p = end - } else { - // Rewind to start of current field. - available += p - fieldStartP - p = fieldStartP - guard let tag = try getTagWithoutUpdatingFieldStart() else { - throw BinaryDecodingError.truncated - } - try skipOver(tag: tag) - fieldEndP = p - } - } - - /// Private: Parse the next raw varint from the input. - private mutating func decodeVarint() throws -> UInt64 { - if available < 1 { - throw BinaryDecodingError.truncated - } - var start = p - var length = available - var c = start.load(fromByteOffset: 0, as: UInt8.self) - start += 1 - length -= 1 - if c & 0x80 == 0 { - p = start - available = length - return UInt64(c) - } - var value = UInt64(c & 0x7f) - var shift = UInt64(7) - while true { - if length < 1 || shift > 63 { - throw BinaryDecodingError.malformedProtobuf - } - c = start.load(fromByteOffset: 0, as: UInt8.self) - start += 1 - length -= 1 - value |= UInt64(c & 0x7f) << shift - if c & 0x80 == 0 { - p = start - available = length - return value - } - shift += 7 - } - } - - /// Private: Get the tag that starts a new field. - /// This also bookmarks the start of field for a possible skip(). - internal mutating func getTag() throws -> FieldTag? { - fieldStartP = p - fieldEndP = nil - return try getTagWithoutUpdatingFieldStart() - } - - /// Private: Parse and validate the next tag without - /// bookmarking the start of the field. This is used within - /// skip() to skip over fields within a group. - private mutating func getTagWithoutUpdatingFieldStart() throws -> FieldTag? { - if available < 1 { - return nil - } - let t = try decodeVarint() - if t < UInt64(UInt32.max) { - guard let tag = FieldTag(rawValue: UInt32(truncatingIfNeeded: t)) else { - throw BinaryDecodingError.malformedProtobuf - } - fieldWireFormat = tag.wireFormat - fieldNumber = tag.fieldNumber - return tag - } else { - throw BinaryDecodingError.malformedProtobuf - } - } - - /// Private: Return a Data containing the entirety of - /// the current field, including tag. - private mutating func getRawField() throws -> Data { - try skip() - return Data(bytes: fieldStartP, count: fieldEndP! - fieldStartP) - } - - /// Private: decode a fixed-length four-byte number. This generic - /// helper handles all four-byte number types. - private mutating func decodeFourByteNumber(value: inout T) throws { - guard available >= 4 else {throw BinaryDecodingError.truncated} - withUnsafeMutableBytes(of: &value) { dest -> Void in - dest.copyMemory(from: UnsafeRawBufferPointer(start: p, count: 4)) - } - consume(length: 4) - } - - /// Private: decode a fixed-length eight-byte number. This generic - /// helper handles all eight-byte number types. - private mutating func decodeEightByteNumber(value: inout T) throws { - guard available >= 8 else {throw BinaryDecodingError.truncated} - withUnsafeMutableBytes(of: &value) { dest -> Void in - dest.copyMemory(from: UnsafeRawBufferPointer(start: p, count: 8)) - } - consume(length: 8) - } - - private mutating func decodeFloat() throws -> Float { - var littleEndianBytes: UInt32 = 0 - try decodeFourByteNumber(value: &littleEndianBytes) - var nativeEndianBytes = UInt32(littleEndian: littleEndianBytes) - var float: Float = 0 - let n = MemoryLayout.size - memcpy(&float, &nativeEndianBytes, n) - return float - } - - private mutating func decodeDouble() throws -> Double { - var littleEndianBytes: UInt64 = 0 - try decodeEightByteNumber(value: &littleEndianBytes) - var nativeEndianBytes = UInt64(littleEndian: littleEndianBytes) - var double: Double = 0 - let n = MemoryLayout.size - memcpy(&double, &nativeEndianBytes, n) - return double - } - - /// Private: Get the start and length for the body of - /// a length-delimited field. - private mutating func getFieldBodyBytes(count: inout Int) throws -> UnsafeRawPointer { - let length = try decodeVarint() - - // Bytes and Strings have a max size of 2GB. And since messages are on - // the wire as bytes/length delimited, they also have a 2GB size limit. - // The upstream C++ does the same sort of enforcement (see - // parse_context, delimited_message_util, message_lite, etc.). - // https://protobuf.dev/programming-guides/encoding/#cheat-sheet - // - // This function does get called in some package decode handling, but - // that is length delimited on the wire, so the spec would imply - // the limit still applies. - guard length < 0x7fffffff else { - // Reuse existing error to breaking change of adding new error. - throw BinaryDecodingError.malformedProtobuf - } - - guard length <= UInt64(available) else { - throw BinaryDecodingError.truncated - } - - count = Int(length) - let body = p - consume(length: count) - return body - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryDecodingError.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryDecodingError.swift deleted file mode 100644 index 016d8ad7..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryDecodingError.swift +++ /dev/null @@ -1,44 +0,0 @@ -// Sources/SwiftProtobuf/BinaryDecodingError.swift - Protobuf binary decoding errors -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Protobuf binary format decoding errors -/// -// ----------------------------------------------------------------------------- - -/// Describes errors that can occur when decoding a message from binary format. -public enum BinaryDecodingError: Error { - /// Extraneous data remained after decoding should have been complete. - case trailingGarbage - - /// The decoder unexpectedly reached the end of the data before it was - /// expected. - case truncated - - /// A string field was not encoded as valid UTF-8. - case invalidUTF8 - - /// The binary data was malformed in some way, such as an invalid wire format - /// or field tag. - case malformedProtobuf - - /// The definition of the message or one of its nested messages has required - /// fields but the binary data did not include values for them. You must pass - /// `partial: true` during decoding if you wish to explicitly ignore missing - /// required fields. - case missingRequiredFields - - /// An internal error happened while decoding. If this is ever encountered, - /// please file an issue with SwiftProtobuf with as much details as possible - /// for what happened (proto definitions, bytes being decoded (if possible)). - case internalExtensionError - - /// Reached the nesting limit for messages within messages while decoding. - case messageDepthLimit -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryDecodingOptions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryDecodingOptions.swift deleted file mode 100644 index f00d6502..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryDecodingOptions.swift +++ /dev/null @@ -1,39 +0,0 @@ -// Sources/SwiftProtobuf/BinaryDecodingOptions.swift - Binary decoding options -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Binary decoding options -/// -// ----------------------------------------------------------------------------- - -/// Options for binary decoding. -public struct BinaryDecodingOptions { - /// The maximum nesting of message with messages. The default is 100. - /// - /// To prevent corrupt or malicious messages from causing stack overflows, - /// this controls how deep messages can be nested within other messages - /// while parsing. - public var messageDepthLimit: Int = 100 - - /// Discard unknown fields while parsing. The default is false, so parsering - /// does not discard unknown fields. - /// - /// The Protobuf binary format allows unknown fields to be still parsed - /// so the schema can be expanded without requiring all readers to be updated. - /// This works in part by haivng any unknown fields preserved so they can - /// be relayed on without loss. For a while the proto3 syntax definition - /// called for unknown fields to be dropped, but that lead to problems in - /// some case. The default is to follow the spec and keep them, but setting - /// this option to `true` allows a developer to strip them during a parse - /// in case they have a specific need to drop the unknown fields from the - /// object graph being created. - public var discardUnknownFields: Bool = false - - public init() {} -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryDelimited.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryDelimited.swift deleted file mode 100644 index e2de26f0..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryDelimited.swift +++ /dev/null @@ -1,250 +0,0 @@ -// Sources/SwiftProtobuf/BinaryDelimited.swift - Delimited support -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Helpers to read/write message with a length prefix. -/// -// ----------------------------------------------------------------------------- - -#if !os(WASI) -import Foundation - -/// Helper methods for reading/writing messages with a length prefix. -public enum BinaryDelimited { - /// Additional errors for delimited message handing. - public enum Error: Swift.Error { - /// If a read/write to the stream fails, but the stream's `streamError` is nil, - /// this error will be throw instead since the stream didn't provide anything - /// more specific. A common cause for this can be failing to open the stream - /// before trying to read/write to it. - case unknownStreamError - - /// While reading/writing to the stream, less than the expected bytes was - /// read/written. - case truncated - } - - /// Serialize a single size-delimited message from the given stream. Delimited - /// format allows a single file or stream to contain multiple messages, - /// whereas normally writing multiple non-delimited messages to the same - /// stream would cause them to be merged. A delimited message is a varint - /// encoding the message size followed by a message of exactly that size. - /// - /// - Parameters: - /// - message: The message to be written. - /// - to: The `OutputStream` to write the message to. The stream is - /// is assumed to be ready to be written to. - /// - partial: If `false` (the default), this method will check - /// `Message.isInitialized` before encoding to verify that all required - /// fields are present. If any are missing, this method throws - /// `BinaryEncodingError.missingRequiredFields`. - /// - Throws: `BinaryEncodingError` if encoding fails, throws - /// `BinaryDelimited.Error` for some writing errors, or the - /// underlying `OutputStream.streamError` for a stream error. - public static func serialize( - message: Message, - to stream: OutputStream, - partial: Bool = false - ) throws { - // TODO: Revisit to avoid the extra buffering when encoding is streamed in general. - let serialized = try message.serializedData(partial: partial) - let totalSize = Varint.encodedSize(of: UInt64(serialized.count)) + serialized.count - var data = Data(count: totalSize) - data.withUnsafeMutableBytes { (body: UnsafeMutableRawBufferPointer) in - if let baseAddress = body.baseAddress, body.count > 0 { - var encoder = BinaryEncoder(forWritingInto: baseAddress) - encoder.putBytesValue(value: serialized) - } - } - - var written: Int = 0 - data.withUnsafeBytes { (body: UnsafeRawBufferPointer) in - if let baseAddress = body.baseAddress, body.count > 0 { - // This assumingMemoryBound is technically unsafe, but without SR-11078 - // (https://bugs.swift.org/browse/SR-11087) we don't have another option. - // It should be "safe enough". - let pointer = baseAddress.assumingMemoryBound(to: UInt8.self) - written = stream.write(pointer, maxLength: totalSize) - } - } - - if written != totalSize { - if written == -1 { - if let streamError = stream.streamError { - throw streamError - } - throw BinaryDelimited.Error.unknownStreamError - } - throw BinaryDelimited.Error.truncated - } - } - - /// Reads a single size-delimited message from the given stream. Delimited - /// format allows a single file or stream to contain multiple messages, - /// whereas normally parsing consumes the entire input. A delimited message - /// is a varint encoding the message size followed by a message of exactly - /// exactly that size. - /// - /// - Parameters: - /// - messageType: The type of message to read. - /// - from: The `InputStream` to read the data from. The stream is assumed - /// to be ready to read from. - /// - extensions: An `ExtensionMap` used to look up and decode any - /// extensions in this message or messages nested within this message's - /// fields. - /// - partial: If `false` (the default), this method will check - /// `Message.isInitialized` after decoding to verify that all required - /// fields are present. If any are missing, this method throws - /// `BinaryDecodingError.missingRequiredFields`. - /// - options: The BinaryDecodingOptions to use. - /// - Returns: The message read. - /// - Throws: `BinaryDecodingError` if decoding fails, throws - /// `BinaryDelimited.Error` for some reading errors, and the - /// underlying InputStream.streamError for a stream error. - public static func parse( - messageType: M.Type, - from stream: InputStream, - extensions: ExtensionMap? = nil, - partial: Bool = false, - options: BinaryDecodingOptions = BinaryDecodingOptions() - ) throws -> M { - var message = M() - try merge(into: &message, - from: stream, - extensions: extensions, - partial: partial, - options: options) - return message - } - - /// Updates the message by reading a single size-delimited message from - /// the given stream. Delimited format allows a single file or stream to - /// contain multiple messages, whereas normally parsing consumes the entire - /// input. A delimited message is a varint encoding the message size - /// followed by a message of exactly that size. - /// - /// - Note: If this method throws an error, the message may still have been - /// partially mutated by the binary data that was decoded before the error - /// occurred. - /// - /// - Parameters: - /// - mergingTo: The message to merge the data into. - /// - from: The `InputStream` to read the data from. The stream is assumed - /// to be ready to read from. - /// - extensions: An `ExtensionMap` used to look up and decode any - /// extensions in this message or messages nested within this message's - /// fields. - /// - partial: If `false` (the default), this method will check - /// `Message.isInitialized` after decoding to verify that all required - /// fields are present. If any are missing, this method throws - /// `BinaryDecodingError.missingRequiredFields`. - /// - options: The BinaryDecodingOptions to use. - /// - Throws: `BinaryDecodingError` if decoding fails, throws - /// `BinaryDelimited.Error` for some reading errors, and the - /// underlying InputStream.streamError for a stream error. - public static func merge( - into message: inout M, - from stream: InputStream, - extensions: ExtensionMap? = nil, - partial: Bool = false, - options: BinaryDecodingOptions = BinaryDecodingOptions() - ) throws { - let unsignedLength = try decodeVarint(stream) - if unsignedLength == 0 { - // The message was all defaults, nothing to actually read. - return - } - guard unsignedLength <= 0x7fffffff else { - // Adding a new case is a breaking change, reuse malformedProtobuf. - throw BinaryDecodingError.malformedProtobuf - } - let length = Int(unsignedLength) - - // TODO: Consider doing a version with getBuffer:length: if the InputStream - // support it and thus avoiding this local copy. - - // Even though the bytes are read in chunks, things can still hard fail if - // there isn't enough memory to append to have all the bytes at once for - // parsing. - var data = Data() - let kChunkSize = 16 * 1024 * 1024 - var chunk = [UInt8](repeating: 0, count: min(length, kChunkSize)) - var bytesNeeded = length - while bytesNeeded > 0 { - let maxLength = min(bytesNeeded, chunk.count) - var bytesRead: Int = 0 - chunk.withUnsafeMutableBytes { (body: UnsafeMutableRawBufferPointer) in - if let baseAddress = body.baseAddress, body.count > 0 { - let pointer = baseAddress.assumingMemoryBound(to: UInt8.self) - bytesRead = stream.read(pointer, maxLength: maxLength) - } - } - if bytesRead == -1 { - if let streamError = stream.streamError { - throw streamError - } - throw BinaryDelimited.Error.unknownStreamError - } - if bytesRead == 0 { - // Hit the end of the stream - throw BinaryDelimited.Error.truncated - } - data.append(chunk, count: bytesRead) - bytesNeeded -= bytesRead - } - - try message.merge(serializedData: data, - extensions: extensions, - partial: partial, - options: options) - } -} - -// TODO: This should go away when encoding/decoding are more stream based -// as that should provide a more direct way to do this. This is basically -// a rewrite of BinaryDecoder.decodeVarint(). -internal func decodeVarint(_ stream: InputStream) throws -> UInt64 { - - // Buffer to reuse within nextByte. - let readBuffer = UnsafeMutablePointer.allocate(capacity: 1) - #if swift(>=4.1) - defer { readBuffer.deallocate() } - #else - defer { readBuffer.deallocate(capacity: 1) } - #endif - - func nextByte() throws -> UInt8 { - let bytesRead = stream.read(readBuffer, maxLength: 1) - if bytesRead != 1 { - if bytesRead == -1 { - if let streamError = stream.streamError { - throw streamError - } - throw BinaryDelimited.Error.unknownStreamError - } - throw BinaryDelimited.Error.truncated - } - return readBuffer[0] - } - - var value: UInt64 = 0 - var shift: UInt64 = 0 - while true { - let c = try nextByte() - value |= UInt64(c & 0x7f) << shift - if c & 0x80 == 0 { - return value - } - shift += 7 - if shift > 63 { - throw BinaryDecodingError.malformedProtobuf - } - } -} -#endif diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncoder.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncoder.swift deleted file mode 100644 index a3809c28..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncoder.swift +++ /dev/null @@ -1,153 +0,0 @@ -// Sources/SwiftProtobuf/BinaryEncoder.swift - Binary encoding support -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Core support for protobuf binary encoding. Note that this is built -/// on the general traversal machinery. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// Encoder for Binary Protocol Buffer format -internal struct BinaryEncoder { - private var pointer: UnsafeMutableRawPointer - - init(forWritingInto pointer: UnsafeMutableRawPointer) { - self.pointer = pointer - } - - private mutating func append(_ byte: UInt8) { - pointer.storeBytes(of: byte, as: UInt8.self) - pointer = pointer.advanced(by: 1) - } - - private mutating func append(contentsOf data: Data) { - data.withUnsafeBytes { dataPointer in - if let baseAddress = dataPointer.baseAddress, dataPointer.count > 0 { - pointer.copyMemory(from: baseAddress, byteCount: dataPointer.count) - pointer = pointer.advanced(by: dataPointer.count) - } - } - } - - @discardableResult - private mutating func append(contentsOf bufferPointer: UnsafeRawBufferPointer) -> Int { - let count = bufferPointer.count - if let baseAddress = bufferPointer.baseAddress, count > 0 { - memcpy(pointer, baseAddress, count) - } - pointer = pointer.advanced(by: count) - return count - } - - func distance(pointer: UnsafeMutableRawPointer) -> Int { - return pointer.distance(to: self.pointer) - } - - mutating func appendUnknown(data: Data) { - append(contentsOf: data) - } - - mutating func startField(fieldNumber: Int, wireFormat: WireFormat) { - startField(tag: FieldTag(fieldNumber: fieldNumber, wireFormat: wireFormat)) - } - - mutating func startField(tag: FieldTag) { - putVarInt(value: UInt64(tag.rawValue)) - } - - mutating func putVarInt(value: UInt64) { - var v = value - while v > 127 { - append(UInt8(v & 0x7f | 0x80)) - v >>= 7 - } - append(UInt8(v)) - } - - mutating func putVarInt(value: Int64) { - putVarInt(value: UInt64(bitPattern: value)) - } - - mutating func putVarInt(value: Int) { - putVarInt(value: Int64(value)) - } - - mutating func putZigZagVarInt(value: Int64) { - let coded = ZigZag.encoded(value) - putVarInt(value: coded) - } - - mutating func putBoolValue(value: Bool) { - append(value ? 1 : 0) - } - - mutating func putFixedUInt64(value: UInt64) { - var v = value.littleEndian - let n = MemoryLayout.size - memcpy(pointer, &v, n) - pointer = pointer.advanced(by: n) - } - - mutating func putFixedUInt32(value: UInt32) { - var v = value.littleEndian - let n = MemoryLayout.size - memcpy(pointer, &v, n) - pointer = pointer.advanced(by: n) - } - - mutating func putFloatValue(value: Float) { - let n = MemoryLayout.size - var v = value - var nativeBytes: UInt32 = 0 - memcpy(&nativeBytes, &v, n) - var littleEndianBytes = nativeBytes.littleEndian - memcpy(pointer, &littleEndianBytes, n) - pointer = pointer.advanced(by: n) - } - - mutating func putDoubleValue(value: Double) { - let n = MemoryLayout.size - var v = value - var nativeBytes: UInt64 = 0 - memcpy(&nativeBytes, &v, n) - var littleEndianBytes = nativeBytes.littleEndian - memcpy(pointer, &littleEndianBytes, n) - pointer = pointer.advanced(by: n) - } - - // Write a string field, including the leading index/tag value. - mutating func putStringValue(value: String) { - let utf8 = value.utf8 - #if swift(>=5.0) - // If the String does not support an internal representation in a form - // of contiguous storage, body is not called and nil is returned. - let isAvailable = utf8.withContiguousStorageIfAvailable { (body: UnsafeBufferPointer) -> Int in - putVarInt(value: body.count) - return append(contentsOf: UnsafeRawBufferPointer(body)) - } - #else - let isAvailable: Int? = nil - #endif - if isAvailable == nil { - let count = utf8.count - putVarInt(value: count) - for b in utf8 { - pointer.storeBytes(of: b, as: UInt8.self) - pointer = pointer.advanced(by: 1) - } - } - } - - mutating func putBytesValue(value: Data) { - putVarInt(value: value.count) - append(contentsOf: value) - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncodingError.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncodingError.swift deleted file mode 100644 index 14e4f6a9..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncodingError.swift +++ /dev/null @@ -1,31 +0,0 @@ -// Sources/SwiftProtobuf/BinaryEncodingError.swift - Error constants -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Enum constants that identify the particular error. -/// -// ----------------------------------------------------------------------------- - -/// Describes errors that can occur when decoding a message from binary format. -public enum BinaryEncodingError: Error { - /// `Any` fields that were decoded from JSON cannot be re-encoded to binary - /// unless the object they hold is a well-known type or a type registered via - /// `Google_Protobuf_Any.register()`. - case anyTranscodeFailure - - /// The definition of the message or one of its nested messages has required - /// fields but the message being encoded did not include values for them. You - /// must pass `partial: true` during encoding if you wish to explicitly ignore - /// missing required fields. - /// - /// This is reused for when messages are over the limited of maximum of 2GB in - /// encoded size. The error is reused to avoid making a breaking change of - /// adding a new error code. - case missingRequiredFields -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncodingOptions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncodingOptions.swift deleted file mode 100644 index 811a537c..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncodingOptions.swift +++ /dev/null @@ -1,32 +0,0 @@ -// Sources/SwiftProtobuf/BinaryEncodingOptions.swift - Binary encoding options -// -// Copyright (c) 2014 - 2023 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Binary encoding options -/// -// ----------------------------------------------------------------------------- - -/// Options for binary encoding. -public struct BinaryEncodingOptions { - /// Whether to use deterministic ordering when serializing. - /// - /// Note that the deterministic serialization is NOT canonical across languages. - /// It is NOT guaranteed to remain stable over time. It is unstable across - /// different builds with schema changes due to unknown fields. Users who need - /// canonical serialization (e.g., persistent storage in a canonical form, - /// fingerprinting, etc.) should define their own canonicalization specification - /// and implement their own serializer rather than relying on this API. - /// - /// If deterministic serialization is requested, map entries will be sorted - /// by keys in lexographical order. This is an implementation detail - /// and subject to change. - public var useDeterministicOrdering: Bool = false - - public init() {} -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncodingSizeVisitor.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncodingSizeVisitor.swift deleted file mode 100644 index 2db485d2..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncodingSizeVisitor.swift +++ /dev/null @@ -1,473 +0,0 @@ -// Sources/SwiftProtobuf/BinaryEncodingSizeVisitor.swift - Binary size calculation support -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Visitor used during binary encoding that precalcuates the size of a -/// serialized message. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// Visitor that calculates the binary-encoded size of a message so that a -/// properly sized `Data` or `UInt8` array can be pre-allocated before -/// serialization. -internal struct BinaryEncodingSizeVisitor: Visitor { - - /// Accumulates the required size of the message during traversal. - var serializedSize: Int = 0 - - init() {} - - mutating func visitUnknown(bytes: Data) throws { - serializedSize += bytes.count - } - - mutating func visitSingularFloatField(value: Float, fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .fixed32).encodedSize - serializedSize += tagSize + MemoryLayout.size - } - - mutating func visitSingularDoubleField(value: Double, fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .fixed64).encodedSize - serializedSize += tagSize + MemoryLayout.size - } - - mutating func visitSingularInt32Field(value: Int32, fieldNumber: Int) throws { - try visitSingularInt64Field(value: Int64(value), fieldNumber: fieldNumber) - } - - mutating func visitSingularInt64Field(value: Int64, fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .varint).encodedSize - serializedSize += tagSize + Varint.encodedSize(of: value) - } - - mutating func visitSingularUInt32Field(value: UInt32, fieldNumber: Int) throws { - try visitSingularUInt64Field(value: UInt64(value), fieldNumber: fieldNumber) - } - - mutating func visitSingularUInt64Field(value: UInt64, fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .varint).encodedSize - serializedSize += tagSize + Varint.encodedSize(of: value) - } - - mutating func visitSingularSInt32Field(value: Int32, fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .varint).encodedSize - serializedSize += tagSize + Varint.encodedSize(of: ZigZag.encoded(value)) - } - - mutating func visitSingularSInt64Field(value: Int64, fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .varint).encodedSize - serializedSize += tagSize + Varint.encodedSize(of: ZigZag.encoded(value)) - } - - mutating func visitSingularFixed32Field(value: UInt32, fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .fixed32).encodedSize - serializedSize += tagSize + MemoryLayout.size - } - - mutating func visitSingularFixed64Field(value: UInt64, fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .fixed64).encodedSize - serializedSize += tagSize + MemoryLayout.size - } - - mutating func visitSingularSFixed32Field(value: Int32, fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .fixed32).encodedSize - serializedSize += tagSize + MemoryLayout.size - } - - mutating func visitSingularSFixed64Field(value: Int64, fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .fixed64).encodedSize - serializedSize += tagSize + MemoryLayout.size - } - - mutating func visitSingularBoolField(value: Bool, fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .varint).encodedSize - serializedSize += tagSize + 1 - } - - mutating func visitSingularStringField(value: String, fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let count = value.utf8.count - serializedSize += tagSize + Varint.encodedSize(of: Int64(count)) + count - } - - mutating func visitSingularBytesField(value: Data, fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let count = value.count - serializedSize += tagSize + Varint.encodedSize(of: Int64(count)) + count - } - - // The default impls for visitRepeated*Field would work, but by implementing - // these directly, the calculation for the tag overhead can be optimized and - // the fixed width fields can be simple multiplication. - - mutating func visitRepeatedFloatField(value: [Float], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .fixed32).encodedSize - serializedSize += tagSize * value.count + MemoryLayout.size * value.count - } - - mutating func visitRepeatedDoubleField(value: [Double], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .fixed64).encodedSize - serializedSize += tagSize * value.count + MemoryLayout.size * value.count - } - - mutating func visitRepeatedInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .varint).encodedSize - let dataSize = value.reduce(0) { $0 + Varint.encodedSize(of: $1) } - serializedSize += tagSize * value.count + dataSize - } - - mutating func visitRepeatedInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .varint).encodedSize - let dataSize = value.reduce(0) { $0 + Varint.encodedSize(of: $1) } - serializedSize += tagSize * value.count + dataSize - } - - mutating func visitRepeatedUInt32Field(value: [UInt32], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .varint).encodedSize - let dataSize = value.reduce(0) { $0 + Varint.encodedSize(of: $1) } - serializedSize += tagSize * value.count + dataSize - } - - mutating func visitRepeatedUInt64Field(value: [UInt64], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .varint).encodedSize - let dataSize = value.reduce(0) { $0 + Varint.encodedSize(of: $1) } - serializedSize += tagSize * value.count + dataSize - } - - mutating func visitRepeatedSInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .varint).encodedSize - let dataSize = value.reduce(0) { $0 + Varint.encodedSize(of: ZigZag.encoded($1)) } - serializedSize += tagSize * value.count + dataSize - } - - mutating func visitRepeatedSInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .varint).encodedSize - let dataSize = value.reduce(0) { $0 + Varint.encodedSize(of: ZigZag.encoded($1)) } - serializedSize += tagSize * value.count + dataSize - } - - mutating func visitRepeatedFixed32Field(value: [UInt32], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .fixed32).encodedSize - serializedSize += tagSize * value.count + MemoryLayout.size * value.count - } - - mutating func visitRepeatedFixed64Field(value: [UInt64], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .fixed64).encodedSize - serializedSize += tagSize * value.count + MemoryLayout.size * value.count - } - - mutating func visitRepeatedSFixed32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .fixed32).encodedSize - serializedSize += tagSize * value.count + MemoryLayout.size * value.count - } - - mutating func visitRepeatedSFixed64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .fixed64).encodedSize - serializedSize += tagSize * value.count + MemoryLayout.size * value.count - } - - mutating func visitRepeatedBoolField(value: [Bool], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .varint).encodedSize - serializedSize += tagSize * value.count + 1 * value.count - } - - mutating func visitRepeatedStringField(value: [String], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.reduce(0) { - let count = $1.utf8.count - return $0 + Varint.encodedSize(of: Int64(count)) + count - } - serializedSize += tagSize * value.count + dataSize - } - - mutating func visitRepeatedBytesField(value: [Data], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.reduce(0) { - let count = $1.count - return $0 + Varint.encodedSize(of: Int64(count)) + count - } - serializedSize += tagSize * value.count + dataSize - } - - // Packed field handling. - - mutating func visitPackedFloatField(value: [Float], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.count * MemoryLayout.size - serializedSize += tagSize + Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitPackedDoubleField(value: [Double], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.count * MemoryLayout.size - serializedSize += tagSize + Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitPackedInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.reduce(0) { $0 + Varint.encodedSize(of: $1) } - serializedSize += - tagSize + Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitPackedInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.reduce(0) { $0 + Varint.encodedSize(of: $1) } - serializedSize += - tagSize + Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitPackedSInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.reduce(0) { $0 + Varint.encodedSize(of: ZigZag.encoded($1)) } - serializedSize += - tagSize + Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitPackedSInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.reduce(0) { $0 + Varint.encodedSize(of: ZigZag.encoded($1)) } - serializedSize += - tagSize + Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitPackedUInt32Field(value: [UInt32], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.reduce(0) { $0 + Varint.encodedSize(of: $1) } - serializedSize += - tagSize + Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitPackedUInt64Field(value: [UInt64], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.reduce(0) { $0 + Varint.encodedSize(of: $1) } - serializedSize += - tagSize + Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitPackedFixed32Field(value: [UInt32], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.count * MemoryLayout.size - serializedSize += tagSize + Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitPackedFixed64Field(value: [UInt64], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.count * MemoryLayout.size - serializedSize += tagSize + Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitPackedSFixed32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.count * MemoryLayout.size - serializedSize += tagSize + Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitPackedSFixed64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.count * MemoryLayout.size - serializedSize += tagSize + Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitPackedBoolField(value: [Bool], fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, wireFormat: .lengthDelimited).encodedSize - let dataSize = value.count - serializedSize += tagSize + Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitSingularEnumField(value: E, - fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, - wireFormat: .varint).encodedSize - serializedSize += tagSize - let dataSize = Varint.encodedSize(of: Int32(truncatingIfNeeded: value.rawValue)) - serializedSize += dataSize - } - - mutating func visitRepeatedEnumField(value: [E], - fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, - wireFormat: .varint).encodedSize - serializedSize += value.count * tagSize - let dataSize = value.reduce(0) { - $0 + Varint.encodedSize(of: Int32(truncatingIfNeeded: $1.rawValue)) - } - serializedSize += dataSize - } - - mutating func visitPackedEnumField(value: [E], - fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, - wireFormat: .varint).encodedSize - serializedSize += tagSize - let dataSize = value.reduce(0) { - $0 + Varint.encodedSize(of: Int32(truncatingIfNeeded: $1.rawValue)) - } - serializedSize += Varint.encodedSize(of: Int64(dataSize)) + dataSize - } - - mutating func visitSingularMessageField(value: M, - fieldNumber: Int) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, - wireFormat: .lengthDelimited).encodedSize - let messageSize = try value.serializedDataSize() - serializedSize += - tagSize + Varint.encodedSize(of: UInt64(messageSize)) + messageSize - } - - mutating func visitRepeatedMessageField(value: [M], - fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, - wireFormat: .lengthDelimited).encodedSize - serializedSize += value.count * tagSize - let dataSize = try value.reduce(0) { - let messageSize = try $1.serializedDataSize() - return $0 + Varint.encodedSize(of: UInt64(messageSize)) + messageSize - } - serializedSize += dataSize - } - - mutating func visitSingularGroupField(value: G, fieldNumber: Int) throws { - // The wire format doesn't matter here because the encoded size of the - // integer won't change based on the low three bits. - let tagSize = FieldTag(fieldNumber: fieldNumber, - wireFormat: .startGroup).encodedSize - serializedSize += 2 * tagSize - try value.traverse(visitor: &self) - } - - mutating func visitRepeatedGroupField(value: [G], - fieldNumber: Int) throws { - assert(!value.isEmpty) - let tagSize = FieldTag(fieldNumber: fieldNumber, - wireFormat: .startGroup).encodedSize - serializedSize += 2 * value.count * tagSize - for v in value { - try v.traverse(visitor: &self) - } - } - - mutating func visitMapField( - fieldType: _ProtobufMap.Type, - value: _ProtobufMap.BaseType, - fieldNumber: Int - ) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, - wireFormat: .lengthDelimited).encodedSize - for (k,v) in value { - var sizer = BinaryEncodingSizeVisitor() - try KeyType.visitSingular(value: k, fieldNumber: 1, with: &sizer) - try ValueType.visitSingular(value: v, fieldNumber: 2, with: &sizer) - let entrySize = sizer.serializedSize - serializedSize += Varint.encodedSize(of: Int64(entrySize)) + entrySize - } - serializedSize += value.count * tagSize - } - - mutating func visitMapField( - fieldType: _ProtobufEnumMap.Type, - value: _ProtobufEnumMap.BaseType, - fieldNumber: Int - ) throws where ValueType.RawValue == Int { - let tagSize = FieldTag(fieldNumber: fieldNumber, - wireFormat: .lengthDelimited).encodedSize - for (k,v) in value { - var sizer = BinaryEncodingSizeVisitor() - try KeyType.visitSingular(value: k, fieldNumber: 1, with: &sizer) - try sizer.visitSingularEnumField(value: v, fieldNumber: 2) - let entrySize = sizer.serializedSize - serializedSize += Varint.encodedSize(of: Int64(entrySize)) + entrySize - } - serializedSize += value.count * tagSize - } - - mutating func visitMapField( - fieldType: _ProtobufMessageMap.Type, - value: _ProtobufMessageMap.BaseType, - fieldNumber: Int - ) throws { - let tagSize = FieldTag(fieldNumber: fieldNumber, - wireFormat: .lengthDelimited).encodedSize - for (k,v) in value { - var sizer = BinaryEncodingSizeVisitor() - try KeyType.visitSingular(value: k, fieldNumber: 1, with: &sizer) - try sizer.visitSingularMessageField(value: v, fieldNumber: 2) - let entrySize = sizer.serializedSize - serializedSize += Varint.encodedSize(of: Int64(entrySize)) + entrySize - } - serializedSize += value.count * tagSize - } - - mutating func visitExtensionFieldsAsMessageSet( - fields: ExtensionFieldValueSet, - start: Int, - end: Int - ) throws { - var sizer = BinaryEncodingMessageSetSizeVisitor() - try fields.traverse(visitor: &sizer, start: start, end: end) - serializedSize += sizer.serializedSize - } -} - -extension BinaryEncodingSizeVisitor { - - // Helper Visitor to compute the sizes when writing out the extensions as MessageSets. - internal struct BinaryEncodingMessageSetSizeVisitor: SelectiveVisitor { - var serializedSize: Int = 0 - - init() {} - - mutating func visitSingularMessageField(value: M, fieldNumber: Int) throws { - var groupSize = WireFormat.MessageSet.itemTagsEncodedSize - - groupSize += Varint.encodedSize(of: Int32(fieldNumber)) - - let messageSize = try value.serializedDataSize() - groupSize += Varint.encodedSize(of: UInt64(messageSize)) + messageSize - - serializedSize += groupSize - } - - // SelectiveVisitor handles the rest. - } - -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncodingVisitor.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncodingVisitor.swift deleted file mode 100644 index 597bbb19..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/BinaryEncodingVisitor.swift +++ /dev/null @@ -1,390 +0,0 @@ -// Sources/SwiftProtobuf/BinaryEncodingVisitor.swift - Binary encoding support -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Core support for protobuf binary encoding. Note that this is built -/// on the general traversal machinery. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// Visitor that encodes a message graph in the protobuf binary wire format. -internal struct BinaryEncodingVisitor: Visitor { - private let options: BinaryEncodingOptions - - var encoder: BinaryEncoder - - /// Creates a new visitor that writes the binary-coded message into the memory - /// at the given pointer. - /// - /// - Precondition: `pointer` must point to an allocated block of memory that - /// is large enough to hold the entire encoded message. For performance - /// reasons, the encoder does not make any attempts to verify this. - init(forWritingInto pointer: UnsafeMutableRawPointer, options: BinaryEncodingOptions) { - self.encoder = BinaryEncoder(forWritingInto: pointer) - self.options = options - } - - init(encoder: BinaryEncoder, options: BinaryEncodingOptions) { - self.encoder = encoder - self.options = options - } - - mutating func visitUnknown(bytes: Data) throws { - encoder.appendUnknown(data: bytes) - } - - mutating func visitSingularFloatField(value: Float, fieldNumber: Int) throws { - encoder.startField(fieldNumber: fieldNumber, wireFormat: .fixed32) - encoder.putFloatValue(value: value) - } - - mutating func visitSingularDoubleField(value: Double, fieldNumber: Int) throws { - encoder.startField(fieldNumber: fieldNumber, wireFormat: .fixed64) - encoder.putDoubleValue(value: value) - } - - mutating func visitSingularInt64Field(value: Int64, fieldNumber: Int) throws { - try visitSingularUInt64Field(value: UInt64(bitPattern: value), fieldNumber: fieldNumber) - } - - mutating func visitSingularUInt64Field(value: UInt64, fieldNumber: Int) throws { - encoder.startField(fieldNumber: fieldNumber, wireFormat: .varint) - encoder.putVarInt(value: value) - } - - mutating func visitSingularSInt32Field(value: Int32, fieldNumber: Int) throws { - try visitSingularSInt64Field(value: Int64(value), fieldNumber: fieldNumber) - } - - mutating func visitSingularSInt64Field(value: Int64, fieldNumber: Int) throws { - try visitSingularUInt64Field(value: ZigZag.encoded(value), fieldNumber: fieldNumber) - } - - mutating func visitSingularFixed32Field(value: UInt32, fieldNumber: Int) throws { - encoder.startField(fieldNumber: fieldNumber, wireFormat: .fixed32) - encoder.putFixedUInt32(value: value) - } - - mutating func visitSingularFixed64Field(value: UInt64, fieldNumber: Int) throws { - encoder.startField(fieldNumber: fieldNumber, wireFormat: .fixed64) - encoder.putFixedUInt64(value: value) - } - - mutating func visitSingularSFixed32Field(value: Int32, fieldNumber: Int) throws { - try visitSingularFixed32Field(value: UInt32(bitPattern: value), fieldNumber: fieldNumber) - } - - mutating func visitSingularSFixed64Field(value: Int64, fieldNumber: Int) throws { - try visitSingularFixed64Field(value: UInt64(bitPattern: value), fieldNumber: fieldNumber) - } - - mutating func visitSingularBoolField(value: Bool, fieldNumber: Int) throws { - try visitSingularUInt64Field(value: value ? 1 : 0, fieldNumber: fieldNumber) - } - - mutating func visitSingularStringField(value: String, fieldNumber: Int) throws { - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - encoder.putStringValue(value: value) - } - - mutating func visitSingularBytesField(value: Data, fieldNumber: Int) throws { - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - encoder.putBytesValue(value: value) - } - - mutating func visitSingularEnumField(value: E, - fieldNumber: Int) throws { - try visitSingularUInt64Field(value: UInt64(bitPattern: Int64(value.rawValue)), - fieldNumber: fieldNumber) - } - - mutating func visitSingularMessageField(value: M, - fieldNumber: Int) throws { - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - let length = try value.serializedDataSize() - encoder.putVarInt(value: length) - try value.traverse(visitor: &self) - } - - mutating func visitSingularGroupField(value: G, fieldNumber: Int) throws { - encoder.startField(fieldNumber: fieldNumber, wireFormat: .startGroup) - try value.traverse(visitor: &self) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .endGroup) - } - - // Repeated fields are handled by the default implementations in Visitor.swift - - - // Packed Fields - - mutating func visitPackedFloatField(value: [Float], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - encoder.putVarInt(value: value.count * MemoryLayout.size) - for v in value { - encoder.putFloatValue(value: v) - } - } - - mutating func visitPackedDoubleField(value: [Double], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - encoder.putVarInt(value: value.count * MemoryLayout.size) - for v in value { - encoder.putDoubleValue(value: v) - } - } - - mutating func visitPackedInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - let packedSize = value.reduce(0) { $0 + Varint.encodedSize(of: $1) } - encoder.putVarInt(value: packedSize) - for v in value { - encoder.putVarInt(value: Int64(v)) - } - } - - mutating func visitPackedInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - let packedSize = value.reduce(0) { $0 + Varint.encodedSize(of: $1) } - encoder.putVarInt(value: packedSize) - for v in value { - encoder.putVarInt(value: v) - } - } - - mutating func visitPackedSInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - let packedSize = value.reduce(0) { $0 + Varint.encodedSize(of: ZigZag.encoded($1)) } - encoder.putVarInt(value: packedSize) - for v in value { - encoder.putZigZagVarInt(value: Int64(v)) - } - } - - mutating func visitPackedSInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - let packedSize = value.reduce(0) { $0 + Varint.encodedSize(of: ZigZag.encoded($1)) } - encoder.putVarInt(value: packedSize) - for v in value { - encoder.putZigZagVarInt(value: v) - } - } - - mutating func visitPackedUInt32Field(value: [UInt32], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - let packedSize = value.reduce(0) { $0 + Varint.encodedSize(of: $1) } - encoder.putVarInt(value: packedSize) - for v in value { - encoder.putVarInt(value: UInt64(v)) - } - } - - mutating func visitPackedUInt64Field(value: [UInt64], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - let packedSize = value.reduce(0) { $0 + Varint.encodedSize(of: $1) } - encoder.putVarInt(value: packedSize) - for v in value { - encoder.putVarInt(value: v) - } - } - - mutating func visitPackedFixed32Field(value: [UInt32], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - encoder.putVarInt(value: value.count * MemoryLayout.size) - for v in value { - encoder.putFixedUInt32(value: v) - } - } - - mutating func visitPackedFixed64Field(value: [UInt64], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - encoder.putVarInt(value: value.count * MemoryLayout.size) - for v in value { - encoder.putFixedUInt64(value: v) - } - } - - mutating func visitPackedSFixed32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - encoder.putVarInt(value: value.count * MemoryLayout.size) - for v in value { - encoder.putFixedUInt32(value: UInt32(bitPattern: v)) - } - } - - mutating func visitPackedSFixed64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - encoder.putVarInt(value: value.count * MemoryLayout.size) - for v in value { - encoder.putFixedUInt64(value: UInt64(bitPattern: v)) - } - } - - mutating func visitPackedBoolField(value: [Bool], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - encoder.putVarInt(value: value.count) - for v in value { - encoder.putVarInt(value: v ? 1 : 0) - } - } - - mutating func visitPackedEnumField(value: [E], fieldNumber: Int) throws { - assert(!value.isEmpty) - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - let packedSize = value.reduce(0) { - $0 + Varint.encodedSize(of: Int32(truncatingIfNeeded: $1.rawValue)) - } - encoder.putVarInt(value: packedSize) - for v in value { - encoder.putVarInt(value: v.rawValue) - } - } - - mutating func visitMapField( - fieldType: _ProtobufMap.Type, - value: _ProtobufMap.BaseType, - fieldNumber: Int - ) throws { - try iterateAndEncode( - map: value, fieldNumber: fieldNumber, isOrderedBefore: KeyType._lessThan, - encodeWithSizer: { sizer, key, value in - try KeyType.visitSingular(value: key, fieldNumber: 1, with: &sizer) - try ValueType.visitSingular(value: value, fieldNumber: 2, with: &sizer) - }, encodeWithVisitor: { visitor, key, value in - try KeyType.visitSingular(value: key, fieldNumber: 1, with: &visitor) - try ValueType.visitSingular(value: value, fieldNumber: 2, with: &visitor) - } - ) - } - - mutating func visitMapField( - fieldType: _ProtobufEnumMap.Type, - value: _ProtobufEnumMap.BaseType, - fieldNumber: Int - ) throws where ValueType.RawValue == Int { - try iterateAndEncode( - map: value, fieldNumber: fieldNumber, isOrderedBefore: KeyType._lessThan, - encodeWithSizer: { sizer, key, value in - try KeyType.visitSingular(value: key, fieldNumber: 1, with: &sizer) - try sizer.visitSingularEnumField(value: value, fieldNumber: 2) - }, encodeWithVisitor: { visitor, key, value in - try KeyType.visitSingular(value: key, fieldNumber: 1, with: &visitor) - try visitor.visitSingularEnumField(value: value, fieldNumber: 2) - } - ) - } - - mutating func visitMapField( - fieldType: _ProtobufMessageMap.Type, - value: _ProtobufMessageMap.BaseType, - fieldNumber: Int - ) throws { - try iterateAndEncode( - map: value, fieldNumber: fieldNumber, isOrderedBefore: KeyType._lessThan, - encodeWithSizer: { sizer, key, value in - try KeyType.visitSingular(value: key, fieldNumber: 1, with: &sizer) - try sizer.visitSingularMessageField(value: value, fieldNumber: 2) - }, encodeWithVisitor: { visitor, key, value in - try KeyType.visitSingular(value: key, fieldNumber: 1, with: &visitor) - try visitor.visitSingularMessageField(value: value, fieldNumber: 2) - } - ) - } - - /// Helper to encapsulate the common structure of iterating over a map - /// and encoding the keys and values. - private mutating func iterateAndEncode( - map: Dictionary, - fieldNumber: Int, - isOrderedBefore: (K, K) -> Bool, - encodeWithSizer: (inout BinaryEncodingSizeVisitor, K, V) throws -> (), - encodeWithVisitor: (inout BinaryEncodingVisitor, K, V) throws -> () - ) throws { - if options.useDeterministicOrdering { - for (k,v) in map.sorted(by: { isOrderedBefore( $0.0, $1.0) }) { - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - var sizer = BinaryEncodingSizeVisitor() - try encodeWithSizer(&sizer, k, v) - let entrySize = sizer.serializedSize - encoder.putVarInt(value: entrySize) - try encodeWithVisitor(&self, k, v) - } - } else { - for (k,v) in map { - encoder.startField(fieldNumber: fieldNumber, wireFormat: .lengthDelimited) - var sizer = BinaryEncodingSizeVisitor() - try encodeWithSizer(&sizer, k, v) - let entrySize = sizer.serializedSize - encoder.putVarInt(value: entrySize) - try encodeWithVisitor(&self, k, v) - } - } - } - - mutating func visitExtensionFieldsAsMessageSet( - fields: ExtensionFieldValueSet, - start: Int, - end: Int - ) throws { - var subVisitor = BinaryEncodingMessageSetVisitor(encoder: encoder, options: options) - try fields.traverse(visitor: &subVisitor, start: start, end: end) - encoder = subVisitor.encoder - } -} - -extension BinaryEncodingVisitor { - - // Helper Visitor to when writing out the extensions as MessageSets. - internal struct BinaryEncodingMessageSetVisitor: SelectiveVisitor { - private let options: BinaryEncodingOptions - - var encoder: BinaryEncoder - - init(encoder: BinaryEncoder, options: BinaryEncodingOptions) { - self.options = options - self.encoder = encoder - } - - mutating func visitSingularMessageField(value: M, fieldNumber: Int) throws { - encoder.putVarInt(value: Int64(WireFormat.MessageSet.Tags.itemStart.rawValue)) - - encoder.putVarInt(value: Int64(WireFormat.MessageSet.Tags.typeId.rawValue)) - encoder.putVarInt(value: fieldNumber) - - encoder.putVarInt(value: Int64(WireFormat.MessageSet.Tags.message.rawValue)) - - // Use a normal BinaryEncodingVisitor so any message fields end up in the - // normal wire format (instead of MessageSet format). - let length = try value.serializedDataSize() - encoder.putVarInt(value: length) - // Create the sub encoder after writing the length. - var subVisitor = BinaryEncodingVisitor(encoder: encoder, options: options) - try value.traverse(visitor: &subVisitor) - encoder = subVisitor.encoder - - encoder.putVarInt(value: Int64(WireFormat.MessageSet.Tags.itemEnd.rawValue)) - } - - // SelectiveVisitor handles the rest. - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/CustomJSONCodable.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/CustomJSONCodable.swift deleted file mode 100644 index 2e1fd340..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/CustomJSONCodable.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Sources/SwiftProtobuf/CustomJSONCodable.swift - Custom JSON support for WKTs -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Custom protocol for the WKTs to support their custom JSON encodings. -/// -// ----------------------------------------------------------------------------- - -/// Allows WKTs to provide their custom JSON encodings. -internal protocol _CustomJSONCodable { - func encodedJSONString(options: JSONEncodingOptions) throws -> String - mutating func decodeJSON(from: inout JSONDecoder) throws - - /// Called when the JSON `null` literal is encountered in a position where - /// a message of the conforming type is expected. The message type can then - /// handle the `null` value differently, if needed; for example, - /// `Google_Protobuf_Value` returns a special instance whose `kind` is set to - /// `.nullValue(.nullValue)`. - /// - /// The default behavior is to return `nil`, which indicates that `null` - /// should be treated as the absence of a message. - static func decodedFromJSONNull() throws -> Self? -} - -extension _CustomJSONCodable { - internal static func decodedFromJSONNull() -> Self? { - // Return nil by default. Concrete types can provide custom logic. - return nil - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Data+Extensions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Data+Extensions.swift deleted file mode 100644 index 3e359d73..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Data+Extensions.swift +++ /dev/null @@ -1,34 +0,0 @@ -// Sources/SwiftProtobuf/Data+Extensions.swift - Extension exposing new Data API -// -// Copyright (c) 2014 - 2019 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Extension exposing new Data API to Swift versions < 5.0. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -#if !swift(>=5.0) -internal extension Data { - @usableFromInline - func withUnsafeBytes(_ body: (UnsafeRawBufferPointer) throws -> T) rethrows -> T { - let c = count - return try withUnsafeBytes { (p: UnsafePointer) throws -> T in - try body(UnsafeRawBufferPointer(start: p, count: c)) - } - } - - mutating func withUnsafeMutableBytes(_ body: (UnsafeMutableRawBufferPointer) throws -> T) rethrows -> T { - let c = count - return try withUnsafeMutableBytes { (p: UnsafeMutablePointer) throws -> T in - try body(UnsafeMutableRawBufferPointer(start: p, count: c)) - } - } -} -#endif diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Decoder.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Decoder.swift deleted file mode 100644 index 76c28f31..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Decoder.swift +++ /dev/null @@ -1,150 +0,0 @@ -// Sources/SwiftProtobuf/Decoder.swift - Basic field setting -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// In this way, the generated code only knows about schema -/// information; the decoder logic knows how to decode particular -/// wire types based on that information. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// This is the abstract protocol used by the generated code -/// to deserialize data. -/// -/// The generated code looks roughly like this: -/// -/// ``` -/// while fieldNumber = try decoder.nextFieldNumber() { -/// switch fieldNumber { -/// case 1: decoder.decodeRepeatedInt32Field(value: &_field) -/// ... etc ... -/// } -/// ``` -/// -/// For performance, this is mostly broken out into a separate method -/// for singular/repeated fields of every supported type. Note that -/// we don't distinguish "packed" here, since all existing decoders -/// treat "packed" the same as "repeated" at this level. (That is, -/// even when the serializer distinguishes packed and non-packed -/// forms, the deserializer always accepts both.) -/// -/// Generics come into play at only a few points: `Enum`s and `Message`s -/// use a generic type to locate the correct initializer. Maps and -/// extensions use generics to avoid the method explosion of having to -/// support a separate method for every map and extension type. Maps -/// do distinguish `Enum`-valued and `Message`-valued maps to avoid -/// polluting the generated `Enum` and `Message` types with all of the -/// necessary generic methods to support this. -public protocol Decoder { - /// Called by a `oneof` when it already has a value and is being asked to - /// accept a new value. Some formats require `oneof` decoding to fail in this - /// case. - mutating func handleConflictingOneOf() throws - - /// Returns the next field number, or nil when the end of the input is - /// reached. - /// - /// For JSON and text format, the decoder translates the field name to a - /// number at this point, based on information it obtained from the message - /// when it was initialized. - mutating func nextFieldNumber() throws -> Int? - - // Primitive field decoders - mutating func decodeSingularFloatField(value: inout Float) throws - mutating func decodeSingularFloatField(value: inout Float?) throws - mutating func decodeRepeatedFloatField(value: inout [Float]) throws - mutating func decodeSingularDoubleField(value: inout Double) throws - mutating func decodeSingularDoubleField(value: inout Double?) throws - mutating func decodeRepeatedDoubleField(value: inout [Double]) throws - mutating func decodeSingularInt32Field(value: inout Int32) throws - mutating func decodeSingularInt32Field(value: inout Int32?) throws - mutating func decodeRepeatedInt32Field(value: inout [Int32]) throws - mutating func decodeSingularInt64Field(value: inout Int64) throws - mutating func decodeSingularInt64Field(value: inout Int64?) throws - mutating func decodeRepeatedInt64Field(value: inout [Int64]) throws - mutating func decodeSingularUInt32Field(value: inout UInt32) throws - mutating func decodeSingularUInt32Field(value: inout UInt32?) throws - mutating func decodeRepeatedUInt32Field(value: inout [UInt32]) throws - mutating func decodeSingularUInt64Field(value: inout UInt64) throws - mutating func decodeSingularUInt64Field(value: inout UInt64?) throws - mutating func decodeRepeatedUInt64Field(value: inout [UInt64]) throws - mutating func decodeSingularSInt32Field(value: inout Int32) throws - mutating func decodeSingularSInt32Field(value: inout Int32?) throws - mutating func decodeRepeatedSInt32Field(value: inout [Int32]) throws - mutating func decodeSingularSInt64Field(value: inout Int64) throws - mutating func decodeSingularSInt64Field(value: inout Int64?) throws - mutating func decodeRepeatedSInt64Field(value: inout [Int64]) throws - mutating func decodeSingularFixed32Field(value: inout UInt32) throws - mutating func decodeSingularFixed32Field(value: inout UInt32?) throws - mutating func decodeRepeatedFixed32Field(value: inout [UInt32]) throws - mutating func decodeSingularFixed64Field(value: inout UInt64) throws - mutating func decodeSingularFixed64Field(value: inout UInt64?) throws - mutating func decodeRepeatedFixed64Field(value: inout [UInt64]) throws - mutating func decodeSingularSFixed32Field(value: inout Int32) throws - mutating func decodeSingularSFixed32Field(value: inout Int32?) throws - mutating func decodeRepeatedSFixed32Field(value: inout [Int32]) throws - mutating func decodeSingularSFixed64Field(value: inout Int64) throws - mutating func decodeSingularSFixed64Field(value: inout Int64?) throws - mutating func decodeRepeatedSFixed64Field(value: inout [Int64]) throws - mutating func decodeSingularBoolField(value: inout Bool) throws - mutating func decodeSingularBoolField(value: inout Bool?) throws - mutating func decodeRepeatedBoolField(value: inout [Bool]) throws - mutating func decodeSingularStringField(value: inout String) throws - mutating func decodeSingularStringField(value: inout String?) throws - mutating func decodeRepeatedStringField(value: inout [String]) throws - mutating func decodeSingularBytesField(value: inout Data) throws - mutating func decodeSingularBytesField(value: inout Data?) throws - mutating func decodeRepeatedBytesField(value: inout [Data]) throws - - // Decode Enum fields - mutating func decodeSingularEnumField(value: inout E) throws where E.RawValue == Int - mutating func decodeSingularEnumField(value: inout E?) throws where E.RawValue == Int - mutating func decodeRepeatedEnumField(value: inout [E]) throws where E.RawValue == Int - - // Decode Message fields - mutating func decodeSingularMessageField(value: inout M?) throws - mutating func decodeRepeatedMessageField(value: inout [M]) throws - - // Decode Group fields - mutating func decodeSingularGroupField(value: inout G?) throws - mutating func decodeRepeatedGroupField(value: inout [G]) throws - - // Decode Map fields. - // This is broken into separate methods depending on whether the value - // type is primitive (_ProtobufMap), enum (_ProtobufEnumMap), or message - // (_ProtobufMessageMap) - mutating func decodeMapField(fieldType: _ProtobufMap.Type, value: inout _ProtobufMap.BaseType) throws - mutating func decodeMapField(fieldType: _ProtobufEnumMap.Type, value: inout _ProtobufEnumMap.BaseType) throws where ValueType.RawValue == Int - mutating func decodeMapField(fieldType: _ProtobufMessageMap.Type, value: inout _ProtobufMessageMap.BaseType) throws - - // Decode extension fields - mutating func decodeExtensionField(values: inout ExtensionFieldValueSet, messageType: Message.Type, fieldNumber: Int) throws - - // Run a decode loop decoding the MessageSet format for Extensions. - mutating func decodeExtensionFieldsAsMessageSet(values: inout ExtensionFieldValueSet, - messageType: Message.Type) throws -} - -/// Most Decoders won't care about Extension handing as in MessageSet -/// format, so provide a default implementation simply looping on the -/// fieldNumbers and feeding through to extension decoding. -extension Decoder { - public mutating func decodeExtensionFieldsAsMessageSet( - values: inout ExtensionFieldValueSet, - messageType: Message.Type - ) throws { - while let fieldNumber = try self.nextFieldNumber() { - try self.decodeExtensionField(values: &values, - messageType: messageType, - fieldNumber: fieldNumber) - } - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/DoubleParser.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/DoubleParser.swift deleted file mode 100644 index 6c80d794..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/DoubleParser.swift +++ /dev/null @@ -1,61 +0,0 @@ -// Sources/SwiftProtobuf/DoubleParser.swift - Generally useful mathematical functions -// -// Copyright (c) 2014 - 2019 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Numeric parsing helper for float and double strings -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// Support parsing float/double values from UTF-8 -internal class DoubleParser { - // Temporary buffer so we can null-terminate the UTF-8 string - // before calling the C standard library to parse it. - // In theory, JSON writers should be able to represent any IEEE Double - // in at most 25 bytes, but many writers will emit more digits than - // necessary, so we size this generously. - private var work = - UnsafeMutableBufferPointer.allocate(capacity: 128) - - deinit { - work.deallocate() - } - - func utf8ToDouble(bytes: UnsafeRawBufferPointer, - start: UnsafeRawBufferPointer.Index, - end: UnsafeRawBufferPointer.Index) -> Double? { - return utf8ToDouble(bytes: UnsafeRawBufferPointer(rebasing: bytes[start.. Double? { - // Reject unreasonably long or short UTF8 number - if work.count <= bytes.count || bytes.count < 1 { - return nil - } - - #if swift(>=4.1) - UnsafeMutableRawBufferPointer(work).copyMemory(from: bytes) - #else - UnsafeMutableRawBufferPointer(work).copyBytes(from: bytes) - #endif - work[bytes.count] = 0 - - // Use C library strtod() to parse it - var e: UnsafeMutablePointer? = work.baseAddress - let d = strtod(work.baseAddress!, &e) - - // Fail if strtod() did not consume everything we expected - // or if strtod() thought the number was out of range. - if e != work.baseAddress! + bytes.count || !d.isFinite { - return nil - } - return d - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Enum.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Enum.swift deleted file mode 100644 index d5965bc7..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Enum.swift +++ /dev/null @@ -1,95 +0,0 @@ -// Sources/SwiftProtobuf/Enum.swift - Enum support -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Generated enums conform to SwiftProtobuf.Enum -/// -/// See ProtobufTypes and JSONTypes for extension -/// methods to support binary and JSON coding. -/// -// ----------------------------------------------------------------------------- - -// TODO: `Enum` should require `Sendable` but we cannot do so yet without possibly breaking compatibility. - -/// Generated enum types conform to this protocol. -public protocol Enum: RawRepresentable, Hashable { - /// Creates a new instance of the enum initialized to its default value. - init() - - /// Creates a new instance of the enum from the given raw integer value. - /// - /// For proto2 enums, this initializer will fail if the raw value does not - /// correspond to a valid enum value. For proto3 enums, this initializer never - /// fails; unknown values are created as instances of the `UNRECOGNIZED` case. - /// - /// - Parameter rawValue: The raw integer value from which to create the enum - /// value. - init?(rawValue: Int) - - /// The raw integer value of the enum value. - /// - /// For a recognized enum case, this is the integer value of the case as - /// defined in the .proto file. For `UNRECOGNIZED` cases in proto3, this is - /// the value that was originally decoded. - var rawValue: Int { get } -} - -extension Enum { -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - hasher.combine(rawValue) - } -#else // swift(>=4.2) - public var hashValue: Int { - return rawValue - } -#endif // swift(>=4.2) - - /// Internal convenience property representing the name of the enum value (or - /// `nil` if it is an `UNRECOGNIZED` value or doesn't provide names). - /// - /// Since the text format and JSON names are always identical, we don't need - /// to distinguish them. - internal var name: _NameMap.Name? { - guard let nameProviding = Self.self as? _ProtoNameProviding.Type else { - return nil - } - return nameProviding._protobuf_nameMap.names(for: rawValue)?.proto - } - - /// Internal convenience initializer that returns the enum value with the - /// given name, if it provides names. - /// - /// Since the text format and JSON names are always identical, we don't need - /// to distinguish them. - /// - /// - Parameter name: The name of the enum case. - internal init?(name: String) { - guard let nameProviding = Self.self as? _ProtoNameProviding.Type, - let number = nameProviding._protobuf_nameMap.number(forJSONName: name) else { - return nil - } - self.init(rawValue: number) - } - - /// Internal convenience initializer that returns the enum value with the - /// given name, if it provides names. - /// - /// Since the text format and JSON names are always identical, we don't need - /// to distinguish them. - /// - /// - Parameter name: Buffer holding the UTF-8 bytes of the desired name. - internal init?(rawUTF8: UnsafeRawBufferPointer) { - guard let nameProviding = Self.self as? _ProtoNameProviding.Type, - let number = nameProviding._protobuf_nameMap.number(forJSONName: rawUTF8) else { - return nil - } - self.init(rawValue: number) - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ExtensibleMessage.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ExtensibleMessage.swift deleted file mode 100644 index f1fb9914..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ExtensibleMessage.swift +++ /dev/null @@ -1,73 +0,0 @@ -// Sources/SwiftProtobuf/ExtensibleMessage.swift - Extension support -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Additional capabilities needed by messages that allow extensions. -/// -// ----------------------------------------------------------------------------- - -// Messages that support extensions implement this protocol -public protocol ExtensibleMessage: Message { - var _protobuf_extensionFieldValues: ExtensionFieldValueSet { get set } -} - -extension ExtensibleMessage { - public mutating func setExtensionValue(ext: MessageExtension, value: F.ValueType) { - _protobuf_extensionFieldValues[ext.fieldNumber] = F(protobufExtension: ext, value: value) - } - - public func getExtensionValue(ext: MessageExtension) -> F.ValueType? { - if let fieldValue = _protobuf_extensionFieldValues[ext.fieldNumber] as? F { - return fieldValue.value - } - return nil - } - - public func hasExtensionValue(ext: MessageExtension) -> Bool { - return _protobuf_extensionFieldValues[ext.fieldNumber] is F - } - - public mutating func clearExtensionValue(ext: MessageExtension) { - _protobuf_extensionFieldValues[ext.fieldNumber] = nil - } -} - -// Additional specializations for the different types of repeated fields so -// setting them to an empty array clears them from the map. -extension ExtensibleMessage { - public mutating func setExtensionValue(ext: MessageExtension, Self>, value: [T.BaseType]) { - _protobuf_extensionFieldValues[ext.fieldNumber] = - value.isEmpty ? nil : RepeatedExtensionField(protobufExtension: ext, value: value) - } - - public mutating func setExtensionValue(ext: MessageExtension, Self>, value: [T.BaseType]) { - _protobuf_extensionFieldValues[ext.fieldNumber] = - value.isEmpty ? nil : PackedExtensionField(protobufExtension: ext, value: value) - } - - public mutating func setExtensionValue(ext: MessageExtension, Self>, value: [E]) { - _protobuf_extensionFieldValues[ext.fieldNumber] = - value.isEmpty ? nil : RepeatedEnumExtensionField(protobufExtension: ext, value: value) - } - - public mutating func setExtensionValue(ext: MessageExtension, Self>, value: [E]) { - _protobuf_extensionFieldValues[ext.fieldNumber] = - value.isEmpty ? nil : PackedEnumExtensionField(protobufExtension: ext, value: value) - } - - public mutating func setExtensionValue(ext: MessageExtension, Self>, value: [M]) { - _protobuf_extensionFieldValues[ext.fieldNumber] = - value.isEmpty ? nil : RepeatedMessageExtensionField(protobufExtension: ext, value: value) - } - - public mutating func setExtensionValue(ext: MessageExtension, Self>, value: [M]) { - _protobuf_extensionFieldValues[ext.fieldNumber] = - value.isEmpty ? nil : RepeatedGroupExtensionField(protobufExtension: ext, value: value) - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ExtensionFieldValueSet.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ExtensionFieldValueSet.swift deleted file mode 100644 index fc48b0e2..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ExtensionFieldValueSet.swift +++ /dev/null @@ -1,97 +0,0 @@ -// Sources/SwiftProtobuf/ExtensionFieldValueSet.swift - Extension support -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// A collection of extension field values on a particular object. -/// This is only used within messages to manage the values of extension fields; -/// it does not need to be very sophisticated. -/// -// ----------------------------------------------------------------------------- - -// TODO: `ExtensionFieldValueSet` should be `Sendable` but we cannot do so yet without possibly breaking compatibility. - -public struct ExtensionFieldValueSet: Hashable { - fileprivate var values = [Int : AnyExtensionField]() - - public static func ==(lhs: ExtensionFieldValueSet, - rhs: ExtensionFieldValueSet) -> Bool { - guard lhs.values.count == rhs.values.count else { - return false - } - for (index, l) in lhs.values { - if let r = rhs.values[index] { - if type(of: l) != type(of: r) { - return false - } - if !l.isEqual(other: r) { - return false - } - } else { - return false - } - } - return true - } - - public init() {} - -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - // AnyExtensionField is not Hashable, and the Self constraint that would - // add breaks some of the uses of it; so the only choice is to manually - // mix things in. However, one must remember to do things in an order - // independent manner. - var hash = 16777619 - for (fieldNumber, v) in values { - var localHasher = hasher - localHasher.combine(fieldNumber) - v.hash(into: &localHasher) - hash = hash &+ localHasher.finalize() - } - hasher.combine(hash) - } -#else // swift(>=4.2) - public var hashValue: Int { - var hash = 16777619 - for (fieldNumber, v) in values { - // Note: This calculation cannot depend on the order of the items. - hash = hash &+ fieldNumber &+ v.hashValue - } - return hash - } -#endif // swift(>=4.2) - - public func traverse(visitor: inout V, start: Int, end: Int) throws { - let validIndexes = values.keys.filter {$0 >= start && $0 < end} - for i in validIndexes.sorted() { - let value = values[i]! - try value.traverse(visitor: &visitor) - } - } - - public subscript(index: Int) -> AnyExtensionField? { - get { return values[index] } - set { values[index] = newValue } - } - - mutating func modify(index: Int, _ modifier: (inout AnyExtensionField?) throws -> ReturnType) rethrows -> ReturnType { - // This internal helper exists to invoke the _modify accessor on Dictionary for the given operation, which can avoid CoWs - // during the modification operation. - return try modifier(&values[index]) - } - - public var isInitialized: Bool { - for (_, v) in values { - if !v.isInitialized { - return false - } - } - return true - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ExtensionFields.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ExtensionFields.swift deleted file mode 100644 index 7aefd00c..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ExtensionFields.swift +++ /dev/null @@ -1,710 +0,0 @@ -// Sources/SwiftProtobuf/ExtensionFields.swift - Extension support -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Core protocols implemented by generated extensions. -/// -// ----------------------------------------------------------------------------- - -#if !swift(>=4.2) -private let i_2166136261 = Int(bitPattern: 2166136261) -private let i_16777619 = Int(16777619) -#endif - -// TODO: `AnyExtensionField` should require `Sendable` but we cannot do so yet without possibly breaking compatibility. - -// -// Type-erased Extension field implementation. -// Note that it has no "self or associated type" references, so can -// be used as a protocol type. (In particular, although it does have -// a hashValue property, it cannot be Hashable.) -// -// This can encode, decode, return a hashValue and test for -// equality with some other extension field; but it's type-sealed -// so you can't actually access the contained value itself. -// -public protocol AnyExtensionField: CustomDebugStringConvertible { -#if swift(>=4.2) - func hash(into hasher: inout Hasher) -#else - var hashValue: Int { get } -#endif - var protobufExtension: AnyMessageExtension { get } - func isEqual(other: AnyExtensionField) -> Bool - - /// Merging field decoding - mutating func decodeExtensionField(decoder: inout T) throws - - /// Fields know their own type, so can dispatch to a visitor - func traverse(visitor: inout V) throws - - /// Check if the field is initialized. - var isInitialized: Bool { get } -} - -extension AnyExtensionField { - // Default implementation for extensions fields. The message types below provide - // custom versions. - public var isInitialized: Bool { return true } -} - -/// -/// The regular ExtensionField type exposes the value directly. -/// -public protocol ExtensionField: AnyExtensionField, Hashable { - associatedtype ValueType - var value: ValueType { get set } - init(protobufExtension: AnyMessageExtension, value: ValueType) - init?(protobufExtension: AnyMessageExtension, decoder: inout D) throws -} - -/// -/// Singular field -/// -public struct OptionalExtensionField: ExtensionField { - public typealias BaseType = T.BaseType - public typealias ValueType = BaseType - public var value: ValueType - public var protobufExtension: AnyMessageExtension - - public static func ==(lhs: OptionalExtensionField, - rhs: OptionalExtensionField) -> Bool { - return lhs.value == rhs.value - } - - public init(protobufExtension: AnyMessageExtension, value: ValueType) { - self.protobufExtension = protobufExtension - self.value = value - } - - public var debugDescription: String { - get { - return String(reflecting: value) - } - } - -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - hasher.combine(value) - } -#else // swift(>=4.2) - public var hashValue: Int { - get { return value.hashValue } - } -#endif // swift(>=4.2) - - public func isEqual(other: AnyExtensionField) -> Bool { - let o = other as! OptionalExtensionField - return self == o - } - - public mutating func decodeExtensionField(decoder: inout D) throws { - var v: ValueType? - try T.decodeSingular(value: &v, from: &decoder) - if let v = v { - value = v - } - } - - public init?(protobufExtension: AnyMessageExtension, decoder: inout D) throws { - var v: ValueType? - try T.decodeSingular(value: &v, from: &decoder) - if let v = v { - self.init(protobufExtension: protobufExtension, value: v) - } else { - return nil - } - } - - public func traverse(visitor: inout V) throws { - try T.visitSingular(value: value, fieldNumber: protobufExtension.fieldNumber, with: &visitor) - } -} - -/// -/// Repeated fields -/// -public struct RepeatedExtensionField: ExtensionField { - public typealias BaseType = T.BaseType - public typealias ValueType = [BaseType] - public var value: ValueType - public var protobufExtension: AnyMessageExtension - - public static func ==(lhs: RepeatedExtensionField, - rhs: RepeatedExtensionField) -> Bool { - return lhs.value == rhs.value - } - - public init(protobufExtension: AnyMessageExtension, value: ValueType) { - self.protobufExtension = protobufExtension - self.value = value - } - -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - hasher.combine(value) - } -#else // swift(>=4.2) - public var hashValue: Int { - get { - var hash = i_2166136261 - for e in value { - hash = (hash &* i_16777619) ^ e.hashValue - } - return hash - } - } -#endif // swift(>=4.2) - - public func isEqual(other: AnyExtensionField) -> Bool { - let o = other as! RepeatedExtensionField - return self == o - } - - public var debugDescription: String { - return "[" + value.map{String(reflecting: $0)}.joined(separator: ",") + "]" - } - - public mutating func decodeExtensionField(decoder: inout D) throws { - try T.decodeRepeated(value: &value, from: &decoder) - } - - public init?(protobufExtension: AnyMessageExtension, decoder: inout D) throws { - var v: ValueType = [] - try T.decodeRepeated(value: &v, from: &decoder) - self.init(protobufExtension: protobufExtension, value: v) - } - - public func traverse(visitor: inout V) throws { - if value.count > 0 { - try T.visitRepeated(value: value, fieldNumber: protobufExtension.fieldNumber, with: &visitor) - } - } -} - -/// -/// Packed Repeated fields -/// -/// TODO: This is almost (but not quite) identical to RepeatedFields; -/// find a way to collapse the implementations. -/// -public struct PackedExtensionField: ExtensionField { - public typealias BaseType = T.BaseType - public typealias ValueType = [BaseType] - public var value: ValueType - public var protobufExtension: AnyMessageExtension - - public static func ==(lhs: PackedExtensionField, - rhs: PackedExtensionField) -> Bool { - return lhs.value == rhs.value - } - - public init(protobufExtension: AnyMessageExtension, value: ValueType) { - self.protobufExtension = protobufExtension - self.value = value - } - -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - hasher.combine(value) - } -#else // swift(>=4.2) - public var hashValue: Int { - get { - var hash = i_2166136261 - for e in value { - hash = (hash &* i_16777619) ^ e.hashValue - } - return hash - } - } -#endif // swift(>=4.2) - - public func isEqual(other: AnyExtensionField) -> Bool { - let o = other as! PackedExtensionField - return self == o - } - - public var debugDescription: String { - return "[" + value.map{String(reflecting: $0)}.joined(separator: ",") + "]" - } - - public mutating func decodeExtensionField(decoder: inout D) throws { - try T.decodeRepeated(value: &value, from: &decoder) - } - - public init?(protobufExtension: AnyMessageExtension, decoder: inout D) throws { - var v: ValueType = [] - try T.decodeRepeated(value: &v, from: &decoder) - self.init(protobufExtension: protobufExtension, value: v) - } - - public func traverse(visitor: inout V) throws { - if value.count > 0 { - try T.visitPacked(value: value, fieldNumber: protobufExtension.fieldNumber, with: &visitor) - } - } -} - -/// -/// Enum extensions -/// -public struct OptionalEnumExtensionField: ExtensionField where E.RawValue == Int { - public typealias BaseType = E - public typealias ValueType = E - public var value: ValueType - public var protobufExtension: AnyMessageExtension - - public static func ==(lhs: OptionalEnumExtensionField, - rhs: OptionalEnumExtensionField) -> Bool { - return lhs.value == rhs.value - } - - public init(protobufExtension: AnyMessageExtension, value: ValueType) { - self.protobufExtension = protobufExtension - self.value = value - } - - public var debugDescription: String { - get { - return String(reflecting: value) - } - } - -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - hasher.combine(value) - } -#else // swift(>=4.2) - public var hashValue: Int { - get { return value.hashValue } - } -#endif // swift(>=4.2) - - public func isEqual(other: AnyExtensionField) -> Bool { - let o = other as! OptionalEnumExtensionField - return self == o - } - - public mutating func decodeExtensionField(decoder: inout D) throws { - var v: ValueType? - try decoder.decodeSingularEnumField(value: &v) - if let v = v { - value = v - } - } - - public init?(protobufExtension: AnyMessageExtension, decoder: inout D) throws { - var v: ValueType? - try decoder.decodeSingularEnumField(value: &v) - if let v = v { - self.init(protobufExtension: protobufExtension, value: v) - } else { - return nil - } - } - - public func traverse(visitor: inout V) throws { - try visitor.visitSingularEnumField( - value: value, - fieldNumber: protobufExtension.fieldNumber) - } -} - -/// -/// Repeated Enum fields -/// -public struct RepeatedEnumExtensionField: ExtensionField where E.RawValue == Int { - public typealias BaseType = E - public typealias ValueType = [E] - public var value: ValueType - public var protobufExtension: AnyMessageExtension - - public static func ==(lhs: RepeatedEnumExtensionField, - rhs: RepeatedEnumExtensionField) -> Bool { - return lhs.value == rhs.value - } - - public init(protobufExtension: AnyMessageExtension, value: ValueType) { - self.protobufExtension = protobufExtension - self.value = value - } - -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - hasher.combine(value) - } -#else // swift(>=4.2) - public var hashValue: Int { - get { - var hash = i_2166136261 - for e in value { - hash = (hash &* i_16777619) ^ e.hashValue - } - return hash - } - } -#endif // swift(>=4.2) - - public func isEqual(other: AnyExtensionField) -> Bool { - let o = other as! RepeatedEnumExtensionField - return self == o - } - - public var debugDescription: String { - return "[" + value.map{String(reflecting: $0)}.joined(separator: ",") + "]" - } - - public mutating func decodeExtensionField(decoder: inout D) throws { - try decoder.decodeRepeatedEnumField(value: &value) - } - - public init?(protobufExtension: AnyMessageExtension, decoder: inout D) throws { - var v: ValueType = [] - try decoder.decodeRepeatedEnumField(value: &v) - self.init(protobufExtension: protobufExtension, value: v) - } - - public func traverse(visitor: inout V) throws { - if value.count > 0 { - try visitor.visitRepeatedEnumField( - value: value, - fieldNumber: protobufExtension.fieldNumber) - } - } -} - -/// -/// Packed Repeated Enum fields -/// -/// TODO: This is almost (but not quite) identical to RepeatedEnumFields; -/// find a way to collapse the implementations. -/// -public struct PackedEnumExtensionField: ExtensionField where E.RawValue == Int { - public typealias BaseType = E - public typealias ValueType = [E] - public var value: ValueType - public var protobufExtension: AnyMessageExtension - - public static func ==(lhs: PackedEnumExtensionField, - rhs: PackedEnumExtensionField) -> Bool { - return lhs.value == rhs.value - } - - public init(protobufExtension: AnyMessageExtension, value: ValueType) { - self.protobufExtension = protobufExtension - self.value = value - } - -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - hasher.combine(value) - } -#else // swift(>=4.2) - public var hashValue: Int { - get { - var hash = i_2166136261 - for e in value { - hash = (hash &* i_16777619) ^ e.hashValue - } - return hash - } - } -#endif // swift(>=4.2) - - public func isEqual(other: AnyExtensionField) -> Bool { - let o = other as! PackedEnumExtensionField - return self == o - } - - public var debugDescription: String { - return "[" + value.map{String(reflecting: $0)}.joined(separator: ",") + "]" - } - - public mutating func decodeExtensionField(decoder: inout D) throws { - try decoder.decodeRepeatedEnumField(value: &value) - } - - public init?(protobufExtension: AnyMessageExtension, decoder: inout D) throws { - var v: ValueType = [] - try decoder.decodeRepeatedEnumField(value: &v) - self.init(protobufExtension: protobufExtension, value: v) - } - - public func traverse(visitor: inout V) throws { - if value.count > 0 { - try visitor.visitPackedEnumField( - value: value, - fieldNumber: protobufExtension.fieldNumber) - } - } -} - -// -// ========== Message ========== -// -public struct OptionalMessageExtensionField: - ExtensionField { - public typealias BaseType = M - public typealias ValueType = BaseType - public var value: ValueType - public var protobufExtension: AnyMessageExtension - - public static func ==(lhs: OptionalMessageExtensionField, - rhs: OptionalMessageExtensionField) -> Bool { - return lhs.value == rhs.value - } - - public init(protobufExtension: AnyMessageExtension, value: ValueType) { - self.protobufExtension = protobufExtension - self.value = value - } - - public var debugDescription: String { - get { - return String(reflecting: value) - } - } - -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - value.hash(into: &hasher) - } -#else // swift(>=4.2) - public var hashValue: Int {return value.hashValue} -#endif // swift(>=4.2) - - public func isEqual(other: AnyExtensionField) -> Bool { - let o = other as! OptionalMessageExtensionField - return self == o - } - - public mutating func decodeExtensionField(decoder: inout D) throws { - var v: ValueType? = value - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - self.value = v - } - } - - public init?(protobufExtension: AnyMessageExtension, decoder: inout D) throws { - var v: ValueType? - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - self.init(protobufExtension: protobufExtension, value: v) - } else { - return nil - } - } - - public func traverse(visitor: inout V) throws { - try visitor.visitSingularMessageField( - value: value, fieldNumber: protobufExtension.fieldNumber) - } - - public var isInitialized: Bool { - return value.isInitialized - } -} - -public struct RepeatedMessageExtensionField: - ExtensionField { - public typealias BaseType = M - public typealias ValueType = [BaseType] - public var value: ValueType - public var protobufExtension: AnyMessageExtension - - public static func ==(lhs: RepeatedMessageExtensionField, - rhs: RepeatedMessageExtensionField) -> Bool { - return lhs.value == rhs.value - } - - public init(protobufExtension: AnyMessageExtension, value: ValueType) { - self.protobufExtension = protobufExtension - self.value = value - } - -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - for e in value { - e.hash(into: &hasher) - } - } -#else // swift(>=4.2) - public var hashValue: Int { - get { - var hash = i_2166136261 - for e in value { - hash = (hash &* i_16777619) ^ e.hashValue - } - return hash - } - } -#endif // swift(>=4.2) - - public func isEqual(other: AnyExtensionField) -> Bool { - let o = other as! RepeatedMessageExtensionField - return self == o - } - - public var debugDescription: String { - return "[" + value.map{String(reflecting: $0)}.joined(separator: ",") + "]" - } - - public mutating func decodeExtensionField(decoder: inout D) throws { - try decoder.decodeRepeatedMessageField(value: &value) - } - - public init?(protobufExtension: AnyMessageExtension, decoder: inout D) throws { - var v: ValueType = [] - try decoder.decodeRepeatedMessageField(value: &v) - self.init(protobufExtension: protobufExtension, value: v) - } - - public func traverse(visitor: inout V) throws { - if value.count > 0 { - try visitor.visitRepeatedMessageField( - value: value, fieldNumber: protobufExtension.fieldNumber) - } - } - - public var isInitialized: Bool { - return Internal.areAllInitialized(value) - } -} - -// -// ======== Groups within Messages ======== -// -// Protoc internally treats groups the same as messages, but -// they serialize very differently, so we have separate serialization -// handling here... -public struct OptionalGroupExtensionField: - ExtensionField { - public typealias BaseType = G - public typealias ValueType = BaseType - public var value: G - public var protobufExtension: AnyMessageExtension - - public static func ==(lhs: OptionalGroupExtensionField, - rhs: OptionalGroupExtensionField) -> Bool { - return lhs.value == rhs.value - } - - public init(protobufExtension: AnyMessageExtension, value: ValueType) { - self.protobufExtension = protobufExtension - self.value = value - } - -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - hasher.combine(value) - } -#else // swift(>=4.2) - public var hashValue: Int {return value.hashValue} -#endif // swift(>=4.2) - - public var debugDescription: String { get {return value.debugDescription} } - - public func isEqual(other: AnyExtensionField) -> Bool { - let o = other as! OptionalGroupExtensionField - return self == o - } - - public mutating func decodeExtensionField(decoder: inout D) throws { - var v: ValueType? = value - try decoder.decodeSingularGroupField(value: &v) - if let v = v { - value = v - } - } - - public init?(protobufExtension: AnyMessageExtension, decoder: inout D) throws { - var v: ValueType? - try decoder.decodeSingularGroupField(value: &v) - if let v = v { - self.init(protobufExtension: protobufExtension, value: v) - } else { - return nil - } - } - - public func traverse(visitor: inout V) throws { - try visitor.visitSingularGroupField( - value: value, fieldNumber: protobufExtension.fieldNumber) - } - - public var isInitialized: Bool { - return value.isInitialized - } -} - -public struct RepeatedGroupExtensionField: - ExtensionField { - public typealias BaseType = G - public typealias ValueType = [BaseType] - public var value: ValueType - public var protobufExtension: AnyMessageExtension - - public static func ==(lhs: RepeatedGroupExtensionField, - rhs: RepeatedGroupExtensionField) -> Bool { - return lhs.value == rhs.value - } - - public init(protobufExtension: AnyMessageExtension, value: ValueType) { - self.protobufExtension = protobufExtension - self.value = value - } - -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - hasher.combine(value) - } -#else // swift(>=4.2) - public var hashValue: Int { - get { - var hash = i_2166136261 - for e in value { - hash = (hash &* i_16777619) ^ e.hashValue - } - return hash - } - } -#endif // swift(>=4.2) - - public var debugDescription: String { - return "[" + value.map{$0.debugDescription}.joined(separator: ",") + "]" - } - - public func isEqual(other: AnyExtensionField) -> Bool { - let o = other as! RepeatedGroupExtensionField - return self == o - } - - public mutating func decodeExtensionField(decoder: inout D) throws { - try decoder.decodeRepeatedGroupField(value: &value) - } - - public init?(protobufExtension: AnyMessageExtension, decoder: inout D) throws { - var v: ValueType = [] - try decoder.decodeRepeatedGroupField(value: &v) - self.init(protobufExtension: protobufExtension, value: v) - } - - public func traverse(visitor: inout V) throws { - if value.count > 0 { - try visitor.visitRepeatedGroupField( - value: value, fieldNumber: protobufExtension.fieldNumber) - } - } - - public var isInitialized: Bool { - return Internal.areAllInitialized(value) - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ExtensionMap.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ExtensionMap.swift deleted file mode 100644 index e83b1c91..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ExtensionMap.swift +++ /dev/null @@ -1,38 +0,0 @@ -// Sources/SwiftProtobuf/ExtensionMap.swift - Extension support -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// A set of extensions that can be passed into deserializers -/// to provide details of the particular extensions that should -/// be recognized. -/// -// ----------------------------------------------------------------------------- - -/// A collection of extension objects. -/// -/// An `ExtensionMap` is used during decoding to look up -/// extension objects corresponding to the serialized data. -/// -/// This is a protocol so that developers can build their own -/// extension handling if they need something more complex than the -/// standard `SimpleExtensionMap` implementation. -public protocol ExtensionMap { - /// Returns the extension object describing an extension or nil - subscript(messageType: Message.Type, fieldNumber: Int) -> AnyMessageExtension? { get } - - /// Returns the field number for a message with a specific field name - /// - /// The field name here matches the format used by the protobuf - /// Text serialization: it typically looks like - /// `package.message.field_name`, where `package` is the package - /// for the proto file and `message` is the name of the message in - /// which the extension was defined. (This is different from the - /// message that is being extended!) - func fieldNumberForProto(messageType: Message.Type, protoFieldName: String) -> Int? -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/FieldTag.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/FieldTag.swift deleted file mode 100644 index 0a92cbb8..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/FieldTag.swift +++ /dev/null @@ -1,69 +0,0 @@ -// Sources/SwiftProtobuf/FieldTag.swift - Describes a binary field tag -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Types related to binary encoded tags (field numbers and wire formats). -/// -// ----------------------------------------------------------------------------- - -/// Encapsulates the number and wire format of a field, which together form the -/// "tag". -/// -/// This type also validates tags in that it will never allow a tag with an -/// improper field number (such as zero) or wire format (such as 6 or 7) to -/// exist. In other words, a `FieldTag`'s properties never need to be tested -/// for validity because they are guaranteed correct at initialization time. -internal struct FieldTag: RawRepresentable { - - typealias RawValue = UInt32 - - /// The raw numeric value of the tag, which contains both the field number and - /// wire format. - let rawValue: UInt32 - - /// The field number component of the tag. - var fieldNumber: Int { - return Int(rawValue >> 3) - } - - /// The wire format component of the tag. - var wireFormat: WireFormat { - // This force-unwrap is safe because there are only two initialization - // paths: one that takes a WireFormat directly (and is guaranteed valid at - // compile-time), or one that takes a raw value but which only lets valid - // wire formats through. - return WireFormat(rawValue: UInt8(rawValue & 7))! - } - - /// A helper property that returns the number of bytes required to - /// varint-encode this tag. - var encodedSize: Int { - return Varint.encodedSize(of: rawValue) - } - - /// Creates a new tag from its raw numeric representation. - /// - /// Note that if the raw value given here is not a valid tag (for example, it - /// has an invalid wire format), this initializer will fail. - init?(rawValue: UInt32) { - // Verify that the field number and wire format are valid and fail if they - // are not. - guard rawValue & ~0x07 != 0, - let _ = WireFormat(rawValue: UInt8(rawValue % 8)) else { - return nil - } - self.rawValue = rawValue - } - - /// Creates a new tag by composing the given field number and wire format. - init(fieldNumber: Int, wireFormat: WireFormat) { - self.rawValue = UInt32(truncatingIfNeeded: fieldNumber) << 3 | - UInt32(wireFormat.rawValue) - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/FieldTypes.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/FieldTypes.swift deleted file mode 100644 index 2a40d8d3..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/FieldTypes.swift +++ /dev/null @@ -1,433 +0,0 @@ -// Sources/SwiftProtobuf/FieldTypes.swift - Proto data types -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Serialization/deserialization support for each proto field type. -/// -/// Note that we cannot just extend the standard Int32, etc, types -/// with serialization information since proto language supports -/// distinct types (with different codings) that use the same -/// in-memory representation. For example, proto "sint32" and -/// "sfixed32" both are represented in-memory as Int32. -/// -/// These types are used generically and also passed into -/// various coding/decoding functions to provide type-specific -/// information. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -// TODO: `FieldType` and `FieldType.BaseType` should require `Sendable` but we cannot do so yet without possibly breaking compatibility. - -// Note: The protobuf- and JSON-specific methods here are defined -// in ProtobufTypeAdditions.swift and JSONTypeAdditions.swift -public protocol FieldType { - // The Swift type used to store data for this field. For example, - // proto "sint32" fields use Swift "Int32" type. - associatedtype BaseType: Hashable - - // The default value for this field type before it has been set. - // This is also used, for example, when JSON decodes a "null" - // value for a field. - static var proto3DefaultValue: BaseType { get } - - // Generic reflector methods for looking up the correct - // encoding/decoding for extension fields, map keys, and map - // values. - static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws - static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws - static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws - static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws - static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws -} - -/// -/// Marker protocol for types that can be used as map keys -/// -public protocol MapKeyType: FieldType { - /// A comparison function for where order is needed. Can't use `Comparable` - /// because `Bool` doesn't conform, and since it is `public` there is no way - /// to add a conformance internal to SwiftProtobuf. - static func _lessThan(lhs: BaseType, rhs: BaseType) -> Bool -} - -// Default impl for anything `Comparable` -extension MapKeyType where BaseType: Comparable { - public static func _lessThan(lhs: BaseType, rhs: BaseType) -> Bool { - return lhs < rhs - } -} - -/// -/// Marker Protocol for types that can be used as map values. -/// -public protocol MapValueType: FieldType { -} - -// -// We have a struct for every basic proto field type which provides -// serialization/deserialization support as static methods. -// - -/// -/// Float traits -/// -public struct ProtobufFloat: FieldType, MapValueType { - public typealias BaseType = Float - public static var proto3DefaultValue: Float {return 0.0} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularFloatField(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedFloatField(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularFloatField(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedFloatField(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitPackedFloatField(value: value, fieldNumber: fieldNumber) - } -} - -/// -/// Double -/// -public struct ProtobufDouble: FieldType, MapValueType { - public typealias BaseType = Double - public static var proto3DefaultValue: Double {return 0.0} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularDoubleField(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedDoubleField(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularDoubleField(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedDoubleField(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitPackedDoubleField(value: value, fieldNumber: fieldNumber) - } -} - -/// -/// Int32 -/// -public struct ProtobufInt32: FieldType, MapKeyType, MapValueType { - public typealias BaseType = Int32 - public static var proto3DefaultValue: Int32 {return 0} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularInt32Field(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedInt32Field(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularInt32Field(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedInt32Field(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitPackedInt32Field(value: value, fieldNumber: fieldNumber) - } -} - -/// -/// Int64 -/// - -public struct ProtobufInt64: FieldType, MapKeyType, MapValueType { - public typealias BaseType = Int64 - public static var proto3DefaultValue: Int64 {return 0} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularInt64Field(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedInt64Field(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularInt64Field(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedInt64Field(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitPackedInt64Field(value: value, fieldNumber: fieldNumber) - } -} - -/// -/// UInt32 -/// -public struct ProtobufUInt32: FieldType, MapKeyType, MapValueType { - public typealias BaseType = UInt32 - public static var proto3DefaultValue: UInt32 {return 0} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularUInt32Field(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedUInt32Field(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularUInt32Field(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedUInt32Field(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitPackedUInt32Field(value: value, fieldNumber: fieldNumber) - } -} - -/// -/// UInt64 -/// - -public struct ProtobufUInt64: FieldType, MapKeyType, MapValueType { - public typealias BaseType = UInt64 - public static var proto3DefaultValue: UInt64 {return 0} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularUInt64Field(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedUInt64Field(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularUInt64Field(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedUInt64Field(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitPackedUInt64Field(value: value, fieldNumber: fieldNumber) - } -} - -/// -/// SInt32 -/// -public struct ProtobufSInt32: FieldType, MapKeyType, MapValueType { - public typealias BaseType = Int32 - public static var proto3DefaultValue: Int32 {return 0} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularSInt32Field(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedSInt32Field(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularSInt32Field(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedSInt32Field(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitPackedSInt32Field(value: value, fieldNumber: fieldNumber) - } -} - -/// -/// SInt64 -/// - -public struct ProtobufSInt64: FieldType, MapKeyType, MapValueType { - public typealias BaseType = Int64 - public static var proto3DefaultValue: Int64 {return 0} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularSInt64Field(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedSInt64Field(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularSInt64Field(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedSInt64Field(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitPackedSInt64Field(value: value, fieldNumber: fieldNumber) - } -} - -/// -/// Fixed32 -/// -public struct ProtobufFixed32: FieldType, MapKeyType, MapValueType { - public typealias BaseType = UInt32 - public static var proto3DefaultValue: UInt32 {return 0} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularFixed32Field(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedFixed32Field(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularFixed32Field(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedFixed32Field(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitPackedFixed32Field(value: value, fieldNumber: fieldNumber) - } -} - -/// -/// Fixed64 -/// -public struct ProtobufFixed64: FieldType, MapKeyType, MapValueType { - public typealias BaseType = UInt64 - public static var proto3DefaultValue: UInt64 {return 0} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularFixed64Field(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedFixed64Field(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularFixed64Field(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedFixed64Field(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitPackedFixed64Field(value: value, fieldNumber: fieldNumber) - } -} - -/// -/// SFixed32 -/// -public struct ProtobufSFixed32: FieldType, MapKeyType, MapValueType { - public typealias BaseType = Int32 - public static var proto3DefaultValue: Int32 {return 0} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularSFixed32Field(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedSFixed32Field(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularSFixed32Field(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedSFixed32Field(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitPackedSFixed32Field(value: value, fieldNumber: fieldNumber) - } -} - -/// -/// SFixed64 -/// -public struct ProtobufSFixed64: FieldType, MapKeyType, MapValueType { - public typealias BaseType = Int64 - public static var proto3DefaultValue: Int64 {return 0} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularSFixed64Field(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedSFixed64Field(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularSFixed64Field(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedSFixed64Field(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitPackedSFixed64Field(value: value, fieldNumber: fieldNumber) - } -} - -/// -/// Bool -/// -public struct ProtobufBool: FieldType, MapKeyType, MapValueType { - public typealias BaseType = Bool - public static var proto3DefaultValue: Bool {return false} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularBoolField(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedBoolField(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularBoolField(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedBoolField(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitPackedBoolField(value: value, fieldNumber: fieldNumber) - } - - /// Custom _lessThan since `Bool` isn't `Comparable`. - public static func _lessThan(lhs: BaseType, rhs: BaseType) -> Bool { - if !lhs { - return rhs - } - return false - } -} - -/// -/// String -/// -public struct ProtobufString: FieldType, MapKeyType, MapValueType { - public typealias BaseType = String - public static var proto3DefaultValue: String {return String()} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularStringField(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedStringField(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularStringField(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedStringField(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - assert(false) - } -} - -/// -/// Bytes -/// -public struct ProtobufBytes: FieldType, MapValueType { - public typealias BaseType = Data - public static var proto3DefaultValue: Data {return Data()} - public static func decodeSingular(value: inout BaseType?, from decoder: inout D) throws { - try decoder.decodeSingularBytesField(value: &value) - } - public static func decodeRepeated(value: inout [BaseType], from decoder: inout D) throws { - try decoder.decodeRepeatedBytesField(value: &value) - } - public static func visitSingular(value: BaseType, fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitSingularBytesField(value: value, fieldNumber: fieldNumber) - } - public static func visitRepeated(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - try visitor.visitRepeatedBytesField(value: value, fieldNumber: fieldNumber) - } - public static func visitPacked(value: [BaseType], fieldNumber: Int, with visitor: inout V) throws { - assert(false) - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Any+Extensions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Any+Extensions.swift deleted file mode 100644 index b680088c..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Any+Extensions.swift +++ /dev/null @@ -1,174 +0,0 @@ -// Sources/SwiftProtobuf/Google_Protobuf_Any+Extensions.swift - Well-known Any type -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Extends the `Google_Protobuf_Any` type with various custom behaviors. -/// -// ----------------------------------------------------------------------------- - -// Explicit import of Foundation is necessary on Linux, -// don't remove unless obsolete on all platforms -import Foundation - -public let defaultAnyTypeURLPrefix: String = "type.googleapis.com" - -extension Google_Protobuf_Any { - /// Initialize an Any object from the provided message. - /// - /// This corresponds to the `pack` operation in the C++ API. - /// - /// Unlike the C++ implementation, the message is not immediately - /// serialized; it is merely stored until the Any object itself - /// needs to be serialized. This design avoids unnecessary - /// decoding/recoding when writing JSON format. - /// - /// - Parameters: - /// - partial: If `false` (the default), this method will check - /// `Message.isInitialized` before encoding to verify that all required - /// fields are present. If any are missing, this method throws - /// `BinaryEncodingError.missingRequiredFields`. - /// - typePrefix: The prefix to be used when building the `type_url`. - /// Defaults to "type.googleapis.com". - /// - Throws: `BinaryEncodingError.missingRequiredFields` if `partial` is - /// false and `message` wasn't fully initialized. - public init( - message: Message, - partial: Bool = false, - typePrefix: String = defaultAnyTypeURLPrefix - ) throws { - if !partial && !message.isInitialized { - throw BinaryEncodingError.missingRequiredFields - } - self.init() - typeURL = buildTypeURL(forMessage:message, typePrefix: typePrefix) - _storage.state = .message(message) - } - - /// Creates a new `Google_Protobuf_Any` by decoding the given string - /// containing a serialized message in Protocol Buffer text format. - /// - /// - Parameters: - /// - textFormatString: The text format string to decode. - /// - extensions: An `ExtensionMap` used to look up and decode any - /// extensions in this message or messages nested within this message's - /// fields. - /// - Throws: an instance of `TextFormatDecodingError` on failure. - public init( - textFormatString: String, - extensions: ExtensionMap? = nil - ) throws { - // TODO: Remove this api and default the options instead. This api has to - // exist for anything compiled against an older version of the library. - try self.init(textFormatString: textFormatString, - options: TextFormatDecodingOptions(), - extensions: extensions) - } - - /// Creates a new `Google_Protobuf_Any` by decoding the given string - /// containing a serialized message in Protocol Buffer text format. - /// - /// - Parameters: - /// - textFormatString: The text format string to decode. - /// - options: The `TextFormatDencodingOptions` to use. - /// - extensions: An `ExtensionMap` used to look up and decode any - /// extensions in this message or messages nested within this message's - /// fields. - /// - Throws: an instance of `TextFormatDecodingError` on failure. - public init( - textFormatString: String, - options: TextFormatDecodingOptions, - extensions: ExtensionMap? = nil - ) throws { - self.init() - if !textFormatString.isEmpty { - if let data = textFormatString.data(using: String.Encoding.utf8) { - try data.withUnsafeBytes { (body: UnsafeRawBufferPointer) in - if let baseAddress = body.baseAddress, body.count > 0 { - var textDecoder = try TextFormatDecoder( - messageType: Google_Protobuf_Any.self, - utf8Pointer: baseAddress, - count: body.count, - options: options, - extensions: extensions) - try decodeTextFormat(decoder: &textDecoder) - if !textDecoder.complete { - throw TextFormatDecodingError.trailingGarbage - } - } - } - } - } - } - - /// Returns true if this `Google_Protobuf_Any` message contains the given - /// message type. - /// - /// The check is performed by looking at the passed `Message.Type` and the - /// `typeURL` of this message. - /// - /// - Parameter type: The concrete message type. - /// - Returns: True if the receiver contains the given message type. - public func isA(_ type: M.Type) -> Bool { - return _storage.isA(type) - } - -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - _storage.hash(into: &hasher) - } -#else // swift(>=4.2) - public var hashValue: Int { - return _storage.hashValue - } -#endif // swift(>=4.2) -} - -extension Google_Protobuf_Any { - internal func textTraverse(visitor: inout TextFormatEncodingVisitor) { - _storage.textTraverse(visitor: &visitor) - try! unknownFields.traverse(visitor: &visitor) - } -} - -extension Google_Protobuf_Any { - // Custom text format decoding support for Any objects. - // (Note: This is not a part of any protocol; it's invoked - // directly from TextFormatDecoder whenever it sees an attempt - // to decode an Any object) - internal mutating func decodeTextFormat( - decoder: inout TextFormatDecoder - ) throws { - // First, check if this uses the "verbose" Any encoding. - // If it does, and we have the type available, we can - // eagerly decode the contained Message object. - if let url = try decoder.scanner.nextOptionalAnyURL() { - try _uniqueStorage().decodeTextFormat(typeURL: url, decoder: &decoder) - } else { - // This is not using the specialized encoding, so we can use the - // standard path to decode the binary value. - // First, clear the fields so we don't waste time re-serializing - // the previous contents as this instances get replaced with a - // new value (can happen when a field name/number is repeated in - // the TextFormat input). - self.typeURL = "" - self.value = Data() - try decodeMessage(decoder: &decoder) - } - } -} - -extension Google_Protobuf_Any: _CustomJSONCodable { - internal func encodedJSONString(options: JSONEncodingOptions) throws -> String { - return try _storage.encodedJSONString(options: options) - } - - internal mutating func decodeJSON(from decoder: inout JSONDecoder) throws { - try _uniqueStorage().decodeJSON(from: &decoder) - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Any+Registry.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Any+Registry.swift deleted file mode 100644 index ed655659..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Any+Registry.swift +++ /dev/null @@ -1,175 +0,0 @@ -// Sources/SwiftProtobuf/Google_Protobuf_Any+Registry.swift - Registry for JSON support -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Support for registering and looking up Message types. Used -/// in support of Google_Protobuf_Any. -/// -// ----------------------------------------------------------------------------- - -import Foundation -#if canImport(Dispatch) -import Dispatch -fileprivate let knownTypesQueue = - DispatchQueue(label: "org.swift.protobuf.typeRegistry", - attributes: .concurrent) -#endif - -// TODO: Should these first four be exposed as methods to go with -// the general registry support? - -internal func buildTypeURL(forMessage message: Message, typePrefix: String) -> String { - var url = typePrefix - let needsSlash = typePrefix.isEmpty || typePrefix.last != "/" - if needsSlash { - url += "/" - } - return url + typeName(fromMessage: message) -} - -internal func typeName(fromMessage message: Message) -> String { - let messageType = type(of: message) - return messageType.protoMessageName -} - -internal func typeName(fromURL s: String) -> String { - var typeStart = s.startIndex - var i = typeStart - while i < s.endIndex { - let c = s[i] - i = s.index(after: i) - if c == "/" { - typeStart = i - } - } - - return String(s[typeStart.. { - var wrappedValue: Wrapped - init(_ wrappedValue: Wrapped) { - self.wrappedValue = wrappedValue - } -} - -#if swift(>=5.5) && canImport(_Concurrency) -extension UnsafeMutableTransferBox: @unchecked Sendable {} -#endif - -// All access to this should be done on `knownTypesQueue`. -fileprivate let knownTypes: UnsafeMutableTransferBox<[String:Message.Type]> = .init([ - // Seeded with the Well Known Types. - "google.protobuf.Any": Google_Protobuf_Any.self, - "google.protobuf.BoolValue": Google_Protobuf_BoolValue.self, - "google.protobuf.BytesValue": Google_Protobuf_BytesValue.self, - "google.protobuf.DoubleValue": Google_Protobuf_DoubleValue.self, - "google.protobuf.Duration": Google_Protobuf_Duration.self, - "google.protobuf.Empty": Google_Protobuf_Empty.self, - "google.protobuf.FieldMask": Google_Protobuf_FieldMask.self, - "google.protobuf.FloatValue": Google_Protobuf_FloatValue.self, - "google.protobuf.Int32Value": Google_Protobuf_Int32Value.self, - "google.protobuf.Int64Value": Google_Protobuf_Int64Value.self, - "google.protobuf.ListValue": Google_Protobuf_ListValue.self, - "google.protobuf.StringValue": Google_Protobuf_StringValue.self, - "google.protobuf.Struct": Google_Protobuf_Struct.self, - "google.protobuf.Timestamp": Google_Protobuf_Timestamp.self, - "google.protobuf.UInt32Value": Google_Protobuf_UInt32Value.self, - "google.protobuf.UInt64Value": Google_Protobuf_UInt64Value.self, - "google.protobuf.Value": Google_Protobuf_Value.self, -]) - -extension Google_Protobuf_Any { - - /// Register a message type so that Any objects can use - /// them for decoding contents. - /// - /// This is currently only required in two cases: - /// - /// * When decoding Protobuf Text format. Currently, - /// Any objects do not defer deserialization from Text - /// format. Depending on how the Any objects are stored - /// in text format, the Any object may need to look up - /// the message type in order to deserialize itself. - /// - /// * When re-encoding an Any object into a different - /// format than it was decoded from. For example, if - /// you decode a message containing an Any object from - /// JSON format and then re-encode the message into Protobuf - /// Binary format, the Any object will need to complete the - /// deferred deserialization of the JSON object before it - /// can re-encode. - /// - /// Note that well-known types are pre-registered for you and - /// you do not need to register them from your code. - /// - /// Also note that this is not needed if you only decode and encode - /// to and from the same format. - /// - /// Returns: true if the type was registered, false if something - /// else was already registered for the messageName. - @discardableResult public static func register(messageType: Message.Type) -> Bool { - let messageTypeName = messageType.protoMessageName - var result: Bool = false - execute(flags: .barrier) { - if let alreadyRegistered = knownTypes.wrappedValue[messageTypeName] { - // Success/failure when something was already registered is - // based on if they are registering the same class or trying - // to register a different type - result = alreadyRegistered == messageType - } else { - knownTypes.wrappedValue[messageTypeName] = messageType - result = true - } - } - - return result - } - - /// Returns the Message.Type expected for the given type URL. - public static func messageType(forTypeURL url: String) -> Message.Type? { - let messageTypeName = typeName(fromURL: url) - return messageType(forMessageName: messageTypeName) - } - - /// Returns the Message.Type expected for the given proto message name. - public static func messageType(forMessageName name: String) -> Message.Type? { - var result: Message.Type? - execute(flags: .none) { - result = knownTypes.wrappedValue[name] - } - return result - } - -} - -fileprivate enum DispatchFlags { - case barrier - case none -} - -fileprivate func execute(flags: DispatchFlags, _ closure: () -> Void) { - #if !os(WASI) - switch flags { - case .barrier: - knownTypesQueue.sync(flags: .barrier) { - closure() - } - case .none: - knownTypesQueue.sync { - closure() - } - } - #else - closure() - #endif -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Duration+Extensions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Duration+Extensions.swift deleted file mode 100644 index 0481af80..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Duration+Extensions.swift +++ /dev/null @@ -1,231 +0,0 @@ -// Sources/SwiftProtobuf/Google_Protobuf_Duration+Extensions.swift - Extensions for Duration type -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Extends the generated Duration struct with various custom behaviors: -/// * JSON coding and decoding -/// * Arithmetic operations -/// -// ----------------------------------------------------------------------------- - -import Foundation - -private let minDurationSeconds: Int64 = -maxDurationSeconds -private let maxDurationSeconds: Int64 = 315576000000 - -private func parseDuration(text: String) throws -> (Int64, Int32) { - var digits = [Character]() - var digitCount = 0 - var total = 0 - var chars = text.makeIterator() - var seconds: Int64? - var nanos: Int32 = 0 - var isNegative = false - while let c = chars.next() { - switch c { - case "-": - // Only accept '-' as very first character - if total > 0 { - throw JSONDecodingError.malformedDuration - } - digits.append(c) - isNegative = true - case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9": - digits.append(c) - digitCount += 1 - case ".": - if let _ = seconds { - throw JSONDecodingError.malformedDuration - } - let digitString = String(digits) - if let s = Int64(digitString), - s >= minDurationSeconds && s <= maxDurationSeconds { - seconds = s - } else { - throw JSONDecodingError.malformedDuration - } - digits.removeAll() - digitCount = 0 - case "s": - if let _ = seconds { - // Seconds already set, digits holds nanos - while (digitCount < 9) { - digits.append(Character("0")) - digitCount += 1 - } - while digitCount > 9 { - digits.removeLast() - digitCount -= 1 - } - let digitString = String(digits) - if let rawNanos = Int32(digitString) { - if isNegative { - nanos = -rawNanos - } else { - nanos = rawNanos - } - } else { - throw JSONDecodingError.malformedDuration - } - } else { - // No fraction, we just have an integral number of seconds - let digitString = String(digits) - if let s = Int64(digitString), - s >= minDurationSeconds && s <= maxDurationSeconds { - seconds = s - } else { - throw JSONDecodingError.malformedDuration - } - } - // Fail if there are characters after 's' - if chars.next() != nil { - throw JSONDecodingError.malformedDuration - } - return (seconds!, nanos) - default: - throw JSONDecodingError.malformedDuration - } - total += 1 - } - throw JSONDecodingError.malformedDuration -} - -private func formatDuration(seconds: Int64, nanos: Int32) -> String? { - let (seconds, nanos) = normalizeForDuration(seconds: seconds, nanos: nanos) - guard seconds >= minDurationSeconds && seconds <= maxDurationSeconds else { - return nil - } - let nanosString = nanosToString(nanos: nanos) // Includes leading '.' if needed - if seconds == 0 && nanos < 0 { - return "-0\(nanosString)s" - } - return "\(seconds)\(nanosString)s" -} - -extension Google_Protobuf_Duration { - /// Creates a new `Google_Protobuf_Duration` equal to the given number of - /// seconds and nanoseconds. - /// - /// - Parameter seconds: The number of seconds. - /// - Parameter nanos: The number of nanoseconds. - public init(seconds: Int64 = 0, nanos: Int32 = 0) { - self.init() - self.seconds = seconds - self.nanos = nanos - } -} - -extension Google_Protobuf_Duration: _CustomJSONCodable { - mutating func decodeJSON(from decoder: inout JSONDecoder) throws { - let s = try decoder.scanner.nextQuotedString() - (seconds, nanos) = try parseDuration(text: s) - } - func encodedJSONString(options: JSONEncodingOptions) throws -> String { - if let formatted = formatDuration(seconds: seconds, nanos: nanos) { - return "\"\(formatted)\"" - } else { - throw JSONEncodingError.durationRange - } - } -} - -extension Google_Protobuf_Duration: ExpressibleByFloatLiteral { - public typealias FloatLiteralType = Double - - /// Creates a new `Google_Protobuf_Duration` from a floating point literal - /// that is interpreted as a duration in seconds, rounded to the nearest - /// nanosecond. - public init(floatLiteral value: Double) { - let sd = trunc(value) - let nd = round((value - sd) * TimeInterval(nanosPerSecond)) - let (s, n) = normalizeForDuration(seconds: Int64(sd), nanos: Int32(nd)) - self.init(seconds: s, nanos: n) - } -} - -extension Google_Protobuf_Duration { - /// Creates a new `Google_Protobuf_Duration` that is equal to the given - /// `TimeInterval` (measured in seconds), rounded to the nearest nanosecond. - /// - /// - Parameter timeInterval: The `TimeInterval`. - public init(timeInterval: TimeInterval) { - let sd = trunc(timeInterval) - let nd = round((timeInterval - sd) * TimeInterval(nanosPerSecond)) - let (s, n) = normalizeForDuration(seconds: Int64(sd), nanos: Int32(nd)) - self.init(seconds: s, nanos: n) - } - - /// The `TimeInterval` (measured in seconds) equal to this duration. - public var timeInterval: TimeInterval { - return TimeInterval(self.seconds) + - TimeInterval(self.nanos) / TimeInterval(nanosPerSecond) - } -} - -private func normalizeForDuration( - seconds: Int64, - nanos: Int32 -) -> (seconds: Int64, nanos: Int32) { - var s = seconds - var n = nanos - - // If the magnitude of n exceeds a second then - // we need to factor it into s instead. - if n >= nanosPerSecond || n <= -nanosPerSecond { - s += Int64(n / nanosPerSecond) - n = n % nanosPerSecond - } - - // The Duration spec says that when s != 0, s and - // n must have the same sign. - if s > 0 && n < 0 { - n += nanosPerSecond - s -= 1 - } else if s < 0 && n > 0 { - n -= nanosPerSecond - s += 1 - } - - return (seconds: s, nanos: n) -} - -public prefix func - ( - operand: Google_Protobuf_Duration -) -> Google_Protobuf_Duration { - let (s, n) = normalizeForDuration(seconds: -operand.seconds, - nanos: -operand.nanos) - return Google_Protobuf_Duration(seconds: s, nanos: n) -} - -public func + ( - lhs: Google_Protobuf_Duration, - rhs: Google_Protobuf_Duration -) -> Google_Protobuf_Duration { - let (s, n) = normalizeForDuration(seconds: lhs.seconds + rhs.seconds, - nanos: lhs.nanos + rhs.nanos) - return Google_Protobuf_Duration(seconds: s, nanos: n) -} - -public func - ( - lhs: Google_Protobuf_Duration, - rhs: Google_Protobuf_Duration -) -> Google_Protobuf_Duration { - let (s, n) = normalizeForDuration(seconds: lhs.seconds - rhs.seconds, - nanos: lhs.nanos - rhs.nanos) - return Google_Protobuf_Duration(seconds: s, nanos: n) -} - -public func - ( - lhs: Google_Protobuf_Timestamp, - rhs: Google_Protobuf_Timestamp -) -> Google_Protobuf_Duration { - let (s, n) = normalizeForDuration(seconds: lhs.seconds - rhs.seconds, - nanos: lhs.nanos - rhs.nanos) - return Google_Protobuf_Duration(seconds: s, nanos: n) -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_FieldMask+Extensions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_FieldMask+Extensions.swift deleted file mode 100644 index 985f2154..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_FieldMask+Extensions.swift +++ /dev/null @@ -1,190 +0,0 @@ -// Sources/SwiftProtobuf/Google_Protobuf_FieldMask+Extensions.swift - Fieldmask extensions -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Extend the generated FieldMask message with customized JSON coding and -/// convenience methods. -/// -// ----------------------------------------------------------------------------- - -// TODO: We should have utilities to apply a fieldmask to an arbitrary -// message, intersect two fieldmasks, etc. -// Google's C++ implementation does this by having utilities -// to build a tree of field paths that can be easily intersected, -// unioned, traversed to apply to submessages, etc. - -// True if the string only contains printable (non-control) -// ASCII characters. Note: This follows the ASCII standard; -// space is not a "printable" character. -private func isPrintableASCII(_ s: String) -> Bool { - for u in s.utf8 { - if u <= 0x20 || u >= 0x7f { - return false - } - } - return true -} - -private func ProtoToJSON(name: String) -> String? { - guard isPrintableASCII(name) else { return nil } - var jsonPath = String() - var chars = name.makeIterator() - while let c = chars.next() { - switch c { - case "_": - if let toupper = chars.next() { - switch toupper { - case "a"..."z": - jsonPath.append(String(toupper).uppercased()) - default: - return nil - } - } else { - return nil - } - case "A"..."Z": - return nil - case "a"..."z","0"..."9",".","(",")": - jsonPath.append(c) - default: - // TODO: Change this to `return nil` - // once we know everything legal is handled - // above. - jsonPath.append(c) - } - } - return jsonPath -} - -private func JSONToProto(name: String) -> String? { - guard isPrintableASCII(name) else { return nil } - var path = String() - for c in name { - switch c { - case "_": - return nil - case "A"..."Z": - path.append(Character("_")) - path.append(String(c).lowercased()) - case "a"..."z","0"..."9",".","(",")": - path.append(c) - default: - // TODO: Change to `return nil` once - // we know everything legal is being - // handled above - path.append(c) - } - } - return path -} - -private func parseJSONFieldNames(names: String) -> [String]? { - // An empty field mask is the empty string (no paths). - guard !names.isEmpty else { return [] } - var fieldNameCount = 0 - var fieldName = String() - var split = [String]() - for c in names { - switch c { - case ",": - if fieldNameCount == 0 { - return nil - } - if let pbName = JSONToProto(name: fieldName) { - split.append(pbName) - } else { - return nil - } - fieldName = String() - fieldNameCount = 0 - default: - fieldName.append(c) - fieldNameCount += 1 - } - } - if fieldNameCount == 0 { // Last field name can't be empty - return nil - } - if let pbName = JSONToProto(name: fieldName) { - split.append(pbName) - } else { - return nil - } - return split -} - -extension Google_Protobuf_FieldMask { - /// Creates a new `Google_Protobuf_FieldMask` from the given array of paths. - /// - /// The paths should match the names used in the .proto file, which may be - /// different than the corresponding Swift property names. - /// - /// - Parameter protoPaths: The paths from which to create the field mask, - /// defined using the .proto names for the fields. - public init(protoPaths: [String]) { - self.init() - paths = protoPaths - } - - /// Creates a new `Google_Protobuf_FieldMask` from the given paths. - /// - /// The paths should match the names used in the .proto file, which may be - /// different than the corresponding Swift property names. - /// - /// - Parameter protoPaths: The paths from which to create the field mask, - /// defined using the .proto names for the fields. - public init(protoPaths: String...) { - self.init(protoPaths: protoPaths) - } - - /// Creates a new `Google_Protobuf_FieldMask` from the given paths. - /// - /// The paths should match the JSON names of the fields, which may be - /// different than the corresponding Swift property names. - /// - /// - Parameter jsonPaths: The paths from which to create the field mask, - /// defined using the JSON names for the fields. - public init?(jsonPaths: String...) { - // TODO: This should fail if any of the conversions from JSON fails - #if swift(>=4.1) - self.init(protoPaths: jsonPaths.compactMap(JSONToProto)) - #else - self.init(protoPaths: jsonPaths.flatMap(JSONToProto)) - #endif - } - - // It would be nice if to have an initializer that accepted Swift property - // names, but translating between swift and protobuf/json property - // names is not entirely deterministic. -} - -extension Google_Protobuf_FieldMask: _CustomJSONCodable { - mutating func decodeJSON(from decoder: inout JSONDecoder) throws { - let s = try decoder.scanner.nextQuotedString() - if let names = parseJSONFieldNames(names: s) { - paths = names - } else { - throw JSONDecodingError.malformedFieldMask - } - } - - func encodedJSONString(options: JSONEncodingOptions) throws -> String { - // Note: Proto requires alphanumeric field names, so there - // cannot be a ',' or '"' character to mess up this formatting. - var jsonPaths = [String]() - for p in paths { - if let jsonPath = ProtoToJSON(name: p) { - jsonPaths.append(jsonPath) - } else { - throw JSONEncodingError.fieldMaskConversion - } - } - return "\"" + jsonPaths.joined(separator: ",") + "\"" - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_ListValue+Extensions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_ListValue+Extensions.swift deleted file mode 100644 index a26e0d73..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_ListValue+Extensions.swift +++ /dev/null @@ -1,85 +0,0 @@ -// Sources/SwiftProtobuf/Google_Protobuf_ListValue+Extensions.swift - ListValue extensions -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// ListValue is a well-known message type that can be used to parse or encode -/// arbitrary JSON arrays without a predefined schema. -/// -// ----------------------------------------------------------------------------- - -extension Google_Protobuf_ListValue: ExpressibleByArrayLiteral { - // TODO: Give this a direct array interface by proxying the interesting - // bits down to values - public typealias Element = Google_Protobuf_Value - - /// Creates a new `Google_Protobuf_ListValue` from an array literal containing - /// `Google_Protobuf_Value` elements. - public init(arrayLiteral elements: Element...) { - self.init(values: elements) - } -} - -extension Google_Protobuf_ListValue: _CustomJSONCodable { - internal func encodedJSONString(options: JSONEncodingOptions) throws -> String { - var jsonEncoder = JSONEncoder() - jsonEncoder.append(text: "[") - var separator: StaticString = "" - for v in values { - jsonEncoder.append(staticText: separator) - try v.serializeJSONValue(to: &jsonEncoder, options: options) - separator = "," - } - jsonEncoder.append(text: "]") - return jsonEncoder.stringResult - } - - internal mutating func decodeJSON(from decoder: inout JSONDecoder) throws { - if decoder.scanner.skipOptionalNull() { - return - } - try decoder.scanner.skipRequiredArrayStart() - // Since we override the JSON decoding, we can't rely - // on the default recursion depth tracking. - try decoder.scanner.incrementRecursionDepth() - if decoder.scanner.skipOptionalArrayEnd() { - decoder.scanner.decrementRecursionDepth() - return - } - while true { - var v = Google_Protobuf_Value() - try v.decodeJSON(from: &decoder) - values.append(v) - if decoder.scanner.skipOptionalArrayEnd() { - decoder.scanner.decrementRecursionDepth() - return - } - try decoder.scanner.skipRequiredComma() - } - } -} - -extension Google_Protobuf_ListValue { - /// Creates a new `Google_Protobuf_ListValue` from the given array of - /// `Google_Protobuf_Value` elements. - /// - /// - Parameter values: The list of `Google_Protobuf_Value` messages from - /// which to create the `Google_Protobuf_ListValue`. - public init(values: [Google_Protobuf_Value]) { - self.init() - self.values = values - } - - /// Accesses the `Google_Protobuf_Value` at the specified position. - /// - /// - Parameter index: The position of the element to access. - public subscript(index: Int) -> Google_Protobuf_Value { - get {return values[index]} - set(newValue) {values[index] = newValue} - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_NullValue+Extensions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_NullValue+Extensions.swift deleted file mode 100644 index 3e88bfd3..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_NullValue+Extensions.swift +++ /dev/null @@ -1,28 +0,0 @@ -// Sources/SwiftProtobuf/Google_Protobuf_NullValue+Extensions.swift - NullValue extensions -// -// Copyright (c) 2014 - 2020 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// NullValue is a well-known message type that can be used to parse or encode -/// JSON Null values. -/// -// ----------------------------------------------------------------------------- - -extension Google_Protobuf_NullValue: _CustomJSONCodable { - internal func encodedJSONString(options: JSONEncodingOptions) throws -> String { - return "null" - } - internal mutating func decodeJSON(from decoder: inout JSONDecoder) throws { - if decoder.scanner.skipOptionalNull() { - return - } - } - static func decodedFromJSONNull() -> Google_Protobuf_NullValue? { - return .nullValue - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Struct+Extensions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Struct+Extensions.swift deleted file mode 100644 index 681f8214..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Struct+Extensions.swift +++ /dev/null @@ -1,85 +0,0 @@ -// Sources/SwiftProtobuf/Google_Protobuf_Struct+Extensions.swift - Struct extensions -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Struct is a well-known message type that can be used to parse or encode -/// arbitrary JSON objects without a predefined schema. -/// -// ----------------------------------------------------------------------------- - -extension Google_Protobuf_Struct: ExpressibleByDictionaryLiteral { - public typealias Key = String - public typealias Value = Google_Protobuf_Value - - /// Creates a new `Google_Protobuf_Struct` from a dictionary of string keys to - /// values of type `Google_Protobuf_Value`. - public init(dictionaryLiteral: (String, Google_Protobuf_Value)...) { - self.init() - for (k,v) in dictionaryLiteral { - fields[k] = v - } - } -} - -extension Google_Protobuf_Struct: _CustomJSONCodable { - internal func encodedJSONString(options: JSONEncodingOptions) throws -> String { - var jsonEncoder = JSONEncoder() - jsonEncoder.startObject() - var mapVisitor = JSONMapEncodingVisitor(encoder: jsonEncoder, options: options) - for (k,v) in fields { - try mapVisitor.visitSingularStringField(value: k, fieldNumber: 1) - try mapVisitor.visitSingularMessageField(value: v, fieldNumber: 2) - } - mapVisitor.encoder.endObject() - return mapVisitor.encoder.stringResult - } - - internal mutating func decodeJSON(from decoder: inout JSONDecoder) throws { - try decoder.scanner.skipRequiredObjectStart() - if decoder.scanner.skipOptionalObjectEnd() { - return - } - while true { - let key = try decoder.scanner.nextQuotedString() - try decoder.scanner.skipRequiredColon() - var value = Google_Protobuf_Value() - try value.decodeJSON(from: &decoder) - fields[key] = value - if decoder.scanner.skipOptionalObjectEnd() { - return - } - try decoder.scanner.skipRequiredComma() - } - } -} - -extension Google_Protobuf_Struct { - /// Creates a new `Google_Protobuf_Struct` from a dictionary of string keys to - /// values of type `Google_Protobuf_Value`. - /// - /// - Parameter fields: The dictionary from field names to - /// `Google_Protobuf_Value` messages that should be used to create the - /// `Struct`. - public init(fields: [String: Google_Protobuf_Value]) { - self.init() - self.fields = fields - } - - /// Accesses the `Google_Protobuf_Value` with the given key for reading and - /// writing. - /// - /// This key-based subscript returns the `Value` for the given key if the key - /// is found in the `Struct`, or nil if the key is not found. If you assign - /// nil as the `Value` for the given key, the `Struct` removes that key and - /// its associated `Value`. - public subscript(key: String) -> Google_Protobuf_Value? { - get {return fields[key]} - set(newValue) {fields[key] = newValue} - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Timestamp+Extensions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Timestamp+Extensions.swift deleted file mode 100644 index ab0a68b8..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Timestamp+Extensions.swift +++ /dev/null @@ -1,331 +0,0 @@ -// Sources/SwiftProtobuf/Google_Protobuf_Timestamp+Extensions.swift - Timestamp extensions -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Extend the generated Timestamp message with customized JSON coding, -/// arithmetic operations, and convenience methods. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -private let minTimestampSeconds: Int64 = -62135596800 // 0001-01-01T00:00:00Z -private let maxTimestampSeconds: Int64 = 253402300799 // 9999-12-31T23:59:59Z - -// TODO: Add convenience methods to interoperate with standard -// date/time classes: an initializer that accepts Unix timestamp as -// Int or Double, an easy way to convert to/from Foundation's -// NSDateTime (on Apple platforms only?), others? - - -// Parse an RFC3339 timestamp into a pair of seconds-since-1970 and nanos. -private func parseTimestamp(s: String) throws -> (Int64, Int32) { - // Convert to an array of integer character values - let value = s.utf8.map{Int($0)} - if value.count < 20 { - throw JSONDecodingError.malformedTimestamp - } - // Since the format is fixed-layout, we can just decode - // directly as follows. - let zero = Int(48) - let nine = Int(57) - let dash = Int(45) - let colon = Int(58) - let plus = Int(43) - let letterT = Int(84) - let letterZ = Int(90) - let period = Int(46) - - func fromAscii2(_ digit0: Int, _ digit1: Int) throws -> Int { - if digit0 < zero || digit0 > nine || digit1 < zero || digit1 > nine { - throw JSONDecodingError.malformedTimestamp - } - return digit0 * 10 + digit1 - 528 - } - - func fromAscii4( - _ digit0: Int, - _ digit1: Int, - _ digit2: Int, - _ digit3: Int - ) throws -> Int { - if (digit0 < zero || digit0 > nine - || digit1 < zero || digit1 > nine - || digit2 < zero || digit2 > nine - || digit3 < zero || digit3 > nine) { - throw JSONDecodingError.malformedTimestamp - } - return digit0 * 1000 + digit1 * 100 + digit2 * 10 + digit3 - 53328 - } - - // Year: 4 digits followed by '-' - let year = try fromAscii4(value[0], value[1], value[2], value[3]) - if value[4] != dash || year < Int(1) || year > Int(9999) { - throw JSONDecodingError.malformedTimestamp - } - - // Month: 2 digits followed by '-' - let month = try fromAscii2(value[5], value[6]) - if value[7] != dash || month < Int(1) || month > Int(12) { - throw JSONDecodingError.malformedTimestamp - } - - // Day: 2 digits followed by 'T' - let mday = try fromAscii2(value[8], value[9]) - if value[10] != letterT || mday < Int(1) || mday > Int(31) { - throw JSONDecodingError.malformedTimestamp - } - - // Hour: 2 digits followed by ':' - let hour = try fromAscii2(value[11], value[12]) - if value[13] != colon || hour > Int(23) { - throw JSONDecodingError.malformedTimestamp - } - - // Minute: 2 digits followed by ':' - let minute = try fromAscii2(value[14], value[15]) - if value[16] != colon || minute > Int(59) { - throw JSONDecodingError.malformedTimestamp - } - - // Second: 2 digits (following char is checked below) - let second = try fromAscii2(value[17], value[18]) - if second > Int(61) { - throw JSONDecodingError.malformedTimestamp - } - - // timegm() is almost entirely useless. It's nonexistent on - // some platforms, broken on others. Everything else I've tried - // is even worse. Hence the code below. - // (If you have a better way to do this, try it and see if it - // passes the test suite on both Linux and OS X.) - - // Day of year - let mdayStart: [Int] = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334] - var yday = Int64(mdayStart[month - 1]) - let isleap = (year % 400 == 0) || ((year % 100 != 0) && (year % 4 == 0)) - if isleap && (month > 2) { - yday += 1 - } - yday += Int64(mday - 1) - - // Days since start of epoch (including leap days) - var daysSinceEpoch = yday - daysSinceEpoch += Int64(365 * year) - Int64(719527) - daysSinceEpoch += Int64((year - 1) / 4) - daysSinceEpoch -= Int64((year - 1) / 100) - daysSinceEpoch += Int64((year - 1) / 400) - - // Second within day - var daySec = Int64(hour) - daySec *= 60 - daySec += Int64(minute) - daySec *= 60 - daySec += Int64(second) - - // Seconds since start of epoch - let t = daysSinceEpoch * Int64(86400) + daySec - - // After seconds, comes various optional bits - var pos = 19 - - var nanos: Int32 = 0 - if value[pos] == period { // "." begins fractional seconds - pos += 1 - var digitValue = 100000000 - while pos < value.count && value[pos] >= zero && value[pos] <= nine { - nanos += Int32(digitValue * (value[pos] - zero)) - digitValue /= 10 - pos += 1 - } - } - - var seconds: Int64 = 0 - // "Z" or "+" or "-" starts Timezone offset - if pos >= value.count { - throw JSONDecodingError.malformedTimestamp - } else if value[pos] == plus || value[pos] == dash { - if pos + 6 > value.count { - throw JSONDecodingError.malformedTimestamp - } - let hourOffset = try fromAscii2(value[pos + 1], value[pos + 2]) - let minuteOffset = try fromAscii2(value[pos + 4], value[pos + 5]) - if hourOffset > Int(13) || minuteOffset > Int(59) || value[pos + 3] != colon { - throw JSONDecodingError.malformedTimestamp - } - var adjusted: Int64 = t - if value[pos] == plus { - adjusted -= Int64(hourOffset) * Int64(3600) - adjusted -= Int64(minuteOffset) * Int64(60) - } else { - adjusted += Int64(hourOffset) * Int64(3600) - adjusted += Int64(minuteOffset) * Int64(60) - } - if adjusted < minTimestampSeconds || adjusted > maxTimestampSeconds { - throw JSONDecodingError.malformedTimestamp - } - seconds = adjusted - pos += 6 - } else if value[pos] == letterZ { // "Z" indicator for UTC - seconds = t - pos += 1 - } else { - throw JSONDecodingError.malformedTimestamp - } - if pos != value.count { - throw JSONDecodingError.malformedTimestamp - } - return (seconds, nanos) -} - -private func formatTimestamp(seconds: Int64, nanos: Int32) -> String? { - let (seconds, nanos) = normalizeForTimestamp(seconds: seconds, nanos: nanos) - guard seconds >= minTimestampSeconds && seconds <= maxTimestampSeconds else { - return nil - } - - let (hh, mm, ss) = timeOfDayFromSecondsSince1970(seconds: seconds) - let (YY, MM, DD) = gregorianDateFromSecondsSince1970(seconds: seconds) - - let dateString = "\(fourDigit(YY))-\(twoDigit(MM))-\(twoDigit(DD))" - let timeString = "\(twoDigit(hh)):\(twoDigit(mm)):\(twoDigit(ss))" - let nanosString = nanosToString(nanos: nanos) // Includes leading '.' if needed - - return "\(dateString)T\(timeString)\(nanosString)Z" -} - -extension Google_Protobuf_Timestamp { - /// Creates a new `Google_Protobuf_Timestamp` equal to the given number of - /// seconds and nanoseconds. - /// - /// - Parameter seconds: The number of seconds. - /// - Parameter nanos: The number of nanoseconds. - public init(seconds: Int64 = 0, nanos: Int32 = 0) { - self.init() - self.seconds = seconds - self.nanos = nanos - } -} - -extension Google_Protobuf_Timestamp: _CustomJSONCodable { - mutating func decodeJSON(from decoder: inout JSONDecoder) throws { - let s = try decoder.scanner.nextQuotedString() - (seconds, nanos) = try parseTimestamp(s: s) - } - - func encodedJSONString(options: JSONEncodingOptions) throws -> String { - if let formatted = formatTimestamp(seconds: seconds, nanos: nanos) { - return "\"\(formatted)\"" - } else { - throw JSONEncodingError.timestampRange - } - } -} - -extension Google_Protobuf_Timestamp { - /// Creates a new `Google_Protobuf_Timestamp` initialized relative to 00:00:00 - /// UTC on 1 January 1970 by a given number of seconds. - /// - /// - Parameter timeIntervalSince1970: The `TimeInterval`, interpreted as - /// seconds relative to 00:00:00 UTC on 1 January 1970. - public init(timeIntervalSince1970: TimeInterval) { - let sd = floor(timeIntervalSince1970) - let nd = round((timeIntervalSince1970 - sd) * TimeInterval(nanosPerSecond)) - let (s, n) = normalizeForTimestamp(seconds: Int64(sd), nanos: Int32(nd)) - self.init(seconds: s, nanos: n) - } - - /// Creates a new `Google_Protobuf_Timestamp` initialized relative to 00:00:00 - /// UTC on 1 January 2001 by a given number of seconds. - /// - /// - Parameter timeIntervalSinceReferenceDate: The `TimeInterval`, - /// interpreted as seconds relative to 00:00:00 UTC on 1 January 2001. - public init(timeIntervalSinceReferenceDate: TimeInterval) { - let sd = floor(timeIntervalSinceReferenceDate) - let nd = round( - (timeIntervalSinceReferenceDate - sd) * TimeInterval(nanosPerSecond)) - // The addition of timeIntervalBetween1970And... is deliberately delayed - // until the input is separated into an integer part and a fraction - // part, so that we don't unnecessarily lose precision. - let (s, n) = normalizeForTimestamp( - seconds: Int64(sd) + Int64(Date.timeIntervalBetween1970AndReferenceDate), - nanos: Int32(nd)) - self.init(seconds: s, nanos: n) - } - - /// Creates a new `Google_Protobuf_Timestamp` initialized to the same time as - /// the given `Date`. - /// - /// - Parameter date: The `Date` with which to initialize the timestamp. - public init(date: Date) { - // Note: Internally, Date uses the "reference date," not the 1970 date. - // We use it when interacting with Dates so that Date doesn't perform - // any double arithmetic on our behalf, which might cost us precision. - self.init( - timeIntervalSinceReferenceDate: date.timeIntervalSinceReferenceDate) - } - - /// The interval between the timestamp and 00:00:00 UTC on 1 January 1970. - public var timeIntervalSince1970: TimeInterval { - return TimeInterval(self.seconds) + - TimeInterval(self.nanos) / TimeInterval(nanosPerSecond) - } - - /// The interval between the timestamp and 00:00:00 UTC on 1 January 2001. - public var timeIntervalSinceReferenceDate: TimeInterval { - return TimeInterval( - self.seconds - Int64(Date.timeIntervalBetween1970AndReferenceDate)) + - TimeInterval(self.nanos) / TimeInterval(nanosPerSecond) - } - - /// A `Date` initialized to the same time as the timestamp. - public var date: Date { - return Date( - timeIntervalSinceReferenceDate: self.timeIntervalSinceReferenceDate) - } -} - -private func normalizeForTimestamp( - seconds: Int64, - nanos: Int32 -) -> (seconds: Int64, nanos: Int32) { - // The Timestamp spec says that nanos must be in the range [0, 999999999), - // as in actual modular arithmetic. - - let s = seconds + Int64(div(nanos, nanosPerSecond)) - let n = mod(nanos, nanosPerSecond) - return (seconds: s, nanos: n) -} - -public func + ( - lhs: Google_Protobuf_Timestamp, - rhs: Google_Protobuf_Duration -) -> Google_Protobuf_Timestamp { - let (s, n) = normalizeForTimestamp(seconds: lhs.seconds + rhs.seconds, - nanos: lhs.nanos + rhs.nanos) - return Google_Protobuf_Timestamp(seconds: s, nanos: n) -} - -public func + ( - lhs: Google_Protobuf_Duration, - rhs: Google_Protobuf_Timestamp -) -> Google_Protobuf_Timestamp { - let (s, n) = normalizeForTimestamp(seconds: lhs.seconds + rhs.seconds, - nanos: lhs.nanos + rhs.nanos) - return Google_Protobuf_Timestamp(seconds: s, nanos: n) -} - -public func - ( - lhs: Google_Protobuf_Timestamp, - rhs: Google_Protobuf_Duration -) -> Google_Protobuf_Timestamp { - let (s, n) = normalizeForTimestamp(seconds: lhs.seconds - rhs.seconds, - nanos: lhs.nanos - rhs.nanos) - return Google_Protobuf_Timestamp(seconds: s, nanos: n) -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Value+Extensions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Value+Extensions.swift deleted file mode 100644 index 7aa3accd..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Value+Extensions.swift +++ /dev/null @@ -1,167 +0,0 @@ -// Sources/SwiftProtobuf/Google_Protobuf_Value+Extensions.swift - Value extensions -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Value is a well-known message type that can be used to parse or encode -/// arbitrary JSON without a predefined schema. -/// -// ----------------------------------------------------------------------------- - -extension Google_Protobuf_Value: ExpressibleByIntegerLiteral { - public typealias IntegerLiteralType = Int64 - - /// Creates a new `Google_Protobuf_Value` from an integer literal. - public init(integerLiteral value: Int64) { - self.init(kind: .numberValue(Double(value))) - } -} - -extension Google_Protobuf_Value: ExpressibleByFloatLiteral { - public typealias FloatLiteralType = Double - - /// Creates a new `Google_Protobuf_Value` from a floating point literal. - public init(floatLiteral value: Double) { - self.init(kind: .numberValue(value)) - } -} - -extension Google_Protobuf_Value: ExpressibleByBooleanLiteral { - public typealias BooleanLiteralType = Bool - - /// Creates a new `Google_Protobuf_Value` from a boolean literal. - public init(booleanLiteral value: Bool) { - self.init(kind: .boolValue(value)) - } -} - -extension Google_Protobuf_Value: ExpressibleByStringLiteral { - public typealias StringLiteralType = String - public typealias ExtendedGraphemeClusterLiteralType = String - public typealias UnicodeScalarLiteralType = String - - /// Creates a new `Google_Protobuf_Value` from a string literal. - public init(stringLiteral value: String) { - self.init(kind: .stringValue(value)) - } - - /// Creates a new `Google_Protobuf_Value` from a Unicode scalar literal. - public init(unicodeScalarLiteral value: String) { - self.init(kind: .stringValue(value)) - } - - /// Creates a new `Google_Protobuf_Value` from a character literal. - public init(extendedGraphemeClusterLiteral value: String) { - self.init(kind: .stringValue(value)) - } -} - -extension Google_Protobuf_Value: ExpressibleByNilLiteral { - /// Creates a new `Google_Protobuf_Value` from the nil literal. - public init(nilLiteral: ()) { - self.init(kind: .nullValue(.nullValue)) - } -} - -extension Google_Protobuf_Value: _CustomJSONCodable { - internal func encodedJSONString(options: JSONEncodingOptions) throws -> String { - var jsonEncoder = JSONEncoder() - try serializeJSONValue(to: &jsonEncoder, options: options) - return jsonEncoder.stringResult - } - - internal mutating func decodeJSON(from decoder: inout JSONDecoder) throws { - let c = try decoder.scanner.peekOneCharacter() - switch c { - case "n": - if !decoder.scanner.skipOptionalNull() { - throw JSONDecodingError.failure - } - kind = .nullValue(.nullValue) - case "[": - var l = Google_Protobuf_ListValue() - try l.decodeJSON(from: &decoder) - kind = .listValue(l) - case "{": - var s = Google_Protobuf_Struct() - try s.decodeJSON(from: &decoder) - kind = .structValue(s) - case "t", "f": - let b = try decoder.scanner.nextBool() - kind = .boolValue(b) - case "\"": - let s = try decoder.scanner.nextQuotedString() - kind = .stringValue(s) - default: - let d = try decoder.scanner.nextDouble() - kind = .numberValue(d) - } - } - - internal static func decodedFromJSONNull() -> Google_Protobuf_Value? { - return Google_Protobuf_Value(kind: .nullValue(.nullValue)) - } -} - -extension Google_Protobuf_Value { - /// Creates a new `Google_Protobuf_Value` with the given kind. - fileprivate init(kind: OneOf_Kind) { - self.init() - self.kind = kind - } - - /// Creates a new `Google_Protobuf_Value` whose `kind` is `numberValue` with - /// the given floating-point value. - public init(numberValue: Double) { - self.init(kind: .numberValue(numberValue)) - } - - /// Creates a new `Google_Protobuf_Value` whose `kind` is `stringValue` with - /// the given string value. - public init(stringValue: String) { - self.init(kind: .stringValue(stringValue)) - } - - /// Creates a new `Google_Protobuf_Value` whose `kind` is `boolValue` with the - /// given boolean value. - public init(boolValue: Bool) { - self.init(kind: .boolValue(boolValue)) - } - - /// Creates a new `Google_Protobuf_Value` whose `kind` is `structValue` with - /// the given `Google_Protobuf_Struct` value. - public init(structValue: Google_Protobuf_Struct) { - self.init(kind: .structValue(structValue)) - } - - /// Creates a new `Google_Protobuf_Value` whose `kind` is `listValue` with the - /// given `Google_Struct_ListValue` value. - public init(listValue: Google_Protobuf_ListValue) { - self.init(kind: .listValue(listValue)) - } - - /// Writes out the JSON representation of the value to the given encoder. - internal func serializeJSONValue( - to encoder: inout JSONEncoder, - options: JSONEncodingOptions - ) throws { - switch kind { - case .nullValue?: encoder.putNullValue() - case .numberValue(let v)?: - guard v.isFinite else { - throw JSONEncodingError.valueNumberNotFinite - } - encoder.putDoubleValue(value: v) - case .stringValue(let v)?: encoder.putStringValue(value: v) - case .boolValue(let v)?: encoder.putBoolValue(value: v) - case .structValue(let v)?: encoder.append(text: try v.jsonString(options: options)) - case .listValue(let v)?: encoder.append(text: try v.jsonString(options: options)) - case nil: throw JSONEncodingError.missingValue - } - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Wrappers+Extensions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Wrappers+Extensions.swift deleted file mode 100644 index 625262db..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Google_Protobuf_Wrappers+Extensions.swift +++ /dev/null @@ -1,247 +0,0 @@ -// Sources/SwiftProtobuf/Google_Protobuf_Wrappers+Extensions.swift - Well-known wrapper type extensions -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Extensions to the well-known types in wrapper.proto that customize the JSON -/// format of those messages and provide convenience initializers from literals. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// Internal protocol that minimizes the code duplication across the multiple -/// wrapper types extended below. -protocol ProtobufWrapper { - - /// The wrapped protobuf type (for example, `ProtobufDouble`). - associatedtype WrappedType: FieldType - - /// Exposes the generated property to the extensions here. - var value: WrappedType.BaseType { get set } - - /// Exposes the parameterless initializer to the extensions here. - init() - - /// Creates a new instance of the wrapper with the given value. - init(_ value: WrappedType.BaseType) -} - -extension ProtobufWrapper { - mutating func decodeJSON(from decoder: inout JSONDecoder) throws { - var v: WrappedType.BaseType? - try WrappedType.decodeSingular(value: &v, from: &decoder) - value = v ?? WrappedType.proto3DefaultValue - } -} - -extension Google_Protobuf_DoubleValue: - ProtobufWrapper, ExpressibleByFloatLiteral, _CustomJSONCodable { - - public typealias WrappedType = ProtobufDouble - public typealias FloatLiteralType = WrappedType.BaseType - - public init(_ value: WrappedType.BaseType) { - self.init() - self.value = value - } - - public init(floatLiteral: FloatLiteralType) { - self.init(floatLiteral) - } - - func encodedJSONString(options: JSONEncodingOptions) throws -> String { - if value.isFinite { - // Swift 4.2 and later guarantees that this is accurate - // enough to parse back to the exact value on the other end. - return value.description - } else { - // Protobuf-specific handling of NaN and infinities - var encoder = JSONEncoder() - encoder.putDoubleValue(value: value) - return encoder.stringResult - } - } -} - -extension Google_Protobuf_FloatValue: - ProtobufWrapper, ExpressibleByFloatLiteral, _CustomJSONCodable { - - public typealias WrappedType = ProtobufFloat - public typealias FloatLiteralType = Float - - public init(_ value: WrappedType.BaseType) { - self.init() - self.value = value - } - - public init(floatLiteral: FloatLiteralType) { - self.init(floatLiteral) - } - - func encodedJSONString(options: JSONEncodingOptions) throws -> String { - if value.isFinite { - // Swift 4.2 and later guarantees that this is accurate - // enough to parse back to the exact value on the other end. - return value.description - } else { - // Protobuf-specific handling of NaN and infinities - var encoder = JSONEncoder() - encoder.putFloatValue(value: value) - return encoder.stringResult - } - } -} - -extension Google_Protobuf_Int64Value: - ProtobufWrapper, ExpressibleByIntegerLiteral, _CustomJSONCodable { - - public typealias WrappedType = ProtobufInt64 - public typealias IntegerLiteralType = WrappedType.BaseType - - public init(_ value: WrappedType.BaseType) { - self.init() - self.value = value - } - - public init(integerLiteral: IntegerLiteralType) { - self.init(integerLiteral) - } - - func encodedJSONString(options: JSONEncodingOptions) throws -> String { - return "\"" + String(value) + "\"" - } -} - -extension Google_Protobuf_UInt64Value: - ProtobufWrapper, ExpressibleByIntegerLiteral, _CustomJSONCodable { - - public typealias WrappedType = ProtobufUInt64 - public typealias IntegerLiteralType = WrappedType.BaseType - - public init(_ value: WrappedType.BaseType) { - self.init() - self.value = value - } - - public init(integerLiteral: IntegerLiteralType) { - self.init(integerLiteral) - } - - func encodedJSONString(options: JSONEncodingOptions) throws -> String { - return "\"" + String(value) + "\"" - } -} - -extension Google_Protobuf_Int32Value: - ProtobufWrapper, ExpressibleByIntegerLiteral, _CustomJSONCodable { - - public typealias WrappedType = ProtobufInt32 - public typealias IntegerLiteralType = WrappedType.BaseType - - public init(_ value: WrappedType.BaseType) { - self.init() - self.value = value - } - - public init(integerLiteral: IntegerLiteralType) { - self.init(integerLiteral) - } - - func encodedJSONString(options: JSONEncodingOptions) throws -> String { - return String(value) - } -} - -extension Google_Protobuf_UInt32Value: - ProtobufWrapper, ExpressibleByIntegerLiteral, _CustomJSONCodable { - - public typealias WrappedType = ProtobufUInt32 - public typealias IntegerLiteralType = WrappedType.BaseType - - public init(_ value: WrappedType.BaseType) { - self.init() - self.value = value - } - - public init(integerLiteral: IntegerLiteralType) { - self.init(integerLiteral) - } - - func encodedJSONString(options: JSONEncodingOptions) throws -> String { - return String(value) - } -} - -extension Google_Protobuf_BoolValue: - ProtobufWrapper, ExpressibleByBooleanLiteral, _CustomJSONCodable { - - public typealias WrappedType = ProtobufBool - public typealias BooleanLiteralType = Bool - - public init(_ value: WrappedType.BaseType) { - self.init() - self.value = value - } - - public init(booleanLiteral: Bool) { - self.init(booleanLiteral) - } - - func encodedJSONString(options: JSONEncodingOptions) throws -> String { - return value ? "true" : "false" - } -} - -extension Google_Protobuf_StringValue: - ProtobufWrapper, ExpressibleByStringLiteral, _CustomJSONCodable { - - public typealias WrappedType = ProtobufString - public typealias StringLiteralType = String - public typealias ExtendedGraphemeClusterLiteralType = String - public typealias UnicodeScalarLiteralType = String - - public init(_ value: WrappedType.BaseType) { - self.init() - self.value = value - } - - public init(stringLiteral: String) { - self.init(stringLiteral) - } - - public init(extendedGraphemeClusterLiteral: String) { - self.init(extendedGraphemeClusterLiteral) - } - - public init(unicodeScalarLiteral: String) { - self.init(unicodeScalarLiteral) - } - - func encodedJSONString(options: JSONEncodingOptions) throws -> String { - var encoder = JSONEncoder() - encoder.putStringValue(value: value) - return encoder.stringResult - } -} - -extension Google_Protobuf_BytesValue: ProtobufWrapper, _CustomJSONCodable { - - public typealias WrappedType = ProtobufBytes - - public init(_ value: WrappedType.BaseType) { - self.init() - self.value = value - } - - func encodedJSONString(options: JSONEncodingOptions) throws -> String { - var encoder = JSONEncoder() - encoder.putBytesValue(value: value) - return encoder.stringResult - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/HashVisitor.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/HashVisitor.swift deleted file mode 100644 index 395af2ac..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/HashVisitor.swift +++ /dev/null @@ -1,426 +0,0 @@ -// Sources/SwiftProtobuf/HashVisitor.swift - Hashing support -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Hashing is basically a serialization problem, so we can leverage the -/// generated traversal methods for that. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -private let i_2166136261 = Int(bitPattern: 2166136261) -private let i_16777619 = Int(16777619) - -/// Computes the hash of a message by visiting its fields recursively. -/// -/// Note that because this visits every field, it has the potential to be slow -/// for large or deeply nested messages. Users who need to use such messages as -/// dictionary keys or set members can use a wrapper struct around the message -/// and use a custom Hashable implementation that looks at the subset of the -/// message fields they want to include. -internal struct HashVisitor: Visitor { - -#if swift(>=4.2) - internal private(set) var hasher: Hasher -#else // swift(>=4.2) - // Roughly based on FNV hash: http://tools.ietf.org/html/draft-eastlake-fnv-03 - private(set) var hashValue = i_2166136261 - - private mutating func mix(_ hash: Int) { - hashValue = (hashValue ^ hash) &* i_16777619 - } - - private mutating func mixMap(map: Dictionary) { - var mapHash = 0 - for (k, v) in map { - // Note: This calculation cannot depend on the order of the items. - mapHash = mapHash &+ (k.hashValue ^ v.hashValue) - } - mix(mapHash) - } -#endif // swift(>=4.2) - -#if swift(>=4.2) - init(_ hasher: Hasher) { - self.hasher = hasher - } -#else - init() {} -#endif - - mutating func visitUnknown(bytes: Data) throws { - #if swift(>=4.2) - hasher.combine(bytes) - #else - mix(bytes.hashValue) - #endif - } - - mutating func visitSingularDoubleField(value: Double, fieldNumber: Int) throws { - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - mix(value.hashValue) - #endif - } - - mutating func visitSingularInt64Field(value: Int64, fieldNumber: Int) throws { - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - mix(value.hashValue) - #endif - } - - mutating func visitSingularUInt64Field(value: UInt64, fieldNumber: Int) throws { - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - mix(value.hashValue) - #endif - } - - mutating func visitSingularBoolField(value: Bool, fieldNumber: Int) throws { - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - mix(value.hashValue) - #endif - } - - mutating func visitSingularStringField(value: String, fieldNumber: Int) throws { - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - mix(value.hashValue) - #endif - } - - mutating func visitSingularBytesField(value: Data, fieldNumber: Int) throws { - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - mix(value.hashValue) - #endif - } - - mutating func visitSingularEnumField(value: E, - fieldNumber: Int) { - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - mix(value.hashValue) - #endif - } - - mutating func visitSingularMessageField(value: M, fieldNumber: Int) { - #if swift(>=4.2) - hasher.combine(fieldNumber) - value.hash(into: &hasher) - #else - mix(fieldNumber) - mix(value.hashValue) - #endif - } - - mutating func visitRepeatedFloatField(value: [Float], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedDoubleField(value: [Double], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedUInt32Field(value: [UInt32], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedUInt64Field(value: [UInt64], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedSInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedSInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedFixed32Field(value: [UInt32], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedFixed64Field(value: [UInt64], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedSFixed32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedSFixed64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedBoolField(value: [Bool], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedStringField(value: [String], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedBytesField(value: [Data], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedEnumField(value: [E], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedMessageField(value: [M], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - for v in value { - v.hash(into: &hasher) - } - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitRepeatedGroupField(value: [G], fieldNumber: Int) throws { - assert(!value.isEmpty) - #if swift(>=4.2) - hasher.combine(fieldNumber) - for v in value { - v.hash(into: &hasher) - } - #else - mix(fieldNumber) - for v in value { - mix(v.hashValue) - } - #endif - } - - mutating func visitMapField( - fieldType: _ProtobufMap.Type, - value: _ProtobufMap.BaseType, - fieldNumber: Int - ) throws { - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - mixMap(map: value) - #endif - } - - mutating func visitMapField( - fieldType: _ProtobufEnumMap.Type, - value: _ProtobufEnumMap.BaseType, - fieldNumber: Int - ) throws where ValueType.RawValue == Int { - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - mixMap(map: value) - #endif - } - - mutating func visitMapField( - fieldType: _ProtobufMessageMap.Type, - value: _ProtobufMessageMap.BaseType, - fieldNumber: Int - ) throws { - #if swift(>=4.2) - hasher.combine(fieldNumber) - hasher.combine(value) - #else - mix(fieldNumber) - mixMap(map: value) - #endif - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Internal.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Internal.swift deleted file mode 100644 index 8619bbd9..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Internal.swift +++ /dev/null @@ -1,51 +0,0 @@ -// Sources/SwiftProtobuf/Internal.swift - Message support -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Internal helpers on Messages for the library. These are public -/// just so the generated code can call them, but shouldn't be called -/// by developers directly. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// Functions that are public only because they are used by generated message -/// implementations. NOT INTENDED TO BE CALLED BY CLIENTS. -public enum Internal { - - /// A singleton instance of an empty data that is used by the generated code - /// for default values. This is a performance enhancement to work around the - /// fact that the `Data` type in Swift involves a new heap allocation every - /// time an empty instance is initialized, instead of sharing a common empty - /// backing storage. - public static let emptyData = Data() - - /// Helper to loop over a list of Messages to see if they are all - /// initialized (see Message.isInitialized for what that means). - public static func areAllInitialized(_ listOfMessages: [Message]) -> Bool { - for msg in listOfMessages { - if !msg.isInitialized { - return false - } - } - return true - } - - /// Helper to loop over dictionary with values that are Messages to see if - /// they are all initialized (see Message.isInitialized for what that means). - public static func areAllInitialized(_ mapToMessages: [K: Message]) -> Bool { - for (_, msg) in mapToMessages { - if !msg.isInitialized { - return false - } - } - return true - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONDecoder.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONDecoder.swift deleted file mode 100644 index 65bf0747..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONDecoder.swift +++ /dev/null @@ -1,747 +0,0 @@ -// Sources/SwiftProtobuf/JSONDecoder.swift - JSON format decoding -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// JSON format decoding engine. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -internal struct JSONDecoder: Decoder { - internal var scanner: JSONScanner - internal var messageType: Message.Type - private var fieldCount = 0 - private var isMapKey = false - private var fieldNameMap: _NameMap? - - internal var options: JSONDecodingOptions { - return scanner.options - } - - mutating func handleConflictingOneOf() throws { - throw JSONDecodingError.conflictingOneOf - } - - internal init(source: UnsafeRawBufferPointer, options: JSONDecodingOptions, - messageType: Message.Type, extensions: ExtensionMap?) { - let scanner = JSONScanner(source: source, - options: options, - extensions: extensions) - self.init(scanner: scanner, messageType: messageType) - } - - private init(scanner: JSONScanner, messageType: Message.Type) { - self.scanner = scanner - self.messageType = messageType - } - - mutating func nextFieldNumber() throws -> Int? { - if scanner.skipOptionalObjectEnd() { - return nil - } - if fieldCount > 0 { - try scanner.skipRequiredComma() - } - let fieldNumber = try scanner.nextFieldNumber(names: fieldNameMap!, - messageType: messageType) - if let fieldNumber = fieldNumber { - fieldCount += 1 - return fieldNumber - } - return nil - } - - mutating func decodeSingularFloatField(value: inout Float) throws { - if scanner.skipOptionalNull() { - value = 0 - return - } - value = try scanner.nextFloat() - } - - mutating func decodeSingularFloatField(value: inout Float?) throws { - if scanner.skipOptionalNull() { - value = nil - return - } - value = try scanner.nextFloat() - } - - mutating func decodeRepeatedFloatField(value: inout [Float]) throws { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredArrayStart() - if scanner.skipOptionalArrayEnd() { - return - } - while true { - let n = try scanner.nextFloat() - value.append(n) - if scanner.skipOptionalArrayEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - mutating func decodeSingularDoubleField(value: inout Double) throws { - if scanner.skipOptionalNull() { - value = 0 - return - } - value = try scanner.nextDouble() - } - - mutating func decodeSingularDoubleField(value: inout Double?) throws { - if scanner.skipOptionalNull() { - value = nil - return - } - value = try scanner.nextDouble() - } - - mutating func decodeRepeatedDoubleField(value: inout [Double]) throws { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredArrayStart() - if scanner.skipOptionalArrayEnd() { - return - } - while true { - let n = try scanner.nextDouble() - value.append(n) - if scanner.skipOptionalArrayEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - mutating func decodeSingularInt32Field(value: inout Int32) throws { - if scanner.skipOptionalNull() { - value = 0 - return - } - let n = try scanner.nextSInt() - if n > Int64(Int32.max) || n < Int64(Int32.min) { - throw JSONDecodingError.numberRange - } - value = Int32(truncatingIfNeeded: n) - } - - mutating func decodeSingularInt32Field(value: inout Int32?) throws { - if scanner.skipOptionalNull() { - value = nil - return - } - let n = try scanner.nextSInt() - if n > Int64(Int32.max) || n < Int64(Int32.min) { - throw JSONDecodingError.numberRange - } - value = Int32(truncatingIfNeeded: n) - } - - mutating func decodeRepeatedInt32Field(value: inout [Int32]) throws { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredArrayStart() - if scanner.skipOptionalArrayEnd() { - return - } - while true { - let n = try scanner.nextSInt() - if n > Int64(Int32.max) || n < Int64(Int32.min) { - throw JSONDecodingError.numberRange - } - value.append(Int32(truncatingIfNeeded: n)) - if scanner.skipOptionalArrayEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - mutating func decodeSingularInt64Field(value: inout Int64) throws { - if scanner.skipOptionalNull() { - value = 0 - return - } - value = try scanner.nextSInt() - } - - mutating func decodeSingularInt64Field(value: inout Int64?) throws { - if scanner.skipOptionalNull() { - value = nil - return - } - value = try scanner.nextSInt() - } - - mutating func decodeRepeatedInt64Field(value: inout [Int64]) throws { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredArrayStart() - if scanner.skipOptionalArrayEnd() { - return - } - while true { - let n = try scanner.nextSInt() - value.append(n) - if scanner.skipOptionalArrayEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - mutating func decodeSingularUInt32Field(value: inout UInt32) throws { - if scanner.skipOptionalNull() { - value = 0 - return - } - let n = try scanner.nextUInt() - if n > UInt64(UInt32.max) { - throw JSONDecodingError.numberRange - } - value = UInt32(truncatingIfNeeded: n) - } - - mutating func decodeSingularUInt32Field(value: inout UInt32?) throws { - if scanner.skipOptionalNull() { - value = nil - return - } - let n = try scanner.nextUInt() - if n > UInt64(UInt32.max) { - throw JSONDecodingError.numberRange - } - value = UInt32(truncatingIfNeeded: n) - } - - mutating func decodeRepeatedUInt32Field(value: inout [UInt32]) throws { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredArrayStart() - if scanner.skipOptionalArrayEnd() { - return - } - while true { - let n = try scanner.nextUInt() - if n > UInt64(UInt32.max) { - throw JSONDecodingError.numberRange - } - value.append(UInt32(truncatingIfNeeded: n)) - if scanner.skipOptionalArrayEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - mutating func decodeSingularUInt64Field(value: inout UInt64) throws { - if scanner.skipOptionalNull() { - value = 0 - return - } - value = try scanner.nextUInt() - } - - mutating func decodeSingularUInt64Field(value: inout UInt64?) throws { - if scanner.skipOptionalNull() { - value = nil - return - } - value = try scanner.nextUInt() - } - - mutating func decodeRepeatedUInt64Field(value: inout [UInt64]) throws { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredArrayStart() - if scanner.skipOptionalArrayEnd() { - return - } - while true { - let n = try scanner.nextUInt() - value.append(n) - if scanner.skipOptionalArrayEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - mutating func decodeSingularSInt32Field(value: inout Int32) throws { - try decodeSingularInt32Field(value: &value) - } - - mutating func decodeSingularSInt32Field(value: inout Int32?) throws { - try decodeSingularInt32Field(value: &value) - } - - mutating func decodeRepeatedSInt32Field(value: inout [Int32]) throws { - try decodeRepeatedInt32Field(value: &value) - } - - mutating func decodeSingularSInt64Field(value: inout Int64) throws { - try decodeSingularInt64Field(value: &value) - } - - mutating func decodeSingularSInt64Field(value: inout Int64?) throws { - try decodeSingularInt64Field(value: &value) - } - - mutating func decodeRepeatedSInt64Field(value: inout [Int64]) throws { - try decodeRepeatedInt64Field(value: &value) - } - - mutating func decodeSingularFixed32Field(value: inout UInt32) throws { - try decodeSingularUInt32Field(value: &value) - } - - mutating func decodeSingularFixed32Field(value: inout UInt32?) throws { - try decodeSingularUInt32Field(value: &value) - } - - mutating func decodeRepeatedFixed32Field(value: inout [UInt32]) throws { - try decodeRepeatedUInt32Field(value: &value) - } - - mutating func decodeSingularFixed64Field(value: inout UInt64) throws { - try decodeSingularUInt64Field(value: &value) - } - - mutating func decodeSingularFixed64Field(value: inout UInt64?) throws { - try decodeSingularUInt64Field(value: &value) - } - - mutating func decodeRepeatedFixed64Field(value: inout [UInt64]) throws { - try decodeRepeatedUInt64Field(value: &value) - } - - mutating func decodeSingularSFixed32Field(value: inout Int32) throws { - try decodeSingularInt32Field(value: &value) - } - - mutating func decodeSingularSFixed32Field(value: inout Int32?) throws { - try decodeSingularInt32Field(value: &value) - } - - mutating func decodeRepeatedSFixed32Field(value: inout [Int32]) throws { - try decodeRepeatedInt32Field(value: &value) - } - - mutating func decodeSingularSFixed64Field(value: inout Int64) throws { - try decodeSingularInt64Field(value: &value) - } - - mutating func decodeSingularSFixed64Field(value: inout Int64?) throws { - try decodeSingularInt64Field(value: &value) - } - - mutating func decodeRepeatedSFixed64Field(value: inout [Int64]) throws { - try decodeRepeatedInt64Field(value: &value) - } - - mutating func decodeSingularBoolField(value: inout Bool) throws { - if scanner.skipOptionalNull() { - value = false - return - } - if isMapKey { - value = try scanner.nextQuotedBool() - } else { - value = try scanner.nextBool() - } - } - - mutating func decodeSingularBoolField(value: inout Bool?) throws { - if scanner.skipOptionalNull() { - value = nil - return - } - if isMapKey { - value = try scanner.nextQuotedBool() - } else { - value = try scanner.nextBool() - } - } - - mutating func decodeRepeatedBoolField(value: inout [Bool]) throws { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredArrayStart() - if scanner.skipOptionalArrayEnd() { - return - } - while true { - let n = try scanner.nextBool() - value.append(n) - if scanner.skipOptionalArrayEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - mutating func decodeSingularStringField(value: inout String) throws { - if scanner.skipOptionalNull() { - value = String() - return - } - value = try scanner.nextQuotedString() - } - - mutating func decodeSingularStringField(value: inout String?) throws { - if scanner.skipOptionalNull() { - value = nil - return - } - value = try scanner.nextQuotedString() - } - - mutating func decodeRepeatedStringField(value: inout [String]) throws { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredArrayStart() - if scanner.skipOptionalArrayEnd() { - return - } - while true { - let n = try scanner.nextQuotedString() - value.append(n) - if scanner.skipOptionalArrayEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - mutating func decodeSingularBytesField(value: inout Data) throws { - if scanner.skipOptionalNull() { - value = Data() - return - } - value = try scanner.nextBytesValue() - } - - mutating func decodeSingularBytesField(value: inout Data?) throws { - if scanner.skipOptionalNull() { - value = nil - return - } - value = try scanner.nextBytesValue() - } - - mutating func decodeRepeatedBytesField(value: inout [Data]) throws { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredArrayStart() - if scanner.skipOptionalArrayEnd() { - return - } - while true { - let n = try scanner.nextBytesValue() - value.append(n) - if scanner.skipOptionalArrayEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - mutating func decodeSingularEnumField(value: inout E?) throws - where E.RawValue == Int { - if scanner.skipOptionalNull() { - if let customDecodable = E.self as? _CustomJSONCodable.Type { - value = try customDecodable.decodedFromJSONNull() as? E - return - } - value = nil - return - } - // Only change the value if a value was read. - if let e: E = try scanner.nextEnumValue() { - value = e - } - } - - mutating func decodeSingularEnumField(value: inout E) throws - where E.RawValue == Int { - if scanner.skipOptionalNull() { - if let customDecodable = E.self as? _CustomJSONCodable.Type { - value = try customDecodable.decodedFromJSONNull() as! E - return - } - value = E() - return - } - if let e: E = try scanner.nextEnumValue() { - value = e - } - - } - - mutating func decodeRepeatedEnumField(value: inout [E]) throws - where E.RawValue == Int { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredArrayStart() - if scanner.skipOptionalArrayEnd() { - return - } - let maybeCustomDecodable = E.self as? _CustomJSONCodable.Type - while true { - if scanner.skipOptionalNull() { - if let customDecodable = maybeCustomDecodable { - let e = try customDecodable.decodedFromJSONNull() as! E - value.append(e) - } else { - throw JSONDecodingError.illegalNull - } - } else { - if let e: E = try scanner.nextEnumValue() { - value.append(e) - } - } - if scanner.skipOptionalArrayEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - internal mutating func decodeFullObject(message: inout M) throws { - guard let nameProviding = (M.self as? _ProtoNameProviding.Type) else { - throw JSONDecodingError.missingFieldNames - } - fieldNameMap = nameProviding._protobuf_nameMap - if let m = message as? _CustomJSONCodable { - var customCodable = m - try customCodable.decodeJSON(from: &self) - message = customCodable as! M - } else { - try scanner.skipRequiredObjectStart() - if scanner.skipOptionalObjectEnd() { - return - } - try message.decodeMessage(decoder: &self) - } - } - - mutating func decodeSingularMessageField(value: inout M?) throws { - if scanner.skipOptionalNull() { - if M.self is _CustomJSONCodable.Type { - value = - try (M.self as! _CustomJSONCodable.Type).decodedFromJSONNull() as? M - return - } - // All other message field types treat 'null' as an unset - value = nil - return - } - if value == nil { - value = M() - } - var subDecoder = JSONDecoder(scanner: scanner, messageType: M.self) - try subDecoder.decodeFullObject(message: &value!) - assert(scanner.recursionBudget == subDecoder.scanner.recursionBudget) - scanner = subDecoder.scanner - } - - mutating func decodeRepeatedMessageField( - value: inout [M] - ) throws { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredArrayStart() - if scanner.skipOptionalArrayEnd() { - return - } - while true { - if scanner.skipOptionalNull() { - var appended = false - if M.self is _CustomJSONCodable.Type { - if let message = try (M.self as! _CustomJSONCodable.Type) - .decodedFromJSONNull() as? M { - value.append(message) - appended = true - } - } - if !appended { - throw JSONDecodingError.illegalNull - } - } else { - var message = M() - var subDecoder = JSONDecoder(scanner: scanner, messageType: M.self) - try subDecoder.decodeFullObject(message: &message) - value.append(message) - assert(scanner.recursionBudget == subDecoder.scanner.recursionBudget) - scanner = subDecoder.scanner - } - if scanner.skipOptionalArrayEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - mutating func decodeSingularGroupField(value: inout G?) throws { - throw JSONDecodingError.schemaMismatch - } - - mutating func decodeRepeatedGroupField(value: inout [G]) throws { - throw JSONDecodingError.schemaMismatch - } - - mutating func decodeMapField( - fieldType: _ProtobufMap.Type, - value: inout _ProtobufMap.BaseType - ) throws { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredObjectStart() - if scanner.skipOptionalObjectEnd() { - return - } - while true { - // Next character must be double quote, because - // map keys must always be quoted strings. - let c = try scanner.peekOneCharacter() - if c != "\"" { - throw JSONDecodingError.unquotedMapKey - } - isMapKey = true - var keyField: KeyType.BaseType? - try KeyType.decodeSingular(value: &keyField, from: &self) - isMapKey = false - try scanner.skipRequiredColon() - var valueField: ValueType.BaseType? - try ValueType.decodeSingular(value: &valueField, from: &self) - if let keyField = keyField, let valueField = valueField { - value[keyField] = valueField - } else { - throw JSONDecodingError.malformedMap - } - if scanner.skipOptionalObjectEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - mutating func decodeMapField( - fieldType: _ProtobufEnumMap.Type, - value: inout _ProtobufEnumMap.BaseType - ) throws where ValueType.RawValue == Int { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredObjectStart() - if scanner.skipOptionalObjectEnd() { - return - } - while true { - // Next character must be double quote, because - // map keys must always be quoted strings. - let c = try scanner.peekOneCharacter() - if c != "\"" { - throw JSONDecodingError.unquotedMapKey - } - isMapKey = true - var keyFieldOpt: KeyType.BaseType? - try KeyType.decodeSingular(value: &keyFieldOpt, from: &self) - guard let keyField = keyFieldOpt else { - throw JSONDecodingError.malformedMap - } - isMapKey = false - try scanner.skipRequiredColon() - var valueField: ValueType? - try decodeSingularEnumField(value: &valueField) - if let valueField = valueField { - value[keyField] = valueField - } else { - // Nothing, the only way ``decodeSingularEnumField(value:)`` leaves - // it as nil is if ignoreUnknownFields option is enabled which also - // means to ignore unknown enum values. - } - if scanner.skipOptionalObjectEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - mutating func decodeMapField( - fieldType: _ProtobufMessageMap.Type, - value: inout _ProtobufMessageMap.BaseType - ) throws { - if scanner.skipOptionalNull() { - return - } - try scanner.skipRequiredObjectStart() - if scanner.skipOptionalObjectEnd() { - return - } - while true { - // Next character must be double quote, because - // map keys must always be quoted strings. - let c = try scanner.peekOneCharacter() - if c != "\"" { - throw JSONDecodingError.unquotedMapKey - } - isMapKey = true - var keyField: KeyType.BaseType? - try KeyType.decodeSingular(value: &keyField, from: &self) - isMapKey = false - try scanner.skipRequiredColon() - var valueField: ValueType? - try decodeSingularMessageField(value: &valueField) - if let keyField = keyField, let valueField = valueField { - value[keyField] = valueField - } else { - throw JSONDecodingError.malformedMap - } - if scanner.skipOptionalObjectEnd() { - return - } - try scanner.skipRequiredComma() - } - } - - mutating func decodeExtensionField( - values: inout ExtensionFieldValueSet, - messageType: Message.Type, - fieldNumber: Int - ) throws { - // Force-unwrap: we can only get here if the extension exists. - let ext = scanner.extensions[messageType, fieldNumber]! - - try values.modify(index: fieldNumber) { fieldValue in - if fieldValue != nil { - try fieldValue!.decodeExtensionField(decoder: &self) - } else { - fieldValue = try ext._protobuf_newField(decoder: &self) - } - } - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONDecodingError.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONDecodingError.swift deleted file mode 100644 index 35a407c5..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONDecodingError.swift +++ /dev/null @@ -1,62 +0,0 @@ -// Sources/SwiftProtobuf/JSONDecodingError.swift - JSON decoding errors -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// JSON decoding errors -/// -// ----------------------------------------------------------------------------- - -public enum JSONDecodingError: Error { - /// Something was wrong - case failure - /// A number could not be parsed - case malformedNumber - /// Numeric value was out of range or was not an integer value when expected - case numberRange - /// A map could not be parsed - case malformedMap - /// A bool could not be parsed - case malformedBool - /// We expected a quoted string, or a quoted string has a malformed backslash sequence - case malformedString - /// We encountered malformed UTF8 - case invalidUTF8 - /// The message does not have fieldName information - case missingFieldNames - /// The data type does not match the schema description - case schemaMismatch - /// A value (text or numeric) for an enum was not found on the enum - case unrecognizedEnumValue - /// A 'null' token appeared in an illegal location. - /// For example, Protobuf JSON does not allow 'null' tokens to appear - /// in lists. - case illegalNull - /// A map key was not quoted - case unquotedMapKey - /// JSON RFC 7519 does not allow numbers to have extra leading zeros - case leadingZero - /// We hit the end of the JSON string and expected something more... - case truncated - /// A JSON Duration could not be parsed - case malformedDuration - /// A JSON Timestamp could not be parsed - case malformedTimestamp - /// A FieldMask could not be parsed - case malformedFieldMask - /// Extraneous data remained after decoding should have been complete - case trailingGarbage - /// More than one value was specified for the same oneof field - case conflictingOneOf - /// Reached the nesting limit for messages within messages while decoding. - case messageDepthLimit - /// Encountered an unknown field with the given name. When parsing JSON, you - /// can instead instruct the library to ignore this via - /// JSONDecodingOptions.ignoreUnknownFields. - case unknownField(String) -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONDecodingOptions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONDecodingOptions.swift deleted file mode 100644 index fc5d6708..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONDecodingOptions.swift +++ /dev/null @@ -1,31 +0,0 @@ -// Sources/SwiftProtobuf/JSONDecodingOptions.swift - JSON decoding options -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// JSON decoding options -/// -// ----------------------------------------------------------------------------- - -/// Options for JSONDecoding. -public struct JSONDecodingOptions { - /// The maximum nesting of message with messages. The default is 100. - /// - /// To prevent corrupt or malicious messages from causing stack overflows, - /// this controls how deep messages can be nested within other messages - /// while parsing. - public var messageDepthLimit: Int = 100 - - /// If unknown fields in the JSON should be ignored. If they aren't - /// ignored, an error will be raised if one is encountered. This also - /// causes unknown enum values (especially string values) to be silently - /// ignored. - public var ignoreUnknownFields: Bool = false - - public init() {} -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONEncoder.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONEncoder.swift deleted file mode 100644 index 61c53f70..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONEncoder.swift +++ /dev/null @@ -1,386 +0,0 @@ -// Sources/SwiftProtobuf/JSONEncoder.swift - JSON Encoding support -// -// Copyright (c) 2014 - 2019 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// JSON serialization engine. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -private let asciiZero = UInt8(ascii: "0") -private let asciiOne = UInt8(ascii: "1") -private let asciiTwo = UInt8(ascii: "2") -private let asciiThree = UInt8(ascii: "3") -private let asciiFour = UInt8(ascii: "4") -private let asciiFive = UInt8(ascii: "5") -private let asciiSix = UInt8(ascii: "6") -private let asciiSeven = UInt8(ascii: "7") -private let asciiEight = UInt8(ascii: "8") -private let asciiNine = UInt8(ascii: "9") -private let asciiMinus = UInt8(ascii: "-") -private let asciiPlus = UInt8(ascii: "+") -private let asciiEquals = UInt8(ascii: "=") -private let asciiColon = UInt8(ascii: ":") -private let asciiComma = UInt8(ascii: ",") -private let asciiDoubleQuote = UInt8(ascii: "\"") -private let asciiBackslash = UInt8(ascii: "\\") -private let asciiForwardSlash = UInt8(ascii: "/") -private let asciiOpenSquareBracket = UInt8(ascii: "[") -private let asciiCloseSquareBracket = UInt8(ascii: "]") -private let asciiOpenCurlyBracket = UInt8(ascii: "{") -private let asciiCloseCurlyBracket = UInt8(ascii: "}") -private let asciiUpperA = UInt8(ascii: "A") -private let asciiUpperB = UInt8(ascii: "B") -private let asciiUpperC = UInt8(ascii: "C") -private let asciiUpperD = UInt8(ascii: "D") -private let asciiUpperE = UInt8(ascii: "E") -private let asciiUpperF = UInt8(ascii: "F") -private let asciiUpperZ = UInt8(ascii: "Z") -private let asciiLowerA = UInt8(ascii: "a") -private let asciiLowerZ = UInt8(ascii: "z") - -private let base64Digits: [UInt8] = { - var digits = [UInt8]() - digits.append(contentsOf: asciiUpperA...asciiUpperZ) - digits.append(contentsOf: asciiLowerA...asciiLowerZ) - digits.append(contentsOf: asciiZero...asciiNine) - digits.append(asciiPlus) - digits.append(asciiForwardSlash) - return digits -}() - -private let hexDigits: [UInt8] = { - var digits = [UInt8]() - digits.append(contentsOf: asciiZero...asciiNine) - digits.append(contentsOf: asciiUpperA...asciiUpperF) - return digits -}() - -internal struct JSONEncoder { - private var data = [UInt8]() - private var separator: UInt8? - - internal init() {} - - internal var dataResult: Data { return Data(data) } - - internal var stringResult: String { - get { - return String(bytes: data, encoding: String.Encoding.utf8)! - } - } - - /// Append a `StaticString` to the JSON text. Because - /// `StaticString` is already UTF8 internally, this is faster - /// than appending a regular `String`. - internal mutating func append(staticText: StaticString) { - let buff = UnsafeBufferPointer(start: staticText.utf8Start, count: staticText.utf8CodeUnitCount) - data.append(contentsOf: buff) - } - - /// Append a `_NameMap.Name` to the JSON text surrounded by quotes. - /// As with StaticString above, a `_NameMap.Name` provides pre-converted - /// UTF8 bytes, so this is much faster than appending a regular - /// `String`. - internal mutating func appendQuoted(name: _NameMap.Name) { - data.append(asciiDoubleQuote) - data.append(contentsOf: name.utf8Buffer) - data.append(asciiDoubleQuote) - } - - /// Append a `String` to the JSON text. - internal mutating func append(text: String) { - data.append(contentsOf: text.utf8) - } - - /// Append a raw utf8 in a `Data` to the JSON text. - internal mutating func append(utf8Data: Data) { - data.append(contentsOf: utf8Data) - } - - /// Begin a new field whose name is given as a `_NameMap.Name` - internal mutating func startField(name: _NameMap.Name) { - if let s = separator { - data.append(s) - } - appendQuoted(name: name) - data.append(asciiColon) - separator = asciiComma - } - - /// Begin a new field whose name is given as a `String`. - internal mutating func startField(name: String) { - if let s = separator { - data.append(s) - } - data.append(asciiDoubleQuote) - // Can avoid overhead of putStringValue, since - // the JSON field names are always clean ASCII. - data.append(contentsOf: name.utf8) - append(staticText: "\":") - separator = asciiComma - } - - /// Begin a new extension field - internal mutating func startExtensionField(name: String) { - if let s = separator { - data.append(s) - } - append(staticText: "\"[") - data.append(contentsOf: name.utf8) - append(staticText: "]\":") - separator = asciiComma - } - - /// Append an open square bracket `[` to the JSON. - internal mutating func startArray() { - data.append(asciiOpenSquareBracket) - separator = nil - } - - /// Append a close square bracket `]` to the JSON. - internal mutating func endArray() { - data.append(asciiCloseSquareBracket) - separator = asciiComma - } - - /// Append a comma `,` to the JSON. - internal mutating func comma() { - data.append(asciiComma) - } - - /// Append an open curly brace `{` to the JSON. - /// Assumes this object is part of an array of objects. - internal mutating func startArrayObject() { - if let s = separator { - data.append(s) - } - data.append(asciiOpenCurlyBracket) - separator = nil - } - - /// Append an open curly brace `{` to the JSON. - internal mutating func startObject() { - data.append(asciiOpenCurlyBracket) - separator = nil - } - - /// Append a close curly brace `}` to the JSON. - internal mutating func endObject() { - data.append(asciiCloseCurlyBracket) - separator = asciiComma - } - - /// Write a JSON `null` token to the output. - internal mutating func putNullValue() { - append(staticText: "null") - } - - /// Append a float value to the output. - /// This handles Nan and infinite values by - /// writing well-known string values. - internal mutating func putFloatValue(value: Float) { - if value.isNaN { - append(staticText: "\"NaN\"") - } else if !value.isFinite { - if value < 0 { - append(staticText: "\"-Infinity\"") - } else { - append(staticText: "\"Infinity\"") - } - } else { - data.append(contentsOf: value.debugDescription.utf8) - } - } - - /// Append a double value to the output. - /// This handles Nan and infinite values by - /// writing well-known string values. - internal mutating func putDoubleValue(value: Double) { - if value.isNaN { - append(staticText: "\"NaN\"") - } else if !value.isFinite { - if value < 0 { - append(staticText: "\"-Infinity\"") - } else { - append(staticText: "\"Infinity\"") - } - } else { - data.append(contentsOf: value.debugDescription.utf8) - } - } - - /// Append a UInt64 to the output (without quoting). - private mutating func appendUInt(value: UInt64) { - if value >= 10 { - appendUInt(value: value / 10) - } - data.append(asciiZero + UInt8(value % 10)) - } - - /// Append an Int64 to the output (without quoting). - private mutating func appendInt(value: Int64) { - if value < 0 { - data.append(asciiMinus) - // This is the twos-complement negation of value, - // computed in a way that won't overflow a 64-bit - // signed integer. - appendUInt(value: 1 + ~UInt64(bitPattern: value)) - } else { - appendUInt(value: UInt64(bitPattern: value)) - } - } - - /// Write an Enum as an int. - internal mutating func putEnumInt(value: Int) { - appendInt(value: Int64(value)) - } - - /// Write an `Int64` using protobuf JSON quoting conventions. - internal mutating func putInt64(value: Int64) { - data.append(asciiDoubleQuote) - appendInt(value: value) - data.append(asciiDoubleQuote) - } - - /// Write an `Int32` with quoting suitable for - /// using the value as a map key. - internal mutating func putQuotedInt32(value: Int32) { - data.append(asciiDoubleQuote) - appendInt(value: Int64(value)) - data.append(asciiDoubleQuote) - } - - /// Write an `Int32` in the default format. - internal mutating func putInt32(value: Int32) { - appendInt(value: Int64(value)) - } - - /// Write a `UInt64` using protobuf JSON quoting conventions. - internal mutating func putUInt64(value: UInt64) { - data.append(asciiDoubleQuote) - appendUInt(value: value) - data.append(asciiDoubleQuote) - } - - /// Write a `UInt32` with quoting suitable for - /// using the value as a map key. - internal mutating func putQuotedUInt32(value: UInt32) { - data.append(asciiDoubleQuote) - appendUInt(value: UInt64(value)) - data.append(asciiDoubleQuote) - } - - /// Write a `UInt32` in the default format. - internal mutating func putUInt32(value: UInt32) { - appendUInt(value: UInt64(value)) - } - - /// Write a `Bool` with quoting suitable for - /// using the value as a map key. - internal mutating func putQuotedBoolValue(value: Bool) { - data.append(asciiDoubleQuote) - putBoolValue(value: value) - data.append(asciiDoubleQuote) - } - - /// Write a `Bool` in the default format. - internal mutating func putBoolValue(value: Bool) { - if value { - append(staticText: "true") - } else { - append(staticText: "false") - } - } - - /// Append a string value escaping special characters as needed. - internal mutating func putStringValue(value: String) { - data.append(asciiDoubleQuote) - for c in value.unicodeScalars { - switch c.value { - // Special two-byte escapes - case 8: append(staticText: "\\b") - case 9: append(staticText: "\\t") - case 10: append(staticText: "\\n") - case 12: append(staticText: "\\f") - case 13: append(staticText: "\\r") - case 34: append(staticText: "\\\"") - case 92: append(staticText: "\\\\") - case 0...31, 127...159: // Hex form for C0 control chars - append(staticText: "\\u00") - data.append(hexDigits[Int(c.value / 16)]) - data.append(hexDigits[Int(c.value & 15)]) - case 23...126: - data.append(UInt8(truncatingIfNeeded: c.value)) - case 0x80...0x7ff: - data.append(0xc0 + UInt8(truncatingIfNeeded: c.value >> 6)) - data.append(0x80 + UInt8(truncatingIfNeeded: c.value & 0x3f)) - case 0x800...0xffff: - data.append(0xe0 + UInt8(truncatingIfNeeded: c.value >> 12)) - data.append(0x80 + UInt8(truncatingIfNeeded: (c.value >> 6) & 0x3f)) - data.append(0x80 + UInt8(truncatingIfNeeded: c.value & 0x3f)) - default: - data.append(0xf0 + UInt8(truncatingIfNeeded: c.value >> 18)) - data.append(0x80 + UInt8(truncatingIfNeeded: (c.value >> 12) & 0x3f)) - data.append(0x80 + UInt8(truncatingIfNeeded: (c.value >> 6) & 0x3f)) - data.append(0x80 + UInt8(truncatingIfNeeded: c.value & 0x3f)) - } - } - data.append(asciiDoubleQuote) - } - - /// Append a bytes value using protobuf JSON Base-64 encoding. - internal mutating func putBytesValue(value: Data) { - data.append(asciiDoubleQuote) - if value.count > 0 { - value.withUnsafeBytes { (body: UnsafeRawBufferPointer) in - if let p = body.baseAddress, body.count > 0 { - var t: Int = 0 - var bytesInGroup: Int = 0 - for i in 0..> 18) & 63]) - data.append(base64Digits[(t >> 12) & 63]) - data.append(base64Digits[(t >> 6) & 63]) - data.append(base64Digits[t & 63]) - t = 0 - bytesInGroup = 0 - } - t = (t << 8) + Int(p[i]) - bytesInGroup += 1 - } - switch bytesInGroup { - case 3: - data.append(base64Digits[(t >> 18) & 63]) - data.append(base64Digits[(t >> 12) & 63]) - data.append(base64Digits[(t >> 6) & 63]) - data.append(base64Digits[t & 63]) - case 2: - t <<= 8 - data.append(base64Digits[(t >> 18) & 63]) - data.append(base64Digits[(t >> 12) & 63]) - data.append(base64Digits[(t >> 6) & 63]) - data.append(asciiEquals) - case 1: - t <<= 16 - data.append(base64Digits[(t >> 18) & 63]) - data.append(base64Digits[(t >> 12) & 63]) - data.append(asciiEquals) - data.append(asciiEquals) - default: - break - } - } - } - } - data.append(asciiDoubleQuote) - } -} - diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONEncodingError.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONEncodingError.swift deleted file mode 100644 index 411893ab..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONEncodingError.swift +++ /dev/null @@ -1,38 +0,0 @@ -// Sources/SwiftProtobuf/JSONEncodingError.swift - Error constants -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Enum constants that identify the particular error. -/// -// ----------------------------------------------------------------------------- - -public enum JSONEncodingError: Error { - /// Any fields that were decoded from binary format cannot be - /// re-encoded into JSON unless the object they hold is a - /// well-known type or a type registered with via - /// Google_Protobuf_Any.register() - case anyTranscodeFailure - /// Timestamp values can only be JSON encoded if they hold a value - /// between 0001-01-01Z00:00:00 and 9999-12-31Z23:59:59. - case timestampRange - /// Duration values can only be JSON encoded if they hold a value - /// less than +/- 100 years. - case durationRange - /// Field masks get edited when converting between JSON and protobuf - case fieldMaskConversion - /// Field names were not compiled into the binary - case missingFieldNames - /// Instances of `Google_Protobuf_Value` can only be encoded if they have a - /// valid `kind` (that is, they represent a null value, number, boolean, - /// string, struct, or list). - case missingValue - /// google.protobuf.Value cannot encode double values for infinity or nan, - /// because they would be parsed as a string. - case valueNumberNotFinite -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONEncodingOptions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONEncodingOptions.swift deleted file mode 100644 index 522b1a9b..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONEncodingOptions.swift +++ /dev/null @@ -1,40 +0,0 @@ -// Sources/SwiftProtobuf/JSONEncodingOptions.swift - JSON encoding options -// -// Copyright (c) 2014 - 2018 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// JSON encoding options -/// -// ----------------------------------------------------------------------------- - -/// Options for JSONEncoding. -public struct JSONEncodingOptions { - - /// Always print enums as ints. By default they are printed as strings. - public var alwaysPrintEnumsAsInts: Bool = false - - /// Whether to preserve proto field names. - /// By default they are converted to JSON(lowerCamelCase) names. - public var preserveProtoFieldNames: Bool = false - - /// Whether to use deterministic ordering when serializing. - /// - /// Note that the deterministic serialization is NOT canonical across languages. - /// It is NOT guaranteed to remain stable over time. It is unstable across - /// different builds with schema changes due to unknown fields. Users who need - /// canonical serialization (e.g., persistent storage in a canonical form, - /// fingerprinting, etc.) should define their own canonicalization specification - /// and implement their own serializer rather than relying on this API. - /// - /// If deterministic serialization is requested, map entries will be sorted - /// by keys in lexographical order. This is an implementation detail - /// and subject to change. - public var useDeterministicOrdering: Bool = false - - public init() {} -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONEncodingVisitor.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONEncodingVisitor.swift deleted file mode 100644 index 3f0e912e..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONEncodingVisitor.swift +++ /dev/null @@ -1,410 +0,0 @@ -// Sources/SwiftProtobuf/JSONEncodingVisitor.swift - JSON encoding visitor -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Visitor that writes a message in JSON format. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// Visitor that serializes a message into JSON format. -internal struct JSONEncodingVisitor: Visitor { - - private var encoder = JSONEncoder() - private var nameMap: _NameMap - private var extensions: ExtensionFieldValueSet? - private let options: JSONEncodingOptions - - /// The JSON text produced by the visitor, as raw UTF8 bytes. - var dataResult: Data { - return encoder.dataResult - } - - /// The JSON text produced by the visitor, as a String. - internal var stringResult: String { - return encoder.stringResult - } - - /// Creates a new visitor for serializing a message of the given type to JSON - /// format. - init(type: Message.Type, options: JSONEncodingOptions) throws { - if let nameProviding = type as? _ProtoNameProviding.Type { - self.nameMap = nameProviding._protobuf_nameMap - } else { - throw JSONEncodingError.missingFieldNames - } - self.options = options - } - - mutating func startArray() { - encoder.startArray() - } - - mutating func endArray() { - encoder.endArray() - } - - mutating func startObject(message: Message) { - self.extensions = (message as? ExtensibleMessage)?._protobuf_extensionFieldValues - encoder.startObject() - } - - mutating func startArrayObject(message: Message) { - self.extensions = (message as? ExtensibleMessage)?._protobuf_extensionFieldValues - encoder.startArrayObject() - } - - mutating func endObject() { - encoder.endObject() - } - - mutating func encodeField(name: String, stringValue value: String) { - encoder.startField(name: name) - encoder.putStringValue(value: value) - } - - mutating func encodeField(name: String, jsonText text: String) { - encoder.startField(name: name) - encoder.append(text: text) - } - - mutating func visitUnknown(bytes: Data) throws { - // JSON encoding has no provision for carrying proto2 unknown fields. - } - - mutating func visitSingularFloatField(value: Float, fieldNumber: Int) throws { - try startField(for: fieldNumber) - encoder.putFloatValue(value: value) - } - - mutating func visitSingularDoubleField(value: Double, fieldNumber: Int) throws { - try startField(for: fieldNumber) - encoder.putDoubleValue(value: value) - } - - mutating func visitSingularInt32Field(value: Int32, fieldNumber: Int) throws { - try startField(for: fieldNumber) - encoder.putInt32(value: value) - } - - mutating func visitSingularInt64Field(value: Int64, fieldNumber: Int) throws { - try startField(for: fieldNumber) - encoder.putInt64(value: value) - } - - mutating func visitSingularUInt32Field(value: UInt32, fieldNumber: Int) throws { - try startField(for: fieldNumber) - encoder.putUInt32(value: value) - } - - mutating func visitSingularUInt64Field(value: UInt64, fieldNumber: Int) throws { - try startField(for: fieldNumber) - encoder.putUInt64(value: value) - } - - mutating func visitSingularFixed32Field(value: UInt32, fieldNumber: Int) throws { - try startField(for: fieldNumber) - encoder.putUInt32(value: value) - } - - mutating func visitSingularSFixed32Field(value: Int32, fieldNumber: Int) throws { - try startField(for: fieldNumber) - encoder.putInt32(value: value) - } - - mutating func visitSingularBoolField(value: Bool, fieldNumber: Int) throws { - try startField(for: fieldNumber) - encoder.putBoolValue(value: value) - } - - mutating func visitSingularStringField(value: String, fieldNumber: Int) throws { - try startField(for: fieldNumber) - encoder.putStringValue(value: value) - } - - mutating func visitSingularBytesField(value: Data, fieldNumber: Int) throws { - try startField(for: fieldNumber) - encoder.putBytesValue(value: value) - } - - private mutating func _visitRepeated( - value: [T], - fieldNumber: Int, - encode: (inout JSONEncoder, T) throws -> () - ) throws { - assert(!value.isEmpty) - try startField(for: fieldNumber) - var comma = false - encoder.startArray() - for v in value { - if comma { - encoder.comma() - } - comma = true - try encode(&encoder, v) - } - encoder.endArray() - } - - mutating func visitSingularEnumField(value: E, fieldNumber: Int) throws { - try startField(for: fieldNumber) - if let e = value as? _CustomJSONCodable { - let json = try e.encodedJSONString(options: options) - encoder.append(text: json) - } else if !options.alwaysPrintEnumsAsInts, let n = value.name { - encoder.appendQuoted(name: n) - } else { - encoder.putEnumInt(value: value.rawValue) - } - } - - mutating func visitSingularMessageField(value: M, fieldNumber: Int) throws { - try startField(for: fieldNumber) - if let m = value as? _CustomJSONCodable { - let json = try m.encodedJSONString(options: options) - encoder.append(text: json) - } else if let newNameMap = (M.self as? _ProtoNameProviding.Type)?._protobuf_nameMap { - // Preserve outer object's name and extension maps; restore them before returning - let oldNameMap = self.nameMap - let oldExtensions = self.extensions - // Install inner object's name and extension maps - self.nameMap = newNameMap - startObject(message: value) - try value.traverse(visitor: &self) - endObject() - self.nameMap = oldNameMap - self.extensions = oldExtensions - } else { - throw JSONEncodingError.missingFieldNames - } - } - - mutating func visitSingularGroupField(value: G, fieldNumber: Int) throws { - // Google does not serialize groups into JSON - } - - mutating func visitRepeatedFloatField(value: [Float], fieldNumber: Int) throws { - try _visitRepeated(value: value, fieldNumber: fieldNumber) { - (encoder: inout JSONEncoder, v: Float) in - encoder.putFloatValue(value: v) - } - } - - mutating func visitRepeatedDoubleField(value: [Double], fieldNumber: Int) throws { - try _visitRepeated(value: value, fieldNumber: fieldNumber) { - (encoder: inout JSONEncoder, v: Double) in - encoder.putDoubleValue(value: v) - } - } - - mutating func visitRepeatedInt32Field(value: [Int32], fieldNumber: Int) throws { - try _visitRepeated(value: value, fieldNumber: fieldNumber) { - (encoder: inout JSONEncoder, v: Int32) in - encoder.putInt32(value: v) - } - } - - mutating func visitRepeatedInt64Field(value: [Int64], fieldNumber: Int) throws { - try _visitRepeated(value: value, fieldNumber: fieldNumber) { - (encoder: inout JSONEncoder, v: Int64) in - encoder.putInt64(value: v) - } - } - - mutating func visitRepeatedUInt32Field(value: [UInt32], fieldNumber: Int) throws { - try _visitRepeated(value: value, fieldNumber: fieldNumber) { - (encoder: inout JSONEncoder, v: UInt32) in - encoder.putUInt32(value: v) - } - } - - mutating func visitRepeatedUInt64Field(value: [UInt64], fieldNumber: Int) throws { - try _visitRepeated(value: value, fieldNumber: fieldNumber) { - (encoder: inout JSONEncoder, v: UInt64) in - encoder.putUInt64(value: v) - } - } - - mutating func visitRepeatedSInt32Field(value: [Int32], fieldNumber: Int) throws { - try visitRepeatedInt32Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitRepeatedSInt64Field(value: [Int64], fieldNumber: Int) throws { - try visitRepeatedInt64Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitRepeatedFixed32Field(value: [UInt32], fieldNumber: Int) throws { - try visitRepeatedUInt32Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitRepeatedFixed64Field(value: [UInt64], fieldNumber: Int) throws { - try visitRepeatedUInt64Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitRepeatedSFixed32Field(value: [Int32], fieldNumber: Int) throws { - try visitRepeatedInt32Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitRepeatedSFixed64Field(value: [Int64], fieldNumber: Int) throws { - try visitRepeatedInt64Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitRepeatedBoolField(value: [Bool], fieldNumber: Int) throws { - try _visitRepeated(value: value, fieldNumber: fieldNumber) { - (encoder: inout JSONEncoder, v: Bool) in - encoder.putBoolValue(value: v) - } - } - - mutating func visitRepeatedStringField(value: [String], fieldNumber: Int) throws { - try _visitRepeated(value: value, fieldNumber: fieldNumber) { - (encoder: inout JSONEncoder, v: String) in - encoder.putStringValue(value: v) - } - } - - mutating func visitRepeatedBytesField(value: [Data], fieldNumber: Int) throws { - try _visitRepeated(value: value, fieldNumber: fieldNumber) { - (encoder: inout JSONEncoder, v: Data) in - encoder.putBytesValue(value: v) - } - } - - mutating func visitRepeatedEnumField(value: [E], fieldNumber: Int) throws { - if let _ = E.self as? _CustomJSONCodable.Type { - let options = self.options - try _visitRepeated(value: value, fieldNumber: fieldNumber) { - (encoder: inout JSONEncoder, v: E) throws in - let e = v as! _CustomJSONCodable - let json = try e.encodedJSONString(options: options) - encoder.append(text: json) - } - } else { - let alwaysPrintEnumsAsInts = options.alwaysPrintEnumsAsInts - try _visitRepeated(value: value, fieldNumber: fieldNumber) { - (encoder: inout JSONEncoder, v: E) throws in - if !alwaysPrintEnumsAsInts, let n = v.name { - encoder.appendQuoted(name: n) - } else { - encoder.putEnumInt(value: v.rawValue) - } - } - } - } - - mutating func visitRepeatedMessageField(value: [M], fieldNumber: Int) throws { - assert(!value.isEmpty) - try startField(for: fieldNumber) - var comma = false - encoder.startArray() - if let _ = M.self as? _CustomJSONCodable.Type { - for v in value { - if comma { - encoder.comma() - } - comma = true - let json = try v.jsonString(options: options) - encoder.append(text: json) - } - } else if let newNameMap = (M.self as? _ProtoNameProviding.Type)?._protobuf_nameMap { - // Preserve name and extension maps for outer object - let oldNameMap = self.nameMap - let oldExtensions = self.extensions - self.nameMap = newNameMap - for v in value { - startArrayObject(message: v) - try v.traverse(visitor: &self) - encoder.endObject() - } - // Restore outer object's name and extension maps before returning - self.nameMap = oldNameMap - self.extensions = oldExtensions - } else { - throw JSONEncodingError.missingFieldNames - } - encoder.endArray() - } - - mutating func visitRepeatedGroupField(value: [G], fieldNumber: Int) throws { - assert(!value.isEmpty) - // Google does not serialize groups into JSON - } - - // Packed fields are handled the same as non-packed fields, so JSON just - // relies on the default implementations in Visitor.swift - - mutating func visitMapField(fieldType: _ProtobufMap.Type, value: _ProtobufMap.BaseType, fieldNumber: Int) throws { - try iterateAndEncode(map: value, fieldNumber: fieldNumber, isOrderedBefore: KeyType._lessThan) { - (visitor: inout JSONMapEncodingVisitor, key, value) throws -> () in - try KeyType.visitSingular(value: key, fieldNumber: 1, with: &visitor) - try ValueType.visitSingular(value: value, fieldNumber: 2, with: &visitor) - } - } - - mutating func visitMapField(fieldType: _ProtobufEnumMap.Type, value: _ProtobufEnumMap.BaseType, fieldNumber: Int) throws where ValueType.RawValue == Int { - try iterateAndEncode(map: value, fieldNumber: fieldNumber, isOrderedBefore: KeyType._lessThan) { - (visitor: inout JSONMapEncodingVisitor, key, value) throws -> () in - try KeyType.visitSingular(value: key, fieldNumber: 1, with: &visitor) - try visitor.visitSingularEnumField(value: value, fieldNumber: 2) - } - } - - mutating func visitMapField(fieldType: _ProtobufMessageMap.Type, value: _ProtobufMessageMap.BaseType, fieldNumber: Int) throws { - try iterateAndEncode(map: value, fieldNumber: fieldNumber, isOrderedBefore: KeyType._lessThan) { - (visitor: inout JSONMapEncodingVisitor, key, value) throws -> () in - try KeyType.visitSingular(value: key, fieldNumber: 1, with: &visitor) - try visitor.visitSingularMessageField(value: value, fieldNumber: 2) - } - } - - /// Helper to encapsulate the common structure of iterating over a map - /// and encoding the keys and values. - private mutating func iterateAndEncode( - map: Dictionary, - fieldNumber: Int, - isOrderedBefore: (K, K) -> Bool, - encode: (inout JSONMapEncodingVisitor, K, V) throws -> () - ) throws { - try startField(for: fieldNumber) - encoder.append(text: "{") - var mapVisitor = JSONMapEncodingVisitor(encoder: encoder, options: options) - if options.useDeterministicOrdering { - for (k,v) in map.sorted(by: { isOrderedBefore( $0.0, $1.0) }) { - try encode(&mapVisitor, k, v) - } - } else { - for (k,v) in map { - try encode(&mapVisitor, k, v) - } - } - encoder = mapVisitor.encoder - encoder.append(text: "}") - } - - /// Helper function that throws an error if the field number could not be - /// resolved. - private mutating func startField(for number: Int) throws { - let name: _NameMap.Name? - - if options.preserveProtoFieldNames { - name = nameMap.names(for: number)?.proto - } else { - name = nameMap.names(for: number)?.json - } - - if let name = name { - encoder.startField(name: name) - } else if let name = extensions?[number]?.protobufExtension.fieldName { - encoder.startExtensionField(name: name) - } else { - throw JSONEncodingError.missingFieldNames - } - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONMapEncodingVisitor.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONMapEncodingVisitor.swift deleted file mode 100644 index e15ac035..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONMapEncodingVisitor.swift +++ /dev/null @@ -1,174 +0,0 @@ -// Sources/SwiftProtobuf/JSONMapEncodingVisitor.swift - JSON map encoding visitor -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Visitor that writes out the key/value pairs for a JSON map. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// Visitor that serializes a message into JSON map format. -/// -/// This expects to alternately visit the keys and values for a JSON -/// map. It only accepts singular values. Keys should be identified -/// as `fieldNumber:1`, values should be identified as `fieldNumber:2` -/// -internal struct JSONMapEncodingVisitor: SelectiveVisitor { - private var separator: StaticString? - internal var encoder: JSONEncoder - private let options: JSONEncodingOptions - - init(encoder: JSONEncoder, options: JSONEncodingOptions) { - self.encoder = encoder - self.options = options - } - - private mutating func startKey() { - if let s = separator { - encoder.append(staticText: s) - } else { - separator = "," - } - } - - private mutating func startValue() { - encoder.append(staticText: ":") - } - - mutating func visitSingularFloatField(value: Float, fieldNumber: Int) throws { - // Doubles/Floats can never be map keys, only values - assert(fieldNumber == 2) - startValue() - encoder.putFloatValue(value: value) - } - - mutating func visitSingularDoubleField(value: Double, fieldNumber: Int) throws { - // Doubles/Floats can never be map keys, only values - assert(fieldNumber == 2) - startValue() - encoder.putDoubleValue(value: value) - } - - mutating func visitSingularInt32Field(value: Int32, fieldNumber: Int) throws { - if fieldNumber == 1 { - startKey() - encoder.putQuotedInt32(value: value) - } else { - startValue() - encoder.putInt32(value: value) - } - } - - mutating func visitSingularInt64Field(value: Int64, fieldNumber: Int) throws { - if fieldNumber == 1 { - startKey() - } else { - startValue() - } - // Int64 fields are always quoted anyway - encoder.putInt64(value: value) - } - - mutating func visitSingularUInt32Field(value: UInt32, fieldNumber: Int) throws { - if fieldNumber == 1 { - startKey() - encoder.putQuotedUInt32(value: value) - } else { - startValue() - encoder.putUInt32(value: value) - } - } - - mutating func visitSingularUInt64Field(value: UInt64, fieldNumber: Int) throws { - if fieldNumber == 1 { - startKey() - } else { - startValue() - } - encoder.putUInt64(value: value) - } - - mutating func visitSingularSInt32Field(value: Int32, fieldNumber: Int) throws { - try visitSingularInt32Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitSingularSInt64Field(value: Int64, fieldNumber: Int) throws { - try visitSingularInt64Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitSingularFixed32Field(value: UInt32, fieldNumber: Int) throws { - try visitSingularUInt32Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitSingularFixed64Field(value: UInt64, fieldNumber: Int) throws { - try visitSingularUInt64Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitSingularSFixed32Field(value: Int32, fieldNumber: Int) throws { - try visitSingularInt32Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitSingularSFixed64Field(value: Int64, fieldNumber: Int) throws { - try visitSingularInt64Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitSingularBoolField(value: Bool, fieldNumber: Int) throws { - if fieldNumber == 1 { - startKey() - encoder.putQuotedBoolValue(value: value) - } else { - startValue() - encoder.putBoolValue(value: value) - } - } - - mutating func visitSingularStringField(value: String, fieldNumber: Int) throws { - if fieldNumber == 1 { - startKey() - } else { - startValue() - } - encoder.putStringValue(value: value) - } - - mutating func visitSingularBytesField(value: Data, fieldNumber: Int) throws { - // Bytes can only be map values, never keys - assert(fieldNumber == 2) - startValue() - encoder.putBytesValue(value: value) - } - - mutating func visitSingularEnumField(value: E, fieldNumber: Int) throws { - // Enums can only be map values, never keys - assert(fieldNumber == 2) - startValue() - if !options.alwaysPrintEnumsAsInts, let n = value.name { - encoder.putStringValue(value: String(describing: n)) - } else { - encoder.putEnumInt(value: value.rawValue) - } - } - - mutating func visitSingularMessageField(value: M, fieldNumber: Int) throws { - // Messages can only be map values, never keys - assert(fieldNumber == 2) - startValue() - let json = try value.jsonString(options: options) - encoder.append(text: json) - } - - // SelectiveVisitor will block: - // - single Groups - // - everything repeated - // - everything packed - // - all maps - // - unknown fields - // - extensions -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONScanner.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONScanner.swift deleted file mode 100644 index 7de853cf..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/JSONScanner.swift +++ /dev/null @@ -1,1544 +0,0 @@ -// Sources/SwiftProtobuf/JSONScanner.swift - JSON format decoding -// -// Copyright (c) 2014 - 2019 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// JSON format decoding engine. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -private let asciiBell = UInt8(7) -private let asciiBackspace = UInt8(8) -private let asciiTab = UInt8(9) -private let asciiNewLine = UInt8(10) -private let asciiVerticalTab = UInt8(11) -private let asciiFormFeed = UInt8(12) -private let asciiCarriageReturn = UInt8(13) -private let asciiZero = UInt8(ascii: "0") -private let asciiOne = UInt8(ascii: "1") -private let asciiSeven = UInt8(ascii: "7") -private let asciiNine = UInt8(ascii: "9") -private let asciiColon = UInt8(ascii: ":") -private let asciiPeriod = UInt8(ascii: ".") -private let asciiPlus = UInt8(ascii: "+") -private let asciiComma = UInt8(ascii: ",") -private let asciiSemicolon = UInt8(ascii: ";") -private let asciiDoubleQuote = UInt8(ascii: "\"") -private let asciiSingleQuote = UInt8(ascii: "\'") -private let asciiBackslash = UInt8(ascii: "\\") -private let asciiForwardSlash = UInt8(ascii: "/") -private let asciiHash = UInt8(ascii: "#") -private let asciiEqualSign = UInt8(ascii: "=") -private let asciiUnderscore = UInt8(ascii: "_") -private let asciiQuestionMark = UInt8(ascii: "?") -private let asciiSpace = UInt8(ascii: " ") -private let asciiOpenSquareBracket = UInt8(ascii: "[") -private let asciiCloseSquareBracket = UInt8(ascii: "]") -private let asciiOpenCurlyBracket = UInt8(ascii: "{") -private let asciiCloseCurlyBracket = UInt8(ascii: "}") -private let asciiOpenAngleBracket = UInt8(ascii: "<") -private let asciiCloseAngleBracket = UInt8(ascii: ">") -private let asciiMinus = UInt8(ascii: "-") -private let asciiLowerA = UInt8(ascii: "a") -private let asciiUpperA = UInt8(ascii: "A") -private let asciiLowerB = UInt8(ascii: "b") -private let asciiLowerE = UInt8(ascii: "e") -private let asciiUpperE = UInt8(ascii: "E") -private let asciiLowerF = UInt8(ascii: "f") -private let asciiUpperI = UInt8(ascii: "I") -private let asciiLowerL = UInt8(ascii: "l") -private let asciiLowerN = UInt8(ascii: "n") -private let asciiUpperN = UInt8(ascii: "N") -private let asciiLowerR = UInt8(ascii: "r") -private let asciiLowerS = UInt8(ascii: "s") -private let asciiLowerT = UInt8(ascii: "t") -private let asciiLowerU = UInt8(ascii: "u") -private let asciiLowerZ = UInt8(ascii: "z") -private let asciiUpperZ = UInt8(ascii: "Z") - -private func fromHexDigit(_ c: UnicodeScalar) -> UInt32? { - let n = c.value - if n >= 48 && n <= 57 { - return UInt32(n - 48) - } - switch n { - case 65, 97: return 10 - case 66, 98: return 11 - case 67, 99: return 12 - case 68, 100: return 13 - case 69, 101: return 14 - case 70, 102: return 15 - default: - return nil - } -} - -// Decode both the RFC 4648 section 4 Base 64 encoding and the RFC -// 4648 section 5 Base 64 variant. The section 5 variant is also -// known as "base64url" or the "URL-safe alphabet". -// Note that both "-" and "+" decode to 62 and "/" and "_" both -// decode as 63. -let base64Values: [Int] = [ -/* 0x00 */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -/* 0x10 */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -/* 0x20 */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, 62, -1, 63, -/* 0x30 */ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -/* 0x40 */ -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -/* 0x50 */ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, 63, -/* 0x60 */ -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -/* 0x70 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, -/* 0x80 */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -/* 0x90 */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -/* 0xa0 */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -/* 0xb0 */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -/* 0xc0 */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -/* 0xd0 */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -/* 0xe0 */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -/* 0xf0 */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -] - -/// Returns a `Data` value containing bytes equivalent to the given -/// Base64-encoded string, or nil if the conversion fails. -/// -/// Notes on Google's implementation (Base64Unescape() in strutil.cc): -/// * Google's C++ implementation accepts arbitrary whitespace -/// mixed in with the base-64 characters -/// * Google's C++ implementation ignores missing '=' characters -/// but if present, there must be the exact correct number of them. -/// * The conformance test requires us to accept both standard RFC4648 -/// Base 64 encoding and the "URL and Filename Safe Alphabet" variant. -/// -private func parseBytes( - source: UnsafeRawBufferPointer, - index: inout UnsafeRawBufferPointer.Index, - end: UnsafeRawBufferPointer.Index -) throws -> Data { - let c = source[index] - if c != asciiDoubleQuote { - throw JSONDecodingError.malformedString - } - source.formIndex(after: &index) - - // Count the base-64 digits - // Ignore most unrecognized characters in this first pass, - // stop at the closing double quote. - let digitsStart = index - var rawChars = 0 - var sawSection4Characters = false - var sawSection5Characters = false - while index != end { - var digit = source[index] - if digit == asciiDoubleQuote { - break - } - - if digit == asciiBackslash { - source.formIndex(after: &index) - if index == end { - throw JSONDecodingError.malformedString - } - let escaped = source[index] - switch escaped { - case asciiLowerU: - // TODO: Parse hex escapes such as \u0041. Note that - // such escapes are going to be extremely rare, so - // there's little point in optimizing for them. - throw JSONDecodingError.malformedString - case asciiForwardSlash: - digit = escaped - default: - // Reject \b \f \n \r \t \" or \\ and all illegal escapes - throw JSONDecodingError.malformedString - } - } - - if digit == asciiPlus || digit == asciiForwardSlash { - sawSection4Characters = true - } else if digit == asciiMinus || digit == asciiUnderscore { - sawSection5Characters = true - } - let k = base64Values[Int(digit)] - if k >= 0 { - rawChars += 1 - } - source.formIndex(after: &index) - } - - // We reached the end without seeing the close quote - if index == end { - throw JSONDecodingError.malformedString - } - // Reject mixed encodings. - if sawSection4Characters && sawSection5Characters { - throw JSONDecodingError.malformedString - } - - // Allocate a Data object of exactly the right size - var value = Data(count: rawChars * 3 / 4) - - // Scan the digits again and populate the Data object. - // In this pass, we check for (and fail) if there are - // unexpected characters. But we don't check for end-of-input, - // because the loop above already verified that there was - // a closing double quote. - index = digitsStart - try value.withUnsafeMutableBytes { - (body: UnsafeMutableRawBufferPointer) in - if var p = body.baseAddress, body.count > 0 { - var n = 0 - var chars = 0 // # chars in current group - var padding = 0 // # padding '=' chars - digits: while true { - let digit = source[index] - var k = base64Values[Int(digit)] - if k < 0 { - switch digit { - case asciiDoubleQuote: - break digits - case asciiBackslash: - source.formIndex(after: &index) - let escaped = source[index] - switch escaped { - case asciiForwardSlash: - k = base64Values[Int(escaped)] - default: - // Note: Invalid backslash escapes were caught - // above; we should never get here. - throw JSONDecodingError.malformedString - } - case asciiSpace: - source.formIndex(after: &index) - continue digits - case asciiEqualSign: // Count padding - while true { - switch source[index] { - case asciiDoubleQuote: - break digits - case asciiSpace: - break - case 61: - padding += 1 - default: // Only '=' and whitespace permitted - throw JSONDecodingError.malformedString - } - source.formIndex(after: &index) - } - default: - throw JSONDecodingError.malformedString - } - } - n <<= 6 - n |= k - chars += 1 - if chars == 4 { - p[0] = UInt8(truncatingIfNeeded: n >> 16) - p[1] = UInt8(truncatingIfNeeded: n >> 8) - p[2] = UInt8(truncatingIfNeeded: n) - p += 3 - chars = 0 - n = 0 - } - source.formIndex(after: &index) - } - switch chars { - case 3: - p[0] = UInt8(truncatingIfNeeded: n >> 10) - p[1] = UInt8(truncatingIfNeeded: n >> 2) - if padding == 1 || padding == 0 { - return - } - case 2: - p[0] = UInt8(truncatingIfNeeded: n >> 4) - if padding == 2 || padding == 0 { - return - } - case 0: - if padding == 0 { - return - } - default: - break - } - throw JSONDecodingError.malformedString - } - } - source.formIndex(after: &index) - return value -} - -// JSON encoding allows a variety of \-escapes, including -// escaping UTF-16 code points (which may be surrogate pairs). -private func decodeString(_ s: String) -> String? { - var out = String.UnicodeScalarView() - var chars = s.unicodeScalars.makeIterator() - while let c = chars.next() { - switch c.value { - case UInt32(asciiBackslash): // backslash - if let escaped = chars.next() { - switch escaped.value { - case UInt32(asciiLowerU): // "\u" - // Exactly 4 hex digits: - if let digit1 = chars.next(), - let d1 = fromHexDigit(digit1), - let digit2 = chars.next(), - let d2 = fromHexDigit(digit2), - let digit3 = chars.next(), - let d3 = fromHexDigit(digit3), - let digit4 = chars.next(), - let d4 = fromHexDigit(digit4) { - let codePoint = ((d1 * 16 + d2) * 16 + d3) * 16 + d4 - if let scalar = UnicodeScalar(codePoint) { - out.append(scalar) - } else if codePoint < 0xD800 || codePoint >= 0xE000 { - // Not a valid Unicode scalar. - return nil - } else if codePoint >= 0xDC00 { - // Low surrogate without a preceding high surrogate. - return nil - } else { - // We have a high surrogate (in the range 0xD800..<0xDC00), so - // verify that it is followed by a low surrogate. - guard chars.next() == "\\", chars.next() == "u" else { - // High surrogate was not followed by a Unicode escape sequence. - return nil - } - if let digit1 = chars.next(), - let d1 = fromHexDigit(digit1), - let digit2 = chars.next(), - let d2 = fromHexDigit(digit2), - let digit3 = chars.next(), - let d3 = fromHexDigit(digit3), - let digit4 = chars.next(), - let d4 = fromHexDigit(digit4) { - let follower = ((d1 * 16 + d2) * 16 + d3) * 16 + d4 - guard 0xDC00 <= follower && follower < 0xE000 else { - // High surrogate was not followed by a low surrogate. - return nil - } - let high = codePoint - 0xD800 - let low = follower - 0xDC00 - let composed = 0x10000 | high << 10 | low - guard let composedScalar = UnicodeScalar(composed) else { - // Composed value is not a valid Unicode scalar. - return nil - } - out.append(composedScalar) - } else { - // Malformed \u escape for low surrogate - return nil - } - } - } else { - // Malformed \u escape - return nil - } - case UInt32(asciiLowerB): // \b - out.append("\u{08}") - case UInt32(asciiLowerF): // \f - out.append("\u{0c}") - case UInt32(asciiLowerN): // \n - out.append("\u{0a}") - case UInt32(asciiLowerR): // \r - out.append("\u{0d}") - case UInt32(asciiLowerT): // \t - out.append("\u{09}") - case UInt32(asciiDoubleQuote), UInt32(asciiBackslash), - UInt32(asciiForwardSlash): // " \ / - out.append(escaped) - default: - return nil // Unrecognized escape - } - } else { - return nil // Input ends with backslash - } - default: - out.append(c) - } - } - return String(out) -} - -/// -/// The basic scanner support is entirely private -/// -/// For performance, it works directly against UTF-8 bytes in memory. -/// -internal struct JSONScanner { - private let source: UnsafeRawBufferPointer - private var index: UnsafeRawBufferPointer.Index - private var numberParser = DoubleParser() - internal let options: JSONDecodingOptions - internal let extensions: ExtensionMap - internal var recursionBudget: Int - - /// True if the scanner has read all of the data from the source, with the - /// exception of any trailing whitespace (which is consumed by reading this - /// property). - internal var complete: Bool { - mutating get { - skipWhitespace() - return !hasMoreContent - } - } - - /// True if the scanner has not yet reached the end of the source. - private var hasMoreContent: Bool { - return index != source.endIndex - } - - /// The byte (UTF-8 code unit) at the scanner's current position. - private var currentByte: UInt8 { - return source[index] - } - - internal init( - source: UnsafeRawBufferPointer, - options: JSONDecodingOptions, - extensions: ExtensionMap? - ) { - self.source = source - self.index = source.startIndex - self.recursionBudget = options.messageDepthLimit - self.options = options - self.extensions = extensions ?? SimpleExtensionMap() - } - - internal mutating func incrementRecursionDepth() throws { - recursionBudget -= 1 - if recursionBudget < 0 { - throw JSONDecodingError.messageDepthLimit - } - } - - internal mutating func decrementRecursionDepth() { - recursionBudget += 1 - // This should never happen, if it does, something is probably corrupting memory, and - // simply throwing doesn't make much sense. - if recursionBudget > options.messageDepthLimit { - fatalError("Somehow JSONDecoding unwound more objects than it started") - } - } - - /// Advances the scanner to the next position in the source. - private mutating func advance() { - source.formIndex(after: &index) - } - - /// Skip whitespace - private mutating func skipWhitespace() { - while hasMoreContent { - let u = currentByte - switch u { - case asciiSpace, asciiTab, asciiNewLine, asciiCarriageReturn: - advance() - default: - return - } - } - } - - /// Returns (but does not consume) the next non-whitespace - /// character. This is used by google.protobuf.Value, for - /// example, for custom JSON parsing. - internal mutating func peekOneCharacter() throws -> Character { - skipWhitespace() - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - return Character(UnicodeScalar(UInt32(currentByte))!) - } - - // Parse the leading UInt64 from the provided utf8 bytes. - // - // This is called in three different situations: - // - // * Unquoted number. - // - // * Simple quoted number. If a number is quoted but has no - // backslashes, the caller can use this directly on the UTF8 by - // just verifying the quote marks. This code returns `nil` if it - // sees a backslash, in which case the caller will need to handle ... - // - // * Complex quoted number. In this case, the caller must parse the - // quoted value as a string, then convert the string to utf8 and - // use this to parse the result. This is slow but fortunately - // rare. - // - // In the common case where the number is written in integer form, - // this code does a simple straight conversion. If the number is in - // floating-point format, this uses a slower and less accurate - // approach: it identifies a substring comprising a float, and then - // uses Double() and UInt64() to convert that string to an unsigned - // integer. In particular, it cannot preserve full 64-bit integer - // values when they are written in floating-point format. - // - // If it encounters a "\" backslash character, it returns a nil. This - // is used by callers that are parsing quoted numbers. See nextSInt() - // and nextUInt() below. - private func parseBareUInt64( - source: UnsafeRawBufferPointer, - index: inout UnsafeRawBufferPointer.Index, - end: UnsafeRawBufferPointer.Index - ) throws -> UInt64? { - if index == end { - throw JSONDecodingError.truncated - } - let start = index - let c = source[index] - switch c { - case asciiZero: // 0 - source.formIndex(after: &index) - if index != end { - let after = source[index] - switch after { - case asciiZero...asciiNine: // 0...9 - // leading '0' forbidden unless it is the only digit - throw JSONDecodingError.leadingZero - case asciiPeriod, asciiLowerE, asciiUpperE: // . e - // Slow path: JSON numbers can be written in floating-point notation - index = start - if let d = try parseBareDouble(source: source, - index: &index, - end: end) { - if let u = UInt64(exactly: d) { - return u - } - } - throw JSONDecodingError.malformedNumber - case asciiBackslash: - return nil - default: - return 0 - } - } - return 0 - case asciiOne...asciiNine: // 1...9 - var n = 0 as UInt64 - while index != end { - let digit = source[index] - switch digit { - case asciiZero...asciiNine: // 0...9 - let val = UInt64(digit - asciiZero) - if n > UInt64.max / 10 || n * 10 > UInt64.max - val { - throw JSONDecodingError.numberRange - } - source.formIndex(after: &index) - n = n * 10 + val - case asciiPeriod, asciiLowerE, asciiUpperE: // . e - // Slow path: JSON allows floating-point notation for integers - index = start - if let d = try parseBareDouble(source: source, - index: &index, - end: end) { - if let u = UInt64(exactly: d) { - return u - } - } - throw JSONDecodingError.malformedNumber - case asciiBackslash: - return nil - default: - return n - } - } - return n - case asciiBackslash: - return nil - default: - throw JSONDecodingError.malformedNumber - } - } - - // Parse the leading Int64 from the provided utf8. - // - // This uses parseBareUInt64() to do the heavy lifting; - // we just check for a leading minus and negate the result - // as necessary. - // - // As with parseBareUInt64(), if it encounters a "\" backslash - // character, it returns a nil. This allows callers to use this to - // do a "fast-path" decode of simple quoted numbers by parsing the - // UTF8 directly, only falling back to a full String decode when - // absolutely necessary. - private func parseBareSInt64( - source: UnsafeRawBufferPointer, - index: inout UnsafeRawBufferPointer.Index, - end: UnsafeRawBufferPointer.Index - ) throws -> Int64? { - if index == end { - throw JSONDecodingError.truncated - } - let c = source[index] - if c == asciiMinus { // - - source.formIndex(after: &index) - if index == end { - throw JSONDecodingError.truncated - } - // character after '-' must be digit - let digit = source[index] - if digit < asciiZero || digit > asciiNine { - throw JSONDecodingError.malformedNumber - } - if let n = try parseBareUInt64(source: source, index: &index, end: end) { - let limit: UInt64 = 0x8000000000000000 // -Int64.min - if n >= limit { - if n > limit { - // Too large negative number - throw JSONDecodingError.numberRange - } else { - return Int64.min // Special case for Int64.min - } - } - return -Int64(bitPattern: n) - } else { - return nil - } - } else if let n = try parseBareUInt64(source: source, index: &index, end: end) { - if n > UInt64(bitPattern: Int64.max) { - throw JSONDecodingError.numberRange - } - return Int64(bitPattern: n) - } else { - return nil - } - } - - // Identify a floating-point token in the upcoming UTF8 bytes. - // - // This implements the full grammar defined by the JSON RFC 7159. - // Note that Swift's string-to-number conversions are much more - // lenient, so this is necessary if we want to accurately reject - // malformed JSON numbers. - // - // This is used by nextDouble() and nextFloat() to parse double and - // floating-point values, including values that happen to be in quotes. - // It's also used by the slow path in parseBareSInt64() and parseBareUInt64() - // above to handle integer values that are written in float-point notation. - private func parseBareDouble( - source: UnsafeRawBufferPointer, - index: inout UnsafeRawBufferPointer.Index, - end: UnsafeRawBufferPointer.Index - ) throws -> Double? { - // RFC 7159 defines the grammar for JSON numbers as: - // number = [ minus ] int [ frac ] [ exp ] - if index == end { - throw JSONDecodingError.truncated - } - let start = index - var c = source[index] - if c == asciiBackslash { - return nil - } - - // Optional leading minus sign - if c == asciiMinus { // - - source.formIndex(after: &index) - if index == end { - index = start - throw JSONDecodingError.truncated - } - c = source[index] - if c == asciiBackslash { - return nil - } - } else if c == asciiUpperN { // Maybe NaN? - // Return nil, let the caller deal with it. - return nil - } - - if c == asciiUpperI { // Maybe Infinity, Inf, -Infinity, or -Inf ? - // Return nil, let the caller deal with it. - return nil - } - - // Integer part can be zero or a series of digits not starting with zero - // int = zero / (digit1-9 *DIGIT) - switch c { - case asciiZero: - // First digit can be zero only if not followed by a digit - source.formIndex(after: &index) - if index == end { - return 0.0 - } - c = source[index] - if c == asciiBackslash { - return nil - } - if c >= asciiZero && c <= asciiNine { - throw JSONDecodingError.leadingZero - } - case asciiOne...asciiNine: - while c >= asciiZero && c <= asciiNine { - source.formIndex(after: &index) - if index == end { - if let d = numberParser.utf8ToDouble(bytes: source, start: start, end: index) { - return d - } else { - throw JSONDecodingError.invalidUTF8 - } - } - c = source[index] - if c == asciiBackslash { - return nil - } - } - default: - // Integer part cannot be empty - throw JSONDecodingError.malformedNumber - } - - // frac = decimal-point 1*DIGIT - if c == asciiPeriod { - source.formIndex(after: &index) - if index == end { - // decimal point must have a following digit - throw JSONDecodingError.truncated - } - c = source[index] - switch c { - case asciiZero...asciiNine: // 0...9 - while c >= asciiZero && c <= asciiNine { - source.formIndex(after: &index) - if index == end { - if let d = numberParser.utf8ToDouble(bytes: source, start: start, end: index) { - return d - } else { - throw JSONDecodingError.invalidUTF8 - } - } - c = source[index] - if c == asciiBackslash { - return nil - } - } - case asciiBackslash: - return nil - default: - // decimal point must be followed by at least one digit - throw JSONDecodingError.malformedNumber - } - } - - // exp = e [ minus / plus ] 1*DIGIT - if c == asciiLowerE || c == asciiUpperE { - source.formIndex(after: &index) - if index == end { - // "e" must be followed by +,-, or digit - throw JSONDecodingError.truncated - } - c = source[index] - if c == asciiBackslash { - return nil - } - if c == asciiPlus || c == asciiMinus { // + - - source.formIndex(after: &index) - if index == end { - // must be at least one digit in exponent - throw JSONDecodingError.truncated - } - c = source[index] - if c == asciiBackslash { - return nil - } - } - switch c { - case asciiZero...asciiNine: - while c >= asciiZero && c <= asciiNine { - source.formIndex(after: &index) - if index == end { - if let d = numberParser.utf8ToDouble(bytes: source, start: start, end: index) { - return d - } else { - throw JSONDecodingError.invalidUTF8 - } - } - c = source[index] - if c == asciiBackslash { - return nil - } - } - default: - // must be at least one digit in exponent - throw JSONDecodingError.malformedNumber - } - } - if let d = numberParser.utf8ToDouble(bytes: source, start: start, end: index) { - return d - } else { - throw JSONDecodingError.invalidUTF8 - } - } - - /// Returns a fully-parsed string with all backslash escapes - /// correctly processed, or nil if next token is not a string. - /// - /// Assumes the leading quote has been verified (but not consumed) - private mutating func parseOptionalQuotedString() -> String? { - // Caller has already asserted that currentByte == quote here - var sawBackslash = false - advance() - let start = index - while hasMoreContent { - switch currentByte { - case asciiDoubleQuote: // " - let s = utf8ToString(bytes: source, start: start, end: index) - advance() - if let t = s { - if sawBackslash { - return decodeString(t) - } else { - return t - } - } else { - return nil // Invalid UTF8 - } - case asciiBackslash: // \ - advance() - guard hasMoreContent else { - return nil // Unterminated escape - } - sawBackslash = true - default: - break - } - advance() - } - return nil // Unterminated quoted string - } - - /// Parse an unsigned integer, whether or not its quoted. - /// This also handles cases such as quoted numbers that have - /// backslash escapes in them. - /// - /// This supports the full range of UInt64 (whether quoted or not) - /// unless the number is written in floating-point format. In that - /// case, we decode it with only Double precision. - internal mutating func nextUInt() throws -> UInt64 { - skipWhitespace() - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - let c = currentByte - if c == asciiDoubleQuote { - let start = index - advance() - if let u = try parseBareUInt64(source: source, - index: &index, - end: source.endIndex) { - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - if currentByte != asciiDoubleQuote { - throw JSONDecodingError.malformedNumber - } - advance() - return u - } else { - // Couldn't parse because it had a "\" in the string, - // so parse out the quoted string and then reparse - // the result to get a UInt - index = start - let s = try nextQuotedString() - let raw = s.data(using: String.Encoding.utf8)! - let n = try raw.withUnsafeBytes { - (body: UnsafeRawBufferPointer) -> UInt64? in - if body.count > 0 { - var index = body.startIndex - let end = body.endIndex - if let u = try parseBareUInt64(source: body, - index: &index, - end: end) { - if index == end { - return u - } - } - } - return nil - } - if let n = n { - return n - } - } - } else if let u = try parseBareUInt64(source: source, - index: &index, - end: source.endIndex) { - return u - } - throw JSONDecodingError.malformedNumber - } - - /// Parse a signed integer, quoted or not, including handling - /// backslash escapes for quoted values. - /// - /// This supports the full range of Int64 (whether quoted or not) - /// unless the number is written in floating-point format. In that - /// case, we decode it with only Double precision. - internal mutating func nextSInt() throws -> Int64 { - skipWhitespace() - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - let c = currentByte - if c == asciiDoubleQuote { - let start = index - advance() - if let s = try parseBareSInt64(source: source, - index: &index, - end: source.endIndex) { - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - if currentByte != asciiDoubleQuote { - throw JSONDecodingError.malformedNumber - } - advance() - return s - } else { - // Couldn't parse because it had a "\" in the string, - // so parse out the quoted string and then reparse - // the result as an SInt - index = start - let s = try nextQuotedString() - let raw = s.data(using: String.Encoding.utf8)! - let n = try raw.withUnsafeBytes { - (body: UnsafeRawBufferPointer) -> Int64? in - if body.count > 0 { - var index = body.startIndex - let end = body.endIndex - if let s = try parseBareSInt64(source: body, - index: &index, - end: end) { - if index == end { - return s - } - } - } - return nil - } - if let n = n { - return n - } - } - } else if let s = try parseBareSInt64(source: source, - index: &index, - end: source.endIndex) { - return s - } - throw JSONDecodingError.malformedNumber - } - - /// Parse the next Float value, regardless of whether it - /// is quoted, including handling backslash escapes for - /// quoted strings. - internal mutating func nextFloat() throws -> Float { - skipWhitespace() - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - let c = currentByte - if c == asciiDoubleQuote { // " - let start = index - advance() - if let d = try parseBareDouble(source: source, - index: &index, - end: source.endIndex) { - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - if currentByte != asciiDoubleQuote { - throw JSONDecodingError.malformedNumber - } - advance() - return Float(d) - } else { - // Slow Path: parseBareDouble returned nil: It might be - // a valid float, but had something that - // parseBareDouble cannot directly handle. So we reset, - // try a full string parse, then examine the result: - index = start - let s = try nextQuotedString() - switch s { - case "NaN": return Float.nan - case "Inf": return Float.infinity - case "-Inf": return -Float.infinity - case "Infinity": return Float.infinity - case "-Infinity": return -Float.infinity - default: - let raw = s.data(using: String.Encoding.utf8)! - let n = try raw.withUnsafeBytes { - (body: UnsafeRawBufferPointer) -> Float? in - if body.count > 0 { - var index = body.startIndex - let end = body.endIndex - if let d = try parseBareDouble(source: body, - index: &index, - end: end) { - let f = Float(d) - if index == end && f.isFinite { - return f - } - } - } - return nil - } - if let n = n { - return n - } - } - } - } else { - if let d = try parseBareDouble(source: source, - index: &index, - end: source.endIndex) { - let f = Float(d) - if f.isFinite { - return f - } - } - } - throw JSONDecodingError.malformedNumber - } - - /// Parse the next Double value, regardless of whether it - /// is quoted, including handling backslash escapes for - /// quoted strings. - internal mutating func nextDouble() throws -> Double { - skipWhitespace() - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - let c = currentByte - if c == asciiDoubleQuote { // " - let start = index - advance() - if let d = try parseBareDouble(source: source, - index: &index, - end: source.endIndex) { - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - if currentByte != asciiDoubleQuote { - throw JSONDecodingError.malformedNumber - } - advance() - return d - } else { - // Slow Path: parseBareDouble returned nil: It might be - // a valid float, but had something that - // parseBareDouble cannot directly handle. So we reset, - // try a full string parse, then examine the result: - index = start - let s = try nextQuotedString() - switch s { - case "NaN": return Double.nan - case "Inf": return Double.infinity - case "-Inf": return -Double.infinity - case "Infinity": return Double.infinity - case "-Infinity": return -Double.infinity - default: - let raw = s.data(using: String.Encoding.utf8)! - let n = try raw.withUnsafeBytes { - (body: UnsafeRawBufferPointer) -> Double? in - if body.count > 0 { - var index = body.startIndex - let end = body.endIndex - if let d = try parseBareDouble(source: body, - index: &index, - end: end) { - if index == end { - return d - } - } - } - return nil - } - if let n = n { - return n - } - } - } - } else { - if let d = try parseBareDouble(source: source, - index: &index, - end: source.endIndex) { - return d - } - } - throw JSONDecodingError.malformedNumber - } - - /// Return the contents of the following quoted string, - /// or throw an error if the next token is not a string. - internal mutating func nextQuotedString() throws -> String { - skipWhitespace() - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - let c = currentByte - if c != asciiDoubleQuote { - throw JSONDecodingError.malformedString - } - if let s = parseOptionalQuotedString() { - return s - } else { - throw JSONDecodingError.malformedString - } - } - - /// Return the contents of the following quoted string, - /// or nil if the next token is not a string. - /// This will only throw an error if the next token starts - /// out as a string but is malformed in some way. - internal mutating func nextOptionalQuotedString() throws -> String? { - skipWhitespace() - guard hasMoreContent else { - return nil - } - let c = currentByte - if c != asciiDoubleQuote { - return nil - } - return try nextQuotedString() - } - - /// Return a Data with the decoded contents of the - /// following base-64 string. - /// - /// Notes on Google's implementation: - /// * Google's C++ implementation accepts arbitrary whitespace - /// mixed in with the base-64 characters - /// * Google's C++ implementation ignores missing '=' characters - /// but if present, there must be the exact correct number of them. - /// * Google's C++ implementation accepts both "regular" and - /// "web-safe" base-64 variants (it seems to prefer the - /// web-safe version as defined in RFC 4648 - internal mutating func nextBytesValue() throws -> Data { - skipWhitespace() - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - return try parseBytes(source: source, index: &index, end: source.endIndex) - } - - /// Private function to help parse keywords. - private mutating func skipOptionalKeyword(bytes: [UInt8]) -> Bool { - let start = index - for b in bytes { - guard hasMoreContent else { - index = start - return false - } - let c = currentByte - if c != b { - index = start - return false - } - advance() - } - if hasMoreContent { - let c = currentByte - if (c >= asciiUpperA && c <= asciiUpperZ) || - (c >= asciiLowerA && c <= asciiLowerZ) { - index = start - return false - } - } - return true - } - - /// If the next token is the identifier "null", consume it and return true. - internal mutating func skipOptionalNull() -> Bool { - skipWhitespace() - if hasMoreContent && currentByte == asciiLowerN { - return skipOptionalKeyword(bytes: [ - asciiLowerN, asciiLowerU, asciiLowerL, asciiLowerL - ]) - } - return false - } - - /// Return the following Bool "true" or "false", including - /// full processing of quoted boolean values. (Used in map - /// keys, for instance.) - internal mutating func nextBool() throws -> Bool { - skipWhitespace() - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - let c = currentByte - switch c { - case asciiLowerF: // f - if skipOptionalKeyword(bytes: [ - asciiLowerF, asciiLowerA, asciiLowerL, asciiLowerS, asciiLowerE - ]) { - return false - } - case asciiLowerT: // t - if skipOptionalKeyword(bytes: [ - asciiLowerT, asciiLowerR, asciiLowerU, asciiLowerE - ]) { - return true - } - default: - break - } - throw JSONDecodingError.malformedBool - } - - /// Return the following Bool "true" or "false", including - /// full processing of quoted boolean values. (Used in map - /// keys, for instance.) - internal mutating func nextQuotedBool() throws -> Bool { - skipWhitespace() - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - if currentByte != asciiDoubleQuote { - throw JSONDecodingError.unquotedMapKey - } - if let s = parseOptionalQuotedString() { - switch s { - case "false": return false - case "true": return true - default: break - } - } - throw JSONDecodingError.malformedBool - } - - /// Returns pointer/count spanning the UTF8 bytes of the next regular - /// key or nil if the key contains a backslash (and therefore requires - /// the full string-parsing logic to properly parse). - private mutating func nextOptionalKey() throws -> UnsafeRawBufferPointer? { - skipWhitespace() - let stringStart = index - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - if currentByte != asciiDoubleQuote { - return nil - } - advance() - let nameStart = index - while hasMoreContent && currentByte != asciiDoubleQuote { - if currentByte == asciiBackslash { - index = stringStart // Reset to open quote - return nil - } - advance() - } - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - let buff = UnsafeRawBufferPointer( - start: source.baseAddress! + nameStart, - count: index - nameStart) - advance() - return buff - } - - /// Parse a field name, look it up in the provided field name map, - /// and return the corresponding field number. - /// - /// Throws if field name cannot be parsed. - /// If it encounters an unknown field name, it throws - /// unless `options.ignoreUnknownFields` is set, in which case - /// it silently skips it. - internal mutating func nextFieldNumber( - names: _NameMap, - messageType: Message.Type - ) throws -> Int? { - while true { - var fieldName: String - if let key = try nextOptionalKey() { - // Fast path: We parsed it as UTF8 bytes... - try skipRequiredCharacter(asciiColon) // : - if let fieldNumber = names.number(forJSONName: key) { - return fieldNumber - } - if let s = utf8ToString(bytes: key.baseAddress!, count: key.count) { - fieldName = s - } else { - throw JSONDecodingError.invalidUTF8 - } - } else { - // Slow path: We parsed a String; lookups from String are slower. - fieldName = try nextQuotedString() - try skipRequiredCharacter(asciiColon) // : - if let fieldNumber = names.number(forJSONName: fieldName) { - return fieldNumber - } - } - if let first = fieldName.utf8.first, first == UInt8(ascii: "["), - let last = fieldName.utf8.last, last == UInt8(ascii: "]") - { - fieldName.removeFirst() - fieldName.removeLast() - if let fieldNumber = extensions.fieldNumberForProto(messageType: messageType, protoFieldName: fieldName) { - return fieldNumber - } - } - if !options.ignoreUnknownFields { - throw JSONDecodingError.unknownField(fieldName) - } - // Unknown field, skip it and try to parse the next field name - try skipValue() - if skipOptionalObjectEnd() { - return nil - } - try skipRequiredComma() - } - } - - /// Parse the next token as a string or numeric enum value. Throws - /// unrecognizedEnumValue if the string/number can't initialize the - /// enum. Will throw other errors if the JSON is malformed. - internal mutating func nextEnumValue() throws -> E? { - func throwOrIgnore() throws -> E? { - if options.ignoreUnknownFields { - return nil - } else { - throw JSONDecodingError.unrecognizedEnumValue - } - } - skipWhitespace() - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - if currentByte == asciiDoubleQuote { - if let name = try nextOptionalKey() { - if let e = E(rawUTF8: name) { - return e - } else { - return try throwOrIgnore() - } - } - let name = try nextQuotedString() - if let e = E(name: name) { - return e - } else { - return try throwOrIgnore() - } - } else { - let n = try nextSInt() - if let i = Int(exactly: n) { - if let e = E(rawValue: i) { - return e - } else { - return try throwOrIgnore() - } - } else { - throw JSONDecodingError.numberRange - } - } - } - - /// Helper for skipping a single-character token. - private mutating func skipRequiredCharacter(_ required: UInt8) throws { - skipWhitespace() - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - let next = currentByte - if next == required { - advance() - return - } - throw JSONDecodingError.failure - } - - /// Skip "{", throw if that's not the next character - internal mutating func skipRequiredObjectStart() throws { - try skipRequiredCharacter(asciiOpenCurlyBracket) // { - try incrementRecursionDepth() - } - - /// Skip ",", throw if that's not the next character - internal mutating func skipRequiredComma() throws { - try skipRequiredCharacter(asciiComma) - } - - /// Skip ":", throw if that's not the next character - internal mutating func skipRequiredColon() throws { - try skipRequiredCharacter(asciiColon) - } - - /// Skip "[", throw if that's not the next character - internal mutating func skipRequiredArrayStart() throws { - try skipRequiredCharacter(asciiOpenSquareBracket) // [ - } - - /// Helper for skipping optional single-character tokens - private mutating func skipOptionalCharacter(_ c: UInt8) -> Bool { - skipWhitespace() - if hasMoreContent && currentByte == c { - advance() - return true - } - return false - } - - /// If the next non-whitespace character is "[", skip it - /// and return true. Otherwise, return false. - internal mutating func skipOptionalArrayStart() -> Bool { - return skipOptionalCharacter(asciiOpenSquareBracket) - } - - /// If the next non-whitespace character is "]", skip it - /// and return true. Otherwise, return false. - internal mutating func skipOptionalArrayEnd() -> Bool { - return skipOptionalCharacter(asciiCloseSquareBracket) // ] - } - - /// If the next non-whitespace character is "}", skip it - /// and return true. Otherwise, return false. - internal mutating func skipOptionalObjectEnd() -> Bool { - let result = skipOptionalCharacter(asciiCloseCurlyBracket) // } - if result { - decrementRecursionDepth() - } - return result - } - - /// Return the next complete JSON structure as a string. - /// For example, this might return "true", or "123.456", - /// or "{\"foo\": 7, \"bar\": [8, 9]}" - /// - /// Used by Any to get the upcoming JSON value as a string. - /// Note: The value might be an object or array. - internal mutating func skip() throws -> String { - skipWhitespace() - let start = index - try skipValue() - if let s = utf8ToString(bytes: source, start: start, end: index) { - return s - } else { - throw JSONDecodingError.invalidUTF8 - } - } - - /// Advance index past the next value. This is used - /// by skip() and by unknown field handling. - /// Note: This handles objects {...} recursively but arrays [...] non-recursively - /// This avoids us requiring excessive stack space for deeply nested - /// arrays (which are not included in the recursion budget check). - private mutating func skipValue() throws { - skipWhitespace() - var totalArrayDepth = 0 - while true { - var arrayDepth = 0 - while skipOptionalArrayStart() { - arrayDepth += 1 - } - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - switch currentByte { - case asciiDoubleQuote: // " begins a string - try skipString() - case asciiOpenCurlyBracket: // { begins an object - try skipObject() - case asciiCloseSquareBracket: // ] ends an empty array - if arrayDepth == 0 { - throw JSONDecodingError.failure - } - // We also close out [[]] or [[[]]] here - while arrayDepth > 0 && skipOptionalArrayEnd() { - arrayDepth -= 1 - } - case asciiLowerN: // n must be null - if !skipOptionalKeyword(bytes: [ - asciiLowerN, asciiLowerU, asciiLowerL, asciiLowerL - ]) { - throw JSONDecodingError.truncated - } - case asciiLowerF: // f must be false - if !skipOptionalKeyword(bytes: [ - asciiLowerF, asciiLowerA, asciiLowerL, asciiLowerS, asciiLowerE - ]) { - throw JSONDecodingError.truncated - } - case asciiLowerT: // t must be true - if !skipOptionalKeyword(bytes: [ - asciiLowerT, asciiLowerR, asciiLowerU, asciiLowerE - ]) { - throw JSONDecodingError.truncated - } - default: // everything else is a number token - _ = try nextDouble() - } - totalArrayDepth += arrayDepth - while totalArrayDepth > 0 && skipOptionalArrayEnd() { - totalArrayDepth -= 1 - } - if totalArrayDepth > 0 { - try skipRequiredComma() - } else { - return - } - } - } - - /// Advance the index past the next complete {...} construct. - private mutating func skipObject() throws { - try skipRequiredObjectStart() - if skipOptionalObjectEnd() { - return - } - while true { - skipWhitespace() - try skipString() - try skipRequiredColon() - try skipValue() - if skipOptionalObjectEnd() { - return - } - try skipRequiredComma() - } - } - - /// Advance the index past the next complete quoted string. - /// - // Caveat: This does not fully validate; it will accept - // strings that have malformed \ escapes. - // - // It would be nice to do better, but I don't think it's critical, - // since there are many reasons that strings (and other tokens for - // that matter) may be skippable but not parseable. For example: - // Old clients that don't know new field types will skip fields - // they don't know; newer clients may reject the same input due to - // schema mismatches or other issues. - private mutating func skipString() throws { - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - if currentByte != asciiDoubleQuote { - throw JSONDecodingError.malformedString - } - advance() - while hasMoreContent { - let c = currentByte - switch c { - case asciiDoubleQuote: - advance() - return - case asciiBackslash: - advance() - guard hasMoreContent else { - throw JSONDecodingError.truncated - } - advance() - default: - advance() - } - } - throw JSONDecodingError.truncated - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/MathUtils.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/MathUtils.swift deleted file mode 100644 index 2e8550b9..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/MathUtils.swift +++ /dev/null @@ -1,40 +0,0 @@ -// Sources/SwiftProtobuf/MathUtils.swift - Generally useful mathematical functions -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Generally useful mathematical and arithmetic functions. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// Remainder in standard modular arithmetic (modulo). This coincides with (%) -/// when a > 0. -/// -/// - Parameters: -/// - a: The dividend. Can be positive, 0 or negative. -/// - b: The divisor. This must be positive, and is an error if 0 or negative. -/// - Returns: The unique value r such that 0 <= r < b and b * q + r = a for some q. -internal func mod(_ a: T, _ b: T) -> T { - assert(b > 0) - let r = a % b - return r >= 0 ? r : r + b -} - -/// Quotient in standard modular arithmetic (Euclidean division). This coincides -/// with (/) when a > 0. -/// -/// - Parameters: -/// - a: The dividend. Can be positive, 0 or negative. -/// - b: The divisor. This must be positive, and is an error if 0 or negative. -/// - Returns: The unique value q such that for some 0 <= r < b, b * q + r = a. -internal func div(_ a: T, _ b: T) -> T { - assert(b > 0) - return a >= 0 ? a / b : (a + 1) / b - 1 -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+AnyAdditions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+AnyAdditions.swift deleted file mode 100644 index 67d31782..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+AnyAdditions.swift +++ /dev/null @@ -1,45 +0,0 @@ -// Sources/SwiftProtobuf/Message+AnyAdditions.swift - Any-related Message extensions -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Extends the `Message` type with `Google_Protobuf_Any`-specific behavior. -/// -// ----------------------------------------------------------------------------- - -extension Message { - /// Initialize this message from the provided `google.protobuf.Any` - /// well-known type. - /// - /// This corresponds to the `unpack` method in the Google C++ API. - /// - /// If the Any object was decoded from Protobuf Binary or JSON - /// format, then the enclosed field data was stored and is not - /// fully decoded until you unpack the Any object into a message. - /// As such, this method will typically need to perform a full - /// deserialization of the enclosed data and can fail for any - /// reason that deserialization can fail. - /// - /// See `Google_Protobuf_Any.unpackTo()` for more discussion. - /// - /// - Parameter unpackingAny: the message to decode. - /// - Parameter extensions: An `ExtensionMap` used to look up and decode any - /// extensions in this message or messages nested within this message's - /// fields. - /// - Parameter options: The BinaryDecodingOptions to use. - /// - Throws: an instance of `AnyUnpackError`, `JSONDecodingError`, or - /// `BinaryDecodingError` on failure. - public init( - unpackingAny: Google_Protobuf_Any, - extensions: ExtensionMap? = nil, - options: BinaryDecodingOptions = BinaryDecodingOptions() - ) throws { - self.init() - try unpackingAny._storage.unpackTo(target: &self, extensions: extensions, options: options) - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+BinaryAdditions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+BinaryAdditions.swift deleted file mode 100644 index c0a48069..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+BinaryAdditions.swift +++ /dev/null @@ -1,239 +0,0 @@ -// Sources/SwiftProtobuf/Message+BinaryAdditions.swift - Per-type binary coding -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Extensions to `Message` to provide binary coding and decoding. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// Binary encoding and decoding methods for messages. -extension Message { - /// Returns a `Data` value containing the Protocol Buffer binary format - /// serialization of the message. - /// - /// - Parameters: - /// - partial: If `false` (the default), this method will check - /// `Message.isInitialized` before encoding to verify that all required - /// fields are present. If any are missing, this method throws. - /// `BinaryEncodingError.missingRequiredFields`. - /// - Returns: A `Data` value containing the binary serialization of the - /// message. - /// - Throws: `BinaryEncodingError` if encoding fails. - public func serializedData(partial: Bool = false) throws -> Data { - return try serializedData(partial: partial, options: BinaryEncodingOptions()) - } - - /// Returns a `Data` value containing the Protocol Buffer binary format - /// serialization of the message. - /// - /// - Parameters: - /// - partial: If `false` (the default), this method will check - /// `Message.isInitialized` before encoding to verify that all required - /// fields are present. If any are missing, this method throws. - /// `BinaryEncodingError.missingRequiredFields`. - /// - options: The `BinaryEncodingOptions` to use. - /// - Returns: A `SwiftProtobufContiguousBytes` instance containing the binary serialization - /// of the message. - /// - /// - Throws: `BinaryEncodingError` if encoding fails. - public func serializedData( - partial: Bool = false, - options: BinaryEncodingOptions - ) throws -> Data { - if !partial && !isInitialized { - throw BinaryEncodingError.missingRequiredFields - } - - // Note that this assumes `options` will not change the required size. - let requiredSize = try serializedDataSize() - - // Messages have a 2GB limit in encoded size, the upstread C++ code - // (message_lite, etc.) does this enforcement also. - // https://protobuf.dev/programming-guides/encoding/#cheat-sheet - // - // Testing here enables the limit without adding extra conditionals to all - // the places that encode message fields (or strings/bytes fields), keeping - // the overhead of the check to a minimum. - guard requiredSize < 0x7fffffff else { - // Adding a new error is a breaking change. - throw BinaryEncodingError.missingRequiredFields - } - - var data = Data(count: requiredSize) - try data.withUnsafeMutableBytes { (body: UnsafeMutableRawBufferPointer) in - if let baseAddress = body.baseAddress, body.count > 0 { - var visitor = BinaryEncodingVisitor(forWritingInto: baseAddress, options: options) - try traverse(visitor: &visitor) - // Currently not exposing this from the api because it really would be - // an internal error in the library and should never happen. - assert(requiredSize == visitor.encoder.distance(pointer: baseAddress)) - } - } - return data - } - - /// Returns the size in bytes required to encode the message in binary format. - /// This is used by `serializedData()` to precalculate the size of the buffer - /// so that encoding can proceed without bounds checks or reallocation. - internal func serializedDataSize() throws -> Int { - // Note: since this api is internal, it doesn't currently worry about - // needing a partial argument to handle proto2 syntax required fields. - // If this become public, it will need that added. - var visitor = BinaryEncodingSizeVisitor() - try traverse(visitor: &visitor) - return visitor.serializedSize - } - - /// Creates a new message by decoding the given `Data` value containing a - /// serialized message in Protocol Buffer binary format. - /// - /// - Parameters: - /// - serializedData: The binary-encoded message data to decode. - /// - extensions: An `ExtensionMap` used to look up and decode any - /// extensions in this message or messages nested within this message's - /// fields. - /// - partial: If `false` (the default), this method will check - /// `Message.isInitialized` after decoding to verify that all required - /// fields are present. If any are missing, this method throws - /// `BinaryDecodingError.missingRequiredFields`. - /// - options: The BinaryDecodingOptions to use. - /// - Throws: `BinaryDecodingError` if decoding fails. - @inlinable - public init( - serializedData data: Data, - extensions: ExtensionMap? = nil, - partial: Bool = false, - options: BinaryDecodingOptions = BinaryDecodingOptions() - ) throws { - self.init() -#if swift(>=5.0) - try merge(contiguousBytes: data, extensions: extensions, partial: partial, options: options) -#else - try merge(serializedData: data, extensions: extensions, partial: partial, options: options) -#endif - } - -#if swift(>=5.0) - /// Creates a new message by decoding the given `ContiguousBytes` value - /// containing a serialized message in Protocol Buffer binary format. - /// - /// - Parameters: - /// - contiguousBytes: The binary-encoded message data to decode. - /// - extensions: An `ExtensionMap` used to look up and decode any - /// extensions in this message or messages nested within this message's - /// fields. - /// - partial: If `false` (the default), this method will check - /// `Message.isInitialized` before encoding to verify that all required - /// fields are present. If any are missing, this method throws - /// `BinaryEncodingError.missingRequiredFields`. - /// - options: The BinaryDecodingOptions to use. - /// - Throws: `BinaryDecodingError` if decoding fails. - @inlinable - public init( - contiguousBytes bytes: Bytes, - extensions: ExtensionMap? = nil, - partial: Bool = false, - options: BinaryDecodingOptions = BinaryDecodingOptions() - ) throws { - self.init() - try merge(contiguousBytes: bytes, extensions: extensions, partial: partial, options: options) - } -#endif // #if swift(>=5.0) - - /// Updates the message by decoding the given `Data` value containing a - /// serialized message in Protocol Buffer binary format into the receiver. - /// - /// - Note: If this method throws an error, the message may still have been - /// partially mutated by the binary data that was decoded before the error - /// occurred. - /// - /// - Parameters: - /// - serializedData: The binary-encoded message data to decode. - /// - extensions: An `ExtensionMap` used to look up and decode any - /// extensions in this message or messages nested within this message's - /// fields. - /// - partial: If `false` (the default), this method will check - /// `Message.isInitialized` before encoding to verify that all required - /// fields are present. If any are missing, this method throws - /// `BinaryEncodingError.missingRequiredFields`. - /// - options: The BinaryDecodingOptions to use. - /// - Throws: `BinaryDecodingError` if decoding fails. - @inlinable - public mutating func merge( - serializedData data: Data, - extensions: ExtensionMap? = nil, - partial: Bool = false, - options: BinaryDecodingOptions = BinaryDecodingOptions() - ) throws { -#if swift(>=5.0) - try merge(contiguousBytes: data, extensions: extensions, partial: partial, options: options) -#else - try data.withUnsafeBytes { (body: UnsafeRawBufferPointer) in - try _merge(rawBuffer: body, extensions: extensions, partial: partial, options: options) - } -#endif // swift(>=5.0) - } - -#if swift(>=5.0) - /// Updates the message by decoding the given `ContiguousBytes` value - /// containing a serialized message in Protocol Buffer binary format into the - /// receiver. - /// - /// - Note: If this method throws an error, the message may still have been - /// partially mutated by the binary data that was decoded before the error - /// occurred. - /// - /// - Parameters: - /// - contiguousBytes: The binary-encoded message data to decode. - /// - extensions: An `ExtensionMap` used to look up and decode any - /// extensions in this message or messages nested within this message's - /// fields. - /// - partial: If `false` (the default), this method will check - /// `Message.isInitialized` after decoding to verify that all required - /// fields are present. If any are missing, this method throws - /// `BinaryDecodingError.missingRequiredFields`. - /// - options: The BinaryDecodingOptions to use. - /// - Throws: `BinaryDecodingError` if decoding fails. - @inlinable - public mutating func merge( - contiguousBytes bytes: Bytes, - extensions: ExtensionMap? = nil, - partial: Bool = false, - options: BinaryDecodingOptions = BinaryDecodingOptions() - ) throws { - try bytes.withUnsafeBytes { (body: UnsafeRawBufferPointer) in - try _merge(rawBuffer: body, extensions: extensions, partial: partial, options: options) - } - } -#endif // swift(>=5.0) - - // Helper for `merge()`s to keep the Decoder internal to SwiftProtobuf while - // allowing the generic over ContiguousBytes to get better codegen from the - // compiler by being `@inlinable`. - @usableFromInline - internal mutating func _merge( - rawBuffer body: UnsafeRawBufferPointer, - extensions: ExtensionMap?, - partial: Bool, - options: BinaryDecodingOptions - ) throws { - if let baseAddress = body.baseAddress, body.count > 0 { - var decoder = BinaryDecoder(forReadingFrom: baseAddress, - count: body.count, - options: options, - extensions: extensions) - try decoder.decodeFullMessage(message: &self) - } - if !partial && !isInitialized { - throw BinaryDecodingError.missingRequiredFields - } - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+JSONAdditions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+JSONAdditions.swift deleted file mode 100644 index 56236db7..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+JSONAdditions.swift +++ /dev/null @@ -1,150 +0,0 @@ -// Sources/SwiftProtobuf/Message+JSONAdditions.swift - JSON format primitive types -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Extensions to `Message` to support JSON encoding/decoding. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// JSON encoding and decoding methods for messages. -extension Message { - /// Returns a string containing the JSON serialization of the message. - /// - /// Unlike binary encoding, presence of required fields is not enforced when - /// serializing to JSON. - /// - /// - Returns: A string containing the JSON serialization of the message. - /// - Parameters: - /// - options: The JSONEncodingOptions to use. - /// - Throws: `JSONEncodingError` if encoding fails. - public func jsonString( - options: JSONEncodingOptions = JSONEncodingOptions() - ) throws -> String { - if let m = self as? _CustomJSONCodable { - return try m.encodedJSONString(options: options) - } - let data = try jsonUTF8Data(options: options) - return String(data: data, encoding: String.Encoding.utf8)! - } - - /// Returns a Data containing the UTF-8 JSON serialization of the message. - /// - /// Unlike binary encoding, presence of required fields is not enforced when - /// serializing to JSON. - /// - /// - Returns: A Data containing the JSON serialization of the message. - /// - Parameters: - /// - options: The JSONEncodingOptions to use. - /// - Throws: `JSONEncodingError` if encoding fails. - public func jsonUTF8Data( - options: JSONEncodingOptions = JSONEncodingOptions() - ) throws -> Data { - if let m = self as? _CustomJSONCodable { - let string = try m.encodedJSONString(options: options) - let data = string.data(using: String.Encoding.utf8)! // Cannot fail! - return data - } - var visitor = try JSONEncodingVisitor(type: Self.self, options: options) - visitor.startObject(message: self) - try traverse(visitor: &visitor) - visitor.endObject() - return visitor.dataResult - } - - /// Creates a new message by decoding the given string containing a - /// serialized message in JSON format. - /// - /// - Parameter jsonString: The JSON-formatted string to decode. - /// - Parameter options: The JSONDecodingOptions to use. - /// - Throws: `JSONDecodingError` if decoding fails. - public init( - jsonString: String, - options: JSONDecodingOptions = JSONDecodingOptions() - ) throws { - try self.init(jsonString: jsonString, extensions: nil, options: options) - } - - /// Creates a new message by decoding the given string containing a - /// serialized message in JSON format. - /// - /// - Parameter jsonString: The JSON-formatted string to decode. - /// - Parameter extensions: An ExtensionMap for looking up extensions by name - /// - Parameter options: The JSONDecodingOptions to use. - /// - Throws: `JSONDecodingError` if decoding fails. - public init( - jsonString: String, - extensions: ExtensionMap? = nil, - options: JSONDecodingOptions = JSONDecodingOptions() - ) throws { - if jsonString.isEmpty { - throw JSONDecodingError.truncated - } - if let data = jsonString.data(using: String.Encoding.utf8) { - try self.init(jsonUTF8Data: data, extensions: extensions, options: options) - } else { - throw JSONDecodingError.truncated - } - } - - /// Creates a new message by decoding the given `Data` containing a - /// serialized message in JSON format, interpreting the data as UTF-8 encoded - /// text. - /// - /// - Parameter jsonUTF8Data: The JSON-formatted data to decode, represented - /// as UTF-8 encoded text. - /// - Parameter options: The JSONDecodingOptions to use. - /// - Throws: `JSONDecodingError` if decoding fails. - public init( - jsonUTF8Data: Data, - options: JSONDecodingOptions = JSONDecodingOptions() - ) throws { - try self.init(jsonUTF8Data: jsonUTF8Data, extensions: nil, options: options) - } - - /// Creates a new message by decoding the given `Data` containing a - /// serialized message in JSON format, interpreting the data as UTF-8 encoded - /// text. - /// - /// - Parameter jsonUTF8Data: The JSON-formatted data to decode, represented - /// as UTF-8 encoded text. - /// - Parameter extensions: The extension map to use with this decode - /// - Parameter options: The JSONDecodingOptions to use. - /// - Throws: `JSONDecodingError` if decoding fails. - public init( - jsonUTF8Data: Data, - extensions: ExtensionMap? = nil, - options: JSONDecodingOptions = JSONDecodingOptions() - ) throws { - self.init() - try jsonUTF8Data.withUnsafeBytes { (body: UnsafeRawBufferPointer) in - // Empty input is valid for binary, but not for JSON. - guard body.count > 0 else { - throw JSONDecodingError.truncated - } - var decoder = JSONDecoder(source: body, options: options, - messageType: Self.self, extensions: extensions) - if decoder.scanner.skipOptionalNull() { - if let customCodable = Self.self as? _CustomJSONCodable.Type, - let message = try customCodable.decodedFromJSONNull() { - self = message as! Self - } else { - throw JSONDecodingError.illegalNull - } - } else { - try decoder.decodeFullObject(message: &self) - } - if !decoder.scanner.complete { - throw JSONDecodingError.trailingGarbage - } - } - } -} - diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+JSONArrayAdditions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+JSONArrayAdditions.swift deleted file mode 100644 index 4579bf43..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+JSONArrayAdditions.swift +++ /dev/null @@ -1,146 +0,0 @@ -// Sources/SwiftProtobuf/Array+JSONAdditions.swift - JSON format primitive types -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Extensions to `Array` to support JSON encoding/decoding. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// JSON encoding and decoding methods for arrays of messages. -extension Message { - /// Returns a string containing the JSON serialization of the messages. - /// - /// Unlike binary encoding, presence of required fields is not enforced when - /// serializing to JSON. - /// - /// - Returns: A string containing the JSON serialization of the messages. - /// - Parameters: - /// - collection: The list of messages to encode. - /// - options: The JSONEncodingOptions to use. - /// - Throws: `JSONEncodingError` if encoding fails. - public static func jsonString( - from collection: C, - options: JSONEncodingOptions = JSONEncodingOptions() - ) throws -> String where C.Iterator.Element == Self { - let data = try jsonUTF8Data(from: collection, options: options) - return String(data: data, encoding: String.Encoding.utf8)! - } - - /// Returns a Data containing the UTF-8 JSON serialization of the messages. - /// - /// Unlike binary encoding, presence of required fields is not enforced when - /// serializing to JSON. - /// - /// - Returns: A Data containing the JSON serialization of the messages. - /// - Parameters: - /// - collection: The list of messages to encode. - /// - options: The JSONEncodingOptions to use. - /// - Throws: `JSONEncodingError` if encoding fails. - public static func jsonUTF8Data( - from collection: C, - options: JSONEncodingOptions = JSONEncodingOptions() - ) throws -> Data where C.Iterator.Element == Self { - var visitor = try JSONEncodingVisitor(type: Self.self, options: options) - visitor.startArray() - for message in collection { - visitor.startArrayObject(message: message) - try message.traverse(visitor: &visitor) - visitor.endObject() - } - visitor.endArray() - return visitor.dataResult - } - - /// Creates a new array of messages by decoding the given string containing a - /// serialized array of messages in JSON format. - /// - /// - Parameter jsonString: The JSON-formatted string to decode. - /// - Parameter options: The JSONDecodingOptions to use. - /// - Throws: `JSONDecodingError` if decoding fails. - public static func array( - fromJSONString jsonString: String, - options: JSONDecodingOptions = JSONDecodingOptions() - ) throws -> [Self] { - return try self.array(fromJSONString: jsonString, - extensions: SimpleExtensionMap(), - options: options) - } - - /// Creates a new array of messages by decoding the given string containing a - /// serialized array of messages in JSON format. - /// - /// - Parameter jsonString: The JSON-formatted string to decode. - /// - Parameter extensions: The extension map to use with this decode - /// - Parameter options: The JSONDecodingOptions to use. - /// - Throws: `JSONDecodingError` if decoding fails. - public static func array( - fromJSONString jsonString: String, - extensions: ExtensionMap = SimpleExtensionMap(), - options: JSONDecodingOptions = JSONDecodingOptions() - ) throws -> [Self] { - if jsonString.isEmpty { - throw JSONDecodingError.truncated - } - if let data = jsonString.data(using: String.Encoding.utf8) { - return try array(fromJSONUTF8Data: data, extensions: extensions, options: options) - } else { - throw JSONDecodingError.truncated - } - } - - /// Creates a new array of messages by decoding the given `Data` containing a - /// serialized array of messages in JSON format, interpreting the data as - /// UTF-8 encoded text. - /// - /// - Parameter jsonUTF8Data: The JSON-formatted data to decode, represented - /// as UTF-8 encoded text. - /// - Parameter options: The JSONDecodingOptions to use. - /// - Throws: `JSONDecodingError` if decoding fails. - public static func array( - fromJSONUTF8Data jsonUTF8Data: Data, - options: JSONDecodingOptions = JSONDecodingOptions() - ) throws -> [Self] { - return try self.array(fromJSONUTF8Data: jsonUTF8Data, - extensions: SimpleExtensionMap(), - options: options) - } - - /// Creates a new array of messages by decoding the given `Data` containing a - /// serialized array of messages in JSON format, interpreting the data as - /// UTF-8 encoded text. - /// - /// - Parameter jsonUTF8Data: The JSON-formatted data to decode, represented - /// as UTF-8 encoded text. - /// - Parameter extensions: The extension map to use with this decode - /// - Parameter options: The JSONDecodingOptions to use. - /// - Throws: `JSONDecodingError` if decoding fails. - public static func array( - fromJSONUTF8Data jsonUTF8Data: Data, - extensions: ExtensionMap = SimpleExtensionMap(), - options: JSONDecodingOptions = JSONDecodingOptions() - ) throws -> [Self] { - return try jsonUTF8Data.withUnsafeBytes { (body: UnsafeRawBufferPointer) in - var array = [Self]() - - if body.count > 0 { - var decoder = JSONDecoder(source: body, options: options, - messageType: Self.self, extensions: extensions) - try decoder.decodeRepeatedMessageField(value: &array) - if !decoder.scanner.complete { - throw JSONDecodingError.trailingGarbage - } - } - - return array - } - } - -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+TextFormatAdditions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+TextFormatAdditions.swift deleted file mode 100644 index 7a9dc537..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message+TextFormatAdditions.swift +++ /dev/null @@ -1,111 +0,0 @@ -// Sources/SwiftProtobuf/Message+TextFormatAdditions.swift - Text format primitive types -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Extensions to `Message` to support text format encoding/decoding. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// Text format encoding and decoding methods for messages. -extension Message { - /// Returns a string containing the Protocol Buffer text format serialization - /// of the message. - /// - /// Unlike binary encoding, presence of required fields is not enforced when - /// serializing to text format. - /// - /// - Returns: A string containing the text format serialization of the - /// message. - public func textFormatString() -> String { - // This is implemented as a separate zero-argument function - // to preserve binary compatibility. - return textFormatString(options: TextFormatEncodingOptions()) - } - - /// Returns a string containing the Protocol Buffer text format serialization - /// of the message. - /// - /// Unlike binary encoding, presence of required fields is not enforced when - /// serializing to JSON. - /// - /// - Returns: A string containing the text format serialization of the message. - /// - Parameters: - /// - options: The TextFormatEncodingOptions to use. - public func textFormatString( - options: TextFormatEncodingOptions - ) -> String { - var visitor = TextFormatEncodingVisitor(message: self, options: options) - if let any = self as? Google_Protobuf_Any { - any._storage.textTraverse(visitor: &visitor) - } else { - // Although the general traversal/encoding infrastructure supports - // throwing errors (needed for JSON/Binary WKTs support, binary format - // missing required fields); TextEncoding never actually does throw. - try! traverse(visitor: &visitor) - } - return visitor.result - } - - /// Creates a new message by decoding the given string containing a - /// serialized message in Protocol Buffer text format. - /// - /// - Parameters: - /// - textFormatString: The text format string to decode. - /// - extensions: An `ExtensionMap` used to look up and decode any - /// extensions in this message or messages nested within this message's - /// fields. - /// - Throws: an instance of `TextFormatDecodingError` on failure. - public init( - textFormatString: String, - extensions: ExtensionMap? = nil - ) throws { - // TODO: Remove this api and default the options instead. This api has to - // exist for anything compiled against an older version of the library. - try self.init(textFormatString: textFormatString, - options: TextFormatDecodingOptions(), - extensions: extensions) - } - - /// Creates a new message by decoding the given string containing a - /// serialized message in Protocol Buffer text format. - /// - /// - Parameters: - /// - textFormatString: The text format string to decode. - /// - options: The `TextFormatDencodingOptions` to use. - /// - extensions: An `ExtensionMap` used to look up and decode any - /// extensions in this message or messages nested within this message's - /// fields. - /// - Throws: an instance of `TextFormatDecodingError` on failure. - public init( - textFormatString: String, - options: TextFormatDecodingOptions, - extensions: ExtensionMap? = nil - ) throws { - self.init() - if !textFormatString.isEmpty { - if let data = textFormatString.data(using: String.Encoding.utf8) { - try data.withUnsafeBytes { (body: UnsafeRawBufferPointer) in - if let baseAddress = body.baseAddress, body.count > 0 { - var decoder = try TextFormatDecoder(messageType: Self.self, - utf8Pointer: baseAddress, - count: body.count, - options: options, - extensions: extensions) - try decodeMessage(decoder: &decoder) - if !decoder.complete { - throw TextFormatDecodingError.trailingGarbage - } - } - } - } - } - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message.swift deleted file mode 100644 index 995162c2..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Message.swift +++ /dev/null @@ -1,218 +0,0 @@ -// Sources/SwiftProtobuf/Message.swift - Message support -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// - -// TODO: `Message` should require `Sendable` but we cannot do so yet without possibly breaking compatibility. - -/// The protocol which all generated protobuf messages implement. -/// `Message` is the protocol type you should use whenever -/// you need an argument or variable which holds "some message". -/// -/// Generated messages also implement `Hashable`, and thus `Equatable`. -/// However, the protocol conformance is declared on a different protocol. -/// This allows you to use `Message` as a type directly: -/// -/// func consume(message: Message) { ... } -/// -/// Instead of needing to use it as a type constraint on a generic declaration: -/// -/// func consume(message: M) { ... } -/// -/// If you need to convince the compiler that your message is `Hashable` so -/// you can insert it into a `Set` or use it as a `Dictionary` key, use -/// a generic declaration with a type constraint: -/// -/// func insertIntoSet(message: M) { -/// mySet.insert(message) -/// } -/// -/// The actual functionality is implemented either in the generated code or in -/// default implementations of the below methods and properties. -public protocol Message: CustomDebugStringConvertible { - /// Creates a new message with all of its fields initialized to their default - /// values. - init() - - // Metadata - // Basic facts about this class and the proto message it was generated from - // Used by various encoders and decoders - - /// The fully-scoped name of the message from the original .proto file, - /// including any relevant package name. - static var protoMessageName: String { get } - - /// True if all required fields (if any) on this message and any nested - /// messages (recursively) have values set; otherwise, false. - var isInitialized: Bool { get } - - /// Some formats include enough information to transport fields that were - /// not known at generation time. When encountered, they are stored here. - var unknownFields: UnknownStorage { get set } - - // - // General serialization/deserialization machinery - // - - /// Decode all of the fields from the given decoder. - /// - /// This is a simple loop that repeatedly gets the next field number - /// from `decoder.nextFieldNumber()` and then uses the number returned - /// and the type information from the original .proto file to decide - /// what type of data should be decoded for that field. The corresponding - /// method on the decoder is then called to get the field value. - /// - /// This is the core method used by the deserialization machinery. It is - /// `public` to enable users to implement their own encoding formats by - /// conforming to `Decoder`; it should not be called otherwise. - /// - /// Note that this is not specific to binary encodng; formats that use - /// textual identifiers translate those to field numbers and also go - /// through this to decode messages. - /// - /// - Parameters: - /// - decoder: a `Decoder`; the `Message` will call the method - /// corresponding to the type of this field. - /// - Throws: an error on failure or type mismatch. The type of error - /// thrown depends on which decoder is used. - mutating func decodeMessage(decoder: inout D) throws - - /// Traverses the fields of the message, calling the appropriate methods - /// of the passed `Visitor` object. - /// - /// This is used internally by: - /// - /// * Protobuf binary serialization - /// * JSON serialization (with some twists to account for specialty JSON) - /// * Protobuf Text serialization - /// * `Hashable` computation - /// - /// Conceptually, serializers create visitor objects that are - /// then passed recursively to every message and field via generated - /// `traverse` methods. The details get a little involved due to - /// the need to allow particular messages to override particular - /// behaviors for specific encodings, but the general idea is quite simple. - func traverse(visitor: inout V) throws - - // Standard utility properties and methods. - // Most of these are simple wrappers on top of the visitor machinery. - // They are implemented in the protocol, not in the generated structs, - // so can be overridden in user code by defining custom extensions to - // the generated struct. - -#if swift(>=4.2) - /// An implementation of hash(into:) to provide conformance with the - /// `Hashable` protocol. - func hash(into hasher: inout Hasher) -#else // swift(>=4.2) - /// The hash value generated from this message's contents, for conformance - /// with the `Hashable` protocol. - var hashValue: Int { get } -#endif // swift(>=4.2) - - /// Helper to compare `Message`s when not having a specific type to use - /// normal `Equatable`. `Equatable` is provided with specific generated - /// types. - func isEqualTo(message: Message) -> Bool -} - -extension Message { - /// Generated proto2 messages that contain required fields, nested messages - /// that contain required fields, and/or extensions will provide their own - /// implementation of this property that tests that all required fields are - /// set. Users of the generated code SHOULD NOT override this property. - public var isInitialized: Bool { - // The generated code will include a specialization as needed. - return true - } - - /// A hash based on the message's full contents. -#if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - var visitor = HashVisitor(hasher) - try? traverse(visitor: &visitor) - hasher = visitor.hasher - } -#else // swift(>=4.2) - public var hashValue: Int { - var visitor = HashVisitor() - try? traverse(visitor: &visitor) - return visitor.hashValue - } -#endif // swift(>=4.2) - - /// A description generated by recursively visiting all fields in the message, - /// including messages. - public var debugDescription: String { - // TODO Ideally there would be something like serializeText() that can - // take a prefix so we could do something like: - // [class name]( - // [text format] - // ) - let className = String(reflecting: type(of: self)) - let header = "\(className):\n" - return header + textFormatString() - } - - /// Creates an instance of the message type on which this method is called, - /// executes the given block passing the message in as its sole `inout` - /// argument, and then returns the message. - /// - /// This method acts essentially as a "builder" in that the initialization of - /// the message is captured within the block, allowing the returned value to - /// be set in an immutable variable. For example, - /// - /// let msg = MyMessage.with { $0.myField = "foo" } - /// msg.myOtherField = 5 // error: msg is immutable - /// - /// - Parameter populator: A block or function that populates the new message, - /// which is passed into the block as an `inout` argument. - /// - Returns: The message after execution of the block. - public static func with( - _ populator: (inout Self) throws -> () - ) rethrows -> Self { - var message = Self() - try populator(&message) - return message - } -} - -/// Implementation base for all messages; not intended for client use. -/// -/// In general, use `SwiftProtobuf.Message` instead when you need a variable or -/// argument that can hold any type of message. Occasionally, you can use -/// `SwiftProtobuf.Message & Equatable` or `SwiftProtobuf.Message & Hashable` as -/// generic constraints if you need to write generic code that can be applied to -/// multiple message types that uses equality tests, puts messages in a `Set`, -/// or uses them as `Dictionary` keys. -public protocol _MessageImplementationBase: Message, Hashable { - - // Legacy function; no longer used, but left to maintain source compatibility. - func _protobuf_generated_isEqualTo(other: Self) -> Bool -} - -extension _MessageImplementationBase { - public func isEqualTo(message: Message) -> Bool { - guard let other = message as? Self else { - return false - } - return self == other - } - - // Legacy default implementation that is used by old generated code, current - // versions of the plugin/generator provide this directly, but this is here - // just to avoid breaking source compatibility. - public static func ==(lhs: Self, rhs: Self) -> Bool { - return lhs._protobuf_generated_isEqualTo(other: rhs) - } - - // Legacy function that is generated by old versions of the plugin/generator, - // defaulted to keep things simple without changing the api surface. - public func _protobuf_generated_isEqualTo(other: Self) -> Bool { - return self == other - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/MessageExtension.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/MessageExtension.swift deleted file mode 100644 index ae35d6c2..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/MessageExtension.swift +++ /dev/null @@ -1,43 +0,0 @@ -// Sources/SwiftProtobuf/MessageExtension.swift - Extension support -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// A 'Message Extension' is an immutable class object that describes -/// a particular extension field, including string and number -/// identifiers, serialization details, and the identity of the -/// message that is being extended. -/// -// ----------------------------------------------------------------------------- - -// TODO: `AnyMessageExtension` should require `Sendable` but we cannot do so yet without possibly breaking compatibility. - -/// Type-erased MessageExtension field implementation. -public protocol AnyMessageExtension { - var fieldNumber: Int { get } - var fieldName: String { get } - var messageType: Message.Type { get } - func _protobuf_newField(decoder: inout D) throws -> AnyExtensionField? -} - -/// A "Message Extension" relates a particular extension field to -/// a particular message. The generic constraints allow -/// compile-time compatibility checks. -public class MessageExtension: AnyMessageExtension { - public let fieldNumber: Int - public let fieldName: String - public let messageType: Message.Type - public init(_protobuf_fieldNumber: Int, fieldName: String) { - self.fieldNumber = _protobuf_fieldNumber - self.fieldName = fieldName - self.messageType = MessageType.self - } - public func _protobuf_newField(decoder: inout D) throws -> AnyExtensionField? { - return try FieldType(protobufExtension: self, decoder: &decoder) - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/NameMap.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/NameMap.swift deleted file mode 100644 index f2822e89..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/NameMap.swift +++ /dev/null @@ -1,310 +0,0 @@ -// Sources/SwiftProtobuf/NameMap.swift - Bidirectional number/name mapping -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- - -/// TODO: Right now, only the NameMap and the NameDescription enum -/// (which are directly used by the generated code) are public. -/// This means that code outside the library has no way to actually -/// use this data. We should develop and publicize a suitable API -/// for that purpose. (Which might be the same as the internal API.) - -/// This must be exactly the same as the corresponding code in the -/// protoc-gen-swift code generator. Changing it will break -/// compatibility of the library with older generated code. -/// -/// It does not necessarily need to match protoc's JSON field naming -/// logic, however. -private func toJsonFieldName(_ s: String) -> String { - var result = String() - var capitalizeNext = false - for c in s { - if c == "_" { - capitalizeNext = true - } else if capitalizeNext { - result.append(String(c).uppercased()) - capitalizeNext = false - } else { - result.append(String(c)) - } - } - return result -} - -/// Allocate static memory buffers to intern UTF-8 -/// string data. Track the buffers and release all of those buffers -/// in case we ever get deallocated. -fileprivate class InternPool { - private var interned = [UnsafeRawBufferPointer]() - - func intern(utf8: String.UTF8View) -> UnsafeRawBufferPointer { - #if swift(>=4.1) - let mutable = UnsafeMutableRawBufferPointer.allocate(byteCount: utf8.count, - alignment: MemoryLayout.alignment) - #else - let mutable = UnsafeMutableRawBufferPointer.allocate(count: utf8.count) - #endif - mutable.copyBytes(from: utf8) - let immutable = UnsafeRawBufferPointer(mutable) - interned.append(immutable) - return immutable - } - - func intern(utf8Ptr: UnsafeBufferPointer) -> UnsafeRawBufferPointer { - #if swift(>=4.1) - let mutable = UnsafeMutableRawBufferPointer.allocate(byteCount: utf8Ptr.count, - alignment: MemoryLayout.alignment) - #else - let mutable = UnsafeMutableRawBufferPointer.allocate(count: utf8.count) - #endif - mutable.copyBytes(from: utf8Ptr) - let immutable = UnsafeRawBufferPointer(mutable) - interned.append(immutable) - return immutable - } - - deinit { - for buff in interned { - #if swift(>=4.1) - buff.deallocate() - #else - let p = UnsafeMutableRawPointer(mutating: buff.baseAddress)! - p.deallocate(bytes: buff.count, alignedTo: 1) - #endif - } - } -} - -#if !swift(>=4.2) -// Constants for FNV hash http://tools.ietf.org/html/draft-eastlake-fnv-03 -private let i_2166136261 = Int(bitPattern: 2166136261) -private let i_16777619 = Int(16777619) -#endif - -/// An immutable bidirectional mapping between field/enum-case names -/// and numbers, used to record field names for text-based -/// serialization (JSON and text). These maps are lazily instantiated -/// for each message as needed, so there is no run-time overhead for -/// users who do not use text-based serialization formats. -public struct _NameMap: ExpressibleByDictionaryLiteral { - - /// An immutable interned string container. The `utf8Start` pointer - /// is guaranteed valid for the lifetime of the `NameMap` that you - /// fetched it from. Since `NameMap`s are only instantiated as - /// immutable static values, that should be the lifetime of the - /// program. - /// - /// Internally, this uses `StaticString` (which refers to a fixed - /// block of UTF-8 data) where possible. In cases where the string - /// has to be computed, it caches the UTF-8 bytes in an - /// unmovable and immutable heap area. - internal struct Name: Hashable, CustomStringConvertible { - // This should not be used outside of this file, as it requires - // coordinating the lifecycle with the lifecycle of the pool - // where the raw UTF8 gets interned. - fileprivate init(staticString: StaticString, pool: InternPool) { - self.nameString = .staticString(staticString) - if staticString.hasPointerRepresentation { - self.utf8Buffer = UnsafeRawBufferPointer(start: staticString.utf8Start, - count: staticString.utf8CodeUnitCount) - } else { - self.utf8Buffer = staticString.withUTF8Buffer { pool.intern(utf8Ptr: $0) } - } - } - - // This should not be used outside of this file, as it requires - // coordinating the lifecycle with the lifecycle of the pool - // where the raw UTF8 gets interned. - fileprivate init(string: String, pool: InternPool) { - let utf8 = string.utf8 - self.utf8Buffer = pool.intern(utf8: utf8) - self.nameString = .string(string) - } - - // This is for building a transient `Name` object sufficient for lookup purposes. - // It MUST NOT be exposed outside of this file. - fileprivate init(transientUtf8Buffer: UnsafeRawBufferPointer) { - self.nameString = .staticString("") - self.utf8Buffer = transientUtf8Buffer - } - - private(set) var utf8Buffer: UnsafeRawBufferPointer - - private enum NameString { - case string(String) - case staticString(StaticString) - } - private var nameString: NameString - - public var description: String { - switch nameString { - case .string(let s): return s - case .staticString(let s): return s.description - } - } - - #if swift(>=4.2) - public func hash(into hasher: inout Hasher) { - for byte in utf8Buffer { - hasher.combine(byte) - } - } - #else // swift(>=4.2) - public var hashValue: Int { - var h = i_2166136261 - for byte in utf8Buffer { - h = (h ^ Int(byte)) &* i_16777619 - } - return h - } - #endif // swift(>=4.2) - - public static func ==(lhs: Name, rhs: Name) -> Bool { - if lhs.utf8Buffer.count != rhs.utf8Buffer.count { - return false - } - return lhs.utf8Buffer.elementsEqual(rhs.utf8Buffer) - } - } - - /// The JSON and proto names for a particular field, enum case, or extension. - internal struct Names { - private(set) var json: Name? - private(set) var proto: Name - } - - /// A description of the names for a particular field or enum case. - /// The different forms here let us minimize the amount of string - /// data that we store in the binary. - /// - /// These are only used in the generated code to initialize a NameMap. - public enum NameDescription { - - /// The proto (text format) name and the JSON name are the same string. - case same(proto: StaticString) - - /// The JSON name can be computed from the proto string - case standard(proto: StaticString) - - /// The JSON and text format names are just different. - case unique(proto: StaticString, json: StaticString) - - /// Used for enum cases only to represent a value's primary proto name (the - /// first defined case) and its aliases. The JSON and text format names for - /// enums are always the same. - case aliased(proto: StaticString, aliases: [StaticString]) - } - - private var internPool = InternPool() - - /// The mapping from field/enum-case numbers to names. - private var numberToNameMap: [Int: Names] = [:] - - /// The mapping from proto/text names to field/enum-case numbers. - private var protoToNumberMap: [Name: Int] = [:] - - /// The mapping from JSON names to field/enum-case numbers. - /// Note that this also contains all of the proto/text names, - /// as required by Google's spec for protobuf JSON. - private var jsonToNumberMap: [Name: Int] = [:] - - /// Creates a new empty field/enum-case name/number mapping. - public init() {} - - /// Build the bidirectional maps between numbers and proto/JSON names. - public init(dictionaryLiteral elements: (Int, NameDescription)...) { - for (number, description) in elements { - switch description { - - case .same(proto: let p): - let protoName = Name(staticString: p, pool: internPool) - let names = Names(json: protoName, proto: protoName) - numberToNameMap[number] = names - protoToNumberMap[protoName] = number - jsonToNumberMap[protoName] = number - - case .standard(proto: let p): - let protoName = Name(staticString: p, pool: internPool) - let jsonString = toJsonFieldName(protoName.description) - let jsonName = Name(string: jsonString, pool: internPool) - let names = Names(json: jsonName, proto: protoName) - numberToNameMap[number] = names - protoToNumberMap[protoName] = number - jsonToNumberMap[protoName] = number - jsonToNumberMap[jsonName] = number - - case .unique(proto: let p, json: let j): - let jsonName = Name(staticString: j, pool: internPool) - let protoName = Name(staticString: p, pool: internPool) - let names = Names(json: jsonName, proto: protoName) - numberToNameMap[number] = names - protoToNumberMap[protoName] = number - jsonToNumberMap[protoName] = number - jsonToNumberMap[jsonName] = number - - case .aliased(proto: let p, aliases: let aliases): - let protoName = Name(staticString: p, pool: internPool) - let names = Names(json: protoName, proto: protoName) - numberToNameMap[number] = names - protoToNumberMap[protoName] = number - jsonToNumberMap[protoName] = number - for alias in aliases { - let protoName = Name(staticString: alias, pool: internPool) - protoToNumberMap[protoName] = number - jsonToNumberMap[protoName] = number - } - } - } - } - - /// Returns the name bundle for the field/enum-case with the given number, or - /// `nil` if there is no match. - internal func names(for number: Int) -> Names? { - return numberToNameMap[number] - } - - /// Returns the field/enum-case number that has the given JSON name, - /// or `nil` if there is no match. - /// - /// This is used by the Text format parser to look up field or enum - /// names using a direct reference to the un-decoded UTF8 bytes. - internal func number(forProtoName raw: UnsafeRawBufferPointer) -> Int? { - let n = Name(transientUtf8Buffer: raw) - return protoToNumberMap[n] - } - - /// Returns the field/enum-case number that has the given JSON name, - /// or `nil` if there is no match. - /// - /// This accepts a regular `String` and is used in JSON parsing - /// only when a field name or enum name was decoded from a string - /// containing backslash escapes. - /// - /// JSON parsing must interpret *both* the JSON name of the - /// field/enum-case provided by the descriptor *as well as* its - /// original proto/text name. - internal func number(forJSONName name: String) -> Int? { - let utf8 = Array(name.utf8) - return utf8.withUnsafeBytes { (buffer: UnsafeRawBufferPointer) in - let n = Name(transientUtf8Buffer: buffer) - return jsonToNumberMap[n] - } - } - - /// Returns the field/enum-case number that has the given JSON name, - /// or `nil` if there is no match. - /// - /// This is used by the JSON parser when a field name or enum name - /// required no special processing. As a result, we can avoid - /// copying the name and look up the number using a direct reference - /// to the un-decoded UTF8 bytes. - internal func number(forJSONName raw: UnsafeRawBufferPointer) -> Int? { - let n = Name(transientUtf8Buffer: raw) - return jsonToNumberMap[n] - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ProtoNameProviding.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ProtoNameProviding.swift deleted file mode 100644 index 8b5a81c1..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ProtoNameProviding.swift +++ /dev/null @@ -1,23 +0,0 @@ -// Sources/SwiftProtobuf/ProtoNameProviding.swift - Support for accessing proto names -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- - - -/// SwiftProtobuf Internal: Common support looking up field names. -/// -/// Messages conform to this protocol to provide the proto/text and JSON field -/// names for their fields. This allows these names to be pulled out into -/// extensions in separate files so that users can omit them in release builds -/// (reducing bloat and minimizing leaks of field names). -public protocol _ProtoNameProviding { - - /// The mapping between field numbers and proto/JSON field names defined in - /// the conforming message type. - static var _protobuf_nameMap: _NameMap { get } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ProtobufAPIVersionCheck.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ProtobufAPIVersionCheck.swift deleted file mode 100644 index 480305e6..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ProtobufAPIVersionCheck.swift +++ /dev/null @@ -1,43 +0,0 @@ -// Sources/SwiftProtobuf/ProtobufAPIVersionCheck.swift - Version checking -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// A scheme that ensures that generated protos cannot be compiled or linked -/// against a version of the runtime with which they are not compatible. -/// -/// In many cases, API changes themselves might introduce incompatibilities -/// between generated code and the runtime library, but we also want to protect -/// against cases where breaking behavioral changes (without affecting the API) -/// would cause generated code to be incompatible with a particular version of -/// the runtime. -/// -// ----------------------------------------------------------------------------- - - -/// An empty protocol that encodes the version of the runtime library. -/// -/// This protocol will be replaced with one containing a different version -/// number any time that breaking changes are made to the Swift Protobuf API. -/// Combined with the protocol below, this lets us verify that generated code is -/// never compiled against a version of the API with which it is incompatible. -/// -/// The version associated with a particular build of the compiler is defined as -/// `Version.compatibilityVersion` in `protoc-gen-swift`. That version and this -/// version must match for the generated protos to be compatible, so if you -/// update one, make sure to update it here and in the associated type below. -public protocol ProtobufAPIVersion_2 {} - -/// This protocol is expected to be implemented by a `fileprivate` type in each -/// source file emitted by `protoc-gen-swift`. It effectively creates a binding -/// between the version of the generated code and the version of this library, -/// causing a compile-time error (with reasonable diagnostics) if they are -/// incompatible. -public protocol ProtobufAPIVersionCheck { - associatedtype Version: ProtobufAPIVersion_2 -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ProtobufMap.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ProtobufMap.swift deleted file mode 100644 index a9c4d80e..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ProtobufMap.swift +++ /dev/null @@ -1,39 +0,0 @@ -// Sources/SwiftProtobuf/ProtobufMap.swift - Map<> support -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Generic type representing proto map<> fields. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// SwiftProtobuf Internal: Support for Encoding/Decoding. -public struct _ProtobufMap -{ - public typealias Key = KeyType.BaseType - public typealias Value = ValueType.BaseType - public typealias BaseType = Dictionary -} - -/// SwiftProtobuf Internal: Support for Encoding/Decoding. -public struct _ProtobufMessageMap -{ - public typealias Key = KeyType.BaseType - public typealias Value = ValueType - public typealias BaseType = Dictionary -} - -/// SwiftProtobuf Internal: Support for Encoding/Decoding. -public struct _ProtobufEnumMap -{ - public typealias Key = KeyType.BaseType - public typealias Value = ValueType - public typealias BaseType = Dictionary -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/SelectiveVisitor.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/SelectiveVisitor.swift deleted file mode 100644 index e8dc4073..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/SelectiveVisitor.swift +++ /dev/null @@ -1,268 +0,0 @@ -// Sources/SwiftProtobuf/SelectiveVisitor.swift - Base for custom Visitors -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// A base for Visitors that only expect a subset of things to called. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// A base for Visitors that only expects a subset of things to called. -internal protocol SelectiveVisitor: Visitor { - // Adds nothing. -} - -/// Default impls for everything so things using this only have to write the -/// methods they expect. Asserts to catch developer errors, but becomes -/// nothing in release to keep code size small. -/// -/// NOTE: This is an impl for *everything*. This means the default impls -/// provided by Visitor to bridge packed->repeated, repeated->singular, etc -/// won't kick in. -extension SelectiveVisitor { - internal mutating func visitSingularFloatField(value: Float, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularDoubleField(value: Double, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularInt32Field(value: Int32, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularInt64Field(value: Int64, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularUInt32Field(value: UInt32, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularUInt64Field(value: UInt64, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularSInt32Field(value: Int32, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularSInt64Field(value: Int64, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularFixed32Field(value: UInt32, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularFixed64Field(value: UInt64, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularSFixed32Field(value: Int32, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularSFixed64Field(value: Int64, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularBoolField(value: Bool, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularStringField(value: String, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularBytesField(value: Data, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularEnumField(value: E, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularMessageField(value: M, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitSingularGroupField(value: G, fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedFloatField(value: [Float], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedDoubleField(value: [Double], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedUInt32Field(value: [UInt32], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedUInt64Field(value: [UInt64], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedSInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedSInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedFixed32Field(value: [UInt32], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedFixed64Field(value: [UInt64], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedSFixed32Field(value: [Int32], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedSFixed64Field(value: [Int64], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedBoolField(value: [Bool], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedStringField(value: [String], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedBytesField(value: [Data], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedEnumField(value: [E], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedMessageField(value: [M], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitRepeatedGroupField(value: [G], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedFloatField(value: [Float], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedDoubleField(value: [Double], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedUInt32Field(value: [UInt32], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedUInt64Field(value: [UInt64], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedSInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedSInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedFixed32Field(value: [UInt32], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedFixed64Field(value: [UInt64], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedSFixed32Field(value: [Int32], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedSFixed64Field(value: [Int64], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedBoolField(value: [Bool], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitPackedEnumField(value: [E], fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitMapField( - fieldType: _ProtobufMap.Type, - value: _ProtobufMap.BaseType, - fieldNumber: Int) throws { - assert(false) - } - - internal mutating func visitMapField( - fieldType: _ProtobufEnumMap.Type, - value: _ProtobufEnumMap.BaseType, - fieldNumber: Int - ) throws where ValueType.RawValue == Int { - assert(false) - } - - internal mutating func visitMapField( - fieldType: _ProtobufMessageMap.Type, - value: _ProtobufMessageMap.BaseType, - fieldNumber: Int - ) throws { - assert(false) - } - - internal mutating func visitExtensionFields(fields: ExtensionFieldValueSet, start: Int, end: Int) throws { - assert(false) - } - - internal mutating func visitExtensionFieldsAsMessageSet( - fields: ExtensionFieldValueSet, - start: Int, - end: Int - ) throws { - assert(false) - } - - internal mutating func visitUnknown(bytes: Data) throws { - assert(false) - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/SimpleExtensionMap.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/SimpleExtensionMap.swift deleted file mode 100644 index ad470860..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/SimpleExtensionMap.swift +++ /dev/null @@ -1,112 +0,0 @@ -// Sources/SwiftProtobuf/SimpleExtensionMap.swift - Extension support -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// A default implementation of ExtensionMap. -/// -// ----------------------------------------------------------------------------- - - -// Note: The generated code only relies on ExpressibleByArrayLiteral -public struct SimpleExtensionMap: ExtensionMap, ExpressibleByArrayLiteral, CustomDebugStringConvertible { - public typealias Element = AnyMessageExtension - - // Since type objects aren't Hashable, we can't do much better than this... - internal var fields = [Int: Array]() - - public init() {} - - public init(arrayLiteral: Element...) { - insert(contentsOf: arrayLiteral) - } - - public init(_ others: SimpleExtensionMap...) { - for other in others { - formUnion(other) - } - } - - public subscript(messageType: Message.Type, fieldNumber: Int) -> AnyMessageExtension? { - get { - if let l = fields[fieldNumber] { - for e in l { - if messageType == e.messageType { - return e - } - } - } - return nil - } - } - - public func fieldNumberForProto(messageType: Message.Type, protoFieldName: String) -> Int? { - // TODO: Make this faster... - for (_, list) in fields { - for e in list { - if e.fieldName == protoFieldName && e.messageType == messageType { - return e.fieldNumber - } - } - } - return nil - } - - public mutating func insert(_ newValue: Element) { - let fieldNumber = newValue.fieldNumber - if let l = fields[fieldNumber] { - let messageType = newValue.messageType - var newL = l.filter { return $0.messageType != messageType } - newL.append(newValue) - fields[fieldNumber] = newL - } else { - fields[fieldNumber] = [newValue] - } - } - - public mutating func insert(contentsOf: [Element]) { - for e in contentsOf { - insert(e) - } - } - - public mutating func formUnion(_ other: SimpleExtensionMap) { - for (fieldNumber, otherList) in other.fields { - if let list = fields[fieldNumber] { - var newList = list.filter { - for o in otherList { - if $0.messageType == o.messageType { return false } - } - return true - } - newList.append(contentsOf: otherList) - fields[fieldNumber] = newList - } else { - fields[fieldNumber] = otherList - } - } - } - - public func union(_ other: SimpleExtensionMap) -> SimpleExtensionMap { - var out = self - out.formUnion(other) - return out - } - - public var debugDescription: String { - var names = [String]() - for (_, list) in fields { - for e in list { - names.append("\(e.fieldName):(\(e.fieldNumber))") - } - } - let d = names.joined(separator: ",") - return "SimpleExtensionMap(\(d))" - } - -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/StringUtils.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/StringUtils.swift deleted file mode 100644 index aea5feef..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/StringUtils.swift +++ /dev/null @@ -1,106 +0,0 @@ -// Sources/SwiftProtobuf/StringUtils.swift - String utility functions -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Utility functions for converting UTF8 bytes into Strings. -/// These functions must: -/// * Accept any valid UTF8, including a zero byte (which is -/// a valid UTF8 encoding of U+0000) -/// * Return nil for any invalid UTF8 -/// * Be fast (since they're extensively used by all decoders -/// and even some of the encoders) -/// -// ----------------------------------------------------------------------------- - -import Foundation - -// Note: Once our minimum support version is at least Swift 5.3, we should -// probably recast the following to use String(unsafeUninitializedCapacity:) - -// Note: We're trying to avoid Foundation's String(format:) since that's not -// universally available. - -fileprivate func formatZeroPaddedInt(_ value: Int32, digits: Int) -> String { - precondition(value >= 0) - let s = String(value) - if s.count >= digits { - return s - } else { - let pad = String(repeating: "0", count: digits - s.count) - return pad + s - } -} - -internal func twoDigit(_ value: Int32) -> String { - return formatZeroPaddedInt(value, digits: 2) -} -internal func threeDigit(_ value: Int32) -> String { - return formatZeroPaddedInt(value, digits: 3) -} -internal func fourDigit(_ value: Int32) -> String { - return formatZeroPaddedInt(value, digits: 4) -} -internal func sixDigit(_ value: Int32) -> String { - return formatZeroPaddedInt(value, digits: 6) -} -internal func nineDigit(_ value: Int32) -> String { - return formatZeroPaddedInt(value, digits: 9) -} - -// Wrapper that takes a buffer and start/end offsets -internal func utf8ToString( - bytes: UnsafeRawBufferPointer, - start: UnsafeRawBufferPointer.Index, - end: UnsafeRawBufferPointer.Index -) -> String? { - return utf8ToString(bytes: bytes.baseAddress! + start, count: end - start) -} - - -// Swift 4 introduced new faster String facilities -// that seem to work consistently across all platforms. - -// Notes on performance: -// -// The pre-verification here only takes about 10% of -// the time needed for constructing the string. -// Eliminating it would provide only a very minor -// speed improvement. -// -// On macOS, this is only about 25% faster than -// the Foundation initializer used below for Swift 3. -// On Linux, the Foundation initializer is much -// slower than on macOS, so this is a much bigger -// win there. -internal func utf8ToString(bytes: UnsafeRawPointer, count: Int) -> String? { - if count == 0 { - return String() - } - let codeUnits = UnsafeRawBufferPointer(start: bytes, count: count) - let sourceEncoding = Unicode.UTF8.self - - // Verify that the UTF-8 is valid. - var p = sourceEncoding.ForwardParser() - var i = codeUnits.makeIterator() - Loop: - while true { - switch p.parseScalar(from: &i) { - case .valid(_): - break - case .error: - return nil - case .emptyInput: - break Loop - } - } - - // This initializer is fast but does not reject broken - // UTF-8 (which is why we validate the UTF-8 above). - return String(decoding: codeUnits, as: sourceEncoding) - } diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatDecoder.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatDecoder.swift deleted file mode 100644 index 1c99cf4e..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatDecoder.swift +++ /dev/null @@ -1,726 +0,0 @@ -// Sources/SwiftProtobuf/TextFormatDecoder.swift - Text format decoding -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Test format decoding engine. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// -/// Provides a higher-level interface to the token stream coming -/// from a TextFormatScanner. In particular, this provides -/// single-token pushback and convenience functions for iterating -/// over complex structures. -/// -internal struct TextFormatDecoder: Decoder { - internal var scanner: TextFormatScanner - private var fieldCount = 0 - private var terminator: UInt8? - private var fieldNameMap: _NameMap? - private var messageType: Message.Type? - - internal var complete: Bool { - mutating get { - return scanner.complete - } - } - - internal init( - messageType: Message.Type, - utf8Pointer: UnsafeRawPointer, - count: Int, - options: TextFormatDecodingOptions, - extensions: ExtensionMap? - ) throws { - scanner = TextFormatScanner(utf8Pointer: utf8Pointer, count: count, options: options, extensions: extensions) - guard let nameProviding = (messageType as? _ProtoNameProviding.Type) else { - throw TextFormatDecodingError.missingFieldNames - } - fieldNameMap = nameProviding._protobuf_nameMap - self.messageType = messageType - } - - internal init(messageType: Message.Type, scanner: TextFormatScanner, terminator: UInt8?) throws { - self.scanner = scanner - self.terminator = terminator - guard let nameProviding = (messageType as? _ProtoNameProviding.Type) else { - throw TextFormatDecodingError.missingFieldNames - } - fieldNameMap = nameProviding._protobuf_nameMap - self.messageType = messageType - } - - mutating func handleConflictingOneOf() throws { - throw TextFormatDecodingError.conflictingOneOf - } - - mutating func nextFieldNumber() throws -> Int? { - if let terminator = terminator { - if scanner.skipOptionalObjectEnd(terminator) { - return nil - } - } - if fieldCount > 0 { - scanner.skipOptionalSeparator() - } - if let key = try scanner.nextOptionalExtensionKey() { - // Extension key; look up in the extension registry - if let fieldNumber = scanner.extensions?.fieldNumberForProto(messageType: messageType!, protoFieldName: key) { - fieldCount += 1 - return fieldNumber - } else { - throw TextFormatDecodingError.unknownField - } - } else if let fieldNumber = try scanner.nextFieldNumber(names: fieldNameMap!) { - fieldCount += 1 - return fieldNumber - } else if terminator == nil { - return nil - } else { - throw TextFormatDecodingError.truncated - } - - } - - mutating func decodeSingularFloatField(value: inout Float) throws { - try scanner.skipRequiredColon() - value = try scanner.nextFloat() - } - mutating func decodeSingularFloatField(value: inout Float?) throws { - try scanner.skipRequiredColon() - value = try scanner.nextFloat() - } - mutating func decodeRepeatedFloatField(value: inout [Float]) throws { - try scanner.skipRequiredColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - let n = try scanner.nextFloat() - value.append(n) - } - } else { - let n = try scanner.nextFloat() - value.append(n) - } - } - mutating func decodeSingularDoubleField(value: inout Double) throws { - try scanner.skipRequiredColon() - value = try scanner.nextDouble() - } - mutating func decodeSingularDoubleField(value: inout Double?) throws { - try scanner.skipRequiredColon() - value = try scanner.nextDouble() - } - mutating func decodeRepeatedDoubleField(value: inout [Double]) throws { - try scanner.skipRequiredColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - let n = try scanner.nextDouble() - value.append(n) - } - } else { - let n = try scanner.nextDouble() - value.append(n) - } - } - mutating func decodeSingularInt32Field(value: inout Int32) throws { - try scanner.skipRequiredColon() - let n = try scanner.nextSInt() - if n > Int64(Int32.max) || n < Int64(Int32.min) { - throw TextFormatDecodingError.malformedNumber - } - value = Int32(truncatingIfNeeded: n) - } - mutating func decodeSingularInt32Field(value: inout Int32?) throws { - try scanner.skipRequiredColon() - let n = try scanner.nextSInt() - if n > Int64(Int32.max) || n < Int64(Int32.min) { - throw TextFormatDecodingError.malformedNumber - } - value = Int32(truncatingIfNeeded: n) - } - mutating func decodeRepeatedInt32Field(value: inout [Int32]) throws { - try scanner.skipRequiredColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - let n = try scanner.nextSInt() - if n > Int64(Int32.max) || n < Int64(Int32.min) { - throw TextFormatDecodingError.malformedNumber - } - value.append(Int32(truncatingIfNeeded: n)) - } - } else { - let n = try scanner.nextSInt() - if n > Int64(Int32.max) || n < Int64(Int32.min) { - throw TextFormatDecodingError.malformedNumber - } - value.append(Int32(truncatingIfNeeded: n)) - } - } - mutating func decodeSingularInt64Field(value: inout Int64) throws { - try scanner.skipRequiredColon() - value = try scanner.nextSInt() - } - mutating func decodeSingularInt64Field(value: inout Int64?) throws { - try scanner.skipRequiredColon() - value = try scanner.nextSInt() - } - mutating func decodeRepeatedInt64Field(value: inout [Int64]) throws { - try scanner.skipRequiredColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - let n = try scanner.nextSInt() - value.append(n) - } - } else { - let n = try scanner.nextSInt() - value.append(n) - } - } - mutating func decodeSingularUInt32Field(value: inout UInt32) throws { - try scanner.skipRequiredColon() - let n = try scanner.nextUInt() - if n > UInt64(UInt32.max) { - throw TextFormatDecodingError.malformedNumber - } - value = UInt32(truncatingIfNeeded: n) - } - mutating func decodeSingularUInt32Field(value: inout UInt32?) throws { - try scanner.skipRequiredColon() - let n = try scanner.nextUInt() - if n > UInt64(UInt32.max) { - throw TextFormatDecodingError.malformedNumber - } - value = UInt32(truncatingIfNeeded: n) - } - mutating func decodeRepeatedUInt32Field(value: inout [UInt32]) throws { - try scanner.skipRequiredColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - let n = try scanner.nextUInt() - if n > UInt64(UInt32.max) { - throw TextFormatDecodingError.malformedNumber - } - value.append(UInt32(truncatingIfNeeded: n)) - } - } else { - let n = try scanner.nextUInt() - if n > UInt64(UInt32.max) { - throw TextFormatDecodingError.malformedNumber - } - value.append(UInt32(truncatingIfNeeded: n)) - } - } - mutating func decodeSingularUInt64Field(value: inout UInt64) throws { - try scanner.skipRequiredColon() - value = try scanner.nextUInt() - } - mutating func decodeSingularUInt64Field(value: inout UInt64?) throws { - try scanner.skipRequiredColon() - value = try scanner.nextUInt() - } - mutating func decodeRepeatedUInt64Field(value: inout [UInt64]) throws { - try scanner.skipRequiredColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - let n = try scanner.nextUInt() - value.append(n) - } - } else { - let n = try scanner.nextUInt() - value.append(n) - } - } - mutating func decodeSingularSInt32Field(value: inout Int32) throws { - try decodeSingularInt32Field(value: &value) - } - mutating func decodeSingularSInt32Field(value: inout Int32?) throws { - try decodeSingularInt32Field(value: &value) - } - mutating func decodeRepeatedSInt32Field(value: inout [Int32]) throws { - try decodeRepeatedInt32Field(value: &value) - } - mutating func decodeSingularSInt64Field(value: inout Int64) throws { - try decodeSingularInt64Field(value: &value) - } - mutating func decodeSingularSInt64Field(value: inout Int64?) throws { - try decodeSingularInt64Field(value: &value) - } - mutating func decodeRepeatedSInt64Field(value: inout [Int64]) throws { - try decodeRepeatedInt64Field(value: &value) - } - mutating func decodeSingularFixed32Field(value: inout UInt32) throws { - try decodeSingularUInt32Field(value: &value) - } - mutating func decodeSingularFixed32Field(value: inout UInt32?) throws { - try decodeSingularUInt32Field(value: &value) - } - mutating func decodeRepeatedFixed32Field(value: inout [UInt32]) throws { - try decodeRepeatedUInt32Field(value: &value) - } - mutating func decodeSingularFixed64Field(value: inout UInt64) throws { - try decodeSingularUInt64Field(value: &value) - } - mutating func decodeSingularFixed64Field(value: inout UInt64?) throws { - try decodeSingularUInt64Field(value: &value) - } - mutating func decodeRepeatedFixed64Field(value: inout [UInt64]) throws { - try decodeRepeatedUInt64Field(value: &value) - } - mutating func decodeSingularSFixed32Field(value: inout Int32) throws { - try decodeSingularInt32Field(value: &value) - } - mutating func decodeSingularSFixed32Field(value: inout Int32?) throws { - try decodeSingularInt32Field(value: &value) - } - mutating func decodeRepeatedSFixed32Field(value: inout [Int32]) throws { - try decodeRepeatedInt32Field(value: &value) - } - mutating func decodeSingularSFixed64Field(value: inout Int64) throws { - try decodeSingularInt64Field(value: &value) - } - mutating func decodeSingularSFixed64Field(value: inout Int64?) throws { - try decodeSingularInt64Field(value: &value) - } - mutating func decodeRepeatedSFixed64Field(value: inout [Int64]) throws { - try decodeRepeatedInt64Field(value: &value) - } - mutating func decodeSingularBoolField(value: inout Bool) throws { - try scanner.skipRequiredColon() - value = try scanner.nextBool() - } - mutating func decodeSingularBoolField(value: inout Bool?) throws { - try scanner.skipRequiredColon() - value = try scanner.nextBool() - } - mutating func decodeRepeatedBoolField(value: inout [Bool]) throws { - try scanner.skipRequiredColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - let n = try scanner.nextBool() - value.append(n) - } - } else { - let n = try scanner.nextBool() - value.append(n) - } - } - mutating func decodeSingularStringField(value: inout String) throws { - try scanner.skipRequiredColon() - value = try scanner.nextStringValue() - } - mutating func decodeSingularStringField(value: inout String?) throws { - try scanner.skipRequiredColon() - value = try scanner.nextStringValue() - } - mutating func decodeRepeatedStringField(value: inout [String]) throws { - try scanner.skipRequiredColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - let n = try scanner.nextStringValue() - value.append(n) - } - } else { - let n = try scanner.nextStringValue() - value.append(n) - } - } - mutating func decodeSingularBytesField(value: inout Data) throws { - try scanner.skipRequiredColon() - value = try scanner.nextBytesValue() - } - mutating func decodeSingularBytesField(value: inout Data?) throws { - try scanner.skipRequiredColon() - value = try scanner.nextBytesValue() - } - mutating func decodeRepeatedBytesField(value: inout [Data]) throws { - try scanner.skipRequiredColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - let n = try scanner.nextBytesValue() - value.append(n) - } - } else { - let n = try scanner.nextBytesValue() - value.append(n) - } - } - - private mutating func decodeEnum() throws -> E where E.RawValue == Int { - if let name = try scanner.nextOptionalEnumName() { - if let b = E(rawUTF8: name) { - return b - } else { - throw TextFormatDecodingError.unrecognizedEnumValue - } - } - let number = try scanner.nextSInt() - if number >= Int64(Int32.min) && number <= Int64(Int32.max) { - let n = Int32(truncatingIfNeeded: number) - if let e = E(rawValue: Int(n)) { - return e - } else { - throw TextFormatDecodingError.unrecognizedEnumValue - } - } - throw TextFormatDecodingError.malformedText - - } - - mutating func decodeSingularEnumField(value: inout E?) throws where E.RawValue == Int { - try scanner.skipRequiredColon() - let e: E = try decodeEnum() - value = e - } - - mutating func decodeSingularEnumField(value: inout E) throws where E.RawValue == Int { - try scanner.skipRequiredColon() - let e: E = try decodeEnum() - value = e - } - - mutating func decodeRepeatedEnumField(value: inout [E]) throws where E.RawValue == Int { - try scanner.skipRequiredColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - let e: E = try decodeEnum() - value.append(e) - } - } else { - let e: E = try decodeEnum() - value.append(e) - } - } - - mutating func decodeSingularMessageField(value: inout M?) throws { - _ = scanner.skipOptionalColon() - if value == nil { - value = M() - } - let terminator = try scanner.skipObjectStart() - var subDecoder = try TextFormatDecoder(messageType: M.self, scanner: scanner, terminator: terminator) - if M.self == Google_Protobuf_Any.self { - var any = value as! Google_Protobuf_Any? - try any!.decodeTextFormat(decoder: &subDecoder) - value = any as! M? - } else { - try value!.decodeMessage(decoder: &subDecoder) - } - assert((scanner.recursionBudget + 1) == subDecoder.scanner.recursionBudget) - scanner = subDecoder.scanner - } - - mutating func decodeRepeatedMessageField(value: inout [M]) throws { - _ = scanner.skipOptionalColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - let terminator = try scanner.skipObjectStart() - var subDecoder = try TextFormatDecoder(messageType: M.self, scanner: scanner, terminator: terminator) - if M.self == Google_Protobuf_Any.self { - var message = Google_Protobuf_Any() - try message.decodeTextFormat(decoder: &subDecoder) - value.append(message as! M) - } else { - var message = M() - try message.decodeMessage(decoder: &subDecoder) - value.append(message) - } - assert((scanner.recursionBudget + 1) == subDecoder.scanner.recursionBudget) - scanner = subDecoder.scanner - } - } else { - let terminator = try scanner.skipObjectStart() - var subDecoder = try TextFormatDecoder(messageType: M.self, scanner: scanner, terminator: terminator) - if M.self == Google_Protobuf_Any.self { - var message = Google_Protobuf_Any() - try message.decodeTextFormat(decoder: &subDecoder) - value.append(message as! M) - } else { - var message = M() - try message.decodeMessage(decoder: &subDecoder) - value.append(message) - } - assert((scanner.recursionBudget + 1) == subDecoder.scanner.recursionBudget) - scanner = subDecoder.scanner - } - } - - mutating func decodeSingularGroupField(value: inout G?) throws { - try decodeSingularMessageField(value: &value) - } - - mutating func decodeRepeatedGroupField(value: inout [G]) throws { - try decodeRepeatedMessageField(value: &value) - } - - private mutating func decodeMapEntry(mapType: _ProtobufMap.Type, value: inout _ProtobufMap.BaseType) throws { - var keyField: KeyType.BaseType? - var valueField: ValueType.BaseType? - let terminator = try scanner.skipObjectStart() - while true { - if scanner.skipOptionalObjectEnd(terminator) { - if let keyField = keyField, let valueField = valueField { - value[keyField] = valueField - return - } else { - throw TextFormatDecodingError.malformedText - } - } - if let key = try scanner.nextKey() { - switch key { - case "key", "1": - try KeyType.decodeSingular(value: &keyField, from: &self) - case "value", "2": - try ValueType.decodeSingular(value: &valueField, from: &self) - default: - throw TextFormatDecodingError.unknownField - } - scanner.skipOptionalSeparator() - } else { - throw TextFormatDecodingError.malformedText - } - } - } - - mutating func decodeMapField(fieldType: _ProtobufMap.Type, value: inout _ProtobufMap.BaseType) throws { - _ = scanner.skipOptionalColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - try decodeMapEntry(mapType: fieldType, value: &value) - } - } else { - try decodeMapEntry(mapType: fieldType, value: &value) - } - } - - private mutating func decodeMapEntry(mapType: _ProtobufEnumMap.Type, value: inout _ProtobufEnumMap.BaseType) throws where ValueType.RawValue == Int { - var keyField: KeyType.BaseType? - var valueField: ValueType? - let terminator = try scanner.skipObjectStart() - while true { - if scanner.skipOptionalObjectEnd(terminator) { - if let keyField = keyField, let valueField = valueField { - value[keyField] = valueField - return - } else { - throw TextFormatDecodingError.malformedText - } - } - if let key = try scanner.nextKey() { - switch key { - case "key", "1": - try KeyType.decodeSingular(value: &keyField, from: &self) - case "value", "2": - try decodeSingularEnumField(value: &valueField) - default: - throw TextFormatDecodingError.unknownField - } - scanner.skipOptionalSeparator() - } else { - throw TextFormatDecodingError.malformedText - } - } - } - - mutating func decodeMapField(fieldType: _ProtobufEnumMap.Type, value: inout _ProtobufEnumMap.BaseType) throws where ValueType.RawValue == Int { - _ = scanner.skipOptionalColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - try decodeMapEntry(mapType: fieldType, value: &value) - } - } else { - try decodeMapEntry(mapType: fieldType, value: &value) - } - } - - private mutating func decodeMapEntry(mapType: _ProtobufMessageMap.Type, value: inout _ProtobufMessageMap.BaseType) throws { - var keyField: KeyType.BaseType? - var valueField: ValueType? - let terminator = try scanner.skipObjectStart() - while true { - if scanner.skipOptionalObjectEnd(terminator) { - if let keyField = keyField, let valueField = valueField { - value[keyField] = valueField - return - } else { - throw TextFormatDecodingError.malformedText - } - } - if let key = try scanner.nextKey() { - switch key { - case "key", "1": - try KeyType.decodeSingular(value: &keyField, from: &self) - case "value", "2": - try decodeSingularMessageField(value: &valueField) - default: - throw TextFormatDecodingError.unknownField - } - scanner.skipOptionalSeparator() - } else { - throw TextFormatDecodingError.malformedText - } - } - } - - mutating func decodeMapField(fieldType: _ProtobufMessageMap.Type, value: inout _ProtobufMessageMap.BaseType) throws { - _ = scanner.skipOptionalColon() - if scanner.skipOptionalBeginArray() { - var firstItem = true - while true { - if scanner.skipOptionalEndArray() { - return - } - if firstItem { - firstItem = false - } else { - try scanner.skipRequiredComma() - } - try decodeMapEntry(mapType: fieldType, value: &value) - } - } else { - try decodeMapEntry(mapType: fieldType, value: &value) - } - } - - mutating func decodeExtensionField(values: inout ExtensionFieldValueSet, messageType: Message.Type, fieldNumber: Int) throws { - if let ext = scanner.extensions?[messageType, fieldNumber] { - try values.modify(index: fieldNumber) { fieldValue in - if fieldValue != nil { - try fieldValue!.decodeExtensionField(decoder: &self) - } else { - fieldValue = try ext._protobuf_newField(decoder: &self) - } - if fieldValue == nil { - // Really things should never get here, for TextFormat, decoding - // the value should always work or throw an error. This specific - // error result is to allow this to be more detectable. - throw TextFormatDecodingError.internalExtensionError - } - } - } - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatDecodingError.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatDecodingError.swift deleted file mode 100644 index ea57bf56..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatDecodingError.swift +++ /dev/null @@ -1,42 +0,0 @@ -// Sources/SwiftProtobuf/TextFormatDecodingError.swift - Protobuf text format decoding errors -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Protobuf text format decoding errors -/// -// ----------------------------------------------------------------------------- - -public enum TextFormatDecodingError: Error { - /// Text data could not be parsed - case malformedText - /// A number could not be parsed - case malformedNumber - /// Extraneous data remained after decoding should have been complete - case trailingGarbage - /// The data stopped before we expected - case truncated - /// A string was not valid UTF8 - case invalidUTF8 - /// The data being parsed does not match the type specified in the proto file - case schemaMismatch - /// Field names were not compiled into the binary - case missingFieldNames - /// A field identifier (name or number) was not found on the message - case unknownField - /// The enum value was not recognized - case unrecognizedEnumValue - /// Text format rejects conflicting values for the same oneof field - case conflictingOneOf - /// An internal error happened while decoding. If this is ever encountered, - /// please file an issue with SwiftProtobuf with as much details as possible - /// for what happened (proto definitions, bytes being decoded (if possible)). - case internalExtensionError - /// Reached the nesting limit for messages within messages while decoding. - case messageDepthLimit -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatDecodingOptions.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatDecodingOptions.swift deleted file mode 100644 index 4713eba4..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatDecodingOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// Sources/SwiftProtobuf/TextFormatDecodingOptions.swift - Text format decoding options -// -// Copyright (c) 2014 - 2021 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Text format decoding options -/// -// ----------------------------------------------------------------------------- - -/// Options for TextFormatDecoding. -public struct TextFormatDecodingOptions { - /// The maximum nesting of message with messages. The default is 100. - /// - /// To prevent corrupt or malicious messages from causing stack overflows, - /// this controls how deep messages can be nested within other messages - /// while parsing. - public var messageDepthLimit: Int = 100 - - public init() {} -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatEncoder.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatEncoder.swift deleted file mode 100644 index 6fe217cd..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatEncoder.swift +++ /dev/null @@ -1,296 +0,0 @@ -// Sources/SwiftProtobuf/TextFormatEncoder.swift - Text format encoding support -// -// Copyright (c) 2014 - 2019 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Text format serialization engine. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -private let asciiSpace = UInt8(ascii: " ") -private let asciiColon = UInt8(ascii: ":") -private let asciiComma = UInt8(ascii: ",") -private let asciiMinus = UInt8(ascii: "-") -private let asciiBackslash = UInt8(ascii: "\\") -private let asciiDoubleQuote = UInt8(ascii: "\"") -private let asciiZero = UInt8(ascii: "0") -private let asciiOpenCurlyBracket = UInt8(ascii: "{") -private let asciiCloseCurlyBracket = UInt8(ascii: "}") -private let asciiOpenSquareBracket = UInt8(ascii: "[") -private let asciiCloseSquareBracket = UInt8(ascii: "]") -private let asciiNewline = UInt8(ascii: "\n") -private let asciiUpperA = UInt8(ascii: "A") - -private let tabSize = 2 -private let tab = [UInt8](repeating: asciiSpace, count: tabSize) - -/// TextFormatEncoder has no public members. -internal struct TextFormatEncoder { - private var data = [UInt8]() - private var indentString: [UInt8] = [] - var stringResult: String { - get { - return String(bytes: data, encoding: String.Encoding.utf8)! - } - } - - internal mutating func append(staticText: StaticString) { - let buff = UnsafeBufferPointer(start: staticText.utf8Start, count: staticText.utf8CodeUnitCount) - data.append(contentsOf: buff) - } - - internal mutating func append(name: _NameMap.Name) { - data.append(contentsOf: name.utf8Buffer) - } - - internal mutating func append(bytes: [UInt8]) { - data.append(contentsOf: bytes) - } - - private mutating func append(text: String) { - data.append(contentsOf: text.utf8) - } - - init() {} - - internal mutating func indent() { - data.append(contentsOf: indentString) - } - - mutating func emitFieldName(name: UnsafeRawBufferPointer) { - indent() - data.append(contentsOf: name) - } - - mutating func emitFieldName(name: StaticString) { - let buff = UnsafeRawBufferPointer(start: name.utf8Start, count: name.utf8CodeUnitCount) - emitFieldName(name: buff) - } - - mutating func emitFieldName(name: [UInt8]) { - indent() - data.append(contentsOf: name) - } - - mutating func emitExtensionFieldName(name: String) { - indent() - data.append(asciiOpenSquareBracket) - append(text: name) - data.append(asciiCloseSquareBracket) - } - - mutating func emitFieldNumber(number: Int) { - indent() - appendUInt(value: UInt64(number)) - } - - mutating func startRegularField() { - append(staticText: ": ") - } - mutating func endRegularField() { - data.append(asciiNewline) - } - - // In Text format, a message-valued field writes the name - // without a trailing colon: - // name_of_field {key: value key2: value2} - mutating func startMessageField() { - append(staticText: " {\n") - indentString.append(contentsOf: tab) - } - - mutating func endMessageField() { - indentString.removeLast(tabSize) - indent() - append(staticText: "}\n") - } - - mutating func startArray() { - data.append(asciiOpenSquareBracket) - } - - mutating func arraySeparator() { - append(staticText: ", ") - } - - mutating func endArray() { - data.append(asciiCloseSquareBracket) - } - - mutating func putEnumValue(value: E) { - if let name = value.name { - data.append(contentsOf: name.utf8Buffer) - } else { - appendInt(value: Int64(value.rawValue)) - } - } - - mutating func putFloatValue(value: Float) { - if value.isNaN { - append(staticText: "nan") - } else if !value.isFinite { - if value < 0 { - append(staticText: "-inf") - } else { - append(staticText: "inf") - } - } else { - data.append(contentsOf: value.debugDescription.utf8) - } - } - - mutating func putDoubleValue(value: Double) { - if value.isNaN { - append(staticText: "nan") - } else if !value.isFinite { - if value < 0 { - append(staticText: "-inf") - } else { - append(staticText: "inf") - } - } else { - data.append(contentsOf: value.debugDescription.utf8) - } - } - - private mutating func appendUInt(value: UInt64) { - if value >= 1000 { - appendUInt(value: value / 1000) - } - if value >= 100 { - data.append(asciiZero + UInt8((value / 100) % 10)) - } - if value >= 10 { - data.append(asciiZero + UInt8((value / 10) % 10)) - } - data.append(asciiZero + UInt8(value % 10)) - } - private mutating func appendInt(value: Int64) { - if value < 0 { - data.append(asciiMinus) - // This is the twos-complement negation of value, - // computed in a way that won't overflow a 64-bit - // signed integer. - appendUInt(value: 1 + ~UInt64(bitPattern: value)) - } else { - appendUInt(value: UInt64(bitPattern: value)) - } - } - - mutating func putInt64(value: Int64) { - appendInt(value: value) - } - - mutating func putUInt64(value: UInt64) { - appendUInt(value: value) - } - - mutating func appendUIntHex(value: UInt64, digits: Int) { - if digits == 0 { - append(staticText: "0x") - } else { - appendUIntHex(value: value >> 4, digits: digits - 1) - let d = UInt8(truncatingIfNeeded: value % 16) - data.append(d < 10 ? asciiZero + d : asciiUpperA + d - 10) - } - } - - mutating func putUInt64Hex(value: UInt64, digits: Int) { - appendUIntHex(value: value, digits: digits) - } - - mutating func putBoolValue(value: Bool) { - append(staticText: value ? "true" : "false") - } - - mutating func putStringValue(value: String) { - data.append(asciiDoubleQuote) - for c in value.unicodeScalars { - switch c.value { - // Special two-byte escapes - case 8: - append(staticText: "\\b") - case 9: - append(staticText: "\\t") - case 10: - append(staticText: "\\n") - case 11: - append(staticText: "\\v") - case 12: - append(staticText: "\\f") - case 13: - append(staticText: "\\r") - case 34: - append(staticText: "\\\"") - case 92: - append(staticText: "\\\\") - case 0...31, 127: // Octal form for C0 control chars - data.append(asciiBackslash) - data.append(asciiZero + UInt8(c.value / 64)) - data.append(asciiZero + UInt8(c.value / 8 % 8)) - data.append(asciiZero + UInt8(c.value % 8)) - case 0...127: // ASCII - data.append(UInt8(truncatingIfNeeded: c.value)) - case 0x80...0x7ff: - data.append(0xc0 + UInt8(c.value / 64)) - data.append(0x80 + UInt8(c.value % 64)) - case 0x800...0xffff: - data.append(0xe0 + UInt8(truncatingIfNeeded: c.value >> 12)) - data.append(0x80 + UInt8(truncatingIfNeeded: (c.value >> 6) & 0x3f)) - data.append(0x80 + UInt8(truncatingIfNeeded: c.value & 0x3f)) - default: - data.append(0xf0 + UInt8(truncatingIfNeeded: c.value >> 18)) - data.append(0x80 + UInt8(truncatingIfNeeded: (c.value >> 12) & 0x3f)) - data.append(0x80 + UInt8(truncatingIfNeeded: (c.value >> 6) & 0x3f)) - data.append(0x80 + UInt8(truncatingIfNeeded: c.value & 0x3f)) - } - } - data.append(asciiDoubleQuote) - } - - mutating func putBytesValue(value: Data) { - data.append(asciiDoubleQuote) - value.withUnsafeBytes { (body: UnsafeRawBufferPointer) in - if let p = body.baseAddress, body.count > 0 { - for i in 0.. [UInt8] { - var bytes = [UInt8]() - if let protoName = nameMap?.names(for: fieldNumber)?.proto { - bytes.append(contentsOf: protoName.utf8Buffer) - } else if let protoName = nameResolver[fieldNumber] { - let buff = UnsafeBufferPointer(start: protoName.utf8Start, count: protoName.utf8CodeUnitCount) - bytes.append(contentsOf: buff) - } else if let extensionName = extensions?[fieldNumber]?.protobufExtension.fieldName { - bytes.append(UInt8(ascii: "[")) - bytes.append(contentsOf: extensionName.utf8) - bytes.append(UInt8(ascii: "]")) - } else { - bytes.append(contentsOf: fieldNumber.description.utf8) - } - return bytes - } - - private mutating func emitFieldName(lookingUp fieldNumber: Int) { - if let protoName = nameMap?.names(for: fieldNumber)?.proto { - encoder.emitFieldName(name: protoName.utf8Buffer) - } else if let protoName = nameResolver[fieldNumber] { - encoder.emitFieldName(name: protoName) - } else if let extensionName = extensions?[fieldNumber]?.protobufExtension.fieldName { - encoder.emitExtensionFieldName(name: extensionName) - } else { - encoder.emitFieldNumber(number: fieldNumber) - } - } - - mutating func visitUnknown(bytes: Data) throws { - if options.printUnknownFields { - try bytes.withUnsafeBytes { (body: UnsafeRawBufferPointer) -> () in - if let baseAddress = body.baseAddress, body.count > 0 { - // All fields will be directly handled, so there is no need for - // the unknown field buffering/collection (when scannings to see - // if something is a message, this would be extremely wasteful). - var binaryOptions = BinaryDecodingOptions() - binaryOptions.discardUnknownFields = true - var decoder = BinaryDecoder(forReadingFrom: baseAddress, - count: body.count, - options: binaryOptions) - try visitUnknown(decoder: &decoder) - } - } - } - } - - /// Helper for printing out unknowns. - /// - /// The implementation tries to be "helpful" and if a length delimited field - /// appears to be a submessage, it prints it as such. However, that opens the - /// door to someone sending a message with an unknown field that is a stack - /// bomb, i.e. - it causes this code to recurse, exhausing the stack and - /// thus opening up an attack vector. To keep this "help", but avoid the - /// attack, a limit is placed on how many times it will recurse before just - /// treating the length delimted fields as bytes and not trying to decode - /// them. - private mutating func visitUnknown( - decoder: inout BinaryDecoder, - recursionBudget: Int = 10 - ) throws { - // This stack serves to avoid recursion for groups within groups within - // groups..., this avoid the stack attack that the message detection - // hits. No limit is placed on this because there is no stack risk with - // recursion, and because if a limit was hit, there is no other way to - // encode the group (the message field can just print as length - // delimited, groups don't have an option like that). - var groupFieldNumberStack: [Int] = [] - - while let tag = try decoder.getTag() { - switch tag.wireFormat { - case .varint: - encoder.emitFieldNumber(number: tag.fieldNumber) - var value: UInt64 = 0 - encoder.startRegularField() - try decoder.decodeSingularUInt64Field(value: &value) - encoder.putUInt64(value: value) - encoder.endRegularField() - case .fixed64: - encoder.emitFieldNumber(number: tag.fieldNumber) - var value: UInt64 = 0 - encoder.startRegularField() - try decoder.decodeSingularFixed64Field(value: &value) - encoder.putUInt64Hex(value: value, digits: 16) - encoder.endRegularField() - case .lengthDelimited: - encoder.emitFieldNumber(number: tag.fieldNumber) - var bytes = Data() - try decoder.decodeSingularBytesField(value: &bytes) - bytes.withUnsafeBytes { (body: UnsafeRawBufferPointer) -> () in - if let baseAddress = body.baseAddress, body.count > 0 { - var encodeAsBytes: Bool - if (recursionBudget > 0) { - do { - // Walk all the fields to test if it looks like a message - var testDecoder = BinaryDecoder(forReadingFrom: baseAddress, - count: body.count, - parent: decoder) - while let _ = try testDecoder.nextFieldNumber() { - } - // No error? Output the message body. - encodeAsBytes = false - var subDecoder = BinaryDecoder(forReadingFrom: baseAddress, - count: bytes.count, - parent: decoder) - encoder.startMessageField() - try visitUnknown(decoder: &subDecoder, - recursionBudget: recursionBudget - 1) - encoder.endMessageField() - } catch { - encodeAsBytes = true - } - } else { - encodeAsBytes = true - } - if (encodeAsBytes) { - encoder.startRegularField() - encoder.putBytesValue(value: bytes) - encoder.endRegularField() - } - } - } - case .startGroup: - encoder.emitFieldNumber(number: tag.fieldNumber) - encoder.startMessageField() - groupFieldNumberStack.append(tag.fieldNumber) - case .endGroup: - let groupFieldNumber = groupFieldNumberStack.popLast() - // Unknown data is scanned and verified by the - // binary parser, so this can never fail. - assert(tag.fieldNumber == groupFieldNumber) - encoder.endMessageField() - case .fixed32: - encoder.emitFieldNumber(number: tag.fieldNumber) - var value: UInt32 = 0 - encoder.startRegularField() - try decoder.decodeSingularFixed32Field(value: &value) - encoder.putUInt64Hex(value: UInt64(value), digits: 8) - encoder.endRegularField() - } - } - - // Unknown data is scanned and verified by the binary parser, so this can - // never fail. - assert(groupFieldNumberStack.isEmpty) - } - - // Visitor.swift defines default versions for other singular field types - // that simply widen and dispatch to one of the following. Since Text format - // does not distinguish e.g., Fixed64 vs. UInt64, this is sufficient. - - mutating func visitSingularFloatField(value: Float, fieldNumber: Int) throws { - emitFieldName(lookingUp: fieldNumber) - encoder.startRegularField() - encoder.putFloatValue(value: value) - encoder.endRegularField() - } - - mutating func visitSingularDoubleField(value: Double, fieldNumber: Int) throws { - emitFieldName(lookingUp: fieldNumber) - encoder.startRegularField() - encoder.putDoubleValue(value: value) - encoder.endRegularField() - } - - mutating func visitSingularInt64Field(value: Int64, fieldNumber: Int) throws { - emitFieldName(lookingUp: fieldNumber) - encoder.startRegularField() - encoder.putInt64(value: value) - encoder.endRegularField() - } - - mutating func visitSingularUInt64Field(value: UInt64, fieldNumber: Int) throws { - emitFieldName(lookingUp: fieldNumber) - encoder.startRegularField() - encoder.putUInt64(value: value) - encoder.endRegularField() - } - - mutating func visitSingularBoolField(value: Bool, fieldNumber: Int) throws { - emitFieldName(lookingUp: fieldNumber) - encoder.startRegularField() - encoder.putBoolValue(value: value) - encoder.endRegularField() - } - - mutating func visitSingularStringField(value: String, fieldNumber: Int) throws { - emitFieldName(lookingUp: fieldNumber) - encoder.startRegularField() - encoder.putStringValue(value: value) - encoder.endRegularField() - } - - mutating func visitSingularBytesField(value: Data, fieldNumber: Int) throws { - emitFieldName(lookingUp: fieldNumber) - encoder.startRegularField() - encoder.putBytesValue(value: value) - encoder.endRegularField() - } - - mutating func visitSingularEnumField(value: E, fieldNumber: Int) throws { - emitFieldName(lookingUp: fieldNumber) - encoder.startRegularField() - encoder.putEnumValue(value: value) - encoder.endRegularField() - } - - mutating func visitSingularMessageField(value: M, - fieldNumber: Int) throws { - emitFieldName(lookingUp: fieldNumber) - - // Cache old encoder state - let oldNameMap = self.nameMap - let oldNameResolver = self.nameResolver - let oldExtensions = self.extensions - // Update encoding state for new message - self.nameMap = (M.self as? _ProtoNameProviding.Type)?._protobuf_nameMap - self.nameResolver = [:] - self.extensions = (value as? ExtensibleMessage)?._protobuf_extensionFieldValues - // Encode submessage - encoder.startMessageField() - if let any = value as? Google_Protobuf_Any { - any.textTraverse(visitor: &self) - } else { - try! value.traverse(visitor: &self) - } - encoder.endMessageField() - // Restore state before returning - self.extensions = oldExtensions - self.nameResolver = oldNameResolver - self.nameMap = oldNameMap - } - - // Emit the full "verbose" form of an Any. This writes the typeURL - // as a field name in `[...]` followed by the fields of the - // contained message. - internal mutating func visitAnyVerbose(value: Message, typeURL: String) { - encoder.emitExtensionFieldName(name: typeURL) - encoder.startMessageField() - var visitor = TextFormatEncodingVisitor(message: value, encoder: encoder, options: options) - if let any = value as? Google_Protobuf_Any { - any.textTraverse(visitor: &visitor) - } else { - try! value.traverse(visitor: &visitor) - } - encoder = visitor.encoder - encoder.endMessageField() - } - - // Write a single special field called "#json". This - // is used for Any objects with undecoded JSON contents. - internal mutating func visitAnyJSONDataField(value: Data) { - encoder.indent() - encoder.append(staticText: "#json: ") - encoder.putBytesValue(value: value) - encoder.append(staticText: "\n") - } - - // The default implementations in Visitor.swift provide the correct - // results, but we get significantly better performance by only doing - // the name lookup once for the array, rather than once for each element: - - mutating func visitRepeatedFloatField(value: [Float], fieldNumber: Int) throws { - assert(!value.isEmpty) - let fieldName = formatFieldName(lookingUp: fieldNumber) - for v in value { - encoder.emitFieldName(name: fieldName) - encoder.startRegularField() - encoder.putFloatValue(value: v) - encoder.endRegularField() - } - } - - mutating func visitRepeatedDoubleField(value: [Double], fieldNumber: Int) throws { - assert(!value.isEmpty) - let fieldName = formatFieldName(lookingUp: fieldNumber) - for v in value { - encoder.emitFieldName(name: fieldName) - encoder.startRegularField() - encoder.putDoubleValue(value: v) - encoder.endRegularField() - } - } - - mutating func visitRepeatedInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - let fieldName = formatFieldName(lookingUp: fieldNumber) - for v in value { - encoder.emitFieldName(name: fieldName) - encoder.startRegularField() - encoder.putInt64(value: Int64(v)) - encoder.endRegularField() - } - } - - mutating func visitRepeatedInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - let fieldName = formatFieldName(lookingUp: fieldNumber) - for v in value { - encoder.emitFieldName(name: fieldName) - encoder.startRegularField() - encoder.putInt64(value: v) - encoder.endRegularField() - } - } - - mutating func visitRepeatedUInt32Field(value: [UInt32], fieldNumber: Int) throws { - assert(!value.isEmpty) - let fieldName = formatFieldName(lookingUp: fieldNumber) - for v in value { - encoder.emitFieldName(name: fieldName) - encoder.startRegularField() - encoder.putUInt64(value: UInt64(v)) - encoder.endRegularField() - } - } - - mutating func visitRepeatedUInt64Field(value: [UInt64], fieldNumber: Int) throws { - assert(!value.isEmpty) - let fieldName = formatFieldName(lookingUp: fieldNumber) - for v in value { - encoder.emitFieldName(name: fieldName) - encoder.startRegularField() - encoder.putUInt64(value: v) - encoder.endRegularField() - } - } - - mutating func visitRepeatedSInt32Field(value: [Int32], fieldNumber: Int) throws { - try visitRepeatedInt32Field(value: value, fieldNumber: fieldNumber) - } - mutating func visitRepeatedSInt64Field(value: [Int64], fieldNumber: Int) throws { - try visitRepeatedInt64Field(value: value, fieldNumber: fieldNumber) - } - mutating func visitRepeatedFixed32Field(value: [UInt32], fieldNumber: Int) throws { - try visitRepeatedUInt32Field(value: value, fieldNumber: fieldNumber) - } - mutating func visitRepeatedFixed64Field(value: [UInt64], fieldNumber: Int) throws { - try visitRepeatedUInt64Field(value: value, fieldNumber: fieldNumber) - } - mutating func visitRepeatedSFixed32Field(value: [Int32], fieldNumber: Int) throws { - try visitRepeatedInt32Field(value: value, fieldNumber: fieldNumber) - } - mutating func visitRepeatedSFixed64Field(value: [Int64], fieldNumber: Int) throws { - try visitRepeatedInt64Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitRepeatedBoolField(value: [Bool], fieldNumber: Int) throws { - assert(!value.isEmpty) - let fieldName = formatFieldName(lookingUp: fieldNumber) - for v in value { - encoder.emitFieldName(name: fieldName) - encoder.startRegularField() - encoder.putBoolValue(value: v) - encoder.endRegularField() - } - } - - mutating func visitRepeatedStringField(value: [String], fieldNumber: Int) throws { - assert(!value.isEmpty) - let fieldName = formatFieldName(lookingUp: fieldNumber) - for v in value { - encoder.emitFieldName(name: fieldName) - encoder.startRegularField() - encoder.putStringValue(value: v) - encoder.endRegularField() - } - } - - mutating func visitRepeatedBytesField(value: [Data], fieldNumber: Int) throws { - assert(!value.isEmpty) - let fieldName = formatFieldName(lookingUp: fieldNumber) - for v in value { - encoder.emitFieldName(name: fieldName) - encoder.startRegularField() - encoder.putBytesValue(value: v) - encoder.endRegularField() - } - } - - mutating func visitRepeatedEnumField(value: [E], fieldNumber: Int) throws { - assert(!value.isEmpty) - let fieldName = formatFieldName(lookingUp: fieldNumber) - for v in value { - encoder.emitFieldName(name: fieldName) - encoder.startRegularField() - encoder.putEnumValue(value: v) - encoder.endRegularField() - } - } - - // Messages and groups - mutating func visitRepeatedMessageField(value: [M], - fieldNumber: Int) throws { - assert(!value.isEmpty) - // Look up field name against outer message encoding state - let fieldName = formatFieldName(lookingUp: fieldNumber) - // Cache old encoder state - let oldNameMap = self.nameMap - let oldNameResolver = self.nameResolver - let oldExtensions = self.extensions - // Update encoding state for new message type - self.nameMap = (M.self as? _ProtoNameProviding.Type)?._protobuf_nameMap - self.nameResolver = [:] - self.extensions = (value as? ExtensibleMessage)?._protobuf_extensionFieldValues - // Iterate and encode each message - for v in value { - encoder.emitFieldName(name: fieldName) - encoder.startMessageField() - if let any = v as? Google_Protobuf_Any { - any.textTraverse(visitor: &self) - } else { - try! v.traverse(visitor: &self) - } - encoder.endMessageField() - } - // Restore state - self.extensions = oldExtensions - self.nameResolver = oldNameResolver - self.nameMap = oldNameMap - } - - // Google's C++ implementation of Text format supports two formats - // for repeated numeric fields: "short" format writes the list as a - // single field with values enclosed in `[...]`, "long" format - // writes a separate field name/value for each item. They provide - // an option for callers to select which output version they prefer. - - // Since this distinction mirrors the difference in Protobuf Binary - // between "packed" and "non-packed", I've chosen to use the short - // format for packed fields and the long version for repeated - // fields. This provides a clear visual distinction between these - // fields (including proto3's default use of packed) without - // introducing the baggage of a separate option. - - private mutating func iterateAndEncode( - packedValue: [T], fieldNumber: Int, - encode: (T, inout TextFormatEncoder) -> () - ) throws { - assert(!packedValue.isEmpty) - emitFieldName(lookingUp: fieldNumber) - encoder.startRegularField() - var firstItem = true - encoder.startArray() - for v in packedValue { - if !firstItem { - encoder.arraySeparator() - } - encode(v, &encoder) - firstItem = false - } - encoder.endArray() - encoder.endRegularField() - } - - mutating func visitPackedFloatField(value: [Float], fieldNumber: Int) throws { - try iterateAndEncode(packedValue: value, fieldNumber: fieldNumber) { - (v: Float, encoder: inout TextFormatEncoder) in - encoder.putFloatValue(value: v) - } - } - - mutating func visitPackedDoubleField(value: [Double], fieldNumber: Int) throws { - try iterateAndEncode(packedValue: value, fieldNumber: fieldNumber) { - (v: Double, encoder: inout TextFormatEncoder) in - encoder.putDoubleValue(value: v) - } - } - - mutating func visitPackedInt32Field(value: [Int32], fieldNumber: Int) throws { - try iterateAndEncode(packedValue: value, fieldNumber: fieldNumber) { - (v: Int32, encoder: inout TextFormatEncoder) in - encoder.putInt64(value: Int64(v)) - } - } - - mutating func visitPackedInt64Field(value: [Int64], fieldNumber: Int) throws { - try iterateAndEncode(packedValue: value, fieldNumber: fieldNumber) { - (v: Int64, encoder: inout TextFormatEncoder) in - encoder.putInt64(value: v) - } - } - - mutating func visitPackedUInt32Field(value: [UInt32], fieldNumber: Int) throws { - try iterateAndEncode(packedValue: value, fieldNumber: fieldNumber) { - (v: UInt32, encoder: inout TextFormatEncoder) in - encoder.putUInt64(value: UInt64(v)) - } - } - - mutating func visitPackedUInt64Field(value: [UInt64], fieldNumber: Int) throws { - try iterateAndEncode(packedValue: value, fieldNumber: fieldNumber) { - (v: UInt64, encoder: inout TextFormatEncoder) in - encoder.putUInt64(value: v) - } - } - - mutating func visitPackedSInt32Field(value: [Int32], fieldNumber: Int) throws { - try visitPackedInt32Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitPackedSInt64Field(value: [Int64], fieldNumber: Int) throws { - try visitPackedInt64Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitPackedFixed32Field(value: [UInt32], fieldNumber: Int) throws { - try visitPackedUInt32Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitPackedFixed64Field(value: [UInt64], fieldNumber: Int) throws { - try visitPackedUInt64Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitPackedSFixed32Field(value: [Int32], fieldNumber: Int) throws { - try visitPackedInt32Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitPackedSFixed64Field(value: [Int64], fieldNumber: Int) throws { - try visitPackedInt64Field(value: value, fieldNumber: fieldNumber) - } - - mutating func visitPackedBoolField(value: [Bool], fieldNumber: Int) throws { - try iterateAndEncode(packedValue: value, fieldNumber: fieldNumber) { - (v: Bool, encoder: inout TextFormatEncoder) in - encoder.putBoolValue(value: v) - } - } - - mutating func visitPackedEnumField(value: [E], fieldNumber: Int) throws { - try iterateAndEncode(packedValue: value, fieldNumber: fieldNumber) { - (v: E, encoder: inout TextFormatEncoder) in - encoder.putEnumValue(value: v) - } - } - - /// Helper to encapsulate the common structure of iterating over a map - /// and encoding the keys and values. - private mutating func iterateAndEncode( - map: Dictionary, - fieldNumber: Int, - isOrderedBefore: (K, K) -> Bool, - encode: (inout TextFormatEncodingVisitor, K, V) throws -> () - ) throws { - for (k,v) in map.sorted(by: { isOrderedBefore( $0.0, $1.0) }) { - emitFieldName(lookingUp: fieldNumber) - encoder.startMessageField() - var visitor = TextFormatEncodingVisitor(nameMap: nil, nameResolver: mapNameResolver, extensions: nil, encoder: encoder, options: options) - try encode(&visitor, k, v) - encoder = visitor.encoder - encoder.endMessageField() - } - } - - mutating func visitMapField( - fieldType: _ProtobufMap.Type, - value: _ProtobufMap.BaseType, - fieldNumber: Int - ) throws { - try iterateAndEncode(map: value, fieldNumber: fieldNumber, isOrderedBefore: KeyType._lessThan) { - (visitor: inout TextFormatEncodingVisitor, key, value) throws -> () in - try KeyType.visitSingular(value: key, fieldNumber: 1, with: &visitor) - try ValueType.visitSingular(value: value, fieldNumber: 2, with: &visitor) - } - } - - mutating func visitMapField( - fieldType: _ProtobufEnumMap.Type, - value: _ProtobufEnumMap.BaseType, - fieldNumber: Int - ) throws where ValueType.RawValue == Int { - try iterateAndEncode(map: value, fieldNumber: fieldNumber, isOrderedBefore: KeyType._lessThan) { - (visitor: inout TextFormatEncodingVisitor, key, value) throws -> () in - try KeyType.visitSingular(value: key, fieldNumber: 1, with: &visitor) - try visitor.visitSingularEnumField(value: value, fieldNumber: 2) - } - } - - mutating func visitMapField( - fieldType: _ProtobufMessageMap.Type, - value: _ProtobufMessageMap.BaseType, - fieldNumber: Int - ) throws { - try iterateAndEncode(map: value, fieldNumber: fieldNumber, isOrderedBefore: KeyType._lessThan) { - (visitor: inout TextFormatEncodingVisitor, key, value) throws -> () in - try KeyType.visitSingular(value: key, fieldNumber: 1, with: &visitor) - try visitor.visitSingularMessageField(value: value, fieldNumber: 2) - } - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatScanner.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatScanner.swift deleted file mode 100644 index e2bbbf6e..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TextFormatScanner.swift +++ /dev/null @@ -1,1248 +0,0 @@ -// Sources/SwiftProtobuf/TextFormatScanner.swift - Text format decoding -// -// Copyright (c) 2014 - 2019 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Test format decoding engine. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -private let asciiBell = UInt8(7) -private let asciiBackspace = UInt8(8) -private let asciiTab = UInt8(9) -private let asciiNewLine = UInt8(10) -private let asciiVerticalTab = UInt8(11) -private let asciiFormFeed = UInt8(12) -private let asciiCarriageReturn = UInt8(13) -private let asciiZero = UInt8(ascii: "0") -private let asciiOne = UInt8(ascii: "1") -private let asciiThree = UInt8(ascii: "3") -private let asciiSeven = UInt8(ascii: "7") -private let asciiNine = UInt8(ascii: "9") -private let asciiColon = UInt8(ascii: ":") -private let asciiPeriod = UInt8(ascii: ".") -private let asciiPlus = UInt8(ascii: "+") -private let asciiComma = UInt8(ascii: ",") -private let asciiSemicolon = UInt8(ascii: ";") -private let asciiDoubleQuote = UInt8(ascii: "\"") -private let asciiSingleQuote = UInt8(ascii: "\'") -private let asciiBackslash = UInt8(ascii: "\\") -private let asciiForwardSlash = UInt8(ascii: "/") -private let asciiHash = UInt8(ascii: "#") -private let asciiUnderscore = UInt8(ascii: "_") -private let asciiQuestionMark = UInt8(ascii: "?") -private let asciiSpace = UInt8(ascii: " ") -private let asciiOpenSquareBracket = UInt8(ascii: "[") -private let asciiCloseSquareBracket = UInt8(ascii: "]") -private let asciiOpenCurlyBracket = UInt8(ascii: "{") -private let asciiCloseCurlyBracket = UInt8(ascii: "}") -private let asciiOpenAngleBracket = UInt8(ascii: "<") -private let asciiCloseAngleBracket = UInt8(ascii: ">") -private let asciiMinus = UInt8(ascii: "-") -private let asciiLowerA = UInt8(ascii: "a") -private let asciiUpperA = UInt8(ascii: "A") -private let asciiLowerB = UInt8(ascii: "b") -private let asciiLowerE = UInt8(ascii: "e") -private let asciiUpperE = UInt8(ascii: "E") -private let asciiLowerF = UInt8(ascii: "f") -private let asciiUpperF = UInt8(ascii: "F") -private let asciiLowerI = UInt8(ascii: "i") -private let asciiLowerL = UInt8(ascii: "l") -private let asciiLowerN = UInt8(ascii: "n") -private let asciiLowerR = UInt8(ascii: "r") -private let asciiLowerS = UInt8(ascii: "s") -private let asciiLowerT = UInt8(ascii: "t") -private let asciiUpperT = UInt8(ascii: "T") -private let asciiLowerU = UInt8(ascii: "u") -private let asciiUpperU = UInt8(ascii: "U") -private let asciiLowerV = UInt8(ascii: "v") -private let asciiLowerX = UInt8(ascii: "x") -private let asciiLowerY = UInt8(ascii: "y") -private let asciiLowerZ = UInt8(ascii: "z") -private let asciiUpperZ = UInt8(ascii: "Z") - -private func fromHexDigit(_ c: UInt8) -> UInt8? { - if c >= asciiZero && c <= asciiNine { - return c - asciiZero - } - if c >= asciiUpperA && c <= asciiUpperF { - return c - asciiUpperA + UInt8(10) - } - if c >= asciiLowerA && c <= asciiLowerF { - return c - asciiLowerA + UInt8(10) - } - return nil -} - -private func uint32FromHexDigit(_ c: UInt8) -> UInt32? { - guard let u8 = fromHexDigit(c) else { - return nil - } - return UInt32(u8) -} - -// Protobuf Text encoding assumes that you're working directly -// in UTF-8. So this implementation converts the string to UTF8, -// then decodes it into a sequence of bytes, then converts -// it back into a string. -private func decodeString(_ s: String) -> String? { - - // Helper to read 4 hex digits as a UInt32 - func read4HexDigits(_ i: inout String.UTF8View.Iterator) -> UInt32? { - if let digit1 = i.next(), - let d1 = uint32FromHexDigit(digit1), - let digit2 = i.next(), - let d2 = uint32FromHexDigit(digit2), - let digit3 = i.next(), - let d3 = uint32FromHexDigit(digit3), - let digit4 = i.next(), - let d4 = uint32FromHexDigit(digit4) { - return (d1 << 12) + (d2 << 8) + (d3 << 4) + d4 - } - return nil - } - - var out = [UInt8]() - var bytes = s.utf8.makeIterator() - while let byte = bytes.next() { - switch byte { - case asciiBackslash: // backslash - if let escaped = bytes.next() { - switch escaped { - case asciiZero...asciiSeven: // 0...7 - // C standard allows 1, 2, or 3 octal digits. - let savedPosition = bytes - let digit1 = escaped - let digit1Value = digit1 - asciiZero - if let digit2 = bytes.next(), - digit2 >= asciiZero && digit2 <= asciiSeven { - let digit2Value = digit2 - asciiZero - let innerSavedPosition = bytes - if let digit3 = bytes.next(), - digit3 >= asciiZero && digit3 <= asciiSeven { - let digit3Value = digit3 - asciiZero - // The max octal digit is actually \377, but looking at the C++ - // protobuf code in strutil.cc:UnescapeCEscapeSequences(), it - // decodes with rollover, so just duplicate that behavior for - // consistency between languages. - let n = digit1Value &* 64 &+ digit2Value &* 8 &+ digit3Value - out.append(n) - } else { - let n = digit1Value * 8 + digit2Value - out.append(n) - bytes = innerSavedPosition - } - } else { - let n = digit1Value - out.append(n) - bytes = savedPosition - } - case asciiLowerU, asciiUpperU: // "u" - // \u - 4 hex digits, \U 8 hex digits: - guard let first = read4HexDigits(&bytes) else { return nil } - var codePoint = first - if escaped == asciiUpperU { - guard let second = read4HexDigits(&bytes) else { return nil } - codePoint = (codePoint << 16) + second - } - switch codePoint { - case 0...0x7f: - // 1 byte encoding - out.append(UInt8(truncatingIfNeeded: codePoint)) - case 0x80...0x7ff: - // 2 byte encoding - out.append(0xC0 + UInt8(truncatingIfNeeded: codePoint >> 6)) - out.append(0x80 + UInt8(truncatingIfNeeded: codePoint & 0x3F)) - case 0x800...0xffff: - // 3 byte encoding - out.append(0xE0 + UInt8(truncatingIfNeeded: codePoint >> 12)) - out.append(0x80 + UInt8(truncatingIfNeeded: (codePoint >> 6) & 0x3F)) - out.append(0x80 + UInt8(truncatingIfNeeded: codePoint & 0x3F)) - case 0x10000...0x10FFFF: - // 4 byte encoding - out.append(0xF0 + UInt8(truncatingIfNeeded: codePoint >> 18)) - out.append(0x80 + UInt8(truncatingIfNeeded: (codePoint >> 12) & 0x3F)) - out.append(0x80 + UInt8(truncatingIfNeeded: (codePoint >> 6) & 0x3F)) - out.append(0x80 + UInt8(truncatingIfNeeded: codePoint & 0x3F)) - default: - return nil - } - case asciiLowerX: // "x" - // Unlike C/C++, protobuf only allows 1 or 2 digits here: - if let byte = bytes.next(), let digit = fromHexDigit(byte) { - var n = digit - let savedPosition = bytes - if let byte = bytes.next(), let digit = fromHexDigit(byte) { - n = n &* 16 + digit - } else { - // No second digit; reset the iterator - bytes = savedPosition - } - out.append(n) - } else { - return nil // Hex escape must have at least 1 digit - } - case asciiLowerA: // \a - out.append(asciiBell) - case asciiLowerB: // \b - out.append(asciiBackspace) - case asciiLowerF: // \f - out.append(asciiFormFeed) - case asciiLowerN: // \n - out.append(asciiNewLine) - case asciiLowerR: // \r - out.append(asciiCarriageReturn) - case asciiLowerT: // \t - out.append(asciiTab) - case asciiLowerV: // \v - out.append(asciiVerticalTab) - case asciiDoubleQuote, - asciiSingleQuote, - asciiQuestionMark, - asciiBackslash: // " ' ? \ - out.append(escaped) - default: - return nil // Unrecognized escape - } - } else { - return nil // Input ends with backslash - } - default: - out.append(byte) - } - } - // There has got to be an easier way to convert a [UInt8] into a String. - return out.withUnsafeBufferPointer { ptr in - if let addr = ptr.baseAddress { - return utf8ToString(bytes: addr, count: ptr.count) - } else { - return String() - } - } -} - -/// -/// TextFormatScanner has no public members. -/// -internal struct TextFormatScanner { - internal var extensions: ExtensionMap? - private var p: UnsafeRawPointer - private var end: UnsafeRawPointer - private var doubleParser = DoubleParser() - - private let options: TextFormatDecodingOptions - internal var recursionBudget: Int - - internal var complete: Bool { - mutating get { - return p == end - } - } - - internal init( - utf8Pointer: UnsafeRawPointer, - count: Int, - options: TextFormatDecodingOptions, - extensions: ExtensionMap? = nil - ) { - p = utf8Pointer - end = p + count - self.extensions = extensions - self.options = options - // Since the root message doesn't start with a `skipObjectStart`, the - // budget starts with one less depth to cover that top message. - recursionBudget = options.messageDepthLimit - 1 - skipWhitespace() - } - - private mutating func incrementRecursionDepth() throws { - recursionBudget -= 1 - if recursionBudget < 0 { - throw TextFormatDecodingError.messageDepthLimit - } - } - - private mutating func decrementRecursionDepth() { - recursionBudget += 1 - // This should never happen, if it does, something is probably - // corrupting memory, and simply throwing doesn't make much sense. - if recursionBudget > options.messageDepthLimit { - fatalError("Somehow TextFormatDecoding unwound more objects than it started") - } - } - - /// Skip whitespace - private mutating func skipWhitespace() { - while p != end { - let u = p[0] - switch u { - case asciiSpace, - asciiTab, - asciiNewLine, - asciiCarriageReturn: // space, tab, NL, CR - p += 1 - case asciiHash: // # comment - p += 1 - while p != end { - // Skip until end of line - let c = p[0] - p += 1 - if c == asciiNewLine || c == asciiCarriageReturn { - break - } - } - default: - return - } - } - } - - /// Return a buffer containing the raw UTF8 for an identifier. - /// Assumes that you already know the current byte is a valid - /// start of identifier. - private mutating func parseUTF8Identifier() -> UnsafeRawBufferPointer { - let start = p - loop: while p != end { - let c = p[0] - switch c { - case asciiLowerA...asciiLowerZ, - asciiUpperA...asciiUpperZ, - asciiZero...asciiNine, - asciiUnderscore: - p += 1 - default: - break loop - } - } - let s = UnsafeRawBufferPointer(start: start, count: p - start) - skipWhitespace() - return s - } - - /// Return a String containing the next identifier. - private mutating func parseIdentifier() -> String { - let buff = parseUTF8Identifier() - let s = utf8ToString(bytes: buff.baseAddress!, count: buff.count) - // Force-unwrap is OK: we never have invalid UTF8 at this point. - return s! - } - - /// Parse the rest of an [extension_field_name] in the input, assuming the - /// initial "[" character has already been read (and is in the prefix) - /// This is also used for AnyURL, so we include "/", "." - private mutating func parseExtensionKey() -> String? { - let start = p - if p == end { - return nil - } - let c = p[0] - switch c { - case asciiLowerA...asciiLowerZ, asciiUpperA...asciiUpperZ: - p += 1 - default: - return nil - } - while p != end { - let c = p[0] - switch c { - case asciiLowerA...asciiLowerZ, - asciiUpperA...asciiUpperZ, - asciiZero...asciiNine, - asciiUnderscore, - asciiPeriod, - asciiForwardSlash: - p += 1 - case asciiCloseSquareBracket: // ] - return utf8ToString(bytes: start, count: p - start) - default: - return nil - } - } - return nil - } - - /// Scan a string that encodes a byte field, return a count of - /// the number of bytes that should be decoded from it - private mutating func validateAndCountBytesFromString(terminator: UInt8, sawBackslash: inout Bool) throws -> Int { - var count = 0 - let start = p - sawBackslash = false - while p != end { - let byte = p[0] - p += 1 - if byte == terminator { - p = start - return count - } - switch byte { - case asciiNewLine, asciiCarriageReturn: - // Can't have a newline in the middle of a bytes string. - throw TextFormatDecodingError.malformedText - case asciiBackslash: // "\\" - sawBackslash = true - if p != end { - let escaped = p[0] - p += 1 - switch escaped { - case asciiZero...asciiSeven: // '0'...'7' - // C standard allows 1, 2, or 3 octal digits. - if p != end, p[0] >= asciiZero, p[0] <= asciiSeven { - p += 1 - if p != end, p[0] >= asciiZero, p[0] <= asciiSeven { - if escaped > asciiThree { - // Out of range octal: three digits and first digit is greater than 3 - throw TextFormatDecodingError.malformedText - } - p += 1 - } - } - count += 1 - case asciiLowerU, asciiUpperU: // 'u' or 'U' unicode escape - let numDigits = (escaped == asciiLowerU) ? 4 : 8 - guard (end - p) >= numDigits else { - throw TextFormatDecodingError.malformedText // unicode escape must 4/8 digits - } - var codePoint: UInt32 = 0 - for i in 0.. 0 { - while p[0] != terminator { - let byte = p[0] - p += 1 - switch byte { - case asciiBackslash: // "\\" - let escaped = p[0] - p += 1 - switch escaped { - case asciiZero...asciiSeven: // '0'...'7' - // C standard allows 1, 2, or 3 octal digits. - let digit1Value = escaped - asciiZero - let digit2 = p[0] - if digit2 >= asciiZero, digit2 <= asciiSeven { - p += 1 - let digit2Value = digit2 - asciiZero - let digit3 = p[0] - if digit3 >= asciiZero, digit3 <= asciiSeven { - p += 1 - let digit3Value = digit3 - asciiZero - out[0] = digit1Value &* 64 + digit2Value * 8 + digit3Value - out += 1 - } else { - out[0] = digit1Value * 8 + digit2Value - out += 1 - } - } else { - out[0] = digit1Value - out += 1 - } - case asciiLowerU, asciiUpperU: - let numDigits = (escaped == asciiLowerU) ? 4 : 8 - var codePoint: UInt32 = 0 - for i in 0..> 6) - out[1] = 0x80 + UInt8(truncatingIfNeeded: codePoint & 0x3F) - out += 2 - case 0x800...0xffff: - // 3 byte encoding - out[0] = 0xE0 + UInt8(truncatingIfNeeded: codePoint >> 12) - out[1] = 0x80 + UInt8(truncatingIfNeeded: (codePoint >> 6) & 0x3F) - out[2] = 0x80 + UInt8(truncatingIfNeeded: codePoint & 0x3F) - out += 3 - case 0x10000...0x10FFFF: - // 4 byte encoding - out[0] = 0xF0 + UInt8(truncatingIfNeeded: codePoint >> 18) - out[1] = 0x80 + UInt8(truncatingIfNeeded: (codePoint >> 12) & 0x3F) - out[2] = 0x80 + UInt8(truncatingIfNeeded: (codePoint >> 6) & 0x3F) - out[3] = 0x80 + UInt8(truncatingIfNeeded: codePoint & 0x3F) - out += 4 - default: - preconditionFailure() // Already validated, can't happen - } - case asciiLowerX: // 'x' hexadecimal escape - // We already validated, so we know there's at least one digit: - var n = fromHexDigit(p[0])! - p += 1 - if let digit = fromHexDigit(p[0]) { - n = n &* 16 &+ digit - p += 1 - } - out[0] = n - out += 1 - case asciiLowerA: // \a ("alert") - out[0] = asciiBell - out += 1 - case asciiLowerB: // \b - out[0] = asciiBackspace - out += 1 - case asciiLowerF: // \f - out[0] = asciiFormFeed - out += 1 - case asciiLowerN: // \n - out[0] = asciiNewLine - out += 1 - case asciiLowerR: // \r - out[0] = asciiCarriageReturn - out += 1 - case asciiLowerT: // \t - out[0] = asciiTab - out += 1 - case asciiLowerV: // \v - out[0] = asciiVerticalTab - out += 1 - default: - out[0] = escaped - out += 1 - } - default: - out[0] = byte - out += 1 - } - } - p += 1 // Consume terminator - } - } - } - - /// Assumes the leading quote has already been consumed - private mutating func parseStringSegment(terminator: UInt8) -> String? { - let start = p - var sawBackslash = false - while p != end { - let c = p[0] - if c == terminator { - let s = utf8ToString(bytes: start, count: p - start) - p += 1 - skipWhitespace() - if let s = s, sawBackslash { - return decodeString(s) - } else { - return s - } - } - p += 1 - if c == asciiBackslash { // \ - if p == end { - return nil - } - sawBackslash = true - p += 1 - } - if c == asciiNewLine || c == asciiCarriageReturn { - // Can't have a newline in the middle of a raw string. - return nil - } - } - return nil // Unterminated quoted string - } - - internal mutating func nextUInt() throws -> UInt64 { - if p == end { - throw TextFormatDecodingError.malformedNumber - } - let c = p[0] - p += 1 - if c == asciiZero { // leading '0' precedes octal or hex - if p == end { - // The TextFormat ended with a field value of zero. - return 0 - } - if p[0] == asciiLowerX { // 'x' => hex - p += 1 - var n: UInt64 = 0 - while p != end { - let digit = p[0] - let val: UInt64 - switch digit { - case asciiZero...asciiNine: // 0...9 - val = UInt64(digit - asciiZero) - case asciiLowerA...asciiLowerF: // a...f - val = UInt64(digit - asciiLowerA + 10) - case asciiUpperA...asciiUpperF: - val = UInt64(digit - asciiUpperA + 10) - case asciiLowerU: // trailing 'u' - p += 1 - skipWhitespace() - return n - default: - skipWhitespace() - return n - } - if n > UInt64.max / 16 { - throw TextFormatDecodingError.malformedNumber - } - p += 1 - n = n * 16 + val - } - skipWhitespace() - return n - } else { // octal - var n: UInt64 = 0 - while p != end { - let digit = p[0] - if digit == asciiLowerU { // trailing 'u' - p += 1 - skipWhitespace() - return n - } - if digit < asciiZero || digit > asciiSeven { - skipWhitespace() - return n // not octal digit - } - let val = UInt64(digit - asciiZero) - if n > UInt64.max / 8 { - throw TextFormatDecodingError.malformedNumber - } - p += 1 - n = n * 8 + val - } - skipWhitespace() - return n - } - } else if c > asciiZero && c <= asciiNine { // 1...9 - var n = UInt64(c - asciiZero) - while p != end { - let digit = p[0] - if digit == asciiLowerU { // trailing 'u' - p += 1 - skipWhitespace() - return n - } - if digit < asciiZero || digit > asciiNine { - skipWhitespace() - return n // not a digit - } - let val = UInt64(digit - asciiZero) - if n > UInt64.max / 10 || n * 10 > UInt64.max - val { - throw TextFormatDecodingError.malformedNumber - } - p += 1 - n = n * 10 + val - } - skipWhitespace() - return n - } - throw TextFormatDecodingError.malformedNumber - } - - internal mutating func nextSInt() throws -> Int64 { - if p == end { - throw TextFormatDecodingError.malformedNumber - } - let c = p[0] - if c == asciiMinus { // - - p += 1 - if p == end { - throw TextFormatDecodingError.malformedNumber - } - // character after '-' must be digit - let digit = p[0] - if digit < asciiZero || digit > asciiNine { - throw TextFormatDecodingError.malformedNumber - } - let n = try nextUInt() - let limit: UInt64 = 0x8000000000000000 // -Int64.min - if n >= limit { - if n > limit { - // Too large negative number - throw TextFormatDecodingError.malformedNumber - } else { - return Int64.min // Special case for Int64.min - } - } - return -Int64(bitPattern: n) - } else { - let n = try nextUInt() - if n > UInt64(bitPattern: Int64.max) { - throw TextFormatDecodingError.malformedNumber - } - return Int64(bitPattern: n) - } - } - - internal mutating func nextStringValue() throws -> String { - var result: String - skipWhitespace() - if p == end { - throw TextFormatDecodingError.malformedText - } - let c = p[0] - if c != asciiSingleQuote && c != asciiDoubleQuote { - throw TextFormatDecodingError.malformedText - } - p += 1 - if let s = parseStringSegment(terminator: c) { - result = s - } else { - throw TextFormatDecodingError.malformedText - } - - while true { - if p == end { - return result - } - let c = p[0] - if c != asciiSingleQuote && c != asciiDoubleQuote { - return result - } - p += 1 - if let s = parseStringSegment(terminator: c) { - result.append(s) - } else { - throw TextFormatDecodingError.malformedText - } - } - } - - /// Protobuf Text Format allows a single bytes field to - /// contain multiple quoted strings. The values - /// are separately decoded and then concatenated: - /// field1: "bytes" 'more bytes' - /// "and even more bytes" - internal mutating func nextBytesValue() throws -> Data { - // Get the first string's contents - var result: Data - skipWhitespace() - if p == end { - throw TextFormatDecodingError.malformedText - } - let c = p[0] - if c != asciiSingleQuote && c != asciiDoubleQuote { - throw TextFormatDecodingError.malformedText - } - p += 1 - var sawBackslash = false - let n = try validateAndCountBytesFromString(terminator: c, sawBackslash: &sawBackslash) - if sawBackslash { - result = Data(count: n) - parseBytesFromString(terminator: c, into: &result) - } else { - result = Data(bytes: p, count: n) - p += n + 1 // Skip string body + close quote - } - - // If there are more strings, decode them - // and append to the result: - while true { - skipWhitespace() - if p == end { - return result - } - let c = p[0] - if c != asciiSingleQuote && c != asciiDoubleQuote { - return result - } - p += 1 - var sawBackslash = false - let n = try validateAndCountBytesFromString(terminator: c, sawBackslash: &sawBackslash) - if sawBackslash { - var b = Data(count: n) - parseBytesFromString(terminator: c, into: &b) - result.append(b) - } else { - result.append(Data(bytes: p, count: n)) - p += n + 1 // Skip string body + close quote - } - } - } - - // Tries to identify a sequence of UTF8 characters - // that represent a numeric floating-point value. - private mutating func tryParseFloatString() -> Double? { - guard p != end else {return nil} - let start = p - var c = p[0] - if c == asciiMinus { - p += 1 - guard p != end else {p = start; return nil} - c = p[0] - } - switch c { - case asciiZero: // '0' as first character is not allowed followed by digit - p += 1 - guard p != end else {break} - c = p[0] - if c >= asciiZero && c <= asciiNine { - p = start - return nil - } - case asciiPeriod: // '.' as first char only if followed by digit - p += 1 - guard p != end else {p = start; return nil} - c = p[0] - if c < asciiZero || c > asciiNine { - p = start - return nil - } - case asciiOne...asciiNine: - break - default: - p = start - return nil - } - loop: while p != end { - let c = p[0] - switch c { - case asciiZero...asciiNine, - asciiPeriod, - asciiPlus, - asciiMinus, - asciiLowerE, - asciiUpperE: // 0...9, ., +, -, e, E - p += 1 - case asciiLowerF: // f - // proto1 allowed floats to be suffixed with 'f' - let d = doubleParser.utf8ToDouble(bytes: UnsafeRawBufferPointer(start: start, count: p - start)) - // Just skip the 'f' - p += 1 - skipWhitespace() - return d - default: - break loop - } - } - let d = doubleParser.utf8ToDouble(bytes: UnsafeRawBufferPointer(start: start, count: p - start)) - skipWhitespace() - return d - } - - // Skip specified characters if they all match - private mutating func skipOptionalCharacters(bytes: [UInt8]) { - let start = p - for b in bytes { - if p == end || p[0] != b { - p = start - return - } - p += 1 - } - } - - // Skip following keyword if it matches (case-insensitively) - // the given keyword (specified as a series of bytes). - private mutating func skipOptionalKeyword(bytes: [UInt8]) -> Bool { - let start = p - for b in bytes { - if p == end { - p = start - return false - } - var c = p[0] - if c >= asciiUpperA && c <= asciiUpperZ { - // Convert to lower case - // (Protobuf text keywords are case insensitive) - c += asciiLowerA - asciiUpperA - } - if c != b { - p = start - return false - } - p += 1 - } - if p == end { - return true - } - let c = p[0] - if ((c >= asciiUpperA && c <= asciiUpperZ) - || (c >= asciiLowerA && c <= asciiLowerZ)) { - p = start - return false - } - skipWhitespace() - return true - } - - // If the next token is the identifier "nan", return true. - private mutating func skipOptionalNaN() -> Bool { - return skipOptionalKeyword(bytes: - [asciiLowerN, asciiLowerA, asciiLowerN]) - } - - // If the next token is a recognized spelling of "infinity", - // return Float.infinity or -Float.infinity - private mutating func skipOptionalInfinity() -> Float? { - if p == end { - return nil - } - let c = p[0] - let negated: Bool - if c == asciiMinus { - negated = true - p += 1 - } else { - negated = false - } - let inf = [asciiLowerI, asciiLowerN, asciiLowerF] - let infinity = [asciiLowerI, asciiLowerN, asciiLowerF, asciiLowerI, - asciiLowerN, asciiLowerI, asciiLowerT, asciiLowerY] - if (skipOptionalKeyword(bytes: inf) - || skipOptionalKeyword(bytes: infinity)) { - return negated ? -Float.infinity : Float.infinity - } - return nil - } - - internal mutating func nextFloat() throws -> Float { - if let d = tryParseFloatString() { - return Float(d) - } - if skipOptionalNaN() { - return Float.nan - } - if let inf = skipOptionalInfinity() { - return inf - } - throw TextFormatDecodingError.malformedNumber - } - - internal mutating func nextDouble() throws -> Double { - if let d = tryParseFloatString() { - return d - } - if skipOptionalNaN() { - return Double.nan - } - if let inf = skipOptionalInfinity() { - return Double(inf) - } - throw TextFormatDecodingError.malformedNumber - } - - internal mutating func nextBool() throws -> Bool { - skipWhitespace() - if p == end { - throw TextFormatDecodingError.malformedText - } - let c = p[0] - p += 1 - let result: Bool - switch c { - case asciiZero: - result = false - case asciiOne: - result = true - case asciiLowerF, asciiUpperF: - if p != end { - let alse = [asciiLowerA, asciiLowerL, asciiLowerS, asciiLowerE] - skipOptionalCharacters(bytes: alse) - } - result = false - case asciiLowerT, asciiUpperT: - if p != end { - let rue = [asciiLowerR, asciiLowerU, asciiLowerE] - skipOptionalCharacters(bytes: rue) - } - result = true - default: - throw TextFormatDecodingError.malformedText - } - if p == end { - return result - } - switch p[0] { - case asciiSpace, - asciiTab, - asciiNewLine, - asciiCarriageReturn, - asciiHash, - asciiComma, - asciiSemicolon, - asciiCloseSquareBracket, - asciiCloseCurlyBracket, - asciiCloseAngleBracket: - skipWhitespace() - return result - default: - throw TextFormatDecodingError.malformedText - } - } - - internal mutating func nextOptionalEnumName() throws -> UnsafeRawBufferPointer? { - skipWhitespace() - if p == end { - throw TextFormatDecodingError.malformedText - } - switch p[0] { - case asciiLowerA...asciiLowerZ, asciiUpperA...asciiUpperZ: - return parseUTF8Identifier() - default: - return nil - } - } - - /// Any URLs are syntactically (almost) identical to extension - /// keys, so we share the code for those. - internal mutating func nextOptionalAnyURL() throws -> String? { - return try nextOptionalExtensionKey() - } - - /// Returns next extension key or nil if end-of-input or - /// if next token is not an extension key. - /// - /// Throws an error if the next token starts with '[' but - /// cannot be parsed as an extension key. - /// - /// Note: This accepts / characters to support Any URL parsing. - /// Technically, Any URLs can contain / characters and extension - /// key names cannot. But in practice, accepting / chracters for - /// extension keys works fine, since the result just gets rejected - /// when the key is looked up. - internal mutating func nextOptionalExtensionKey() throws -> String? { - skipWhitespace() - if p == end { - return nil - } - if p[0] == asciiOpenSquareBracket { // [ - p += 1 - if let s = parseExtensionKey() { - if p == end || p[0] != asciiCloseSquareBracket { - throw TextFormatDecodingError.malformedText - } - // Skip ] - p += 1 - skipWhitespace() - return s - } else { - throw TextFormatDecodingError.malformedText - } - } - return nil - } - - /// Returns text of next regular key or nil if end-of-input. - /// This considers an extension key [keyname] to be an - /// error, so call nextOptionalExtensionKey first if you - /// want to handle extension keys. - /// - /// This is only used by map parsing; we should be able to - /// rework that to use nextFieldNumber instead. - internal mutating func nextKey() throws -> String? { - skipWhitespace() - if p == end { - return nil - } - let c = p[0] - switch c { - case asciiOpenSquareBracket: // [ - throw TextFormatDecodingError.malformedText - case asciiLowerA...asciiLowerZ, - asciiUpperA...asciiUpperZ, - asciiOne...asciiNine: // a...z, A...Z, 1...9 - return parseIdentifier() - default: - throw TextFormatDecodingError.malformedText - } - } - - /// Parse a field name, look it up, and return the corresponding - /// field number. - /// - /// returns nil at end-of-input - /// - /// Throws if field name cannot be parsed or if field name is - /// unknown. - /// - /// This function accounts for as much as 2/3 of the total run - /// time of the entire parse. - internal mutating func nextFieldNumber(names: _NameMap) throws -> Int? { - if p == end { - return nil - } - let c = p[0] - switch c { - case asciiLowerA...asciiLowerZ, - asciiUpperA...asciiUpperZ: // a...z, A...Z - let key = parseUTF8Identifier() - if let fieldNumber = names.number(forProtoName: key) { - return fieldNumber - } else { - throw TextFormatDecodingError.unknownField - } - case asciiOne...asciiNine: // 1-9 (field numbers are 123, not 0123) - var fieldNum = Int(c) - Int(asciiZero) - p += 1 - while p != end { - let c = p[0] - if c >= asciiZero && c <= asciiNine { - fieldNum = fieldNum &* 10 &+ (Int(c) - Int(asciiZero)) - } else { - break - } - p += 1 - } - skipWhitespace() - if names.names(for: fieldNum) != nil { - return fieldNum - } else { - // It was a number that isn't a known field. - // The C++ version (TextFormat::Parser::ParserImpl::ConsumeField()), - // supports an option to file or skip the field's value (this is true - // of unknown names or numbers). - throw TextFormatDecodingError.unknownField - } - default: - break - } - throw TextFormatDecodingError.malformedText - } - - private mutating func skipRequiredCharacter(_ c: UInt8) throws { - skipWhitespace() - if p != end && p[0] == c { - p += 1 - skipWhitespace() - } else { - throw TextFormatDecodingError.malformedText - } - } - - internal mutating func skipRequiredComma() throws { - try skipRequiredCharacter(asciiComma) - } - - internal mutating func skipRequiredColon() throws { - try skipRequiredCharacter(asciiColon) - } - - private mutating func skipOptionalCharacter(_ c: UInt8) -> Bool { - if p != end && p[0] == c { - p += 1 - skipWhitespace() - return true - } - return false - } - - internal mutating func skipOptionalColon() -> Bool { - return skipOptionalCharacter(asciiColon) - } - - internal mutating func skipOptionalEndArray() -> Bool { - return skipOptionalCharacter(asciiCloseSquareBracket) - } - - internal mutating func skipOptionalBeginArray() -> Bool { - return skipOptionalCharacter(asciiOpenSquareBracket) - } - - internal mutating func skipOptionalObjectEnd(_ c: UInt8) -> Bool { - let result = skipOptionalCharacter(c) - if result { - decrementRecursionDepth() - } - return result - } - - internal mutating func skipOptionalSeparator() { - if p != end { - let c = p[0] - if c == asciiComma || c == asciiSemicolon { // comma or semicolon - p += 1 - skipWhitespace() - } - } - } - - /// Returns the character that should end this field. - /// E.g., if object starts with "{", returns "}" - internal mutating func skipObjectStart() throws -> UInt8 { - try incrementRecursionDepth() - if p != end { - let c = p[0] - p += 1 - skipWhitespace() - switch c { - case asciiOpenCurlyBracket: // { - return asciiCloseCurlyBracket // } - case asciiOpenAngleBracket: // < - return asciiCloseAngleBracket // > - default: - break - } - } - throw TextFormatDecodingError.malformedText - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TimeUtils.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TimeUtils.swift deleted file mode 100644 index a7d142b4..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/TimeUtils.swift +++ /dev/null @@ -1,65 +0,0 @@ -// Sources/SwiftProtobuf/TimeUtils.swift - Generally useful time/calendar functions -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Generally useful time/calendar functions and constants -/// -// ----------------------------------------------------------------------------- - -let minutesPerDay: Int32 = 1440 -let minutesPerHour: Int32 = 60 -let secondsPerDay: Int32 = 86400 -let secondsPerHour: Int32 = 3600 -let secondsPerMinute: Int32 = 60 -let nanosPerSecond: Int32 = 1000000000 - -internal func timeOfDayFromSecondsSince1970(seconds: Int64) -> (hh: Int32, mm: Int32, ss: Int32) { - let secondsSinceMidnight = Int32(mod(seconds, Int64(secondsPerDay))) - let ss = mod(secondsSinceMidnight, secondsPerMinute) - let mm = mod(div(secondsSinceMidnight, secondsPerMinute), minutesPerHour) - let hh = Int32(div(secondsSinceMidnight, secondsPerHour)) - - return (hh: hh, mm: mm, ss: ss) -} - -internal func julianDayNumberFromSecondsSince1970(seconds: Int64) -> Int64 { - // January 1, 1970 is Julian Day Number 2440588. - // See http://aa.usno.navy.mil/faq/docs/JD_Formula.php - return div(seconds + 2440588 * Int64(secondsPerDay), Int64(secondsPerDay)) -} - -internal func gregorianDateFromSecondsSince1970(seconds: Int64) -> (YY: Int32, MM: Int32, DD: Int32) { - // The following implements Richards' algorithm (see the Wikipedia article - // for "Julian day"). - // If you touch this code, please test it exhaustively by playing with - // Test_Timestamp.testJSON_range. - - let JJ = julianDayNumberFromSecondsSince1970(seconds: seconds) - let f = JJ + 1401 + div(div(4 * JJ + 274277, 146097) * 3, 4) - 38 - let e = 4 * f + 3 - let g = Int64(div(mod(e, 1461), 4)) - let h = 5 * g + 2 - let DD = div(mod(h, 153), 5) + 1 - let MM = mod(div(h, 153) + 2, 12) + 1 - let YY = div(e, 1461) - 4716 + div(12 + 2 - MM, 12) - - return (YY: Int32(YY), MM: Int32(MM), DD: Int32(DD)) -} - -internal func nanosToString(nanos: Int32) -> String { - if nanos == 0 { - return "" - } else if nanos % 1000000 == 0 { - return ".\(threeDigit(abs(nanos) / 1000000))" - } else if nanos % 1000 == 0 { - return ".\(sixDigit(abs(nanos) / 1000))" - } else { - return ".\(nineDigit(abs(nanos)))" - } -} \ No newline at end of file diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/UnknownStorage.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/UnknownStorage.swift deleted file mode 100644 index 7829733c..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/UnknownStorage.swift +++ /dev/null @@ -1,48 +0,0 @@ -// Sources/SwiftProtobuf/UnknownStorage.swift - Handling unknown fields -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Proto2 binary coding requires storing and recoding of unknown fields. -/// This simple support class handles that requirement. A property of this type -/// is compiled into every proto2 message. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -// TODO: `UnknownStorage` should be `Sendable` but we cannot do so yet without possibly breaking compatibility. - -/// Contains any unknown fields in a decoded message; that is, fields that were -/// sent on the wire but were not recognized by the generated message -/// implementation or were valid field numbers but with mismatching wire -/// formats (for example, a field encoded as a varint when a fixed32 integer -/// was expected). -public struct UnknownStorage: Equatable { - /// The raw protocol buffer binary-encoded bytes that represent the unknown - /// fields of a decoded message. - public private(set) var data = Data() - -#if !swift(>=4.1) - public static func ==(lhs: UnknownStorage, rhs: UnknownStorage) -> Bool { - return lhs.data == rhs.data - } -#endif - - public init() {} - - internal mutating func append(protobufData: Data) { - data.append(protobufData) - } - - public func traverse(visitor: inout V) throws { - if !data.isEmpty { - try visitor.visitUnknown(bytes: data) - } - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/UnsafeBufferPointer+Shims.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/UnsafeBufferPointer+Shims.swift deleted file mode 100644 index 64f3b818..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/UnsafeBufferPointer+Shims.swift +++ /dev/null @@ -1,37 +0,0 @@ -// Sources/SwiftProtobuf/UnsafeBufferPointer+Shims.swift - Shims for UnsafeBufferPointer -// -// Copyright (c) 2019 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Shims for UnsafeBufferPointer -/// -// ----------------------------------------------------------------------------- - - -extension UnsafeMutableBufferPointer { - #if !swift(>=4.2) - internal static func allocate(capacity: Int) -> UnsafeMutableBufferPointer { - let pointer = UnsafeMutablePointer.allocate(capacity: capacity) - return UnsafeMutableBufferPointer(start: pointer, count: capacity) - } - #endif - - #if !swift(>=4.1) - internal func deallocate() { - self.baseAddress?.deallocate(capacity: self.count) - } - #endif -} - -extension UnsafeMutableRawBufferPointer { - #if !swift(>=4.1) - internal func copyMemory(from source: C) where C.Element == UInt8 { - self.copyBytes(from: source) - } - #endif -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/UnsafeRawPointer+Shims.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/UnsafeRawPointer+Shims.swift deleted file mode 100644 index 9818bced..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/UnsafeRawPointer+Shims.swift +++ /dev/null @@ -1,45 +0,0 @@ -// Sources/SwiftProtobuf/UnsafeRawPointer+Shims.swift - Shims for UnsafeRawPointer and friends -// -// Copyright (c) 2019 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Shims for UnsafeRawPointer and friends. -/// -// ----------------------------------------------------------------------------- - - -extension UnsafeRawPointer { - /// A shim subscript for UnsafeRawPointer aiming to maintain code consistency. - /// - /// We can remove this shim when we rewrite the code to use buffer pointers. - internal subscript(_ offset: Int) -> UInt8 { - get { - return self.load(fromByteOffset: offset, as: UInt8.self) - } - } -} - -extension UnsafeMutableRawPointer { - /// A shim subscript for UnsafeMutableRawPointer aiming to maintain code consistency. - /// - /// We can remove this shim when we rewrite the code to use buffer pointers. - internal subscript(_ offset: Int) -> UInt8 { - get { - return self.load(fromByteOffset: offset, as: UInt8.self) - } - set { - self.storeBytes(of: newValue, toByteOffset: offset, as: UInt8.self) - } - } - - #if !swift(>=4.1) - internal mutating func copyMemory(from source: UnsafeRawPointer, byteCount: Int) { - self.copyBytes(from: source, count: byteCount) - } - #endif -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Varint.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Varint.swift deleted file mode 100644 index d82c6969..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Varint.swift +++ /dev/null @@ -1,108 +0,0 @@ -// Sources/SwiftProtobuf/Varint.swift - Varint encoding/decoding helpers -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Helper functions to varint-encode and decode integers. -/// -// ----------------------------------------------------------------------------- - - -/// Contains helper methods to varint-encode and decode integers. -internal enum Varint { - - /// Computes the number of bytes that would be needed to store a 32-bit varint. - /// - /// - Parameter value: The number whose varint size should be calculated. - /// - Returns: The size, in bytes, of the 32-bit varint. - static func encodedSize(of value: UInt32) -> Int { - if (value & (~0 << 7)) == 0 { - return 1 - } - if (value & (~0 << 14)) == 0 { - return 2 - } - if (value & (~0 << 21)) == 0 { - return 3 - } - if (value & (~0 << 28)) == 0 { - return 4 - } - return 5 - } - - /// Computes the number of bytes that would be needed to store a signed 32-bit varint, if it were - /// treated as an unsigned integer with the same bit pattern. - /// - /// - Parameter value: The number whose varint size should be calculated. - /// - Returns: The size, in bytes, of the 32-bit varint. - static func encodedSize(of value: Int32) -> Int { - if value >= 0 { - return encodedSize(of: UInt32(bitPattern: value)) - } else { - // Must sign-extend. - return encodedSize(of: Int64(value)) - } - } - - /// Computes the number of bytes that would be needed to store a 64-bit varint. - /// - /// - Parameter value: The number whose varint size should be calculated. - /// - Returns: The size, in bytes, of the 64-bit varint. - static func encodedSize(of value: Int64) -> Int { - // Handle two common special cases up front. - if (value & (~0 << 7)) == 0 { - return 1 - } - if value < 0 { - return 10 - } - - // Divide and conquer the remaining eight cases. - var value = value - var n = 2 - - if (value & (~0 << 35)) != 0 { - n += 4 - value >>= 28 - } - if (value & (~0 << 21)) != 0 { - n += 2 - value >>= 14 - } - if (value & (~0 << 14)) != 0 { - n += 1 - } - return n - } - - /// Computes the number of bytes that would be needed to store an unsigned 64-bit varint, if it - /// were treated as a signed integer with the same bit pattern. - /// - /// - Parameter value: The number whose varint size should be calculated. - /// - Returns: The size, in bytes, of the 64-bit varint. - static func encodedSize(of value: UInt64) -> Int { - return encodedSize(of: Int64(bitPattern: value)) - } - - /// Counts the number of distinct varints in a packed byte buffer. - static func countVarintsInBuffer(start: UnsafeRawPointer, count: Int) -> Int { - // We don't need to decode all the varints to count how many there - // are. Just observe that every varint has exactly one byte with - // value < 128. So we just count those... - var n = 0 - var ints = 0 - while n < count { - if start.load(fromByteOffset: n, as: UInt8.self) < 128 { - ints += 1 - } - n += 1 - } - return ints - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Version.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Version.swift deleted file mode 100644 index 50631e0e..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Version.swift +++ /dev/null @@ -1,28 +0,0 @@ -// Sources/SwiftProtobuf/Version.swift - Runtime Version info -// -// Copyright (c) 2014 - 2017 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// A interface for exposing the version of the runtime. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -// Expose version information about the library. -public struct Version { - /// Major version. - public static let major = 1 - /// Minor version. - public static let minor = 25 - /// Revision number. - public static let revision = 1 - - /// String form of the version number. - public static let versionString = "\(major).\(minor).\(revision)" -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Visitor.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Visitor.swift deleted file mode 100644 index b41c7c94..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/Visitor.swift +++ /dev/null @@ -1,725 +0,0 @@ -// Sources/SwiftProtobuf/Visitor.swift - Basic serialization machinery -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Protocol for traversing the object tree. -/// -/// This is used by: -/// = Protobuf serialization -/// = JSON serialization (with some twists to account for specialty JSON -/// encodings) -/// = Protobuf text serialization -/// = Hashable computation -/// -/// Conceptually, serializers create visitor objects that are -/// then passed recursively to every message and field via generated -/// 'traverse' methods. The details get a little involved due to -/// the need to allow particular messages to override particular -/// behaviors for specific encodings, but the general idea is quite simple. -/// -// ----------------------------------------------------------------------------- - -import Foundation - -/// This is the key interface used by the generated `traverse()` methods -/// used for serialization. It is implemented by each serialization protocol: -/// Protobuf Binary, Protobuf Text, JSON, and the Hash encoder. -public protocol Visitor { - - /// Called for each non-repeated float field - /// - /// A default implementation is provided that just widens the value - /// and calls `visitSingularDoubleField` - mutating func visitSingularFloatField(value: Float, fieldNumber: Int) throws - - /// Called for each non-repeated double field - /// - /// There is no default implementation. This must be implemented. - mutating func visitSingularDoubleField(value: Double, fieldNumber: Int) throws - - /// Called for each non-repeated int32 field - /// - /// A default implementation is provided that just widens the value - /// and calls `visitSingularInt64Field` - mutating func visitSingularInt32Field(value: Int32, fieldNumber: Int) throws - - /// Called for each non-repeated int64 field - /// - /// There is no default implementation. This must be implemented. - mutating func visitSingularInt64Field(value: Int64, fieldNumber: Int) throws - - /// Called for each non-repeated uint32 field - /// - /// A default implementation is provided that just widens the value - /// and calls `visitSingularUInt64Field` - mutating func visitSingularUInt32Field(value: UInt32, fieldNumber: Int) throws - - /// Called for each non-repeated uint64 field - /// - /// There is no default implementation. This must be implemented. - mutating func visitSingularUInt64Field(value: UInt64, fieldNumber: Int) throws - - /// Called for each non-repeated sint32 field - /// - /// A default implementation is provided that just forwards to - /// `visitSingularInt32Field` - mutating func visitSingularSInt32Field(value: Int32, fieldNumber: Int) throws - - /// Called for each non-repeated sint64 field - /// - /// A default implementation is provided that just forwards to - /// `visitSingularInt64Field` - mutating func visitSingularSInt64Field(value: Int64, fieldNumber: Int) throws - - /// Called for each non-repeated fixed32 field - /// - /// A default implementation is provided that just forwards to - /// `visitSingularUInt32Field` - mutating func visitSingularFixed32Field(value: UInt32, fieldNumber: Int) throws - - /// Called for each non-repeated fixed64 field - /// - /// A default implementation is provided that just forwards to - /// `visitSingularUInt64Field` - mutating func visitSingularFixed64Field(value: UInt64, fieldNumber: Int) throws - - /// Called for each non-repeated sfixed32 field - /// - /// A default implementation is provided that just forwards to - /// `visitSingularInt32Field` - mutating func visitSingularSFixed32Field(value: Int32, fieldNumber: Int) throws - - /// Called for each non-repeated sfixed64 field - /// - /// A default implementation is provided that just forwards to - /// `visitSingularInt64Field` - mutating func visitSingularSFixed64Field(value: Int64, fieldNumber: Int) throws - - /// Called for each non-repeated bool field - /// - /// There is no default implementation. This must be implemented. - mutating func visitSingularBoolField(value: Bool, fieldNumber: Int) throws - - /// Called for each non-repeated string field - /// - /// There is no default implementation. This must be implemented. - mutating func visitSingularStringField(value: String, fieldNumber: Int) throws - - /// Called for each non-repeated bytes field - /// - /// There is no default implementation. This must be implemented. - mutating func visitSingularBytesField(value: Data, fieldNumber: Int) throws - - /// Called for each non-repeated enum field - /// - /// There is no default implementation. This must be implemented. - mutating func visitSingularEnumField(value: E, fieldNumber: Int) throws - - /// Called for each non-repeated nested message field. - /// - /// There is no default implementation. This must be implemented. - mutating func visitSingularMessageField(value: M, fieldNumber: Int) throws - - /// Called for each non-repeated proto2 group field. - /// - /// A default implementation is provided that simply forwards to - /// `visitSingularMessageField`. Implementors who need to handle groups - /// differently than nested messages can override this and provide distinct - /// implementations. - mutating func visitSingularGroupField(value: G, fieldNumber: Int) throws - - // Called for each non-packed repeated float field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularFloatField` once for each item in the array. - mutating func visitRepeatedFloatField(value: [Float], fieldNumber: Int) throws - - // Called for each non-packed repeated double field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularDoubleField` once for each item in the array. - mutating func visitRepeatedDoubleField(value: [Double], fieldNumber: Int) throws - - // Called for each non-packed repeated int32 field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularInt32Field` once for each item in the array. - mutating func visitRepeatedInt32Field(value: [Int32], fieldNumber: Int) throws - - // Called for each non-packed repeated int64 field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularInt64Field` once for each item in the array. - mutating func visitRepeatedInt64Field(value: [Int64], fieldNumber: Int) throws - - // Called for each non-packed repeated uint32 field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularUInt32Field` once for each item in the array. - mutating func visitRepeatedUInt32Field(value: [UInt32], fieldNumber: Int) throws - - // Called for each non-packed repeated uint64 field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularUInt64Field` once for each item in the array. - mutating func visitRepeatedUInt64Field(value: [UInt64], fieldNumber: Int) throws - - // Called for each non-packed repeated sint32 field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularSInt32Field` once for each item in the array. - mutating func visitRepeatedSInt32Field(value: [Int32], fieldNumber: Int) throws - - // Called for each non-packed repeated sint64 field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularSInt64Field` once for each item in the array. - mutating func visitRepeatedSInt64Field(value: [Int64], fieldNumber: Int) throws - - // Called for each non-packed repeated fixed32 field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularFixed32Field` once for each item in the array. - mutating func visitRepeatedFixed32Field(value: [UInt32], fieldNumber: Int) throws - - // Called for each non-packed repeated fixed64 field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularFixed64Field` once for each item in the array. - mutating func visitRepeatedFixed64Field(value: [UInt64], fieldNumber: Int) throws - - // Called for each non-packed repeated sfixed32 field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularSFixed32Field` once for each item in the array. - mutating func visitRepeatedSFixed32Field(value: [Int32], fieldNumber: Int) throws - - // Called for each non-packed repeated sfixed64 field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularSFixed64Field` once for each item in the array. - mutating func visitRepeatedSFixed64Field(value: [Int64], fieldNumber: Int) throws - - // Called for each non-packed repeated bool field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularBoolField` once for each item in the array. - mutating func visitRepeatedBoolField(value: [Bool], fieldNumber: Int) throws - - // Called for each non-packed repeated string field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularStringField` once for each item in the array. - mutating func visitRepeatedStringField(value: [String], fieldNumber: Int) throws - - // Called for each non-packed repeated bytes field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularBytesField` once for each item in the array. - mutating func visitRepeatedBytesField(value: [Data], fieldNumber: Int) throws - - /// Called for each repeated, unpacked enum field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularEnumField` once for each item in the array. - mutating func visitRepeatedEnumField(value: [E], fieldNumber: Int) throws - - /// Called for each repeated nested message field. The method is called once - /// with the complete array of values for the field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularMessageField` once for each item in the array. - mutating func visitRepeatedMessageField(value: [M], - fieldNumber: Int) throws - - /// Called for each repeated proto2 group field. - /// - /// A default implementation is provided that simply calls - /// `visitSingularGroupField` once for each item in the array. - mutating func visitRepeatedGroupField(value: [G], fieldNumber: Int) throws - - // Called for each packed, repeated float field. - /// - /// This is called once with the complete array of values for - /// the field. - /// - /// There is a default implementation that forwards to the non-packed - /// function. - mutating func visitPackedFloatField(value: [Float], fieldNumber: Int) throws - - // Called for each packed, repeated double field. - /// - /// This is called once with the complete array of values for - /// the field. - /// - /// There is a default implementation that forwards to the non-packed - /// function. - mutating func visitPackedDoubleField(value: [Double], fieldNumber: Int) throws - - // Called for each packed, repeated int32 field. - /// - /// This is called once with the complete array of values for - /// the field. - /// - /// There is a default implementation that forwards to the non-packed - /// function. - mutating func visitPackedInt32Field(value: [Int32], fieldNumber: Int) throws - - // Called for each packed, repeated int64 field. - /// - /// This is called once with the complete array of values for - /// the field. - /// - /// There is a default implementation that forwards to the non-packed - /// function. - mutating func visitPackedInt64Field(value: [Int64], fieldNumber: Int) throws - - // Called for each packed, repeated uint32 field. - /// - /// This is called once with the complete array of values for - /// the field. - /// - /// There is a default implementation that forwards to the non-packed - /// function. - mutating func visitPackedUInt32Field(value: [UInt32], fieldNumber: Int) throws - - // Called for each packed, repeated uint64 field. - /// - /// This is called once with the complete array of values for - /// the field. - /// - /// There is a default implementation that forwards to the non-packed - /// function. - mutating func visitPackedUInt64Field(value: [UInt64], fieldNumber: Int) throws - - // Called for each packed, repeated sint32 field. - /// - /// This is called once with the complete array of values for - /// the field. - /// - /// There is a default implementation that forwards to the non-packed - /// function. - mutating func visitPackedSInt32Field(value: [Int32], fieldNumber: Int) throws - - // Called for each packed, repeated sint64 field. - /// - /// This is called once with the complete array of values for - /// the field. - /// - /// There is a default implementation that forwards to the non-packed - /// function. - mutating func visitPackedSInt64Field(value: [Int64], fieldNumber: Int) throws - - // Called for each packed, repeated fixed32 field. - /// - /// This is called once with the complete array of values for - /// the field. - /// - /// There is a default implementation that forwards to the non-packed - /// function. - mutating func visitPackedFixed32Field(value: [UInt32], fieldNumber: Int) throws - - // Called for each packed, repeated fixed64 field. - /// - /// This is called once with the complete array of values for - /// the field. - /// - /// There is a default implementation that forwards to the non-packed - /// function. - mutating func visitPackedFixed64Field(value: [UInt64], fieldNumber: Int) throws - - // Called for each packed, repeated sfixed32 field. - /// - /// This is called once with the complete array of values for - /// the field. - /// - /// There is a default implementation that forwards to the non-packed - /// function. - mutating func visitPackedSFixed32Field(value: [Int32], fieldNumber: Int) throws - - // Called for each packed, repeated sfixed64 field. - /// - /// This is called once with the complete array of values for - /// the field. - /// - /// There is a default implementation that forwards to the non-packed - /// function. - mutating func visitPackedSFixed64Field(value: [Int64], fieldNumber: Int) throws - - // Called for each packed, repeated bool field. - /// - /// This is called once with the complete array of values for - /// the field. - /// - /// There is a default implementation that forwards to the non-packed - /// function. - mutating func visitPackedBoolField(value: [Bool], fieldNumber: Int) throws - - /// Called for each repeated, packed enum field. - /// The method is called once with the complete array of values for - /// the field. - /// - /// A default implementation is provided that simply forwards to - /// `visitRepeatedEnumField`. Implementors who need to handle packed fields - /// differently than unpacked fields can override this and provide distinct - /// implementations. - mutating func visitPackedEnumField(value: [E], fieldNumber: Int) throws - - /// Called for each map field with primitive values. The method is - /// called once with the complete dictionary of keys/values for the - /// field. - /// - /// There is no default implementation. This must be implemented. - mutating func visitMapField( - fieldType: _ProtobufMap.Type, - value: _ProtobufMap.BaseType, - fieldNumber: Int) throws - - /// Called for each map field with enum values. The method is called - /// once with the complete dictionary of keys/values for the field. - /// - /// There is no default implementation. This must be implemented. - mutating func visitMapField( - fieldType: _ProtobufEnumMap.Type, - value: _ProtobufEnumMap.BaseType, - fieldNumber: Int) throws where ValueType.RawValue == Int - - /// Called for each map field with message values. The method is - /// called once with the complete dictionary of keys/values for the - /// field. - /// - /// There is no default implementation. This must be implemented. - mutating func visitMapField( - fieldType: _ProtobufMessageMap.Type, - value: _ProtobufMessageMap.BaseType, - fieldNumber: Int) throws - - /// Called for each extension range. - mutating func visitExtensionFields(fields: ExtensionFieldValueSet, start: Int, end: Int) throws - - /// Called for each extension range. - mutating func visitExtensionFieldsAsMessageSet( - fields: ExtensionFieldValueSet, - start: Int, - end: Int) throws - - /// Called with the raw bytes that represent any unknown fields. - mutating func visitUnknown(bytes: Data) throws -} - -/// Forwarding default implementations of some visitor methods, for convenience. -extension Visitor { - - // Default definitions of numeric serializations. - // - // The 32-bit versions widen and delegate to 64-bit versions. - // The specialized integer codings delegate to standard Int/UInt. - // - // These "just work" for Hash and Text formats. Most of these work - // for JSON (32-bit integers are overridden to suppress quoting), - // and a few even work for Protobuf Binary (thanks to varint coding - // which erases the size difference between 32-bit and 64-bit ints). - - public mutating func visitSingularFloatField(value: Float, fieldNumber: Int) throws { - try visitSingularDoubleField(value: Double(value), fieldNumber: fieldNumber) - } - public mutating func visitSingularInt32Field(value: Int32, fieldNumber: Int) throws { - try visitSingularInt64Field(value: Int64(value), fieldNumber: fieldNumber) - } - public mutating func visitSingularUInt32Field(value: UInt32, fieldNumber: Int) throws { - try visitSingularUInt64Field(value: UInt64(value), fieldNumber: fieldNumber) - } - public mutating func visitSingularSInt32Field(value: Int32, fieldNumber: Int) throws { - try visitSingularInt32Field(value: value, fieldNumber: fieldNumber) - } - public mutating func visitSingularSInt64Field(value: Int64, fieldNumber: Int) throws { - try visitSingularInt64Field(value: value, fieldNumber: fieldNumber) - } - public mutating func visitSingularFixed32Field(value: UInt32, fieldNumber: Int) throws { - try visitSingularUInt32Field(value: value, fieldNumber: fieldNumber) - } - public mutating func visitSingularFixed64Field(value: UInt64, fieldNumber: Int) throws { - try visitSingularUInt64Field(value: value, fieldNumber: fieldNumber) - } - public mutating func visitSingularSFixed32Field(value: Int32, fieldNumber: Int) throws { - try visitSingularInt32Field(value: value, fieldNumber: fieldNumber) - } - public mutating func visitSingularSFixed64Field(value: Int64, fieldNumber: Int) throws { - try visitSingularInt64Field(value: value, fieldNumber: fieldNumber) - } - - // Default definitions of repeated serializations that just iterate and - // invoke the singular encoding. These "just work" for Protobuf Binary (encoder - // and size visitor), Protobuf Text, and Hash visitors. JSON format stores - // repeated values differently from singular, so overrides these. - - public mutating func visitRepeatedFloatField(value: [Float], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularFloatField(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedDoubleField(value: [Double], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularDoubleField(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularInt32Field(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularInt64Field(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedUInt32Field(value: [UInt32], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularUInt32Field(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedUInt64Field(value: [UInt64], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularUInt64Field(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedSInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularSInt32Field(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedSInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularSInt64Field(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedFixed32Field(value: [UInt32], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularFixed32Field(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedFixed64Field(value: [UInt64], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularFixed64Field(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedSFixed32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularSFixed32Field(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedSFixed64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularSFixed64Field(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedBoolField(value: [Bool], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularBoolField(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedStringField(value: [String], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularStringField(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedBytesField(value: [Data], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularBytesField(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedEnumField(value: [E], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularEnumField(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedMessageField(value: [M], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularMessageField(value: v, fieldNumber: fieldNumber) - } - } - - public mutating func visitRepeatedGroupField(value: [G], fieldNumber: Int) throws { - assert(!value.isEmpty) - for v in value { - try visitSingularGroupField(value: v, fieldNumber: fieldNumber) - } - } - - // Default definitions of packed serialization just defer to the - // repeated implementation. This works for Hash and JSON visitors - // (which do not distinguish packed vs. non-packed) but are - // overridden by Protobuf Binary and Text. - - public mutating func visitPackedFloatField(value: [Float], fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitRepeatedFloatField(value: value, fieldNumber: fieldNumber) - } - - public mutating func visitPackedDoubleField(value: [Double], fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitRepeatedDoubleField(value: value, fieldNumber: fieldNumber) - } - - public mutating func visitPackedInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitRepeatedInt32Field(value: value, fieldNumber: fieldNumber) - } - - public mutating func visitPackedInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitRepeatedInt64Field(value: value, fieldNumber: fieldNumber) - } - - public mutating func visitPackedUInt32Field(value: [UInt32], fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitRepeatedUInt32Field(value: value, fieldNumber: fieldNumber) - } - - public mutating func visitPackedUInt64Field(value: [UInt64], fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitRepeatedUInt64Field(value: value, fieldNumber: fieldNumber) - } - - public mutating func visitPackedSInt32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitPackedInt32Field(value: value, fieldNumber: fieldNumber) - } - - public mutating func visitPackedSInt64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitPackedInt64Field(value: value, fieldNumber: fieldNumber) - } - - public mutating func visitPackedFixed32Field(value: [UInt32], fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitPackedUInt32Field(value: value, fieldNumber: fieldNumber) - } - - public mutating func visitPackedFixed64Field(value: [UInt64], fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitPackedUInt64Field(value: value, fieldNumber: fieldNumber) - } - - public mutating func visitPackedSFixed32Field(value: [Int32], fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitPackedInt32Field(value: value, fieldNumber: fieldNumber) - } - - public mutating func visitPackedSFixed64Field(value: [Int64], fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitPackedInt64Field(value: value, fieldNumber: fieldNumber) - } - - public mutating func visitPackedBoolField(value: [Bool], fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitRepeatedBoolField(value: value, fieldNumber: fieldNumber) - } - - public mutating func visitPackedEnumField(value: [E], - fieldNumber: Int) throws { - assert(!value.isEmpty) - try visitRepeatedEnumField(value: value, fieldNumber: fieldNumber) - } - - // Default handling for Groups is to treat them just like messages. - // This works for Text and Hash, but is overridden by Protobuf Binary - // format (which has a different encoding for groups) and JSON - // (which explicitly ignores all groups). - - public mutating func visitSingularGroupField(value: G, - fieldNumber: Int) throws { - try visitSingularMessageField(value: value, fieldNumber: fieldNumber) - } - - // Default handling of Extensions as a MessageSet to handing them just - // as plain extensions. Formats that what custom behavior can override - // it. - - public mutating func visitExtensionFieldsAsMessageSet( - fields: ExtensionFieldValueSet, - start: Int, - end: Int) throws { - try visitExtensionFields(fields: fields, start: start, end: end) - } - - // Default handling for Extensions is to forward the traverse to - // the ExtensionFieldValueSet. Formats that don't care about extensions - // can override to avoid it. - - /// Called for each extension range. - public mutating func visitExtensionFields(fields: ExtensionFieldValueSet, start: Int, end: Int) throws { - try fields.traverse(visitor: &self, start: start, end: end) - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/WireFormat.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/WireFormat.swift deleted file mode 100644 index d1e67ac4..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/WireFormat.swift +++ /dev/null @@ -1,70 +0,0 @@ -// Sources/SwiftProtobuf/WireFormat.swift - Describes proto wire formats -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Types related to binary wire formats of encoded values. -/// -// ----------------------------------------------------------------------------- - -/// Denotes the wire format by which a value is encoded in binary form. -internal enum WireFormat: UInt8 { - case varint = 0 - case fixed64 = 1 - case lengthDelimited = 2 - case startGroup = 3 - case endGroup = 4 - case fixed32 = 5 -} - -extension WireFormat { - /// Information about the "MessageSet" format. Used when a Message has - /// the message_set_wire_format option enabled. - /// - /// Writing in MessageSet form means instead of writing the Extesions - /// normally as a simple fields, each gets written wrapped in a group: - /// repeated group Item = 1 { - /// required int32 type_id = 2; - /// required bytes message = 3; - /// } - /// Where the field number is the type_id, and the message is serilaized - /// into the bytes. - /// - /// The handling of unknown fields is ill defined. In proto1, they were - /// dropped. In the C++ for proto2, since it stores them in the unknowns - /// storage, if preserves any that are length delimited data (since that's - /// how the message also goes out). While the C++ is parsing, where the - /// unknowns fall in the flow of the group, sorta decides what happens. - /// Since it is ill defined, currently SwiftProtobuf will reflect out - /// anything set in the unknownStorage. During parsing, unknowns on the - /// message are preserved, but unknowns within the group are dropped (like - /// map items). Any extension in the MessageSet that isn't in the Regisry - /// being used at parse time will remain in a group and go into the - /// Messages's unknown fields (this way it reflects back out correctly). - internal enum MessageSet { - - enum FieldNumbers { - static let item = 1; - static let typeId = 2; - static let message = 3; - } - - enum Tags { - static let itemStart = FieldTag(fieldNumber: FieldNumbers.item, wireFormat: .startGroup) - static let itemEnd = FieldTag(fieldNumber: FieldNumbers.item, wireFormat: .endGroup) - static let typeId = FieldTag(fieldNumber: FieldNumbers.typeId, wireFormat: .varint) - static let message = FieldTag(fieldNumber: FieldNumbers.message, wireFormat: .lengthDelimited) - } - - // The size of all the tags needed to write out an Extension in MessageSet format. - static let itemTagsEncodedSize = - Tags.itemStart.encodedSize + Tags.itemEnd.encodedSize + - Tags.typeId.encodedSize + - Tags.message.encodedSize - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ZigZag.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ZigZag.swift deleted file mode 100644 index e5a534bb..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/ZigZag.swift +++ /dev/null @@ -1,66 +0,0 @@ -// Sources/SwiftProtobuf/ZigZag.swift - ZigZag encoding/decoding helpers -// -// Copyright (c) 2014 - 2016 Apple Inc. and the project authors -// Licensed under Apache License v2.0 with Runtime Library Exception -// -// See LICENSE.txt for license information: -// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt -// -// ----------------------------------------------------------------------------- -/// -/// Helper functions to ZigZag encode and decode signed integers. -/// -// ----------------------------------------------------------------------------- - - -/// Contains helper methods to ZigZag encode and decode signed integers. -internal enum ZigZag { - - /// Return a 32-bit ZigZag-encoded value. - /// - /// ZigZag encodes signed integers into values that can be efficiently encoded with varint. - /// (Otherwise, negative values must be sign-extended to 64 bits to be varint encoded, always - /// taking 10 bytes on the wire.) - /// - /// - Parameter value: A signed 32-bit integer. - /// - Returns: An unsigned 32-bit integer representing the ZigZag-encoded value. - static func encoded(_ value: Int32) -> UInt32 { - return UInt32(bitPattern: (value << 1) ^ (value >> 31)) - } - - /// Return a 64-bit ZigZag-encoded value. - /// - /// ZigZag encodes signed integers into values that can be efficiently encoded with varint. - /// (Otherwise, negative values must be sign-extended to 64 bits to be varint encoded, always - /// taking 10 bytes on the wire.) - /// - /// - Parameter value: A signed 64-bit integer. - /// - Returns: An unsigned 64-bit integer representing the ZigZag-encoded value. - static func encoded(_ value: Int64) -> UInt64 { - return UInt64(bitPattern: (value << 1) ^ (value >> 63)) - } - - /// Return a 32-bit ZigZag-decoded value. - /// - /// ZigZag enocdes signed integers into values that can be efficiently encoded with varint. - /// (Otherwise, negative values must be sign-extended to 64 bits to be varint encoded, always - /// taking 10 bytes on the wire.) - /// - /// - Parameter value: An unsigned 32-bit ZagZag-encoded integer. - /// - Returns: The signed 32-bit decoded value. - static func decoded(_ value: UInt32) -> Int32 { - return Int32(value >> 1) ^ -Int32(value & 1) - } - - /// Return a 64-bit ZigZag-decoded value. - /// - /// ZigZag enocdes signed integers into values that can be efficiently encoded with varint. - /// (Otherwise, negative values must be sign-extended to 64 bits to be varint encoded, always - /// taking 10 bytes on the wire.) - /// - /// - Parameter value: An unsigned 64-bit ZigZag-encoded integer. - /// - Returns: The signed 64-bit decoded value. - static func decoded(_ value: UInt64) -> Int64 { - return Int64(value >> 1) ^ -Int64(value & 1) - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/any.pb.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/any.pb.swift deleted file mode 100644 index 3d1ed97c..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/any.pb.swift +++ /dev/null @@ -1,249 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: google/protobuf/any.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import Foundation - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// `Any` contains an arbitrary serialized protocol buffer message along with a -/// URL that describes the type of the serialized message. -/// -/// Protobuf library provides support to pack/unpack Any values in the form -/// of utility functions or additional generated methods of the Any type. -/// -/// Example 1: Pack and unpack a message in C++. -/// -/// Foo foo = ...; -/// Any any; -/// any.PackFrom(foo); -/// ... -/// if (any.UnpackTo(&foo)) { -/// ... -/// } -/// -/// Example 2: Pack and unpack a message in Java. -/// -/// Foo foo = ...; -/// Any any = Any.pack(foo); -/// ... -/// if (any.is(Foo.class)) { -/// foo = any.unpack(Foo.class); -/// } -/// // or ... -/// if (any.isSameTypeAs(Foo.getDefaultInstance())) { -/// foo = any.unpack(Foo.getDefaultInstance()); -/// } -/// -/// Example 3: Pack and unpack a message in Python. -/// -/// foo = Foo(...) -/// any = Any() -/// any.Pack(foo) -/// ... -/// if any.Is(Foo.DESCRIPTOR): -/// any.Unpack(foo) -/// ... -/// -/// Example 4: Pack and unpack a message in Go -/// -/// foo := &pb.Foo{...} -/// any, err := anypb.New(foo) -/// if err != nil { -/// ... -/// } -/// ... -/// foo := &pb.Foo{} -/// if err := any.UnmarshalTo(foo); err != nil { -/// ... -/// } -/// -/// The pack methods provided by protobuf library will by default use -/// 'type.googleapis.com/full.type.name' as the type URL and the unpack -/// methods only use the fully qualified type name after the last '/' -/// in the type URL, for example "foo.bar.com/x/y.z" will yield type -/// name "y.z". -/// -/// JSON -/// ==== -/// The JSON representation of an `Any` value uses the regular -/// representation of the deserialized, embedded message, with an -/// additional field `@type` which contains the type URL. Example: -/// -/// package google.profile; -/// message Person { -/// string first_name = 1; -/// string last_name = 2; -/// } -/// -/// { -/// "@type": "type.googleapis.com/google.profile.Person", -/// "firstName": , -/// "lastName": -/// } -/// -/// If the embedded message type is well-known and has a custom JSON -/// representation, that representation will be embedded adding a field -/// `value` which holds the custom JSON in addition to the `@type` -/// field. Example (for message [google.protobuf.Duration][]): -/// -/// { -/// "@type": "type.googleapis.com/google.protobuf.Duration", -/// "value": "1.212s" -/// } -public struct Google_Protobuf_Any { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// A URL/resource name that uniquely identifies the type of the serialized - /// protocol buffer message. This string must contain at least - /// one "/" character. The last segment of the URL's path must represent - /// the fully qualified name of the type (as in - /// `path/google.protobuf.Duration`). The name should be in a canonical form - /// (e.g., leading "." is not accepted). - /// - /// In practice, teams usually precompile into the binary all types that they - /// expect it to use in the context of Any. However, for URLs which use the - /// scheme `http`, `https`, or no scheme, one can optionally set up a type - /// server that maps type URLs to message definitions as follows: - /// - /// * If no scheme is provided, `https` is assumed. - /// * An HTTP GET on the URL must yield a [google.protobuf.Type][] - /// value in binary format, or produce an error. - /// * Applications are allowed to cache lookup results based on the - /// URL, or have them precompiled into a binary to avoid any - /// lookup. Therefore, binary compatibility needs to be preserved - /// on changes to types. (Use versioned type names to manage - /// breaking changes.) - /// - /// Note: this functionality is not currently available in the official - /// protobuf release, and it is not used for type URLs beginning with - /// type.googleapis.com. As of May 2023, there are no widely used type server - /// implementations and no plans to implement one. - /// - /// Schemes other than `http`, `https` (or the empty scheme) might be - /// used with implementation specific semantics. - public var typeURL: String { - get {return _storage._typeURL} - set {_uniqueStorage()._typeURL = newValue} - } - - /// Must be a valid serialized protocol buffer of the above specified type. - public var value: Data { - get {return _storage._value} - set {_uniqueStorage()._value = newValue} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - internal var _storage = _StorageClass.defaultInstance -} - -#if swift(>=5.5) && canImport(_Concurrency) -extension Google_Protobuf_Any: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "google.protobuf" - -extension Google_Protobuf_Any: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Any" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "type_url"), - 2: .same(proto: "value"), - ] - - typealias _StorageClass = AnyMessageStorage - - internal mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &_storage._typeURL) }() - case 2: try { try decoder.decodeSingularBytesField(value: &_storage._value) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - try _storage.preTraverse() - if !_storage._typeURL.isEmpty { - try visitor.visitSingularStringField(value: _storage._typeURL, fieldNumber: 1) - } - if !_storage._value.isEmpty { - try visitor.visitSingularBytesField(value: _storage._value, fieldNumber: 2) - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Any, rhs: Google_Protobuf_Any) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = lhs._storage.isEqualTo(other: rhs._storage) - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/api.pb.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/api.pb.swift deleted file mode 100644 index 55d40732..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/api.pb.swift +++ /dev/null @@ -1,434 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: google/protobuf/api.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import Foundation - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Api is a light-weight descriptor for an API Interface. -/// -/// Interfaces are also described as "protocol buffer services" in some contexts, -/// such as by the "service" keyword in a .proto file, but they are different -/// from API Services, which represent a concrete implementation of an interface -/// as opposed to simply a description of methods and bindings. They are also -/// sometimes simply referred to as "APIs" in other contexts, such as the name of -/// this message itself. See https://cloud.google.com/apis/design/glossary for -/// detailed terminology. -public struct Google_Protobuf_Api { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The fully qualified name of this interface, including package name - /// followed by the interface's simple name. - public var name: String = String() - - /// The methods of this interface, in unspecified order. - public var methods: [Google_Protobuf_Method] = [] - - /// Any metadata attached to the interface. - public var options: [Google_Protobuf_Option] = [] - - /// A version string for this interface. If specified, must have the form - /// `major-version.minor-version`, as in `1.10`. If the minor version is - /// omitted, it defaults to zero. If the entire version field is empty, the - /// major version is derived from the package name, as outlined below. If the - /// field is not empty, the version in the package name will be verified to be - /// consistent with what is provided here. - /// - /// The versioning schema uses [semantic - /// versioning](http://semver.org) where the major version number - /// indicates a breaking change and the minor version an additive, - /// non-breaking change. Both version numbers are signals to users - /// what to expect from different versions, and should be carefully - /// chosen based on the product plan. - /// - /// The major version is also reflected in the package name of the - /// interface, which must end in `v`, as in - /// `google.feature.v1`. For major versions 0 and 1, the suffix can - /// be omitted. Zero major versions must only be used for - /// experimental, non-GA interfaces. - public var version: String = String() - - /// Source context for the protocol buffer service represented by this - /// message. - public var sourceContext: Google_Protobuf_SourceContext { - get {return _sourceContext ?? Google_Protobuf_SourceContext()} - set {_sourceContext = newValue} - } - /// Returns true if `sourceContext` has been explicitly set. - public var hasSourceContext: Bool {return self._sourceContext != nil} - /// Clears the value of `sourceContext`. Subsequent reads from it will return its default value. - public mutating func clearSourceContext() {self._sourceContext = nil} - - /// Included interfaces. See [Mixin][]. - public var mixins: [Google_Protobuf_Mixin] = [] - - /// The source syntax of the service. - public var syntax: Google_Protobuf_Syntax = .proto2 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _sourceContext: Google_Protobuf_SourceContext? = nil -} - -/// Method represents a method of an API interface. -public struct Google_Protobuf_Method { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The simple name of this method. - public var name: String = String() - - /// A URL of the input message type. - public var requestTypeURL: String = String() - - /// If true, the request is streamed. - public var requestStreaming: Bool = false - - /// The URL of the output message type. - public var responseTypeURL: String = String() - - /// If true, the response is streamed. - public var responseStreaming: Bool = false - - /// Any metadata attached to the method. - public var options: [Google_Protobuf_Option] = [] - - /// The source syntax of this method. - public var syntax: Google_Protobuf_Syntax = .proto2 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Declares an API Interface to be included in this interface. The including -/// interface must redeclare all the methods from the included interface, but -/// documentation and options are inherited as follows: -/// -/// - If after comment and whitespace stripping, the documentation -/// string of the redeclared method is empty, it will be inherited -/// from the original method. -/// -/// - Each annotation belonging to the service config (http, -/// visibility) which is not set in the redeclared method will be -/// inherited. -/// -/// - If an http annotation is inherited, the path pattern will be -/// modified as follows. Any version prefix will be replaced by the -/// version of the including interface plus the [root][] path if -/// specified. -/// -/// Example of a simple mixin: -/// -/// package google.acl.v1; -/// service AccessControl { -/// // Get the underlying ACL object. -/// rpc GetAcl(GetAclRequest) returns (Acl) { -/// option (google.api.http).get = "/v1/{resource=**}:getAcl"; -/// } -/// } -/// -/// package google.storage.v2; -/// service Storage { -/// rpc GetAcl(GetAclRequest) returns (Acl); -/// -/// // Get a data record. -/// rpc GetData(GetDataRequest) returns (Data) { -/// option (google.api.http).get = "/v2/{resource=**}"; -/// } -/// } -/// -/// Example of a mixin configuration: -/// -/// apis: -/// - name: google.storage.v2.Storage -/// mixins: -/// - name: google.acl.v1.AccessControl -/// -/// The mixin construct implies that all methods in `AccessControl` are -/// also declared with same name and request/response types in -/// `Storage`. A documentation generator or annotation processor will -/// see the effective `Storage.GetAcl` method after inherting -/// documentation and annotations as follows: -/// -/// service Storage { -/// // Get the underlying ACL object. -/// rpc GetAcl(GetAclRequest) returns (Acl) { -/// option (google.api.http).get = "/v2/{resource=**}:getAcl"; -/// } -/// ... -/// } -/// -/// Note how the version in the path pattern changed from `v1` to `v2`. -/// -/// If the `root` field in the mixin is specified, it should be a -/// relative path under which inherited HTTP paths are placed. Example: -/// -/// apis: -/// - name: google.storage.v2.Storage -/// mixins: -/// - name: google.acl.v1.AccessControl -/// root: acls -/// -/// This implies the following inherited HTTP annotation: -/// -/// service Storage { -/// // Get the underlying ACL object. -/// rpc GetAcl(GetAclRequest) returns (Acl) { -/// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; -/// } -/// ... -/// } -public struct Google_Protobuf_Mixin { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The fully qualified name of the interface which is included. - public var name: String = String() - - /// If non-empty specifies a path under which inherited HTTP paths - /// are rooted. - public var root: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -#if swift(>=5.5) && canImport(_Concurrency) -extension Google_Protobuf_Api: @unchecked Sendable {} -extension Google_Protobuf_Method: @unchecked Sendable {} -extension Google_Protobuf_Mixin: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "google.protobuf" - -extension Google_Protobuf_Api: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Api" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "methods"), - 3: .same(proto: "options"), - 4: .same(proto: "version"), - 5: .standard(proto: "source_context"), - 6: .same(proto: "mixins"), - 7: .same(proto: "syntax"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.methods) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.options) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.version) }() - case 5: try { try decoder.decodeSingularMessageField(value: &self._sourceContext) }() - case 6: try { try decoder.decodeRepeatedMessageField(value: &self.mixins) }() - case 7: try { try decoder.decodeSingularEnumField(value: &self.syntax) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) - } - if !self.methods.isEmpty { - try visitor.visitRepeatedMessageField(value: self.methods, fieldNumber: 2) - } - if !self.options.isEmpty { - try visitor.visitRepeatedMessageField(value: self.options, fieldNumber: 3) - } - if !self.version.isEmpty { - try visitor.visitSingularStringField(value: self.version, fieldNumber: 4) - } - try { if let v = self._sourceContext { - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - } }() - if !self.mixins.isEmpty { - try visitor.visitRepeatedMessageField(value: self.mixins, fieldNumber: 6) - } - if self.syntax != .proto2 { - try visitor.visitSingularEnumField(value: self.syntax, fieldNumber: 7) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Api, rhs: Google_Protobuf_Api) -> Bool { - if lhs.name != rhs.name {return false} - if lhs.methods != rhs.methods {return false} - if lhs.options != rhs.options {return false} - if lhs.version != rhs.version {return false} - if lhs._sourceContext != rhs._sourceContext {return false} - if lhs.mixins != rhs.mixins {return false} - if lhs.syntax != rhs.syntax {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_Method: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Method" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .standard(proto: "request_type_url"), - 3: .standard(proto: "request_streaming"), - 4: .standard(proto: "response_type_url"), - 5: .standard(proto: "response_streaming"), - 6: .same(proto: "options"), - 7: .same(proto: "syntax"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.requestTypeURL) }() - case 3: try { try decoder.decodeSingularBoolField(value: &self.requestStreaming) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.responseTypeURL) }() - case 5: try { try decoder.decodeSingularBoolField(value: &self.responseStreaming) }() - case 6: try { try decoder.decodeRepeatedMessageField(value: &self.options) }() - case 7: try { try decoder.decodeSingularEnumField(value: &self.syntax) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) - } - if !self.requestTypeURL.isEmpty { - try visitor.visitSingularStringField(value: self.requestTypeURL, fieldNumber: 2) - } - if self.requestStreaming != false { - try visitor.visitSingularBoolField(value: self.requestStreaming, fieldNumber: 3) - } - if !self.responseTypeURL.isEmpty { - try visitor.visitSingularStringField(value: self.responseTypeURL, fieldNumber: 4) - } - if self.responseStreaming != false { - try visitor.visitSingularBoolField(value: self.responseStreaming, fieldNumber: 5) - } - if !self.options.isEmpty { - try visitor.visitRepeatedMessageField(value: self.options, fieldNumber: 6) - } - if self.syntax != .proto2 { - try visitor.visitSingularEnumField(value: self.syntax, fieldNumber: 7) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Method, rhs: Google_Protobuf_Method) -> Bool { - if lhs.name != rhs.name {return false} - if lhs.requestTypeURL != rhs.requestTypeURL {return false} - if lhs.requestStreaming != rhs.requestStreaming {return false} - if lhs.responseTypeURL != rhs.responseTypeURL {return false} - if lhs.responseStreaming != rhs.responseStreaming {return false} - if lhs.options != rhs.options {return false} - if lhs.syntax != rhs.syntax {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_Mixin: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Mixin" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "root"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.root) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) - } - if !self.root.isEmpty { - try visitor.visitSingularStringField(value: self.root, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Mixin, rhs: Google_Protobuf_Mixin) -> Bool { - if lhs.name != rhs.name {return false} - if lhs.root != rhs.root {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/descriptor.pb.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/descriptor.pb.swift deleted file mode 100644 index 89bf682f..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/descriptor.pb.swift +++ /dev/null @@ -1,5548 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: google/protobuf/descriptor.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// The messages in this file describe the definitions found in .proto files. -// A valid .proto file can be translated directly to a FileDescriptorProto -// without any other information (e.g. without reading its imports). - -import Foundation - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// The full set of known editions. -public enum Google_Protobuf_Edition: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// A placeholder for an unknown edition value. - case unknown // = 0 - - /// Editions that have been released. The specific values are arbitrary and - /// should not be depended on, but they will always be time-ordered for easy - /// comparison. - case edition2023 // = 1000 - - /// Placeholder editions for testing feature resolution. These should not be - /// used or relyed on outside of tests. - case edition1TestOnly // = 1 - case edition2TestOnly // = 2 - case edition99997TestOnly // = 99997 - case edition99998TestOnly // = 99998 - case edition99999TestOnly // = 99999 - - public init() { - self = .unknown - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .edition1TestOnly - case 2: self = .edition2TestOnly - case 1000: self = .edition2023 - case 99997: self = .edition99997TestOnly - case 99998: self = .edition99998TestOnly - case 99999: self = .edition99999TestOnly - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .unknown: return 0 - case .edition1TestOnly: return 1 - case .edition2TestOnly: return 2 - case .edition2023: return 1000 - case .edition99997TestOnly: return 99997 - case .edition99998TestOnly: return 99998 - case .edition99999TestOnly: return 99999 - } - } - -} - -#if swift(>=4.2) - -extension Google_Protobuf_Edition: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -/// The protocol compiler can output a FileDescriptorSet containing the .proto -/// files it parses. -public struct Google_Protobuf_FileDescriptorSet { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var file: [Google_Protobuf_FileDescriptorProto] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Describes a complete .proto file. -public struct Google_Protobuf_FileDescriptorProto { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// file name, relative to root of source tree - public var name: String { - get {return _name ?? String()} - set {_name = newValue} - } - /// Returns true if `name` has been explicitly set. - public var hasName: Bool {return self._name != nil} - /// Clears the value of `name`. Subsequent reads from it will return its default value. - public mutating func clearName() {self._name = nil} - - /// e.g. "foo", "foo.bar", etc. - public var package: String { - get {return _package ?? String()} - set {_package = newValue} - } - /// Returns true if `package` has been explicitly set. - public var hasPackage: Bool {return self._package != nil} - /// Clears the value of `package`. Subsequent reads from it will return its default value. - public mutating func clearPackage() {self._package = nil} - - /// Names of files imported by this file. - public var dependency: [String] = [] - - /// Indexes of the public imported files in the dependency list above. - public var publicDependency: [Int32] = [] - - /// Indexes of the weak imported files in the dependency list. - /// For Google-internal migration only. Do not use. - public var weakDependency: [Int32] = [] - - /// All top-level definitions in this file. - public var messageType: [Google_Protobuf_DescriptorProto] = [] - - public var enumType: [Google_Protobuf_EnumDescriptorProto] = [] - - public var service: [Google_Protobuf_ServiceDescriptorProto] = [] - - public var `extension`: [Google_Protobuf_FieldDescriptorProto] = [] - - public var options: Google_Protobuf_FileOptions { - get {return _options ?? Google_Protobuf_FileOptions()} - set {_options = newValue} - } - /// Returns true if `options` has been explicitly set. - public var hasOptions: Bool {return self._options != nil} - /// Clears the value of `options`. Subsequent reads from it will return its default value. - public mutating func clearOptions() {self._options = nil} - - /// This field contains optional information about the original source code. - /// You may safely remove this entire field without harming runtime - /// functionality of the descriptors -- the information is needed only by - /// development tools. - public var sourceCodeInfo: Google_Protobuf_SourceCodeInfo { - get {return _sourceCodeInfo ?? Google_Protobuf_SourceCodeInfo()} - set {_sourceCodeInfo = newValue} - } - /// Returns true if `sourceCodeInfo` has been explicitly set. - public var hasSourceCodeInfo: Bool {return self._sourceCodeInfo != nil} - /// Clears the value of `sourceCodeInfo`. Subsequent reads from it will return its default value. - public mutating func clearSourceCodeInfo() {self._sourceCodeInfo = nil} - - /// The syntax of the proto file. - /// The supported values are "proto2", "proto3", and "editions". - /// - /// If `edition` is present, this value must be "editions". - public var syntax: String { - get {return _syntax ?? String()} - set {_syntax = newValue} - } - /// Returns true if `syntax` has been explicitly set. - public var hasSyntax: Bool {return self._syntax != nil} - /// Clears the value of `syntax`. Subsequent reads from it will return its default value. - public mutating func clearSyntax() {self._syntax = nil} - - /// The edition of the proto file, which is an opaque string. - /// TODO(b/297898292) Deprecate and remove this field in favor of enums. - public var edition: String { - get {return _edition ?? String()} - set {_edition = newValue} - } - /// Returns true if `edition` has been explicitly set. - public var hasEdition: Bool {return self._edition != nil} - /// Clears the value of `edition`. Subsequent reads from it will return its default value. - public mutating func clearEdition() {self._edition = nil} - - /// The edition of the proto file. - public var editionEnum: Google_Protobuf_Edition { - get {return _editionEnum ?? .unknown} - set {_editionEnum = newValue} - } - /// Returns true if `editionEnum` has been explicitly set. - public var hasEditionEnum: Bool {return self._editionEnum != nil} - /// Clears the value of `editionEnum`. Subsequent reads from it will return its default value. - public mutating func clearEditionEnum() {self._editionEnum = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _name: String? = nil - fileprivate var _package: String? = nil - fileprivate var _options: Google_Protobuf_FileOptions? = nil - fileprivate var _sourceCodeInfo: Google_Protobuf_SourceCodeInfo? = nil - fileprivate var _syntax: String? = nil - fileprivate var _edition: String? = nil - fileprivate var _editionEnum: Google_Protobuf_Edition? = nil -} - -/// Describes a message type. -public struct Google_Protobuf_DescriptorProto { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var name: String { - get {return _storage._name ?? String()} - set {_uniqueStorage()._name = newValue} - } - /// Returns true if `name` has been explicitly set. - public var hasName: Bool {return _storage._name != nil} - /// Clears the value of `name`. Subsequent reads from it will return its default value. - public mutating func clearName() {_uniqueStorage()._name = nil} - - public var field: [Google_Protobuf_FieldDescriptorProto] { - get {return _storage._field} - set {_uniqueStorage()._field = newValue} - } - - public var `extension`: [Google_Protobuf_FieldDescriptorProto] { - get {return _storage._extension} - set {_uniqueStorage()._extension = newValue} - } - - public var nestedType: [Google_Protobuf_DescriptorProto] { - get {return _storage._nestedType} - set {_uniqueStorage()._nestedType = newValue} - } - - public var enumType: [Google_Protobuf_EnumDescriptorProto] { - get {return _storage._enumType} - set {_uniqueStorage()._enumType = newValue} - } - - public var extensionRange: [Google_Protobuf_DescriptorProto.ExtensionRange] { - get {return _storage._extensionRange} - set {_uniqueStorage()._extensionRange = newValue} - } - - public var oneofDecl: [Google_Protobuf_OneofDescriptorProto] { - get {return _storage._oneofDecl} - set {_uniqueStorage()._oneofDecl = newValue} - } - - public var options: Google_Protobuf_MessageOptions { - get {return _storage._options ?? Google_Protobuf_MessageOptions()} - set {_uniqueStorage()._options = newValue} - } - /// Returns true if `options` has been explicitly set. - public var hasOptions: Bool {return _storage._options != nil} - /// Clears the value of `options`. Subsequent reads from it will return its default value. - public mutating func clearOptions() {_uniqueStorage()._options = nil} - - public var reservedRange: [Google_Protobuf_DescriptorProto.ReservedRange] { - get {return _storage._reservedRange} - set {_uniqueStorage()._reservedRange = newValue} - } - - /// Reserved field names, which may not be used by fields in the same message. - /// A given name may only be reserved once. - public var reservedName: [String] { - get {return _storage._reservedName} - set {_uniqueStorage()._reservedName = newValue} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public struct ExtensionRange { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Inclusive. - public var start: Int32 { - get {return _start ?? 0} - set {_start = newValue} - } - /// Returns true if `start` has been explicitly set. - public var hasStart: Bool {return self._start != nil} - /// Clears the value of `start`. Subsequent reads from it will return its default value. - public mutating func clearStart() {self._start = nil} - - /// Exclusive. - public var end: Int32 { - get {return _end ?? 0} - set {_end = newValue} - } - /// Returns true if `end` has been explicitly set. - public var hasEnd: Bool {return self._end != nil} - /// Clears the value of `end`. Subsequent reads from it will return its default value. - public mutating func clearEnd() {self._end = nil} - - public var options: Google_Protobuf_ExtensionRangeOptions { - get {return _options ?? Google_Protobuf_ExtensionRangeOptions()} - set {_options = newValue} - } - /// Returns true if `options` has been explicitly set. - public var hasOptions: Bool {return self._options != nil} - /// Clears the value of `options`. Subsequent reads from it will return its default value. - public mutating func clearOptions() {self._options = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _start: Int32? = nil - fileprivate var _end: Int32? = nil - fileprivate var _options: Google_Protobuf_ExtensionRangeOptions? = nil - } - - /// Range of reserved tag numbers. Reserved tag numbers may not be used by - /// fields or extension ranges in the same message. Reserved ranges may - /// not overlap. - public struct ReservedRange { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Inclusive. - public var start: Int32 { - get {return _start ?? 0} - set {_start = newValue} - } - /// Returns true if `start` has been explicitly set. - public var hasStart: Bool {return self._start != nil} - /// Clears the value of `start`. Subsequent reads from it will return its default value. - public mutating func clearStart() {self._start = nil} - - /// Exclusive. - public var end: Int32 { - get {return _end ?? 0} - set {_end = newValue} - } - /// Returns true if `end` has been explicitly set. - public var hasEnd: Bool {return self._end != nil} - /// Clears the value of `end`. Subsequent reads from it will return its default value. - public mutating func clearEnd() {self._end = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _start: Int32? = nil - fileprivate var _end: Int32? = nil - } - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -public struct Google_Protobuf_ExtensionRangeOptions: SwiftProtobuf.ExtensibleMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The parser stores options it doesn't recognize here. See above. - public var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = [] - - /// For external users: DO NOT USE. We are in the process of open sourcing - /// extension declaration and executing internal cleanups before it can be - /// used externally. - public var declaration: [Google_Protobuf_ExtensionRangeOptions.Declaration] = [] - - /// Any features defined in the specific edition. - public var features: Google_Protobuf_FeatureSet { - get {return _features ?? Google_Protobuf_FeatureSet()} - set {_features = newValue} - } - /// Returns true if `features` has been explicitly set. - public var hasFeatures: Bool {return self._features != nil} - /// Clears the value of `features`. Subsequent reads from it will return its default value. - public mutating func clearFeatures() {self._features = nil} - - /// The verification state of the range. - /// TODO(b/278783756): flip the default to DECLARATION once all empty ranges - /// are marked as UNVERIFIED. - public var verification: Google_Protobuf_ExtensionRangeOptions.VerificationState { - get {return _verification ?? .unverified} - set {_verification = newValue} - } - /// Returns true if `verification` has been explicitly set. - public var hasVerification: Bool {return self._verification != nil} - /// Clears the value of `verification`. Subsequent reads from it will return its default value. - public mutating func clearVerification() {self._verification = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// The verification state of the extension range. - public enum VerificationState: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// All the extensions of the range must be declared. - case declaration // = 0 - case unverified // = 1 - - public init() { - self = .declaration - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .declaration - case 1: self = .unverified - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .declaration: return 0 - case .unverified: return 1 - } - } - - } - - public struct Declaration { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The extension number declared within the extension range. - public var number: Int32 { - get {return _number ?? 0} - set {_number = newValue} - } - /// Returns true if `number` has been explicitly set. - public var hasNumber: Bool {return self._number != nil} - /// Clears the value of `number`. Subsequent reads from it will return its default value. - public mutating func clearNumber() {self._number = nil} - - /// The fully-qualified name of the extension field. There must be a leading - /// dot in front of the full name. - public var fullName: String { - get {return _fullName ?? String()} - set {_fullName = newValue} - } - /// Returns true if `fullName` has been explicitly set. - public var hasFullName: Bool {return self._fullName != nil} - /// Clears the value of `fullName`. Subsequent reads from it will return its default value. - public mutating func clearFullName() {self._fullName = nil} - - /// The fully-qualified type name of the extension field. Unlike - /// Metadata.type, Declaration.type must have a leading dot for messages - /// and enums. - public var type: String { - get {return _type ?? String()} - set {_type = newValue} - } - /// Returns true if `type` has been explicitly set. - public var hasType: Bool {return self._type != nil} - /// Clears the value of `type`. Subsequent reads from it will return its default value. - public mutating func clearType() {self._type = nil} - - /// If true, indicates that the number is reserved in the extension range, - /// and any extension field with the number will fail to compile. Set this - /// when a declared extension field is deleted. - public var reserved: Bool { - get {return _reserved ?? false} - set {_reserved = newValue} - } - /// Returns true if `reserved` has been explicitly set. - public var hasReserved: Bool {return self._reserved != nil} - /// Clears the value of `reserved`. Subsequent reads from it will return its default value. - public mutating func clearReserved() {self._reserved = nil} - - /// If true, indicates that the extension must be defined as repeated. - /// Otherwise the extension must be defined as optional. - public var repeated: Bool { - get {return _repeated ?? false} - set {_repeated = newValue} - } - /// Returns true if `repeated` has been explicitly set. - public var hasRepeated: Bool {return self._repeated != nil} - /// Clears the value of `repeated`. Subsequent reads from it will return its default value. - public mutating func clearRepeated() {self._repeated = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _number: Int32? = nil - fileprivate var _fullName: String? = nil - fileprivate var _type: String? = nil - fileprivate var _reserved: Bool? = nil - fileprivate var _repeated: Bool? = nil - } - - public init() {} - - public var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() - fileprivate var _features: Google_Protobuf_FeatureSet? = nil - fileprivate var _verification: Google_Protobuf_ExtensionRangeOptions.VerificationState? = nil -} - -#if swift(>=4.2) - -extension Google_Protobuf_ExtensionRangeOptions.VerificationState: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -/// Describes a field within a message. -public struct Google_Protobuf_FieldDescriptorProto { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var name: String { - get {return _name ?? String()} - set {_name = newValue} - } - /// Returns true if `name` has been explicitly set. - public var hasName: Bool {return self._name != nil} - /// Clears the value of `name`. Subsequent reads from it will return its default value. - public mutating func clearName() {self._name = nil} - - public var number: Int32 { - get {return _number ?? 0} - set {_number = newValue} - } - /// Returns true if `number` has been explicitly set. - public var hasNumber: Bool {return self._number != nil} - /// Clears the value of `number`. Subsequent reads from it will return its default value. - public mutating func clearNumber() {self._number = nil} - - public var label: Google_Protobuf_FieldDescriptorProto.Label { - get {return _label ?? .optional} - set {_label = newValue} - } - /// Returns true if `label` has been explicitly set. - public var hasLabel: Bool {return self._label != nil} - /// Clears the value of `label`. Subsequent reads from it will return its default value. - public mutating func clearLabel() {self._label = nil} - - /// If type_name is set, this need not be set. If both this and type_name - /// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - public var type: Google_Protobuf_FieldDescriptorProto.TypeEnum { - get {return _type ?? .double} - set {_type = newValue} - } - /// Returns true if `type` has been explicitly set. - public var hasType: Bool {return self._type != nil} - /// Clears the value of `type`. Subsequent reads from it will return its default value. - public mutating func clearType() {self._type = nil} - - /// For message and enum types, this is the name of the type. If the name - /// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - /// rules are used to find the type (i.e. first the nested types within this - /// message are searched, then within the parent, on up to the root - /// namespace). - public var typeName: String { - get {return _typeName ?? String()} - set {_typeName = newValue} - } - /// Returns true if `typeName` has been explicitly set. - public var hasTypeName: Bool {return self._typeName != nil} - /// Clears the value of `typeName`. Subsequent reads from it will return its default value. - public mutating func clearTypeName() {self._typeName = nil} - - /// For extensions, this is the name of the type being extended. It is - /// resolved in the same manner as type_name. - public var extendee: String { - get {return _extendee ?? String()} - set {_extendee = newValue} - } - /// Returns true if `extendee` has been explicitly set. - public var hasExtendee: Bool {return self._extendee != nil} - /// Clears the value of `extendee`. Subsequent reads from it will return its default value. - public mutating func clearExtendee() {self._extendee = nil} - - /// For numeric types, contains the original text representation of the value. - /// For booleans, "true" or "false". - /// For strings, contains the default text contents (not escaped in any way). - /// For bytes, contains the C escaped value. All bytes >= 128 are escaped. - public var defaultValue: String { - get {return _defaultValue ?? String()} - set {_defaultValue = newValue} - } - /// Returns true if `defaultValue` has been explicitly set. - public var hasDefaultValue: Bool {return self._defaultValue != nil} - /// Clears the value of `defaultValue`. Subsequent reads from it will return its default value. - public mutating func clearDefaultValue() {self._defaultValue = nil} - - /// If set, gives the index of a oneof in the containing type's oneof_decl - /// list. This field is a member of that oneof. - public var oneofIndex: Int32 { - get {return _oneofIndex ?? 0} - set {_oneofIndex = newValue} - } - /// Returns true if `oneofIndex` has been explicitly set. - public var hasOneofIndex: Bool {return self._oneofIndex != nil} - /// Clears the value of `oneofIndex`. Subsequent reads from it will return its default value. - public mutating func clearOneofIndex() {self._oneofIndex = nil} - - /// JSON name of this field. The value is set by protocol compiler. If the - /// user has set a "json_name" option on this field, that option's value - /// will be used. Otherwise, it's deduced from the field's name by converting - /// it to camelCase. - public var jsonName: String { - get {return _jsonName ?? String()} - set {_jsonName = newValue} - } - /// Returns true if `jsonName` has been explicitly set. - public var hasJsonName: Bool {return self._jsonName != nil} - /// Clears the value of `jsonName`. Subsequent reads from it will return its default value. - public mutating func clearJsonName() {self._jsonName = nil} - - public var options: Google_Protobuf_FieldOptions { - get {return _options ?? Google_Protobuf_FieldOptions()} - set {_options = newValue} - } - /// Returns true if `options` has been explicitly set. - public var hasOptions: Bool {return self._options != nil} - /// Clears the value of `options`. Subsequent reads from it will return its default value. - public mutating func clearOptions() {self._options = nil} - - /// If true, this is a proto3 "optional". When a proto3 field is optional, it - /// tracks presence regardless of field type. - /// - /// When proto3_optional is true, this field must be belong to a oneof to - /// signal to old proto3 clients that presence is tracked for this field. This - /// oneof is known as a "synthetic" oneof, and this field must be its sole - /// member (each proto3 optional field gets its own synthetic oneof). Synthetic - /// oneofs exist in the descriptor only, and do not generate any API. Synthetic - /// oneofs must be ordered after all "real" oneofs. - /// - /// For message fields, proto3_optional doesn't create any semantic change, - /// since non-repeated message fields always track presence. However it still - /// indicates the semantic detail of whether the user wrote "optional" or not. - /// This can be useful for round-tripping the .proto file. For consistency we - /// give message fields a synthetic oneof also, even though it is not required - /// to track presence. This is especially important because the parser can't - /// tell if a field is a message or an enum, so it must always create a - /// synthetic oneof. - /// - /// Proto2 optional fields do not set this flag, because they already indicate - /// optional with `LABEL_OPTIONAL`. - public var proto3Optional: Bool { - get {return _proto3Optional ?? false} - set {_proto3Optional = newValue} - } - /// Returns true if `proto3Optional` has been explicitly set. - public var hasProto3Optional: Bool {return self._proto3Optional != nil} - /// Clears the value of `proto3Optional`. Subsequent reads from it will return its default value. - public mutating func clearProto3Optional() {self._proto3Optional = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum TypeEnum: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// 0 is reserved for errors. - /// Order is weird for historical reasons. - case double // = 1 - case float // = 2 - - /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - /// negative values are likely. - case int64 // = 3 - case uint64 // = 4 - - /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - /// negative values are likely. - case int32 // = 5 - case fixed64 // = 6 - case fixed32 // = 7 - case bool // = 8 - case string // = 9 - - /// Tag-delimited aggregate. - /// Group type is deprecated and not supported in proto3. However, Proto3 - /// implementations should still be able to parse the group wire format and - /// treat group fields as unknown fields. - case group // = 10 - - /// Length-delimited aggregate. - case message // = 11 - - /// New in version 2. - case bytes // = 12 - case uint32 // = 13 - case `enum` // = 14 - case sfixed32 // = 15 - case sfixed64 // = 16 - - /// Uses ZigZag encoding. - case sint32 // = 17 - - /// Uses ZigZag encoding. - case sint64 // = 18 - - public init() { - self = .double - } - - public init?(rawValue: Int) { - switch rawValue { - case 1: self = .double - case 2: self = .float - case 3: self = .int64 - case 4: self = .uint64 - case 5: self = .int32 - case 6: self = .fixed64 - case 7: self = .fixed32 - case 8: self = .bool - case 9: self = .string - case 10: self = .group - case 11: self = .message - case 12: self = .bytes - case 13: self = .uint32 - case 14: self = .enum - case 15: self = .sfixed32 - case 16: self = .sfixed64 - case 17: self = .sint32 - case 18: self = .sint64 - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .double: return 1 - case .float: return 2 - case .int64: return 3 - case .uint64: return 4 - case .int32: return 5 - case .fixed64: return 6 - case .fixed32: return 7 - case .bool: return 8 - case .string: return 9 - case .group: return 10 - case .message: return 11 - case .bytes: return 12 - case .uint32: return 13 - case .enum: return 14 - case .sfixed32: return 15 - case .sfixed64: return 16 - case .sint32: return 17 - case .sint64: return 18 - } - } - - } - - public enum Label: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// 0 is reserved for errors - case `optional` // = 1 - case `required` // = 2 - case repeated // = 3 - - public init() { - self = .optional - } - - public init?(rawValue: Int) { - switch rawValue { - case 1: self = .optional - case 2: self = .required - case 3: self = .repeated - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .optional: return 1 - case .required: return 2 - case .repeated: return 3 - } - } - - } - - public init() {} - - fileprivate var _name: String? = nil - fileprivate var _number: Int32? = nil - fileprivate var _label: Google_Protobuf_FieldDescriptorProto.Label? = nil - fileprivate var _type: Google_Protobuf_FieldDescriptorProto.TypeEnum? = nil - fileprivate var _typeName: String? = nil - fileprivate var _extendee: String? = nil - fileprivate var _defaultValue: String? = nil - fileprivate var _oneofIndex: Int32? = nil - fileprivate var _jsonName: String? = nil - fileprivate var _options: Google_Protobuf_FieldOptions? = nil - fileprivate var _proto3Optional: Bool? = nil -} - -#if swift(>=4.2) - -extension Google_Protobuf_FieldDescriptorProto.TypeEnum: CaseIterable { - // Support synthesized by the compiler. -} - -extension Google_Protobuf_FieldDescriptorProto.Label: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -/// Describes a oneof. -public struct Google_Protobuf_OneofDescriptorProto { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var name: String { - get {return _name ?? String()} - set {_name = newValue} - } - /// Returns true if `name` has been explicitly set. - public var hasName: Bool {return self._name != nil} - /// Clears the value of `name`. Subsequent reads from it will return its default value. - public mutating func clearName() {self._name = nil} - - public var options: Google_Protobuf_OneofOptions { - get {return _options ?? Google_Protobuf_OneofOptions()} - set {_options = newValue} - } - /// Returns true if `options` has been explicitly set. - public var hasOptions: Bool {return self._options != nil} - /// Clears the value of `options`. Subsequent reads from it will return its default value. - public mutating func clearOptions() {self._options = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _name: String? = nil - fileprivate var _options: Google_Protobuf_OneofOptions? = nil -} - -/// Describes an enum type. -public struct Google_Protobuf_EnumDescriptorProto { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var name: String { - get {return _name ?? String()} - set {_name = newValue} - } - /// Returns true if `name` has been explicitly set. - public var hasName: Bool {return self._name != nil} - /// Clears the value of `name`. Subsequent reads from it will return its default value. - public mutating func clearName() {self._name = nil} - - public var value: [Google_Protobuf_EnumValueDescriptorProto] = [] - - public var options: Google_Protobuf_EnumOptions { - get {return _options ?? Google_Protobuf_EnumOptions()} - set {_options = newValue} - } - /// Returns true if `options` has been explicitly set. - public var hasOptions: Bool {return self._options != nil} - /// Clears the value of `options`. Subsequent reads from it will return its default value. - public mutating func clearOptions() {self._options = nil} - - /// Range of reserved numeric values. Reserved numeric values may not be used - /// by enum values in the same enum declaration. Reserved ranges may not - /// overlap. - public var reservedRange: [Google_Protobuf_EnumDescriptorProto.EnumReservedRange] = [] - - /// Reserved enum value names, which may not be reused. A given name may only - /// be reserved once. - public var reservedName: [String] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Range of reserved numeric values. Reserved values may not be used by - /// entries in the same enum. Reserved ranges may not overlap. - /// - /// Note that this is distinct from DescriptorProto.ReservedRange in that it - /// is inclusive such that it can appropriately represent the entire int32 - /// domain. - public struct EnumReservedRange { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Inclusive. - public var start: Int32 { - get {return _start ?? 0} - set {_start = newValue} - } - /// Returns true if `start` has been explicitly set. - public var hasStart: Bool {return self._start != nil} - /// Clears the value of `start`. Subsequent reads from it will return its default value. - public mutating func clearStart() {self._start = nil} - - /// Inclusive. - public var end: Int32 { - get {return _end ?? 0} - set {_end = newValue} - } - /// Returns true if `end` has been explicitly set. - public var hasEnd: Bool {return self._end != nil} - /// Clears the value of `end`. Subsequent reads from it will return its default value. - public mutating func clearEnd() {self._end = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _start: Int32? = nil - fileprivate var _end: Int32? = nil - } - - public init() {} - - fileprivate var _name: String? = nil - fileprivate var _options: Google_Protobuf_EnumOptions? = nil -} - -/// Describes a value within an enum. -public struct Google_Protobuf_EnumValueDescriptorProto { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var name: String { - get {return _name ?? String()} - set {_name = newValue} - } - /// Returns true if `name` has been explicitly set. - public var hasName: Bool {return self._name != nil} - /// Clears the value of `name`. Subsequent reads from it will return its default value. - public mutating func clearName() {self._name = nil} - - public var number: Int32 { - get {return _number ?? 0} - set {_number = newValue} - } - /// Returns true if `number` has been explicitly set. - public var hasNumber: Bool {return self._number != nil} - /// Clears the value of `number`. Subsequent reads from it will return its default value. - public mutating func clearNumber() {self._number = nil} - - public var options: Google_Protobuf_EnumValueOptions { - get {return _options ?? Google_Protobuf_EnumValueOptions()} - set {_options = newValue} - } - /// Returns true if `options` has been explicitly set. - public var hasOptions: Bool {return self._options != nil} - /// Clears the value of `options`. Subsequent reads from it will return its default value. - public mutating func clearOptions() {self._options = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _name: String? = nil - fileprivate var _number: Int32? = nil - fileprivate var _options: Google_Protobuf_EnumValueOptions? = nil -} - -/// Describes a service. -public struct Google_Protobuf_ServiceDescriptorProto { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var name: String { - get {return _name ?? String()} - set {_name = newValue} - } - /// Returns true if `name` has been explicitly set. - public var hasName: Bool {return self._name != nil} - /// Clears the value of `name`. Subsequent reads from it will return its default value. - public mutating func clearName() {self._name = nil} - - public var method: [Google_Protobuf_MethodDescriptorProto] = [] - - public var options: Google_Protobuf_ServiceOptions { - get {return _options ?? Google_Protobuf_ServiceOptions()} - set {_options = newValue} - } - /// Returns true if `options` has been explicitly set. - public var hasOptions: Bool {return self._options != nil} - /// Clears the value of `options`. Subsequent reads from it will return its default value. - public mutating func clearOptions() {self._options = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _name: String? = nil - fileprivate var _options: Google_Protobuf_ServiceOptions? = nil -} - -/// Describes a method of a service. -public struct Google_Protobuf_MethodDescriptorProto { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var name: String { - get {return _name ?? String()} - set {_name = newValue} - } - /// Returns true if `name` has been explicitly set. - public var hasName: Bool {return self._name != nil} - /// Clears the value of `name`. Subsequent reads from it will return its default value. - public mutating func clearName() {self._name = nil} - - /// Input and output type names. These are resolved in the same way as - /// FieldDescriptorProto.type_name, but must refer to a message type. - public var inputType: String { - get {return _inputType ?? String()} - set {_inputType = newValue} - } - /// Returns true if `inputType` has been explicitly set. - public var hasInputType: Bool {return self._inputType != nil} - /// Clears the value of `inputType`. Subsequent reads from it will return its default value. - public mutating func clearInputType() {self._inputType = nil} - - public var outputType: String { - get {return _outputType ?? String()} - set {_outputType = newValue} - } - /// Returns true if `outputType` has been explicitly set. - public var hasOutputType: Bool {return self._outputType != nil} - /// Clears the value of `outputType`. Subsequent reads from it will return its default value. - public mutating func clearOutputType() {self._outputType = nil} - - public var options: Google_Protobuf_MethodOptions { - get {return _options ?? Google_Protobuf_MethodOptions()} - set {_options = newValue} - } - /// Returns true if `options` has been explicitly set. - public var hasOptions: Bool {return self._options != nil} - /// Clears the value of `options`. Subsequent reads from it will return its default value. - public mutating func clearOptions() {self._options = nil} - - /// Identifies if client streams multiple client messages - public var clientStreaming: Bool { - get {return _clientStreaming ?? false} - set {_clientStreaming = newValue} - } - /// Returns true if `clientStreaming` has been explicitly set. - public var hasClientStreaming: Bool {return self._clientStreaming != nil} - /// Clears the value of `clientStreaming`. Subsequent reads from it will return its default value. - public mutating func clearClientStreaming() {self._clientStreaming = nil} - - /// Identifies if server streams multiple server messages - public var serverStreaming: Bool { - get {return _serverStreaming ?? false} - set {_serverStreaming = newValue} - } - /// Returns true if `serverStreaming` has been explicitly set. - public var hasServerStreaming: Bool {return self._serverStreaming != nil} - /// Clears the value of `serverStreaming`. Subsequent reads from it will return its default value. - public mutating func clearServerStreaming() {self._serverStreaming = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _name: String? = nil - fileprivate var _inputType: String? = nil - fileprivate var _outputType: String? = nil - fileprivate var _options: Google_Protobuf_MethodOptions? = nil - fileprivate var _clientStreaming: Bool? = nil - fileprivate var _serverStreaming: Bool? = nil -} - -public struct Google_Protobuf_FileOptions: SwiftProtobuf.ExtensibleMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Sets the Java package where classes generated from this .proto will be - /// placed. By default, the proto package is used, but this is often - /// inappropriate because proto packages do not normally start with backwards - /// domain names. - public var javaPackage: String { - get {return _storage._javaPackage ?? String()} - set {_uniqueStorage()._javaPackage = newValue} - } - /// Returns true if `javaPackage` has been explicitly set. - public var hasJavaPackage: Bool {return _storage._javaPackage != nil} - /// Clears the value of `javaPackage`. Subsequent reads from it will return its default value. - public mutating func clearJavaPackage() {_uniqueStorage()._javaPackage = nil} - - /// Controls the name of the wrapper Java class generated for the .proto file. - /// That class will always contain the .proto file's getDescriptor() method as - /// well as any top-level extensions defined in the .proto file. - /// If java_multiple_files is disabled, then all the other classes from the - /// .proto file will be nested inside the single wrapper outer class. - public var javaOuterClassname: String { - get {return _storage._javaOuterClassname ?? String()} - set {_uniqueStorage()._javaOuterClassname = newValue} - } - /// Returns true if `javaOuterClassname` has been explicitly set. - public var hasJavaOuterClassname: Bool {return _storage._javaOuterClassname != nil} - /// Clears the value of `javaOuterClassname`. Subsequent reads from it will return its default value. - public mutating func clearJavaOuterClassname() {_uniqueStorage()._javaOuterClassname = nil} - - /// If enabled, then the Java code generator will generate a separate .java - /// file for each top-level message, enum, and service defined in the .proto - /// file. Thus, these types will *not* be nested inside the wrapper class - /// named by java_outer_classname. However, the wrapper class will still be - /// generated to contain the file's getDescriptor() method as well as any - /// top-level extensions defined in the file. - public var javaMultipleFiles: Bool { - get {return _storage._javaMultipleFiles ?? false} - set {_uniqueStorage()._javaMultipleFiles = newValue} - } - /// Returns true if `javaMultipleFiles` has been explicitly set. - public var hasJavaMultipleFiles: Bool {return _storage._javaMultipleFiles != nil} - /// Clears the value of `javaMultipleFiles`. Subsequent reads from it will return its default value. - public mutating func clearJavaMultipleFiles() {_uniqueStorage()._javaMultipleFiles = nil} - - /// This option does nothing. - public var javaGenerateEqualsAndHash: Bool { - get {return _storage._javaGenerateEqualsAndHash ?? false} - set {_uniqueStorage()._javaGenerateEqualsAndHash = newValue} - } - /// Returns true if `javaGenerateEqualsAndHash` has been explicitly set. - public var hasJavaGenerateEqualsAndHash: Bool {return _storage._javaGenerateEqualsAndHash != nil} - /// Clears the value of `javaGenerateEqualsAndHash`. Subsequent reads from it will return its default value. - public mutating func clearJavaGenerateEqualsAndHash() {_uniqueStorage()._javaGenerateEqualsAndHash = nil} - - /// If set true, then the Java2 code generator will generate code that - /// throws an exception whenever an attempt is made to assign a non-UTF-8 - /// byte sequence to a string field. - /// Message reflection will do the same. - /// However, an extension field still accepts non-UTF-8 byte sequences. - /// This option has no effect on when used with the lite runtime. - public var javaStringCheckUtf8: Bool { - get {return _storage._javaStringCheckUtf8 ?? false} - set {_uniqueStorage()._javaStringCheckUtf8 = newValue} - } - /// Returns true if `javaStringCheckUtf8` has been explicitly set. - public var hasJavaStringCheckUtf8: Bool {return _storage._javaStringCheckUtf8 != nil} - /// Clears the value of `javaStringCheckUtf8`. Subsequent reads from it will return its default value. - public mutating func clearJavaStringCheckUtf8() {_uniqueStorage()._javaStringCheckUtf8 = nil} - - public var optimizeFor: Google_Protobuf_FileOptions.OptimizeMode { - get {return _storage._optimizeFor ?? .speed} - set {_uniqueStorage()._optimizeFor = newValue} - } - /// Returns true if `optimizeFor` has been explicitly set. - public var hasOptimizeFor: Bool {return _storage._optimizeFor != nil} - /// Clears the value of `optimizeFor`. Subsequent reads from it will return its default value. - public mutating func clearOptimizeFor() {_uniqueStorage()._optimizeFor = nil} - - /// Sets the Go package where structs generated from this .proto will be - /// placed. If omitted, the Go package will be derived from the following: - /// - The basename of the package import path, if provided. - /// - Otherwise, the package statement in the .proto file, if present. - /// - Otherwise, the basename of the .proto file, without extension. - public var goPackage: String { - get {return _storage._goPackage ?? String()} - set {_uniqueStorage()._goPackage = newValue} - } - /// Returns true if `goPackage` has been explicitly set. - public var hasGoPackage: Bool {return _storage._goPackage != nil} - /// Clears the value of `goPackage`. Subsequent reads from it will return its default value. - public mutating func clearGoPackage() {_uniqueStorage()._goPackage = nil} - - /// Should generic services be generated in each language? "Generic" services - /// are not specific to any particular RPC system. They are generated by the - /// main code generators in each language (without additional plugins). - /// Generic services were the only kind of service generation supported by - /// early versions of google.protobuf. - /// - /// Generic services are now considered deprecated in favor of using plugins - /// that generate code specific to your particular RPC system. Therefore, - /// these default to false. Old code which depends on generic services should - /// explicitly set them to true. - public var ccGenericServices: Bool { - get {return _storage._ccGenericServices ?? false} - set {_uniqueStorage()._ccGenericServices = newValue} - } - /// Returns true if `ccGenericServices` has been explicitly set. - public var hasCcGenericServices: Bool {return _storage._ccGenericServices != nil} - /// Clears the value of `ccGenericServices`. Subsequent reads from it will return its default value. - public mutating func clearCcGenericServices() {_uniqueStorage()._ccGenericServices = nil} - - public var javaGenericServices: Bool { - get {return _storage._javaGenericServices ?? false} - set {_uniqueStorage()._javaGenericServices = newValue} - } - /// Returns true if `javaGenericServices` has been explicitly set. - public var hasJavaGenericServices: Bool {return _storage._javaGenericServices != nil} - /// Clears the value of `javaGenericServices`. Subsequent reads from it will return its default value. - public mutating func clearJavaGenericServices() {_uniqueStorage()._javaGenericServices = nil} - - public var pyGenericServices: Bool { - get {return _storage._pyGenericServices ?? false} - set {_uniqueStorage()._pyGenericServices = newValue} - } - /// Returns true if `pyGenericServices` has been explicitly set. - public var hasPyGenericServices: Bool {return _storage._pyGenericServices != nil} - /// Clears the value of `pyGenericServices`. Subsequent reads from it will return its default value. - public mutating func clearPyGenericServices() {_uniqueStorage()._pyGenericServices = nil} - - public var phpGenericServices: Bool { - get {return _storage._phpGenericServices ?? false} - set {_uniqueStorage()._phpGenericServices = newValue} - } - /// Returns true if `phpGenericServices` has been explicitly set. - public var hasPhpGenericServices: Bool {return _storage._phpGenericServices != nil} - /// Clears the value of `phpGenericServices`. Subsequent reads from it will return its default value. - public mutating func clearPhpGenericServices() {_uniqueStorage()._phpGenericServices = nil} - - /// Is this file deprecated? - /// Depending on the target platform, this can emit Deprecated annotations - /// for everything in the file, or it will be completely ignored; in the very - /// least, this is a formalization for deprecating files. - public var deprecated: Bool { - get {return _storage._deprecated ?? false} - set {_uniqueStorage()._deprecated = newValue} - } - /// Returns true if `deprecated` has been explicitly set. - public var hasDeprecated: Bool {return _storage._deprecated != nil} - /// Clears the value of `deprecated`. Subsequent reads from it will return its default value. - public mutating func clearDeprecated() {_uniqueStorage()._deprecated = nil} - - /// Enables the use of arenas for the proto messages in this file. This applies - /// only to generated classes for C++. - public var ccEnableArenas: Bool { - get {return _storage._ccEnableArenas ?? true} - set {_uniqueStorage()._ccEnableArenas = newValue} - } - /// Returns true if `ccEnableArenas` has been explicitly set. - public var hasCcEnableArenas: Bool {return _storage._ccEnableArenas != nil} - /// Clears the value of `ccEnableArenas`. Subsequent reads from it will return its default value. - public mutating func clearCcEnableArenas() {_uniqueStorage()._ccEnableArenas = nil} - - /// Sets the objective c class prefix which is prepended to all objective c - /// generated classes from this .proto. There is no default. - public var objcClassPrefix: String { - get {return _storage._objcClassPrefix ?? String()} - set {_uniqueStorage()._objcClassPrefix = newValue} - } - /// Returns true if `objcClassPrefix` has been explicitly set. - public var hasObjcClassPrefix: Bool {return _storage._objcClassPrefix != nil} - /// Clears the value of `objcClassPrefix`. Subsequent reads from it will return its default value. - public mutating func clearObjcClassPrefix() {_uniqueStorage()._objcClassPrefix = nil} - - /// Namespace for generated classes; defaults to the package. - public var csharpNamespace: String { - get {return _storage._csharpNamespace ?? String()} - set {_uniqueStorage()._csharpNamespace = newValue} - } - /// Returns true if `csharpNamespace` has been explicitly set. - public var hasCsharpNamespace: Bool {return _storage._csharpNamespace != nil} - /// Clears the value of `csharpNamespace`. Subsequent reads from it will return its default value. - public mutating func clearCsharpNamespace() {_uniqueStorage()._csharpNamespace = nil} - - /// By default Swift generators will take the proto package and CamelCase it - /// replacing '.' with underscore and use that to prefix the types/symbols - /// defined. When this options is provided, they will use this value instead - /// to prefix the types/symbols defined. - public var swiftPrefix: String { - get {return _storage._swiftPrefix ?? String()} - set {_uniqueStorage()._swiftPrefix = newValue} - } - /// Returns true if `swiftPrefix` has been explicitly set. - public var hasSwiftPrefix: Bool {return _storage._swiftPrefix != nil} - /// Clears the value of `swiftPrefix`. Subsequent reads from it will return its default value. - public mutating func clearSwiftPrefix() {_uniqueStorage()._swiftPrefix = nil} - - /// Sets the php class prefix which is prepended to all php generated classes - /// from this .proto. Default is empty. - public var phpClassPrefix: String { - get {return _storage._phpClassPrefix ?? String()} - set {_uniqueStorage()._phpClassPrefix = newValue} - } - /// Returns true if `phpClassPrefix` has been explicitly set. - public var hasPhpClassPrefix: Bool {return _storage._phpClassPrefix != nil} - /// Clears the value of `phpClassPrefix`. Subsequent reads from it will return its default value. - public mutating func clearPhpClassPrefix() {_uniqueStorage()._phpClassPrefix = nil} - - /// Use this option to change the namespace of php generated classes. Default - /// is empty. When this option is empty, the package name will be used for - /// determining the namespace. - public var phpNamespace: String { - get {return _storage._phpNamespace ?? String()} - set {_uniqueStorage()._phpNamespace = newValue} - } - /// Returns true if `phpNamespace` has been explicitly set. - public var hasPhpNamespace: Bool {return _storage._phpNamespace != nil} - /// Clears the value of `phpNamespace`. Subsequent reads from it will return its default value. - public mutating func clearPhpNamespace() {_uniqueStorage()._phpNamespace = nil} - - /// Use this option to change the namespace of php generated metadata classes. - /// Default is empty. When this option is empty, the proto file name will be - /// used for determining the namespace. - public var phpMetadataNamespace: String { - get {return _storage._phpMetadataNamespace ?? String()} - set {_uniqueStorage()._phpMetadataNamespace = newValue} - } - /// Returns true if `phpMetadataNamespace` has been explicitly set. - public var hasPhpMetadataNamespace: Bool {return _storage._phpMetadataNamespace != nil} - /// Clears the value of `phpMetadataNamespace`. Subsequent reads from it will return its default value. - public mutating func clearPhpMetadataNamespace() {_uniqueStorage()._phpMetadataNamespace = nil} - - /// Use this option to change the package of ruby generated classes. Default - /// is empty. When this option is not set, the package name will be used for - /// determining the ruby package. - public var rubyPackage: String { - get {return _storage._rubyPackage ?? String()} - set {_uniqueStorage()._rubyPackage = newValue} - } - /// Returns true if `rubyPackage` has been explicitly set. - public var hasRubyPackage: Bool {return _storage._rubyPackage != nil} - /// Clears the value of `rubyPackage`. Subsequent reads from it will return its default value. - public mutating func clearRubyPackage() {_uniqueStorage()._rubyPackage = nil} - - /// Any features defined in the specific edition. - public var features: Google_Protobuf_FeatureSet { - get {return _storage._features ?? Google_Protobuf_FeatureSet()} - set {_uniqueStorage()._features = newValue} - } - /// Returns true if `features` has been explicitly set. - public var hasFeatures: Bool {return _storage._features != nil} - /// Clears the value of `features`. Subsequent reads from it will return its default value. - public mutating func clearFeatures() {_uniqueStorage()._features = nil} - - /// The parser stores options it doesn't recognize here. - /// See the documentation for the "Options" section above. - public var uninterpretedOption: [Google_Protobuf_UninterpretedOption] { - get {return _storage._uninterpretedOption} - set {_uniqueStorage()._uninterpretedOption = newValue} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Generated classes can be optimized for speed or code size. - public enum OptimizeMode: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Generate complete code for parsing, serialization, - case speed // = 1 - - /// etc. - case codeSize // = 2 - - /// Generate code using MessageLite and the lite runtime. - case liteRuntime // = 3 - - public init() { - self = .speed - } - - public init?(rawValue: Int) { - switch rawValue { - case 1: self = .speed - case 2: self = .codeSize - case 3: self = .liteRuntime - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .speed: return 1 - case .codeSize: return 2 - case .liteRuntime: return 3 - } - } - - } - - public init() {} - - public var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() - fileprivate var _storage = _StorageClass.defaultInstance -} - -#if swift(>=4.2) - -extension Google_Protobuf_FileOptions.OptimizeMode: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -public struct Google_Protobuf_MessageOptions: SwiftProtobuf.ExtensibleMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Set true to use the old proto1 MessageSet wire format for extensions. - /// This is provided for backwards-compatibility with the MessageSet wire - /// format. You should not use this for any other reason: It's less - /// efficient, has fewer features, and is more complicated. - /// - /// The message must be defined exactly as follows: - /// message Foo { - /// option message_set_wire_format = true; - /// extensions 4 to max; - /// } - /// Note that the message cannot have any defined fields; MessageSets only - /// have extensions. - /// - /// All extensions of your type must be singular messages; e.g. they cannot - /// be int32s, enums, or repeated messages. - /// - /// Because this is an option, the above two restrictions are not enforced by - /// the protocol compiler. - public var messageSetWireFormat: Bool { - get {return _messageSetWireFormat ?? false} - set {_messageSetWireFormat = newValue} - } - /// Returns true if `messageSetWireFormat` has been explicitly set. - public var hasMessageSetWireFormat: Bool {return self._messageSetWireFormat != nil} - /// Clears the value of `messageSetWireFormat`. Subsequent reads from it will return its default value. - public mutating func clearMessageSetWireFormat() {self._messageSetWireFormat = nil} - - /// Disables the generation of the standard "descriptor()" accessor, which can - /// conflict with a field of the same name. This is meant to make migration - /// from proto1 easier; new code should avoid fields named "descriptor". - public var noStandardDescriptorAccessor: Bool { - get {return _noStandardDescriptorAccessor ?? false} - set {_noStandardDescriptorAccessor = newValue} - } - /// Returns true if `noStandardDescriptorAccessor` has been explicitly set. - public var hasNoStandardDescriptorAccessor: Bool {return self._noStandardDescriptorAccessor != nil} - /// Clears the value of `noStandardDescriptorAccessor`. Subsequent reads from it will return its default value. - public mutating func clearNoStandardDescriptorAccessor() {self._noStandardDescriptorAccessor = nil} - - /// Is this message deprecated? - /// Depending on the target platform, this can emit Deprecated annotations - /// for the message, or it will be completely ignored; in the very least, - /// this is a formalization for deprecating messages. - public var deprecated: Bool { - get {return _deprecated ?? false} - set {_deprecated = newValue} - } - /// Returns true if `deprecated` has been explicitly set. - public var hasDeprecated: Bool {return self._deprecated != nil} - /// Clears the value of `deprecated`. Subsequent reads from it will return its default value. - public mutating func clearDeprecated() {self._deprecated = nil} - - /// NOTE: Do not set the option in .proto files. Always use the maps syntax - /// instead. The option should only be implicitly set by the proto compiler - /// parser. - /// - /// Whether the message is an automatically generated map entry type for the - /// maps field. - /// - /// For maps fields: - /// map map_field = 1; - /// The parsed descriptor looks like: - /// message MapFieldEntry { - /// option map_entry = true; - /// optional KeyType key = 1; - /// optional ValueType value = 2; - /// } - /// repeated MapFieldEntry map_field = 1; - /// - /// Implementations may choose not to generate the map_entry=true message, but - /// use a native map in the target language to hold the keys and values. - /// The reflection APIs in such implementations still need to work as - /// if the field is a repeated message field. - public var mapEntry: Bool { - get {return _mapEntry ?? false} - set {_mapEntry = newValue} - } - /// Returns true if `mapEntry` has been explicitly set. - public var hasMapEntry: Bool {return self._mapEntry != nil} - /// Clears the value of `mapEntry`. Subsequent reads from it will return its default value. - public mutating func clearMapEntry() {self._mapEntry = nil} - - /// Enable the legacy handling of JSON field name conflicts. This lowercases - /// and strips underscored from the fields before comparison in proto3 only. - /// The new behavior takes `json_name` into account and applies to proto2 as - /// well. - /// - /// This should only be used as a temporary measure against broken builds due - /// to the change in behavior for JSON field name conflicts. - /// - /// TODO(b/261750190) This is legacy behavior we plan to remove once downstream - /// teams have had time to migrate. - public var deprecatedLegacyJsonFieldConflicts: Bool { - get {return _deprecatedLegacyJsonFieldConflicts ?? false} - set {_deprecatedLegacyJsonFieldConflicts = newValue} - } - /// Returns true if `deprecatedLegacyJsonFieldConflicts` has been explicitly set. - public var hasDeprecatedLegacyJsonFieldConflicts: Bool {return self._deprecatedLegacyJsonFieldConflicts != nil} - /// Clears the value of `deprecatedLegacyJsonFieldConflicts`. Subsequent reads from it will return its default value. - public mutating func clearDeprecatedLegacyJsonFieldConflicts() {self._deprecatedLegacyJsonFieldConflicts = nil} - - /// Any features defined in the specific edition. - public var features: Google_Protobuf_FeatureSet { - get {return _features ?? Google_Protobuf_FeatureSet()} - set {_features = newValue} - } - /// Returns true if `features` has been explicitly set. - public var hasFeatures: Bool {return self._features != nil} - /// Clears the value of `features`. Subsequent reads from it will return its default value. - public mutating func clearFeatures() {self._features = nil} - - /// The parser stores options it doesn't recognize here. See above. - public var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - public var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() - fileprivate var _messageSetWireFormat: Bool? = nil - fileprivate var _noStandardDescriptorAccessor: Bool? = nil - fileprivate var _deprecated: Bool? = nil - fileprivate var _mapEntry: Bool? = nil - fileprivate var _deprecatedLegacyJsonFieldConflicts: Bool? = nil - fileprivate var _features: Google_Protobuf_FeatureSet? = nil -} - -public struct Google_Protobuf_FieldOptions: SwiftProtobuf.ExtensibleMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The ctype option instructs the C++ code generator to use a different - /// representation of the field than it normally would. See the specific - /// options below. This option is only implemented to support use of - /// [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - /// type "bytes" in the open source release -- sorry, we'll try to include - /// other types in a future version! - public var ctype: Google_Protobuf_FieldOptions.CType { - get {return _storage._ctype ?? .string} - set {_uniqueStorage()._ctype = newValue} - } - /// Returns true if `ctype` has been explicitly set. - public var hasCtype: Bool {return _storage._ctype != nil} - /// Clears the value of `ctype`. Subsequent reads from it will return its default value. - public mutating func clearCtype() {_uniqueStorage()._ctype = nil} - - /// The packed option can be enabled for repeated primitive fields to enable - /// a more efficient representation on the wire. Rather than repeatedly - /// writing the tag and type for each element, the entire array is encoded as - /// a single length-delimited blob. In proto3, only explicit setting it to - /// false will avoid using packed encoding. - public var packed: Bool { - get {return _storage._packed ?? false} - set {_uniqueStorage()._packed = newValue} - } - /// Returns true if `packed` has been explicitly set. - public var hasPacked: Bool {return _storage._packed != nil} - /// Clears the value of `packed`. Subsequent reads from it will return its default value. - public mutating func clearPacked() {_uniqueStorage()._packed = nil} - - /// The jstype option determines the JavaScript type used for values of the - /// field. The option is permitted only for 64 bit integral and fixed types - /// (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - /// is represented as JavaScript string, which avoids loss of precision that - /// can happen when a large value is converted to a floating point JavaScript. - /// Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - /// use the JavaScript "number" type. The behavior of the default option - /// JS_NORMAL is implementation dependent. - /// - /// This option is an enum to permit additional types to be added, e.g. - /// goog.math.Integer. - public var jstype: Google_Protobuf_FieldOptions.JSType { - get {return _storage._jstype ?? .jsNormal} - set {_uniqueStorage()._jstype = newValue} - } - /// Returns true if `jstype` has been explicitly set. - public var hasJstype: Bool {return _storage._jstype != nil} - /// Clears the value of `jstype`. Subsequent reads from it will return its default value. - public mutating func clearJstype() {_uniqueStorage()._jstype = nil} - - /// Should this field be parsed lazily? Lazy applies only to message-type - /// fields. It means that when the outer message is initially parsed, the - /// inner message's contents will not be parsed but instead stored in encoded - /// form. The inner message will actually be parsed when it is first accessed. - /// - /// This is only a hint. Implementations are free to choose whether to use - /// eager or lazy parsing regardless of the value of this option. However, - /// setting this option true suggests that the protocol author believes that - /// using lazy parsing on this field is worth the additional bookkeeping - /// overhead typically needed to implement it. - /// - /// This option does not affect the public interface of any generated code; - /// all method signatures remain the same. Furthermore, thread-safety of the - /// interface is not affected by this option; const methods remain safe to - /// call from multiple threads concurrently, while non-const methods continue - /// to require exclusive access. - /// - /// Note that implementations may choose not to check required fields within - /// a lazy sub-message. That is, calling IsInitialized() on the outer message - /// may return true even if the inner message has missing required fields. - /// This is necessary because otherwise the inner message would have to be - /// parsed in order to perform the check, defeating the purpose of lazy - /// parsing. An implementation which chooses not to check required fields - /// must be consistent about it. That is, for any particular sub-message, the - /// implementation must either *always* check its required fields, or *never* - /// check its required fields, regardless of whether or not the message has - /// been parsed. - /// - /// As of May 2022, lazy verifies the contents of the byte stream during - /// parsing. An invalid byte stream will cause the overall parsing to fail. - public var lazy: Bool { - get {return _storage._lazy ?? false} - set {_uniqueStorage()._lazy = newValue} - } - /// Returns true if `lazy` has been explicitly set. - public var hasLazy: Bool {return _storage._lazy != nil} - /// Clears the value of `lazy`. Subsequent reads from it will return its default value. - public mutating func clearLazy() {_uniqueStorage()._lazy = nil} - - /// unverified_lazy does no correctness checks on the byte stream. This should - /// only be used where lazy with verification is prohibitive for performance - /// reasons. - public var unverifiedLazy: Bool { - get {return _storage._unverifiedLazy ?? false} - set {_uniqueStorage()._unverifiedLazy = newValue} - } - /// Returns true if `unverifiedLazy` has been explicitly set. - public var hasUnverifiedLazy: Bool {return _storage._unverifiedLazy != nil} - /// Clears the value of `unverifiedLazy`. Subsequent reads from it will return its default value. - public mutating func clearUnverifiedLazy() {_uniqueStorage()._unverifiedLazy = nil} - - /// Is this field deprecated? - /// Depending on the target platform, this can emit Deprecated annotations - /// for accessors, or it will be completely ignored; in the very least, this - /// is a formalization for deprecating fields. - public var deprecated: Bool { - get {return _storage._deprecated ?? false} - set {_uniqueStorage()._deprecated = newValue} - } - /// Returns true if `deprecated` has been explicitly set. - public var hasDeprecated: Bool {return _storage._deprecated != nil} - /// Clears the value of `deprecated`. Subsequent reads from it will return its default value. - public mutating func clearDeprecated() {_uniqueStorage()._deprecated = nil} - - /// For Google-internal migration only. Do not use. - public var weak: Bool { - get {return _storage._weak ?? false} - set {_uniqueStorage()._weak = newValue} - } - /// Returns true if `weak` has been explicitly set. - public var hasWeak: Bool {return _storage._weak != nil} - /// Clears the value of `weak`. Subsequent reads from it will return its default value. - public mutating func clearWeak() {_uniqueStorage()._weak = nil} - - /// Indicate that the field value should not be printed out when using debug - /// formats, e.g. when the field contains sensitive credentials. - public var debugRedact: Bool { - get {return _storage._debugRedact ?? false} - set {_uniqueStorage()._debugRedact = newValue} - } - /// Returns true if `debugRedact` has been explicitly set. - public var hasDebugRedact: Bool {return _storage._debugRedact != nil} - /// Clears the value of `debugRedact`. Subsequent reads from it will return its default value. - public mutating func clearDebugRedact() {_uniqueStorage()._debugRedact = nil} - - public var retention: Google_Protobuf_FieldOptions.OptionRetention { - get {return _storage._retention ?? .retentionUnknown} - set {_uniqueStorage()._retention = newValue} - } - /// Returns true if `retention` has been explicitly set. - public var hasRetention: Bool {return _storage._retention != nil} - /// Clears the value of `retention`. Subsequent reads from it will return its default value. - public mutating func clearRetention() {_uniqueStorage()._retention = nil} - - public var targets: [Google_Protobuf_FieldOptions.OptionTargetType] { - get {return _storage._targets} - set {_uniqueStorage()._targets = newValue} - } - - public var editionDefaults: [Google_Protobuf_FieldOptions.EditionDefault] { - get {return _storage._editionDefaults} - set {_uniqueStorage()._editionDefaults = newValue} - } - - /// Any features defined in the specific edition. - public var features: Google_Protobuf_FeatureSet { - get {return _storage._features ?? Google_Protobuf_FeatureSet()} - set {_uniqueStorage()._features = newValue} - } - /// Returns true if `features` has been explicitly set. - public var hasFeatures: Bool {return _storage._features != nil} - /// Clears the value of `features`. Subsequent reads from it will return its default value. - public mutating func clearFeatures() {_uniqueStorage()._features = nil} - - /// The parser stores options it doesn't recognize here. See above. - public var uninterpretedOption: [Google_Protobuf_UninterpretedOption] { - get {return _storage._uninterpretedOption} - set {_uniqueStorage()._uninterpretedOption = newValue} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum CType: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Default mode. - case string // = 0 - - /// The option [ctype=CORD] may be applied to a non-repeated field of type - /// "bytes". It indicates that in C++, the data should be stored in a Cord - /// instead of a string. For very large strings, this may reduce memory - /// fragmentation. It may also allow better performance when parsing from a - /// Cord, or when parsing with aliasing enabled, as the parsed Cord may then - /// alias the original buffer. - case cord // = 1 - case stringPiece // = 2 - - public init() { - self = .string - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .string - case 1: self = .cord - case 2: self = .stringPiece - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .string: return 0 - case .cord: return 1 - case .stringPiece: return 2 - } - } - - } - - public enum JSType: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Use the default type. - case jsNormal // = 0 - - /// Use JavaScript strings. - case jsString // = 1 - - /// Use JavaScript numbers. - case jsNumber // = 2 - - public init() { - self = .jsNormal - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .jsNormal - case 1: self = .jsString - case 2: self = .jsNumber - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .jsNormal: return 0 - case .jsString: return 1 - case .jsNumber: return 2 - } - } - - } - - /// If set to RETENTION_SOURCE, the option will be omitted from the binary. - /// Note: as of January 2023, support for this is in progress and does not yet - /// have an effect (b/264593489). - public enum OptionRetention: SwiftProtobuf.Enum { - public typealias RawValue = Int - case retentionUnknown // = 0 - case retentionRuntime // = 1 - case retentionSource // = 2 - - public init() { - self = .retentionUnknown - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .retentionUnknown - case 1: self = .retentionRuntime - case 2: self = .retentionSource - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .retentionUnknown: return 0 - case .retentionRuntime: return 1 - case .retentionSource: return 2 - } - } - - } - - /// This indicates the types of entities that the field may apply to when used - /// as an option. If it is unset, then the field may be freely used as an - /// option on any kind of entity. Note: as of January 2023, support for this is - /// in progress and does not yet have an effect (b/264593489). - public enum OptionTargetType: SwiftProtobuf.Enum { - public typealias RawValue = Int - case targetTypeUnknown // = 0 - case targetTypeFile // = 1 - case targetTypeExtensionRange // = 2 - case targetTypeMessage // = 3 - case targetTypeField // = 4 - case targetTypeOneof // = 5 - case targetTypeEnum // = 6 - case targetTypeEnumEntry // = 7 - case targetTypeService // = 8 - case targetTypeMethod // = 9 - - public init() { - self = .targetTypeUnknown - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .targetTypeUnknown - case 1: self = .targetTypeFile - case 2: self = .targetTypeExtensionRange - case 3: self = .targetTypeMessage - case 4: self = .targetTypeField - case 5: self = .targetTypeOneof - case 6: self = .targetTypeEnum - case 7: self = .targetTypeEnumEntry - case 8: self = .targetTypeService - case 9: self = .targetTypeMethod - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .targetTypeUnknown: return 0 - case .targetTypeFile: return 1 - case .targetTypeExtensionRange: return 2 - case .targetTypeMessage: return 3 - case .targetTypeField: return 4 - case .targetTypeOneof: return 5 - case .targetTypeEnum: return 6 - case .targetTypeEnumEntry: return 7 - case .targetTypeService: return 8 - case .targetTypeMethod: return 9 - } - } - - } - - public struct EditionDefault { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// TODO(b/297898292) Deprecate and remove this field in favor of enums. - public var edition: String { - get {return _edition ?? String()} - set {_edition = newValue} - } - /// Returns true if `edition` has been explicitly set. - public var hasEdition: Bool {return self._edition != nil} - /// Clears the value of `edition`. Subsequent reads from it will return its default value. - public mutating func clearEdition() {self._edition = nil} - - public var editionEnum: Google_Protobuf_Edition { - get {return _editionEnum ?? .unknown} - set {_editionEnum = newValue} - } - /// Returns true if `editionEnum` has been explicitly set. - public var hasEditionEnum: Bool {return self._editionEnum != nil} - /// Clears the value of `editionEnum`. Subsequent reads from it will return its default value. - public mutating func clearEditionEnum() {self._editionEnum = nil} - - /// Textproto value. - public var value: String { - get {return _value ?? String()} - set {_value = newValue} - } - /// Returns true if `value` has been explicitly set. - public var hasValue: Bool {return self._value != nil} - /// Clears the value of `value`. Subsequent reads from it will return its default value. - public mutating func clearValue() {self._value = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _edition: String? = nil - fileprivate var _editionEnum: Google_Protobuf_Edition? = nil - fileprivate var _value: String? = nil - } - - public init() {} - - public var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() - fileprivate var _storage = _StorageClass.defaultInstance -} - -#if swift(>=4.2) - -extension Google_Protobuf_FieldOptions.CType: CaseIterable { - // Support synthesized by the compiler. -} - -extension Google_Protobuf_FieldOptions.JSType: CaseIterable { - // Support synthesized by the compiler. -} - -extension Google_Protobuf_FieldOptions.OptionRetention: CaseIterable { - // Support synthesized by the compiler. -} - -extension Google_Protobuf_FieldOptions.OptionTargetType: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -public struct Google_Protobuf_OneofOptions: SwiftProtobuf.ExtensibleMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Any features defined in the specific edition. - public var features: Google_Protobuf_FeatureSet { - get {return _features ?? Google_Protobuf_FeatureSet()} - set {_features = newValue} - } - /// Returns true if `features` has been explicitly set. - public var hasFeatures: Bool {return self._features != nil} - /// Clears the value of `features`. Subsequent reads from it will return its default value. - public mutating func clearFeatures() {self._features = nil} - - /// The parser stores options it doesn't recognize here. See above. - public var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - public var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() - fileprivate var _features: Google_Protobuf_FeatureSet? = nil -} - -public struct Google_Protobuf_EnumOptions: SwiftProtobuf.ExtensibleMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Set this option to true to allow mapping different tag names to the same - /// value. - public var allowAlias: Bool { - get {return _allowAlias ?? false} - set {_allowAlias = newValue} - } - /// Returns true if `allowAlias` has been explicitly set. - public var hasAllowAlias: Bool {return self._allowAlias != nil} - /// Clears the value of `allowAlias`. Subsequent reads from it will return its default value. - public mutating func clearAllowAlias() {self._allowAlias = nil} - - /// Is this enum deprecated? - /// Depending on the target platform, this can emit Deprecated annotations - /// for the enum, or it will be completely ignored; in the very least, this - /// is a formalization for deprecating enums. - public var deprecated: Bool { - get {return _deprecated ?? false} - set {_deprecated = newValue} - } - /// Returns true if `deprecated` has been explicitly set. - public var hasDeprecated: Bool {return self._deprecated != nil} - /// Clears the value of `deprecated`. Subsequent reads from it will return its default value. - public mutating func clearDeprecated() {self._deprecated = nil} - - /// Enable the legacy handling of JSON field name conflicts. This lowercases - /// and strips underscored from the fields before comparison in proto3 only. - /// The new behavior takes `json_name` into account and applies to proto2 as - /// well. - /// TODO(b/261750190) Remove this legacy behavior once downstream teams have - /// had time to migrate. - public var deprecatedLegacyJsonFieldConflicts: Bool { - get {return _deprecatedLegacyJsonFieldConflicts ?? false} - set {_deprecatedLegacyJsonFieldConflicts = newValue} - } - /// Returns true if `deprecatedLegacyJsonFieldConflicts` has been explicitly set. - public var hasDeprecatedLegacyJsonFieldConflicts: Bool {return self._deprecatedLegacyJsonFieldConflicts != nil} - /// Clears the value of `deprecatedLegacyJsonFieldConflicts`. Subsequent reads from it will return its default value. - public mutating func clearDeprecatedLegacyJsonFieldConflicts() {self._deprecatedLegacyJsonFieldConflicts = nil} - - /// Any features defined in the specific edition. - public var features: Google_Protobuf_FeatureSet { - get {return _features ?? Google_Protobuf_FeatureSet()} - set {_features = newValue} - } - /// Returns true if `features` has been explicitly set. - public var hasFeatures: Bool {return self._features != nil} - /// Clears the value of `features`. Subsequent reads from it will return its default value. - public mutating func clearFeatures() {self._features = nil} - - /// The parser stores options it doesn't recognize here. See above. - public var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - public var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() - fileprivate var _allowAlias: Bool? = nil - fileprivate var _deprecated: Bool? = nil - fileprivate var _deprecatedLegacyJsonFieldConflicts: Bool? = nil - fileprivate var _features: Google_Protobuf_FeatureSet? = nil -} - -public struct Google_Protobuf_EnumValueOptions: SwiftProtobuf.ExtensibleMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Is this enum value deprecated? - /// Depending on the target platform, this can emit Deprecated annotations - /// for the enum value, or it will be completely ignored; in the very least, - /// this is a formalization for deprecating enum values. - public var deprecated: Bool { - get {return _deprecated ?? false} - set {_deprecated = newValue} - } - /// Returns true if `deprecated` has been explicitly set. - public var hasDeprecated: Bool {return self._deprecated != nil} - /// Clears the value of `deprecated`. Subsequent reads from it will return its default value. - public mutating func clearDeprecated() {self._deprecated = nil} - - /// Any features defined in the specific edition. - public var features: Google_Protobuf_FeatureSet { - get {return _features ?? Google_Protobuf_FeatureSet()} - set {_features = newValue} - } - /// Returns true if `features` has been explicitly set. - public var hasFeatures: Bool {return self._features != nil} - /// Clears the value of `features`. Subsequent reads from it will return its default value. - public mutating func clearFeatures() {self._features = nil} - - /// Indicate that fields annotated with this enum value should not be printed - /// out when using debug formats, e.g. when the field contains sensitive - /// credentials. - public var debugRedact: Bool { - get {return _debugRedact ?? false} - set {_debugRedact = newValue} - } - /// Returns true if `debugRedact` has been explicitly set. - public var hasDebugRedact: Bool {return self._debugRedact != nil} - /// Clears the value of `debugRedact`. Subsequent reads from it will return its default value. - public mutating func clearDebugRedact() {self._debugRedact = nil} - - /// The parser stores options it doesn't recognize here. See above. - public var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - public var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() - fileprivate var _deprecated: Bool? = nil - fileprivate var _features: Google_Protobuf_FeatureSet? = nil - fileprivate var _debugRedact: Bool? = nil -} - -public struct Google_Protobuf_ServiceOptions: SwiftProtobuf.ExtensibleMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Any features defined in the specific edition. - public var features: Google_Protobuf_FeatureSet { - get {return _features ?? Google_Protobuf_FeatureSet()} - set {_features = newValue} - } - /// Returns true if `features` has been explicitly set. - public var hasFeatures: Bool {return self._features != nil} - /// Clears the value of `features`. Subsequent reads from it will return its default value. - public mutating func clearFeatures() {self._features = nil} - - /// Is this service deprecated? - /// Depending on the target platform, this can emit Deprecated annotations - /// for the service, or it will be completely ignored; in the very least, - /// this is a formalization for deprecating services. - public var deprecated: Bool { - get {return _deprecated ?? false} - set {_deprecated = newValue} - } - /// Returns true if `deprecated` has been explicitly set. - public var hasDeprecated: Bool {return self._deprecated != nil} - /// Clears the value of `deprecated`. Subsequent reads from it will return its default value. - public mutating func clearDeprecated() {self._deprecated = nil} - - /// The parser stores options it doesn't recognize here. See above. - public var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - public var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() - fileprivate var _features: Google_Protobuf_FeatureSet? = nil - fileprivate var _deprecated: Bool? = nil -} - -public struct Google_Protobuf_MethodOptions: SwiftProtobuf.ExtensibleMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Is this method deprecated? - /// Depending on the target platform, this can emit Deprecated annotations - /// for the method, or it will be completely ignored; in the very least, - /// this is a formalization for deprecating methods. - public var deprecated: Bool { - get {return _deprecated ?? false} - set {_deprecated = newValue} - } - /// Returns true if `deprecated` has been explicitly set. - public var hasDeprecated: Bool {return self._deprecated != nil} - /// Clears the value of `deprecated`. Subsequent reads from it will return its default value. - public mutating func clearDeprecated() {self._deprecated = nil} - - public var idempotencyLevel: Google_Protobuf_MethodOptions.IdempotencyLevel { - get {return _idempotencyLevel ?? .idempotencyUnknown} - set {_idempotencyLevel = newValue} - } - /// Returns true if `idempotencyLevel` has been explicitly set. - public var hasIdempotencyLevel: Bool {return self._idempotencyLevel != nil} - /// Clears the value of `idempotencyLevel`. Subsequent reads from it will return its default value. - public mutating func clearIdempotencyLevel() {self._idempotencyLevel = nil} - - /// Any features defined in the specific edition. - public var features: Google_Protobuf_FeatureSet { - get {return _features ?? Google_Protobuf_FeatureSet()} - set {_features = newValue} - } - /// Returns true if `features` has been explicitly set. - public var hasFeatures: Bool {return self._features != nil} - /// Clears the value of `features`. Subsequent reads from it will return its default value. - public mutating func clearFeatures() {self._features = nil} - - /// The parser stores options it doesn't recognize here. See above. - public var uninterpretedOption: [Google_Protobuf_UninterpretedOption] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - /// or neither? HTTP based RPC implementation may choose GET verb for safe - /// methods, and PUT verb for idempotent methods instead of the default POST. - public enum IdempotencyLevel: SwiftProtobuf.Enum { - public typealias RawValue = Int - case idempotencyUnknown // = 0 - - /// implies idempotent - case noSideEffects // = 1 - - /// idempotent, but may have side effects - case idempotent // = 2 - - public init() { - self = .idempotencyUnknown - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .idempotencyUnknown - case 1: self = .noSideEffects - case 2: self = .idempotent - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .idempotencyUnknown: return 0 - case .noSideEffects: return 1 - case .idempotent: return 2 - } - } - - } - - public init() {} - - public var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() - fileprivate var _deprecated: Bool? = nil - fileprivate var _idempotencyLevel: Google_Protobuf_MethodOptions.IdempotencyLevel? = nil - fileprivate var _features: Google_Protobuf_FeatureSet? = nil -} - -#if swift(>=4.2) - -extension Google_Protobuf_MethodOptions.IdempotencyLevel: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -/// A message representing a option the parser does not recognize. This only -/// appears in options protos created by the compiler::Parser class. -/// DescriptorPool resolves these when building Descriptor objects. Therefore, -/// options protos in descriptor objects (e.g. returned by Descriptor::options(), -/// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions -/// in them. -public struct Google_Protobuf_UninterpretedOption { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var name: [Google_Protobuf_UninterpretedOption.NamePart] = [] - - /// The value of the uninterpreted option, in whatever type the tokenizer - /// identified it as during parsing. Exactly one of these should be set. - public var identifierValue: String { - get {return _identifierValue ?? String()} - set {_identifierValue = newValue} - } - /// Returns true if `identifierValue` has been explicitly set. - public var hasIdentifierValue: Bool {return self._identifierValue != nil} - /// Clears the value of `identifierValue`. Subsequent reads from it will return its default value. - public mutating func clearIdentifierValue() {self._identifierValue = nil} - - public var positiveIntValue: UInt64 { - get {return _positiveIntValue ?? 0} - set {_positiveIntValue = newValue} - } - /// Returns true if `positiveIntValue` has been explicitly set. - public var hasPositiveIntValue: Bool {return self._positiveIntValue != nil} - /// Clears the value of `positiveIntValue`. Subsequent reads from it will return its default value. - public mutating func clearPositiveIntValue() {self._positiveIntValue = nil} - - public var negativeIntValue: Int64 { - get {return _negativeIntValue ?? 0} - set {_negativeIntValue = newValue} - } - /// Returns true if `negativeIntValue` has been explicitly set. - public var hasNegativeIntValue: Bool {return self._negativeIntValue != nil} - /// Clears the value of `negativeIntValue`. Subsequent reads from it will return its default value. - public mutating func clearNegativeIntValue() {self._negativeIntValue = nil} - - public var doubleValue: Double { - get {return _doubleValue ?? 0} - set {_doubleValue = newValue} - } - /// Returns true if `doubleValue` has been explicitly set. - public var hasDoubleValue: Bool {return self._doubleValue != nil} - /// Clears the value of `doubleValue`. Subsequent reads from it will return its default value. - public mutating func clearDoubleValue() {self._doubleValue = nil} - - public var stringValue: Data { - get {return _stringValue ?? Data()} - set {_stringValue = newValue} - } - /// Returns true if `stringValue` has been explicitly set. - public var hasStringValue: Bool {return self._stringValue != nil} - /// Clears the value of `stringValue`. Subsequent reads from it will return its default value. - public mutating func clearStringValue() {self._stringValue = nil} - - public var aggregateValue: String { - get {return _aggregateValue ?? String()} - set {_aggregateValue = newValue} - } - /// Returns true if `aggregateValue` has been explicitly set. - public var hasAggregateValue: Bool {return self._aggregateValue != nil} - /// Clears the value of `aggregateValue`. Subsequent reads from it will return its default value. - public mutating func clearAggregateValue() {self._aggregateValue = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// The name of the uninterpreted option. Each string represents a segment in - /// a dot-separated name. is_extension is true iff a segment represents an - /// extension (denoted with parentheses in options specs in .proto files). - /// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents - /// "foo.(bar.baz).moo". - public struct NamePart { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var namePart: String { - get {return _namePart ?? String()} - set {_namePart = newValue} - } - /// Returns true if `namePart` has been explicitly set. - public var hasNamePart: Bool {return self._namePart != nil} - /// Clears the value of `namePart`. Subsequent reads from it will return its default value. - public mutating func clearNamePart() {self._namePart = nil} - - public var isExtension: Bool { - get {return _isExtension ?? false} - set {_isExtension = newValue} - } - /// Returns true if `isExtension` has been explicitly set. - public var hasIsExtension: Bool {return self._isExtension != nil} - /// Clears the value of `isExtension`. Subsequent reads from it will return its default value. - public mutating func clearIsExtension() {self._isExtension = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _namePart: String? = nil - fileprivate var _isExtension: Bool? = nil - } - - public init() {} - - fileprivate var _identifierValue: String? = nil - fileprivate var _positiveIntValue: UInt64? = nil - fileprivate var _negativeIntValue: Int64? = nil - fileprivate var _doubleValue: Double? = nil - fileprivate var _stringValue: Data? = nil - fileprivate var _aggregateValue: String? = nil -} - -/// TODO(b/274655146) Enums in C++ gencode (and potentially other languages) are -/// not well scoped. This means that each of the feature enums below can clash -/// with each other. The short names we've chosen maximize call-site -/// readability, but leave us very open to this scenario. A future feature will -/// be designed and implemented to handle this, hopefully before we ever hit a -/// conflict here. -public struct Google_Protobuf_FeatureSet: SwiftProtobuf.ExtensibleMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var fieldPresence: Google_Protobuf_FeatureSet.FieldPresence { - get {return _fieldPresence ?? .unknown} - set {_fieldPresence = newValue} - } - /// Returns true if `fieldPresence` has been explicitly set. - public var hasFieldPresence: Bool {return self._fieldPresence != nil} - /// Clears the value of `fieldPresence`. Subsequent reads from it will return its default value. - public mutating func clearFieldPresence() {self._fieldPresence = nil} - - public var enumType: Google_Protobuf_FeatureSet.EnumType { - get {return _enumType ?? .unknown} - set {_enumType = newValue} - } - /// Returns true if `enumType` has been explicitly set. - public var hasEnumType: Bool {return self._enumType != nil} - /// Clears the value of `enumType`. Subsequent reads from it will return its default value. - public mutating func clearEnumType() {self._enumType = nil} - - public var repeatedFieldEncoding: Google_Protobuf_FeatureSet.RepeatedFieldEncoding { - get {return _repeatedFieldEncoding ?? .unknown} - set {_repeatedFieldEncoding = newValue} - } - /// Returns true if `repeatedFieldEncoding` has been explicitly set. - public var hasRepeatedFieldEncoding: Bool {return self._repeatedFieldEncoding != nil} - /// Clears the value of `repeatedFieldEncoding`. Subsequent reads from it will return its default value. - public mutating func clearRepeatedFieldEncoding() {self._repeatedFieldEncoding = nil} - - public var messageEncoding: Google_Protobuf_FeatureSet.MessageEncoding { - get {return _messageEncoding ?? .unknown} - set {_messageEncoding = newValue} - } - /// Returns true if `messageEncoding` has been explicitly set. - public var hasMessageEncoding: Bool {return self._messageEncoding != nil} - /// Clears the value of `messageEncoding`. Subsequent reads from it will return its default value. - public mutating func clearMessageEncoding() {self._messageEncoding = nil} - - public var jsonFormat: Google_Protobuf_FeatureSet.JsonFormat { - get {return _jsonFormat ?? .unknown} - set {_jsonFormat = newValue} - } - /// Returns true if `jsonFormat` has been explicitly set. - public var hasJsonFormat: Bool {return self._jsonFormat != nil} - /// Clears the value of `jsonFormat`. Subsequent reads from it will return its default value. - public mutating func clearJsonFormat() {self._jsonFormat = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum FieldPresence: SwiftProtobuf.Enum { - public typealias RawValue = Int - case unknown // = 0 - case explicit // = 1 - case implicit // = 2 - case legacyRequired // = 3 - - public init() { - self = .unknown - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .explicit - case 2: self = .implicit - case 3: self = .legacyRequired - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .unknown: return 0 - case .explicit: return 1 - case .implicit: return 2 - case .legacyRequired: return 3 - } - } - - } - - public enum EnumType: SwiftProtobuf.Enum { - public typealias RawValue = Int - case unknown // = 0 - case `open` // = 1 - case closed // = 2 - - public init() { - self = .unknown - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .open - case 2: self = .closed - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .unknown: return 0 - case .open: return 1 - case .closed: return 2 - } - } - - } - - public enum RepeatedFieldEncoding: SwiftProtobuf.Enum { - public typealias RawValue = Int - case unknown // = 0 - case packed // = 1 - case expanded // = 2 - - public init() { - self = .unknown - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .packed - case 2: self = .expanded - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .unknown: return 0 - case .packed: return 1 - case .expanded: return 2 - } - } - - } - - public enum MessageEncoding: SwiftProtobuf.Enum { - public typealias RawValue = Int - case unknown // = 0 - case lengthPrefixed // = 1 - case delimited // = 2 - - public init() { - self = .unknown - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .lengthPrefixed - case 2: self = .delimited - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .unknown: return 0 - case .lengthPrefixed: return 1 - case .delimited: return 2 - } - } - - } - - public enum JsonFormat: SwiftProtobuf.Enum { - public typealias RawValue = Int - case unknown // = 0 - case allow // = 1 - case legacyBestEffort // = 2 - - public init() { - self = .unknown - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .allow - case 2: self = .legacyBestEffort - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .unknown: return 0 - case .allow: return 1 - case .legacyBestEffort: return 2 - } - } - - } - - public init() {} - - public var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() - fileprivate var _fieldPresence: Google_Protobuf_FeatureSet.FieldPresence? = nil - fileprivate var _enumType: Google_Protobuf_FeatureSet.EnumType? = nil - fileprivate var _repeatedFieldEncoding: Google_Protobuf_FeatureSet.RepeatedFieldEncoding? = nil - fileprivate var _messageEncoding: Google_Protobuf_FeatureSet.MessageEncoding? = nil - fileprivate var _jsonFormat: Google_Protobuf_FeatureSet.JsonFormat? = nil -} - -#if swift(>=4.2) - -extension Google_Protobuf_FeatureSet.FieldPresence: CaseIterable { - // Support synthesized by the compiler. -} - -extension Google_Protobuf_FeatureSet.EnumType: CaseIterable { - // Support synthesized by the compiler. -} - -extension Google_Protobuf_FeatureSet.RepeatedFieldEncoding: CaseIterable { - // Support synthesized by the compiler. -} - -extension Google_Protobuf_FeatureSet.MessageEncoding: CaseIterable { - // Support synthesized by the compiler. -} - -extension Google_Protobuf_FeatureSet.JsonFormat: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -/// A compiled specification for the defaults of a set of features. These -/// messages are generated from FeatureSet extensions and can be used to seed -/// feature resolution. The resolution with this object becomes a simple search -/// for the closest matching edition, followed by proto merges. -public struct Google_Protobuf_FeatureSetDefaults { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var defaults: [Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault] = [] - - /// TODO(b/297898292) Deprecate and remove these fields in favor of enums. - public var minimumEdition: String { - get {return _minimumEdition ?? String()} - set {_minimumEdition = newValue} - } - /// Returns true if `minimumEdition` has been explicitly set. - public var hasMinimumEdition: Bool {return self._minimumEdition != nil} - /// Clears the value of `minimumEdition`. Subsequent reads from it will return its default value. - public mutating func clearMinimumEdition() {self._minimumEdition = nil} - - public var maximumEdition: String { - get {return _maximumEdition ?? String()} - set {_maximumEdition = newValue} - } - /// Returns true if `maximumEdition` has been explicitly set. - public var hasMaximumEdition: Bool {return self._maximumEdition != nil} - /// Clears the value of `maximumEdition`. Subsequent reads from it will return its default value. - public mutating func clearMaximumEdition() {self._maximumEdition = nil} - - /// The minimum supported edition (inclusive) when this was constructed. - /// Editions before this will not have defaults. - public var minimumEditionEnum: Google_Protobuf_Edition { - get {return _minimumEditionEnum ?? .unknown} - set {_minimumEditionEnum = newValue} - } - /// Returns true if `minimumEditionEnum` has been explicitly set. - public var hasMinimumEditionEnum: Bool {return self._minimumEditionEnum != nil} - /// Clears the value of `minimumEditionEnum`. Subsequent reads from it will return its default value. - public mutating func clearMinimumEditionEnum() {self._minimumEditionEnum = nil} - - /// The maximum known edition (inclusive) when this was constructed. Editions - /// after this will not have reliable defaults. - public var maximumEditionEnum: Google_Protobuf_Edition { - get {return _maximumEditionEnum ?? .unknown} - set {_maximumEditionEnum = newValue} - } - /// Returns true if `maximumEditionEnum` has been explicitly set. - public var hasMaximumEditionEnum: Bool {return self._maximumEditionEnum != nil} - /// Clears the value of `maximumEditionEnum`. Subsequent reads from it will return its default value. - public mutating func clearMaximumEditionEnum() {self._maximumEditionEnum = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// A map from every known edition with a unique set of defaults to its - /// defaults. Not all editions may be contained here. For a given edition, - /// the defaults at the closest matching edition ordered at or before it should - /// be used. This field must be in strict ascending order by edition. - public struct FeatureSetEditionDefault { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// TODO(b/297898292) Deprecate and remove this field in favor of enums. - public var edition: String { - get {return _edition ?? String()} - set {_edition = newValue} - } - /// Returns true if `edition` has been explicitly set. - public var hasEdition: Bool {return self._edition != nil} - /// Clears the value of `edition`. Subsequent reads from it will return its default value. - public mutating func clearEdition() {self._edition = nil} - - public var editionEnum: Google_Protobuf_Edition { - get {return _editionEnum ?? .unknown} - set {_editionEnum = newValue} - } - /// Returns true if `editionEnum` has been explicitly set. - public var hasEditionEnum: Bool {return self._editionEnum != nil} - /// Clears the value of `editionEnum`. Subsequent reads from it will return its default value. - public mutating func clearEditionEnum() {self._editionEnum = nil} - - public var features: Google_Protobuf_FeatureSet { - get {return _features ?? Google_Protobuf_FeatureSet()} - set {_features = newValue} - } - /// Returns true if `features` has been explicitly set. - public var hasFeatures: Bool {return self._features != nil} - /// Clears the value of `features`. Subsequent reads from it will return its default value. - public mutating func clearFeatures() {self._features = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _edition: String? = nil - fileprivate var _editionEnum: Google_Protobuf_Edition? = nil - fileprivate var _features: Google_Protobuf_FeatureSet? = nil - } - - public init() {} - - fileprivate var _minimumEdition: String? = nil - fileprivate var _maximumEdition: String? = nil - fileprivate var _minimumEditionEnum: Google_Protobuf_Edition? = nil - fileprivate var _maximumEditionEnum: Google_Protobuf_Edition? = nil -} - -/// Encapsulates information about the original source file from which a -/// FileDescriptorProto was generated. -public struct Google_Protobuf_SourceCodeInfo { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// A Location identifies a piece of source code in a .proto file which - /// corresponds to a particular definition. This information is intended - /// to be useful to IDEs, code indexers, documentation generators, and similar - /// tools. - /// - /// For example, say we have a file like: - /// message Foo { - /// optional string foo = 1; - /// } - /// Let's look at just the field definition: - /// optional string foo = 1; - /// ^ ^^ ^^ ^ ^^^ - /// a bc de f ghi - /// We have the following locations: - /// span path represents - /// [a,i) [ 4, 0, 2, 0 ] The whole field definition. - /// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - /// [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - /// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - /// [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - /// - /// Notes: - /// - A location may refer to a repeated field itself (i.e. not to any - /// particular index within it). This is used whenever a set of elements are - /// logically enclosed in a single code segment. For example, an entire - /// extend block (possibly containing multiple extension definitions) will - /// have an outer location whose path refers to the "extensions" repeated - /// field without an index. - /// - Multiple locations may have the same path. This happens when a single - /// logical declaration is spread out across multiple places. The most - /// obvious example is the "extend" block again -- there may be multiple - /// extend blocks in the same scope, each of which will have the same path. - /// - A location's span is not always a subset of its parent's span. For - /// example, the "extendee" of an extension declaration appears at the - /// beginning of the "extend" block and is shared by all extensions within - /// the block. - /// - Just because a location's span is a subset of some other location's span - /// does not mean that it is a descendant. For example, a "group" defines - /// both a type and a field in a single declaration. Thus, the locations - /// corresponding to the type and field and their components will overlap. - /// - Code which tries to interpret locations should probably be designed to - /// ignore those that it doesn't understand, as more types of locations could - /// be recorded in the future. - public var location: [Google_Protobuf_SourceCodeInfo.Location] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public struct Location { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Identifies which part of the FileDescriptorProto was defined at this - /// location. - /// - /// Each element is a field number or an index. They form a path from - /// the root FileDescriptorProto to the place where the definition occurs. - /// For example, this path: - /// [ 4, 3, 2, 7, 1 ] - /// refers to: - /// file.message_type(3) // 4, 3 - /// .field(7) // 2, 7 - /// .name() // 1 - /// This is because FileDescriptorProto.message_type has field number 4: - /// repeated DescriptorProto message_type = 4; - /// and DescriptorProto.field has field number 2: - /// repeated FieldDescriptorProto field = 2; - /// and FieldDescriptorProto.name has field number 1: - /// optional string name = 1; - /// - /// Thus, the above path gives the location of a field name. If we removed - /// the last element: - /// [ 4, 3, 2, 7 ] - /// this path refers to the whole field declaration (from the beginning - /// of the label to the terminating semicolon). - public var path: [Int32] = [] - - /// Always has exactly three or four elements: start line, start column, - /// end line (optional, otherwise assumed same as start line), end column. - /// These are packed into a single field for efficiency. Note that line - /// and column numbers are zero-based -- typically you will want to add - /// 1 to each before displaying to a user. - public var span: [Int32] = [] - - /// If this SourceCodeInfo represents a complete declaration, these are any - /// comments appearing before and after the declaration which appear to be - /// attached to the declaration. - /// - /// A series of line comments appearing on consecutive lines, with no other - /// tokens appearing on those lines, will be treated as a single comment. - /// - /// leading_detached_comments will keep paragraphs of comments that appear - /// before (but not connected to) the current element. Each paragraph, - /// separated by empty lines, will be one comment element in the repeated - /// field. - /// - /// Only the comment content is provided; comment markers (e.g. //) are - /// stripped out. For block comments, leading whitespace and an asterisk - /// will be stripped from the beginning of each line other than the first. - /// Newlines are included in the output. - /// - /// Examples: - /// - /// optional int32 foo = 1; // Comment attached to foo. - /// // Comment attached to bar. - /// optional int32 bar = 2; - /// - /// optional string baz = 3; - /// // Comment attached to baz. - /// // Another line attached to baz. - /// - /// // Comment attached to moo. - /// // - /// // Another line attached to moo. - /// optional double moo = 4; - /// - /// // Detached comment for corge. This is not leading or trailing comments - /// // to moo or corge because there are blank lines separating it from - /// // both. - /// - /// // Detached comment for corge paragraph 2. - /// - /// optional string corge = 5; - /// /* Block comment attached - /// * to corge. Leading asterisks - /// * will be removed. */ - /// /* Block comment attached to - /// * grault. */ - /// optional int32 grault = 6; - /// - /// // ignored detached comments. - public var leadingComments: String { - get {return _leadingComments ?? String()} - set {_leadingComments = newValue} - } - /// Returns true if `leadingComments` has been explicitly set. - public var hasLeadingComments: Bool {return self._leadingComments != nil} - /// Clears the value of `leadingComments`. Subsequent reads from it will return its default value. - public mutating func clearLeadingComments() {self._leadingComments = nil} - - public var trailingComments: String { - get {return _trailingComments ?? String()} - set {_trailingComments = newValue} - } - /// Returns true if `trailingComments` has been explicitly set. - public var hasTrailingComments: Bool {return self._trailingComments != nil} - /// Clears the value of `trailingComments`. Subsequent reads from it will return its default value. - public mutating func clearTrailingComments() {self._trailingComments = nil} - - public var leadingDetachedComments: [String] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _leadingComments: String? = nil - fileprivate var _trailingComments: String? = nil - } - - public init() {} -} - -/// Describes the relationship between generated code and its original source -/// file. A GeneratedCodeInfo message is associated with only one generated -/// source file, but may contain references to different source .proto files. -public struct Google_Protobuf_GeneratedCodeInfo { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// An Annotation connects some span of text in generated code to an element - /// of its generating .proto file. - public var annotation: [Google_Protobuf_GeneratedCodeInfo.Annotation] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public struct Annotation { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Identifies the element in the original source .proto file. This field - /// is formatted the same as SourceCodeInfo.Location.path. - public var path: [Int32] = [] - - /// Identifies the filesystem path to the original source .proto. - public var sourceFile: String { - get {return _sourceFile ?? String()} - set {_sourceFile = newValue} - } - /// Returns true if `sourceFile` has been explicitly set. - public var hasSourceFile: Bool {return self._sourceFile != nil} - /// Clears the value of `sourceFile`. Subsequent reads from it will return its default value. - public mutating func clearSourceFile() {self._sourceFile = nil} - - /// Identifies the starting offset in bytes in the generated code - /// that relates to the identified object. - public var begin: Int32 { - get {return _begin ?? 0} - set {_begin = newValue} - } - /// Returns true if `begin` has been explicitly set. - public var hasBegin: Bool {return self._begin != nil} - /// Clears the value of `begin`. Subsequent reads from it will return its default value. - public mutating func clearBegin() {self._begin = nil} - - /// Identifies the ending offset in bytes in the generated code that - /// relates to the identified object. The end offset should be one past - /// the last relevant byte (so the length of the text = end - begin). - public var end: Int32 { - get {return _end ?? 0} - set {_end = newValue} - } - /// Returns true if `end` has been explicitly set. - public var hasEnd: Bool {return self._end != nil} - /// Clears the value of `end`. Subsequent reads from it will return its default value. - public mutating func clearEnd() {self._end = nil} - - public var semantic: Google_Protobuf_GeneratedCodeInfo.Annotation.Semantic { - get {return _semantic ?? .none} - set {_semantic = newValue} - } - /// Returns true if `semantic` has been explicitly set. - public var hasSemantic: Bool {return self._semantic != nil} - /// Clears the value of `semantic`. Subsequent reads from it will return its default value. - public mutating func clearSemantic() {self._semantic = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Represents the identified object's effect on the element in the original - /// .proto file. - public enum Semantic: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// There is no effect or the effect is indescribable. - case none // = 0 - - /// The element is set or otherwise mutated. - case set // = 1 - - /// An alias to the element is returned. - case alias // = 2 - - public init() { - self = .none - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .none - case 1: self = .set - case 2: self = .alias - default: return nil - } - } - - public var rawValue: Int { - switch self { - case .none: return 0 - case .set: return 1 - case .alias: return 2 - } - } - - } - - public init() {} - - fileprivate var _sourceFile: String? = nil - fileprivate var _begin: Int32? = nil - fileprivate var _end: Int32? = nil - fileprivate var _semantic: Google_Protobuf_GeneratedCodeInfo.Annotation.Semantic? = nil - } - - public init() {} -} - -#if swift(>=4.2) - -extension Google_Protobuf_GeneratedCodeInfo.Annotation.Semantic: CaseIterable { - // Support synthesized by the compiler. -} - -#endif // swift(>=4.2) - -#if swift(>=5.5) && canImport(_Concurrency) -extension Google_Protobuf_Edition: @unchecked Sendable {} -extension Google_Protobuf_FileDescriptorSet: @unchecked Sendable {} -extension Google_Protobuf_FileDescriptorProto: @unchecked Sendable {} -extension Google_Protobuf_DescriptorProto: @unchecked Sendable {} -extension Google_Protobuf_DescriptorProto.ExtensionRange: @unchecked Sendable {} -extension Google_Protobuf_DescriptorProto.ReservedRange: @unchecked Sendable {} -extension Google_Protobuf_ExtensionRangeOptions: @unchecked Sendable {} -extension Google_Protobuf_ExtensionRangeOptions.VerificationState: @unchecked Sendable {} -extension Google_Protobuf_ExtensionRangeOptions.Declaration: @unchecked Sendable {} -extension Google_Protobuf_FieldDescriptorProto: @unchecked Sendable {} -extension Google_Protobuf_FieldDescriptorProto.TypeEnum: @unchecked Sendable {} -extension Google_Protobuf_FieldDescriptorProto.Label: @unchecked Sendable {} -extension Google_Protobuf_OneofDescriptorProto: @unchecked Sendable {} -extension Google_Protobuf_EnumDescriptorProto: @unchecked Sendable {} -extension Google_Protobuf_EnumDescriptorProto.EnumReservedRange: @unchecked Sendable {} -extension Google_Protobuf_EnumValueDescriptorProto: @unchecked Sendable {} -extension Google_Protobuf_ServiceDescriptorProto: @unchecked Sendable {} -extension Google_Protobuf_MethodDescriptorProto: @unchecked Sendable {} -extension Google_Protobuf_FileOptions: @unchecked Sendable {} -extension Google_Protobuf_FileOptions.OptimizeMode: @unchecked Sendable {} -extension Google_Protobuf_MessageOptions: @unchecked Sendable {} -extension Google_Protobuf_FieldOptions: @unchecked Sendable {} -extension Google_Protobuf_FieldOptions.CType: @unchecked Sendable {} -extension Google_Protobuf_FieldOptions.JSType: @unchecked Sendable {} -extension Google_Protobuf_FieldOptions.OptionRetention: @unchecked Sendable {} -extension Google_Protobuf_FieldOptions.OptionTargetType: @unchecked Sendable {} -extension Google_Protobuf_FieldOptions.EditionDefault: @unchecked Sendable {} -extension Google_Protobuf_OneofOptions: @unchecked Sendable {} -extension Google_Protobuf_EnumOptions: @unchecked Sendable {} -extension Google_Protobuf_EnumValueOptions: @unchecked Sendable {} -extension Google_Protobuf_ServiceOptions: @unchecked Sendable {} -extension Google_Protobuf_MethodOptions: @unchecked Sendable {} -extension Google_Protobuf_MethodOptions.IdempotencyLevel: @unchecked Sendable {} -extension Google_Protobuf_UninterpretedOption: @unchecked Sendable {} -extension Google_Protobuf_UninterpretedOption.NamePart: @unchecked Sendable {} -extension Google_Protobuf_FeatureSet: @unchecked Sendable {} -extension Google_Protobuf_FeatureSet.FieldPresence: @unchecked Sendable {} -extension Google_Protobuf_FeatureSet.EnumType: @unchecked Sendable {} -extension Google_Protobuf_FeatureSet.RepeatedFieldEncoding: @unchecked Sendable {} -extension Google_Protobuf_FeatureSet.MessageEncoding: @unchecked Sendable {} -extension Google_Protobuf_FeatureSet.JsonFormat: @unchecked Sendable {} -extension Google_Protobuf_FeatureSetDefaults: @unchecked Sendable {} -extension Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault: @unchecked Sendable {} -extension Google_Protobuf_SourceCodeInfo: @unchecked Sendable {} -extension Google_Protobuf_SourceCodeInfo.Location: @unchecked Sendable {} -extension Google_Protobuf_GeneratedCodeInfo: @unchecked Sendable {} -extension Google_Protobuf_GeneratedCodeInfo.Annotation: @unchecked Sendable {} -extension Google_Protobuf_GeneratedCodeInfo.Annotation.Semantic: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "google.protobuf" - -extension Google_Protobuf_Edition: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "EDITION_UNKNOWN"), - 1: .same(proto: "EDITION_1_TEST_ONLY"), - 2: .same(proto: "EDITION_2_TEST_ONLY"), - 1000: .same(proto: "EDITION_2023"), - 99997: .same(proto: "EDITION_99997_TEST_ONLY"), - 99998: .same(proto: "EDITION_99998_TEST_ONLY"), - 99999: .same(proto: "EDITION_99999_TEST_ONLY"), - ] -} - -extension Google_Protobuf_FileDescriptorSet: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FileDescriptorSet" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "file"), - ] - - public var isInitialized: Bool { - if !SwiftProtobuf.Internal.areAllInitialized(self.file) {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.file) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.file.isEmpty { - try visitor.visitRepeatedMessageField(value: self.file, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_FileDescriptorSet, rhs: Google_Protobuf_FileDescriptorSet) -> Bool { - if lhs.file != rhs.file {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_FileDescriptorProto: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FileDescriptorProto" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "package"), - 3: .same(proto: "dependency"), - 10: .standard(proto: "public_dependency"), - 11: .standard(proto: "weak_dependency"), - 4: .standard(proto: "message_type"), - 5: .standard(proto: "enum_type"), - 6: .same(proto: "service"), - 7: .same(proto: "extension"), - 8: .same(proto: "options"), - 9: .standard(proto: "source_code_info"), - 12: .same(proto: "syntax"), - 13: .same(proto: "edition"), - 14: .standard(proto: "edition_enum"), - ] - - public var isInitialized: Bool { - if !SwiftProtobuf.Internal.areAllInitialized(self.messageType) {return false} - if !SwiftProtobuf.Internal.areAllInitialized(self.enumType) {return false} - if !SwiftProtobuf.Internal.areAllInitialized(self.service) {return false} - if !SwiftProtobuf.Internal.areAllInitialized(self.`extension`) {return false} - if let v = self._options, !v.isInitialized {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self._name) }() - case 2: try { try decoder.decodeSingularStringField(value: &self._package) }() - case 3: try { try decoder.decodeRepeatedStringField(value: &self.dependency) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.messageType) }() - case 5: try { try decoder.decodeRepeatedMessageField(value: &self.enumType) }() - case 6: try { try decoder.decodeRepeatedMessageField(value: &self.service) }() - case 7: try { try decoder.decodeRepeatedMessageField(value: &self.`extension`) }() - case 8: try { try decoder.decodeSingularMessageField(value: &self._options) }() - case 9: try { try decoder.decodeSingularMessageField(value: &self._sourceCodeInfo) }() - case 10: try { try decoder.decodeRepeatedInt32Field(value: &self.publicDependency) }() - case 11: try { try decoder.decodeRepeatedInt32Field(value: &self.weakDependency) }() - case 12: try { try decoder.decodeSingularStringField(value: &self._syntax) }() - case 13: try { try decoder.decodeSingularStringField(value: &self._edition) }() - case 14: try { try decoder.decodeSingularEnumField(value: &self._editionEnum) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._name { - try visitor.visitSingularStringField(value: v, fieldNumber: 1) - } }() - try { if let v = self._package { - try visitor.visitSingularStringField(value: v, fieldNumber: 2) - } }() - if !self.dependency.isEmpty { - try visitor.visitRepeatedStringField(value: self.dependency, fieldNumber: 3) - } - if !self.messageType.isEmpty { - try visitor.visitRepeatedMessageField(value: self.messageType, fieldNumber: 4) - } - if !self.enumType.isEmpty { - try visitor.visitRepeatedMessageField(value: self.enumType, fieldNumber: 5) - } - if !self.service.isEmpty { - try visitor.visitRepeatedMessageField(value: self.service, fieldNumber: 6) - } - if !self.`extension`.isEmpty { - try visitor.visitRepeatedMessageField(value: self.`extension`, fieldNumber: 7) - } - try { if let v = self._options { - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - } }() - try { if let v = self._sourceCodeInfo { - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - } }() - if !self.publicDependency.isEmpty { - try visitor.visitRepeatedInt32Field(value: self.publicDependency, fieldNumber: 10) - } - if !self.weakDependency.isEmpty { - try visitor.visitRepeatedInt32Field(value: self.weakDependency, fieldNumber: 11) - } - try { if let v = self._syntax { - try visitor.visitSingularStringField(value: v, fieldNumber: 12) - } }() - try { if let v = self._edition { - try visitor.visitSingularStringField(value: v, fieldNumber: 13) - } }() - try { if let v = self._editionEnum { - try visitor.visitSingularEnumField(value: v, fieldNumber: 14) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_FileDescriptorProto, rhs: Google_Protobuf_FileDescriptorProto) -> Bool { - if lhs._name != rhs._name {return false} - if lhs._package != rhs._package {return false} - if lhs.dependency != rhs.dependency {return false} - if lhs.publicDependency != rhs.publicDependency {return false} - if lhs.weakDependency != rhs.weakDependency {return false} - if lhs.messageType != rhs.messageType {return false} - if lhs.enumType != rhs.enumType {return false} - if lhs.service != rhs.service {return false} - if lhs.`extension` != rhs.`extension` {return false} - if lhs._options != rhs._options {return false} - if lhs._sourceCodeInfo != rhs._sourceCodeInfo {return false} - if lhs._syntax != rhs._syntax {return false} - if lhs._edition != rhs._edition {return false} - if lhs._editionEnum != rhs._editionEnum {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_DescriptorProto: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DescriptorProto" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "field"), - 6: .same(proto: "extension"), - 3: .standard(proto: "nested_type"), - 4: .standard(proto: "enum_type"), - 5: .standard(proto: "extension_range"), - 8: .standard(proto: "oneof_decl"), - 7: .same(proto: "options"), - 9: .standard(proto: "reserved_range"), - 10: .standard(proto: "reserved_name"), - ] - - fileprivate class _StorageClass { - var _name: String? = nil - var _field: [Google_Protobuf_FieldDescriptorProto] = [] - var _extension: [Google_Protobuf_FieldDescriptorProto] = [] - var _nestedType: [Google_Protobuf_DescriptorProto] = [] - var _enumType: [Google_Protobuf_EnumDescriptorProto] = [] - var _extensionRange: [Google_Protobuf_DescriptorProto.ExtensionRange] = [] - var _oneofDecl: [Google_Protobuf_OneofDescriptorProto] = [] - var _options: Google_Protobuf_MessageOptions? = nil - var _reservedRange: [Google_Protobuf_DescriptorProto.ReservedRange] = [] - var _reservedName: [String] = [] - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _name = source._name - _field = source._field - _extension = source._extension - _nestedType = source._nestedType - _enumType = source._enumType - _extensionRange = source._extensionRange - _oneofDecl = source._oneofDecl - _options = source._options - _reservedRange = source._reservedRange - _reservedName = source._reservedName - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public var isInitialized: Bool { - return withExtendedLifetime(_storage) { (_storage: _StorageClass) in - if !SwiftProtobuf.Internal.areAllInitialized(_storage._field) {return false} - if !SwiftProtobuf.Internal.areAllInitialized(_storage._extension) {return false} - if !SwiftProtobuf.Internal.areAllInitialized(_storage._nestedType) {return false} - if !SwiftProtobuf.Internal.areAllInitialized(_storage._enumType) {return false} - if !SwiftProtobuf.Internal.areAllInitialized(_storage._extensionRange) {return false} - if !SwiftProtobuf.Internal.areAllInitialized(_storage._oneofDecl) {return false} - if let v = _storage._options, !v.isInitialized {return false} - return true - } - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &_storage._name) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &_storage._field) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &_storage._nestedType) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &_storage._enumType) }() - case 5: try { try decoder.decodeRepeatedMessageField(value: &_storage._extensionRange) }() - case 6: try { try decoder.decodeRepeatedMessageField(value: &_storage._extension) }() - case 7: try { try decoder.decodeSingularMessageField(value: &_storage._options) }() - case 8: try { try decoder.decodeRepeatedMessageField(value: &_storage._oneofDecl) }() - case 9: try { try decoder.decodeRepeatedMessageField(value: &_storage._reservedRange) }() - case 10: try { try decoder.decodeRepeatedStringField(value: &_storage._reservedName) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = _storage._name { - try visitor.visitSingularStringField(value: v, fieldNumber: 1) - } }() - if !_storage._field.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._field, fieldNumber: 2) - } - if !_storage._nestedType.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._nestedType, fieldNumber: 3) - } - if !_storage._enumType.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._enumType, fieldNumber: 4) - } - if !_storage._extensionRange.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._extensionRange, fieldNumber: 5) - } - if !_storage._extension.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._extension, fieldNumber: 6) - } - try { if let v = _storage._options { - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } }() - if !_storage._oneofDecl.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._oneofDecl, fieldNumber: 8) - } - if !_storage._reservedRange.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._reservedRange, fieldNumber: 9) - } - if !_storage._reservedName.isEmpty { - try visitor.visitRepeatedStringField(value: _storage._reservedName, fieldNumber: 10) - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_DescriptorProto, rhs: Google_Protobuf_DescriptorProto) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._name != rhs_storage._name {return false} - if _storage._field != rhs_storage._field {return false} - if _storage._extension != rhs_storage._extension {return false} - if _storage._nestedType != rhs_storage._nestedType {return false} - if _storage._enumType != rhs_storage._enumType {return false} - if _storage._extensionRange != rhs_storage._extensionRange {return false} - if _storage._oneofDecl != rhs_storage._oneofDecl {return false} - if _storage._options != rhs_storage._options {return false} - if _storage._reservedRange != rhs_storage._reservedRange {return false} - if _storage._reservedName != rhs_storage._reservedName {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_DescriptorProto.ExtensionRange: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = Google_Protobuf_DescriptorProto.protoMessageName + ".ExtensionRange" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "start"), - 2: .same(proto: "end"), - 3: .same(proto: "options"), - ] - - public var isInitialized: Bool { - if let v = self._options, !v.isInitialized {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self._start) }() - case 2: try { try decoder.decodeSingularInt32Field(value: &self._end) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._options) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._start { - try visitor.visitSingularInt32Field(value: v, fieldNumber: 1) - } }() - try { if let v = self._end { - try visitor.visitSingularInt32Field(value: v, fieldNumber: 2) - } }() - try { if let v = self._options { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_DescriptorProto.ExtensionRange, rhs: Google_Protobuf_DescriptorProto.ExtensionRange) -> Bool { - if lhs._start != rhs._start {return false} - if lhs._end != rhs._end {return false} - if lhs._options != rhs._options {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_DescriptorProto.ReservedRange: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = Google_Protobuf_DescriptorProto.protoMessageName + ".ReservedRange" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "start"), - 2: .same(proto: "end"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self._start) }() - case 2: try { try decoder.decodeSingularInt32Field(value: &self._end) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._start { - try visitor.visitSingularInt32Field(value: v, fieldNumber: 1) - } }() - try { if let v = self._end { - try visitor.visitSingularInt32Field(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_DescriptorProto.ReservedRange, rhs: Google_Protobuf_DescriptorProto.ReservedRange) -> Bool { - if lhs._start != rhs._start {return false} - if lhs._end != rhs._end {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_ExtensionRangeOptions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ExtensionRangeOptions" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 999: .standard(proto: "uninterpreted_option"), - 2: .same(proto: "declaration"), - 50: .same(proto: "features"), - 3: .same(proto: "verification"), - ] - - public var isInitialized: Bool { - if !_protobuf_extensionFieldValues.isInitialized {return false} - if !SwiftProtobuf.Internal.areAllInitialized(self.uninterpretedOption) {return false} - if let v = self._features, !v.isInitialized {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.declaration) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self._verification) }() - case 50: try { try decoder.decodeSingularMessageField(value: &self._features) }() - case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }() - case 1000..<536870912: - try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_ExtensionRangeOptions.self, fieldNumber: fieldNumber) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.declaration.isEmpty { - try visitor.visitRepeatedMessageField(value: self.declaration, fieldNumber: 2) - } - try { if let v = self._verification { - try visitor.visitSingularEnumField(value: v, fieldNumber: 3) - } }() - try { if let v = self._features { - try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } }() - if !self.uninterpretedOption.isEmpty { - try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999) - } - try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912) - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_ExtensionRangeOptions, rhs: Google_Protobuf_ExtensionRangeOptions) -> Bool { - if lhs.uninterpretedOption != rhs.uninterpretedOption {return false} - if lhs.declaration != rhs.declaration {return false} - if lhs._features != rhs._features {return false} - if lhs._verification != rhs._verification {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false} - return true - } -} - -extension Google_Protobuf_ExtensionRangeOptions.VerificationState: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "DECLARATION"), - 1: .same(proto: "UNVERIFIED"), - ] -} - -extension Google_Protobuf_ExtensionRangeOptions.Declaration: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = Google_Protobuf_ExtensionRangeOptions.protoMessageName + ".Declaration" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "number"), - 2: .standard(proto: "full_name"), - 3: .same(proto: "type"), - 5: .same(proto: "reserved"), - 6: .same(proto: "repeated"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self._number) }() - case 2: try { try decoder.decodeSingularStringField(value: &self._fullName) }() - case 3: try { try decoder.decodeSingularStringField(value: &self._type) }() - case 5: try { try decoder.decodeSingularBoolField(value: &self._reserved) }() - case 6: try { try decoder.decodeSingularBoolField(value: &self._repeated) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._number { - try visitor.visitSingularInt32Field(value: v, fieldNumber: 1) - } }() - try { if let v = self._fullName { - try visitor.visitSingularStringField(value: v, fieldNumber: 2) - } }() - try { if let v = self._type { - try visitor.visitSingularStringField(value: v, fieldNumber: 3) - } }() - try { if let v = self._reserved { - try visitor.visitSingularBoolField(value: v, fieldNumber: 5) - } }() - try { if let v = self._repeated { - try visitor.visitSingularBoolField(value: v, fieldNumber: 6) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_ExtensionRangeOptions.Declaration, rhs: Google_Protobuf_ExtensionRangeOptions.Declaration) -> Bool { - if lhs._number != rhs._number {return false} - if lhs._fullName != rhs._fullName {return false} - if lhs._type != rhs._type {return false} - if lhs._reserved != rhs._reserved {return false} - if lhs._repeated != rhs._repeated {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_FieldDescriptorProto: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FieldDescriptorProto" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 3: .same(proto: "number"), - 4: .same(proto: "label"), - 5: .same(proto: "type"), - 6: .standard(proto: "type_name"), - 2: .same(proto: "extendee"), - 7: .standard(proto: "default_value"), - 9: .standard(proto: "oneof_index"), - 10: .standard(proto: "json_name"), - 8: .same(proto: "options"), - 17: .standard(proto: "proto3_optional"), - ] - - public var isInitialized: Bool { - if let v = self._options, !v.isInitialized {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self._name) }() - case 2: try { try decoder.decodeSingularStringField(value: &self._extendee) }() - case 3: try { try decoder.decodeSingularInt32Field(value: &self._number) }() - case 4: try { try decoder.decodeSingularEnumField(value: &self._label) }() - case 5: try { try decoder.decodeSingularEnumField(value: &self._type) }() - case 6: try { try decoder.decodeSingularStringField(value: &self._typeName) }() - case 7: try { try decoder.decodeSingularStringField(value: &self._defaultValue) }() - case 8: try { try decoder.decodeSingularMessageField(value: &self._options) }() - case 9: try { try decoder.decodeSingularInt32Field(value: &self._oneofIndex) }() - case 10: try { try decoder.decodeSingularStringField(value: &self._jsonName) }() - case 17: try { try decoder.decodeSingularBoolField(value: &self._proto3Optional) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._name { - try visitor.visitSingularStringField(value: v, fieldNumber: 1) - } }() - try { if let v = self._extendee { - try visitor.visitSingularStringField(value: v, fieldNumber: 2) - } }() - try { if let v = self._number { - try visitor.visitSingularInt32Field(value: v, fieldNumber: 3) - } }() - try { if let v = self._label { - try visitor.visitSingularEnumField(value: v, fieldNumber: 4) - } }() - try { if let v = self._type { - try visitor.visitSingularEnumField(value: v, fieldNumber: 5) - } }() - try { if let v = self._typeName { - try visitor.visitSingularStringField(value: v, fieldNumber: 6) - } }() - try { if let v = self._defaultValue { - try visitor.visitSingularStringField(value: v, fieldNumber: 7) - } }() - try { if let v = self._options { - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - } }() - try { if let v = self._oneofIndex { - try visitor.visitSingularInt32Field(value: v, fieldNumber: 9) - } }() - try { if let v = self._jsonName { - try visitor.visitSingularStringField(value: v, fieldNumber: 10) - } }() - try { if let v = self._proto3Optional { - try visitor.visitSingularBoolField(value: v, fieldNumber: 17) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_FieldDescriptorProto, rhs: Google_Protobuf_FieldDescriptorProto) -> Bool { - if lhs._name != rhs._name {return false} - if lhs._number != rhs._number {return false} - if lhs._label != rhs._label {return false} - if lhs._type != rhs._type {return false} - if lhs._typeName != rhs._typeName {return false} - if lhs._extendee != rhs._extendee {return false} - if lhs._defaultValue != rhs._defaultValue {return false} - if lhs._oneofIndex != rhs._oneofIndex {return false} - if lhs._jsonName != rhs._jsonName {return false} - if lhs._options != rhs._options {return false} - if lhs._proto3Optional != rhs._proto3Optional {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_FieldDescriptorProto.TypeEnum: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "TYPE_DOUBLE"), - 2: .same(proto: "TYPE_FLOAT"), - 3: .same(proto: "TYPE_INT64"), - 4: .same(proto: "TYPE_UINT64"), - 5: .same(proto: "TYPE_INT32"), - 6: .same(proto: "TYPE_FIXED64"), - 7: .same(proto: "TYPE_FIXED32"), - 8: .same(proto: "TYPE_BOOL"), - 9: .same(proto: "TYPE_STRING"), - 10: .same(proto: "TYPE_GROUP"), - 11: .same(proto: "TYPE_MESSAGE"), - 12: .same(proto: "TYPE_BYTES"), - 13: .same(proto: "TYPE_UINT32"), - 14: .same(proto: "TYPE_ENUM"), - 15: .same(proto: "TYPE_SFIXED32"), - 16: .same(proto: "TYPE_SFIXED64"), - 17: .same(proto: "TYPE_SINT32"), - 18: .same(proto: "TYPE_SINT64"), - ] -} - -extension Google_Protobuf_FieldDescriptorProto.Label: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "LABEL_OPTIONAL"), - 2: .same(proto: "LABEL_REQUIRED"), - 3: .same(proto: "LABEL_REPEATED"), - ] -} - -extension Google_Protobuf_OneofDescriptorProto: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OneofDescriptorProto" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "options"), - ] - - public var isInitialized: Bool { - if let v = self._options, !v.isInitialized {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self._name) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._options) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._name { - try visitor.visitSingularStringField(value: v, fieldNumber: 1) - } }() - try { if let v = self._options { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_OneofDescriptorProto, rhs: Google_Protobuf_OneofDescriptorProto) -> Bool { - if lhs._name != rhs._name {return false} - if lhs._options != rhs._options {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_EnumDescriptorProto: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".EnumDescriptorProto" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "value"), - 3: .same(proto: "options"), - 4: .standard(proto: "reserved_range"), - 5: .standard(proto: "reserved_name"), - ] - - public var isInitialized: Bool { - if !SwiftProtobuf.Internal.areAllInitialized(self.value) {return false} - if let v = self._options, !v.isInitialized {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self._name) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.value) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._options) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.reservedRange) }() - case 5: try { try decoder.decodeRepeatedStringField(value: &self.reservedName) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._name { - try visitor.visitSingularStringField(value: v, fieldNumber: 1) - } }() - if !self.value.isEmpty { - try visitor.visitRepeatedMessageField(value: self.value, fieldNumber: 2) - } - try { if let v = self._options { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if !self.reservedRange.isEmpty { - try visitor.visitRepeatedMessageField(value: self.reservedRange, fieldNumber: 4) - } - if !self.reservedName.isEmpty { - try visitor.visitRepeatedStringField(value: self.reservedName, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_EnumDescriptorProto, rhs: Google_Protobuf_EnumDescriptorProto) -> Bool { - if lhs._name != rhs._name {return false} - if lhs.value != rhs.value {return false} - if lhs._options != rhs._options {return false} - if lhs.reservedRange != rhs.reservedRange {return false} - if lhs.reservedName != rhs.reservedName {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_EnumDescriptorProto.EnumReservedRange: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = Google_Protobuf_EnumDescriptorProto.protoMessageName + ".EnumReservedRange" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "start"), - 2: .same(proto: "end"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self._start) }() - case 2: try { try decoder.decodeSingularInt32Field(value: &self._end) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._start { - try visitor.visitSingularInt32Field(value: v, fieldNumber: 1) - } }() - try { if let v = self._end { - try visitor.visitSingularInt32Field(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_EnumDescriptorProto.EnumReservedRange, rhs: Google_Protobuf_EnumDescriptorProto.EnumReservedRange) -> Bool { - if lhs._start != rhs._start {return false} - if lhs._end != rhs._end {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_EnumValueDescriptorProto: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".EnumValueDescriptorProto" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "number"), - 3: .same(proto: "options"), - ] - - public var isInitialized: Bool { - if let v = self._options, !v.isInitialized {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self._name) }() - case 2: try { try decoder.decodeSingularInt32Field(value: &self._number) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._options) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._name { - try visitor.visitSingularStringField(value: v, fieldNumber: 1) - } }() - try { if let v = self._number { - try visitor.visitSingularInt32Field(value: v, fieldNumber: 2) - } }() - try { if let v = self._options { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_EnumValueDescriptorProto, rhs: Google_Protobuf_EnumValueDescriptorProto) -> Bool { - if lhs._name != rhs._name {return false} - if lhs._number != rhs._number {return false} - if lhs._options != rhs._options {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_ServiceDescriptorProto: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ServiceDescriptorProto" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "method"), - 3: .same(proto: "options"), - ] - - public var isInitialized: Bool { - if !SwiftProtobuf.Internal.areAllInitialized(self.method) {return false} - if let v = self._options, !v.isInitialized {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self._name) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.method) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._options) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._name { - try visitor.visitSingularStringField(value: v, fieldNumber: 1) - } }() - if !self.method.isEmpty { - try visitor.visitRepeatedMessageField(value: self.method, fieldNumber: 2) - } - try { if let v = self._options { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_ServiceDescriptorProto, rhs: Google_Protobuf_ServiceDescriptorProto) -> Bool { - if lhs._name != rhs._name {return false} - if lhs.method != rhs.method {return false} - if lhs._options != rhs._options {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_MethodDescriptorProto: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".MethodDescriptorProto" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .standard(proto: "input_type"), - 3: .standard(proto: "output_type"), - 4: .same(proto: "options"), - 5: .standard(proto: "client_streaming"), - 6: .standard(proto: "server_streaming"), - ] - - public var isInitialized: Bool { - if let v = self._options, !v.isInitialized {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self._name) }() - case 2: try { try decoder.decodeSingularStringField(value: &self._inputType) }() - case 3: try { try decoder.decodeSingularStringField(value: &self._outputType) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._options) }() - case 5: try { try decoder.decodeSingularBoolField(value: &self._clientStreaming) }() - case 6: try { try decoder.decodeSingularBoolField(value: &self._serverStreaming) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._name { - try visitor.visitSingularStringField(value: v, fieldNumber: 1) - } }() - try { if let v = self._inputType { - try visitor.visitSingularStringField(value: v, fieldNumber: 2) - } }() - try { if let v = self._outputType { - try visitor.visitSingularStringField(value: v, fieldNumber: 3) - } }() - try { if let v = self._options { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - try { if let v = self._clientStreaming { - try visitor.visitSingularBoolField(value: v, fieldNumber: 5) - } }() - try { if let v = self._serverStreaming { - try visitor.visitSingularBoolField(value: v, fieldNumber: 6) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_MethodDescriptorProto, rhs: Google_Protobuf_MethodDescriptorProto) -> Bool { - if lhs._name != rhs._name {return false} - if lhs._inputType != rhs._inputType {return false} - if lhs._outputType != rhs._outputType {return false} - if lhs._options != rhs._options {return false} - if lhs._clientStreaming != rhs._clientStreaming {return false} - if lhs._serverStreaming != rhs._serverStreaming {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_FileOptions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FileOptions" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "java_package"), - 8: .standard(proto: "java_outer_classname"), - 10: .standard(proto: "java_multiple_files"), - 20: .standard(proto: "java_generate_equals_and_hash"), - 27: .standard(proto: "java_string_check_utf8"), - 9: .standard(proto: "optimize_for"), - 11: .standard(proto: "go_package"), - 16: .standard(proto: "cc_generic_services"), - 17: .standard(proto: "java_generic_services"), - 18: .standard(proto: "py_generic_services"), - 42: .standard(proto: "php_generic_services"), - 23: .same(proto: "deprecated"), - 31: .standard(proto: "cc_enable_arenas"), - 36: .standard(proto: "objc_class_prefix"), - 37: .standard(proto: "csharp_namespace"), - 39: .standard(proto: "swift_prefix"), - 40: .standard(proto: "php_class_prefix"), - 41: .standard(proto: "php_namespace"), - 44: .standard(proto: "php_metadata_namespace"), - 45: .standard(proto: "ruby_package"), - 50: .same(proto: "features"), - 999: .standard(proto: "uninterpreted_option"), - ] - - fileprivate class _StorageClass { - var _javaPackage: String? = nil - var _javaOuterClassname: String? = nil - var _javaMultipleFiles: Bool? = nil - var _javaGenerateEqualsAndHash: Bool? = nil - var _javaStringCheckUtf8: Bool? = nil - var _optimizeFor: Google_Protobuf_FileOptions.OptimizeMode? = nil - var _goPackage: String? = nil - var _ccGenericServices: Bool? = nil - var _javaGenericServices: Bool? = nil - var _pyGenericServices: Bool? = nil - var _phpGenericServices: Bool? = nil - var _deprecated: Bool? = nil - var _ccEnableArenas: Bool? = nil - var _objcClassPrefix: String? = nil - var _csharpNamespace: String? = nil - var _swiftPrefix: String? = nil - var _phpClassPrefix: String? = nil - var _phpNamespace: String? = nil - var _phpMetadataNamespace: String? = nil - var _rubyPackage: String? = nil - var _features: Google_Protobuf_FeatureSet? = nil - var _uninterpretedOption: [Google_Protobuf_UninterpretedOption] = [] - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _javaPackage = source._javaPackage - _javaOuterClassname = source._javaOuterClassname - _javaMultipleFiles = source._javaMultipleFiles - _javaGenerateEqualsAndHash = source._javaGenerateEqualsAndHash - _javaStringCheckUtf8 = source._javaStringCheckUtf8 - _optimizeFor = source._optimizeFor - _goPackage = source._goPackage - _ccGenericServices = source._ccGenericServices - _javaGenericServices = source._javaGenericServices - _pyGenericServices = source._pyGenericServices - _phpGenericServices = source._phpGenericServices - _deprecated = source._deprecated - _ccEnableArenas = source._ccEnableArenas - _objcClassPrefix = source._objcClassPrefix - _csharpNamespace = source._csharpNamespace - _swiftPrefix = source._swiftPrefix - _phpClassPrefix = source._phpClassPrefix - _phpNamespace = source._phpNamespace - _phpMetadataNamespace = source._phpMetadataNamespace - _rubyPackage = source._rubyPackage - _features = source._features - _uninterpretedOption = source._uninterpretedOption - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public var isInitialized: Bool { - if !_protobuf_extensionFieldValues.isInitialized {return false} - return withExtendedLifetime(_storage) { (_storage: _StorageClass) in - if let v = _storage._features, !v.isInitialized {return false} - if !SwiftProtobuf.Internal.areAllInitialized(_storage._uninterpretedOption) {return false} - return true - } - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &_storage._javaPackage) }() - case 8: try { try decoder.decodeSingularStringField(value: &_storage._javaOuterClassname) }() - case 9: try { try decoder.decodeSingularEnumField(value: &_storage._optimizeFor) }() - case 10: try { try decoder.decodeSingularBoolField(value: &_storage._javaMultipleFiles) }() - case 11: try { try decoder.decodeSingularStringField(value: &_storage._goPackage) }() - case 16: try { try decoder.decodeSingularBoolField(value: &_storage._ccGenericServices) }() - case 17: try { try decoder.decodeSingularBoolField(value: &_storage._javaGenericServices) }() - case 18: try { try decoder.decodeSingularBoolField(value: &_storage._pyGenericServices) }() - case 20: try { try decoder.decodeSingularBoolField(value: &_storage._javaGenerateEqualsAndHash) }() - case 23: try { try decoder.decodeSingularBoolField(value: &_storage._deprecated) }() - case 27: try { try decoder.decodeSingularBoolField(value: &_storage._javaStringCheckUtf8) }() - case 31: try { try decoder.decodeSingularBoolField(value: &_storage._ccEnableArenas) }() - case 36: try { try decoder.decodeSingularStringField(value: &_storage._objcClassPrefix) }() - case 37: try { try decoder.decodeSingularStringField(value: &_storage._csharpNamespace) }() - case 39: try { try decoder.decodeSingularStringField(value: &_storage._swiftPrefix) }() - case 40: try { try decoder.decodeSingularStringField(value: &_storage._phpClassPrefix) }() - case 41: try { try decoder.decodeSingularStringField(value: &_storage._phpNamespace) }() - case 42: try { try decoder.decodeSingularBoolField(value: &_storage._phpGenericServices) }() - case 44: try { try decoder.decodeSingularStringField(value: &_storage._phpMetadataNamespace) }() - case 45: try { try decoder.decodeSingularStringField(value: &_storage._rubyPackage) }() - case 50: try { try decoder.decodeSingularMessageField(value: &_storage._features) }() - case 999: try { try decoder.decodeRepeatedMessageField(value: &_storage._uninterpretedOption) }() - case 1000..<536870912: - try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_FileOptions.self, fieldNumber: fieldNumber) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = _storage._javaPackage { - try visitor.visitSingularStringField(value: v, fieldNumber: 1) - } }() - try { if let v = _storage._javaOuterClassname { - try visitor.visitSingularStringField(value: v, fieldNumber: 8) - } }() - try { if let v = _storage._optimizeFor { - try visitor.visitSingularEnumField(value: v, fieldNumber: 9) - } }() - try { if let v = _storage._javaMultipleFiles { - try visitor.visitSingularBoolField(value: v, fieldNumber: 10) - } }() - try { if let v = _storage._goPackage { - try visitor.visitSingularStringField(value: v, fieldNumber: 11) - } }() - try { if let v = _storage._ccGenericServices { - try visitor.visitSingularBoolField(value: v, fieldNumber: 16) - } }() - try { if let v = _storage._javaGenericServices { - try visitor.visitSingularBoolField(value: v, fieldNumber: 17) - } }() - try { if let v = _storage._pyGenericServices { - try visitor.visitSingularBoolField(value: v, fieldNumber: 18) - } }() - try { if let v = _storage._javaGenerateEqualsAndHash { - try visitor.visitSingularBoolField(value: v, fieldNumber: 20) - } }() - try { if let v = _storage._deprecated { - try visitor.visitSingularBoolField(value: v, fieldNumber: 23) - } }() - try { if let v = _storage._javaStringCheckUtf8 { - try visitor.visitSingularBoolField(value: v, fieldNumber: 27) - } }() - try { if let v = _storage._ccEnableArenas { - try visitor.visitSingularBoolField(value: v, fieldNumber: 31) - } }() - try { if let v = _storage._objcClassPrefix { - try visitor.visitSingularStringField(value: v, fieldNumber: 36) - } }() - try { if let v = _storage._csharpNamespace { - try visitor.visitSingularStringField(value: v, fieldNumber: 37) - } }() - try { if let v = _storage._swiftPrefix { - try visitor.visitSingularStringField(value: v, fieldNumber: 39) - } }() - try { if let v = _storage._phpClassPrefix { - try visitor.visitSingularStringField(value: v, fieldNumber: 40) - } }() - try { if let v = _storage._phpNamespace { - try visitor.visitSingularStringField(value: v, fieldNumber: 41) - } }() - try { if let v = _storage._phpGenericServices { - try visitor.visitSingularBoolField(value: v, fieldNumber: 42) - } }() - try { if let v = _storage._phpMetadataNamespace { - try visitor.visitSingularStringField(value: v, fieldNumber: 44) - } }() - try { if let v = _storage._rubyPackage { - try visitor.visitSingularStringField(value: v, fieldNumber: 45) - } }() - try { if let v = _storage._features { - try visitor.visitSingularMessageField(value: v, fieldNumber: 50) - } }() - if !_storage._uninterpretedOption.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._uninterpretedOption, fieldNumber: 999) - } - try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_FileOptions, rhs: Google_Protobuf_FileOptions) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._javaPackage != rhs_storage._javaPackage {return false} - if _storage._javaOuterClassname != rhs_storage._javaOuterClassname {return false} - if _storage._javaMultipleFiles != rhs_storage._javaMultipleFiles {return false} - if _storage._javaGenerateEqualsAndHash != rhs_storage._javaGenerateEqualsAndHash {return false} - if _storage._javaStringCheckUtf8 != rhs_storage._javaStringCheckUtf8 {return false} - if _storage._optimizeFor != rhs_storage._optimizeFor {return false} - if _storage._goPackage != rhs_storage._goPackage {return false} - if _storage._ccGenericServices != rhs_storage._ccGenericServices {return false} - if _storage._javaGenericServices != rhs_storage._javaGenericServices {return false} - if _storage._pyGenericServices != rhs_storage._pyGenericServices {return false} - if _storage._phpGenericServices != rhs_storage._phpGenericServices {return false} - if _storage._deprecated != rhs_storage._deprecated {return false} - if _storage._ccEnableArenas != rhs_storage._ccEnableArenas {return false} - if _storage._objcClassPrefix != rhs_storage._objcClassPrefix {return false} - if _storage._csharpNamespace != rhs_storage._csharpNamespace {return false} - if _storage._swiftPrefix != rhs_storage._swiftPrefix {return false} - if _storage._phpClassPrefix != rhs_storage._phpClassPrefix {return false} - if _storage._phpNamespace != rhs_storage._phpNamespace {return false} - if _storage._phpMetadataNamespace != rhs_storage._phpMetadataNamespace {return false} - if _storage._rubyPackage != rhs_storage._rubyPackage {return false} - if _storage._features != rhs_storage._features {return false} - if _storage._uninterpretedOption != rhs_storage._uninterpretedOption {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false} - return true - } -} - -extension Google_Protobuf_FileOptions.OptimizeMode: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "SPEED"), - 2: .same(proto: "CODE_SIZE"), - 3: .same(proto: "LITE_RUNTIME"), - ] -} - -extension Google_Protobuf_MessageOptions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".MessageOptions" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "message_set_wire_format"), - 2: .standard(proto: "no_standard_descriptor_accessor"), - 3: .same(proto: "deprecated"), - 7: .standard(proto: "map_entry"), - 11: .standard(proto: "deprecated_legacy_json_field_conflicts"), - 12: .same(proto: "features"), - 999: .standard(proto: "uninterpreted_option"), - ] - - public var isInitialized: Bool { - if !_protobuf_extensionFieldValues.isInitialized {return false} - if let v = self._features, !v.isInitialized {return false} - if !SwiftProtobuf.Internal.areAllInitialized(self.uninterpretedOption) {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBoolField(value: &self._messageSetWireFormat) }() - case 2: try { try decoder.decodeSingularBoolField(value: &self._noStandardDescriptorAccessor) }() - case 3: try { try decoder.decodeSingularBoolField(value: &self._deprecated) }() - case 7: try { try decoder.decodeSingularBoolField(value: &self._mapEntry) }() - case 11: try { try decoder.decodeSingularBoolField(value: &self._deprecatedLegacyJsonFieldConflicts) }() - case 12: try { try decoder.decodeSingularMessageField(value: &self._features) }() - case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }() - case 1000..<536870912: - try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_MessageOptions.self, fieldNumber: fieldNumber) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._messageSetWireFormat { - try visitor.visitSingularBoolField(value: v, fieldNumber: 1) - } }() - try { if let v = self._noStandardDescriptorAccessor { - try visitor.visitSingularBoolField(value: v, fieldNumber: 2) - } }() - try { if let v = self._deprecated { - try visitor.visitSingularBoolField(value: v, fieldNumber: 3) - } }() - try { if let v = self._mapEntry { - try visitor.visitSingularBoolField(value: v, fieldNumber: 7) - } }() - try { if let v = self._deprecatedLegacyJsonFieldConflicts { - try visitor.visitSingularBoolField(value: v, fieldNumber: 11) - } }() - try { if let v = self._features { - try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - } }() - if !self.uninterpretedOption.isEmpty { - try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999) - } - try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912) - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_MessageOptions, rhs: Google_Protobuf_MessageOptions) -> Bool { - if lhs._messageSetWireFormat != rhs._messageSetWireFormat {return false} - if lhs._noStandardDescriptorAccessor != rhs._noStandardDescriptorAccessor {return false} - if lhs._deprecated != rhs._deprecated {return false} - if lhs._mapEntry != rhs._mapEntry {return false} - if lhs._deprecatedLegacyJsonFieldConflicts != rhs._deprecatedLegacyJsonFieldConflicts {return false} - if lhs._features != rhs._features {return false} - if lhs.uninterpretedOption != rhs.uninterpretedOption {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false} - return true - } -} - -extension Google_Protobuf_FieldOptions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FieldOptions" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "ctype"), - 2: .same(proto: "packed"), - 6: .same(proto: "jstype"), - 5: .same(proto: "lazy"), - 15: .standard(proto: "unverified_lazy"), - 3: .same(proto: "deprecated"), - 10: .same(proto: "weak"), - 16: .standard(proto: "debug_redact"), - 17: .same(proto: "retention"), - 19: .same(proto: "targets"), - 20: .standard(proto: "edition_defaults"), - 21: .same(proto: "features"), - 999: .standard(proto: "uninterpreted_option"), - ] - - fileprivate class _StorageClass { - var _ctype: Google_Protobuf_FieldOptions.CType? = nil - var _packed: Bool? = nil - var _jstype: Google_Protobuf_FieldOptions.JSType? = nil - var _lazy: Bool? = nil - var _unverifiedLazy: Bool? = nil - var _deprecated: Bool? = nil - var _weak: Bool? = nil - var _debugRedact: Bool? = nil - var _retention: Google_Protobuf_FieldOptions.OptionRetention? = nil - var _targets: [Google_Protobuf_FieldOptions.OptionTargetType] = [] - var _editionDefaults: [Google_Protobuf_FieldOptions.EditionDefault] = [] - var _features: Google_Protobuf_FeatureSet? = nil - var _uninterpretedOption: [Google_Protobuf_UninterpretedOption] = [] - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _ctype = source._ctype - _packed = source._packed - _jstype = source._jstype - _lazy = source._lazy - _unverifiedLazy = source._unverifiedLazy - _deprecated = source._deprecated - _weak = source._weak - _debugRedact = source._debugRedact - _retention = source._retention - _targets = source._targets - _editionDefaults = source._editionDefaults - _features = source._features - _uninterpretedOption = source._uninterpretedOption - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public var isInitialized: Bool { - if !_protobuf_extensionFieldValues.isInitialized {return false} - return withExtendedLifetime(_storage) { (_storage: _StorageClass) in - if let v = _storage._features, !v.isInitialized {return false} - if !SwiftProtobuf.Internal.areAllInitialized(_storage._uninterpretedOption) {return false} - return true - } - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &_storage._ctype) }() - case 2: try { try decoder.decodeSingularBoolField(value: &_storage._packed) }() - case 3: try { try decoder.decodeSingularBoolField(value: &_storage._deprecated) }() - case 5: try { try decoder.decodeSingularBoolField(value: &_storage._lazy) }() - case 6: try { try decoder.decodeSingularEnumField(value: &_storage._jstype) }() - case 10: try { try decoder.decodeSingularBoolField(value: &_storage._weak) }() - case 15: try { try decoder.decodeSingularBoolField(value: &_storage._unverifiedLazy) }() - case 16: try { try decoder.decodeSingularBoolField(value: &_storage._debugRedact) }() - case 17: try { try decoder.decodeSingularEnumField(value: &_storage._retention) }() - case 19: try { try decoder.decodeRepeatedEnumField(value: &_storage._targets) }() - case 20: try { try decoder.decodeRepeatedMessageField(value: &_storage._editionDefaults) }() - case 21: try { try decoder.decodeSingularMessageField(value: &_storage._features) }() - case 999: try { try decoder.decodeRepeatedMessageField(value: &_storage._uninterpretedOption) }() - case 1000..<536870912: - try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_FieldOptions.self, fieldNumber: fieldNumber) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = _storage._ctype { - try visitor.visitSingularEnumField(value: v, fieldNumber: 1) - } }() - try { if let v = _storage._packed { - try visitor.visitSingularBoolField(value: v, fieldNumber: 2) - } }() - try { if let v = _storage._deprecated { - try visitor.visitSingularBoolField(value: v, fieldNumber: 3) - } }() - try { if let v = _storage._lazy { - try visitor.visitSingularBoolField(value: v, fieldNumber: 5) - } }() - try { if let v = _storage._jstype { - try visitor.visitSingularEnumField(value: v, fieldNumber: 6) - } }() - try { if let v = _storage._weak { - try visitor.visitSingularBoolField(value: v, fieldNumber: 10) - } }() - try { if let v = _storage._unverifiedLazy { - try visitor.visitSingularBoolField(value: v, fieldNumber: 15) - } }() - try { if let v = _storage._debugRedact { - try visitor.visitSingularBoolField(value: v, fieldNumber: 16) - } }() - try { if let v = _storage._retention { - try visitor.visitSingularEnumField(value: v, fieldNumber: 17) - } }() - if !_storage._targets.isEmpty { - try visitor.visitRepeatedEnumField(value: _storage._targets, fieldNumber: 19) - } - if !_storage._editionDefaults.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._editionDefaults, fieldNumber: 20) - } - try { if let v = _storage._features { - try visitor.visitSingularMessageField(value: v, fieldNumber: 21) - } }() - if !_storage._uninterpretedOption.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._uninterpretedOption, fieldNumber: 999) - } - try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_FieldOptions, rhs: Google_Protobuf_FieldOptions) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._ctype != rhs_storage._ctype {return false} - if _storage._packed != rhs_storage._packed {return false} - if _storage._jstype != rhs_storage._jstype {return false} - if _storage._lazy != rhs_storage._lazy {return false} - if _storage._unverifiedLazy != rhs_storage._unverifiedLazy {return false} - if _storage._deprecated != rhs_storage._deprecated {return false} - if _storage._weak != rhs_storage._weak {return false} - if _storage._debugRedact != rhs_storage._debugRedact {return false} - if _storage._retention != rhs_storage._retention {return false} - if _storage._targets != rhs_storage._targets {return false} - if _storage._editionDefaults != rhs_storage._editionDefaults {return false} - if _storage._features != rhs_storage._features {return false} - if _storage._uninterpretedOption != rhs_storage._uninterpretedOption {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false} - return true - } -} - -extension Google_Protobuf_FieldOptions.CType: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "STRING"), - 1: .same(proto: "CORD"), - 2: .same(proto: "STRING_PIECE"), - ] -} - -extension Google_Protobuf_FieldOptions.JSType: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "JS_NORMAL"), - 1: .same(proto: "JS_STRING"), - 2: .same(proto: "JS_NUMBER"), - ] -} - -extension Google_Protobuf_FieldOptions.OptionRetention: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "RETENTION_UNKNOWN"), - 1: .same(proto: "RETENTION_RUNTIME"), - 2: .same(proto: "RETENTION_SOURCE"), - ] -} - -extension Google_Protobuf_FieldOptions.OptionTargetType: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "TARGET_TYPE_UNKNOWN"), - 1: .same(proto: "TARGET_TYPE_FILE"), - 2: .same(proto: "TARGET_TYPE_EXTENSION_RANGE"), - 3: .same(proto: "TARGET_TYPE_MESSAGE"), - 4: .same(proto: "TARGET_TYPE_FIELD"), - 5: .same(proto: "TARGET_TYPE_ONEOF"), - 6: .same(proto: "TARGET_TYPE_ENUM"), - 7: .same(proto: "TARGET_TYPE_ENUM_ENTRY"), - 8: .same(proto: "TARGET_TYPE_SERVICE"), - 9: .same(proto: "TARGET_TYPE_METHOD"), - ] -} - -extension Google_Protobuf_FieldOptions.EditionDefault: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = Google_Protobuf_FieldOptions.protoMessageName + ".EditionDefault" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "edition"), - 3: .standard(proto: "edition_enum"), - 2: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self._edition) }() - case 2: try { try decoder.decodeSingularStringField(value: &self._value) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self._editionEnum) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._edition { - try visitor.visitSingularStringField(value: v, fieldNumber: 1) - } }() - try { if let v = self._value { - try visitor.visitSingularStringField(value: v, fieldNumber: 2) - } }() - try { if let v = self._editionEnum { - try visitor.visitSingularEnumField(value: v, fieldNumber: 3) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_FieldOptions.EditionDefault, rhs: Google_Protobuf_FieldOptions.EditionDefault) -> Bool { - if lhs._edition != rhs._edition {return false} - if lhs._editionEnum != rhs._editionEnum {return false} - if lhs._value != rhs._value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_OneofOptions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OneofOptions" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "features"), - 999: .standard(proto: "uninterpreted_option"), - ] - - public var isInitialized: Bool { - if !_protobuf_extensionFieldValues.isInitialized {return false} - if let v = self._features, !v.isInitialized {return false} - if !SwiftProtobuf.Internal.areAllInitialized(self.uninterpretedOption) {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._features) }() - case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }() - case 1000..<536870912: - try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_OneofOptions.self, fieldNumber: fieldNumber) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._features { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.uninterpretedOption.isEmpty { - try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999) - } - try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912) - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_OneofOptions, rhs: Google_Protobuf_OneofOptions) -> Bool { - if lhs._features != rhs._features {return false} - if lhs.uninterpretedOption != rhs.uninterpretedOption {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false} - return true - } -} - -extension Google_Protobuf_EnumOptions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".EnumOptions" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 2: .standard(proto: "allow_alias"), - 3: .same(proto: "deprecated"), - 6: .standard(proto: "deprecated_legacy_json_field_conflicts"), - 7: .same(proto: "features"), - 999: .standard(proto: "uninterpreted_option"), - ] - - public var isInitialized: Bool { - if !_protobuf_extensionFieldValues.isInitialized {return false} - if let v = self._features, !v.isInitialized {return false} - if !SwiftProtobuf.Internal.areAllInitialized(self.uninterpretedOption) {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 2: try { try decoder.decodeSingularBoolField(value: &self._allowAlias) }() - case 3: try { try decoder.decodeSingularBoolField(value: &self._deprecated) }() - case 6: try { try decoder.decodeSingularBoolField(value: &self._deprecatedLegacyJsonFieldConflicts) }() - case 7: try { try decoder.decodeSingularMessageField(value: &self._features) }() - case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }() - case 1000..<536870912: - try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_EnumOptions.self, fieldNumber: fieldNumber) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._allowAlias { - try visitor.visitSingularBoolField(value: v, fieldNumber: 2) - } }() - try { if let v = self._deprecated { - try visitor.visitSingularBoolField(value: v, fieldNumber: 3) - } }() - try { if let v = self._deprecatedLegacyJsonFieldConflicts { - try visitor.visitSingularBoolField(value: v, fieldNumber: 6) - } }() - try { if let v = self._features { - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } }() - if !self.uninterpretedOption.isEmpty { - try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999) - } - try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912) - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_EnumOptions, rhs: Google_Protobuf_EnumOptions) -> Bool { - if lhs._allowAlias != rhs._allowAlias {return false} - if lhs._deprecated != rhs._deprecated {return false} - if lhs._deprecatedLegacyJsonFieldConflicts != rhs._deprecatedLegacyJsonFieldConflicts {return false} - if lhs._features != rhs._features {return false} - if lhs.uninterpretedOption != rhs.uninterpretedOption {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false} - return true - } -} - -extension Google_Protobuf_EnumValueOptions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".EnumValueOptions" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "deprecated"), - 2: .same(proto: "features"), - 3: .standard(proto: "debug_redact"), - 999: .standard(proto: "uninterpreted_option"), - ] - - public var isInitialized: Bool { - if !_protobuf_extensionFieldValues.isInitialized {return false} - if let v = self._features, !v.isInitialized {return false} - if !SwiftProtobuf.Internal.areAllInitialized(self.uninterpretedOption) {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBoolField(value: &self._deprecated) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._features) }() - case 3: try { try decoder.decodeSingularBoolField(value: &self._debugRedact) }() - case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }() - case 1000..<536870912: - try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_EnumValueOptions.self, fieldNumber: fieldNumber) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._deprecated { - try visitor.visitSingularBoolField(value: v, fieldNumber: 1) - } }() - try { if let v = self._features { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try { if let v = self._debugRedact { - try visitor.visitSingularBoolField(value: v, fieldNumber: 3) - } }() - if !self.uninterpretedOption.isEmpty { - try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999) - } - try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912) - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_EnumValueOptions, rhs: Google_Protobuf_EnumValueOptions) -> Bool { - if lhs._deprecated != rhs._deprecated {return false} - if lhs._features != rhs._features {return false} - if lhs._debugRedact != rhs._debugRedact {return false} - if lhs.uninterpretedOption != rhs.uninterpretedOption {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false} - return true - } -} - -extension Google_Protobuf_ServiceOptions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ServiceOptions" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 34: .same(proto: "features"), - 33: .same(proto: "deprecated"), - 999: .standard(proto: "uninterpreted_option"), - ] - - public var isInitialized: Bool { - if !_protobuf_extensionFieldValues.isInitialized {return false} - if let v = self._features, !v.isInitialized {return false} - if !SwiftProtobuf.Internal.areAllInitialized(self.uninterpretedOption) {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 33: try { try decoder.decodeSingularBoolField(value: &self._deprecated) }() - case 34: try { try decoder.decodeSingularMessageField(value: &self._features) }() - case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }() - case 1000..<536870912: - try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_ServiceOptions.self, fieldNumber: fieldNumber) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._deprecated { - try visitor.visitSingularBoolField(value: v, fieldNumber: 33) - } }() - try { if let v = self._features { - try visitor.visitSingularMessageField(value: v, fieldNumber: 34) - } }() - if !self.uninterpretedOption.isEmpty { - try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999) - } - try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912) - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_ServiceOptions, rhs: Google_Protobuf_ServiceOptions) -> Bool { - if lhs._features != rhs._features {return false} - if lhs._deprecated != rhs._deprecated {return false} - if lhs.uninterpretedOption != rhs.uninterpretedOption {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false} - return true - } -} - -extension Google_Protobuf_MethodOptions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".MethodOptions" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 33: .same(proto: "deprecated"), - 34: .standard(proto: "idempotency_level"), - 35: .same(proto: "features"), - 999: .standard(proto: "uninterpreted_option"), - ] - - public var isInitialized: Bool { - if !_protobuf_extensionFieldValues.isInitialized {return false} - if let v = self._features, !v.isInitialized {return false} - if !SwiftProtobuf.Internal.areAllInitialized(self.uninterpretedOption) {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 33: try { try decoder.decodeSingularBoolField(value: &self._deprecated) }() - case 34: try { try decoder.decodeSingularEnumField(value: &self._idempotencyLevel) }() - case 35: try { try decoder.decodeSingularMessageField(value: &self._features) }() - case 999: try { try decoder.decodeRepeatedMessageField(value: &self.uninterpretedOption) }() - case 1000..<536870912: - try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_MethodOptions.self, fieldNumber: fieldNumber) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._deprecated { - try visitor.visitSingularBoolField(value: v, fieldNumber: 33) - } }() - try { if let v = self._idempotencyLevel { - try visitor.visitSingularEnumField(value: v, fieldNumber: 34) - } }() - try { if let v = self._features { - try visitor.visitSingularMessageField(value: v, fieldNumber: 35) - } }() - if !self.uninterpretedOption.isEmpty { - try visitor.visitRepeatedMessageField(value: self.uninterpretedOption, fieldNumber: 999) - } - try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 536870912) - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_MethodOptions, rhs: Google_Protobuf_MethodOptions) -> Bool { - if lhs._deprecated != rhs._deprecated {return false} - if lhs._idempotencyLevel != rhs._idempotencyLevel {return false} - if lhs._features != rhs._features {return false} - if lhs.uninterpretedOption != rhs.uninterpretedOption {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false} - return true - } -} - -extension Google_Protobuf_MethodOptions.IdempotencyLevel: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "IDEMPOTENCY_UNKNOWN"), - 1: .same(proto: "NO_SIDE_EFFECTS"), - 2: .same(proto: "IDEMPOTENT"), - ] -} - -extension Google_Protobuf_UninterpretedOption: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".UninterpretedOption" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 2: .same(proto: "name"), - 3: .standard(proto: "identifier_value"), - 4: .standard(proto: "positive_int_value"), - 5: .standard(proto: "negative_int_value"), - 6: .standard(proto: "double_value"), - 7: .standard(proto: "string_value"), - 8: .standard(proto: "aggregate_value"), - ] - - public var isInitialized: Bool { - if !SwiftProtobuf.Internal.areAllInitialized(self.name) {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.name) }() - case 3: try { try decoder.decodeSingularStringField(value: &self._identifierValue) }() - case 4: try { try decoder.decodeSingularUInt64Field(value: &self._positiveIntValue) }() - case 5: try { try decoder.decodeSingularInt64Field(value: &self._negativeIntValue) }() - case 6: try { try decoder.decodeSingularDoubleField(value: &self._doubleValue) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self._stringValue) }() - case 8: try { try decoder.decodeSingularStringField(value: &self._aggregateValue) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.name.isEmpty { - try visitor.visitRepeatedMessageField(value: self.name, fieldNumber: 2) - } - try { if let v = self._identifierValue { - try visitor.visitSingularStringField(value: v, fieldNumber: 3) - } }() - try { if let v = self._positiveIntValue { - try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4) - } }() - try { if let v = self._negativeIntValue { - try visitor.visitSingularInt64Field(value: v, fieldNumber: 5) - } }() - try { if let v = self._doubleValue { - try visitor.visitSingularDoubleField(value: v, fieldNumber: 6) - } }() - try { if let v = self._stringValue { - try visitor.visitSingularBytesField(value: v, fieldNumber: 7) - } }() - try { if let v = self._aggregateValue { - try visitor.visitSingularStringField(value: v, fieldNumber: 8) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_UninterpretedOption, rhs: Google_Protobuf_UninterpretedOption) -> Bool { - if lhs.name != rhs.name {return false} - if lhs._identifierValue != rhs._identifierValue {return false} - if lhs._positiveIntValue != rhs._positiveIntValue {return false} - if lhs._negativeIntValue != rhs._negativeIntValue {return false} - if lhs._doubleValue != rhs._doubleValue {return false} - if lhs._stringValue != rhs._stringValue {return false} - if lhs._aggregateValue != rhs._aggregateValue {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_UninterpretedOption.NamePart: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = Google_Protobuf_UninterpretedOption.protoMessageName + ".NamePart" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "name_part"), - 2: .standard(proto: "is_extension"), - ] - - public var isInitialized: Bool { - if self._namePart == nil {return false} - if self._isExtension == nil {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self._namePart) }() - case 2: try { try decoder.decodeSingularBoolField(value: &self._isExtension) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._namePart { - try visitor.visitSingularStringField(value: v, fieldNumber: 1) - } }() - try { if let v = self._isExtension { - try visitor.visitSingularBoolField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_UninterpretedOption.NamePart, rhs: Google_Protobuf_UninterpretedOption.NamePart) -> Bool { - if lhs._namePart != rhs._namePart {return false} - if lhs._isExtension != rhs._isExtension {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_FeatureSet: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FeatureSet" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "field_presence"), - 2: .standard(proto: "enum_type"), - 3: .standard(proto: "repeated_field_encoding"), - 5: .standard(proto: "message_encoding"), - 6: .standard(proto: "json_format"), - ] - - public var isInitialized: Bool { - if !_protobuf_extensionFieldValues.isInitialized {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self._fieldPresence) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self._enumType) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self._repeatedFieldEncoding) }() - case 5: try { try decoder.decodeSingularEnumField(value: &self._messageEncoding) }() - case 6: try { try decoder.decodeSingularEnumField(value: &self._jsonFormat) }() - case 1000..<1002, 9995..<10000: - try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: Google_Protobuf_FeatureSet.self, fieldNumber: fieldNumber) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._fieldPresence { - try visitor.visitSingularEnumField(value: v, fieldNumber: 1) - } }() - try { if let v = self._enumType { - try visitor.visitSingularEnumField(value: v, fieldNumber: 2) - } }() - try { if let v = self._repeatedFieldEncoding { - try visitor.visitSingularEnumField(value: v, fieldNumber: 3) - } }() - try { if let v = self._messageEncoding { - try visitor.visitSingularEnumField(value: v, fieldNumber: 5) - } }() - try { if let v = self._jsonFormat { - try visitor.visitSingularEnumField(value: v, fieldNumber: 6) - } }() - try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 1000, end: 10000) - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_FeatureSet, rhs: Google_Protobuf_FeatureSet) -> Bool { - if lhs._fieldPresence != rhs._fieldPresence {return false} - if lhs._enumType != rhs._enumType {return false} - if lhs._repeatedFieldEncoding != rhs._repeatedFieldEncoding {return false} - if lhs._messageEncoding != rhs._messageEncoding {return false} - if lhs._jsonFormat != rhs._jsonFormat {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false} - return true - } -} - -extension Google_Protobuf_FeatureSet.FieldPresence: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "FIELD_PRESENCE_UNKNOWN"), - 1: .same(proto: "EXPLICIT"), - 2: .same(proto: "IMPLICIT"), - 3: .same(proto: "LEGACY_REQUIRED"), - ] -} - -extension Google_Protobuf_FeatureSet.EnumType: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "ENUM_TYPE_UNKNOWN"), - 1: .same(proto: "OPEN"), - 2: .same(proto: "CLOSED"), - ] -} - -extension Google_Protobuf_FeatureSet.RepeatedFieldEncoding: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "REPEATED_FIELD_ENCODING_UNKNOWN"), - 1: .same(proto: "PACKED"), - 2: .same(proto: "EXPANDED"), - ] -} - -extension Google_Protobuf_FeatureSet.MessageEncoding: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "MESSAGE_ENCODING_UNKNOWN"), - 1: .same(proto: "LENGTH_PREFIXED"), - 2: .same(proto: "DELIMITED"), - ] -} - -extension Google_Protobuf_FeatureSet.JsonFormat: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "JSON_FORMAT_UNKNOWN"), - 1: .same(proto: "ALLOW"), - 2: .same(proto: "LEGACY_BEST_EFFORT"), - ] -} - -extension Google_Protobuf_FeatureSetDefaults: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FeatureSetDefaults" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "defaults"), - 2: .standard(proto: "minimum_edition"), - 3: .standard(proto: "maximum_edition"), - 4: .standard(proto: "minimum_edition_enum"), - 5: .standard(proto: "maximum_edition_enum"), - ] - - public var isInitialized: Bool { - if !SwiftProtobuf.Internal.areAllInitialized(self.defaults) {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.defaults) }() - case 2: try { try decoder.decodeSingularStringField(value: &self._minimumEdition) }() - case 3: try { try decoder.decodeSingularStringField(value: &self._maximumEdition) }() - case 4: try { try decoder.decodeSingularEnumField(value: &self._minimumEditionEnum) }() - case 5: try { try decoder.decodeSingularEnumField(value: &self._maximumEditionEnum) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.defaults.isEmpty { - try visitor.visitRepeatedMessageField(value: self.defaults, fieldNumber: 1) - } - try { if let v = self._minimumEdition { - try visitor.visitSingularStringField(value: v, fieldNumber: 2) - } }() - try { if let v = self._maximumEdition { - try visitor.visitSingularStringField(value: v, fieldNumber: 3) - } }() - try { if let v = self._minimumEditionEnum { - try visitor.visitSingularEnumField(value: v, fieldNumber: 4) - } }() - try { if let v = self._maximumEditionEnum { - try visitor.visitSingularEnumField(value: v, fieldNumber: 5) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_FeatureSetDefaults, rhs: Google_Protobuf_FeatureSetDefaults) -> Bool { - if lhs.defaults != rhs.defaults {return false} - if lhs._minimumEdition != rhs._minimumEdition {return false} - if lhs._maximumEdition != rhs._maximumEdition {return false} - if lhs._minimumEditionEnum != rhs._minimumEditionEnum {return false} - if lhs._maximumEditionEnum != rhs._maximumEditionEnum {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = Google_Protobuf_FeatureSetDefaults.protoMessageName + ".FeatureSetEditionDefault" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "edition"), - 3: .standard(proto: "edition_enum"), - 2: .same(proto: "features"), - ] - - public var isInitialized: Bool { - if let v = self._features, !v.isInitialized {return false} - return true - } - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self._edition) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._features) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self._editionEnum) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._edition { - try visitor.visitSingularStringField(value: v, fieldNumber: 1) - } }() - try { if let v = self._features { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try { if let v = self._editionEnum { - try visitor.visitSingularEnumField(value: v, fieldNumber: 3) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault, rhs: Google_Protobuf_FeatureSetDefaults.FeatureSetEditionDefault) -> Bool { - if lhs._edition != rhs._edition {return false} - if lhs._editionEnum != rhs._editionEnum {return false} - if lhs._features != rhs._features {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_SourceCodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SourceCodeInfo" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "location"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.location) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.location.isEmpty { - try visitor.visitRepeatedMessageField(value: self.location, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_SourceCodeInfo, rhs: Google_Protobuf_SourceCodeInfo) -> Bool { - if lhs.location != rhs.location {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_SourceCodeInfo.Location: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = Google_Protobuf_SourceCodeInfo.protoMessageName + ".Location" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "path"), - 2: .same(proto: "span"), - 3: .standard(proto: "leading_comments"), - 4: .standard(proto: "trailing_comments"), - 6: .standard(proto: "leading_detached_comments"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedInt32Field(value: &self.path) }() - case 2: try { try decoder.decodeRepeatedInt32Field(value: &self.span) }() - case 3: try { try decoder.decodeSingularStringField(value: &self._leadingComments) }() - case 4: try { try decoder.decodeSingularStringField(value: &self._trailingComments) }() - case 6: try { try decoder.decodeRepeatedStringField(value: &self.leadingDetachedComments) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.path.isEmpty { - try visitor.visitPackedInt32Field(value: self.path, fieldNumber: 1) - } - if !self.span.isEmpty { - try visitor.visitPackedInt32Field(value: self.span, fieldNumber: 2) - } - try { if let v = self._leadingComments { - try visitor.visitSingularStringField(value: v, fieldNumber: 3) - } }() - try { if let v = self._trailingComments { - try visitor.visitSingularStringField(value: v, fieldNumber: 4) - } }() - if !self.leadingDetachedComments.isEmpty { - try visitor.visitRepeatedStringField(value: self.leadingDetachedComments, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_SourceCodeInfo.Location, rhs: Google_Protobuf_SourceCodeInfo.Location) -> Bool { - if lhs.path != rhs.path {return false} - if lhs.span != rhs.span {return false} - if lhs._leadingComments != rhs._leadingComments {return false} - if lhs._trailingComments != rhs._trailingComments {return false} - if lhs.leadingDetachedComments != rhs.leadingDetachedComments {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_GeneratedCodeInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".GeneratedCodeInfo" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "annotation"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.annotation) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.annotation.isEmpty { - try visitor.visitRepeatedMessageField(value: self.annotation, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_GeneratedCodeInfo, rhs: Google_Protobuf_GeneratedCodeInfo) -> Bool { - if lhs.annotation != rhs.annotation {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_GeneratedCodeInfo.Annotation: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = Google_Protobuf_GeneratedCodeInfo.protoMessageName + ".Annotation" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "path"), - 2: .standard(proto: "source_file"), - 3: .same(proto: "begin"), - 4: .same(proto: "end"), - 5: .same(proto: "semantic"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedInt32Field(value: &self.path) }() - case 2: try { try decoder.decodeSingularStringField(value: &self._sourceFile) }() - case 3: try { try decoder.decodeSingularInt32Field(value: &self._begin) }() - case 4: try { try decoder.decodeSingularInt32Field(value: &self._end) }() - case 5: try { try decoder.decodeSingularEnumField(value: &self._semantic) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.path.isEmpty { - try visitor.visitPackedInt32Field(value: self.path, fieldNumber: 1) - } - try { if let v = self._sourceFile { - try visitor.visitSingularStringField(value: v, fieldNumber: 2) - } }() - try { if let v = self._begin { - try visitor.visitSingularInt32Field(value: v, fieldNumber: 3) - } }() - try { if let v = self._end { - try visitor.visitSingularInt32Field(value: v, fieldNumber: 4) - } }() - try { if let v = self._semantic { - try visitor.visitSingularEnumField(value: v, fieldNumber: 5) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_GeneratedCodeInfo.Annotation, rhs: Google_Protobuf_GeneratedCodeInfo.Annotation) -> Bool { - if lhs.path != rhs.path {return false} - if lhs._sourceFile != rhs._sourceFile {return false} - if lhs._begin != rhs._begin {return false} - if lhs._end != rhs._end {return false} - if lhs._semantic != rhs._semantic {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_GeneratedCodeInfo.Annotation.Semantic: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "NONE"), - 1: .same(proto: "SET"), - 2: .same(proto: "ALIAS"), - ] -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/duration.pb.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/duration.pb.swift deleted file mode 100644 index bbde204b..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/duration.pb.swift +++ /dev/null @@ -1,177 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: google/protobuf/duration.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import Foundation - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// A Duration represents a signed, fixed-length span of time represented -/// as a count of seconds and fractions of seconds at nanosecond -/// resolution. It is independent of any calendar and concepts like "day" -/// or "month". It is related to Timestamp in that the difference between -/// two Timestamp values is a Duration and it can be added or subtracted -/// from a Timestamp. Range is approximately +-10,000 years. -/// -/// # Examples -/// -/// Example 1: Compute Duration from two Timestamps in pseudo code. -/// -/// Timestamp start = ...; -/// Timestamp end = ...; -/// Duration duration = ...; -/// -/// duration.seconds = end.seconds - start.seconds; -/// duration.nanos = end.nanos - start.nanos; -/// -/// if (duration.seconds < 0 && duration.nanos > 0) { -/// duration.seconds += 1; -/// duration.nanos -= 1000000000; -/// } else if (duration.seconds > 0 && duration.nanos < 0) { -/// duration.seconds -= 1; -/// duration.nanos += 1000000000; -/// } -/// -/// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. -/// -/// Timestamp start = ...; -/// Duration duration = ...; -/// Timestamp end = ...; -/// -/// end.seconds = start.seconds + duration.seconds; -/// end.nanos = start.nanos + duration.nanos; -/// -/// if (end.nanos < 0) { -/// end.seconds -= 1; -/// end.nanos += 1000000000; -/// } else if (end.nanos >= 1000000000) { -/// end.seconds += 1; -/// end.nanos -= 1000000000; -/// } -/// -/// Example 3: Compute Duration from datetime.timedelta in Python. -/// -/// td = datetime.timedelta(days=3, minutes=10) -/// duration = Duration() -/// duration.FromTimedelta(td) -/// -/// # JSON Mapping -/// -/// In JSON format, the Duration type is encoded as a string rather than an -/// object, where the string ends in the suffix "s" (indicating seconds) and -/// is preceded by the number of seconds, with nanoseconds expressed as -/// fractional seconds. For example, 3 seconds with 0 nanoseconds should be -/// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should -/// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 -/// microsecond should be expressed in JSON format as "3.000001s". -public struct Google_Protobuf_Duration { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed seconds of the span of time. Must be from -315,576,000,000 - /// to +315,576,000,000 inclusive. Note: these bounds are computed from: - /// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - public var seconds: Int64 = 0 - - /// Signed fractions of a second at nanosecond resolution of the span - /// of time. Durations less than one second are represented with a 0 - /// `seconds` field and a positive or negative `nanos` field. For durations - /// of one second or more, a non-zero value for the `nanos` field must be - /// of the same sign as the `seconds` field. Must be from -999,999,999 - /// to +999,999,999 inclusive. - public var nanos: Int32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -#if swift(>=5.5) && canImport(_Concurrency) -extension Google_Protobuf_Duration: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "google.protobuf" - -extension Google_Protobuf_Duration: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Duration" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "seconds"), - 2: .same(proto: "nanos"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.seconds) }() - case 2: try { try decoder.decodeSingularInt32Field(value: &self.nanos) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.seconds != 0 { - try visitor.visitSingularInt64Field(value: self.seconds, fieldNumber: 1) - } - if self.nanos != 0 { - try visitor.visitSingularInt32Field(value: self.nanos, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Duration, rhs: Google_Protobuf_Duration) -> Bool { - if lhs.seconds != rhs.seconds {return false} - if lhs.nanos != rhs.nanos {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/empty.pb.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/empty.pb.swift deleted file mode 100644 index 0eff5267..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/empty.pb.swift +++ /dev/null @@ -1,94 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: google/protobuf/empty.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import Foundation - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// A generic empty message that you can re-use to avoid defining duplicated -/// empty messages in your APIs. A typical example is to use it as the request -/// or the response type of an API method. For instance: -/// -/// service Foo { -/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); -/// } -public struct Google_Protobuf_Empty { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -#if swift(>=5.5) && canImport(_Concurrency) -extension Google_Protobuf_Empty: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "google.protobuf" - -extension Google_Protobuf_Empty: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Empty" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - public mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - public func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Empty, rhs: Google_Protobuf_Empty) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/field_mask.pb.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/field_mask.pb.swift deleted file mode 100644 index 31128db4..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/field_mask.pb.swift +++ /dev/null @@ -1,302 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: google/protobuf/field_mask.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import Foundation - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// `FieldMask` represents a set of symbolic field paths, for example: -/// -/// paths: "f.a" -/// paths: "f.b.d" -/// -/// Here `f` represents a field in some root message, `a` and `b` -/// fields in the message found in `f`, and `d` a field found in the -/// message in `f.b`. -/// -/// Field masks are used to specify a subset of fields that should be -/// returned by a get operation or modified by an update operation. -/// Field masks also have a custom JSON encoding (see below). -/// -/// # Field Masks in Projections -/// -/// When used in the context of a projection, a response message or -/// sub-message is filtered by the API to only contain those fields as -/// specified in the mask. For example, if the mask in the previous -/// example is applied to a response message as follows: -/// -/// f { -/// a : 22 -/// b { -/// d : 1 -/// x : 2 -/// } -/// y : 13 -/// } -/// z: 8 -/// -/// The result will not contain specific values for fields x,y and z -/// (their value will be set to the default, and omitted in proto text -/// output): -/// -/// -/// f { -/// a : 22 -/// b { -/// d : 1 -/// } -/// } -/// -/// A repeated field is not allowed except at the last position of a -/// paths string. -/// -/// If a FieldMask object is not present in a get operation, the -/// operation applies to all fields (as if a FieldMask of all fields -/// had been specified). -/// -/// Note that a field mask does not necessarily apply to the -/// top-level response message. In case of a REST get operation, the -/// field mask applies directly to the response, but in case of a REST -/// list operation, the mask instead applies to each individual message -/// in the returned resource list. In case of a REST custom method, -/// other definitions may be used. Where the mask applies will be -/// clearly documented together with its declaration in the API. In -/// any case, the effect on the returned resource/resources is required -/// behavior for APIs. -/// -/// # Field Masks in Update Operations -/// -/// A field mask in update operations specifies which fields of the -/// targeted resource are going to be updated. The API is required -/// to only change the values of the fields as specified in the mask -/// and leave the others untouched. If a resource is passed in to -/// describe the updated values, the API ignores the values of all -/// fields not covered by the mask. -/// -/// If a repeated field is specified for an update operation, new values will -/// be appended to the existing repeated field in the target resource. Note that -/// a repeated field is only allowed in the last position of a `paths` string. -/// -/// If a sub-message is specified in the last position of the field mask for an -/// update operation, then new value will be merged into the existing sub-message -/// in the target resource. -/// -/// For example, given the target message: -/// -/// f { -/// b { -/// d: 1 -/// x: 2 -/// } -/// c: [1] -/// } -/// -/// And an update message: -/// -/// f { -/// b { -/// d: 10 -/// } -/// c: [2] -/// } -/// -/// then if the field mask is: -/// -/// paths: ["f.b", "f.c"] -/// -/// then the result will be: -/// -/// f { -/// b { -/// d: 10 -/// x: 2 -/// } -/// c: [1, 2] -/// } -/// -/// An implementation may provide options to override this default behavior for -/// repeated and message fields. -/// -/// In order to reset a field's value to the default, the field must -/// be in the mask and set to the default value in the provided resource. -/// Hence, in order to reset all fields of a resource, provide a default -/// instance of the resource and set all fields in the mask, or do -/// not provide a mask as described below. -/// -/// If a field mask is not present on update, the operation applies to -/// all fields (as if a field mask of all fields has been specified). -/// Note that in the presence of schema evolution, this may mean that -/// fields the client does not know and has therefore not filled into -/// the request will be reset to their default. If this is unwanted -/// behavior, a specific service may require a client to always specify -/// a field mask, producing an error if not. -/// -/// As with get operations, the location of the resource which -/// describes the updated values in the request message depends on the -/// operation kind. In any case, the effect of the field mask is -/// required to be honored by the API. -/// -/// ## Considerations for HTTP REST -/// -/// The HTTP kind of an update operation which uses a field mask must -/// be set to PATCH instead of PUT in order to satisfy HTTP semantics -/// (PUT must only be used for full updates). -/// -/// # JSON Encoding of Field Masks -/// -/// In JSON, a field mask is encoded as a single string where paths are -/// separated by a comma. Fields name in each path are converted -/// to/from lower-camel naming conventions. -/// -/// As an example, consider the following message declarations: -/// -/// message Profile { -/// User user = 1; -/// Photo photo = 2; -/// } -/// message User { -/// string display_name = 1; -/// string address = 2; -/// } -/// -/// In proto a field mask for `Profile` may look as such: -/// -/// mask { -/// paths: "user.display_name" -/// paths: "photo" -/// } -/// -/// In JSON, the same mask is represented as below: -/// -/// { -/// mask: "user.displayName,photo" -/// } -/// -/// # Field Masks and Oneof Fields -/// -/// Field masks treat fields in oneofs just as regular fields. Consider the -/// following message: -/// -/// message SampleMessage { -/// oneof test_oneof { -/// string name = 4; -/// SubMessage sub_message = 9; -/// } -/// } -/// -/// The field mask can be: -/// -/// mask { -/// paths: "name" -/// } -/// -/// Or: -/// -/// mask { -/// paths: "sub_message" -/// } -/// -/// Note that oneof type names ("test_oneof" in this case) cannot be used in -/// paths. -/// -/// ## Field Mask Verification -/// -/// The implementation of any API method which has a FieldMask type field in the -/// request should verify the included field paths, and return an -/// `INVALID_ARGUMENT` error if any path is unmappable. -public struct Google_Protobuf_FieldMask { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The set of field mask paths. - public var paths: [String] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -#if swift(>=5.5) && canImport(_Concurrency) -extension Google_Protobuf_FieldMask: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "google.protobuf" - -extension Google_Protobuf_FieldMask: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FieldMask" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "paths"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedStringField(value: &self.paths) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.paths.isEmpty { - try visitor.visitRepeatedStringField(value: self.paths, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_FieldMask, rhs: Google_Protobuf_FieldMask) -> Bool { - if lhs.paths != rhs.paths {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/source_context.pb.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/source_context.pb.swift deleted file mode 100644 index f7070bb4..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/source_context.pb.swift +++ /dev/null @@ -1,106 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: google/protobuf/source_context.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import Foundation - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// `SourceContext` represents information about the source of a -/// protobuf element, like the file in which it is defined. -public struct Google_Protobuf_SourceContext { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The path-qualified name of the .proto file that contained the associated - /// protobuf element. For example: `"google/protobuf/source_context.proto"`. - public var fileName: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -#if swift(>=5.5) && canImport(_Concurrency) -extension Google_Protobuf_SourceContext: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "google.protobuf" - -extension Google_Protobuf_SourceContext: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SourceContext" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "file_name"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.fileName) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fileName.isEmpty { - try visitor.visitSingularStringField(value: self.fileName, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_SourceContext, rhs: Google_Protobuf_SourceContext) -> Bool { - if lhs.fileName != rhs.fileName {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/struct.pb.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/struct.pb.swift deleted file mode 100644 index 0c568b59..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/struct.pb.swift +++ /dev/null @@ -1,457 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: google/protobuf/struct.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import Foundation - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// `NullValue` is a singleton enumeration to represent the null value for the -/// `Value` type union. -/// -/// The JSON representation for `NullValue` is JSON `null`. -public enum Google_Protobuf_NullValue: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Null value. - case nullValue // = 0 - case UNRECOGNIZED(Int) - - public init() { - self = .nullValue - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .nullValue - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .nullValue: return 0 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension Google_Protobuf_NullValue: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static let allCases: [Google_Protobuf_NullValue] = [ - .nullValue, - ] -} - -#endif // swift(>=4.2) - -/// `Struct` represents a structured data value, consisting of fields -/// which map to dynamically typed values. In some languages, `Struct` -/// might be supported by a native representation. For example, in -/// scripting languages like JS a struct is represented as an -/// object. The details of that representation are described together -/// with the proto support for the language. -/// -/// The JSON representation for `Struct` is JSON object. -public struct Google_Protobuf_Struct { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Unordered map of dynamically typed values. - public var fields: Dictionary = [:] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// `Value` represents a dynamically typed value which can be either -/// null, a number, a string, a boolean, a recursive struct value, or a -/// list of values. A producer of value is expected to set one of these -/// variants. Absence of any variant indicates an error. -/// -/// The JSON representation for `Value` is JSON value. -public struct Google_Protobuf_Value { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The kind of value. - public var kind: Google_Protobuf_Value.OneOf_Kind? = nil - - /// Represents a null value. - public var nullValue: Google_Protobuf_NullValue { - get { - if case .nullValue(let v)? = kind {return v} - return .nullValue - } - set {kind = .nullValue(newValue)} - } - - /// Represents a double value. - public var numberValue: Double { - get { - if case .numberValue(let v)? = kind {return v} - return 0 - } - set {kind = .numberValue(newValue)} - } - - /// Represents a string value. - public var stringValue: String { - get { - if case .stringValue(let v)? = kind {return v} - return String() - } - set {kind = .stringValue(newValue)} - } - - /// Represents a boolean value. - public var boolValue: Bool { - get { - if case .boolValue(let v)? = kind {return v} - return false - } - set {kind = .boolValue(newValue)} - } - - /// Represents a structured value. - public var structValue: Google_Protobuf_Struct { - get { - if case .structValue(let v)? = kind {return v} - return Google_Protobuf_Struct() - } - set {kind = .structValue(newValue)} - } - - /// Represents a repeated `Value`. - public var listValue: Google_Protobuf_ListValue { - get { - if case .listValue(let v)? = kind {return v} - return Google_Protobuf_ListValue() - } - set {kind = .listValue(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// The kind of value. - public enum OneOf_Kind: Equatable { - /// Represents a null value. - case nullValue(Google_Protobuf_NullValue) - /// Represents a double value. - case numberValue(Double) - /// Represents a string value. - case stringValue(String) - /// Represents a boolean value. - case boolValue(Bool) - /// Represents a structured value. - case structValue(Google_Protobuf_Struct) - /// Represents a repeated `Value`. - case listValue(Google_Protobuf_ListValue) - - #if !swift(>=4.1) - public static func ==(lhs: Google_Protobuf_Value.OneOf_Kind, rhs: Google_Protobuf_Value.OneOf_Kind) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.nullValue, .nullValue): return { - guard case .nullValue(let l) = lhs, case .nullValue(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.numberValue, .numberValue): return { - guard case .numberValue(let l) = lhs, case .numberValue(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stringValue, .stringValue): return { - guard case .stringValue(let l) = lhs, case .stringValue(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.boolValue, .boolValue): return { - guard case .boolValue(let l) = lhs, case .boolValue(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.structValue, .structValue): return { - guard case .structValue(let l) = lhs, case .structValue(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.listValue, .listValue): return { - guard case .listValue(let l) = lhs, case .listValue(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// `ListValue` is a wrapper around a repeated field of values. -/// -/// The JSON representation for `ListValue` is JSON array. -public struct Google_Protobuf_ListValue { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Repeated field of dynamically typed values. - public var values: [Google_Protobuf_Value] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -#if swift(>=5.5) && canImport(_Concurrency) -extension Google_Protobuf_NullValue: @unchecked Sendable {} -extension Google_Protobuf_Struct: @unchecked Sendable {} -extension Google_Protobuf_Value: @unchecked Sendable {} -extension Google_Protobuf_Value.OneOf_Kind: @unchecked Sendable {} -extension Google_Protobuf_ListValue: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "google.protobuf" - -extension Google_Protobuf_NullValue: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "NULL_VALUE"), - ] -} - -extension Google_Protobuf_Struct: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Struct" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "fields"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.fields) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fields.isEmpty { - try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.fields, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Struct, rhs: Google_Protobuf_Struct) -> Bool { - if lhs.fields != rhs.fields {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_Value: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Value" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "null_value"), - 2: .standard(proto: "number_value"), - 3: .standard(proto: "string_value"), - 4: .standard(proto: "bool_value"), - 5: .standard(proto: "struct_value"), - 6: .standard(proto: "list_value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: Google_Protobuf_NullValue? - try decoder.decodeSingularEnumField(value: &v) - if let v = v { - if self.kind != nil {try decoder.handleConflictingOneOf()} - self.kind = .nullValue(v) - } - }() - case 2: try { - var v: Double? - try decoder.decodeSingularDoubleField(value: &v) - if let v = v { - if self.kind != nil {try decoder.handleConflictingOneOf()} - self.kind = .numberValue(v) - } - }() - case 3: try { - var v: String? - try decoder.decodeSingularStringField(value: &v) - if let v = v { - if self.kind != nil {try decoder.handleConflictingOneOf()} - self.kind = .stringValue(v) - } - }() - case 4: try { - var v: Bool? - try decoder.decodeSingularBoolField(value: &v) - if let v = v { - if self.kind != nil {try decoder.handleConflictingOneOf()} - self.kind = .boolValue(v) - } - }() - case 5: try { - var v: Google_Protobuf_Struct? - var hadOneofValue = false - if let current = self.kind { - hadOneofValue = true - if case .structValue(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.kind = .structValue(v) - } - }() - case 6: try { - var v: Google_Protobuf_ListValue? - var hadOneofValue = false - if let current = self.kind { - hadOneofValue = true - if case .listValue(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.kind = .listValue(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.kind { - case .nullValue?: try { - guard case .nullValue(let v)? = self.kind else { preconditionFailure() } - try visitor.visitSingularEnumField(value: v, fieldNumber: 1) - }() - case .numberValue?: try { - guard case .numberValue(let v)? = self.kind else { preconditionFailure() } - try visitor.visitSingularDoubleField(value: v, fieldNumber: 2) - }() - case .stringValue?: try { - guard case .stringValue(let v)? = self.kind else { preconditionFailure() } - try visitor.visitSingularStringField(value: v, fieldNumber: 3) - }() - case .boolValue?: try { - guard case .boolValue(let v)? = self.kind else { preconditionFailure() } - try visitor.visitSingularBoolField(value: v, fieldNumber: 4) - }() - case .structValue?: try { - guard case .structValue(let v)? = self.kind else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - }() - case .listValue?: try { - guard case .listValue(let v)? = self.kind else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Value, rhs: Google_Protobuf_Value) -> Bool { - if lhs.kind != rhs.kind {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_ListValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ListValue" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "values"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.values) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.values.isEmpty { - try visitor.visitRepeatedMessageField(value: self.values, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_ListValue, rhs: Google_Protobuf_ListValue) -> Bool { - if lhs.values != rhs.values {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/timestamp.pb.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/timestamp.pb.swift deleted file mode 100644 index ac6b2f62..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/timestamp.pb.swift +++ /dev/null @@ -1,206 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: google/protobuf/timestamp.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import Foundation - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// A Timestamp represents a point in time independent of any time zone or local -/// calendar, encoded as a count of seconds and fractions of seconds at -/// nanosecond resolution. The count is relative to an epoch at UTC midnight on -/// January 1, 1970, in the proleptic Gregorian calendar which extends the -/// Gregorian calendar backwards to year one. -/// -/// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap -/// second table is needed for interpretation, using a [24-hour linear -/// smear](https://developers.google.com/time/smear). -/// -/// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By -/// restricting to that range, we ensure that we can convert to and from [RFC -/// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. -/// -/// # Examples -/// -/// Example 1: Compute Timestamp from POSIX `time()`. -/// -/// Timestamp timestamp; -/// timestamp.set_seconds(time(NULL)); -/// timestamp.set_nanos(0); -/// -/// Example 2: Compute Timestamp from POSIX `gettimeofday()`. -/// -/// struct timeval tv; -/// gettimeofday(&tv, NULL); -/// -/// Timestamp timestamp; -/// timestamp.set_seconds(tv.tv_sec); -/// timestamp.set_nanos(tv.tv_usec * 1000); -/// -/// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. -/// -/// FILETIME ft; -/// GetSystemTimeAsFileTime(&ft); -/// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; -/// -/// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z -/// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. -/// Timestamp timestamp; -/// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); -/// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); -/// -/// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. -/// -/// long millis = System.currentTimeMillis(); -/// -/// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) -/// .setNanos((int) ((millis % 1000) * 1000000)).build(); -/// -/// Example 5: Compute Timestamp from Java `Instant.now()`. -/// -/// Instant now = Instant.now(); -/// -/// Timestamp timestamp = -/// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) -/// .setNanos(now.getNano()).build(); -/// -/// Example 6: Compute Timestamp from current time in Python. -/// -/// timestamp = Timestamp() -/// timestamp.GetCurrentTime() -/// -/// # JSON Mapping -/// -/// In JSON format, the Timestamp type is encoded as a string in the -/// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the -/// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" -/// where {year} is always expressed using four digits while {month}, {day}, -/// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional -/// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), -/// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone -/// is required. A proto3 JSON serializer should always use UTC (as indicated by -/// "Z") when printing the Timestamp type and a proto3 JSON parser should be -/// able to accept both UTC and other timezones (as indicated by an offset). -/// -/// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past -/// 01:30 UTC on January 15, 2017. -/// -/// In JavaScript, one can convert a Date object to this format using the -/// standard -/// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) -/// method. In Python, a standard `datetime.datetime` object can be converted -/// to this format using -/// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with -/// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use -/// the Joda Time's [`ISODateTimeFormat.dateTime()`]( -/// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() -/// ) to obtain a formatter capable of generating timestamps in this format. -public struct Google_Protobuf_Timestamp { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Represents seconds of UTC time since Unix epoch - /// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - /// 9999-12-31T23:59:59Z inclusive. - public var seconds: Int64 = 0 - - /// Non-negative fractions of a second at nanosecond resolution. Negative - /// second values with fractions must still have non-negative nanos values - /// that count forward in time. Must be from 0 to 999,999,999 - /// inclusive. - public var nanos: Int32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -#if swift(>=5.5) && canImport(_Concurrency) -extension Google_Protobuf_Timestamp: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "google.protobuf" - -extension Google_Protobuf_Timestamp: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Timestamp" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "seconds"), - 2: .same(proto: "nanos"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.seconds) }() - case 2: try { try decoder.decodeSingularInt32Field(value: &self.nanos) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.seconds != 0 { - try visitor.visitSingularInt64Field(value: self.seconds, fieldNumber: 1) - } - if self.nanos != 0 { - try visitor.visitSingularInt32Field(value: self.nanos, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Timestamp, rhs: Google_Protobuf_Timestamp) -> Bool { - if lhs.seconds != rhs.seconds {return false} - if lhs.nanos != rhs.nanos {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/type.pb.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/type.pb.swift deleted file mode 100644 index 80578425..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/type.pb.swift +++ /dev/null @@ -1,842 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: google/protobuf/type.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import Foundation - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// The syntax in which a protocol buffer element is defined. -public enum Google_Protobuf_Syntax: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Syntax `proto2`. - case proto2 // = 0 - - /// Syntax `proto3`. - case proto3 // = 1 - - /// Syntax `editions`. - case editions // = 2 - case UNRECOGNIZED(Int) - - public init() { - self = .proto2 - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .proto2 - case 1: self = .proto3 - case 2: self = .editions - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .proto2: return 0 - case .proto3: return 1 - case .editions: return 2 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension Google_Protobuf_Syntax: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static let allCases: [Google_Protobuf_Syntax] = [ - .proto2, - .proto3, - .editions, - ] -} - -#endif // swift(>=4.2) - -/// A protocol buffer message type. -public struct Google_Protobuf_Type { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The fully qualified message name. - public var name: String = String() - - /// The list of fields. - public var fields: [Google_Protobuf_Field] = [] - - /// The list of types appearing in `oneof` definitions in this type. - public var oneofs: [String] = [] - - /// The protocol buffer options. - public var options: [Google_Protobuf_Option] = [] - - /// The source context. - public var sourceContext: Google_Protobuf_SourceContext { - get {return _sourceContext ?? Google_Protobuf_SourceContext()} - set {_sourceContext = newValue} - } - /// Returns true if `sourceContext` has been explicitly set. - public var hasSourceContext: Bool {return self._sourceContext != nil} - /// Clears the value of `sourceContext`. Subsequent reads from it will return its default value. - public mutating func clearSourceContext() {self._sourceContext = nil} - - /// The source syntax. - public var syntax: Google_Protobuf_Syntax = .proto2 - - /// The source edition string, only valid when syntax is SYNTAX_EDITIONS. - public var edition: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _sourceContext: Google_Protobuf_SourceContext? = nil -} - -/// A single field of a message type. -public struct Google_Protobuf_Field { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The field type. - public var kind: Google_Protobuf_Field.Kind = .typeUnknown - - /// The field cardinality. - public var cardinality: Google_Protobuf_Field.Cardinality = .unknown - - /// The field number. - public var number: Int32 = 0 - - /// The field name. - public var name: String = String() - - /// The field type URL, without the scheme, for message or enumeration - /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. - public var typeURL: String = String() - - /// The index of the field type in `Type.oneofs`, for message or enumeration - /// types. The first type has index 1; zero means the type is not in the list. - public var oneofIndex: Int32 = 0 - - /// Whether to use alternative packed wire representation. - public var packed: Bool = false - - /// The protocol buffer options. - public var options: [Google_Protobuf_Option] = [] - - /// The field JSON name. - public var jsonName: String = String() - - /// The string value of the default value of this field. Proto2 syntax only. - public var defaultValue: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Basic field types. - public enum Kind: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Field type unknown. - case typeUnknown // = 0 - - /// Field type double. - case typeDouble // = 1 - - /// Field type float. - case typeFloat // = 2 - - /// Field type int64. - case typeInt64 // = 3 - - /// Field type uint64. - case typeUint64 // = 4 - - /// Field type int32. - case typeInt32 // = 5 - - /// Field type fixed64. - case typeFixed64 // = 6 - - /// Field type fixed32. - case typeFixed32 // = 7 - - /// Field type bool. - case typeBool // = 8 - - /// Field type string. - case typeString // = 9 - - /// Field type group. Proto2 syntax only, and deprecated. - case typeGroup // = 10 - - /// Field type message. - case typeMessage // = 11 - - /// Field type bytes. - case typeBytes // = 12 - - /// Field type uint32. - case typeUint32 // = 13 - - /// Field type enum. - case typeEnum // = 14 - - /// Field type sfixed32. - case typeSfixed32 // = 15 - - /// Field type sfixed64. - case typeSfixed64 // = 16 - - /// Field type sint32. - case typeSint32 // = 17 - - /// Field type sint64. - case typeSint64 // = 18 - case UNRECOGNIZED(Int) - - public init() { - self = .typeUnknown - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .typeUnknown - case 1: self = .typeDouble - case 2: self = .typeFloat - case 3: self = .typeInt64 - case 4: self = .typeUint64 - case 5: self = .typeInt32 - case 6: self = .typeFixed64 - case 7: self = .typeFixed32 - case 8: self = .typeBool - case 9: self = .typeString - case 10: self = .typeGroup - case 11: self = .typeMessage - case 12: self = .typeBytes - case 13: self = .typeUint32 - case 14: self = .typeEnum - case 15: self = .typeSfixed32 - case 16: self = .typeSfixed64 - case 17: self = .typeSint32 - case 18: self = .typeSint64 - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .typeUnknown: return 0 - case .typeDouble: return 1 - case .typeFloat: return 2 - case .typeInt64: return 3 - case .typeUint64: return 4 - case .typeInt32: return 5 - case .typeFixed64: return 6 - case .typeFixed32: return 7 - case .typeBool: return 8 - case .typeString: return 9 - case .typeGroup: return 10 - case .typeMessage: return 11 - case .typeBytes: return 12 - case .typeUint32: return 13 - case .typeEnum: return 14 - case .typeSfixed32: return 15 - case .typeSfixed64: return 16 - case .typeSint32: return 17 - case .typeSint64: return 18 - case .UNRECOGNIZED(let i): return i - } - } - - } - - /// Whether a field is optional, required, or repeated. - public enum Cardinality: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// For fields with unknown cardinality. - case unknown // = 0 - - /// For optional fields. - case `optional` // = 1 - - /// For required fields. Proto2 syntax only. - case `required` // = 2 - - /// For repeated fields. - case repeated // = 3 - case UNRECOGNIZED(Int) - - public init() { - self = .unknown - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .optional - case 2: self = .required - case 3: self = .repeated - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .unknown: return 0 - case .optional: return 1 - case .required: return 2 - case .repeated: return 3 - case .UNRECOGNIZED(let i): return i - } - } - - } - - public init() {} -} - -#if swift(>=4.2) - -extension Google_Protobuf_Field.Kind: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static let allCases: [Google_Protobuf_Field.Kind] = [ - .typeUnknown, - .typeDouble, - .typeFloat, - .typeInt64, - .typeUint64, - .typeInt32, - .typeFixed64, - .typeFixed32, - .typeBool, - .typeString, - .typeGroup, - .typeMessage, - .typeBytes, - .typeUint32, - .typeEnum, - .typeSfixed32, - .typeSfixed64, - .typeSint32, - .typeSint64, - ] -} - -extension Google_Protobuf_Field.Cardinality: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static let allCases: [Google_Protobuf_Field.Cardinality] = [ - .unknown, - .optional, - .required, - .repeated, - ] -} - -#endif // swift(>=4.2) - -/// Enum type definition. -public struct Google_Protobuf_Enum { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Enum type name. - public var name: String = String() - - /// Enum value definitions. - public var enumvalue: [Google_Protobuf_EnumValue] = [] - - /// Protocol buffer options. - public var options: [Google_Protobuf_Option] = [] - - /// The source context. - public var sourceContext: Google_Protobuf_SourceContext { - get {return _sourceContext ?? Google_Protobuf_SourceContext()} - set {_sourceContext = newValue} - } - /// Returns true if `sourceContext` has been explicitly set. - public var hasSourceContext: Bool {return self._sourceContext != nil} - /// Clears the value of `sourceContext`. Subsequent reads from it will return its default value. - public mutating func clearSourceContext() {self._sourceContext = nil} - - /// The source syntax. - public var syntax: Google_Protobuf_Syntax = .proto2 - - /// The source edition string, only valid when syntax is SYNTAX_EDITIONS. - public var edition: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _sourceContext: Google_Protobuf_SourceContext? = nil -} - -/// Enum value definition. -public struct Google_Protobuf_EnumValue { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Enum value name. - public var name: String = String() - - /// Enum value number. - public var number: Int32 = 0 - - /// Protocol buffer options. - public var options: [Google_Protobuf_Option] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A protocol buffer option, which can be attached to a message, field, -/// enumeration, etc. -public struct Google_Protobuf_Option { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The option's name. For protobuf built-in options (options defined in - /// descriptor.proto), this is the short name. For example, `"map_entry"`. - /// For custom options, it should be the fully-qualified name. For example, - /// `"google.api.http"`. - public var name: String = String() - - /// The option's value packed in an Any message. If the value is a primitive, - /// the corresponding wrapper type defined in google/protobuf/wrappers.proto - /// should be used. If the value is an enum, it should be stored as an int32 - /// value using the google.protobuf.Int32Value type. - public var value: Google_Protobuf_Any { - get {return _value ?? Google_Protobuf_Any()} - set {_value = newValue} - } - /// Returns true if `value` has been explicitly set. - public var hasValue: Bool {return self._value != nil} - /// Clears the value of `value`. Subsequent reads from it will return its default value. - public mutating func clearValue() {self._value = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _value: Google_Protobuf_Any? = nil -} - -#if swift(>=5.5) && canImport(_Concurrency) -extension Google_Protobuf_Syntax: @unchecked Sendable {} -extension Google_Protobuf_Type: @unchecked Sendable {} -extension Google_Protobuf_Field: @unchecked Sendable {} -extension Google_Protobuf_Field.Kind: @unchecked Sendable {} -extension Google_Protobuf_Field.Cardinality: @unchecked Sendable {} -extension Google_Protobuf_Enum: @unchecked Sendable {} -extension Google_Protobuf_EnumValue: @unchecked Sendable {} -extension Google_Protobuf_Option: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "google.protobuf" - -extension Google_Protobuf_Syntax: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "SYNTAX_PROTO2"), - 1: .same(proto: "SYNTAX_PROTO3"), - 2: .same(proto: "SYNTAX_EDITIONS"), - ] -} - -extension Google_Protobuf_Type: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Type" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "fields"), - 3: .same(proto: "oneofs"), - 4: .same(proto: "options"), - 5: .standard(proto: "source_context"), - 6: .same(proto: "syntax"), - 7: .same(proto: "edition"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.fields) }() - case 3: try { try decoder.decodeRepeatedStringField(value: &self.oneofs) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.options) }() - case 5: try { try decoder.decodeSingularMessageField(value: &self._sourceContext) }() - case 6: try { try decoder.decodeSingularEnumField(value: &self.syntax) }() - case 7: try { try decoder.decodeSingularStringField(value: &self.edition) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) - } - if !self.fields.isEmpty { - try visitor.visitRepeatedMessageField(value: self.fields, fieldNumber: 2) - } - if !self.oneofs.isEmpty { - try visitor.visitRepeatedStringField(value: self.oneofs, fieldNumber: 3) - } - if !self.options.isEmpty { - try visitor.visitRepeatedMessageField(value: self.options, fieldNumber: 4) - } - try { if let v = self._sourceContext { - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - } }() - if self.syntax != .proto2 { - try visitor.visitSingularEnumField(value: self.syntax, fieldNumber: 6) - } - if !self.edition.isEmpty { - try visitor.visitSingularStringField(value: self.edition, fieldNumber: 7) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Type, rhs: Google_Protobuf_Type) -> Bool { - if lhs.name != rhs.name {return false} - if lhs.fields != rhs.fields {return false} - if lhs.oneofs != rhs.oneofs {return false} - if lhs.options != rhs.options {return false} - if lhs._sourceContext != rhs._sourceContext {return false} - if lhs.syntax != rhs.syntax {return false} - if lhs.edition != rhs.edition {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_Field: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Field" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "kind"), - 2: .same(proto: "cardinality"), - 3: .same(proto: "number"), - 4: .same(proto: "name"), - 6: .standard(proto: "type_url"), - 7: .standard(proto: "oneof_index"), - 8: .same(proto: "packed"), - 9: .same(proto: "options"), - 10: .standard(proto: "json_name"), - 11: .standard(proto: "default_value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.kind) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.cardinality) }() - case 3: try { try decoder.decodeSingularInt32Field(value: &self.number) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.typeURL) }() - case 7: try { try decoder.decodeSingularInt32Field(value: &self.oneofIndex) }() - case 8: try { try decoder.decodeSingularBoolField(value: &self.packed) }() - case 9: try { try decoder.decodeRepeatedMessageField(value: &self.options) }() - case 10: try { try decoder.decodeSingularStringField(value: &self.jsonName) }() - case 11: try { try decoder.decodeSingularStringField(value: &self.defaultValue) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.kind != .typeUnknown { - try visitor.visitSingularEnumField(value: self.kind, fieldNumber: 1) - } - if self.cardinality != .unknown { - try visitor.visitSingularEnumField(value: self.cardinality, fieldNumber: 2) - } - if self.number != 0 { - try visitor.visitSingularInt32Field(value: self.number, fieldNumber: 3) - } - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 4) - } - if !self.typeURL.isEmpty { - try visitor.visitSingularStringField(value: self.typeURL, fieldNumber: 6) - } - if self.oneofIndex != 0 { - try visitor.visitSingularInt32Field(value: self.oneofIndex, fieldNumber: 7) - } - if self.packed != false { - try visitor.visitSingularBoolField(value: self.packed, fieldNumber: 8) - } - if !self.options.isEmpty { - try visitor.visitRepeatedMessageField(value: self.options, fieldNumber: 9) - } - if !self.jsonName.isEmpty { - try visitor.visitSingularStringField(value: self.jsonName, fieldNumber: 10) - } - if !self.defaultValue.isEmpty { - try visitor.visitSingularStringField(value: self.defaultValue, fieldNumber: 11) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Field, rhs: Google_Protobuf_Field) -> Bool { - if lhs.kind != rhs.kind {return false} - if lhs.cardinality != rhs.cardinality {return false} - if lhs.number != rhs.number {return false} - if lhs.name != rhs.name {return false} - if lhs.typeURL != rhs.typeURL {return false} - if lhs.oneofIndex != rhs.oneofIndex {return false} - if lhs.packed != rhs.packed {return false} - if lhs.options != rhs.options {return false} - if lhs.jsonName != rhs.jsonName {return false} - if lhs.defaultValue != rhs.defaultValue {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_Field.Kind: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "TYPE_UNKNOWN"), - 1: .same(proto: "TYPE_DOUBLE"), - 2: .same(proto: "TYPE_FLOAT"), - 3: .same(proto: "TYPE_INT64"), - 4: .same(proto: "TYPE_UINT64"), - 5: .same(proto: "TYPE_INT32"), - 6: .same(proto: "TYPE_FIXED64"), - 7: .same(proto: "TYPE_FIXED32"), - 8: .same(proto: "TYPE_BOOL"), - 9: .same(proto: "TYPE_STRING"), - 10: .same(proto: "TYPE_GROUP"), - 11: .same(proto: "TYPE_MESSAGE"), - 12: .same(proto: "TYPE_BYTES"), - 13: .same(proto: "TYPE_UINT32"), - 14: .same(proto: "TYPE_ENUM"), - 15: .same(proto: "TYPE_SFIXED32"), - 16: .same(proto: "TYPE_SFIXED64"), - 17: .same(proto: "TYPE_SINT32"), - 18: .same(proto: "TYPE_SINT64"), - ] -} - -extension Google_Protobuf_Field.Cardinality: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "CARDINALITY_UNKNOWN"), - 1: .same(proto: "CARDINALITY_OPTIONAL"), - 2: .same(proto: "CARDINALITY_REQUIRED"), - 3: .same(proto: "CARDINALITY_REPEATED"), - ] -} - -extension Google_Protobuf_Enum: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Enum" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "enumvalue"), - 3: .same(proto: "options"), - 4: .standard(proto: "source_context"), - 5: .same(proto: "syntax"), - 6: .same(proto: "edition"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.enumvalue) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.options) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._sourceContext) }() - case 5: try { try decoder.decodeSingularEnumField(value: &self.syntax) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.edition) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) - } - if !self.enumvalue.isEmpty { - try visitor.visitRepeatedMessageField(value: self.enumvalue, fieldNumber: 2) - } - if !self.options.isEmpty { - try visitor.visitRepeatedMessageField(value: self.options, fieldNumber: 3) - } - try { if let v = self._sourceContext { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - if self.syntax != .proto2 { - try visitor.visitSingularEnumField(value: self.syntax, fieldNumber: 5) - } - if !self.edition.isEmpty { - try visitor.visitSingularStringField(value: self.edition, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Enum, rhs: Google_Protobuf_Enum) -> Bool { - if lhs.name != rhs.name {return false} - if lhs.enumvalue != rhs.enumvalue {return false} - if lhs.options != rhs.options {return false} - if lhs._sourceContext != rhs._sourceContext {return false} - if lhs.syntax != rhs.syntax {return false} - if lhs.edition != rhs.edition {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_EnumValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".EnumValue" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "number"), - 3: .same(proto: "options"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 2: try { try decoder.decodeSingularInt32Field(value: &self.number) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.options) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) - } - if self.number != 0 { - try visitor.visitSingularInt32Field(value: self.number, fieldNumber: 2) - } - if !self.options.isEmpty { - try visitor.visitRepeatedMessageField(value: self.options, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_EnumValue, rhs: Google_Protobuf_EnumValue) -> Bool { - if lhs.name != rhs.name {return false} - if lhs.number != rhs.number {return false} - if lhs.options != rhs.options {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_Option: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Option" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) - } - try { if let v = self._value { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Option, rhs: Google_Protobuf_Option) -> Bool { - if lhs.name != rhs.name {return false} - if lhs._value != rhs._value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/wrappers.pb.swift b/Pods/SwiftProtobuf/Sources/SwiftProtobuf/wrappers.pb.swift deleted file mode 100644 index 81fabe58..00000000 --- a/Pods/SwiftProtobuf/Sources/SwiftProtobuf/wrappers.pb.swift +++ /dev/null @@ -1,508 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: google/protobuf/wrappers.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Wrappers for primitive (non-message) types. These types are useful -// for embedding primitives in the `google.protobuf.Any` type and for places -// where we need to distinguish between the absence of a primitive -// typed field and its default value. -// -// These wrappers have no meaningful use within repeated fields as they lack -// the ability to detect presence on individual elements. -// These wrappers have no meaningful use within a map or a oneof since -// individual entries of a map or fields of a oneof can already detect presence. - -import Foundation - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Wrapper message for `double`. -/// -/// The JSON representation for `DoubleValue` is JSON number. -public struct Google_Protobuf_DoubleValue { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The double value. - public var value: Double = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Wrapper message for `float`. -/// -/// The JSON representation for `FloatValue` is JSON number. -public struct Google_Protobuf_FloatValue { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The float value. - public var value: Float = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Wrapper message for `int64`. -/// -/// The JSON representation for `Int64Value` is JSON string. -public struct Google_Protobuf_Int64Value { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The int64 value. - public var value: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Wrapper message for `uint64`. -/// -/// The JSON representation for `UInt64Value` is JSON string. -public struct Google_Protobuf_UInt64Value { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The uint64 value. - public var value: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Wrapper message for `int32`. -/// -/// The JSON representation for `Int32Value` is JSON number. -public struct Google_Protobuf_Int32Value { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The int32 value. - public var value: Int32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Wrapper message for `uint32`. -/// -/// The JSON representation for `UInt32Value` is JSON number. -public struct Google_Protobuf_UInt32Value { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The uint32 value. - public var value: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Wrapper message for `bool`. -/// -/// The JSON representation for `BoolValue` is JSON `true` and `false`. -public struct Google_Protobuf_BoolValue { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The bool value. - public var value: Bool = false - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Wrapper message for `string`. -/// -/// The JSON representation for `StringValue` is JSON string. -public struct Google_Protobuf_StringValue { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The string value. - public var value: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Wrapper message for `bytes`. -/// -/// The JSON representation for `BytesValue` is JSON string. -public struct Google_Protobuf_BytesValue { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The bytes value. - public var value: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -#if swift(>=5.5) && canImport(_Concurrency) -extension Google_Protobuf_DoubleValue: @unchecked Sendable {} -extension Google_Protobuf_FloatValue: @unchecked Sendable {} -extension Google_Protobuf_Int64Value: @unchecked Sendable {} -extension Google_Protobuf_UInt64Value: @unchecked Sendable {} -extension Google_Protobuf_Int32Value: @unchecked Sendable {} -extension Google_Protobuf_UInt32Value: @unchecked Sendable {} -extension Google_Protobuf_BoolValue: @unchecked Sendable {} -extension Google_Protobuf_StringValue: @unchecked Sendable {} -extension Google_Protobuf_BytesValue: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "google.protobuf" - -extension Google_Protobuf_DoubleValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DoubleValue" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularDoubleField(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.value != 0 { - try visitor.visitSingularDoubleField(value: self.value, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_DoubleValue, rhs: Google_Protobuf_DoubleValue) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_FloatValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FloatValue" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularFloatField(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.value != 0 { - try visitor.visitSingularFloatField(value: self.value, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_FloatValue, rhs: Google_Protobuf_FloatValue) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_Int64Value: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Int64Value" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.value != 0 { - try visitor.visitSingularInt64Field(value: self.value, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Int64Value, rhs: Google_Protobuf_Int64Value) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_UInt64Value: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".UInt64Value" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.value != 0 { - try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_UInt64Value, rhs: Google_Protobuf_UInt64Value) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_Int32Value: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Int32Value" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.value != 0 { - try visitor.visitSingularInt32Field(value: self.value, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_Int32Value, rhs: Google_Protobuf_Int32Value) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_UInt32Value: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".UInt32Value" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.value != 0 { - try visitor.visitSingularUInt32Field(value: self.value, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_UInt32Value, rhs: Google_Protobuf_UInt32Value) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_BoolValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".BoolValue" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBoolField(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.value != false { - try visitor.visitSingularBoolField(value: self.value, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_BoolValue, rhs: Google_Protobuf_BoolValue) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_StringValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".StringValue" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.value.isEmpty { - try visitor.visitSingularStringField(value: self.value, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_StringValue, rhs: Google_Protobuf_StringValue) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Google_Protobuf_BytesValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".BytesValue" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: Google_Protobuf_BytesValue, rhs: Google_Protobuf_BytesValue) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-Info.plist b/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-Info.plist deleted file mode 100644 index dbe76b0d..00000000 --- a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 5.2.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-dummy.m b/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-dummy.m deleted file mode 100644 index f7d42336..00000000 --- a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_BigInt_iOS : NSObject -@end -@implementation PodsDummy_BigInt_iOS -@end diff --git a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch b/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-umbrella.h b/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-umbrella.h deleted file mode 100644 index e3d2506e..00000000 --- a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double BigIntVersionNumber; -FOUNDATION_EXPORT const unsigned char BigIntVersionString[]; - diff --git a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.debug.xcconfig b/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.debug.xcconfig deleted file mode 100644 index be6609ad..00000000 --- a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.debug.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/BigInt -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.modulemap b/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.modulemap deleted file mode 100644 index 2db919b4..00000000 --- a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module BigInt { - umbrella header "BigInt-iOS-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.release.xcconfig b/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.release.xcconfig deleted file mode 100644 index be6609ad..00000000 --- a/Pods/Target Support Files/BigInt-iOS/BigInt-iOS.release.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/BigInt -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-Info.plist b/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-Info.plist deleted file mode 100644 index dbe76b0d..00000000 --- a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 5.2.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-dummy.m b/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-dummy.m deleted file mode 100644 index b6e84aab..00000000 --- a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_BigInt_macOS : NSObject -@end -@implementation PodsDummy_BigInt_macOS -@end diff --git a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-prefix.pch b/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-prefix.pch deleted file mode 100644 index 082f8af2..00000000 --- a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-umbrella.h b/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-umbrella.h deleted file mode 100644 index bde66664..00000000 --- a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double BigIntVersionNumber; -FOUNDATION_EXPORT const unsigned char BigIntVersionString[]; - diff --git a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.debug.xcconfig b/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.debug.xcconfig deleted file mode 100644 index 2f72a721..00000000 --- a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.debug.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CODE_SIGN_IDENTITY = -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/BigInt -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.modulemap b/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.modulemap deleted file mode 100644 index 28927f25..00000000 --- a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module BigInt { - umbrella header "BigInt-macOS-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.release.xcconfig b/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.release.xcconfig deleted file mode 100644 index 2f72a721..00000000 --- a/Pods/Target Support Files/BigInt-macOS/BigInt-macOS.release.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CODE_SIGN_IDENTITY = -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/BigInt -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS-Info.plist b/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS-Info.plist deleted file mode 100644 index ab0d1bc3..00000000 --- a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 7.10.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS-dummy.m b/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS-dummy.m deleted file mode 100644 index 6e289b64..00000000 --- a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Kingfisher_iOS : NSObject -@end -@implementation PodsDummy_Kingfisher_iOS -@end diff --git a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS-prefix.pch b/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS-umbrella.h b/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS-umbrella.h deleted file mode 100644 index 75a79961..00000000 --- a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double KingfisherVersionNumber; -FOUNDATION_EXPORT const unsigned char KingfisherVersionString[]; - diff --git a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS.debug.xcconfig b/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS.debug.xcconfig deleted file mode 100644 index c7effe09..00000000 --- a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS.debug.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-iOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "CFNetwork" -weak_framework "Combine" -weak_framework "SwiftUI" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Kingfisher -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS.modulemap b/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS.modulemap deleted file mode 100644 index 49e33e8d..00000000 --- a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Kingfisher { - umbrella header "Kingfisher-iOS-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS.release.xcconfig b/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS.release.xcconfig deleted file mode 100644 index c7effe09..00000000 --- a/Pods/Target Support Files/Kingfisher-iOS/Kingfisher-iOS.release.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-iOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "CFNetwork" -weak_framework "Combine" -weak_framework "SwiftUI" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Kingfisher -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Kingfisher-iOS/ResourceBundle-Kingfisher-Kingfisher-iOS-Info.plist b/Pods/Target Support Files/Kingfisher-iOS/ResourceBundle-Kingfisher-Kingfisher-iOS-Info.plist deleted file mode 100644 index b05b8828..00000000 --- a/Pods/Target Support Files/Kingfisher-iOS/ResourceBundle-Kingfisher-Kingfisher-iOS-Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - BNDL - CFBundleShortVersionString - 7.10.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS-Info.plist b/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS-Info.plist deleted file mode 100644 index ab0d1bc3..00000000 --- a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 7.10.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS-dummy.m b/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS-dummy.m deleted file mode 100644 index 420ac2f9..00000000 --- a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Kingfisher_macOS : NSObject -@end -@implementation PodsDummy_Kingfisher_macOS -@end diff --git a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS-prefix.pch b/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS-prefix.pch deleted file mode 100644 index 082f8af2..00000000 --- a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS-umbrella.h b/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS-umbrella.h deleted file mode 100644 index 27ba6c7a..00000000 --- a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double KingfisherVersionNumber; -FOUNDATION_EXPORT const unsigned char KingfisherVersionString[]; - diff --git a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS.debug.xcconfig b/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS.debug.xcconfig deleted file mode 100644 index 6ccd3e24..00000000 --- a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS.debug.xcconfig +++ /dev/null @@ -1,16 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CODE_SIGN_IDENTITY = -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-macOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "CFNetwork" -weak_framework "Combine" -weak_framework "SwiftUI" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Kingfisher -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS.modulemap b/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS.modulemap deleted file mode 100644 index 4cf68dd5..00000000 --- a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Kingfisher { - umbrella header "Kingfisher-macOS-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS.release.xcconfig b/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS.release.xcconfig deleted file mode 100644 index 6ccd3e24..00000000 --- a/Pods/Target Support Files/Kingfisher-macOS/Kingfisher-macOS.release.xcconfig +++ /dev/null @@ -1,16 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CODE_SIGN_IDENTITY = -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-macOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "CFNetwork" -weak_framework "Combine" -weak_framework "SwiftUI" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Kingfisher -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Kingfisher-macOS/ResourceBundle-Kingfisher-Kingfisher-macOS-Info.plist b/Pods/Target Support Files/Kingfisher-macOS/ResourceBundle-Kingfisher-Kingfisher-macOS-Info.plist deleted file mode 100644 index b05b8828..00000000 --- a/Pods/Target Support Files/Kingfisher-macOS/ResourceBundle-Kingfisher-Kingfisher-macOS-Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - BNDL - CFBundleShortVersionString - 7.10.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-Info.plist b/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-Info.plist deleted file mode 100644 index 19cf209d..00000000 --- a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-acknowledgements.markdown b/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-acknowledgements.markdown deleted file mode 100644 index f44cc207..00000000 --- a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-acknowledgements.markdown +++ /dev/null @@ -1,473 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## BigInt - - -Copyright (c) 2016-2017 Károly Lőrentey - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -## Kingfisher - -The MIT License (MIT) - -Copyright (c) 2019 Wei Wang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -## SwiftProtobuf - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - -## Runtime Library Exception to the Apache 2.0 License: ## - - - As an exception, if you use this Software to compile your source code and - portions of this Software are embedded into the binary product as a result, - you may redistribute such product without providing attribution as would - otherwise be required by Sections 4(a), 4(b) and 4(d) of the License. - - -## TrustWalletCore - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-acknowledgements.plist b/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-acknowledgements.plist deleted file mode 100644 index 82e9c162..00000000 --- a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-acknowledgements.plist +++ /dev/null @@ -1,523 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - -Copyright (c) 2016-2017 Károly Lőrentey - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - License - MIT - Title - BigInt - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2019 Wei Wang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - License - MIT - Title - Kingfisher - Type - PSGroupSpecifier - - - FooterText - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - -## Runtime Library Exception to the Apache 2.0 License: ## - - - As an exception, if you use this Software to compile your source code and - portions of this Software are embedded into the binary product as a result, - you may redistribute such product without providing attribution as would - otherwise be required by Sections 4(a), 4(b) and 4(d) of the License. - - License - Apache 2.0 - Title - SwiftProtobuf - Type - PSGroupSpecifier - - - FooterText - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - License - MIT - Title - TrustWalletCore - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-dummy.m b/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-dummy.m deleted file mode 100644 index c2d5df20..00000000 --- a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_Tokenary_iOS : NSObject -@end -@implementation PodsDummy_Pods_Tokenary_iOS -@end diff --git a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-Debug-input-files.xcfilelist b/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-Debug-input-files.xcfilelist deleted file mode 100644 index fdbed7ac..00000000 --- a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-Debug-input-files.xcfilelist +++ /dev/null @@ -1,5 +0,0 @@ -${PODS_ROOT}/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks.sh -${BUILT_PRODUCTS_DIR}/BigInt-iOS/BigInt.framework -${BUILT_PRODUCTS_DIR}/Kingfisher-iOS/Kingfisher.framework -${BUILT_PRODUCTS_DIR}/SwiftProtobuf-iOS/SwiftProtobuf.framework -${BUILT_PRODUCTS_DIR}/TrustWalletCore-iOS/WalletCore.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-Debug-output-files.xcfilelist b/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-Debug-output-files.xcfilelist deleted file mode 100644 index 2ec47a77..00000000 --- a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-Debug-output-files.xcfilelist +++ /dev/null @@ -1,4 +0,0 @@ -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BigInt.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WalletCore.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-Release-input-files.xcfilelist b/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-Release-input-files.xcfilelist deleted file mode 100644 index fdbed7ac..00000000 --- a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-Release-input-files.xcfilelist +++ /dev/null @@ -1,5 +0,0 @@ -${PODS_ROOT}/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks.sh -${BUILT_PRODUCTS_DIR}/BigInt-iOS/BigInt.framework -${BUILT_PRODUCTS_DIR}/Kingfisher-iOS/Kingfisher.framework -${BUILT_PRODUCTS_DIR}/SwiftProtobuf-iOS/SwiftProtobuf.framework -${BUILT_PRODUCTS_DIR}/TrustWalletCore-iOS/WalletCore.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-Release-output-files.xcfilelist b/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-Release-output-files.xcfilelist deleted file mode 100644 index 2ec47a77..00000000 --- a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-Release-output-files.xcfilelist +++ /dev/null @@ -1,4 +0,0 @@ -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BigInt.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WalletCore.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks.sh b/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks.sh deleted file mode 100755 index ddbf9cf7..00000000 --- a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks.sh +++ /dev/null @@ -1,192 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -function on_error { - echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" -} -trap 'on_error $LINENO' ERR - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" -BCSYMBOLMAP_DIR="BCSymbolMaps" - - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink -f "${source}")" - fi - - if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then - # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied - find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do - echo "Installing $f" - install_bcsymbolmap "$f" "$destination" - rm "$f" - done - rmdir "${source}/${BCSYMBOLMAP_DIR}" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - elif [ -L "${binary}" ]; then - echo "Destination binary is symlinked..." - dirname="$(dirname "${binary}")" - binary="${dirname}/$(readlink "${binary}")" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - warn_missing_arch=${2:-true} - if [ -r "$source" ]; then - # Copy the dSYM into the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .dSYM "$source")" - binary_name="$(ls "$source/Contents/Resources/DWARF")" - binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" - - # Strip invalid architectures from the dSYM. - if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then - strip_invalid_archs "$binary" "$warn_missing_arch" - fi - if [[ $STRIP_BINARY_RETVAL == 0 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - mkdir -p "${DWARF_DSYM_FOLDER_PATH}" - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" - fi - fi -} - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - warn_missing_arch=${2:-true} - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - if [[ "$warn_missing_arch" == "true" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - fi - STRIP_BINARY_RETVAL=1 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=0 -} - -# Copies the bcsymbolmap files of a vendored framework -install_bcsymbolmap() { - local bcsymbolmap_path="$1" - local destination="${BUILT_PRODUCTS_DIR}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identity - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/BigInt-iOS/BigInt.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher-iOS/Kingfisher.framework" - install_framework "${BUILT_PRODUCTS_DIR}/SwiftProtobuf-iOS/SwiftProtobuf.framework" - install_framework "${BUILT_PRODUCTS_DIR}/TrustWalletCore-iOS/WalletCore.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/BigInt-iOS/BigInt.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher-iOS/Kingfisher.framework" - install_framework "${BUILT_PRODUCTS_DIR}/SwiftProtobuf-iOS/SwiftProtobuf.framework" - install_framework "${BUILT_PRODUCTS_DIR}/TrustWalletCore-iOS/WalletCore.framework" -fi -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-umbrella.h b/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-umbrella.h deleted file mode 100644 index 8801e42b..00000000 --- a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_Tokenary_iOSVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_Tokenary_iOSVersionString[]; - diff --git a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS.debug.xcconfig b/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS.debug.xcconfig deleted file mode 100644 index d9ae824d..00000000 --- a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS.debug.xcconfig +++ /dev/null @@ -1,16 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-iOS" "${PODS_ROOT}/TrustWalletCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-iOS/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-iOS/SwiftProtobuf.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-iOS/WalletCore.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-iOS/Kingfisher.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-iOS/SwiftProtobuf.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-iOS/WalletCore.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-iOS" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-iOS" -iframework "${PODS_ROOT}/TrustWalletCore" -iframework "${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-iOS" -OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -framework "Accelerate" -framework "BigInt" -framework "CFNetwork" -framework "Kingfisher" -framework "SwiftProtobuf" -framework "WalletCore" -weak_framework "Combine" -weak_framework "SwiftUI" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS.modulemap b/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS.modulemap deleted file mode 100644 index 6bf80037..00000000 --- a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_Tokenary_iOS { - umbrella header "Pods-Tokenary iOS-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS.release.xcconfig b/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS.release.xcconfig deleted file mode 100644 index d9ae824d..00000000 --- a/Pods/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS.release.xcconfig +++ /dev/null @@ -1,16 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-iOS" "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-iOS" "${PODS_ROOT}/TrustWalletCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-iOS/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-iOS/SwiftProtobuf.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-iOS/WalletCore.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS/BigInt.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-iOS/Kingfisher.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-iOS/SwiftProtobuf.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-iOS/WalletCore.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-iOS" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-iOS" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-iOS" -iframework "${PODS_ROOT}/TrustWalletCore" -iframework "${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-iOS" -OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -framework "Accelerate" -framework "BigInt" -framework "CFNetwork" -framework "Kingfisher" -framework "SwiftProtobuf" -framework "WalletCore" -weak_framework "Combine" -weak_framework "SwiftUI" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-Info.plist b/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-Info.plist deleted file mode 100644 index 19cf209d..00000000 --- a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-acknowledgements.markdown b/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-acknowledgements.markdown deleted file mode 100644 index f44cc207..00000000 --- a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-acknowledgements.markdown +++ /dev/null @@ -1,473 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## BigInt - - -Copyright (c) 2016-2017 Károly Lőrentey - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -## Kingfisher - -The MIT License (MIT) - -Copyright (c) 2019 Wei Wang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -## SwiftProtobuf - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - -## Runtime Library Exception to the Apache 2.0 License: ## - - - As an exception, if you use this Software to compile your source code and - portions of this Software are embedded into the binary product as a result, - you may redistribute such product without providing attribution as would - otherwise be required by Sections 4(a), 4(b) and 4(d) of the License. - - -## TrustWalletCore - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-acknowledgements.plist b/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-acknowledgements.plist deleted file mode 100644 index 82e9c162..00000000 --- a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-acknowledgements.plist +++ /dev/null @@ -1,523 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - -Copyright (c) 2016-2017 Károly Lőrentey - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - License - MIT - Title - BigInt - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2019 Wei Wang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - License - MIT - Title - Kingfisher - Type - PSGroupSpecifier - - - FooterText - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - -## Runtime Library Exception to the Apache 2.0 License: ## - - - As an exception, if you use this Software to compile your source code and - portions of this Software are embedded into the binary product as a result, - you may redistribute such product without providing attribution as would - otherwise be required by Sections 4(a), 4(b) and 4(d) of the License. - - License - Apache 2.0 - Title - SwiftProtobuf - Type - PSGroupSpecifier - - - FooterText - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - License - MIT - Title - TrustWalletCore - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-dummy.m b/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-dummy.m deleted file mode 100644 index df06c84c..00000000 --- a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_Tokenary : NSObject -@end -@implementation PodsDummy_Pods_Tokenary -@end diff --git a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-Debug-input-files.xcfilelist b/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-Debug-input-files.xcfilelist deleted file mode 100644 index 869cb51b..00000000 --- a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-Debug-input-files.xcfilelist +++ /dev/null @@ -1,5 +0,0 @@ -${PODS_ROOT}/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks.sh -${BUILT_PRODUCTS_DIR}/BigInt-macOS/BigInt.framework -${BUILT_PRODUCTS_DIR}/Kingfisher-macOS/Kingfisher.framework -${BUILT_PRODUCTS_DIR}/SwiftProtobuf-macOS/SwiftProtobuf.framework -${BUILT_PRODUCTS_DIR}/TrustWalletCore-macOS/WalletCore.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-Debug-output-files.xcfilelist b/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-Debug-output-files.xcfilelist deleted file mode 100644 index 2ec47a77..00000000 --- a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-Debug-output-files.xcfilelist +++ /dev/null @@ -1,4 +0,0 @@ -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BigInt.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WalletCore.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-Release-input-files.xcfilelist b/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-Release-input-files.xcfilelist deleted file mode 100644 index 869cb51b..00000000 --- a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-Release-input-files.xcfilelist +++ /dev/null @@ -1,5 +0,0 @@ -${PODS_ROOT}/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks.sh -${BUILT_PRODUCTS_DIR}/BigInt-macOS/BigInt.framework -${BUILT_PRODUCTS_DIR}/Kingfisher-macOS/Kingfisher.framework -${BUILT_PRODUCTS_DIR}/SwiftProtobuf-macOS/SwiftProtobuf.framework -${BUILT_PRODUCTS_DIR}/TrustWalletCore-macOS/WalletCore.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-Release-output-files.xcfilelist b/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-Release-output-files.xcfilelist deleted file mode 100644 index 2ec47a77..00000000 --- a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-Release-output-files.xcfilelist +++ /dev/null @@ -1,4 +0,0 @@ -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BigInt.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WalletCore.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks.sh b/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks.sh deleted file mode 100755 index 28ba6220..00000000 --- a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks.sh +++ /dev/null @@ -1,192 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -function on_error { - echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" -} -trap 'on_error $LINENO' ERR - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" -BCSYMBOLMAP_DIR="BCSymbolMaps" - - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink -f "${source}")" - fi - - if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then - # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied - find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do - echo "Installing $f" - install_bcsymbolmap "$f" "$destination" - rm "$f" - done - rmdir "${source}/${BCSYMBOLMAP_DIR}" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - elif [ -L "${binary}" ]; then - echo "Destination binary is symlinked..." - dirname="$(dirname "${binary}")" - binary="${dirname}/$(readlink "${binary}")" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - warn_missing_arch=${2:-true} - if [ -r "$source" ]; then - # Copy the dSYM into the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .dSYM "$source")" - binary_name="$(ls "$source/Contents/Resources/DWARF")" - binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" - - # Strip invalid architectures from the dSYM. - if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then - strip_invalid_archs "$binary" "$warn_missing_arch" - fi - if [[ $STRIP_BINARY_RETVAL == 0 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - mkdir -p "${DWARF_DSYM_FOLDER_PATH}" - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" - fi - fi -} - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - warn_missing_arch=${2:-true} - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - if [[ "$warn_missing_arch" == "true" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - fi - STRIP_BINARY_RETVAL=1 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=0 -} - -# Copies the bcsymbolmap files of a vendored framework -install_bcsymbolmap() { - local bcsymbolmap_path="$1" - local destination="${BUILT_PRODUCTS_DIR}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identity - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/BigInt-macOS/BigInt.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher-macOS/Kingfisher.framework" - install_framework "${BUILT_PRODUCTS_DIR}/SwiftProtobuf-macOS/SwiftProtobuf.framework" - install_framework "${BUILT_PRODUCTS_DIR}/TrustWalletCore-macOS/WalletCore.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/BigInt-macOS/BigInt.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher-macOS/Kingfisher.framework" - install_framework "${BUILT_PRODUCTS_DIR}/SwiftProtobuf-macOS/SwiftProtobuf.framework" - install_framework "${BUILT_PRODUCTS_DIR}/TrustWalletCore-macOS/WalletCore.framework" -fi -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-umbrella.h b/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-umbrella.h deleted file mode 100644 index f9e22149..00000000 --- a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_TokenaryVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_TokenaryVersionString[]; - diff --git a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary.debug.xcconfig b/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary.debug.xcconfig deleted file mode 100644 index 69b99db4..00000000 --- a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary.debug.xcconfig +++ /dev/null @@ -1,16 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-macOS" "${PODS_ROOT}/TrustWalletCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-macOS/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-macOS/SwiftProtobuf.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-macOS/WalletCore.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/../Frameworks' '@loader_path/Frameworks' "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-macOS/Kingfisher.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-macOS/SwiftProtobuf.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-macOS/WalletCore.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-macOS" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-macOS" -iframework "${PODS_ROOT}/TrustWalletCore" -iframework "${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-macOS" -OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -framework "Accelerate" -framework "BigInt" -framework "CFNetwork" -framework "Kingfisher" -framework "SwiftProtobuf" -framework "WalletCore" -weak_framework "Combine" -weak_framework "SwiftUI" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary.modulemap b/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary.modulemap deleted file mode 100644 index a09cbef8..00000000 --- a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_Tokenary { - umbrella header "Pods-Tokenary-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary.release.xcconfig b/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary.release.xcconfig deleted file mode 100644 index 69b99db4..00000000 --- a/Pods/Target Support Files/Pods-Tokenary/Pods-Tokenary.release.xcconfig +++ /dev/null @@ -1,16 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-macOS" "${PODS_ROOT}/TrustWalletCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-macOS/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-macOS/SwiftProtobuf.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-macOS/WalletCore.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/../Frameworks' '@loader_path/Frameworks' "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS/BigInt.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-macOS/Kingfisher.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-macOS/SwiftProtobuf.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-macOS/WalletCore.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/BigInt-macOS" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher-macOS" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-macOS" -iframework "${PODS_ROOT}/TrustWalletCore" -iframework "${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-macOS" -OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -framework "Accelerate" -framework "BigInt" -framework "CFNetwork" -framework "Kingfisher" -framework "SwiftProtobuf" -framework "WalletCore" -weak_framework "Combine" -weak_framework "SwiftUI" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-Info.plist b/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-Info.plist deleted file mode 100644 index f901f23f..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.25.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-dummy.m b/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-dummy.m deleted file mode 100644 index 10c7e226..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_SwiftProtobuf_iOS : NSObject -@end -@implementation PodsDummy_SwiftProtobuf_iOS -@end diff --git a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-prefix.pch b/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-umbrella.h b/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-umbrella.h deleted file mode 100644 index 60829180..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double SwiftProtobufVersionNumber; -FOUNDATION_EXPORT const unsigned char SwiftProtobufVersionString[]; - diff --git a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS.debug.xcconfig b/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS.debug.xcconfig deleted file mode 100644 index d31363b1..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS.debug.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-iOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftProtobuf -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS.modulemap b/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS.modulemap deleted file mode 100644 index 518d6638..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module SwiftProtobuf { - umbrella header "SwiftProtobuf-iOS-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS.release.xcconfig b/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS.release.xcconfig deleted file mode 100644 index d31363b1..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-iOS/SwiftProtobuf-iOS.release.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-iOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftProtobuf -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-Info.plist b/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-Info.plist deleted file mode 100644 index f901f23f..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.25.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-dummy.m b/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-dummy.m deleted file mode 100644 index b4737981..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_SwiftProtobuf_macOS : NSObject -@end -@implementation PodsDummy_SwiftProtobuf_macOS -@end diff --git a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-prefix.pch b/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-prefix.pch deleted file mode 100644 index 082f8af2..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-umbrella.h b/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-umbrella.h deleted file mode 100644 index d03d03b3..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double SwiftProtobufVersionNumber; -FOUNDATION_EXPORT const unsigned char SwiftProtobufVersionString[]; - diff --git a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS.debug.xcconfig b/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS.debug.xcconfig deleted file mode 100644 index 743d7687..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS.debug.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CODE_SIGN_IDENTITY = -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-macOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftProtobuf -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS.modulemap b/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS.modulemap deleted file mode 100644 index 56505d2e1..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module SwiftProtobuf { - umbrella header "SwiftProtobuf-macOS-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS.release.xcconfig b/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS.release.xcconfig deleted file mode 100644 index 743d7687..00000000 --- a/Pods/Target Support Files/SwiftProtobuf-macOS/SwiftProtobuf-macOS.release.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CODE_SIGN_IDENTITY = -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-macOS -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftProtobuf -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-Info.plist b/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-Info.plist deleted file mode 100644 index 5ce460e8..00000000 --- a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.0.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-dummy.m b/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-dummy.m deleted file mode 100644 index 9b812b34..00000000 --- a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_TrustWalletCore_iOS : NSObject -@end -@implementation PodsDummy_TrustWalletCore_iOS -@end diff --git a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-prefix.pch b/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-umbrella.h b/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-umbrella.h deleted file mode 100644 index 1594434f..00000000 --- a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-umbrella.h +++ /dev/null @@ -1,136 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - -#import "TWAccount.h" -#import "TWAES.h" -#import "TWAESPaddingMode.h" -#import "TWAeternityProto.h" -#import "TWAionProto.h" -#import "TWAlgorandProto.h" -#import "TWAnyAddress.h" -#import "TWAnySigner.h" -#import "TWAptosProto.h" -#import "TWAsnParser.h" -#import "TWBarz.h" -#import "TWBarzProto.h" -#import "TWBase.h" -#import "TWBase32.h" -#import "TWBase58.h" -#import "TWBase64.h" -#import "TWBinanceProto.h" -#import "TWBitcoinAddress.h" -#import "TWBitcoinFee.h" -#import "TWBitcoinMessageSigner.h" -#import "TWBitcoinProto.h" -#import "TWBitcoinScript.h" -#import "TWBitcoinSigHashType.h" -#import "TWBitcoinV2Proto.h" -#import "TWBlockchain.h" -#import "TWCardano.h" -#import "TWCardanoProto.h" -#import "TWCoinType.h" -#import "TWCoinTypeConfiguration.h" -#import "TWCommonProto.h" -#import "TWCosmosProto.h" -#import "TWCurve.h" -#import "TWData.h" -#import "TWDataVector.h" -#import "TWDecredProto.h" -#import "TWDerivation.h" -#import "TWDerivationPath.h" -#import "TWDerivationPathIndex.h" -#import "TWEOSProto.h" -#import "TWEthereum.h" -#import "TWEthereumAbi.h" -#import "TWEthereumAbiFunction.h" -#import "TWEthereumAbiProto.h" -#import "TWEthereumAbiValue.h" -#import "TWEthereumChainID.h" -#import "TWEthereumMessageSigner.h" -#import "TWEthereumProto.h" -#import "TWEthereumRlp.h" -#import "TWEthereumRlpProto.h" -#import "TWEverscaleProto.h" -#import "TWFilecoinAddressConverter.h" -#import "TWFilecoinAddressType.h" -#import "TWFilecoinProto.h" -#import "TWFIOAccount.h" -#import "TWFIOProto.h" -#import "TWGreenfieldProto.h" -#import "TWGroestlcoinAddress.h" -#import "TWHarmonyProto.h" -#import "TWHash.h" -#import "TWHDVersion.h" -#import "TWHDWallet.h" -#import "TWHederaProto.h" -#import "TWHRP.h" -#import "TWIconProto.h" -#import "TWIOSTProto.h" -#import "TWIoTeXProto.h" -#import "TWLiquidStaking.h" -#import "TWLiquidStakingProto.h" -#import "TWMnemonic.h" -#import "TWMultiversXProto.h" -#import "TWNanoProto.h" -#import "TWNEARAccount.h" -#import "TWNEARProto.h" -#import "TWNebulasProto.h" -#import "TWNEOProto.h" -#import "TWNervosAddress.h" -#import "TWNervosProto.h" -#import "TWNimiqProto.h" -#import "TWNULSProto.h" -#import "TWOasisProto.h" -#import "TWOntologyProto.h" -#import "TWPBKDF2.h" -#import "TWPolkadotProto.h" -#import "TWPrivateKey.h" -#import "TWPrivateKeyType.h" -#import "TWPublicKey.h" -#import "TWPublicKeyType.h" -#import "TWPurpose.h" -#import "TWRippleProto.h" -#import "TWRippleXAddress.h" -#import "TWSegwitAddress.h" -#import "TWSolanaAddress.h" -#import "TWSolanaProto.h" -#import "TWSS58AddressType.h" -#import "TWStarkExMessageSigner.h" -#import "TWStarkWare.h" -#import "TWStellarMemoType.h" -#import "TWStellarPassphrase.h" -#import "TWStellarProto.h" -#import "TWStellarVersionByte.h" -#import "TWStoredKey.h" -#import "TWStoredKeyEncryption.h" -#import "TWStoredKeyEncryptionLevel.h" -#import "TWString.h" -#import "TWSuiProto.h" -#import "TWTezosMessageSigner.h" -#import "TWTezosProto.h" -#import "TWTheOpenNetworkProto.h" -#import "TWThetaProto.h" -#import "TWTHORChainSwap.h" -#import "TWTHORChainSwapProto.h" -#import "TWTransactionCompiler.h" -#import "TWTransactionCompilerProto.h" -#import "TWTronMessageSigner.h" -#import "TWTronProto.h" -#import "TWUtxoProto.h" -#import "TWVeChainProto.h" -#import "TWWavesProto.h" -#import "TWWebAuthn.h" -#import "TWZilliqaProto.h" - -FOUNDATION_EXPORT double WalletCoreVersionNumber; -FOUNDATION_EXPORT const unsigned char WalletCoreVersionString[]; - diff --git a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-xcframeworks-input-files.xcfilelist b/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-xcframeworks-input-files.xcfilelist deleted file mode 100644 index b6032487..00000000 --- a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-xcframeworks-input-files.xcfilelist +++ /dev/null @@ -1,2 +0,0 @@ -${PODS_ROOT}/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-xcframeworks.sh -${PODS_ROOT}/TrustWalletCore/WalletCoreCommon.xcframework \ No newline at end of file diff --git a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-xcframeworks-output-files.xcfilelist b/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-xcframeworks-output-files.xcfilelist deleted file mode 100644 index 4f8641f0..00000000 --- a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-xcframeworks-output-files.xcfilelist +++ /dev/null @@ -1 +0,0 @@ -${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core/WalletCoreCommon.framework \ No newline at end of file diff --git a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-xcframeworks.sh b/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-xcframeworks.sh deleted file mode 100755 index 35ec9ac8..00000000 --- a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS-xcframeworks.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -function on_error { - echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" -} -trap 'on_error $LINENO' ERR - - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - - -variant_for_slice() -{ - case "$1" in - "WalletCoreCommon.xcframework/ios-arm64") - echo "" - ;; - "WalletCoreCommon.xcframework/ios-arm64_x86_64-maccatalyst") - echo "maccatalyst" - ;; - "WalletCoreCommon.xcframework/ios-arm64_x86_64-simulator") - echo "simulator" - ;; - "WalletCoreCommon.xcframework/macos-arm64_x86_64") - echo "" - ;; - esac -} - -archs_for_slice() -{ - case "$1" in - "WalletCoreCommon.xcframework/ios-arm64") - echo "arm64" - ;; - "WalletCoreCommon.xcframework/ios-arm64_x86_64-maccatalyst") - echo "arm64 x86_64" - ;; - "WalletCoreCommon.xcframework/ios-arm64_x86_64-simulator") - echo "arm64 x86_64" - ;; - "WalletCoreCommon.xcframework/macos-arm64_x86_64") - echo "arm64 x86_64" - ;; - esac -} - -copy_dir() -{ - local source="$1" - local destination="$2" - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" \"${source}*\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}"/* "${destination}" -} - -SELECT_SLICE_RETVAL="" - -select_slice() { - local xcframework_name="$1" - xcframework_name="${xcframework_name##*/}" - local paths=("${@:2}") - # Locate the correct slice of the .xcframework for the current architectures - local target_path="" - - # Split archs on space so we can find a slice that has all the needed archs - local target_archs=$(echo $ARCHS | tr " " "\n") - - local target_variant="" - if [[ "$PLATFORM_NAME" == *"simulator" ]]; then - target_variant="simulator" - fi - if [[ ! -z ${EFFECTIVE_PLATFORM_NAME+x} && "$EFFECTIVE_PLATFORM_NAME" == *"maccatalyst" ]]; then - target_variant="maccatalyst" - fi - for i in ${!paths[@]}; do - local matched_all_archs="1" - local slice_archs="$(archs_for_slice "${xcframework_name}/${paths[$i]}")" - local slice_variant="$(variant_for_slice "${xcframework_name}/${paths[$i]}")" - for target_arch in $target_archs; do - if ! [[ "${slice_variant}" == "$target_variant" ]]; then - matched_all_archs="0" - break - fi - - if ! echo "${slice_archs}" | tr " " "\n" | grep -F -q -x "$target_arch"; then - matched_all_archs="0" - break - fi - done - - if [[ "$matched_all_archs" == "1" ]]; then - # Found a matching slice - echo "Selected xcframework slice ${paths[$i]}" - SELECT_SLICE_RETVAL=${paths[$i]} - break - fi - done -} - -install_xcframework() { - local basepath="$1" - local name="$2" - local package_type="$3" - local paths=("${@:4}") - - # Locate the correct slice of the .xcframework for the current architectures - select_slice "${basepath}" "${paths[@]}" - local target_path="$SELECT_SLICE_RETVAL" - if [[ -z "$target_path" ]]; then - echo "warning: [CP] $(basename ${basepath}): Unable to find matching slice in '${paths[@]}' for the current build architectures ($ARCHS) and platform (${EFFECTIVE_PLATFORM_NAME-${PLATFORM_NAME}})." - return - fi - local source="$basepath/$target_path" - - local destination="${PODS_XCFRAMEWORKS_BUILD_DIR}/${name}" - - if [ ! -d "$destination" ]; then - mkdir -p "$destination" - fi - - copy_dir "$source/" "$destination" - echo "Copied $source to $destination" -} - -install_xcframework "${PODS_ROOT}/TrustWalletCore/WalletCoreCommon.xcframework" "TrustWalletCore/Core" "framework" "ios-arm64" "ios-arm64_x86_64-maccatalyst" "ios-arm64_x86_64-simulator" - diff --git a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS.debug.xcconfig b/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS.debug.xcconfig deleted file mode 100644 index 67d08eee..00000000 --- a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS.debug.xcconfig +++ /dev/null @@ -1,16 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-iOS -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-iOS" "${PODS_ROOT}/TrustWalletCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -l"c++" -framework "SwiftProtobuf" -framework "WalletCoreCommon" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/TrustWalletCore -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS.modulemap b/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS.modulemap deleted file mode 100644 index 856cfd9e..00000000 --- a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module WalletCore { - umbrella header "TrustWalletCore-iOS-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS.release.xcconfig b/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS.release.xcconfig deleted file mode 100644 index 67d08eee..00000000 --- a/Pods/Target Support Files/TrustWalletCore-iOS/TrustWalletCore-iOS.release.xcconfig +++ /dev/null @@ -1,16 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-iOS -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-iOS" "${PODS_ROOT}/TrustWalletCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -l"c++" -framework "SwiftProtobuf" -framework "WalletCoreCommon" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/TrustWalletCore -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-Info.plist b/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-Info.plist deleted file mode 100644 index 5ce460e8..00000000 --- a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.0.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-dummy.m b/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-dummy.m deleted file mode 100644 index 522b483d..00000000 --- a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_TrustWalletCore_macOS : NSObject -@end -@implementation PodsDummy_TrustWalletCore_macOS -@end diff --git a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-prefix.pch b/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-prefix.pch deleted file mode 100644 index 082f8af2..00000000 --- a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-umbrella.h b/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-umbrella.h deleted file mode 100644 index 9a49761f..00000000 --- a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-umbrella.h +++ /dev/null @@ -1,136 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - -#import "TWAccount.h" -#import "TWAES.h" -#import "TWAESPaddingMode.h" -#import "TWAeternityProto.h" -#import "TWAionProto.h" -#import "TWAlgorandProto.h" -#import "TWAnyAddress.h" -#import "TWAnySigner.h" -#import "TWAptosProto.h" -#import "TWAsnParser.h" -#import "TWBarz.h" -#import "TWBarzProto.h" -#import "TWBase.h" -#import "TWBase32.h" -#import "TWBase58.h" -#import "TWBase64.h" -#import "TWBinanceProto.h" -#import "TWBitcoinAddress.h" -#import "TWBitcoinFee.h" -#import "TWBitcoinMessageSigner.h" -#import "TWBitcoinProto.h" -#import "TWBitcoinScript.h" -#import "TWBitcoinSigHashType.h" -#import "TWBitcoinV2Proto.h" -#import "TWBlockchain.h" -#import "TWCardano.h" -#import "TWCardanoProto.h" -#import "TWCoinType.h" -#import "TWCoinTypeConfiguration.h" -#import "TWCommonProto.h" -#import "TWCosmosProto.h" -#import "TWCurve.h" -#import "TWData.h" -#import "TWDataVector.h" -#import "TWDecredProto.h" -#import "TWDerivation.h" -#import "TWDerivationPath.h" -#import "TWDerivationPathIndex.h" -#import "TWEOSProto.h" -#import "TWEthereum.h" -#import "TWEthereumAbi.h" -#import "TWEthereumAbiFunction.h" -#import "TWEthereumAbiProto.h" -#import "TWEthereumAbiValue.h" -#import "TWEthereumChainID.h" -#import "TWEthereumMessageSigner.h" -#import "TWEthereumProto.h" -#import "TWEthereumRlp.h" -#import "TWEthereumRlpProto.h" -#import "TWEverscaleProto.h" -#import "TWFilecoinAddressConverter.h" -#import "TWFilecoinAddressType.h" -#import "TWFilecoinProto.h" -#import "TWFIOAccount.h" -#import "TWFIOProto.h" -#import "TWGreenfieldProto.h" -#import "TWGroestlcoinAddress.h" -#import "TWHarmonyProto.h" -#import "TWHash.h" -#import "TWHDVersion.h" -#import "TWHDWallet.h" -#import "TWHederaProto.h" -#import "TWHRP.h" -#import "TWIconProto.h" -#import "TWIOSTProto.h" -#import "TWIoTeXProto.h" -#import "TWLiquidStaking.h" -#import "TWLiquidStakingProto.h" -#import "TWMnemonic.h" -#import "TWMultiversXProto.h" -#import "TWNanoProto.h" -#import "TWNEARAccount.h" -#import "TWNEARProto.h" -#import "TWNebulasProto.h" -#import "TWNEOProto.h" -#import "TWNervosAddress.h" -#import "TWNervosProto.h" -#import "TWNimiqProto.h" -#import "TWNULSProto.h" -#import "TWOasisProto.h" -#import "TWOntologyProto.h" -#import "TWPBKDF2.h" -#import "TWPolkadotProto.h" -#import "TWPrivateKey.h" -#import "TWPrivateKeyType.h" -#import "TWPublicKey.h" -#import "TWPublicKeyType.h" -#import "TWPurpose.h" -#import "TWRippleProto.h" -#import "TWRippleXAddress.h" -#import "TWSegwitAddress.h" -#import "TWSolanaAddress.h" -#import "TWSolanaProto.h" -#import "TWSS58AddressType.h" -#import "TWStarkExMessageSigner.h" -#import "TWStarkWare.h" -#import "TWStellarMemoType.h" -#import "TWStellarPassphrase.h" -#import "TWStellarProto.h" -#import "TWStellarVersionByte.h" -#import "TWStoredKey.h" -#import "TWStoredKeyEncryption.h" -#import "TWStoredKeyEncryptionLevel.h" -#import "TWString.h" -#import "TWSuiProto.h" -#import "TWTezosMessageSigner.h" -#import "TWTezosProto.h" -#import "TWTheOpenNetworkProto.h" -#import "TWThetaProto.h" -#import "TWTHORChainSwap.h" -#import "TWTHORChainSwapProto.h" -#import "TWTransactionCompiler.h" -#import "TWTransactionCompilerProto.h" -#import "TWTronMessageSigner.h" -#import "TWTronProto.h" -#import "TWUtxoProto.h" -#import "TWVeChainProto.h" -#import "TWWavesProto.h" -#import "TWWebAuthn.h" -#import "TWZilliqaProto.h" - -FOUNDATION_EXPORT double WalletCoreVersionNumber; -FOUNDATION_EXPORT const unsigned char WalletCoreVersionString[]; - diff --git a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks-input-files.xcfilelist b/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks-input-files.xcfilelist deleted file mode 100644 index 20d1caaa..00000000 --- a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks-input-files.xcfilelist +++ /dev/null @@ -1,2 +0,0 @@ -${PODS_ROOT}/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks.sh -${PODS_ROOT}/TrustWalletCore/WalletCoreCommon.xcframework \ No newline at end of file diff --git a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks-output-files.xcfilelist b/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks-output-files.xcfilelist deleted file mode 100644 index 4f8641f0..00000000 --- a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks-output-files.xcfilelist +++ /dev/null @@ -1 +0,0 @@ -${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core/WalletCoreCommon.framework \ No newline at end of file diff --git a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks.sh b/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks.sh deleted file mode 100755 index 3b2c81ba..00000000 --- a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS-xcframeworks.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -function on_error { - echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" -} -trap 'on_error $LINENO' ERR - - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - - -variant_for_slice() -{ - case "$1" in - "WalletCoreCommon.xcframework/ios-arm64") - echo "" - ;; - "WalletCoreCommon.xcframework/ios-arm64_x86_64-maccatalyst") - echo "maccatalyst" - ;; - "WalletCoreCommon.xcframework/ios-arm64_x86_64-simulator") - echo "simulator" - ;; - "WalletCoreCommon.xcframework/macos-arm64_x86_64") - echo "" - ;; - esac -} - -archs_for_slice() -{ - case "$1" in - "WalletCoreCommon.xcframework/ios-arm64") - echo "arm64" - ;; - "WalletCoreCommon.xcframework/ios-arm64_x86_64-maccatalyst") - echo "arm64 x86_64" - ;; - "WalletCoreCommon.xcframework/ios-arm64_x86_64-simulator") - echo "arm64 x86_64" - ;; - "WalletCoreCommon.xcframework/macos-arm64_x86_64") - echo "arm64 x86_64" - ;; - esac -} - -copy_dir() -{ - local source="$1" - local destination="$2" - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" \"${source}*\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}"/* "${destination}" -} - -SELECT_SLICE_RETVAL="" - -select_slice() { - local xcframework_name="$1" - xcframework_name="${xcframework_name##*/}" - local paths=("${@:2}") - # Locate the correct slice of the .xcframework for the current architectures - local target_path="" - - # Split archs on space so we can find a slice that has all the needed archs - local target_archs=$(echo $ARCHS | tr " " "\n") - - local target_variant="" - if [[ "$PLATFORM_NAME" == *"simulator" ]]; then - target_variant="simulator" - fi - if [[ ! -z ${EFFECTIVE_PLATFORM_NAME+x} && "$EFFECTIVE_PLATFORM_NAME" == *"maccatalyst" ]]; then - target_variant="maccatalyst" - fi - for i in ${!paths[@]}; do - local matched_all_archs="1" - local slice_archs="$(archs_for_slice "${xcframework_name}/${paths[$i]}")" - local slice_variant="$(variant_for_slice "${xcframework_name}/${paths[$i]}")" - for target_arch in $target_archs; do - if ! [[ "${slice_variant}" == "$target_variant" ]]; then - matched_all_archs="0" - break - fi - - if ! echo "${slice_archs}" | tr " " "\n" | grep -F -q -x "$target_arch"; then - matched_all_archs="0" - break - fi - done - - if [[ "$matched_all_archs" == "1" ]]; then - # Found a matching slice - echo "Selected xcframework slice ${paths[$i]}" - SELECT_SLICE_RETVAL=${paths[$i]} - break - fi - done -} - -install_xcframework() { - local basepath="$1" - local name="$2" - local package_type="$3" - local paths=("${@:4}") - - # Locate the correct slice of the .xcframework for the current architectures - select_slice "${basepath}" "${paths[@]}" - local target_path="$SELECT_SLICE_RETVAL" - if [[ -z "$target_path" ]]; then - echo "warning: [CP] $(basename ${basepath}): Unable to find matching slice in '${paths[@]}' for the current build architectures ($ARCHS) and platform (${EFFECTIVE_PLATFORM_NAME-${PLATFORM_NAME}})." - return - fi - local source="$basepath/$target_path" - - local destination="${PODS_XCFRAMEWORKS_BUILD_DIR}/${name}" - - if [ ! -d "$destination" ]; then - mkdir -p "$destination" - fi - - copy_dir "$source/" "$destination" - echo "Copied $source to $destination" -} - -install_xcframework "${PODS_ROOT}/TrustWalletCore/WalletCoreCommon.xcframework" "TrustWalletCore/Core" "framework" "macos-arm64_x86_64" - diff --git a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS.debug.xcconfig b/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS.debug.xcconfig deleted file mode 100644 index a5798ebf..00000000 --- a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS.debug.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CODE_SIGN_IDENTITY = -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-macOS -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-macOS" "${PODS_ROOT}/TrustWalletCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -l"c++" -framework "SwiftProtobuf" -framework "WalletCoreCommon" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/TrustWalletCore -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS.modulemap b/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS.modulemap deleted file mode 100644 index 360f8971..00000000 --- a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module WalletCore { - umbrella header "TrustWalletCore-macOS-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS.release.xcconfig b/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS.release.xcconfig deleted file mode 100644 index a5798ebf..00000000 --- a/Pods/Target Support Files/TrustWalletCore-macOS/TrustWalletCore-macOS.release.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CODE_SIGN_IDENTITY = -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/TrustWalletCore-macOS -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftProtobuf-macOS" "${PODS_ROOT}/TrustWalletCore" "${PODS_XCFRAMEWORKS_BUILD_DIR}/TrustWalletCore/Core" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -l"c++" -framework "SwiftProtobuf" -framework "WalletCoreCommon" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/TrustWalletCore -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/TrustWalletCore/License b/Pods/TrustWalletCore/License deleted file mode 100644 index 261eeb9e..00000000 --- a/Pods/TrustWalletCore/License +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Pods/TrustWalletCore/Sources/AnySigner.swift b/Pods/TrustWalletCore/Sources/AnySigner.swift deleted file mode 100644 index 5abf730b..00000000 --- a/Pods/TrustWalletCore/Sources/AnySigner.swift +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright © 2017-2018 Trust. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation -import SwiftProtobuf - -public typealias SigningInput = Message -public typealias SigningOutput = Message - -/// Represents a signer to sign transactions for any blockchain. -public final class AnySigner { - - /// Signs a transaction by SigningInput message and coin type - /// - /// - Parameters: - /// - input: The generic SigningInput SwiftProtobuf message - /// - coin: CoinType - /// - Returns: The generic SigningOutput SwiftProtobuf message - public static func sign(input: SigningInput, coin: CoinType) -> SigningOutput { - do { - let outputData = nativeSign(data: try input.serializedData(), coin: coin) - return try SigningOutput(serializedData: outputData) - } catch let error { - fatalError(error.localizedDescription) - } - } - - /// Signs a transaction by serialized data of a SigningInput and coin type - /// - /// - Parameters: - /// - data: The serialized data of a SigningInput - /// - coin: CoinType - /// - Returns: The serialized data of a SigningOutput - public static func nativeSign(data: Data, coin: CoinType) -> Data { - let inputData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(inputData) - } - return TWDataNSData(TWAnySignerSign(inputData, TWCoinType(rawValue: coin.rawValue))) - } - - /// Check if AnySigner supports signing JSON representation of SigningInput for a given coin. - public static func supportsJSON(coin: CoinType) -> Bool { - return TWAnySignerSupportsJSON(TWCoinType(rawValue: coin.rawValue)) - } - - /// Signs a transaction specified by the JSON representation of a SigningInput, coin type and a private key - /// - /// - Parameters: - /// - json: JSON representation of a SigningInput - /// - key: The private key data - /// - coin: CoinType - /// - Returns: The JSON representation of a SigningOutput. - public static func signJSON(_ json: String, key: Data, coin: CoinType) -> String { - let jsonString = TWStringCreateWithNSString(json) - let keyData = TWDataCreateWithNSData(key) - defer { - TWDataDelete(keyData) - } - return TWStringNSString(TWAnySignerSignJSON(jsonString, keyData, TWCoinType(rawValue: coin.rawValue))) - } - - /// Plans a transaction (for UTXO chains only). - /// - /// - Parameters: - /// - input: The generic SigningInput SwiftProtobuf message - /// - coin: CoinType - /// - Returns: TransactionPlan SwiftProtobuf message - public static func plan(input: SigningInput, coin: CoinType) -> TransactionPlan { - do { - let outputData = nativePlan(data: try input.serializedData(), coin: coin) - return try TransactionPlan(serializedData: outputData) - } catch let error { - fatalError(error.localizedDescription) - } - } - - /// Plans a transaction (for UTXO chains only). - /// - /// - Parameters: - /// - input: The serialized data of a SigningInput - /// - coin: CoinType - /// - Returns: The serialized data of a TransactionPlan - public static func nativePlan(data: Data, coin: CoinType) -> Data { - let inputData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(inputData) - } - return TWDataNSData(TWAnySignerPlan(inputData, TWCoinType(rawValue: coin.rawValue))) - } -} diff --git a/Pods/TrustWalletCore/Sources/Extensions/Account+Codable.swift b/Pods/TrustWalletCore/Sources/Extensions/Account+Codable.swift deleted file mode 100644 index 39b48c3d..00000000 --- a/Pods/TrustWalletCore/Sources/Extensions/Account+Codable.swift +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright © 2017-2022 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -extension Account: Equatable { - public static func == (lhs: Account, rhs: Account) -> Bool { - return lhs.coin == rhs.coin && - lhs.address == rhs.address && - lhs.derivation == rhs.derivation && - lhs.derivationPath == rhs.derivationPath && - lhs.publicKey == rhs.publicKey && - lhs.extendedPublicKey == rhs.extendedPublicKey - } -} - -extension Account: Hashable { - public func hash(into hasher: inout Hasher) { - hasher.combine(coin) - hasher.combine(address) - hasher.combine(derivation) - hasher.combine(derivationPath) - hasher.combine(publicKey) - hasher.combine(extendedPublicKey) - } -} - -extension Account: Codable { - private enum CodingKeys: String, CodingKey { - case coin - case address - case derivation - case derivationPath - case publicKey - case extendedPublicKey - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(coin.rawValue, forKey: .coin) - try container.encode(address, forKey: .address) - try container.encode(derivation.rawValue, forKey: .derivation) - try container.encode(derivationPath, forKey: .derivationPath) - try container.encode(publicKey, forKey: .publicKey) - try container.encode(extendedPublicKey, forKey: .extendedPublicKey) - } - - public convenience init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - let rawCoin = try container.decode(UInt32.self, forKey: .coin) - let address = try container.decode(String.self, forKey: .address) - let rawDerivation = try container.decode(UInt32.self, forKey: .derivation) - let derivationPath = try container.decode(String.self, forKey: .derivationPath) - let publicKey = try container.decode(String.self, forKey: .publicKey) - let extendedPublicKey = try container.decode(String.self, forKey: .extendedPublicKey) - - self.init( - address: address, - coin: CoinType(rawValue: rawCoin)!, - derivation: Derivation(rawValue: rawDerivation)!, - derivationPath: derivationPath, - publicKey: publicKey, - extendedPublicKey: extendedPublicKey - ) - } -} diff --git a/Pods/TrustWalletCore/Sources/Extensions/AddressProtocol.swift b/Pods/TrustWalletCore/Sources/Extensions/AddressProtocol.swift deleted file mode 100644 index 1660d724..00000000 --- a/Pods/TrustWalletCore/Sources/Extensions/AddressProtocol.swift +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -/// Generic Address protocol for AnyAddress / SegwitAddress / SolanaAddress -public protocol Address: CustomStringConvertible {} - -extension AnyAddress: Equatable {} diff --git a/Pods/TrustWalletCore/Sources/Extensions/BitcoinAddress+Extension.swift b/Pods/TrustWalletCore/Sources/Extensions/BitcoinAddress+Extension.swift deleted file mode 100644 index 48b799a6..00000000 --- a/Pods/TrustWalletCore/Sources/Extensions/BitcoinAddress+Extension.swift +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -extension BitcoinAddress: Equatable { - public var base58String: String { - return description - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(description) - } - - /// Creates a legacy Bitcoin address for segwit redeem script. - public static func compatibleAddress(publicKey: PublicKey, prefix: UInt8) -> BitcoinAddress { - let witnessVersion = Data([0x00, 0x14]) - let redeemScript = Hash.sha256RIPEMD(data: witnessVersion + publicKey.bitcoinKeyHash) - let address = Base58.encode(data: [prefix] + redeemScript) - return BitcoinAddress(string: address)! - } -} diff --git a/Pods/TrustWalletCore/Sources/Extensions/CoinType+Address.swift b/Pods/TrustWalletCore/Sources/Extensions/CoinType+Address.swift deleted file mode 100644 index f0dbc2ea..00000000 --- a/Pods/TrustWalletCore/Sources/Extensions/CoinType+Address.swift +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -public extension CoinType { - /// Converts a string to an address for this coin type. - func address(string: String) -> AnyAddress? { - return AnyAddress(string: string, coin: self) - } -} diff --git a/Pods/TrustWalletCore/Sources/Extensions/Data+Hex.swift b/Pods/TrustWalletCore/Sources/Extensions/Data+Hex.swift deleted file mode 100644 index 3888716e..00000000 --- a/Pods/TrustWalletCore/Sources/Extensions/Data+Hex.swift +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -extension Data { - /// Initializes `Data` with a hex string representation. - public init?(hexString: String) { - let string: String - if hexString.hasPrefix("0x") { - string = String(hexString.dropFirst(2)) - } else { - string = hexString - } - - // Check odd length hex string - if string.count % 2 != 0 { - return nil - } - - // Check odd characters - if string.contains(where: { !$0.isHexDigit }) { - return nil - } - - // Convert the string to bytes for better performance - guard let stringData = string.data(using: .ascii, allowLossyConversion: true) else { - return nil - } - - self.init(capacity: string.count / 2) - let stringBytes = Array(stringData) - for i in stride(from: 0, to: stringBytes.count, by: 2) { - guard let high = Data.value(of: stringBytes[i]) else { - return nil - } - if i < stringBytes.count - 1, let low = Data.value(of: stringBytes[i + 1]) { - append((high << 4) | low) - } else { - append(high) - } - } - } - - /// Converts an ASCII byte to a hex value. - private static func value(of nibble: UInt8) -> UInt8? { - guard let letter = String(bytes: [nibble], encoding: .ascii) else { return nil } - return UInt8(letter, radix: 16) - } - - /// Reverses and parses hex string as `Data` - public static func reverse(hexString: String) -> Data { - guard let data = Data(hexString: hexString) else { return Data() } - return Data(data.reversed()) - } - - /// Returns the hex string representation of the data. - public var hexString: String { - return map({ String(format: "%02x", $0) }).joined() - } -} - -public extension KeyedDecodingContainerProtocol { - func decodeHexString(forKey key: Self.Key) throws -> Data { - let hexString = try decode(String.self, forKey: key) - guard let data = Data(hexString: hexString) else { - throw DecodingError.dataCorruptedError(forKey: key, in: self, debugDescription: "Expected hexadecimal string") - } - return data - } - - func decodeHexStringIfPresent(forKey key: Self.Key) throws -> Data? { - guard let hexString = try decodeIfPresent(String.self, forKey: key) else { - return nil - } - guard let data = Data(hexString: hexString) else { - throw DecodingError.dataCorruptedError(forKey: key, in: self, debugDescription: "Expected hexadecimal string") - } - return data - } -} diff --git a/Pods/TrustWalletCore/Sources/Extensions/DerivationPath+Extension.swift b/Pods/TrustWalletCore/Sources/Extensions/DerivationPath+Extension.swift deleted file mode 100644 index 09678360..00000000 --- a/Pods/TrustWalletCore/Sources/Extensions/DerivationPath+Extension.swift +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright © 2017-2022 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -extension DerivationPath: Equatable, Hashable, CustomStringConvertible { - - public typealias Index = DerivationPathIndex - - public static func == (lhs: DerivationPath, rhs: DerivationPath) -> Bool { - return lhs.description == rhs.description - } - - public var coinType: UInt32 { - coin - } - - public var indices: [Index] { - var result = [Index]() - for i in 0.. DerivationPathIndex? { - return self.indexAt(index: UInt32(index)) - } - - public func hash(into hasher: inout Hasher) { - let count = indicesCount() - for i in 0.. Bool { - return lhs.value == rhs.value && lhs.hardened == rhs.hardened - } - - public convenience init(_ value: UInt32, hardened: Bool) { - self.init(value: value, hardened: hardened) - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(value) - hasher.combine(hardened) - } -} - -extension DerivationPathIndex: Codable { - private enum CodingKeys: String, CodingKey { - case value - case hardened - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(value, forKey: .value) - try container.encode(hardened, forKey: .hardened) - } - - public convenience init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - let value = try container.decode(UInt32.self, forKey: .value) - let hardened = try container.decode(Bool.self, forKey: .hardened) - self.init(value: value, hardened: hardened) - } -} diff --git a/Pods/TrustWalletCore/Sources/Extensions/Mnemonic+Extension.swift b/Pods/TrustWalletCore/Sources/Extensions/Mnemonic+Extension.swift deleted file mode 100644 index 8eecce8b..00000000 --- a/Pods/TrustWalletCore/Sources/Extensions/Mnemonic+Extension.swift +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright © 2017-2021 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -public extension Mnemonic { - typealias ValidationResult = (word: String, index: Int) - - /// Returns mnemonic validation result, an array of wrong word and index tuple - static func validate(mnemonic: [String]) -> [ValidationResult] { - mnemonic.enumerated().compactMap { (index, word) -> ValidationResult? in - if isValidWord(word: word) { - return nil - } - return (word, index) - } - } - - /// Returns matched suggestion in a native array - static func search(prefix: String) -> [String] { - return suggest(prefix: prefix).split(separator: " ").map { String($0) } - } -} diff --git a/Pods/TrustWalletCore/Sources/Extensions/PublicKey+Bitcoin.swift b/Pods/TrustWalletCore/Sources/Extensions/PublicKey+Bitcoin.swift deleted file mode 100644 index 8694b7db..00000000 --- a/Pods/TrustWalletCore/Sources/Extensions/PublicKey+Bitcoin.swift +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public extension PublicKey { - /// Returns the ripemd160 hash of the sha2 hash of the compressed public key data. - var bitcoinKeyHash: Data { - return Hash.sha256RIPEMD(data: compressed.data) - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/AES.swift b/Pods/TrustWalletCore/Sources/Generated/AES.swift deleted file mode 100644 index e6d31d42..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/AES.swift +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// AES encryption/decryption methods. -public struct AES { - - /// Encrypts a block of Data using AES in Cipher Block Chaining (CBC) mode. - /// - /// - Parameter key: encryption key Data, must be 16, 24, or 32 bytes long. - /// - Parameter data: Data to encrypt. - /// - Parameter iv: initialization vector. - /// - Parameter mode: padding mode. - /// - Returns: encrypted Data. - public static func encryptCBC(key: Data, data: Data, iv: Data, mode: AESPaddingMode) -> Data? { - let keyData = TWDataCreateWithNSData(key) - defer { - TWDataDelete(keyData) - } - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - let ivData = TWDataCreateWithNSData(iv) - defer { - TWDataDelete(ivData) - } - guard let result = TWAESEncryptCBC(keyData, dataData, ivData, TWAESPaddingMode(rawValue: mode.rawValue)) else { - return nil - } - return TWDataNSData(result) - } - - /// Decrypts a block of data using AES in Cipher Block Chaining (CBC) mode. - /// - /// - Parameter key: decryption key Data, must be 16, 24, or 32 bytes long. - /// - Parameter data: Data to decrypt. - /// - Parameter iv: initialization vector Data. - /// - Parameter mode: padding mode. - /// - Returns: decrypted Data. - public static func decryptCBC(key: Data, data: Data, iv: Data, mode: AESPaddingMode) -> Data? { - let keyData = TWDataCreateWithNSData(key) - defer { - TWDataDelete(keyData) - } - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - let ivData = TWDataCreateWithNSData(iv) - defer { - TWDataDelete(ivData) - } - guard let result = TWAESDecryptCBC(keyData, dataData, ivData, TWAESPaddingMode(rawValue: mode.rawValue)) else { - return nil - } - return TWDataNSData(result) - } - - /// Encrypts a block of data using AES in Counter (CTR) mode. - /// - /// - Parameter key: encryption key Data, must be 16, 24, or 32 bytes long. - /// - Parameter data: Data to encrypt. - /// - Parameter iv: initialization vector Data. - /// - Returns: encrypted Data. - public static func encryptCTR(key: Data, data: Data, iv: Data) -> Data? { - let keyData = TWDataCreateWithNSData(key) - defer { - TWDataDelete(keyData) - } - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - let ivData = TWDataCreateWithNSData(iv) - defer { - TWDataDelete(ivData) - } - guard let result = TWAESEncryptCTR(keyData, dataData, ivData) else { - return nil - } - return TWDataNSData(result) - } - - /// Decrypts a block of data using AES in Counter (CTR) mode. - /// - /// - Parameter key: decryption key Data, must be 16, 24, or 32 bytes long. - /// - Parameter data: Data to decrypt. - /// - Parameter iv: initialization vector Data. - /// - Returns: decrypted Data. - public static func decryptCTR(key: Data, data: Data, iv: Data) -> Data? { - let keyData = TWDataCreateWithNSData(key) - defer { - TWDataDelete(keyData) - } - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - let ivData = TWDataCreateWithNSData(iv) - defer { - TWDataDelete(ivData) - } - guard let result = TWAESDecryptCTR(keyData, dataData, ivData) else { - return nil - } - return TWDataNSData(result) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Account.swift b/Pods/TrustWalletCore/Sources/Generated/Account.swift deleted file mode 100644 index a4efaeca..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Account.swift +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents an Account in C++ with address, coin type and public key info, an item within a keystore. -public final class Account { - - /// Returns the address of an account. - /// - /// - Parameter account: Account to get the address of. - public var address: String { - return TWStringNSString(TWAccountAddress(rawValue)) - } - - /// Return CoinType enum of an account. - /// - /// - Parameter account: Account to get the coin type of. - public var coin: CoinType { - return CoinType(rawValue: TWAccountCoin(rawValue).rawValue)! - } - - /// Returns the derivation enum of an account. - /// - /// - Parameter account: Account to get the derivation enum of. - public var derivation: Derivation { - return Derivation(rawValue: TWAccountDerivation(rawValue).rawValue)! - } - - /// Returns derivationPath of an account. - /// - /// - Parameter account: Account to get the derivation path of. - public var derivationPath: String { - return TWStringNSString(TWAccountDerivationPath(rawValue)) - } - - /// Returns hex encoded publicKey of an account. - /// - /// - Parameter account: Account to get the public key of. - public var publicKey: String { - return TWStringNSString(TWAccountPublicKey(rawValue)) - } - - /// Returns Base58 encoded extendedPublicKey of an account. - /// - /// - Parameter account: Account to get the extended public key of. - public var extendedPublicKey: String { - return TWStringNSString(TWAccountExtendedPublicKey(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init(address: String, coin: CoinType, derivation: Derivation, derivationPath: String, publicKey: String, extendedPublicKey: String) { - let addressString = TWStringCreateWithNSString(address) - defer { - TWStringDelete(addressString) - } - let derivationPathString = TWStringCreateWithNSString(derivationPath) - defer { - TWStringDelete(derivationPathString) - } - let publicKeyString = TWStringCreateWithNSString(publicKey) - defer { - TWStringDelete(publicKeyString) - } - let extendedPublicKeyString = TWStringCreateWithNSString(extendedPublicKey) - defer { - TWStringDelete(extendedPublicKeyString) - } - rawValue = TWAccountCreate(addressString, TWCoinType(rawValue: coin.rawValue), TWDerivation(rawValue: derivation.rawValue), derivationPathString, publicKeyString, extendedPublicKeyString) - } - - deinit { - TWAccountDelete(rawValue) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/AnyAddress.swift b/Pods/TrustWalletCore/Sources/Generated/AnyAddress.swift deleted file mode 100644 index 100a7ca0..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/AnyAddress.swift +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents an address in C++ for almost any blockchain. -public final class AnyAddress: Address { - - /// Compares two addresses for equality. - /// - /// - Parameter lhs: The first address to compare. - /// - Parameter rhs: The second address to compare. - /// - Returns: bool indicating the addresses are equal. - public static func == (lhs: AnyAddress, rhs: AnyAddress) -> Bool { - return TWAnyAddressEqual(lhs.rawValue, rhs.rawValue) - } - - /// Determines if the string is a valid Any address. - /// - /// - Parameter string: address to validate. - /// - Parameter coin: coin type of the address. - /// - Returns: bool indicating if the address is valid. - public static func isValid(string: String, coin: CoinType) -> Bool { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - return TWAnyAddressIsValid(stringString, TWCoinType(rawValue: coin.rawValue)) - } - - /// Determines if the string is a valid Any address with the given hrp. - /// - /// - Parameter string: address to validate. - /// - Parameter coin: coin type of the address. - /// - Parameter hrp: explicit given hrp of the given address. - /// - Returns: bool indicating if the address is valid. - public static func isValidBech32(string: String, coin: CoinType, hrp: String) -> Bool { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - let hrpString = TWStringCreateWithNSString(hrp) - defer { - TWStringDelete(hrpString) - } - return TWAnyAddressIsValidBech32(stringString, TWCoinType(rawValue: coin.rawValue), hrpString) - } - - /// Determines if the string is a valid Any address with the given SS58 network prefix. - /// - /// - Parameter string: address to validate. - /// - Parameter coin: coin type of the address. - /// - Parameter ss58Prefix: ss58Prefix of the given address. - /// - Returns: bool indicating if the address is valid. - public static func isValidSS58(string: String, coin: CoinType, ss58Prefix: UInt32) -> Bool { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - return TWAnyAddressIsValidSS58(stringString, TWCoinType(rawValue: coin.rawValue), ss58Prefix) - } - - /// Returns the address string representation. - /// - /// - Parameter address: address to get the string representation of. - public var description: String { - return TWStringNSString(TWAnyAddressDescription(rawValue)) - } - - /// Returns coin type of address. - /// - /// - Parameter address: address to get the coin type of. - public var coin: CoinType { - return CoinType(rawValue: TWAnyAddressCoin(rawValue).rawValue)! - } - - /// Returns underlaying data (public key or key hash) - /// - /// - Parameter address: address to get the data of. - public var data: Data { - return TWDataNSData(TWAnyAddressData(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init?(string: String, coin: CoinType) { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let rawValue = TWAnyAddressCreateWithString(stringString, TWCoinType(rawValue: coin.rawValue)) else { - return nil - } - self.rawValue = rawValue - } - - public init?(string: String, coin: CoinType, hrp: String) { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - let hrpString = TWStringCreateWithNSString(hrp) - defer { - TWStringDelete(hrpString) - } - guard let rawValue = TWAnyAddressCreateBech32(stringString, TWCoinType(rawValue: coin.rawValue), hrpString) else { - return nil - } - self.rawValue = rawValue - } - - public init?(string: String, coin: CoinType, ss58Prefix: UInt32) { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let rawValue = TWAnyAddressCreateSS58(stringString, TWCoinType(rawValue: coin.rawValue), ss58Prefix) else { - return nil - } - self.rawValue = rawValue - } - - public init(publicKey: PublicKey, coin: CoinType) { - rawValue = TWAnyAddressCreateWithPublicKey(publicKey.rawValue, TWCoinType(rawValue: coin.rawValue)) - } - - public init(publicKey: PublicKey, coin: CoinType, derivation: Derivation) { - rawValue = TWAnyAddressCreateWithPublicKeyDerivation(publicKey.rawValue, TWCoinType(rawValue: coin.rawValue), TWDerivation(rawValue: derivation.rawValue)) - } - - public init(publicKey: PublicKey, coin: CoinType, hrp: String) { - let hrpString = TWStringCreateWithNSString(hrp) - defer { - TWStringDelete(hrpString) - } - rawValue = TWAnyAddressCreateBech32WithPublicKey(publicKey.rawValue, TWCoinType(rawValue: coin.rawValue), hrpString) - } - - public init(publicKey: PublicKey, coin: CoinType, ss58Prefix: UInt32) { - rawValue = TWAnyAddressCreateSS58WithPublicKey(publicKey.rawValue, TWCoinType(rawValue: coin.rawValue), ss58Prefix) - } - - public init(publicKey: PublicKey, filecoinAddressType: FilecoinAddressType) { - rawValue = TWAnyAddressCreateWithPublicKeyFilecoinAddressType(publicKey.rawValue, TWFilecoinAddressType(rawValue: filecoinAddressType.rawValue)) - } - - deinit { - TWAnyAddressDelete(rawValue) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/AsnParser.swift b/Pods/TrustWalletCore/Sources/Generated/AsnParser.swift deleted file mode 100644 index c1e1847e..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/AsnParser.swift +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents an ASN.1 DER parser. -public struct AsnParser { - - /// Parses the given ECDSA signature from ASN.1 DER encoded bytes. - /// - /// - Parameter encoded: The ASN.1 DER encoded signature. - /// - Returns: The ECDSA signature standard binary representation: RS, where R - 32 byte array, S - 32 byte array. - public static func ecdsaSignatureFromDer(encoded: Data) -> Data? { - let encodedData = TWDataCreateWithNSData(encoded) - defer { - TWDataDelete(encodedData) - } - guard let result = TWAsnParserEcdsaSignatureFromDer(encodedData) else { - return nil - } - return TWDataNSData(result) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Barz.swift b/Pods/TrustWalletCore/Sources/Generated/Barz.swift deleted file mode 100644 index 57cf4be2..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Barz.swift +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Barz functions -public struct Barz { - - /// Calculate a counterfactual address for the smart contract wallet - /// - /// - Parameter input: The serialized data of ContractAddressInput. - /// - Returns: The address. - public static func getCounterfactualAddress(input: Data) -> String { - let inputData = TWDataCreateWithNSData(input) - defer { - TWDataDelete(inputData) - } - return TWStringNSString(TWBarzGetCounterfactualAddress(inputData)) - } - - /// Returns the init code parameter of ERC-4337 User Operation - /// - /// - Parameter factory: Wallet factory address (BarzFactory) - /// - Parameter publicKey: Public key for the verification facet - /// - Parameter verificationFacet: Verification facet address - /// - Returns: The address. - public static func getInitCode(factory: String, publicKey: PublicKey, verificationFacet: String, salt: UInt32) -> Data { - let factoryString = TWStringCreateWithNSString(factory) - defer { - TWStringDelete(factoryString) - } - let verificationFacetString = TWStringCreateWithNSString(verificationFacet) - defer { - TWStringDelete(verificationFacetString) - } - return TWDataNSData(TWBarzGetInitCode(factoryString, publicKey.rawValue, verificationFacetString, salt)) - } - - /// Converts the original ASN-encoded signature from webauthn to the format accepted by Barz - /// - /// - Parameter signature: Original signature - /// - Parameter challenge: The original challenge that was signed - /// - Parameter authenticatorData: Returned from Webauthn API - /// - Parameter clientDataJSON: Returned from Webauthn API - /// - Returns: Bytes of the formatted signature - public static func getFormattedSignature(signature: Data, challenge: Data, authenticatorData: Data, clientDataJSON: String) -> Data { - let signatureData = TWDataCreateWithNSData(signature) - defer { - TWDataDelete(signatureData) - } - let challengeData = TWDataCreateWithNSData(challenge) - defer { - TWDataDelete(challengeData) - } - let authenticatorDataData = TWDataCreateWithNSData(authenticatorData) - defer { - TWDataDelete(authenticatorDataData) - } - let clientDataJSONString = TWStringCreateWithNSString(clientDataJSON) - defer { - TWStringDelete(clientDataJSONString) - } - return TWDataNSData(TWBarzGetFormattedSignature(signatureData, challengeData, authenticatorDataData, clientDataJSONString)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Base32.swift b/Pods/TrustWalletCore/Sources/Generated/Base32.swift deleted file mode 100644 index cb74fed3..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Base32.swift +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Base32 encode / decode functions -public struct Base32 { - - /// Decode a Base32 input with the given alphabet - /// - /// - Parameter string: Encoded base32 input to be decoded - /// - Parameter alphabet: Decode with the given alphabet, if nullptr ALPHABET_RFC4648 is used by default - /// - Returns: The decoded data, can be null. - /// - Note: ALPHABET_RFC4648 doesn't support padding in the default alphabet - public static func decodeWithAlphabet(string: String, alphabet: String?) -> Data? { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - let alphabetString: UnsafeRawPointer? - if let s = alphabet { - alphabetString = TWStringCreateWithNSString(s) - } else { - alphabetString = nil - } - defer { - if let s = alphabetString { - TWStringDelete(s) - } - } - guard let result = TWBase32DecodeWithAlphabet(stringString, alphabetString) else { - return nil - } - return TWDataNSData(result) - } - - /// Decode a Base32 input with the default alphabet (ALPHABET_RFC4648) - /// - /// - Parameter string: Encoded input to be decoded - /// - Returns: The decoded data - /// - Note: Call TWBase32DecodeWithAlphabet with nullptr. - public static func decode(string: String) -> Data? { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let result = TWBase32Decode(stringString) else { - return nil - } - return TWDataNSData(result) - } - - /// Encode an input to Base32 with the given alphabet - /// - /// - Parameter data: Data to be encoded (raw bytes) - /// - Parameter alphabet: Encode with the given alphabet, if nullptr ALPHABET_RFC4648 is used by default - /// - Returns: The encoded data - /// - Note: ALPHABET_RFC4648 doesn't support padding in the default alphabet - public static func encodeWithAlphabet(data: Data, alphabet: String?) -> String { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - let alphabetString: UnsafeRawPointer? - if let s = alphabet { - alphabetString = TWStringCreateWithNSString(s) - } else { - alphabetString = nil - } - defer { - if let s = alphabetString { - TWStringDelete(s) - } - } - return TWStringNSString(TWBase32EncodeWithAlphabet(dataData, alphabetString)) - } - - /// Encode an input to Base32 with the default alphabet (ALPHABET_RFC4648) - /// - /// - Parameter data: Data to be encoded (raw bytes) - /// - Returns: The encoded data - /// - Note: Call TWBase32EncodeWithAlphabet with nullptr. - public static func encode(data: Data) -> String { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWStringNSString(TWBase32Encode(dataData)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Base58.swift b/Pods/TrustWalletCore/Sources/Generated/Base58.swift deleted file mode 100644 index c7893bef..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Base58.swift +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Base58 encode / decode functions -public struct Base58 { - - /// Encodes data as a Base58 string, including the checksum. - /// - /// - Parameter data: The data to encode. - /// - Returns: the encoded Base58 string with checksum. - public static func encode(data: Data) -> String { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWStringNSString(TWBase58Encode(dataData)) - } - - /// Encodes data as a Base58 string, not including the checksum. - /// - /// - Parameter data: The data to encode. - /// - Returns: then encoded Base58 string without checksum. - public static func encodeNoCheck(data: Data) -> String { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWStringNSString(TWBase58EncodeNoCheck(dataData)) - } - - /// Decodes a Base58 string, checking the checksum. Returns null if the string is not a valid Base58 string. - /// - /// - Parameter string: The Base58 string to decode. - /// - Returns: the decoded data, empty if the string is not a valid Base58 string with checksum. - public static func decode(string: String) -> Data? { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let result = TWBase58Decode(stringString) else { - return nil - } - return TWDataNSData(result) - } - - /// Decodes a Base58 string, w/o checking the checksum. Returns null if the string is not a valid Base58 string. - /// - /// - Parameter string: The Base58 string to decode. - /// - Returns: the decoded data, empty if the string is not a valid Base58 string without checksum. - public static func decodeNoCheck(string: String) -> Data? { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let result = TWBase58DecodeNoCheck(stringString) else { - return nil - } - return TWDataNSData(result) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Base64.swift b/Pods/TrustWalletCore/Sources/Generated/Base64.swift deleted file mode 100644 index 053b4c75..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Base64.swift +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Base64 encode / decode functions -public struct Base64 { - - /// Decode a Base64 input with the default alphabet (RFC4648 with '+', '/') - /// - /// - Parameter string: Encoded input to be decoded - /// - Returns: The decoded data, empty if decoding failed. - public static func decode(string: String) -> Data? { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let result = TWBase64Decode(stringString) else { - return nil - } - return TWDataNSData(result) - } - - /// Decode a Base64 input with the alphabet safe for URL-s and filenames (RFC4648 with '-', '_') - /// - /// - Parameter string: Encoded base64 input to be decoded - /// - Returns: The decoded data, empty if decoding failed. - public static func decodeUrl(string: String) -> Data? { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let result = TWBase64DecodeUrl(stringString) else { - return nil - } - return TWDataNSData(result) - } - - /// Encode an input to Base64 with the default alphabet (RFC4648 with '+', '/') - /// - /// - Parameter data: Data to be encoded (raw bytes) - /// - Returns: The encoded data - public static func encode(data: Data) -> String { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWStringNSString(TWBase64Encode(dataData)) - } - - /// Encode an input to Base64 with the alphabet safe for URL-s and filenames (RFC4648 with '-', '_') - /// - /// - Parameter data: Data to be encoded (raw bytes) - /// - Returns: The encoded data - public static func encodeUrl(data: Data) -> String { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWStringNSString(TWBase64EncodeUrl(dataData)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/BitcoinAddress.swift b/Pods/TrustWalletCore/Sources/Generated/BitcoinAddress.swift deleted file mode 100644 index 9bcdf2f8..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/BitcoinAddress.swift +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents a legacy Bitcoin address in C++. -public final class BitcoinAddress: Address { - - /// Compares two addresses for equality. - /// - /// - Parameter lhs: The first address to compare. - /// - Parameter rhs: The second address to compare. - /// - Returns: bool indicating the addresses are equal. - public static func == (lhs: BitcoinAddress, rhs: BitcoinAddress) -> Bool { - return TWBitcoinAddressEqual(lhs.rawValue, rhs.rawValue) - } - - /// Determines if the data is a valid Bitcoin address. - /// - /// - Parameter data: data to validate. - /// - Returns: bool indicating if the address data is valid. - public static func isValid(data: Data) -> Bool { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWBitcoinAddressIsValid(dataData) - } - - /// Determines if the string is a valid Bitcoin address. - /// - /// - Parameter string: string to validate. - /// - Returns: bool indicating if the address string is valid. - public static func isValidString(string: String) -> Bool { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - return TWBitcoinAddressIsValidString(stringString) - } - - /// Returns the address in Base58 string representation. - /// - /// - Parameter address: Address to get the string representation of. - public var description: String { - return TWStringNSString(TWBitcoinAddressDescription(rawValue)) - } - - /// Returns the address prefix. - /// - /// - Parameter address: Address to get the prefix of. - public var prefix: UInt8 { - return TWBitcoinAddressPrefix(rawValue) - } - - /// Returns the key hash data. - /// - /// - Parameter address: Address to get the keyhash data of. - public var keyhash: Data { - return TWDataNSData(TWBitcoinAddressKeyhash(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init?(string: String) { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let rawValue = TWBitcoinAddressCreateWithString(stringString) else { - return nil - } - self.rawValue = rawValue - } - - public init?(data: Data) { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - guard let rawValue = TWBitcoinAddressCreateWithData(dataData) else { - return nil - } - self.rawValue = rawValue - } - - public init?(publicKey: PublicKey, prefix: UInt8) { - guard let rawValue = TWBitcoinAddressCreateWithPublicKey(publicKey.rawValue, prefix) else { - return nil - } - self.rawValue = rawValue - } - - deinit { - TWBitcoinAddressDelete(rawValue) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/BitcoinFee.swift b/Pods/TrustWalletCore/Sources/Generated/BitcoinFee.swift deleted file mode 100644 index 8f9d9184..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/BitcoinFee.swift +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - - -public final class BitcoinFee { - - /// Calculates the fee of any Bitcoin transaction. - /// - /// - Parameter data:: the signed transaction in its final form. - /// - Parameter satVb:: the satoshis per vbyte amount. The passed on string is interpreted as a unit64_t. - /// - Returns:s the fee denominated in satoshis or nullptr if the transaction failed to be decoded. - public static func calculateFee(data: Data, satVb: String) -> String? { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - let satVbString = TWStringCreateWithNSString(satVb) - defer { - TWStringDelete(satVbString) - } - guard let result = TWBitcoinFeeCalculateFee(dataData, satVbString) else { - return nil - } - return TWStringNSString(result) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/BitcoinMessageSigner.swift b/Pods/TrustWalletCore/Sources/Generated/BitcoinMessageSigner.swift deleted file mode 100644 index 0ff95751..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/BitcoinMessageSigner.swift +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Bitcoin message signing and verification. -/// -/// Bitcoin Core and some other wallets support a message signing & verification format, to create a proof (a signature) -/// that someone has access to the private keys of a specific address. -/// This feature currently works on old legacy addresses only. -public struct BitcoinMessageSigner { - - /// Sign a message. - /// - /// - Parameter privateKey:: the private key used for signing - /// - Parameter address:: the address that matches the privateKey, must be a legacy address (P2PKH) - /// - Parameter message:: A custom message which is input to the signing. - /// - Note: Address is derived assuming compressed public key format. - /// - Returns:s the signature, Base64-encoded. On invalid input empty string is returned. Returned object needs to be deleteed after use. - public static func signMessage(privateKey: PrivateKey, address: String, message: String) -> String { - let addressString = TWStringCreateWithNSString(address) - defer { - TWStringDelete(addressString) - } - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - return TWStringNSString(TWBitcoinMessageSignerSignMessage(privateKey.rawValue, addressString, messageString)) - } - - /// Verify signature for a message. - /// - /// - Parameter address:: address to use, only legacy is supported - /// - Parameter message:: the message signed (without prefix) - /// - Parameter signature:: in Base64-encoded form. - /// - Returns:s false on any invalid input (does not throw). - public static func verifyMessage(address: String, message: String, signature: String) -> Bool { - let addressString = TWStringCreateWithNSString(address) - defer { - TWStringDelete(addressString) - } - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - let signatureString = TWStringCreateWithNSString(signature) - defer { - TWStringDelete(signatureString) - } - return TWBitcoinMessageSignerVerifyMessage(addressString, messageString, signatureString) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/BitcoinScript.swift b/Pods/TrustWalletCore/Sources/Generated/BitcoinScript.swift deleted file mode 100644 index 385853dd..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/BitcoinScript.swift +++ /dev/null @@ -1,315 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Bitcoin script manipulating functions -public final class BitcoinScript { - - /// Determines whether 2 scripts have the same content - /// - /// - Parameter lhs: Non-null pointer to the first script - /// - Parameter rhs: Non-null pointer to the second script - /// - Returns: true if both script have the same content - public static func == (lhs: BitcoinScript, rhs: BitcoinScript) -> Bool { - return TWBitcoinScriptEqual(lhs.rawValue, rhs.rawValue) - } - - /// Builds a standard 'pay to public key' script. - /// - /// - Parameter pubkey: Non-null pointer to a pubkey - /// - Note: Must be deleted with \TWBitcoinScriptDelete - /// - Returns: A pointer to the built script - public static func buildPayToPublicKey(pubkey: Data) -> BitcoinScript { - let pubkeyData = TWDataCreateWithNSData(pubkey) - defer { - TWDataDelete(pubkeyData) - } - return BitcoinScript(rawValue: TWBitcoinScriptBuildPayToPublicKey(pubkeyData)) - } - - /// Builds a standard 'pay to public key hash' script. - /// - /// - Parameter hash: Non-null pointer to a PublicKey hash - /// - Note: Must be deleted with \TWBitcoinScriptDelete - /// - Returns: A pointer to the built script - public static func buildPayToPublicKeyHash(hash: Data) -> BitcoinScript { - let hashData = TWDataCreateWithNSData(hash) - defer { - TWDataDelete(hashData) - } - return BitcoinScript(rawValue: TWBitcoinScriptBuildPayToPublicKeyHash(hashData)) - } - - /// Builds a standard 'pay to script hash' script. - /// - /// - Parameter scriptHash: Non-null pointer to a script hash - /// - Note: Must be deleted with \TWBitcoinScriptDelete - /// - Returns: A pointer to the built script - public static func buildPayToScriptHash(scriptHash: Data) -> BitcoinScript { - let scriptHashData = TWDataCreateWithNSData(scriptHash) - defer { - TWDataDelete(scriptHashData) - } - return BitcoinScript(rawValue: TWBitcoinScriptBuildPayToScriptHash(scriptHashData)) - } - - /// Builds a pay-to-witness-public-key-hash (P2WPKH) script.. - /// - /// - Parameter hash: Non-null pointer to a witness public key hash - /// - Note: Must be deleted with \TWBitcoinScriptDelete - /// - Returns: A pointer to the built script - public static func buildPayToWitnessPubkeyHash(hash: Data) -> BitcoinScript { - let hashData = TWDataCreateWithNSData(hash) - defer { - TWDataDelete(hashData) - } - return BitcoinScript(rawValue: TWBitcoinScriptBuildPayToWitnessPubkeyHash(hashData)) - } - - /// Builds a pay-to-witness-script-hash (P2WSH) script. - /// - /// - Parameter scriptHash: Non-null pointer to a script hash - /// - Note: Must be deleted with \TWBitcoinScriptDelete - /// - Returns: A pointer to the built script - public static func buildPayToWitnessScriptHash(scriptHash: Data) -> BitcoinScript { - let scriptHashData = TWDataCreateWithNSData(scriptHash) - defer { - TWDataDelete(scriptHashData) - } - return BitcoinScript(rawValue: TWBitcoinScriptBuildPayToWitnessScriptHash(scriptHashData)) - } - - /// Builds the Ordinals inscripton for BRC20 transfer. - /// - /// - Parameter ticker: ticker of the brc20 - /// - Parameter amount: uint64 transfer amount - /// - Parameter pubkey: Non-null pointer to a pubkey - /// - Note: Must be deleted with \TWBitcoinScriptDelete - /// - Returns: A pointer to the built script - public static func buildBRC20InscribeTransfer(ticker: String, amount: String, pubkey: Data) -> Data { - let tickerString = TWStringCreateWithNSString(ticker) - defer { - TWStringDelete(tickerString) - } - let amountString = TWStringCreateWithNSString(amount) - defer { - TWStringDelete(amountString) - } - let pubkeyData = TWDataCreateWithNSData(pubkey) - defer { - TWDataDelete(pubkeyData) - } - return TWDataNSData(TWBitcoinScriptBuildBRC20InscribeTransfer(tickerString, amountString, pubkeyData)) - } - - /// Builds the Ordinals inscripton for NFT construction. - /// - /// - Parameter mimeType: the MIME type of the payload - /// - Parameter payload: the payload to inscribe - /// - Parameter pubkey: Non-null pointer to a pubkey - /// - Note: Must be deleted with \TWBitcoinScriptDelete - /// - Returns: A pointer to the built script - public static func buildOrdinalNftInscription(mimeType: String, payload: Data, pubkey: Data) -> Data { - let mimeTypeString = TWStringCreateWithNSString(mimeType) - defer { - TWStringDelete(mimeTypeString) - } - let payloadData = TWDataCreateWithNSData(payload) - defer { - TWDataDelete(payloadData) - } - let pubkeyData = TWDataCreateWithNSData(pubkey) - defer { - TWDataDelete(pubkeyData) - } - return TWDataNSData(TWBitcoinScriptBuildOrdinalNftInscription(mimeTypeString, payloadData, pubkeyData)) - } - - /// Builds a appropriate lock script for the given address.. - /// - /// - Parameter address: Non-null pointer to an address - /// - Parameter coin: coin type - /// - Note: Must be deleted with \TWBitcoinScriptDelete - /// - Returns: A pointer to the built script - public static func lockScriptForAddress(address: String, coin: CoinType) -> BitcoinScript { - let addressString = TWStringCreateWithNSString(address) - defer { - TWStringDelete(addressString) - } - return BitcoinScript(rawValue: TWBitcoinScriptLockScriptForAddress(addressString, TWCoinType(rawValue: coin.rawValue))) - } - - /// Builds a appropriate lock script for the given address with replay. - public static func lockScriptForAddressReplay(address: String, coin: CoinType, blockHash: Data, blockHeight: Int64) -> BitcoinScript { - let addressString = TWStringCreateWithNSString(address) - defer { - TWStringDelete(addressString) - } - let blockHashData = TWDataCreateWithNSData(blockHash) - defer { - TWDataDelete(blockHashData) - } - return BitcoinScript(rawValue: TWBitcoinScriptLockScriptForAddressReplay(addressString, TWCoinType(rawValue: coin.rawValue), blockHashData, blockHeight)) - } - - /// Return the default HashType for the given coin, such as TWBitcoinSigHashTypeAll. - /// - /// - Parameter coinType: coin type - /// - Returns: default HashType for the given coin - public static func hashTypeForCoin(coinType: CoinType) -> UInt32 { - return TWBitcoinScriptHashTypeForCoin(TWCoinType(rawValue: coinType.rawValue)) - } - - /// Get size of a script - /// - /// - Parameter script: Non-null pointer to a script - /// - Returns: size of the script - public var size: Int { - return TWBitcoinScriptSize(rawValue) - } - - /// Get data of a script - /// - /// - Parameter script: Non-null pointer to a script - /// - Returns: data of the given script - public var data: Data { - return TWDataNSData(TWBitcoinScriptData(rawValue)) - } - - /// Return script hash of a script - /// - /// - Parameter script: Non-null pointer to a script - /// - Returns: script hash of the given script - public var scriptHash: Data { - return TWDataNSData(TWBitcoinScriptScriptHash(rawValue)) - } - - /// Determines whether this is a pay-to-script-hash (P2SH) script. - /// - /// - Parameter script: Non-null pointer to a script - /// - Returns: true if this is a pay-to-script-hash (P2SH) script, false otherwise - public var isPayToScriptHash: Bool { - return TWBitcoinScriptIsPayToScriptHash(rawValue) - } - - /// Determines whether this is a pay-to-witness-script-hash (P2WSH) script. - /// - /// - Parameter script: Non-null pointer to a script - /// - Returns: true if this is a pay-to-witness-script-hash (P2WSH) script, false otherwise - public var isPayToWitnessScriptHash: Bool { - return TWBitcoinScriptIsPayToWitnessScriptHash(rawValue) - } - - /// Determines whether this is a pay-to-witness-public-key-hash (P2WPKH) script. - /// - /// - Parameter script: Non-null pointer to a script - /// - Returns: true if this is a pay-to-witness-public-key-hash (P2WPKH) script, false otherwise - public var isPayToWitnessPublicKeyHash: Bool { - return TWBitcoinScriptIsPayToWitnessPublicKeyHash(rawValue) - } - - /// Determines whether this is a witness program script. - /// - /// - Parameter script: Non-null pointer to a script - /// - Returns: true if this is a witness program script, false otherwise - public var isWitnessProgram: Bool { - return TWBitcoinScriptIsWitnessProgram(rawValue) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init() { - rawValue = TWBitcoinScriptCreate() - } - - public init(data: Data) { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - rawValue = TWBitcoinScriptCreateWithData(dataData) - } - - public init(script: BitcoinScript) { - rawValue = TWBitcoinScriptCreateCopy(script.rawValue) - } - - deinit { - TWBitcoinScriptDelete(rawValue) - } - - /// Matches the script to a pay-to-public-key (P2PK) script. - /// - /// - Parameter script: Non-null pointer to a script - /// - Returns: The public key. - public func matchPayToPubkey() -> Data? { - guard let result = TWBitcoinScriptMatchPayToPubkey(rawValue) else { - return nil - } - return TWDataNSData(result) - } - - /// Matches the script to a pay-to-public-key-hash (P2PKH). - /// - /// - Parameter script: Non-null pointer to a script - /// - Returns: the key hash. - public func matchPayToPubkeyHash() -> Data? { - guard let result = TWBitcoinScriptMatchPayToPubkeyHash(rawValue) else { - return nil - } - return TWDataNSData(result) - } - - /// Matches the script to a pay-to-script-hash (P2SH). - /// - /// - Parameter script: Non-null pointer to a script - /// - Returns: the script hash. - public func matchPayToScriptHash() -> Data? { - guard let result = TWBitcoinScriptMatchPayToScriptHash(rawValue) else { - return nil - } - return TWDataNSData(result) - } - - /// Matches the script to a pay-to-witness-public-key-hash (P2WPKH). - /// - /// - Parameter script: Non-null pointer to a script - /// - Returns: the key hash. - public func matchPayToWitnessPublicKeyHash() -> Data? { - guard let result = TWBitcoinScriptMatchPayToWitnessPublicKeyHash(rawValue) else { - return nil - } - return TWDataNSData(result) - } - - /// Matches the script to a pay-to-witness-script-hash (P2WSH). - /// - /// - Parameter script: Non-null pointer to a script - /// - Returns: the script hash, a SHA256 of the witness script.. - public func matchPayToWitnessScriptHash() -> Data? { - guard let result = TWBitcoinScriptMatchPayToWitnessScriptHash(rawValue) else { - return nil - } - return TWDataNSData(result) - } - - /// Encodes the script. - /// - /// - Parameter script: Non-null pointer to a script - /// - Returns: The encoded script - public func encode() -> Data { - return TWDataNSData(TWBitcoinScriptEncode(rawValue)) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/BitcoinSigHashType+Extension.swift b/Pods/TrustWalletCore/Sources/Generated/BitcoinSigHashType+Extension.swift deleted file mode 100644 index c473857e..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/BitcoinSigHashType+Extension.swift +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -extension BitcoinSigHashType { - - /// Determines if the given sig hash is single - /// - /// - Parameter type: sig hash type - /// - Returns: true if the sigh hash type is single, false otherwise - public func isSingle() -> Bool { - return TWBitcoinSigHashTypeIsSingle(TWBitcoinSigHashType(rawValue: rawValue)) - } - - - /// Determines if the given sig hash is none - /// - /// - Parameter type: sig hash type - /// - Returns: true if the sigh hash type is none, false otherwise - public func isNone() -> Bool { - return TWBitcoinSigHashTypeIsNone(TWBitcoinSigHashType(rawValue: rawValue)) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Cardano.swift b/Pods/TrustWalletCore/Sources/Generated/Cardano.swift deleted file mode 100644 index 6b7d7a5c..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Cardano.swift +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Cardano helper functions -public struct Cardano { - - /// Calculates the minimum ADA amount needed for a UTXO. - /// - /// \deprecated consider using `TWCardanoOutputMinAdaAmount` instead. - /// - SeeAlso: reference https://docs.cardano.org/native-tokens/minimum-ada-value-requirement - /// - Parameter tokenBundle: serialized data of TW.Cardano.Proto.TokenBundle. - /// - Returns: the minimum ADA amount. - public static func minAdaAmount(tokenBundle: Data) -> UInt64 { - let tokenBundleData = TWDataCreateWithNSData(tokenBundle) - defer { - TWDataDelete(tokenBundleData) - } - return TWCardanoMinAdaAmount(tokenBundleData) - } - - /// Calculates the minimum ADA amount needed for an output. - /// - /// - SeeAlso: reference https://docs.cardano.org/native-tokens/minimum-ada-value-requirement - /// - Parameter toAddress: valid destination address, as string. - /// - Parameter tokenBundle: serialized data of TW.Cardano.Proto.TokenBundle. - /// - Parameter coinsPerUtxoByte: cost per one byte of a serialized UTXO (Base-10 decimal string). - /// - Returns: the minimum ADA amount (Base-10 decimal string). - public static func outputMinAdaAmount(toAddress: String, tokenBundle: Data, coinsPerUtxoByte: String) -> String? { - let toAddressString = TWStringCreateWithNSString(toAddress) - defer { - TWStringDelete(toAddressString) - } - let tokenBundleData = TWDataCreateWithNSData(tokenBundle) - defer { - TWDataDelete(tokenBundleData) - } - let coinsPerUtxoByteString = TWStringCreateWithNSString(coinsPerUtxoByte) - defer { - TWStringDelete(coinsPerUtxoByteString) - } - guard let result = TWCardanoOutputMinAdaAmount(toAddressString, tokenBundleData, coinsPerUtxoByteString) else { - return nil - } - return TWStringNSString(result) - } - - /// Return the staking address associated to (contained in) this address. Must be a Base address. - /// Empty string is returned on error. Result must be freed. - /// - Parameter baseAddress: A valid base address, as string. - /// - Returns: the associated staking (reward) address, as string, or empty string on error. - public static func getStakingAddress(baseAddress: String) -> String { - let baseAddressString = TWStringCreateWithNSString(baseAddress) - defer { - TWStringDelete(baseAddressString) - } - return TWStringNSString(TWCardanoGetStakingAddress(baseAddressString)) - } - - /// Return the legacy(byron) address. - /// - Parameter publicKey: A valid public key with TWPublicKeyTypeED25519Cardano type. - /// - Returns: the legacy(byron) address, as string, or empty string on error. - public static func getByronAddress(publicKey: PublicKey) -> String { - return TWStringNSString(TWCardanoGetByronAddress(publicKey.rawValue)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/CoinType+Extension.swift b/Pods/TrustWalletCore/Sources/Generated/CoinType+Extension.swift deleted file mode 100644 index 53dcfb15..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/CoinType+Extension.swift +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -extension CoinType { - /// Returns the blockchain for a coin type. - /// - /// - Parameter coin: A coin type - /// - Returns: blockchain associated to the given coin type - public var blockchain: Blockchain { - return Blockchain(rawValue: TWCoinTypeBlockchain(TWCoinType(rawValue: rawValue)).rawValue)! - } - /// Returns the purpose for a coin type. - /// - /// - Parameter coin: A coin type - /// - Returns: purpose associated to the given coin type - public var purpose: Purpose { - return Purpose(rawValue: TWCoinTypePurpose(TWCoinType(rawValue: rawValue)).rawValue)! - } - /// Returns the curve that should be used for a coin type. - /// - /// - Parameter coin: A coin type - /// - Returns: curve that should be used for the given coin type - public var curve: Curve { - return Curve(rawValue: TWCoinTypeCurve(TWCoinType(rawValue: rawValue)).rawValue)! - } - /// Returns the xpub HD version that should be used for a coin type. - /// - /// - Parameter coin: A coin type - /// - Returns: xpub HD version that should be used for the given coin type - public var xpubVersion: HDVersion { - return HDVersion(rawValue: TWCoinTypeXpubVersion(TWCoinType(rawValue: rawValue)).rawValue)! - } - /// Returns the xprv HD version that should be used for a coin type. - /// - /// - Parameter coin: A coin type - /// - Returns: the xprv HD version that should be used for the given coin type. - public var xprvVersion: HDVersion { - return HDVersion(rawValue: TWCoinTypeXprvVersion(TWCoinType(rawValue: rawValue)).rawValue)! - } - /// HRP for this coin type - /// - /// - Parameter coin: A coin type - /// - Returns: HRP of the given coin type. - public var hrp: HRP { - return HRP(rawValue: TWCoinTypeHRP(TWCoinType(rawValue: rawValue)).rawValue)! - } - /// P2PKH prefix for this coin type - /// - /// - Parameter coin: A coin type - /// - Returns: P2PKH prefix for the given coin type - public var p2pkhPrefix: UInt8 { - return TWCoinTypeP2pkhPrefix(TWCoinType(rawValue: rawValue)) - } - /// P2SH prefix for this coin type - /// - /// - Parameter coin: A coin type - /// - Returns: P2SH prefix for the given coin type - public var p2shPrefix: UInt8 { - return TWCoinTypeP2shPrefix(TWCoinType(rawValue: rawValue)) - } - /// Static prefix for this coin type - /// - /// - Parameter coin: A coin type - /// - Returns: Static prefix for the given coin type - public var staticPrefix: UInt8 { - return TWCoinTypeStaticPrefix(TWCoinType(rawValue: rawValue)) - } - /// ChainID for this coin type. - /// - /// - Parameter coin: A coin type - /// - Returns: ChainID for the given coin type. - /// - Note: Caller must free returned object. - public var chainId: String { - return TWStringNSString(TWCoinTypeChainId(TWCoinType(rawValue: rawValue))) - } - /// SLIP-0044 id for this coin type - /// - /// - Parameter coin: A coin type - /// - Returns: SLIP-0044 id for the given coin type - public var slip44Id: UInt32 { - return TWCoinTypeSlip44Id(TWCoinType(rawValue: rawValue)) - } - /// SS58Prefix for this coin type - /// - /// - Parameter coin: A coin type - /// - Returns: SS58Prefix for the given coin type - public var ss58Prefix: UInt32 { - return TWCoinTypeSS58Prefix(TWCoinType(rawValue: rawValue)) - } - /// public key type for this coin type - /// - /// - Parameter coin: A coin type - /// - Returns: public key type for the given coin type - public var publicKeyType: PublicKeyType { - return PublicKeyType(rawValue: TWCoinTypePublicKeyType(TWCoinType(rawValue: rawValue)).rawValue)! - } - - /// Validates an address string. - /// - /// - Parameter coin: A coin type - /// - Parameter address: A public address - /// - Returns: true if the address is a valid public address of the given coin, false otherwise. - public func validate(address: String) -> Bool { - let addressString = TWStringCreateWithNSString(address) - defer { - TWStringDelete(addressString) - } - return TWCoinTypeValidate(TWCoinType(rawValue: rawValue), addressString) - } - - - /// Returns the default derivation path for a particular coin. - /// - /// - Parameter coin: A coin type - /// - Returns: the default derivation path for the given coin type. - public func derivationPath() -> String { - return TWStringNSString(TWCoinTypeDerivationPath(TWCoinType(rawValue: rawValue))) - } - - - /// Returns the derivation path for a particular coin with the explicit given derivation. - /// - /// - Parameter coin: A coin type - /// - Parameter derivation: A derivation type - /// - Returns: the derivation path for the given coin with the explicit given derivation - public func derivationPathWithDerivation(derivation: Derivation) -> String { - return TWStringNSString(TWCoinTypeDerivationPathWithDerivation(TWCoinType(rawValue: rawValue), TWDerivation(rawValue: derivation.rawValue))) - } - - - /// Derives the address for a particular coin from the private key. - /// - /// - Parameter coin: A coin type - /// - Parameter privateKey: A valid private key - /// - Returns: Derived address for the given coin from the private key. - public func deriveAddress(privateKey: PrivateKey) -> String { - return TWStringNSString(TWCoinTypeDeriveAddress(TWCoinType(rawValue: rawValue), privateKey.rawValue)) - } - - - /// Derives the address for a particular coin from the public key. - /// - /// - Parameter coin: A coin type - /// - Parameter publicKey: A valid public key - /// - Returns: Derived address for the given coin from the public key. - public func deriveAddressFromPublicKey(publicKey: PublicKey) -> String { - return TWStringNSString(TWCoinTypeDeriveAddressFromPublicKey(TWCoinType(rawValue: rawValue), publicKey.rawValue)) - } - - - /// Derives the address for a particular coin from the public key with the derivation. - public func deriveAddressFromPublicKeyAndDerivation(publicKey: PublicKey, derivation: Derivation) -> String { - return TWStringNSString(TWCoinTypeDeriveAddressFromPublicKeyAndDerivation(TWCoinType(rawValue: rawValue), publicKey.rawValue, TWDerivation(rawValue: derivation.rawValue))) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/CoinTypeConfiguration.swift b/Pods/TrustWalletCore/Sources/Generated/CoinTypeConfiguration.swift deleted file mode 100644 index 71a08a15..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/CoinTypeConfiguration.swift +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// CoinTypeConfiguration functions -public struct CoinTypeConfiguration { - - /// Returns stock symbol of coin - /// - /// - Parameter type: A coin type - /// - Returns: A non-null TWString stock symbol of coin - /// - Note: Caller must free returned object - public static func getSymbol(type: CoinType) -> String { - return TWStringNSString(TWCoinTypeConfigurationGetSymbol(TWCoinType(rawValue: type.rawValue))) - } - - /// Returns max count decimal places for minimal coin unit - /// - /// - Parameter type: A coin type - /// - Returns: Returns max count decimal places for minimal coin unit - public static func getDecimals(type: CoinType) -> Int32 { - return TWCoinTypeConfigurationGetDecimals(TWCoinType(rawValue: type.rawValue)) - } - - /// Returns transaction url in blockchain explorer - /// - /// - Parameter type: A coin type - /// - Parameter transactionID: A transaction identifier - /// - Returns: Returns a non-null TWString transaction url in blockchain explorer - public static func getTransactionURL(type: CoinType, transactionID: String) -> String { - let transactionIDString = TWStringCreateWithNSString(transactionID) - defer { - TWStringDelete(transactionIDString) - } - return TWStringNSString(TWCoinTypeConfigurationGetTransactionURL(TWCoinType(rawValue: type.rawValue), transactionIDString)) - } - - /// Returns account url in blockchain explorer - /// - /// - Parameter type: A coin type - /// - Parameter accountID: an Account identifier - /// - Returns: Returns a non-null TWString account url in blockchain explorer - public static func getAccountURL(type: CoinType, accountID: String) -> String { - let accountIDString = TWStringCreateWithNSString(accountID) - defer { - TWStringDelete(accountIDString) - } - return TWStringNSString(TWCoinTypeConfigurationGetAccountURL(TWCoinType(rawValue: type.rawValue), accountIDString)) - } - - /// Returns full name of coin in lower case - /// - /// - Parameter type: A coin type - /// - Returns: Returns a non-null TWString, full name of coin in lower case - public static func getID(type: CoinType) -> String { - return TWStringNSString(TWCoinTypeConfigurationGetID(TWCoinType(rawValue: type.rawValue))) - } - - /// Returns full name of coin - /// - /// - Parameter type: A coin type - /// - Returns: Returns a non-null TWString, full name of coin - public static func getName(type: CoinType) -> String { - return TWStringNSString(TWCoinTypeConfigurationGetName(TWCoinType(rawValue: type.rawValue))) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/DataVector.swift b/Pods/TrustWalletCore/Sources/Generated/DataVector.swift deleted file mode 100644 index 3d35e27c..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/DataVector.swift +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// A vector of TWData byte arrays -public final class DataVector { - - /// Retrieve the number of elements - /// - /// - Parameter dataVector: A non-null Vector of data - /// - Returns: the size of the given vector. - public var size: Int { - return TWDataVectorSize(rawValue) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init() { - rawValue = TWDataVectorCreate() - } - - public init(data: Data) { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - rawValue = TWDataVectorCreateWithData(dataData) - } - - deinit { - TWDataVectorDelete(rawValue) - } - - /// Add an element to a Vector of Data. Element is cloned - /// - /// - Parameter dataVector: A non-null Vector of data - /// - Parameter data: A non-null valid block of data - /// - Note: data input parameter must be deleted on its own - public func add(data: Data) -> Void { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataVectorAdd(rawValue, dataData) - } - - /// Retrieve the n-th element. - /// - /// - Parameter dataVector: A non-null Vector of data - /// - Parameter index: index element of the vector to be retrieved, need to be < TWDataVectorSize - /// - Note: Returned element must be freed with \TWDataDelete - /// - Returns: A non-null block of data - public func get(index: Int) -> Data? { - guard let result = TWDataVectorGet(rawValue, index) else { - return nil - } - return TWDataNSData(result) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/DerivationPath.swift b/Pods/TrustWalletCore/Sources/Generated/DerivationPath.swift deleted file mode 100644 index b69a165a..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/DerivationPath.swift +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents a BIP44 DerivationPath in C++. -public final class DerivationPath { - - /// Returns the purpose enum of a DerivationPath. - /// - /// - Parameter path: DerivationPath to get the purpose of. - /// - Returns: DerivationPathPurpose. - public var purpose: Purpose { - return Purpose(rawValue: TWDerivationPathPurpose(rawValue).rawValue)! - } - - /// Returns the coin value of a derivation path. - /// - /// - Parameter path: DerivationPath to get the coin of. - /// - Returns: The coin part of the DerivationPath. - public var coin: UInt32 { - return TWDerivationPathCoin(rawValue) - } - - /// Returns the account value of a derivation path. - /// - /// - Parameter path: DerivationPath to get the account of. - /// - Returns: the account part of a derivation path. - public var account: UInt32 { - return TWDerivationPathAccount(rawValue) - } - - /// Returns the change value of a derivation path. - /// - /// - Parameter path: DerivationPath to get the change of. - /// - Returns: The change part of a derivation path. - public var change: UInt32 { - return TWDerivationPathChange(rawValue) - } - - /// Returns the address value of a derivation path. - /// - /// - Parameter path: DerivationPath to get the address of. - /// - Returns: The address part of the derivation path. - public var address: UInt32 { - return TWDerivationPathAddress(rawValue) - } - - /// Returns the string description of a derivation path. - /// - /// - Parameter path: DerivationPath to get the address of. - /// - Returns: The string description of the derivation path. - public var description: String { - return TWStringNSString(TWDerivationPathDescription(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init(purpose: Purpose, coin: UInt32, account: UInt32, change: UInt32, address: UInt32) { - rawValue = TWDerivationPathCreate(TWPurpose(rawValue: purpose.rawValue), coin, account, change, address) - } - - public init?(string: String) { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let rawValue = TWDerivationPathCreateWithString(stringString) else { - return nil - } - self.rawValue = rawValue - } - - deinit { - TWDerivationPathDelete(rawValue) - } - - /// Returns the index component of a DerivationPath. - /// - /// - Parameter path: DerivationPath to get the index of. - /// - Parameter index: The index component of the DerivationPath. - /// - Returns: DerivationPathIndex or null if index is invalid. - public func indexAt(index: UInt32) -> DerivationPathIndex? { - guard let value = TWDerivationPathIndexAt(rawValue, index) else { - return nil - } - return DerivationPathIndex(rawValue: value) - } - - /// Returns the indices count of a DerivationPath. - /// - /// - Parameter path: DerivationPath to get the indices count of. - /// - Returns: The indices count of the DerivationPath. - public func indicesCount() -> UInt32 { - return TWDerivationPathIndicesCount(rawValue) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/DerivationPathIndex.swift b/Pods/TrustWalletCore/Sources/Generated/DerivationPathIndex.swift deleted file mode 100644 index 5e39a72f..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/DerivationPathIndex.swift +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents a derivation path index in C++ with value and hardened flag. -public final class DerivationPathIndex { - - /// Returns numeric value of an Index. - /// - /// - Parameter index: Index to get the numeric value of. - public var value: UInt32 { - return TWDerivationPathIndexValue(rawValue) - } - - /// Returns hardened flag of an Index. - /// - /// - Parameter index: Index to get hardened flag. - /// - Returns: true if hardened, false otherwise. - public var hardened: Bool { - return TWDerivationPathIndexHardened(rawValue) - } - - /// Returns the string description of a derivation path index. - /// - /// - Parameter path: Index to get the address of. - /// - Returns: The string description of the derivation path index. - public var description: String { - return TWStringNSString(TWDerivationPathIndexDescription(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init(value: UInt32, hardened: Bool) { - rawValue = TWDerivationPathIndexCreate(value, hardened) - } - - deinit { - TWDerivationPathIndexDelete(rawValue) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/AESPaddingMode.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/AESPaddingMode.swift deleted file mode 100644 index d39d7f52..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/AESPaddingMode.swift +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Padding mode used in AES encryption. -public enum AESPaddingMode: UInt32, CaseIterable { - case zero = 0 - case pkcs7 = 1 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/BitcoinSigHashType.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/BitcoinSigHashType.swift deleted file mode 100644 index 401a9bad..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/BitcoinSigHashType.swift +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Bitcoin SIGHASH type. -public enum BitcoinSigHashType: UInt32, CaseIterable { - case all = 0x01 - case none = 0x02 - case single = 0x03 - case fork = 0x40 - case forkBTG = 0x4f40 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/Blockchain.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/Blockchain.swift deleted file mode 100644 index ef84cc09..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/Blockchain.swift +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Blockchain enum type -public enum Blockchain: UInt32, CaseIterable { - case bitcoin = 0 - case ethereum = 1 - case vechain = 3 - case tron = 4 - case icon = 5 - case binance = 6 - case ripple = 7 - case tezos = 8 - case nimiq = 9 - case stellar = 10 - case aion = 11 - case cosmos = 12 - case theta = 13 - case ontology = 14 - case zilliqa = 15 - case ioTeX = 16 - case eos = 17 - case nano = 18 - case nuls = 19 - case waves = 20 - case aeternity = 21 - case nebulas = 22 - case fio = 23 - case solana = 24 - case harmony = 25 - case near = 26 - case algorand = 27 - case iost = 28 - case polkadot = 29 - case cardano = 30 - case neo = 31 - case filecoin = 32 - case multiversX = 33 - case oasisNetwork = 34 - case decred = 35 - case zcash = 36 - case groestlcoin = 37 - case thorchain = 38 - case ronin = 39 - case kusama = 40 - case zen = 41 - case bitcoinDiamond = 42 - case verge = 43 - case nervos = 44 - case everscale = 45 - case aptos = 46 - case nebl = 47 - case hedera = 48 - case theOpenNetwork = 49 - case sui = 50 - case greenfield = 51 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/CoinType.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/CoinType.swift deleted file mode 100644 index 17e44a43..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/CoinType.swift +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Represents a private key./// Represents a public key./// Coin type for Level 2 of BIP44. -/// -/// \see https://github.com/satoshilabs/slips/blob/master/slip-0044.md -public enum CoinType: UInt32, CaseIterable { - case aeternity = 457 - case aion = 425 - case binance = 714 - case bitcoin = 0 - case bitcoinCash = 145 - case bitcoinGold = 156 - case callisto = 820 - case cardano = 1815 - case cosmos = 118 - case pivx = 119 - case dash = 5 - case decred = 42 - case digiByte = 20 - case dogecoin = 3 - case eos = 194 - case wax = 14001 - case ethereum = 60 - case ethereumClassic = 61 - case fio = 235 - case goChain = 6060 - case groestlcoin = 17 - case icon = 74 - case ioTeX = 304 - case kava = 459 - case kin = 2017 - case litecoin = 2 - case monacoin = 22 - case nebulas = 2718 - case nuls = 8964 - case nano = 165 - case near = 397 - case nimiq = 242 - case ontology = 1024 - case poanetwork = 178 - case qtum = 2301 - case xrp = 144 - case solana = 501 - case stellar = 148 - case tezos = 1729 - case theta = 500 - case thunderCore = 1001 - case neo = 888 - case tomoChain = 889 - case tron = 195 - case veChain = 818 - case viacoin = 14 - case wanchain = 5718350 - case zcash = 133 - case firo = 136 - case zilliqa = 313 - case zelcash = 19167 - case ravencoin = 175 - case waves = 5741564 - case terra = 330 - case terraV2 = 10000330 - case harmony = 1023 - case algorand = 283 - case kusama = 434 - case polkadot = 354 - case filecoin = 461 - case multiversX = 508 - case bandChain = 494 - case smartChainLegacy = 10000714 - case smartChain = 20000714 - case tbinance = 30000714 - case oasis = 474 - case polygon = 966 - case thorchain = 931 - case bluzelle = 483 - case optimism = 10000070 - case zksync = 10000324 - case arbitrum = 10042221 - case ecochain = 10000553 - case avalancheCChain = 10009000 - case xdai = 10000100 - case fantom = 10000250 - case cryptoOrg = 394 - case celo = 52752 - case ronin = 10002020 - case osmosis = 10000118 - case ecash = 899 - case iost = 291 - case cronosChain = 10000025 - case smartBitcoinCash = 10000145 - case kuCoinCommunityChain = 10000321 - case bitcoinDiamond = 999 - case boba = 10000288 - case syscoin = 57 - case verge = 77 - case zen = 121 - case metis = 10001088 - case aurora = 1323161554 - case evmos = 10009001 - case nativeEvmos = 20009001 - case moonriver = 10001285 - case moonbeam = 10001284 - case kavaEvm = 10002222 - case klaytn = 10008217 - case meter = 18000 - case okxchain = 996 - case stratis = 105105 - case komodo = 141 - case nervos = 309 - case everscale = 396 - case aptos = 637 - case nebl = 146 - case hedera = 3030 - case secret = 529 - case nativeInjective = 10000060 - case agoric = 564 - case ton = 607 - case sui = 784 - case stargaze = 20000118 - case polygonzkEVM = 10001101 - case juno = 30000118 - case stride = 40000118 - case axelar = 50000118 - case crescent = 60000118 - case kujira = 70000118 - case ioTeXEVM = 10004689 - case nativeCanto = 10007700 - case comdex = 80000118 - case neutron = 90000118 - case sommelier = 11000118 - case fetchAI = 12000118 - case mars = 13000118 - case umee = 14000118 - case coreum = 10000990 - case quasar = 15000118 - case persistence = 16000118 - case akash = 17000118 - case noble = 18000118 - case scroll = 534353 - case rootstock = 137 - case thetaFuel = 361 - case confluxeSpace = 1030 - case acala = 787 - case acalaEVM = 10000787 - case opBNB = 204 - case neon = 245022934 - case base = 8453 - case sei = 19000118 - case arbitrumNova = 10042170 - case linea = 59144 - case greenfield = 5600 - case mantle = 5000 - case zenEON = 7332 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/Curve.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/Curve.swift deleted file mode 100644 index 4fb0603e..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/Curve.swift +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Elliptic cruves -public enum Curve: UInt32, CaseIterable, CustomStringConvertible { - case secp256k1 = 0 - case ed25519 = 1 - case ed25519Blake2bNano = 2 - case curve25519 = 3 - case nist256p1 = 4 - case ed25519ExtendedCardano = 5 - case starkex = 6 - - public var description: String { - switch self { - case .secp256k1: return "secp256k1" - case .ed25519: return "ed25519" - case .ed25519Blake2bNano: return "ed25519-blake2b-nano" - case .curve25519: return "curve25519" - case .nist256p1: return "nist256p1" - case .ed25519ExtendedCardano: return "ed25519-cardano-seed" - case .starkex: return "starkex" - } - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/Derivation.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/Derivation.swift deleted file mode 100644 index 95347925..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/Derivation.swift +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Non-default coin address derivation names (default, unnamed derivations are not included). -public enum Derivation: UInt32, CaseIterable { - case `default` = 0 - case custom = 1 - case bitcoinSegwit = 2 - case bitcoinLegacy = 3 - case bitcoinTestnet = 4 - case litecoinLegacy = 5 - case solanaSolana = 6 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/EthereumChainID.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/EthereumChainID.swift deleted file mode 100644 index 2c60a7c0..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/EthereumChainID.swift +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Chain identifiers for Ethereum-based blockchains, for convenience. Recommended to use the dynamic CoinType.ChainId() instead. -/// See also TWChainId. -public enum EthereumChainID: UInt32, CaseIterable { - case ethereum = 1 - case classic = 61 - case rootstock = 30 - case poa = 99 - case opbnb = 204 - case tfuelevm = 361 - case vechain = 74 - case callisto = 820 - case tomochain = 88 - case polygon = 137 - case okc = 66 - case thundertoken = 108 - case cfxevm = 1030 - case mantle = 5000 - case gochain = 60 - case zeneon = 7332 - case base = 8453 - case meter = 82 - case celo = 42220 - case linea = 59144 - case scroll = 534353 - case wanchain = 888 - case cronos = 25 - case optimism = 10 - case xdai = 100 - case smartbch = 10000 - case fantom = 250 - case boba = 288 - case kcc = 321 - case zksync = 324 - case heco = 128 - case acalaevm = 787 - case metis = 1088 - case polygonzkevm = 1101 - case moonbeam = 1284 - case moonriver = 1285 - case ronin = 2020 - case kavaevm = 2222 - case iotexevm = 4689 - case klaytn = 8217 - case avalanchec = 43114 - case evmos = 9001 - case arbitrumnova = 42170 - case arbitrum = 42161 - case smartchain = 56 - case neon = 245022934 - case aurora = 1313161554 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/FilecoinAddressType.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/FilecoinAddressType.swift deleted file mode 100644 index c86981a9..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/FilecoinAddressType.swift +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Filecoin address type. -public enum FilecoinAddressType: UInt32, CaseIterable { - case `default` = 0 - case delegated = 1 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/HDVersion.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/HDVersion.swift deleted file mode 100644 index 7faea9ec..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/HDVersion.swift +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Registered HD version bytes -/// -/// \see https://github.com/satoshilabs/slips/blob/master/slip-0132.md -public enum HDVersion: UInt32, CaseIterable { - case none = 0 - case xpub = 0x0488b21e - case xprv = 0x0488ade4 - case ypub = 0x049d7cb2 - case yprv = 0x049d7878 - case zpub = 0x04b24746 - case zprv = 0x04b2430c - case vpub = 0x045f1cf6 - case vprv = 0x045f18bc - case tpub = 0x043587cf - case tprv = 0x04358394 - case ltub = 0x019da462 - case ltpv = 0x019d9cfe - case mtub = 0x01b26ef6 - case mtpv = 0x01b26792 - case ttub = 0x0436f6e1 - case ttpv = 0x0436ef7d - case dpub = 0x2fda926 - case dprv = 0x2fda4e8 - case dgub = 0x02facafd - case dgpv = 0x02fac398 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/HRP.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/HRP.swift deleted file mode 100644 index 37588178..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/HRP.swift +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Registered human-readable parts for BIP-0173 -/// -/// - SeeAlso: https://github.com/satoshilabs/slips/blob/master/slip-0173.md -public enum HRP: UInt32, CaseIterable, CustomStringConvertible { - case unknown = 0 - case bitcoin = 1 - case litecoin = 2 - case viacoin = 3 - case groestlcoin = 4 - case digiByte = 5 - case monacoin = 6 - case syscoin = 7 - case verge = 8 - case cosmos = 9 - case bitcoinCash = 10 - case bitcoinGold = 11 - case ioTeX = 12 - case nervos = 13 - case zilliqa = 14 - case terra = 15 - case cryptoOrg = 16 - case kava = 17 - case oasis = 18 - case bluzelle = 19 - case bandChain = 20 - case multiversX = 21 - case secret = 22 - case agoric = 23 - case binance = 24 - case ecash = 25 - case thorchain = 26 - case bitcoinDiamond = 27 - case harmony = 28 - case cardano = 29 - case qtum = 30 - case stratis = 31 - case nativeInjective = 32 - case osmosis = 33 - case terraV2 = 34 - case coreum = 35 - case nativeCanto = 36 - case sommelier = 37 - case fetchAI = 38 - case mars = 39 - case umee = 40 - case quasar = 41 - case persistence = 42 - case akash = 43 - case noble = 44 - case sei = 45 - case stargaze = 46 - case nativeEvmos = 47 - case juno = 48 - case tbinance = 49 - case stride = 50 - case axelar = 51 - case crescent = 52 - case kujira = 53 - case comdex = 54 - case neutron = 55 - - public var description: String { - switch self { - case .unknown: return "" - case .bitcoin: return "bc" - case .litecoin: return "ltc" - case .viacoin: return "via" - case .groestlcoin: return "grs" - case .digiByte: return "dgb" - case .monacoin: return "mona" - case .syscoin: return "sys" - case .verge: return "vg" - case .cosmos: return "cosmos" - case .bitcoinCash: return "bitcoincash" - case .bitcoinGold: return "btg" - case .ioTeX: return "io" - case .nervos: return "ckb" - case .zilliqa: return "zil" - case .terra: return "terra" - case .cryptoOrg: return "cro" - case .kava: return "kava" - case .oasis: return "oasis" - case .bluzelle: return "bluzelle" - case .bandChain: return "band" - case .multiversX: return "erd" - case .secret: return "secret" - case .agoric: return "agoric" - case .binance: return "bnb" - case .ecash: return "ecash" - case .thorchain: return "thor" - case .bitcoinDiamond: return "bcd" - case .harmony: return "one" - case .cardano: return "addr" - case .qtum: return "qc" - case .stratis: return "strax" - case .nativeInjective: return "inj" - case .osmosis: return "osmo" - case .terraV2: return "terra" - case .coreum: return "core" - case .nativeCanto: return "canto" - case .sommelier: return "somm" - case .fetchAI: return "fetch" - case .mars: return "mars" - case .umee: return "umee" - case .quasar: return "quasar" - case .persistence: return "persistence" - case .akash: return "akash" - case .noble: return "noble" - case .sei: return "sei" - case .stargaze: return "stars" - case .nativeEvmos: return "evmos" - case .juno: return "juno" - case .tbinance: return "tbnb" - case .stride: return "stride" - case .axelar: return "axelar" - case .crescent: return "cre" - case .kujira: return "kujira" - case .comdex: return "comdex" - case .neutron: return "neutron" - } - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/PrivateKeyType.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/PrivateKeyType.swift deleted file mode 100644 index 9dd31cad..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/PrivateKeyType.swift +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Private key types, the vast majority of chains use the default, 32-byte key. -public enum PrivateKeyType: UInt32, CaseIterable { - case `default` = 0 - case cardano = 1 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/PublicKeyType.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/PublicKeyType.swift deleted file mode 100644 index fd2a9101..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/PublicKeyType.swift +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Public key types -public enum PublicKeyType: UInt32, CaseIterable { - case secp256k1 = 0 - case secp256k1Extended = 1 - case nist256p1 = 2 - case nist256p1Extended = 3 - case ed25519 = 4 - case ed25519Blake2b = 5 - case curve25519 = 6 - case ed25519Cardano = 7 - case starkex = 8 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/Purpose.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/Purpose.swift deleted file mode 100644 index 321b0174..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/Purpose.swift +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// HD wallet purpose -/// -/// \see https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki -/// \see https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki -/// \see https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki -public enum Purpose: UInt32, CaseIterable { - case bip44 = 44 - case bip49 = 49 - case bip84 = 84 - case bip1852 = 1852 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/SS58AddressType.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/SS58AddressType.swift deleted file mode 100644 index 8fec9652..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/SS58AddressType.swift +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Substrate based chains Address Type -/// -/// \see https://github.com/paritytech/substrate/wiki/External-Address-Format-(SS58)#address-type -public enum SS58AddressType: UInt8, CaseIterable { - case polkadot = 0 - case kusama = 2 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/StellarMemoType.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/StellarMemoType.swift deleted file mode 100644 index a51a9a99..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/StellarMemoType.swift +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Stellar memo type. -public enum StellarMemoType: UInt32, CaseIterable { - case none = 0 - case text = 1 - case id = 2 - case hash = 3 - case `return` = 4 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/StellarPassphrase.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/StellarPassphrase.swift deleted file mode 100644 index 9a48a4d1..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/StellarPassphrase.swift +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Stellar network passphrase string. -public enum StellarPassphrase: UInt32, CaseIterable, CustomStringConvertible { - case stellar = 0 - case kin = 1 - - public var description: String { - switch self { - case .stellar: return "Public Global Stellar Network ; September 2015" - case .kin: return "Kin Mainnet ; December 2018" - } - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/StellarVersionByte.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/StellarVersionByte.swift deleted file mode 100644 index 308a7247..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/StellarVersionByte.swift +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Stellar address version byte. -public enum StellarVersionByte: UInt16, CaseIterable { - case accountID = 0x30 - case seed = 0xc0 - case preAuthTX = 0xc8 - case sha256Hash = 0x118 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/StoredKeyEncryption.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/StoredKeyEncryption.swift deleted file mode 100644 index 4c27b618..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/StoredKeyEncryption.swift +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Preset encryption kind -public enum StoredKeyEncryption: UInt32, CaseIterable { - case aes128Ctr = 0 - case aes128Cbc = 1 - case aes192Ctr = 2 - case aes256Ctr = 3 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Enums/StoredKeyEncryptionLevel.swift b/Pods/TrustWalletCore/Sources/Generated/Enums/StoredKeyEncryptionLevel.swift deleted file mode 100644 index c0d15b46..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Enums/StoredKeyEncryptionLevel.swift +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -/// Preset encryption parameter with different security strength, for key store -public enum StoredKeyEncryptionLevel: UInt32, CaseIterable { - case `default` = 0 - case minimal = 1 - case weak = 2 - case standard = 3 -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Ethereum.swift b/Pods/TrustWalletCore/Sources/Generated/Ethereum.swift deleted file mode 100644 index f7e12d44..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Ethereum.swift +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - - -public struct Ethereum { - - /// Generate a layer 2 eip2645 derivation path from eth address, layer, application and given index. - /// - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter ethAddress: non-null Ethereum address - /// - Parameter layer: non-null layer 2 name (E.G starkex) - /// - Parameter application: non-null layer 2 application (E.G immutablex) - /// - Parameter index: non-null layer 2 index (E.G 1) - /// - Returns: a valid eip2645 layer 2 derivation path as a string - public static func eip2645GetPath(ethAddress: String, layer: String, application: String, index: String) -> String { - let ethAddressString = TWStringCreateWithNSString(ethAddress) - defer { - TWStringDelete(ethAddressString) - } - let layerString = TWStringCreateWithNSString(layer) - defer { - TWStringDelete(layerString) - } - let applicationString = TWStringCreateWithNSString(application) - defer { - TWStringDelete(applicationString) - } - let indexString = TWStringCreateWithNSString(index) - defer { - TWStringDelete(indexString) - } - return TWStringNSString(TWEthereumEip2645GetPath(ethAddressString, layerString, applicationString, indexString)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/EthereumAbi.swift b/Pods/TrustWalletCore/Sources/Generated/EthereumAbi.swift deleted file mode 100644 index cc6fd1d4..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/EthereumAbi.swift +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Wrapper class for Ethereum ABI encoding & decoding. -public struct EthereumAbi { - - /// Decode a contract call (function input) according to an ABI json. - /// - /// - Parameter coin: EVM-compatible coin type. - /// - Parameter input: The serialized data of `TW.EthereumAbi.Proto.ContractCallDecodingInput`. - /// - Returns: The serialized data of a `TW.EthereumAbi.Proto.ContractCallDecodingOutput` proto object. - public static func decodeContractCall(coin: CoinType, input: Data) -> Data { - let inputData = TWDataCreateWithNSData(input) - defer { - TWDataDelete(inputData) - } - return TWDataNSData(TWEthereumAbiDecodeContractCall(TWCoinType(rawValue: coin.rawValue), inputData)) - } - - /// Decode a function input or output data according to a given ABI. - /// - /// - Parameter coin: EVM-compatible coin type. - /// - Parameter input: The serialized data of `TW.EthereumAbi.Proto.ParamsDecodingInput`. - /// - Returns: The serialized data of a `TW.EthereumAbi.Proto.ParamsDecodingOutput` proto object. - public static func decodeParams(coin: CoinType, input: Data) -> Data { - let inputData = TWDataCreateWithNSData(input) - defer { - TWDataDelete(inputData) - } - return TWDataNSData(TWEthereumAbiDecodeParams(TWCoinType(rawValue: coin.rawValue), inputData)) - } - - /// /// Decodes an Eth ABI value according to a given type. - /// - /// - Parameter coin: EVM-compatible coin type. - /// - Parameter input: The serialized data of `TW.EthereumAbi.Proto.ValueDecodingInput`. - /// - Returns: The serialized data of a `TW.EthereumAbi.Proto.ValueDecodingOutput` proto object. - public static func decodeValue(coin: CoinType, input: Data) -> Data { - let inputData = TWDataCreateWithNSData(input) - defer { - TWDataDelete(inputData) - } - return TWDataNSData(TWEthereumAbiDecodeValue(TWCoinType(rawValue: coin.rawValue), inputData)) - } - - /// Encode function to Eth ABI binary. - /// - /// - Parameter coin: EVM-compatible coin type. - /// - Parameter input: The serialized data of `TW.EthereumAbi.Proto.FunctionEncodingInput`. - /// - Returns: The serialized data of a `TW.EthereumAbi.Proto.FunctionEncodingOutput` proto object. - public static func encodeFunction(coin: CoinType, input: Data) -> Data { - let inputData = TWDataCreateWithNSData(input) - defer { - TWDataDelete(inputData) - } - return TWDataNSData(TWEthereumAbiEncodeFunction(TWCoinType(rawValue: coin.rawValue), inputData)) - } - - /// Encode function to Eth ABI binary - /// - /// - Parameter fn: Non-null Eth abi function - /// - Returns: Non-null encoded block of data - public static func encode(fn: EthereumAbiFunction) -> Data { - return TWDataNSData(TWEthereumAbiEncode(fn.rawValue)) - } - - /// Decode function output from Eth ABI binary, fill output parameters - /// - /// \param[in] fn Non-null Eth abi function - /// \param[out] encoded Non-null block of data - /// - Returns: true if encoded have been filled correctly, false otherwise - public static func decodeOutput(fn: EthereumAbiFunction, encoded: Data) -> Bool { - let encodedData = TWDataCreateWithNSData(encoded) - defer { - TWDataDelete(encodedData) - } - return TWEthereumAbiDecodeOutput(fn.rawValue, encodedData) - } - - /// Decode function call data to human readable json format, according to input abi json - /// - /// - Parameter data: Non-null block of data - /// - Parameter abi: Non-null string - /// - Returns: Non-null json string function call data - public static func decodeCall(data: Data, abi: String) -> String? { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - let abiString = TWStringCreateWithNSString(abi) - defer { - TWStringDelete(abiString) - } - guard let result = TWEthereumAbiDecodeCall(dataData, abiString) else { - return nil - } - return TWStringNSString(result) - } - - /// Compute the hash of a struct, used for signing, according to EIP712 ("v4"). - /// Input is a Json object (as string), with following fields: - /// - types: map of used struct types (see makeTypes()) - /// - primaryType: the type of the message (string) - /// - domain: EIP712 domain specifier values - /// - message: the message (object). - /// Throws on error. - /// Example input: - /// R"({ - /// "types": { - /// "EIP712Domain": [ - /// {"name": "name", "type": "string"}, - /// {"name": "version", "type": "string"}, - /// {"name": "chainId", "type": "uint256"}, - /// {"name": "verifyingContract", "type": "address"} - /// ], - /// "Person": [ - /// {"name": "name", "type": "string"}, - /// {"name": "wallet", "type": "address"} - /// ] - /// }, - /// "primaryType": "Person", - /// "domain": { - /// "name": "Ether Person", - /// "version": "1", - /// "chainId": 1, - /// "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" - /// }, - /// "message": { - /// "name": "Cow", - /// "wallet": "CD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" - /// } - /// })"); - /// On error, empty Data is returned. - /// Returned data must be deleted (hint: use WRAPD() macro). - /// - /// - Parameter messageJson: Non-null json abi input - /// - Returns: Non-null block of data, encoded abi input - public static func encodeTyped(messageJson: String) -> Data { - let messageJsonString = TWStringCreateWithNSString(messageJson) - defer { - TWStringDelete(messageJsonString) - } - return TWDataNSData(TWEthereumAbiEncodeTyped(messageJsonString)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/EthereumAbiFunction.swift b/Pods/TrustWalletCore/Sources/Generated/EthereumAbiFunction.swift deleted file mode 100644 index 99957452..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/EthereumAbiFunction.swift +++ /dev/null @@ -1,560 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents Ethereum ABI function -public final class EthereumAbiFunction { - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init(name: String) { - let nameString = TWStringCreateWithNSString(name) - defer { - TWStringDelete(nameString) - } - rawValue = TWEthereumAbiFunctionCreateWithString(nameString) - } - - deinit { - TWEthereumAbiFunctionDelete(rawValue) - } - - /// Return the function type signature, of the form "baz(int32,uint256)" - /// - /// - Parameter fn: A Non-null eth abi function - /// - Returns: function type signature as a Non-null string. - public func getType() -> String { - return TWStringNSString(TWEthereumAbiFunctionGetType(rawValue)) - } - - /// Methods for adding parameters of the given type (input or output). - /// For output parameters (isOutput=true) a value has to be specified, although usually not need; - /// Add a uint8 type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamUInt8(val: UInt8, isOutput: Bool) -> Int32 { - return TWEthereumAbiFunctionAddParamUInt8(rawValue, val, isOutput) - } - - /// Add a uint16 type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamUInt16(val: UInt16, isOutput: Bool) -> Int32 { - return TWEthereumAbiFunctionAddParamUInt16(rawValue, val, isOutput) - } - - /// Add a uint32 type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamUInt32(val: UInt32, isOutput: Bool) -> Int32 { - return TWEthereumAbiFunctionAddParamUInt32(rawValue, val, isOutput) - } - - /// Add a uint64 type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamUInt64(val: UInt64, isOutput: Bool) -> Int32 { - return TWEthereumAbiFunctionAddParamUInt64(rawValue, val, isOutput) - } - - /// Add a uint256 type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamUInt256(val: Data, isOutput: Bool) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddParamUInt256(rawValue, valData, isOutput) - } - - /// Add a uint(bits) type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamUIntN(bits: Int32, val: Data, isOutput: Bool) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddParamUIntN(rawValue, Int32(bits), valData, isOutput) - } - - /// Add a int8 type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamInt8(val: Int8, isOutput: Bool) -> Int32 { - return TWEthereumAbiFunctionAddParamInt8(rawValue, val, isOutput) - } - - /// Add a int16 type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamInt16(val: Int16, isOutput: Bool) -> Int32 { - return TWEthereumAbiFunctionAddParamInt16(rawValue, val, isOutput) - } - - /// Add a int32 type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamInt32(val: Int32, isOutput: Bool) -> Int32 { - return TWEthereumAbiFunctionAddParamInt32(rawValue, val, isOutput) - } - - /// Add a int64 type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamInt64(val: Int64, isOutput: Bool) -> Int32 { - return TWEthereumAbiFunctionAddParamInt64(rawValue, val, isOutput) - } - - /// Add a int256 type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified (stored in a block of data) - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamInt256(val: Data, isOutput: Bool) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddParamInt256(rawValue, valData, isOutput) - } - - /// Add a int(bits) type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter bits: Number of bits of the integer parameter - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamIntN(bits: Int32, val: Data, isOutput: Bool) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddParamIntN(rawValue, Int32(bits), valData, isOutput) - } - - /// Add a bool type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamBool(val: Bool, isOutput: Bool) -> Int32 { - return TWEthereumAbiFunctionAddParamBool(rawValue, val, isOutput) - } - - /// Add a string type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamString(val: String, isOutput: Bool) -> Int32 { - let valString = TWStringCreateWithNSString(val) - defer { - TWStringDelete(valString) - } - return TWEthereumAbiFunctionAddParamString(rawValue, valString, isOutput) - } - - /// Add an address type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamAddress(val: Data, isOutput: Bool) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddParamAddress(rawValue, valData, isOutput) - } - - /// Add a bytes type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamBytes(val: Data, isOutput: Bool) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddParamBytes(rawValue, valData, isOutput) - } - - /// Add a bytes[N] type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter size: fixed size of the bytes array parameter (val). - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamBytesFix(size: Int, val: Data, isOutput: Bool) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddParamBytesFix(rawValue, size, valData, isOutput) - } - - /// Add a type[] type parameter - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter val: for output parameters, value has to be specified - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the index of the parameter (0-based). - @discardableResult - public func addParamArray(isOutput: Bool) -> Int32 { - return TWEthereumAbiFunctionAddParamArray(rawValue, isOutput) - } - - /// Methods for accessing the value of an output or input parameter, of different types. - /// Get a uint8 type parameter at the given index - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter idx: index for the parameter (0-based). - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the value of the parameter. - public func getParamUInt8(idx: Int32, isOutput: Bool) -> UInt8 { - return TWEthereumAbiFunctionGetParamUInt8(rawValue, Int32(idx), isOutput) - } - - /// Get a uint64 type parameter at the given index - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter idx: index for the parameter (0-based). - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the value of the parameter. - public func getParamUInt64(idx: Int32, isOutput: Bool) -> UInt64 { - return TWEthereumAbiFunctionGetParamUInt64(rawValue, Int32(idx), isOutput) - } - - /// Get a uint256 type parameter at the given index - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter idx: index for the parameter (0-based). - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the value of the parameter stored in a block of data. - public func getParamUInt256(idx: Int32, isOutput: Bool) -> Data { - return TWDataNSData(TWEthereumAbiFunctionGetParamUInt256(rawValue, Int32(idx), isOutput)) - } - - /// Get a bool type parameter at the given index - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter idx: index for the parameter (0-based). - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the value of the parameter. - public func getParamBool(idx: Int32, isOutput: Bool) -> Bool { - return TWEthereumAbiFunctionGetParamBool(rawValue, Int32(idx), isOutput) - } - - /// Get a string type parameter at the given index - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter idx: index for the parameter (0-based). - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the value of the parameter. - public func getParamString(idx: Int32, isOutput: Bool) -> String { - return TWStringNSString(TWEthereumAbiFunctionGetParamString(rawValue, Int32(idx), isOutput)) - } - - /// Get an address type parameter at the given index - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter idx: index for the parameter (0-based). - /// - Parameter isOutput: determines if the parameter is an input or output - /// - Returns: the value of the parameter. - public func getParamAddress(idx: Int32, isOutput: Bool) -> Data { - return TWDataNSData(TWEthereumAbiFunctionGetParamAddress(rawValue, Int32(idx), isOutput)) - } - - /// Methods for adding a parameter of the given type to a top-level input parameter array. Returns the index of the parameter (0-based). - /// Note that nested ParamArrays are not possible through this API, could be done by using index paths like "1/0" - /// Adding a uint8 type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamUInt8(arrayIdx: Int32, val: UInt8) -> Int32 { - return TWEthereumAbiFunctionAddInArrayParamUInt8(rawValue, Int32(arrayIdx), val) - } - - /// Adding a uint16 type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamUInt16(arrayIdx: Int32, val: UInt16) -> Int32 { - return TWEthereumAbiFunctionAddInArrayParamUInt16(rawValue, Int32(arrayIdx), val) - } - - /// Adding a uint32 type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamUInt32(arrayIdx: Int32, val: UInt32) -> Int32 { - return TWEthereumAbiFunctionAddInArrayParamUInt32(rawValue, Int32(arrayIdx), val) - } - - /// Adding a uint64 type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamUInt64(arrayIdx: Int32, val: UInt64) -> Int32 { - return TWEthereumAbiFunctionAddInArrayParamUInt64(rawValue, Int32(arrayIdx), val) - } - - /// Adding a uint256 type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter stored in a block of data - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamUInt256(arrayIdx: Int32, val: Data) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddInArrayParamUInt256(rawValue, Int32(arrayIdx), valData) - } - - /// Adding a uint[N] type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter bits: Number of bits of the integer parameter - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter stored in a block of data - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamUIntN(arrayIdx: Int32, bits: Int32, val: Data) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddInArrayParamUIntN(rawValue, Int32(arrayIdx), Int32(bits), valData) - } - - /// Adding a int8 type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamInt8(arrayIdx: Int32, val: Int8) -> Int32 { - return TWEthereumAbiFunctionAddInArrayParamInt8(rawValue, Int32(arrayIdx), val) - } - - /// Adding a int16 type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamInt16(arrayIdx: Int32, val: Int16) -> Int32 { - return TWEthereumAbiFunctionAddInArrayParamInt16(rawValue, Int32(arrayIdx), val) - } - - /// Adding a int32 type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamInt32(arrayIdx: Int32, val: Int32) -> Int32 { - return TWEthereumAbiFunctionAddInArrayParamInt32(rawValue, Int32(arrayIdx), val) - } - - /// Adding a int64 type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamInt64(arrayIdx: Int32, val: Int64) -> Int32 { - return TWEthereumAbiFunctionAddInArrayParamInt64(rawValue, Int32(arrayIdx), val) - } - - /// Adding a int256 type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter stored in a block of data - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamInt256(arrayIdx: Int32, val: Data) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddInArrayParamInt256(rawValue, Int32(arrayIdx), valData) - } - - /// Adding a int[N] type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter bits: Number of bits of the integer parameter - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter stored in a block of data - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamIntN(arrayIdx: Int32, bits: Int32, val: Data) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddInArrayParamIntN(rawValue, Int32(arrayIdx), Int32(bits), valData) - } - - /// Adding a bool type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamBool(arrayIdx: Int32, val: Bool) -> Int32 { - return TWEthereumAbiFunctionAddInArrayParamBool(rawValue, Int32(arrayIdx), val) - } - - /// Adding a string type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamString(arrayIdx: Int32, val: String) -> Int32 { - let valString = TWStringCreateWithNSString(val) - defer { - TWStringDelete(valString) - } - return TWEthereumAbiFunctionAddInArrayParamString(rawValue, Int32(arrayIdx), valString) - } - - /// Adding an address type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamAddress(arrayIdx: Int32, val: Data) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddInArrayParamAddress(rawValue, Int32(arrayIdx), valData) - } - - /// Adding a bytes type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter val: the value of the parameter - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamBytes(arrayIdx: Int32, val: Data) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddInArrayParamBytes(rawValue, Int32(arrayIdx), valData) - } - - /// Adding a int64 type parameter of to the top-level input parameter array - /// - /// - Parameter fn: A Non-null eth abi function - /// - Parameter arrayIdx: array index for the abi function (0-based). - /// - Parameter size: fixed size of the bytes array parameter (val). - /// - Parameter val: the value of the parameter - /// - Returns: the index of the added parameter (0-based). - @discardableResult - public func addInArrayParamBytesFix(arrayIdx: Int32, size: Int, val: Data) -> Int32 { - let valData = TWDataCreateWithNSData(val) - defer { - TWDataDelete(valData) - } - return TWEthereumAbiFunctionAddInArrayParamBytesFix(rawValue, Int32(arrayIdx), size, valData) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/EthereumAbiValue.swift b/Pods/TrustWalletCore/Sources/Generated/EthereumAbiValue.swift deleted file mode 100644 index 6b02cc21..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/EthereumAbiValue.swift +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents Ethereum ABI value -public struct EthereumAbiValue { - - /// Encode a bool according to Ethereum ABI, into 32 bytes. Values are padded by 0 on the left, unless specified otherwise - /// - /// - Parameter value: a boolean value - /// - Returns: Encoded value stored in a block of data - public static func encodeBool(value: Bool) -> Data { - return TWDataNSData(TWEthereumAbiValueEncodeBool(value)) - } - - /// Encode a int32 according to Ethereum ABI, into 32 bytes. Values are padded by 0 on the left, unless specified otherwise - /// - /// - Parameter value: a int32 value - /// - Returns: Encoded value stored in a block of data - public static func encodeInt32(value: Int32) -> Data { - return TWDataNSData(TWEthereumAbiValueEncodeInt32(value)) - } - - /// Encode a uint32 according to Ethereum ABI, into 32 bytes. Values are padded by 0 on the left, unless specified otherwise - /// - /// - Parameter value: a uint32 value - /// - Returns: Encoded value stored in a block of data - public static func encodeUInt32(value: UInt32) -> Data { - return TWDataNSData(TWEthereumAbiValueEncodeUInt32(value)) - } - - /// Encode a int256 according to Ethereum ABI, into 32 bytes. Values are padded by 0 on the left, unless specified otherwise - /// - /// - Parameter value: a int256 value stored in a block of data - /// - Returns: Encoded value stored in a block of data - public static func encodeInt256(value: Data) -> Data { - let valueData = TWDataCreateWithNSData(value) - defer { - TWDataDelete(valueData) - } - return TWDataNSData(TWEthereumAbiValueEncodeInt256(valueData)) - } - - /// Encode an int256 according to Ethereum ABI, into 32 bytes. Values are padded by 0 on the left, unless specified otherwise - /// - /// - Parameter value: a int256 value stored in a block of data - /// - Returns: Encoded value stored in a block of data - public static func encodeUInt256(value: Data) -> Data { - let valueData = TWDataCreateWithNSData(value) - defer { - TWDataDelete(valueData) - } - return TWDataNSData(TWEthereumAbiValueEncodeUInt256(valueData)) - } - - /// Encode an address according to Ethereum ABI, 20 bytes of the address. - /// - /// - Parameter value: an address value stored in a block of data - /// - Returns: Encoded value stored in a block of data - public static func encodeAddress(value: Data) -> Data { - let valueData = TWDataCreateWithNSData(value) - defer { - TWDataDelete(valueData) - } - return TWDataNSData(TWEthereumAbiValueEncodeAddress(valueData)) - } - - /// Encode a string according to Ethereum ABI by encoding its hash. - /// - /// - Parameter value: a string value - /// - Returns: Encoded value stored in a block of data - public static func encodeString(value: String) -> Data { - let valueString = TWStringCreateWithNSString(value) - defer { - TWStringDelete(valueString) - } - return TWDataNSData(TWEthereumAbiValueEncodeString(valueString)) - } - - /// Encode a number of bytes, up to 32 bytes, padded on the right. Longer arrays are truncated. - /// - /// - Parameter value: bunch of bytes - /// - Returns: Encoded value stored in a block of data - public static func encodeBytes(value: Data) -> Data { - let valueData = TWDataCreateWithNSData(value) - defer { - TWDataDelete(valueData) - } - return TWDataNSData(TWEthereumAbiValueEncodeBytes(valueData)) - } - - /// Encode a dynamic number of bytes by encoding its hash - /// - /// - Parameter value: bunch of bytes - /// - Returns: Encoded value stored in a block of data - public static func encodeBytesDyn(value: Data) -> Data { - let valueData = TWDataCreateWithNSData(value) - defer { - TWDataDelete(valueData) - } - return TWDataNSData(TWEthereumAbiValueEncodeBytesDyn(valueData)) - } - - /// Decodes input data (bytes longer than 32 will be truncated) as uint256 - /// - /// - Parameter input: Data to be decoded - /// - Returns: Non-null decoded string value - public static func decodeUInt256(input: Data) -> String { - let inputData = TWDataCreateWithNSData(input) - defer { - TWDataDelete(inputData) - } - return TWStringNSString(TWEthereumAbiValueDecodeUInt256(inputData)) - } - - /// Decode an arbitrary type, return value as string - /// - /// - Parameter input: Data to be decoded - /// - Parameter type: the underlying type that need to be decoded - /// - Returns: Non-null decoded string value - public static func decodeValue(input: Data, type: String) -> String { - let inputData = TWDataCreateWithNSData(input) - defer { - TWDataDelete(inputData) - } - let typeString = TWStringCreateWithNSString(type) - defer { - TWStringDelete(typeString) - } - return TWStringNSString(TWEthereumAbiValueDecodeValue(inputData, typeString)) - } - - /// Decode an array of given simple types. Return a '\n'-separated string of elements - /// - /// - Parameter input: Data to be decoded - /// - Parameter type: the underlying type that need to be decoded - /// - Returns: Non-null decoded string value - public static func decodeArray(input: Data, type: String) -> String { - let inputData = TWDataCreateWithNSData(input) - defer { - TWDataDelete(inputData) - } - let typeString = TWStringCreateWithNSString(type) - defer { - TWStringDelete(typeString) - } - return TWStringNSString(TWEthereumAbiValueDecodeArray(inputData, typeString)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/EthereumMessageSigner.swift b/Pods/TrustWalletCore/Sources/Generated/EthereumMessageSigner.swift deleted file mode 100644 index b4ce55bc..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/EthereumMessageSigner.swift +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Ethereum message signing and verification. -/// -/// Ethereum and some other wallets support a message signing & verification format, to create a proof (a signature) -/// that someone has access to the private keys of a specific address. -public struct EthereumMessageSigner { - - /// Sign a typed message EIP-712 V4. - /// - /// - Parameter privateKey:: the private key used for signing - /// - Parameter messageJson:: A custom typed data message in json - /// - Returns:s the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. - public static func signTypedMessage(privateKey: PrivateKey, messageJson: String) -> String { - let messageJsonString = TWStringCreateWithNSString(messageJson) - defer { - TWStringDelete(messageJsonString) - } - return TWStringNSString(TWEthereumMessageSignerSignTypedMessage(privateKey.rawValue, messageJsonString)) - } - - /// Sign a typed message EIP-712 V4 with EIP-155 replay attack protection. - /// - /// - Parameter privateKey:: the private key used for signing - /// - Parameter messageJson:: A custom typed data message in json - /// - Parameter chainId:: chainId for eip-155 protection - /// - Returns:s the signature, Hex-encoded. On invalid input empty string is returned or invalid chainId error message. Returned object needs to be deleted after use. - public static func signTypedMessageEip155(privateKey: PrivateKey, messageJson: String, chainId: Int32) -> String { - let messageJsonString = TWStringCreateWithNSString(messageJson) - defer { - TWStringDelete(messageJsonString) - } - return TWStringNSString(TWEthereumMessageSignerSignTypedMessageEip155(privateKey.rawValue, messageJsonString, Int32(chainId))) - } - - /// Sign a message. - /// - /// - Parameter privateKey:: the private key used for signing - /// - Parameter message:: A custom message which is input to the signing. - /// - Returns:s the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. - public static func signMessage(privateKey: PrivateKey, message: String) -> String { - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - return TWStringNSString(TWEthereumMessageSignerSignMessage(privateKey.rawValue, messageString)) - } - - /// Sign a message with Immutable X msg type. - /// - /// - Parameter privateKey:: the private key used for signing - /// - Parameter message:: A custom message which is input to the signing. - /// - Returns:s the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. - public static func signMessageImmutableX(privateKey: PrivateKey, message: String) -> String { - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - return TWStringNSString(TWEthereumMessageSignerSignMessageImmutableX(privateKey.rawValue, messageString)) - } - - /// Sign a message with Eip-155 msg type. - /// - /// - Parameter privateKey:: the private key used for signing - /// - Parameter message:: A custom message which is input to the signing. - /// - Parameter chainId:: chainId for eip-155 protection - /// - Returns:s the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. - public static func signMessageEip155(privateKey: PrivateKey, message: String, chainId: Int32) -> String { - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - return TWStringNSString(TWEthereumMessageSignerSignMessageEip155(privateKey.rawValue, messageString, Int32(chainId))) - } - - /// Verify signature for a message. - /// - /// - Parameter pubKey:: pubKey that will verify and recover the message from the signature - /// - Parameter message:: the message signed (without prefix) - /// - Parameter signature:: in Hex-encoded form. - /// - Returns:s false on any invalid input (does not throw), true if the message can be recovered from the signature - public static func verifyMessage(pubKey: PublicKey, message: String, signature: String) -> Bool { - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - let signatureString = TWStringCreateWithNSString(signature) - defer { - TWStringDelete(signatureString) - } - return TWEthereumMessageSignerVerifyMessage(pubKey.rawValue, messageString, signatureString) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/EthereumRlp.swift b/Pods/TrustWalletCore/Sources/Generated/EthereumRlp.swift deleted file mode 100644 index 8d797b73..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/EthereumRlp.swift +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - - -public struct EthereumRlp { - - /// Encode an item or a list of items as Eth RLP binary format. - /// - /// - Parameter coin: EVM-compatible coin type. - /// - Parameter input: Non-null serialized `EthereumRlp::Proto::EncodingInput`. - /// - Returns: serialized `EthereumRlp::Proto::EncodingOutput`. - public static func encode(coin: CoinType, input: Data) -> Data { - let inputData = TWDataCreateWithNSData(input) - defer { - TWDataDelete(inputData) - } - return TWDataNSData(TWEthereumRlpEncode(TWCoinType(rawValue: coin.rawValue), inputData)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/FIOAccount.swift b/Pods/TrustWalletCore/Sources/Generated/FIOAccount.swift deleted file mode 100644 index 8faf145f..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/FIOAccount.swift +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents a FIO Account name -public final class FIOAccount { - - /// Returns the short account string representation. - /// - /// - Parameter account: Pointer to a non-null FIO Account - /// - Returns: Account non-null string representation - public var description: String { - return TWStringNSString(TWFIOAccountDescription(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init?(string: String) { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let rawValue = TWFIOAccountCreateWithString(stringString) else { - return nil - } - self.rawValue = rawValue - } - - deinit { - TWFIOAccountDelete(rawValue) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/FilecoinAddressConverter.swift b/Pods/TrustWalletCore/Sources/Generated/FilecoinAddressConverter.swift deleted file mode 100644 index 8f4f4527..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/FilecoinAddressConverter.swift +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Filecoin-Ethereum address converter. -public struct FilecoinAddressConverter { - - /// Converts a Filecoin address to Ethereum. - /// - /// - Parameter filecoinAddress:: a Filecoin address. - /// - Returns:s the Ethereum address. On invalid input empty string is returned. Returned object needs to be deleted after use. - public static func convertToEthereum(filecoinAddress: String) -> String { - let filecoinAddressString = TWStringCreateWithNSString(filecoinAddress) - defer { - TWStringDelete(filecoinAddressString) - } - return TWStringNSString(TWFilecoinAddressConverterConvertToEthereum(filecoinAddressString)) - } - - /// Converts an Ethereum address to Filecoin. - /// - /// - Parameter ethAddress:: an Ethereum address. - /// - Returns:s the Filecoin address. On invalid input empty string is returned. Returned object needs to be deleted after use. - public static func convertFromEthereum(ethAddress: String) -> String { - let ethAddressString = TWStringCreateWithNSString(ethAddress) - defer { - TWStringDelete(ethAddressString) - } - return TWStringNSString(TWFilecoinAddressConverterConvertFromEthereum(ethAddressString)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/GroestlcoinAddress.swift b/Pods/TrustWalletCore/Sources/Generated/GroestlcoinAddress.swift deleted file mode 100644 index 1b37f003..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/GroestlcoinAddress.swift +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents a legacy Groestlcoin address. -public final class GroestlcoinAddress: Address { - - /// Compares two addresses for equality. - /// - /// - Parameter lhs: left Non-null GroestlCoin address to be compared - /// - Parameter rhs: right Non-null GroestlCoin address to be compared - /// - Returns: true if both address are equal, false otherwise - public static func == (lhs: GroestlcoinAddress, rhs: GroestlcoinAddress) -> Bool { - return TWGroestlcoinAddressEqual(lhs.rawValue, rhs.rawValue) - } - - /// Determines if the string is a valid Groestlcoin address. - /// - /// - Parameter string: Non-null string. - /// - Returns: true if it's a valid address, false otherwise - public static func isValidString(string: String) -> Bool { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - return TWGroestlcoinAddressIsValidString(stringString) - } - - /// Returns the address base58 string representation. - /// - /// - Parameter address: Non-null GroestlcoinAddress - /// - Returns: Address description as a non-null string - public var description: String { - return TWStringNSString(TWGroestlcoinAddressDescription(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init?(string: String) { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let rawValue = TWGroestlcoinAddressCreateWithString(stringString) else { - return nil - } - self.rawValue = rawValue - } - - public init(publicKey: PublicKey, prefix: UInt8) { - rawValue = TWGroestlcoinAddressCreateWithPublicKey(publicKey.rawValue, prefix) - } - - deinit { - TWGroestlcoinAddressDelete(rawValue) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/HDVersion+Extension.swift b/Pods/TrustWalletCore/Sources/Generated/HDVersion+Extension.swift deleted file mode 100644 index 859b3a0c..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/HDVersion+Extension.swift +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -extension HDVersion { - /// Determine if the HD Version is public - /// - /// - Parameter version: HD version - /// - Returns: true if the version is public, false otherwise - public var isPublic: Bool { - return TWHDVersionIsPublic(TWHDVersion(rawValue: rawValue)) - } - /// Determine if the HD Version is private - /// - /// - Parameter version: HD version - /// - Returns: true if the version is private, false otherwise - public var isPrivate: Bool { - return TWHDVersionIsPrivate(TWHDVersion(rawValue: rawValue)) - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/HDWallet.swift b/Pods/TrustWalletCore/Sources/Generated/HDWallet.swift deleted file mode 100644 index e63383bd..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/HDWallet.swift +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Hierarchical Deterministic (HD) Wallet -public final class HDWallet { - - /// Computes the public key from an extended public key representation. - /// - /// - Parameter extended: extended public key - /// - Parameter coin: a coin type - /// - Parameter derivationPath: a derivation path - /// - Note: Returned object needs to be deleted with \TWPublicKeyDelete - /// - Returns: Nullable TWPublic key - public static func getPublicKeyFromExtended(extended: String, coin: CoinType, derivationPath: String) -> PublicKey? { - let extendedString = TWStringCreateWithNSString(extended) - defer { - TWStringDelete(extendedString) - } - let derivationPathString = TWStringCreateWithNSString(derivationPath) - defer { - TWStringDelete(derivationPathString) - } - guard let value = TWHDWalletGetPublicKeyFromExtended(extendedString, TWCoinType(rawValue: coin.rawValue), derivationPathString) else { - return nil - } - return PublicKey(rawValue: value) - } - - /// Wallet seed. - /// - /// - Parameter wallet: non-null TWHDWallet - /// - Returns: The wallet seed as a Non-null block of data. - public var seed: Data { - return TWDataNSData(TWHDWalletSeed(rawValue)) - } - - /// Wallet Mnemonic - /// - /// - Parameter wallet: non-null TWHDWallet - /// - Returns: The wallet mnemonic as a non-null TWString - public var mnemonic: String { - return TWStringNSString(TWHDWalletMnemonic(rawValue)) - } - - /// Wallet entropy - /// - /// - Parameter wallet: non-null TWHDWallet - /// - Returns: The wallet entropy as a non-null block of data. - public var entropy: Data { - return TWDataNSData(TWHDWalletEntropy(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init?(strength: Int32, passphrase: String) { - let passphraseString = TWStringCreateWithNSString(passphrase) - defer { - TWStringDelete(passphraseString) - } - guard let rawValue = TWHDWalletCreate(Int32(strength), passphraseString) else { - return nil - } - self.rawValue = rawValue - } - - public init?(mnemonic: String, passphrase: String) { - let mnemonicString = TWStringCreateWithNSString(mnemonic) - defer { - TWStringDelete(mnemonicString) - } - let passphraseString = TWStringCreateWithNSString(passphrase) - defer { - TWStringDelete(passphraseString) - } - guard let rawValue = TWHDWalletCreateWithMnemonic(mnemonicString, passphraseString) else { - return nil - } - self.rawValue = rawValue - } - - public init?(mnemonic: String, passphrase: String, check: Bool) { - let mnemonicString = TWStringCreateWithNSString(mnemonic) - defer { - TWStringDelete(mnemonicString) - } - let passphraseString = TWStringCreateWithNSString(passphrase) - defer { - TWStringDelete(passphraseString) - } - guard let rawValue = TWHDWalletCreateWithMnemonicCheck(mnemonicString, passphraseString, check) else { - return nil - } - self.rawValue = rawValue - } - - public init?(entropy: Data, passphrase: String) { - let entropyData = TWDataCreateWithNSData(entropy) - defer { - TWDataDelete(entropyData) - } - let passphraseString = TWStringCreateWithNSString(passphrase) - defer { - TWStringDelete(passphraseString) - } - guard let rawValue = TWHDWalletCreateWithEntropy(entropyData, passphraseString) else { - return nil - } - self.rawValue = rawValue - } - - deinit { - TWHDWalletDelete(rawValue) - } - - /// Returns master key. - /// - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter curve: a curve - /// - Note: Returned object needs to be deleted with \TWPrivateKeyDelete - /// - Returns: Non-null corresponding private key - public func getMasterKey(curve: Curve) -> PrivateKey { - return PrivateKey(rawValue: TWHDWalletGetMasterKey(rawValue, TWCurve(rawValue: curve.rawValue))) - } - - /// Generates the default private key for the specified coin, using default derivation. - /// - /// - SeeAlso: TWHDWalletGetKey - /// - SeeAlso: TWHDWalletGetKeyDerivation - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter coin: a coin type - /// - Note: Returned object needs to be deleted with \TWPrivateKeyDelete - /// - Returns: return the default private key for the specified coin - public func getKeyForCoin(coin: CoinType) -> PrivateKey { - return PrivateKey(rawValue: TWHDWalletGetKeyForCoin(rawValue, TWCoinType(rawValue: coin.rawValue))) - } - - /// Generates the default address for the specified coin (without exposing intermediary private key), default derivation. - /// - /// - SeeAlso: TWHDWalletGetAddressDerivation - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter coin: a coin type - /// - Returns: return the default address for the specified coin as a non-null TWString - public func getAddressForCoin(coin: CoinType) -> String { - return TWStringNSString(TWHDWalletGetAddressForCoin(rawValue, TWCoinType(rawValue: coin.rawValue))) - } - - /// Generates the default address for the specified coin and derivation (without exposing intermediary private key). - /// - /// - SeeAlso: TWHDWalletGetAddressForCoin - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter coin: a coin type - /// - Parameter derivation: a (custom) derivation to use - /// - Returns: return the default address for the specified coin as a non-null TWString - public func getAddressDerivation(coin: CoinType, derivation: Derivation) -> String { - return TWStringNSString(TWHDWalletGetAddressDerivation(rawValue, TWCoinType(rawValue: coin.rawValue), TWDerivation(rawValue: derivation.rawValue))) - } - - /// Generates the private key for the specified derivation path. - /// - /// - SeeAlso: TWHDWalletGetKeyForCoin - /// - SeeAlso: TWHDWalletGetKeyDerivation - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter coin: a coin type - /// - Parameter derivationPath: a non-null derivation path - /// - Note: Returned object needs to be deleted with \TWPrivateKeyDelete - /// - Returns: The private key for the specified derivation path/coin - public func getKey(coin: CoinType, derivationPath: String) -> PrivateKey { - let derivationPathString = TWStringCreateWithNSString(derivationPath) - defer { - TWStringDelete(derivationPathString) - } - return PrivateKey(rawValue: TWHDWalletGetKey(rawValue, TWCoinType(rawValue: coin.rawValue), derivationPathString)) - } - - /// Generates the private key for the specified derivation. - /// - /// - SeeAlso: TWHDWalletGetKey - /// - SeeAlso: TWHDWalletGetKeyForCoin - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter coin: a coin type - /// - Parameter derivation: a (custom) derivation to use - /// - Note: Returned object needs to be deleted with \TWPrivateKeyDelete - /// - Returns: The private key for the specified derivation path/coin - public func getKeyDerivation(coin: CoinType, derivation: Derivation) -> PrivateKey { - return PrivateKey(rawValue: TWHDWalletGetKeyDerivation(rawValue, TWCoinType(rawValue: coin.rawValue), TWDerivation(rawValue: derivation.rawValue))) - } - - /// Generates the private key for the specified derivation path and curve. - /// - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter curve: a curve - /// - Parameter derivationPath: a non-null derivation path - /// - Note: Returned object needs to be deleted with \TWPrivateKeyDelete - /// - Returns: The private key for the specified derivation path/curve - public func getKeyByCurve(curve: Curve, derivationPath: String) -> PrivateKey { - let derivationPathString = TWStringCreateWithNSString(derivationPath) - defer { - TWStringDelete(derivationPathString) - } - return PrivateKey(rawValue: TWHDWalletGetKeyByCurve(rawValue, TWCurve(rawValue: curve.rawValue), derivationPathString)) - } - - /// Shortcut method to generate private key with the specified account/change/address (bip44 standard). - /// - /// - SeeAlso: https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki - /// - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter coin: a coin type - /// - Parameter account: valid bip44 account - /// - Parameter change: valid bip44 change - /// - Parameter address: valid bip44 address - /// - Note: Returned object needs to be deleted with \TWPrivateKeyDelete - /// - Returns: The private key for the specified bip44 parameters - public func getDerivedKey(coin: CoinType, account: UInt32, change: UInt32, address: UInt32) -> PrivateKey { - return PrivateKey(rawValue: TWHDWalletGetDerivedKey(rawValue, TWCoinType(rawValue: coin.rawValue), account, change, address)) - } - - /// Returns the extended private key (for default 0 account). - /// - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter purpose: a purpose - /// - Parameter coin: a coin type - /// - Parameter version: hd version - /// - Note: Returned object needs to be deleted with \TWStringDelete - /// - Returns: Extended private key as a non-null TWString - public func getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion) -> String { - return TWStringNSString(TWHDWalletGetExtendedPrivateKey(rawValue, TWPurpose(rawValue: purpose.rawValue), TWCoinType(rawValue: coin.rawValue), TWHDVersion(rawValue: version.rawValue))) - } - - /// Returns the extended public key (for default 0 account). - /// - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter purpose: a purpose - /// - Parameter coin: a coin type - /// - Parameter version: hd version - /// - Note: Returned object needs to be deleted with \TWStringDelete - /// - Returns: Extended public key as a non-null TWString - public func getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion) -> String { - return TWStringNSString(TWHDWalletGetExtendedPublicKey(rawValue, TWPurpose(rawValue: purpose.rawValue), TWCoinType(rawValue: coin.rawValue), TWHDVersion(rawValue: version.rawValue))) - } - - /// Returns the extended private key, for custom account. - /// - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter purpose: a purpose - /// - Parameter coin: a coin type - /// - Parameter derivation: a derivation - /// - Parameter version: an hd version - /// - Parameter account: valid bip44 account - /// - Note: Returned object needs to be deleted with \TWStringDelete - /// - Returns: Extended private key as a non-null TWString - public func getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: UInt32) -> String { - return TWStringNSString(TWHDWalletGetExtendedPrivateKeyAccount(rawValue, TWPurpose(rawValue: purpose.rawValue), TWCoinType(rawValue: coin.rawValue), TWDerivation(rawValue: derivation.rawValue), TWHDVersion(rawValue: version.rawValue), account)) - } - - /// Returns the extended public key, for custom account. - /// - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter purpose: a purpose - /// - Parameter coin: a coin type - /// - Parameter derivation: a derivation - /// - Parameter version: an hd version - /// - Parameter account: valid bip44 account - /// - Note: Returned object needs to be deleted with \TWStringDelete - /// - Returns: Extended public key as a non-null TWString - public func getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: UInt32) -> String { - return TWStringNSString(TWHDWalletGetExtendedPublicKeyAccount(rawValue, TWPurpose(rawValue: purpose.rawValue), TWCoinType(rawValue: coin.rawValue), TWDerivation(rawValue: derivation.rawValue), TWHDVersion(rawValue: version.rawValue), account)) - } - - /// Returns the extended private key (for default 0 account with derivation). - /// - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter purpose: a purpose - /// - Parameter coin: a coin type - /// - Parameter derivation: a derivation - /// - Parameter version: an hd version - /// - Note: Returned object needs to be deleted with \TWStringDelete - /// - Returns: Extended private key as a non-null TWString - public func getExtendedPrivateKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion) -> String { - return TWStringNSString(TWHDWalletGetExtendedPrivateKeyDerivation(rawValue, TWPurpose(rawValue: purpose.rawValue), TWCoinType(rawValue: coin.rawValue), TWDerivation(rawValue: derivation.rawValue), TWHDVersion(rawValue: version.rawValue))) - } - - /// Returns the extended public key (for default 0 account with derivation). - /// - /// - Parameter wallet: non-null TWHDWallet - /// - Parameter purpose: a purpose - /// - Parameter coin: a coin type - /// - Parameter derivation: a derivation - /// - Parameter version: an hd version - /// - Note: Returned object needs to be deleted with \TWStringDelete - /// - Returns: Extended public key as a non-null TWString - public func getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion) -> String { - return TWStringNSString(TWHDWalletGetExtendedPublicKeyDerivation(rawValue, TWPurpose(rawValue: purpose.rawValue), TWCoinType(rawValue: coin.rawValue), TWDerivation(rawValue: derivation.rawValue), TWHDVersion(rawValue: version.rawValue))) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Hash.swift b/Pods/TrustWalletCore/Sources/Generated/Hash.swift deleted file mode 100644 index 394738ee..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Hash.swift +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Hash functions -public struct Hash { - - /// Computes the SHA1 of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed SHA1 block of data - public static func sha1(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashSHA1(dataData)) - } - - /// Computes the SHA256 of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed SHA256 block of data - public static func sha256(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashSHA256(dataData)) - } - - /// Computes the SHA512 of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed SHA512 block of data - public static func sha512(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashSHA512(dataData)) - } - - /// Computes the SHA512_256 of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed SHA512_256 block of data - public static func sha512_256(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashSHA512_256(dataData)) - } - - /// Computes the Keccak256 of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed Keccak256 block of data - public static func keccak256(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashKeccak256(dataData)) - } - - /// Computes the Keccak512 of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed Keccak512 block of data - public static func keccak512(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashKeccak512(dataData)) - } - - /// Computes the SHA3_256 of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed SHA3_256 block of data - public static func sha3_256(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashSHA3_256(dataData)) - } - - /// Computes the SHA3_512 of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed SHA3_512 block of data - public static func sha3_512(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashSHA3_512(dataData)) - } - - /// Computes the RIPEMD of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed RIPEMD block of data - public static func ripemd(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashRIPEMD(dataData)) - } - - /// Computes the Blake256 of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed Blake256 block of data - public static func blake256(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashBlake256(dataData)) - } - - /// Computes the Blake2b of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed Blake2b block of data - public static func blake2b(data: Data, size: Int) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashBlake2b(dataData, size)) - } - - /// Computes the Groestl512 of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed Groestl512 block of data - public static func blake2bPersonal(data: Data, personal: Data, outlen: Int) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - let personalData = TWDataCreateWithNSData(personal) - defer { - TWDataDelete(personalData) - } - return TWDataNSData(TWHashBlake2bPersonal(dataData, personalData, outlen)) - } - - - public static func groestl512(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashGroestl512(dataData)) - } - - /// Computes the SHA256D of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed SHA256D block of data - public static func sha256SHA256(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashSHA256SHA256(dataData)) - } - - /// Computes the SHA256RIPEMD of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed SHA256RIPEMD block of data - public static func sha256RIPEMD(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashSHA256RIPEMD(dataData)) - } - - /// Computes the SHA3_256RIPEMD of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed SHA3_256RIPEMD block of data - public static func sha3_256RIPEMD(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashSHA3_256RIPEMD(dataData)) - } - - /// Computes the Blake256D of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed Blake256D block of data - public static func blake256Blake256(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashBlake256Blake256(dataData)) - } - - /// Computes the Blake256RIPEMD of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed Blake256RIPEMD block of data - public static func blake256RIPEMD(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashBlake256RIPEMD(dataData)) - } - - /// Computes the Groestl512D of a block of data. - /// - /// - Parameter data: Non-null block of data - /// - Returns: Non-null computed Groestl512D block of data - public static func groestl512Groestl512(data: Data) -> Data { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWDataNSData(TWHashGroestl512Groestl512(dataData)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/LiquidStaking.swift b/Pods/TrustWalletCore/Sources/Generated/LiquidStaking.swift deleted file mode 100644 index 3078b39e..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/LiquidStaking.swift +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// THORChain swap functions -public struct LiquidStaking { - - /// Builds a LiquidStaking transaction input. - /// - /// - Parameter input: The serialized data of LiquidStakingInput. - /// - Returns: The serialized data of LiquidStakingOutput. - public static func buildRequest(input: Data) -> Data { - let inputData = TWDataCreateWithNSData(input) - defer { - TWDataDelete(inputData) - } - return TWDataNSData(TWLiquidStakingBuildRequest(inputData)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Mnemonic.swift b/Pods/TrustWalletCore/Sources/Generated/Mnemonic.swift deleted file mode 100644 index 53b0b8eb..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Mnemonic.swift +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Mnemonic validate / lookup functions -public struct Mnemonic { - - /// Determines whether a BIP39 English mnemonic phrase is valid. - /// - /// - Parameter mnemonic: Non-null BIP39 english mnemonic - /// - Returns: true if the mnemonic is valid, false otherwise - public static func isValid(mnemonic: String) -> Bool { - let mnemonicString = TWStringCreateWithNSString(mnemonic) - defer { - TWStringDelete(mnemonicString) - } - return TWMnemonicIsValid(mnemonicString) - } - - /// Determines whether word is a valid BIP39 English mnemonic word. - /// - /// - Parameter word: Non-null BIP39 English mnemonic word - /// - Returns: true if the word is a valid BIP39 English mnemonic word, false otherwise - public static func isValidWord(word: String) -> Bool { - let wordString = TWStringCreateWithNSString(word) - defer { - TWStringDelete(wordString) - } - return TWMnemonicIsValidWord(wordString) - } - - /// Return BIP39 English words that match the given prefix. A single string is returned, with space-separated list of words. - /// - /// - Parameter prefix: Non-null string prefix - /// - Returns: Single non-null string, space-separated list of words containing BIP39 words that match the given prefix. - public static func suggest(prefix: String) -> String { - let prefixString = TWStringCreateWithNSString(prefix) - defer { - TWStringDelete(prefixString) - } - return TWStringNSString(TWMnemonicSuggest(prefixString)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/NEARAccount.swift b/Pods/TrustWalletCore/Sources/Generated/NEARAccount.swift deleted file mode 100644 index a61a4991..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/NEARAccount.swift +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents a NEAR Account name -public final class NEARAccount { - - /// Returns the user friendly string representation. - /// - /// - Parameter account: Pointer to a non-null NEAR Account - /// - Returns: Non-null string account description - public var description: String { - return TWStringNSString(TWNEARAccountDescription(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init?(string: String) { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let rawValue = TWNEARAccountCreateWithString(stringString) else { - return nil - } - self.rawValue = rawValue - } - - deinit { - TWNEARAccountDelete(rawValue) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/NervosAddress.swift b/Pods/TrustWalletCore/Sources/Generated/NervosAddress.swift deleted file mode 100644 index 65b74ed3..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/NervosAddress.swift +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents a Nervos address. -public final class NervosAddress: Address { - - /// Compares two addresses for equality. - /// - /// - Parameter lhs: The first address to compare. - /// - Parameter rhs: The second address to compare. - /// - Returns: bool indicating the addresses are equal. - public static func == (lhs: NervosAddress, rhs: NervosAddress) -> Bool { - return TWNervosAddressEqual(lhs.rawValue, rhs.rawValue) - } - - /// Determines if the string is a valid Nervos address. - /// - /// - Parameter string: string to validate. - /// - Returns: bool indicating if the address is valid. - public static func isValidString(string: String) -> Bool { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - return TWNervosAddressIsValidString(stringString) - } - - /// Returns the address string representation. - /// - /// - Parameter address: Address to get the string representation of. - public var description: String { - return TWStringNSString(TWNervosAddressDescription(rawValue)) - } - - /// Returns the Code hash - /// - /// - Parameter address: Address to get the keyhash data of. - public var codeHash: Data { - return TWDataNSData(TWNervosAddressCodeHash(rawValue)) - } - - /// Returns the address hash type - /// - /// - Parameter address: Address to get the hash type of. - public var hashType: String { - return TWStringNSString(TWNervosAddressHashType(rawValue)) - } - - /// Returns the address args data. - /// - /// - Parameter address: Address to get the args data of. - public var args: Data { - return TWDataNSData(TWNervosAddressArgs(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init?(string: String) { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let rawValue = TWNervosAddressCreateWithString(stringString) else { - return nil - } - self.rawValue = rawValue - } - - deinit { - TWNervosAddressDelete(rawValue) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/PBKDF2.swift b/Pods/TrustWalletCore/Sources/Generated/PBKDF2.swift deleted file mode 100644 index e24f4c31..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/PBKDF2.swift +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Password-Based Key Derivation Function 2 -public struct PBKDF2 { - - /// Derives a key from a password and a salt using PBKDF2 + Sha256. - /// - /// - Parameter password: is the master password from which a derived key is generated - /// - Parameter salt: is a sequence of bits, known as a cryptographic salt - /// - Parameter iterations: is the number of iterations desired - /// - Parameter dkLen: is the desired bit-length of the derived key - /// - Returns: the derived key data. - public static func hmacSha256(password: Data, salt: Data, iterations: UInt32, dkLen: UInt32) -> Data? { - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - let saltData = TWDataCreateWithNSData(salt) - defer { - TWDataDelete(saltData) - } - guard let result = TWPBKDF2HmacSha256(passwordData, saltData, iterations, dkLen) else { - return nil - } - return TWDataNSData(result) - } - - /// Derives a key from a password and a salt using PBKDF2 + Sha512. - /// - /// - Parameter password: is the master password from which a derived key is generated - /// - Parameter salt: is a sequence of bits, known as a cryptographic salt - /// - Parameter iterations: is the number of iterations desired - /// - Parameter dkLen: is the desired bit-length of the derived key - /// - Returns: the derived key data. - public static func hmacSha512(password: Data, salt: Data, iterations: UInt32, dkLen: UInt32) -> Data? { - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - let saltData = TWDataCreateWithNSData(salt) - defer { - TWDataDelete(saltData) - } - guard let result = TWPBKDF2HmacSha512(passwordData, saltData, iterations, dkLen) else { - return nil - } - return TWDataNSData(result) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/PrivateKey.swift b/Pods/TrustWalletCore/Sources/Generated/PrivateKey.swift deleted file mode 100644 index dad8c7ff..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/PrivateKey.swift +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents a private key. -public final class PrivateKey { - - /// Determines if the given private key is valid or not. - /// - /// - Parameter data: block of data (private key bytes) - /// - Parameter curve: Eliptic curve of the private key - /// - Returns: true if the private key is valid, false otherwise - public static func isValid(data: Data, curve: Curve) -> Bool { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWPrivateKeyIsValid(dataData, TWCurve(rawValue: curve.rawValue)) - } - - /// Convert the given private key to raw-bytes block of data - /// - /// - Parameter pk: Non-null pointer to the private key - /// - Returns: Non-null block of data (raw bytes) of the given private key - public var data: Data { - return TWDataNSData(TWPrivateKeyData(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init() { - rawValue = TWPrivateKeyCreate() - } - - public init?(data: Data) { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - guard let rawValue = TWPrivateKeyCreateWithData(dataData) else { - return nil - } - self.rawValue = rawValue - } - - public init?(key: PrivateKey) { - guard let rawValue = TWPrivateKeyCreateCopy(key.rawValue) else { - return nil - } - self.rawValue = rawValue - } - - deinit { - TWPrivateKeyDelete(rawValue) - } - - /// Returns the public key associated with the given coinType and privateKey - /// - /// - Parameter pk: Non-null pointer to the private key - /// - Parameter coinType: coinType of the given private key - /// - Returns: Non-null pointer to the corresponding public key - public func getPublicKey(coinType: CoinType) -> PublicKey { - return PublicKey(rawValue: TWPrivateKeyGetPublicKey(rawValue, TWCoinType(rawValue: coinType.rawValue))) - } - - /// Returns the public key associated with the given pubkeyType and privateKey - /// - /// - Parameter pk: Non-null pointer to the private key - /// - Parameter pubkeyType: pubkeyType of the given private key - /// - Returns: Non-null pointer to the corresponding public key - public func getPublicKeyByType(pubkeyType: PublicKeyType) -> PublicKey { - return PublicKey(rawValue: TWPrivateKeyGetPublicKeyByType(rawValue, TWPublicKeyType(rawValue: pubkeyType.rawValue))) - } - - /// Returns the Secp256k1 public key associated with the given private key - /// - /// - Parameter pk: Non-null pointer to the private key - /// - Parameter compressed: if the given private key is compressed or not - /// - Returns: Non-null pointer to the corresponding public key - public func getPublicKeySecp256k1(compressed: Bool) -> PublicKey { - return PublicKey(rawValue: TWPrivateKeyGetPublicKeySecp256k1(rawValue, compressed)) - } - - /// Returns the Nist256p1 public key associated with the given private key - /// - /// - Parameter pk: Non-null pointer to the private key - /// - Returns: Non-null pointer to the corresponding public key - public func getPublicKeyNist256p1() -> PublicKey { - return PublicKey(rawValue: TWPrivateKeyGetPublicKeyNist256p1(rawValue)) - } - - /// Returns the Ed25519 public key associated with the given private key - /// - /// - Parameter pk: Non-null pointer to the private key - /// - Returns: Non-null pointer to the corresponding public key - public func getPublicKeyEd25519() -> PublicKey { - return PublicKey(rawValue: TWPrivateKeyGetPublicKeyEd25519(rawValue)) - } - - /// Returns the Ed25519Blake2b public key associated with the given private key - /// - /// - Parameter pk: Non-null pointer to the private key - /// - Returns: Non-null pointer to the corresponding public key - public func getPublicKeyEd25519Blake2b() -> PublicKey { - return PublicKey(rawValue: TWPrivateKeyGetPublicKeyEd25519Blake2b(rawValue)) - } - - /// Returns the Ed25519Cardano public key associated with the given private key - /// - /// - Parameter pk: Non-null pointer to the private key - /// - Returns: Non-null pointer to the corresponding public key - public func getPublicKeyEd25519Cardano() -> PublicKey { - return PublicKey(rawValue: TWPrivateKeyGetPublicKeyEd25519Cardano(rawValue)) - } - - /// Returns the Curve25519 public key associated with the given private key - /// - /// - Parameter pk: Non-null pointer to the private key - /// - Returns: Non-null pointer to the corresponding public key - public func getPublicKeyCurve25519() -> PublicKey { - return PublicKey(rawValue: TWPrivateKeyGetPublicKeyCurve25519(rawValue)) - } - - /// Signs a digest using ECDSA and given curve. - /// - /// - Parameter pk: Non-null pointer to a Private key - /// - Parameter digest: Non-null digest block of data - /// - Parameter curve: Eliptic curve - /// - Returns: Signature as a Non-null block of data - public func sign(digest: Data, curve: Curve) -> Data? { - let digestData = TWDataCreateWithNSData(digest) - defer { - TWDataDelete(digestData) - } - guard let result = TWPrivateKeySign(rawValue, digestData, TWCurve(rawValue: curve.rawValue)) else { - return nil - } - return TWDataNSData(result) - } - - /// Signs a digest using ECDSA. The result is encoded with DER. - /// - /// - Parameter pk: Non-null pointer to a Private key - /// - Parameter digest: Non-null digest block of data - /// - Returns: Signature as a Non-null block of data - public func signAsDER(digest: Data) -> Data? { - let digestData = TWDataCreateWithNSData(digest) - defer { - TWDataDelete(digestData) - } - guard let result = TWPrivateKeySignAsDER(rawValue, digestData) else { - return nil - } - return TWDataNSData(result) - } - - /// Signs a digest using ECDSA and Zilliqa schnorr signature scheme. - /// - /// - Parameter pk: Non-null pointer to a Private key - /// - Parameter message: Non-null message - /// - Returns: Signature as a Non-null block of data - public func signZilliqaSchnorr(message: Data) -> Data? { - let messageData = TWDataCreateWithNSData(message) - defer { - TWDataDelete(messageData) - } - guard let result = TWPrivateKeySignZilliqaSchnorr(rawValue, messageData) else { - return nil - } - return TWDataNSData(result) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aeternity+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aeternity+Proto.swift deleted file mode 100644 index 1e3dce4b..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aeternity+Proto.swift +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias AeternitySigningInput = TW_Aeternity_Proto_SigningInput -public typealias AeternitySigningOutput = TW_Aeternity_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aeternity.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aeternity.pb.swift deleted file mode 100644 index 8efc9582..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aeternity.pb.swift +++ /dev/null @@ -1,189 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Aeternity.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Input data necessary to create a signed transaction. -public struct TW_Aeternity_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Address of the sender with "ak_" prefix - public var fromAddress: String = String() - - /// Address of the recipient with "ak_" prefix - public var toAddress: String = String() - - /// Amount (uint256, serialized little endian) - public var amount: Data = Data() - - /// Fee amount (uint256, serialized little endian) - public var fee: Data = Data() - - /// Message, optional - public var payload: String = String() - - /// Time to live until block height - public var ttl: UInt64 = 0 - - /// Nonce (should be larger than in the last transaction of the account) - public var nonce: UInt64 = 0 - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Aeternity_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and encoded transaction bytes, Base64 with checksum - public var encoded: String = String() - - /// Signature, Base58 with checksum - public var signature: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Aeternity.Proto" - -extension TW_Aeternity_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "from_address"), - 2: .standard(proto: "to_address"), - 3: .same(proto: "amount"), - 4: .same(proto: "fee"), - 5: .same(proto: "payload"), - 6: .same(proto: "ttl"), - 7: .same(proto: "nonce"), - 8: .standard(proto: "private_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.fromAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.fee) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.payload) }() - case 6: try { try decoder.decodeSingularUInt64Field(value: &self.ttl) }() - case 7: try { try decoder.decodeSingularUInt64Field(value: &self.nonce) }() - case 8: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fromAddress.isEmpty { - try visitor.visitSingularStringField(value: self.fromAddress, fieldNumber: 1) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 2) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 3) - } - if !self.fee.isEmpty { - try visitor.visitSingularBytesField(value: self.fee, fieldNumber: 4) - } - if !self.payload.isEmpty { - try visitor.visitSingularStringField(value: self.payload, fieldNumber: 5) - } - if self.ttl != 0 { - try visitor.visitSingularUInt64Field(value: self.ttl, fieldNumber: 6) - } - if self.nonce != 0 { - try visitor.visitSingularUInt64Field(value: self.nonce, fieldNumber: 7) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 8) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aeternity_Proto_SigningInput, rhs: TW_Aeternity_Proto_SigningInput) -> Bool { - if lhs.fromAddress != rhs.fromAddress {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.fee != rhs.fee {return false} - if lhs.payload != rhs.payload {return false} - if lhs.ttl != rhs.ttl {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aeternity_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "signature"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.signature) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularStringField(value: self.encoded, fieldNumber: 1) - } - if !self.signature.isEmpty { - try visitor.visitSingularStringField(value: self.signature, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aeternity_Proto_SigningOutput, rhs: TW_Aeternity_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.signature != rhs.signature {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aion+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aion+Proto.swift deleted file mode 100644 index 2970fcb5..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aion+Proto.swift +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias AionSigningInput = TW_Aion_Proto_SigningInput -public typealias AionSigningOutput = TW_Aion_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aion.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aion.pb.swift deleted file mode 100644 index 55f1a469..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aion.pb.swift +++ /dev/null @@ -1,207 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Aion.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Input data necessary to create a signed transaction. -public struct TW_Aion_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Nonce (uint256, serialized little endian) - public var nonce: Data = Data() - - /// Gas price (uint256, serialized little endian) - public var gasPrice: Data = Data() - - /// Gas limit (uint256, serialized little endian) - public var gasLimit: Data = Data() - - /// Recipient's address. - public var toAddress: String = String() - - /// Amount to send in wei (uint256, serialized little endian) - public var amount: Data = Data() - - /// Optional payload - public var payload: Data = Data() - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Timestamp - public var timestamp: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Aion_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// Signature. - public var signature: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Aion.Proto" - -extension TW_Aion_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "nonce"), - 2: .standard(proto: "gas_price"), - 3: .standard(proto: "gas_limit"), - 4: .standard(proto: "to_address"), - 5: .same(proto: "amount"), - 6: .same(proto: "payload"), - 7: .standard(proto: "private_key"), - 8: .same(proto: "timestamp"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.nonce) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.gasPrice) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.gasLimit) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 8: try { try decoder.decodeSingularUInt64Field(value: &self.timestamp) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.nonce.isEmpty { - try visitor.visitSingularBytesField(value: self.nonce, fieldNumber: 1) - } - if !self.gasPrice.isEmpty { - try visitor.visitSingularBytesField(value: self.gasPrice, fieldNumber: 2) - } - if !self.gasLimit.isEmpty { - try visitor.visitSingularBytesField(value: self.gasLimit, fieldNumber: 3) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 4) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 5) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 6) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 7) - } - if self.timestamp != 0 { - try visitor.visitSingularUInt64Field(value: self.timestamp, fieldNumber: 8) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aion_Proto_SigningInput, rhs: TW_Aion_Proto_SigningInput) -> Bool { - if lhs.nonce != rhs.nonce {return false} - if lhs.gasPrice != rhs.gasPrice {return false} - if lhs.gasLimit != rhs.gasLimit {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.payload != rhs.payload {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.timestamp != rhs.timestamp {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aion_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "signature"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aion_Proto_SigningOutput, rhs: TW_Aion_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.signature != rhs.signature {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Algorand+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Algorand+Proto.swift deleted file mode 100644 index 6edeeaba..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Algorand+Proto.swift +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias AlgorandTransfer = TW_Algorand_Proto_Transfer -public typealias AlgorandAssetTransfer = TW_Algorand_Proto_AssetTransfer -public typealias AlgorandAssetOptIn = TW_Algorand_Proto_AssetOptIn -public typealias AlgorandSigningInput = TW_Algorand_Proto_SigningInput -public typealias AlgorandSigningOutput = TW_Algorand_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Algorand.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Algorand.pb.swift deleted file mode 100644 index ba423d0d..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Algorand.pb.swift +++ /dev/null @@ -1,491 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Algorand.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Simple transfer message, transfer an amount to an address -public struct TW_Algorand_Proto_Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Destination address (string) - public var toAddress: String = String() - - /// Amount - public var amount: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Asset Transfer message, with assetID -public struct TW_Algorand_Proto_AssetTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Destination address (string) - public var toAddress: String = String() - - /// Amount - public var amount: UInt64 = 0 - - /// ID of the asset being transferred - public var assetID: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Opt-in message for an asset -public struct TW_Algorand_Proto_AssetOptIn { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// ID of the asset - public var assetID: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Algorand_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// network / chain id - public var genesisID: String = String() - - /// network / chain hash - public var genesisHash: Data = Data() - - /// binary note data - public var note: Data = Data() - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// network / first round - public var firstRound: UInt64 = 0 - - /// network / last round - public var lastRound: UInt64 = 0 - - /// fee amount - public var fee: UInt64 = 0 - - /// public key - public var publicKey: Data = Data() - - /// message payload - public var messageOneof: TW_Algorand_Proto_SigningInput.OneOf_MessageOneof? = nil - - public var transfer: TW_Algorand_Proto_Transfer { - get { - if case .transfer(let v)? = messageOneof {return v} - return TW_Algorand_Proto_Transfer() - } - set {messageOneof = .transfer(newValue)} - } - - public var assetTransfer: TW_Algorand_Proto_AssetTransfer { - get { - if case .assetTransfer(let v)? = messageOneof {return v} - return TW_Algorand_Proto_AssetTransfer() - } - set {messageOneof = .assetTransfer(newValue)} - } - - public var assetOptIn: TW_Algorand_Proto_AssetOptIn { - get { - if case .assetOptIn(let v)? = messageOneof {return v} - return TW_Algorand_Proto_AssetOptIn() - } - set {messageOneof = .assetOptIn(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// message payload - public enum OneOf_MessageOneof: Equatable { - case transfer(TW_Algorand_Proto_Transfer) - case assetTransfer(TW_Algorand_Proto_AssetTransfer) - case assetOptIn(TW_Algorand_Proto_AssetOptIn) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Algorand_Proto_SigningInput.OneOf_MessageOneof, rhs: TW_Algorand_Proto_SigningInput.OneOf_MessageOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transfer, .transfer): return { - guard case .transfer(let l) = lhs, case .transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.assetTransfer, .assetTransfer): return { - guard case .assetTransfer(let l) = lhs, case .assetTransfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.assetOptIn, .assetOptIn): return { - guard case .assetOptIn(let l) = lhs, case .assetOptIn(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Algorand_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// Signature in base64. - public var signature: String = String() - - /// Error code, 0 is ok, other codes will be treated as errors. - public var error: TW_Common_Proto_SigningError = .ok - - /// Error description. - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Algorand.Proto" - -extension TW_Algorand_Proto_Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "to_address"), - 2: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 1) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Algorand_Proto_Transfer, rhs: TW_Algorand_Proto_Transfer) -> Bool { - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Algorand_Proto_AssetTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".AssetTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "to_address"), - 2: .same(proto: "amount"), - 3: .standard(proto: "asset_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.assetID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 1) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 2) - } - if self.assetID != 0 { - try visitor.visitSingularUInt64Field(value: self.assetID, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Algorand_Proto_AssetTransfer, rhs: TW_Algorand_Proto_AssetTransfer) -> Bool { - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.assetID != rhs.assetID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Algorand_Proto_AssetOptIn: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".AssetOptIn" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "asset_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.assetID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.assetID != 0 { - try visitor.visitSingularUInt64Field(value: self.assetID, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Algorand_Proto_AssetOptIn, rhs: TW_Algorand_Proto_AssetOptIn) -> Bool { - if lhs.assetID != rhs.assetID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Algorand_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "genesis_id"), - 2: .standard(proto: "genesis_hash"), - 3: .same(proto: "note"), - 4: .standard(proto: "private_key"), - 5: .standard(proto: "first_round"), - 6: .standard(proto: "last_round"), - 7: .same(proto: "fee"), - 8: .standard(proto: "public_key"), - 10: .same(proto: "transfer"), - 11: .standard(proto: "asset_transfer"), - 12: .standard(proto: "asset_opt_in"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.genesisID) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.genesisHash) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.note) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.firstRound) }() - case 6: try { try decoder.decodeSingularUInt64Field(value: &self.lastRound) }() - case 7: try { try decoder.decodeSingularUInt64Field(value: &self.fee) }() - case 8: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - case 10: try { - var v: TW_Algorand_Proto_Transfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .transfer(v) - } - }() - case 11: try { - var v: TW_Algorand_Proto_AssetTransfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .assetTransfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .assetTransfer(v) - } - }() - case 12: try { - var v: TW_Algorand_Proto_AssetOptIn? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .assetOptIn(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .assetOptIn(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.genesisID.isEmpty { - try visitor.visitSingularStringField(value: self.genesisID, fieldNumber: 1) - } - if !self.genesisHash.isEmpty { - try visitor.visitSingularBytesField(value: self.genesisHash, fieldNumber: 2) - } - if !self.note.isEmpty { - try visitor.visitSingularBytesField(value: self.note, fieldNumber: 3) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 4) - } - if self.firstRound != 0 { - try visitor.visitSingularUInt64Field(value: self.firstRound, fieldNumber: 5) - } - if self.lastRound != 0 { - try visitor.visitSingularUInt64Field(value: self.lastRound, fieldNumber: 6) - } - if self.fee != 0 { - try visitor.visitSingularUInt64Field(value: self.fee, fieldNumber: 7) - } - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 8) - } - switch self.messageOneof { - case .transfer?: try { - guard case .transfer(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - }() - case .assetTransfer?: try { - guard case .assetTransfer(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - }() - case .assetOptIn?: try { - guard case .assetOptIn(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Algorand_Proto_SigningInput, rhs: TW_Algorand_Proto_SigningInput) -> Bool { - if lhs.genesisID != rhs.genesisID {return false} - if lhs.genesisHash != rhs.genesisHash {return false} - if lhs.note != rhs.note {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.firstRound != rhs.firstRound {return false} - if lhs.lastRound != rhs.lastRound {return false} - if lhs.fee != rhs.fee {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.messageOneof != rhs.messageOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Algorand_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "signature"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.signature) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if !self.signature.isEmpty { - try visitor.visitSingularStringField(value: self.signature, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Algorand_Proto_SigningOutput, rhs: TW_Algorand_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.signature != rhs.signature {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aptos+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aptos+Proto.swift deleted file mode 100644 index c048bf74..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aptos+Proto.swift +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias AptosTransferMessage = TW_Aptos_Proto_TransferMessage -public typealias AptosStructTag = TW_Aptos_Proto_StructTag -public typealias AptosTokenTransferMessage = TW_Aptos_Proto_TokenTransferMessage -public typealias AptosTokenTransferCoinsMessage = TW_Aptos_Proto_TokenTransferCoinsMessage -public typealias AptosManagedTokensRegisterMessage = TW_Aptos_Proto_ManagedTokensRegisterMessage -public typealias AptosCreateAccountMessage = TW_Aptos_Proto_CreateAccountMessage -public typealias AptosOfferNftMessage = TW_Aptos_Proto_OfferNftMessage -public typealias AptosCancelOfferNftMessage = TW_Aptos_Proto_CancelOfferNftMessage -public typealias AptosClaimNftMessage = TW_Aptos_Proto_ClaimNftMessage -public typealias AptosTortugaClaim = TW_Aptos_Proto_TortugaClaim -public typealias AptosTortugaStake = TW_Aptos_Proto_TortugaStake -public typealias AptosTortugaUnstake = TW_Aptos_Proto_TortugaUnstake -public typealias AptosLiquidStaking = TW_Aptos_Proto_LiquidStaking -public typealias AptosNftMessage = TW_Aptos_Proto_NftMessage -public typealias AptosSigningInput = TW_Aptos_Proto_SigningInput -public typealias AptosTransactionAuthenticator = TW_Aptos_Proto_TransactionAuthenticator -public typealias AptosSigningOutput = TW_Aptos_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aptos.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aptos.pb.swift deleted file mode 100644 index 1b663d89..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Aptos.pb.swift +++ /dev/null @@ -1,1624 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Aptos.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Necessary fields to process a TransferMessage -public struct TW_Aptos_Proto_TransferMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Destination Account address (string) - public var to: String = String() - - /// Amount to be transferred (uint64) - public var amount: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Necessary tag for type function argument -public struct TW_Aptos_Proto_StructTag { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Address of the account - public var accountAddress: String = String() - - /// Module name - public var module: String = String() - - /// Identifier - public var name: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Necessary fields to process a `0x1::coin::transfer` function. -public struct TW_Aptos_Proto_TokenTransferMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Destination Account address (string) - public var to: String = String() - - /// Amount to be transferred (uint64) - public var amount: UInt64 = 0 - - /// token function to call, e.g BTC: 0x43417434fd869edee76cca2a4d2301e528a1551b1d719b75c350c3c97d15b8b9::coins::BTC - public var function: TW_Aptos_Proto_StructTag { - get {return _function ?? TW_Aptos_Proto_StructTag()} - set {_function = newValue} - } - /// Returns true if `function` has been explicitly set. - public var hasFunction: Bool {return self._function != nil} - /// Clears the value of `function`. Subsequent reads from it will return its default value. - public mutating func clearFunction() {self._function = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _function: TW_Aptos_Proto_StructTag? = nil -} - -/// Necessary fields to process a `0x1::aptos_account::transfer_coins` function. -/// Can be used to transfer tokens with registering the recipient account if needed. -public struct TW_Aptos_Proto_TokenTransferCoinsMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Destination Account address (string) - public var to: String = String() - - /// Amount to be transferred (uint64) - public var amount: UInt64 = 0 - - /// token function to call, e.g BTC: 0x43417434fd869edee76cca2a4d2301e528a1551b1d719b75c350c3c97d15b8b9::coins::BTC - public var function: TW_Aptos_Proto_StructTag { - get {return _function ?? TW_Aptos_Proto_StructTag()} - set {_function = newValue} - } - /// Returns true if `function` has been explicitly set. - public var hasFunction: Bool {return self._function != nil} - /// Clears the value of `function`. Subsequent reads from it will return its default value. - public mutating func clearFunction() {self._function = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _function: TW_Aptos_Proto_StructTag? = nil -} - -/// Necessary fields to process a ManagedTokensRegisterMessage -public struct TW_Aptos_Proto_ManagedTokensRegisterMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// token function to register, e.g BTC: 0x43417434fd869edee76cca2a4d2301e528a1551b1d719b75c350c3c97d15b8b9::coins::BTC - public var function: TW_Aptos_Proto_StructTag { - get {return _function ?? TW_Aptos_Proto_StructTag()} - set {_function = newValue} - } - /// Returns true if `function` has been explicitly set. - public var hasFunction: Bool {return self._function != nil} - /// Clears the value of `function`. Subsequent reads from it will return its default value. - public mutating func clearFunction() {self._function = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _function: TW_Aptos_Proto_StructTag? = nil -} - -/// Necessary fields to process a CreateAccountMessage -public struct TW_Aptos_Proto_CreateAccountMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// auth account address to create - public var authKey: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Necessary fields to process an OfferNftMessage -public struct TW_Aptos_Proto_OfferNftMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Receiver address - public var receiver: String = String() - - /// Creator address - public var creator: String = String() - - /// Name of the collection - public var collectionName: String = String() - - /// Name of the NFT - public var name: String = String() - - /// Property version (should be often 0) - public var propertyVersion: UInt64 = 0 - - /// Amount of NFT's to transfer (should be often 1) - public var amount: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Necessary fields to process an CancelOfferNftMessage -public struct TW_Aptos_Proto_CancelOfferNftMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Receiver address - public var receiver: String = String() - - /// Creator address - public var creator: String = String() - - /// Name of the collection - public var collectionName: String = String() - - /// Name of the NFT - public var name: String = String() - - /// Property version (should be often 0) - public var propertyVersion: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Necessary fields to process an ClaimNftMessage -public struct TW_Aptos_Proto_ClaimNftMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Sender address - public var sender: String = String() - - /// Creator address - public var creator: String = String() - - /// Name of the collection - public var collectionName: String = String() - - /// Name of the NFT - public var name: String = String() - - /// Property version (should be often 0) - public var propertyVersion: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Aptos_Proto_TortugaClaim { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// idx of ticket to claim - public var idx: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Aptos_Proto_TortugaStake { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Amount to be stake - public var amount: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Aptos_Proto_TortugaUnstake { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Amount to be stake - public var amount: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Aptos_Proto_LiquidStaking { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Smart contract address of liquid staking module - public var smartContractAddress: String = String() - - public var liquidStakeTransactionPayload: TW_Aptos_Proto_LiquidStaking.OneOf_LiquidStakeTransactionPayload? = nil - - public var stake: TW_Aptos_Proto_TortugaStake { - get { - if case .stake(let v)? = liquidStakeTransactionPayload {return v} - return TW_Aptos_Proto_TortugaStake() - } - set {liquidStakeTransactionPayload = .stake(newValue)} - } - - public var unstake: TW_Aptos_Proto_TortugaUnstake { - get { - if case .unstake(let v)? = liquidStakeTransactionPayload {return v} - return TW_Aptos_Proto_TortugaUnstake() - } - set {liquidStakeTransactionPayload = .unstake(newValue)} - } - - public var claim: TW_Aptos_Proto_TortugaClaim { - get { - if case .claim(let v)? = liquidStakeTransactionPayload {return v} - return TW_Aptos_Proto_TortugaClaim() - } - set {liquidStakeTransactionPayload = .claim(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_LiquidStakeTransactionPayload: Equatable { - case stake(TW_Aptos_Proto_TortugaStake) - case unstake(TW_Aptos_Proto_TortugaUnstake) - case claim(TW_Aptos_Proto_TortugaClaim) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Aptos_Proto_LiquidStaking.OneOf_LiquidStakeTransactionPayload, rhs: TW_Aptos_Proto_LiquidStaking.OneOf_LiquidStakeTransactionPayload) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.stake, .stake): return { - guard case .stake(let l) = lhs, case .stake(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.unstake, .unstake): return { - guard case .unstake(let l) = lhs, case .unstake(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.claim, .claim): return { - guard case .claim(let l) = lhs, case .claim(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -public struct TW_Aptos_Proto_NftMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var nftTransactionPayload: TW_Aptos_Proto_NftMessage.OneOf_NftTransactionPayload? = nil - - public var offerNft: TW_Aptos_Proto_OfferNftMessage { - get { - if case .offerNft(let v)? = nftTransactionPayload {return v} - return TW_Aptos_Proto_OfferNftMessage() - } - set {nftTransactionPayload = .offerNft(newValue)} - } - - public var cancelOfferNft: TW_Aptos_Proto_CancelOfferNftMessage { - get { - if case .cancelOfferNft(let v)? = nftTransactionPayload {return v} - return TW_Aptos_Proto_CancelOfferNftMessage() - } - set {nftTransactionPayload = .cancelOfferNft(newValue)} - } - - public var claimNft: TW_Aptos_Proto_ClaimNftMessage { - get { - if case .claimNft(let v)? = nftTransactionPayload {return v} - return TW_Aptos_Proto_ClaimNftMessage() - } - set {nftTransactionPayload = .claimNft(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_NftTransactionPayload: Equatable { - case offerNft(TW_Aptos_Proto_OfferNftMessage) - case cancelOfferNft(TW_Aptos_Proto_CancelOfferNftMessage) - case claimNft(TW_Aptos_Proto_ClaimNftMessage) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Aptos_Proto_NftMessage.OneOf_NftTransactionPayload, rhs: TW_Aptos_Proto_NftMessage.OneOf_NftTransactionPayload) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.offerNft, .offerNft): return { - guard case .offerNft(let l) = lhs, case .offerNft(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.cancelOfferNft, .cancelOfferNft): return { - guard case .cancelOfferNft(let l) = lhs, case .cancelOfferNft(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.claimNft, .claimNft): return { - guard case .claimNft(let l) = lhs, case .claimNft(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Aptos_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Sender Account address (string) - public var sender: String = String() - - /// Sequence number, incremented atomically for each tx present on the account, start at 0 (int64) - public var sequenceNumber: Int64 = 0 - - /// Max gas amount that the user is willing to pay (uint64) - public var maxGasAmount: UInt64 = 0 - - /// Gas unit price - queried through API (uint64) - public var gasUnitPrice: UInt64 = 0 - - /// Expiration timestamp for the transaction, can't be in the past (uint64) - public var expirationTimestampSecs: UInt64 = 0 - - /// Chain id 1 (mainnet) 32(devnet) (uint32 - casted in uint8_t later) - public var chainID: UInt32 = 0 - - /// Private key to sign the transaction (bytes) - public var privateKey: Data = Data() - - /// hex encoded function to sign, use it for smart contract approval (string) - public var anyEncoded: String = String() - - public var transactionPayload: TW_Aptos_Proto_SigningInput.OneOf_TransactionPayload? = nil - - public var transfer: TW_Aptos_Proto_TransferMessage { - get { - if case .transfer(let v)? = transactionPayload {return v} - return TW_Aptos_Proto_TransferMessage() - } - set {transactionPayload = .transfer(newValue)} - } - - public var tokenTransfer: TW_Aptos_Proto_TokenTransferMessage { - get { - if case .tokenTransfer(let v)? = transactionPayload {return v} - return TW_Aptos_Proto_TokenTransferMessage() - } - set {transactionPayload = .tokenTransfer(newValue)} - } - - public var createAccount: TW_Aptos_Proto_CreateAccountMessage { - get { - if case .createAccount(let v)? = transactionPayload {return v} - return TW_Aptos_Proto_CreateAccountMessage() - } - set {transactionPayload = .createAccount(newValue)} - } - - public var nftMessage: TW_Aptos_Proto_NftMessage { - get { - if case .nftMessage(let v)? = transactionPayload {return v} - return TW_Aptos_Proto_NftMessage() - } - set {transactionPayload = .nftMessage(newValue)} - } - - public var registerToken: TW_Aptos_Proto_ManagedTokensRegisterMessage { - get { - if case .registerToken(let v)? = transactionPayload {return v} - return TW_Aptos_Proto_ManagedTokensRegisterMessage() - } - set {transactionPayload = .registerToken(newValue)} - } - - public var liquidStakingMessage: TW_Aptos_Proto_LiquidStaking { - get { - if case .liquidStakingMessage(let v)? = transactionPayload {return v} - return TW_Aptos_Proto_LiquidStaking() - } - set {transactionPayload = .liquidStakingMessage(newValue)} - } - - public var tokenTransferCoins: TW_Aptos_Proto_TokenTransferCoinsMessage { - get { - if case .tokenTransferCoins(let v)? = transactionPayload {return v} - return TW_Aptos_Proto_TokenTransferCoinsMessage() - } - set {transactionPayload = .tokenTransferCoins(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_TransactionPayload: Equatable { - case transfer(TW_Aptos_Proto_TransferMessage) - case tokenTransfer(TW_Aptos_Proto_TokenTransferMessage) - case createAccount(TW_Aptos_Proto_CreateAccountMessage) - case nftMessage(TW_Aptos_Proto_NftMessage) - case registerToken(TW_Aptos_Proto_ManagedTokensRegisterMessage) - case liquidStakingMessage(TW_Aptos_Proto_LiquidStaking) - case tokenTransferCoins(TW_Aptos_Proto_TokenTransferCoinsMessage) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Aptos_Proto_SigningInput.OneOf_TransactionPayload, rhs: TW_Aptos_Proto_SigningInput.OneOf_TransactionPayload) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transfer, .transfer): return { - guard case .transfer(let l) = lhs, case .transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.tokenTransfer, .tokenTransfer): return { - guard case .tokenTransfer(let l) = lhs, case .tokenTransfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.createAccount, .createAccount): return { - guard case .createAccount(let l) = lhs, case .createAccount(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.nftMessage, .nftMessage): return { - guard case .nftMessage(let l) = lhs, case .nftMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.registerToken, .registerToken): return { - guard case .registerToken(let l) = lhs, case .registerToken(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.liquidStakingMessage, .liquidStakingMessage): return { - guard case .liquidStakingMessage(let l) = lhs, case .liquidStakingMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.tokenTransferCoins, .tokenTransferCoins): return { - guard case .tokenTransferCoins(let l) = lhs, case .tokenTransferCoins(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Information related to the signed transaction -public struct TW_Aptos_Proto_TransactionAuthenticator { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signature part of the signed transaction (bytes) - public var signature: Data = Data() - - /// Public key of the signer (bytes) - public var publicKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Transaction signing output. -public struct TW_Aptos_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - //// The raw transaction (bytes) - public var rawTxn: Data = Data() - - //// Public key and signature to authenticate - public var authenticator: TW_Aptos_Proto_TransactionAuthenticator { - get {return _authenticator ?? TW_Aptos_Proto_TransactionAuthenticator()} - set {_authenticator = newValue} - } - /// Returns true if `authenticator` has been explicitly set. - public var hasAuthenticator: Bool {return self._authenticator != nil} - /// Clears the value of `authenticator`. Subsequent reads from it will return its default value. - public mutating func clearAuthenticator() {self._authenticator = nil} - - //// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// Transaction json format for api broadcasting (string) - public var json: String = String() - - /// Error code, 0 is ok, other codes will be treated as errors. - public var error: TW_Common_Proto_SigningError = .ok - - /// Error description. - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _authenticator: TW_Aptos_Proto_TransactionAuthenticator? = nil -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Aptos.Proto" - -extension TW_Aptos_Proto_TransferMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransferMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "to"), - 2: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 1) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_TransferMessage, rhs: TW_Aptos_Proto_TransferMessage) -> Bool { - if lhs.to != rhs.to {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_StructTag: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".StructTag" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "account_address"), - 2: .same(proto: "module"), - 3: .same(proto: "name"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.accountAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.module) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.name) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.accountAddress.isEmpty { - try visitor.visitSingularStringField(value: self.accountAddress, fieldNumber: 1) - } - if !self.module.isEmpty { - try visitor.visitSingularStringField(value: self.module, fieldNumber: 2) - } - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_StructTag, rhs: TW_Aptos_Proto_StructTag) -> Bool { - if lhs.accountAddress != rhs.accountAddress {return false} - if lhs.module != rhs.module {return false} - if lhs.name != rhs.name {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_TokenTransferMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TokenTransferMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "to"), - 2: .same(proto: "amount"), - 3: .same(proto: "function"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._function) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 1) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 2) - } - try { if let v = self._function { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_TokenTransferMessage, rhs: TW_Aptos_Proto_TokenTransferMessage) -> Bool { - if lhs.to != rhs.to {return false} - if lhs.amount != rhs.amount {return false} - if lhs._function != rhs._function {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_TokenTransferCoinsMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TokenTransferCoinsMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "to"), - 2: .same(proto: "amount"), - 3: .same(proto: "function"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._function) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 1) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 2) - } - try { if let v = self._function { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_TokenTransferCoinsMessage, rhs: TW_Aptos_Proto_TokenTransferCoinsMessage) -> Bool { - if lhs.to != rhs.to {return false} - if lhs.amount != rhs.amount {return false} - if lhs._function != rhs._function {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_ManagedTokensRegisterMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ManagedTokensRegisterMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "function"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._function) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._function { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_ManagedTokensRegisterMessage, rhs: TW_Aptos_Proto_ManagedTokensRegisterMessage) -> Bool { - if lhs._function != rhs._function {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_CreateAccountMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CreateAccountMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "auth_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.authKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.authKey.isEmpty { - try visitor.visitSingularStringField(value: self.authKey, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_CreateAccountMessage, rhs: TW_Aptos_Proto_CreateAccountMessage) -> Bool { - if lhs.authKey != rhs.authKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_OfferNftMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OfferNftMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "receiver"), - 2: .same(proto: "creator"), - 3: .same(proto: "collectionName"), - 4: .same(proto: "name"), - 5: .standard(proto: "property_version"), - 6: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.receiver) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.creator) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.collectionName) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.propertyVersion) }() - case 6: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.receiver.isEmpty { - try visitor.visitSingularStringField(value: self.receiver, fieldNumber: 1) - } - if !self.creator.isEmpty { - try visitor.visitSingularStringField(value: self.creator, fieldNumber: 2) - } - if !self.collectionName.isEmpty { - try visitor.visitSingularStringField(value: self.collectionName, fieldNumber: 3) - } - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 4) - } - if self.propertyVersion != 0 { - try visitor.visitSingularUInt64Field(value: self.propertyVersion, fieldNumber: 5) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_OfferNftMessage, rhs: TW_Aptos_Proto_OfferNftMessage) -> Bool { - if lhs.receiver != rhs.receiver {return false} - if lhs.creator != rhs.creator {return false} - if lhs.collectionName != rhs.collectionName {return false} - if lhs.name != rhs.name {return false} - if lhs.propertyVersion != rhs.propertyVersion {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_CancelOfferNftMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CancelOfferNftMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "receiver"), - 2: .same(proto: "creator"), - 3: .same(proto: "collectionName"), - 4: .same(proto: "name"), - 5: .standard(proto: "property_version"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.receiver) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.creator) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.collectionName) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.propertyVersion) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.receiver.isEmpty { - try visitor.visitSingularStringField(value: self.receiver, fieldNumber: 1) - } - if !self.creator.isEmpty { - try visitor.visitSingularStringField(value: self.creator, fieldNumber: 2) - } - if !self.collectionName.isEmpty { - try visitor.visitSingularStringField(value: self.collectionName, fieldNumber: 3) - } - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 4) - } - if self.propertyVersion != 0 { - try visitor.visitSingularUInt64Field(value: self.propertyVersion, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_CancelOfferNftMessage, rhs: TW_Aptos_Proto_CancelOfferNftMessage) -> Bool { - if lhs.receiver != rhs.receiver {return false} - if lhs.creator != rhs.creator {return false} - if lhs.collectionName != rhs.collectionName {return false} - if lhs.name != rhs.name {return false} - if lhs.propertyVersion != rhs.propertyVersion {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_ClaimNftMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ClaimNftMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "sender"), - 2: .same(proto: "creator"), - 3: .same(proto: "collectionName"), - 4: .same(proto: "name"), - 5: .standard(proto: "property_version"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.sender) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.creator) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.collectionName) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.propertyVersion) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.sender.isEmpty { - try visitor.visitSingularStringField(value: self.sender, fieldNumber: 1) - } - if !self.creator.isEmpty { - try visitor.visitSingularStringField(value: self.creator, fieldNumber: 2) - } - if !self.collectionName.isEmpty { - try visitor.visitSingularStringField(value: self.collectionName, fieldNumber: 3) - } - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 4) - } - if self.propertyVersion != 0 { - try visitor.visitSingularUInt64Field(value: self.propertyVersion, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_ClaimNftMessage, rhs: TW_Aptos_Proto_ClaimNftMessage) -> Bool { - if lhs.sender != rhs.sender {return false} - if lhs.creator != rhs.creator {return false} - if lhs.collectionName != rhs.collectionName {return false} - if lhs.name != rhs.name {return false} - if lhs.propertyVersion != rhs.propertyVersion {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_TortugaClaim: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TortugaClaim" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "idx"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.idx) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.idx != 0 { - try visitor.visitSingularUInt64Field(value: self.idx, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_TortugaClaim, rhs: TW_Aptos_Proto_TortugaClaim) -> Bool { - if lhs.idx != rhs.idx {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_TortugaStake: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TortugaStake" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_TortugaStake, rhs: TW_Aptos_Proto_TortugaStake) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_TortugaUnstake: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TortugaUnstake" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_TortugaUnstake, rhs: TW_Aptos_Proto_TortugaUnstake) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_LiquidStaking: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".LiquidStaking" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "smart_contract_address"), - 2: .same(proto: "stake"), - 3: .same(proto: "unstake"), - 4: .same(proto: "claim"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.smartContractAddress) }() - case 2: try { - var v: TW_Aptos_Proto_TortugaStake? - var hadOneofValue = false - if let current = self.liquidStakeTransactionPayload { - hadOneofValue = true - if case .stake(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.liquidStakeTransactionPayload = .stake(v) - } - }() - case 3: try { - var v: TW_Aptos_Proto_TortugaUnstake? - var hadOneofValue = false - if let current = self.liquidStakeTransactionPayload { - hadOneofValue = true - if case .unstake(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.liquidStakeTransactionPayload = .unstake(v) - } - }() - case 4: try { - var v: TW_Aptos_Proto_TortugaClaim? - var hadOneofValue = false - if let current = self.liquidStakeTransactionPayload { - hadOneofValue = true - if case .claim(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.liquidStakeTransactionPayload = .claim(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.smartContractAddress.isEmpty { - try visitor.visitSingularStringField(value: self.smartContractAddress, fieldNumber: 1) - } - switch self.liquidStakeTransactionPayload { - case .stake?: try { - guard case .stake(let v)? = self.liquidStakeTransactionPayload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .unstake?: try { - guard case .unstake(let v)? = self.liquidStakeTransactionPayload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .claim?: try { - guard case .claim(let v)? = self.liquidStakeTransactionPayload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_LiquidStaking, rhs: TW_Aptos_Proto_LiquidStaking) -> Bool { - if lhs.smartContractAddress != rhs.smartContractAddress {return false} - if lhs.liquidStakeTransactionPayload != rhs.liquidStakeTransactionPayload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_NftMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".NftMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "offer_nft"), - 2: .standard(proto: "cancel_offer_nft"), - 3: .standard(proto: "claim_nft"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_Aptos_Proto_OfferNftMessage? - var hadOneofValue = false - if let current = self.nftTransactionPayload { - hadOneofValue = true - if case .offerNft(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.nftTransactionPayload = .offerNft(v) - } - }() - case 2: try { - var v: TW_Aptos_Proto_CancelOfferNftMessage? - var hadOneofValue = false - if let current = self.nftTransactionPayload { - hadOneofValue = true - if case .cancelOfferNft(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.nftTransactionPayload = .cancelOfferNft(v) - } - }() - case 3: try { - var v: TW_Aptos_Proto_ClaimNftMessage? - var hadOneofValue = false - if let current = self.nftTransactionPayload { - hadOneofValue = true - if case .claimNft(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.nftTransactionPayload = .claimNft(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.nftTransactionPayload { - case .offerNft?: try { - guard case .offerNft(let v)? = self.nftTransactionPayload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .cancelOfferNft?: try { - guard case .cancelOfferNft(let v)? = self.nftTransactionPayload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .claimNft?: try { - guard case .claimNft(let v)? = self.nftTransactionPayload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_NftMessage, rhs: TW_Aptos_Proto_NftMessage) -> Bool { - if lhs.nftTransactionPayload != rhs.nftTransactionPayload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "sender"), - 2: .standard(proto: "sequence_number"), - 3: .standard(proto: "max_gas_amount"), - 4: .standard(proto: "gas_unit_price"), - 5: .standard(proto: "expiration_timestamp_secs"), - 6: .standard(proto: "chain_id"), - 7: .standard(proto: "private_key"), - 8: .standard(proto: "any_encoded"), - 9: .same(proto: "transfer"), - 10: .standard(proto: "token_transfer"), - 11: .standard(proto: "create_account"), - 12: .standard(proto: "nft_message"), - 13: .standard(proto: "register_token"), - 14: .standard(proto: "liquid_staking_message"), - 15: .standard(proto: "token_transfer_coins"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.sender) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.sequenceNumber) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.maxGasAmount) }() - case 4: try { try decoder.decodeSingularUInt64Field(value: &self.gasUnitPrice) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.expirationTimestampSecs) }() - case 6: try { try decoder.decodeSingularUInt32Field(value: &self.chainID) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 8: try { try decoder.decodeSingularStringField(value: &self.anyEncoded) }() - case 9: try { - var v: TW_Aptos_Proto_TransferMessage? - var hadOneofValue = false - if let current = self.transactionPayload { - hadOneofValue = true - if case .transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionPayload = .transfer(v) - } - }() - case 10: try { - var v: TW_Aptos_Proto_TokenTransferMessage? - var hadOneofValue = false - if let current = self.transactionPayload { - hadOneofValue = true - if case .tokenTransfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionPayload = .tokenTransfer(v) - } - }() - case 11: try { - var v: TW_Aptos_Proto_CreateAccountMessage? - var hadOneofValue = false - if let current = self.transactionPayload { - hadOneofValue = true - if case .createAccount(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionPayload = .createAccount(v) - } - }() - case 12: try { - var v: TW_Aptos_Proto_NftMessage? - var hadOneofValue = false - if let current = self.transactionPayload { - hadOneofValue = true - if case .nftMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionPayload = .nftMessage(v) - } - }() - case 13: try { - var v: TW_Aptos_Proto_ManagedTokensRegisterMessage? - var hadOneofValue = false - if let current = self.transactionPayload { - hadOneofValue = true - if case .registerToken(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionPayload = .registerToken(v) - } - }() - case 14: try { - var v: TW_Aptos_Proto_LiquidStaking? - var hadOneofValue = false - if let current = self.transactionPayload { - hadOneofValue = true - if case .liquidStakingMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionPayload = .liquidStakingMessage(v) - } - }() - case 15: try { - var v: TW_Aptos_Proto_TokenTransferCoinsMessage? - var hadOneofValue = false - if let current = self.transactionPayload { - hadOneofValue = true - if case .tokenTransferCoins(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionPayload = .tokenTransferCoins(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.sender.isEmpty { - try visitor.visitSingularStringField(value: self.sender, fieldNumber: 1) - } - if self.sequenceNumber != 0 { - try visitor.visitSingularInt64Field(value: self.sequenceNumber, fieldNumber: 2) - } - if self.maxGasAmount != 0 { - try visitor.visitSingularUInt64Field(value: self.maxGasAmount, fieldNumber: 3) - } - if self.gasUnitPrice != 0 { - try visitor.visitSingularUInt64Field(value: self.gasUnitPrice, fieldNumber: 4) - } - if self.expirationTimestampSecs != 0 { - try visitor.visitSingularUInt64Field(value: self.expirationTimestampSecs, fieldNumber: 5) - } - if self.chainID != 0 { - try visitor.visitSingularUInt32Field(value: self.chainID, fieldNumber: 6) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 7) - } - if !self.anyEncoded.isEmpty { - try visitor.visitSingularStringField(value: self.anyEncoded, fieldNumber: 8) - } - switch self.transactionPayload { - case .transfer?: try { - guard case .transfer(let v)? = self.transactionPayload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case .tokenTransfer?: try { - guard case .tokenTransfer(let v)? = self.transactionPayload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - }() - case .createAccount?: try { - guard case .createAccount(let v)? = self.transactionPayload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - }() - case .nftMessage?: try { - guard case .nftMessage(let v)? = self.transactionPayload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - }() - case .registerToken?: try { - guard case .registerToken(let v)? = self.transactionPayload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 13) - }() - case .liquidStakingMessage?: try { - guard case .liquidStakingMessage(let v)? = self.transactionPayload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 14) - }() - case .tokenTransferCoins?: try { - guard case .tokenTransferCoins(let v)? = self.transactionPayload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_SigningInput, rhs: TW_Aptos_Proto_SigningInput) -> Bool { - if lhs.sender != rhs.sender {return false} - if lhs.sequenceNumber != rhs.sequenceNumber {return false} - if lhs.maxGasAmount != rhs.maxGasAmount {return false} - if lhs.gasUnitPrice != rhs.gasUnitPrice {return false} - if lhs.expirationTimestampSecs != rhs.expirationTimestampSecs {return false} - if lhs.chainID != rhs.chainID {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.anyEncoded != rhs.anyEncoded {return false} - if lhs.transactionPayload != rhs.transactionPayload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_TransactionAuthenticator: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionAuthenticator" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "signature"), - 2: .standard(proto: "public_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 1) - } - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_TransactionAuthenticator, rhs: TW_Aptos_Proto_TransactionAuthenticator) -> Bool { - if lhs.signature != rhs.signature {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Aptos_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "raw_txn"), - 2: .same(proto: "authenticator"), - 3: .same(proto: "encoded"), - 4: .same(proto: "json"), - 5: .same(proto: "error"), - 6: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.rawTxn) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._authenticator) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.json) }() - case 5: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.rawTxn.isEmpty { - try visitor.visitSingularBytesField(value: self.rawTxn, fieldNumber: 1) - } - try { if let v = self._authenticator { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 3) - } - if !self.json.isEmpty { - try visitor.visitSingularStringField(value: self.json, fieldNumber: 4) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 5) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Aptos_Proto_SigningOutput, rhs: TW_Aptos_Proto_SigningOutput) -> Bool { - if lhs.rawTxn != rhs.rawTxn {return false} - if lhs._authenticator != rhs._authenticator {return false} - if lhs.encoded != rhs.encoded {return false} - if lhs.json != rhs.json {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Barz+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Barz+Proto.swift deleted file mode 100644 index 3b45aa7b..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Barz+Proto.swift +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias BarzContractAddressInput = TW_Barz_Proto_ContractAddressInput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Barz.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Barz.pb.swift deleted file mode 100644 index 5d70e55a..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Barz.pb.swift +++ /dev/null @@ -1,146 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Barz.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Input parameters for calculating a counterfactual address for ERC-4337 based smart contract wallet -public struct TW_Barz_Proto_ContractAddressInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// ERC-4337 entry point - public var entryPoint: String = String() - - /// Address of the contract factory - public var factory: String = String() - - /// Diamond proxy facets required for the contract setup - public var accountFacet: String = String() - - public var verificationFacet: String = String() - - public var facetRegistry: String = String() - - public var defaultFallback: String = String() - - /// Bytecode of the smart contract to deploy - public var bytecode: String = String() - - /// PublicKey of the wallet - public var publicKey: String = String() - - /// Salt is used to derive multiple account from the same public key - public var salt: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Barz.Proto" - -extension TW_Barz_Proto_ContractAddressInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ContractAddressInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "entry_point"), - 2: .same(proto: "factory"), - 3: .standard(proto: "account_facet"), - 4: .standard(proto: "verification_facet"), - 5: .standard(proto: "facet_registry"), - 6: .standard(proto: "default_fallback"), - 7: .same(proto: "bytecode"), - 8: .standard(proto: "public_key"), - 9: .same(proto: "salt"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.entryPoint) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.factory) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.accountFacet) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.verificationFacet) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.facetRegistry) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.defaultFallback) }() - case 7: try { try decoder.decodeSingularStringField(value: &self.bytecode) }() - case 8: try { try decoder.decodeSingularStringField(value: &self.publicKey) }() - case 9: try { try decoder.decodeSingularUInt32Field(value: &self.salt) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.entryPoint.isEmpty { - try visitor.visitSingularStringField(value: self.entryPoint, fieldNumber: 1) - } - if !self.factory.isEmpty { - try visitor.visitSingularStringField(value: self.factory, fieldNumber: 2) - } - if !self.accountFacet.isEmpty { - try visitor.visitSingularStringField(value: self.accountFacet, fieldNumber: 3) - } - if !self.verificationFacet.isEmpty { - try visitor.visitSingularStringField(value: self.verificationFacet, fieldNumber: 4) - } - if !self.facetRegistry.isEmpty { - try visitor.visitSingularStringField(value: self.facetRegistry, fieldNumber: 5) - } - if !self.defaultFallback.isEmpty { - try visitor.visitSingularStringField(value: self.defaultFallback, fieldNumber: 6) - } - if !self.bytecode.isEmpty { - try visitor.visitSingularStringField(value: self.bytecode, fieldNumber: 7) - } - if !self.publicKey.isEmpty { - try visitor.visitSingularStringField(value: self.publicKey, fieldNumber: 8) - } - if self.salt != 0 { - try visitor.visitSingularUInt32Field(value: self.salt, fieldNumber: 9) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Barz_Proto_ContractAddressInput, rhs: TW_Barz_Proto_ContractAddressInput) -> Bool { - if lhs.entryPoint != rhs.entryPoint {return false} - if lhs.factory != rhs.factory {return false} - if lhs.accountFacet != rhs.accountFacet {return false} - if lhs.verificationFacet != rhs.verificationFacet {return false} - if lhs.facetRegistry != rhs.facetRegistry {return false} - if lhs.defaultFallback != rhs.defaultFallback {return false} - if lhs.bytecode != rhs.bytecode {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.salt != rhs.salt {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Binance+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Binance+Proto.swift deleted file mode 100644 index f1ae8727..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Binance+Proto.swift +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias BinanceTransaction = TW_Binance_Proto_Transaction -public typealias BinanceSignature = TW_Binance_Proto_Signature -public typealias BinanceTradeOrder = TW_Binance_Proto_TradeOrder -public typealias BinanceCancelTradeOrder = TW_Binance_Proto_CancelTradeOrder -public typealias BinanceSendOrder = TW_Binance_Proto_SendOrder -public typealias BinanceTokenIssueOrder = TW_Binance_Proto_TokenIssueOrder -public typealias BinanceTokenMintOrder = TW_Binance_Proto_TokenMintOrder -public typealias BinanceTokenBurnOrder = TW_Binance_Proto_TokenBurnOrder -public typealias BinanceTokenFreezeOrder = TW_Binance_Proto_TokenFreezeOrder -public typealias BinanceTokenUnfreezeOrder = TW_Binance_Proto_TokenUnfreezeOrder -public typealias BinanceHTLTOrder = TW_Binance_Proto_HTLTOrder -public typealias BinanceDepositHTLTOrder = TW_Binance_Proto_DepositHTLTOrder -public typealias BinanceClaimHTLOrder = TW_Binance_Proto_ClaimHTLOrder -public typealias BinanceRefundHTLTOrder = TW_Binance_Proto_RefundHTLTOrder -public typealias BinanceTransferOut = TW_Binance_Proto_TransferOut -public typealias BinanceSideChainDelegate = TW_Binance_Proto_SideChainDelegate -public typealias BinanceSideChainRedelegate = TW_Binance_Proto_SideChainRedelegate -public typealias BinanceSideChainUndelegate = TW_Binance_Proto_SideChainUndelegate -public typealias BinanceTimeLockOrder = TW_Binance_Proto_TimeLockOrder -public typealias BinanceTimeRelockOrder = TW_Binance_Proto_TimeRelockOrder -public typealias BinanceTimeUnlockOrder = TW_Binance_Proto_TimeUnlockOrder -public typealias BinanceSigningInput = TW_Binance_Proto_SigningInput -public typealias BinanceSigningOutput = TW_Binance_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Binance.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Binance.pb.swift deleted file mode 100644 index eeeadd79..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Binance.pb.swift +++ /dev/null @@ -1,2542 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Binance.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Transaction structure, used internally -public struct TW_Binance_Proto_Transaction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// array of size 1, containing the transaction message, which are one of the transaction type below - public var msgs: [Data] = [] - - /// array of size 1, containing the standard signature structure of the transaction sender - public var signatures: [Data] = [] - - /// a short sentence of remark for the transaction, only for `Transfer` transactions. - public var memo: String = String() - - /// an identifier for tools triggering this transaction, set to zero if unwilling to disclose. - public var source: Int64 = 0 - - /// reserved for future use - public var data: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Signature structure, used internally -public struct TW_Binance_Proto_Signature { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// public key bytes of the signer address - public var pubKey: Data = Data() - - /// signature bytes, please check chain access section for signature generation - public var signature: Data = Data() - - /// another identifier of signer, which can be read from chain by account REST API or RPC - public var accountNumber: Int64 = 0 - - /// sequence number for the next transaction - public var sequence: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for Trade order -public struct TW_Binance_Proto_TradeOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// originating address - public var sender: Data = Data() - - /// order id, optional - public var id: String = String() - - /// symbol for trading pair in full name of the tokens - public var symbol: String = String() - - /// only accept 2 for now, meaning limit order - public var ordertype: Int64 = 0 - - /// 1 for buy and 2 for sell - public var side: Int64 = 0 - - /// price of the order, which is the real price multiplied by 1e8 (10^8) and rounded to integer - public var price: Int64 = 0 - - /// quantity of the order, which is the real price multiplied by 1e8 (10^8) and rounded to integer - public var quantity: Int64 = 0 - - /// 1 for Good Till Expire(GTE) order and 3 for Immediate Or Cancel (IOC) - public var timeinforce: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for CancelTrade order -public struct TW_Binance_Proto_CancelTradeOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// originating address - public var sender: Data = Data() - - /// symbol for trading pair in full name of the tokens - public var symbol: String = String() - - /// order id to cancel - public var refid: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for Send order -public struct TW_Binance_Proto_SendOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Send inputs - public var inputs: [TW_Binance_Proto_SendOrder.Input] = [] - - /// Send outputs - public var outputs: [TW_Binance_Proto_SendOrder.Output] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// A token amount, symbol-amount pair. Could be moved out of SendOrder; kept here for backward compatibility. - public struct Token { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Token ID - public var denom: String = String() - - /// Amount - public var amount: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// Transaction input - public struct Input { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// source address - public var address: Data = Data() - - /// input coin amounts - public var coins: [TW_Binance_Proto_SendOrder.Token] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// Transaction output - public struct Output { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// destination address - public var address: Data = Data() - - /// output coin amounts - public var coins: [TW_Binance_Proto_SendOrder.Token] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public init() {} -} - -/// Message for TokenIssue order -public struct TW_Binance_Proto_TokenIssueOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// owner address - public var from: Data = Data() - - /// token name - public var name: String = String() - - /// token symbol, in full name with "-" suffix - public var symbol: String = String() - - /// total supply - public var totalSupply: Int64 = 0 - - /// mintable - public var mintable: Bool = false - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for TokenMint order -public struct TW_Binance_Proto_TokenMintOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// owner address - public var from: Data = Data() - - /// token symbol, in full name with "-" suffix - public var symbol: String = String() - - /// amount to mint - public var amount: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for TokenBurn order -public struct TW_Binance_Proto_TokenBurnOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// owner address - public var from: Data = Data() - - /// token symbol, in full name with "-" suffix - public var symbol: String = String() - - /// amount to burn - public var amount: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for TokenFreeze order -public struct TW_Binance_Proto_TokenFreezeOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// owner address - public var from: Data = Data() - - /// token symbol, in full name with "-" suffix - public var symbol: String = String() - - /// amount of token to freeze - public var amount: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for TokenUnfreeze order -public struct TW_Binance_Proto_TokenUnfreezeOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// owner address - public var from: Data = Data() - - /// token symbol, in full name with "-" suffix - public var symbol: String = String() - - /// amount of token to unfreeze - public var amount: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for HashTimeLock order -public struct TW_Binance_Proto_HTLTOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// signer address - public var from: Data = Data() - - /// recipient address - public var to: Data = Data() - - /// source on other chain, optional - public var recipientOtherChain: String = String() - - /// recipient on other chain, optional - public var senderOtherChain: String = String() - - /// hash of a random number and timestamp, based on SHA256 - public var randomNumberHash: Data = Data() - - /// timestamp - public var timestamp: Int64 = 0 - - /// amounts - public var amount: [TW_Binance_Proto_SendOrder.Token] = [] - - /// expected gained token on the other chain - public var expectedIncome: String = String() - - /// period expressed in block heights - public var heightSpan: Int64 = 0 - - /// set for cross-chain send - public var crossChain: Bool = false - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for Deposit HTLT order -public struct TW_Binance_Proto_DepositHTLTOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// signer address - public var from: Data = Data() - - /// amounts - public var amount: [TW_Binance_Proto_SendOrder.Token] = [] - - /// swap ID - public var swapID: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for Claim HTLT order -public struct TW_Binance_Proto_ClaimHTLOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// signer address - public var from: Data = Data() - - /// swap ID - public var swapID: Data = Data() - - /// random number input - public var randomNumber: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for Refund HTLT order -public struct TW_Binance_Proto_RefundHTLTOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// signer address - public var from: Data = Data() - - /// swap ID - public var swapID: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Transfer -public struct TW_Binance_Proto_TransferOut { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// source address - public var from: Data = Data() - - /// recipient address - public var to: Data = Data() - - /// transfer amount - public var amount: TW_Binance_Proto_SendOrder.Token { - get {return _amount ?? TW_Binance_Proto_SendOrder.Token()} - set {_amount = newValue} - } - /// Returns true if `amount` has been explicitly set. - public var hasAmount: Bool {return self._amount != nil} - /// Clears the value of `amount`. Subsequent reads from it will return its default value. - public mutating func clearAmount() {self._amount = nil} - - /// expiration time - public var expireTime: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _amount: TW_Binance_Proto_SendOrder.Token? = nil -} - -public struct TW_Binance_Proto_SideChainDelegate { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var delegatorAddr: Data = Data() - - public var validatorAddr: Data = Data() - - public var delegation: TW_Binance_Proto_SendOrder.Token { - get {return _delegation ?? TW_Binance_Proto_SendOrder.Token()} - set {_delegation = newValue} - } - /// Returns true if `delegation` has been explicitly set. - public var hasDelegation: Bool {return self._delegation != nil} - /// Clears the value of `delegation`. Subsequent reads from it will return its default value. - public mutating func clearDelegation() {self._delegation = nil} - - public var chainID: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _delegation: TW_Binance_Proto_SendOrder.Token? = nil -} - -public struct TW_Binance_Proto_SideChainRedelegate { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var delegatorAddr: Data = Data() - - public var validatorSrcAddr: Data = Data() - - public var validatorDstAddr: Data = Data() - - public var amount: TW_Binance_Proto_SendOrder.Token { - get {return _amount ?? TW_Binance_Proto_SendOrder.Token()} - set {_amount = newValue} - } - /// Returns true if `amount` has been explicitly set. - public var hasAmount: Bool {return self._amount != nil} - /// Clears the value of `amount`. Subsequent reads from it will return its default value. - public mutating func clearAmount() {self._amount = nil} - - public var chainID: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _amount: TW_Binance_Proto_SendOrder.Token? = nil -} - -public struct TW_Binance_Proto_SideChainUndelegate { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var delegatorAddr: Data = Data() - - public var validatorAddr: Data = Data() - - public var amount: TW_Binance_Proto_SendOrder.Token { - get {return _amount ?? TW_Binance_Proto_SendOrder.Token()} - set {_amount = newValue} - } - /// Returns true if `amount` has been explicitly set. - public var hasAmount: Bool {return self._amount != nil} - /// Clears the value of `amount`. Subsequent reads from it will return its default value. - public mutating func clearAmount() {self._amount = nil} - - public var chainID: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _amount: TW_Binance_Proto_SendOrder.Token? = nil -} - -/// Message for TimeLock order -public struct TW_Binance_Proto_TimeLockOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// owner address - public var fromAddress: Data = Data() - - /// Description (optional) - public var description_p: String = String() - - /// Array of symbol/amount pairs. see SDK https://github.com/binance-chain/javascript-sdk/blob/master/docs/api-docs/classes/tokenmanagement.md#timelock - public var amount: [TW_Binance_Proto_SendOrder.Token] = [] - - /// lock time - public var lockTime: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for TimeRelock order -public struct TW_Binance_Proto_TimeRelockOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// owner address - public var fromAddress: Data = Data() - - /// order ID - public var id: Int64 = 0 - - /// Description (optional) - public var description_p: String = String() - - /// Array of symbol/amount pairs. - public var amount: [TW_Binance_Proto_SendOrder.Token] = [] - - /// lock time - public var lockTime: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for TimeUnlock order -public struct TW_Binance_Proto_TimeUnlockOrder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// owner address - public var fromAddress: Data = Data() - - /// order ID - public var id: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Binance_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Chain ID - public var chainID: String = String() - - /// Source account number - public var accountNumber: Int64 = 0 - - /// Sequence number (account specific) - public var sequence: Int64 = 0 - - /// Transaction source, see https://github.com/bnb-chain/BEPs/blob/master/BEP10.md - /// Some important values: - /// 0: Default source value (e.g. for Binance Chain Command Line, or SDKs) - /// 1: Binance DEX Web Wallet - /// 2: Trust Wallet - public var source: Int64 = 0 - - /// Optional memo - public var memo: String = String() - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Payload message - public var orderOneof: TW_Binance_Proto_SigningInput.OneOf_OrderOneof? = nil - - public var tradeOrder: TW_Binance_Proto_TradeOrder { - get { - if case .tradeOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_TradeOrder() - } - set {orderOneof = .tradeOrder(newValue)} - } - - public var cancelTradeOrder: TW_Binance_Proto_CancelTradeOrder { - get { - if case .cancelTradeOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_CancelTradeOrder() - } - set {orderOneof = .cancelTradeOrder(newValue)} - } - - public var sendOrder: TW_Binance_Proto_SendOrder { - get { - if case .sendOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_SendOrder() - } - set {orderOneof = .sendOrder(newValue)} - } - - public var freezeOrder: TW_Binance_Proto_TokenFreezeOrder { - get { - if case .freezeOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_TokenFreezeOrder() - } - set {orderOneof = .freezeOrder(newValue)} - } - - public var unfreezeOrder: TW_Binance_Proto_TokenUnfreezeOrder { - get { - if case .unfreezeOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_TokenUnfreezeOrder() - } - set {orderOneof = .unfreezeOrder(newValue)} - } - - public var htltOrder: TW_Binance_Proto_HTLTOrder { - get { - if case .htltOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_HTLTOrder() - } - set {orderOneof = .htltOrder(newValue)} - } - - public var depositHtltOrder: TW_Binance_Proto_DepositHTLTOrder { - get { - if case .depositHtltOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_DepositHTLTOrder() - } - set {orderOneof = .depositHtltOrder(newValue)} - } - - public var claimHtltOrder: TW_Binance_Proto_ClaimHTLOrder { - get { - if case .claimHtltOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_ClaimHTLOrder() - } - set {orderOneof = .claimHtltOrder(newValue)} - } - - public var refundHtltOrder: TW_Binance_Proto_RefundHTLTOrder { - get { - if case .refundHtltOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_RefundHTLTOrder() - } - set {orderOneof = .refundHtltOrder(newValue)} - } - - public var issueOrder: TW_Binance_Proto_TokenIssueOrder { - get { - if case .issueOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_TokenIssueOrder() - } - set {orderOneof = .issueOrder(newValue)} - } - - public var mintOrder: TW_Binance_Proto_TokenMintOrder { - get { - if case .mintOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_TokenMintOrder() - } - set {orderOneof = .mintOrder(newValue)} - } - - public var burnOrder: TW_Binance_Proto_TokenBurnOrder { - get { - if case .burnOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_TokenBurnOrder() - } - set {orderOneof = .burnOrder(newValue)} - } - - public var transferOutOrder: TW_Binance_Proto_TransferOut { - get { - if case .transferOutOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_TransferOut() - } - set {orderOneof = .transferOutOrder(newValue)} - } - - public var sideDelegateOrder: TW_Binance_Proto_SideChainDelegate { - get { - if case .sideDelegateOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_SideChainDelegate() - } - set {orderOneof = .sideDelegateOrder(newValue)} - } - - public var sideRedelegateOrder: TW_Binance_Proto_SideChainRedelegate { - get { - if case .sideRedelegateOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_SideChainRedelegate() - } - set {orderOneof = .sideRedelegateOrder(newValue)} - } - - public var sideUndelegateOrder: TW_Binance_Proto_SideChainUndelegate { - get { - if case .sideUndelegateOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_SideChainUndelegate() - } - set {orderOneof = .sideUndelegateOrder(newValue)} - } - - public var timeLockOrder: TW_Binance_Proto_TimeLockOrder { - get { - if case .timeLockOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_TimeLockOrder() - } - set {orderOneof = .timeLockOrder(newValue)} - } - - public var timeRelockOrder: TW_Binance_Proto_TimeRelockOrder { - get { - if case .timeRelockOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_TimeRelockOrder() - } - set {orderOneof = .timeRelockOrder(newValue)} - } - - public var timeUnlockOrder: TW_Binance_Proto_TimeUnlockOrder { - get { - if case .timeUnlockOrder(let v)? = orderOneof {return v} - return TW_Binance_Proto_TimeUnlockOrder() - } - set {orderOneof = .timeUnlockOrder(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Payload message - public enum OneOf_OrderOneof: Equatable { - case tradeOrder(TW_Binance_Proto_TradeOrder) - case cancelTradeOrder(TW_Binance_Proto_CancelTradeOrder) - case sendOrder(TW_Binance_Proto_SendOrder) - case freezeOrder(TW_Binance_Proto_TokenFreezeOrder) - case unfreezeOrder(TW_Binance_Proto_TokenUnfreezeOrder) - case htltOrder(TW_Binance_Proto_HTLTOrder) - case depositHtltOrder(TW_Binance_Proto_DepositHTLTOrder) - case claimHtltOrder(TW_Binance_Proto_ClaimHTLOrder) - case refundHtltOrder(TW_Binance_Proto_RefundHTLTOrder) - case issueOrder(TW_Binance_Proto_TokenIssueOrder) - case mintOrder(TW_Binance_Proto_TokenMintOrder) - case burnOrder(TW_Binance_Proto_TokenBurnOrder) - case transferOutOrder(TW_Binance_Proto_TransferOut) - case sideDelegateOrder(TW_Binance_Proto_SideChainDelegate) - case sideRedelegateOrder(TW_Binance_Proto_SideChainRedelegate) - case sideUndelegateOrder(TW_Binance_Proto_SideChainUndelegate) - case timeLockOrder(TW_Binance_Proto_TimeLockOrder) - case timeRelockOrder(TW_Binance_Proto_TimeRelockOrder) - case timeUnlockOrder(TW_Binance_Proto_TimeUnlockOrder) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Binance_Proto_SigningInput.OneOf_OrderOneof, rhs: TW_Binance_Proto_SigningInput.OneOf_OrderOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.tradeOrder, .tradeOrder): return { - guard case .tradeOrder(let l) = lhs, case .tradeOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.cancelTradeOrder, .cancelTradeOrder): return { - guard case .cancelTradeOrder(let l) = lhs, case .cancelTradeOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.sendOrder, .sendOrder): return { - guard case .sendOrder(let l) = lhs, case .sendOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.freezeOrder, .freezeOrder): return { - guard case .freezeOrder(let l) = lhs, case .freezeOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.unfreezeOrder, .unfreezeOrder): return { - guard case .unfreezeOrder(let l) = lhs, case .unfreezeOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.htltOrder, .htltOrder): return { - guard case .htltOrder(let l) = lhs, case .htltOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.depositHtltOrder, .depositHtltOrder): return { - guard case .depositHtltOrder(let l) = lhs, case .depositHtltOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.claimHtltOrder, .claimHtltOrder): return { - guard case .claimHtltOrder(let l) = lhs, case .claimHtltOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.refundHtltOrder, .refundHtltOrder): return { - guard case .refundHtltOrder(let l) = lhs, case .refundHtltOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.issueOrder, .issueOrder): return { - guard case .issueOrder(let l) = lhs, case .issueOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.mintOrder, .mintOrder): return { - guard case .mintOrder(let l) = lhs, case .mintOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.burnOrder, .burnOrder): return { - guard case .burnOrder(let l) = lhs, case .burnOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.transferOutOrder, .transferOutOrder): return { - guard case .transferOutOrder(let l) = lhs, case .transferOutOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.sideDelegateOrder, .sideDelegateOrder): return { - guard case .sideDelegateOrder(let l) = lhs, case .sideDelegateOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.sideRedelegateOrder, .sideRedelegateOrder): return { - guard case .sideRedelegateOrder(let l) = lhs, case .sideRedelegateOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.sideUndelegateOrder, .sideUndelegateOrder): return { - guard case .sideUndelegateOrder(let l) = lhs, case .sideUndelegateOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.timeLockOrder, .timeLockOrder): return { - guard case .timeLockOrder(let l) = lhs, case .timeLockOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.timeRelockOrder, .timeRelockOrder): return { - guard case .timeRelockOrder(let l) = lhs, case .timeRelockOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.timeUnlockOrder, .timeUnlockOrder): return { - guard case .timeUnlockOrder(let l) = lhs, case .timeUnlockOrder(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Binance_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// OK (=0) or other codes in case of error - public var error: TW_Common_Proto_SigningError = .ok - - /// error description in case of error - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Binance.Proto" - -extension TW_Binance_Proto_Transaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transaction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "msgs"), - 2: .same(proto: "signatures"), - 3: .same(proto: "memo"), - 4: .same(proto: "source"), - 5: .same(proto: "data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedBytesField(value: &self.msgs) }() - case 2: try { try decoder.decodeRepeatedBytesField(value: &self.signatures) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.memo) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.source) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.data) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.msgs.isEmpty { - try visitor.visitRepeatedBytesField(value: self.msgs, fieldNumber: 1) - } - if !self.signatures.isEmpty { - try visitor.visitRepeatedBytesField(value: self.signatures, fieldNumber: 2) - } - if !self.memo.isEmpty { - try visitor.visitSingularStringField(value: self.memo, fieldNumber: 3) - } - if self.source != 0 { - try visitor.visitSingularInt64Field(value: self.source, fieldNumber: 4) - } - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_Transaction, rhs: TW_Binance_Proto_Transaction) -> Bool { - if lhs.msgs != rhs.msgs {return false} - if lhs.signatures != rhs.signatures {return false} - if lhs.memo != rhs.memo {return false} - if lhs.source != rhs.source {return false} - if lhs.data != rhs.data {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_Signature: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Signature" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "pub_key"), - 2: .same(proto: "signature"), - 3: .standard(proto: "account_number"), - 4: .same(proto: "sequence"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.pubKey) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.accountNumber) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.sequence) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.pubKey.isEmpty { - try visitor.visitSingularBytesField(value: self.pubKey, fieldNumber: 1) - } - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 2) - } - if self.accountNumber != 0 { - try visitor.visitSingularInt64Field(value: self.accountNumber, fieldNumber: 3) - } - if self.sequence != 0 { - try visitor.visitSingularInt64Field(value: self.sequence, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_Signature, rhs: TW_Binance_Proto_Signature) -> Bool { - if lhs.pubKey != rhs.pubKey {return false} - if lhs.signature != rhs.signature {return false} - if lhs.accountNumber != rhs.accountNumber {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_TradeOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TradeOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "sender"), - 2: .same(proto: "id"), - 3: .same(proto: "symbol"), - 4: .same(proto: "ordertype"), - 5: .same(proto: "side"), - 6: .same(proto: "price"), - 7: .same(proto: "quantity"), - 8: .same(proto: "timeinforce"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.sender) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.id) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.symbol) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.ordertype) }() - case 5: try { try decoder.decodeSingularInt64Field(value: &self.side) }() - case 6: try { try decoder.decodeSingularInt64Field(value: &self.price) }() - case 7: try { try decoder.decodeSingularInt64Field(value: &self.quantity) }() - case 8: try { try decoder.decodeSingularInt64Field(value: &self.timeinforce) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.sender.isEmpty { - try visitor.visitSingularBytesField(value: self.sender, fieldNumber: 1) - } - if !self.id.isEmpty { - try visitor.visitSingularStringField(value: self.id, fieldNumber: 2) - } - if !self.symbol.isEmpty { - try visitor.visitSingularStringField(value: self.symbol, fieldNumber: 3) - } - if self.ordertype != 0 { - try visitor.visitSingularInt64Field(value: self.ordertype, fieldNumber: 4) - } - if self.side != 0 { - try visitor.visitSingularInt64Field(value: self.side, fieldNumber: 5) - } - if self.price != 0 { - try visitor.visitSingularInt64Field(value: self.price, fieldNumber: 6) - } - if self.quantity != 0 { - try visitor.visitSingularInt64Field(value: self.quantity, fieldNumber: 7) - } - if self.timeinforce != 0 { - try visitor.visitSingularInt64Field(value: self.timeinforce, fieldNumber: 8) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_TradeOrder, rhs: TW_Binance_Proto_TradeOrder) -> Bool { - if lhs.sender != rhs.sender {return false} - if lhs.id != rhs.id {return false} - if lhs.symbol != rhs.symbol {return false} - if lhs.ordertype != rhs.ordertype {return false} - if lhs.side != rhs.side {return false} - if lhs.price != rhs.price {return false} - if lhs.quantity != rhs.quantity {return false} - if lhs.timeinforce != rhs.timeinforce {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_CancelTradeOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CancelTradeOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "sender"), - 2: .same(proto: "symbol"), - 3: .same(proto: "refid"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.sender) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.symbol) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.refid) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.sender.isEmpty { - try visitor.visitSingularBytesField(value: self.sender, fieldNumber: 1) - } - if !self.symbol.isEmpty { - try visitor.visitSingularStringField(value: self.symbol, fieldNumber: 2) - } - if !self.refid.isEmpty { - try visitor.visitSingularStringField(value: self.refid, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_CancelTradeOrder, rhs: TW_Binance_Proto_CancelTradeOrder) -> Bool { - if lhs.sender != rhs.sender {return false} - if lhs.symbol != rhs.symbol {return false} - if lhs.refid != rhs.refid {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_SendOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SendOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "inputs"), - 2: .same(proto: "outputs"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.inputs) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.outputs) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.inputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 1) - } - if !self.outputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_SendOrder, rhs: TW_Binance_Proto_SendOrder) -> Bool { - if lhs.inputs != rhs.inputs {return false} - if lhs.outputs != rhs.outputs {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_SendOrder.Token: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Binance_Proto_SendOrder.protoMessageName + ".Token" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "denom"), - 2: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.denom) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.denom.isEmpty { - try visitor.visitSingularStringField(value: self.denom, fieldNumber: 1) - } - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_SendOrder.Token, rhs: TW_Binance_Proto_SendOrder.Token) -> Bool { - if lhs.denom != rhs.denom {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_SendOrder.Input: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Binance_Proto_SendOrder.protoMessageName + ".Input" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "address"), - 2: .same(proto: "coins"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.address) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.coins) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.address.isEmpty { - try visitor.visitSingularBytesField(value: self.address, fieldNumber: 1) - } - if !self.coins.isEmpty { - try visitor.visitRepeatedMessageField(value: self.coins, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_SendOrder.Input, rhs: TW_Binance_Proto_SendOrder.Input) -> Bool { - if lhs.address != rhs.address {return false} - if lhs.coins != rhs.coins {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_SendOrder.Output: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Binance_Proto_SendOrder.protoMessageName + ".Output" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "address"), - 2: .same(proto: "coins"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.address) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.coins) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.address.isEmpty { - try visitor.visitSingularBytesField(value: self.address, fieldNumber: 1) - } - if !self.coins.isEmpty { - try visitor.visitRepeatedMessageField(value: self.coins, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_SendOrder.Output, rhs: TW_Binance_Proto_SendOrder.Output) -> Bool { - if lhs.address != rhs.address {return false} - if lhs.coins != rhs.coins {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_TokenIssueOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TokenIssueOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .same(proto: "name"), - 3: .same(proto: "symbol"), - 4: .standard(proto: "total_supply"), - 5: .same(proto: "mintable"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.from) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.symbol) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.totalSupply) }() - case 5: try { try decoder.decodeSingularBoolField(value: &self.mintable) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.from.isEmpty { - try visitor.visitSingularBytesField(value: self.from, fieldNumber: 1) - } - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) - } - if !self.symbol.isEmpty { - try visitor.visitSingularStringField(value: self.symbol, fieldNumber: 3) - } - if self.totalSupply != 0 { - try visitor.visitSingularInt64Field(value: self.totalSupply, fieldNumber: 4) - } - if self.mintable != false { - try visitor.visitSingularBoolField(value: self.mintable, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_TokenIssueOrder, rhs: TW_Binance_Proto_TokenIssueOrder) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.name != rhs.name {return false} - if lhs.symbol != rhs.symbol {return false} - if lhs.totalSupply != rhs.totalSupply {return false} - if lhs.mintable != rhs.mintable {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_TokenMintOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TokenMintOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .same(proto: "symbol"), - 3: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.from) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.symbol) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.from.isEmpty { - try visitor.visitSingularBytesField(value: self.from, fieldNumber: 1) - } - if !self.symbol.isEmpty { - try visitor.visitSingularStringField(value: self.symbol, fieldNumber: 2) - } - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_TokenMintOrder, rhs: TW_Binance_Proto_TokenMintOrder) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.symbol != rhs.symbol {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_TokenBurnOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TokenBurnOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .same(proto: "symbol"), - 3: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.from) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.symbol) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.from.isEmpty { - try visitor.visitSingularBytesField(value: self.from, fieldNumber: 1) - } - if !self.symbol.isEmpty { - try visitor.visitSingularStringField(value: self.symbol, fieldNumber: 2) - } - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_TokenBurnOrder, rhs: TW_Binance_Proto_TokenBurnOrder) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.symbol != rhs.symbol {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_TokenFreezeOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TokenFreezeOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .same(proto: "symbol"), - 3: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.from) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.symbol) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.from.isEmpty { - try visitor.visitSingularBytesField(value: self.from, fieldNumber: 1) - } - if !self.symbol.isEmpty { - try visitor.visitSingularStringField(value: self.symbol, fieldNumber: 2) - } - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_TokenFreezeOrder, rhs: TW_Binance_Proto_TokenFreezeOrder) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.symbol != rhs.symbol {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_TokenUnfreezeOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TokenUnfreezeOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .same(proto: "symbol"), - 3: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.from) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.symbol) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.from.isEmpty { - try visitor.visitSingularBytesField(value: self.from, fieldNumber: 1) - } - if !self.symbol.isEmpty { - try visitor.visitSingularStringField(value: self.symbol, fieldNumber: 2) - } - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_TokenUnfreezeOrder, rhs: TW_Binance_Proto_TokenUnfreezeOrder) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.symbol != rhs.symbol {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_HTLTOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".HTLTOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .same(proto: "to"), - 3: .standard(proto: "recipient_other_chain"), - 4: .standard(proto: "sender_other_chain"), - 5: .standard(proto: "random_number_hash"), - 6: .same(proto: "timestamp"), - 7: .same(proto: "amount"), - 8: .standard(proto: "expected_income"), - 9: .standard(proto: "height_span"), - 10: .standard(proto: "cross_chain"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.from) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.to) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.recipientOtherChain) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.senderOtherChain) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.randomNumberHash) }() - case 6: try { try decoder.decodeSingularInt64Field(value: &self.timestamp) }() - case 7: try { try decoder.decodeRepeatedMessageField(value: &self.amount) }() - case 8: try { try decoder.decodeSingularStringField(value: &self.expectedIncome) }() - case 9: try { try decoder.decodeSingularInt64Field(value: &self.heightSpan) }() - case 10: try { try decoder.decodeSingularBoolField(value: &self.crossChain) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.from.isEmpty { - try visitor.visitSingularBytesField(value: self.from, fieldNumber: 1) - } - if !self.to.isEmpty { - try visitor.visitSingularBytesField(value: self.to, fieldNumber: 2) - } - if !self.recipientOtherChain.isEmpty { - try visitor.visitSingularStringField(value: self.recipientOtherChain, fieldNumber: 3) - } - if !self.senderOtherChain.isEmpty { - try visitor.visitSingularStringField(value: self.senderOtherChain, fieldNumber: 4) - } - if !self.randomNumberHash.isEmpty { - try visitor.visitSingularBytesField(value: self.randomNumberHash, fieldNumber: 5) - } - if self.timestamp != 0 { - try visitor.visitSingularInt64Field(value: self.timestamp, fieldNumber: 6) - } - if !self.amount.isEmpty { - try visitor.visitRepeatedMessageField(value: self.amount, fieldNumber: 7) - } - if !self.expectedIncome.isEmpty { - try visitor.visitSingularStringField(value: self.expectedIncome, fieldNumber: 8) - } - if self.heightSpan != 0 { - try visitor.visitSingularInt64Field(value: self.heightSpan, fieldNumber: 9) - } - if self.crossChain != false { - try visitor.visitSingularBoolField(value: self.crossChain, fieldNumber: 10) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_HTLTOrder, rhs: TW_Binance_Proto_HTLTOrder) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.to != rhs.to {return false} - if lhs.recipientOtherChain != rhs.recipientOtherChain {return false} - if lhs.senderOtherChain != rhs.senderOtherChain {return false} - if lhs.randomNumberHash != rhs.randomNumberHash {return false} - if lhs.timestamp != rhs.timestamp {return false} - if lhs.amount != rhs.amount {return false} - if lhs.expectedIncome != rhs.expectedIncome {return false} - if lhs.heightSpan != rhs.heightSpan {return false} - if lhs.crossChain != rhs.crossChain {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_DepositHTLTOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DepositHTLTOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .same(proto: "amount"), - 3: .standard(proto: "swap_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.from) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.amount) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.swapID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.from.isEmpty { - try visitor.visitSingularBytesField(value: self.from, fieldNumber: 1) - } - if !self.amount.isEmpty { - try visitor.visitRepeatedMessageField(value: self.amount, fieldNumber: 2) - } - if !self.swapID.isEmpty { - try visitor.visitSingularBytesField(value: self.swapID, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_DepositHTLTOrder, rhs: TW_Binance_Proto_DepositHTLTOrder) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.amount != rhs.amount {return false} - if lhs.swapID != rhs.swapID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_ClaimHTLOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ClaimHTLOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .standard(proto: "swap_id"), - 3: .standard(proto: "random_number"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.from) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.swapID) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.randomNumber) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.from.isEmpty { - try visitor.visitSingularBytesField(value: self.from, fieldNumber: 1) - } - if !self.swapID.isEmpty { - try visitor.visitSingularBytesField(value: self.swapID, fieldNumber: 2) - } - if !self.randomNumber.isEmpty { - try visitor.visitSingularBytesField(value: self.randomNumber, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_ClaimHTLOrder, rhs: TW_Binance_Proto_ClaimHTLOrder) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.swapID != rhs.swapID {return false} - if lhs.randomNumber != rhs.randomNumber {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_RefundHTLTOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".RefundHTLTOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .standard(proto: "swap_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.from) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.swapID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.from.isEmpty { - try visitor.visitSingularBytesField(value: self.from, fieldNumber: 1) - } - if !self.swapID.isEmpty { - try visitor.visitSingularBytesField(value: self.swapID, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_RefundHTLTOrder, rhs: TW_Binance_Proto_RefundHTLTOrder) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.swapID != rhs.swapID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_TransferOut: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransferOut" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .same(proto: "to"), - 3: .same(proto: "amount"), - 4: .standard(proto: "expire_time"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.from) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.to) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._amount) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.expireTime) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.from.isEmpty { - try visitor.visitSingularBytesField(value: self.from, fieldNumber: 1) - } - if !self.to.isEmpty { - try visitor.visitSingularBytesField(value: self.to, fieldNumber: 2) - } - try { if let v = self._amount { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if self.expireTime != 0 { - try visitor.visitSingularInt64Field(value: self.expireTime, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_TransferOut, rhs: TW_Binance_Proto_TransferOut) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.to != rhs.to {return false} - if lhs._amount != rhs._amount {return false} - if lhs.expireTime != rhs.expireTime {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_SideChainDelegate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SideChainDelegate" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "delegator_addr"), - 2: .standard(proto: "validator_addr"), - 3: .same(proto: "delegation"), - 4: .standard(proto: "chain_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.delegatorAddr) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.validatorAddr) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._delegation) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.chainID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.delegatorAddr.isEmpty { - try visitor.visitSingularBytesField(value: self.delegatorAddr, fieldNumber: 1) - } - if !self.validatorAddr.isEmpty { - try visitor.visitSingularBytesField(value: self.validatorAddr, fieldNumber: 2) - } - try { if let v = self._delegation { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if !self.chainID.isEmpty { - try visitor.visitSingularStringField(value: self.chainID, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_SideChainDelegate, rhs: TW_Binance_Proto_SideChainDelegate) -> Bool { - if lhs.delegatorAddr != rhs.delegatorAddr {return false} - if lhs.validatorAddr != rhs.validatorAddr {return false} - if lhs._delegation != rhs._delegation {return false} - if lhs.chainID != rhs.chainID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_SideChainRedelegate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SideChainRedelegate" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "delegator_addr"), - 2: .standard(proto: "validator_src_addr"), - 3: .standard(proto: "validator_dst_addr"), - 4: .same(proto: "amount"), - 5: .standard(proto: "chain_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.delegatorAddr) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.validatorSrcAddr) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.validatorDstAddr) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._amount) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.chainID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.delegatorAddr.isEmpty { - try visitor.visitSingularBytesField(value: self.delegatorAddr, fieldNumber: 1) - } - if !self.validatorSrcAddr.isEmpty { - try visitor.visitSingularBytesField(value: self.validatorSrcAddr, fieldNumber: 2) - } - if !self.validatorDstAddr.isEmpty { - try visitor.visitSingularBytesField(value: self.validatorDstAddr, fieldNumber: 3) - } - try { if let v = self._amount { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - if !self.chainID.isEmpty { - try visitor.visitSingularStringField(value: self.chainID, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_SideChainRedelegate, rhs: TW_Binance_Proto_SideChainRedelegate) -> Bool { - if lhs.delegatorAddr != rhs.delegatorAddr {return false} - if lhs.validatorSrcAddr != rhs.validatorSrcAddr {return false} - if lhs.validatorDstAddr != rhs.validatorDstAddr {return false} - if lhs._amount != rhs._amount {return false} - if lhs.chainID != rhs.chainID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_SideChainUndelegate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SideChainUndelegate" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "delegator_addr"), - 2: .standard(proto: "validator_addr"), - 3: .same(proto: "amount"), - 4: .standard(proto: "chain_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.delegatorAddr) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.validatorAddr) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._amount) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.chainID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.delegatorAddr.isEmpty { - try visitor.visitSingularBytesField(value: self.delegatorAddr, fieldNumber: 1) - } - if !self.validatorAddr.isEmpty { - try visitor.visitSingularBytesField(value: self.validatorAddr, fieldNumber: 2) - } - try { if let v = self._amount { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if !self.chainID.isEmpty { - try visitor.visitSingularStringField(value: self.chainID, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_SideChainUndelegate, rhs: TW_Binance_Proto_SideChainUndelegate) -> Bool { - if lhs.delegatorAddr != rhs.delegatorAddr {return false} - if lhs.validatorAddr != rhs.validatorAddr {return false} - if lhs._amount != rhs._amount {return false} - if lhs.chainID != rhs.chainID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_TimeLockOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TimeLockOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "from_address"), - 2: .same(proto: "description"), - 3: .same(proto: "amount"), - 4: .standard(proto: "lock_time"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.fromAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.description_p) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.amount) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.lockTime) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fromAddress.isEmpty { - try visitor.visitSingularBytesField(value: self.fromAddress, fieldNumber: 1) - } - if !self.description_p.isEmpty { - try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 2) - } - if !self.amount.isEmpty { - try visitor.visitRepeatedMessageField(value: self.amount, fieldNumber: 3) - } - if self.lockTime != 0 { - try visitor.visitSingularInt64Field(value: self.lockTime, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_TimeLockOrder, rhs: TW_Binance_Proto_TimeLockOrder) -> Bool { - if lhs.fromAddress != rhs.fromAddress {return false} - if lhs.description_p != rhs.description_p {return false} - if lhs.amount != rhs.amount {return false} - if lhs.lockTime != rhs.lockTime {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_TimeRelockOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TimeRelockOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "from_address"), - 2: .same(proto: "id"), - 3: .same(proto: "description"), - 4: .same(proto: "amount"), - 5: .standard(proto: "lock_time"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.fromAddress) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.id) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.description_p) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.amount) }() - case 5: try { try decoder.decodeSingularInt64Field(value: &self.lockTime) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fromAddress.isEmpty { - try visitor.visitSingularBytesField(value: self.fromAddress, fieldNumber: 1) - } - if self.id != 0 { - try visitor.visitSingularInt64Field(value: self.id, fieldNumber: 2) - } - if !self.description_p.isEmpty { - try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 3) - } - if !self.amount.isEmpty { - try visitor.visitRepeatedMessageField(value: self.amount, fieldNumber: 4) - } - if self.lockTime != 0 { - try visitor.visitSingularInt64Field(value: self.lockTime, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_TimeRelockOrder, rhs: TW_Binance_Proto_TimeRelockOrder) -> Bool { - if lhs.fromAddress != rhs.fromAddress {return false} - if lhs.id != rhs.id {return false} - if lhs.description_p != rhs.description_p {return false} - if lhs.amount != rhs.amount {return false} - if lhs.lockTime != rhs.lockTime {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_TimeUnlockOrder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TimeUnlockOrder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "from_address"), - 2: .same(proto: "id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.fromAddress) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.id) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fromAddress.isEmpty { - try visitor.visitSingularBytesField(value: self.fromAddress, fieldNumber: 1) - } - if self.id != 0 { - try visitor.visitSingularInt64Field(value: self.id, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_TimeUnlockOrder, rhs: TW_Binance_Proto_TimeUnlockOrder) -> Bool { - if lhs.fromAddress != rhs.fromAddress {return false} - if lhs.id != rhs.id {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "chain_id"), - 2: .standard(proto: "account_number"), - 3: .same(proto: "sequence"), - 4: .same(proto: "source"), - 5: .same(proto: "memo"), - 6: .standard(proto: "private_key"), - 8: .standard(proto: "trade_order"), - 9: .standard(proto: "cancel_trade_order"), - 10: .standard(proto: "send_order"), - 11: .standard(proto: "freeze_order"), - 12: .standard(proto: "unfreeze_order"), - 13: .standard(proto: "htlt_order"), - 14: .standard(proto: "depositHTLT_order"), - 15: .standard(proto: "claimHTLT_order"), - 16: .standard(proto: "refundHTLT_order"), - 17: .standard(proto: "issue_order"), - 18: .standard(proto: "mint_order"), - 19: .standard(proto: "burn_order"), - 20: .standard(proto: "transfer_out_order"), - 21: .standard(proto: "side_delegate_order"), - 22: .standard(proto: "side_redelegate_order"), - 23: .standard(proto: "side_undelegate_order"), - 24: .standard(proto: "time_lock_order"), - 25: .standard(proto: "time_relock_order"), - 26: .standard(proto: "time_unlock_order"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.chainID) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.accountNumber) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.sequence) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.source) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.memo) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 8: try { - var v: TW_Binance_Proto_TradeOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .tradeOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .tradeOrder(v) - } - }() - case 9: try { - var v: TW_Binance_Proto_CancelTradeOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .cancelTradeOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .cancelTradeOrder(v) - } - }() - case 10: try { - var v: TW_Binance_Proto_SendOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .sendOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .sendOrder(v) - } - }() - case 11: try { - var v: TW_Binance_Proto_TokenFreezeOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .freezeOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .freezeOrder(v) - } - }() - case 12: try { - var v: TW_Binance_Proto_TokenUnfreezeOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .unfreezeOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .unfreezeOrder(v) - } - }() - case 13: try { - var v: TW_Binance_Proto_HTLTOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .htltOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .htltOrder(v) - } - }() - case 14: try { - var v: TW_Binance_Proto_DepositHTLTOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .depositHtltOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .depositHtltOrder(v) - } - }() - case 15: try { - var v: TW_Binance_Proto_ClaimHTLOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .claimHtltOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .claimHtltOrder(v) - } - }() - case 16: try { - var v: TW_Binance_Proto_RefundHTLTOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .refundHtltOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .refundHtltOrder(v) - } - }() - case 17: try { - var v: TW_Binance_Proto_TokenIssueOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .issueOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .issueOrder(v) - } - }() - case 18: try { - var v: TW_Binance_Proto_TokenMintOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .mintOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .mintOrder(v) - } - }() - case 19: try { - var v: TW_Binance_Proto_TokenBurnOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .burnOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .burnOrder(v) - } - }() - case 20: try { - var v: TW_Binance_Proto_TransferOut? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .transferOutOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .transferOutOrder(v) - } - }() - case 21: try { - var v: TW_Binance_Proto_SideChainDelegate? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .sideDelegateOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .sideDelegateOrder(v) - } - }() - case 22: try { - var v: TW_Binance_Proto_SideChainRedelegate? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .sideRedelegateOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .sideRedelegateOrder(v) - } - }() - case 23: try { - var v: TW_Binance_Proto_SideChainUndelegate? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .sideUndelegateOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .sideUndelegateOrder(v) - } - }() - case 24: try { - var v: TW_Binance_Proto_TimeLockOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .timeLockOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .timeLockOrder(v) - } - }() - case 25: try { - var v: TW_Binance_Proto_TimeRelockOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .timeRelockOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .timeRelockOrder(v) - } - }() - case 26: try { - var v: TW_Binance_Proto_TimeUnlockOrder? - var hadOneofValue = false - if let current = self.orderOneof { - hadOneofValue = true - if case .timeUnlockOrder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.orderOneof = .timeUnlockOrder(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.chainID.isEmpty { - try visitor.visitSingularStringField(value: self.chainID, fieldNumber: 1) - } - if self.accountNumber != 0 { - try visitor.visitSingularInt64Field(value: self.accountNumber, fieldNumber: 2) - } - if self.sequence != 0 { - try visitor.visitSingularInt64Field(value: self.sequence, fieldNumber: 3) - } - if self.source != 0 { - try visitor.visitSingularInt64Field(value: self.source, fieldNumber: 4) - } - if !self.memo.isEmpty { - try visitor.visitSingularStringField(value: self.memo, fieldNumber: 5) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 6) - } - switch self.orderOneof { - case .tradeOrder?: try { - guard case .tradeOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case .cancelTradeOrder?: try { - guard case .cancelTradeOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case .sendOrder?: try { - guard case .sendOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - }() - case .freezeOrder?: try { - guard case .freezeOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - }() - case .unfreezeOrder?: try { - guard case .unfreezeOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - }() - case .htltOrder?: try { - guard case .htltOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 13) - }() - case .depositHtltOrder?: try { - guard case .depositHtltOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 14) - }() - case .claimHtltOrder?: try { - guard case .claimHtltOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - }() - case .refundHtltOrder?: try { - guard case .refundHtltOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 16) - }() - case .issueOrder?: try { - guard case .issueOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 17) - }() - case .mintOrder?: try { - guard case .mintOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 18) - }() - case .burnOrder?: try { - guard case .burnOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 19) - }() - case .transferOutOrder?: try { - guard case .transferOutOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 20) - }() - case .sideDelegateOrder?: try { - guard case .sideDelegateOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 21) - }() - case .sideRedelegateOrder?: try { - guard case .sideRedelegateOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 22) - }() - case .sideUndelegateOrder?: try { - guard case .sideUndelegateOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 23) - }() - case .timeLockOrder?: try { - guard case .timeLockOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 24) - }() - case .timeRelockOrder?: try { - guard case .timeRelockOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 25) - }() - case .timeUnlockOrder?: try { - guard case .timeUnlockOrder(let v)? = self.orderOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 26) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_SigningInput, rhs: TW_Binance_Proto_SigningInput) -> Bool { - if lhs.chainID != rhs.chainID {return false} - if lhs.accountNumber != rhs.accountNumber {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.source != rhs.source {return false} - if lhs.memo != rhs.memo {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.orderOneof != rhs.orderOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Binance_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Binance_Proto_SigningOutput, rhs: TW_Binance_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Bitcoin+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Bitcoin+Proto.swift deleted file mode 100644 index eeea37ba..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Bitcoin+Proto.swift +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias BitcoinTransaction = TW_Bitcoin_Proto_Transaction -public typealias BitcoinTransactionInput = TW_Bitcoin_Proto_TransactionInput -public typealias BitcoinOutPoint = TW_Bitcoin_Proto_OutPoint -public typealias BitcoinTransactionOutput = TW_Bitcoin_Proto_TransactionOutput -public typealias BitcoinUnspentTransaction = TW_Bitcoin_Proto_UnspentTransaction -public typealias BitcoinOutputAddress = TW_Bitcoin_Proto_OutputAddress -public typealias BitcoinSigningInput = TW_Bitcoin_Proto_SigningInput -public typealias BitcoinTransactionPlan = TW_Bitcoin_Proto_TransactionPlan -public typealias BitcoinSigningOutput = TW_Bitcoin_Proto_SigningOutput -public typealias BitcoinHashPublicKey = TW_Bitcoin_Proto_HashPublicKey -public typealias BitcoinPreSigningOutput = TW_Bitcoin_Proto_PreSigningOutput -public typealias BitcoinTransactionVariant = TW_Bitcoin_Proto_TransactionVariant diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Bitcoin.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Bitcoin.pb.swift deleted file mode 100644 index 0b9e514f..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Bitcoin.pb.swift +++ /dev/null @@ -1,1200 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Bitcoin.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -public enum TW_Bitcoin_Proto_TransactionVariant: SwiftProtobuf.Enum { - public typealias RawValue = Int - case p2Pkh // = 0 - case p2Wpkh // = 1 - case p2Trkeypath // = 2 - case brc20Transfer // = 3 - case nftinscription // = 4 - case UNRECOGNIZED(Int) - - public init() { - self = .p2Pkh - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .p2Pkh - case 1: self = .p2Wpkh - case 2: self = .p2Trkeypath - case 3: self = .brc20Transfer - case 4: self = .nftinscription - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .p2Pkh: return 0 - case .p2Wpkh: return 1 - case .p2Trkeypath: return 2 - case .brc20Transfer: return 3 - case .nftinscription: return 4 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Bitcoin_Proto_TransactionVariant: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Bitcoin_Proto_TransactionVariant] = [ - .p2Pkh, - .p2Wpkh, - .p2Trkeypath, - .brc20Transfer, - .nftinscription, - ] -} - -#endif // swift(>=4.2) - -/// A transaction, with its inputs and outputs -public struct TW_Bitcoin_Proto_Transaction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Transaction data format version. - public var version: Int32 = 0 - - /// The block number or timestamp at which this transaction is unlocked. - public var lockTime: UInt32 = 0 - - /// A list of 1 or more transaction inputs or sources for coins. - public var inputs: [TW_Bitcoin_Proto_TransactionInput] = [] - - /// A list of 1 or more transaction outputs or destinations for coins. - public var outputs: [TW_Bitcoin_Proto_TransactionOutput] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Bitcoin transaction input. -public struct TW_Bitcoin_Proto_TransactionInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Reference to the previous transaction's output. - public var previousOutput: TW_Bitcoin_Proto_OutPoint { - get {return _previousOutput ?? TW_Bitcoin_Proto_OutPoint()} - set {_previousOutput = newValue} - } - /// Returns true if `previousOutput` has been explicitly set. - public var hasPreviousOutput: Bool {return self._previousOutput != nil} - /// Clears the value of `previousOutput`. Subsequent reads from it will return its default value. - public mutating func clearPreviousOutput() {self._previousOutput = nil} - - /// Transaction version as defined by the sender. - public var sequence: UInt32 = 0 - - /// Computational script for confirming transaction authorization. - public var script: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _previousOutput: TW_Bitcoin_Proto_OutPoint? = nil -} - -/// Bitcoin transaction out-point reference. -public struct TW_Bitcoin_Proto_OutPoint { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The hash of the referenced transaction (network byte order, usually needs to be reversed). - public var hash: Data = Data() - - /// The index of the specific output in the transaction. - public var index: UInt32 = 0 - - /// Transaction version as defined by the sender. - public var sequence: UInt32 = 0 - - /// The tree in utxo, only works for DCR - public var tree: Int32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Bitcoin transaction output. -public struct TW_Bitcoin_Proto_TransactionOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Transaction amount. - public var value: Int64 = 0 - - /// Usually contains the public key as a Bitcoin script setting up conditions to claim this output. - public var script: Data = Data() - - /// Optional spending script for P2TR script-path transactions. - public var spendingScript: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// An unspent transaction output, that can serve as input to a transaction -public struct TW_Bitcoin_Proto_UnspentTransaction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The unspent output - public var outPoint: TW_Bitcoin_Proto_OutPoint { - get {return _outPoint ?? TW_Bitcoin_Proto_OutPoint()} - set {_outPoint = newValue} - } - /// Returns true if `outPoint` has been explicitly set. - public var hasOutPoint: Bool {return self._outPoint != nil} - /// Clears the value of `outPoint`. Subsequent reads from it will return its default value. - public mutating func clearOutPoint() {self._outPoint = nil} - - /// Script for claiming this UTXO - public var script: Data = Data() - - /// Amount of the UTXO - public var amount: Int64 = 0 - - /// The transaction variant - public var variant: TW_Bitcoin_Proto_TransactionVariant = .p2Pkh - - /// Optional spending script for P2TR script-path transactions. - public var spendingScript: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _outPoint: TW_Bitcoin_Proto_OutPoint? = nil -} - -/// Pair of destination address and amount, used for extra outputs -public struct TW_Bitcoin_Proto_OutputAddress { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Destination address - public var toAddress: String = String() - - /// Amount to be paid to this output - public var amount: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Bitcoin_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Hash type to use when signing. - public var hashType: UInt32 { - get {return _storage._hashType} - set {_uniqueStorage()._hashType = newValue} - } - - /// Amount to send. Transaction created will have this amount in its output, - /// except when use_max_amount is set, in that case this amount is not relevant, maximum possible amount will be used (max avail less fee). - /// If amount is equal or more than the available amount, also max amount will be used. - public var amount: Int64 { - get {return _storage._amount} - set {_uniqueStorage()._amount = newValue} - } - - /// Transaction fee rate, satoshis per byte, used to compute required fee (when planning) - public var byteFee: Int64 { - get {return _storage._byteFee} - set {_uniqueStorage()._byteFee = newValue} - } - - /// Recipient's address, as string. - public var toAddress: String { - get {return _storage._toAddress} - set {_uniqueStorage()._toAddress = newValue} - } - - /// Change address, as string. - public var changeAddress: String { - get {return _storage._changeAddress} - set {_uniqueStorage()._changeAddress = newValue} - } - - /// The available secret private key or keys required for signing (32 bytes each). - public var privateKey: [Data] { - get {return _storage._privateKey} - set {_uniqueStorage()._privateKey = newValue} - } - - /// Available redeem scripts indexed by script hash. - public var scripts: Dictionary { - get {return _storage._scripts} - set {_uniqueStorage()._scripts = newValue} - } - - /// Available input unspent transaction outputs. - public var utxo: [TW_Bitcoin_Proto_UnspentTransaction] { - get {return _storage._utxo} - set {_uniqueStorage()._utxo = newValue} - } - - /// Set if sending max amount is requested. - public var useMaxAmount: Bool { - get {return _storage._useMaxAmount} - set {_uniqueStorage()._useMaxAmount = newValue} - } - - /// Coin type (used by forks). - public var coinType: UInt32 { - get {return _storage._coinType} - set {_uniqueStorage()._coinType = newValue} - } - - /// Optional transaction plan. If missing, plan will be computed. - public var plan: TW_Bitcoin_Proto_TransactionPlan { - get {return _storage._plan ?? TW_Bitcoin_Proto_TransactionPlan()} - set {_uniqueStorage()._plan = newValue} - } - /// Returns true if `plan` has been explicitly set. - public var hasPlan: Bool {return _storage._plan != nil} - /// Clears the value of `plan`. Subsequent reads from it will return its default value. - public mutating func clearPlan() {_uniqueStorage()._plan = nil} - - /// Optional lockTime, default value 0 means no time locking. - /// If all inputs have final (`0xffffffff`) sequence numbers then `lockTime` is irrelevant. - /// Otherwise, the transaction may not be added to a block until after `lockTime`. - /// value < 500000000 : Block number at which this transaction is unlocked - /// value >= 500000000 : UNIX timestamp at which this transaction is unlocked - public var lockTime: UInt32 { - get {return _storage._lockTime} - set {_uniqueStorage()._lockTime = newValue} - } - - /// Optional zero-amount, OP_RETURN output - public var outputOpReturn: Data { - get {return _storage._outputOpReturn} - set {_uniqueStorage()._outputOpReturn = newValue} - } - - /// Optional additional destination addresses, additional to first to_address output - public var extraOutputs: [TW_Bitcoin_Proto_OutputAddress] { - get {return _storage._extraOutputs} - set {_uniqueStorage()._extraOutputs = newValue} - } - - /// If use max utxo. - public var useMaxUtxo: Bool { - get {return _storage._useMaxUtxo} - set {_uniqueStorage()._useMaxUtxo = newValue} - } - - /// If disable dust filter. - public var disableDustFilter: Bool { - get {return _storage._disableDustFilter} - set {_uniqueStorage()._disableDustFilter = newValue} - } - - /// transaction creation time that will be used for verge(xvg) - public var time: UInt32 { - get {return _storage._time} - set {_uniqueStorage()._time = newValue} - } - - public var isItBrcOperation: Bool { - get {return _storage._isItBrcOperation} - set {_uniqueStorage()._isItBrcOperation = newValue} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Describes a preliminary transaction plan. -public struct TW_Bitcoin_Proto_TransactionPlan { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Amount to be received at the other end. - public var amount: Int64 = 0 - - /// Maximum available amount in all the input UTXOs. - public var availableAmount: Int64 = 0 - - /// Estimated transaction fee. - public var fee: Int64 = 0 - - /// Remaining change - public var change: Int64 = 0 - - /// Selected unspent transaction outputs (subset of all input UTXOs) - public var utxos: [TW_Bitcoin_Proto_UnspentTransaction] = [] - - /// Zcash branch id - public var branchID: Data = Data() - - /// Optional error - public var error: TW_Common_Proto_SigningError = .ok - - /// Optional zero-amount, OP_RETURN output - public var outputOpReturn: Data = Data() - - /// zen & bitcoin diamond preblockhash - public var preblockhash: Data = Data() - - /// zen preblockheight - public var preblockheight: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Result containing the signed and encoded transaction. -/// Note that the amount may be different than the requested amount to account for fees and available funds. -public struct TW_Bitcoin_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Resulting transaction. - public var transaction: TW_Bitcoin_Proto_Transaction { - get {return _transaction ?? TW_Bitcoin_Proto_Transaction()} - set {_transaction = newValue} - } - /// Returns true if `transaction` has been explicitly set. - public var hasTransaction: Bool {return self._transaction != nil} - /// Clears the value of `transaction`. Subsequent reads from it will return its default value. - public mutating func clearTransaction() {self._transaction = nil} - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// Transaction ID (hash) - public var transactionID: String = String() - - /// Optional error - public var error: TW_Common_Proto_SigningError = .ok - - /// error description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _transaction: TW_Bitcoin_Proto_Transaction? = nil -} - -//// Pre-image hash to be used for signing -public struct TW_Bitcoin_Proto_HashPublicKey { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - //// Pre-image data hash that will be used for signing - public var dataHash: Data = Data() - - //// public key hash used for signing - public var publicKeyHash: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -//// Transaction pre-signing output -public struct TW_Bitcoin_Proto_PreSigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - //// hash, public key list - public var hashPublicKeys: [TW_Bitcoin_Proto_HashPublicKey] = [] - - //// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - //// error description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Bitcoin.Proto" - -extension TW_Bitcoin_Proto_TransactionVariant: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "P2PKH"), - 1: .same(proto: "P2WPKH"), - 2: .same(proto: "P2TRKEYPATH"), - 3: .same(proto: "BRC20TRANSFER"), - 4: .same(proto: "NFTINSCRIPTION"), - ] -} - -extension TW_Bitcoin_Proto_Transaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transaction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "version"), - 2: .same(proto: "lockTime"), - 3: .same(proto: "inputs"), - 4: .same(proto: "outputs"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularSInt32Field(value: &self.version) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.lockTime) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.inputs) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.outputs) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.version != 0 { - try visitor.visitSingularSInt32Field(value: self.version, fieldNumber: 1) - } - if self.lockTime != 0 { - try visitor.visitSingularUInt32Field(value: self.lockTime, fieldNumber: 2) - } - if !self.inputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 3) - } - if !self.outputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Bitcoin_Proto_Transaction, rhs: TW_Bitcoin_Proto_Transaction) -> Bool { - if lhs.version != rhs.version {return false} - if lhs.lockTime != rhs.lockTime {return false} - if lhs.inputs != rhs.inputs {return false} - if lhs.outputs != rhs.outputs {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Bitcoin_Proto_TransactionInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "previousOutput"), - 2: .same(proto: "sequence"), - 3: .same(proto: "script"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._previousOutput) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.sequence) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.script) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._previousOutput { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if self.sequence != 0 { - try visitor.visitSingularUInt32Field(value: self.sequence, fieldNumber: 2) - } - if !self.script.isEmpty { - try visitor.visitSingularBytesField(value: self.script, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Bitcoin_Proto_TransactionInput, rhs: TW_Bitcoin_Proto_TransactionInput) -> Bool { - if lhs._previousOutput != rhs._previousOutput {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.script != rhs.script {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Bitcoin_Proto_OutPoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OutPoint" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "hash"), - 2: .same(proto: "index"), - 3: .same(proto: "sequence"), - 4: .same(proto: "tree"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.hash) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.index) }() - case 3: try { try decoder.decodeSingularUInt32Field(value: &self.sequence) }() - case 4: try { try decoder.decodeSingularInt32Field(value: &self.tree) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.hash.isEmpty { - try visitor.visitSingularBytesField(value: self.hash, fieldNumber: 1) - } - if self.index != 0 { - try visitor.visitSingularUInt32Field(value: self.index, fieldNumber: 2) - } - if self.sequence != 0 { - try visitor.visitSingularUInt32Field(value: self.sequence, fieldNumber: 3) - } - if self.tree != 0 { - try visitor.visitSingularInt32Field(value: self.tree, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Bitcoin_Proto_OutPoint, rhs: TW_Bitcoin_Proto_OutPoint) -> Bool { - if lhs.hash != rhs.hash {return false} - if lhs.index != rhs.index {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.tree != rhs.tree {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Bitcoin_Proto_TransactionOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - 2: .same(proto: "script"), - 5: .same(proto: "spendingScript"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.value) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.script) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.spendingScript) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.value != 0 { - try visitor.visitSingularInt64Field(value: self.value, fieldNumber: 1) - } - if !self.script.isEmpty { - try visitor.visitSingularBytesField(value: self.script, fieldNumber: 2) - } - if !self.spendingScript.isEmpty { - try visitor.visitSingularBytesField(value: self.spendingScript, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Bitcoin_Proto_TransactionOutput, rhs: TW_Bitcoin_Proto_TransactionOutput) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.script != rhs.script {return false} - if lhs.spendingScript != rhs.spendingScript {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Bitcoin_Proto_UnspentTransaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".UnspentTransaction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "out_point"), - 2: .same(proto: "script"), - 3: .same(proto: "amount"), - 4: .same(proto: "variant"), - 5: .same(proto: "spendingScript"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._outPoint) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.script) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - case 4: try { try decoder.decodeSingularEnumField(value: &self.variant) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.spendingScript) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._outPoint { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.script.isEmpty { - try visitor.visitSingularBytesField(value: self.script, fieldNumber: 2) - } - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 3) - } - if self.variant != .p2Pkh { - try visitor.visitSingularEnumField(value: self.variant, fieldNumber: 4) - } - if !self.spendingScript.isEmpty { - try visitor.visitSingularBytesField(value: self.spendingScript, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Bitcoin_Proto_UnspentTransaction, rhs: TW_Bitcoin_Proto_UnspentTransaction) -> Bool { - if lhs._outPoint != rhs._outPoint {return false} - if lhs.script != rhs.script {return false} - if lhs.amount != rhs.amount {return false} - if lhs.variant != rhs.variant {return false} - if lhs.spendingScript != rhs.spendingScript {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Bitcoin_Proto_OutputAddress: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OutputAddress" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "to_address"), - 2: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 1) - } - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Bitcoin_Proto_OutputAddress, rhs: TW_Bitcoin_Proto_OutputAddress) -> Bool { - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Bitcoin_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "hash_type"), - 2: .same(proto: "amount"), - 3: .standard(proto: "byte_fee"), - 4: .standard(proto: "to_address"), - 5: .standard(proto: "change_address"), - 6: .standard(proto: "private_key"), - 7: .same(proto: "scripts"), - 8: .same(proto: "utxo"), - 9: .standard(proto: "use_max_amount"), - 10: .standard(proto: "coin_type"), - 11: .same(proto: "plan"), - 12: .standard(proto: "lock_time"), - 13: .standard(proto: "output_op_return"), - 14: .standard(proto: "extra_outputs"), - 15: .standard(proto: "use_max_utxo"), - 16: .standard(proto: "disable_dust_filter"), - 17: .same(proto: "time"), - 18: .standard(proto: "is_it_brc_operation"), - ] - - fileprivate class _StorageClass { - var _hashType: UInt32 = 0 - var _amount: Int64 = 0 - var _byteFee: Int64 = 0 - var _toAddress: String = String() - var _changeAddress: String = String() - var _privateKey: [Data] = [] - var _scripts: Dictionary = [:] - var _utxo: [TW_Bitcoin_Proto_UnspentTransaction] = [] - var _useMaxAmount: Bool = false - var _coinType: UInt32 = 0 - var _plan: TW_Bitcoin_Proto_TransactionPlan? = nil - var _lockTime: UInt32 = 0 - var _outputOpReturn: Data = Data() - var _extraOutputs: [TW_Bitcoin_Proto_OutputAddress] = [] - var _useMaxUtxo: Bool = false - var _disableDustFilter: Bool = false - var _time: UInt32 = 0 - var _isItBrcOperation: Bool = false - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _hashType = source._hashType - _amount = source._amount - _byteFee = source._byteFee - _toAddress = source._toAddress - _changeAddress = source._changeAddress - _privateKey = source._privateKey - _scripts = source._scripts - _utxo = source._utxo - _useMaxAmount = source._useMaxAmount - _coinType = source._coinType - _plan = source._plan - _lockTime = source._lockTime - _outputOpReturn = source._outputOpReturn - _extraOutputs = source._extraOutputs - _useMaxUtxo = source._useMaxUtxo - _disableDustFilter = source._disableDustFilter - _time = source._time - _isItBrcOperation = source._isItBrcOperation - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &_storage._hashType) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &_storage._amount) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &_storage._byteFee) }() - case 4: try { try decoder.decodeSingularStringField(value: &_storage._toAddress) }() - case 5: try { try decoder.decodeSingularStringField(value: &_storage._changeAddress) }() - case 6: try { try decoder.decodeRepeatedBytesField(value: &_storage._privateKey) }() - case 7: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._scripts) }() - case 8: try { try decoder.decodeRepeatedMessageField(value: &_storage._utxo) }() - case 9: try { try decoder.decodeSingularBoolField(value: &_storage._useMaxAmount) }() - case 10: try { try decoder.decodeSingularUInt32Field(value: &_storage._coinType) }() - case 11: try { try decoder.decodeSingularMessageField(value: &_storage._plan) }() - case 12: try { try decoder.decodeSingularUInt32Field(value: &_storage._lockTime) }() - case 13: try { try decoder.decodeSingularBytesField(value: &_storage._outputOpReturn) }() - case 14: try { try decoder.decodeRepeatedMessageField(value: &_storage._extraOutputs) }() - case 15: try { try decoder.decodeSingularBoolField(value: &_storage._useMaxUtxo) }() - case 16: try { try decoder.decodeSingularBoolField(value: &_storage._disableDustFilter) }() - case 17: try { try decoder.decodeSingularUInt32Field(value: &_storage._time) }() - case 18: try { try decoder.decodeSingularBoolField(value: &_storage._isItBrcOperation) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if _storage._hashType != 0 { - try visitor.visitSingularUInt32Field(value: _storage._hashType, fieldNumber: 1) - } - if _storage._amount != 0 { - try visitor.visitSingularInt64Field(value: _storage._amount, fieldNumber: 2) - } - if _storage._byteFee != 0 { - try visitor.visitSingularInt64Field(value: _storage._byteFee, fieldNumber: 3) - } - if !_storage._toAddress.isEmpty { - try visitor.visitSingularStringField(value: _storage._toAddress, fieldNumber: 4) - } - if !_storage._changeAddress.isEmpty { - try visitor.visitSingularStringField(value: _storage._changeAddress, fieldNumber: 5) - } - if !_storage._privateKey.isEmpty { - try visitor.visitRepeatedBytesField(value: _storage._privateKey, fieldNumber: 6) - } - if !_storage._scripts.isEmpty { - try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._scripts, fieldNumber: 7) - } - if !_storage._utxo.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._utxo, fieldNumber: 8) - } - if _storage._useMaxAmount != false { - try visitor.visitSingularBoolField(value: _storage._useMaxAmount, fieldNumber: 9) - } - if _storage._coinType != 0 { - try visitor.visitSingularUInt32Field(value: _storage._coinType, fieldNumber: 10) - } - try { if let v = _storage._plan { - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - } }() - if _storage._lockTime != 0 { - try visitor.visitSingularUInt32Field(value: _storage._lockTime, fieldNumber: 12) - } - if !_storage._outputOpReturn.isEmpty { - try visitor.visitSingularBytesField(value: _storage._outputOpReturn, fieldNumber: 13) - } - if !_storage._extraOutputs.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._extraOutputs, fieldNumber: 14) - } - if _storage._useMaxUtxo != false { - try visitor.visitSingularBoolField(value: _storage._useMaxUtxo, fieldNumber: 15) - } - if _storage._disableDustFilter != false { - try visitor.visitSingularBoolField(value: _storage._disableDustFilter, fieldNumber: 16) - } - if _storage._time != 0 { - try visitor.visitSingularUInt32Field(value: _storage._time, fieldNumber: 17) - } - if _storage._isItBrcOperation != false { - try visitor.visitSingularBoolField(value: _storage._isItBrcOperation, fieldNumber: 18) - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Bitcoin_Proto_SigningInput, rhs: TW_Bitcoin_Proto_SigningInput) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._hashType != rhs_storage._hashType {return false} - if _storage._amount != rhs_storage._amount {return false} - if _storage._byteFee != rhs_storage._byteFee {return false} - if _storage._toAddress != rhs_storage._toAddress {return false} - if _storage._changeAddress != rhs_storage._changeAddress {return false} - if _storage._privateKey != rhs_storage._privateKey {return false} - if _storage._scripts != rhs_storage._scripts {return false} - if _storage._utxo != rhs_storage._utxo {return false} - if _storage._useMaxAmount != rhs_storage._useMaxAmount {return false} - if _storage._coinType != rhs_storage._coinType {return false} - if _storage._plan != rhs_storage._plan {return false} - if _storage._lockTime != rhs_storage._lockTime {return false} - if _storage._outputOpReturn != rhs_storage._outputOpReturn {return false} - if _storage._extraOutputs != rhs_storage._extraOutputs {return false} - if _storage._useMaxUtxo != rhs_storage._useMaxUtxo {return false} - if _storage._disableDustFilter != rhs_storage._disableDustFilter {return false} - if _storage._time != rhs_storage._time {return false} - if _storage._isItBrcOperation != rhs_storage._isItBrcOperation {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Bitcoin_Proto_TransactionPlan: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionPlan" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - 2: .standard(proto: "available_amount"), - 3: .same(proto: "fee"), - 4: .same(proto: "change"), - 5: .same(proto: "utxos"), - 6: .standard(proto: "branch_id"), - 7: .same(proto: "error"), - 8: .standard(proto: "output_op_return"), - 9: .same(proto: "preblockhash"), - 10: .same(proto: "preblockheight"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.availableAmount) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.fee) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.change) }() - case 5: try { try decoder.decodeRepeatedMessageField(value: &self.utxos) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.branchID) }() - case 7: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 8: try { try decoder.decodeSingularBytesField(value: &self.outputOpReturn) }() - case 9: try { try decoder.decodeSingularBytesField(value: &self.preblockhash) }() - case 10: try { try decoder.decodeSingularInt64Field(value: &self.preblockheight) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 1) - } - if self.availableAmount != 0 { - try visitor.visitSingularInt64Field(value: self.availableAmount, fieldNumber: 2) - } - if self.fee != 0 { - try visitor.visitSingularInt64Field(value: self.fee, fieldNumber: 3) - } - if self.change != 0 { - try visitor.visitSingularInt64Field(value: self.change, fieldNumber: 4) - } - if !self.utxos.isEmpty { - try visitor.visitRepeatedMessageField(value: self.utxos, fieldNumber: 5) - } - if !self.branchID.isEmpty { - try visitor.visitSingularBytesField(value: self.branchID, fieldNumber: 6) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 7) - } - if !self.outputOpReturn.isEmpty { - try visitor.visitSingularBytesField(value: self.outputOpReturn, fieldNumber: 8) - } - if !self.preblockhash.isEmpty { - try visitor.visitSingularBytesField(value: self.preblockhash, fieldNumber: 9) - } - if self.preblockheight != 0 { - try visitor.visitSingularInt64Field(value: self.preblockheight, fieldNumber: 10) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Bitcoin_Proto_TransactionPlan, rhs: TW_Bitcoin_Proto_TransactionPlan) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.availableAmount != rhs.availableAmount {return false} - if lhs.fee != rhs.fee {return false} - if lhs.change != rhs.change {return false} - if lhs.utxos != rhs.utxos {return false} - if lhs.branchID != rhs.branchID {return false} - if lhs.error != rhs.error {return false} - if lhs.outputOpReturn != rhs.outputOpReturn {return false} - if lhs.preblockhash != rhs.preblockhash {return false} - if lhs.preblockheight != rhs.preblockheight {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Bitcoin_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "transaction"), - 2: .same(proto: "encoded"), - 3: .standard(proto: "transaction_id"), - 4: .same(proto: "error"), - 5: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._transaction) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.transactionID) }() - case 4: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._transaction { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 2) - } - if !self.transactionID.isEmpty { - try visitor.visitSingularStringField(value: self.transactionID, fieldNumber: 3) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 4) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Bitcoin_Proto_SigningOutput, rhs: TW_Bitcoin_Proto_SigningOutput) -> Bool { - if lhs._transaction != rhs._transaction {return false} - if lhs.encoded != rhs.encoded {return false} - if lhs.transactionID != rhs.transactionID {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Bitcoin_Proto_HashPublicKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".HashPublicKey" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "data_hash"), - 2: .standard(proto: "public_key_hash"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.dataHash) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.publicKeyHash) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.dataHash.isEmpty { - try visitor.visitSingularBytesField(value: self.dataHash, fieldNumber: 1) - } - if !self.publicKeyHash.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKeyHash, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Bitcoin_Proto_HashPublicKey, rhs: TW_Bitcoin_Proto_HashPublicKey) -> Bool { - if lhs.dataHash != rhs.dataHash {return false} - if lhs.publicKeyHash != rhs.publicKeyHash {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Bitcoin_Proto_PreSigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".PreSigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "hash_public_keys"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.hashPublicKeys) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.hashPublicKeys.isEmpty { - try visitor.visitRepeatedMessageField(value: self.hashPublicKeys, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Bitcoin_Proto_PreSigningOutput, rhs: TW_Bitcoin_Proto_PreSigningOutput) -> Bool { - if lhs.hashPublicKeys != rhs.hashPublicKeys {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/BitcoinV2+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/BitcoinV2+Proto.swift deleted file mode 100644 index 6bb2b7ae..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/BitcoinV2+Proto.swift +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias BitcoinV2SigningInput = TW_BitcoinV2_Proto_SigningInput -public typealias BitcoinV2Input = TW_BitcoinV2_Proto_Input -public typealias BitcoinV2Output = TW_BitcoinV2_Proto_Output -public typealias BitcoinV2ToPublicKeyOrHash = TW_BitcoinV2_Proto_ToPublicKeyOrHash -public typealias BitcoinV2PreSigningOutput = TW_BitcoinV2_Proto_PreSigningOutput -public typealias BitcoinV2SigningOutput = TW_BitcoinV2_Proto_SigningOutput -public typealias BitcoinV2Transaction = TW_BitcoinV2_Proto_Transaction -public typealias BitcoinV2TransactionInput = TW_BitcoinV2_Proto_TransactionInput -public typealias BitcoinV2TransactionOutput = TW_BitcoinV2_Proto_TransactionOutput -public typealias BitcoinV2ComposePlan = TW_BitcoinV2_Proto_ComposePlan -public typealias BitcoinV2TransactionPlan = TW_BitcoinV2_Proto_TransactionPlan -public typealias BitcoinV2Error = TW_BitcoinV2_Proto_Error diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/BitcoinV2.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/BitcoinV2.pb.swift deleted file mode 100644 index ca5e62fd..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/BitcoinV2.pb.swift +++ /dev/null @@ -1,3197 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: BitcoinV2.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -public enum TW_BitcoinV2_Proto_Error: SwiftProtobuf.Enum { - public typealias RawValue = Int - case ok // = 0 - - /// `tx_utxo` related errors. - case utxoInvalidLeafHash // = 2 - case utxoInvalidSighashType // = 3 - case utxoInvalidLockTime // = 4 - case utxoInvalidTxid // = 5 - case utxoSighashFailed // = 6 - case utxoMissingSighashMethod // = 7 - case utxoFailedEncoding // = 8 - case utxoInsufficientInputs // = 9 - case utxoMissingChangeScriptPubkey // = 10 - - /// `tw_bitcoin` related errors. - case zeroSequenceNotEnabled // = 11 - case unmatchedInputSignatureCount // = 12 - case missingInputBuilder // = 13 - case missingOutputBuilder // = 14 - case missingRecipient // = 15 - case missingInscription // = 41 - case missingTaggedOutput // = 42 - case legacyP2TrInvalidVariant // = 16 - case legacyNoSpendingScriptProvided // = 17 - case legacyExpectedRedeemScript // = 18 - case legacyOutpointNotSet // = 19 - case legacyNoPrivateKey // = 36 - case legacyNoPlanProvided // = 37 - case invalidPrivateKey // = 20 - case invalidPublicKey // = 21 - case invalidSighash // = 22 - case invalidWitnessPubkeyHash // = 23 - case invalidBrc20Ticker // = 24 - case invalidEcdsaSignature // = 25 - case invalidSchnorrSignature // = 26 - case invalidControlBlock // = 27 - case invalidPubkeyHash // = 28 - case invalidTaprootRoot // = 29 - case invalidRedeemScript // = 30 - case invalidWpkhScriptCode // = 1 - case invalidWitnessRedeemScriptHash // = 31 - case invalidWitnessEncoding // = 39 - case invalidTaprootTweakedPubkey // = 32 - case invalidChangeOutput // = 33 - case unsupportedAddressRecipient // = 34 - case badAddressRecipient // = 35 - case ordinalMimeTypeTooLarge // = 38 - case ordinalPayloadTooLarge // = 40 - case UNRECOGNIZED(Int) - - public init() { - self = .ok - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .ok - case 1: self = .invalidWpkhScriptCode - case 2: self = .utxoInvalidLeafHash - case 3: self = .utxoInvalidSighashType - case 4: self = .utxoInvalidLockTime - case 5: self = .utxoInvalidTxid - case 6: self = .utxoSighashFailed - case 7: self = .utxoMissingSighashMethod - case 8: self = .utxoFailedEncoding - case 9: self = .utxoInsufficientInputs - case 10: self = .utxoMissingChangeScriptPubkey - case 11: self = .zeroSequenceNotEnabled - case 12: self = .unmatchedInputSignatureCount - case 13: self = .missingInputBuilder - case 14: self = .missingOutputBuilder - case 15: self = .missingRecipient - case 16: self = .legacyP2TrInvalidVariant - case 17: self = .legacyNoSpendingScriptProvided - case 18: self = .legacyExpectedRedeemScript - case 19: self = .legacyOutpointNotSet - case 20: self = .invalidPrivateKey - case 21: self = .invalidPublicKey - case 22: self = .invalidSighash - case 23: self = .invalidWitnessPubkeyHash - case 24: self = .invalidBrc20Ticker - case 25: self = .invalidEcdsaSignature - case 26: self = .invalidSchnorrSignature - case 27: self = .invalidControlBlock - case 28: self = .invalidPubkeyHash - case 29: self = .invalidTaprootRoot - case 30: self = .invalidRedeemScript - case 31: self = .invalidWitnessRedeemScriptHash - case 32: self = .invalidTaprootTweakedPubkey - case 33: self = .invalidChangeOutput - case 34: self = .unsupportedAddressRecipient - case 35: self = .badAddressRecipient - case 36: self = .legacyNoPrivateKey - case 37: self = .legacyNoPlanProvided - case 38: self = .ordinalMimeTypeTooLarge - case 39: self = .invalidWitnessEncoding - case 40: self = .ordinalPayloadTooLarge - case 41: self = .missingInscription - case 42: self = .missingTaggedOutput - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .ok: return 0 - case .invalidWpkhScriptCode: return 1 - case .utxoInvalidLeafHash: return 2 - case .utxoInvalidSighashType: return 3 - case .utxoInvalidLockTime: return 4 - case .utxoInvalidTxid: return 5 - case .utxoSighashFailed: return 6 - case .utxoMissingSighashMethod: return 7 - case .utxoFailedEncoding: return 8 - case .utxoInsufficientInputs: return 9 - case .utxoMissingChangeScriptPubkey: return 10 - case .zeroSequenceNotEnabled: return 11 - case .unmatchedInputSignatureCount: return 12 - case .missingInputBuilder: return 13 - case .missingOutputBuilder: return 14 - case .missingRecipient: return 15 - case .legacyP2TrInvalidVariant: return 16 - case .legacyNoSpendingScriptProvided: return 17 - case .legacyExpectedRedeemScript: return 18 - case .legacyOutpointNotSet: return 19 - case .invalidPrivateKey: return 20 - case .invalidPublicKey: return 21 - case .invalidSighash: return 22 - case .invalidWitnessPubkeyHash: return 23 - case .invalidBrc20Ticker: return 24 - case .invalidEcdsaSignature: return 25 - case .invalidSchnorrSignature: return 26 - case .invalidControlBlock: return 27 - case .invalidPubkeyHash: return 28 - case .invalidTaprootRoot: return 29 - case .invalidRedeemScript: return 30 - case .invalidWitnessRedeemScriptHash: return 31 - case .invalidTaprootTweakedPubkey: return 32 - case .invalidChangeOutput: return 33 - case .unsupportedAddressRecipient: return 34 - case .badAddressRecipient: return 35 - case .legacyNoPrivateKey: return 36 - case .legacyNoPlanProvided: return 37 - case .ordinalMimeTypeTooLarge: return 38 - case .invalidWitnessEncoding: return 39 - case .ordinalPayloadTooLarge: return 40 - case .missingInscription: return 41 - case .missingTaggedOutput: return 42 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_BitcoinV2_Proto_Error: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_BitcoinV2_Proto_Error] = [ - .ok, - .utxoInvalidLeafHash, - .utxoInvalidSighashType, - .utxoInvalidLockTime, - .utxoInvalidTxid, - .utxoSighashFailed, - .utxoMissingSighashMethod, - .utxoFailedEncoding, - .utxoInsufficientInputs, - .utxoMissingChangeScriptPubkey, - .zeroSequenceNotEnabled, - .unmatchedInputSignatureCount, - .missingInputBuilder, - .missingOutputBuilder, - .missingRecipient, - .missingInscription, - .missingTaggedOutput, - .legacyP2TrInvalidVariant, - .legacyNoSpendingScriptProvided, - .legacyExpectedRedeemScript, - .legacyOutpointNotSet, - .legacyNoPrivateKey, - .legacyNoPlanProvided, - .invalidPrivateKey, - .invalidPublicKey, - .invalidSighash, - .invalidWitnessPubkeyHash, - .invalidBrc20Ticker, - .invalidEcdsaSignature, - .invalidSchnorrSignature, - .invalidControlBlock, - .invalidPubkeyHash, - .invalidTaprootRoot, - .invalidRedeemScript, - .invalidWpkhScriptCode, - .invalidWitnessRedeemScriptHash, - .invalidWitnessEncoding, - .invalidTaprootTweakedPubkey, - .invalidChangeOutput, - .unsupportedAddressRecipient, - .badAddressRecipient, - .ordinalMimeTypeTooLarge, - .ordinalPayloadTooLarge, - ] -} - -#endif // swift(>=4.2) - -public struct TW_BitcoinV2_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// (optional) The protocol version, is currently expected to be 1 or 2. - /// Version 2 by default. - public var version: Int32 = 0 - - /// Only required if the `sign` method is called. - public var privateKey: Data = Data() - - /// (optional) Block height or timestamp indicating at what point transactions can be - /// included in a block. None by default (zero value). - public var lockTime: TW_Utxo_Proto_LockTime { - get {return _lockTime ?? TW_Utxo_Proto_LockTime()} - set {_lockTime = newValue} - } - /// Returns true if `lockTime` has been explicitly set. - public var hasLockTime: Bool {return self._lockTime != nil} - /// Clears the value of `lockTime`. Subsequent reads from it will return its default value. - public mutating func clearLockTime() {self._lockTime = nil} - - /// The inputs to spend. - public var inputs: [TW_BitcoinV2_Proto_Input] = [] - - /// The output of the transaction. Note that the change output is specified - /// in the `change_output` field. - public var outputs: [TW_BitcoinV2_Proto_Output] = [] - - /// How the inputs should be selected. - public var inputSelector: TW_Utxo_Proto_InputSelector = .useAll - - /// (optional) The amount of satoshis per vbyte ("satVb"), used for fee calculation. - public var feePerVb: UInt64 = 0 - - /// The change output to be added (return to sender). - /// The `value` can be left at 0. - public var changeOutput: TW_BitcoinV2_Proto_Output { - get {return _changeOutput ?? TW_BitcoinV2_Proto_Output()} - set {_changeOutput = newValue} - } - /// Returns true if `changeOutput` has been explicitly set. - public var hasChangeOutput: Bool {return self._changeOutput != nil} - /// Clears the value of `changeOutput`. Subsequent reads from it will return its default value. - public mutating func clearChangeOutput() {self._changeOutput = nil} - - /// Explicility disable change output creation. - public var disableChangeOutput: Bool = false - - public var dangerousUseFixedSchnorrRng: Bool = false - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _lockTime: TW_Utxo_Proto_LockTime? = nil - fileprivate var _changeOutput: TW_BitcoinV2_Proto_Output? = nil -} - -public struct TW_BitcoinV2_Proto_Input { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Use an individual private key for this input. Only required if the `sign` - /// method is called. - public var privateKey: Data = Data() - - /// The referenced transaction ID in REVERSED order. - public var txid: Data = Data() - - /// The position in the previous transactions output that this input - /// references. - public var vout: UInt32 = 0 - - /// The sequence number, used for timelocks, replace-by-fee, etc. Normally - /// this number is simply 4294967295 (0xFFFFFFFF) . - public var sequence: UInt32 = 0 - - /// If the sequence is a zero value, this field must be set to `true`. - public var sequenceEnableZero: Bool = false - - /// The amount of satoshis of this input. Required for producing - /// Segwit/Taproot transactions. - public var value: UInt64 = 0 - - /// The sighash type, normally `SighashType::UseDefault` (All). - public var sighashType: TW_Utxo_Proto_SighashType = .useDefault - - /// The reciepient of this input (the spender) - public var toRecipient: TW_BitcoinV2_Proto_Input.OneOf_ToRecipient? = nil - - /// Construct input with a buildler pattern. - public var builder: TW_BitcoinV2_Proto_Input.InputBuilder { - get { - if case .builder(let v)? = toRecipient {return v} - return TW_BitcoinV2_Proto_Input.InputBuilder() - } - set {toRecipient = .builder(newValue)} - } - - /// Construct input by providing raw spending information directly. - public var customScript: TW_BitcoinV2_Proto_Input.InputScriptWitness { - get { - if case .customScript(let v)? = toRecipient {return v} - return TW_BitcoinV2_Proto_Input.InputScriptWitness() - } - set {toRecipient = .customScript(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// The reciepient of this input (the spender) - public enum OneOf_ToRecipient: Equatable { - /// Construct input with a buildler pattern. - case builder(TW_BitcoinV2_Proto_Input.InputBuilder) - /// Construct input by providing raw spending information directly. - case customScript(TW_BitcoinV2_Proto_Input.InputScriptWitness) - - #if !swift(>=4.1) - public static func ==(lhs: TW_BitcoinV2_Proto_Input.OneOf_ToRecipient, rhs: TW_BitcoinV2_Proto_Input.OneOf_ToRecipient) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.builder, .builder): return { - guard case .builder(let l) = lhs, case .builder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.customScript, .customScript): return { - guard case .customScript(let l) = lhs, case .customScript(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public struct InputBuilder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var variant: TW_BitcoinV2_Proto_Input.InputBuilder.OneOf_Variant? = nil - - /// Pay-to-Script-Hash, specify the redeem script. - public var p2Sh: Data { - get { - if case .p2Sh(let v)? = variant {return v} - return Data() - } - set {variant = .p2Sh(newValue)} - } - - /// Pay-to-Public-Key-Hash, specify the public key. - public var p2Pkh: Data { - get { - if case .p2Pkh(let v)? = variant {return v} - return Data() - } - set {variant = .p2Pkh(newValue)} - } - - /// Pay-to-Witness-Script-Hash, specify the redeem script. - public var p2Wsh: Data { - get { - if case .p2Wsh(let v)? = variant {return v} - return Data() - } - set {variant = .p2Wsh(newValue)} - } - - /// Pay-to-Public-Key-Hash, specify the public key. - public var p2Wpkh: Data { - get { - if case .p2Wpkh(let v)? = variant {return v} - return Data() - } - set {variant = .p2Wpkh(newValue)} - } - - /// Pay-to-Taproot-key-path (balance transfers). - public var p2TrKeyPath: TW_BitcoinV2_Proto_Input.InputTaprootKeyPath { - get { - if case .p2TrKeyPath(let v)? = variant {return v} - return TW_BitcoinV2_Proto_Input.InputTaprootKeyPath() - } - set {variant = .p2TrKeyPath(newValue)} - } - - /// Pay-to-Taproot-script-path (complex transfers). - public var p2TrScriptPath: TW_BitcoinV2_Proto_Input.InputTaprootScriptPath { - get { - if case .p2TrScriptPath(let v)? = variant {return v} - return TW_BitcoinV2_Proto_Input.InputTaprootScriptPath() - } - set {variant = .p2TrScriptPath(newValue)} - } - - /// Create a BRC20 inscription. - public var brc20Inscribe: TW_BitcoinV2_Proto_Input.InputBrc20Inscription { - get { - if case .brc20Inscribe(let v)? = variant {return v} - return TW_BitcoinV2_Proto_Input.InputBrc20Inscription() - } - set {variant = .brc20Inscribe(newValue)} - } - - /// Create an Ordinal (NFT) inscriptiohn. - public var ordinalInscribe: TW_BitcoinV2_Proto_Input.InputOrdinalInscription { - get { - if case .ordinalInscribe(let v)? = variant {return v} - return TW_BitcoinV2_Proto_Input.InputOrdinalInscription() - } - set {variant = .ordinalInscribe(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_Variant: Equatable { - /// Pay-to-Script-Hash, specify the redeem script. - case p2Sh(Data) - /// Pay-to-Public-Key-Hash, specify the public key. - case p2Pkh(Data) - /// Pay-to-Witness-Script-Hash, specify the redeem script. - case p2Wsh(Data) - /// Pay-to-Public-Key-Hash, specify the public key. - case p2Wpkh(Data) - /// Pay-to-Taproot-key-path (balance transfers). - case p2TrKeyPath(TW_BitcoinV2_Proto_Input.InputTaprootKeyPath) - /// Pay-to-Taproot-script-path (complex transfers). - case p2TrScriptPath(TW_BitcoinV2_Proto_Input.InputTaprootScriptPath) - /// Create a BRC20 inscription. - case brc20Inscribe(TW_BitcoinV2_Proto_Input.InputBrc20Inscription) - /// Create an Ordinal (NFT) inscriptiohn. - case ordinalInscribe(TW_BitcoinV2_Proto_Input.InputOrdinalInscription) - - #if !swift(>=4.1) - public static func ==(lhs: TW_BitcoinV2_Proto_Input.InputBuilder.OneOf_Variant, rhs: TW_BitcoinV2_Proto_Input.InputBuilder.OneOf_Variant) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.p2Sh, .p2Sh): return { - guard case .p2Sh(let l) = lhs, case .p2Sh(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.p2Pkh, .p2Pkh): return { - guard case .p2Pkh(let l) = lhs, case .p2Pkh(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.p2Wsh, .p2Wsh): return { - guard case .p2Wsh(let l) = lhs, case .p2Wsh(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.p2Wpkh, .p2Wpkh): return { - guard case .p2Wpkh(let l) = lhs, case .p2Wpkh(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.p2TrKeyPath, .p2TrKeyPath): return { - guard case .p2TrKeyPath(let l) = lhs, case .p2TrKeyPath(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.p2TrScriptPath, .p2TrScriptPath): return { - guard case .p2TrScriptPath(let l) = lhs, case .p2TrScriptPath(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.brc20Inscribe, .brc20Inscribe): return { - guard case .brc20Inscribe(let l) = lhs, case .brc20Inscribe(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.ordinalInscribe, .ordinalInscribe): return { - guard case .ordinalInscribe(let l) = lhs, case .ordinalInscribe(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} - } - - public struct InputScriptWitness { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The spending condition of this input. - public var scriptPubkey: Data = Data() - - /// The claiming script for this input (non-Segwit/non-Taproot) - public var scriptSig: Data = Data() - - /// The claiming script for this input (Segwit/Taproot) - public var witnessItems: [Data] = [] - - /// The signing method. - public var signingMethod: TW_Utxo_Proto_SigningMethod = .legacy - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public struct InputTaprootKeyPath { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Whether only one prevout should be used to calculate the Sighash. - /// Normally this is `false`. - public var onePrevout: Bool = false - - /// The recipient. - public var publicKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public struct InputTaprootScriptPath { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Whether only one prevout should be used to calculate the Sighash. - /// Normally this is `false`. - public var onePrevout: Bool = false - - /// The payload of the Taproot transaction. - public var payload: Data = Data() - - /// The control block of the Taproot transaction required for claiming. - public var controlBlock: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public struct InputOrdinalInscription { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Whether only one prevout should be used to calculate the Sighash. - /// Normally this is `false`. - public var onePrevout: Bool = false - - /// The recipient of the inscription, usually the sender. - public var inscribeTo: Data = Data() - - /// The MIME type of the inscription, such as `image/png`, etc. - public var mimeType: String = String() - - /// The actual inscription content. - public var payload: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public struct InputBrc20Inscription { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var onePrevout: Bool = false - - /// The recipient of the inscription, usually the sender. - public var inscribeTo: Data = Data() - - /// The ticker of the BRC20 inscription. - public var ticker: String = String() - - /// The BRC20 token transfer amount. - public var transferAmount: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public init() {} -} - -public struct TW_BitcoinV2_Proto_Output { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The amount of satoshis to spend. - public var value: UInt64 = 0 - - public var toRecipient: TW_BitcoinV2_Proto_Output.OneOf_ToRecipient? = nil - - /// Construct output with builder pattern. - public var builder: TW_BitcoinV2_Proto_Output.OutputBuilder { - get { - if case .builder(let v)? = toRecipient {return v} - return TW_BitcoinV2_Proto_Output.OutputBuilder() - } - set {toRecipient = .builder(newValue)} - } - - /// Construct output by providing the scriptPubkey directly. - public var customScriptPubkey: Data { - get { - if case .customScriptPubkey(let v)? = toRecipient {return v} - return Data() - } - set {toRecipient = .customScriptPubkey(newValue)} - } - - /// Derive the expected output from the provided address. - public var fromAddress: String { - get { - if case .fromAddress(let v)? = toRecipient {return v} - return String() - } - set {toRecipient = .fromAddress(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_ToRecipient: Equatable { - /// Construct output with builder pattern. - case builder(TW_BitcoinV2_Proto_Output.OutputBuilder) - /// Construct output by providing the scriptPubkey directly. - case customScriptPubkey(Data) - /// Derive the expected output from the provided address. - case fromAddress(String) - - #if !swift(>=4.1) - public static func ==(lhs: TW_BitcoinV2_Proto_Output.OneOf_ToRecipient, rhs: TW_BitcoinV2_Proto_Output.OneOf_ToRecipient) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.builder, .builder): return { - guard case .builder(let l) = lhs, case .builder(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.customScriptPubkey, .customScriptPubkey): return { - guard case .customScriptPubkey(let l) = lhs, case .customScriptPubkey(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.fromAddress, .fromAddress): return { - guard case .fromAddress(let l) = lhs, case .fromAddress(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public struct OutputBuilder { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var variant: TW_BitcoinV2_Proto_Output.OutputBuilder.OneOf_Variant? = nil - - /// Pay-to-Script-Hash, specify the hash. - public var p2Sh: TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash { - get { - if case .p2Sh(let v)? = variant {return v} - return TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash() - } - set {variant = .p2Sh(newValue)} - } - - /// Pay-to-Public-Key-Hash - public var p2Pkh: TW_BitcoinV2_Proto_ToPublicKeyOrHash { - get { - if case .p2Pkh(let v)? = variant {return v} - return TW_BitcoinV2_Proto_ToPublicKeyOrHash() - } - set {variant = .p2Pkh(newValue)} - } - - /// Pay-to-Witness-Script-Hash, specify the hash. - public var p2Wsh: TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash { - get { - if case .p2Wsh(let v)? = variant {return v} - return TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash() - } - set {variant = .p2Wsh(newValue)} - } - - /// Pay-to-Public-Key-Hash - public var p2Wpkh: TW_BitcoinV2_Proto_ToPublicKeyOrHash { - get { - if case .p2Wpkh(let v)? = variant {return v} - return TW_BitcoinV2_Proto_ToPublicKeyOrHash() - } - set {variant = .p2Wpkh(newValue)} - } - - /// Pay-to-Taproot-key-path (balance transfers), specify the public key. - public var p2TrKeyPath: Data { - get { - if case .p2TrKeyPath(let v)? = variant {return v} - return Data() - } - set {variant = .p2TrKeyPath(newValue)} - } - - /// Pay-to-Taproot-script-path (complex transfers) - public var p2TrScriptPath: TW_BitcoinV2_Proto_Output.OutputTaprootScriptPath { - get { - if case .p2TrScriptPath(let v)? = variant {return v} - return TW_BitcoinV2_Proto_Output.OutputTaprootScriptPath() - } - set {variant = .p2TrScriptPath(newValue)} - } - - public var p2TrDangerousAssumeTweaked: Data { - get { - if case .p2TrDangerousAssumeTweaked(let v)? = variant {return v} - return Data() - } - set {variant = .p2TrDangerousAssumeTweaked(newValue)} - } - - public var brc20Inscribe: TW_BitcoinV2_Proto_Output.OutputBrc20Inscription { - get { - if case .brc20Inscribe(let v)? = variant {return v} - return TW_BitcoinV2_Proto_Output.OutputBrc20Inscription() - } - set {variant = .brc20Inscribe(newValue)} - } - - public var ordinalInscribe: TW_BitcoinV2_Proto_Output.OutputOrdinalInscription { - get { - if case .ordinalInscribe(let v)? = variant {return v} - return TW_BitcoinV2_Proto_Output.OutputOrdinalInscription() - } - set {variant = .ordinalInscribe(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_Variant: Equatable { - /// Pay-to-Script-Hash, specify the hash. - case p2Sh(TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash) - /// Pay-to-Public-Key-Hash - case p2Pkh(TW_BitcoinV2_Proto_ToPublicKeyOrHash) - /// Pay-to-Witness-Script-Hash, specify the hash. - case p2Wsh(TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash) - /// Pay-to-Public-Key-Hash - case p2Wpkh(TW_BitcoinV2_Proto_ToPublicKeyOrHash) - /// Pay-to-Taproot-key-path (balance transfers), specify the public key. - case p2TrKeyPath(Data) - /// Pay-to-Taproot-script-path (complex transfers) - case p2TrScriptPath(TW_BitcoinV2_Proto_Output.OutputTaprootScriptPath) - case p2TrDangerousAssumeTweaked(Data) - case brc20Inscribe(TW_BitcoinV2_Proto_Output.OutputBrc20Inscription) - case ordinalInscribe(TW_BitcoinV2_Proto_Output.OutputOrdinalInscription) - - #if !swift(>=4.1) - public static func ==(lhs: TW_BitcoinV2_Proto_Output.OutputBuilder.OneOf_Variant, rhs: TW_BitcoinV2_Proto_Output.OutputBuilder.OneOf_Variant) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.p2Sh, .p2Sh): return { - guard case .p2Sh(let l) = lhs, case .p2Sh(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.p2Pkh, .p2Pkh): return { - guard case .p2Pkh(let l) = lhs, case .p2Pkh(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.p2Wsh, .p2Wsh): return { - guard case .p2Wsh(let l) = lhs, case .p2Wsh(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.p2Wpkh, .p2Wpkh): return { - guard case .p2Wpkh(let l) = lhs, case .p2Wpkh(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.p2TrKeyPath, .p2TrKeyPath): return { - guard case .p2TrKeyPath(let l) = lhs, case .p2TrKeyPath(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.p2TrScriptPath, .p2TrScriptPath): return { - guard case .p2TrScriptPath(let l) = lhs, case .p2TrScriptPath(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.p2TrDangerousAssumeTweaked, .p2TrDangerousAssumeTweaked): return { - guard case .p2TrDangerousAssumeTweaked(let l) = lhs, case .p2TrDangerousAssumeTweaked(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.brc20Inscribe, .brc20Inscribe): return { - guard case .brc20Inscribe(let l) = lhs, case .brc20Inscribe(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.ordinalInscribe, .ordinalInscribe): return { - guard case .ordinalInscribe(let l) = lhs, case .ordinalInscribe(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} - } - - public struct OutputRedeemScriptOrHash { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var variant: TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash.OneOf_Variant? = nil - - public var redeemScript: Data { - get { - if case .redeemScript(let v)? = variant {return v} - return Data() - } - set {variant = .redeemScript(newValue)} - } - - public var hash: Data { - get { - if case .hash(let v)? = variant {return v} - return Data() - } - set {variant = .hash(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_Variant: Equatable { - case redeemScript(Data) - case hash(Data) - - #if !swift(>=4.1) - public static func ==(lhs: TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash.OneOf_Variant, rhs: TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash.OneOf_Variant) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.redeemScript, .redeemScript): return { - guard case .redeemScript(let l) = lhs, case .redeemScript(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.hash, .hash): return { - guard case .hash(let l) = lhs, case .hash(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} - } - - public struct OutputTaprootScriptPath { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The internal key, usually the public key of the recipient. - public var internalKey: Data = Data() - - /// The merkle root of the Taproot script(s), required to compute the sighash. - public var merkleRoot: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public struct OutputOrdinalInscription { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The recipient of the inscription, usually the sender. - public var inscribeTo: Data = Data() - - /// The MIME type of the inscription, such as `image/png`, etc. - public var mimeType: String = String() - - /// The actual inscription content. - public var payload: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public struct OutputBrc20Inscription { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The recipient of the inscription, usually the sender. - public var inscribeTo: Data = Data() - - /// The ticker of the BRC20 inscription. - public var ticker: String = String() - - /// The BRC20 token transfer amount. - public var transferAmount: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public init() {} -} - -public struct TW_BitcoinV2_Proto_ToPublicKeyOrHash { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var toAddress: TW_BitcoinV2_Proto_ToPublicKeyOrHash.OneOf_ToAddress? = nil - - public var pubkey: Data { - get { - if case .pubkey(let v)? = toAddress {return v} - return Data() - } - set {toAddress = .pubkey(newValue)} - } - - public var hash: Data { - get { - if case .hash(let v)? = toAddress {return v} - return Data() - } - set {toAddress = .hash(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_ToAddress: Equatable { - case pubkey(Data) - case hash(Data) - - #if !swift(>=4.1) - public static func ==(lhs: TW_BitcoinV2_Proto_ToPublicKeyOrHash.OneOf_ToAddress, rhs: TW_BitcoinV2_Proto_ToPublicKeyOrHash.OneOf_ToAddress) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.pubkey, .pubkey): return { - guard case .pubkey(let l) = lhs, case .pubkey(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.hash, .hash): return { - guard case .hash(let l) = lhs, case .hash(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -public struct TW_BitcoinV2_Proto_PreSigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// A possible error, `OK` if none. - public var error: TW_BitcoinV2_Proto_Error = .ok - - public var errorMessage: String = String() - - /// The transaction ID in NON-reversed order. Note that this must be reversed - /// when referencing in future transactions. - public var txid: Data = Data() - - //// The sighashes to be signed; ECDSA for legacy and Segwit, Schnorr for Taproot. - public var sighashes: [TW_Utxo_Proto_Sighash] = [] - - /// The raw inputs. - public var utxoInputs: [TW_Utxo_Proto_TxIn] = [] - - /// The raw outputs. - public var utxoOutputs: [TW_BitcoinV2_Proto_PreSigningOutput.TxOut] = [] - - /// The estimated weight of the transaction. - public var weightEstimate: UInt64 = 0 - - /// The estimated fees of the transaction in satoshis. - public var feeEstimate: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// The output of a transaction. - public struct TxOut { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The value of the output (in satoshis). - public var value: UInt64 = 0 - - /// The spending condition of the output. - public var scriptPubkey: Data = Data() - - /// The payload of the Taproot script. - public var taprootPayload: Data = Data() - - /// The optional control block for a Taproot output (P2TR script-path). - public var controlBlock: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public init() {} -} - -public struct TW_BitcoinV2_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// A possible error, `OK` if none. - public var error: TW_BitcoinV2_Proto_Error = .ok - - public var errorMessage: String = String() - - public var transaction: TW_BitcoinV2_Proto_Transaction { - get {return _transaction ?? TW_BitcoinV2_Proto_Transaction()} - set {_transaction = newValue} - } - /// Returns true if `transaction` has been explicitly set. - public var hasTransaction: Bool {return self._transaction != nil} - /// Clears the value of `transaction`. Subsequent reads from it will return its default value. - public mutating func clearTransaction() {self._transaction = nil} - - /// The encoded transaction that submitted to the network. - public var encoded: Data = Data() - - /// The transaction ID in NON-reversed order. Note that this must be reversed - /// when referencing in future transactions. - public var txid: Data = Data() - - /// The total and final weight of the transaction. - public var weight: UInt64 = 0 - - /// The total and final fee of the transaction in satoshis. - public var fee: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _transaction: TW_BitcoinV2_Proto_Transaction? = nil -} - -public struct TW_BitcoinV2_Proto_Transaction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The protocol version, is currently expected to be 1 or 2 (BIP68) - public var version: Int32 = 0 - - /// Block height or timestamp indicating at what point transactions can be - /// included in a block. None by default (zero value). - public var lockTime: TW_Utxo_Proto_LockTime { - get {return _lockTime ?? TW_Utxo_Proto_LockTime()} - set {_lockTime = newValue} - } - /// Returns true if `lockTime` has been explicitly set. - public var hasLockTime: Bool {return self._lockTime != nil} - /// Clears the value of `lockTime`. Subsequent reads from it will return its default value. - public mutating func clearLockTime() {self._lockTime = nil} - - /// The transaction inputs. - public var inputs: [TW_BitcoinV2_Proto_TransactionInput] = [] - - /// The transaction outputs. - public var outputs: [TW_BitcoinV2_Proto_TransactionOutput] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _lockTime: TW_Utxo_Proto_LockTime? = nil -} - -public struct TW_BitcoinV2_Proto_TransactionInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The referenced transaction ID in REVERSED order. - public var txid: Data = Data() - - /// The position in the previous transactions output that this input - /// references. - public var vout: UInt32 = 0 - - /// The sequence number, used for timelocks, replace-by-fee, etc. Normally - /// this number is simply 4294967295 (0xFFFFFFFF) . - public var sequence: UInt32 = 0 - - /// The script for claiming the input (non-Segwit/non-Taproot). - public var scriptSig: Data = Data() - - /// The script for claiming the input (Segit/Taproot). - public var witnessItems: [Data] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_BitcoinV2_Proto_TransactionOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The condition for claiming the output. - public var scriptPubkey: Data = Data() - - /// The amount of satoshis to spend. - public var value: UInt64 = 0 - - /// In case of P2TR script-path (complex scripts), this is the payload that - /// must later be revealed and is required for claiming. - public var taprootPayload: Data = Data() - - /// In case of P2TR script-path (complex scripts), this is the control block - /// required for claiming. - public var controlBlock: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_BitcoinV2_Proto_ComposePlan { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var compose: TW_BitcoinV2_Proto_ComposePlan.OneOf_Compose? = nil - - public var brc20: TW_BitcoinV2_Proto_ComposePlan.ComposeBrc20Plan { - get { - if case .brc20(let v)? = compose {return v} - return TW_BitcoinV2_Proto_ComposePlan.ComposeBrc20Plan() - } - set {compose = .brc20(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_Compose: Equatable { - case brc20(TW_BitcoinV2_Proto_ComposePlan.ComposeBrc20Plan) - - #if !swift(>=4.1) - public static func ==(lhs: TW_BitcoinV2_Proto_ComposePlan.OneOf_Compose, rhs: TW_BitcoinV2_Proto_ComposePlan.OneOf_Compose) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.brc20, .brc20): return { - guard case .brc20(let l) = lhs, case .brc20(let r) = rhs else { preconditionFailure() } - return l == r - }() - } - } - #endif - } - - public struct ComposeBrc20Plan { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// (optional) Sets the private key in the composed transactions. Can - /// also be added manually. - public var privateKey: Data { - get {return _storage._privateKey} - set {_uniqueStorage()._privateKey = newValue} - } - - /// The inputs for the commit transaction. - public var inputs: [TW_BitcoinV2_Proto_Input] { - get {return _storage._inputs} - set {_uniqueStorage()._inputs = newValue} - } - - /// How the inputs for the commit transaction should be selected. - public var inputSelector: TW_Utxo_Proto_InputSelector { - get {return _storage._inputSelector} - set {_uniqueStorage()._inputSelector = newValue} - } - - /// The tagged output of the inscription. Commonly a P2WPKH transaction - /// with the value of 546 (dust limit). - public var taggedOutput: TW_BitcoinV2_Proto_Output { - get {return _storage._taggedOutput ?? TW_BitcoinV2_Proto_Output()} - set {_uniqueStorage()._taggedOutput = newValue} - } - /// Returns true if `taggedOutput` has been explicitly set. - public var hasTaggedOutput: Bool {return _storage._taggedOutput != nil} - /// Clears the value of `taggedOutput`. Subsequent reads from it will return its default value. - public mutating func clearTaggedOutput() {_uniqueStorage()._taggedOutput = nil} - - /// The BRC20 payload to inscribe. - public var inscription: TW_BitcoinV2_Proto_Input.InputBrc20Inscription { - get {return _storage._inscription ?? TW_BitcoinV2_Proto_Input.InputBrc20Inscription()} - set {_uniqueStorage()._inscription = newValue} - } - /// Returns true if `inscription` has been explicitly set. - public var hasInscription: Bool {return _storage._inscription != nil} - /// Clears the value of `inscription`. Subsequent reads from it will return its default value. - public mutating func clearInscription() {_uniqueStorage()._inscription = nil} - - /// The amount of satoshis per vbyte ("satVb"), used for fee calculation. - public var feePerVb: UInt64 { - get {return _storage._feePerVb} - set {_uniqueStorage()._feePerVb = newValue} - } - - /// The change output to be added (return to sender). - /// The `value` can be left at 0. - public var changeOutput: TW_BitcoinV2_Proto_Output { - get {return _storage._changeOutput ?? TW_BitcoinV2_Proto_Output()} - set {_uniqueStorage()._changeOutput = newValue} - } - /// Returns true if `changeOutput` has been explicitly set. - public var hasChangeOutput: Bool {return _storage._changeOutput != nil} - /// Clears the value of `changeOutput`. Subsequent reads from it will return its default value. - public mutating func clearChangeOutput() {_uniqueStorage()._changeOutput = nil} - - /// Explicility disable change output creation. - public var disableChangeOutput: Bool { - get {return _storage._disableChangeOutput} - set {_uniqueStorage()._disableChangeOutput = newValue} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance - } - - public init() {} -} - -public struct TW_BitcoinV2_Proto_TransactionPlan { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// A possible error, `OK` if none. - public var error: TW_BitcoinV2_Proto_Error = .ok - - public var errorMessage: String = String() - - public var plan: TW_BitcoinV2_Proto_TransactionPlan.OneOf_Plan? = nil - - public var brc20: TW_BitcoinV2_Proto_TransactionPlan.Brc20Plan { - get { - if case .brc20(let v)? = plan {return v} - return TW_BitcoinV2_Proto_TransactionPlan.Brc20Plan() - } - set {plan = .brc20(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_Plan: Equatable { - case brc20(TW_BitcoinV2_Proto_TransactionPlan.Brc20Plan) - - #if !swift(>=4.1) - public static func ==(lhs: TW_BitcoinV2_Proto_TransactionPlan.OneOf_Plan, rhs: TW_BitcoinV2_Proto_TransactionPlan.OneOf_Plan) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.brc20, .brc20): return { - guard case .brc20(let l) = lhs, case .brc20(let r) = rhs else { preconditionFailure() } - return l == r - }() - } - } - #endif - } - - public struct Brc20Plan { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var commit: TW_BitcoinV2_Proto_SigningInput { - get {return _storage._commit ?? TW_BitcoinV2_Proto_SigningInput()} - set {_uniqueStorage()._commit = newValue} - } - /// Returns true if `commit` has been explicitly set. - public var hasCommit: Bool {return _storage._commit != nil} - /// Clears the value of `commit`. Subsequent reads from it will return its default value. - public mutating func clearCommit() {_uniqueStorage()._commit = nil} - - public var reveal: TW_BitcoinV2_Proto_SigningInput { - get {return _storage._reveal ?? TW_BitcoinV2_Proto_SigningInput()} - set {_uniqueStorage()._reveal = newValue} - } - /// Returns true if `reveal` has been explicitly set. - public var hasReveal: Bool {return _storage._reveal != nil} - /// Clears the value of `reveal`. Subsequent reads from it will return its default value. - public mutating func clearReveal() {_uniqueStorage()._reveal = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance - } - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.BitcoinV2.Proto" - -extension TW_BitcoinV2_Proto_Error: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "OK"), - 1: .same(proto: "Error_invalid_wpkh_script_code"), - 2: .same(proto: "Error_utxo_invalid_leaf_hash"), - 3: .same(proto: "Error_utxo_invalid_sighash_type"), - 4: .same(proto: "Error_utxo_invalid_lock_time"), - 5: .same(proto: "Error_utxo_invalid_txid"), - 6: .same(proto: "Error_utxo_sighash_failed"), - 7: .same(proto: "Error_utxo_missing_sighash_method"), - 8: .same(proto: "Error_utxo_failed_encoding"), - 9: .same(proto: "Error_utxo_insufficient_inputs"), - 10: .same(proto: "Error_utxo_missing_change_script_pubkey"), - 11: .same(proto: "Error_zero_sequence_not_enabled"), - 12: .same(proto: "Error_unmatched_input_signature_count"), - 13: .same(proto: "Error_missing_input_builder"), - 14: .same(proto: "Error_missing_output_builder"), - 15: .same(proto: "Error_missing_recipient"), - 16: .same(proto: "Error_legacy_p2tr_invalid_variant"), - 17: .same(proto: "Error_legacy_no_spending_script_provided"), - 18: .same(proto: "Error_legacy_expected_redeem_script"), - 19: .same(proto: "Error_legacy_outpoint_not_set"), - 20: .same(proto: "Error_invalid_private_key"), - 21: .same(proto: "Error_invalid_public_key"), - 22: .same(proto: "Error_invalid_sighash"), - 23: .same(proto: "Error_invalid_witness_pubkey_hash"), - 24: .same(proto: "Error_invalid_brc20_ticker"), - 25: .same(proto: "Error_invalid_ecdsa_signature"), - 26: .same(proto: "Error_invalid_schnorr_signature"), - 27: .same(proto: "Error_invalid_control_block"), - 28: .same(proto: "Error_invalid_pubkey_hash"), - 29: .same(proto: "Error_invalid_taproot_root"), - 30: .same(proto: "Error_invalid_redeem_script"), - 31: .same(proto: "Error_invalid_witness_redeem_script_hash"), - 32: .same(proto: "Error_invalid_taproot_tweaked_pubkey"), - 33: .same(proto: "Error_invalid_change_output"), - 34: .same(proto: "Error_unsupported_address_recipient"), - 35: .same(proto: "Error_bad_address_recipient"), - 36: .same(proto: "Error_legacy_no_private_key"), - 37: .same(proto: "Error_legacy_no_plan_provided"), - 38: .same(proto: "Error_ordinal_mime_type_too_large"), - 39: .same(proto: "Error_invalid_witness_encoding"), - 40: .same(proto: "Error_ordinal_payload_too_large"), - 41: .same(proto: "Error_missing_inscription"), - 42: .same(proto: "Error_missing_tagged_output"), - ] -} - -extension TW_BitcoinV2_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "version"), - 2: .standard(proto: "private_key"), - 3: .standard(proto: "lock_time"), - 5: .same(proto: "inputs"), - 6: .same(proto: "outputs"), - 7: .standard(proto: "input_selector"), - 8: .standard(proto: "fee_per_vb"), - 9: .standard(proto: "change_output"), - 10: .standard(proto: "disable_change_output"), - 11: .standard(proto: "dangerous_use_fixed_schnorr_rng"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self.version) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._lockTime) }() - case 5: try { try decoder.decodeRepeatedMessageField(value: &self.inputs) }() - case 6: try { try decoder.decodeRepeatedMessageField(value: &self.outputs) }() - case 7: try { try decoder.decodeSingularEnumField(value: &self.inputSelector) }() - case 8: try { try decoder.decodeSingularUInt64Field(value: &self.feePerVb) }() - case 9: try { try decoder.decodeSingularMessageField(value: &self._changeOutput) }() - case 10: try { try decoder.decodeSingularBoolField(value: &self.disableChangeOutput) }() - case 11: try { try decoder.decodeSingularBoolField(value: &self.dangerousUseFixedSchnorrRng) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.version != 0 { - try visitor.visitSingularInt32Field(value: self.version, fieldNumber: 1) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 2) - } - try { if let v = self._lockTime { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if !self.inputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 5) - } - if !self.outputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 6) - } - if self.inputSelector != .useAll { - try visitor.visitSingularEnumField(value: self.inputSelector, fieldNumber: 7) - } - if self.feePerVb != 0 { - try visitor.visitSingularUInt64Field(value: self.feePerVb, fieldNumber: 8) - } - try { if let v = self._changeOutput { - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - } }() - if self.disableChangeOutput != false { - try visitor.visitSingularBoolField(value: self.disableChangeOutput, fieldNumber: 10) - } - if self.dangerousUseFixedSchnorrRng != false { - try visitor.visitSingularBoolField(value: self.dangerousUseFixedSchnorrRng, fieldNumber: 11) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_SigningInput, rhs: TW_BitcoinV2_Proto_SigningInput) -> Bool { - if lhs.version != rhs.version {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs._lockTime != rhs._lockTime {return false} - if lhs.inputs != rhs.inputs {return false} - if lhs.outputs != rhs.outputs {return false} - if lhs.inputSelector != rhs.inputSelector {return false} - if lhs.feePerVb != rhs.feePerVb {return false} - if lhs._changeOutput != rhs._changeOutput {return false} - if lhs.disableChangeOutput != rhs.disableChangeOutput {return false} - if lhs.dangerousUseFixedSchnorrRng != rhs.dangerousUseFixedSchnorrRng {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Input: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Input" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "private_key"), - 2: .same(proto: "txid"), - 3: .same(proto: "vout"), - 4: .same(proto: "sequence"), - 5: .standard(proto: "sequence_enable_zero"), - 6: .same(proto: "value"), - 7: .standard(proto: "sighash_type"), - 8: .same(proto: "builder"), - 9: .standard(proto: "custom_script"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.txid) }() - case 3: try { try decoder.decodeSingularUInt32Field(value: &self.vout) }() - case 4: try { try decoder.decodeSingularUInt32Field(value: &self.sequence) }() - case 5: try { try decoder.decodeSingularBoolField(value: &self.sequenceEnableZero) }() - case 6: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() - case 7: try { try decoder.decodeSingularEnumField(value: &self.sighashType) }() - case 8: try { - var v: TW_BitcoinV2_Proto_Input.InputBuilder? - var hadOneofValue = false - if let current = self.toRecipient { - hadOneofValue = true - if case .builder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.toRecipient = .builder(v) - } - }() - case 9: try { - var v: TW_BitcoinV2_Proto_Input.InputScriptWitness? - var hadOneofValue = false - if let current = self.toRecipient { - hadOneofValue = true - if case .customScript(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.toRecipient = .customScript(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 1) - } - if !self.txid.isEmpty { - try visitor.visitSingularBytesField(value: self.txid, fieldNumber: 2) - } - if self.vout != 0 { - try visitor.visitSingularUInt32Field(value: self.vout, fieldNumber: 3) - } - if self.sequence != 0 { - try visitor.visitSingularUInt32Field(value: self.sequence, fieldNumber: 4) - } - if self.sequenceEnableZero != false { - try visitor.visitSingularBoolField(value: self.sequenceEnableZero, fieldNumber: 5) - } - if self.value != 0 { - try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 6) - } - if self.sighashType != .useDefault { - try visitor.visitSingularEnumField(value: self.sighashType, fieldNumber: 7) - } - switch self.toRecipient { - case .builder?: try { - guard case .builder(let v)? = self.toRecipient else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case .customScript?: try { - guard case .customScript(let v)? = self.toRecipient else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Input, rhs: TW_BitcoinV2_Proto_Input) -> Bool { - if lhs.privateKey != rhs.privateKey {return false} - if lhs.txid != rhs.txid {return false} - if lhs.vout != rhs.vout {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.sequenceEnableZero != rhs.sequenceEnableZero {return false} - if lhs.value != rhs.value {return false} - if lhs.sighashType != rhs.sighashType {return false} - if lhs.toRecipient != rhs.toRecipient {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Input.InputBuilder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_Input.protoMessageName + ".InputBuilder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "p2sh"), - 2: .same(proto: "p2pkh"), - 3: .same(proto: "p2wsh"), - 6: .same(proto: "p2wpkh"), - 7: .standard(proto: "p2tr_key_path"), - 8: .standard(proto: "p2tr_script_path"), - 9: .standard(proto: "brc20_inscribe"), - 10: .standard(proto: "ordinal_inscribe"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.variant != nil {try decoder.handleConflictingOneOf()} - self.variant = .p2Sh(v) - } - }() - case 2: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.variant != nil {try decoder.handleConflictingOneOf()} - self.variant = .p2Pkh(v) - } - }() - case 3: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.variant != nil {try decoder.handleConflictingOneOf()} - self.variant = .p2Wsh(v) - } - }() - case 6: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.variant != nil {try decoder.handleConflictingOneOf()} - self.variant = .p2Wpkh(v) - } - }() - case 7: try { - var v: TW_BitcoinV2_Proto_Input.InputTaprootKeyPath? - var hadOneofValue = false - if let current = self.variant { - hadOneofValue = true - if case .p2TrKeyPath(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.variant = .p2TrKeyPath(v) - } - }() - case 8: try { - var v: TW_BitcoinV2_Proto_Input.InputTaprootScriptPath? - var hadOneofValue = false - if let current = self.variant { - hadOneofValue = true - if case .p2TrScriptPath(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.variant = .p2TrScriptPath(v) - } - }() - case 9: try { - var v: TW_BitcoinV2_Proto_Input.InputBrc20Inscription? - var hadOneofValue = false - if let current = self.variant { - hadOneofValue = true - if case .brc20Inscribe(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.variant = .brc20Inscribe(v) - } - }() - case 10: try { - var v: TW_BitcoinV2_Proto_Input.InputOrdinalInscription? - var hadOneofValue = false - if let current = self.variant { - hadOneofValue = true - if case .ordinalInscribe(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.variant = .ordinalInscribe(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.variant { - case .p2Sh?: try { - guard case .p2Sh(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 1) - }() - case .p2Pkh?: try { - guard case .p2Pkh(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 2) - }() - case .p2Wsh?: try { - guard case .p2Wsh(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 3) - }() - case .p2Wpkh?: try { - guard case .p2Wpkh(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 6) - }() - case .p2TrKeyPath?: try { - guard case .p2TrKeyPath(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - }() - case .p2TrScriptPath?: try { - guard case .p2TrScriptPath(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case .brc20Inscribe?: try { - guard case .brc20Inscribe(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case .ordinalInscribe?: try { - guard case .ordinalInscribe(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Input.InputBuilder, rhs: TW_BitcoinV2_Proto_Input.InputBuilder) -> Bool { - if lhs.variant != rhs.variant {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Input.InputScriptWitness: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_Input.protoMessageName + ".InputScriptWitness" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "script_pubkey"), - 2: .standard(proto: "script_sig"), - 3: .standard(proto: "witness_items"), - 5: .standard(proto: "signing_method"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.scriptPubkey) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.scriptSig) }() - case 3: try { try decoder.decodeRepeatedBytesField(value: &self.witnessItems) }() - case 5: try { try decoder.decodeSingularEnumField(value: &self.signingMethod) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.scriptPubkey.isEmpty { - try visitor.visitSingularBytesField(value: self.scriptPubkey, fieldNumber: 1) - } - if !self.scriptSig.isEmpty { - try visitor.visitSingularBytesField(value: self.scriptSig, fieldNumber: 2) - } - if !self.witnessItems.isEmpty { - try visitor.visitRepeatedBytesField(value: self.witnessItems, fieldNumber: 3) - } - if self.signingMethod != .legacy { - try visitor.visitSingularEnumField(value: self.signingMethod, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Input.InputScriptWitness, rhs: TW_BitcoinV2_Proto_Input.InputScriptWitness) -> Bool { - if lhs.scriptPubkey != rhs.scriptPubkey {return false} - if lhs.scriptSig != rhs.scriptSig {return false} - if lhs.witnessItems != rhs.witnessItems {return false} - if lhs.signingMethod != rhs.signingMethod {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Input.InputTaprootKeyPath: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_Input.protoMessageName + ".InputTaprootKeyPath" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "one_prevout"), - 2: .standard(proto: "public_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBoolField(value: &self.onePrevout) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.onePrevout != false { - try visitor.visitSingularBoolField(value: self.onePrevout, fieldNumber: 1) - } - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Input.InputTaprootKeyPath, rhs: TW_BitcoinV2_Proto_Input.InputTaprootKeyPath) -> Bool { - if lhs.onePrevout != rhs.onePrevout {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Input.InputTaprootScriptPath: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_Input.protoMessageName + ".InputTaprootScriptPath" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "one_prevout"), - 2: .same(proto: "payload"), - 3: .standard(proto: "control_block"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBoolField(value: &self.onePrevout) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.controlBlock) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.onePrevout != false { - try visitor.visitSingularBoolField(value: self.onePrevout, fieldNumber: 1) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 2) - } - if !self.controlBlock.isEmpty { - try visitor.visitSingularBytesField(value: self.controlBlock, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Input.InputTaprootScriptPath, rhs: TW_BitcoinV2_Proto_Input.InputTaprootScriptPath) -> Bool { - if lhs.onePrevout != rhs.onePrevout {return false} - if lhs.payload != rhs.payload {return false} - if lhs.controlBlock != rhs.controlBlock {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Input.InputOrdinalInscription: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_Input.protoMessageName + ".InputOrdinalInscription" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "one_prevout"), - 2: .standard(proto: "inscribe_to"), - 3: .standard(proto: "mime_type"), - 4: .same(proto: "payload"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBoolField(value: &self.onePrevout) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.inscribeTo) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.mimeType) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.onePrevout != false { - try visitor.visitSingularBoolField(value: self.onePrevout, fieldNumber: 1) - } - if !self.inscribeTo.isEmpty { - try visitor.visitSingularBytesField(value: self.inscribeTo, fieldNumber: 2) - } - if !self.mimeType.isEmpty { - try visitor.visitSingularStringField(value: self.mimeType, fieldNumber: 3) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Input.InputOrdinalInscription, rhs: TW_BitcoinV2_Proto_Input.InputOrdinalInscription) -> Bool { - if lhs.onePrevout != rhs.onePrevout {return false} - if lhs.inscribeTo != rhs.inscribeTo {return false} - if lhs.mimeType != rhs.mimeType {return false} - if lhs.payload != rhs.payload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Input.InputBrc20Inscription: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_Input.protoMessageName + ".InputBrc20Inscription" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "one_prevout"), - 2: .standard(proto: "inscribe_to"), - 3: .same(proto: "ticker"), - 4: .standard(proto: "transfer_amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBoolField(value: &self.onePrevout) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.inscribeTo) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.ticker) }() - case 4: try { try decoder.decodeSingularUInt64Field(value: &self.transferAmount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.onePrevout != false { - try visitor.visitSingularBoolField(value: self.onePrevout, fieldNumber: 1) - } - if !self.inscribeTo.isEmpty { - try visitor.visitSingularBytesField(value: self.inscribeTo, fieldNumber: 2) - } - if !self.ticker.isEmpty { - try visitor.visitSingularStringField(value: self.ticker, fieldNumber: 3) - } - if self.transferAmount != 0 { - try visitor.visitSingularUInt64Field(value: self.transferAmount, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Input.InputBrc20Inscription, rhs: TW_BitcoinV2_Proto_Input.InputBrc20Inscription) -> Bool { - if lhs.onePrevout != rhs.onePrevout {return false} - if lhs.inscribeTo != rhs.inscribeTo {return false} - if lhs.ticker != rhs.ticker {return false} - if lhs.transferAmount != rhs.transferAmount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Output: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Output" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - 2: .same(proto: "builder"), - 3: .standard(proto: "custom_script_pubkey"), - 4: .standard(proto: "from_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() - case 2: try { - var v: TW_BitcoinV2_Proto_Output.OutputBuilder? - var hadOneofValue = false - if let current = self.toRecipient { - hadOneofValue = true - if case .builder(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.toRecipient = .builder(v) - } - }() - case 3: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.toRecipient != nil {try decoder.handleConflictingOneOf()} - self.toRecipient = .customScriptPubkey(v) - } - }() - case 4: try { - var v: String? - try decoder.decodeSingularStringField(value: &v) - if let v = v { - if self.toRecipient != nil {try decoder.handleConflictingOneOf()} - self.toRecipient = .fromAddress(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.value != 0 { - try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 1) - } - switch self.toRecipient { - case .builder?: try { - guard case .builder(let v)? = self.toRecipient else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .customScriptPubkey?: try { - guard case .customScriptPubkey(let v)? = self.toRecipient else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 3) - }() - case .fromAddress?: try { - guard case .fromAddress(let v)? = self.toRecipient else { preconditionFailure() } - try visitor.visitSingularStringField(value: v, fieldNumber: 4) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Output, rhs: TW_BitcoinV2_Proto_Output) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.toRecipient != rhs.toRecipient {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Output.OutputBuilder: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_Output.protoMessageName + ".OutputBuilder" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "p2sh"), - 2: .same(proto: "p2pkh"), - 3: .same(proto: "p2wsh"), - 4: .same(proto: "p2wpkh"), - 5: .standard(proto: "p2tr_key_path"), - 6: .standard(proto: "p2tr_script_path"), - 7: .standard(proto: "p2tr_dangerous_assume_tweaked"), - 8: .standard(proto: "brc20_inscribe"), - 9: .standard(proto: "ordinal_inscribe"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash? - var hadOneofValue = false - if let current = self.variant { - hadOneofValue = true - if case .p2Sh(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.variant = .p2Sh(v) - } - }() - case 2: try { - var v: TW_BitcoinV2_Proto_ToPublicKeyOrHash? - var hadOneofValue = false - if let current = self.variant { - hadOneofValue = true - if case .p2Pkh(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.variant = .p2Pkh(v) - } - }() - case 3: try { - var v: TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash? - var hadOneofValue = false - if let current = self.variant { - hadOneofValue = true - if case .p2Wsh(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.variant = .p2Wsh(v) - } - }() - case 4: try { - var v: TW_BitcoinV2_Proto_ToPublicKeyOrHash? - var hadOneofValue = false - if let current = self.variant { - hadOneofValue = true - if case .p2Wpkh(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.variant = .p2Wpkh(v) - } - }() - case 5: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.variant != nil {try decoder.handleConflictingOneOf()} - self.variant = .p2TrKeyPath(v) - } - }() - case 6: try { - var v: TW_BitcoinV2_Proto_Output.OutputTaprootScriptPath? - var hadOneofValue = false - if let current = self.variant { - hadOneofValue = true - if case .p2TrScriptPath(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.variant = .p2TrScriptPath(v) - } - }() - case 7: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.variant != nil {try decoder.handleConflictingOneOf()} - self.variant = .p2TrDangerousAssumeTweaked(v) - } - }() - case 8: try { - var v: TW_BitcoinV2_Proto_Output.OutputBrc20Inscription? - var hadOneofValue = false - if let current = self.variant { - hadOneofValue = true - if case .brc20Inscribe(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.variant = .brc20Inscribe(v) - } - }() - case 9: try { - var v: TW_BitcoinV2_Proto_Output.OutputOrdinalInscription? - var hadOneofValue = false - if let current = self.variant { - hadOneofValue = true - if case .ordinalInscribe(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.variant = .ordinalInscribe(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.variant { - case .p2Sh?: try { - guard case .p2Sh(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .p2Pkh?: try { - guard case .p2Pkh(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .p2Wsh?: try { - guard case .p2Wsh(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .p2Wpkh?: try { - guard case .p2Wpkh(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case .p2TrKeyPath?: try { - guard case .p2TrKeyPath(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 5) - }() - case .p2TrScriptPath?: try { - guard case .p2TrScriptPath(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - }() - case .p2TrDangerousAssumeTweaked?: try { - guard case .p2TrDangerousAssumeTweaked(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 7) - }() - case .brc20Inscribe?: try { - guard case .brc20Inscribe(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case .ordinalInscribe?: try { - guard case .ordinalInscribe(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Output.OutputBuilder, rhs: TW_BitcoinV2_Proto_Output.OutputBuilder) -> Bool { - if lhs.variant != rhs.variant {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_Output.protoMessageName + ".OutputRedeemScriptOrHash" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "redeem_script"), - 2: .same(proto: "hash"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.variant != nil {try decoder.handleConflictingOneOf()} - self.variant = .redeemScript(v) - } - }() - case 2: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.variant != nil {try decoder.handleConflictingOneOf()} - self.variant = .hash(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.variant { - case .redeemScript?: try { - guard case .redeemScript(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 1) - }() - case .hash?: try { - guard case .hash(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 2) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash, rhs: TW_BitcoinV2_Proto_Output.OutputRedeemScriptOrHash) -> Bool { - if lhs.variant != rhs.variant {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Output.OutputTaprootScriptPath: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_Output.protoMessageName + ".OutputTaprootScriptPath" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "internal_key"), - 2: .standard(proto: "merkle_root"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.internalKey) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.merkleRoot) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.internalKey.isEmpty { - try visitor.visitSingularBytesField(value: self.internalKey, fieldNumber: 1) - } - if !self.merkleRoot.isEmpty { - try visitor.visitSingularBytesField(value: self.merkleRoot, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Output.OutputTaprootScriptPath, rhs: TW_BitcoinV2_Proto_Output.OutputTaprootScriptPath) -> Bool { - if lhs.internalKey != rhs.internalKey {return false} - if lhs.merkleRoot != rhs.merkleRoot {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Output.OutputOrdinalInscription: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_Output.protoMessageName + ".OutputOrdinalInscription" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "inscribe_to"), - 2: .standard(proto: "mime_type"), - 3: .same(proto: "payload"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.inscribeTo) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.mimeType) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.inscribeTo.isEmpty { - try visitor.visitSingularBytesField(value: self.inscribeTo, fieldNumber: 1) - } - if !self.mimeType.isEmpty { - try visitor.visitSingularStringField(value: self.mimeType, fieldNumber: 2) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Output.OutputOrdinalInscription, rhs: TW_BitcoinV2_Proto_Output.OutputOrdinalInscription) -> Bool { - if lhs.inscribeTo != rhs.inscribeTo {return false} - if lhs.mimeType != rhs.mimeType {return false} - if lhs.payload != rhs.payload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Output.OutputBrc20Inscription: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_Output.protoMessageName + ".OutputBrc20Inscription" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "inscribe_to"), - 2: .same(proto: "ticker"), - 3: .standard(proto: "transfer_amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.inscribeTo) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.ticker) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.transferAmount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.inscribeTo.isEmpty { - try visitor.visitSingularBytesField(value: self.inscribeTo, fieldNumber: 1) - } - if !self.ticker.isEmpty { - try visitor.visitSingularStringField(value: self.ticker, fieldNumber: 2) - } - if self.transferAmount != 0 { - try visitor.visitSingularUInt64Field(value: self.transferAmount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Output.OutputBrc20Inscription, rhs: TW_BitcoinV2_Proto_Output.OutputBrc20Inscription) -> Bool { - if lhs.inscribeTo != rhs.inscribeTo {return false} - if lhs.ticker != rhs.ticker {return false} - if lhs.transferAmount != rhs.transferAmount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_ToPublicKeyOrHash: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ToPublicKeyOrHash" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "pubkey"), - 2: .same(proto: "hash"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.toAddress != nil {try decoder.handleConflictingOneOf()} - self.toAddress = .pubkey(v) - } - }() - case 2: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.toAddress != nil {try decoder.handleConflictingOneOf()} - self.toAddress = .hash(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.toAddress { - case .pubkey?: try { - guard case .pubkey(let v)? = self.toAddress else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 1) - }() - case .hash?: try { - guard case .hash(let v)? = self.toAddress else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 2) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_ToPublicKeyOrHash, rhs: TW_BitcoinV2_Proto_ToPublicKeyOrHash) -> Bool { - if lhs.toAddress != rhs.toAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_PreSigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".PreSigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "error"), - 2: .standard(proto: "error_message"), - 3: .same(proto: "txid"), - 4: .same(proto: "sighashes"), - 5: .standard(proto: "utxo_inputs"), - 6: .standard(proto: "utxo_outputs"), - 7: .standard(proto: "weight_estimate"), - 8: .standard(proto: "fee_estimate"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.txid) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.sighashes) }() - case 5: try { try decoder.decodeRepeatedMessageField(value: &self.utxoInputs) }() - case 6: try { try decoder.decodeRepeatedMessageField(value: &self.utxoOutputs) }() - case 7: try { try decoder.decodeSingularUInt64Field(value: &self.weightEstimate) }() - case 8: try { try decoder.decodeSingularUInt64Field(value: &self.feeEstimate) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 1) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 2) - } - if !self.txid.isEmpty { - try visitor.visitSingularBytesField(value: self.txid, fieldNumber: 3) - } - if !self.sighashes.isEmpty { - try visitor.visitRepeatedMessageField(value: self.sighashes, fieldNumber: 4) - } - if !self.utxoInputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.utxoInputs, fieldNumber: 5) - } - if !self.utxoOutputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.utxoOutputs, fieldNumber: 6) - } - if self.weightEstimate != 0 { - try visitor.visitSingularUInt64Field(value: self.weightEstimate, fieldNumber: 7) - } - if self.feeEstimate != 0 { - try visitor.visitSingularUInt64Field(value: self.feeEstimate, fieldNumber: 8) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_PreSigningOutput, rhs: TW_BitcoinV2_Proto_PreSigningOutput) -> Bool { - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.txid != rhs.txid {return false} - if lhs.sighashes != rhs.sighashes {return false} - if lhs.utxoInputs != rhs.utxoInputs {return false} - if lhs.utxoOutputs != rhs.utxoOutputs {return false} - if lhs.weightEstimate != rhs.weightEstimate {return false} - if lhs.feeEstimate != rhs.feeEstimate {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_PreSigningOutput.TxOut: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_PreSigningOutput.protoMessageName + ".TxOut" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - 2: .standard(proto: "script_pubkey"), - 3: .standard(proto: "taproot_payload"), - 4: .standard(proto: "control_block"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.scriptPubkey) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.taprootPayload) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.controlBlock) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.value != 0 { - try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 1) - } - if !self.scriptPubkey.isEmpty { - try visitor.visitSingularBytesField(value: self.scriptPubkey, fieldNumber: 2) - } - if !self.taprootPayload.isEmpty { - try visitor.visitSingularBytesField(value: self.taprootPayload, fieldNumber: 3) - } - if !self.controlBlock.isEmpty { - try visitor.visitSingularBytesField(value: self.controlBlock, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_PreSigningOutput.TxOut, rhs: TW_BitcoinV2_Proto_PreSigningOutput.TxOut) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.scriptPubkey != rhs.scriptPubkey {return false} - if lhs.taprootPayload != rhs.taprootPayload {return false} - if lhs.controlBlock != rhs.controlBlock {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "error"), - 2: .standard(proto: "error_message"), - 3: .same(proto: "transaction"), - 4: .same(proto: "encoded"), - 5: .same(proto: "txid"), - 6: .same(proto: "weight"), - 7: .same(proto: "fee"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._transaction) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.txid) }() - case 6: try { try decoder.decodeSingularUInt64Field(value: &self.weight) }() - case 7: try { try decoder.decodeSingularUInt64Field(value: &self.fee) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 1) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 2) - } - try { if let v = self._transaction { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 4) - } - if !self.txid.isEmpty { - try visitor.visitSingularBytesField(value: self.txid, fieldNumber: 5) - } - if self.weight != 0 { - try visitor.visitSingularUInt64Field(value: self.weight, fieldNumber: 6) - } - if self.fee != 0 { - try visitor.visitSingularUInt64Field(value: self.fee, fieldNumber: 7) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_SigningOutput, rhs: TW_BitcoinV2_Proto_SigningOutput) -> Bool { - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs._transaction != rhs._transaction {return false} - if lhs.encoded != rhs.encoded {return false} - if lhs.txid != rhs.txid {return false} - if lhs.weight != rhs.weight {return false} - if lhs.fee != rhs.fee {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_Transaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transaction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "version"), - 2: .standard(proto: "lock_time"), - 3: .same(proto: "inputs"), - 4: .same(proto: "outputs"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self.version) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._lockTime) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.inputs) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.outputs) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.version != 0 { - try visitor.visitSingularInt32Field(value: self.version, fieldNumber: 1) - } - try { if let v = self._lockTime { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - if !self.inputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 3) - } - if !self.outputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_Transaction, rhs: TW_BitcoinV2_Proto_Transaction) -> Bool { - if lhs.version != rhs.version {return false} - if lhs._lockTime != rhs._lockTime {return false} - if lhs.inputs != rhs.inputs {return false} - if lhs.outputs != rhs.outputs {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_TransactionInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "txid"), - 3: .same(proto: "vout"), - 4: .same(proto: "sequence"), - 5: .standard(proto: "script_sig"), - 6: .standard(proto: "witness_items"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.txid) }() - case 3: try { try decoder.decodeSingularUInt32Field(value: &self.vout) }() - case 4: try { try decoder.decodeSingularUInt32Field(value: &self.sequence) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.scriptSig) }() - case 6: try { try decoder.decodeRepeatedBytesField(value: &self.witnessItems) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.txid.isEmpty { - try visitor.visitSingularBytesField(value: self.txid, fieldNumber: 1) - } - if self.vout != 0 { - try visitor.visitSingularUInt32Field(value: self.vout, fieldNumber: 3) - } - if self.sequence != 0 { - try visitor.visitSingularUInt32Field(value: self.sequence, fieldNumber: 4) - } - if !self.scriptSig.isEmpty { - try visitor.visitSingularBytesField(value: self.scriptSig, fieldNumber: 5) - } - if !self.witnessItems.isEmpty { - try visitor.visitRepeatedBytesField(value: self.witnessItems, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_TransactionInput, rhs: TW_BitcoinV2_Proto_TransactionInput) -> Bool { - if lhs.txid != rhs.txid {return false} - if lhs.vout != rhs.vout {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.scriptSig != rhs.scriptSig {return false} - if lhs.witnessItems != rhs.witnessItems {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_TransactionOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "script_pubkey"), - 2: .same(proto: "value"), - 3: .standard(proto: "taproot_payload"), - 4: .standard(proto: "control_block"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.scriptPubkey) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.taprootPayload) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.controlBlock) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.scriptPubkey.isEmpty { - try visitor.visitSingularBytesField(value: self.scriptPubkey, fieldNumber: 1) - } - if self.value != 0 { - try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 2) - } - if !self.taprootPayload.isEmpty { - try visitor.visitSingularBytesField(value: self.taprootPayload, fieldNumber: 3) - } - if !self.controlBlock.isEmpty { - try visitor.visitSingularBytesField(value: self.controlBlock, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_TransactionOutput, rhs: TW_BitcoinV2_Proto_TransactionOutput) -> Bool { - if lhs.scriptPubkey != rhs.scriptPubkey {return false} - if lhs.value != rhs.value {return false} - if lhs.taprootPayload != rhs.taprootPayload {return false} - if lhs.controlBlock != rhs.controlBlock {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_ComposePlan: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ComposePlan" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "brc20"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_BitcoinV2_Proto_ComposePlan.ComposeBrc20Plan? - var hadOneofValue = false - if let current = self.compose { - hadOneofValue = true - if case .brc20(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.compose = .brc20(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if case .brc20(let v)? = self.compose { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_ComposePlan, rhs: TW_BitcoinV2_Proto_ComposePlan) -> Bool { - if lhs.compose != rhs.compose {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_ComposePlan.ComposeBrc20Plan: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_ComposePlan.protoMessageName + ".ComposeBrc20Plan" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "private_key"), - 2: .same(proto: "inputs"), - 3: .standard(proto: "input_selector"), - 4: .standard(proto: "tagged_output"), - 5: .same(proto: "inscription"), - 6: .standard(proto: "fee_per_vb"), - 7: .standard(proto: "change_output"), - 8: .standard(proto: "disable_change_output"), - ] - - fileprivate class _StorageClass { - var _privateKey: Data = Data() - var _inputs: [TW_BitcoinV2_Proto_Input] = [] - var _inputSelector: TW_Utxo_Proto_InputSelector = .useAll - var _taggedOutput: TW_BitcoinV2_Proto_Output? = nil - var _inscription: TW_BitcoinV2_Proto_Input.InputBrc20Inscription? = nil - var _feePerVb: UInt64 = 0 - var _changeOutput: TW_BitcoinV2_Proto_Output? = nil - var _disableChangeOutput: Bool = false - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _privateKey = source._privateKey - _inputs = source._inputs - _inputSelector = source._inputSelector - _taggedOutput = source._taggedOutput - _inscription = source._inscription - _feePerVb = source._feePerVb - _changeOutput = source._changeOutput - _disableChangeOutput = source._disableChangeOutput - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &_storage._privateKey) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &_storage._inputs) }() - case 3: try { try decoder.decodeSingularEnumField(value: &_storage._inputSelector) }() - case 4: try { try decoder.decodeSingularMessageField(value: &_storage._taggedOutput) }() - case 5: try { try decoder.decodeSingularMessageField(value: &_storage._inscription) }() - case 6: try { try decoder.decodeSingularUInt64Field(value: &_storage._feePerVb) }() - case 7: try { try decoder.decodeSingularMessageField(value: &_storage._changeOutput) }() - case 8: try { try decoder.decodeSingularBoolField(value: &_storage._disableChangeOutput) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !_storage._privateKey.isEmpty { - try visitor.visitSingularBytesField(value: _storage._privateKey, fieldNumber: 1) - } - if !_storage._inputs.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._inputs, fieldNumber: 2) - } - if _storage._inputSelector != .useAll { - try visitor.visitSingularEnumField(value: _storage._inputSelector, fieldNumber: 3) - } - try { if let v = _storage._taggedOutput { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - try { if let v = _storage._inscription { - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - } }() - if _storage._feePerVb != 0 { - try visitor.visitSingularUInt64Field(value: _storage._feePerVb, fieldNumber: 6) - } - try { if let v = _storage._changeOutput { - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } }() - if _storage._disableChangeOutput != false { - try visitor.visitSingularBoolField(value: _storage._disableChangeOutput, fieldNumber: 8) - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_ComposePlan.ComposeBrc20Plan, rhs: TW_BitcoinV2_Proto_ComposePlan.ComposeBrc20Plan) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._privateKey != rhs_storage._privateKey {return false} - if _storage._inputs != rhs_storage._inputs {return false} - if _storage._inputSelector != rhs_storage._inputSelector {return false} - if _storage._taggedOutput != rhs_storage._taggedOutput {return false} - if _storage._inscription != rhs_storage._inscription {return false} - if _storage._feePerVb != rhs_storage._feePerVb {return false} - if _storage._changeOutput != rhs_storage._changeOutput {return false} - if _storage._disableChangeOutput != rhs_storage._disableChangeOutput {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_TransactionPlan: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionPlan" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "error"), - 2: .standard(proto: "error_message"), - 3: .same(proto: "brc20"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - case 3: try { - var v: TW_BitcoinV2_Proto_TransactionPlan.Brc20Plan? - var hadOneofValue = false - if let current = self.plan { - hadOneofValue = true - if case .brc20(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.plan = .brc20(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 1) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 2) - } - try { if case .brc20(let v)? = self.plan { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_TransactionPlan, rhs: TW_BitcoinV2_Proto_TransactionPlan) -> Bool { - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.plan != rhs.plan {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_BitcoinV2_Proto_TransactionPlan.Brc20Plan: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_BitcoinV2_Proto_TransactionPlan.protoMessageName + ".Brc20Plan" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "commit"), - 2: .same(proto: "reveal"), - ] - - fileprivate class _StorageClass { - var _commit: TW_BitcoinV2_Proto_SigningInput? = nil - var _reveal: TW_BitcoinV2_Proto_SigningInput? = nil - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _commit = source._commit - _reveal = source._reveal - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &_storage._commit) }() - case 2: try { try decoder.decodeSingularMessageField(value: &_storage._reveal) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = _storage._commit { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - try { if let v = _storage._reveal { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_BitcoinV2_Proto_TransactionPlan.Brc20Plan, rhs: TW_BitcoinV2_Proto_TransactionPlan.Brc20Plan) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._commit != rhs_storage._commit {return false} - if _storage._reveal != rhs_storage._reveal {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Cardano+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Cardano+Proto.swift deleted file mode 100644 index 93465244..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Cardano+Proto.swift +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias CardanoOutPoint = TW_Cardano_Proto_OutPoint -public typealias CardanoTokenAmount = TW_Cardano_Proto_TokenAmount -public typealias CardanoTxInput = TW_Cardano_Proto_TxInput -public typealias CardanoTxOutput = TW_Cardano_Proto_TxOutput -public typealias CardanoTokenBundle = TW_Cardano_Proto_TokenBundle -public typealias CardanoTransfer = TW_Cardano_Proto_Transfer -public typealias CardanoRegisterStakingKey = TW_Cardano_Proto_RegisterStakingKey -public typealias CardanoDeregisterStakingKey = TW_Cardano_Proto_DeregisterStakingKey -public typealias CardanoDelegate = TW_Cardano_Proto_Delegate -public typealias CardanoWithdraw = TW_Cardano_Proto_Withdraw -public typealias CardanoTransactionPlan = TW_Cardano_Proto_TransactionPlan -public typealias CardanoSigningInput = TW_Cardano_Proto_SigningInput -public typealias CardanoSigningOutput = TW_Cardano_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Cardano.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Cardano.pb.swift deleted file mode 100644 index 75326588..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Cardano.pb.swift +++ /dev/null @@ -1,1141 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Cardano.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// A transaction output that can be used as input -public struct TW_Cardano_Proto_OutPoint { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The transaction ID - public var txHash: Data = Data() - - /// The index of this output within the transaction - public var outputIndex: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Represents a token and an amount. Token is identified by PolicyID and name. -public struct TW_Cardano_Proto_TokenAmount { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Policy ID of the token, as hex string (28x2 digits) - public var policyID: String = String() - - /// The name of the asset (within the policy) - public var assetName: String = String() - - /// The amount (uint256, serialized little endian) - public var amount: Data = Data() - - /// The name of the asset (hex encoded). Ignored if `asset_name` is set - public var assetNameHex: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// One input for a transaction -public struct TW_Cardano_Proto_TxInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The UTXO - public var outPoint: TW_Cardano_Proto_OutPoint { - get {return _outPoint ?? TW_Cardano_Proto_OutPoint()} - set {_outPoint = newValue} - } - /// Returns true if `outPoint` has been explicitly set. - public var hasOutPoint: Bool {return self._outPoint != nil} - /// Clears the value of `outPoint`. Subsequent reads from it will return its default value. - public mutating func clearOutPoint() {self._outPoint = nil} - - /// The owner address (string) - public var address: String = String() - - /// ADA amount in the UTXO - public var amount: UInt64 = 0 - - /// optional token amounts in the UTXO - public var tokenAmount: [TW_Cardano_Proto_TokenAmount] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _outPoint: TW_Cardano_Proto_OutPoint? = nil -} - -/// One output for a transaction -public struct TW_Cardano_Proto_TxOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Destination address (string) - public var address: String = String() - - /// ADA amount - public var amount: UInt64 = 0 - - /// optional token amounts - public var tokenAmount: [TW_Cardano_Proto_TokenAmount] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Collection of tokens with amount -public struct TW_Cardano_Proto_TokenBundle { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var token: [TW_Cardano_Proto_TokenAmount] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message for simple Transfer tx -public struct TW_Cardano_Proto_Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Destination address as string - public var toAddress: String = String() - - /// Change address - public var changeAddress: String = String() - - /// Requested ADA amount to be transferred. Output can be different only in use_max_amount case. - /// Note that Cardano has a minimum amount per UTXO, see TWCardanoMinAdaAmount. - public var amount: UInt64 = 0 - - /// Optional token(s) to be transferred - /// Currently only one token type to be transferred per transaction is supported - public var tokenAmount: TW_Cardano_Proto_TokenBundle { - get {return _tokenAmount ?? TW_Cardano_Proto_TokenBundle()} - set {_tokenAmount = newValue} - } - /// Returns true if `tokenAmount` has been explicitly set. - public var hasTokenAmount: Bool {return self._tokenAmount != nil} - /// Clears the value of `tokenAmount`. Subsequent reads from it will return its default value. - public mutating func clearTokenAmount() {self._tokenAmount = nil} - - /// Request max amount option. If set, tx will send all possible amounts from all inputs, including all tokens; there will be no change; requested amount and token_amount is disregarded in this case. - public var useMaxAmount: Bool = false - - /// Optional fee overriding. If left to 0, optimal fee will be calculated. If set, exactly this value will be used as fee. - /// Use it with care, it may result in underfunded or wasteful fee. - public var forceFee: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _tokenAmount: TW_Cardano_Proto_TokenBundle? = nil -} - -/// Register a staking key for the account, prerequisite for Staking. -/// Note: staking messages are typically used with a 1-output-to-self transaction. -public struct TW_Cardano_Proto_RegisterStakingKey { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Staking address (as string) - public var stakingAddress: String = String() - - /// Amount deposited in this TX. Should be 2 ADA (2000000). If not set correctly, TX will be rejected. See also Delegate.deposit_amount. - public var depositAmount: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Deregister staking key. can be done when staking is stopped completely. The Staking deposit is returned at this time. -public struct TW_Cardano_Proto_DeregisterStakingKey { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Staking address (as string) - public var stakingAddress: String = String() - - /// Amount undeposited in this TX. Should be 2 ADA (2000000). If not set correctly, TX will be rejected. See also RegisterStakingKey.deposit_amount. - public var undepositAmount: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Delegate funds in this account to a specified staking pool. -public struct TW_Cardano_Proto_Delegate { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Staking address (as string) - public var stakingAddress: String = String() - - /// PoolID of staking pool - public var poolID: Data = Data() - - /// Amount deposited in this TX. Should be 0. If not set correctly, TX will be rejected. See also RegisterStakingKey.deposit_amount. - public var depositAmount: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Withdraw earned staking reward. -public struct TW_Cardano_Proto_Withdraw { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Staking address (as string) - public var stakingAddress: String = String() - - /// Withdrawal amount. Should match the real value of the earned reward. - public var withdrawAmount: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Describes a preliminary transaction plan. -public struct TW_Cardano_Proto_TransactionPlan { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// total coins in the utxos - public var availableAmount: UInt64 = 0 - - /// coins in the output UTXO - public var amount: UInt64 = 0 - - /// coin amount deducted as fee - public var fee: UInt64 = 0 - - /// coins in the change UTXO - public var change: UInt64 = 0 - - /// coins deposited (going to deposit) in this TX - public var deposit: UInt64 = 0 - - /// coins undeposited (coming from deposit) in this TX - public var undeposit: UInt64 = 0 - - /// total tokens in the utxos (optional) - public var availableTokens: [TW_Cardano_Proto_TokenAmount] = [] - - /// tokens in the output (optional) - public var outputTokens: [TW_Cardano_Proto_TokenAmount] = [] - - /// tokens in the change (optional) - public var changeTokens: [TW_Cardano_Proto_TokenAmount] = [] - - /// The selected UTXOs, subset ot the input UTXOs - public var utxos: [TW_Cardano_Proto_TxInput] = [] - - /// Optional error - public var error: TW_Common_Proto_SigningError = .ok - - /// Optional additional destination addresses, additional to first to_address output - public var extraOutputs: [TW_Cardano_Proto_TxOutput] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Cardano_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Available input UTXOs - public var utxos: [TW_Cardano_Proto_TxInput] { - get {return _storage._utxos} - set {_uniqueStorage()._utxos = newValue} - } - - /// Available private keys (double extended keys); every input UTXO address should be covered - /// In case of Plan only, keys should be present, in correct number - public var privateKey: [Data] { - get {return _storage._privateKey} - set {_uniqueStorage()._privateKey = newValue} - } - - /// Later this can be made oneof if more message types are supported - public var transferMessage: TW_Cardano_Proto_Transfer { - get {return _storage._transferMessage ?? TW_Cardano_Proto_Transfer()} - set {_uniqueStorage()._transferMessage = newValue} - } - /// Returns true if `transferMessage` has been explicitly set. - public var hasTransferMessage: Bool {return _storage._transferMessage != nil} - /// Clears the value of `transferMessage`. Subsequent reads from it will return its default value. - public mutating func clearTransferMessage() {_uniqueStorage()._transferMessage = nil} - - /// Optional, used in case of Staking Key registration (prerequisite for Staking) - public var registerStakingKey: TW_Cardano_Proto_RegisterStakingKey { - get {return _storage._registerStakingKey ?? TW_Cardano_Proto_RegisterStakingKey()} - set {_uniqueStorage()._registerStakingKey = newValue} - } - /// Returns true if `registerStakingKey` has been explicitly set. - public var hasRegisterStakingKey: Bool {return _storage._registerStakingKey != nil} - /// Clears the value of `registerStakingKey`. Subsequent reads from it will return its default value. - public mutating func clearRegisterStakingKey() {_uniqueStorage()._registerStakingKey = nil} - - /// Optional, used in case of (re)delegation - public var delegate: TW_Cardano_Proto_Delegate { - get {return _storage._delegate ?? TW_Cardano_Proto_Delegate()} - set {_uniqueStorage()._delegate = newValue} - } - /// Returns true if `delegate` has been explicitly set. - public var hasDelegate: Bool {return _storage._delegate != nil} - /// Clears the value of `delegate`. Subsequent reads from it will return its default value. - public mutating func clearDelegate() {_uniqueStorage()._delegate = nil} - - /// Optional, used in case of withdraw - public var withdraw: TW_Cardano_Proto_Withdraw { - get {return _storage._withdraw ?? TW_Cardano_Proto_Withdraw()} - set {_uniqueStorage()._withdraw = newValue} - } - /// Returns true if `withdraw` has been explicitly set. - public var hasWithdraw: Bool {return _storage._withdraw != nil} - /// Clears the value of `withdraw`. Subsequent reads from it will return its default value. - public mutating func clearWithdraw() {_uniqueStorage()._withdraw = nil} - - /// Optional - public var deregisterStakingKey: TW_Cardano_Proto_DeregisterStakingKey { - get {return _storage._deregisterStakingKey ?? TW_Cardano_Proto_DeregisterStakingKey()} - set {_uniqueStorage()._deregisterStakingKey = newValue} - } - /// Returns true if `deregisterStakingKey` has been explicitly set. - public var hasDeregisterStakingKey: Bool {return _storage._deregisterStakingKey != nil} - /// Clears the value of `deregisterStakingKey`. Subsequent reads from it will return its default value. - public mutating func clearDeregisterStakingKey() {_uniqueStorage()._deregisterStakingKey = nil} - - /// Time-to-live time of the TX - public var ttl: UInt64 { - get {return _storage._ttl} - set {_uniqueStorage()._ttl = newValue} - } - - /// Optional plan, if missing it will be computed - public var plan: TW_Cardano_Proto_TransactionPlan { - get {return _storage._plan ?? TW_Cardano_Proto_TransactionPlan()} - set {_uniqueStorage()._plan = newValue} - } - /// Returns true if `plan` has been explicitly set. - public var hasPlan: Bool {return _storage._plan != nil} - /// Clears the value of `plan`. Subsequent reads from it will return its default value. - public mutating func clearPlan() {_uniqueStorage()._plan = nil} - - /// extra output UTXOs - public var extraOutputs: [TW_Cardano_Proto_TxOutput] { - get {return _storage._extraOutputs} - set {_uniqueStorage()._extraOutputs = newValue} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Result containing the signed and encoded transaction. -public struct TW_Cardano_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Encoded transaction bytes - public var encoded: Data = Data() - - /// TxID, derived from transaction data, also needed for submission - public var txID: Data = Data() - - /// Optional error - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Cardano.Proto" - -extension TW_Cardano_Proto_OutPoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OutPoint" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "tx_hash"), - 2: .standard(proto: "output_index"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.txHash) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.outputIndex) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.txHash.isEmpty { - try visitor.visitSingularBytesField(value: self.txHash, fieldNumber: 1) - } - if self.outputIndex != 0 { - try visitor.visitSingularUInt64Field(value: self.outputIndex, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cardano_Proto_OutPoint, rhs: TW_Cardano_Proto_OutPoint) -> Bool { - if lhs.txHash != rhs.txHash {return false} - if lhs.outputIndex != rhs.outputIndex {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cardano_Proto_TokenAmount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TokenAmount" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "policy_id"), - 2: .standard(proto: "asset_name"), - 3: .same(proto: "amount"), - 4: .standard(proto: "asset_name_hex"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.policyID) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.assetName) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.assetNameHex) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.policyID.isEmpty { - try visitor.visitSingularStringField(value: self.policyID, fieldNumber: 1) - } - if !self.assetName.isEmpty { - try visitor.visitSingularStringField(value: self.assetName, fieldNumber: 2) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 3) - } - if !self.assetNameHex.isEmpty { - try visitor.visitSingularStringField(value: self.assetNameHex, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cardano_Proto_TokenAmount, rhs: TW_Cardano_Proto_TokenAmount) -> Bool { - if lhs.policyID != rhs.policyID {return false} - if lhs.assetName != rhs.assetName {return false} - if lhs.amount != rhs.amount {return false} - if lhs.assetNameHex != rhs.assetNameHex {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cardano_Proto_TxInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TxInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "out_point"), - 2: .same(proto: "address"), - 3: .same(proto: "amount"), - 4: .standard(proto: "token_amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._outPoint) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.address) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.tokenAmount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._outPoint { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.address.isEmpty { - try visitor.visitSingularStringField(value: self.address, fieldNumber: 2) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 3) - } - if !self.tokenAmount.isEmpty { - try visitor.visitRepeatedMessageField(value: self.tokenAmount, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cardano_Proto_TxInput, rhs: TW_Cardano_Proto_TxInput) -> Bool { - if lhs._outPoint != rhs._outPoint {return false} - if lhs.address != rhs.address {return false} - if lhs.amount != rhs.amount {return false} - if lhs.tokenAmount != rhs.tokenAmount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cardano_Proto_TxOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TxOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "address"), - 2: .same(proto: "amount"), - 3: .standard(proto: "token_amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.address) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.tokenAmount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.address.isEmpty { - try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 2) - } - if !self.tokenAmount.isEmpty { - try visitor.visitRepeatedMessageField(value: self.tokenAmount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cardano_Proto_TxOutput, rhs: TW_Cardano_Proto_TxOutput) -> Bool { - if lhs.address != rhs.address {return false} - if lhs.amount != rhs.amount {return false} - if lhs.tokenAmount != rhs.tokenAmount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cardano_Proto_TokenBundle: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TokenBundle" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "token"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.token) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.token.isEmpty { - try visitor.visitRepeatedMessageField(value: self.token, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cardano_Proto_TokenBundle, rhs: TW_Cardano_Proto_TokenBundle) -> Bool { - if lhs.token != rhs.token {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cardano_Proto_Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "to_address"), - 2: .standard(proto: "change_address"), - 3: .same(proto: "amount"), - 4: .standard(proto: "token_amount"), - 5: .standard(proto: "use_max_amount"), - 6: .standard(proto: "force_fee"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.changeAddress) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._tokenAmount) }() - case 5: try { try decoder.decodeSingularBoolField(value: &self.useMaxAmount) }() - case 6: try { try decoder.decodeSingularUInt64Field(value: &self.forceFee) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 1) - } - if !self.changeAddress.isEmpty { - try visitor.visitSingularStringField(value: self.changeAddress, fieldNumber: 2) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 3) - } - try { if let v = self._tokenAmount { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - if self.useMaxAmount != false { - try visitor.visitSingularBoolField(value: self.useMaxAmount, fieldNumber: 5) - } - if self.forceFee != 0 { - try visitor.visitSingularUInt64Field(value: self.forceFee, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cardano_Proto_Transfer, rhs: TW_Cardano_Proto_Transfer) -> Bool { - if lhs.toAddress != rhs.toAddress {return false} - if lhs.changeAddress != rhs.changeAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs._tokenAmount != rhs._tokenAmount {return false} - if lhs.useMaxAmount != rhs.useMaxAmount {return false} - if lhs.forceFee != rhs.forceFee {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cardano_Proto_RegisterStakingKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".RegisterStakingKey" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "staking_address"), - 2: .standard(proto: "deposit_amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.stakingAddress) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.depositAmount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.stakingAddress.isEmpty { - try visitor.visitSingularStringField(value: self.stakingAddress, fieldNumber: 1) - } - if self.depositAmount != 0 { - try visitor.visitSingularUInt64Field(value: self.depositAmount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cardano_Proto_RegisterStakingKey, rhs: TW_Cardano_Proto_RegisterStakingKey) -> Bool { - if lhs.stakingAddress != rhs.stakingAddress {return false} - if lhs.depositAmount != rhs.depositAmount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cardano_Proto_DeregisterStakingKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DeregisterStakingKey" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "staking_address"), - 2: .standard(proto: "undeposit_amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.stakingAddress) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.undepositAmount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.stakingAddress.isEmpty { - try visitor.visitSingularStringField(value: self.stakingAddress, fieldNumber: 1) - } - if self.undepositAmount != 0 { - try visitor.visitSingularUInt64Field(value: self.undepositAmount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cardano_Proto_DeregisterStakingKey, rhs: TW_Cardano_Proto_DeregisterStakingKey) -> Bool { - if lhs.stakingAddress != rhs.stakingAddress {return false} - if lhs.undepositAmount != rhs.undepositAmount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cardano_Proto_Delegate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Delegate" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "staking_address"), - 2: .standard(proto: "pool_id"), - 3: .standard(proto: "deposit_amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.stakingAddress) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.poolID) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.depositAmount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.stakingAddress.isEmpty { - try visitor.visitSingularStringField(value: self.stakingAddress, fieldNumber: 1) - } - if !self.poolID.isEmpty { - try visitor.visitSingularBytesField(value: self.poolID, fieldNumber: 2) - } - if self.depositAmount != 0 { - try visitor.visitSingularUInt64Field(value: self.depositAmount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cardano_Proto_Delegate, rhs: TW_Cardano_Proto_Delegate) -> Bool { - if lhs.stakingAddress != rhs.stakingAddress {return false} - if lhs.poolID != rhs.poolID {return false} - if lhs.depositAmount != rhs.depositAmount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cardano_Proto_Withdraw: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Withdraw" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "staking_address"), - 2: .standard(proto: "withdraw_amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.stakingAddress) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.withdrawAmount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.stakingAddress.isEmpty { - try visitor.visitSingularStringField(value: self.stakingAddress, fieldNumber: 1) - } - if self.withdrawAmount != 0 { - try visitor.visitSingularUInt64Field(value: self.withdrawAmount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cardano_Proto_Withdraw, rhs: TW_Cardano_Proto_Withdraw) -> Bool { - if lhs.stakingAddress != rhs.stakingAddress {return false} - if lhs.withdrawAmount != rhs.withdrawAmount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cardano_Proto_TransactionPlan: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionPlan" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "available_amount"), - 2: .same(proto: "amount"), - 3: .same(proto: "fee"), - 4: .same(proto: "change"), - 10: .same(proto: "deposit"), - 11: .same(proto: "undeposit"), - 5: .standard(proto: "available_tokens"), - 6: .standard(proto: "output_tokens"), - 7: .standard(proto: "change_tokens"), - 8: .same(proto: "utxos"), - 9: .same(proto: "error"), - 12: .standard(proto: "extra_outputs"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.availableAmount) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.fee) }() - case 4: try { try decoder.decodeSingularUInt64Field(value: &self.change) }() - case 5: try { try decoder.decodeRepeatedMessageField(value: &self.availableTokens) }() - case 6: try { try decoder.decodeRepeatedMessageField(value: &self.outputTokens) }() - case 7: try { try decoder.decodeRepeatedMessageField(value: &self.changeTokens) }() - case 8: try { try decoder.decodeRepeatedMessageField(value: &self.utxos) }() - case 9: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 10: try { try decoder.decodeSingularUInt64Field(value: &self.deposit) }() - case 11: try { try decoder.decodeSingularUInt64Field(value: &self.undeposit) }() - case 12: try { try decoder.decodeRepeatedMessageField(value: &self.extraOutputs) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.availableAmount != 0 { - try visitor.visitSingularUInt64Field(value: self.availableAmount, fieldNumber: 1) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 2) - } - if self.fee != 0 { - try visitor.visitSingularUInt64Field(value: self.fee, fieldNumber: 3) - } - if self.change != 0 { - try visitor.visitSingularUInt64Field(value: self.change, fieldNumber: 4) - } - if !self.availableTokens.isEmpty { - try visitor.visitRepeatedMessageField(value: self.availableTokens, fieldNumber: 5) - } - if !self.outputTokens.isEmpty { - try visitor.visitRepeatedMessageField(value: self.outputTokens, fieldNumber: 6) - } - if !self.changeTokens.isEmpty { - try visitor.visitRepeatedMessageField(value: self.changeTokens, fieldNumber: 7) - } - if !self.utxos.isEmpty { - try visitor.visitRepeatedMessageField(value: self.utxos, fieldNumber: 8) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 9) - } - if self.deposit != 0 { - try visitor.visitSingularUInt64Field(value: self.deposit, fieldNumber: 10) - } - if self.undeposit != 0 { - try visitor.visitSingularUInt64Field(value: self.undeposit, fieldNumber: 11) - } - if !self.extraOutputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.extraOutputs, fieldNumber: 12) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cardano_Proto_TransactionPlan, rhs: TW_Cardano_Proto_TransactionPlan) -> Bool { - if lhs.availableAmount != rhs.availableAmount {return false} - if lhs.amount != rhs.amount {return false} - if lhs.fee != rhs.fee {return false} - if lhs.change != rhs.change {return false} - if lhs.deposit != rhs.deposit {return false} - if lhs.undeposit != rhs.undeposit {return false} - if lhs.availableTokens != rhs.availableTokens {return false} - if lhs.outputTokens != rhs.outputTokens {return false} - if lhs.changeTokens != rhs.changeTokens {return false} - if lhs.utxos != rhs.utxos {return false} - if lhs.error != rhs.error {return false} - if lhs.extraOutputs != rhs.extraOutputs {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cardano_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "utxos"), - 2: .standard(proto: "private_key"), - 3: .standard(proto: "transfer_message"), - 6: .standard(proto: "register_staking_key"), - 7: .same(proto: "delegate"), - 8: .same(proto: "withdraw"), - 9: .standard(proto: "deregister_staking_key"), - 4: .same(proto: "ttl"), - 5: .same(proto: "plan"), - 10: .standard(proto: "extra_outputs"), - ] - - fileprivate class _StorageClass { - var _utxos: [TW_Cardano_Proto_TxInput] = [] - var _privateKey: [Data] = [] - var _transferMessage: TW_Cardano_Proto_Transfer? = nil - var _registerStakingKey: TW_Cardano_Proto_RegisterStakingKey? = nil - var _delegate: TW_Cardano_Proto_Delegate? = nil - var _withdraw: TW_Cardano_Proto_Withdraw? = nil - var _deregisterStakingKey: TW_Cardano_Proto_DeregisterStakingKey? = nil - var _ttl: UInt64 = 0 - var _plan: TW_Cardano_Proto_TransactionPlan? = nil - var _extraOutputs: [TW_Cardano_Proto_TxOutput] = [] - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _utxos = source._utxos - _privateKey = source._privateKey - _transferMessage = source._transferMessage - _registerStakingKey = source._registerStakingKey - _delegate = source._delegate - _withdraw = source._withdraw - _deregisterStakingKey = source._deregisterStakingKey - _ttl = source._ttl - _plan = source._plan - _extraOutputs = source._extraOutputs - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &_storage._utxos) }() - case 2: try { try decoder.decodeRepeatedBytesField(value: &_storage._privateKey) }() - case 3: try { try decoder.decodeSingularMessageField(value: &_storage._transferMessage) }() - case 4: try { try decoder.decodeSingularUInt64Field(value: &_storage._ttl) }() - case 5: try { try decoder.decodeSingularMessageField(value: &_storage._plan) }() - case 6: try { try decoder.decodeSingularMessageField(value: &_storage._registerStakingKey) }() - case 7: try { try decoder.decodeSingularMessageField(value: &_storage._delegate) }() - case 8: try { try decoder.decodeSingularMessageField(value: &_storage._withdraw) }() - case 9: try { try decoder.decodeSingularMessageField(value: &_storage._deregisterStakingKey) }() - case 10: try { try decoder.decodeRepeatedMessageField(value: &_storage._extraOutputs) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !_storage._utxos.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._utxos, fieldNumber: 1) - } - if !_storage._privateKey.isEmpty { - try visitor.visitRepeatedBytesField(value: _storage._privateKey, fieldNumber: 2) - } - try { if let v = _storage._transferMessage { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if _storage._ttl != 0 { - try visitor.visitSingularUInt64Field(value: _storage._ttl, fieldNumber: 4) - } - try { if let v = _storage._plan { - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - } }() - try { if let v = _storage._registerStakingKey { - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } }() - try { if let v = _storage._delegate { - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } }() - try { if let v = _storage._withdraw { - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - } }() - try { if let v = _storage._deregisterStakingKey { - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - } }() - if !_storage._extraOutputs.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._extraOutputs, fieldNumber: 10) - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cardano_Proto_SigningInput, rhs: TW_Cardano_Proto_SigningInput) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._utxos != rhs_storage._utxos {return false} - if _storage._privateKey != rhs_storage._privateKey {return false} - if _storage._transferMessage != rhs_storage._transferMessage {return false} - if _storage._registerStakingKey != rhs_storage._registerStakingKey {return false} - if _storage._delegate != rhs_storage._delegate {return false} - if _storage._withdraw != rhs_storage._withdraw {return false} - if _storage._deregisterStakingKey != rhs_storage._deregisterStakingKey {return false} - if _storage._ttl != rhs_storage._ttl {return false} - if _storage._plan != rhs_storage._plan {return false} - if _storage._extraOutputs != rhs_storage._extraOutputs {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cardano_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .standard(proto: "tx_id"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.txID) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if !self.txID.isEmpty { - try visitor.visitSingularBytesField(value: self.txID, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cardano_Proto_SigningOutput, rhs: TW_Cardano_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.txID != rhs.txID {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Common+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Common+Proto.swift deleted file mode 100644 index 343811cf..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Common+Proto.swift +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias CommonSigningError = TW_Common_Proto_SigningError diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Common.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Common.pb.swift deleted file mode 100644 index ef110d75..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Common.pb.swift +++ /dev/null @@ -1,243 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Common.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Error codes, used in multiple blockchains. -public enum TW_Common_Proto_SigningError: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// This is the OK case, with value=0 - case ok // = 0 - - /// Chain-generic codes: - /// Generic error (used if there is no suitable specific error is adequate) - case errorGeneral // = 1 - - /// Internal error, indicates some very unusual, unexpected case - case errorInternal // = 2 - - /// Chain-generic codes, input related: - /// Low balance: the sender balance is not enough to cover the send and other auxiliary amount such as fee, deposit, or minimal balance. - case errorLowBalance // = 3 - - /// Requested amount is zero, send of 0 makes no sense - case errorZeroAmountRequested // = 4 - - /// One required key is missing (too few or wrong keys are provided) - case errorMissingPrivateKey // = 5 - - /// A private key provided is invalid (e.g. wrong size, usually should be 32 bytes) - case errorInvalidPrivateKey // = 15 - - /// A provided address (e.g. destination address) is invalid - case errorInvalidAddress // = 16 - - /// A provided input UTXO is invalid - case errorInvalidUtxo // = 17 - - /// The amount of an input UTXO is invalid - case errorInvalidUtxoAmount // = 18 - - /// Chain-generic, fee related: - /// Wrong fee is given, probably it is too low to cover minimal fee for the transaction - case errorWrongFee // = 6 - - /// Chain-generic, signing related: - /// General signing error - case errorSigning // = 7 - - /// Resulting transaction is too large - /// [NEO] Transaction too big, fee in GAS needed or try send by parts - case errorTxTooBig // = 8 - - /// UTXO-chain specific, input related: - /// No input UTXOs provided [BTC] - case errorMissingInputUtxos // = 9 - - /// Not enough non-dust input UTXOs to cover requested amount (dust UTXOs are filtered out) [BTC] - case errorNotEnoughUtxos // = 10 - - /// UTXO-chain specific, script related: - /// [BTC] Missing required redeem script - case errorScriptRedeem // = 11 - - /// [BTC] Invalid required output script - case errorScriptOutput // = 12 - - /// [BTC] Unrecognized witness program - case errorScriptWitnessProgram // = 13 - - /// Invalid memo, e.g. [XRP] Invalid tag - case errorInvalidMemo // = 14 - - /// Some input field cannot be parsed - case errorInputParse // = 19 - - /// Multi-input and multi-output transaction not supported - case errorNoSupportN2N // = 20 - - /// Incorrect count of signatures passed to compile - case errorSignaturesCount // = 21 - - /// Incorrect input parameter - case errorInvalidParams // = 22 - - /// Invalid input token amount - case errorInvalidRequestedTokenAmount // = 23 - - /// Operation not supported for the chain. - case errorNotSupported // = 24 - case UNRECOGNIZED(Int) - - public init() { - self = .ok - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .ok - case 1: self = .errorGeneral - case 2: self = .errorInternal - case 3: self = .errorLowBalance - case 4: self = .errorZeroAmountRequested - case 5: self = .errorMissingPrivateKey - case 6: self = .errorWrongFee - case 7: self = .errorSigning - case 8: self = .errorTxTooBig - case 9: self = .errorMissingInputUtxos - case 10: self = .errorNotEnoughUtxos - case 11: self = .errorScriptRedeem - case 12: self = .errorScriptOutput - case 13: self = .errorScriptWitnessProgram - case 14: self = .errorInvalidMemo - case 15: self = .errorInvalidPrivateKey - case 16: self = .errorInvalidAddress - case 17: self = .errorInvalidUtxo - case 18: self = .errorInvalidUtxoAmount - case 19: self = .errorInputParse - case 20: self = .errorNoSupportN2N - case 21: self = .errorSignaturesCount - case 22: self = .errorInvalidParams - case 23: self = .errorInvalidRequestedTokenAmount - case 24: self = .errorNotSupported - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .ok: return 0 - case .errorGeneral: return 1 - case .errorInternal: return 2 - case .errorLowBalance: return 3 - case .errorZeroAmountRequested: return 4 - case .errorMissingPrivateKey: return 5 - case .errorWrongFee: return 6 - case .errorSigning: return 7 - case .errorTxTooBig: return 8 - case .errorMissingInputUtxos: return 9 - case .errorNotEnoughUtxos: return 10 - case .errorScriptRedeem: return 11 - case .errorScriptOutput: return 12 - case .errorScriptWitnessProgram: return 13 - case .errorInvalidMemo: return 14 - case .errorInvalidPrivateKey: return 15 - case .errorInvalidAddress: return 16 - case .errorInvalidUtxo: return 17 - case .errorInvalidUtxoAmount: return 18 - case .errorInputParse: return 19 - case .errorNoSupportN2N: return 20 - case .errorSignaturesCount: return 21 - case .errorInvalidParams: return 22 - case .errorInvalidRequestedTokenAmount: return 23 - case .errorNotSupported: return 24 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Common_Proto_SigningError: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Common_Proto_SigningError] = [ - .ok, - .errorGeneral, - .errorInternal, - .errorLowBalance, - .errorZeroAmountRequested, - .errorMissingPrivateKey, - .errorInvalidPrivateKey, - .errorInvalidAddress, - .errorInvalidUtxo, - .errorInvalidUtxoAmount, - .errorWrongFee, - .errorSigning, - .errorTxTooBig, - .errorMissingInputUtxos, - .errorNotEnoughUtxos, - .errorScriptRedeem, - .errorScriptOutput, - .errorScriptWitnessProgram, - .errorInvalidMemo, - .errorInputParse, - .errorNoSupportN2N, - .errorSignaturesCount, - .errorInvalidParams, - .errorInvalidRequestedTokenAmount, - .errorNotSupported, - ] -} - -#endif // swift(>=4.2) - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -extension TW_Common_Proto_SigningError: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "OK"), - 1: .same(proto: "Error_general"), - 2: .same(proto: "Error_internal"), - 3: .same(proto: "Error_low_balance"), - 4: .same(proto: "Error_zero_amount_requested"), - 5: .same(proto: "Error_missing_private_key"), - 6: .same(proto: "Error_wrong_fee"), - 7: .same(proto: "Error_signing"), - 8: .same(proto: "Error_tx_too_big"), - 9: .same(proto: "Error_missing_input_utxos"), - 10: .same(proto: "Error_not_enough_utxos"), - 11: .same(proto: "Error_script_redeem"), - 12: .same(proto: "Error_script_output"), - 13: .same(proto: "Error_script_witness_program"), - 14: .same(proto: "Error_invalid_memo"), - 15: .same(proto: "Error_invalid_private_key"), - 16: .same(proto: "Error_invalid_address"), - 17: .same(proto: "Error_invalid_utxo"), - 18: .same(proto: "Error_invalid_utxo_amount"), - 19: .same(proto: "Error_input_parse"), - 20: .same(proto: "Error_no_support_n2n"), - 21: .same(proto: "Error_signatures_count"), - 22: .same(proto: "Error_invalid_params"), - 23: .same(proto: "Error_invalid_requested_token_amount"), - 24: .same(proto: "Error_not_supported"), - ] -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Cosmos+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Cosmos+Proto.swift deleted file mode 100644 index e0b61229..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Cosmos+Proto.swift +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias CosmosAmount = TW_Cosmos_Proto_Amount -public typealias CosmosFee = TW_Cosmos_Proto_Fee -public typealias CosmosHeight = TW_Cosmos_Proto_Height -public typealias CosmosTHORChainAsset = TW_Cosmos_Proto_THORChainAsset -public typealias CosmosTHORChainCoin = TW_Cosmos_Proto_THORChainCoin -public typealias CosmosMessage = TW_Cosmos_Proto_Message -public typealias CosmosSigningInput = TW_Cosmos_Proto_SigningInput -public typealias CosmosSigningOutput = TW_Cosmos_Proto_SigningOutput -public typealias CosmosBroadcastMode = TW_Cosmos_Proto_BroadcastMode -public typealias CosmosSigningMode = TW_Cosmos_Proto_SigningMode diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Cosmos.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Cosmos.pb.swift deleted file mode 100644 index 29fc72e9..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Cosmos.pb.swift +++ /dev/null @@ -1,3494 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Cosmos.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Transaction broadcast mode -public enum TW_Cosmos_Proto_BroadcastMode: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Wait for the tx to pass/fail CheckTx, DeliverTx, and be committed in a block - case block // = 0 - - /// Wait for the tx to pass/fail CheckTx - case sync // = 1 - - /// Don't wait for pass/fail CheckTx; send and return tx immediately - case async // = 2 - case UNRECOGNIZED(Int) - - public init() { - self = .block - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .block - case 1: self = .sync - case 2: self = .async - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .block: return 0 - case .sync: return 1 - case .async: return 2 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Cosmos_Proto_BroadcastMode: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Cosmos_Proto_BroadcastMode] = [ - .block, - .sync, - .async, - ] -} - -#endif // swift(>=4.2) - -/// Options for transaction encoding: JSON (Amino, older) or Protobuf. -public enum TW_Cosmos_Proto_SigningMode: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// JSON format, Pre-Stargate - case json // = 0 - - /// Protobuf-serialized (binary), Stargate - case protobuf // = 1 - case UNRECOGNIZED(Int) - - public init() { - self = .json - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .json - case 1: self = .protobuf - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .json: return 0 - case .protobuf: return 1 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Cosmos_Proto_SigningMode: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Cosmos_Proto_SigningMode] = [ - .json, - .protobuf, - ] -} - -#endif // swift(>=4.2) - -/// A denomination and an amount -public struct TW_Cosmos_Proto_Amount { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// name of the denomination - public var denom: String = String() - - /// amount, number as string - public var amount: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Fee incl. gas -public struct TW_Cosmos_Proto_Fee { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Fee amount(s) - public var amounts: [TW_Cosmos_Proto_Amount] = [] - - /// Gas price - public var gas: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Block height, a revision and block height tuple. -/// A height can be compared against another Height for the purposes of updating and freezing clients -public struct TW_Cosmos_Proto_Height { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// the revision that the client is currently on - public var revisionNumber: UInt64 = 0 - - /// the height within the given revision - public var revisionHeight: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Cosmos_Proto_THORChainAsset { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var chain: String = String() - - public var symbol: String = String() - - public var ticker: String = String() - - public var synth: Bool = false - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Cosmos_Proto_THORChainCoin { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var asset: TW_Cosmos_Proto_THORChainAsset { - get {return _asset ?? TW_Cosmos_Proto_THORChainAsset()} - set {_asset = newValue} - } - /// Returns true if `asset` has been explicitly set. - public var hasAsset: Bool {return self._asset != nil} - /// Clears the value of `asset`. Subsequent reads from it will return its default value. - public mutating func clearAsset() {self._asset = nil} - - public var amount: String = String() - - public var decimals: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _asset: TW_Cosmos_Proto_THORChainAsset? = nil -} - -/// A transaction payload message -public struct TW_Cosmos_Proto_Message { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The payload message - public var messageOneof: TW_Cosmos_Proto_Message.OneOf_MessageOneof? = nil - - public var sendCoinsMessage: TW_Cosmos_Proto_Message.Send { - get { - if case .sendCoinsMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.Send() - } - set {messageOneof = .sendCoinsMessage(newValue)} - } - - public var transferTokensMessage: TW_Cosmos_Proto_Message.Transfer { - get { - if case .transferTokensMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.Transfer() - } - set {messageOneof = .transferTokensMessage(newValue)} - } - - public var stakeMessage: TW_Cosmos_Proto_Message.Delegate { - get { - if case .stakeMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.Delegate() - } - set {messageOneof = .stakeMessage(newValue)} - } - - public var unstakeMessage: TW_Cosmos_Proto_Message.Undelegate { - get { - if case .unstakeMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.Undelegate() - } - set {messageOneof = .unstakeMessage(newValue)} - } - - public var restakeMessage: TW_Cosmos_Proto_Message.BeginRedelegate { - get { - if case .restakeMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.BeginRedelegate() - } - set {messageOneof = .restakeMessage(newValue)} - } - - public var withdrawStakeRewardMessage: TW_Cosmos_Proto_Message.WithdrawDelegationReward { - get { - if case .withdrawStakeRewardMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.WithdrawDelegationReward() - } - set {messageOneof = .withdrawStakeRewardMessage(newValue)} - } - - public var rawJsonMessage: TW_Cosmos_Proto_Message.RawJSON { - get { - if case .rawJsonMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.RawJSON() - } - set {messageOneof = .rawJsonMessage(newValue)} - } - - public var wasmTerraExecuteContractTransferMessage: TW_Cosmos_Proto_Message.WasmTerraExecuteContractTransfer { - get { - if case .wasmTerraExecuteContractTransferMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.WasmTerraExecuteContractTransfer() - } - set {messageOneof = .wasmTerraExecuteContractTransferMessage(newValue)} - } - - public var wasmTerraExecuteContractSendMessage: TW_Cosmos_Proto_Message.WasmTerraExecuteContractSend { - get { - if case .wasmTerraExecuteContractSendMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.WasmTerraExecuteContractSend() - } - set {messageOneof = .wasmTerraExecuteContractSendMessage(newValue)} - } - - public var thorchainSendMessage: TW_Cosmos_Proto_Message.THORChainSend { - get { - if case .thorchainSendMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.THORChainSend() - } - set {messageOneof = .thorchainSendMessage(newValue)} - } - - public var executeContractMessage: TW_Cosmos_Proto_Message.ExecuteContract { - get { - if case .executeContractMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.ExecuteContract() - } - set {messageOneof = .executeContractMessage(newValue)} - } - - public var wasmTerraExecuteContractGeneric: TW_Cosmos_Proto_Message.WasmTerraExecuteContractGeneric { - get { - if case .wasmTerraExecuteContractGeneric(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.WasmTerraExecuteContractGeneric() - } - set {messageOneof = .wasmTerraExecuteContractGeneric(newValue)} - } - - public var wasmExecuteContractTransferMessage: TW_Cosmos_Proto_Message.WasmExecuteContractTransfer { - get { - if case .wasmExecuteContractTransferMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.WasmExecuteContractTransfer() - } - set {messageOneof = .wasmExecuteContractTransferMessage(newValue)} - } - - public var wasmExecuteContractSendMessage: TW_Cosmos_Proto_Message.WasmExecuteContractSend { - get { - if case .wasmExecuteContractSendMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.WasmExecuteContractSend() - } - set {messageOneof = .wasmExecuteContractSendMessage(newValue)} - } - - public var wasmExecuteContractGeneric: TW_Cosmos_Proto_Message.WasmExecuteContractGeneric { - get { - if case .wasmExecuteContractGeneric(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.WasmExecuteContractGeneric() - } - set {messageOneof = .wasmExecuteContractGeneric(newValue)} - } - - public var signDirectMessage: TW_Cosmos_Proto_Message.SignDirect { - get { - if case .signDirectMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.SignDirect() - } - set {messageOneof = .signDirectMessage(newValue)} - } - - public var authGrant: TW_Cosmos_Proto_Message.AuthGrant { - get { - if case .authGrant(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.AuthGrant() - } - set {messageOneof = .authGrant(newValue)} - } - - public var authRevoke: TW_Cosmos_Proto_Message.AuthRevoke { - get { - if case .authRevoke(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.AuthRevoke() - } - set {messageOneof = .authRevoke(newValue)} - } - - public var setWithdrawAddressMessage: TW_Cosmos_Proto_Message.SetWithdrawAddress { - get { - if case .setWithdrawAddressMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.SetWithdrawAddress() - } - set {messageOneof = .setWithdrawAddressMessage(newValue)} - } - - public var msgVote: TW_Cosmos_Proto_Message.MsgVote { - get { - if case .msgVote(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.MsgVote() - } - set {messageOneof = .msgVote(newValue)} - } - - public var msgStrideLiquidStakingStake: TW_Cosmos_Proto_Message.MsgStrideLiquidStakingStake { - get { - if case .msgStrideLiquidStakingStake(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.MsgStrideLiquidStakingStake() - } - set {messageOneof = .msgStrideLiquidStakingStake(newValue)} - } - - public var msgStrideLiquidStakingRedeem: TW_Cosmos_Proto_Message.MsgStrideLiquidStakingRedeem { - get { - if case .msgStrideLiquidStakingRedeem(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.MsgStrideLiquidStakingRedeem() - } - set {messageOneof = .msgStrideLiquidStakingRedeem(newValue)} - } - - public var thorchainDepositMessage: TW_Cosmos_Proto_Message.THORChainDeposit { - get { - if case .thorchainDepositMessage(let v)? = messageOneof {return v} - return TW_Cosmos_Proto_Message.THORChainDeposit() - } - set {messageOneof = .thorchainDepositMessage(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// The payload message - public enum OneOf_MessageOneof: Equatable { - case sendCoinsMessage(TW_Cosmos_Proto_Message.Send) - case transferTokensMessage(TW_Cosmos_Proto_Message.Transfer) - case stakeMessage(TW_Cosmos_Proto_Message.Delegate) - case unstakeMessage(TW_Cosmos_Proto_Message.Undelegate) - case restakeMessage(TW_Cosmos_Proto_Message.BeginRedelegate) - case withdrawStakeRewardMessage(TW_Cosmos_Proto_Message.WithdrawDelegationReward) - case rawJsonMessage(TW_Cosmos_Proto_Message.RawJSON) - case wasmTerraExecuteContractTransferMessage(TW_Cosmos_Proto_Message.WasmTerraExecuteContractTransfer) - case wasmTerraExecuteContractSendMessage(TW_Cosmos_Proto_Message.WasmTerraExecuteContractSend) - case thorchainSendMessage(TW_Cosmos_Proto_Message.THORChainSend) - case executeContractMessage(TW_Cosmos_Proto_Message.ExecuteContract) - case wasmTerraExecuteContractGeneric(TW_Cosmos_Proto_Message.WasmTerraExecuteContractGeneric) - case wasmExecuteContractTransferMessage(TW_Cosmos_Proto_Message.WasmExecuteContractTransfer) - case wasmExecuteContractSendMessage(TW_Cosmos_Proto_Message.WasmExecuteContractSend) - case wasmExecuteContractGeneric(TW_Cosmos_Proto_Message.WasmExecuteContractGeneric) - case signDirectMessage(TW_Cosmos_Proto_Message.SignDirect) - case authGrant(TW_Cosmos_Proto_Message.AuthGrant) - case authRevoke(TW_Cosmos_Proto_Message.AuthRevoke) - case setWithdrawAddressMessage(TW_Cosmos_Proto_Message.SetWithdrawAddress) - case msgVote(TW_Cosmos_Proto_Message.MsgVote) - case msgStrideLiquidStakingStake(TW_Cosmos_Proto_Message.MsgStrideLiquidStakingStake) - case msgStrideLiquidStakingRedeem(TW_Cosmos_Proto_Message.MsgStrideLiquidStakingRedeem) - case thorchainDepositMessage(TW_Cosmos_Proto_Message.THORChainDeposit) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Cosmos_Proto_Message.OneOf_MessageOneof, rhs: TW_Cosmos_Proto_Message.OneOf_MessageOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.sendCoinsMessage, .sendCoinsMessage): return { - guard case .sendCoinsMessage(let l) = lhs, case .sendCoinsMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.transferTokensMessage, .transferTokensMessage): return { - guard case .transferTokensMessage(let l) = lhs, case .transferTokensMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeMessage, .stakeMessage): return { - guard case .stakeMessage(let l) = lhs, case .stakeMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.unstakeMessage, .unstakeMessage): return { - guard case .unstakeMessage(let l) = lhs, case .unstakeMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.restakeMessage, .restakeMessage): return { - guard case .restakeMessage(let l) = lhs, case .restakeMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.withdrawStakeRewardMessage, .withdrawStakeRewardMessage): return { - guard case .withdrawStakeRewardMessage(let l) = lhs, case .withdrawStakeRewardMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.rawJsonMessage, .rawJsonMessage): return { - guard case .rawJsonMessage(let l) = lhs, case .rawJsonMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.wasmTerraExecuteContractTransferMessage, .wasmTerraExecuteContractTransferMessage): return { - guard case .wasmTerraExecuteContractTransferMessage(let l) = lhs, case .wasmTerraExecuteContractTransferMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.wasmTerraExecuteContractSendMessage, .wasmTerraExecuteContractSendMessage): return { - guard case .wasmTerraExecuteContractSendMessage(let l) = lhs, case .wasmTerraExecuteContractSendMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.thorchainSendMessage, .thorchainSendMessage): return { - guard case .thorchainSendMessage(let l) = lhs, case .thorchainSendMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.executeContractMessage, .executeContractMessage): return { - guard case .executeContractMessage(let l) = lhs, case .executeContractMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.wasmTerraExecuteContractGeneric, .wasmTerraExecuteContractGeneric): return { - guard case .wasmTerraExecuteContractGeneric(let l) = lhs, case .wasmTerraExecuteContractGeneric(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.wasmExecuteContractTransferMessage, .wasmExecuteContractTransferMessage): return { - guard case .wasmExecuteContractTransferMessage(let l) = lhs, case .wasmExecuteContractTransferMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.wasmExecuteContractSendMessage, .wasmExecuteContractSendMessage): return { - guard case .wasmExecuteContractSendMessage(let l) = lhs, case .wasmExecuteContractSendMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.wasmExecuteContractGeneric, .wasmExecuteContractGeneric): return { - guard case .wasmExecuteContractGeneric(let l) = lhs, case .wasmExecuteContractGeneric(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.signDirectMessage, .signDirectMessage): return { - guard case .signDirectMessage(let l) = lhs, case .signDirectMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.authGrant, .authGrant): return { - guard case .authGrant(let l) = lhs, case .authGrant(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.authRevoke, .authRevoke): return { - guard case .authRevoke(let l) = lhs, case .authRevoke(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.setWithdrawAddressMessage, .setWithdrawAddressMessage): return { - guard case .setWithdrawAddressMessage(let l) = lhs, case .setWithdrawAddressMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.msgVote, .msgVote): return { - guard case .msgVote(let l) = lhs, case .msgVote(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.msgStrideLiquidStakingStake, .msgStrideLiquidStakingStake): return { - guard case .msgStrideLiquidStakingStake(let l) = lhs, case .msgStrideLiquidStakingStake(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.msgStrideLiquidStakingRedeem, .msgStrideLiquidStakingRedeem): return { - guard case .msgStrideLiquidStakingRedeem(let l) = lhs, case .msgStrideLiquidStakingRedeem(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.thorchainDepositMessage, .thorchainDepositMessage): return { - guard case .thorchainDepositMessage(let l) = lhs, case .thorchainDepositMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - /// AuthorizationType defines the type of staking module authorization type - /// - /// Since: cosmos-sdk 0.43 - public enum AuthorizationType: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type - case unspecified // = 0 - - /// AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate - case delegate // = 1 - - /// AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate - case undelegate // = 2 - - /// AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate - case redelegate // = 3 - case UNRECOGNIZED(Int) - - public init() { - self = .unspecified - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .unspecified - case 1: self = .delegate - case 2: self = .undelegate - case 3: self = .redelegate - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .unspecified: return 0 - case .delegate: return 1 - case .undelegate: return 2 - case .redelegate: return 3 - case .UNRECOGNIZED(let i): return i - } - } - - } - - /// VoteOption enumerates the valid vote options for a given governance proposal. - public enum VoteOption: SwiftProtobuf.Enum { - public typealias RawValue = Int - - ///_UNSPECIFIED defines a no-op vote option. - case unspecified // = 0 - - /// YES defines a yes vote option. - case yes // = 1 - - /// ABSTAIN defines an abstain vote option. - case abstain // = 2 - - /// NO defines a no vote option. - case no // = 3 - - /// NO_WITH_VETO defines a no with veto vote option. - case noWithVeto // = 4 - case UNRECOGNIZED(Int) - - public init() { - self = .unspecified - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .unspecified - case 1: self = .yes - case 2: self = .abstain - case 3: self = .no - case 4: self = .noWithVeto - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .unspecified: return 0 - case .yes: return 1 - case .abstain: return 2 - case .no: return 3 - case .noWithVeto: return 4 - case .UNRECOGNIZED(let i): return i - } - } - - } - - /// cosmos-sdk/MsgSend - public struct Send { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var fromAddress: String = String() - - public var toAddress: String = String() - - public var amounts: [TW_Cosmos_Proto_Amount] = [] - - public var typePrefix: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// cosmos-sdk/MsgTransfer, IBC transfer - public struct Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// IBC port, e.g. "transfer" - public var sourcePort: String = String() - - /// IBC connection channel, e.g. "channel-141", see apis /ibc/applications/transfer/v1beta1/denom_traces (connections) or /node_info (own channel) - public var sourceChannel: String = String() - - public var token: TW_Cosmos_Proto_Amount { - get {return _token ?? TW_Cosmos_Proto_Amount()} - set {_token = newValue} - } - /// Returns true if `token` has been explicitly set. - public var hasToken: Bool {return self._token != nil} - /// Clears the value of `token`. Subsequent reads from it will return its default value. - public mutating func clearToken() {self._token = nil} - - public var sender: String = String() - - public var receiver: String = String() - - /// Timeout block height. Either timeout height or timestamp should be set. - /// Recommendation is to set height, to rev. 1 and block current + 1000 (see api /blocks/latest) - public var timeoutHeight: TW_Cosmos_Proto_Height { - get {return _timeoutHeight ?? TW_Cosmos_Proto_Height()} - set {_timeoutHeight = newValue} - } - /// Returns true if `timeoutHeight` has been explicitly set. - public var hasTimeoutHeight: Bool {return self._timeoutHeight != nil} - /// Clears the value of `timeoutHeight`. Subsequent reads from it will return its default value. - public mutating func clearTimeoutHeight() {self._timeoutHeight = nil} - - /// Timeout timestamp (in nanoseconds) relative to the current block timestamp. Either timeout height or timestamp should be set. - public var timeoutTimestamp: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _token: TW_Cosmos_Proto_Amount? = nil - fileprivate var _timeoutHeight: TW_Cosmos_Proto_Height? = nil - } - - /// cosmos-sdk/MsgDelegate to stake - public struct Delegate { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var delegatorAddress: String = String() - - public var validatorAddress: String = String() - - public var amount: TW_Cosmos_Proto_Amount { - get {return _amount ?? TW_Cosmos_Proto_Amount()} - set {_amount = newValue} - } - /// Returns true if `amount` has been explicitly set. - public var hasAmount: Bool {return self._amount != nil} - /// Clears the value of `amount`. Subsequent reads from it will return its default value. - public mutating func clearAmount() {self._amount = nil} - - public var typePrefix: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _amount: TW_Cosmos_Proto_Amount? = nil - } - - /// cosmos-sdk/MsgUndelegate to unstake - public struct Undelegate { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var delegatorAddress: String = String() - - public var validatorAddress: String = String() - - public var amount: TW_Cosmos_Proto_Amount { - get {return _amount ?? TW_Cosmos_Proto_Amount()} - set {_amount = newValue} - } - /// Returns true if `amount` has been explicitly set. - public var hasAmount: Bool {return self._amount != nil} - /// Clears the value of `amount`. Subsequent reads from it will return its default value. - public mutating func clearAmount() {self._amount = nil} - - public var typePrefix: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _amount: TW_Cosmos_Proto_Amount? = nil - } - - /// cosmos-sdk/MsgBeginRedelegate - public struct BeginRedelegate { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var delegatorAddress: String = String() - - public var validatorSrcAddress: String = String() - - public var validatorDstAddress: String = String() - - public var amount: TW_Cosmos_Proto_Amount { - get {return _amount ?? TW_Cosmos_Proto_Amount()} - set {_amount = newValue} - } - /// Returns true if `amount` has been explicitly set. - public var hasAmount: Bool {return self._amount != nil} - /// Clears the value of `amount`. Subsequent reads from it will return its default value. - public mutating func clearAmount() {self._amount = nil} - - public var typePrefix: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _amount: TW_Cosmos_Proto_Amount? = nil - } - - /// cosmos-sdk/MsgSetWithdrawAddress - public struct SetWithdrawAddress { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var delegatorAddress: String = String() - - public var withdrawAddress: String = String() - - public var typePrefix: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// cosmos-sdk/MsgWithdrawDelegationReward - public struct WithdrawDelegationReward { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var delegatorAddress: String = String() - - public var validatorAddress: String = String() - - public var typePrefix: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public struct ExecuteContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var sender: String = String() - - public var contract: String = String() - - public var executeMsg: String = String() - - public var coins: [TW_Cosmos_Proto_Amount] = [] - - public var typePrefix: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// transfer within wasm/MsgExecuteContract, used by Terra Classic - public struct WasmTerraExecuteContractTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// sender address - public var senderAddress: String = String() - - /// token contract address - public var contractAddress: String = String() - - /// size is uint128, as bigint - public var amount: Data = Data() - - public var recipientAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// send within wasm/MsgExecuteContract, used by Terra Classic - public struct WasmTerraExecuteContractSend { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// sender address - public var senderAddress: String = String() - - /// token contract address - public var contractAddress: String = String() - - /// size is uint128, as bigint - public var amount: Data = Data() - - public var recipientContractAddress: String = String() - - /// execute_msg to be executed in the context of recipient contract - public var msg: String = String() - - /// used in case you are sending native tokens along with this message - public var coin: [String] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// thorchain/MsgSend - public struct THORChainSend { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var fromAddress: Data = Data() - - public var toAddress: Data = Data() - - public var amounts: [TW_Cosmos_Proto_Amount] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// thorchain/MsgDeposit - public struct THORChainDeposit { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var coins: [TW_Cosmos_Proto_THORChainCoin] = [] - - public var memo: String = String() - - public var signer: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// execute within wasm/MsgExecuteContract, used by Terra Classic - public struct WasmTerraExecuteContractGeneric { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// sender address - public var senderAddress: String = String() - - /// token contract address - public var contractAddress: String = String() - - /// execute_msg to be executed in the context of recipient contract - public var executeMsg: String = String() - - /// used in case you are sending native tokens along with this message - /// Gap in field numbering is intentional - public var coins: [TW_Cosmos_Proto_Amount] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// transfer within wasm/MsgExecuteContract - public struct WasmExecuteContractTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// sender address - public var senderAddress: String = String() - - /// token contract address - public var contractAddress: String = String() - - /// size is uint128, as bigint - public var amount: Data = Data() - - public var recipientAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// send within wasm/MsgExecuteContract - public struct WasmExecuteContractSend { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// sender address - public var senderAddress: String = String() - - /// token contract address - public var contractAddress: String = String() - - /// size is uint128, as bigint - public var amount: Data = Data() - - public var recipientContractAddress: String = String() - - /// execute_msg to be executed in the context of recipient contract - public var msg: String = String() - - /// used in case you are sending native tokens along with this message - public var coin: [String] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// execute within wasm/MsgExecuteContract - public struct WasmExecuteContractGeneric { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// sender address - public var senderAddress: String = String() - - /// token contract address - public var contractAddress: String = String() - - /// execute_msg to be executed in the context of recipient contract - public var executeMsg: String = String() - - /// used in case you are sending native tokens along with this message - /// Gap in field numbering is intentional - public var coins: [TW_Cosmos_Proto_Amount] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public struct RawJSON { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var type: String = String() - - public var value: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// For signing an already serialized transaction. Account number and chain ID must be set outside. - public struct SignDirect { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The prepared serialized TxBody - public var bodyBytes: Data = Data() - - /// The prepared serialized AuthInfo - public var authInfoBytes: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// StakeAuthorization defines authorization for delegate/undelegate/redelegate. - /// - /// Since: cosmos-sdk 0.43 - public struct StakeAuthorization { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is - /// empty, there is no spend limit and any amount of coins can be delegated. - public var maxTokens: TW_Cosmos_Proto_Amount { - get {return _maxTokens ?? TW_Cosmos_Proto_Amount()} - set {_maxTokens = newValue} - } - /// Returns true if `maxTokens` has been explicitly set. - public var hasMaxTokens: Bool {return self._maxTokens != nil} - /// Clears the value of `maxTokens`. Subsequent reads from it will return its default value. - public mutating func clearMaxTokens() {self._maxTokens = nil} - - /// validators is the oneof that represents either allow_list or deny_list - public var validators: TW_Cosmos_Proto_Message.StakeAuthorization.OneOf_Validators? = nil - - /// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - /// account. - public var allowList: TW_Cosmos_Proto_Message.StakeAuthorization.Validators { - get { - if case .allowList(let v)? = validators {return v} - return TW_Cosmos_Proto_Message.StakeAuthorization.Validators() - } - set {validators = .allowList(newValue)} - } - - /// deny_list specifies list of validator addresses to whom grantee can not delegate tokens. - public var denyList: TW_Cosmos_Proto_Message.StakeAuthorization.Validators { - get { - if case .denyList(let v)? = validators {return v} - return TW_Cosmos_Proto_Message.StakeAuthorization.Validators() - } - set {validators = .denyList(newValue)} - } - - /// authorization_type defines one of AuthorizationType. - public var authorizationType: TW_Cosmos_Proto_Message.AuthorizationType = .unspecified - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// validators is the oneof that represents either allow_list or deny_list - public enum OneOf_Validators: Equatable { - /// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - /// account. - case allowList(TW_Cosmos_Proto_Message.StakeAuthorization.Validators) - /// deny_list specifies list of validator addresses to whom grantee can not delegate tokens. - case denyList(TW_Cosmos_Proto_Message.StakeAuthorization.Validators) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Cosmos_Proto_Message.StakeAuthorization.OneOf_Validators, rhs: TW_Cosmos_Proto_Message.StakeAuthorization.OneOf_Validators) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.allowList, .allowList): return { - guard case .allowList(let l) = lhs, case .allowList(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.denyList, .denyList): return { - guard case .denyList(let l) = lhs, case .denyList(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - /// Validators defines list of validator addresses. - public struct Validators { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var address: [String] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public init() {} - - fileprivate var _maxTokens: TW_Cosmos_Proto_Amount? = nil - } - - /// cosmos-sdk/MsgGrant - public struct AuthGrant { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var granter: String = String() - - public var grantee: String = String() - - public var grantType: TW_Cosmos_Proto_Message.AuthGrant.OneOf_GrantType? = nil - - public var grantStake: TW_Cosmos_Proto_Message.StakeAuthorization { - get { - if case .grantStake(let v)? = grantType {return v} - return TW_Cosmos_Proto_Message.StakeAuthorization() - } - set {grantType = .grantStake(newValue)} - } - - public var expiration: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_GrantType: Equatable { - case grantStake(TW_Cosmos_Proto_Message.StakeAuthorization) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Cosmos_Proto_Message.AuthGrant.OneOf_GrantType, rhs: TW_Cosmos_Proto_Message.AuthGrant.OneOf_GrantType) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.grantStake, .grantStake): return { - guard case .grantStake(let l) = lhs, case .grantStake(let r) = rhs else { preconditionFailure() } - return l == r - }() - } - } - #endif - } - - public init() {} - } - - /// cosmos-sdk/MsgRevoke - public struct AuthRevoke { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var granter: String = String() - - public var grantee: String = String() - - public var msgTypeURL: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// cosmos-sdk/MsgVote defines a message to cast a vote. - public struct MsgVote { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var proposalID: UInt64 = 0 - - public var voter: String = String() - - public var option: TW_Cosmos_Proto_Message.VoteOption = .unspecified - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public struct MsgStrideLiquidStakingStake { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var creator: String = String() - - public var amount: String = String() - - public var hostDenom: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public struct MsgStrideLiquidStakingRedeem { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var creator: String = String() - - public var amount: String = String() - - public var hostZone: String = String() - - public var receiver: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public init() {} -} - -#if swift(>=4.2) - -extension TW_Cosmos_Proto_Message.AuthorizationType: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Cosmos_Proto_Message.AuthorizationType] = [ - .unspecified, - .delegate, - .undelegate, - .redelegate, - ] -} - -extension TW_Cosmos_Proto_Message.VoteOption: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Cosmos_Proto_Message.VoteOption] = [ - .unspecified, - .yes, - .abstain, - .no, - .noWithVeto, - ] -} - -#endif // swift(>=4.2) - -/// Input data necessary to create a signed transaction. -public struct TW_Cosmos_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Specify if protobuf (a.k.a. Stargate) or earlier JSON serialization is used - public var signingMode: TW_Cosmos_Proto_SigningMode = .json - - /// Source account number - public var accountNumber: UInt64 = 0 - - /// Chain ID (string) - public var chainID: String = String() - - /// Transaction fee - public var fee: TW_Cosmos_Proto_Fee { - get {return _fee ?? TW_Cosmos_Proto_Fee()} - set {_fee = newValue} - } - /// Returns true if `fee` has been explicitly set. - public var hasFee: Bool {return self._fee != nil} - /// Clears the value of `fee`. Subsequent reads from it will return its default value. - public mutating func clearFee() {self._fee = nil} - - /// Optional memo - public var memo: String = String() - - /// Sequence number (account specific) - public var sequence: UInt64 = 0 - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Payload message(s) - public var messages: [TW_Cosmos_Proto_Message] = [] - - /// Broadcast mode (included in output, relevant when broadcasting) - public var mode: TW_Cosmos_Proto_BroadcastMode = .block - - public var publicKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _fee: TW_Cosmos_Proto_Fee? = nil -} - -/// Result containing the signed and encoded transaction. -public struct TW_Cosmos_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signature - public var signature: Data = Data() - - /// Signed transaction in JSON (pre-Stargate case) - public var json: String = String() - - /// Signed transaction containing protobuf encoded, Base64-encoded form (Stargate case), - /// wrapped in a ready-to-broadcast json. - public var serialized: String = String() - - /// signatures array json string - public var signatureJson: String = String() - - /// error description - public var errorMessage: String = String() - - public var error: TW_Common_Proto_SigningError = .ok - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Cosmos.Proto" - -extension TW_Cosmos_Proto_BroadcastMode: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "BLOCK"), - 1: .same(proto: "SYNC"), - 2: .same(proto: "ASYNC"), - ] -} - -extension TW_Cosmos_Proto_SigningMode: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "JSON"), - 1: .same(proto: "Protobuf"), - ] -} - -extension TW_Cosmos_Proto_Amount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Amount" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "denom"), - 2: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.denom) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.denom.isEmpty { - try visitor.visitSingularStringField(value: self.denom, fieldNumber: 1) - } - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Amount, rhs: TW_Cosmos_Proto_Amount) -> Bool { - if lhs.denom != rhs.denom {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Fee: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Fee" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amounts"), - 2: .same(proto: "gas"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.amounts) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.gas) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.amounts.isEmpty { - try visitor.visitRepeatedMessageField(value: self.amounts, fieldNumber: 1) - } - if self.gas != 0 { - try visitor.visitSingularUInt64Field(value: self.gas, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Fee, rhs: TW_Cosmos_Proto_Fee) -> Bool { - if lhs.amounts != rhs.amounts {return false} - if lhs.gas != rhs.gas {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Height: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Height" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "revision_number"), - 2: .standard(proto: "revision_height"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.revisionNumber) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.revisionHeight) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.revisionNumber != 0 { - try visitor.visitSingularUInt64Field(value: self.revisionNumber, fieldNumber: 1) - } - if self.revisionHeight != 0 { - try visitor.visitSingularUInt64Field(value: self.revisionHeight, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Height, rhs: TW_Cosmos_Proto_Height) -> Bool { - if lhs.revisionNumber != rhs.revisionNumber {return false} - if lhs.revisionHeight != rhs.revisionHeight {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_THORChainAsset: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".THORChainAsset" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "chain"), - 2: .same(proto: "symbol"), - 3: .same(proto: "ticker"), - 4: .same(proto: "synth"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.chain) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.symbol) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.ticker) }() - case 4: try { try decoder.decodeSingularBoolField(value: &self.synth) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.chain.isEmpty { - try visitor.visitSingularStringField(value: self.chain, fieldNumber: 1) - } - if !self.symbol.isEmpty { - try visitor.visitSingularStringField(value: self.symbol, fieldNumber: 2) - } - if !self.ticker.isEmpty { - try visitor.visitSingularStringField(value: self.ticker, fieldNumber: 3) - } - if self.synth != false { - try visitor.visitSingularBoolField(value: self.synth, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_THORChainAsset, rhs: TW_Cosmos_Proto_THORChainAsset) -> Bool { - if lhs.chain != rhs.chain {return false} - if lhs.symbol != rhs.symbol {return false} - if lhs.ticker != rhs.ticker {return false} - if lhs.synth != rhs.synth {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_THORChainCoin: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".THORChainCoin" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "asset"), - 2: .same(proto: "amount"), - 3: .same(proto: "decimals"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._asset) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.decimals) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._asset { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 2) - } - if self.decimals != 0 { - try visitor.visitSingularInt64Field(value: self.decimals, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_THORChainCoin, rhs: TW_Cosmos_Proto_THORChainCoin) -> Bool { - if lhs._asset != rhs._asset {return false} - if lhs.amount != rhs.amount {return false} - if lhs.decimals != rhs.decimals {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Message" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "send_coins_message"), - 2: .standard(proto: "transfer_tokens_message"), - 3: .standard(proto: "stake_message"), - 4: .standard(proto: "unstake_message"), - 5: .standard(proto: "restake_message"), - 6: .standard(proto: "withdraw_stake_reward_message"), - 7: .standard(proto: "raw_json_message"), - 8: .standard(proto: "wasm_terra_execute_contract_transfer_message"), - 9: .standard(proto: "wasm_terra_execute_contract_send_message"), - 10: .standard(proto: "thorchain_send_message"), - 11: .standard(proto: "execute_contract_message"), - 12: .standard(proto: "wasm_terra_execute_contract_generic"), - 13: .standard(proto: "wasm_execute_contract_transfer_message"), - 14: .standard(proto: "wasm_execute_contract_send_message"), - 15: .standard(proto: "wasm_execute_contract_generic"), - 16: .standard(proto: "sign_direct_message"), - 17: .standard(proto: "auth_grant"), - 18: .standard(proto: "auth_revoke"), - 19: .standard(proto: "set_withdraw_address_message"), - 20: .standard(proto: "msg_vote"), - 21: .standard(proto: "msg_stride_liquid_staking_stake"), - 22: .standard(proto: "msg_stride_liquid_staking_redeem"), - 23: .standard(proto: "thorchain_deposit_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_Cosmos_Proto_Message.Send? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .sendCoinsMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .sendCoinsMessage(v) - } - }() - case 2: try { - var v: TW_Cosmos_Proto_Message.Transfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .transferTokensMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .transferTokensMessage(v) - } - }() - case 3: try { - var v: TW_Cosmos_Proto_Message.Delegate? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .stakeMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .stakeMessage(v) - } - }() - case 4: try { - var v: TW_Cosmos_Proto_Message.Undelegate? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .unstakeMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .unstakeMessage(v) - } - }() - case 5: try { - var v: TW_Cosmos_Proto_Message.BeginRedelegate? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .restakeMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .restakeMessage(v) - } - }() - case 6: try { - var v: TW_Cosmos_Proto_Message.WithdrawDelegationReward? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .withdrawStakeRewardMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .withdrawStakeRewardMessage(v) - } - }() - case 7: try { - var v: TW_Cosmos_Proto_Message.RawJSON? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .rawJsonMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .rawJsonMessage(v) - } - }() - case 8: try { - var v: TW_Cosmos_Proto_Message.WasmTerraExecuteContractTransfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .wasmTerraExecuteContractTransferMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .wasmTerraExecuteContractTransferMessage(v) - } - }() - case 9: try { - var v: TW_Cosmos_Proto_Message.WasmTerraExecuteContractSend? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .wasmTerraExecuteContractSendMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .wasmTerraExecuteContractSendMessage(v) - } - }() - case 10: try { - var v: TW_Cosmos_Proto_Message.THORChainSend? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .thorchainSendMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .thorchainSendMessage(v) - } - }() - case 11: try { - var v: TW_Cosmos_Proto_Message.ExecuteContract? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .executeContractMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .executeContractMessage(v) - } - }() - case 12: try { - var v: TW_Cosmos_Proto_Message.WasmTerraExecuteContractGeneric? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .wasmTerraExecuteContractGeneric(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .wasmTerraExecuteContractGeneric(v) - } - }() - case 13: try { - var v: TW_Cosmos_Proto_Message.WasmExecuteContractTransfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .wasmExecuteContractTransferMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .wasmExecuteContractTransferMessage(v) - } - }() - case 14: try { - var v: TW_Cosmos_Proto_Message.WasmExecuteContractSend? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .wasmExecuteContractSendMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .wasmExecuteContractSendMessage(v) - } - }() - case 15: try { - var v: TW_Cosmos_Proto_Message.WasmExecuteContractGeneric? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .wasmExecuteContractGeneric(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .wasmExecuteContractGeneric(v) - } - }() - case 16: try { - var v: TW_Cosmos_Proto_Message.SignDirect? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .signDirectMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .signDirectMessage(v) - } - }() - case 17: try { - var v: TW_Cosmos_Proto_Message.AuthGrant? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .authGrant(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .authGrant(v) - } - }() - case 18: try { - var v: TW_Cosmos_Proto_Message.AuthRevoke? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .authRevoke(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .authRevoke(v) - } - }() - case 19: try { - var v: TW_Cosmos_Proto_Message.SetWithdrawAddress? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .setWithdrawAddressMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .setWithdrawAddressMessage(v) - } - }() - case 20: try { - var v: TW_Cosmos_Proto_Message.MsgVote? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .msgVote(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .msgVote(v) - } - }() - case 21: try { - var v: TW_Cosmos_Proto_Message.MsgStrideLiquidStakingStake? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .msgStrideLiquidStakingStake(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .msgStrideLiquidStakingStake(v) - } - }() - case 22: try { - var v: TW_Cosmos_Proto_Message.MsgStrideLiquidStakingRedeem? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .msgStrideLiquidStakingRedeem(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .msgStrideLiquidStakingRedeem(v) - } - }() - case 23: try { - var v: TW_Cosmos_Proto_Message.THORChainDeposit? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .thorchainDepositMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .thorchainDepositMessage(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.messageOneof { - case .sendCoinsMessage?: try { - guard case .sendCoinsMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .transferTokensMessage?: try { - guard case .transferTokensMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .stakeMessage?: try { - guard case .stakeMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .unstakeMessage?: try { - guard case .unstakeMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case .restakeMessage?: try { - guard case .restakeMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - }() - case .withdrawStakeRewardMessage?: try { - guard case .withdrawStakeRewardMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - }() - case .rawJsonMessage?: try { - guard case .rawJsonMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - }() - case .wasmTerraExecuteContractTransferMessage?: try { - guard case .wasmTerraExecuteContractTransferMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case .wasmTerraExecuteContractSendMessage?: try { - guard case .wasmTerraExecuteContractSendMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case .thorchainSendMessage?: try { - guard case .thorchainSendMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - }() - case .executeContractMessage?: try { - guard case .executeContractMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - }() - case .wasmTerraExecuteContractGeneric?: try { - guard case .wasmTerraExecuteContractGeneric(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - }() - case .wasmExecuteContractTransferMessage?: try { - guard case .wasmExecuteContractTransferMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 13) - }() - case .wasmExecuteContractSendMessage?: try { - guard case .wasmExecuteContractSendMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 14) - }() - case .wasmExecuteContractGeneric?: try { - guard case .wasmExecuteContractGeneric(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - }() - case .signDirectMessage?: try { - guard case .signDirectMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 16) - }() - case .authGrant?: try { - guard case .authGrant(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 17) - }() - case .authRevoke?: try { - guard case .authRevoke(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 18) - }() - case .setWithdrawAddressMessage?: try { - guard case .setWithdrawAddressMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 19) - }() - case .msgVote?: try { - guard case .msgVote(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 20) - }() - case .msgStrideLiquidStakingStake?: try { - guard case .msgStrideLiquidStakingStake(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 21) - }() - case .msgStrideLiquidStakingRedeem?: try { - guard case .msgStrideLiquidStakingRedeem(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 22) - }() - case .thorchainDepositMessage?: try { - guard case .thorchainDepositMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 23) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message, rhs: TW_Cosmos_Proto_Message) -> Bool { - if lhs.messageOneof != rhs.messageOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.AuthorizationType: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNSPECIFIED"), - 1: .same(proto: "DELEGATE"), - 2: .same(proto: "UNDELEGATE"), - 3: .same(proto: "REDELEGATE"), - ] -} - -extension TW_Cosmos_Proto_Message.VoteOption: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "_UNSPECIFIED"), - 1: .same(proto: "YES"), - 2: .same(proto: "ABSTAIN"), - 3: .same(proto: "NO"), - 4: .same(proto: "NO_WITH_VETO"), - ] -} - -extension TW_Cosmos_Proto_Message.Send: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".Send" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "from_address"), - 2: .standard(proto: "to_address"), - 3: .same(proto: "amounts"), - 4: .standard(proto: "type_prefix"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.fromAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.amounts) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.typePrefix) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fromAddress.isEmpty { - try visitor.visitSingularStringField(value: self.fromAddress, fieldNumber: 1) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 2) - } - if !self.amounts.isEmpty { - try visitor.visitRepeatedMessageField(value: self.amounts, fieldNumber: 3) - } - if !self.typePrefix.isEmpty { - try visitor.visitSingularStringField(value: self.typePrefix, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.Send, rhs: TW_Cosmos_Proto_Message.Send) -> Bool { - if lhs.fromAddress != rhs.fromAddress {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amounts != rhs.amounts {return false} - if lhs.typePrefix != rhs.typePrefix {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "source_port"), - 2: .standard(proto: "source_channel"), - 3: .same(proto: "token"), - 4: .same(proto: "sender"), - 5: .same(proto: "receiver"), - 6: .standard(proto: "timeout_height"), - 7: .standard(proto: "timeout_timestamp"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.sourcePort) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.sourceChannel) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._token) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.sender) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.receiver) }() - case 6: try { try decoder.decodeSingularMessageField(value: &self._timeoutHeight) }() - case 7: try { try decoder.decodeSingularUInt64Field(value: &self.timeoutTimestamp) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.sourcePort.isEmpty { - try visitor.visitSingularStringField(value: self.sourcePort, fieldNumber: 1) - } - if !self.sourceChannel.isEmpty { - try visitor.visitSingularStringField(value: self.sourceChannel, fieldNumber: 2) - } - try { if let v = self._token { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if !self.sender.isEmpty { - try visitor.visitSingularStringField(value: self.sender, fieldNumber: 4) - } - if !self.receiver.isEmpty { - try visitor.visitSingularStringField(value: self.receiver, fieldNumber: 5) - } - try { if let v = self._timeoutHeight { - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } }() - if self.timeoutTimestamp != 0 { - try visitor.visitSingularUInt64Field(value: self.timeoutTimestamp, fieldNumber: 7) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.Transfer, rhs: TW_Cosmos_Proto_Message.Transfer) -> Bool { - if lhs.sourcePort != rhs.sourcePort {return false} - if lhs.sourceChannel != rhs.sourceChannel {return false} - if lhs._token != rhs._token {return false} - if lhs.sender != rhs.sender {return false} - if lhs.receiver != rhs.receiver {return false} - if lhs._timeoutHeight != rhs._timeoutHeight {return false} - if lhs.timeoutTimestamp != rhs.timeoutTimestamp {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.Delegate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".Delegate" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "delegator_address"), - 2: .standard(proto: "validator_address"), - 3: .same(proto: "amount"), - 4: .standard(proto: "type_prefix"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.delegatorAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.validatorAddress) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._amount) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.typePrefix) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.delegatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.delegatorAddress, fieldNumber: 1) - } - if !self.validatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.validatorAddress, fieldNumber: 2) - } - try { if let v = self._amount { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if !self.typePrefix.isEmpty { - try visitor.visitSingularStringField(value: self.typePrefix, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.Delegate, rhs: TW_Cosmos_Proto_Message.Delegate) -> Bool { - if lhs.delegatorAddress != rhs.delegatorAddress {return false} - if lhs.validatorAddress != rhs.validatorAddress {return false} - if lhs._amount != rhs._amount {return false} - if lhs.typePrefix != rhs.typePrefix {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.Undelegate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".Undelegate" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "delegator_address"), - 2: .standard(proto: "validator_address"), - 3: .same(proto: "amount"), - 4: .standard(proto: "type_prefix"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.delegatorAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.validatorAddress) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._amount) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.typePrefix) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.delegatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.delegatorAddress, fieldNumber: 1) - } - if !self.validatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.validatorAddress, fieldNumber: 2) - } - try { if let v = self._amount { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if !self.typePrefix.isEmpty { - try visitor.visitSingularStringField(value: self.typePrefix, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.Undelegate, rhs: TW_Cosmos_Proto_Message.Undelegate) -> Bool { - if lhs.delegatorAddress != rhs.delegatorAddress {return false} - if lhs.validatorAddress != rhs.validatorAddress {return false} - if lhs._amount != rhs._amount {return false} - if lhs.typePrefix != rhs.typePrefix {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.BeginRedelegate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".BeginRedelegate" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "delegator_address"), - 2: .standard(proto: "validator_src_address"), - 3: .standard(proto: "validator_dst_address"), - 4: .same(proto: "amount"), - 5: .standard(proto: "type_prefix"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.delegatorAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.validatorSrcAddress) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.validatorDstAddress) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._amount) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.typePrefix) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.delegatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.delegatorAddress, fieldNumber: 1) - } - if !self.validatorSrcAddress.isEmpty { - try visitor.visitSingularStringField(value: self.validatorSrcAddress, fieldNumber: 2) - } - if !self.validatorDstAddress.isEmpty { - try visitor.visitSingularStringField(value: self.validatorDstAddress, fieldNumber: 3) - } - try { if let v = self._amount { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - if !self.typePrefix.isEmpty { - try visitor.visitSingularStringField(value: self.typePrefix, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.BeginRedelegate, rhs: TW_Cosmos_Proto_Message.BeginRedelegate) -> Bool { - if lhs.delegatorAddress != rhs.delegatorAddress {return false} - if lhs.validatorSrcAddress != rhs.validatorSrcAddress {return false} - if lhs.validatorDstAddress != rhs.validatorDstAddress {return false} - if lhs._amount != rhs._amount {return false} - if lhs.typePrefix != rhs.typePrefix {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.SetWithdrawAddress: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".SetWithdrawAddress" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "delegator_address"), - 2: .standard(proto: "withdraw_address"), - 3: .standard(proto: "type_prefix"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.delegatorAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.withdrawAddress) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.typePrefix) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.delegatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.delegatorAddress, fieldNumber: 1) - } - if !self.withdrawAddress.isEmpty { - try visitor.visitSingularStringField(value: self.withdrawAddress, fieldNumber: 2) - } - if !self.typePrefix.isEmpty { - try visitor.visitSingularStringField(value: self.typePrefix, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.SetWithdrawAddress, rhs: TW_Cosmos_Proto_Message.SetWithdrawAddress) -> Bool { - if lhs.delegatorAddress != rhs.delegatorAddress {return false} - if lhs.withdrawAddress != rhs.withdrawAddress {return false} - if lhs.typePrefix != rhs.typePrefix {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.WithdrawDelegationReward: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".WithdrawDelegationReward" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "delegator_address"), - 2: .standard(proto: "validator_address"), - 3: .standard(proto: "type_prefix"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.delegatorAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.validatorAddress) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.typePrefix) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.delegatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.delegatorAddress, fieldNumber: 1) - } - if !self.validatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.validatorAddress, fieldNumber: 2) - } - if !self.typePrefix.isEmpty { - try visitor.visitSingularStringField(value: self.typePrefix, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.WithdrawDelegationReward, rhs: TW_Cosmos_Proto_Message.WithdrawDelegationReward) -> Bool { - if lhs.delegatorAddress != rhs.delegatorAddress {return false} - if lhs.validatorAddress != rhs.validatorAddress {return false} - if lhs.typePrefix != rhs.typePrefix {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.ExecuteContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".ExecuteContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "sender"), - 2: .same(proto: "contract"), - 3: .standard(proto: "execute_msg"), - 4: .same(proto: "coins"), - 5: .standard(proto: "type_prefix"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.sender) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.contract) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.executeMsg) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.coins) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.typePrefix) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.sender.isEmpty { - try visitor.visitSingularStringField(value: self.sender, fieldNumber: 1) - } - if !self.contract.isEmpty { - try visitor.visitSingularStringField(value: self.contract, fieldNumber: 2) - } - if !self.executeMsg.isEmpty { - try visitor.visitSingularStringField(value: self.executeMsg, fieldNumber: 3) - } - if !self.coins.isEmpty { - try visitor.visitRepeatedMessageField(value: self.coins, fieldNumber: 4) - } - if !self.typePrefix.isEmpty { - try visitor.visitSingularStringField(value: self.typePrefix, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.ExecuteContract, rhs: TW_Cosmos_Proto_Message.ExecuteContract) -> Bool { - if lhs.sender != rhs.sender {return false} - if lhs.contract != rhs.contract {return false} - if lhs.executeMsg != rhs.executeMsg {return false} - if lhs.coins != rhs.coins {return false} - if lhs.typePrefix != rhs.typePrefix {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.WasmTerraExecuteContractTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".WasmTerraExecuteContractTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "sender_address"), - 2: .standard(proto: "contract_address"), - 3: .same(proto: "amount"), - 4: .standard(proto: "recipient_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.senderAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.contractAddress) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.recipientAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.senderAddress.isEmpty { - try visitor.visitSingularStringField(value: self.senderAddress, fieldNumber: 1) - } - if !self.contractAddress.isEmpty { - try visitor.visitSingularStringField(value: self.contractAddress, fieldNumber: 2) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 3) - } - if !self.recipientAddress.isEmpty { - try visitor.visitSingularStringField(value: self.recipientAddress, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.WasmTerraExecuteContractTransfer, rhs: TW_Cosmos_Proto_Message.WasmTerraExecuteContractTransfer) -> Bool { - if lhs.senderAddress != rhs.senderAddress {return false} - if lhs.contractAddress != rhs.contractAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.recipientAddress != rhs.recipientAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.WasmTerraExecuteContractSend: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".WasmTerraExecuteContractSend" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "sender_address"), - 2: .standard(proto: "contract_address"), - 3: .same(proto: "amount"), - 4: .standard(proto: "recipient_contract_address"), - 5: .same(proto: "msg"), - 6: .same(proto: "coin"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.senderAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.contractAddress) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.recipientContractAddress) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.msg) }() - case 6: try { try decoder.decodeRepeatedStringField(value: &self.coin) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.senderAddress.isEmpty { - try visitor.visitSingularStringField(value: self.senderAddress, fieldNumber: 1) - } - if !self.contractAddress.isEmpty { - try visitor.visitSingularStringField(value: self.contractAddress, fieldNumber: 2) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 3) - } - if !self.recipientContractAddress.isEmpty { - try visitor.visitSingularStringField(value: self.recipientContractAddress, fieldNumber: 4) - } - if !self.msg.isEmpty { - try visitor.visitSingularStringField(value: self.msg, fieldNumber: 5) - } - if !self.coin.isEmpty { - try visitor.visitRepeatedStringField(value: self.coin, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.WasmTerraExecuteContractSend, rhs: TW_Cosmos_Proto_Message.WasmTerraExecuteContractSend) -> Bool { - if lhs.senderAddress != rhs.senderAddress {return false} - if lhs.contractAddress != rhs.contractAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.recipientContractAddress != rhs.recipientContractAddress {return false} - if lhs.msg != rhs.msg {return false} - if lhs.coin != rhs.coin {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.THORChainSend: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".THORChainSend" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "from_address"), - 2: .standard(proto: "to_address"), - 3: .same(proto: "amounts"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.fromAddress) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.toAddress) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.amounts) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fromAddress.isEmpty { - try visitor.visitSingularBytesField(value: self.fromAddress, fieldNumber: 1) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularBytesField(value: self.toAddress, fieldNumber: 2) - } - if !self.amounts.isEmpty { - try visitor.visitRepeatedMessageField(value: self.amounts, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.THORChainSend, rhs: TW_Cosmos_Proto_Message.THORChainSend) -> Bool { - if lhs.fromAddress != rhs.fromAddress {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amounts != rhs.amounts {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.THORChainDeposit: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".THORChainDeposit" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "coins"), - 2: .same(proto: "memo"), - 3: .same(proto: "signer"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.coins) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.memo) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.signer) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.coins.isEmpty { - try visitor.visitRepeatedMessageField(value: self.coins, fieldNumber: 1) - } - if !self.memo.isEmpty { - try visitor.visitSingularStringField(value: self.memo, fieldNumber: 2) - } - if !self.signer.isEmpty { - try visitor.visitSingularBytesField(value: self.signer, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.THORChainDeposit, rhs: TW_Cosmos_Proto_Message.THORChainDeposit) -> Bool { - if lhs.coins != rhs.coins {return false} - if lhs.memo != rhs.memo {return false} - if lhs.signer != rhs.signer {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.WasmTerraExecuteContractGeneric: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".WasmTerraExecuteContractGeneric" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "sender_address"), - 2: .standard(proto: "contract_address"), - 3: .standard(proto: "execute_msg"), - 5: .same(proto: "coins"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.senderAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.contractAddress) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.executeMsg) }() - case 5: try { try decoder.decodeRepeatedMessageField(value: &self.coins) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.senderAddress.isEmpty { - try visitor.visitSingularStringField(value: self.senderAddress, fieldNumber: 1) - } - if !self.contractAddress.isEmpty { - try visitor.visitSingularStringField(value: self.contractAddress, fieldNumber: 2) - } - if !self.executeMsg.isEmpty { - try visitor.visitSingularStringField(value: self.executeMsg, fieldNumber: 3) - } - if !self.coins.isEmpty { - try visitor.visitRepeatedMessageField(value: self.coins, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.WasmTerraExecuteContractGeneric, rhs: TW_Cosmos_Proto_Message.WasmTerraExecuteContractGeneric) -> Bool { - if lhs.senderAddress != rhs.senderAddress {return false} - if lhs.contractAddress != rhs.contractAddress {return false} - if lhs.executeMsg != rhs.executeMsg {return false} - if lhs.coins != rhs.coins {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.WasmExecuteContractTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".WasmExecuteContractTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "sender_address"), - 2: .standard(proto: "contract_address"), - 3: .same(proto: "amount"), - 4: .standard(proto: "recipient_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.senderAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.contractAddress) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.recipientAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.senderAddress.isEmpty { - try visitor.visitSingularStringField(value: self.senderAddress, fieldNumber: 1) - } - if !self.contractAddress.isEmpty { - try visitor.visitSingularStringField(value: self.contractAddress, fieldNumber: 2) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 3) - } - if !self.recipientAddress.isEmpty { - try visitor.visitSingularStringField(value: self.recipientAddress, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.WasmExecuteContractTransfer, rhs: TW_Cosmos_Proto_Message.WasmExecuteContractTransfer) -> Bool { - if lhs.senderAddress != rhs.senderAddress {return false} - if lhs.contractAddress != rhs.contractAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.recipientAddress != rhs.recipientAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.WasmExecuteContractSend: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".WasmExecuteContractSend" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "sender_address"), - 2: .standard(proto: "contract_address"), - 3: .same(proto: "amount"), - 4: .standard(proto: "recipient_contract_address"), - 5: .same(proto: "msg"), - 6: .same(proto: "coin"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.senderAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.contractAddress) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.recipientContractAddress) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.msg) }() - case 6: try { try decoder.decodeRepeatedStringField(value: &self.coin) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.senderAddress.isEmpty { - try visitor.visitSingularStringField(value: self.senderAddress, fieldNumber: 1) - } - if !self.contractAddress.isEmpty { - try visitor.visitSingularStringField(value: self.contractAddress, fieldNumber: 2) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 3) - } - if !self.recipientContractAddress.isEmpty { - try visitor.visitSingularStringField(value: self.recipientContractAddress, fieldNumber: 4) - } - if !self.msg.isEmpty { - try visitor.visitSingularStringField(value: self.msg, fieldNumber: 5) - } - if !self.coin.isEmpty { - try visitor.visitRepeatedStringField(value: self.coin, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.WasmExecuteContractSend, rhs: TW_Cosmos_Proto_Message.WasmExecuteContractSend) -> Bool { - if lhs.senderAddress != rhs.senderAddress {return false} - if lhs.contractAddress != rhs.contractAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.recipientContractAddress != rhs.recipientContractAddress {return false} - if lhs.msg != rhs.msg {return false} - if lhs.coin != rhs.coin {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.WasmExecuteContractGeneric: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".WasmExecuteContractGeneric" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "sender_address"), - 2: .standard(proto: "contract_address"), - 3: .standard(proto: "execute_msg"), - 5: .same(proto: "coins"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.senderAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.contractAddress) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.executeMsg) }() - case 5: try { try decoder.decodeRepeatedMessageField(value: &self.coins) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.senderAddress.isEmpty { - try visitor.visitSingularStringField(value: self.senderAddress, fieldNumber: 1) - } - if !self.contractAddress.isEmpty { - try visitor.visitSingularStringField(value: self.contractAddress, fieldNumber: 2) - } - if !self.executeMsg.isEmpty { - try visitor.visitSingularStringField(value: self.executeMsg, fieldNumber: 3) - } - if !self.coins.isEmpty { - try visitor.visitRepeatedMessageField(value: self.coins, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.WasmExecuteContractGeneric, rhs: TW_Cosmos_Proto_Message.WasmExecuteContractGeneric) -> Bool { - if lhs.senderAddress != rhs.senderAddress {return false} - if lhs.contractAddress != rhs.contractAddress {return false} - if lhs.executeMsg != rhs.executeMsg {return false} - if lhs.coins != rhs.coins {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.RawJSON: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".RawJSON" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "type"), - 2: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.type) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.type.isEmpty { - try visitor.visitSingularStringField(value: self.type, fieldNumber: 1) - } - if !self.value.isEmpty { - try visitor.visitSingularStringField(value: self.value, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.RawJSON, rhs: TW_Cosmos_Proto_Message.RawJSON) -> Bool { - if lhs.type != rhs.type {return false} - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.SignDirect: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".SignDirect" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "body_bytes"), - 2: .standard(proto: "auth_info_bytes"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.bodyBytes) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.authInfoBytes) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.bodyBytes.isEmpty { - try visitor.visitSingularBytesField(value: self.bodyBytes, fieldNumber: 1) - } - if !self.authInfoBytes.isEmpty { - try visitor.visitSingularBytesField(value: self.authInfoBytes, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.SignDirect, rhs: TW_Cosmos_Proto_Message.SignDirect) -> Bool { - if lhs.bodyBytes != rhs.bodyBytes {return false} - if lhs.authInfoBytes != rhs.authInfoBytes {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.StakeAuthorization: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".StakeAuthorization" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "max_tokens"), - 2: .standard(proto: "allow_list"), - 3: .standard(proto: "deny_list"), - 4: .standard(proto: "authorization_type"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._maxTokens) }() - case 2: try { - var v: TW_Cosmos_Proto_Message.StakeAuthorization.Validators? - var hadOneofValue = false - if let current = self.validators { - hadOneofValue = true - if case .allowList(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.validators = .allowList(v) - } - }() - case 3: try { - var v: TW_Cosmos_Proto_Message.StakeAuthorization.Validators? - var hadOneofValue = false - if let current = self.validators { - hadOneofValue = true - if case .denyList(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.validators = .denyList(v) - } - }() - case 4: try { try decoder.decodeSingularEnumField(value: &self.authorizationType) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._maxTokens { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - switch self.validators { - case .allowList?: try { - guard case .allowList(let v)? = self.validators else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .denyList?: try { - guard case .denyList(let v)? = self.validators else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case nil: break - } - if self.authorizationType != .unspecified { - try visitor.visitSingularEnumField(value: self.authorizationType, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.StakeAuthorization, rhs: TW_Cosmos_Proto_Message.StakeAuthorization) -> Bool { - if lhs._maxTokens != rhs._maxTokens {return false} - if lhs.validators != rhs.validators {return false} - if lhs.authorizationType != rhs.authorizationType {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.StakeAuthorization.Validators: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.StakeAuthorization.protoMessageName + ".Validators" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedStringField(value: &self.address) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.address.isEmpty { - try visitor.visitRepeatedStringField(value: self.address, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.StakeAuthorization.Validators, rhs: TW_Cosmos_Proto_Message.StakeAuthorization.Validators) -> Bool { - if lhs.address != rhs.address {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.AuthGrant: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".AuthGrant" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "granter"), - 2: .same(proto: "grantee"), - 3: .standard(proto: "grant_stake"), - 4: .same(proto: "expiration"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.granter) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.grantee) }() - case 3: try { - var v: TW_Cosmos_Proto_Message.StakeAuthorization? - var hadOneofValue = false - if let current = self.grantType { - hadOneofValue = true - if case .grantStake(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.grantType = .grantStake(v) - } - }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.expiration) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.granter.isEmpty { - try visitor.visitSingularStringField(value: self.granter, fieldNumber: 1) - } - if !self.grantee.isEmpty { - try visitor.visitSingularStringField(value: self.grantee, fieldNumber: 2) - } - try { if case .grantStake(let v)? = self.grantType { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if self.expiration != 0 { - try visitor.visitSingularInt64Field(value: self.expiration, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.AuthGrant, rhs: TW_Cosmos_Proto_Message.AuthGrant) -> Bool { - if lhs.granter != rhs.granter {return false} - if lhs.grantee != rhs.grantee {return false} - if lhs.grantType != rhs.grantType {return false} - if lhs.expiration != rhs.expiration {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.AuthRevoke: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".AuthRevoke" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "granter"), - 2: .same(proto: "grantee"), - 3: .standard(proto: "msg_type_url"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.granter) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.grantee) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.msgTypeURL) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.granter.isEmpty { - try visitor.visitSingularStringField(value: self.granter, fieldNumber: 1) - } - if !self.grantee.isEmpty { - try visitor.visitSingularStringField(value: self.grantee, fieldNumber: 2) - } - if !self.msgTypeURL.isEmpty { - try visitor.visitSingularStringField(value: self.msgTypeURL, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.AuthRevoke, rhs: TW_Cosmos_Proto_Message.AuthRevoke) -> Bool { - if lhs.granter != rhs.granter {return false} - if lhs.grantee != rhs.grantee {return false} - if lhs.msgTypeURL != rhs.msgTypeURL {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.MsgVote: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".MsgVote" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "proposal_id"), - 2: .same(proto: "voter"), - 3: .same(proto: "option"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.proposalID) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.voter) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.option) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.proposalID != 0 { - try visitor.visitSingularUInt64Field(value: self.proposalID, fieldNumber: 1) - } - if !self.voter.isEmpty { - try visitor.visitSingularStringField(value: self.voter, fieldNumber: 2) - } - if self.option != .unspecified { - try visitor.visitSingularEnumField(value: self.option, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.MsgVote, rhs: TW_Cosmos_Proto_Message.MsgVote) -> Bool { - if lhs.proposalID != rhs.proposalID {return false} - if lhs.voter != rhs.voter {return false} - if lhs.option != rhs.option {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.MsgStrideLiquidStakingStake: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".MsgStrideLiquidStakingStake" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "creator"), - 2: .same(proto: "amount"), - 3: .standard(proto: "host_denom"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.creator) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.hostDenom) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.creator.isEmpty { - try visitor.visitSingularStringField(value: self.creator, fieldNumber: 1) - } - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 2) - } - if !self.hostDenom.isEmpty { - try visitor.visitSingularStringField(value: self.hostDenom, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.MsgStrideLiquidStakingStake, rhs: TW_Cosmos_Proto_Message.MsgStrideLiquidStakingStake) -> Bool { - if lhs.creator != rhs.creator {return false} - if lhs.amount != rhs.amount {return false} - if lhs.hostDenom != rhs.hostDenom {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_Message.MsgStrideLiquidStakingRedeem: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Cosmos_Proto_Message.protoMessageName + ".MsgStrideLiquidStakingRedeem" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "creator"), - 2: .same(proto: "amount"), - 3: .standard(proto: "host_zone"), - 4: .same(proto: "receiver"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.creator) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.hostZone) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.receiver) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.creator.isEmpty { - try visitor.visitSingularStringField(value: self.creator, fieldNumber: 1) - } - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 2) - } - if !self.hostZone.isEmpty { - try visitor.visitSingularStringField(value: self.hostZone, fieldNumber: 3) - } - if !self.receiver.isEmpty { - try visitor.visitSingularStringField(value: self.receiver, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_Message.MsgStrideLiquidStakingRedeem, rhs: TW_Cosmos_Proto_Message.MsgStrideLiquidStakingRedeem) -> Bool { - if lhs.creator != rhs.creator {return false} - if lhs.amount != rhs.amount {return false} - if lhs.hostZone != rhs.hostZone {return false} - if lhs.receiver != rhs.receiver {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "signing_mode"), - 2: .standard(proto: "account_number"), - 3: .standard(proto: "chain_id"), - 4: .same(proto: "fee"), - 5: .same(proto: "memo"), - 6: .same(proto: "sequence"), - 7: .standard(proto: "private_key"), - 8: .same(proto: "messages"), - 9: .same(proto: "mode"), - 10: .standard(proto: "public_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.signingMode) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.accountNumber) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.chainID) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._fee) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.memo) }() - case 6: try { try decoder.decodeSingularUInt64Field(value: &self.sequence) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 8: try { try decoder.decodeRepeatedMessageField(value: &self.messages) }() - case 9: try { try decoder.decodeSingularEnumField(value: &self.mode) }() - case 10: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.signingMode != .json { - try visitor.visitSingularEnumField(value: self.signingMode, fieldNumber: 1) - } - if self.accountNumber != 0 { - try visitor.visitSingularUInt64Field(value: self.accountNumber, fieldNumber: 2) - } - if !self.chainID.isEmpty { - try visitor.visitSingularStringField(value: self.chainID, fieldNumber: 3) - } - try { if let v = self._fee { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - if !self.memo.isEmpty { - try visitor.visitSingularStringField(value: self.memo, fieldNumber: 5) - } - if self.sequence != 0 { - try visitor.visitSingularUInt64Field(value: self.sequence, fieldNumber: 6) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 7) - } - if !self.messages.isEmpty { - try visitor.visitRepeatedMessageField(value: self.messages, fieldNumber: 8) - } - if self.mode != .block { - try visitor.visitSingularEnumField(value: self.mode, fieldNumber: 9) - } - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 10) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_SigningInput, rhs: TW_Cosmos_Proto_SigningInput) -> Bool { - if lhs.signingMode != rhs.signingMode {return false} - if lhs.accountNumber != rhs.accountNumber {return false} - if lhs.chainID != rhs.chainID {return false} - if lhs._fee != rhs._fee {return false} - if lhs.memo != rhs.memo {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.messages != rhs.messages {return false} - if lhs.mode != rhs.mode {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Cosmos_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "signature"), - 2: .same(proto: "json"), - 3: .same(proto: "serialized"), - 4: .standard(proto: "signature_json"), - 5: .standard(proto: "error_message"), - 6: .same(proto: "error"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.json) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.serialized) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.signatureJson) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - case 6: try { try decoder.decodeSingularEnumField(value: &self.error) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 1) - } - if !self.json.isEmpty { - try visitor.visitSingularStringField(value: self.json, fieldNumber: 2) - } - if !self.serialized.isEmpty { - try visitor.visitSingularStringField(value: self.serialized, fieldNumber: 3) - } - if !self.signatureJson.isEmpty { - try visitor.visitSingularStringField(value: self.signatureJson, fieldNumber: 4) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 5) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Cosmos_Proto_SigningOutput, rhs: TW_Cosmos_Proto_SigningOutput) -> Bool { - if lhs.signature != rhs.signature {return false} - if lhs.json != rhs.json {return false} - if lhs.serialized != rhs.serialized {return false} - if lhs.signatureJson != rhs.signatureJson {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.error != rhs.error {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Decred+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Decred+Proto.swift deleted file mode 100644 index 68d67d14..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Decred+Proto.swift +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias DecredTransaction = TW_Decred_Proto_Transaction -public typealias DecredTransactionInput = TW_Decred_Proto_TransactionInput -public typealias DecredTransactionOutput = TW_Decred_Proto_TransactionOutput -public typealias DecredSigningOutput = TW_Decred_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Decred.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Decred.pb.swift deleted file mode 100644 index f13492ec..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Decred.pb.swift +++ /dev/null @@ -1,378 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Decred.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// A transfer transaction -public struct TW_Decred_Proto_Transaction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Serialization format - public var serializeType: UInt32 = 0 - - /// Transaction data format version - public var version: UInt32 = 0 - - /// A list of 1 or more transaction inputs or sources for coins. - public var inputs: [TW_Decred_Proto_TransactionInput] = [] - - /// A list of 1 or more transaction outputs or destinations for coins - public var outputs: [TW_Decred_Proto_TransactionOutput] = [] - - /// The time when a transaction can be spent (usually zero, in which case it has no effect). - public var lockTime: UInt32 = 0 - - /// The block height at which the transaction expires and is no longer valid. - public var expiry: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Decred transaction input. -public struct TW_Decred_Proto_TransactionInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Reference to the previous transaction's output. - public var previousOutput: TW_Bitcoin_Proto_OutPoint { - get {return _previousOutput ?? TW_Bitcoin_Proto_OutPoint()} - set {_previousOutput = newValue} - } - /// Returns true if `previousOutput` has been explicitly set. - public var hasPreviousOutput: Bool {return self._previousOutput != nil} - /// Clears the value of `previousOutput`. Subsequent reads from it will return its default value. - public mutating func clearPreviousOutput() {self._previousOutput = nil} - - /// Transaction version as defined by the sender. - public var sequence: UInt32 = 0 - - /// The amount of the input - public var valueIn: Int64 = 0 - - /// Creation block height - public var blockHeight: UInt32 = 0 - - /// Index within the block - public var blockIndex: UInt32 = 0 - - /// Computational script for confirming transaction authorization. - public var script: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _previousOutput: TW_Bitcoin_Proto_OutPoint? = nil -} - -/// Decred transaction output. -public struct TW_Decred_Proto_TransactionOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Transaction amount. - public var value: Int64 = 0 - - /// Transaction output version. - public var version: UInt32 = 0 - - /// Usually contains the public key as a Decred script setting up conditions to claim this output. - public var script: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Decred_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Resulting transaction. Note that the amount may be different than the requested amount to account for fees and available funds. - public var transaction: TW_Decred_Proto_Transaction { - get {return _transaction ?? TW_Decred_Proto_Transaction()} - set {_transaction = newValue} - } - /// Returns true if `transaction` has been explicitly set. - public var hasTransaction: Bool {return self._transaction != nil} - /// Clears the value of `transaction`. Subsequent reads from it will return its default value. - public mutating func clearTransaction() {self._transaction = nil} - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// Transaction id - public var transactionID: String = String() - - /// Optional error - public var error: TW_Common_Proto_SigningError = .ok - - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _transaction: TW_Decred_Proto_Transaction? = nil -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Decred.Proto" - -extension TW_Decred_Proto_Transaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transaction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "serializeType"), - 2: .same(proto: "version"), - 3: .same(proto: "inputs"), - 4: .same(proto: "outputs"), - 5: .same(proto: "lockTime"), - 6: .same(proto: "expiry"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &self.serializeType) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.version) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.inputs) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.outputs) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &self.lockTime) }() - case 6: try { try decoder.decodeSingularUInt32Field(value: &self.expiry) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.serializeType != 0 { - try visitor.visitSingularUInt32Field(value: self.serializeType, fieldNumber: 1) - } - if self.version != 0 { - try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 2) - } - if !self.inputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 3) - } - if !self.outputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 4) - } - if self.lockTime != 0 { - try visitor.visitSingularUInt32Field(value: self.lockTime, fieldNumber: 5) - } - if self.expiry != 0 { - try visitor.visitSingularUInt32Field(value: self.expiry, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Decred_Proto_Transaction, rhs: TW_Decred_Proto_Transaction) -> Bool { - if lhs.serializeType != rhs.serializeType {return false} - if lhs.version != rhs.version {return false} - if lhs.inputs != rhs.inputs {return false} - if lhs.outputs != rhs.outputs {return false} - if lhs.lockTime != rhs.lockTime {return false} - if lhs.expiry != rhs.expiry {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Decred_Proto_TransactionInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "previousOutput"), - 2: .same(proto: "sequence"), - 3: .same(proto: "valueIn"), - 4: .same(proto: "blockHeight"), - 5: .same(proto: "blockIndex"), - 6: .same(proto: "script"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._previousOutput) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.sequence) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.valueIn) }() - case 4: try { try decoder.decodeSingularUInt32Field(value: &self.blockHeight) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &self.blockIndex) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.script) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._previousOutput { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if self.sequence != 0 { - try visitor.visitSingularUInt32Field(value: self.sequence, fieldNumber: 2) - } - if self.valueIn != 0 { - try visitor.visitSingularInt64Field(value: self.valueIn, fieldNumber: 3) - } - if self.blockHeight != 0 { - try visitor.visitSingularUInt32Field(value: self.blockHeight, fieldNumber: 4) - } - if self.blockIndex != 0 { - try visitor.visitSingularUInt32Field(value: self.blockIndex, fieldNumber: 5) - } - if !self.script.isEmpty { - try visitor.visitSingularBytesField(value: self.script, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Decred_Proto_TransactionInput, rhs: TW_Decred_Proto_TransactionInput) -> Bool { - if lhs._previousOutput != rhs._previousOutput {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.valueIn != rhs.valueIn {return false} - if lhs.blockHeight != rhs.blockHeight {return false} - if lhs.blockIndex != rhs.blockIndex {return false} - if lhs.script != rhs.script {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Decred_Proto_TransactionOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - 2: .same(proto: "version"), - 3: .same(proto: "script"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.value) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.version) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.script) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.value != 0 { - try visitor.visitSingularInt64Field(value: self.value, fieldNumber: 1) - } - if self.version != 0 { - try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 2) - } - if !self.script.isEmpty { - try visitor.visitSingularBytesField(value: self.script, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Decred_Proto_TransactionOutput, rhs: TW_Decred_Proto_TransactionOutput) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.version != rhs.version {return false} - if lhs.script != rhs.script {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Decred_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "transaction"), - 2: .same(proto: "encoded"), - 3: .standard(proto: "transaction_id"), - 4: .same(proto: "error"), - 5: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._transaction) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.transactionID) }() - case 4: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._transaction { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 2) - } - if !self.transactionID.isEmpty { - try visitor.visitSingularStringField(value: self.transactionID, fieldNumber: 3) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 4) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Decred_Proto_SigningOutput, rhs: TW_Decred_Proto_SigningOutput) -> Bool { - if lhs._transaction != rhs._transaction {return false} - if lhs.encoded != rhs.encoded {return false} - if lhs.transactionID != rhs.transactionID {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/EOS+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/EOS+Proto.swift deleted file mode 100644 index 889eabc8..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/EOS+Proto.swift +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias EOSAsset = TW_EOS_Proto_Asset -public typealias EOSSigningInput = TW_EOS_Proto_SigningInput -public typealias EOSSigningOutput = TW_EOS_Proto_SigningOutput -public typealias EOSKeyType = TW_EOS_Proto_KeyType diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/EOS.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/EOS.pb.swift deleted file mode 100644 index d04cde9c..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/EOS.pb.swift +++ /dev/null @@ -1,354 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: EOS.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -public enum TW_EOS_Proto_KeyType: SwiftProtobuf.Enum { - public typealias RawValue = Int - case legacy // = 0 - case modernk1 // = 1 - case modernr1 // = 2 - case UNRECOGNIZED(Int) - - public init() { - self = .legacy - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .legacy - case 1: self = .modernk1 - case 2: self = .modernr1 - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .legacy: return 0 - case .modernk1: return 1 - case .modernr1: return 2 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_EOS_Proto_KeyType: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_EOS_Proto_KeyType] = [ - .legacy, - .modernk1, - .modernr1, - ] -} - -#endif // swift(>=4.2) - -/// Values for an Asset object. -public struct TW_EOS_Proto_Asset { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Total amount - public var amount: Int64 = 0 - - /// Number of decimals defined - public var decimals: UInt32 = 0 - - /// Asset symbol - public var symbol: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_EOS_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Chain id (uint256, serialized little endian) - public var chainID: Data = Data() - - /// Reference Block Id (uint256, serialized little endian) - public var referenceBlockID: Data = Data() - - /// Timestamp on the reference block - public var referenceBlockTime: Int32 = 0 - - /// Currency (e.g. "eosio.token") - public var currency: String = String() - - /// Sender's username - public var sender: String = String() - - /// Recipient's username - public var recipient: String = String() - - /// Memo attached to the transaction - public var memo: String = String() - - /// Asset details and amount - public var asset: TW_EOS_Proto_Asset { - get {return _asset ?? TW_EOS_Proto_Asset()} - set {_asset = newValue} - } - /// Returns true if `asset` has been explicitly set. - public var hasAsset: Bool {return self._asset != nil} - /// Clears the value of `asset`. Subsequent reads from it will return its default value. - public mutating func clearAsset() {self._asset = nil} - - /// Sender's secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Type of the private key - public var privateKeyType: TW_EOS_Proto_KeyType = .legacy - - /// Expiration of the transaction, if not set, default is reference_block_time + 3600 seconds - public var expiration: Int32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _asset: TW_EOS_Proto_Asset? = nil -} - -/// Result containing the signed and encoded transaction. -public struct TW_EOS_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// JSON of the packed transaction. - public var jsonEncoded: String = String() - - /// Optional error - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.EOS.Proto" - -extension TW_EOS_Proto_KeyType: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "LEGACY"), - 1: .same(proto: "MODERNK1"), - 2: .same(proto: "MODERNR1"), - ] -} - -extension TW_EOS_Proto_Asset: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Asset" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - 2: .same(proto: "decimals"), - 3: .same(proto: "symbol"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.decimals) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.symbol) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 1) - } - if self.decimals != 0 { - try visitor.visitSingularUInt32Field(value: self.decimals, fieldNumber: 2) - } - if !self.symbol.isEmpty { - try visitor.visitSingularStringField(value: self.symbol, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EOS_Proto_Asset, rhs: TW_EOS_Proto_Asset) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.decimals != rhs.decimals {return false} - if lhs.symbol != rhs.symbol {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EOS_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "chain_id"), - 2: .standard(proto: "reference_block_id"), - 3: .standard(proto: "reference_block_time"), - 4: .same(proto: "currency"), - 5: .same(proto: "sender"), - 6: .same(proto: "recipient"), - 7: .same(proto: "memo"), - 8: .same(proto: "asset"), - 9: .standard(proto: "private_key"), - 10: .standard(proto: "private_key_type"), - 11: .same(proto: "expiration"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.chainID) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.referenceBlockID) }() - case 3: try { try decoder.decodeSingularSFixed32Field(value: &self.referenceBlockTime) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.currency) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.sender) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.recipient) }() - case 7: try { try decoder.decodeSingularStringField(value: &self.memo) }() - case 8: try { try decoder.decodeSingularMessageField(value: &self._asset) }() - case 9: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 10: try { try decoder.decodeSingularEnumField(value: &self.privateKeyType) }() - case 11: try { try decoder.decodeSingularSFixed32Field(value: &self.expiration) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.chainID.isEmpty { - try visitor.visitSingularBytesField(value: self.chainID, fieldNumber: 1) - } - if !self.referenceBlockID.isEmpty { - try visitor.visitSingularBytesField(value: self.referenceBlockID, fieldNumber: 2) - } - if self.referenceBlockTime != 0 { - try visitor.visitSingularSFixed32Field(value: self.referenceBlockTime, fieldNumber: 3) - } - if !self.currency.isEmpty { - try visitor.visitSingularStringField(value: self.currency, fieldNumber: 4) - } - if !self.sender.isEmpty { - try visitor.visitSingularStringField(value: self.sender, fieldNumber: 5) - } - if !self.recipient.isEmpty { - try visitor.visitSingularStringField(value: self.recipient, fieldNumber: 6) - } - if !self.memo.isEmpty { - try visitor.visitSingularStringField(value: self.memo, fieldNumber: 7) - } - try { if let v = self._asset { - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - } }() - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 9) - } - if self.privateKeyType != .legacy { - try visitor.visitSingularEnumField(value: self.privateKeyType, fieldNumber: 10) - } - if self.expiration != 0 { - try visitor.visitSingularSFixed32Field(value: self.expiration, fieldNumber: 11) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EOS_Proto_SigningInput, rhs: TW_EOS_Proto_SigningInput) -> Bool { - if lhs.chainID != rhs.chainID {return false} - if lhs.referenceBlockID != rhs.referenceBlockID {return false} - if lhs.referenceBlockTime != rhs.referenceBlockTime {return false} - if lhs.currency != rhs.currency {return false} - if lhs.sender != rhs.sender {return false} - if lhs.recipient != rhs.recipient {return false} - if lhs.memo != rhs.memo {return false} - if lhs._asset != rhs._asset {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.privateKeyType != rhs.privateKeyType {return false} - if lhs.expiration != rhs.expiration {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EOS_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "json_encoded"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.jsonEncoded) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.jsonEncoded.isEmpty { - try visitor.visitSingularStringField(value: self.jsonEncoded, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EOS_Proto_SigningOutput, rhs: TW_EOS_Proto_SigningOutput) -> Bool { - if lhs.jsonEncoded != rhs.jsonEncoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ethereum+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ethereum+Proto.swift deleted file mode 100644 index 591a3747..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ethereum+Proto.swift +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias EthereumTransaction = TW_Ethereum_Proto_Transaction -public typealias EthereumUserOperation = TW_Ethereum_Proto_UserOperation -public typealias EthereumSigningInput = TW_Ethereum_Proto_SigningInput -public typealias EthereumSigningOutput = TW_Ethereum_Proto_SigningOutput -public typealias EthereumMaybeChainId = TW_Ethereum_Proto_MaybeChainId -public typealias EthereumMessageSigningInput = TW_Ethereum_Proto_MessageSigningInput -public typealias EthereumMessageSigningOutput = TW_Ethereum_Proto_MessageSigningOutput -public typealias EthereumMessageVerifyingInput = TW_Ethereum_Proto_MessageVerifyingInput -public typealias EthereumTransactionMode = TW_Ethereum_Proto_TransactionMode -public typealias EthereumMessageType = TW_Ethereum_Proto_MessageType diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ethereum.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ethereum.pb.swift deleted file mode 100644 index 66ca7c5f..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ethereum.pb.swift +++ /dev/null @@ -1,1605 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Ethereum.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Transaction type -public enum TW_Ethereum_Proto_TransactionMode: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Legacy transaction, pre-EIP2718/EIP1559; for fee gasPrice/gasLimit is used - case legacy // = 0 - - /// Enveloped transaction EIP2718 (with type 0x2), fee is according to EIP1559 (base fee, inclusion fee, ...) - case enveloped // = 1 - - /// EIP4337-compatible UserOperation - case userOp // = 2 - case UNRECOGNIZED(Int) - - public init() { - self = .legacy - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .legacy - case 1: self = .enveloped - case 2: self = .userOp - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .legacy: return 0 - case .enveloped: return 1 - case .userOp: return 2 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Ethereum_Proto_TransactionMode: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Ethereum_Proto_TransactionMode] = [ - .legacy, - .enveloped, - .userOp, - ] -} - -#endif // swift(>=4.2) - -public enum TW_Ethereum_Proto_MessageType: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Sign a message following EIP-191. - case legacy // = 0 - - /// Sign a message following EIP-191 with EIP-155 replay attack protection. - case eip155 // = 1 - - /// Sign a typed message EIP-712 V4. - case typed // = 2 - - /// Sign a typed message EIP-712 V4 with EIP-155 replay attack protection. - case typedEip155 // = 3 - - /// Sign a message with Immutable X msg type. - case immutableX // = 4 - case UNRECOGNIZED(Int) - - public init() { - self = .legacy - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .legacy - case 1: self = .eip155 - case 2: self = .typed - case 3: self = .typedEip155 - case 4: self = .immutableX - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .legacy: return 0 - case .eip155: return 1 - case .typed: return 2 - case .typedEip155: return 3 - case .immutableX: return 4 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Ethereum_Proto_MessageType: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Ethereum_Proto_MessageType] = [ - .legacy, - .eip155, - .typed, - .typedEip155, - .immutableX, - ] -} - -#endif // swift(>=4.2) - -/// Transaction (transfer, smart contract call, ...) -public struct TW_Ethereum_Proto_Transaction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Payload transfer - public var transactionOneof: TW_Ethereum_Proto_Transaction.OneOf_TransactionOneof? = nil - - public var transfer: TW_Ethereum_Proto_Transaction.Transfer { - get { - if case .transfer(let v)? = transactionOneof {return v} - return TW_Ethereum_Proto_Transaction.Transfer() - } - set {transactionOneof = .transfer(newValue)} - } - - public var erc20Transfer: TW_Ethereum_Proto_Transaction.ERC20Transfer { - get { - if case .erc20Transfer(let v)? = transactionOneof {return v} - return TW_Ethereum_Proto_Transaction.ERC20Transfer() - } - set {transactionOneof = .erc20Transfer(newValue)} - } - - public var erc20Approve: TW_Ethereum_Proto_Transaction.ERC20Approve { - get { - if case .erc20Approve(let v)? = transactionOneof {return v} - return TW_Ethereum_Proto_Transaction.ERC20Approve() - } - set {transactionOneof = .erc20Approve(newValue)} - } - - public var erc721Transfer: TW_Ethereum_Proto_Transaction.ERC721Transfer { - get { - if case .erc721Transfer(let v)? = transactionOneof {return v} - return TW_Ethereum_Proto_Transaction.ERC721Transfer() - } - set {transactionOneof = .erc721Transfer(newValue)} - } - - public var erc1155Transfer: TW_Ethereum_Proto_Transaction.ERC1155Transfer { - get { - if case .erc1155Transfer(let v)? = transactionOneof {return v} - return TW_Ethereum_Proto_Transaction.ERC1155Transfer() - } - set {transactionOneof = .erc1155Transfer(newValue)} - } - - public var contractGeneric: TW_Ethereum_Proto_Transaction.ContractGeneric { - get { - if case .contractGeneric(let v)? = transactionOneof {return v} - return TW_Ethereum_Proto_Transaction.ContractGeneric() - } - set {transactionOneof = .contractGeneric(newValue)} - } - - public var batch: TW_Ethereum_Proto_Transaction.Batch { - get { - if case .batch(let v)? = transactionOneof {return v} - return TW_Ethereum_Proto_Transaction.Batch() - } - set {transactionOneof = .batch(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Payload transfer - public enum OneOf_TransactionOneof: Equatable { - case transfer(TW_Ethereum_Proto_Transaction.Transfer) - case erc20Transfer(TW_Ethereum_Proto_Transaction.ERC20Transfer) - case erc20Approve(TW_Ethereum_Proto_Transaction.ERC20Approve) - case erc721Transfer(TW_Ethereum_Proto_Transaction.ERC721Transfer) - case erc1155Transfer(TW_Ethereum_Proto_Transaction.ERC1155Transfer) - case contractGeneric(TW_Ethereum_Proto_Transaction.ContractGeneric) - case batch(TW_Ethereum_Proto_Transaction.Batch) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Ethereum_Proto_Transaction.OneOf_TransactionOneof, rhs: TW_Ethereum_Proto_Transaction.OneOf_TransactionOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transfer, .transfer): return { - guard case .transfer(let l) = lhs, case .transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.erc20Transfer, .erc20Transfer): return { - guard case .erc20Transfer(let l) = lhs, case .erc20Transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.erc20Approve, .erc20Approve): return { - guard case .erc20Approve(let l) = lhs, case .erc20Approve(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.erc721Transfer, .erc721Transfer): return { - guard case .erc721Transfer(let l) = lhs, case .erc721Transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.erc1155Transfer, .erc1155Transfer): return { - guard case .erc1155Transfer(let l) = lhs, case .erc1155Transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.contractGeneric, .contractGeneric): return { - guard case .contractGeneric(let l) = lhs, case .contractGeneric(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.batch, .batch): return { - guard case .batch(let l) = lhs, case .batch(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - /// Native coin transfer transaction - public struct Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Amount to send in wei (uint256, serialized little endian) - public var amount: Data = Data() - - /// Optional payload data - public var data: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// ERC20 token transfer transaction - public struct ERC20Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// destination address (string) - public var to: String = String() - - /// Amount to send (uint256, serialized little endian) - public var amount: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// ERC20 approve transaction - public struct ERC20Approve { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Target of the approval - public var spender: String = String() - - /// Amount to send (uint256, serialized little endian) - public var amount: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// ERC721 NFT transfer transaction - public struct ERC721Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Source address - public var from: String = String() - - /// Destination address - public var to: String = String() - - /// ID of the token (uint256, serialized little endian) - public var tokenID: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// ERC1155 NFT transfer transaction - public struct ERC1155Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Source address - public var from: String = String() - - /// Destination address - public var to: String = String() - - /// ID of the token (uint256, serialized little endian) - public var tokenID: Data = Data() - - /// The amount of tokens being transferred (uint256, serialized little endian) - public var value: Data = Data() - - public var data: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// Generic smart contract transaction - public struct ContractGeneric { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Amount to send in wei (uint256, serialized little endian) - public var amount: Data = Data() - - /// Contract call payload data - public var data: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// Batched transaction for ERC-4337 wallets - public struct Batch { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var calls: [TW_Ethereum_Proto_Transaction.Batch.BatchedCall] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public struct BatchedCall { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Recipient addresses. - public var address: String = String() - - /// Amounts to send in wei (uint256, serialized little endian) - public var amount: Data = Data() - - /// Contract call payloads data - public var payload: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public init() {} - } - - public init() {} -} - -/// ERC-4337 structure that describes a transaction to be sent on behalf of a user -public struct TW_Ethereum_Proto_UserOperation { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Entry point contract address - public var entryPoint: String = String() - - /// Account factory contract address - public var initCode: Data = Data() - - /// Account logic contract address - public var sender: String = String() - - /// The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata - public var preVerificationGas: Data = Data() - - /// The amount of gas to allocate for the verification step - public var verificationGasLimit: Data = Data() - - /// Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (empty for self-sponsored transaction) - public var paymasterAndData: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -/// Legacy and EIP2718/EIP1559 transactions supported, see TransactionMode. -public struct TW_Ethereum_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Chain identifier (uint256, serialized little endian) - public var chainID: Data { - get {return _storage._chainID} - set {_uniqueStorage()._chainID = newValue} - } - - /// Nonce (uint256, serialized little endian) - public var nonce: Data { - get {return _storage._nonce} - set {_uniqueStorage()._nonce = newValue} - } - - /// Transaction version selector: Legacy or enveloped, has impact on fee structure. - /// Default is Legacy (value 0) - public var txMode: TW_Ethereum_Proto_TransactionMode { - get {return _storage._txMode} - set {_uniqueStorage()._txMode = newValue} - } - - /// Gas price (uint256, serialized little endian) - /// Relevant for legacy transactions only (disregarded for enveloped/EIP1559) - public var gasPrice: Data { - get {return _storage._gasPrice} - set {_uniqueStorage()._gasPrice = newValue} - } - - /// Gas limit (uint256, serialized little endian) - public var gasLimit: Data { - get {return _storage._gasLimit} - set {_uniqueStorage()._gasLimit = newValue} - } - - /// Maximum optional inclusion fee (aka tip) (uint256, serialized little endian) - /// Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy) - public var maxInclusionFeePerGas: Data { - get {return _storage._maxInclusionFeePerGas} - set {_uniqueStorage()._maxInclusionFeePerGas = newValue} - } - - /// Maximum fee (uint256, serialized little endian) - /// Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy) - public var maxFeePerGas: Data { - get {return _storage._maxFeePerGas} - set {_uniqueStorage()._maxFeePerGas = newValue} - } - - /// Recipient's address. - public var toAddress: String { - get {return _storage._toAddress} - set {_uniqueStorage()._toAddress = newValue} - } - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data { - get {return _storage._privateKey} - set {_uniqueStorage()._privateKey = newValue} - } - - /// The payload transaction - public var transaction: TW_Ethereum_Proto_Transaction { - get {return _storage._transaction ?? TW_Ethereum_Proto_Transaction()} - set {_uniqueStorage()._transaction = newValue} - } - /// Returns true if `transaction` has been explicitly set. - public var hasTransaction: Bool {return _storage._transaction != nil} - /// Clears the value of `transaction`. Subsequent reads from it will return its default value. - public mutating func clearTransaction() {_uniqueStorage()._transaction = nil} - - /// UserOperation for ERC-4337 wallets - public var userOperation: TW_Ethereum_Proto_UserOperation { - get {return _storage._userOperation ?? TW_Ethereum_Proto_UserOperation()} - set {_uniqueStorage()._userOperation = newValue} - } - /// Returns true if `userOperation` has been explicitly set. - public var hasUserOperation: Bool {return _storage._userOperation != nil} - /// Clears the value of `userOperation`. Subsequent reads from it will return its default value. - public mutating func clearUserOperation() {_uniqueStorage()._userOperation = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Result containing the signed and encoded transaction. -public struct TW_Ethereum_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// The V, R, S components of the resulting signature, (each uint256, serialized little endian) - public var v: Data = Data() - - public var r: Data = Data() - - public var s: Data = Data() - - /// The payload part, supplied in the input or assembled from input parameters - public var data: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - /// Encoded transaction bytes. - public var preHash: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Ethereum_Proto_MaybeChainId { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Chain ID. - public var chainID: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Ethereum_Proto_MessageSigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Message to sign. Either a regular message or a typed data structured message in JSON format. - /// Message type should be declared at `message_type`. - public var message: String = String() - - /// Optional. Used in replay protection and to check Typed Structured Data input. - /// Eg. should be set if `message_type` is `MessageType_eip155`, or MessageType_typed, or `MessageType_typed_eip155`. - public var chainID: TW_Ethereum_Proto_MaybeChainId { - get {return _chainID ?? TW_Ethereum_Proto_MaybeChainId()} - set {_chainID = newValue} - } - /// Returns true if `chainID` has been explicitly set. - public var hasChainID: Bool {return self._chainID != nil} - /// Clears the value of `chainID`. Subsequent reads from it will return its default value. - public mutating func clearChainID() {self._chainID = nil} - - /// Message type. - public var messageType: TW_Ethereum_Proto_MessageType = .legacy - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _chainID: TW_Ethereum_Proto_MaybeChainId? = nil -} - -public struct TW_Ethereum_Proto_MessageSigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The signature, Hex-encoded. - public var signature: String = String() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Ethereum_Proto_MessageVerifyingInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The message signed. - public var message: String = String() - - /// Public key that will verify and recover the message from the signature. - public var publicKey: Data = Data() - - /// The signature, Hex-encoded. - public var signature: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Ethereum.Proto" - -extension TW_Ethereum_Proto_TransactionMode: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "Legacy"), - 1: .same(proto: "Enveloped"), - 2: .same(proto: "UserOp"), - ] -} - -extension TW_Ethereum_Proto_MessageType: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "MessageType_legacy"), - 1: .same(proto: "MessageType_eip155"), - 2: .same(proto: "MessageType_typed"), - 3: .same(proto: "MessageType_typed_eip155"), - 4: .same(proto: "MessageType_immutable_x"), - ] -} - -extension TW_Ethereum_Proto_Transaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transaction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "transfer"), - 2: .standard(proto: "erc20_transfer"), - 3: .standard(proto: "erc20_approve"), - 4: .standard(proto: "erc721_transfer"), - 5: .standard(proto: "erc1155_transfer"), - 6: .standard(proto: "contract_generic"), - 7: .same(proto: "batch"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_Ethereum_Proto_Transaction.Transfer? - var hadOneofValue = false - if let current = self.transactionOneof { - hadOneofValue = true - if case .transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionOneof = .transfer(v) - } - }() - case 2: try { - var v: TW_Ethereum_Proto_Transaction.ERC20Transfer? - var hadOneofValue = false - if let current = self.transactionOneof { - hadOneofValue = true - if case .erc20Transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionOneof = .erc20Transfer(v) - } - }() - case 3: try { - var v: TW_Ethereum_Proto_Transaction.ERC20Approve? - var hadOneofValue = false - if let current = self.transactionOneof { - hadOneofValue = true - if case .erc20Approve(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionOneof = .erc20Approve(v) - } - }() - case 4: try { - var v: TW_Ethereum_Proto_Transaction.ERC721Transfer? - var hadOneofValue = false - if let current = self.transactionOneof { - hadOneofValue = true - if case .erc721Transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionOneof = .erc721Transfer(v) - } - }() - case 5: try { - var v: TW_Ethereum_Proto_Transaction.ERC1155Transfer? - var hadOneofValue = false - if let current = self.transactionOneof { - hadOneofValue = true - if case .erc1155Transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionOneof = .erc1155Transfer(v) - } - }() - case 6: try { - var v: TW_Ethereum_Proto_Transaction.ContractGeneric? - var hadOneofValue = false - if let current = self.transactionOneof { - hadOneofValue = true - if case .contractGeneric(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionOneof = .contractGeneric(v) - } - }() - case 7: try { - var v: TW_Ethereum_Proto_Transaction.Batch? - var hadOneofValue = false - if let current = self.transactionOneof { - hadOneofValue = true - if case .batch(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionOneof = .batch(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.transactionOneof { - case .transfer?: try { - guard case .transfer(let v)? = self.transactionOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .erc20Transfer?: try { - guard case .erc20Transfer(let v)? = self.transactionOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .erc20Approve?: try { - guard case .erc20Approve(let v)? = self.transactionOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .erc721Transfer?: try { - guard case .erc721Transfer(let v)? = self.transactionOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case .erc1155Transfer?: try { - guard case .erc1155Transfer(let v)? = self.transactionOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - }() - case .contractGeneric?: try { - guard case .contractGeneric(let v)? = self.transactionOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - }() - case .batch?: try { - guard case .batch(let v)? = self.transactionOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_Transaction, rhs: TW_Ethereum_Proto_Transaction) -> Bool { - if lhs.transactionOneof != rhs.transactionOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_Transaction.Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Ethereum_Proto_Transaction.protoMessageName + ".Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - 2: .same(proto: "data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.data) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 1) - } - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_Transaction.Transfer, rhs: TW_Ethereum_Proto_Transaction.Transfer) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.data != rhs.data {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_Transaction.ERC20Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Ethereum_Proto_Transaction.protoMessageName + ".ERC20Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "to"), - 2: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 1) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_Transaction.ERC20Transfer, rhs: TW_Ethereum_Proto_Transaction.ERC20Transfer) -> Bool { - if lhs.to != rhs.to {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_Transaction.ERC20Approve: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Ethereum_Proto_Transaction.protoMessageName + ".ERC20Approve" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "spender"), - 2: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.spender) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.spender.isEmpty { - try visitor.visitSingularStringField(value: self.spender, fieldNumber: 1) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_Transaction.ERC20Approve, rhs: TW_Ethereum_Proto_Transaction.ERC20Approve) -> Bool { - if lhs.spender != rhs.spender {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_Transaction.ERC721Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Ethereum_Proto_Transaction.protoMessageName + ".ERC721Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .same(proto: "to"), - 3: .standard(proto: "token_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.from) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.tokenID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.from.isEmpty { - try visitor.visitSingularStringField(value: self.from, fieldNumber: 1) - } - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 2) - } - if !self.tokenID.isEmpty { - try visitor.visitSingularBytesField(value: self.tokenID, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_Transaction.ERC721Transfer, rhs: TW_Ethereum_Proto_Transaction.ERC721Transfer) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.to != rhs.to {return false} - if lhs.tokenID != rhs.tokenID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_Transaction.ERC1155Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Ethereum_Proto_Transaction.protoMessageName + ".ERC1155Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .same(proto: "to"), - 3: .standard(proto: "token_id"), - 4: .same(proto: "value"), - 5: .same(proto: "data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.from) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.tokenID) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.data) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.from.isEmpty { - try visitor.visitSingularStringField(value: self.from, fieldNumber: 1) - } - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 2) - } - if !self.tokenID.isEmpty { - try visitor.visitSingularBytesField(value: self.tokenID, fieldNumber: 3) - } - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 4) - } - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_Transaction.ERC1155Transfer, rhs: TW_Ethereum_Proto_Transaction.ERC1155Transfer) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.to != rhs.to {return false} - if lhs.tokenID != rhs.tokenID {return false} - if lhs.value != rhs.value {return false} - if lhs.data != rhs.data {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_Transaction.ContractGeneric: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Ethereum_Proto_Transaction.protoMessageName + ".ContractGeneric" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - 2: .same(proto: "data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.data) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 1) - } - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_Transaction.ContractGeneric, rhs: TW_Ethereum_Proto_Transaction.ContractGeneric) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.data != rhs.data {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_Transaction.Batch: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Ethereum_Proto_Transaction.protoMessageName + ".Batch" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "calls"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.calls) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.calls.isEmpty { - try visitor.visitRepeatedMessageField(value: self.calls, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_Transaction.Batch, rhs: TW_Ethereum_Proto_Transaction.Batch) -> Bool { - if lhs.calls != rhs.calls {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_Transaction.Batch.BatchedCall: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Ethereum_Proto_Transaction.Batch.protoMessageName + ".BatchedCall" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "address"), - 2: .same(proto: "amount"), - 3: .same(proto: "payload"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.address) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.address.isEmpty { - try visitor.visitSingularStringField(value: self.address, fieldNumber: 1) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 2) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_Transaction.Batch.BatchedCall, rhs: TW_Ethereum_Proto_Transaction.Batch.BatchedCall) -> Bool { - if lhs.address != rhs.address {return false} - if lhs.amount != rhs.amount {return false} - if lhs.payload != rhs.payload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_UserOperation: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".UserOperation" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "entry_point"), - 2: .standard(proto: "init_code"), - 3: .same(proto: "sender"), - 4: .standard(proto: "pre_verification_gas"), - 5: .standard(proto: "verification_gas_limit"), - 6: .standard(proto: "paymaster_and_data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.entryPoint) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.initCode) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.sender) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.preVerificationGas) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.verificationGasLimit) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.paymasterAndData) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.entryPoint.isEmpty { - try visitor.visitSingularStringField(value: self.entryPoint, fieldNumber: 1) - } - if !self.initCode.isEmpty { - try visitor.visitSingularBytesField(value: self.initCode, fieldNumber: 2) - } - if !self.sender.isEmpty { - try visitor.visitSingularStringField(value: self.sender, fieldNumber: 3) - } - if !self.preVerificationGas.isEmpty { - try visitor.visitSingularBytesField(value: self.preVerificationGas, fieldNumber: 4) - } - if !self.verificationGasLimit.isEmpty { - try visitor.visitSingularBytesField(value: self.verificationGasLimit, fieldNumber: 5) - } - if !self.paymasterAndData.isEmpty { - try visitor.visitSingularBytesField(value: self.paymasterAndData, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_UserOperation, rhs: TW_Ethereum_Proto_UserOperation) -> Bool { - if lhs.entryPoint != rhs.entryPoint {return false} - if lhs.initCode != rhs.initCode {return false} - if lhs.sender != rhs.sender {return false} - if lhs.preVerificationGas != rhs.preVerificationGas {return false} - if lhs.verificationGasLimit != rhs.verificationGasLimit {return false} - if lhs.paymasterAndData != rhs.paymasterAndData {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "chain_id"), - 2: .same(proto: "nonce"), - 3: .standard(proto: "tx_mode"), - 4: .standard(proto: "gas_price"), - 5: .standard(proto: "gas_limit"), - 6: .standard(proto: "max_inclusion_fee_per_gas"), - 7: .standard(proto: "max_fee_per_gas"), - 8: .standard(proto: "to_address"), - 9: .standard(proto: "private_key"), - 10: .same(proto: "transaction"), - 11: .standard(proto: "user_operation"), - ] - - fileprivate class _StorageClass { - var _chainID: Data = Data() - var _nonce: Data = Data() - var _txMode: TW_Ethereum_Proto_TransactionMode = .legacy - var _gasPrice: Data = Data() - var _gasLimit: Data = Data() - var _maxInclusionFeePerGas: Data = Data() - var _maxFeePerGas: Data = Data() - var _toAddress: String = String() - var _privateKey: Data = Data() - var _transaction: TW_Ethereum_Proto_Transaction? = nil - var _userOperation: TW_Ethereum_Proto_UserOperation? = nil - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _chainID = source._chainID - _nonce = source._nonce - _txMode = source._txMode - _gasPrice = source._gasPrice - _gasLimit = source._gasLimit - _maxInclusionFeePerGas = source._maxInclusionFeePerGas - _maxFeePerGas = source._maxFeePerGas - _toAddress = source._toAddress - _privateKey = source._privateKey - _transaction = source._transaction - _userOperation = source._userOperation - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &_storage._chainID) }() - case 2: try { try decoder.decodeSingularBytesField(value: &_storage._nonce) }() - case 3: try { try decoder.decodeSingularEnumField(value: &_storage._txMode) }() - case 4: try { try decoder.decodeSingularBytesField(value: &_storage._gasPrice) }() - case 5: try { try decoder.decodeSingularBytesField(value: &_storage._gasLimit) }() - case 6: try { try decoder.decodeSingularBytesField(value: &_storage._maxInclusionFeePerGas) }() - case 7: try { try decoder.decodeSingularBytesField(value: &_storage._maxFeePerGas) }() - case 8: try { try decoder.decodeSingularStringField(value: &_storage._toAddress) }() - case 9: try { try decoder.decodeSingularBytesField(value: &_storage._privateKey) }() - case 10: try { try decoder.decodeSingularMessageField(value: &_storage._transaction) }() - case 11: try { try decoder.decodeSingularMessageField(value: &_storage._userOperation) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !_storage._chainID.isEmpty { - try visitor.visitSingularBytesField(value: _storage._chainID, fieldNumber: 1) - } - if !_storage._nonce.isEmpty { - try visitor.visitSingularBytesField(value: _storage._nonce, fieldNumber: 2) - } - if _storage._txMode != .legacy { - try visitor.visitSingularEnumField(value: _storage._txMode, fieldNumber: 3) - } - if !_storage._gasPrice.isEmpty { - try visitor.visitSingularBytesField(value: _storage._gasPrice, fieldNumber: 4) - } - if !_storage._gasLimit.isEmpty { - try visitor.visitSingularBytesField(value: _storage._gasLimit, fieldNumber: 5) - } - if !_storage._maxInclusionFeePerGas.isEmpty { - try visitor.visitSingularBytesField(value: _storage._maxInclusionFeePerGas, fieldNumber: 6) - } - if !_storage._maxFeePerGas.isEmpty { - try visitor.visitSingularBytesField(value: _storage._maxFeePerGas, fieldNumber: 7) - } - if !_storage._toAddress.isEmpty { - try visitor.visitSingularStringField(value: _storage._toAddress, fieldNumber: 8) - } - if !_storage._privateKey.isEmpty { - try visitor.visitSingularBytesField(value: _storage._privateKey, fieldNumber: 9) - } - try { if let v = _storage._transaction { - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - } }() - try { if let v = _storage._userOperation { - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - } }() - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_SigningInput, rhs: TW_Ethereum_Proto_SigningInput) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._chainID != rhs_storage._chainID {return false} - if _storage._nonce != rhs_storage._nonce {return false} - if _storage._txMode != rhs_storage._txMode {return false} - if _storage._gasPrice != rhs_storage._gasPrice {return false} - if _storage._gasLimit != rhs_storage._gasLimit {return false} - if _storage._maxInclusionFeePerGas != rhs_storage._maxInclusionFeePerGas {return false} - if _storage._maxFeePerGas != rhs_storage._maxFeePerGas {return false} - if _storage._toAddress != rhs_storage._toAddress {return false} - if _storage._privateKey != rhs_storage._privateKey {return false} - if _storage._transaction != rhs_storage._transaction {return false} - if _storage._userOperation != rhs_storage._userOperation {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "v"), - 3: .same(proto: "r"), - 4: .same(proto: "s"), - 5: .same(proto: "data"), - 6: .same(proto: "error"), - 7: .standard(proto: "error_message"), - 8: .standard(proto: "pre_hash"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.v) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.r) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.s) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.data) }() - case 6: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 7: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - case 8: try { try decoder.decodeSingularBytesField(value: &self.preHash) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if !self.v.isEmpty { - try visitor.visitSingularBytesField(value: self.v, fieldNumber: 2) - } - if !self.r.isEmpty { - try visitor.visitSingularBytesField(value: self.r, fieldNumber: 3) - } - if !self.s.isEmpty { - try visitor.visitSingularBytesField(value: self.s, fieldNumber: 4) - } - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 5) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 6) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 7) - } - if !self.preHash.isEmpty { - try visitor.visitSingularBytesField(value: self.preHash, fieldNumber: 8) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_SigningOutput, rhs: TW_Ethereum_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.v != rhs.v {return false} - if lhs.r != rhs.r {return false} - if lhs.s != rhs.s {return false} - if lhs.data != rhs.data {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.preHash != rhs.preHash {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_MaybeChainId: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".MaybeChainId" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 3: .standard(proto: "chain_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.chainID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.chainID != 0 { - try visitor.visitSingularUInt64Field(value: self.chainID, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_MaybeChainId, rhs: TW_Ethereum_Proto_MaybeChainId) -> Bool { - if lhs.chainID != rhs.chainID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_MessageSigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".MessageSigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "private_key"), - 2: .same(proto: "message"), - 3: .standard(proto: "chain_id"), - 4: .standard(proto: "message_type"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.message) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._chainID) }() - case 4: try { try decoder.decodeSingularEnumField(value: &self.messageType) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 1) - } - if !self.message.isEmpty { - try visitor.visitSingularStringField(value: self.message, fieldNumber: 2) - } - try { if let v = self._chainID { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if self.messageType != .legacy { - try visitor.visitSingularEnumField(value: self.messageType, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_MessageSigningInput, rhs: TW_Ethereum_Proto_MessageSigningInput) -> Bool { - if lhs.privateKey != rhs.privateKey {return false} - if lhs.message != rhs.message {return false} - if lhs._chainID != rhs._chainID {return false} - if lhs.messageType != rhs.messageType {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_MessageSigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".MessageSigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "signature"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.signature) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.signature.isEmpty { - try visitor.visitSingularStringField(value: self.signature, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_MessageSigningOutput, rhs: TW_Ethereum_Proto_MessageSigningOutput) -> Bool { - if lhs.signature != rhs.signature {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ethereum_Proto_MessageVerifyingInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".MessageVerifyingInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "message"), - 2: .standard(proto: "public_key"), - 3: .same(proto: "signature"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.message) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.signature) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.message.isEmpty { - try visitor.visitSingularStringField(value: self.message, fieldNumber: 1) - } - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 2) - } - if !self.signature.isEmpty { - try visitor.visitSingularStringField(value: self.signature, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ethereum_Proto_MessageVerifyingInput, rhs: TW_Ethereum_Proto_MessageVerifyingInput) -> Bool { - if lhs.message != rhs.message {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.signature != rhs.signature {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/EthereumAbi+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/EthereumAbi+Proto.swift deleted file mode 100644 index 360183c6..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/EthereumAbi+Proto.swift +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias EthereumAbiBoolType = TW_EthereumAbi_Proto_BoolType -public typealias EthereumAbiNumberNType = TW_EthereumAbi_Proto_NumberNType -public typealias EthereumAbiStringType = TW_EthereumAbi_Proto_StringType -public typealias EthereumAbiAddressType = TW_EthereumAbi_Proto_AddressType -public typealias EthereumAbiArrayType = TW_EthereumAbi_Proto_ArrayType -public typealias EthereumAbiFixedArrayType = TW_EthereumAbi_Proto_FixedArrayType -public typealias EthereumAbiByteArrayType = TW_EthereumAbi_Proto_ByteArrayType -public typealias EthereumAbiByteArrayFixType = TW_EthereumAbi_Proto_ByteArrayFixType -public typealias EthereumAbiTupleType = TW_EthereumAbi_Proto_TupleType -public typealias EthereumAbiParam = TW_EthereumAbi_Proto_Param -public typealias EthereumAbiParamType = TW_EthereumAbi_Proto_ParamType -public typealias EthereumAbiNumberNParam = TW_EthereumAbi_Proto_NumberNParam -public typealias EthereumAbiArrayParam = TW_EthereumAbi_Proto_ArrayParam -public typealias EthereumAbiTupleParam = TW_EthereumAbi_Proto_TupleParam -public typealias EthereumAbiToken = TW_EthereumAbi_Proto_Token -public typealias EthereumAbiContractCallDecodingInput = TW_EthereumAbi_Proto_ContractCallDecodingInput -public typealias EthereumAbiContractCallDecodingOutput = TW_EthereumAbi_Proto_ContractCallDecodingOutput -public typealias EthereumAbiAbiParams = TW_EthereumAbi_Proto_AbiParams -public typealias EthereumAbiParamsDecodingInput = TW_EthereumAbi_Proto_ParamsDecodingInput -public typealias EthereumAbiParamsDecodingOutput = TW_EthereumAbi_Proto_ParamsDecodingOutput -public typealias EthereumAbiValueDecodingInput = TW_EthereumAbi_Proto_ValueDecodingInput -public typealias EthereumAbiValueDecodingOutput = TW_EthereumAbi_Proto_ValueDecodingOutput -public typealias EthereumAbiFunctionEncodingInput = TW_EthereumAbi_Proto_FunctionEncodingInput -public typealias EthereumAbiFunctionEncodingOutput = TW_EthereumAbi_Proto_FunctionEncodingOutput -public typealias EthereumAbiFunctionGetTypeInput = TW_EthereumAbi_Proto_FunctionGetTypeInput -public typealias EthereumAbiAbiError = TW_EthereumAbi_Proto_AbiError diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/EthereumAbi.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/EthereumAbi.pb.swift deleted file mode 100644 index 7c175b29..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/EthereumAbi.pb.swift +++ /dev/null @@ -1,2350 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: EthereumAbi.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -public enum TW_EthereumAbi_Proto_AbiError: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// This is the OK case, with value=0 - case ok // = 0 - - /// Internal error. - case errorInternal // = 1 - - /// Unexpected function signature or ABI mismatch. - case errorAbiMismatch // = 2 - - /// Invalid ABI. - case errorInvalidAbi // = 3 - - /// Invalid parameter type. - case errorInvalidParamType // = 4 - - /// Invalid address value. - case errorInvalidAddressValue // = 5 - - /// Invalid UInt value. - case errorInvalidUintValue // = 6 - - /// Missing parameter type. - case errorMissingParamType // = 7 - - /// Missing parameter value. - case errorMissingParamValue // = 8 - - /// Invalid encoded data. - case errorDecodingData // = 9 - - /// Invalid empty type. - /// For example, bytes0, address[0]. - case errorEmptyType // = 10 - case UNRECOGNIZED(Int) - - public init() { - self = .ok - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .ok - case 1: self = .errorInternal - case 2: self = .errorAbiMismatch - case 3: self = .errorInvalidAbi - case 4: self = .errorInvalidParamType - case 5: self = .errorInvalidAddressValue - case 6: self = .errorInvalidUintValue - case 7: self = .errorMissingParamType - case 8: self = .errorMissingParamValue - case 9: self = .errorDecodingData - case 10: self = .errorEmptyType - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .ok: return 0 - case .errorInternal: return 1 - case .errorAbiMismatch: return 2 - case .errorInvalidAbi: return 3 - case .errorInvalidParamType: return 4 - case .errorInvalidAddressValue: return 5 - case .errorInvalidUintValue: return 6 - case .errorMissingParamType: return 7 - case .errorMissingParamValue: return 8 - case .errorDecodingData: return 9 - case .errorEmptyType: return 10 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_EthereumAbi_Proto_AbiError: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_EthereumAbi_Proto_AbiError] = [ - .ok, - .errorInternal, - .errorAbiMismatch, - .errorInvalidAbi, - .errorInvalidParamType, - .errorInvalidAddressValue, - .errorInvalidUintValue, - .errorMissingParamType, - .errorMissingParamValue, - .errorDecodingData, - .errorEmptyType, - ] -} - -#endif // swift(>=4.2) - -/// Indicates a boolean type. -public struct TW_EthereumAbi_Proto_BoolType { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Generic number type for all bit sizes, like UInt24, 40, 48, ... 248. -public struct TW_EthereumAbi_Proto_NumberNType { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The number of bits of an integer. - public var bits: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Indicates a string type. -public struct TW_EthereumAbi_Proto_StringType { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Indicates an address type. -public struct TW_EthereumAbi_Proto_AddressType { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Indicates an array type with an inner `element_type`. -public struct TW_EthereumAbi_Proto_ArrayType { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The type of array elements. - public var elementType: TW_EthereumAbi_Proto_ParamType { - get {return _storage._elementType ?? TW_EthereumAbi_Proto_ParamType()} - set {_uniqueStorage()._elementType = newValue} - } - /// Returns true if `elementType` has been explicitly set. - public var hasElementType: Bool {return _storage._elementType != nil} - /// Clears the value of `elementType`. Subsequent reads from it will return its default value. - public mutating func clearElementType() {_uniqueStorage()._elementType = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Indicates a fixed-size array type with an inner `element_type`. -public struct TW_EthereumAbi_Proto_FixedArrayType { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The fixed-size of the array. - public var size: UInt64 { - get {return _storage._size} - set {_uniqueStorage()._size = newValue} - } - - /// The type of array elements. - public var elementType: TW_EthereumAbi_Proto_ParamType { - get {return _storage._elementType ?? TW_EthereumAbi_Proto_ParamType()} - set {_uniqueStorage()._elementType = newValue} - } - /// Returns true if `elementType` has been explicitly set. - public var hasElementType: Bool {return _storage._elementType != nil} - /// Clears the value of `elementType`. Subsequent reads from it will return its default value. - public mutating func clearElementType() {_uniqueStorage()._elementType = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Indicates a byte array type. -public struct TW_EthereumAbi_Proto_ByteArrayType { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Indicates a fixed-size byte array type. -public struct TW_EthereumAbi_Proto_ByteArrayFixType { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The fixed-size of the array. - public var size: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Indicates a tuple with inner type parameters. -public struct TW_EthereumAbi_Proto_TupleType { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Tuple named parameters. - public var params: [TW_EthereumAbi_Proto_Param] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Named parameter with type. -public struct TW_EthereumAbi_Proto_Param { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Name of the parameter. - public var name: String = String() - - /// Type of the parameter. - public var param: TW_EthereumAbi_Proto_ParamType { - get {return _param ?? TW_EthereumAbi_Proto_ParamType()} - set {_param = newValue} - } - /// Returns true if `param` has been explicitly set. - public var hasParam: Bool {return self._param != nil} - /// Clears the value of `param`. Subsequent reads from it will return its default value. - public mutating func clearParam() {self._param = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _param: TW_EthereumAbi_Proto_ParamType? = nil -} - -public struct TW_EthereumAbi_Proto_ParamType { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var param: OneOf_Param? { - get {return _storage._param} - set {_uniqueStorage()._param = newValue} - } - - public var boolean: TW_EthereumAbi_Proto_BoolType { - get { - if case .boolean(let v)? = _storage._param {return v} - return TW_EthereumAbi_Proto_BoolType() - } - set {_uniqueStorage()._param = .boolean(newValue)} - } - - public var numberInt: TW_EthereumAbi_Proto_NumberNType { - get { - if case .numberInt(let v)? = _storage._param {return v} - return TW_EthereumAbi_Proto_NumberNType() - } - set {_uniqueStorage()._param = .numberInt(newValue)} - } - - public var numberUint: TW_EthereumAbi_Proto_NumberNType { - get { - if case .numberUint(let v)? = _storage._param {return v} - return TW_EthereumAbi_Proto_NumberNType() - } - set {_uniqueStorage()._param = .numberUint(newValue)} - } - - /// Nested values. Gap in field numbering is intentional. - public var stringParam: TW_EthereumAbi_Proto_StringType { - get { - if case .stringParam(let v)? = _storage._param {return v} - return TW_EthereumAbi_Proto_StringType() - } - set {_uniqueStorage()._param = .stringParam(newValue)} - } - - public var address: TW_EthereumAbi_Proto_AddressType { - get { - if case .address(let v)? = _storage._param {return v} - return TW_EthereumAbi_Proto_AddressType() - } - set {_uniqueStorage()._param = .address(newValue)} - } - - public var byteArray: TW_EthereumAbi_Proto_ByteArrayType { - get { - if case .byteArray(let v)? = _storage._param {return v} - return TW_EthereumAbi_Proto_ByteArrayType() - } - set {_uniqueStorage()._param = .byteArray(newValue)} - } - - public var byteArrayFix: TW_EthereumAbi_Proto_ByteArrayFixType { - get { - if case .byteArrayFix(let v)? = _storage._param {return v} - return TW_EthereumAbi_Proto_ByteArrayFixType() - } - set {_uniqueStorage()._param = .byteArrayFix(newValue)} - } - - /// Nested values. Gap in field numbering is intentional. - public var array: TW_EthereumAbi_Proto_ArrayType { - get { - if case .array(let v)? = _storage._param {return v} - return TW_EthereumAbi_Proto_ArrayType() - } - set {_uniqueStorage()._param = .array(newValue)} - } - - public var fixedArray: TW_EthereumAbi_Proto_FixedArrayType { - get { - if case .fixedArray(let v)? = _storage._param {return v} - return TW_EthereumAbi_Proto_FixedArrayType() - } - set {_uniqueStorage()._param = .fixedArray(newValue)} - } - - /// Nested values. Gap in field numbering is intentional. - public var tuple: TW_EthereumAbi_Proto_TupleType { - get { - if case .tuple(let v)? = _storage._param {return v} - return TW_EthereumAbi_Proto_TupleType() - } - set {_uniqueStorage()._param = .tuple(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_Param: Equatable { - case boolean(TW_EthereumAbi_Proto_BoolType) - case numberInt(TW_EthereumAbi_Proto_NumberNType) - case numberUint(TW_EthereumAbi_Proto_NumberNType) - /// Nested values. Gap in field numbering is intentional. - case stringParam(TW_EthereumAbi_Proto_StringType) - case address(TW_EthereumAbi_Proto_AddressType) - case byteArray(TW_EthereumAbi_Proto_ByteArrayType) - case byteArrayFix(TW_EthereumAbi_Proto_ByteArrayFixType) - /// Nested values. Gap in field numbering is intentional. - case array(TW_EthereumAbi_Proto_ArrayType) - case fixedArray(TW_EthereumAbi_Proto_FixedArrayType) - /// Nested values. Gap in field numbering is intentional. - case tuple(TW_EthereumAbi_Proto_TupleType) - - #if !swift(>=4.1) - public static func ==(lhs: TW_EthereumAbi_Proto_ParamType.OneOf_Param, rhs: TW_EthereumAbi_Proto_ParamType.OneOf_Param) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.boolean, .boolean): return { - guard case .boolean(let l) = lhs, case .boolean(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.numberInt, .numberInt): return { - guard case .numberInt(let l) = lhs, case .numberInt(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.numberUint, .numberUint): return { - guard case .numberUint(let l) = lhs, case .numberUint(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stringParam, .stringParam): return { - guard case .stringParam(let l) = lhs, case .stringParam(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.address, .address): return { - guard case .address(let l) = lhs, case .address(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.byteArray, .byteArray): return { - guard case .byteArray(let l) = lhs, case .byteArray(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.byteArrayFix, .byteArrayFix): return { - guard case .byteArrayFix(let l) = lhs, case .byteArrayFix(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.array, .array): return { - guard case .array(let l) = lhs, case .array(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.fixedArray, .fixedArray): return { - guard case .fixedArray(let l) = lhs, case .fixedArray(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.tuple, .tuple): return { - guard case .tuple(let l) = lhs, case .tuple(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Generic number parameter for all other bit sizes, like UInt24, 40, 48, ... 248. -public struct TW_EthereumAbi_Proto_NumberNParam { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Count of bits of the number. - /// 0 < bits <= 256, bits % 8 == 0 - public var bits: UInt32 = 0 - - /// Serialized big endian. - public var value: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A byte array of arbitrary size. -public struct TW_EthereumAbi_Proto_ArrayParam { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The type of array elements. - public var elementType: TW_EthereumAbi_Proto_ParamType { - get {return _elementType ?? TW_EthereumAbi_Proto_ParamType()} - set {_elementType = newValue} - } - /// Returns true if `elementType` has been explicitly set. - public var hasElementType: Bool {return self._elementType != nil} - /// Clears the value of `elementType`. Subsequent reads from it will return its default value. - public mutating func clearElementType() {self._elementType = nil} - - /// Array elements. - public var elements: [TW_EthereumAbi_Proto_Token] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _elementType: TW_EthereumAbi_Proto_ParamType? = nil -} - -/// A tuple with various parameters similar to a structure. -public struct TW_EthereumAbi_Proto_TupleParam { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Tokens (values) of the tuple parameters. - public var params: [TW_EthereumAbi_Proto_Token] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A value of an ABI parameter. -public struct TW_EthereumAbi_Proto_Token { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Optional. Name of a corresponding parameter. - public var name: String = String() - - public var token: TW_EthereumAbi_Proto_Token.OneOf_Token? = nil - - /// Integer values. - public var boolean: Bool { - get { - if case .boolean(let v)? = token {return v} - return false - } - set {token = .boolean(newValue)} - } - - public var numberInt: TW_EthereumAbi_Proto_NumberNParam { - get { - if case .numberInt(let v)? = token {return v} - return TW_EthereumAbi_Proto_NumberNParam() - } - set {token = .numberInt(newValue)} - } - - public var numberUint: TW_EthereumAbi_Proto_NumberNParam { - get { - if case .numberUint(let v)? = token {return v} - return TW_EthereumAbi_Proto_NumberNParam() - } - set {token = .numberUint(newValue)} - } - - /// Simple values. Gap in field numbering is intentional. - public var stringValue: String { - get { - if case .stringValue(let v)? = token {return v} - return String() - } - set {token = .stringValue(newValue)} - } - - public var address: String { - get { - if case .address(let v)? = token {return v} - return String() - } - set {token = .address(newValue)} - } - - public var byteArray: Data { - get { - if case .byteArray(let v)? = token {return v} - return Data() - } - set {token = .byteArray(newValue)} - } - - public var byteArrayFix: Data { - get { - if case .byteArrayFix(let v)? = token {return v} - return Data() - } - set {token = .byteArrayFix(newValue)} - } - - /// Nested values. Gap in field numbering is intentional. - public var array: TW_EthereumAbi_Proto_ArrayParam { - get { - if case .array(let v)? = token {return v} - return TW_EthereumAbi_Proto_ArrayParam() - } - set {token = .array(newValue)} - } - - public var fixedArray: TW_EthereumAbi_Proto_ArrayParam { - get { - if case .fixedArray(let v)? = token {return v} - return TW_EthereumAbi_Proto_ArrayParam() - } - set {token = .fixedArray(newValue)} - } - - /// Nested values. Gap in field numbering is intentional. - public var tuple: TW_EthereumAbi_Proto_TupleParam { - get { - if case .tuple(let v)? = token {return v} - return TW_EthereumAbi_Proto_TupleParam() - } - set {token = .tuple(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_Token: Equatable { - /// Integer values. - case boolean(Bool) - case numberInt(TW_EthereumAbi_Proto_NumberNParam) - case numberUint(TW_EthereumAbi_Proto_NumberNParam) - /// Simple values. Gap in field numbering is intentional. - case stringValue(String) - case address(String) - case byteArray(Data) - case byteArrayFix(Data) - /// Nested values. Gap in field numbering is intentional. - case array(TW_EthereumAbi_Proto_ArrayParam) - case fixedArray(TW_EthereumAbi_Proto_ArrayParam) - /// Nested values. Gap in field numbering is intentional. - case tuple(TW_EthereumAbi_Proto_TupleParam) - - #if !swift(>=4.1) - public static func ==(lhs: TW_EthereumAbi_Proto_Token.OneOf_Token, rhs: TW_EthereumAbi_Proto_Token.OneOf_Token) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.boolean, .boolean): return { - guard case .boolean(let l) = lhs, case .boolean(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.numberInt, .numberInt): return { - guard case .numberInt(let l) = lhs, case .numberInt(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.numberUint, .numberUint): return { - guard case .numberUint(let l) = lhs, case .numberUint(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stringValue, .stringValue): return { - guard case .stringValue(let l) = lhs, case .stringValue(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.address, .address): return { - guard case .address(let l) = lhs, case .address(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.byteArray, .byteArray): return { - guard case .byteArray(let l) = lhs, case .byteArray(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.byteArrayFix, .byteArrayFix): return { - guard case .byteArrayFix(let l) = lhs, case .byteArrayFix(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.array, .array): return { - guard case .array(let l) = lhs, case .array(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.fixedArray, .fixedArray): return { - guard case .fixedArray(let l) = lhs, case .fixedArray(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.tuple, .tuple): return { - guard case .tuple(let l) = lhs, case .tuple(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Decode a contract call (function input) according to the given ABI json. -public struct TW_EthereumAbi_Proto_ContractCallDecodingInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// An encoded smart contract call with a prefixed function signature (4 bytes). - public var encoded: Data = Data() - - /// A smart contract ABI in JSON. - /// Each ABI function must be mapped to a short signature. - /// Expected to be a set of functions mapped to corresponding short signatures. - /// Example: - /// ``` - /// { - /// "1896f70a": { - /// "name": "setResolver", - /// "inputs": [...], - /// ... - /// }, - /// "ac9650d8": { - /// "name": "multicall", - /// "inputs": [...], - /// ... - /// } - /// } - /// ``` - public var smartContractAbiJson: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_EthereumAbi_Proto_ContractCallDecodingOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Human readable json format, according to the input `ContractCallDecodingInput::smart_contract_abi_json`. - public var decodedJson: String = String() - - /// Decoded parameters. - public var tokens: [TW_EthereumAbi_Proto_Token] = [] - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_EthereumAbi_Proto_AbiError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A set of ABI type parameters. -public struct TW_EthereumAbi_Proto_AbiParams { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// ABI type parameters. - public var params: [TW_EthereumAbi_Proto_Param] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Decode a function input or output data according to the given ABI json. -public struct TW_EthereumAbi_Proto_ParamsDecodingInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// An encoded ABI. - public var encoded: Data = Data() - - public var abi: TW_EthereumAbi_Proto_ParamsDecodingInput.OneOf_Abi? = nil - - /// A set of ABI parameters in JSON. - /// Expected to be a JSON array at the entry level. - /// Example: - /// ``` - /// [ - /// { - /// "name": "_to', - /// "type": "address" - /// }, - /// { - /// "name": "_value", - /// "type": "uint256" - /// } - /// ] - /// ``` - public var abiJson: String { - get { - if case .abiJson(let v)? = abi {return v} - return String() - } - set {abi = .abiJson(newValue)} - } - - /// A set of ABI type parameters. - public var abiParams: TW_EthereumAbi_Proto_AbiParams { - get { - if case .abiParams(let v)? = abi {return v} - return TW_EthereumAbi_Proto_AbiParams() - } - set {abi = .abiParams(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_Abi: Equatable { - /// A set of ABI parameters in JSON. - /// Expected to be a JSON array at the entry level. - /// Example: - /// ``` - /// [ - /// { - /// "name": "_to', - /// "type": "address" - /// }, - /// { - /// "name": "_value", - /// "type": "uint256" - /// } - /// ] - /// ``` - case abiJson(String) - /// A set of ABI type parameters. - case abiParams(TW_EthereumAbi_Proto_AbiParams) - - #if !swift(>=4.1) - public static func ==(lhs: TW_EthereumAbi_Proto_ParamsDecodingInput.OneOf_Abi, rhs: TW_EthereumAbi_Proto_ParamsDecodingInput.OneOf_Abi) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.abiJson, .abiJson): return { - guard case .abiJson(let l) = lhs, case .abiJson(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.abiParams, .abiParams): return { - guard case .abiParams(let l) = lhs, case .abiParams(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -public struct TW_EthereumAbi_Proto_ParamsDecodingOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Decoded parameters. - public var tokens: [TW_EthereumAbi_Proto_Token] = [] - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_EthereumAbi_Proto_AbiError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Decode an Eth ABI value. -public struct TW_EthereumAbi_Proto_ValueDecodingInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// An encoded value to be decoded. - public var encoded: Data = Data() - - /// A type of the parameter. - /// Example: "bytes[32]". - /// Please note `tuple` is not supported. - public var paramType: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_EthereumAbi_Proto_ValueDecodingOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Decoded parameter. - public var token: TW_EthereumAbi_Proto_Token { - get {return _token ?? TW_EthereumAbi_Proto_Token()} - set {_token = newValue} - } - /// Returns true if `token` has been explicitly set. - public var hasToken: Bool {return self._token != nil} - /// Clears the value of `token`. Subsequent reads from it will return its default value. - public mutating func clearToken() {self._token = nil} - - /// Decoded parameter as a string. - public var paramStr: String = String() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_EthereumAbi_Proto_AbiError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _token: TW_EthereumAbi_Proto_Token? = nil -} - -/// Encode a function call to Eth ABI binary. -public struct TW_EthereumAbi_Proto_FunctionEncodingInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Function name. - public var functionName: String = String() - - /// Parameters to be encoded. - public var tokens: [TW_EthereumAbi_Proto_Token] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_EthereumAbi_Proto_FunctionEncodingOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The function type signature. - /// Example: "baz(int32,uint256)" - public var functionType: String = String() - - /// An encoded smart contract call with a prefixed function signature (4 bytes). - public var encoded: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_EthereumAbi_Proto_AbiError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Return the function type signature, of the form "baz(int32,uint256)". -public struct TW_EthereumAbi_Proto_FunctionGetTypeInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Function signature. Includes function inputs if they are. - /// Examples: - /// - `functionName()` - /// - `functionName()` - /// - `functionName(bool)` - /// - `functionName(uint256,bytes32)` - public var functionName: String = String() - - /// A set of ABI type parameters. - public var inputs: [TW_EthereumAbi_Proto_Param] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.EthereumAbi.Proto" - -extension TW_EthereumAbi_Proto_AbiError: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "OK"), - 1: .same(proto: "Error_internal"), - 2: .same(proto: "Error_abi_mismatch"), - 3: .same(proto: "Error_invalid_abi"), - 4: .same(proto: "Error_invalid_param_type"), - 5: .same(proto: "Error_invalid_address_value"), - 6: .same(proto: "Error_invalid_uint_value"), - 7: .same(proto: "Error_missing_param_type"), - 8: .same(proto: "Error_missing_param_value"), - 9: .same(proto: "Error_decoding_data"), - 10: .same(proto: "Error_empty_type"), - ] -} - -extension TW_EthereumAbi_Proto_BoolType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".BoolType" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - public mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - public func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_BoolType, rhs: TW_EthereumAbi_Proto_BoolType) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_NumberNType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".NumberNType" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "bits"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &self.bits) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.bits != 0 { - try visitor.visitSingularUInt32Field(value: self.bits, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_NumberNType, rhs: TW_EthereumAbi_Proto_NumberNType) -> Bool { - if lhs.bits != rhs.bits {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_StringType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".StringType" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - public mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - public func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_StringType, rhs: TW_EthereumAbi_Proto_StringType) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_AddressType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".AddressType" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - public mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - public func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_AddressType, rhs: TW_EthereumAbi_Proto_AddressType) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_ArrayType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ArrayType" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "element_type"), - ] - - fileprivate class _StorageClass { - var _elementType: TW_EthereumAbi_Proto_ParamType? = nil - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _elementType = source._elementType - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &_storage._elementType) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = _storage._elementType { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_ArrayType, rhs: TW_EthereumAbi_Proto_ArrayType) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._elementType != rhs_storage._elementType {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_FixedArrayType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FixedArrayType" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "size"), - 2: .standard(proto: "element_type"), - ] - - fileprivate class _StorageClass { - var _size: UInt64 = 0 - var _elementType: TW_EthereumAbi_Proto_ParamType? = nil - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _size = source._size - _elementType = source._elementType - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &_storage._size) }() - case 2: try { try decoder.decodeSingularMessageField(value: &_storage._elementType) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if _storage._size != 0 { - try visitor.visitSingularUInt64Field(value: _storage._size, fieldNumber: 1) - } - try { if let v = _storage._elementType { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_FixedArrayType, rhs: TW_EthereumAbi_Proto_FixedArrayType) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._size != rhs_storage._size {return false} - if _storage._elementType != rhs_storage._elementType {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_ByteArrayType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ByteArrayType" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - public mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - public func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_ByteArrayType, rhs: TW_EthereumAbi_Proto_ByteArrayType) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_ByteArrayFixType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ByteArrayFixType" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "size"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.size) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.size != 0 { - try visitor.visitSingularUInt64Field(value: self.size, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_ByteArrayFixType, rhs: TW_EthereumAbi_Proto_ByteArrayFixType) -> Bool { - if lhs.size != rhs.size {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_TupleType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TupleType" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "params"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.params) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.params.isEmpty { - try visitor.visitRepeatedMessageField(value: self.params, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_TupleType, rhs: TW_EthereumAbi_Proto_TupleType) -> Bool { - if lhs.params != rhs.params {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_Param: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Param" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "param"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._param) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) - } - try { if let v = self._param { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_Param, rhs: TW_EthereumAbi_Proto_Param) -> Bool { - if lhs.name != rhs.name {return false} - if lhs._param != rhs._param {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_ParamType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ParamType" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "boolean"), - 2: .standard(proto: "number_int"), - 3: .standard(proto: "number_uint"), - 7: .standard(proto: "string_param"), - 8: .same(proto: "address"), - 9: .standard(proto: "byte_array"), - 10: .standard(proto: "byte_array_fix"), - 14: .same(proto: "array"), - 15: .standard(proto: "fixed_array"), - 19: .same(proto: "tuple"), - ] - - fileprivate class _StorageClass { - var _param: TW_EthereumAbi_Proto_ParamType.OneOf_Param? - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _param = source._param - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_EthereumAbi_Proto_BoolType? - var hadOneofValue = false - if let current = _storage._param { - hadOneofValue = true - if case .boolean(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._param = .boolean(v) - } - }() - case 2: try { - var v: TW_EthereumAbi_Proto_NumberNType? - var hadOneofValue = false - if let current = _storage._param { - hadOneofValue = true - if case .numberInt(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._param = .numberInt(v) - } - }() - case 3: try { - var v: TW_EthereumAbi_Proto_NumberNType? - var hadOneofValue = false - if let current = _storage._param { - hadOneofValue = true - if case .numberUint(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._param = .numberUint(v) - } - }() - case 7: try { - var v: TW_EthereumAbi_Proto_StringType? - var hadOneofValue = false - if let current = _storage._param { - hadOneofValue = true - if case .stringParam(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._param = .stringParam(v) - } - }() - case 8: try { - var v: TW_EthereumAbi_Proto_AddressType? - var hadOneofValue = false - if let current = _storage._param { - hadOneofValue = true - if case .address(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._param = .address(v) - } - }() - case 9: try { - var v: TW_EthereumAbi_Proto_ByteArrayType? - var hadOneofValue = false - if let current = _storage._param { - hadOneofValue = true - if case .byteArray(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._param = .byteArray(v) - } - }() - case 10: try { - var v: TW_EthereumAbi_Proto_ByteArrayFixType? - var hadOneofValue = false - if let current = _storage._param { - hadOneofValue = true - if case .byteArrayFix(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._param = .byteArrayFix(v) - } - }() - case 14: try { - var v: TW_EthereumAbi_Proto_ArrayType? - var hadOneofValue = false - if let current = _storage._param { - hadOneofValue = true - if case .array(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._param = .array(v) - } - }() - case 15: try { - var v: TW_EthereumAbi_Proto_FixedArrayType? - var hadOneofValue = false - if let current = _storage._param { - hadOneofValue = true - if case .fixedArray(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._param = .fixedArray(v) - } - }() - case 19: try { - var v: TW_EthereumAbi_Proto_TupleType? - var hadOneofValue = false - if let current = _storage._param { - hadOneofValue = true - if case .tuple(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._param = .tuple(v) - } - }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch _storage._param { - case .boolean?: try { - guard case .boolean(let v)? = _storage._param else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .numberInt?: try { - guard case .numberInt(let v)? = _storage._param else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .numberUint?: try { - guard case .numberUint(let v)? = _storage._param else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .stringParam?: try { - guard case .stringParam(let v)? = _storage._param else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - }() - case .address?: try { - guard case .address(let v)? = _storage._param else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case .byteArray?: try { - guard case .byteArray(let v)? = _storage._param else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case .byteArrayFix?: try { - guard case .byteArrayFix(let v)? = _storage._param else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - }() - case .array?: try { - guard case .array(let v)? = _storage._param else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 14) - }() - case .fixedArray?: try { - guard case .fixedArray(let v)? = _storage._param else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - }() - case .tuple?: try { - guard case .tuple(let v)? = _storage._param else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 19) - }() - case nil: break - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_ParamType, rhs: TW_EthereumAbi_Proto_ParamType) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._param != rhs_storage._param {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_NumberNParam: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".NumberNParam" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "bits"), - 2: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &self.bits) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.bits != 0 { - try visitor.visitSingularUInt32Field(value: self.bits, fieldNumber: 1) - } - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_NumberNParam, rhs: TW_EthereumAbi_Proto_NumberNParam) -> Bool { - if lhs.bits != rhs.bits {return false} - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_ArrayParam: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ArrayParam" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "element_type"), - 2: .same(proto: "elements"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._elementType) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.elements) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._elementType { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.elements.isEmpty { - try visitor.visitRepeatedMessageField(value: self.elements, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_ArrayParam, rhs: TW_EthereumAbi_Proto_ArrayParam) -> Bool { - if lhs._elementType != rhs._elementType {return false} - if lhs.elements != rhs.elements {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_TupleParam: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TupleParam" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "params"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.params) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.params.isEmpty { - try visitor.visitRepeatedMessageField(value: self.params, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_TupleParam, rhs: TW_EthereumAbi_Proto_TupleParam) -> Bool { - if lhs.params != rhs.params {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_Token: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Token" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "boolean"), - 3: .standard(proto: "number_int"), - 4: .standard(proto: "number_uint"), - 7: .standard(proto: "string_value"), - 8: .same(proto: "address"), - 9: .standard(proto: "byte_array"), - 10: .standard(proto: "byte_array_fix"), - 14: .same(proto: "array"), - 15: .standard(proto: "fixed_array"), - 19: .same(proto: "tuple"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 2: try { - var v: Bool? - try decoder.decodeSingularBoolField(value: &v) - if let v = v { - if self.token != nil {try decoder.handleConflictingOneOf()} - self.token = .boolean(v) - } - }() - case 3: try { - var v: TW_EthereumAbi_Proto_NumberNParam? - var hadOneofValue = false - if let current = self.token { - hadOneofValue = true - if case .numberInt(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.token = .numberInt(v) - } - }() - case 4: try { - var v: TW_EthereumAbi_Proto_NumberNParam? - var hadOneofValue = false - if let current = self.token { - hadOneofValue = true - if case .numberUint(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.token = .numberUint(v) - } - }() - case 7: try { - var v: String? - try decoder.decodeSingularStringField(value: &v) - if let v = v { - if self.token != nil {try decoder.handleConflictingOneOf()} - self.token = .stringValue(v) - } - }() - case 8: try { - var v: String? - try decoder.decodeSingularStringField(value: &v) - if let v = v { - if self.token != nil {try decoder.handleConflictingOneOf()} - self.token = .address(v) - } - }() - case 9: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.token != nil {try decoder.handleConflictingOneOf()} - self.token = .byteArray(v) - } - }() - case 10: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.token != nil {try decoder.handleConflictingOneOf()} - self.token = .byteArrayFix(v) - } - }() - case 14: try { - var v: TW_EthereumAbi_Proto_ArrayParam? - var hadOneofValue = false - if let current = self.token { - hadOneofValue = true - if case .array(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.token = .array(v) - } - }() - case 15: try { - var v: TW_EthereumAbi_Proto_ArrayParam? - var hadOneofValue = false - if let current = self.token { - hadOneofValue = true - if case .fixedArray(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.token = .fixedArray(v) - } - }() - case 19: try { - var v: TW_EthereumAbi_Proto_TupleParam? - var hadOneofValue = false - if let current = self.token { - hadOneofValue = true - if case .tuple(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.token = .tuple(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) - } - switch self.token { - case .boolean?: try { - guard case .boolean(let v)? = self.token else { preconditionFailure() } - try visitor.visitSingularBoolField(value: v, fieldNumber: 2) - }() - case .numberInt?: try { - guard case .numberInt(let v)? = self.token else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .numberUint?: try { - guard case .numberUint(let v)? = self.token else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case .stringValue?: try { - guard case .stringValue(let v)? = self.token else { preconditionFailure() } - try visitor.visitSingularStringField(value: v, fieldNumber: 7) - }() - case .address?: try { - guard case .address(let v)? = self.token else { preconditionFailure() } - try visitor.visitSingularStringField(value: v, fieldNumber: 8) - }() - case .byteArray?: try { - guard case .byteArray(let v)? = self.token else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 9) - }() - case .byteArrayFix?: try { - guard case .byteArrayFix(let v)? = self.token else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 10) - }() - case .array?: try { - guard case .array(let v)? = self.token else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 14) - }() - case .fixedArray?: try { - guard case .fixedArray(let v)? = self.token else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - }() - case .tuple?: try { - guard case .tuple(let v)? = self.token else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 19) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_Token, rhs: TW_EthereumAbi_Proto_Token) -> Bool { - if lhs.name != rhs.name {return false} - if lhs.token != rhs.token {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_ContractCallDecodingInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ContractCallDecodingInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .standard(proto: "smart_contract_abi_json"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.smartContractAbiJson) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if !self.smartContractAbiJson.isEmpty { - try visitor.visitSingularStringField(value: self.smartContractAbiJson, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_ContractCallDecodingInput, rhs: TW_EthereumAbi_Proto_ContractCallDecodingInput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.smartContractAbiJson != rhs.smartContractAbiJson {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_ContractCallDecodingOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ContractCallDecodingOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "decoded_json"), - 2: .same(proto: "tokens"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.decodedJson) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.tokens) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.decodedJson.isEmpty { - try visitor.visitSingularStringField(value: self.decodedJson, fieldNumber: 1) - } - if !self.tokens.isEmpty { - try visitor.visitRepeatedMessageField(value: self.tokens, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_ContractCallDecodingOutput, rhs: TW_EthereumAbi_Proto_ContractCallDecodingOutput) -> Bool { - if lhs.decodedJson != rhs.decodedJson {return false} - if lhs.tokens != rhs.tokens {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_AbiParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".AbiParams" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "params"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.params) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.params.isEmpty { - try visitor.visitRepeatedMessageField(value: self.params, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_AbiParams, rhs: TW_EthereumAbi_Proto_AbiParams) -> Bool { - if lhs.params != rhs.params {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_ParamsDecodingInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ParamsDecodingInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .standard(proto: "abi_json"), - 3: .standard(proto: "abi_params"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { - var v: String? - try decoder.decodeSingularStringField(value: &v) - if let v = v { - if self.abi != nil {try decoder.handleConflictingOneOf()} - self.abi = .abiJson(v) - } - }() - case 3: try { - var v: TW_EthereumAbi_Proto_AbiParams? - var hadOneofValue = false - if let current = self.abi { - hadOneofValue = true - if case .abiParams(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.abi = .abiParams(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - switch self.abi { - case .abiJson?: try { - guard case .abiJson(let v)? = self.abi else { preconditionFailure() } - try visitor.visitSingularStringField(value: v, fieldNumber: 2) - }() - case .abiParams?: try { - guard case .abiParams(let v)? = self.abi else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_ParamsDecodingInput, rhs: TW_EthereumAbi_Proto_ParamsDecodingInput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.abi != rhs.abi {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_ParamsDecodingOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ParamsDecodingOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "tokens"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.tokens) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.tokens.isEmpty { - try visitor.visitRepeatedMessageField(value: self.tokens, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_ParamsDecodingOutput, rhs: TW_EthereumAbi_Proto_ParamsDecodingOutput) -> Bool { - if lhs.tokens != rhs.tokens {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_ValueDecodingInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ValueDecodingInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .standard(proto: "param_type"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.paramType) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if !self.paramType.isEmpty { - try visitor.visitSingularStringField(value: self.paramType, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_ValueDecodingInput, rhs: TW_EthereumAbi_Proto_ValueDecodingInput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.paramType != rhs.paramType {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_ValueDecodingOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ValueDecodingOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "token"), - 2: .standard(proto: "param_str"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._token) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.paramStr) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._token { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.paramStr.isEmpty { - try visitor.visitSingularStringField(value: self.paramStr, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_ValueDecodingOutput, rhs: TW_EthereumAbi_Proto_ValueDecodingOutput) -> Bool { - if lhs._token != rhs._token {return false} - if lhs.paramStr != rhs.paramStr {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_FunctionEncodingInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FunctionEncodingInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "function_name"), - 2: .same(proto: "tokens"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.functionName) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.tokens) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.functionName.isEmpty { - try visitor.visitSingularStringField(value: self.functionName, fieldNumber: 1) - } - if !self.tokens.isEmpty { - try visitor.visitRepeatedMessageField(value: self.tokens, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_FunctionEncodingInput, rhs: TW_EthereumAbi_Proto_FunctionEncodingInput) -> Bool { - if lhs.functionName != rhs.functionName {return false} - if lhs.tokens != rhs.tokens {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_FunctionEncodingOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FunctionEncodingOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "function_type"), - 2: .same(proto: "encoded"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.functionType) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.functionType.isEmpty { - try visitor.visitSingularStringField(value: self.functionType, fieldNumber: 1) - } - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_FunctionEncodingOutput, rhs: TW_EthereumAbi_Proto_FunctionEncodingOutput) -> Bool { - if lhs.functionType != rhs.functionType {return false} - if lhs.encoded != rhs.encoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumAbi_Proto_FunctionGetTypeInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FunctionGetTypeInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "function_name"), - 2: .same(proto: "inputs"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.functionName) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.inputs) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.functionName.isEmpty { - try visitor.visitSingularStringField(value: self.functionName, fieldNumber: 1) - } - if !self.inputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumAbi_Proto_FunctionGetTypeInput, rhs: TW_EthereumAbi_Proto_FunctionGetTypeInput) -> Bool { - if lhs.functionName != rhs.functionName {return false} - if lhs.inputs != rhs.inputs {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/EthereumRlp+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/EthereumRlp+Proto.swift deleted file mode 100644 index 6c0f6d30..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/EthereumRlp+Proto.swift +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias EthereumRlpRlpList = TW_EthereumRlp_Proto_RlpList -public typealias EthereumRlpRlpItem = TW_EthereumRlp_Proto_RlpItem -public typealias EthereumRlpEncodingInput = TW_EthereumRlp_Proto_EncodingInput -public typealias EthereumRlpEncodingOutput = TW_EthereumRlp_Proto_EncodingOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/EthereumRlp.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/EthereumRlp.pb.swift deleted file mode 100644 index 7975392c..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/EthereumRlp.pb.swift +++ /dev/null @@ -1,455 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: EthereumRlp.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// List of elements. -public struct TW_EthereumRlp_Proto_RlpList { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var items: [TW_EthereumRlp_Proto_RlpItem] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// RLP item. -public struct TW_EthereumRlp_Proto_RlpItem { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var item: TW_EthereumRlp_Proto_RlpItem.OneOf_Item? = nil - - /// A string to be encoded. - public var stringItem: String { - get { - if case .stringItem(let v)? = item {return v} - return String() - } - set {item = .stringItem(newValue)} - } - - /// A U64 number to be encoded. - public var numberU64: UInt64 { - get { - if case .numberU64(let v)? = item {return v} - return 0 - } - set {item = .numberU64(newValue)} - } - - /// A U256 number to be encoded. - public var numberU256: Data { - get { - if case .numberU256(let v)? = item {return v} - return Data() - } - set {item = .numberU256(newValue)} - } - - /// An address to be encoded. - public var address: String { - get { - if case .address(let v)? = item {return v} - return String() - } - set {item = .address(newValue)} - } - - /// A data to be encoded. - public var data: Data { - get { - if case .data(let v)? = item {return v} - return Data() - } - set {item = .data(newValue)} - } - - /// A list of items to be encoded. - public var list: TW_EthereumRlp_Proto_RlpList { - get { - if case .list(let v)? = item {return v} - return TW_EthereumRlp_Proto_RlpList() - } - set {item = .list(newValue)} - } - - /// An RLP encoded item to be appended as it is. - public var rawEncoded: Data { - get { - if case .rawEncoded(let v)? = item {return v} - return Data() - } - set {item = .rawEncoded(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_Item: Equatable { - /// A string to be encoded. - case stringItem(String) - /// A U64 number to be encoded. - case numberU64(UInt64) - /// A U256 number to be encoded. - case numberU256(Data) - /// An address to be encoded. - case address(String) - /// A data to be encoded. - case data(Data) - /// A list of items to be encoded. - case list(TW_EthereumRlp_Proto_RlpList) - /// An RLP encoded item to be appended as it is. - case rawEncoded(Data) - - #if !swift(>=4.1) - public static func ==(lhs: TW_EthereumRlp_Proto_RlpItem.OneOf_Item, rhs: TW_EthereumRlp_Proto_RlpItem.OneOf_Item) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.stringItem, .stringItem): return { - guard case .stringItem(let l) = lhs, case .stringItem(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.numberU64, .numberU64): return { - guard case .numberU64(let l) = lhs, case .numberU64(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.numberU256, .numberU256): return { - guard case .numberU256(let l) = lhs, case .numberU256(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.address, .address): return { - guard case .address(let l) = lhs, case .address(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.data, .data): return { - guard case .data(let l) = lhs, case .data(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.list, .list): return { - guard case .list(let l) = lhs, case .list(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.rawEncoded, .rawEncoded): return { - guard case .rawEncoded(let l) = lhs, case .rawEncoded(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// RLP encoding input. -public struct TW_EthereumRlp_Proto_EncodingInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// An item or a list to encode. - public var item: TW_EthereumRlp_Proto_RlpItem { - get {return _item ?? TW_EthereumRlp_Proto_RlpItem()} - set {_item = newValue} - } - /// Returns true if `item` has been explicitly set. - public var hasItem: Bool {return self._item != nil} - /// Clears the value of `item`. Subsequent reads from it will return its default value. - public mutating func clearItem() {self._item = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _item: TW_EthereumRlp_Proto_RlpItem? = nil -} - -//// RLP encoding output. -public struct TW_EthereumRlp_Proto_EncodingOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// An item RLP encoded. - public var encoded: Data = Data() - - /// Error code, 0 is ok, other codes will be treated as errors. - public var error: TW_Common_Proto_SigningError = .ok - - /// Error code description. - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.EthereumRlp.Proto" - -extension TW_EthereumRlp_Proto_RlpList: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".RlpList" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "items"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.items) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.items.isEmpty { - try visitor.visitRepeatedMessageField(value: self.items, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumRlp_Proto_RlpList, rhs: TW_EthereumRlp_Proto_RlpList) -> Bool { - if lhs.items != rhs.items {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumRlp_Proto_RlpItem: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".RlpItem" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "string_item"), - 2: .standard(proto: "number_u64"), - 3: .standard(proto: "number_u256"), - 4: .same(proto: "address"), - 5: .same(proto: "data"), - 6: .same(proto: "list"), - 7: .standard(proto: "raw_encoded"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: String? - try decoder.decodeSingularStringField(value: &v) - if let v = v { - if self.item != nil {try decoder.handleConflictingOneOf()} - self.item = .stringItem(v) - } - }() - case 2: try { - var v: UInt64? - try decoder.decodeSingularUInt64Field(value: &v) - if let v = v { - if self.item != nil {try decoder.handleConflictingOneOf()} - self.item = .numberU64(v) - } - }() - case 3: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.item != nil {try decoder.handleConflictingOneOf()} - self.item = .numberU256(v) - } - }() - case 4: try { - var v: String? - try decoder.decodeSingularStringField(value: &v) - if let v = v { - if self.item != nil {try decoder.handleConflictingOneOf()} - self.item = .address(v) - } - }() - case 5: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.item != nil {try decoder.handleConflictingOneOf()} - self.item = .data(v) - } - }() - case 6: try { - var v: TW_EthereumRlp_Proto_RlpList? - var hadOneofValue = false - if let current = self.item { - hadOneofValue = true - if case .list(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.item = .list(v) - } - }() - case 7: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.item != nil {try decoder.handleConflictingOneOf()} - self.item = .rawEncoded(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.item { - case .stringItem?: try { - guard case .stringItem(let v)? = self.item else { preconditionFailure() } - try visitor.visitSingularStringField(value: v, fieldNumber: 1) - }() - case .numberU64?: try { - guard case .numberU64(let v)? = self.item else { preconditionFailure() } - try visitor.visitSingularUInt64Field(value: v, fieldNumber: 2) - }() - case .numberU256?: try { - guard case .numberU256(let v)? = self.item else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 3) - }() - case .address?: try { - guard case .address(let v)? = self.item else { preconditionFailure() } - try visitor.visitSingularStringField(value: v, fieldNumber: 4) - }() - case .data?: try { - guard case .data(let v)? = self.item else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 5) - }() - case .list?: try { - guard case .list(let v)? = self.item else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - }() - case .rawEncoded?: try { - guard case .rawEncoded(let v)? = self.item else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 7) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumRlp_Proto_RlpItem, rhs: TW_EthereumRlp_Proto_RlpItem) -> Bool { - if lhs.item != rhs.item {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumRlp_Proto_EncodingInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".EncodingInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "item"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._item) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._item { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumRlp_Proto_EncodingInput, rhs: TW_EthereumRlp_Proto_EncodingInput) -> Bool { - if lhs._item != rhs._item {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_EthereumRlp_Proto_EncodingOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".EncodingOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_EthereumRlp_Proto_EncodingOutput, rhs: TW_EthereumRlp_Proto_EncodingOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Everscale+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Everscale+Proto.swift deleted file mode 100644 index a179ab55..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Everscale+Proto.swift +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias EverscaleTransfer = TW_Everscale_Proto_Transfer -public typealias EverscaleSigningInput = TW_Everscale_Proto_SigningInput -public typealias EverscaleSigningOutput = TW_Everscale_Proto_SigningOutput -public typealias EverscaleMessageBehavior = TW_Everscale_Proto_MessageBehavior diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Everscale.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Everscale.pb.swift deleted file mode 100644 index 0dd54a7e..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Everscale.pb.swift +++ /dev/null @@ -1,357 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Everscale.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Message option -public enum TW_Everscale_Proto_MessageBehavior: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Sends a message with the specified amount. The sender pays a fee from the account balance - case simpleTransfer // = 0 - - /// Sends the entire account balance along with the message - case sendAllBalance // = 1 - case UNRECOGNIZED(Int) - - public init() { - self = .simpleTransfer - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .simpleTransfer - case 1: self = .sendAllBalance - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .simpleTransfer: return 0 - case .sendAllBalance: return 1 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Everscale_Proto_MessageBehavior: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Everscale_Proto_MessageBehavior] = [ - .simpleTransfer, - .sendAllBalance, - ] -} - -#endif // swift(>=4.2) - -/// Transfer message -public struct TW_Everscale_Proto_Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// If set to true, then the message will be returned if there is an error on the recipient's side. - public var bounce: Bool = false - - /// Affect the attached amount and fees - public var behavior: TW_Everscale_Proto_MessageBehavior = .simpleTransfer - - /// Amount to send in nano EVER - public var amount: UInt64 = 0 - - /// Expiration UNIX timestamp - public var expiredAt: UInt32 = 0 - - /// Recipient address - public var to: String = String() - - /// Account state if there is any - public var accountStateOneof: TW_Everscale_Proto_Transfer.OneOf_AccountStateOneof? = nil - - /// Just contract data - public var encodedContractData: String { - get { - if case .encodedContractData(let v)? = accountStateOneof {return v} - return String() - } - set {accountStateOneof = .encodedContractData(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Account state if there is any - public enum OneOf_AccountStateOneof: Equatable { - /// Just contract data - case encodedContractData(String) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Everscale_Proto_Transfer.OneOf_AccountStateOneof, rhs: TW_Everscale_Proto_Transfer.OneOf_AccountStateOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.encodedContractData, .encodedContractData): return { - guard case .encodedContractData(let l) = lhs, case .encodedContractData(let r) = rhs else { preconditionFailure() } - return l == r - }() - } - } - #endif - } - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Everscale_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The payload transfer - public var actionOneof: TW_Everscale_Proto_SigningInput.OneOf_ActionOneof? = nil - - public var transfer: TW_Everscale_Proto_Transfer { - get { - if case .transfer(let v)? = actionOneof {return v} - return TW_Everscale_Proto_Transfer() - } - set {actionOneof = .transfer(newValue)} - } - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// The payload transfer - public enum OneOf_ActionOneof: Equatable { - case transfer(TW_Everscale_Proto_Transfer) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Everscale_Proto_SigningInput.OneOf_ActionOneof, rhs: TW_Everscale_Proto_SigningInput.OneOf_ActionOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transfer, .transfer): return { - guard case .transfer(let l) = lhs, case .transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - } - } - #endif - } - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Everscale_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var encoded: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Everscale.Proto" - -extension TW_Everscale_Proto_MessageBehavior: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "SimpleTransfer"), - 1: .same(proto: "SendAllBalance"), - ] -} - -extension TW_Everscale_Proto_Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "bounce"), - 2: .same(proto: "behavior"), - 3: .same(proto: "amount"), - 4: .standard(proto: "expired_at"), - 5: .same(proto: "to"), - 6: .standard(proto: "encoded_contract_data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBoolField(value: &self.bounce) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.behavior) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 4: try { try decoder.decodeSingularUInt32Field(value: &self.expiredAt) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 6: try { - var v: String? - try decoder.decodeSingularStringField(value: &v) - if let v = v { - if self.accountStateOneof != nil {try decoder.handleConflictingOneOf()} - self.accountStateOneof = .encodedContractData(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.bounce != false { - try visitor.visitSingularBoolField(value: self.bounce, fieldNumber: 1) - } - if self.behavior != .simpleTransfer { - try visitor.visitSingularEnumField(value: self.behavior, fieldNumber: 2) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 3) - } - if self.expiredAt != 0 { - try visitor.visitSingularUInt32Field(value: self.expiredAt, fieldNumber: 4) - } - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 5) - } - try { if case .encodedContractData(let v)? = self.accountStateOneof { - try visitor.visitSingularStringField(value: v, fieldNumber: 6) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Everscale_Proto_Transfer, rhs: TW_Everscale_Proto_Transfer) -> Bool { - if lhs.bounce != rhs.bounce {return false} - if lhs.behavior != rhs.behavior {return false} - if lhs.amount != rhs.amount {return false} - if lhs.expiredAt != rhs.expiredAt {return false} - if lhs.to != rhs.to {return false} - if lhs.accountStateOneof != rhs.accountStateOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Everscale_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "transfer"), - 2: .standard(proto: "private_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_Everscale_Proto_Transfer? - var hadOneofValue = false - if let current = self.actionOneof { - hadOneofValue = true - if case .transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.actionOneof = .transfer(v) - } - }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if case .transfer(let v)? = self.actionOneof { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Everscale_Proto_SigningInput, rhs: TW_Everscale_Proto_SigningInput) -> Bool { - if lhs.actionOneof != rhs.actionOneof {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Everscale_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.encoded) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularStringField(value: self.encoded, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Everscale_Proto_SigningOutput, rhs: TW_Everscale_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/FIO+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/FIO+Proto.swift deleted file mode 100644 index 1e18b6b1..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/FIO+Proto.swift +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias FIOPublicAddress = TW_FIO_Proto_PublicAddress -public typealias FIONewFundsContent = TW_FIO_Proto_NewFundsContent -public typealias FIOAction = TW_FIO_Proto_Action -public typealias FIOChainParams = TW_FIO_Proto_ChainParams -public typealias FIOSigningInput = TW_FIO_Proto_SigningInput -public typealias FIOSigningOutput = TW_FIO_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/FIO.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/FIO.pb.swift deleted file mode 100644 index c2cbc16b..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/FIO.pb.swift +++ /dev/null @@ -1,1037 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: FIO.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// A public blockchain address, such as {"BTC", "bc1qvy4074rggkdr2pzw5vpnn62eg0smzlxwp70d7v"} -public struct TW_FIO_Proto_PublicAddress { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Coin symbol for the address (a.k.a. tokenCode) - public var coinSymbol: String = String() - - /// The address - public var address: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Payload content for New Funds requests -public struct TW_FIO_Proto_NewFundsContent { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Public addressed of the payee, on the mentioned blockchain. - public var payeePublicAddress: String = String() - - /// Amount requested (as string) - public var amount: String = String() - - /// Coin symbol of the amount requested (a.k.a. tokenCode) - public var coinSymbol: String = String() - - /// Memo free text. Optional, may be empty. - public var memo: String = String() - - /// Hash. Optional, may be empty. - public var hash: String = String() - - /// Attached offline URL. Optional, may be empty. - public var offlineURL: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Different Actions -public struct TW_FIO_Proto_Action { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Payload message - public var messageOneof: TW_FIO_Proto_Action.OneOf_MessageOneof? = nil - - public var registerFioAddressMessage: TW_FIO_Proto_Action.RegisterFioAddress { - get { - if case .registerFioAddressMessage(let v)? = messageOneof {return v} - return TW_FIO_Proto_Action.RegisterFioAddress() - } - set {messageOneof = .registerFioAddressMessage(newValue)} - } - - public var addPubAddressMessage: TW_FIO_Proto_Action.AddPubAddress { - get { - if case .addPubAddressMessage(let v)? = messageOneof {return v} - return TW_FIO_Proto_Action.AddPubAddress() - } - set {messageOneof = .addPubAddressMessage(newValue)} - } - - public var transferMessage: TW_FIO_Proto_Action.Transfer { - get { - if case .transferMessage(let v)? = messageOneof {return v} - return TW_FIO_Proto_Action.Transfer() - } - set {messageOneof = .transferMessage(newValue)} - } - - public var renewFioAddressMessage: TW_FIO_Proto_Action.RenewFioAddress { - get { - if case .renewFioAddressMessage(let v)? = messageOneof {return v} - return TW_FIO_Proto_Action.RenewFioAddress() - } - set {messageOneof = .renewFioAddressMessage(newValue)} - } - - public var newFundsRequestMessage: TW_FIO_Proto_Action.NewFundsRequest { - get { - if case .newFundsRequestMessage(let v)? = messageOneof {return v} - return TW_FIO_Proto_Action.NewFundsRequest() - } - set {messageOneof = .newFundsRequestMessage(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Payload message - public enum OneOf_MessageOneof: Equatable { - case registerFioAddressMessage(TW_FIO_Proto_Action.RegisterFioAddress) - case addPubAddressMessage(TW_FIO_Proto_Action.AddPubAddress) - case transferMessage(TW_FIO_Proto_Action.Transfer) - case renewFioAddressMessage(TW_FIO_Proto_Action.RenewFioAddress) - case newFundsRequestMessage(TW_FIO_Proto_Action.NewFundsRequest) - - #if !swift(>=4.1) - public static func ==(lhs: TW_FIO_Proto_Action.OneOf_MessageOneof, rhs: TW_FIO_Proto_Action.OneOf_MessageOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.registerFioAddressMessage, .registerFioAddressMessage): return { - guard case .registerFioAddressMessage(let l) = lhs, case .registerFioAddressMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.addPubAddressMessage, .addPubAddressMessage): return { - guard case .addPubAddressMessage(let l) = lhs, case .addPubAddressMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.transferMessage, .transferMessage): return { - guard case .transferMessage(let l) = lhs, case .transferMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.renewFioAddressMessage, .renewFioAddressMessage): return { - guard case .renewFioAddressMessage(let l) = lhs, case .renewFioAddressMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.newFundsRequestMessage, .newFundsRequestMessage): return { - guard case .newFundsRequestMessage(let l) = lhs, case .newFundsRequestMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - /// Action for registering a FIO name; register_fio_address - public struct RegisterFioAddress { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The FIO name to be registered. Ex.: "alice@trust" - public var fioAddress: String = String() - - /// FIO address of the owner. Ex.: "FIO6m1fMdTpRkRBnedvYshXCxLFiC5suRU8KDfx8xxtXp2hntxpnf" - public var ownerFioPublicKey: String = String() - - /// Max fee to spend, can be obtained using get_fee API. - public var fee: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// Acion for adding public chain addresses to a FIO name; add_pub_address - /// Note: actor is not needed, computed from private key - public struct AddPubAddress { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The FIO name already registered to the owner. Ex.: "alice@trust" - public var fioAddress: String = String() - - /// List of public addresses to be registered, ex. {{"BTC", "bc1qv...7v"},{"BNB", "bnb1ts3...9s"}} - public var publicAddresses: [TW_FIO_Proto_PublicAddress] = [] - - /// Max fee to spend, can be obtained using get_fee API. - public var fee: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// Action for transferring FIO coins; transfer_tokens_pub_key - /// Note: actor is not needed, computed from private key - public struct Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// FIO address of the payee. Ex.: "FIO6m1fMdTpRkRBnedvYshXCxLFiC5suRU8KDfx8xxtXp2hntxpnf" - public var payeePublicKey: String = String() - - /// Amount of FIO coins to be transferred. - public var amount: UInt64 = 0 - - /// Max fee to spend, can be obtained using get_fee API. - public var fee: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// Action for renewing a FIO name; renew_fio_address - /// Note: actor is not needed, computed from private key - public struct RenewFioAddress { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The FIO name to be renewed. Ex.: "alice@trust" - public var fioAddress: String = String() - - /// FIO address of the owner. Ex.: "FIO6m1fMdTpRkRBnedvYshXCxLFiC5suRU8KDfx8xxtXp2hntxpnf" - public var ownerFioPublicKey: String = String() - - /// Max fee to spend, can be obtained using get_fee API. - public var fee: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// Action for creating a new payment request; new_funds_request - /// Note: actor is not needed, computed from private key - public struct NewFundsRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The FIO name of the requested payer. Ex.: "alice@trust" - public var payerFioName: String = String() - - /// The FIO address (not name) of the payer, owner of payee_fio_name. Ex.: "FIO6m1fMdTpRkRBnedvYshXCxLFiC5suRU8KDfx8xxtXp2hntxpnf" - public var payerFioAddress: String = String() - - /// Own FIO name. Ex.: "bob@trust" - public var payeeFioName: String = String() - - /// Payload content of the request - public var content: TW_FIO_Proto_NewFundsContent { - get {return _content ?? TW_FIO_Proto_NewFundsContent()} - set {_content = newValue} - } - /// Returns true if `content` has been explicitly set. - public var hasContent: Bool {return self._content != nil} - /// Clears the value of `content`. Subsequent reads from it will return its default value. - public mutating func clearContent() {self._content = nil} - - /// Max fee to spend, can be obtained using get_fee API. - public var fee: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _content: TW_FIO_Proto_NewFundsContent? = nil - } - - public init() {} -} - -/// Represents current parameters of the FIO blockchain -public struct TW_FIO_Proto_ChainParams { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Constant chainId (32 bytes), obtained from get_info API - public var chainID: Data = Data() - - /// The last block number, obtained from get_info API - public var headBlockNumber: UInt64 = 0 - - /// Block prefix of last block, obtained from get_block API - public var refBlockPrefix: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_FIO_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Expiry for this message, in unix time. Can be 0, then it is taken from current time with default expiry - public var expiry: UInt32 { - get {return _storage._expiry} - set {_uniqueStorage()._expiry = newValue} - } - - /// Current parameters of the FIO blockchain - public var chainParams: TW_FIO_Proto_ChainParams { - get {return _storage._chainParams ?? TW_FIO_Proto_ChainParams()} - set {_uniqueStorage()._chainParams = newValue} - } - /// Returns true if `chainParams` has been explicitly set. - public var hasChainParams: Bool {return _storage._chainParams != nil} - /// Clears the value of `chainParams`. Subsequent reads from it will return its default value. - public mutating func clearChainParams() {_uniqueStorage()._chainParams = nil} - - /// The secret private key matching the address, used for signing (32 bytes). - public var privateKey: Data { - get {return _storage._privateKey} - set {_uniqueStorage()._privateKey = newValue} - } - - /// The FIO name of the originating wallet (project-wide constant) - public var tpid: String { - get {return _storage._tpid} - set {_uniqueStorage()._tpid = newValue} - } - - /// Context-specific action data - public var action: TW_FIO_Proto_Action { - get {return _storage._action ?? TW_FIO_Proto_Action()} - set {_uniqueStorage()._action = newValue} - } - /// Returns true if `action` has been explicitly set. - public var hasAction: Bool {return _storage._action != nil} - /// Clears the value of `action`. Subsequent reads from it will return its default value. - public mutating func clearAction() {_uniqueStorage()._action = nil} - - /// FIO address of the owner. Ex.: "FIO6m1fMdTpRkRBnedvYshXCxLFiC5suRU8KDfx8xxtXp2hntxpnf" - public var ownerPublicKey: String { - get {return _storage._ownerPublicKey} - set {_uniqueStorage()._ownerPublicKey = newValue} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Result containing the signed and encoded transaction. -public struct TW_FIO_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed transaction in JSON - public var json: String = String() - - /// Optional error - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.FIO.Proto" - -extension TW_FIO_Proto_PublicAddress: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".PublicAddress" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "coin_symbol"), - 2: .same(proto: "address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.coinSymbol) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.address) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.coinSymbol.isEmpty { - try visitor.visitSingularStringField(value: self.coinSymbol, fieldNumber: 1) - } - if !self.address.isEmpty { - try visitor.visitSingularStringField(value: self.address, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_FIO_Proto_PublicAddress, rhs: TW_FIO_Proto_PublicAddress) -> Bool { - if lhs.coinSymbol != rhs.coinSymbol {return false} - if lhs.address != rhs.address {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_FIO_Proto_NewFundsContent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".NewFundsContent" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "payee_public_address"), - 2: .same(proto: "amount"), - 3: .standard(proto: "coin_symbol"), - 4: .same(proto: "memo"), - 5: .same(proto: "hash"), - 6: .standard(proto: "offline_url"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.payeePublicAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.coinSymbol) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.memo) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.hash) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.offlineURL) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.payeePublicAddress.isEmpty { - try visitor.visitSingularStringField(value: self.payeePublicAddress, fieldNumber: 1) - } - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 2) - } - if !self.coinSymbol.isEmpty { - try visitor.visitSingularStringField(value: self.coinSymbol, fieldNumber: 3) - } - if !self.memo.isEmpty { - try visitor.visitSingularStringField(value: self.memo, fieldNumber: 4) - } - if !self.hash.isEmpty { - try visitor.visitSingularStringField(value: self.hash, fieldNumber: 5) - } - if !self.offlineURL.isEmpty { - try visitor.visitSingularStringField(value: self.offlineURL, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_FIO_Proto_NewFundsContent, rhs: TW_FIO_Proto_NewFundsContent) -> Bool { - if lhs.payeePublicAddress != rhs.payeePublicAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.coinSymbol != rhs.coinSymbol {return false} - if lhs.memo != rhs.memo {return false} - if lhs.hash != rhs.hash {return false} - if lhs.offlineURL != rhs.offlineURL {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_FIO_Proto_Action: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Action" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "register_fio_address_message"), - 2: .standard(proto: "add_pub_address_message"), - 3: .standard(proto: "transfer_message"), - 4: .standard(proto: "renew_fio_address_message"), - 5: .standard(proto: "new_funds_request_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_FIO_Proto_Action.RegisterFioAddress? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .registerFioAddressMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .registerFioAddressMessage(v) - } - }() - case 2: try { - var v: TW_FIO_Proto_Action.AddPubAddress? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .addPubAddressMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .addPubAddressMessage(v) - } - }() - case 3: try { - var v: TW_FIO_Proto_Action.Transfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .transferMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .transferMessage(v) - } - }() - case 4: try { - var v: TW_FIO_Proto_Action.RenewFioAddress? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .renewFioAddressMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .renewFioAddressMessage(v) - } - }() - case 5: try { - var v: TW_FIO_Proto_Action.NewFundsRequest? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .newFundsRequestMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .newFundsRequestMessage(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.messageOneof { - case .registerFioAddressMessage?: try { - guard case .registerFioAddressMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .addPubAddressMessage?: try { - guard case .addPubAddressMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .transferMessage?: try { - guard case .transferMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .renewFioAddressMessage?: try { - guard case .renewFioAddressMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case .newFundsRequestMessage?: try { - guard case .newFundsRequestMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_FIO_Proto_Action, rhs: TW_FIO_Proto_Action) -> Bool { - if lhs.messageOneof != rhs.messageOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_FIO_Proto_Action.RegisterFioAddress: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_FIO_Proto_Action.protoMessageName + ".RegisterFioAddress" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "fio_address"), - 2: .standard(proto: "owner_fio_public_key"), - 3: .same(proto: "fee"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.fioAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.ownerFioPublicKey) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.fee) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fioAddress.isEmpty { - try visitor.visitSingularStringField(value: self.fioAddress, fieldNumber: 1) - } - if !self.ownerFioPublicKey.isEmpty { - try visitor.visitSingularStringField(value: self.ownerFioPublicKey, fieldNumber: 2) - } - if self.fee != 0 { - try visitor.visitSingularUInt64Field(value: self.fee, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_FIO_Proto_Action.RegisterFioAddress, rhs: TW_FIO_Proto_Action.RegisterFioAddress) -> Bool { - if lhs.fioAddress != rhs.fioAddress {return false} - if lhs.ownerFioPublicKey != rhs.ownerFioPublicKey {return false} - if lhs.fee != rhs.fee {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_FIO_Proto_Action.AddPubAddress: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_FIO_Proto_Action.protoMessageName + ".AddPubAddress" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "fio_address"), - 2: .standard(proto: "public_addresses"), - 3: .same(proto: "fee"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.fioAddress) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.publicAddresses) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.fee) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fioAddress.isEmpty { - try visitor.visitSingularStringField(value: self.fioAddress, fieldNumber: 1) - } - if !self.publicAddresses.isEmpty { - try visitor.visitRepeatedMessageField(value: self.publicAddresses, fieldNumber: 2) - } - if self.fee != 0 { - try visitor.visitSingularUInt64Field(value: self.fee, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_FIO_Proto_Action.AddPubAddress, rhs: TW_FIO_Proto_Action.AddPubAddress) -> Bool { - if lhs.fioAddress != rhs.fioAddress {return false} - if lhs.publicAddresses != rhs.publicAddresses {return false} - if lhs.fee != rhs.fee {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_FIO_Proto_Action.Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_FIO_Proto_Action.protoMessageName + ".Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "payee_public_key"), - 2: .same(proto: "amount"), - 3: .same(proto: "fee"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.payeePublicKey) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.fee) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.payeePublicKey.isEmpty { - try visitor.visitSingularStringField(value: self.payeePublicKey, fieldNumber: 1) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 2) - } - if self.fee != 0 { - try visitor.visitSingularUInt64Field(value: self.fee, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_FIO_Proto_Action.Transfer, rhs: TW_FIO_Proto_Action.Transfer) -> Bool { - if lhs.payeePublicKey != rhs.payeePublicKey {return false} - if lhs.amount != rhs.amount {return false} - if lhs.fee != rhs.fee {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_FIO_Proto_Action.RenewFioAddress: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_FIO_Proto_Action.protoMessageName + ".RenewFioAddress" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "fio_address"), - 2: .standard(proto: "owner_fio_public_key"), - 3: .same(proto: "fee"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.fioAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.ownerFioPublicKey) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.fee) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fioAddress.isEmpty { - try visitor.visitSingularStringField(value: self.fioAddress, fieldNumber: 1) - } - if !self.ownerFioPublicKey.isEmpty { - try visitor.visitSingularStringField(value: self.ownerFioPublicKey, fieldNumber: 2) - } - if self.fee != 0 { - try visitor.visitSingularUInt64Field(value: self.fee, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_FIO_Proto_Action.RenewFioAddress, rhs: TW_FIO_Proto_Action.RenewFioAddress) -> Bool { - if lhs.fioAddress != rhs.fioAddress {return false} - if lhs.ownerFioPublicKey != rhs.ownerFioPublicKey {return false} - if lhs.fee != rhs.fee {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_FIO_Proto_Action.NewFundsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_FIO_Proto_Action.protoMessageName + ".NewFundsRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "payer_fio_name"), - 2: .standard(proto: "payer_fio_address"), - 3: .standard(proto: "payee_fio_name"), - 4: .same(proto: "content"), - 5: .same(proto: "fee"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.payerFioName) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.payerFioAddress) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.payeeFioName) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._content) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.fee) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.payerFioName.isEmpty { - try visitor.visitSingularStringField(value: self.payerFioName, fieldNumber: 1) - } - if !self.payerFioAddress.isEmpty { - try visitor.visitSingularStringField(value: self.payerFioAddress, fieldNumber: 2) - } - if !self.payeeFioName.isEmpty { - try visitor.visitSingularStringField(value: self.payeeFioName, fieldNumber: 3) - } - try { if let v = self._content { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - if self.fee != 0 { - try visitor.visitSingularUInt64Field(value: self.fee, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_FIO_Proto_Action.NewFundsRequest, rhs: TW_FIO_Proto_Action.NewFundsRequest) -> Bool { - if lhs.payerFioName != rhs.payerFioName {return false} - if lhs.payerFioAddress != rhs.payerFioAddress {return false} - if lhs.payeeFioName != rhs.payeeFioName {return false} - if lhs._content != rhs._content {return false} - if lhs.fee != rhs.fee {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_FIO_Proto_ChainParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ChainParams" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "chain_id"), - 2: .standard(proto: "head_block_number"), - 3: .standard(proto: "ref_block_prefix"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.chainID) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.headBlockNumber) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.refBlockPrefix) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.chainID.isEmpty { - try visitor.visitSingularBytesField(value: self.chainID, fieldNumber: 1) - } - if self.headBlockNumber != 0 { - try visitor.visitSingularUInt64Field(value: self.headBlockNumber, fieldNumber: 2) - } - if self.refBlockPrefix != 0 { - try visitor.visitSingularUInt64Field(value: self.refBlockPrefix, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_FIO_Proto_ChainParams, rhs: TW_FIO_Proto_ChainParams) -> Bool { - if lhs.chainID != rhs.chainID {return false} - if lhs.headBlockNumber != rhs.headBlockNumber {return false} - if lhs.refBlockPrefix != rhs.refBlockPrefix {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_FIO_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "expiry"), - 2: .standard(proto: "chain_params"), - 3: .standard(proto: "private_key"), - 4: .same(proto: "tpid"), - 5: .same(proto: "action"), - 6: .standard(proto: "owner_public_key"), - ] - - fileprivate class _StorageClass { - var _expiry: UInt32 = 0 - var _chainParams: TW_FIO_Proto_ChainParams? = nil - var _privateKey: Data = Data() - var _tpid: String = String() - var _action: TW_FIO_Proto_Action? = nil - var _ownerPublicKey: String = String() - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _expiry = source._expiry - _chainParams = source._chainParams - _privateKey = source._privateKey - _tpid = source._tpid - _action = source._action - _ownerPublicKey = source._ownerPublicKey - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &_storage._expiry) }() - case 2: try { try decoder.decodeSingularMessageField(value: &_storage._chainParams) }() - case 3: try { try decoder.decodeSingularBytesField(value: &_storage._privateKey) }() - case 4: try { try decoder.decodeSingularStringField(value: &_storage._tpid) }() - case 5: try { try decoder.decodeSingularMessageField(value: &_storage._action) }() - case 6: try { try decoder.decodeSingularStringField(value: &_storage._ownerPublicKey) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if _storage._expiry != 0 { - try visitor.visitSingularUInt32Field(value: _storage._expiry, fieldNumber: 1) - } - try { if let v = _storage._chainParams { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - if !_storage._privateKey.isEmpty { - try visitor.visitSingularBytesField(value: _storage._privateKey, fieldNumber: 3) - } - if !_storage._tpid.isEmpty { - try visitor.visitSingularStringField(value: _storage._tpid, fieldNumber: 4) - } - try { if let v = _storage._action { - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - } }() - if !_storage._ownerPublicKey.isEmpty { - try visitor.visitSingularStringField(value: _storage._ownerPublicKey, fieldNumber: 6) - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_FIO_Proto_SigningInput, rhs: TW_FIO_Proto_SigningInput) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._expiry != rhs_storage._expiry {return false} - if _storage._chainParams != rhs_storage._chainParams {return false} - if _storage._privateKey != rhs_storage._privateKey {return false} - if _storage._tpid != rhs_storage._tpid {return false} - if _storage._action != rhs_storage._action {return false} - if _storage._ownerPublicKey != rhs_storage._ownerPublicKey {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_FIO_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "json"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.json) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.json.isEmpty { - try visitor.visitSingularStringField(value: self.json, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_FIO_Proto_SigningOutput, rhs: TW_FIO_Proto_SigningOutput) -> Bool { - if lhs.json != rhs.json {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Filecoin+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Filecoin+Proto.swift deleted file mode 100644 index 7e7fd615..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Filecoin+Proto.swift +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias FilecoinSigningInput = TW_Filecoin_Proto_SigningInput -public typealias FilecoinSigningOutput = TW_Filecoin_Proto_SigningOutput -public typealias FilecoinDerivationType = TW_Filecoin_Proto_DerivationType diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Filecoin.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Filecoin.pb.swift deleted file mode 100644 index dfb822c9..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Filecoin.pb.swift +++ /dev/null @@ -1,269 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Filecoin.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Defines the type of `from` address derivation. -public enum TW_Filecoin_Proto_DerivationType: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Defines a Secp256k1 (`f1`) derivation for the sender address. - /// Default derivation type. - case secp256K1 // = 0 - - /// Defines a Delegated (`f4`) derivation for the sender address. - case delegated // = 1 - case UNRECOGNIZED(Int) - - public init() { - self = .secp256K1 - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .secp256K1 - case 1: self = .delegated - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .secp256K1: return 0 - case .delegated: return 1 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Filecoin_Proto_DerivationType: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Filecoin_Proto_DerivationType] = [ - .secp256K1, - .delegated, - ] -} - -#endif // swift(>=4.2) - -/// Input data necessary to create a signed transaction. -public struct TW_Filecoin_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The secret private key of the sender account, used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Recipient's address. - public var to: String = String() - - /// Transaction nonce. - public var nonce: UInt64 = 0 - - /// Transfer value (uint256, serialized little endian) - public var value: Data = Data() - - /// Gas limit. - public var gasLimit: Int64 = 0 - - /// Gas fee cap (uint256, serialized little endian) - public var gasFeeCap: Data = Data() - - /// Gas premium (uint256, serialized little endian) - public var gasPremium: Data = Data() - - /// Message params. - public var params: Data = Data() - - /// Sender address derivation type. - public var derivation: TW_Filecoin_Proto_DerivationType = .secp256K1 - - /// Public key secp256k1 extended - public var publicKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Filecoin_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Resulting transaction, in JSON. - public var json: String = String() - - /// Error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// Error description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Filecoin.Proto" - -extension TW_Filecoin_Proto_DerivationType: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "SECP256K1"), - 1: .same(proto: "DELEGATED"), - ] -} - -extension TW_Filecoin_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "private_key"), - 2: .same(proto: "to"), - 3: .same(proto: "nonce"), - 4: .same(proto: "value"), - 5: .standard(proto: "gas_limit"), - 6: .standard(proto: "gas_fee_cap"), - 7: .standard(proto: "gas_premium"), - 8: .same(proto: "params"), - 9: .same(proto: "derivation"), - 10: .standard(proto: "public_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.nonce) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 5: try { try decoder.decodeSingularInt64Field(value: &self.gasLimit) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.gasFeeCap) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.gasPremium) }() - case 8: try { try decoder.decodeSingularBytesField(value: &self.params) }() - case 9: try { try decoder.decodeSingularEnumField(value: &self.derivation) }() - case 10: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 1) - } - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 2) - } - if self.nonce != 0 { - try visitor.visitSingularUInt64Field(value: self.nonce, fieldNumber: 3) - } - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 4) - } - if self.gasLimit != 0 { - try visitor.visitSingularInt64Field(value: self.gasLimit, fieldNumber: 5) - } - if !self.gasFeeCap.isEmpty { - try visitor.visitSingularBytesField(value: self.gasFeeCap, fieldNumber: 6) - } - if !self.gasPremium.isEmpty { - try visitor.visitSingularBytesField(value: self.gasPremium, fieldNumber: 7) - } - if !self.params.isEmpty { - try visitor.visitSingularBytesField(value: self.params, fieldNumber: 8) - } - if self.derivation != .secp256K1 { - try visitor.visitSingularEnumField(value: self.derivation, fieldNumber: 9) - } - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 10) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Filecoin_Proto_SigningInput, rhs: TW_Filecoin_Proto_SigningInput) -> Bool { - if lhs.privateKey != rhs.privateKey {return false} - if lhs.to != rhs.to {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.value != rhs.value {return false} - if lhs.gasLimit != rhs.gasLimit {return false} - if lhs.gasFeeCap != rhs.gasFeeCap {return false} - if lhs.gasPremium != rhs.gasPremium {return false} - if lhs.params != rhs.params {return false} - if lhs.derivation != rhs.derivation {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Filecoin_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "json"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.json) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.json.isEmpty { - try visitor.visitSingularStringField(value: self.json, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Filecoin_Proto_SigningOutput, rhs: TW_Filecoin_Proto_SigningOutput) -> Bool { - if lhs.json != rhs.json {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Greenfield+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Greenfield+Proto.swift deleted file mode 100644 index 7b89cd97..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Greenfield+Proto.swift +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias GreenfieldAmount = TW_Greenfield_Proto_Amount -public typealias GreenfieldFee = TW_Greenfield_Proto_Fee -public typealias GreenfieldMessage = TW_Greenfield_Proto_Message -public typealias GreenfieldSigningInput = TW_Greenfield_Proto_SigningInput -public typealias GreenfieldSigningOutput = TW_Greenfield_Proto_SigningOutput -public typealias GreenfieldBroadcastMode = TW_Greenfield_Proto_BroadcastMode -public typealias GreenfieldEncodingMode = TW_Greenfield_Proto_EncodingMode -public typealias GreenfieldSigningMode = TW_Greenfield_Proto_SigningMode diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Greenfield.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Greenfield.pb.swift deleted file mode 100644 index 6e754b59..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Greenfield.pb.swift +++ /dev/null @@ -1,797 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Greenfield.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Transaction broadcast mode -public enum TW_Greenfield_Proto_BroadcastMode: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Wait for the tx to pass/fail CheckTx - case sync // = 0 - - /// Don't wait for pass/fail CheckTx; send and return tx immediately - case async // = 1 - case UNRECOGNIZED(Int) - - public init() { - self = .sync - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .sync - case 1: self = .async - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .sync: return 0 - case .async: return 1 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Greenfield_Proto_BroadcastMode: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Greenfield_Proto_BroadcastMode] = [ - .sync, - .async, - ] -} - -#endif // swift(>=4.2) - -/// Options for transaction encoding. -/// Consider adding Json mode. -public enum TW_Greenfield_Proto_EncodingMode: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Protobuf-serialized (binary) - case protobuf // = 0 - case UNRECOGNIZED(Int) - - public init() { - self = .protobuf - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .protobuf - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .protobuf: return 0 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Greenfield_Proto_EncodingMode: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Greenfield_Proto_EncodingMode] = [ - .protobuf, - ] -} - -#endif // swift(>=4.2) - -/// Options for transaction signing. -/// Consider adding Direct mode when it is supported. -public enum TW_Greenfield_Proto_SigningMode: SwiftProtobuf.Enum { - public typealias RawValue = Int - case eip712 // = 0 - case UNRECOGNIZED(Int) - - public init() { - self = .eip712 - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .eip712 - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .eip712: return 0 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Greenfield_Proto_SigningMode: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Greenfield_Proto_SigningMode] = [ - .eip712, - ] -} - -#endif // swift(>=4.2) - -/// A denomination and an amount -public struct TW_Greenfield_Proto_Amount { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// name of the denomination - public var denom: String = String() - - /// amount, number as string - public var amount: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Fee incl. gas -public struct TW_Greenfield_Proto_Fee { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Fee amount(s) - public var amounts: [TW_Greenfield_Proto_Amount] = [] - - /// Gas price - public var gas: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A transaction payload message -public struct TW_Greenfield_Proto_Message { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The payload message - public var messageOneof: TW_Greenfield_Proto_Message.OneOf_MessageOneof? = nil - - public var sendCoinsMessage: TW_Greenfield_Proto_Message.Send { - get { - if case .sendCoinsMessage(let v)? = messageOneof {return v} - return TW_Greenfield_Proto_Message.Send() - } - set {messageOneof = .sendCoinsMessage(newValue)} - } - - public var bridgeTransferOut: TW_Greenfield_Proto_Message.BridgeTransferOut { - get { - if case .bridgeTransferOut(let v)? = messageOneof {return v} - return TW_Greenfield_Proto_Message.BridgeTransferOut() - } - set {messageOneof = .bridgeTransferOut(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// The payload message - public enum OneOf_MessageOneof: Equatable { - case sendCoinsMessage(TW_Greenfield_Proto_Message.Send) - case bridgeTransferOut(TW_Greenfield_Proto_Message.BridgeTransferOut) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Greenfield_Proto_Message.OneOf_MessageOneof, rhs: TW_Greenfield_Proto_Message.OneOf_MessageOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.sendCoinsMessage, .sendCoinsMessage): return { - guard case .sendCoinsMessage(let l) = lhs, case .sendCoinsMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.bridgeTransferOut, .bridgeTransferOut): return { - guard case .bridgeTransferOut(let l) = lhs, case .bridgeTransferOut(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - /// cosmos-sdk/MsgSend - public struct Send { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var fromAddress: String = String() - - public var toAddress: String = String() - - public var amounts: [TW_Greenfield_Proto_Amount] = [] - - /// Optional. Default `cosmos.bank.v1beta1.MsgSend`. - public var typePrefix: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// greenfield/MsgTransferOut - /// Used to transfer BNB Greenfield to BSC blockchain. - public struct BridgeTransferOut { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// In most cases, `from_address` and `to_address` are equal. - public var fromAddress: String = String() - - public var toAddress: String = String() - - public var amount: TW_Greenfield_Proto_Amount { - get {return _amount ?? TW_Greenfield_Proto_Amount()} - set {_amount = newValue} - } - /// Returns true if `amount` has been explicitly set. - public var hasAmount: Bool {return self._amount != nil} - /// Clears the value of `amount`. Subsequent reads from it will return its default value. - public mutating func clearAmount() {self._amount = nil} - - /// Optional. Default `greenfield.bridge.MsgTransferOut`. - public var typePrefix: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _amount: TW_Greenfield_Proto_Amount? = nil - } - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Greenfield_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// An encoding mode. - public var encodingMode: TW_Greenfield_Proto_EncodingMode = .protobuf - - /// A signing mode. - public var signingMode: TW_Greenfield_Proto_SigningMode = .eip712 - - /// Source account number - public var accountNumber: UInt64 = 0 - - /// ETH Chain ID (string). - /// Must be set if `signing_mode` is Eip712. - public var ethChainID: String = String() - - /// Cosmos Chain ID (string) - public var cosmosChainID: String = String() - - /// Transaction fee - public var fee: TW_Greenfield_Proto_Fee { - get {return _fee ?? TW_Greenfield_Proto_Fee()} - set {_fee = newValue} - } - /// Returns true if `fee` has been explicitly set. - public var hasFee: Bool {return self._fee != nil} - /// Clears the value of `fee`. Subsequent reads from it will return its default value. - public mutating func clearFee() {self._fee = nil} - - /// Optional memo - public var memo: String = String() - - /// Sequence number (account specific) - public var sequence: UInt64 = 0 - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Message payloads. - public var messages: [TW_Greenfield_Proto_Message] = [] - - /// Broadcast mode (included in output, relevant when broadcasting) - public var mode: TW_Greenfield_Proto_BroadcastMode = .sync - - public var publicKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _fee: TW_Greenfield_Proto_Fee? = nil -} - -/// Result containing the signed and encoded transaction. -public struct TW_Greenfield_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signature - public var signature: Data = Data() - - /// Signed transaction containing protobuf encoded, Base64-encoded form (Stargate case), - /// wrapped in a ready-to-broadcast json. - public var serialized: String = String() - - /// signatures array json string - public var signatureJson: String = String() - - /// error description - public var errorMessage: String = String() - - public var error: TW_Common_Proto_SigningError = .ok - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Greenfield.Proto" - -extension TW_Greenfield_Proto_BroadcastMode: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "SYNC"), - 1: .same(proto: "ASYNC"), - ] -} - -extension TW_Greenfield_Proto_EncodingMode: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "Protobuf"), - ] -} - -extension TW_Greenfield_Proto_SigningMode: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "Eip712"), - ] -} - -extension TW_Greenfield_Proto_Amount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Amount" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "denom"), - 2: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.denom) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.denom.isEmpty { - try visitor.visitSingularStringField(value: self.denom, fieldNumber: 1) - } - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Greenfield_Proto_Amount, rhs: TW_Greenfield_Proto_Amount) -> Bool { - if lhs.denom != rhs.denom {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Greenfield_Proto_Fee: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Fee" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amounts"), - 2: .same(proto: "gas"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.amounts) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.gas) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.amounts.isEmpty { - try visitor.visitRepeatedMessageField(value: self.amounts, fieldNumber: 1) - } - if self.gas != 0 { - try visitor.visitSingularUInt64Field(value: self.gas, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Greenfield_Proto_Fee, rhs: TW_Greenfield_Proto_Fee) -> Bool { - if lhs.amounts != rhs.amounts {return false} - if lhs.gas != rhs.gas {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Greenfield_Proto_Message: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Message" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "send_coins_message"), - 2: .standard(proto: "bridge_transfer_out"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_Greenfield_Proto_Message.Send? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .sendCoinsMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .sendCoinsMessage(v) - } - }() - case 2: try { - var v: TW_Greenfield_Proto_Message.BridgeTransferOut? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .bridgeTransferOut(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .bridgeTransferOut(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.messageOneof { - case .sendCoinsMessage?: try { - guard case .sendCoinsMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .bridgeTransferOut?: try { - guard case .bridgeTransferOut(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Greenfield_Proto_Message, rhs: TW_Greenfield_Proto_Message) -> Bool { - if lhs.messageOneof != rhs.messageOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Greenfield_Proto_Message.Send: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Greenfield_Proto_Message.protoMessageName + ".Send" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "from_address"), - 2: .standard(proto: "to_address"), - 3: .same(proto: "amounts"), - 4: .standard(proto: "type_prefix"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.fromAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.amounts) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.typePrefix) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fromAddress.isEmpty { - try visitor.visitSingularStringField(value: self.fromAddress, fieldNumber: 1) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 2) - } - if !self.amounts.isEmpty { - try visitor.visitRepeatedMessageField(value: self.amounts, fieldNumber: 3) - } - if !self.typePrefix.isEmpty { - try visitor.visitSingularStringField(value: self.typePrefix, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Greenfield_Proto_Message.Send, rhs: TW_Greenfield_Proto_Message.Send) -> Bool { - if lhs.fromAddress != rhs.fromAddress {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amounts != rhs.amounts {return false} - if lhs.typePrefix != rhs.typePrefix {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Greenfield_Proto_Message.BridgeTransferOut: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Greenfield_Proto_Message.protoMessageName + ".BridgeTransferOut" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "from_address"), - 2: .standard(proto: "to_address"), - 3: .same(proto: "amount"), - 4: .standard(proto: "type_prefix"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.fromAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._amount) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.typePrefix) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.fromAddress.isEmpty { - try visitor.visitSingularStringField(value: self.fromAddress, fieldNumber: 1) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 2) - } - try { if let v = self._amount { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if !self.typePrefix.isEmpty { - try visitor.visitSingularStringField(value: self.typePrefix, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Greenfield_Proto_Message.BridgeTransferOut, rhs: TW_Greenfield_Proto_Message.BridgeTransferOut) -> Bool { - if lhs.fromAddress != rhs.fromAddress {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs._amount != rhs._amount {return false} - if lhs.typePrefix != rhs.typePrefix {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Greenfield_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "encoding_mode"), - 2: .standard(proto: "signing_mode"), - 3: .standard(proto: "account_number"), - 4: .standard(proto: "eth_chain_id"), - 5: .standard(proto: "cosmos_chain_id"), - 6: .same(proto: "fee"), - 7: .same(proto: "memo"), - 8: .same(proto: "sequence"), - 9: .standard(proto: "private_key"), - 10: .same(proto: "messages"), - 11: .same(proto: "mode"), - 12: .standard(proto: "public_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.encodingMode) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.signingMode) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.accountNumber) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.ethChainID) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.cosmosChainID) }() - case 6: try { try decoder.decodeSingularMessageField(value: &self._fee) }() - case 7: try { try decoder.decodeSingularStringField(value: &self.memo) }() - case 8: try { try decoder.decodeSingularUInt64Field(value: &self.sequence) }() - case 9: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 10: try { try decoder.decodeRepeatedMessageField(value: &self.messages) }() - case 11: try { try decoder.decodeSingularEnumField(value: &self.mode) }() - case 12: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.encodingMode != .protobuf { - try visitor.visitSingularEnumField(value: self.encodingMode, fieldNumber: 1) - } - if self.signingMode != .eip712 { - try visitor.visitSingularEnumField(value: self.signingMode, fieldNumber: 2) - } - if self.accountNumber != 0 { - try visitor.visitSingularUInt64Field(value: self.accountNumber, fieldNumber: 3) - } - if !self.ethChainID.isEmpty { - try visitor.visitSingularStringField(value: self.ethChainID, fieldNumber: 4) - } - if !self.cosmosChainID.isEmpty { - try visitor.visitSingularStringField(value: self.cosmosChainID, fieldNumber: 5) - } - try { if let v = self._fee { - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } }() - if !self.memo.isEmpty { - try visitor.visitSingularStringField(value: self.memo, fieldNumber: 7) - } - if self.sequence != 0 { - try visitor.visitSingularUInt64Field(value: self.sequence, fieldNumber: 8) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 9) - } - if !self.messages.isEmpty { - try visitor.visitRepeatedMessageField(value: self.messages, fieldNumber: 10) - } - if self.mode != .sync { - try visitor.visitSingularEnumField(value: self.mode, fieldNumber: 11) - } - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 12) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Greenfield_Proto_SigningInput, rhs: TW_Greenfield_Proto_SigningInput) -> Bool { - if lhs.encodingMode != rhs.encodingMode {return false} - if lhs.signingMode != rhs.signingMode {return false} - if lhs.accountNumber != rhs.accountNumber {return false} - if lhs.ethChainID != rhs.ethChainID {return false} - if lhs.cosmosChainID != rhs.cosmosChainID {return false} - if lhs._fee != rhs._fee {return false} - if lhs.memo != rhs.memo {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.messages != rhs.messages {return false} - if lhs.mode != rhs.mode {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Greenfield_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "signature"), - 2: .same(proto: "serialized"), - 3: .standard(proto: "signature_json"), - 4: .standard(proto: "error_message"), - 5: .same(proto: "error"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.serialized) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.signatureJson) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - case 5: try { try decoder.decodeSingularEnumField(value: &self.error) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 1) - } - if !self.serialized.isEmpty { - try visitor.visitSingularStringField(value: self.serialized, fieldNumber: 2) - } - if !self.signatureJson.isEmpty { - try visitor.visitSingularStringField(value: self.signatureJson, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Greenfield_Proto_SigningOutput, rhs: TW_Greenfield_Proto_SigningOutput) -> Bool { - if lhs.signature != rhs.signature {return false} - if lhs.serialized != rhs.serialized {return false} - if lhs.signatureJson != rhs.signatureJson {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.error != rhs.error {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Harmony+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Harmony+Proto.swift deleted file mode 100644 index bfc04b81..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Harmony+Proto.swift +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias HarmonySigningInput = TW_Harmony_Proto_SigningInput -public typealias HarmonySigningOutput = TW_Harmony_Proto_SigningOutput -public typealias HarmonyTransactionMessage = TW_Harmony_Proto_TransactionMessage -public typealias HarmonyStakingMessage = TW_Harmony_Proto_StakingMessage -public typealias HarmonyDescription = TW_Harmony_Proto_Description -public typealias HarmonyDecimal = TW_Harmony_Proto_Decimal -public typealias HarmonyCommissionRate = TW_Harmony_Proto_CommissionRate -public typealias HarmonyDirectiveCreateValidator = TW_Harmony_Proto_DirectiveCreateValidator -public typealias HarmonyDirectiveEditValidator = TW_Harmony_Proto_DirectiveEditValidator -public typealias HarmonyDirectiveDelegate = TW_Harmony_Proto_DirectiveDelegate -public typealias HarmonyDirectiveUndelegate = TW_Harmony_Proto_DirectiveUndelegate -public typealias HarmonyDirectiveCollectRewards = TW_Harmony_Proto_DirectiveCollectRewards diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Harmony.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Harmony.pb.swift deleted file mode 100644 index 6d033158..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Harmony.pb.swift +++ /dev/null @@ -1,1381 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Harmony.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Input data necessary to create a signed transaction. -public struct TW_Harmony_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Chain identifier (uint256, serialized little endian) - public var chainID: Data = Data() - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// The payload message - public var messageOneof: TW_Harmony_Proto_SigningInput.OneOf_MessageOneof? = nil - - public var transactionMessage: TW_Harmony_Proto_TransactionMessage { - get { - if case .transactionMessage(let v)? = messageOneof {return v} - return TW_Harmony_Proto_TransactionMessage() - } - set {messageOneof = .transactionMessage(newValue)} - } - - public var stakingMessage: TW_Harmony_Proto_StakingMessage { - get { - if case .stakingMessage(let v)? = messageOneof {return v} - return TW_Harmony_Proto_StakingMessage() - } - set {messageOneof = .stakingMessage(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// The payload message - public enum OneOf_MessageOneof: Equatable { - case transactionMessage(TW_Harmony_Proto_TransactionMessage) - case stakingMessage(TW_Harmony_Proto_StakingMessage) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Harmony_Proto_SigningInput.OneOf_MessageOneof, rhs: TW_Harmony_Proto_SigningInput.OneOf_MessageOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transactionMessage, .transactionMessage): return { - guard case .transactionMessage(let l) = lhs, case .transactionMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakingMessage, .stakingMessage): return { - guard case .stakingMessage(let l) = lhs, case .stakingMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Harmony_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// THE V,R,S components of the signature - public var v: Data = Data() - - public var r: Data = Data() - - public var s: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A Transfer message -public struct TW_Harmony_Proto_TransactionMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Nonce (uint256, serialized little endian) - public var nonce: Data = Data() - - /// Gas price (uint256, serialized little endian) - public var gasPrice: Data = Data() - - /// Gas limit (uint256, serialized little endian) - public var gasLimit: Data = Data() - - /// Recipient's address. - public var toAddress: String = String() - - /// Amount to send in wei (uint256, serialized little endian) - public var amount: Data = Data() - - /// Optional payload - public var payload: Data = Data() - - /// From shard ID (uint256, serialized little endian) - public var fromShardID: Data = Data() - - /// To Shard ID (uint256, serialized little endian) - public var toShardID: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A Staking message. -public struct TW_Harmony_Proto_StakingMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// StakeMsg - public var stakeMsg: OneOf_StakeMsg? { - get {return _storage._stakeMsg} - set {_uniqueStorage()._stakeMsg = newValue} - } - - public var createValidatorMessage: TW_Harmony_Proto_DirectiveCreateValidator { - get { - if case .createValidatorMessage(let v)? = _storage._stakeMsg {return v} - return TW_Harmony_Proto_DirectiveCreateValidator() - } - set {_uniqueStorage()._stakeMsg = .createValidatorMessage(newValue)} - } - - public var editValidatorMessage: TW_Harmony_Proto_DirectiveEditValidator { - get { - if case .editValidatorMessage(let v)? = _storage._stakeMsg {return v} - return TW_Harmony_Proto_DirectiveEditValidator() - } - set {_uniqueStorage()._stakeMsg = .editValidatorMessage(newValue)} - } - - public var delegateMessage: TW_Harmony_Proto_DirectiveDelegate { - get { - if case .delegateMessage(let v)? = _storage._stakeMsg {return v} - return TW_Harmony_Proto_DirectiveDelegate() - } - set {_uniqueStorage()._stakeMsg = .delegateMessage(newValue)} - } - - public var undelegateMessage: TW_Harmony_Proto_DirectiveUndelegate { - get { - if case .undelegateMessage(let v)? = _storage._stakeMsg {return v} - return TW_Harmony_Proto_DirectiveUndelegate() - } - set {_uniqueStorage()._stakeMsg = .undelegateMessage(newValue)} - } - - public var collectRewards: TW_Harmony_Proto_DirectiveCollectRewards { - get { - if case .collectRewards(let v)? = _storage._stakeMsg {return v} - return TW_Harmony_Proto_DirectiveCollectRewards() - } - set {_uniqueStorage()._stakeMsg = .collectRewards(newValue)} - } - - /// Nonce (uint256, serialized little endian) - public var nonce: Data { - get {return _storage._nonce} - set {_uniqueStorage()._nonce = newValue} - } - - /// Gas price (uint256, serialized little endian) - public var gasPrice: Data { - get {return _storage._gasPrice} - set {_uniqueStorage()._gasPrice = newValue} - } - - /// Gas limit (uint256, serialized little endian) - public var gasLimit: Data { - get {return _storage._gasLimit} - set {_uniqueStorage()._gasLimit = newValue} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// StakeMsg - public enum OneOf_StakeMsg: Equatable { - case createValidatorMessage(TW_Harmony_Proto_DirectiveCreateValidator) - case editValidatorMessage(TW_Harmony_Proto_DirectiveEditValidator) - case delegateMessage(TW_Harmony_Proto_DirectiveDelegate) - case undelegateMessage(TW_Harmony_Proto_DirectiveUndelegate) - case collectRewards(TW_Harmony_Proto_DirectiveCollectRewards) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Harmony_Proto_StakingMessage.OneOf_StakeMsg, rhs: TW_Harmony_Proto_StakingMessage.OneOf_StakeMsg) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.createValidatorMessage, .createValidatorMessage): return { - guard case .createValidatorMessage(let l) = lhs, case .createValidatorMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.editValidatorMessage, .editValidatorMessage): return { - guard case .editValidatorMessage(let l) = lhs, case .editValidatorMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.delegateMessage, .delegateMessage): return { - guard case .delegateMessage(let l) = lhs, case .delegateMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.undelegateMessage, .undelegateMessage): return { - guard case .undelegateMessage(let l) = lhs, case .undelegateMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.collectRewards, .collectRewards): return { - guard case .collectRewards(let l) = lhs, case .collectRewards(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Description for a validator -public struct TW_Harmony_Proto_Description { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var name: String = String() - - public var identity: String = String() - - public var website: String = String() - - public var securityContact: String = String() - - public var details: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A variable precision number -public struct TW_Harmony_Proto_Decimal { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The 'raw' value - public var value: Data = Data() - - /// The precision (number of decimals) - public var precision: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Represents validator commission rule -public struct TW_Harmony_Proto_CommissionRate { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The rate - public var rate: TW_Harmony_Proto_Decimal { - get {return _rate ?? TW_Harmony_Proto_Decimal()} - set {_rate = newValue} - } - /// Returns true if `rate` has been explicitly set. - public var hasRate: Bool {return self._rate != nil} - /// Clears the value of `rate`. Subsequent reads from it will return its default value. - public mutating func clearRate() {self._rate = nil} - - /// Maximum rate - public var maxRate: TW_Harmony_Proto_Decimal { - get {return _maxRate ?? TW_Harmony_Proto_Decimal()} - set {_maxRate = newValue} - } - /// Returns true if `maxRate` has been explicitly set. - public var hasMaxRate: Bool {return self._maxRate != nil} - /// Clears the value of `maxRate`. Subsequent reads from it will return its default value. - public mutating func clearMaxRate() {self._maxRate = nil} - - /// Maximum of rate change - public var maxChangeRate: TW_Harmony_Proto_Decimal { - get {return _maxChangeRate ?? TW_Harmony_Proto_Decimal()} - set {_maxChangeRate = newValue} - } - /// Returns true if `maxChangeRate` has been explicitly set. - public var hasMaxChangeRate: Bool {return self._maxChangeRate != nil} - /// Clears the value of `maxChangeRate`. Subsequent reads from it will return its default value. - public mutating func clearMaxChangeRate() {self._maxChangeRate = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _rate: TW_Harmony_Proto_Decimal? = nil - fileprivate var _maxRate: TW_Harmony_Proto_Decimal? = nil - fileprivate var _maxChangeRate: TW_Harmony_Proto_Decimal? = nil -} - -/// Create Validator directive -public struct TW_Harmony_Proto_DirectiveCreateValidator { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Address of validator - public var validatorAddress: String { - get {return _storage._validatorAddress} - set {_uniqueStorage()._validatorAddress = newValue} - } - - /// Description, name etc. - public var description_p: TW_Harmony_Proto_Description { - get {return _storage._description_p ?? TW_Harmony_Proto_Description()} - set {_uniqueStorage()._description_p = newValue} - } - /// Returns true if `description_p` has been explicitly set. - public var hasDescription_p: Bool {return _storage._description_p != nil} - /// Clears the value of `description_p`. Subsequent reads from it will return its default value. - public mutating func clearDescription_p() {_uniqueStorage()._description_p = nil} - - /// Rates - public var commissionRates: TW_Harmony_Proto_CommissionRate { - get {return _storage._commissionRates ?? TW_Harmony_Proto_CommissionRate()} - set {_uniqueStorage()._commissionRates = newValue} - } - /// Returns true if `commissionRates` has been explicitly set. - public var hasCommissionRates: Bool {return _storage._commissionRates != nil} - /// Clears the value of `commissionRates`. Subsequent reads from it will return its default value. - public mutating func clearCommissionRates() {_uniqueStorage()._commissionRates = nil} - - public var minSelfDelegation: Data { - get {return _storage._minSelfDelegation} - set {_uniqueStorage()._minSelfDelegation = newValue} - } - - public var maxTotalDelegation: Data { - get {return _storage._maxTotalDelegation} - set {_uniqueStorage()._maxTotalDelegation = newValue} - } - - public var slotPubKeys: [Data] { - get {return _storage._slotPubKeys} - set {_uniqueStorage()._slotPubKeys = newValue} - } - - public var slotKeySigs: [Data] { - get {return _storage._slotKeySigs} - set {_uniqueStorage()._slotKeySigs = newValue} - } - - public var amount: Data { - get {return _storage._amount} - set {_uniqueStorage()._amount = newValue} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Edit Validator directive -public struct TW_Harmony_Proto_DirectiveEditValidator { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Validator address - public var validatorAddress: String = String() - - public var description_p: TW_Harmony_Proto_Description { - get {return _description_p ?? TW_Harmony_Proto_Description()} - set {_description_p = newValue} - } - /// Returns true if `description_p` has been explicitly set. - public var hasDescription_p: Bool {return self._description_p != nil} - /// Clears the value of `description_p`. Subsequent reads from it will return its default value. - public mutating func clearDescription_p() {self._description_p = nil} - - public var commissionRate: TW_Harmony_Proto_Decimal { - get {return _commissionRate ?? TW_Harmony_Proto_Decimal()} - set {_commissionRate = newValue} - } - /// Returns true if `commissionRate` has been explicitly set. - public var hasCommissionRate: Bool {return self._commissionRate != nil} - /// Clears the value of `commissionRate`. Subsequent reads from it will return its default value. - public mutating func clearCommissionRate() {self._commissionRate = nil} - - public var minSelfDelegation: Data = Data() - - public var maxTotalDelegation: Data = Data() - - public var slotKeyToRemove: Data = Data() - - public var slotKeyToAdd: Data = Data() - - public var slotKeyToAddSig: Data = Data() - - public var active: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _description_p: TW_Harmony_Proto_Description? = nil - fileprivate var _commissionRate: TW_Harmony_Proto_Decimal? = nil -} - -/// Delegate directive -public struct TW_Harmony_Proto_DirectiveDelegate { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Delegator address - public var delegatorAddress: String = String() - - /// Validator address - public var validatorAddress: String = String() - - /// Delegate amount (uint256, serialized little endian) - public var amount: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Undelegate directive -public struct TW_Harmony_Proto_DirectiveUndelegate { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Delegator address - public var delegatorAddress: String = String() - - /// Validator address - public var validatorAddress: String = String() - - /// Undelegate amount (uint256, serialized little endian) - public var amount: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Collect reward -public struct TW_Harmony_Proto_DirectiveCollectRewards { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Delegator address - public var delegatorAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Harmony.Proto" - -extension TW_Harmony_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "chain_id"), - 2: .standard(proto: "private_key"), - 3: .standard(proto: "transaction_message"), - 4: .standard(proto: "staking_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.chainID) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 3: try { - var v: TW_Harmony_Proto_TransactionMessage? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .transactionMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .transactionMessage(v) - } - }() - case 4: try { - var v: TW_Harmony_Proto_StakingMessage? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .stakingMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .stakingMessage(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.chainID.isEmpty { - try visitor.visitSingularBytesField(value: self.chainID, fieldNumber: 1) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 2) - } - switch self.messageOneof { - case .transactionMessage?: try { - guard case .transactionMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .stakingMessage?: try { - guard case .stakingMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Harmony_Proto_SigningInput, rhs: TW_Harmony_Proto_SigningInput) -> Bool { - if lhs.chainID != rhs.chainID {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.messageOneof != rhs.messageOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Harmony_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "v"), - 3: .same(proto: "r"), - 4: .same(proto: "s"), - 5: .same(proto: "error"), - 6: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.v) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.r) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.s) }() - case 5: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if !self.v.isEmpty { - try visitor.visitSingularBytesField(value: self.v, fieldNumber: 2) - } - if !self.r.isEmpty { - try visitor.visitSingularBytesField(value: self.r, fieldNumber: 3) - } - if !self.s.isEmpty { - try visitor.visitSingularBytesField(value: self.s, fieldNumber: 4) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 5) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Harmony_Proto_SigningOutput, rhs: TW_Harmony_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.v != rhs.v {return false} - if lhs.r != rhs.r {return false} - if lhs.s != rhs.s {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Harmony_Proto_TransactionMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "nonce"), - 2: .standard(proto: "gas_price"), - 3: .standard(proto: "gas_limit"), - 4: .standard(proto: "to_address"), - 5: .same(proto: "amount"), - 6: .same(proto: "payload"), - 7: .standard(proto: "from_shard_id"), - 8: .standard(proto: "to_shard_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.nonce) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.gasPrice) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.gasLimit) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.fromShardID) }() - case 8: try { try decoder.decodeSingularBytesField(value: &self.toShardID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.nonce.isEmpty { - try visitor.visitSingularBytesField(value: self.nonce, fieldNumber: 1) - } - if !self.gasPrice.isEmpty { - try visitor.visitSingularBytesField(value: self.gasPrice, fieldNumber: 2) - } - if !self.gasLimit.isEmpty { - try visitor.visitSingularBytesField(value: self.gasLimit, fieldNumber: 3) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 4) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 5) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 6) - } - if !self.fromShardID.isEmpty { - try visitor.visitSingularBytesField(value: self.fromShardID, fieldNumber: 7) - } - if !self.toShardID.isEmpty { - try visitor.visitSingularBytesField(value: self.toShardID, fieldNumber: 8) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Harmony_Proto_TransactionMessage, rhs: TW_Harmony_Proto_TransactionMessage) -> Bool { - if lhs.nonce != rhs.nonce {return false} - if lhs.gasPrice != rhs.gasPrice {return false} - if lhs.gasLimit != rhs.gasLimit {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.payload != rhs.payload {return false} - if lhs.fromShardID != rhs.fromShardID {return false} - if lhs.toShardID != rhs.toShardID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Harmony_Proto_StakingMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".StakingMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "create_validator_message"), - 2: .standard(proto: "edit_validator_message"), - 3: .standard(proto: "delegate_message"), - 4: .standard(proto: "undelegate_message"), - 5: .standard(proto: "collect_rewards"), - 6: .same(proto: "nonce"), - 7: .standard(proto: "gas_price"), - 8: .standard(proto: "gas_limit"), - ] - - fileprivate class _StorageClass { - var _stakeMsg: TW_Harmony_Proto_StakingMessage.OneOf_StakeMsg? - var _nonce: Data = Data() - var _gasPrice: Data = Data() - var _gasLimit: Data = Data() - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _stakeMsg = source._stakeMsg - _nonce = source._nonce - _gasPrice = source._gasPrice - _gasLimit = source._gasLimit - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_Harmony_Proto_DirectiveCreateValidator? - var hadOneofValue = false - if let current = _storage._stakeMsg { - hadOneofValue = true - if case .createValidatorMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._stakeMsg = .createValidatorMessage(v) - } - }() - case 2: try { - var v: TW_Harmony_Proto_DirectiveEditValidator? - var hadOneofValue = false - if let current = _storage._stakeMsg { - hadOneofValue = true - if case .editValidatorMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._stakeMsg = .editValidatorMessage(v) - } - }() - case 3: try { - var v: TW_Harmony_Proto_DirectiveDelegate? - var hadOneofValue = false - if let current = _storage._stakeMsg { - hadOneofValue = true - if case .delegateMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._stakeMsg = .delegateMessage(v) - } - }() - case 4: try { - var v: TW_Harmony_Proto_DirectiveUndelegate? - var hadOneofValue = false - if let current = _storage._stakeMsg { - hadOneofValue = true - if case .undelegateMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._stakeMsg = .undelegateMessage(v) - } - }() - case 5: try { - var v: TW_Harmony_Proto_DirectiveCollectRewards? - var hadOneofValue = false - if let current = _storage._stakeMsg { - hadOneofValue = true - if case .collectRewards(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._stakeMsg = .collectRewards(v) - } - }() - case 6: try { try decoder.decodeSingularBytesField(value: &_storage._nonce) }() - case 7: try { try decoder.decodeSingularBytesField(value: &_storage._gasPrice) }() - case 8: try { try decoder.decodeSingularBytesField(value: &_storage._gasLimit) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch _storage._stakeMsg { - case .createValidatorMessage?: try { - guard case .createValidatorMessage(let v)? = _storage._stakeMsg else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .editValidatorMessage?: try { - guard case .editValidatorMessage(let v)? = _storage._stakeMsg else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .delegateMessage?: try { - guard case .delegateMessage(let v)? = _storage._stakeMsg else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .undelegateMessage?: try { - guard case .undelegateMessage(let v)? = _storage._stakeMsg else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case .collectRewards?: try { - guard case .collectRewards(let v)? = _storage._stakeMsg else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - }() - case nil: break - } - if !_storage._nonce.isEmpty { - try visitor.visitSingularBytesField(value: _storage._nonce, fieldNumber: 6) - } - if !_storage._gasPrice.isEmpty { - try visitor.visitSingularBytesField(value: _storage._gasPrice, fieldNumber: 7) - } - if !_storage._gasLimit.isEmpty { - try visitor.visitSingularBytesField(value: _storage._gasLimit, fieldNumber: 8) - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Harmony_Proto_StakingMessage, rhs: TW_Harmony_Proto_StakingMessage) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._stakeMsg != rhs_storage._stakeMsg {return false} - if _storage._nonce != rhs_storage._nonce {return false} - if _storage._gasPrice != rhs_storage._gasPrice {return false} - if _storage._gasLimit != rhs_storage._gasLimit {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Harmony_Proto_Description: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Description" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "identity"), - 3: .same(proto: "website"), - 4: .standard(proto: "security_contact"), - 5: .same(proto: "details"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.identity) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.website) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.securityContact) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.details) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) - } - if !self.identity.isEmpty { - try visitor.visitSingularStringField(value: self.identity, fieldNumber: 2) - } - if !self.website.isEmpty { - try visitor.visitSingularStringField(value: self.website, fieldNumber: 3) - } - if !self.securityContact.isEmpty { - try visitor.visitSingularStringField(value: self.securityContact, fieldNumber: 4) - } - if !self.details.isEmpty { - try visitor.visitSingularStringField(value: self.details, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Harmony_Proto_Description, rhs: TW_Harmony_Proto_Description) -> Bool { - if lhs.name != rhs.name {return false} - if lhs.identity != rhs.identity {return false} - if lhs.website != rhs.website {return false} - if lhs.securityContact != rhs.securityContact {return false} - if lhs.details != rhs.details {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Harmony_Proto_Decimal: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Decimal" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - 2: .same(proto: "precision"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.precision) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 1) - } - if !self.precision.isEmpty { - try visitor.visitSingularBytesField(value: self.precision, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Harmony_Proto_Decimal, rhs: TW_Harmony_Proto_Decimal) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.precision != rhs.precision {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Harmony_Proto_CommissionRate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CommissionRate" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "rate"), - 2: .standard(proto: "max_rate"), - 3: .standard(proto: "max_change_rate"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._rate) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._maxRate) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._maxChangeRate) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._rate { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - try { if let v = self._maxRate { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try { if let v = self._maxChangeRate { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Harmony_Proto_CommissionRate, rhs: TW_Harmony_Proto_CommissionRate) -> Bool { - if lhs._rate != rhs._rate {return false} - if lhs._maxRate != rhs._maxRate {return false} - if lhs._maxChangeRate != rhs._maxChangeRate {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Harmony_Proto_DirectiveCreateValidator: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DirectiveCreateValidator" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "validator_address"), - 2: .same(proto: "description"), - 3: .standard(proto: "commission_rates"), - 4: .standard(proto: "min_self_delegation"), - 5: .standard(proto: "max_total_delegation"), - 6: .standard(proto: "slot_pub_keys"), - 7: .standard(proto: "slot_key_sigs"), - 8: .same(proto: "amount"), - ] - - fileprivate class _StorageClass { - var _validatorAddress: String = String() - var _description_p: TW_Harmony_Proto_Description? = nil - var _commissionRates: TW_Harmony_Proto_CommissionRate? = nil - var _minSelfDelegation: Data = Data() - var _maxTotalDelegation: Data = Data() - var _slotPubKeys: [Data] = [] - var _slotKeySigs: [Data] = [] - var _amount: Data = Data() - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _validatorAddress = source._validatorAddress - _description_p = source._description_p - _commissionRates = source._commissionRates - _minSelfDelegation = source._minSelfDelegation - _maxTotalDelegation = source._maxTotalDelegation - _slotPubKeys = source._slotPubKeys - _slotKeySigs = source._slotKeySigs - _amount = source._amount - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &_storage._validatorAddress) }() - case 2: try { try decoder.decodeSingularMessageField(value: &_storage._description_p) }() - case 3: try { try decoder.decodeSingularMessageField(value: &_storage._commissionRates) }() - case 4: try { try decoder.decodeSingularBytesField(value: &_storage._minSelfDelegation) }() - case 5: try { try decoder.decodeSingularBytesField(value: &_storage._maxTotalDelegation) }() - case 6: try { try decoder.decodeRepeatedBytesField(value: &_storage._slotPubKeys) }() - case 7: try { try decoder.decodeRepeatedBytesField(value: &_storage._slotKeySigs) }() - case 8: try { try decoder.decodeSingularBytesField(value: &_storage._amount) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !_storage._validatorAddress.isEmpty { - try visitor.visitSingularStringField(value: _storage._validatorAddress, fieldNumber: 1) - } - try { if let v = _storage._description_p { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try { if let v = _storage._commissionRates { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if !_storage._minSelfDelegation.isEmpty { - try visitor.visitSingularBytesField(value: _storage._minSelfDelegation, fieldNumber: 4) - } - if !_storage._maxTotalDelegation.isEmpty { - try visitor.visitSingularBytesField(value: _storage._maxTotalDelegation, fieldNumber: 5) - } - if !_storage._slotPubKeys.isEmpty { - try visitor.visitRepeatedBytesField(value: _storage._slotPubKeys, fieldNumber: 6) - } - if !_storage._slotKeySigs.isEmpty { - try visitor.visitRepeatedBytesField(value: _storage._slotKeySigs, fieldNumber: 7) - } - if !_storage._amount.isEmpty { - try visitor.visitSingularBytesField(value: _storage._amount, fieldNumber: 8) - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Harmony_Proto_DirectiveCreateValidator, rhs: TW_Harmony_Proto_DirectiveCreateValidator) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._validatorAddress != rhs_storage._validatorAddress {return false} - if _storage._description_p != rhs_storage._description_p {return false} - if _storage._commissionRates != rhs_storage._commissionRates {return false} - if _storage._minSelfDelegation != rhs_storage._minSelfDelegation {return false} - if _storage._maxTotalDelegation != rhs_storage._maxTotalDelegation {return false} - if _storage._slotPubKeys != rhs_storage._slotPubKeys {return false} - if _storage._slotKeySigs != rhs_storage._slotKeySigs {return false} - if _storage._amount != rhs_storage._amount {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Harmony_Proto_DirectiveEditValidator: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DirectiveEditValidator" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "validator_address"), - 2: .same(proto: "description"), - 3: .standard(proto: "commission_rate"), - 4: .standard(proto: "min_self_delegation"), - 5: .standard(proto: "max_total_delegation"), - 6: .standard(proto: "slot_key_to_remove"), - 7: .standard(proto: "slot_key_to_add"), - 8: .standard(proto: "slot_key_to_add_sig"), - 9: .same(proto: "active"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.validatorAddress) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._description_p) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._commissionRate) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.minSelfDelegation) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.maxTotalDelegation) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.slotKeyToRemove) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.slotKeyToAdd) }() - case 8: try { try decoder.decodeSingularBytesField(value: &self.slotKeyToAddSig) }() - case 9: try { try decoder.decodeSingularBytesField(value: &self.active) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.validatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.validatorAddress, fieldNumber: 1) - } - try { if let v = self._description_p { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try { if let v = self._commissionRate { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if !self.minSelfDelegation.isEmpty { - try visitor.visitSingularBytesField(value: self.minSelfDelegation, fieldNumber: 4) - } - if !self.maxTotalDelegation.isEmpty { - try visitor.visitSingularBytesField(value: self.maxTotalDelegation, fieldNumber: 5) - } - if !self.slotKeyToRemove.isEmpty { - try visitor.visitSingularBytesField(value: self.slotKeyToRemove, fieldNumber: 6) - } - if !self.slotKeyToAdd.isEmpty { - try visitor.visitSingularBytesField(value: self.slotKeyToAdd, fieldNumber: 7) - } - if !self.slotKeyToAddSig.isEmpty { - try visitor.visitSingularBytesField(value: self.slotKeyToAddSig, fieldNumber: 8) - } - if !self.active.isEmpty { - try visitor.visitSingularBytesField(value: self.active, fieldNumber: 9) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Harmony_Proto_DirectiveEditValidator, rhs: TW_Harmony_Proto_DirectiveEditValidator) -> Bool { - if lhs.validatorAddress != rhs.validatorAddress {return false} - if lhs._description_p != rhs._description_p {return false} - if lhs._commissionRate != rhs._commissionRate {return false} - if lhs.minSelfDelegation != rhs.minSelfDelegation {return false} - if lhs.maxTotalDelegation != rhs.maxTotalDelegation {return false} - if lhs.slotKeyToRemove != rhs.slotKeyToRemove {return false} - if lhs.slotKeyToAdd != rhs.slotKeyToAdd {return false} - if lhs.slotKeyToAddSig != rhs.slotKeyToAddSig {return false} - if lhs.active != rhs.active {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Harmony_Proto_DirectiveDelegate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DirectiveDelegate" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "delegator_address"), - 2: .standard(proto: "validator_address"), - 3: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.delegatorAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.validatorAddress) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.delegatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.delegatorAddress, fieldNumber: 1) - } - if !self.validatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.validatorAddress, fieldNumber: 2) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Harmony_Proto_DirectiveDelegate, rhs: TW_Harmony_Proto_DirectiveDelegate) -> Bool { - if lhs.delegatorAddress != rhs.delegatorAddress {return false} - if lhs.validatorAddress != rhs.validatorAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Harmony_Proto_DirectiveUndelegate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DirectiveUndelegate" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "delegator_address"), - 2: .standard(proto: "validator_address"), - 3: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.delegatorAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.validatorAddress) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.delegatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.delegatorAddress, fieldNumber: 1) - } - if !self.validatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.validatorAddress, fieldNumber: 2) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Harmony_Proto_DirectiveUndelegate, rhs: TW_Harmony_Proto_DirectiveUndelegate) -> Bool { - if lhs.delegatorAddress != rhs.delegatorAddress {return false} - if lhs.validatorAddress != rhs.validatorAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Harmony_Proto_DirectiveCollectRewards: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DirectiveCollectRewards" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "delegator_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.delegatorAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.delegatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.delegatorAddress, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Harmony_Proto_DirectiveCollectRewards, rhs: TW_Harmony_Proto_DirectiveCollectRewards) -> Bool { - if lhs.delegatorAddress != rhs.delegatorAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Hedera+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Hedera+Proto.swift deleted file mode 100644 index 2985e6d0..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Hedera+Proto.swift +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias HederaTimestamp = TW_Hedera_Proto_Timestamp -public typealias HederaTransactionID = TW_Hedera_Proto_TransactionID -public typealias HederaTransferMessage = TW_Hedera_Proto_TransferMessage -public typealias HederaTransactionBody = TW_Hedera_Proto_TransactionBody -public typealias HederaSigningInput = TW_Hedera_Proto_SigningInput -public typealias HederaSigningOutput = TW_Hedera_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Hedera.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Hedera.pb.swift deleted file mode 100644 index 364fb349..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Hedera.pb.swift +++ /dev/null @@ -1,520 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Hedera.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// An exact date and time. This is the same data structure as the protobuf Timestamp.proto -/// (see the comments in https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto) -public struct TW_Hedera_Proto_Timestamp { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Number of complete seconds since the start of the epoch - public var seconds: Int64 = 0 - - /// Number of nanoseconds since the start of the last second - public var nanos: Int32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// The ID for a transaction. This is used for retrieving receipts and records for a transaction, for -/// appending to a file right after creating it, for instantiating a smart contract with bytecode in -/// a file just created, and internally by the network for detecting when duplicate transactions are -/// submitted. A user might get a transaction processed faster by submitting it to N nodes, each with -/// a different node account, but all with the same TransactionID. Then, the transaction will take -/// effect when the first of all those nodes submits the transaction and it reaches consensus. The -/// other transactions will not take effect. So this could make the transaction take effect faster, -/// if any given node might be slow. However, the full transaction fee is charged for each -/// transaction, so the total fee is N times as much if the transaction is sent to N nodes. -/// -/// Applicable to Scheduled Transactions: -/// - The ID of a Scheduled Transaction has transactionValidStart and accountIDs inherited from the -/// ScheduleCreate transaction that created it. That is to say that they are equal -/// - The scheduled property is true for Scheduled Transactions -/// - transactionValidStart, accountID and scheduled properties should be omitted -public struct TW_Hedera_Proto_TransactionID { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The transaction is invalid if consensusTimestamp < transactionID.transactionStartValid - public var transactionValidStart: TW_Hedera_Proto_Timestamp { - get {return _transactionValidStart ?? TW_Hedera_Proto_Timestamp()} - set {_transactionValidStart = newValue} - } - /// Returns true if `transactionValidStart` has been explicitly set. - public var hasTransactionValidStart: Bool {return self._transactionValidStart != nil} - /// Clears the value of `transactionValidStart`. Subsequent reads from it will return its default value. - public mutating func clearTransactionValidStart() {self._transactionValidStart = nil} - - /// The Account ID that paid for this transaction - public var accountID: String = String() - - /// Whether the Transaction is of type Scheduled or no - public var scheduled: Bool = false - - /// The identifier for an internal transaction that was spawned as part - /// of handling a user transaction. (These internal transactions share the - /// transactionValidStart and accountID of the user transaction, so a - /// nonce is necessary to give them a unique TransactionID.) - /// - /// An example is when a "parent" ContractCreate or ContractCall transaction - /// calls one or more HTS precompiled contracts; each of the "child" transactions spawned for a precompile has a id - /// with a different nonce. - public var nonce: Int32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _transactionValidStart: TW_Hedera_Proto_Timestamp? = nil -} - -/// Necessary fields to process a TransferMessage -public struct TW_Hedera_Proto_TransferMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Source Account address (string) - public var from: String = String() - - /// Destination Account address (string) - public var to: String = String() - - /// Amount to be transferred (sint64) - public var amount: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A single transaction. All transaction types are possible here. -public struct TW_Hedera_Proto_TransactionBody { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The ID for this transaction, which includes the payer's account (the account paying the transaction fee). - /// If two transactions have the same transactionID, they won't both have an effect - public var transactionID: TW_Hedera_Proto_TransactionID { - get {return _transactionID ?? TW_Hedera_Proto_TransactionID()} - set {_transactionID = newValue} - } - /// Returns true if `transactionID` has been explicitly set. - public var hasTransactionID: Bool {return self._transactionID != nil} - /// Clears the value of `transactionID`. Subsequent reads from it will return its default value. - public mutating func clearTransactionID() {self._transactionID = nil} - - /// The account of the node that submits the client's transaction to the network - public var nodeAccountID: String = String() - - /// The maximum transaction fee the client is willing to pay - public var transactionFee: UInt64 = 0 - - /// The transaction is invalid if consensusTimestamp > transactionID.transactionValidStart + transactionValidDuration - public var transactionValidDuration: Int64 = 0 - - /// Any notes or descriptions that should be put into the record (max length 100) - public var memo: String = String() - - /// The choices here are arranged by service in roughly lexicographical order. The field ordinals are non-sequential, - /// and a result of the historical order of implementation. - public var data: TW_Hedera_Proto_TransactionBody.OneOf_Data? = nil - - /// Transfer amount between accounts - public var transfer: TW_Hedera_Proto_TransferMessage { - get { - if case .transfer(let v)? = data {return v} - return TW_Hedera_Proto_TransferMessage() - } - set {data = .transfer(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// The choices here are arranged by service in roughly lexicographical order. The field ordinals are non-sequential, - /// and a result of the historical order of implementation. - public enum OneOf_Data: Equatable { - /// Transfer amount between accounts - case transfer(TW_Hedera_Proto_TransferMessage) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Hedera_Proto_TransactionBody.OneOf_Data, rhs: TW_Hedera_Proto_TransactionBody.OneOf_Data) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transfer, .transfer): return { - guard case .transfer(let l) = lhs, case .transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - } - } - #endif - } - - public init() {} - - fileprivate var _transactionID: TW_Hedera_Proto_TransactionID? = nil -} - -/// Input data necessary to create a signed transaction. -public struct TW_Hedera_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Private key to sign the transaction (bytes) - public var privateKey: Data = Data() - - /// The transaction body - public var body: TW_Hedera_Proto_TransactionBody { - get {return _body ?? TW_Hedera_Proto_TransactionBody()} - set {_body = newValue} - } - /// Returns true if `body` has been explicitly set. - public var hasBody: Bool {return self._body != nil} - /// Clears the value of `body`. Subsequent reads from it will return its default value. - public mutating func clearBody() {self._body = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _body: TW_Hedera_Proto_TransactionBody? = nil -} - -/// Transaction signing output. -public struct TW_Hedera_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Hedera.Proto" - -extension TW_Hedera_Proto_Timestamp: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Timestamp" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "seconds"), - 2: .same(proto: "nanos"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.seconds) }() - case 2: try { try decoder.decodeSingularInt32Field(value: &self.nanos) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.seconds != 0 { - try visitor.visitSingularInt64Field(value: self.seconds, fieldNumber: 1) - } - if self.nanos != 0 { - try visitor.visitSingularInt32Field(value: self.nanos, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Hedera_Proto_Timestamp, rhs: TW_Hedera_Proto_Timestamp) -> Bool { - if lhs.seconds != rhs.seconds {return false} - if lhs.nanos != rhs.nanos {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Hedera_Proto_TransactionID: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionID" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "transactionValidStart"), - 2: .same(proto: "accountID"), - 3: .same(proto: "scheduled"), - 4: .same(proto: "nonce"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._transactionValidStart) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.accountID) }() - case 3: try { try decoder.decodeSingularBoolField(value: &self.scheduled) }() - case 4: try { try decoder.decodeSingularInt32Field(value: &self.nonce) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._transactionValidStart { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.accountID.isEmpty { - try visitor.visitSingularStringField(value: self.accountID, fieldNumber: 2) - } - if self.scheduled != false { - try visitor.visitSingularBoolField(value: self.scheduled, fieldNumber: 3) - } - if self.nonce != 0 { - try visitor.visitSingularInt32Field(value: self.nonce, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Hedera_Proto_TransactionID, rhs: TW_Hedera_Proto_TransactionID) -> Bool { - if lhs._transactionValidStart != rhs._transactionValidStart {return false} - if lhs.accountID != rhs.accountID {return false} - if lhs.scheduled != rhs.scheduled {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Hedera_Proto_TransferMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransferMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .same(proto: "to"), - 3: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.from) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 3: try { try decoder.decodeSingularSInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.from.isEmpty { - try visitor.visitSingularStringField(value: self.from, fieldNumber: 1) - } - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 2) - } - if self.amount != 0 { - try visitor.visitSingularSInt64Field(value: self.amount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Hedera_Proto_TransferMessage, rhs: TW_Hedera_Proto_TransferMessage) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.to != rhs.to {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Hedera_Proto_TransactionBody: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionBody" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "transactionID"), - 2: .same(proto: "nodeAccountID"), - 3: .same(proto: "transactionFee"), - 4: .same(proto: "transactionValidDuration"), - 5: .same(proto: "memo"), - 6: .same(proto: "transfer"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._transactionID) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.nodeAccountID) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.transactionFee) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.transactionValidDuration) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.memo) }() - case 6: try { - var v: TW_Hedera_Proto_TransferMessage? - var hadOneofValue = false - if let current = self.data { - hadOneofValue = true - if case .transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.data = .transfer(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._transactionID { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.nodeAccountID.isEmpty { - try visitor.visitSingularStringField(value: self.nodeAccountID, fieldNumber: 2) - } - if self.transactionFee != 0 { - try visitor.visitSingularUInt64Field(value: self.transactionFee, fieldNumber: 3) - } - if self.transactionValidDuration != 0 { - try visitor.visitSingularInt64Field(value: self.transactionValidDuration, fieldNumber: 4) - } - if !self.memo.isEmpty { - try visitor.visitSingularStringField(value: self.memo, fieldNumber: 5) - } - try { if case .transfer(let v)? = self.data { - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Hedera_Proto_TransactionBody, rhs: TW_Hedera_Proto_TransactionBody) -> Bool { - if lhs._transactionID != rhs._transactionID {return false} - if lhs.nodeAccountID != rhs.nodeAccountID {return false} - if lhs.transactionFee != rhs.transactionFee {return false} - if lhs.transactionValidDuration != rhs.transactionValidDuration {return false} - if lhs.memo != rhs.memo {return false} - if lhs.data != rhs.data {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Hedera_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "private_key"), - 2: .same(proto: "body"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._body) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 1) - } - try { if let v = self._body { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Hedera_Proto_SigningInput, rhs: TW_Hedera_Proto_SigningInput) -> Bool { - if lhs.privateKey != rhs.privateKey {return false} - if lhs._body != rhs._body {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Hedera_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Hedera_Proto_SigningOutput, rhs: TW_Hedera_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/IOST+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/IOST+Proto.swift deleted file mode 100644 index 19fdd020..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/IOST+Proto.swift +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias IOSTAction = TW_IOST_Proto_Action -public typealias IOSTAmountLimit = TW_IOST_Proto_AmountLimit -public typealias IOSTSignature = TW_IOST_Proto_Signature -public typealias IOSTTransaction = TW_IOST_Proto_Transaction -public typealias IOSTAccountInfo = TW_IOST_Proto_AccountInfo -public typealias IOSTSigningInput = TW_IOST_Proto_SigningInput -public typealias IOSTSigningOutput = TW_IOST_Proto_SigningOutput -public typealias IOSTAlgorithm = TW_IOST_Proto_Algorithm diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/IOST.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/IOST.pb.swift deleted file mode 100644 index a29a8ae0..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/IOST.pb.swift +++ /dev/null @@ -1,704 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: IOST.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// The enumeration defines the signature algorithm. -public enum TW_IOST_Proto_Algorithm: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// unknown - case unknown // = 0 - - /// secp256k1 - case secp256K1 // = 1 - - /// ed25519 - case ed25519 // = 2 - case UNRECOGNIZED(Int) - - public init() { - self = .unknown - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .unknown - case 1: self = .secp256K1 - case 2: self = .ed25519 - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .unknown: return 0 - case .secp256K1: return 1 - case .ed25519: return 2 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_IOST_Proto_Algorithm: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_IOST_Proto_Algorithm] = [ - .unknown, - .secp256K1, - .ed25519, - ] -} - -#endif // swift(>=4.2) - -/// The message defines transaction action struct. -public struct TW_IOST_Proto_Action { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// contract name - public var contract: String = String() - - /// action name - public var actionName: String = String() - - /// data - public var data: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// The message defines transaction amount limit struct. -public struct TW_IOST_Proto_AmountLimit { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// token name - public var token: String = String() - - /// limit value - public var value: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// The message defines signature struct. -public struct TW_IOST_Proto_Signature { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// signature algorithm - public var algorithm: TW_IOST_Proto_Algorithm = .unknown - - /// signature bytes - public var signature: Data = Data() - - /// public key - public var publicKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// The message defines the transaction request. -public struct TW_IOST_Proto_Transaction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// transaction timestamp - public var time: Int64 = 0 - - /// expiration timestamp - public var expiration: Int64 = 0 - - /// gas price - public var gasRatio: Double = 0 - - /// gas limit - public var gasLimit: Double = 0 - - /// delay nanoseconds - public var delay: Int64 = 0 - - /// chain id - public var chainID: UInt32 = 0 - - /// action list - public var actions: [TW_IOST_Proto_Action] = [] - - /// amount limit - public var amountLimit: [TW_IOST_Proto_AmountLimit] = [] - - /// signer list - public var signers: [String] = [] - - /// signatures of signers - public var signatures: [TW_IOST_Proto_Signature] = [] - - /// publisher - public var publisher: String = String() - - /// signatures of publisher - public var publisherSigs: [TW_IOST_Proto_Signature] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_IOST_Proto_AccountInfo { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var name: String = String() - - public var activeKey: Data = Data() - - public var ownerKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_IOST_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var account: TW_IOST_Proto_AccountInfo { - get {return _storage._account ?? TW_IOST_Proto_AccountInfo()} - set {_uniqueStorage()._account = newValue} - } - /// Returns true if `account` has been explicitly set. - public var hasAccount: Bool {return _storage._account != nil} - /// Clears the value of `account`. Subsequent reads from it will return its default value. - public mutating func clearAccount() {_uniqueStorage()._account = nil} - - public var transactionTemplate: TW_IOST_Proto_Transaction { - get {return _storage._transactionTemplate ?? TW_IOST_Proto_Transaction()} - set {_uniqueStorage()._transactionTemplate = newValue} - } - /// Returns true if `transactionTemplate` has been explicitly set. - public var hasTransactionTemplate: Bool {return _storage._transactionTemplate != nil} - /// Clears the value of `transactionTemplate`. Subsequent reads from it will return its default value. - public mutating func clearTransactionTemplate() {_uniqueStorage()._transactionTemplate = nil} - - public var transferDestination: String { - get {return _storage._transferDestination} - set {_uniqueStorage()._transferDestination = newValue} - } - - public var transferAmount: String { - get {return _storage._transferAmount} - set {_uniqueStorage()._transferAmount = newValue} - } - - public var transferMemo: String { - get {return _storage._transferMemo} - set {_uniqueStorage()._transferMemo = newValue} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Transaction signing output. -public struct TW_IOST_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed transaction - public var transaction: TW_IOST_Proto_Transaction { - get {return _transaction ?? TW_IOST_Proto_Transaction()} - set {_transaction = newValue} - } - /// Returns true if `transaction` has been explicitly set. - public var hasTransaction: Bool {return self._transaction != nil} - /// Clears the value of `transaction`. Subsequent reads from it will return its default value. - public mutating func clearTransaction() {self._transaction = nil} - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _transaction: TW_IOST_Proto_Transaction? = nil -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.IOST.Proto" - -extension TW_IOST_Proto_Algorithm: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UNKNOWN"), - 1: .same(proto: "SECP256K1"), - 2: .same(proto: "ED25519"), - ] -} - -extension TW_IOST_Proto_Action: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Action" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "contract"), - 2: .standard(proto: "action_name"), - 3: .same(proto: "data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.contract) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.actionName) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.data) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.contract.isEmpty { - try visitor.visitSingularStringField(value: self.contract, fieldNumber: 1) - } - if !self.actionName.isEmpty { - try visitor.visitSingularStringField(value: self.actionName, fieldNumber: 2) - } - if !self.data.isEmpty { - try visitor.visitSingularStringField(value: self.data, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IOST_Proto_Action, rhs: TW_IOST_Proto_Action) -> Bool { - if lhs.contract != rhs.contract {return false} - if lhs.actionName != rhs.actionName {return false} - if lhs.data != rhs.data {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IOST_Proto_AmountLimit: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".AmountLimit" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "token"), - 2: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.token) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.token.isEmpty { - try visitor.visitSingularStringField(value: self.token, fieldNumber: 1) - } - if !self.value.isEmpty { - try visitor.visitSingularStringField(value: self.value, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IOST_Proto_AmountLimit, rhs: TW_IOST_Proto_AmountLimit) -> Bool { - if lhs.token != rhs.token {return false} - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IOST_Proto_Signature: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Signature" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "algorithm"), - 2: .same(proto: "signature"), - 3: .standard(proto: "public_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.algorithm) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.algorithm != .unknown { - try visitor.visitSingularEnumField(value: self.algorithm, fieldNumber: 1) - } - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 2) - } - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IOST_Proto_Signature, rhs: TW_IOST_Proto_Signature) -> Bool { - if lhs.algorithm != rhs.algorithm {return false} - if lhs.signature != rhs.signature {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IOST_Proto_Transaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transaction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "time"), - 2: .same(proto: "expiration"), - 3: .standard(proto: "gas_ratio"), - 4: .standard(proto: "gas_limit"), - 5: .same(proto: "delay"), - 6: .standard(proto: "chain_id"), - 7: .same(proto: "actions"), - 8: .standard(proto: "amount_limit"), - 9: .same(proto: "signers"), - 10: .same(proto: "signatures"), - 11: .same(proto: "publisher"), - 12: .standard(proto: "publisher_sigs"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.time) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.expiration) }() - case 3: try { try decoder.decodeSingularDoubleField(value: &self.gasRatio) }() - case 4: try { try decoder.decodeSingularDoubleField(value: &self.gasLimit) }() - case 5: try { try decoder.decodeSingularInt64Field(value: &self.delay) }() - case 6: try { try decoder.decodeSingularUInt32Field(value: &self.chainID) }() - case 7: try { try decoder.decodeRepeatedMessageField(value: &self.actions) }() - case 8: try { try decoder.decodeRepeatedMessageField(value: &self.amountLimit) }() - case 9: try { try decoder.decodeRepeatedStringField(value: &self.signers) }() - case 10: try { try decoder.decodeRepeatedMessageField(value: &self.signatures) }() - case 11: try { try decoder.decodeSingularStringField(value: &self.publisher) }() - case 12: try { try decoder.decodeRepeatedMessageField(value: &self.publisherSigs) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.time != 0 { - try visitor.visitSingularInt64Field(value: self.time, fieldNumber: 1) - } - if self.expiration != 0 { - try visitor.visitSingularInt64Field(value: self.expiration, fieldNumber: 2) - } - if self.gasRatio != 0 { - try visitor.visitSingularDoubleField(value: self.gasRatio, fieldNumber: 3) - } - if self.gasLimit != 0 { - try visitor.visitSingularDoubleField(value: self.gasLimit, fieldNumber: 4) - } - if self.delay != 0 { - try visitor.visitSingularInt64Field(value: self.delay, fieldNumber: 5) - } - if self.chainID != 0 { - try visitor.visitSingularUInt32Field(value: self.chainID, fieldNumber: 6) - } - if !self.actions.isEmpty { - try visitor.visitRepeatedMessageField(value: self.actions, fieldNumber: 7) - } - if !self.amountLimit.isEmpty { - try visitor.visitRepeatedMessageField(value: self.amountLimit, fieldNumber: 8) - } - if !self.signers.isEmpty { - try visitor.visitRepeatedStringField(value: self.signers, fieldNumber: 9) - } - if !self.signatures.isEmpty { - try visitor.visitRepeatedMessageField(value: self.signatures, fieldNumber: 10) - } - if !self.publisher.isEmpty { - try visitor.visitSingularStringField(value: self.publisher, fieldNumber: 11) - } - if !self.publisherSigs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.publisherSigs, fieldNumber: 12) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IOST_Proto_Transaction, rhs: TW_IOST_Proto_Transaction) -> Bool { - if lhs.time != rhs.time {return false} - if lhs.expiration != rhs.expiration {return false} - if lhs.gasRatio != rhs.gasRatio {return false} - if lhs.gasLimit != rhs.gasLimit {return false} - if lhs.delay != rhs.delay {return false} - if lhs.chainID != rhs.chainID {return false} - if lhs.actions != rhs.actions {return false} - if lhs.amountLimit != rhs.amountLimit {return false} - if lhs.signers != rhs.signers {return false} - if lhs.signatures != rhs.signatures {return false} - if lhs.publisher != rhs.publisher {return false} - if lhs.publisherSigs != rhs.publisherSigs {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IOST_Proto_AccountInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".AccountInfo" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .standard(proto: "active_key"), - 3: .standard(proto: "owner_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.activeKey) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.ownerKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) - } - if !self.activeKey.isEmpty { - try visitor.visitSingularBytesField(value: self.activeKey, fieldNumber: 2) - } - if !self.ownerKey.isEmpty { - try visitor.visitSingularBytesField(value: self.ownerKey, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IOST_Proto_AccountInfo, rhs: TW_IOST_Proto_AccountInfo) -> Bool { - if lhs.name != rhs.name {return false} - if lhs.activeKey != rhs.activeKey {return false} - if lhs.ownerKey != rhs.ownerKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IOST_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "account"), - 2: .standard(proto: "transaction_template"), - 3: .standard(proto: "transfer_destination"), - 4: .standard(proto: "transfer_amount"), - 5: .standard(proto: "transfer_memo"), - ] - - fileprivate class _StorageClass { - var _account: TW_IOST_Proto_AccountInfo? = nil - var _transactionTemplate: TW_IOST_Proto_Transaction? = nil - var _transferDestination: String = String() - var _transferAmount: String = String() - var _transferMemo: String = String() - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _account = source._account - _transactionTemplate = source._transactionTemplate - _transferDestination = source._transferDestination - _transferAmount = source._transferAmount - _transferMemo = source._transferMemo - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &_storage._account) }() - case 2: try { try decoder.decodeSingularMessageField(value: &_storage._transactionTemplate) }() - case 3: try { try decoder.decodeSingularStringField(value: &_storage._transferDestination) }() - case 4: try { try decoder.decodeSingularStringField(value: &_storage._transferAmount) }() - case 5: try { try decoder.decodeSingularStringField(value: &_storage._transferMemo) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = _storage._account { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - try { if let v = _storage._transactionTemplate { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - if !_storage._transferDestination.isEmpty { - try visitor.visitSingularStringField(value: _storage._transferDestination, fieldNumber: 3) - } - if !_storage._transferAmount.isEmpty { - try visitor.visitSingularStringField(value: _storage._transferAmount, fieldNumber: 4) - } - if !_storage._transferMemo.isEmpty { - try visitor.visitSingularStringField(value: _storage._transferMemo, fieldNumber: 5) - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IOST_Proto_SigningInput, rhs: TW_IOST_Proto_SigningInput) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._account != rhs_storage._account {return false} - if _storage._transactionTemplate != rhs_storage._transactionTemplate {return false} - if _storage._transferDestination != rhs_storage._transferDestination {return false} - if _storage._transferAmount != rhs_storage._transferAmount {return false} - if _storage._transferMemo != rhs_storage._transferMemo {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IOST_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "transaction"), - 2: .same(proto: "encoded"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._transaction) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._transaction { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IOST_Proto_SigningOutput, rhs: TW_IOST_Proto_SigningOutput) -> Bool { - if lhs._transaction != rhs._transaction {return false} - if lhs.encoded != rhs.encoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Icon+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Icon+Proto.swift deleted file mode 100644 index b3666c5f..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Icon+Proto.swift +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias IconSigningInput = TW_Icon_Proto_SigningInput -public typealias IconSigningOutput = TW_Icon_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Icon.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Icon.pb.swift deleted file mode 100644 index d83b3b77..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Icon.pb.swift +++ /dev/null @@ -1,206 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Icon.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Input data necessary to create a signed transaction. -public struct TW_Icon_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Sender address. - public var fromAddress: String = String() - - /// Recipient address. - public var toAddress: String = String() - - /// Transfer amount (uint256, serialized little endian) - public var value: Data = Data() - - /// The amount of step to send with the transaction. - public var stepLimit: Data = Data() - - /// UNIX epoch time (from 1970.1.1 00:00:00) in microseconds - public var timestamp: Int64 = 0 - - /// Integer value increased by request to avoid replay attacks. - public var nonce: Data = Data() - - /// Network identifier - public var networkID: Data = Data() - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Icon_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// JSON-encoded transaction parameters. - public var encoded: String = String() - - /// Signature. - public var signature: Data = Data() - - /// error description - public var errorMessage: String = String() - - public var error: TW_Common_Proto_SigningError = .ok - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Icon.Proto" - -extension TW_Icon_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "from_address"), - 2: .standard(proto: "to_address"), - 3: .same(proto: "value"), - 4: .standard(proto: "step_limit"), - 5: .same(proto: "timestamp"), - 6: .same(proto: "nonce"), - 7: .standard(proto: "network_id"), - 8: .standard(proto: "private_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.fromAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.stepLimit) }() - case 5: try { try decoder.decodeSingularInt64Field(value: &self.timestamp) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.nonce) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.networkID) }() - case 8: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fromAddress.isEmpty { - try visitor.visitSingularStringField(value: self.fromAddress, fieldNumber: 1) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 2) - } - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 3) - } - if !self.stepLimit.isEmpty { - try visitor.visitSingularBytesField(value: self.stepLimit, fieldNumber: 4) - } - if self.timestamp != 0 { - try visitor.visitSingularInt64Field(value: self.timestamp, fieldNumber: 5) - } - if !self.nonce.isEmpty { - try visitor.visitSingularBytesField(value: self.nonce, fieldNumber: 6) - } - if !self.networkID.isEmpty { - try visitor.visitSingularBytesField(value: self.networkID, fieldNumber: 7) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 8) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Icon_Proto_SigningInput, rhs: TW_Icon_Proto_SigningInput) -> Bool { - if lhs.fromAddress != rhs.fromAddress {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.value != rhs.value {return false} - if lhs.stepLimit != rhs.stepLimit {return false} - if lhs.timestamp != rhs.timestamp {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.networkID != rhs.networkID {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Icon_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "signature"), - 3: .standard(proto: "error_message"), - 4: .same(proto: "error"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - case 4: try { try decoder.decodeSingularEnumField(value: &self.error) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularStringField(value: self.encoded, fieldNumber: 1) - } - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Icon_Proto_SigningOutput, rhs: TW_Icon_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.signature != rhs.signature {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.error != rhs.error {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/IoTeX+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/IoTeX+Proto.swift deleted file mode 100644 index f20cd980..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/IoTeX+Proto.swift +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias IoTeXTransfer = TW_IoTeX_Proto_Transfer -public typealias IoTeXStaking = TW_IoTeX_Proto_Staking -public typealias IoTeXContractCall = TW_IoTeX_Proto_ContractCall -public typealias IoTeXSigningInput = TW_IoTeX_Proto_SigningInput -public typealias IoTeXSigningOutput = TW_IoTeX_Proto_SigningOutput -public typealias IoTeXActionCore = TW_IoTeX_Proto_ActionCore -public typealias IoTeXAction = TW_IoTeX_Proto_Action diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/IoTeX.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/IoTeX.pb.swift deleted file mode 100644 index 3bb6e5da..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/IoTeX.pb.swift +++ /dev/null @@ -1,2120 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: IoTeX.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// A transfer -public struct TW_IoTeX_Proto_Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Amount (as string) - public var amount: String = String() - - /// Destination address - public var recipient: String = String() - - /// Payload data - public var payload: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A Staking message -public struct TW_IoTeX_Proto_Staking { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// the payload message - public var message: TW_IoTeX_Proto_Staking.OneOf_Message? = nil - - public var stakeCreate: TW_IoTeX_Proto_Staking.Create { - get { - if case .stakeCreate(let v)? = message {return v} - return TW_IoTeX_Proto_Staking.Create() - } - set {message = .stakeCreate(newValue)} - } - - public var stakeUnstake: TW_IoTeX_Proto_Staking.Reclaim { - get { - if case .stakeUnstake(let v)? = message {return v} - return TW_IoTeX_Proto_Staking.Reclaim() - } - set {message = .stakeUnstake(newValue)} - } - - public var stakeWithdraw: TW_IoTeX_Proto_Staking.Reclaim { - get { - if case .stakeWithdraw(let v)? = message {return v} - return TW_IoTeX_Proto_Staking.Reclaim() - } - set {message = .stakeWithdraw(newValue)} - } - - public var stakeAddDeposit: TW_IoTeX_Proto_Staking.AddDeposit { - get { - if case .stakeAddDeposit(let v)? = message {return v} - return TW_IoTeX_Proto_Staking.AddDeposit() - } - set {message = .stakeAddDeposit(newValue)} - } - - public var stakeRestake: TW_IoTeX_Proto_Staking.Restake { - get { - if case .stakeRestake(let v)? = message {return v} - return TW_IoTeX_Proto_Staking.Restake() - } - set {message = .stakeRestake(newValue)} - } - - public var stakeChangeCandidate: TW_IoTeX_Proto_Staking.ChangeCandidate { - get { - if case .stakeChangeCandidate(let v)? = message {return v} - return TW_IoTeX_Proto_Staking.ChangeCandidate() - } - set {message = .stakeChangeCandidate(newValue)} - } - - public var stakeTransferOwnership: TW_IoTeX_Proto_Staking.TransferOwnership { - get { - if case .stakeTransferOwnership(let v)? = message {return v} - return TW_IoTeX_Proto_Staking.TransferOwnership() - } - set {message = .stakeTransferOwnership(newValue)} - } - - public var candidateRegister: TW_IoTeX_Proto_Staking.CandidateRegister { - get { - if case .candidateRegister(let v)? = message {return v} - return TW_IoTeX_Proto_Staking.CandidateRegister() - } - set {message = .candidateRegister(newValue)} - } - - public var candidateUpdate: TW_IoTeX_Proto_Staking.CandidateBasicInfo { - get { - if case .candidateUpdate(let v)? = message {return v} - return TW_IoTeX_Proto_Staking.CandidateBasicInfo() - } - set {message = .candidateUpdate(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// the payload message - public enum OneOf_Message: Equatable { - case stakeCreate(TW_IoTeX_Proto_Staking.Create) - case stakeUnstake(TW_IoTeX_Proto_Staking.Reclaim) - case stakeWithdraw(TW_IoTeX_Proto_Staking.Reclaim) - case stakeAddDeposit(TW_IoTeX_Proto_Staking.AddDeposit) - case stakeRestake(TW_IoTeX_Proto_Staking.Restake) - case stakeChangeCandidate(TW_IoTeX_Proto_Staking.ChangeCandidate) - case stakeTransferOwnership(TW_IoTeX_Proto_Staking.TransferOwnership) - case candidateRegister(TW_IoTeX_Proto_Staking.CandidateRegister) - case candidateUpdate(TW_IoTeX_Proto_Staking.CandidateBasicInfo) - - #if !swift(>=4.1) - public static func ==(lhs: TW_IoTeX_Proto_Staking.OneOf_Message, rhs: TW_IoTeX_Proto_Staking.OneOf_Message) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.stakeCreate, .stakeCreate): return { - guard case .stakeCreate(let l) = lhs, case .stakeCreate(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeUnstake, .stakeUnstake): return { - guard case .stakeUnstake(let l) = lhs, case .stakeUnstake(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeWithdraw, .stakeWithdraw): return { - guard case .stakeWithdraw(let l) = lhs, case .stakeWithdraw(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeAddDeposit, .stakeAddDeposit): return { - guard case .stakeAddDeposit(let l) = lhs, case .stakeAddDeposit(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeRestake, .stakeRestake): return { - guard case .stakeRestake(let l) = lhs, case .stakeRestake(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeChangeCandidate, .stakeChangeCandidate): return { - guard case .stakeChangeCandidate(let l) = lhs, case .stakeChangeCandidate(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeTransferOwnership, .stakeTransferOwnership): return { - guard case .stakeTransferOwnership(let l) = lhs, case .stakeTransferOwnership(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.candidateRegister, .candidateRegister): return { - guard case .candidateRegister(let l) = lhs, case .candidateRegister(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.candidateUpdate, .candidateUpdate): return { - guard case .candidateUpdate(let l) = lhs, case .candidateUpdate(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - /// create stake - public struct Create { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// validator name - public var candidateName: String = String() - - /// amount to be staked - public var stakedAmount: String = String() - - /// duration - public var stakedDuration: UInt32 = 0 - - /// auto-restake - public var autoStake: Bool = false - - /// payload data - public var payload: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// unstake or withdraw - public struct Reclaim { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// index to claim - public var bucketIndex: UInt64 = 0 - - /// payload data - public var payload: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// add the amount of bucket - public struct AddDeposit { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// index - public var bucketIndex: UInt64 = 0 - - /// amount to add - public var amount: String = String() - - /// payload data - public var payload: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// restake the duration and autoStake flag of bucket - public struct Restake { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// index - public var bucketIndex: UInt64 = 0 - - /// stake duration - public var stakedDuration: UInt32 = 0 - - /// auto re-stake - public var autoStake: Bool = false - - /// payload data - public var payload: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// move the bucket to vote for another candidate or transfer the ownership of bucket to another voters - public struct ChangeCandidate { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// index - public var bucketIndex: UInt64 = 0 - - /// validator name - public var candidateName: String = String() - - /// payload data - public var payload: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// transfer ownserhip of stake - public struct TransferOwnership { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// index - public var bucketIndex: UInt64 = 0 - - /// address of voter - public var voterAddress: String = String() - - /// payload data - public var payload: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// Candidate (validator) info - public struct CandidateBasicInfo { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var name: String = String() - - public var operatorAddress: String = String() - - public var rewardAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// Register a Candidate - public struct CandidateRegister { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var candidate: TW_IoTeX_Proto_Staking.CandidateBasicInfo { - get {return _candidate ?? TW_IoTeX_Proto_Staking.CandidateBasicInfo()} - set {_candidate = newValue} - } - /// Returns true if `candidate` has been explicitly set. - public var hasCandidate: Bool {return self._candidate != nil} - /// Clears the value of `candidate`. Subsequent reads from it will return its default value. - public mutating func clearCandidate() {self._candidate = nil} - - public var stakedAmount: String = String() - - public var stakedDuration: UInt32 = 0 - - public var autoStake: Bool = false - - /// if ownerAddress is absent, owner of candidate is the sender - public var ownerAddress: String = String() - - public var payload: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _candidate: TW_IoTeX_Proto_Staking.CandidateBasicInfo? = nil - } - - public init() {} -} - -/// Arbitrary contract call -public struct TW_IoTeX_Proto_ContractCall { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// amount - public var amount: String = String() - - /// contract address - public var contract: String = String() - - /// payload data - public var data: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_IoTeX_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Transaction version - public var version: UInt32 = 0 - - /// Nonce (should be larger than in the last transaction of the account) - public var nonce: UInt64 = 0 - - /// Limit for the gas used - public var gasLimit: UInt64 = 0 - - /// Gas price - public var gasPrice: String = String() - - /// The chain id of blockchain - public var chainID: UInt32 = 0 - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Payload transfer - public var action: TW_IoTeX_Proto_SigningInput.OneOf_Action? = nil - - public var transfer: TW_IoTeX_Proto_Transfer { - get { - if case .transfer(let v)? = action {return v} - return TW_IoTeX_Proto_Transfer() - } - set {action = .transfer(newValue)} - } - - public var call: TW_IoTeX_Proto_ContractCall { - get { - if case .call(let v)? = action {return v} - return TW_IoTeX_Proto_ContractCall() - } - set {action = .call(newValue)} - } - - /// Native staking - public var stakeCreate: TW_IoTeX_Proto_Staking.Create { - get { - if case .stakeCreate(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.Create() - } - set {action = .stakeCreate(newValue)} - } - - public var stakeUnstake: TW_IoTeX_Proto_Staking.Reclaim { - get { - if case .stakeUnstake(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.Reclaim() - } - set {action = .stakeUnstake(newValue)} - } - - public var stakeWithdraw: TW_IoTeX_Proto_Staking.Reclaim { - get { - if case .stakeWithdraw(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.Reclaim() - } - set {action = .stakeWithdraw(newValue)} - } - - public var stakeAddDeposit: TW_IoTeX_Proto_Staking.AddDeposit { - get { - if case .stakeAddDeposit(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.AddDeposit() - } - set {action = .stakeAddDeposit(newValue)} - } - - public var stakeRestake: TW_IoTeX_Proto_Staking.Restake { - get { - if case .stakeRestake(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.Restake() - } - set {action = .stakeRestake(newValue)} - } - - public var stakeChangeCandidate: TW_IoTeX_Proto_Staking.ChangeCandidate { - get { - if case .stakeChangeCandidate(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.ChangeCandidate() - } - set {action = .stakeChangeCandidate(newValue)} - } - - public var stakeTransferOwnership: TW_IoTeX_Proto_Staking.TransferOwnership { - get { - if case .stakeTransferOwnership(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.TransferOwnership() - } - set {action = .stakeTransferOwnership(newValue)} - } - - public var candidateRegister: TW_IoTeX_Proto_Staking.CandidateRegister { - get { - if case .candidateRegister(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.CandidateRegister() - } - set {action = .candidateRegister(newValue)} - } - - public var candidateUpdate: TW_IoTeX_Proto_Staking.CandidateBasicInfo { - get { - if case .candidateUpdate(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.CandidateBasicInfo() - } - set {action = .candidateUpdate(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Payload transfer - public enum OneOf_Action: Equatable { - case transfer(TW_IoTeX_Proto_Transfer) - case call(TW_IoTeX_Proto_ContractCall) - /// Native staking - case stakeCreate(TW_IoTeX_Proto_Staking.Create) - case stakeUnstake(TW_IoTeX_Proto_Staking.Reclaim) - case stakeWithdraw(TW_IoTeX_Proto_Staking.Reclaim) - case stakeAddDeposit(TW_IoTeX_Proto_Staking.AddDeposit) - case stakeRestake(TW_IoTeX_Proto_Staking.Restake) - case stakeChangeCandidate(TW_IoTeX_Proto_Staking.ChangeCandidate) - case stakeTransferOwnership(TW_IoTeX_Proto_Staking.TransferOwnership) - case candidateRegister(TW_IoTeX_Proto_Staking.CandidateRegister) - case candidateUpdate(TW_IoTeX_Proto_Staking.CandidateBasicInfo) - - #if !swift(>=4.1) - public static func ==(lhs: TW_IoTeX_Proto_SigningInput.OneOf_Action, rhs: TW_IoTeX_Proto_SigningInput.OneOf_Action) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transfer, .transfer): return { - guard case .transfer(let l) = lhs, case .transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.call, .call): return { - guard case .call(let l) = lhs, case .call(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeCreate, .stakeCreate): return { - guard case .stakeCreate(let l) = lhs, case .stakeCreate(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeUnstake, .stakeUnstake): return { - guard case .stakeUnstake(let l) = lhs, case .stakeUnstake(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeWithdraw, .stakeWithdraw): return { - guard case .stakeWithdraw(let l) = lhs, case .stakeWithdraw(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeAddDeposit, .stakeAddDeposit): return { - guard case .stakeAddDeposit(let l) = lhs, case .stakeAddDeposit(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeRestake, .stakeRestake): return { - guard case .stakeRestake(let l) = lhs, case .stakeRestake(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeChangeCandidate, .stakeChangeCandidate): return { - guard case .stakeChangeCandidate(let l) = lhs, case .stakeChangeCandidate(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeTransferOwnership, .stakeTransferOwnership): return { - guard case .stakeTransferOwnership(let l) = lhs, case .stakeTransferOwnership(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.candidateRegister, .candidateRegister): return { - guard case .candidateRegister(let l) = lhs, case .candidateRegister(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.candidateUpdate, .candidateUpdate): return { - guard case .candidateUpdate(let l) = lhs, case .candidateUpdate(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_IoTeX_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and encoded Action bytes - public var encoded: Data = Data() - - /// Signed Action hash - public var hash: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// An Action structure -/// Used internally -public struct TW_IoTeX_Proto_ActionCore { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// version number - public var version: UInt32 = 0 - - /// Nonce (should be larger than in the last transaction of the account) - public var nonce: UInt64 = 0 - - /// Gas limit - public var gasLimit: UInt64 = 0 - - /// Gas price - public var gasPrice: String = String() - - /// Chain ID - public var chainID: UInt32 = 0 - - /// action payload - public var action: TW_IoTeX_Proto_ActionCore.OneOf_Action? = nil - - public var transfer: TW_IoTeX_Proto_Transfer { - get { - if case .transfer(let v)? = action {return v} - return TW_IoTeX_Proto_Transfer() - } - set {action = .transfer(newValue)} - } - - public var execution: TW_IoTeX_Proto_ContractCall { - get { - if case .execution(let v)? = action {return v} - return TW_IoTeX_Proto_ContractCall() - } - set {action = .execution(newValue)} - } - - /// Native staking - public var stakeCreate: TW_IoTeX_Proto_Staking.Create { - get { - if case .stakeCreate(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.Create() - } - set {action = .stakeCreate(newValue)} - } - - public var stakeUnstake: TW_IoTeX_Proto_Staking.Reclaim { - get { - if case .stakeUnstake(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.Reclaim() - } - set {action = .stakeUnstake(newValue)} - } - - public var stakeWithdraw: TW_IoTeX_Proto_Staking.Reclaim { - get { - if case .stakeWithdraw(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.Reclaim() - } - set {action = .stakeWithdraw(newValue)} - } - - public var stakeAddDeposit: TW_IoTeX_Proto_Staking.AddDeposit { - get { - if case .stakeAddDeposit(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.AddDeposit() - } - set {action = .stakeAddDeposit(newValue)} - } - - public var stakeRestake: TW_IoTeX_Proto_Staking.Restake { - get { - if case .stakeRestake(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.Restake() - } - set {action = .stakeRestake(newValue)} - } - - public var stakeChangeCandidate: TW_IoTeX_Proto_Staking.ChangeCandidate { - get { - if case .stakeChangeCandidate(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.ChangeCandidate() - } - set {action = .stakeChangeCandidate(newValue)} - } - - public var stakeTransferOwnership: TW_IoTeX_Proto_Staking.TransferOwnership { - get { - if case .stakeTransferOwnership(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.TransferOwnership() - } - set {action = .stakeTransferOwnership(newValue)} - } - - public var candidateRegister: TW_IoTeX_Proto_Staking.CandidateRegister { - get { - if case .candidateRegister(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.CandidateRegister() - } - set {action = .candidateRegister(newValue)} - } - - public var candidateUpdate: TW_IoTeX_Proto_Staking.CandidateBasicInfo { - get { - if case .candidateUpdate(let v)? = action {return v} - return TW_IoTeX_Proto_Staking.CandidateBasicInfo() - } - set {action = .candidateUpdate(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// action payload - public enum OneOf_Action: Equatable { - case transfer(TW_IoTeX_Proto_Transfer) - case execution(TW_IoTeX_Proto_ContractCall) - /// Native staking - case stakeCreate(TW_IoTeX_Proto_Staking.Create) - case stakeUnstake(TW_IoTeX_Proto_Staking.Reclaim) - case stakeWithdraw(TW_IoTeX_Proto_Staking.Reclaim) - case stakeAddDeposit(TW_IoTeX_Proto_Staking.AddDeposit) - case stakeRestake(TW_IoTeX_Proto_Staking.Restake) - case stakeChangeCandidate(TW_IoTeX_Proto_Staking.ChangeCandidate) - case stakeTransferOwnership(TW_IoTeX_Proto_Staking.TransferOwnership) - case candidateRegister(TW_IoTeX_Proto_Staking.CandidateRegister) - case candidateUpdate(TW_IoTeX_Proto_Staking.CandidateBasicInfo) - - #if !swift(>=4.1) - public static func ==(lhs: TW_IoTeX_Proto_ActionCore.OneOf_Action, rhs: TW_IoTeX_Proto_ActionCore.OneOf_Action) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transfer, .transfer): return { - guard case .transfer(let l) = lhs, case .transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.execution, .execution): return { - guard case .execution(let l) = lhs, case .execution(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeCreate, .stakeCreate): return { - guard case .stakeCreate(let l) = lhs, case .stakeCreate(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeUnstake, .stakeUnstake): return { - guard case .stakeUnstake(let l) = lhs, case .stakeUnstake(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeWithdraw, .stakeWithdraw): return { - guard case .stakeWithdraw(let l) = lhs, case .stakeWithdraw(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeAddDeposit, .stakeAddDeposit): return { - guard case .stakeAddDeposit(let l) = lhs, case .stakeAddDeposit(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeRestake, .stakeRestake): return { - guard case .stakeRestake(let l) = lhs, case .stakeRestake(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeChangeCandidate, .stakeChangeCandidate): return { - guard case .stakeChangeCandidate(let l) = lhs, case .stakeChangeCandidate(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakeTransferOwnership, .stakeTransferOwnership): return { - guard case .stakeTransferOwnership(let l) = lhs, case .stakeTransferOwnership(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.candidateRegister, .candidateRegister): return { - guard case .candidateRegister(let l) = lhs, case .candidateRegister(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.candidateUpdate, .candidateUpdate): return { - guard case .candidateUpdate(let l) = lhs, case .candidateUpdate(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Signed Action -/// Used internally -public struct TW_IoTeX_Proto_Action { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Action details - public var core: TW_IoTeX_Proto_ActionCore { - get {return _core ?? TW_IoTeX_Proto_ActionCore()} - set {_core = newValue} - } - /// Returns true if `core` has been explicitly set. - public var hasCore: Bool {return self._core != nil} - /// Clears the value of `core`. Subsequent reads from it will return its default value. - public mutating func clearCore() {self._core = nil} - - /// public key - public var senderPubKey: Data = Data() - - /// the signature - public var signature: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _core: TW_IoTeX_Proto_ActionCore? = nil -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.IoTeX.Proto" - -extension TW_IoTeX_Proto_Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - 2: .same(proto: "recipient"), - 3: .same(proto: "payload"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.recipient) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 1) - } - if !self.recipient.isEmpty { - try visitor.visitSingularStringField(value: self.recipient, fieldNumber: 2) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_Transfer, rhs: TW_IoTeX_Proto_Transfer) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.recipient != rhs.recipient {return false} - if lhs.payload != rhs.payload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_Staking: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Staking" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "stakeCreate"), - 2: .same(proto: "stakeUnstake"), - 3: .same(proto: "stakeWithdraw"), - 4: .same(proto: "stakeAddDeposit"), - 5: .same(proto: "stakeRestake"), - 6: .same(proto: "stakeChangeCandidate"), - 7: .same(proto: "stakeTransferOwnership"), - 8: .same(proto: "candidateRegister"), - 9: .same(proto: "candidateUpdate"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_IoTeX_Proto_Staking.Create? - var hadOneofValue = false - if let current = self.message { - hadOneofValue = true - if case .stakeCreate(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.message = .stakeCreate(v) - } - }() - case 2: try { - var v: TW_IoTeX_Proto_Staking.Reclaim? - var hadOneofValue = false - if let current = self.message { - hadOneofValue = true - if case .stakeUnstake(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.message = .stakeUnstake(v) - } - }() - case 3: try { - var v: TW_IoTeX_Proto_Staking.Reclaim? - var hadOneofValue = false - if let current = self.message { - hadOneofValue = true - if case .stakeWithdraw(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.message = .stakeWithdraw(v) - } - }() - case 4: try { - var v: TW_IoTeX_Proto_Staking.AddDeposit? - var hadOneofValue = false - if let current = self.message { - hadOneofValue = true - if case .stakeAddDeposit(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.message = .stakeAddDeposit(v) - } - }() - case 5: try { - var v: TW_IoTeX_Proto_Staking.Restake? - var hadOneofValue = false - if let current = self.message { - hadOneofValue = true - if case .stakeRestake(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.message = .stakeRestake(v) - } - }() - case 6: try { - var v: TW_IoTeX_Proto_Staking.ChangeCandidate? - var hadOneofValue = false - if let current = self.message { - hadOneofValue = true - if case .stakeChangeCandidate(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.message = .stakeChangeCandidate(v) - } - }() - case 7: try { - var v: TW_IoTeX_Proto_Staking.TransferOwnership? - var hadOneofValue = false - if let current = self.message { - hadOneofValue = true - if case .stakeTransferOwnership(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.message = .stakeTransferOwnership(v) - } - }() - case 8: try { - var v: TW_IoTeX_Proto_Staking.CandidateRegister? - var hadOneofValue = false - if let current = self.message { - hadOneofValue = true - if case .candidateRegister(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.message = .candidateRegister(v) - } - }() - case 9: try { - var v: TW_IoTeX_Proto_Staking.CandidateBasicInfo? - var hadOneofValue = false - if let current = self.message { - hadOneofValue = true - if case .candidateUpdate(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.message = .candidateUpdate(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.message { - case .stakeCreate?: try { - guard case .stakeCreate(let v)? = self.message else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .stakeUnstake?: try { - guard case .stakeUnstake(let v)? = self.message else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .stakeWithdraw?: try { - guard case .stakeWithdraw(let v)? = self.message else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .stakeAddDeposit?: try { - guard case .stakeAddDeposit(let v)? = self.message else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case .stakeRestake?: try { - guard case .stakeRestake(let v)? = self.message else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - }() - case .stakeChangeCandidate?: try { - guard case .stakeChangeCandidate(let v)? = self.message else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - }() - case .stakeTransferOwnership?: try { - guard case .stakeTransferOwnership(let v)? = self.message else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - }() - case .candidateRegister?: try { - guard case .candidateRegister(let v)? = self.message else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case .candidateUpdate?: try { - guard case .candidateUpdate(let v)? = self.message else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_Staking, rhs: TW_IoTeX_Proto_Staking) -> Bool { - if lhs.message != rhs.message {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_Staking.Create: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_IoTeX_Proto_Staking.protoMessageName + ".Create" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "candidateName"), - 2: .same(proto: "stakedAmount"), - 3: .same(proto: "stakedDuration"), - 4: .same(proto: "autoStake"), - 5: .same(proto: "payload"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.candidateName) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.stakedAmount) }() - case 3: try { try decoder.decodeSingularUInt32Field(value: &self.stakedDuration) }() - case 4: try { try decoder.decodeSingularBoolField(value: &self.autoStake) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.candidateName.isEmpty { - try visitor.visitSingularStringField(value: self.candidateName, fieldNumber: 1) - } - if !self.stakedAmount.isEmpty { - try visitor.visitSingularStringField(value: self.stakedAmount, fieldNumber: 2) - } - if self.stakedDuration != 0 { - try visitor.visitSingularUInt32Field(value: self.stakedDuration, fieldNumber: 3) - } - if self.autoStake != false { - try visitor.visitSingularBoolField(value: self.autoStake, fieldNumber: 4) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_Staking.Create, rhs: TW_IoTeX_Proto_Staking.Create) -> Bool { - if lhs.candidateName != rhs.candidateName {return false} - if lhs.stakedAmount != rhs.stakedAmount {return false} - if lhs.stakedDuration != rhs.stakedDuration {return false} - if lhs.autoStake != rhs.autoStake {return false} - if lhs.payload != rhs.payload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_Staking.Reclaim: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_IoTeX_Proto_Staking.protoMessageName + ".Reclaim" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "bucketIndex"), - 2: .same(proto: "payload"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.bucketIndex) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.bucketIndex != 0 { - try visitor.visitSingularUInt64Field(value: self.bucketIndex, fieldNumber: 1) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_Staking.Reclaim, rhs: TW_IoTeX_Proto_Staking.Reclaim) -> Bool { - if lhs.bucketIndex != rhs.bucketIndex {return false} - if lhs.payload != rhs.payload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_Staking.AddDeposit: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_IoTeX_Proto_Staking.protoMessageName + ".AddDeposit" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "bucketIndex"), - 2: .same(proto: "amount"), - 3: .same(proto: "payload"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.bucketIndex) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.bucketIndex != 0 { - try visitor.visitSingularUInt64Field(value: self.bucketIndex, fieldNumber: 1) - } - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 2) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_Staking.AddDeposit, rhs: TW_IoTeX_Proto_Staking.AddDeposit) -> Bool { - if lhs.bucketIndex != rhs.bucketIndex {return false} - if lhs.amount != rhs.amount {return false} - if lhs.payload != rhs.payload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_Staking.Restake: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_IoTeX_Proto_Staking.protoMessageName + ".Restake" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "bucketIndex"), - 2: .same(proto: "stakedDuration"), - 3: .same(proto: "autoStake"), - 4: .same(proto: "payload"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.bucketIndex) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.stakedDuration) }() - case 3: try { try decoder.decodeSingularBoolField(value: &self.autoStake) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.bucketIndex != 0 { - try visitor.visitSingularUInt64Field(value: self.bucketIndex, fieldNumber: 1) - } - if self.stakedDuration != 0 { - try visitor.visitSingularUInt32Field(value: self.stakedDuration, fieldNumber: 2) - } - if self.autoStake != false { - try visitor.visitSingularBoolField(value: self.autoStake, fieldNumber: 3) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_Staking.Restake, rhs: TW_IoTeX_Proto_Staking.Restake) -> Bool { - if lhs.bucketIndex != rhs.bucketIndex {return false} - if lhs.stakedDuration != rhs.stakedDuration {return false} - if lhs.autoStake != rhs.autoStake {return false} - if lhs.payload != rhs.payload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_Staking.ChangeCandidate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_IoTeX_Proto_Staking.protoMessageName + ".ChangeCandidate" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "bucketIndex"), - 2: .same(proto: "candidateName"), - 3: .same(proto: "payload"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.bucketIndex) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.candidateName) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.bucketIndex != 0 { - try visitor.visitSingularUInt64Field(value: self.bucketIndex, fieldNumber: 1) - } - if !self.candidateName.isEmpty { - try visitor.visitSingularStringField(value: self.candidateName, fieldNumber: 2) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_Staking.ChangeCandidate, rhs: TW_IoTeX_Proto_Staking.ChangeCandidate) -> Bool { - if lhs.bucketIndex != rhs.bucketIndex {return false} - if lhs.candidateName != rhs.candidateName {return false} - if lhs.payload != rhs.payload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_Staking.TransferOwnership: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_IoTeX_Proto_Staking.protoMessageName + ".TransferOwnership" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "bucketIndex"), - 2: .same(proto: "voterAddress"), - 3: .same(proto: "payload"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.bucketIndex) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.voterAddress) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.bucketIndex != 0 { - try visitor.visitSingularUInt64Field(value: self.bucketIndex, fieldNumber: 1) - } - if !self.voterAddress.isEmpty { - try visitor.visitSingularStringField(value: self.voterAddress, fieldNumber: 2) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_Staking.TransferOwnership, rhs: TW_IoTeX_Proto_Staking.TransferOwnership) -> Bool { - if lhs.bucketIndex != rhs.bucketIndex {return false} - if lhs.voterAddress != rhs.voterAddress {return false} - if lhs.payload != rhs.payload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_Staking.CandidateBasicInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_IoTeX_Proto_Staking.protoMessageName + ".CandidateBasicInfo" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "name"), - 2: .same(proto: "operatorAddress"), - 3: .same(proto: "rewardAddress"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.name) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.operatorAddress) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.rewardAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.name.isEmpty { - try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) - } - if !self.operatorAddress.isEmpty { - try visitor.visitSingularStringField(value: self.operatorAddress, fieldNumber: 2) - } - if !self.rewardAddress.isEmpty { - try visitor.visitSingularStringField(value: self.rewardAddress, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_Staking.CandidateBasicInfo, rhs: TW_IoTeX_Proto_Staking.CandidateBasicInfo) -> Bool { - if lhs.name != rhs.name {return false} - if lhs.operatorAddress != rhs.operatorAddress {return false} - if lhs.rewardAddress != rhs.rewardAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_Staking.CandidateRegister: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_IoTeX_Proto_Staking.protoMessageName + ".CandidateRegister" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "candidate"), - 2: .same(proto: "stakedAmount"), - 3: .same(proto: "stakedDuration"), - 4: .same(proto: "autoStake"), - 5: .same(proto: "ownerAddress"), - 6: .same(proto: "payload"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._candidate) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.stakedAmount) }() - case 3: try { try decoder.decodeSingularUInt32Field(value: &self.stakedDuration) }() - case 4: try { try decoder.decodeSingularBoolField(value: &self.autoStake) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._candidate { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.stakedAmount.isEmpty { - try visitor.visitSingularStringField(value: self.stakedAmount, fieldNumber: 2) - } - if self.stakedDuration != 0 { - try visitor.visitSingularUInt32Field(value: self.stakedDuration, fieldNumber: 3) - } - if self.autoStake != false { - try visitor.visitSingularBoolField(value: self.autoStake, fieldNumber: 4) - } - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 5) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_Staking.CandidateRegister, rhs: TW_IoTeX_Proto_Staking.CandidateRegister) -> Bool { - if lhs._candidate != rhs._candidate {return false} - if lhs.stakedAmount != rhs.stakedAmount {return false} - if lhs.stakedDuration != rhs.stakedDuration {return false} - if lhs.autoStake != rhs.autoStake {return false} - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.payload != rhs.payload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_ContractCall: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ContractCall" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - 2: .same(proto: "contract"), - 3: .same(proto: "data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.contract) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.data) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 1) - } - if !self.contract.isEmpty { - try visitor.visitSingularStringField(value: self.contract, fieldNumber: 2) - } - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_ContractCall, rhs: TW_IoTeX_Proto_ContractCall) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.contract != rhs.contract {return false} - if lhs.data != rhs.data {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "version"), - 2: .same(proto: "nonce"), - 3: .same(proto: "gasLimit"), - 4: .same(proto: "gasPrice"), - 5: .same(proto: "chainID"), - 6: .same(proto: "privateKey"), - 10: .same(proto: "transfer"), - 12: .same(proto: "call"), - 40: .same(proto: "stakeCreate"), - 41: .same(proto: "stakeUnstake"), - 42: .same(proto: "stakeWithdraw"), - 43: .same(proto: "stakeAddDeposit"), - 44: .same(proto: "stakeRestake"), - 45: .same(proto: "stakeChangeCandidate"), - 46: .same(proto: "stakeTransferOwnership"), - 47: .same(proto: "candidateRegister"), - 48: .same(proto: "candidateUpdate"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &self.version) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.nonce) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.gasLimit) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.gasPrice) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &self.chainID) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 10: try { - var v: TW_IoTeX_Proto_Transfer? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .transfer(v) - } - }() - case 12: try { - var v: TW_IoTeX_Proto_ContractCall? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .call(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .call(v) - } - }() - case 40: try { - var v: TW_IoTeX_Proto_Staking.Create? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeCreate(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeCreate(v) - } - }() - case 41: try { - var v: TW_IoTeX_Proto_Staking.Reclaim? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeUnstake(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeUnstake(v) - } - }() - case 42: try { - var v: TW_IoTeX_Proto_Staking.Reclaim? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeWithdraw(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeWithdraw(v) - } - }() - case 43: try { - var v: TW_IoTeX_Proto_Staking.AddDeposit? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeAddDeposit(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeAddDeposit(v) - } - }() - case 44: try { - var v: TW_IoTeX_Proto_Staking.Restake? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeRestake(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeRestake(v) - } - }() - case 45: try { - var v: TW_IoTeX_Proto_Staking.ChangeCandidate? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeChangeCandidate(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeChangeCandidate(v) - } - }() - case 46: try { - var v: TW_IoTeX_Proto_Staking.TransferOwnership? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeTransferOwnership(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeTransferOwnership(v) - } - }() - case 47: try { - var v: TW_IoTeX_Proto_Staking.CandidateRegister? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .candidateRegister(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .candidateRegister(v) - } - }() - case 48: try { - var v: TW_IoTeX_Proto_Staking.CandidateBasicInfo? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .candidateUpdate(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .candidateUpdate(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.version != 0 { - try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 1) - } - if self.nonce != 0 { - try visitor.visitSingularUInt64Field(value: self.nonce, fieldNumber: 2) - } - if self.gasLimit != 0 { - try visitor.visitSingularUInt64Field(value: self.gasLimit, fieldNumber: 3) - } - if !self.gasPrice.isEmpty { - try visitor.visitSingularStringField(value: self.gasPrice, fieldNumber: 4) - } - if self.chainID != 0 { - try visitor.visitSingularUInt32Field(value: self.chainID, fieldNumber: 5) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 6) - } - switch self.action { - case .transfer?: try { - guard case .transfer(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - }() - case .call?: try { - guard case .call(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - }() - case .stakeCreate?: try { - guard case .stakeCreate(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 40) - }() - case .stakeUnstake?: try { - guard case .stakeUnstake(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 41) - }() - case .stakeWithdraw?: try { - guard case .stakeWithdraw(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 42) - }() - case .stakeAddDeposit?: try { - guard case .stakeAddDeposit(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 43) - }() - case .stakeRestake?: try { - guard case .stakeRestake(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 44) - }() - case .stakeChangeCandidate?: try { - guard case .stakeChangeCandidate(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 45) - }() - case .stakeTransferOwnership?: try { - guard case .stakeTransferOwnership(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 46) - }() - case .candidateRegister?: try { - guard case .candidateRegister(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 47) - }() - case .candidateUpdate?: try { - guard case .candidateUpdate(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 48) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_SigningInput, rhs: TW_IoTeX_Proto_SigningInput) -> Bool { - if lhs.version != rhs.version {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.gasLimit != rhs.gasLimit {return false} - if lhs.gasPrice != rhs.gasPrice {return false} - if lhs.chainID != rhs.chainID {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.action != rhs.action {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "hash"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.hash) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if !self.hash.isEmpty { - try visitor.visitSingularBytesField(value: self.hash, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_SigningOutput, rhs: TW_IoTeX_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.hash != rhs.hash {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_ActionCore: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ActionCore" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "version"), - 2: .same(proto: "nonce"), - 3: .same(proto: "gasLimit"), - 4: .same(proto: "gasPrice"), - 5: .same(proto: "chainID"), - 10: .same(proto: "transfer"), - 12: .same(proto: "execution"), - 40: .same(proto: "stakeCreate"), - 41: .same(proto: "stakeUnstake"), - 42: .same(proto: "stakeWithdraw"), - 43: .same(proto: "stakeAddDeposit"), - 44: .same(proto: "stakeRestake"), - 45: .same(proto: "stakeChangeCandidate"), - 46: .same(proto: "stakeTransferOwnership"), - 47: .same(proto: "candidateRegister"), - 48: .same(proto: "candidateUpdate"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &self.version) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.nonce) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.gasLimit) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.gasPrice) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &self.chainID) }() - case 10: try { - var v: TW_IoTeX_Proto_Transfer? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .transfer(v) - } - }() - case 12: try { - var v: TW_IoTeX_Proto_ContractCall? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .execution(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .execution(v) - } - }() - case 40: try { - var v: TW_IoTeX_Proto_Staking.Create? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeCreate(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeCreate(v) - } - }() - case 41: try { - var v: TW_IoTeX_Proto_Staking.Reclaim? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeUnstake(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeUnstake(v) - } - }() - case 42: try { - var v: TW_IoTeX_Proto_Staking.Reclaim? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeWithdraw(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeWithdraw(v) - } - }() - case 43: try { - var v: TW_IoTeX_Proto_Staking.AddDeposit? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeAddDeposit(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeAddDeposit(v) - } - }() - case 44: try { - var v: TW_IoTeX_Proto_Staking.Restake? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeRestake(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeRestake(v) - } - }() - case 45: try { - var v: TW_IoTeX_Proto_Staking.ChangeCandidate? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeChangeCandidate(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeChangeCandidate(v) - } - }() - case 46: try { - var v: TW_IoTeX_Proto_Staking.TransferOwnership? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stakeTransferOwnership(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stakeTransferOwnership(v) - } - }() - case 47: try { - var v: TW_IoTeX_Proto_Staking.CandidateRegister? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .candidateRegister(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .candidateRegister(v) - } - }() - case 48: try { - var v: TW_IoTeX_Proto_Staking.CandidateBasicInfo? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .candidateUpdate(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .candidateUpdate(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.version != 0 { - try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 1) - } - if self.nonce != 0 { - try visitor.visitSingularUInt64Field(value: self.nonce, fieldNumber: 2) - } - if self.gasLimit != 0 { - try visitor.visitSingularUInt64Field(value: self.gasLimit, fieldNumber: 3) - } - if !self.gasPrice.isEmpty { - try visitor.visitSingularStringField(value: self.gasPrice, fieldNumber: 4) - } - if self.chainID != 0 { - try visitor.visitSingularUInt32Field(value: self.chainID, fieldNumber: 5) - } - switch self.action { - case .transfer?: try { - guard case .transfer(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - }() - case .execution?: try { - guard case .execution(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - }() - case .stakeCreate?: try { - guard case .stakeCreate(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 40) - }() - case .stakeUnstake?: try { - guard case .stakeUnstake(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 41) - }() - case .stakeWithdraw?: try { - guard case .stakeWithdraw(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 42) - }() - case .stakeAddDeposit?: try { - guard case .stakeAddDeposit(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 43) - }() - case .stakeRestake?: try { - guard case .stakeRestake(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 44) - }() - case .stakeChangeCandidate?: try { - guard case .stakeChangeCandidate(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 45) - }() - case .stakeTransferOwnership?: try { - guard case .stakeTransferOwnership(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 46) - }() - case .candidateRegister?: try { - guard case .candidateRegister(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 47) - }() - case .candidateUpdate?: try { - guard case .candidateUpdate(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 48) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_ActionCore, rhs: TW_IoTeX_Proto_ActionCore) -> Bool { - if lhs.version != rhs.version {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.gasLimit != rhs.gasLimit {return false} - if lhs.gasPrice != rhs.gasPrice {return false} - if lhs.chainID != rhs.chainID {return false} - if lhs.action != rhs.action {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_IoTeX_Proto_Action: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Action" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "core"), - 2: .same(proto: "senderPubKey"), - 3: .same(proto: "signature"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._core) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.senderPubKey) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._core { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.senderPubKey.isEmpty { - try visitor.visitSingularBytesField(value: self.senderPubKey, fieldNumber: 2) - } - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_IoTeX_Proto_Action, rhs: TW_IoTeX_Proto_Action) -> Bool { - if lhs._core != rhs._core {return false} - if lhs.senderPubKey != rhs.senderPubKey {return false} - if lhs.signature != rhs.signature {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/LiquidStaking+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/LiquidStaking+Proto.swift deleted file mode 100644 index 54127ef4..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/LiquidStaking+Proto.swift +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias LiquidStakingStatus = TW_LiquidStaking_Proto_Status -public typealias LiquidStakingAsset = TW_LiquidStaking_Proto_Asset -public typealias LiquidStakingStake = TW_LiquidStaking_Proto_Stake -public typealias LiquidStakingUnstake = TW_LiquidStaking_Proto_Unstake -public typealias LiquidStakingWithdraw = TW_LiquidStaking_Proto_Withdraw -public typealias LiquidStakingInput = TW_LiquidStaking_Proto_Input -public typealias LiquidStakingOutput = TW_LiquidStaking_Proto_Output -public typealias LiquidStakingCoin = TW_LiquidStaking_Proto_Coin -public typealias LiquidStakingBlockchain = TW_LiquidStaking_Proto_Blockchain -public typealias LiquidStakingProtocol = TW_LiquidStaking_Proto_Protocol -public typealias LiquidStakingStatusCode = TW_LiquidStaking_Proto_StatusCode diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/LiquidStaking.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/LiquidStaking.pb.swift deleted file mode 100644 index 3553caef..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/LiquidStaking.pb.swift +++ /dev/null @@ -1,993 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: LiquidStaking.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Enum for supported coins for liquid staking -public enum TW_LiquidStaking_Proto_Coin: SwiftProtobuf.Enum { - public typealias RawValue = Int - case matic // = 0 - case atom // = 1 - case bnb // = 2 - case apt // = 3 - case eth // = 4 - case UNRECOGNIZED(Int) - - public init() { - self = .matic - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .matic - case 1: self = .atom - case 2: self = .bnb - case 3: self = .apt - case 4: self = .eth - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .matic: return 0 - case .atom: return 1 - case .bnb: return 2 - case .apt: return 3 - case .eth: return 4 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_LiquidStaking_Proto_Coin: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_LiquidStaking_Proto_Coin] = [ - .matic, - .atom, - .bnb, - .apt, - .eth, - ] -} - -#endif // swift(>=4.2) - -/// Enum for supported target blockchains for liquid staking -public enum TW_LiquidStaking_Proto_Blockchain: SwiftProtobuf.Enum { - public typealias RawValue = Int - case ethereum // = 0 - case polygon // = 1 - case stride // = 2 - case bnbBsc // = 3 - case aptos // = 4 - case UNRECOGNIZED(Int) - - public init() { - self = .ethereum - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .ethereum - case 1: self = .polygon - case 2: self = .stride - case 3: self = .bnbBsc - case 4: self = .aptos - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .ethereum: return 0 - case .polygon: return 1 - case .stride: return 2 - case .bnbBsc: return 3 - case .aptos: return 4 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_LiquidStaking_Proto_Blockchain: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_LiquidStaking_Proto_Blockchain] = [ - .ethereum, - .polygon, - .stride, - .bnbBsc, - .aptos, - ] -} - -#endif // swift(>=4.2) - -/// Enum for supported liquid staking protocols -public enum TW_LiquidStaking_Proto_Protocol: SwiftProtobuf.Enum { - public typealias RawValue = Int - case strader // = 0 - case stride // = 1 - case tortuga // = 2 - case lido // = 3 - case UNRECOGNIZED(Int) - - public init() { - self = .strader - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .strader - case 1: self = .stride - case 2: self = .tortuga - case 3: self = .lido - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .strader: return 0 - case .stride: return 1 - case .tortuga: return 2 - case .lido: return 3 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_LiquidStaking_Proto_Protocol: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_LiquidStaking_Proto_Protocol] = [ - .strader, - .stride, - .tortuga, - .lido, - ] -} - -#endif // swift(>=4.2) - -/// Enum for status codes to indicate the result of an operation -public enum TW_LiquidStaking_Proto_StatusCode: SwiftProtobuf.Enum { - public typealias RawValue = Int - case ok // = 0 - case errorActionNotSet // = 1 - case errorTargetedBlockchainNotSupportedByProtocol // = 2 - case errorSmartContractAddressNotSet // = 3 - case errorInputProtoDeserialization // = 4 - case errorOperationNotSupportedByProtocol // = 5 - case UNRECOGNIZED(Int) - - public init() { - self = .ok - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .ok - case 1: self = .errorActionNotSet - case 2: self = .errorTargetedBlockchainNotSupportedByProtocol - case 3: self = .errorSmartContractAddressNotSet - case 4: self = .errorInputProtoDeserialization - case 5: self = .errorOperationNotSupportedByProtocol - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .ok: return 0 - case .errorActionNotSet: return 1 - case .errorTargetedBlockchainNotSupportedByProtocol: return 2 - case .errorSmartContractAddressNotSet: return 3 - case .errorInputProtoDeserialization: return 4 - case .errorOperationNotSupportedByProtocol: return 5 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_LiquidStaking_Proto_StatusCode: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_LiquidStaking_Proto_StatusCode] = [ - .ok, - .errorActionNotSet, - .errorTargetedBlockchainNotSupportedByProtocol, - .errorSmartContractAddressNotSet, - .errorInputProtoDeserialization, - .errorOperationNotSupportedByProtocol, - ] -} - -#endif // swift(>=4.2) - -/// Message to represent the status of an operation -public struct TW_LiquidStaking_Proto_Status { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Status code of the operation - public var code: TW_LiquidStaking_Proto_StatusCode = .ok - - /// Optional error message, populated in case of error - public var message: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message to represent the asset for staking operations -public struct TW_LiquidStaking_Proto_Asset { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Coin to be staked - public var stakingToken: TW_LiquidStaking_Proto_Coin = .matic - - /// Optional, liquid_token to be manipulated: unstake, claim rewards - public var liquidToken: String = String() - - /// Denom of the asset to be manipulated, required by some liquid staking protocols - public var denom: String = String() - - /// Address for building the appropriate input - public var fromAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Message to represent a stake operation -public struct TW_LiquidStaking_Proto_Stake { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var asset: TW_LiquidStaking_Proto_Asset { - get {return _asset ?? TW_LiquidStaking_Proto_Asset()} - set {_asset = newValue} - } - /// Returns true if `asset` has been explicitly set. - public var hasAsset: Bool {return self._asset != nil} - /// Clears the value of `asset`. Subsequent reads from it will return its default value. - public mutating func clearAsset() {self._asset = nil} - - public var amount: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _asset: TW_LiquidStaking_Proto_Asset? = nil -} - -/// Message to represent an unstake operation -public struct TW_LiquidStaking_Proto_Unstake { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var asset: TW_LiquidStaking_Proto_Asset { - get {return _asset ?? TW_LiquidStaking_Proto_Asset()} - set {_asset = newValue} - } - /// Returns true if `asset` has been explicitly set. - public var hasAsset: Bool {return self._asset != nil} - /// Clears the value of `asset`. Subsequent reads from it will return its default value. - public mutating func clearAsset() {self._asset = nil} - - public var amount: String = String() - - /// Some cross-chain protocols propose u to setup a receiver_address - public var receiverAddress: String = String() - - /// Some cross-chain protocols propose u to set the receiver chain_id, it allows auto-claim after probation period - public var receiverChainID: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _asset: TW_LiquidStaking_Proto_Asset? = nil -} - -/// Message to represent a withdraw operation -public struct TW_LiquidStaking_Proto_Withdraw { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var asset: TW_LiquidStaking_Proto_Asset { - get {return _asset ?? TW_LiquidStaking_Proto_Asset()} - set {_asset = newValue} - } - /// Returns true if `asset` has been explicitly set. - public var hasAsset: Bool {return self._asset != nil} - /// Clears the value of `asset`. Subsequent reads from it will return its default value. - public mutating func clearAsset() {self._asset = nil} - - public var amount: String = String() - - /// Sometimes withdraw is just the index of a request, amount is already known by the SC - public var idx: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _asset: TW_LiquidStaking_Proto_Asset? = nil -} - -/// Message to represent the input for a liquid staking operation -public struct TW_LiquidStaking_Proto_Input { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Oneof field to specify the action: stake, unstake or withdraw - public var action: TW_LiquidStaking_Proto_Input.OneOf_Action? = nil - - public var stake: TW_LiquidStaking_Proto_Stake { - get { - if case .stake(let v)? = action {return v} - return TW_LiquidStaking_Proto_Stake() - } - set {action = .stake(newValue)} - } - - public var unstake: TW_LiquidStaking_Proto_Unstake { - get { - if case .unstake(let v)? = action {return v} - return TW_LiquidStaking_Proto_Unstake() - } - set {action = .unstake(newValue)} - } - - public var withdraw: TW_LiquidStaking_Proto_Withdraw { - get { - if case .withdraw(let v)? = action {return v} - return TW_LiquidStaking_Proto_Withdraw() - } - set {action = .withdraw(newValue)} - } - - /// Optional smart contract address for EVM-based chains - public var smartContractAddress: String = String() - - /// Protocol to be used for liquid staking - public var `protocol`: TW_LiquidStaking_Proto_Protocol = .strader - - /// Target blockchain for the liquid staking operation - public var blockchain: TW_LiquidStaking_Proto_Blockchain = .ethereum - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Oneof field to specify the action: stake, unstake or withdraw - public enum OneOf_Action: Equatable { - case stake(TW_LiquidStaking_Proto_Stake) - case unstake(TW_LiquidStaking_Proto_Unstake) - case withdraw(TW_LiquidStaking_Proto_Withdraw) - - #if !swift(>=4.1) - public static func ==(lhs: TW_LiquidStaking_Proto_Input.OneOf_Action, rhs: TW_LiquidStaking_Proto_Input.OneOf_Action) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.stake, .stake): return { - guard case .stake(let l) = lhs, case .stake(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.unstake, .unstake): return { - guard case .unstake(let l) = lhs, case .unstake(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.withdraw, .withdraw): return { - guard case .withdraw(let l) = lhs, case .withdraw(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Message to represent the output of a liquid staking operation -public struct TW_LiquidStaking_Proto_Output { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Status of the liquid staking operation - public var status: TW_LiquidStaking_Proto_Status { - get {return _status ?? TW_LiquidStaking_Proto_Status()} - set {_status = newValue} - } - /// Returns true if `status` has been explicitly set. - public var hasStatus: Bool {return self._status != nil} - /// Clears the value of `status`. Subsequent reads from it will return its default value. - public mutating func clearStatus() {self._status = nil} - - /// Unsigned transaction input - needs to be completed and signed - public var signingInputOneof: TW_LiquidStaking_Proto_Output.OneOf_SigningInputOneof? = nil - - public var ethereum: TW_Ethereum_Proto_SigningInput { - get { - if case .ethereum(let v)? = signingInputOneof {return v} - return TW_Ethereum_Proto_SigningInput() - } - set {signingInputOneof = .ethereum(newValue)} - } - - public var cosmos: TW_Cosmos_Proto_SigningInput { - get { - if case .cosmos(let v)? = signingInputOneof {return v} - return TW_Cosmos_Proto_SigningInput() - } - set {signingInputOneof = .cosmos(newValue)} - } - - public var aptos: TW_Aptos_Proto_SigningInput { - get { - if case .aptos(let v)? = signingInputOneof {return v} - return TW_Aptos_Proto_SigningInput() - } - set {signingInputOneof = .aptos(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Unsigned transaction input - needs to be completed and signed - public enum OneOf_SigningInputOneof: Equatable { - case ethereum(TW_Ethereum_Proto_SigningInput) - case cosmos(TW_Cosmos_Proto_SigningInput) - case aptos(TW_Aptos_Proto_SigningInput) - - #if !swift(>=4.1) - public static func ==(lhs: TW_LiquidStaking_Proto_Output.OneOf_SigningInputOneof, rhs: TW_LiquidStaking_Proto_Output.OneOf_SigningInputOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.ethereum, .ethereum): return { - guard case .ethereum(let l) = lhs, case .ethereum(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.cosmos, .cosmos): return { - guard case .cosmos(let l) = lhs, case .cosmos(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.aptos, .aptos): return { - guard case .aptos(let l) = lhs, case .aptos(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} - - fileprivate var _status: TW_LiquidStaking_Proto_Status? = nil -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.LiquidStaking.Proto" - -extension TW_LiquidStaking_Proto_Coin: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "MATIC"), - 1: .same(proto: "ATOM"), - 2: .same(proto: "BNB"), - 3: .same(proto: "APT"), - 4: .same(proto: "ETH"), - ] -} - -extension TW_LiquidStaking_Proto_Blockchain: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "ETHEREUM"), - 1: .same(proto: "POLYGON"), - 2: .same(proto: "STRIDE"), - 3: .same(proto: "BNB_BSC"), - 4: .same(proto: "APTOS"), - ] -} - -extension TW_LiquidStaking_Proto_Protocol: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "Strader"), - 1: .same(proto: "Stride"), - 2: .same(proto: "Tortuga"), - 3: .same(proto: "Lido"), - ] -} - -extension TW_LiquidStaking_Proto_StatusCode: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "OK"), - 1: .same(proto: "ERROR_ACTION_NOT_SET"), - 2: .same(proto: "ERROR_TARGETED_BLOCKCHAIN_NOT_SUPPORTED_BY_PROTOCOL"), - 3: .same(proto: "ERROR_SMART_CONTRACT_ADDRESS_NOT_SET"), - 4: .same(proto: "ERROR_INPUT_PROTO_DESERIALIZATION"), - 5: .same(proto: "ERROR_OPERATION_NOT_SUPPORTED_BY_PROTOCOL"), - ] -} - -extension TW_LiquidStaking_Proto_Status: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Status" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "code"), - 2: .same(proto: "message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.code) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.message) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.code != .ok { - try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) - } - if !self.message.isEmpty { - try visitor.visitSingularStringField(value: self.message, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_LiquidStaking_Proto_Status, rhs: TW_LiquidStaking_Proto_Status) -> Bool { - if lhs.code != rhs.code {return false} - if lhs.message != rhs.message {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_LiquidStaking_Proto_Asset: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Asset" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "staking_token"), - 2: .standard(proto: "liquid_token"), - 3: .same(proto: "denom"), - 4: .standard(proto: "from_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.stakingToken) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.liquidToken) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.denom) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.fromAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.stakingToken != .matic { - try visitor.visitSingularEnumField(value: self.stakingToken, fieldNumber: 1) - } - if !self.liquidToken.isEmpty { - try visitor.visitSingularStringField(value: self.liquidToken, fieldNumber: 2) - } - if !self.denom.isEmpty { - try visitor.visitSingularStringField(value: self.denom, fieldNumber: 3) - } - if !self.fromAddress.isEmpty { - try visitor.visitSingularStringField(value: self.fromAddress, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_LiquidStaking_Proto_Asset, rhs: TW_LiquidStaking_Proto_Asset) -> Bool { - if lhs.stakingToken != rhs.stakingToken {return false} - if lhs.liquidToken != rhs.liquidToken {return false} - if lhs.denom != rhs.denom {return false} - if lhs.fromAddress != rhs.fromAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_LiquidStaking_Proto_Stake: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Stake" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "asset"), - 2: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._asset) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._asset { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_LiquidStaking_Proto_Stake, rhs: TW_LiquidStaking_Proto_Stake) -> Bool { - if lhs._asset != rhs._asset {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_LiquidStaking_Proto_Unstake: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Unstake" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "asset"), - 2: .same(proto: "amount"), - 3: .standard(proto: "receiver_address"), - 4: .standard(proto: "receiver_chain_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._asset) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.receiverAddress) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.receiverChainID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._asset { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 2) - } - if !self.receiverAddress.isEmpty { - try visitor.visitSingularStringField(value: self.receiverAddress, fieldNumber: 3) - } - if !self.receiverChainID.isEmpty { - try visitor.visitSingularStringField(value: self.receiverChainID, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_LiquidStaking_Proto_Unstake, rhs: TW_LiquidStaking_Proto_Unstake) -> Bool { - if lhs._asset != rhs._asset {return false} - if lhs.amount != rhs.amount {return false} - if lhs.receiverAddress != rhs.receiverAddress {return false} - if lhs.receiverChainID != rhs.receiverChainID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_LiquidStaking_Proto_Withdraw: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Withdraw" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "asset"), - 2: .same(proto: "amount"), - 3: .same(proto: "idx"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._asset) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.idx) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._asset { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 2) - } - if !self.idx.isEmpty { - try visitor.visitSingularStringField(value: self.idx, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_LiquidStaking_Proto_Withdraw, rhs: TW_LiquidStaking_Proto_Withdraw) -> Bool { - if lhs._asset != rhs._asset {return false} - if lhs.amount != rhs.amount {return false} - if lhs.idx != rhs.idx {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_LiquidStaking_Proto_Input: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Input" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "stake"), - 2: .same(proto: "unstake"), - 3: .same(proto: "withdraw"), - 4: .standard(proto: "smart_contract_address"), - 5: .same(proto: "protocol"), - 6: .same(proto: "blockchain"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_LiquidStaking_Proto_Stake? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .stake(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .stake(v) - } - }() - case 2: try { - var v: TW_LiquidStaking_Proto_Unstake? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .unstake(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .unstake(v) - } - }() - case 3: try { - var v: TW_LiquidStaking_Proto_Withdraw? - var hadOneofValue = false - if let current = self.action { - hadOneofValue = true - if case .withdraw(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.action = .withdraw(v) - } - }() - case 4: try { try decoder.decodeSingularStringField(value: &self.smartContractAddress) }() - case 5: try { try decoder.decodeSingularEnumField(value: &self.`protocol`) }() - case 6: try { try decoder.decodeSingularEnumField(value: &self.blockchain) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.action { - case .stake?: try { - guard case .stake(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .unstake?: try { - guard case .unstake(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .withdraw?: try { - guard case .withdraw(let v)? = self.action else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case nil: break - } - if !self.smartContractAddress.isEmpty { - try visitor.visitSingularStringField(value: self.smartContractAddress, fieldNumber: 4) - } - if self.`protocol` != .strader { - try visitor.visitSingularEnumField(value: self.`protocol`, fieldNumber: 5) - } - if self.blockchain != .ethereum { - try visitor.visitSingularEnumField(value: self.blockchain, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_LiquidStaking_Proto_Input, rhs: TW_LiquidStaking_Proto_Input) -> Bool { - if lhs.action != rhs.action {return false} - if lhs.smartContractAddress != rhs.smartContractAddress {return false} - if lhs.`protocol` != rhs.`protocol` {return false} - if lhs.blockchain != rhs.blockchain {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_LiquidStaking_Proto_Output: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Output" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "status"), - 2: .same(proto: "ethereum"), - 3: .same(proto: "cosmos"), - 4: .same(proto: "aptos"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._status) }() - case 2: try { - var v: TW_Ethereum_Proto_SigningInput? - var hadOneofValue = false - if let current = self.signingInputOneof { - hadOneofValue = true - if case .ethereum(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.signingInputOneof = .ethereum(v) - } - }() - case 3: try { - var v: TW_Cosmos_Proto_SigningInput? - var hadOneofValue = false - if let current = self.signingInputOneof { - hadOneofValue = true - if case .cosmos(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.signingInputOneof = .cosmos(v) - } - }() - case 4: try { - var v: TW_Aptos_Proto_SigningInput? - var hadOneofValue = false - if let current = self.signingInputOneof { - hadOneofValue = true - if case .aptos(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.signingInputOneof = .aptos(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._status { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - switch self.signingInputOneof { - case .ethereum?: try { - guard case .ethereum(let v)? = self.signingInputOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .cosmos?: try { - guard case .cosmos(let v)? = self.signingInputOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .aptos?: try { - guard case .aptos(let v)? = self.signingInputOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_LiquidStaking_Proto_Output, rhs: TW_LiquidStaking_Proto_Output) -> Bool { - if lhs._status != rhs._status {return false} - if lhs.signingInputOneof != rhs.signingInputOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/MultiversX+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/MultiversX+Proto.swift deleted file mode 100644 index 48a1607a..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/MultiversX+Proto.swift +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias MultiversXGenericAction = TW_MultiversX_Proto_GenericAction -public typealias MultiversXEGLDTransfer = TW_MultiversX_Proto_EGLDTransfer -public typealias MultiversXESDTTransfer = TW_MultiversX_Proto_ESDTTransfer -public typealias MultiversXESDTNFTTransfer = TW_MultiversX_Proto_ESDTNFTTransfer -public typealias MultiversXAccounts = TW_MultiversX_Proto_Accounts -public typealias MultiversXSigningInput = TW_MultiversX_Proto_SigningInput -public typealias MultiversXSigningOutput = TW_MultiversX_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/MultiversX.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/MultiversX.pb.swift deleted file mode 100644 index 96e44300..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/MultiversX.pb.swift +++ /dev/null @@ -1,777 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: MultiversX.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Generic action. Using one of the more specific actions (e.g. transfers, see below) is recommended. -public struct TW_MultiversX_Proto_GenericAction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Accounts involved - public var accounts: TW_MultiversX_Proto_Accounts { - get {return _accounts ?? TW_MultiversX_Proto_Accounts()} - set {_accounts = newValue} - } - /// Returns true if `accounts` has been explicitly set. - public var hasAccounts: Bool {return self._accounts != nil} - /// Clears the value of `accounts`. Subsequent reads from it will return its default value. - public mutating func clearAccounts() {self._accounts = nil} - - /// amount - public var value: String = String() - - /// additional data - public var data: String = String() - - /// transaction version - public var version: UInt32 = 0 - - /// Generally speaking, the "options" field can be ignored (not set) by applications using TW Core. - public var options: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _accounts: TW_MultiversX_Proto_Accounts? = nil -} - -/// EGLD transfer (move balance). -public struct TW_MultiversX_Proto_EGLDTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Accounts involved - public var accounts: TW_MultiversX_Proto_Accounts { - get {return _accounts ?? TW_MultiversX_Proto_Accounts()} - set {_accounts = newValue} - } - /// Returns true if `accounts` has been explicitly set. - public var hasAccounts: Bool {return self._accounts != nil} - /// Clears the value of `accounts`. Subsequent reads from it will return its default value. - public mutating func clearAccounts() {self._accounts = nil} - - /// Transfer amount (string) - public var amount: String = String() - - public var data: String = String() - - /// transaction version, if empty, the default value will be used - public var version: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _accounts: TW_MultiversX_Proto_Accounts? = nil -} - -/// ESDT transfer (transfer regular ESDTs - fungible tokens). -public struct TW_MultiversX_Proto_ESDTTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Accounts involved - public var accounts: TW_MultiversX_Proto_Accounts { - get {return _accounts ?? TW_MultiversX_Proto_Accounts()} - set {_accounts = newValue} - } - /// Returns true if `accounts` has been explicitly set. - public var hasAccounts: Bool {return self._accounts != nil} - /// Clears the value of `accounts`. Subsequent reads from it will return its default value. - public mutating func clearAccounts() {self._accounts = nil} - - /// Token ID - public var tokenIdentifier: String = String() - - /// Transfer token amount (string) - public var amount: String = String() - - /// transaction version, if empty, the default value will be used - public var version: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _accounts: TW_MultiversX_Proto_Accounts? = nil -} - -/// ESDTNFT transfer (transfer NFTs, SFTs and Meta ESDTs). -public struct TW_MultiversX_Proto_ESDTNFTTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Accounts involved - public var accounts: TW_MultiversX_Proto_Accounts { - get {return _accounts ?? TW_MultiversX_Proto_Accounts()} - set {_accounts = newValue} - } - /// Returns true if `accounts` has been explicitly set. - public var hasAccounts: Bool {return self._accounts != nil} - /// Clears the value of `accounts`. Subsequent reads from it will return its default value. - public mutating func clearAccounts() {self._accounts = nil} - - /// tokens - public var tokenCollection: String = String() - - /// nonce of the token - public var tokenNonce: UInt64 = 0 - - /// transfer amount - public var amount: String = String() - - /// transaction version, if empty, the default value will be used - public var version: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _accounts: TW_MultiversX_Proto_Accounts? = nil -} - -/// Transaction sender & receiver etc. -public struct TW_MultiversX_Proto_Accounts { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Nonce of the sender - public var senderNonce: UInt64 = 0 - - /// Sender address - public var sender: String = String() - - /// Sender username - public var senderUsername: String = String() - - /// Receiver address - public var receiver: String = String() - - /// Receiver username - public var receiverUsername: String = String() - - /// Guardian address - public var guardian: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_MultiversX_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Chain identifier, string - public var chainID: String = String() - - /// Gas price - public var gasPrice: UInt64 = 0 - - /// Limit for the gas used - public var gasLimit: UInt64 = 0 - - /// transfer payload - public var messageOneof: TW_MultiversX_Proto_SigningInput.OneOf_MessageOneof? = nil - - public var genericAction: TW_MultiversX_Proto_GenericAction { - get { - if case .genericAction(let v)? = messageOneof {return v} - return TW_MultiversX_Proto_GenericAction() - } - set {messageOneof = .genericAction(newValue)} - } - - public var egldTransfer: TW_MultiversX_Proto_EGLDTransfer { - get { - if case .egldTransfer(let v)? = messageOneof {return v} - return TW_MultiversX_Proto_EGLDTransfer() - } - set {messageOneof = .egldTransfer(newValue)} - } - - public var esdtTransfer: TW_MultiversX_Proto_ESDTTransfer { - get { - if case .esdtTransfer(let v)? = messageOneof {return v} - return TW_MultiversX_Proto_ESDTTransfer() - } - set {messageOneof = .esdtTransfer(newValue)} - } - - public var esdtnftTransfer: TW_MultiversX_Proto_ESDTNFTTransfer { - get { - if case .esdtnftTransfer(let v)? = messageOneof {return v} - return TW_MultiversX_Proto_ESDTNFTTransfer() - } - set {messageOneof = .esdtnftTransfer(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// transfer payload - public enum OneOf_MessageOneof: Equatable { - case genericAction(TW_MultiversX_Proto_GenericAction) - case egldTransfer(TW_MultiversX_Proto_EGLDTransfer) - case esdtTransfer(TW_MultiversX_Proto_ESDTTransfer) - case esdtnftTransfer(TW_MultiversX_Proto_ESDTNFTTransfer) - - #if !swift(>=4.1) - public static func ==(lhs: TW_MultiversX_Proto_SigningInput.OneOf_MessageOneof, rhs: TW_MultiversX_Proto_SigningInput.OneOf_MessageOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.genericAction, .genericAction): return { - guard case .genericAction(let l) = lhs, case .genericAction(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.egldTransfer, .egldTransfer): return { - guard case .egldTransfer(let l) = lhs, case .egldTransfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.esdtTransfer, .esdtTransfer): return { - guard case .esdtTransfer(let l) = lhs, case .esdtTransfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.esdtnftTransfer, .esdtnftTransfer): return { - guard case .esdtnftTransfer(let l) = lhs, case .esdtnftTransfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_MultiversX_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var encoded: String = String() - - public var signature: String = String() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.MultiversX.Proto" - -extension TW_MultiversX_Proto_GenericAction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".GenericAction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "accounts"), - 2: .same(proto: "value"), - 3: .same(proto: "data"), - 4: .same(proto: "version"), - 5: .same(proto: "options"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._accounts) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.value) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.data) }() - case 4: try { try decoder.decodeSingularUInt32Field(value: &self.version) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &self.options) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._accounts { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.value.isEmpty { - try visitor.visitSingularStringField(value: self.value, fieldNumber: 2) - } - if !self.data.isEmpty { - try visitor.visitSingularStringField(value: self.data, fieldNumber: 3) - } - if self.version != 0 { - try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 4) - } - if self.options != 0 { - try visitor.visitSingularUInt32Field(value: self.options, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_MultiversX_Proto_GenericAction, rhs: TW_MultiversX_Proto_GenericAction) -> Bool { - if lhs._accounts != rhs._accounts {return false} - if lhs.value != rhs.value {return false} - if lhs.data != rhs.data {return false} - if lhs.version != rhs.version {return false} - if lhs.options != rhs.options {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_MultiversX_Proto_EGLDTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".EGLDTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "accounts"), - 2: .same(proto: "amount"), - 3: .same(proto: "data"), - 4: .same(proto: "version"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._accounts) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.data) }() - case 4: try { try decoder.decodeSingularUInt32Field(value: &self.version) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._accounts { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 2) - } - if !self.data.isEmpty { - try visitor.visitSingularStringField(value: self.data, fieldNumber: 3) - } - if self.version != 0 { - try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_MultiversX_Proto_EGLDTransfer, rhs: TW_MultiversX_Proto_EGLDTransfer) -> Bool { - if lhs._accounts != rhs._accounts {return false} - if lhs.amount != rhs.amount {return false} - if lhs.data != rhs.data {return false} - if lhs.version != rhs.version {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_MultiversX_Proto_ESDTTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ESDTTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "accounts"), - 2: .standard(proto: "token_identifier"), - 3: .same(proto: "amount"), - 4: .same(proto: "version"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._accounts) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.tokenIdentifier) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 4: try { try decoder.decodeSingularUInt32Field(value: &self.version) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._accounts { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.tokenIdentifier.isEmpty { - try visitor.visitSingularStringField(value: self.tokenIdentifier, fieldNumber: 2) - } - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 3) - } - if self.version != 0 { - try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_MultiversX_Proto_ESDTTransfer, rhs: TW_MultiversX_Proto_ESDTTransfer) -> Bool { - if lhs._accounts != rhs._accounts {return false} - if lhs.tokenIdentifier != rhs.tokenIdentifier {return false} - if lhs.amount != rhs.amount {return false} - if lhs.version != rhs.version {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_MultiversX_Proto_ESDTNFTTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ESDTNFTTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "accounts"), - 2: .standard(proto: "token_collection"), - 3: .standard(proto: "token_nonce"), - 4: .same(proto: "amount"), - 5: .same(proto: "version"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._accounts) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.tokenCollection) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.tokenNonce) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &self.version) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._accounts { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.tokenCollection.isEmpty { - try visitor.visitSingularStringField(value: self.tokenCollection, fieldNumber: 2) - } - if self.tokenNonce != 0 { - try visitor.visitSingularUInt64Field(value: self.tokenNonce, fieldNumber: 3) - } - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 4) - } - if self.version != 0 { - try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_MultiversX_Proto_ESDTNFTTransfer, rhs: TW_MultiversX_Proto_ESDTNFTTransfer) -> Bool { - if lhs._accounts != rhs._accounts {return false} - if lhs.tokenCollection != rhs.tokenCollection {return false} - if lhs.tokenNonce != rhs.tokenNonce {return false} - if lhs.amount != rhs.amount {return false} - if lhs.version != rhs.version {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_MultiversX_Proto_Accounts: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Accounts" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "sender_nonce"), - 2: .same(proto: "sender"), - 3: .standard(proto: "sender_username"), - 4: .same(proto: "receiver"), - 5: .standard(proto: "receiver_username"), - 6: .same(proto: "guardian"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.senderNonce) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.sender) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.senderUsername) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.receiver) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.receiverUsername) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.guardian) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.senderNonce != 0 { - try visitor.visitSingularUInt64Field(value: self.senderNonce, fieldNumber: 1) - } - if !self.sender.isEmpty { - try visitor.visitSingularStringField(value: self.sender, fieldNumber: 2) - } - if !self.senderUsername.isEmpty { - try visitor.visitSingularStringField(value: self.senderUsername, fieldNumber: 3) - } - if !self.receiver.isEmpty { - try visitor.visitSingularStringField(value: self.receiver, fieldNumber: 4) - } - if !self.receiverUsername.isEmpty { - try visitor.visitSingularStringField(value: self.receiverUsername, fieldNumber: 5) - } - if !self.guardian.isEmpty { - try visitor.visitSingularStringField(value: self.guardian, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_MultiversX_Proto_Accounts, rhs: TW_MultiversX_Proto_Accounts) -> Bool { - if lhs.senderNonce != rhs.senderNonce {return false} - if lhs.sender != rhs.sender {return false} - if lhs.senderUsername != rhs.senderUsername {return false} - if lhs.receiver != rhs.receiver {return false} - if lhs.receiverUsername != rhs.receiverUsername {return false} - if lhs.guardian != rhs.guardian {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_MultiversX_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "private_key"), - 2: .standard(proto: "chain_id"), - 3: .standard(proto: "gas_price"), - 4: .standard(proto: "gas_limit"), - 5: .standard(proto: "generic_action"), - 6: .standard(proto: "egld_transfer"), - 7: .standard(proto: "esdt_transfer"), - 8: .standard(proto: "esdtnft_transfer"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.chainID) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.gasPrice) }() - case 4: try { try decoder.decodeSingularUInt64Field(value: &self.gasLimit) }() - case 5: try { - var v: TW_MultiversX_Proto_GenericAction? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .genericAction(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .genericAction(v) - } - }() - case 6: try { - var v: TW_MultiversX_Proto_EGLDTransfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .egldTransfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .egldTransfer(v) - } - }() - case 7: try { - var v: TW_MultiversX_Proto_ESDTTransfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .esdtTransfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .esdtTransfer(v) - } - }() - case 8: try { - var v: TW_MultiversX_Proto_ESDTNFTTransfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .esdtnftTransfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .esdtnftTransfer(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 1) - } - if !self.chainID.isEmpty { - try visitor.visitSingularStringField(value: self.chainID, fieldNumber: 2) - } - if self.gasPrice != 0 { - try visitor.visitSingularUInt64Field(value: self.gasPrice, fieldNumber: 3) - } - if self.gasLimit != 0 { - try visitor.visitSingularUInt64Field(value: self.gasLimit, fieldNumber: 4) - } - switch self.messageOneof { - case .genericAction?: try { - guard case .genericAction(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - }() - case .egldTransfer?: try { - guard case .egldTransfer(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - }() - case .esdtTransfer?: try { - guard case .esdtTransfer(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - }() - case .esdtnftTransfer?: try { - guard case .esdtnftTransfer(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_MultiversX_Proto_SigningInput, rhs: TW_MultiversX_Proto_SigningInput) -> Bool { - if lhs.privateKey != rhs.privateKey {return false} - if lhs.chainID != rhs.chainID {return false} - if lhs.gasPrice != rhs.gasPrice {return false} - if lhs.gasLimit != rhs.gasLimit {return false} - if lhs.messageOneof != rhs.messageOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_MultiversX_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "signature"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.signature) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularStringField(value: self.encoded, fieldNumber: 1) - } - if !self.signature.isEmpty { - try visitor.visitSingularStringField(value: self.signature, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_MultiversX_Proto_SigningOutput, rhs: TW_MultiversX_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.signature != rhs.signature {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/NEAR+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/NEAR+Proto.swift deleted file mode 100644 index cab277a3..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/NEAR+Proto.swift +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias NEARPublicKey = TW_NEAR_Proto_PublicKey -public typealias NEARFunctionCallPermission = TW_NEAR_Proto_FunctionCallPermission -public typealias NEARFullAccessPermission = TW_NEAR_Proto_FullAccessPermission -public typealias NEARAccessKey = TW_NEAR_Proto_AccessKey -public typealias NEARCreateAccount = TW_NEAR_Proto_CreateAccount -public typealias NEARDeployContract = TW_NEAR_Proto_DeployContract -public typealias NEARFunctionCall = TW_NEAR_Proto_FunctionCall -public typealias NEARTransfer = TW_NEAR_Proto_Transfer -public typealias NEARStake = TW_NEAR_Proto_Stake -public typealias NEARAddKey = TW_NEAR_Proto_AddKey -public typealias NEARDeleteKey = TW_NEAR_Proto_DeleteKey -public typealias NEARDeleteAccount = TW_NEAR_Proto_DeleteAccount -public typealias NEARTokenTransfer = TW_NEAR_Proto_TokenTransfer -public typealias NEARAction = TW_NEAR_Proto_Action -public typealias NEARSigningInput = TW_NEAR_Proto_SigningInput -public typealias NEARSigningOutput = TW_NEAR_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/NEAR.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/NEAR.pb.swift deleted file mode 100644 index 74eb2a6c..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/NEAR.pb.swift +++ /dev/null @@ -1,1333 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: NEAR.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Public key with type -public struct TW_NEAR_Proto_PublicKey { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Key type - public var keyType: UInt32 = 0 - - /// The public key data - public var data: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Permissions for a function call -public struct TW_NEAR_Proto_FunctionCallPermission { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// uint128 / big endian byte order - public var allowance: Data = Data() - - public var receiverID: String = String() - - public var methodNames: [String] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Full access -public struct TW_NEAR_Proto_FullAccessPermission { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Access key: nonce + permission -public struct TW_NEAR_Proto_AccessKey { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Nonce - public var nonce: UInt64 = 0 - - /// Permission - public var permission: TW_NEAR_Proto_AccessKey.OneOf_Permission? = nil - - public var functionCall: TW_NEAR_Proto_FunctionCallPermission { - get { - if case .functionCall(let v)? = permission {return v} - return TW_NEAR_Proto_FunctionCallPermission() - } - set {permission = .functionCall(newValue)} - } - - public var fullAccess: TW_NEAR_Proto_FullAccessPermission { - get { - if case .fullAccess(let v)? = permission {return v} - return TW_NEAR_Proto_FullAccessPermission() - } - set {permission = .fullAccess(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Permission - public enum OneOf_Permission: Equatable { - case functionCall(TW_NEAR_Proto_FunctionCallPermission) - case fullAccess(TW_NEAR_Proto_FullAccessPermission) - - #if !swift(>=4.1) - public static func ==(lhs: TW_NEAR_Proto_AccessKey.OneOf_Permission, rhs: TW_NEAR_Proto_AccessKey.OneOf_Permission) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.functionCall, .functionCall): return { - guard case .functionCall(let l) = lhs, case .functionCall(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.fullAccess, .fullAccess): return { - guard case .fullAccess(let l) = lhs, case .fullAccess(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Create Account -public struct TW_NEAR_Proto_CreateAccount { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Deploying a contract -public struct TW_NEAR_Proto_DeployContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var code: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A method/function call -public struct TW_NEAR_Proto_FunctionCall { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Method/function name - public var methodName: String = String() - - /// input arguments - public var args: Data = Data() - - /// gas - public var gas: UInt64 = 0 - - /// uint128 / big endian byte order - public var deposit: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Transfer -public struct TW_NEAR_Proto_Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// amount; uint128 / big endian byte order - public var deposit: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Stake -public struct TW_NEAR_Proto_Stake { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// amount; uint128 / big endian byte order - public var stake: Data = Data() - - /// owner public key - public var publicKey: TW_NEAR_Proto_PublicKey { - get {return _publicKey ?? TW_NEAR_Proto_PublicKey()} - set {_publicKey = newValue} - } - /// Returns true if `publicKey` has been explicitly set. - public var hasPublicKey: Bool {return self._publicKey != nil} - /// Clears the value of `publicKey`. Subsequent reads from it will return its default value. - public mutating func clearPublicKey() {self._publicKey = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _publicKey: TW_NEAR_Proto_PublicKey? = nil -} - -/// Add a key -public struct TW_NEAR_Proto_AddKey { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var publicKey: TW_NEAR_Proto_PublicKey { - get {return _publicKey ?? TW_NEAR_Proto_PublicKey()} - set {_publicKey = newValue} - } - /// Returns true if `publicKey` has been explicitly set. - public var hasPublicKey: Bool {return self._publicKey != nil} - /// Clears the value of `publicKey`. Subsequent reads from it will return its default value. - public mutating func clearPublicKey() {self._publicKey = nil} - - public var accessKey: TW_NEAR_Proto_AccessKey { - get {return _accessKey ?? TW_NEAR_Proto_AccessKey()} - set {_accessKey = newValue} - } - /// Returns true if `accessKey` has been explicitly set. - public var hasAccessKey: Bool {return self._accessKey != nil} - /// Clears the value of `accessKey`. Subsequent reads from it will return its default value. - public mutating func clearAccessKey() {self._accessKey = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _publicKey: TW_NEAR_Proto_PublicKey? = nil - fileprivate var _accessKey: TW_NEAR_Proto_AccessKey? = nil -} - -/// Delete a key -public struct TW_NEAR_Proto_DeleteKey { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var publicKey: TW_NEAR_Proto_PublicKey { - get {return _publicKey ?? TW_NEAR_Proto_PublicKey()} - set {_publicKey = newValue} - } - /// Returns true if `publicKey` has been explicitly set. - public var hasPublicKey: Bool {return self._publicKey != nil} - /// Clears the value of `publicKey`. Subsequent reads from it will return its default value. - public mutating func clearPublicKey() {self._publicKey = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _publicKey: TW_NEAR_Proto_PublicKey? = nil -} - -/// Delete account -public struct TW_NEAR_Proto_DeleteAccount { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var beneficiaryID: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Fungible token transfer -public struct TW_NEAR_Proto_TokenTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Token amount. Base-10 decimal string. - public var tokenAmount: String = String() - - /// ID of the receiver. - public var receiverID: String = String() - - /// Gas. - public var gas: UInt64 = 0 - - /// NEAR deposit amount; uint128 / big endian byte order. - public var deposit: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Represents an action -public struct TW_NEAR_Proto_Action { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var payload: TW_NEAR_Proto_Action.OneOf_Payload? = nil - - public var createAccount: TW_NEAR_Proto_CreateAccount { - get { - if case .createAccount(let v)? = payload {return v} - return TW_NEAR_Proto_CreateAccount() - } - set {payload = .createAccount(newValue)} - } - - public var deployContract: TW_NEAR_Proto_DeployContract { - get { - if case .deployContract(let v)? = payload {return v} - return TW_NEAR_Proto_DeployContract() - } - set {payload = .deployContract(newValue)} - } - - public var functionCall: TW_NEAR_Proto_FunctionCall { - get { - if case .functionCall(let v)? = payload {return v} - return TW_NEAR_Proto_FunctionCall() - } - set {payload = .functionCall(newValue)} - } - - public var transfer: TW_NEAR_Proto_Transfer { - get { - if case .transfer(let v)? = payload {return v} - return TW_NEAR_Proto_Transfer() - } - set {payload = .transfer(newValue)} - } - - public var stake: TW_NEAR_Proto_Stake { - get { - if case .stake(let v)? = payload {return v} - return TW_NEAR_Proto_Stake() - } - set {payload = .stake(newValue)} - } - - public var addKey: TW_NEAR_Proto_AddKey { - get { - if case .addKey(let v)? = payload {return v} - return TW_NEAR_Proto_AddKey() - } - set {payload = .addKey(newValue)} - } - - public var deleteKey: TW_NEAR_Proto_DeleteKey { - get { - if case .deleteKey(let v)? = payload {return v} - return TW_NEAR_Proto_DeleteKey() - } - set {payload = .deleteKey(newValue)} - } - - public var deleteAccount: TW_NEAR_Proto_DeleteAccount { - get { - if case .deleteAccount(let v)? = payload {return v} - return TW_NEAR_Proto_DeleteAccount() - } - set {payload = .deleteAccount(newValue)} - } - - /// Gap in field numbering is intentional as it's not a standard NEAR action. - public var tokenTransfer: TW_NEAR_Proto_TokenTransfer { - get { - if case .tokenTransfer(let v)? = payload {return v} - return TW_NEAR_Proto_TokenTransfer() - } - set {payload = .tokenTransfer(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_Payload: Equatable { - case createAccount(TW_NEAR_Proto_CreateAccount) - case deployContract(TW_NEAR_Proto_DeployContract) - case functionCall(TW_NEAR_Proto_FunctionCall) - case transfer(TW_NEAR_Proto_Transfer) - case stake(TW_NEAR_Proto_Stake) - case addKey(TW_NEAR_Proto_AddKey) - case deleteKey(TW_NEAR_Proto_DeleteKey) - case deleteAccount(TW_NEAR_Proto_DeleteAccount) - /// Gap in field numbering is intentional as it's not a standard NEAR action. - case tokenTransfer(TW_NEAR_Proto_TokenTransfer) - - #if !swift(>=4.1) - public static func ==(lhs: TW_NEAR_Proto_Action.OneOf_Payload, rhs: TW_NEAR_Proto_Action.OneOf_Payload) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.createAccount, .createAccount): return { - guard case .createAccount(let l) = lhs, case .createAccount(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.deployContract, .deployContract): return { - guard case .deployContract(let l) = lhs, case .deployContract(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.functionCall, .functionCall): return { - guard case .functionCall(let l) = lhs, case .functionCall(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.transfer, .transfer): return { - guard case .transfer(let l) = lhs, case .transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stake, .stake): return { - guard case .stake(let l) = lhs, case .stake(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.addKey, .addKey): return { - guard case .addKey(let l) = lhs, case .addKey(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.deleteKey, .deleteKey): return { - guard case .deleteKey(let l) = lhs, case .deleteKey(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.deleteAccount, .deleteAccount): return { - guard case .deleteAccount(let l) = lhs, case .deleteAccount(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.tokenTransfer, .tokenTransfer): return { - guard case .tokenTransfer(let l) = lhs, case .tokenTransfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Input data necessary to create a signed order. -public struct TW_NEAR_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// ID of the sender - public var signerID: String = String() - - /// Nonce (should be larger than in the last transaction of the account) - public var nonce: UInt64 = 0 - - /// ID of the receiver - public var receiverID: String = String() - - /// Recent block hash - public var blockHash: Data = Data() - - /// Payload action(s) - public var actions: [TW_NEAR_Proto_Action] = [] - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// The public key used for compiling a transaction with a signature. - public var publicKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_NEAR_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed transaction blob - public var signedTransaction: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - /// Hash of the transaction - public var hash: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.NEAR.Proto" - -extension TW_NEAR_Proto_PublicKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".PublicKey" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "key_type"), - 2: .same(proto: "data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &self.keyType) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.data) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.keyType != 0 { - try visitor.visitSingularUInt32Field(value: self.keyType, fieldNumber: 1) - } - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_PublicKey, rhs: TW_NEAR_Proto_PublicKey) -> Bool { - if lhs.keyType != rhs.keyType {return false} - if lhs.data != rhs.data {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_FunctionCallPermission: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FunctionCallPermission" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "allowance"), - 2: .standard(proto: "receiver_id"), - 3: .standard(proto: "method_names"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.allowance) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.receiverID) }() - case 3: try { try decoder.decodeRepeatedStringField(value: &self.methodNames) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.allowance.isEmpty { - try visitor.visitSingularBytesField(value: self.allowance, fieldNumber: 1) - } - if !self.receiverID.isEmpty { - try visitor.visitSingularStringField(value: self.receiverID, fieldNumber: 2) - } - if !self.methodNames.isEmpty { - try visitor.visitRepeatedStringField(value: self.methodNames, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_FunctionCallPermission, rhs: TW_NEAR_Proto_FunctionCallPermission) -> Bool { - if lhs.allowance != rhs.allowance {return false} - if lhs.receiverID != rhs.receiverID {return false} - if lhs.methodNames != rhs.methodNames {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_FullAccessPermission: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FullAccessPermission" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - public mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - public func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_FullAccessPermission, rhs: TW_NEAR_Proto_FullAccessPermission) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_AccessKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".AccessKey" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "nonce"), - 2: .standard(proto: "function_call"), - 3: .standard(proto: "full_access"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.nonce) }() - case 2: try { - var v: TW_NEAR_Proto_FunctionCallPermission? - var hadOneofValue = false - if let current = self.permission { - hadOneofValue = true - if case .functionCall(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.permission = .functionCall(v) - } - }() - case 3: try { - var v: TW_NEAR_Proto_FullAccessPermission? - var hadOneofValue = false - if let current = self.permission { - hadOneofValue = true - if case .fullAccess(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.permission = .fullAccess(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.nonce != 0 { - try visitor.visitSingularUInt64Field(value: self.nonce, fieldNumber: 1) - } - switch self.permission { - case .functionCall?: try { - guard case .functionCall(let v)? = self.permission else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .fullAccess?: try { - guard case .fullAccess(let v)? = self.permission else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_AccessKey, rhs: TW_NEAR_Proto_AccessKey) -> Bool { - if lhs.nonce != rhs.nonce {return false} - if lhs.permission != rhs.permission {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_CreateAccount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CreateAccount" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - public mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - public func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_CreateAccount, rhs: TW_NEAR_Proto_CreateAccount) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_DeployContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DeployContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "code"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.code) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.code.isEmpty { - try visitor.visitSingularBytesField(value: self.code, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_DeployContract, rhs: TW_NEAR_Proto_DeployContract) -> Bool { - if lhs.code != rhs.code {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_FunctionCall: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FunctionCall" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "method_name"), - 2: .same(proto: "args"), - 3: .same(proto: "gas"), - 4: .same(proto: "deposit"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.methodName) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.args) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.gas) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.deposit) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.methodName.isEmpty { - try visitor.visitSingularStringField(value: self.methodName, fieldNumber: 1) - } - if !self.args.isEmpty { - try visitor.visitSingularBytesField(value: self.args, fieldNumber: 2) - } - if self.gas != 0 { - try visitor.visitSingularUInt64Field(value: self.gas, fieldNumber: 3) - } - if !self.deposit.isEmpty { - try visitor.visitSingularBytesField(value: self.deposit, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_FunctionCall, rhs: TW_NEAR_Proto_FunctionCall) -> Bool { - if lhs.methodName != rhs.methodName {return false} - if lhs.args != rhs.args {return false} - if lhs.gas != rhs.gas {return false} - if lhs.deposit != rhs.deposit {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "deposit"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.deposit) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.deposit.isEmpty { - try visitor.visitSingularBytesField(value: self.deposit, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_Transfer, rhs: TW_NEAR_Proto_Transfer) -> Bool { - if lhs.deposit != rhs.deposit {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_Stake: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Stake" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "stake"), - 2: .standard(proto: "public_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.stake) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._publicKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.stake.isEmpty { - try visitor.visitSingularBytesField(value: self.stake, fieldNumber: 1) - } - try { if let v = self._publicKey { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_Stake, rhs: TW_NEAR_Proto_Stake) -> Bool { - if lhs.stake != rhs.stake {return false} - if lhs._publicKey != rhs._publicKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_AddKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".AddKey" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "public_key"), - 2: .standard(proto: "access_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._publicKey) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._accessKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._publicKey { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - try { if let v = self._accessKey { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_AddKey, rhs: TW_NEAR_Proto_AddKey) -> Bool { - if lhs._publicKey != rhs._publicKey {return false} - if lhs._accessKey != rhs._accessKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_DeleteKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DeleteKey" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "public_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._publicKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._publicKey { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_DeleteKey, rhs: TW_NEAR_Proto_DeleteKey) -> Bool { - if lhs._publicKey != rhs._publicKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_DeleteAccount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DeleteAccount" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "beneficiary_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.beneficiaryID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.beneficiaryID.isEmpty { - try visitor.visitSingularStringField(value: self.beneficiaryID, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_DeleteAccount, rhs: TW_NEAR_Proto_DeleteAccount) -> Bool { - if lhs.beneficiaryID != rhs.beneficiaryID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_TokenTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TokenTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "token_amount"), - 2: .standard(proto: "receiver_id"), - 3: .same(proto: "gas"), - 4: .same(proto: "deposit"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.tokenAmount) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.receiverID) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.gas) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.deposit) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.tokenAmount.isEmpty { - try visitor.visitSingularStringField(value: self.tokenAmount, fieldNumber: 1) - } - if !self.receiverID.isEmpty { - try visitor.visitSingularStringField(value: self.receiverID, fieldNumber: 2) - } - if self.gas != 0 { - try visitor.visitSingularUInt64Field(value: self.gas, fieldNumber: 3) - } - if !self.deposit.isEmpty { - try visitor.visitSingularBytesField(value: self.deposit, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_TokenTransfer, rhs: TW_NEAR_Proto_TokenTransfer) -> Bool { - if lhs.tokenAmount != rhs.tokenAmount {return false} - if lhs.receiverID != rhs.receiverID {return false} - if lhs.gas != rhs.gas {return false} - if lhs.deposit != rhs.deposit {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_Action: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Action" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "create_account"), - 2: .standard(proto: "deploy_contract"), - 3: .standard(proto: "function_call"), - 4: .same(proto: "transfer"), - 5: .same(proto: "stake"), - 6: .standard(proto: "add_key"), - 7: .standard(proto: "delete_key"), - 8: .standard(proto: "delete_account"), - 13: .standard(proto: "token_transfer"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_NEAR_Proto_CreateAccount? - var hadOneofValue = false - if let current = self.payload { - hadOneofValue = true - if case .createAccount(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.payload = .createAccount(v) - } - }() - case 2: try { - var v: TW_NEAR_Proto_DeployContract? - var hadOneofValue = false - if let current = self.payload { - hadOneofValue = true - if case .deployContract(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.payload = .deployContract(v) - } - }() - case 3: try { - var v: TW_NEAR_Proto_FunctionCall? - var hadOneofValue = false - if let current = self.payload { - hadOneofValue = true - if case .functionCall(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.payload = .functionCall(v) - } - }() - case 4: try { - var v: TW_NEAR_Proto_Transfer? - var hadOneofValue = false - if let current = self.payload { - hadOneofValue = true - if case .transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.payload = .transfer(v) - } - }() - case 5: try { - var v: TW_NEAR_Proto_Stake? - var hadOneofValue = false - if let current = self.payload { - hadOneofValue = true - if case .stake(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.payload = .stake(v) - } - }() - case 6: try { - var v: TW_NEAR_Proto_AddKey? - var hadOneofValue = false - if let current = self.payload { - hadOneofValue = true - if case .addKey(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.payload = .addKey(v) - } - }() - case 7: try { - var v: TW_NEAR_Proto_DeleteKey? - var hadOneofValue = false - if let current = self.payload { - hadOneofValue = true - if case .deleteKey(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.payload = .deleteKey(v) - } - }() - case 8: try { - var v: TW_NEAR_Proto_DeleteAccount? - var hadOneofValue = false - if let current = self.payload { - hadOneofValue = true - if case .deleteAccount(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.payload = .deleteAccount(v) - } - }() - case 13: try { - var v: TW_NEAR_Proto_TokenTransfer? - var hadOneofValue = false - if let current = self.payload { - hadOneofValue = true - if case .tokenTransfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.payload = .tokenTransfer(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.payload { - case .createAccount?: try { - guard case .createAccount(let v)? = self.payload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .deployContract?: try { - guard case .deployContract(let v)? = self.payload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .functionCall?: try { - guard case .functionCall(let v)? = self.payload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .transfer?: try { - guard case .transfer(let v)? = self.payload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case .stake?: try { - guard case .stake(let v)? = self.payload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - }() - case .addKey?: try { - guard case .addKey(let v)? = self.payload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - }() - case .deleteKey?: try { - guard case .deleteKey(let v)? = self.payload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - }() - case .deleteAccount?: try { - guard case .deleteAccount(let v)? = self.payload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case .tokenTransfer?: try { - guard case .tokenTransfer(let v)? = self.payload else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 13) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_Action, rhs: TW_NEAR_Proto_Action) -> Bool { - if lhs.payload != rhs.payload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "signer_id"), - 2: .same(proto: "nonce"), - 3: .standard(proto: "receiver_id"), - 4: .standard(proto: "block_hash"), - 5: .same(proto: "actions"), - 6: .standard(proto: "private_key"), - 7: .standard(proto: "public_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.signerID) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.nonce) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.receiverID) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.blockHash) }() - case 5: try { try decoder.decodeRepeatedMessageField(value: &self.actions) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.signerID.isEmpty { - try visitor.visitSingularStringField(value: self.signerID, fieldNumber: 1) - } - if self.nonce != 0 { - try visitor.visitSingularUInt64Field(value: self.nonce, fieldNumber: 2) - } - if !self.receiverID.isEmpty { - try visitor.visitSingularStringField(value: self.receiverID, fieldNumber: 3) - } - if !self.blockHash.isEmpty { - try visitor.visitSingularBytesField(value: self.blockHash, fieldNumber: 4) - } - if !self.actions.isEmpty { - try visitor.visitRepeatedMessageField(value: self.actions, fieldNumber: 5) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 6) - } - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 7) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_SigningInput, rhs: TW_NEAR_Proto_SigningInput) -> Bool { - if lhs.signerID != rhs.signerID {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.receiverID != rhs.receiverID {return false} - if lhs.blockHash != rhs.blockHash {return false} - if lhs.actions != rhs.actions {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEAR_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "signed_transaction"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - 4: .same(proto: "hash"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.signedTransaction) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.hash) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.signedTransaction.isEmpty { - try visitor.visitSingularBytesField(value: self.signedTransaction, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - if !self.hash.isEmpty { - try visitor.visitSingularBytesField(value: self.hash, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEAR_Proto_SigningOutput, rhs: TW_NEAR_Proto_SigningOutput) -> Bool { - if lhs.signedTransaction != rhs.signedTransaction {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.hash != rhs.hash {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/NEO+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/NEO+Proto.swift deleted file mode 100644 index 2edfc087..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/NEO+Proto.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias NEOTransactionInput = TW_NEO_Proto_TransactionInput -public typealias NEOOutputAddress = TW_NEO_Proto_OutputAddress -public typealias NEOTransactionOutput = TW_NEO_Proto_TransactionOutput -public typealias NEOTransaction = TW_NEO_Proto_Transaction -public typealias NEOSigningInput = TW_NEO_Proto_SigningInput -public typealias NEOSigningOutput = TW_NEO_Proto_SigningOutput -public typealias NEOTransactionOutputPlan = TW_NEO_Proto_TransactionOutputPlan -public typealias NEOTransactionAttributePlan = TW_NEO_Proto_TransactionAttributePlan -public typealias NEOTransactionPlan = TW_NEO_Proto_TransactionPlan diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/NEO.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/NEO.pb.swift deleted file mode 100644 index d943f01c..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/NEO.pb.swift +++ /dev/null @@ -1,919 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: NEO.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Input for a transaction (output of a prev tx) -public struct TW_NEO_Proto_TransactionInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Previous tx hash - public var prevHash: Data = Data() - - /// Output index - public var prevIndex: UInt32 = 0 - - /// unspent value of UTXO - public var value: Int64 = 0 - - /// Asset - public var assetID: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// extra address of Output -public struct TW_NEO_Proto_OutputAddress { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Amount (as string) - public var amount: Int64 = 0 - - /// destination address - public var toAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Output of a transaction -public struct TW_NEO_Proto_TransactionOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Asset - public var assetID: String = String() - - /// Amount (as string) - public var amount: Int64 = 0 - - /// destination address - public var toAddress: String = String() - - /// change address - public var changeAddress: String = String() - - /// extra output - public var extraOutputs: [TW_NEO_Proto_OutputAddress] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Transaction -public struct TW_NEO_Proto_Transaction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var transactionOneof: TW_NEO_Proto_Transaction.OneOf_TransactionOneof? = nil - - public var nep5Transfer: TW_NEO_Proto_Transaction.Nep5Transfer { - get { - if case .nep5Transfer(let v)? = transactionOneof {return v} - return TW_NEO_Proto_Transaction.Nep5Transfer() - } - set {transactionOneof = .nep5Transfer(newValue)} - } - - public var invocationGeneric: TW_NEO_Proto_Transaction.InvocationGeneric { - get { - if case .invocationGeneric(let v)? = transactionOneof {return v} - return TW_NEO_Proto_Transaction.InvocationGeneric() - } - set {transactionOneof = .invocationGeneric(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_TransactionOneof: Equatable { - case nep5Transfer(TW_NEO_Proto_Transaction.Nep5Transfer) - case invocationGeneric(TW_NEO_Proto_Transaction.InvocationGeneric) - - #if !swift(>=4.1) - public static func ==(lhs: TW_NEO_Proto_Transaction.OneOf_TransactionOneof, rhs: TW_NEO_Proto_Transaction.OneOf_TransactionOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.nep5Transfer, .nep5Transfer): return { - guard case .nep5Transfer(let l) = lhs, case .nep5Transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.invocationGeneric, .invocationGeneric): return { - guard case .invocationGeneric(let l) = lhs, case .invocationGeneric(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - /// nep5 token transfer transaction - public struct Nep5Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var assetID: String = String() - - public var from: String = String() - - public var to: String = String() - - /// Amount to send (256-bit number) - public var amount: Data = Data() - - /// determine if putting THROWIFNOT & RET instructions - public var scriptWithRet: Bool = false - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// Generic invocation transaction - public struct InvocationGeneric { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// gas to use - public var gas: UInt64 = 0 - - /// Contract call payload data - public var script: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_NEO_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Available transaction inputs - public var inputs: [TW_NEO_Proto_TransactionInput] = [] - - /// Transaction outputs - public var outputs: [TW_NEO_Proto_TransactionOutput] = [] - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Fee - public var fee: Int64 = 0 - - /// Asset ID for gas - public var gasAssetID: String = String() - - /// Address for the change - public var gasChangeAddress: String = String() - - /// Optional transaction plan (if missing it will be computed) - public var plan: TW_NEO_Proto_TransactionPlan { - get {return _plan ?? TW_NEO_Proto_TransactionPlan()} - set {_plan = newValue} - } - /// Returns true if `plan` has been explicitly set. - public var hasPlan: Bool {return self._plan != nil} - /// Clears the value of `plan`. Subsequent reads from it will return its default value. - public mutating func clearPlan() {self._plan = nil} - - public var transaction: TW_NEO_Proto_Transaction { - get {return _transaction ?? TW_NEO_Proto_Transaction()} - set {_transaction = newValue} - } - /// Returns true if `transaction` has been explicitly set. - public var hasTransaction: Bool {return self._transaction != nil} - /// Clears the value of `transaction`. Subsequent reads from it will return its default value. - public mutating func clearTransaction() {self._transaction = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _plan: TW_NEO_Proto_TransactionPlan? = nil - fileprivate var _transaction: TW_NEO_Proto_Transaction? = nil -} - -/// Result containing the signed and encoded transaction. -public struct TW_NEO_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// Optional error - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Describes a preliminary transaction output plan. -public struct TW_NEO_Proto_TransactionOutputPlan { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Amount to be received at the other end. - public var amount: Int64 = 0 - - /// Maximum available amount. - public var availableAmount: Int64 = 0 - - /// Amount that is left as change - public var change: Int64 = 0 - - /// Asset - public var assetID: String = String() - - /// Destination address - public var toAddress: String = String() - - /// Address for the change - public var changeAddress: String = String() - - /// extra output - public var extraOutputs: [TW_NEO_Proto_OutputAddress] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_NEO_Proto_TransactionAttributePlan { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var usage: Int32 = 0 - - public var data: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Describes a preliminary transaction plan. -public struct TW_NEO_Proto_TransactionPlan { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Used assets - public var outputs: [TW_NEO_Proto_TransactionOutputPlan] = [] - - /// Selected unspent transaction outputs. - public var inputs: [TW_NEO_Proto_TransactionInput] = [] - - /// GAS used - public var fee: Int64 = 0 - - /// Optional error - public var error: TW_Common_Proto_SigningError = .ok - - /// Attribute - public var attributes: [TW_NEO_Proto_TransactionAttributePlan] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.NEO.Proto" - -extension TW_NEO_Proto_TransactionInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "prev_hash"), - 2: .standard(proto: "prev_index"), - 3: .same(proto: "value"), - 4: .standard(proto: "asset_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.prevHash) }() - case 2: try { try decoder.decodeSingularFixed32Field(value: &self.prevIndex) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.value) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.assetID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.prevHash.isEmpty { - try visitor.visitSingularBytesField(value: self.prevHash, fieldNumber: 1) - } - if self.prevIndex != 0 { - try visitor.visitSingularFixed32Field(value: self.prevIndex, fieldNumber: 2) - } - if self.value != 0 { - try visitor.visitSingularInt64Field(value: self.value, fieldNumber: 3) - } - if !self.assetID.isEmpty { - try visitor.visitSingularStringField(value: self.assetID, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEO_Proto_TransactionInput, rhs: TW_NEO_Proto_TransactionInput) -> Bool { - if lhs.prevHash != rhs.prevHash {return false} - if lhs.prevIndex != rhs.prevIndex {return false} - if lhs.value != rhs.value {return false} - if lhs.assetID != rhs.assetID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEO_Proto_OutputAddress: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OutputAddress" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - 2: .standard(proto: "to_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularSInt64Field(value: &self.amount) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.amount != 0 { - try visitor.visitSingularSInt64Field(value: self.amount, fieldNumber: 1) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEO_Proto_OutputAddress, rhs: TW_NEO_Proto_OutputAddress) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEO_Proto_TransactionOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "asset_id"), - 2: .same(proto: "amount"), - 3: .standard(proto: "to_address"), - 4: .standard(proto: "change_address"), - 5: .standard(proto: "extra_outputs"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.assetID) }() - case 2: try { try decoder.decodeSingularSInt64Field(value: &self.amount) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.changeAddress) }() - case 5: try { try decoder.decodeRepeatedMessageField(value: &self.extraOutputs) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.assetID.isEmpty { - try visitor.visitSingularStringField(value: self.assetID, fieldNumber: 1) - } - if self.amount != 0 { - try visitor.visitSingularSInt64Field(value: self.amount, fieldNumber: 2) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 3) - } - if !self.changeAddress.isEmpty { - try visitor.visitSingularStringField(value: self.changeAddress, fieldNumber: 4) - } - if !self.extraOutputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.extraOutputs, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEO_Proto_TransactionOutput, rhs: TW_NEO_Proto_TransactionOutput) -> Bool { - if lhs.assetID != rhs.assetID {return false} - if lhs.amount != rhs.amount {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.changeAddress != rhs.changeAddress {return false} - if lhs.extraOutputs != rhs.extraOutputs {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEO_Proto_Transaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transaction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "nep5_transfer"), - 2: .standard(proto: "invocation_generic"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_NEO_Proto_Transaction.Nep5Transfer? - var hadOneofValue = false - if let current = self.transactionOneof { - hadOneofValue = true - if case .nep5Transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionOneof = .nep5Transfer(v) - } - }() - case 2: try { - var v: TW_NEO_Proto_Transaction.InvocationGeneric? - var hadOneofValue = false - if let current = self.transactionOneof { - hadOneofValue = true - if case .invocationGeneric(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionOneof = .invocationGeneric(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.transactionOneof { - case .nep5Transfer?: try { - guard case .nep5Transfer(let v)? = self.transactionOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .invocationGeneric?: try { - guard case .invocationGeneric(let v)? = self.transactionOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEO_Proto_Transaction, rhs: TW_NEO_Proto_Transaction) -> Bool { - if lhs.transactionOneof != rhs.transactionOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEO_Proto_Transaction.Nep5Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_NEO_Proto_Transaction.protoMessageName + ".Nep5Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "asset_id"), - 2: .same(proto: "from"), - 3: .same(proto: "to"), - 4: .same(proto: "amount"), - 5: .standard(proto: "script_with_ret"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.assetID) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.from) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 5: try { try decoder.decodeSingularBoolField(value: &self.scriptWithRet) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.assetID.isEmpty { - try visitor.visitSingularStringField(value: self.assetID, fieldNumber: 1) - } - if !self.from.isEmpty { - try visitor.visitSingularStringField(value: self.from, fieldNumber: 2) - } - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 3) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 4) - } - if self.scriptWithRet != false { - try visitor.visitSingularBoolField(value: self.scriptWithRet, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEO_Proto_Transaction.Nep5Transfer, rhs: TW_NEO_Proto_Transaction.Nep5Transfer) -> Bool { - if lhs.assetID != rhs.assetID {return false} - if lhs.from != rhs.from {return false} - if lhs.to != rhs.to {return false} - if lhs.amount != rhs.amount {return false} - if lhs.scriptWithRet != rhs.scriptWithRet {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEO_Proto_Transaction.InvocationGeneric: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_NEO_Proto_Transaction.protoMessageName + ".InvocationGeneric" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "gas"), - 2: .same(proto: "script"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.gas) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.script) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.gas != 0 { - try visitor.visitSingularUInt64Field(value: self.gas, fieldNumber: 1) - } - if !self.script.isEmpty { - try visitor.visitSingularBytesField(value: self.script, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEO_Proto_Transaction.InvocationGeneric, rhs: TW_NEO_Proto_Transaction.InvocationGeneric) -> Bool { - if lhs.gas != rhs.gas {return false} - if lhs.script != rhs.script {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEO_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "inputs"), - 2: .same(proto: "outputs"), - 3: .standard(proto: "private_key"), - 4: .same(proto: "fee"), - 5: .standard(proto: "gas_asset_id"), - 6: .standard(proto: "gas_change_address"), - 7: .same(proto: "plan"), - 8: .same(proto: "transaction"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.inputs) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.outputs) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.fee) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.gasAssetID) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.gasChangeAddress) }() - case 7: try { try decoder.decodeSingularMessageField(value: &self._plan) }() - case 8: try { try decoder.decodeSingularMessageField(value: &self._transaction) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.inputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 1) - } - if !self.outputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 2) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 3) - } - if self.fee != 0 { - try visitor.visitSingularInt64Field(value: self.fee, fieldNumber: 4) - } - if !self.gasAssetID.isEmpty { - try visitor.visitSingularStringField(value: self.gasAssetID, fieldNumber: 5) - } - if !self.gasChangeAddress.isEmpty { - try visitor.visitSingularStringField(value: self.gasChangeAddress, fieldNumber: 6) - } - try { if let v = self._plan { - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } }() - try { if let v = self._transaction { - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEO_Proto_SigningInput, rhs: TW_NEO_Proto_SigningInput) -> Bool { - if lhs.inputs != rhs.inputs {return false} - if lhs.outputs != rhs.outputs {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.fee != rhs.fee {return false} - if lhs.gasAssetID != rhs.gasAssetID {return false} - if lhs.gasChangeAddress != rhs.gasChangeAddress {return false} - if lhs._plan != rhs._plan {return false} - if lhs._transaction != rhs._transaction {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEO_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEO_Proto_SigningOutput, rhs: TW_NEO_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEO_Proto_TransactionOutputPlan: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionOutputPlan" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - 2: .standard(proto: "available_amount"), - 3: .same(proto: "change"), - 4: .standard(proto: "asset_id"), - 5: .standard(proto: "to_address"), - 6: .standard(proto: "change_address"), - 7: .standard(proto: "extra_outputs"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.availableAmount) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.change) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.assetID) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.changeAddress) }() - case 7: try { try decoder.decodeRepeatedMessageField(value: &self.extraOutputs) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 1) - } - if self.availableAmount != 0 { - try visitor.visitSingularInt64Field(value: self.availableAmount, fieldNumber: 2) - } - if self.change != 0 { - try visitor.visitSingularInt64Field(value: self.change, fieldNumber: 3) - } - if !self.assetID.isEmpty { - try visitor.visitSingularStringField(value: self.assetID, fieldNumber: 4) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 5) - } - if !self.changeAddress.isEmpty { - try visitor.visitSingularStringField(value: self.changeAddress, fieldNumber: 6) - } - if !self.extraOutputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.extraOutputs, fieldNumber: 7) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEO_Proto_TransactionOutputPlan, rhs: TW_NEO_Proto_TransactionOutputPlan) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.availableAmount != rhs.availableAmount {return false} - if lhs.change != rhs.change {return false} - if lhs.assetID != rhs.assetID {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.changeAddress != rhs.changeAddress {return false} - if lhs.extraOutputs != rhs.extraOutputs {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEO_Proto_TransactionAttributePlan: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionAttributePlan" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "usage"), - 2: .same(proto: "data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self.usage) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.data) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.usage != 0 { - try visitor.visitSingularInt32Field(value: self.usage, fieldNumber: 1) - } - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEO_Proto_TransactionAttributePlan, rhs: TW_NEO_Proto_TransactionAttributePlan) -> Bool { - if lhs.usage != rhs.usage {return false} - if lhs.data != rhs.data {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NEO_Proto_TransactionPlan: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionPlan" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "outputs"), - 2: .same(proto: "inputs"), - 3: .same(proto: "fee"), - 4: .same(proto: "error"), - 5: .same(proto: "attributes"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.outputs) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.inputs) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.fee) }() - case 4: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 5: try { try decoder.decodeRepeatedMessageField(value: &self.attributes) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.outputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 1) - } - if !self.inputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 2) - } - if self.fee != 0 { - try visitor.visitSingularInt64Field(value: self.fee, fieldNumber: 3) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 4) - } - if !self.attributes.isEmpty { - try visitor.visitRepeatedMessageField(value: self.attributes, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NEO_Proto_TransactionPlan, rhs: TW_NEO_Proto_TransactionPlan) -> Bool { - if lhs.outputs != rhs.outputs {return false} - if lhs.inputs != rhs.inputs {return false} - if lhs.fee != rhs.fee {return false} - if lhs.error != rhs.error {return false} - if lhs.attributes != rhs.attributes {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/NULS+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/NULS+Proto.swift deleted file mode 100644 index b9219735..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/NULS+Proto.swift +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias NULSTransactionCoinFrom = TW_NULS_Proto_TransactionCoinFrom -public typealias NULSTransactionCoinTo = TW_NULS_Proto_TransactionCoinTo -public typealias NULSSignature = TW_NULS_Proto_Signature -public typealias NULSTransaction = TW_NULS_Proto_Transaction -public typealias NULSSigningInput = TW_NULS_Proto_SigningInput -public typealias NULSSigningOutput = TW_NULS_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/NULS.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/NULS.pb.swift deleted file mode 100644 index 506a7e54..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/NULS.pb.swift +++ /dev/null @@ -1,620 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: NULS.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Transaction from address -public struct TW_NULS_Proto_TransactionCoinFrom { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Source address - public var fromAddress: String = String() - - /// Chain ID - public var assetsChainid: UInt32 = 0 - - /// ID of the asset - public var assetsID: UInt32 = 0 - - /// transaction out amount (256-bit number) - public var idAmount: Data = Data() - - /// Nonce, 8 bytes - public var nonce: Data = Data() - - /// lock status: 1 locked; 0 unlocked - public var locked: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Transaction to a destination -public struct TW_NULS_Proto_TransactionCoinTo { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// destination address - public var toAddress: String = String() - - /// Chain ID - public var assetsChainid: UInt32 = 0 - - /// ID of the asset - public var assetsID: UInt32 = 0 - - /// transaction amount (uint256, serialized little endian) - public var idAmount: Data = Data() - - /// lock time - public var lockTime: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A signature -public struct TW_NULS_Proto_Signature { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Length of public key data - public var pkeyLen: UInt32 = 0 - - /// The public key - public var publicKey: Data = Data() - - /// The length of the signature - public var sigLen: UInt32 = 0 - - /// The signature data - public var signature: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A transaction -public struct TW_NULS_Proto_Transaction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// transaction type - public var type: UInt32 = 0 - - /// Timestamp of the transaction - public var timestamp: UInt32 = 0 - - /// Optional string remark - public var remark: String = String() - - /// The raw data - public var txData: Data = Data() - - /// CoinFrom - public var input: [TW_NULS_Proto_TransactionCoinFrom] = [] - - /// CoinTo - public var output: [TW_NULS_Proto_TransactionCoinTo] = [] - - /// Signature - public var txSigs: TW_NULS_Proto_Signature { - get {return _txSigs ?? TW_NULS_Proto_Signature()} - set {_txSigs = newValue} - } - /// Returns true if `txSigs` has been explicitly set. - public var hasTxSigs: Bool {return self._txSigs != nil} - /// Clears the value of `txSigs`. Subsequent reads from it will return its default value. - public mutating func clearTxSigs() {self._txSigs = nil} - - /// Tx hash - public var hash: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _txSigs: TW_NULS_Proto_Signature? = nil -} - -/// Input data necessary to create a signed order. -public struct TW_NULS_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Source address - public var from: String = String() - - /// Destination address - public var to: String = String() - - /// Transfer amount (uint256, serialized little endian) - public var amount: Data = Data() - - /// Chain ID - public var chainID: UInt32 = 0 - - /// Asset ID - public var idassetsID: UInt32 = 0 - - /// The last 8 bytes of latest transaction hash - public var nonce: Data = Data() - - /// Optional memo remark - public var remark: String = String() - - /// Account balance - public var balance: Data = Data() - - /// time, accurate to the second - public var timestamp: UInt32 = 0 - - /// external address paying fee, required for token transfer, optional for NULS transfer, depending on if an external fee payer is provided. If provided, it will be the fee paying address. - public var feePayer: String = String() - - /// fee payer address nonce, required for token transfer, optional for NULS transfer, depending on if fee_payer is provided. - public var feePayerNonce: Data = Data() - - /// fee payer address private key, required for token transfer, optional for NULS transfer, depending on if fee_payer is provided. - public var feePayerPrivateKey: Data = Data() - - /// fee payer NULS balance, it is required for token transfer. optional for NULS transfer, depending on if fee_payer is provided. - public var feePayerBalance: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_NULS_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Encoded transaction - public var encoded: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.NULS.Proto" - -extension TW_NULS_Proto_TransactionCoinFrom: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionCoinFrom" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "from_address"), - 2: .standard(proto: "assets_chainid"), - 3: .standard(proto: "assets_id"), - 4: .standard(proto: "id_amount"), - 5: .same(proto: "nonce"), - 6: .same(proto: "locked"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.fromAddress) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.assetsChainid) }() - case 3: try { try decoder.decodeSingularUInt32Field(value: &self.assetsID) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.idAmount) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.nonce) }() - case 6: try { try decoder.decodeSingularUInt32Field(value: &self.locked) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fromAddress.isEmpty { - try visitor.visitSingularStringField(value: self.fromAddress, fieldNumber: 1) - } - if self.assetsChainid != 0 { - try visitor.visitSingularUInt32Field(value: self.assetsChainid, fieldNumber: 2) - } - if self.assetsID != 0 { - try visitor.visitSingularUInt32Field(value: self.assetsID, fieldNumber: 3) - } - if !self.idAmount.isEmpty { - try visitor.visitSingularBytesField(value: self.idAmount, fieldNumber: 4) - } - if !self.nonce.isEmpty { - try visitor.visitSingularBytesField(value: self.nonce, fieldNumber: 5) - } - if self.locked != 0 { - try visitor.visitSingularUInt32Field(value: self.locked, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NULS_Proto_TransactionCoinFrom, rhs: TW_NULS_Proto_TransactionCoinFrom) -> Bool { - if lhs.fromAddress != rhs.fromAddress {return false} - if lhs.assetsChainid != rhs.assetsChainid {return false} - if lhs.assetsID != rhs.assetsID {return false} - if lhs.idAmount != rhs.idAmount {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.locked != rhs.locked {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NULS_Proto_TransactionCoinTo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionCoinTo" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "to_address"), - 2: .standard(proto: "assets_chainid"), - 3: .standard(proto: "assets_id"), - 4: .standard(proto: "id_amount"), - 5: .standard(proto: "lock_time"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.assetsChainid) }() - case 3: try { try decoder.decodeSingularUInt32Field(value: &self.assetsID) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.idAmount) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &self.lockTime) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 1) - } - if self.assetsChainid != 0 { - try visitor.visitSingularUInt32Field(value: self.assetsChainid, fieldNumber: 2) - } - if self.assetsID != 0 { - try visitor.visitSingularUInt32Field(value: self.assetsID, fieldNumber: 3) - } - if !self.idAmount.isEmpty { - try visitor.visitSingularBytesField(value: self.idAmount, fieldNumber: 4) - } - if self.lockTime != 0 { - try visitor.visitSingularUInt32Field(value: self.lockTime, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NULS_Proto_TransactionCoinTo, rhs: TW_NULS_Proto_TransactionCoinTo) -> Bool { - if lhs.toAddress != rhs.toAddress {return false} - if lhs.assetsChainid != rhs.assetsChainid {return false} - if lhs.assetsID != rhs.assetsID {return false} - if lhs.idAmount != rhs.idAmount {return false} - if lhs.lockTime != rhs.lockTime {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NULS_Proto_Signature: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Signature" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "pkey_len"), - 2: .standard(proto: "public_key"), - 3: .standard(proto: "sig_len"), - 4: .same(proto: "signature"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &self.pkeyLen) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - case 3: try { try decoder.decodeSingularUInt32Field(value: &self.sigLen) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.pkeyLen != 0 { - try visitor.visitSingularUInt32Field(value: self.pkeyLen, fieldNumber: 1) - } - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 2) - } - if self.sigLen != 0 { - try visitor.visitSingularUInt32Field(value: self.sigLen, fieldNumber: 3) - } - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NULS_Proto_Signature, rhs: TW_NULS_Proto_Signature) -> Bool { - if lhs.pkeyLen != rhs.pkeyLen {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.sigLen != rhs.sigLen {return false} - if lhs.signature != rhs.signature {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NULS_Proto_Transaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transaction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "type"), - 2: .same(proto: "timestamp"), - 3: .same(proto: "remark"), - 4: .standard(proto: "tx_data"), - 5: .same(proto: "input"), - 6: .same(proto: "output"), - 7: .standard(proto: "tx_sigs"), - 8: .same(proto: "hash"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &self.type) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.timestamp) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.remark) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.txData) }() - case 5: try { try decoder.decodeRepeatedMessageField(value: &self.input) }() - case 6: try { try decoder.decodeRepeatedMessageField(value: &self.output) }() - case 7: try { try decoder.decodeSingularMessageField(value: &self._txSigs) }() - case 8: try { try decoder.decodeSingularUInt32Field(value: &self.hash) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.type != 0 { - try visitor.visitSingularUInt32Field(value: self.type, fieldNumber: 1) - } - if self.timestamp != 0 { - try visitor.visitSingularUInt32Field(value: self.timestamp, fieldNumber: 2) - } - if !self.remark.isEmpty { - try visitor.visitSingularStringField(value: self.remark, fieldNumber: 3) - } - if !self.txData.isEmpty { - try visitor.visitSingularBytesField(value: self.txData, fieldNumber: 4) - } - if !self.input.isEmpty { - try visitor.visitRepeatedMessageField(value: self.input, fieldNumber: 5) - } - if !self.output.isEmpty { - try visitor.visitRepeatedMessageField(value: self.output, fieldNumber: 6) - } - try { if let v = self._txSigs { - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } }() - if self.hash != 0 { - try visitor.visitSingularUInt32Field(value: self.hash, fieldNumber: 8) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NULS_Proto_Transaction, rhs: TW_NULS_Proto_Transaction) -> Bool { - if lhs.type != rhs.type {return false} - if lhs.timestamp != rhs.timestamp {return false} - if lhs.remark != rhs.remark {return false} - if lhs.txData != rhs.txData {return false} - if lhs.input != rhs.input {return false} - if lhs.output != rhs.output {return false} - if lhs._txSigs != rhs._txSigs {return false} - if lhs.hash != rhs.hash {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NULS_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "private_key"), - 2: .same(proto: "from"), - 3: .same(proto: "to"), - 4: .same(proto: "amount"), - 5: .standard(proto: "chain_id"), - 6: .standard(proto: "idassets_id"), - 7: .same(proto: "nonce"), - 8: .same(proto: "remark"), - 9: .same(proto: "balance"), - 10: .same(proto: "timestamp"), - 11: .standard(proto: "fee_payer"), - 12: .standard(proto: "fee_payer_nonce"), - 13: .standard(proto: "fee_payer_private_key"), - 14: .standard(proto: "fee_payer_balance"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.from) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &self.chainID) }() - case 6: try { try decoder.decodeSingularUInt32Field(value: &self.idassetsID) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.nonce) }() - case 8: try { try decoder.decodeSingularStringField(value: &self.remark) }() - case 9: try { try decoder.decodeSingularBytesField(value: &self.balance) }() - case 10: try { try decoder.decodeSingularUInt32Field(value: &self.timestamp) }() - case 11: try { try decoder.decodeSingularStringField(value: &self.feePayer) }() - case 12: try { try decoder.decodeSingularBytesField(value: &self.feePayerNonce) }() - case 13: try { try decoder.decodeSingularBytesField(value: &self.feePayerPrivateKey) }() - case 14: try { try decoder.decodeSingularBytesField(value: &self.feePayerBalance) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 1) - } - if !self.from.isEmpty { - try visitor.visitSingularStringField(value: self.from, fieldNumber: 2) - } - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 3) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 4) - } - if self.chainID != 0 { - try visitor.visitSingularUInt32Field(value: self.chainID, fieldNumber: 5) - } - if self.idassetsID != 0 { - try visitor.visitSingularUInt32Field(value: self.idassetsID, fieldNumber: 6) - } - if !self.nonce.isEmpty { - try visitor.visitSingularBytesField(value: self.nonce, fieldNumber: 7) - } - if !self.remark.isEmpty { - try visitor.visitSingularStringField(value: self.remark, fieldNumber: 8) - } - if !self.balance.isEmpty { - try visitor.visitSingularBytesField(value: self.balance, fieldNumber: 9) - } - if self.timestamp != 0 { - try visitor.visitSingularUInt32Field(value: self.timestamp, fieldNumber: 10) - } - if !self.feePayer.isEmpty { - try visitor.visitSingularStringField(value: self.feePayer, fieldNumber: 11) - } - if !self.feePayerNonce.isEmpty { - try visitor.visitSingularBytesField(value: self.feePayerNonce, fieldNumber: 12) - } - if !self.feePayerPrivateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.feePayerPrivateKey, fieldNumber: 13) - } - if !self.feePayerBalance.isEmpty { - try visitor.visitSingularBytesField(value: self.feePayerBalance, fieldNumber: 14) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NULS_Proto_SigningInput, rhs: TW_NULS_Proto_SigningInput) -> Bool { - if lhs.privateKey != rhs.privateKey {return false} - if lhs.from != rhs.from {return false} - if lhs.to != rhs.to {return false} - if lhs.amount != rhs.amount {return false} - if lhs.chainID != rhs.chainID {return false} - if lhs.idassetsID != rhs.idassetsID {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.remark != rhs.remark {return false} - if lhs.balance != rhs.balance {return false} - if lhs.timestamp != rhs.timestamp {return false} - if lhs.feePayer != rhs.feePayer {return false} - if lhs.feePayerNonce != rhs.feePayerNonce {return false} - if lhs.feePayerPrivateKey != rhs.feePayerPrivateKey {return false} - if lhs.feePayerBalance != rhs.feePayerBalance {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_NULS_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_NULS_Proto_SigningOutput, rhs: TW_NULS_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nano+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nano+Proto.swift deleted file mode 100644 index bc456725..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nano+Proto.swift +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias NanoSigningInput = TW_Nano_Proto_SigningInput -public typealias NanoSigningOutput = TW_Nano_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nano.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nano.pb.swift deleted file mode 100644 index ef840f89..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nano.pb.swift +++ /dev/null @@ -1,280 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Nano.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Input data necessary to create a signed transaction. -public struct TW_Nano_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Optional parent block hash - public var parentBlock: Data = Data() - - /// Receive/Send reference - public var linkOneof: TW_Nano_Proto_SigningInput.OneOf_LinkOneof? = nil - - /// Hash of a block to receive from - public var linkBlock: Data { - get { - if case .linkBlock(let v)? = linkOneof {return v} - return Data() - } - set {linkOneof = .linkBlock(newValue)} - } - - /// Recipient address to send coins to - public var linkRecipient: String { - get { - if case .linkRecipient(let v)? = linkOneof {return v} - return String() - } - set {linkOneof = .linkRecipient(newValue)} - } - - /// Representative address - public var representative: String = String() - - /// Account balance (128-bit unsigned integer, as a string) - public var balance: String = String() - - /// Work - public var work: String = String() - - /// Pulic key used for building preImage (32 bytes). - public var publicKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Receive/Send reference - public enum OneOf_LinkOneof: Equatable { - /// Hash of a block to receive from - case linkBlock(Data) - /// Recipient address to send coins to - case linkRecipient(String) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Nano_Proto_SigningInput.OneOf_LinkOneof, rhs: TW_Nano_Proto_SigningInput.OneOf_LinkOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.linkBlock, .linkBlock): return { - guard case .linkBlock(let l) = lhs, case .linkBlock(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.linkRecipient, .linkRecipient): return { - guard case .linkRecipient(let l) = lhs, case .linkRecipient(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Nano_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signature - public var signature: Data = Data() - - /// Block hash - public var blockHash: Data = Data() - - /// JSON representation of the block - public var json: String = String() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Nano.Proto" - -extension TW_Nano_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "private_key"), - 2: .standard(proto: "parent_block"), - 3: .standard(proto: "link_block"), - 4: .standard(proto: "link_recipient"), - 5: .same(proto: "representative"), - 6: .same(proto: "balance"), - 7: .same(proto: "work"), - 8: .standard(proto: "public_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.parentBlock) }() - case 3: try { - var v: Data? - try decoder.decodeSingularBytesField(value: &v) - if let v = v { - if self.linkOneof != nil {try decoder.handleConflictingOneOf()} - self.linkOneof = .linkBlock(v) - } - }() - case 4: try { - var v: String? - try decoder.decodeSingularStringField(value: &v) - if let v = v { - if self.linkOneof != nil {try decoder.handleConflictingOneOf()} - self.linkOneof = .linkRecipient(v) - } - }() - case 5: try { try decoder.decodeSingularStringField(value: &self.representative) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.balance) }() - case 7: try { try decoder.decodeSingularStringField(value: &self.work) }() - case 8: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 1) - } - if !self.parentBlock.isEmpty { - try visitor.visitSingularBytesField(value: self.parentBlock, fieldNumber: 2) - } - switch self.linkOneof { - case .linkBlock?: try { - guard case .linkBlock(let v)? = self.linkOneof else { preconditionFailure() } - try visitor.visitSingularBytesField(value: v, fieldNumber: 3) - }() - case .linkRecipient?: try { - guard case .linkRecipient(let v)? = self.linkOneof else { preconditionFailure() } - try visitor.visitSingularStringField(value: v, fieldNumber: 4) - }() - case nil: break - } - if !self.representative.isEmpty { - try visitor.visitSingularStringField(value: self.representative, fieldNumber: 5) - } - if !self.balance.isEmpty { - try visitor.visitSingularStringField(value: self.balance, fieldNumber: 6) - } - if !self.work.isEmpty { - try visitor.visitSingularStringField(value: self.work, fieldNumber: 7) - } - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 8) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nano_Proto_SigningInput, rhs: TW_Nano_Proto_SigningInput) -> Bool { - if lhs.privateKey != rhs.privateKey {return false} - if lhs.parentBlock != rhs.parentBlock {return false} - if lhs.linkOneof != rhs.linkOneof {return false} - if lhs.representative != rhs.representative {return false} - if lhs.balance != rhs.balance {return false} - if lhs.work != rhs.work {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nano_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "signature"), - 2: .standard(proto: "block_hash"), - 3: .same(proto: "json"), - 4: .same(proto: "error"), - 5: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.blockHash) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.json) }() - case 4: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 1) - } - if !self.blockHash.isEmpty { - try visitor.visitSingularBytesField(value: self.blockHash, fieldNumber: 2) - } - if !self.json.isEmpty { - try visitor.visitSingularStringField(value: self.json, fieldNumber: 3) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 4) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nano_Proto_SigningOutput, rhs: TW_Nano_Proto_SigningOutput) -> Bool { - if lhs.signature != rhs.signature {return false} - if lhs.blockHash != rhs.blockHash {return false} - if lhs.json != rhs.json {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nebulas+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nebulas+Proto.swift deleted file mode 100644 index 32b66bbd..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nebulas+Proto.swift +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias NebulasSigningInput = TW_Nebulas_Proto_SigningInput -public typealias NebulasSigningOutput = TW_Nebulas_Proto_SigningOutput -public typealias NebulasData = TW_Nebulas_Proto_Data -public typealias NebulasRawTransaction = TW_Nebulas_Proto_RawTransaction diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nebulas.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nebulas.pb.swift deleted file mode 100644 index 0e9da3bc..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nebulas.pb.swift +++ /dev/null @@ -1,427 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Nebulas.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Input data necessary to create a signed transaction. -public struct TW_Nebulas_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// sender's address. - public var fromAddress: String = String() - - /// Chain identifier (uint256, serialized little endian) - public var chainID: Data = Data() - - /// Nonce (uint256, serialized little endian) - public var nonce: Data = Data() - - /// Gas price (uint256, serialized little endian) - public var gasPrice: Data = Data() - - /// Gas limit (uint256, serialized little endian) - public var gasLimit: Data = Data() - - /// Recipient's address. - public var toAddress: String = String() - - /// Amount to send in wei, 1 NAS = 10^18 Wei (uint256, serialized little endian) - public var amount: Data = Data() - - /// Timestamp to create transaction (uint256, serialized little endian) - public var timestamp: Data = Data() - - /// Optional payload - public var payload: String = String() - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Nebulas_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Algorithm code - public var algorithm: UInt32 = 0 - - /// The signature - public var signature: Data = Data() - - /// Encoded transaction - public var raw: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Generic data -public struct TW_Nebulas_Proto_Data { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var type: String = String() - - public var payload: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Raw transaction data -public struct TW_Nebulas_Proto_RawTransaction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// tx hash - public var hash: Data = Data() - - /// source address - public var from: Data = Data() - - /// destination address - public var to: Data = Data() - - /// amount (uint256, serialized little endian) - public var value: Data = Data() - - /// Nonce (should be larger than in the last transaction of the account) - public var nonce: UInt64 = 0 - - /// transaction timestamp - public var timestamp: Int64 = 0 - - /// generic data - public var data: TW_Nebulas_Proto_Data { - get {return _data ?? TW_Nebulas_Proto_Data()} - set {_data = newValue} - } - /// Returns true if `data` has been explicitly set. - public var hasData: Bool {return self._data != nil} - /// Clears the value of `data`. Subsequent reads from it will return its default value. - public mutating func clearData() {self._data = nil} - - /// chain ID (4 bytes) - public var chainID: UInt32 = 0 - - /// gas price (uint256, serialized little endian) - public var gasPrice: Data = Data() - - /// gas limit (uint256, serialized little endian) - public var gasLimit: Data = Data() - - /// algorithm - public var alg: UInt32 = 0 - - /// signature - public var sign: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _data: TW_Nebulas_Proto_Data? = nil -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Nebulas.Proto" - -extension TW_Nebulas_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "from_address"), - 2: .standard(proto: "chain_id"), - 3: .same(proto: "nonce"), - 4: .standard(proto: "gas_price"), - 5: .standard(proto: "gas_limit"), - 6: .standard(proto: "to_address"), - 7: .same(proto: "amount"), - 8: .same(proto: "timestamp"), - 9: .same(proto: "payload"), - 10: .standard(proto: "private_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.fromAddress) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.chainID) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.nonce) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.gasPrice) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.gasLimit) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 8: try { try decoder.decodeSingularBytesField(value: &self.timestamp) }() - case 9: try { try decoder.decodeSingularStringField(value: &self.payload) }() - case 10: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.fromAddress.isEmpty { - try visitor.visitSingularStringField(value: self.fromAddress, fieldNumber: 1) - } - if !self.chainID.isEmpty { - try visitor.visitSingularBytesField(value: self.chainID, fieldNumber: 2) - } - if !self.nonce.isEmpty { - try visitor.visitSingularBytesField(value: self.nonce, fieldNumber: 3) - } - if !self.gasPrice.isEmpty { - try visitor.visitSingularBytesField(value: self.gasPrice, fieldNumber: 4) - } - if !self.gasLimit.isEmpty { - try visitor.visitSingularBytesField(value: self.gasLimit, fieldNumber: 5) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 6) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 7) - } - if !self.timestamp.isEmpty { - try visitor.visitSingularBytesField(value: self.timestamp, fieldNumber: 8) - } - if !self.payload.isEmpty { - try visitor.visitSingularStringField(value: self.payload, fieldNumber: 9) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 10) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nebulas_Proto_SigningInput, rhs: TW_Nebulas_Proto_SigningInput) -> Bool { - if lhs.fromAddress != rhs.fromAddress {return false} - if lhs.chainID != rhs.chainID {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.gasPrice != rhs.gasPrice {return false} - if lhs.gasLimit != rhs.gasLimit {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.timestamp != rhs.timestamp {return false} - if lhs.payload != rhs.payload {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nebulas_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "algorithm"), - 2: .same(proto: "signature"), - 3: .same(proto: "raw"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &self.algorithm) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.raw) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.algorithm != 0 { - try visitor.visitSingularUInt32Field(value: self.algorithm, fieldNumber: 1) - } - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 2) - } - if !self.raw.isEmpty { - try visitor.visitSingularStringField(value: self.raw, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nebulas_Proto_SigningOutput, rhs: TW_Nebulas_Proto_SigningOutput) -> Bool { - if lhs.algorithm != rhs.algorithm {return false} - if lhs.signature != rhs.signature {return false} - if lhs.raw != rhs.raw {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nebulas_Proto_Data: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Data" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "type"), - 2: .same(proto: "payload"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.type) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.payload) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.type.isEmpty { - try visitor.visitSingularStringField(value: self.type, fieldNumber: 1) - } - if !self.payload.isEmpty { - try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nebulas_Proto_Data, rhs: TW_Nebulas_Proto_Data) -> Bool { - if lhs.type != rhs.type {return false} - if lhs.payload != rhs.payload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nebulas_Proto_RawTransaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".RawTransaction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "hash"), - 2: .same(proto: "from"), - 3: .same(proto: "to"), - 4: .same(proto: "value"), - 5: .same(proto: "nonce"), - 6: .same(proto: "timestamp"), - 7: .same(proto: "data"), - 8: .standard(proto: "chain_id"), - 9: .standard(proto: "gas_price"), - 10: .standard(proto: "gas_limit"), - 11: .same(proto: "alg"), - 12: .same(proto: "sign"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.hash) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.from) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.to) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.nonce) }() - case 6: try { try decoder.decodeSingularInt64Field(value: &self.timestamp) }() - case 7: try { try decoder.decodeSingularMessageField(value: &self._data) }() - case 8: try { try decoder.decodeSingularUInt32Field(value: &self.chainID) }() - case 9: try { try decoder.decodeSingularBytesField(value: &self.gasPrice) }() - case 10: try { try decoder.decodeSingularBytesField(value: &self.gasLimit) }() - case 11: try { try decoder.decodeSingularUInt32Field(value: &self.alg) }() - case 12: try { try decoder.decodeSingularBytesField(value: &self.sign) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.hash.isEmpty { - try visitor.visitSingularBytesField(value: self.hash, fieldNumber: 1) - } - if !self.from.isEmpty { - try visitor.visitSingularBytesField(value: self.from, fieldNumber: 2) - } - if !self.to.isEmpty { - try visitor.visitSingularBytesField(value: self.to, fieldNumber: 3) - } - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 4) - } - if self.nonce != 0 { - try visitor.visitSingularUInt64Field(value: self.nonce, fieldNumber: 5) - } - if self.timestamp != 0 { - try visitor.visitSingularInt64Field(value: self.timestamp, fieldNumber: 6) - } - try { if let v = self._data { - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } }() - if self.chainID != 0 { - try visitor.visitSingularUInt32Field(value: self.chainID, fieldNumber: 8) - } - if !self.gasPrice.isEmpty { - try visitor.visitSingularBytesField(value: self.gasPrice, fieldNumber: 9) - } - if !self.gasLimit.isEmpty { - try visitor.visitSingularBytesField(value: self.gasLimit, fieldNumber: 10) - } - if self.alg != 0 { - try visitor.visitSingularUInt32Field(value: self.alg, fieldNumber: 11) - } - if !self.sign.isEmpty { - try visitor.visitSingularBytesField(value: self.sign, fieldNumber: 12) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nebulas_Proto_RawTransaction, rhs: TW_Nebulas_Proto_RawTransaction) -> Bool { - if lhs.hash != rhs.hash {return false} - if lhs.from != rhs.from {return false} - if lhs.to != rhs.to {return false} - if lhs.value != rhs.value {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.timestamp != rhs.timestamp {return false} - if lhs._data != rhs._data {return false} - if lhs.chainID != rhs.chainID {return false} - if lhs.gasPrice != rhs.gasPrice {return false} - if lhs.gasLimit != rhs.gasLimit {return false} - if lhs.alg != rhs.alg {return false} - if lhs.sign != rhs.sign {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nervos+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nervos+Proto.swift deleted file mode 100644 index 6da7221b..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nervos+Proto.swift +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias NervosTransactionPlan = TW_Nervos_Proto_TransactionPlan -public typealias NervosCellDep = TW_Nervos_Proto_CellDep -public typealias NervosOutPoint = TW_Nervos_Proto_OutPoint -public typealias NervosCellOutput = TW_Nervos_Proto_CellOutput -public typealias NervosScript = TW_Nervos_Proto_Script -public typealias NervosNativeTransfer = TW_Nervos_Proto_NativeTransfer -public typealias NervosSudtTransfer = TW_Nervos_Proto_SudtTransfer -public typealias NervosDaoDeposit = TW_Nervos_Proto_DaoDeposit -public typealias NervosDaoWithdrawPhase1 = TW_Nervos_Proto_DaoWithdrawPhase1 -public typealias NervosDaoWithdrawPhase2 = TW_Nervos_Proto_DaoWithdrawPhase2 -public typealias NervosSigningInput = TW_Nervos_Proto_SigningInput -public typealias NervosCell = TW_Nervos_Proto_Cell -public typealias NervosSigningOutput = TW_Nervos_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nervos.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nervos.pb.swift deleted file mode 100644 index e07a88f3..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nervos.pb.swift +++ /dev/null @@ -1,1337 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Nervos.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Nervos transaction plan -public struct TW_Nervos_Proto_TransactionPlan { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// A list of cell deps. - public var cellDeps: [TW_Nervos_Proto_CellDep] = [] - - /// A list of header deps. - public var headerDeps: [Data] = [] - - /// A list of 1 or more selected cells for this transaction - public var selectedCells: [TW_Nervos_Proto_Cell] = [] - - /// A list of 1 or more outputs by this transaction - public var outputs: [TW_Nervos_Proto_CellOutput] = [] - - /// A list of outputs data. - public var outputsData: [Data] = [] - - /// Optional error - public var error: TW_Common_Proto_SigningError = .ok - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Nervos cell dep. -public struct TW_Nervos_Proto_CellDep { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Prevents the transaction to be mined before an absolute or relative time - public var depType: String = String() - - /// Reference to the previous transaction's output. - public var outPoint: TW_Nervos_Proto_OutPoint { - get {return _outPoint ?? TW_Nervos_Proto_OutPoint()} - set {_outPoint = newValue} - } - /// Returns true if `outPoint` has been explicitly set. - public var hasOutPoint: Bool {return self._outPoint != nil} - /// Clears the value of `outPoint`. Subsequent reads from it will return its default value. - public mutating func clearOutPoint() {self._outPoint = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _outPoint: TW_Nervos_Proto_OutPoint? = nil -} - -/// Nervos transaction out-point reference. -public struct TW_Nervos_Proto_OutPoint { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The hash of the referenced transaction. - public var txHash: Data = Data() - - /// The index of the specific output in the transaction. - public var index: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Nervos cell output. -public struct TW_Nervos_Proto_CellOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Transaction amount. - public var capacity: UInt64 = 0 - - /// Lock script - public var lock: TW_Nervos_Proto_Script { - get {return _lock ?? TW_Nervos_Proto_Script()} - set {_lock = newValue} - } - /// Returns true if `lock` has been explicitly set. - public var hasLock: Bool {return self._lock != nil} - /// Clears the value of `lock`. Subsequent reads from it will return its default value. - public mutating func clearLock() {self._lock = nil} - - /// Type script - public var type: TW_Nervos_Proto_Script { - get {return _type ?? TW_Nervos_Proto_Script()} - set {_type = newValue} - } - /// Returns true if `type` has been explicitly set. - public var hasType: Bool {return self._type != nil} - /// Clears the value of `type`. Subsequent reads from it will return its default value. - public mutating func clearType() {self._type = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _lock: TW_Nervos_Proto_Script? = nil - fileprivate var _type: TW_Nervos_Proto_Script? = nil -} - -/// Nervos script -public struct TW_Nervos_Proto_Script { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Code hash - public var codeHash: Data = Data() - - /// Hash type - public var hashType: String = String() - - /// args - public var args: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Transfer of native asset -public struct TW_Nervos_Proto_NativeTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Recipient's address. - public var toAddress: String = String() - - /// Change address. - public var changeAddress: String = String() - - /// Amount to send. - public var amount: UInt64 = 0 - - /// If sending max amount. - public var useMaxAmount: Bool = false - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Token transfer (SUDT) -public struct TW_Nervos_Proto_SudtTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Recipient's address. - public var toAddress: String = String() - - /// Change address. - public var changeAddress: String = String() - - /// SUDT (Simple User Defined Token) address - public var sudtAddress: Data = Data() - - /// Amount to send. - public var amount: String = String() - - /// If sending max amount. - public var useMaxAmount: Bool = false - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Deposit -public struct TW_Nervos_Proto_DaoDeposit { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Recipient's address. - public var toAddress: String = String() - - /// Change address. - public var changeAddress: String = String() - - /// Amount to deposit. - public var amount: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Nervos_Proto_DaoWithdrawPhase1 { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Deposit cell - public var depositCell: TW_Nervos_Proto_Cell { - get {return _depositCell ?? TW_Nervos_Proto_Cell()} - set {_depositCell = newValue} - } - /// Returns true if `depositCell` has been explicitly set. - public var hasDepositCell: Bool {return self._depositCell != nil} - /// Clears the value of `depositCell`. Subsequent reads from it will return its default value. - public mutating func clearDepositCell() {self._depositCell = nil} - - /// Change address. - public var changeAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _depositCell: TW_Nervos_Proto_Cell? = nil -} - -public struct TW_Nervos_Proto_DaoWithdrawPhase2 { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Deposit cell - public var depositCell: TW_Nervos_Proto_Cell { - get {return _storage._depositCell ?? TW_Nervos_Proto_Cell()} - set {_uniqueStorage()._depositCell = newValue} - } - /// Returns true if `depositCell` has been explicitly set. - public var hasDepositCell: Bool {return _storage._depositCell != nil} - /// Clears the value of `depositCell`. Subsequent reads from it will return its default value. - public mutating func clearDepositCell() {_uniqueStorage()._depositCell = nil} - - /// Withdrawing cell - public var withdrawingCell: TW_Nervos_Proto_Cell { - get {return _storage._withdrawingCell ?? TW_Nervos_Proto_Cell()} - set {_uniqueStorage()._withdrawingCell = newValue} - } - /// Returns true if `withdrawingCell` has been explicitly set. - public var hasWithdrawingCell: Bool {return _storage._withdrawingCell != nil} - /// Clears the value of `withdrawingCell`. Subsequent reads from it will return its default value. - public mutating func clearWithdrawingCell() {_uniqueStorage()._withdrawingCell = nil} - - /// Amount - public var amount: UInt64 { - get {return _storage._amount} - set {_uniqueStorage()._amount = newValue} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Input data necessary to create a signed transaction. -public struct TW_Nervos_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Transaction fee per byte. - public var byteFee: UInt64 { - get {return _storage._byteFee} - set {_uniqueStorage()._byteFee = newValue} - } - - /// The available secret private keys used for signing (32 bytes each). - public var privateKey: [Data] { - get {return _storage._privateKey} - set {_uniqueStorage()._privateKey = newValue} - } - - /// Available unspent cell outputs. - public var cell: [TW_Nervos_Proto_Cell] { - get {return _storage._cell} - set {_uniqueStorage()._cell = newValue} - } - - /// Optional transaction plan - public var plan: TW_Nervos_Proto_TransactionPlan { - get {return _storage._plan ?? TW_Nervos_Proto_TransactionPlan()} - set {_uniqueStorage()._plan = newValue} - } - /// Returns true if `plan` has been explicitly set. - public var hasPlan: Bool {return _storage._plan != nil} - /// Clears the value of `plan`. Subsequent reads from it will return its default value. - public mutating func clearPlan() {_uniqueStorage()._plan = nil} - - /// The payload transfer - public var operationOneof: OneOf_OperationOneof? { - get {return _storage._operationOneof} - set {_uniqueStorage()._operationOneof = newValue} - } - - public var nativeTransfer: TW_Nervos_Proto_NativeTransfer { - get { - if case .nativeTransfer(let v)? = _storage._operationOneof {return v} - return TW_Nervos_Proto_NativeTransfer() - } - set {_uniqueStorage()._operationOneof = .nativeTransfer(newValue)} - } - - public var sudtTransfer: TW_Nervos_Proto_SudtTransfer { - get { - if case .sudtTransfer(let v)? = _storage._operationOneof {return v} - return TW_Nervos_Proto_SudtTransfer() - } - set {_uniqueStorage()._operationOneof = .sudtTransfer(newValue)} - } - - public var daoDeposit: TW_Nervos_Proto_DaoDeposit { - get { - if case .daoDeposit(let v)? = _storage._operationOneof {return v} - return TW_Nervos_Proto_DaoDeposit() - } - set {_uniqueStorage()._operationOneof = .daoDeposit(newValue)} - } - - public var daoWithdrawPhase1: TW_Nervos_Proto_DaoWithdrawPhase1 { - get { - if case .daoWithdrawPhase1(let v)? = _storage._operationOneof {return v} - return TW_Nervos_Proto_DaoWithdrawPhase1() - } - set {_uniqueStorage()._operationOneof = .daoWithdrawPhase1(newValue)} - } - - public var daoWithdrawPhase2: TW_Nervos_Proto_DaoWithdrawPhase2 { - get { - if case .daoWithdrawPhase2(let v)? = _storage._operationOneof {return v} - return TW_Nervos_Proto_DaoWithdrawPhase2() - } - set {_uniqueStorage()._operationOneof = .daoWithdrawPhase2(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// The payload transfer - public enum OneOf_OperationOneof: Equatable { - case nativeTransfer(TW_Nervos_Proto_NativeTransfer) - case sudtTransfer(TW_Nervos_Proto_SudtTransfer) - case daoDeposit(TW_Nervos_Proto_DaoDeposit) - case daoWithdrawPhase1(TW_Nervos_Proto_DaoWithdrawPhase1) - case daoWithdrawPhase2(TW_Nervos_Proto_DaoWithdrawPhase2) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Nervos_Proto_SigningInput.OneOf_OperationOneof, rhs: TW_Nervos_Proto_SigningInput.OneOf_OperationOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.nativeTransfer, .nativeTransfer): return { - guard case .nativeTransfer(let l) = lhs, case .nativeTransfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.sudtTransfer, .sudtTransfer): return { - guard case .sudtTransfer(let l) = lhs, case .sudtTransfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.daoDeposit, .daoDeposit): return { - guard case .daoDeposit(let l) = lhs, case .daoDeposit(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.daoWithdrawPhase1, .daoWithdrawPhase1): return { - guard case .daoWithdrawPhase1(let l) = lhs, case .daoWithdrawPhase1(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.daoWithdrawPhase2, .daoWithdrawPhase2): return { - guard case .daoWithdrawPhase2(let l) = lhs, case .daoWithdrawPhase2(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// An unspent cell output, that can serve as input to a transaction -public struct TW_Nervos_Proto_Cell { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The unspent output - public var outPoint: TW_Nervos_Proto_OutPoint { - get {return _outPoint ?? TW_Nervos_Proto_OutPoint()} - set {_outPoint = newValue} - } - /// Returns true if `outPoint` has been explicitly set. - public var hasOutPoint: Bool {return self._outPoint != nil} - /// Clears the value of `outPoint`. Subsequent reads from it will return its default value. - public mutating func clearOutPoint() {self._outPoint = nil} - - /// Amount of the cell - public var capacity: UInt64 = 0 - - /// Lock script - public var lock: TW_Nervos_Proto_Script { - get {return _lock ?? TW_Nervos_Proto_Script()} - set {_lock = newValue} - } - /// Returns true if `lock` has been explicitly set. - public var hasLock: Bool {return self._lock != nil} - /// Clears the value of `lock`. Subsequent reads from it will return its default value. - public mutating func clearLock() {self._lock = nil} - - /// Type script - public var type: TW_Nervos_Proto_Script { - get {return _type ?? TW_Nervos_Proto_Script()} - set {_type = newValue} - } - /// Returns true if `type` has been explicitly set. - public var hasType: Bool {return self._type != nil} - /// Clears the value of `type`. Subsequent reads from it will return its default value. - public mutating func clearType() {self._type = nil} - - /// Data - public var data: Data = Data() - - /// Optional block number - public var blockNumber: UInt64 = 0 - - /// Optional block hash - public var blockHash: Data = Data() - - /// Optional since the cell is available to spend - public var since: UInt64 = 0 - - /// Optional input type data to be included in witness - public var inputType: Data = Data() - - /// Optional output type data to be included in witness - public var outputType: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _outPoint: TW_Nervos_Proto_OutPoint? = nil - fileprivate var _lock: TW_Nervos_Proto_Script? = nil - fileprivate var _type: TW_Nervos_Proto_Script? = nil -} - -/// Result containing the signed and encoded transaction. -public struct TW_Nervos_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Resulting transaction. Note that the amount may be different than the requested amount to account for fees and available funds. - public var transactionJson: String = String() - - /// Transaction id - public var transactionID: String = String() - - /// Optional error - public var error: TW_Common_Proto_SigningError = .ok - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Nervos.Proto" - -extension TW_Nervos_Proto_TransactionPlan: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionPlan" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "cell_deps"), - 2: .standard(proto: "header_deps"), - 3: .standard(proto: "selected_cells"), - 4: .same(proto: "outputs"), - 5: .standard(proto: "outputs_data"), - 6: .same(proto: "error"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.cellDeps) }() - case 2: try { try decoder.decodeRepeatedBytesField(value: &self.headerDeps) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.selectedCells) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.outputs) }() - case 5: try { try decoder.decodeRepeatedBytesField(value: &self.outputsData) }() - case 6: try { try decoder.decodeSingularEnumField(value: &self.error) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.cellDeps.isEmpty { - try visitor.visitRepeatedMessageField(value: self.cellDeps, fieldNumber: 1) - } - if !self.headerDeps.isEmpty { - try visitor.visitRepeatedBytesField(value: self.headerDeps, fieldNumber: 2) - } - if !self.selectedCells.isEmpty { - try visitor.visitRepeatedMessageField(value: self.selectedCells, fieldNumber: 3) - } - if !self.outputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 4) - } - if !self.outputsData.isEmpty { - try visitor.visitRepeatedBytesField(value: self.outputsData, fieldNumber: 5) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nervos_Proto_TransactionPlan, rhs: TW_Nervos_Proto_TransactionPlan) -> Bool { - if lhs.cellDeps != rhs.cellDeps {return false} - if lhs.headerDeps != rhs.headerDeps {return false} - if lhs.selectedCells != rhs.selectedCells {return false} - if lhs.outputs != rhs.outputs {return false} - if lhs.outputsData != rhs.outputsData {return false} - if lhs.error != rhs.error {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nervos_Proto_CellDep: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CellDep" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "dep_type"), - 2: .standard(proto: "out_point"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.depType) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._outPoint) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.depType.isEmpty { - try visitor.visitSingularStringField(value: self.depType, fieldNumber: 1) - } - try { if let v = self._outPoint { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nervos_Proto_CellDep, rhs: TW_Nervos_Proto_CellDep) -> Bool { - if lhs.depType != rhs.depType {return false} - if lhs._outPoint != rhs._outPoint {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nervos_Proto_OutPoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OutPoint" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "tx_hash"), - 2: .same(proto: "index"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.txHash) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.index) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.txHash.isEmpty { - try visitor.visitSingularBytesField(value: self.txHash, fieldNumber: 1) - } - if self.index != 0 { - try visitor.visitSingularUInt32Field(value: self.index, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nervos_Proto_OutPoint, rhs: TW_Nervos_Proto_OutPoint) -> Bool { - if lhs.txHash != rhs.txHash {return false} - if lhs.index != rhs.index {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nervos_Proto_CellOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CellOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "capacity"), - 2: .same(proto: "lock"), - 3: .same(proto: "type"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.capacity) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._lock) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._type) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.capacity != 0 { - try visitor.visitSingularUInt64Field(value: self.capacity, fieldNumber: 1) - } - try { if let v = self._lock { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try { if let v = self._type { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nervos_Proto_CellOutput, rhs: TW_Nervos_Proto_CellOutput) -> Bool { - if lhs.capacity != rhs.capacity {return false} - if lhs._lock != rhs._lock {return false} - if lhs._type != rhs._type {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nervos_Proto_Script: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Script" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "code_hash"), - 2: .standard(proto: "hash_type"), - 3: .same(proto: "args"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.codeHash) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.hashType) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.args) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.codeHash.isEmpty { - try visitor.visitSingularBytesField(value: self.codeHash, fieldNumber: 1) - } - if !self.hashType.isEmpty { - try visitor.visitSingularStringField(value: self.hashType, fieldNumber: 2) - } - if !self.args.isEmpty { - try visitor.visitSingularBytesField(value: self.args, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nervos_Proto_Script, rhs: TW_Nervos_Proto_Script) -> Bool { - if lhs.codeHash != rhs.codeHash {return false} - if lhs.hashType != rhs.hashType {return false} - if lhs.args != rhs.args {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nervos_Proto_NativeTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".NativeTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "to_address"), - 2: .standard(proto: "change_address"), - 3: .same(proto: "amount"), - 4: .standard(proto: "use_max_amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.changeAddress) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 4: try { try decoder.decodeSingularBoolField(value: &self.useMaxAmount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 1) - } - if !self.changeAddress.isEmpty { - try visitor.visitSingularStringField(value: self.changeAddress, fieldNumber: 2) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 3) - } - if self.useMaxAmount != false { - try visitor.visitSingularBoolField(value: self.useMaxAmount, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nervos_Proto_NativeTransfer, rhs: TW_Nervos_Proto_NativeTransfer) -> Bool { - if lhs.toAddress != rhs.toAddress {return false} - if lhs.changeAddress != rhs.changeAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.useMaxAmount != rhs.useMaxAmount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nervos_Proto_SudtTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SudtTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "to_address"), - 2: .standard(proto: "change_address"), - 3: .standard(proto: "sudt_address"), - 4: .same(proto: "amount"), - 5: .standard(proto: "use_max_amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.changeAddress) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.sudtAddress) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 5: try { try decoder.decodeSingularBoolField(value: &self.useMaxAmount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 1) - } - if !self.changeAddress.isEmpty { - try visitor.visitSingularStringField(value: self.changeAddress, fieldNumber: 2) - } - if !self.sudtAddress.isEmpty { - try visitor.visitSingularBytesField(value: self.sudtAddress, fieldNumber: 3) - } - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 4) - } - if self.useMaxAmount != false { - try visitor.visitSingularBoolField(value: self.useMaxAmount, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nervos_Proto_SudtTransfer, rhs: TW_Nervos_Proto_SudtTransfer) -> Bool { - if lhs.toAddress != rhs.toAddress {return false} - if lhs.changeAddress != rhs.changeAddress {return false} - if lhs.sudtAddress != rhs.sudtAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.useMaxAmount != rhs.useMaxAmount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nervos_Proto_DaoDeposit: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DaoDeposit" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "to_address"), - 2: .standard(proto: "change_address"), - 3: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.changeAddress) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 1) - } - if !self.changeAddress.isEmpty { - try visitor.visitSingularStringField(value: self.changeAddress, fieldNumber: 2) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nervos_Proto_DaoDeposit, rhs: TW_Nervos_Proto_DaoDeposit) -> Bool { - if lhs.toAddress != rhs.toAddress {return false} - if lhs.changeAddress != rhs.changeAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nervos_Proto_DaoWithdrawPhase1: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DaoWithdrawPhase1" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "deposit_cell"), - 2: .standard(proto: "change_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._depositCell) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.changeAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._depositCell { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.changeAddress.isEmpty { - try visitor.visitSingularStringField(value: self.changeAddress, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nervos_Proto_DaoWithdrawPhase1, rhs: TW_Nervos_Proto_DaoWithdrawPhase1) -> Bool { - if lhs._depositCell != rhs._depositCell {return false} - if lhs.changeAddress != rhs.changeAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nervos_Proto_DaoWithdrawPhase2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DaoWithdrawPhase2" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "deposit_cell"), - 2: .standard(proto: "withdrawing_cell"), - 3: .same(proto: "amount"), - ] - - fileprivate class _StorageClass { - var _depositCell: TW_Nervos_Proto_Cell? = nil - var _withdrawingCell: TW_Nervos_Proto_Cell? = nil - var _amount: UInt64 = 0 - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _depositCell = source._depositCell - _withdrawingCell = source._withdrawingCell - _amount = source._amount - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &_storage._depositCell) }() - case 2: try { try decoder.decodeSingularMessageField(value: &_storage._withdrawingCell) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &_storage._amount) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = _storage._depositCell { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - try { if let v = _storage._withdrawingCell { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - if _storage._amount != 0 { - try visitor.visitSingularUInt64Field(value: _storage._amount, fieldNumber: 3) - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nervos_Proto_DaoWithdrawPhase2, rhs: TW_Nervos_Proto_DaoWithdrawPhase2) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._depositCell != rhs_storage._depositCell {return false} - if _storage._withdrawingCell != rhs_storage._withdrawingCell {return false} - if _storage._amount != rhs_storage._amount {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nervos_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "byte_fee"), - 2: .standard(proto: "private_key"), - 3: .same(proto: "cell"), - 4: .same(proto: "plan"), - 5: .standard(proto: "native_transfer"), - 6: .standard(proto: "sudt_transfer"), - 7: .standard(proto: "dao_deposit"), - 8: .standard(proto: "dao_withdraw_phase1"), - 9: .standard(proto: "dao_withdraw_phase2"), - ] - - fileprivate class _StorageClass { - var _byteFee: UInt64 = 0 - var _privateKey: [Data] = [] - var _cell: [TW_Nervos_Proto_Cell] = [] - var _plan: TW_Nervos_Proto_TransactionPlan? = nil - var _operationOneof: TW_Nervos_Proto_SigningInput.OneOf_OperationOneof? - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _byteFee = source._byteFee - _privateKey = source._privateKey - _cell = source._cell - _plan = source._plan - _operationOneof = source._operationOneof - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &_storage._byteFee) }() - case 2: try { try decoder.decodeRepeatedBytesField(value: &_storage._privateKey) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &_storage._cell) }() - case 4: try { try decoder.decodeSingularMessageField(value: &_storage._plan) }() - case 5: try { - var v: TW_Nervos_Proto_NativeTransfer? - var hadOneofValue = false - if let current = _storage._operationOneof { - hadOneofValue = true - if case .nativeTransfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._operationOneof = .nativeTransfer(v) - } - }() - case 6: try { - var v: TW_Nervos_Proto_SudtTransfer? - var hadOneofValue = false - if let current = _storage._operationOneof { - hadOneofValue = true - if case .sudtTransfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._operationOneof = .sudtTransfer(v) - } - }() - case 7: try { - var v: TW_Nervos_Proto_DaoDeposit? - var hadOneofValue = false - if let current = _storage._operationOneof { - hadOneofValue = true - if case .daoDeposit(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._operationOneof = .daoDeposit(v) - } - }() - case 8: try { - var v: TW_Nervos_Proto_DaoWithdrawPhase1? - var hadOneofValue = false - if let current = _storage._operationOneof { - hadOneofValue = true - if case .daoWithdrawPhase1(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._operationOneof = .daoWithdrawPhase1(v) - } - }() - case 9: try { - var v: TW_Nervos_Proto_DaoWithdrawPhase2? - var hadOneofValue = false - if let current = _storage._operationOneof { - hadOneofValue = true - if case .daoWithdrawPhase2(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._operationOneof = .daoWithdrawPhase2(v) - } - }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if _storage._byteFee != 0 { - try visitor.visitSingularUInt64Field(value: _storage._byteFee, fieldNumber: 1) - } - if !_storage._privateKey.isEmpty { - try visitor.visitRepeatedBytesField(value: _storage._privateKey, fieldNumber: 2) - } - if !_storage._cell.isEmpty { - try visitor.visitRepeatedMessageField(value: _storage._cell, fieldNumber: 3) - } - try { if let v = _storage._plan { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - switch _storage._operationOneof { - case .nativeTransfer?: try { - guard case .nativeTransfer(let v)? = _storage._operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - }() - case .sudtTransfer?: try { - guard case .sudtTransfer(let v)? = _storage._operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - }() - case .daoDeposit?: try { - guard case .daoDeposit(let v)? = _storage._operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - }() - case .daoWithdrawPhase1?: try { - guard case .daoWithdrawPhase1(let v)? = _storage._operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case .daoWithdrawPhase2?: try { - guard case .daoWithdrawPhase2(let v)? = _storage._operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case nil: break - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nervos_Proto_SigningInput, rhs: TW_Nervos_Proto_SigningInput) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._byteFee != rhs_storage._byteFee {return false} - if _storage._privateKey != rhs_storage._privateKey {return false} - if _storage._cell != rhs_storage._cell {return false} - if _storage._plan != rhs_storage._plan {return false} - if _storage._operationOneof != rhs_storage._operationOneof {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nervos_Proto_Cell: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Cell" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "out_point"), - 2: .same(proto: "capacity"), - 3: .same(proto: "lock"), - 4: .same(proto: "type"), - 5: .same(proto: "data"), - 6: .standard(proto: "block_number"), - 7: .standard(proto: "block_hash"), - 8: .same(proto: "since"), - 9: .standard(proto: "input_type"), - 10: .standard(proto: "output_type"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._outPoint) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.capacity) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._lock) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._type) }() - case 5: try { try decoder.decodeSingularBytesField(value: &self.data) }() - case 6: try { try decoder.decodeSingularUInt64Field(value: &self.blockNumber) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.blockHash) }() - case 8: try { try decoder.decodeSingularUInt64Field(value: &self.since) }() - case 9: try { try decoder.decodeSingularBytesField(value: &self.inputType) }() - case 10: try { try decoder.decodeSingularBytesField(value: &self.outputType) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._outPoint { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if self.capacity != 0 { - try visitor.visitSingularUInt64Field(value: self.capacity, fieldNumber: 2) - } - try { if let v = self._lock { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - try { if let v = self._type { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 5) - } - if self.blockNumber != 0 { - try visitor.visitSingularUInt64Field(value: self.blockNumber, fieldNumber: 6) - } - if !self.blockHash.isEmpty { - try visitor.visitSingularBytesField(value: self.blockHash, fieldNumber: 7) - } - if self.since != 0 { - try visitor.visitSingularUInt64Field(value: self.since, fieldNumber: 8) - } - if !self.inputType.isEmpty { - try visitor.visitSingularBytesField(value: self.inputType, fieldNumber: 9) - } - if !self.outputType.isEmpty { - try visitor.visitSingularBytesField(value: self.outputType, fieldNumber: 10) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nervos_Proto_Cell, rhs: TW_Nervos_Proto_Cell) -> Bool { - if lhs._outPoint != rhs._outPoint {return false} - if lhs.capacity != rhs.capacity {return false} - if lhs._lock != rhs._lock {return false} - if lhs._type != rhs._type {return false} - if lhs.data != rhs.data {return false} - if lhs.blockNumber != rhs.blockNumber {return false} - if lhs.blockHash != rhs.blockHash {return false} - if lhs.since != rhs.since {return false} - if lhs.inputType != rhs.inputType {return false} - if lhs.outputType != rhs.outputType {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nervos_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "transaction_json"), - 2: .standard(proto: "transaction_id"), - 3: .same(proto: "error"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.transactionJson) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.transactionID) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.transactionJson.isEmpty { - try visitor.visitSingularStringField(value: self.transactionJson, fieldNumber: 1) - } - if !self.transactionID.isEmpty { - try visitor.visitSingularStringField(value: self.transactionID, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nervos_Proto_SigningOutput, rhs: TW_Nervos_Proto_SigningOutput) -> Bool { - if lhs.transactionJson != rhs.transactionJson {return false} - if lhs.transactionID != rhs.transactionID {return false} - if lhs.error != rhs.error {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nimiq+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nimiq+Proto.swift deleted file mode 100644 index 5ce50934..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nimiq+Proto.swift +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias NimiqSigningInput = TW_Nimiq_Proto_SigningInput -public typealias NimiqSigningOutput = TW_Nimiq_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nimiq.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nimiq.pb.swift deleted file mode 100644 index 04c2a8d6..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Nimiq.pb.swift +++ /dev/null @@ -1,153 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Nimiq.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Input data necessary to create a signed transaction. -public struct TW_Nimiq_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Destination address - public var destination: String = String() - - /// Amount of the transfer - public var value: UInt64 = 0 - - /// Fee amount - public var fee: UInt64 = 0 - - /// Validity start, in block height - public var validityStartHeight: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Nimiq_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The encoded transaction - public var encoded: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Nimiq.Proto" - -extension TW_Nimiq_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "private_key"), - 2: .same(proto: "destination"), - 3: .same(proto: "value"), - 4: .same(proto: "fee"), - 5: .standard(proto: "validity_start_height"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.destination) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() - case 4: try { try decoder.decodeSingularUInt64Field(value: &self.fee) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &self.validityStartHeight) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 1) - } - if !self.destination.isEmpty { - try visitor.visitSingularStringField(value: self.destination, fieldNumber: 2) - } - if self.value != 0 { - try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 3) - } - if self.fee != 0 { - try visitor.visitSingularUInt64Field(value: self.fee, fieldNumber: 4) - } - if self.validityStartHeight != 0 { - try visitor.visitSingularUInt32Field(value: self.validityStartHeight, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nimiq_Proto_SigningInput, rhs: TW_Nimiq_Proto_SigningInput) -> Bool { - if lhs.privateKey != rhs.privateKey {return false} - if lhs.destination != rhs.destination {return false} - if lhs.value != rhs.value {return false} - if lhs.fee != rhs.fee {return false} - if lhs.validityStartHeight != rhs.validityStartHeight {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Nimiq_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Nimiq_Proto_SigningOutput, rhs: TW_Nimiq_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Oasis+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Oasis+Proto.swift deleted file mode 100644 index 530d47da..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Oasis+Proto.swift +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias OasisTransferMessage = TW_Oasis_Proto_TransferMessage -public typealias OasisEscrowMessage = TW_Oasis_Proto_EscrowMessage -public typealias OasisReclaimEscrowMessage = TW_Oasis_Proto_ReclaimEscrowMessage -public typealias OasisSigningInput = TW_Oasis_Proto_SigningInput -public typealias OasisSigningOutput = TW_Oasis_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Oasis.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Oasis.pb.swift deleted file mode 100644 index 5f890ce9..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Oasis.pb.swift +++ /dev/null @@ -1,519 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Oasis.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Transfer -public struct TW_Oasis_Proto_TransferMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// destination address - public var to: String = String() - - /// Gas price - public var gasPrice: UInt64 = 0 - - /// Amount values strings prefixed by zero. e.g. "\u000010000000" - public var gasAmount: String = String() - - /// Amount values strings prefixed by zero - public var amount: String = String() - - /// Nonce (should be larger than in the last transaction of the account) - public var nonce: UInt64 = 0 - - /// Context, see https://docs.oasis.dev/oasis-core/common-functionality/crypto#domain-separation - public var context: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Oasis_Proto_EscrowMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var gasPrice: UInt64 = 0 - - public var gasAmount: String = String() - - public var nonce: UInt64 = 0 - - public var account: String = String() - - public var amount: String = String() - - public var context: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Oasis_Proto_ReclaimEscrowMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var gasPrice: UInt64 = 0 - - public var gasAmount: String = String() - - public var nonce: UInt64 = 0 - - public var account: String = String() - - public var shares: String = String() - - public var context: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Oasis_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Transfer payload - public var message: TW_Oasis_Proto_SigningInput.OneOf_Message? = nil - - public var transfer: TW_Oasis_Proto_TransferMessage { - get { - if case .transfer(let v)? = message {return v} - return TW_Oasis_Proto_TransferMessage() - } - set {message = .transfer(newValue)} - } - - public var escrow: TW_Oasis_Proto_EscrowMessage { - get { - if case .escrow(let v)? = message {return v} - return TW_Oasis_Proto_EscrowMessage() - } - set {message = .escrow(newValue)} - } - - public var reclaimEscrow: TW_Oasis_Proto_ReclaimEscrowMessage { - get { - if case .reclaimEscrow(let v)? = message {return v} - return TW_Oasis_Proto_ReclaimEscrowMessage() - } - set {message = .reclaimEscrow(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Transfer payload - public enum OneOf_Message: Equatable { - case transfer(TW_Oasis_Proto_TransferMessage) - case escrow(TW_Oasis_Proto_EscrowMessage) - case reclaimEscrow(TW_Oasis_Proto_ReclaimEscrowMessage) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Oasis_Proto_SigningInput.OneOf_Message, rhs: TW_Oasis_Proto_SigningInput.OneOf_Message) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transfer, .transfer): return { - guard case .transfer(let l) = lhs, case .transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.escrow, .escrow): return { - guard case .escrow(let l) = lhs, case .escrow(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.reclaimEscrow, .reclaimEscrow): return { - guard case .reclaimEscrow(let l) = lhs, case .reclaimEscrow(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Oasis_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Oasis.Proto" - -extension TW_Oasis_Proto_TransferMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransferMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "to"), - 2: .standard(proto: "gas_price"), - 3: .standard(proto: "gas_amount"), - 4: .same(proto: "amount"), - 5: .same(proto: "nonce"), - 6: .same(proto: "context"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.gasPrice) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.gasAmount) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.nonce) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.context) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 1) - } - if self.gasPrice != 0 { - try visitor.visitSingularUInt64Field(value: self.gasPrice, fieldNumber: 2) - } - if !self.gasAmount.isEmpty { - try visitor.visitSingularStringField(value: self.gasAmount, fieldNumber: 3) - } - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 4) - } - if self.nonce != 0 { - try visitor.visitSingularUInt64Field(value: self.nonce, fieldNumber: 5) - } - if !self.context.isEmpty { - try visitor.visitSingularStringField(value: self.context, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Oasis_Proto_TransferMessage, rhs: TW_Oasis_Proto_TransferMessage) -> Bool { - if lhs.to != rhs.to {return false} - if lhs.gasPrice != rhs.gasPrice {return false} - if lhs.gasAmount != rhs.gasAmount {return false} - if lhs.amount != rhs.amount {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.context != rhs.context {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Oasis_Proto_EscrowMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".EscrowMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "gas_price"), - 2: .standard(proto: "gas_amount"), - 3: .same(proto: "nonce"), - 4: .same(proto: "account"), - 5: .same(proto: "amount"), - 6: .same(proto: "context"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.gasPrice) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.gasAmount) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.nonce) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.account) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.amount) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.context) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.gasPrice != 0 { - try visitor.visitSingularUInt64Field(value: self.gasPrice, fieldNumber: 1) - } - if !self.gasAmount.isEmpty { - try visitor.visitSingularStringField(value: self.gasAmount, fieldNumber: 2) - } - if self.nonce != 0 { - try visitor.visitSingularUInt64Field(value: self.nonce, fieldNumber: 3) - } - if !self.account.isEmpty { - try visitor.visitSingularStringField(value: self.account, fieldNumber: 4) - } - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 5) - } - if !self.context.isEmpty { - try visitor.visitSingularStringField(value: self.context, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Oasis_Proto_EscrowMessage, rhs: TW_Oasis_Proto_EscrowMessage) -> Bool { - if lhs.gasPrice != rhs.gasPrice {return false} - if lhs.gasAmount != rhs.gasAmount {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.account != rhs.account {return false} - if lhs.amount != rhs.amount {return false} - if lhs.context != rhs.context {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Oasis_Proto_ReclaimEscrowMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".ReclaimEscrowMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "gas_price"), - 2: .standard(proto: "gas_amount"), - 3: .same(proto: "nonce"), - 4: .same(proto: "account"), - 5: .same(proto: "shares"), - 6: .same(proto: "context"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.gasPrice) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.gasAmount) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.nonce) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.account) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.shares) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.context) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.gasPrice != 0 { - try visitor.visitSingularUInt64Field(value: self.gasPrice, fieldNumber: 1) - } - if !self.gasAmount.isEmpty { - try visitor.visitSingularStringField(value: self.gasAmount, fieldNumber: 2) - } - if self.nonce != 0 { - try visitor.visitSingularUInt64Field(value: self.nonce, fieldNumber: 3) - } - if !self.account.isEmpty { - try visitor.visitSingularStringField(value: self.account, fieldNumber: 4) - } - if !self.shares.isEmpty { - try visitor.visitSingularStringField(value: self.shares, fieldNumber: 5) - } - if !self.context.isEmpty { - try visitor.visitSingularStringField(value: self.context, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Oasis_Proto_ReclaimEscrowMessage, rhs: TW_Oasis_Proto_ReclaimEscrowMessage) -> Bool { - if lhs.gasPrice != rhs.gasPrice {return false} - if lhs.gasAmount != rhs.gasAmount {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.account != rhs.account {return false} - if lhs.shares != rhs.shares {return false} - if lhs.context != rhs.context {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Oasis_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "private_key"), - 2: .same(proto: "transfer"), - 3: .same(proto: "escrow"), - 4: .same(proto: "reclaimEscrow"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 2: try { - var v: TW_Oasis_Proto_TransferMessage? - var hadOneofValue = false - if let current = self.message { - hadOneofValue = true - if case .transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.message = .transfer(v) - } - }() - case 3: try { - var v: TW_Oasis_Proto_EscrowMessage? - var hadOneofValue = false - if let current = self.message { - hadOneofValue = true - if case .escrow(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.message = .escrow(v) - } - }() - case 4: try { - var v: TW_Oasis_Proto_ReclaimEscrowMessage? - var hadOneofValue = false - if let current = self.message { - hadOneofValue = true - if case .reclaimEscrow(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.message = .reclaimEscrow(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 1) - } - switch self.message { - case .transfer?: try { - guard case .transfer(let v)? = self.message else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .escrow?: try { - guard case .escrow(let v)? = self.message else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .reclaimEscrow?: try { - guard case .reclaimEscrow(let v)? = self.message else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Oasis_Proto_SigningInput, rhs: TW_Oasis_Proto_SigningInput) -> Bool { - if lhs.privateKey != rhs.privateKey {return false} - if lhs.message != rhs.message {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Oasis_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Oasis_Proto_SigningOutput, rhs: TW_Oasis_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ontology+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ontology+Proto.swift deleted file mode 100644 index c5857c0a..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ontology+Proto.swift +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias OntologySigningInput = TW_Ontology_Proto_SigningInput -public typealias OntologySigningOutput = TW_Ontology_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ontology.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ontology.pb.swift deleted file mode 100644 index 235f714c..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ontology.pb.swift +++ /dev/null @@ -1,234 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Ontology.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Input data necessary to create a signed transaction. -public struct TW_Ontology_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Contract ID, e.g. "ONT" - public var contract: String = String() - - /// Method, e.g. "transfer" - public var method: String = String() - - /// The secret private key used for signing (32 bytes). - public var ownerPrivateKey: Data = Data() - - /// base58 encode address string (160-bit number) - public var toAddress: String = String() - - /// Transfer amount - public var amount: UInt64 = 0 - - /// Private key of the payer - public var payerPrivateKey: Data = Data() - - /// Gas price - public var gasPrice: UInt64 = 0 - - /// Limit for gas used - public var gasLimit: UInt64 = 0 - - /// base58 encode address string (160-bit number) - public var queryAddress: String = String() - - /// Nonce (should be larger than in the last transaction of the account) - public var nonce: UInt32 = 0 - - /// base58 encode address string (160-bit number) - public var ownerAddress: String = String() - - /// base58 encode address string (160-bit number) - public var payerAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Ontology_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Ontology.Proto" - -extension TW_Ontology_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "contract"), - 2: .same(proto: "method"), - 3: .standard(proto: "owner_private_key"), - 4: .standard(proto: "to_address"), - 5: .same(proto: "amount"), - 6: .standard(proto: "payer_private_key"), - 7: .standard(proto: "gas_price"), - 8: .standard(proto: "gas_limit"), - 9: .standard(proto: "query_address"), - 10: .same(proto: "nonce"), - 11: .standard(proto: "owner_address"), - 12: .standard(proto: "payer_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.contract) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.method) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.ownerPrivateKey) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.payerPrivateKey) }() - case 7: try { try decoder.decodeSingularUInt64Field(value: &self.gasPrice) }() - case 8: try { try decoder.decodeSingularUInt64Field(value: &self.gasLimit) }() - case 9: try { try decoder.decodeSingularStringField(value: &self.queryAddress) }() - case 10: try { try decoder.decodeSingularUInt32Field(value: &self.nonce) }() - case 11: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 12: try { try decoder.decodeSingularStringField(value: &self.payerAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.contract.isEmpty { - try visitor.visitSingularStringField(value: self.contract, fieldNumber: 1) - } - if !self.method.isEmpty { - try visitor.visitSingularStringField(value: self.method, fieldNumber: 2) - } - if !self.ownerPrivateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.ownerPrivateKey, fieldNumber: 3) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 4) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 5) - } - if !self.payerPrivateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.payerPrivateKey, fieldNumber: 6) - } - if self.gasPrice != 0 { - try visitor.visitSingularUInt64Field(value: self.gasPrice, fieldNumber: 7) - } - if self.gasLimit != 0 { - try visitor.visitSingularUInt64Field(value: self.gasLimit, fieldNumber: 8) - } - if !self.queryAddress.isEmpty { - try visitor.visitSingularStringField(value: self.queryAddress, fieldNumber: 9) - } - if self.nonce != 0 { - try visitor.visitSingularUInt32Field(value: self.nonce, fieldNumber: 10) - } - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 11) - } - if !self.payerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.payerAddress, fieldNumber: 12) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ontology_Proto_SigningInput, rhs: TW_Ontology_Proto_SigningInput) -> Bool { - if lhs.contract != rhs.contract {return false} - if lhs.method != rhs.method {return false} - if lhs.ownerPrivateKey != rhs.ownerPrivateKey {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.payerPrivateKey != rhs.payerPrivateKey {return false} - if lhs.gasPrice != rhs.gasPrice {return false} - if lhs.gasLimit != rhs.gasLimit {return false} - if lhs.queryAddress != rhs.queryAddress {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.payerAddress != rhs.payerAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ontology_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ontology_Proto_SigningOutput, rhs: TW_Ontology_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Polkadot+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Polkadot+Proto.swift deleted file mode 100644 index 4b0b70f7..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Polkadot+Proto.swift +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias PolkadotEra = TW_Polkadot_Proto_Era -public typealias PolkadotCustomCallIndices = TW_Polkadot_Proto_CustomCallIndices -public typealias PolkadotCallIndices = TW_Polkadot_Proto_CallIndices -public typealias PolkadotBalance = TW_Polkadot_Proto_Balance -public typealias PolkadotStaking = TW_Polkadot_Proto_Staking -public typealias PolkadotIdentity = TW_Polkadot_Proto_Identity -public typealias PolkadotPolymeshCall = TW_Polkadot_Proto_PolymeshCall -public typealias PolkadotSigningInput = TW_Polkadot_Proto_SigningInput -public typealias PolkadotSigningOutput = TW_Polkadot_Proto_SigningOutput -public typealias PolkadotRewardDestination = TW_Polkadot_Proto_RewardDestination diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Polkadot.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Polkadot.pb.swift deleted file mode 100644 index 2834e25c..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Polkadot.pb.swift +++ /dev/null @@ -1,2683 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Polkadot.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Destination options for reward -public enum TW_Polkadot_Proto_RewardDestination: SwiftProtobuf.Enum { - public typealias RawValue = Int - case staked // = 0 - case stash // = 1 - case controller // = 2 - case UNRECOGNIZED(Int) - - public init() { - self = .staked - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .staked - case 1: self = .stash - case 2: self = .controller - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .staked: return 0 - case .stash: return 1 - case .controller: return 2 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Polkadot_Proto_RewardDestination: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Polkadot_Proto_RewardDestination] = [ - .staked, - .stash, - .controller, - ] -} - -#endif // swift(>=4.2) - -/// An era, a period defined by a starting block and length -public struct TW_Polkadot_Proto_Era { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// recent block number (called phase in polkadot code), should match block hash - public var blockNumber: UInt64 = 0 - - /// length of period, calculated from block number, e.g. 64 - public var period: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Readable decoded call indices can be found at https://www.subscan.io/ -public struct TW_Polkadot_Proto_CustomCallIndices { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Module index. - public var moduleIndex: Int32 = 0 - - /// Method index. - public var methodIndex: Int32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Optional call indices. -/// Must be set if `SigningInput::network` is different from `Polkadot` and `Kusama`. -public struct TW_Polkadot_Proto_CallIndices { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var variant: TW_Polkadot_Proto_CallIndices.OneOf_Variant? = nil - - public var custom: TW_Polkadot_Proto_CustomCallIndices { - get { - if case .custom(let v)? = variant {return v} - return TW_Polkadot_Proto_CustomCallIndices() - } - set {variant = .custom(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_Variant: Equatable { - case custom(TW_Polkadot_Proto_CustomCallIndices) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Polkadot_Proto_CallIndices.OneOf_Variant, rhs: TW_Polkadot_Proto_CallIndices.OneOf_Variant) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.custom, .custom): return { - guard case .custom(let l) = lhs, case .custom(let r) = rhs else { preconditionFailure() } - return l == r - }() - } - } - #endif - } - - public init() {} -} - -/// Balance transfer transaction -public struct TW_Polkadot_Proto_Balance { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var messageOneof: TW_Polkadot_Proto_Balance.OneOf_MessageOneof? = nil - - public var transfer: TW_Polkadot_Proto_Balance.Transfer { - get { - if case .transfer(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Balance.Transfer() - } - set {messageOneof = .transfer(newValue)} - } - - public var batchTransfer: TW_Polkadot_Proto_Balance.BatchTransfer { - get { - if case .batchTransfer(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Balance.BatchTransfer() - } - set {messageOneof = .batchTransfer(newValue)} - } - - public var assetTransfer: TW_Polkadot_Proto_Balance.AssetTransfer { - get { - if case .assetTransfer(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Balance.AssetTransfer() - } - set {messageOneof = .assetTransfer(newValue)} - } - - public var batchAssetTransfer: TW_Polkadot_Proto_Balance.BatchAssetTransfer { - get { - if case .batchAssetTransfer(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Balance.BatchAssetTransfer() - } - set {messageOneof = .batchAssetTransfer(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_MessageOneof: Equatable { - case transfer(TW_Polkadot_Proto_Balance.Transfer) - case batchTransfer(TW_Polkadot_Proto_Balance.BatchTransfer) - case assetTransfer(TW_Polkadot_Proto_Balance.AssetTransfer) - case batchAssetTransfer(TW_Polkadot_Proto_Balance.BatchAssetTransfer) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Polkadot_Proto_Balance.OneOf_MessageOneof, rhs: TW_Polkadot_Proto_Balance.OneOf_MessageOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transfer, .transfer): return { - guard case .transfer(let l) = lhs, case .transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.batchTransfer, .batchTransfer): return { - guard case .batchTransfer(let l) = lhs, case .batchTransfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.assetTransfer, .assetTransfer): return { - guard case .assetTransfer(let l) = lhs, case .assetTransfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.batchAssetTransfer, .batchAssetTransfer): return { - guard case .batchAssetTransfer(let l) = lhs, case .batchAssetTransfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - /// transfer - public struct Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// destination address - public var toAddress: String = String() - - /// amount (uint256, serialized little endian) - public var value: Data = Data() - - /// max 32 chars - public var memo: String = String() - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - /// batch tranfer - public struct BatchTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - public var transfers: [TW_Polkadot_Proto_Balance.Transfer] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - /// asset transfer - public struct AssetTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - /// destination - public var toAddress: String = String() - - /// value - BigInteger - public var value: Data = Data() - - /// asset identifier - public var assetID: UInt32 = 0 - - /// fee asset identifier - public var feeAssetID: UInt32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - /// batch asset transfer - public struct BatchAssetTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - /// fee asset identifier - public var feeAssetID: UInt32 = 0 - - public var transfers: [TW_Polkadot_Proto_Balance.AssetTransfer] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - public init() {} -} - -/// Staking transaction -public struct TW_Polkadot_Proto_Staking { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Payload messsage - public var messageOneof: TW_Polkadot_Proto_Staking.OneOf_MessageOneof? = nil - - public var bond: TW_Polkadot_Proto_Staking.Bond { - get { - if case .bond(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Staking.Bond() - } - set {messageOneof = .bond(newValue)} - } - - public var bondAndNominate: TW_Polkadot_Proto_Staking.BondAndNominate { - get { - if case .bondAndNominate(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Staking.BondAndNominate() - } - set {messageOneof = .bondAndNominate(newValue)} - } - - public var bondExtra: TW_Polkadot_Proto_Staking.BondExtra { - get { - if case .bondExtra(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Staking.BondExtra() - } - set {messageOneof = .bondExtra(newValue)} - } - - public var unbond: TW_Polkadot_Proto_Staking.Unbond { - get { - if case .unbond(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Staking.Unbond() - } - set {messageOneof = .unbond(newValue)} - } - - public var withdrawUnbonded: TW_Polkadot_Proto_Staking.WithdrawUnbonded { - get { - if case .withdrawUnbonded(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Staking.WithdrawUnbonded() - } - set {messageOneof = .withdrawUnbonded(newValue)} - } - - public var nominate: TW_Polkadot_Proto_Staking.Nominate { - get { - if case .nominate(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Staking.Nominate() - } - set {messageOneof = .nominate(newValue)} - } - - public var chill: TW_Polkadot_Proto_Staking.Chill { - get { - if case .chill(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Staking.Chill() - } - set {messageOneof = .chill(newValue)} - } - - public var chillAndUnbond: TW_Polkadot_Proto_Staking.ChillAndUnbond { - get { - if case .chillAndUnbond(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Staking.ChillAndUnbond() - } - set {messageOneof = .chillAndUnbond(newValue)} - } - - public var rebond: TW_Polkadot_Proto_Staking.Rebond { - get { - if case .rebond(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Staking.Rebond() - } - set {messageOneof = .rebond(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Payload messsage - public enum OneOf_MessageOneof: Equatable { - case bond(TW_Polkadot_Proto_Staking.Bond) - case bondAndNominate(TW_Polkadot_Proto_Staking.BondAndNominate) - case bondExtra(TW_Polkadot_Proto_Staking.BondExtra) - case unbond(TW_Polkadot_Proto_Staking.Unbond) - case withdrawUnbonded(TW_Polkadot_Proto_Staking.WithdrawUnbonded) - case nominate(TW_Polkadot_Proto_Staking.Nominate) - case chill(TW_Polkadot_Proto_Staking.Chill) - case chillAndUnbond(TW_Polkadot_Proto_Staking.ChillAndUnbond) - case rebond(TW_Polkadot_Proto_Staking.Rebond) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Polkadot_Proto_Staking.OneOf_MessageOneof, rhs: TW_Polkadot_Proto_Staking.OneOf_MessageOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.bond, .bond): return { - guard case .bond(let l) = lhs, case .bond(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.bondAndNominate, .bondAndNominate): return { - guard case .bondAndNominate(let l) = lhs, case .bondAndNominate(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.bondExtra, .bondExtra): return { - guard case .bondExtra(let l) = lhs, case .bondExtra(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.unbond, .unbond): return { - guard case .unbond(let l) = lhs, case .unbond(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.withdrawUnbonded, .withdrawUnbonded): return { - guard case .withdrawUnbonded(let l) = lhs, case .withdrawUnbonded(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.nominate, .nominate): return { - guard case .nominate(let l) = lhs, case .nominate(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.chill, .chill): return { - guard case .chill(let l) = lhs, case .chill(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.chillAndUnbond, .chillAndUnbond): return { - guard case .chillAndUnbond(let l) = lhs, case .chillAndUnbond(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.rebond, .rebond): return { - guard case .rebond(let l) = lhs, case .rebond(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - /// Bond to a controller - public struct Bond { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// controller ID (optional) - public var controller: String = String() - - /// amount (uint256, serialized little endian) - public var value: Data = Data() - - /// destination for rewards - public var rewardDestination: TW_Polkadot_Proto_RewardDestination = .staked - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - /// Bond to a controller, with nominators - public struct BondAndNominate { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// controller ID (optional) - public var controller: String = String() - - /// amount (uint256, serialized little endian) - public var value: Data = Data() - - /// destination for rewards - public var rewardDestination: TW_Polkadot_Proto_RewardDestination = .staked - - /// list of nominators - public var nominators: [String] = [] - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - /// Bond extra amount - public struct BondExtra { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// amount (uint256, serialized little endian) - public var value: Data = Data() - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - /// Unbond - public struct Unbond { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// amount (uint256, serialized little endian) - public var value: Data = Data() - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - /// Rebond - public struct Rebond { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// amount (uint256, serialized little endian) - public var value: Data = Data() - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - /// Withdraw unbonded amounts - public struct WithdrawUnbonded { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var slashingSpans: Int32 = 0 - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - /// Nominate - public struct Nominate { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// list of nominators - public var nominators: [String] = [] - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - /// Chill and unbound - public struct ChillAndUnbond { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// amount (uint256, serialized little endian) - public var value: Data = Data() - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - /// Chill - public struct Chill { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - public init() {} -} - -/// Identity module -public struct TW_Polkadot_Proto_Identity { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var messageOneof: TW_Polkadot_Proto_Identity.OneOf_MessageOneof? = nil - - public var joinIdentityAsKey: TW_Polkadot_Proto_Identity.JoinIdentityAsKey { - get { - if case .joinIdentityAsKey(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Identity.JoinIdentityAsKey() - } - set {messageOneof = .joinIdentityAsKey(newValue)} - } - - public var addAuthorization: TW_Polkadot_Proto_Identity.AddAuthorization { - get { - if case .addAuthorization(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Identity.AddAuthorization() - } - set {messageOneof = .addAuthorization(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_MessageOneof: Equatable { - case joinIdentityAsKey(TW_Polkadot_Proto_Identity.JoinIdentityAsKey) - case addAuthorization(TW_Polkadot_Proto_Identity.AddAuthorization) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Polkadot_Proto_Identity.OneOf_MessageOneof, rhs: TW_Polkadot_Proto_Identity.OneOf_MessageOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.joinIdentityAsKey, .joinIdentityAsKey): return { - guard case .joinIdentityAsKey(let l) = lhs, case .joinIdentityAsKey(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.addAuthorization, .addAuthorization): return { - guard case .addAuthorization(let l) = lhs, case .addAuthorization(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - /// Identity::join_identity_as_key call - public struct JoinIdentityAsKey { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - /// auth id - public var authID: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - } - - /// Identity::add_authorization call - public struct AddAuthorization { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// call indices - public var callIndices: TW_Polkadot_Proto_CallIndices { - get {return _callIndices ?? TW_Polkadot_Proto_CallIndices()} - set {_callIndices = newValue} - } - /// Returns true if `callIndices` has been explicitly set. - public var hasCallIndices: Bool {return self._callIndices != nil} - /// Clears the value of `callIndices`. Subsequent reads from it will return its default value. - public mutating func clearCallIndices() {self._callIndices = nil} - - /// address that will be added to the Identity - public var target: String = String() - - /// authorization data, null means all permissions - public var data: TW_Polkadot_Proto_Identity.AddAuthorization.AuthData { - get {return _data ?? TW_Polkadot_Proto_Identity.AddAuthorization.AuthData()} - set {_data = newValue} - } - /// Returns true if `data` has been explicitly set. - public var hasData: Bool {return self._data != nil} - /// Clears the value of `data`. Subsequent reads from it will return its default value. - public mutating func clearData() {self._data = nil} - - /// expire time, unix seconds - public var expiry: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public struct DataMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var data: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public struct AuthData { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// authorization data, empty means all permissions, null means no permissions - public var asset: TW_Polkadot_Proto_Identity.AddAuthorization.DataMessage { - get {return _asset ?? TW_Polkadot_Proto_Identity.AddAuthorization.DataMessage()} - set {_asset = newValue} - } - /// Returns true if `asset` has been explicitly set. - public var hasAsset: Bool {return self._asset != nil} - /// Clears the value of `asset`. Subsequent reads from it will return its default value. - public mutating func clearAsset() {self._asset = nil} - - /// authorization data, empty means all permissions, null means no permissions - public var extrinsic: TW_Polkadot_Proto_Identity.AddAuthorization.DataMessage { - get {return _extrinsic ?? TW_Polkadot_Proto_Identity.AddAuthorization.DataMessage()} - set {_extrinsic = newValue} - } - /// Returns true if `extrinsic` has been explicitly set. - public var hasExtrinsic: Bool {return self._extrinsic != nil} - /// Clears the value of `extrinsic`. Subsequent reads from it will return its default value. - public mutating func clearExtrinsic() {self._extrinsic = nil} - - /// authorization data, empty means all permissions, null means no permissions - public var portfolio: TW_Polkadot_Proto_Identity.AddAuthorization.DataMessage { - get {return _portfolio ?? TW_Polkadot_Proto_Identity.AddAuthorization.DataMessage()} - set {_portfolio = newValue} - } - /// Returns true if `portfolio` has been explicitly set. - public var hasPortfolio: Bool {return self._portfolio != nil} - /// Clears the value of `portfolio`. Subsequent reads from it will return its default value. - public mutating func clearPortfolio() {self._portfolio = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _asset: TW_Polkadot_Proto_Identity.AddAuthorization.DataMessage? = nil - fileprivate var _extrinsic: TW_Polkadot_Proto_Identity.AddAuthorization.DataMessage? = nil - fileprivate var _portfolio: TW_Polkadot_Proto_Identity.AddAuthorization.DataMessage? = nil - } - - public init() {} - - fileprivate var _callIndices: TW_Polkadot_Proto_CallIndices? = nil - fileprivate var _data: TW_Polkadot_Proto_Identity.AddAuthorization.AuthData? = nil - } - - public init() {} -} - -/// Polymesh call -public struct TW_Polkadot_Proto_PolymeshCall { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var messageOneof: TW_Polkadot_Proto_PolymeshCall.OneOf_MessageOneof? = nil - - public var identityCall: TW_Polkadot_Proto_Identity { - get { - if case .identityCall(let v)? = messageOneof {return v} - return TW_Polkadot_Proto_Identity() - } - set {messageOneof = .identityCall(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_MessageOneof: Equatable { - case identityCall(TW_Polkadot_Proto_Identity) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Polkadot_Proto_PolymeshCall.OneOf_MessageOneof, rhs: TW_Polkadot_Proto_PolymeshCall.OneOf_MessageOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.identityCall, .identityCall): return { - guard case .identityCall(let l) = lhs, case .identityCall(let r) = rhs else { preconditionFailure() } - return l == r - }() - } - } - #endif - } - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Polkadot_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Recent block hash, or genesis hash if era is not set - public var blockHash: Data { - get {return _storage._blockHash} - set {_uniqueStorage()._blockHash = newValue} - } - - /// Genesis block hash (identifies the chain) - public var genesisHash: Data { - get {return _storage._genesisHash} - set {_uniqueStorage()._genesisHash = newValue} - } - - /// Current account nonce - public var nonce: UInt64 { - get {return _storage._nonce} - set {_uniqueStorage()._nonce = newValue} - } - - /// Specification version, e.g. 26. - public var specVersion: UInt32 { - get {return _storage._specVersion} - set {_uniqueStorage()._specVersion = newValue} - } - - /// Transaction version, e.g. 5. - public var transactionVersion: UInt32 { - get {return _storage._transactionVersion} - set {_uniqueStorage()._transactionVersion = newValue} - } - - /// Optional tip to pay, big integer - public var tip: Data { - get {return _storage._tip} - set {_uniqueStorage()._tip = newValue} - } - - /// Optional time validity limit, recommended, for replay-protection. Empty means Immortal. - public var era: TW_Polkadot_Proto_Era { - get {return _storage._era ?? TW_Polkadot_Proto_Era()} - set {_uniqueStorage()._era = newValue} - } - /// Returns true if `era` has been explicitly set. - public var hasEra: Bool {return _storage._era != nil} - /// Clears the value of `era`. Subsequent reads from it will return its default value. - public mutating func clearEra() {_uniqueStorage()._era = nil} - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data { - get {return _storage._privateKey} - set {_uniqueStorage()._privateKey = newValue} - } - - /// Network type - public var network: UInt32 { - get {return _storage._network} - set {_uniqueStorage()._network = newValue} - } - - /// Whether enable MultiAddress - public var multiAddress: Bool { - get {return _storage._multiAddress} - set {_uniqueStorage()._multiAddress = newValue} - } - - /// Payload message - public var messageOneof: OneOf_MessageOneof? { - get {return _storage._messageOneof} - set {_uniqueStorage()._messageOneof = newValue} - } - - public var balanceCall: TW_Polkadot_Proto_Balance { - get { - if case .balanceCall(let v)? = _storage._messageOneof {return v} - return TW_Polkadot_Proto_Balance() - } - set {_uniqueStorage()._messageOneof = .balanceCall(newValue)} - } - - public var stakingCall: TW_Polkadot_Proto_Staking { - get { - if case .stakingCall(let v)? = _storage._messageOneof {return v} - return TW_Polkadot_Proto_Staking() - } - set {_uniqueStorage()._messageOneof = .stakingCall(newValue)} - } - - public var polymeshCall: TW_Polkadot_Proto_PolymeshCall { - get { - if case .polymeshCall(let v)? = _storage._messageOneof {return v} - return TW_Polkadot_Proto_PolymeshCall() - } - set {_uniqueStorage()._messageOneof = .polymeshCall(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Payload message - public enum OneOf_MessageOneof: Equatable { - case balanceCall(TW_Polkadot_Proto_Balance) - case stakingCall(TW_Polkadot_Proto_Staking) - case polymeshCall(TW_Polkadot_Proto_PolymeshCall) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Polkadot_Proto_SigningInput.OneOf_MessageOneof, rhs: TW_Polkadot_Proto_SigningInput.OneOf_MessageOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.balanceCall, .balanceCall): return { - guard case .balanceCall(let l) = lhs, case .balanceCall(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.stakingCall, .stakingCall): return { - guard case .stakingCall(let l) = lhs, case .stakingCall(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.polymeshCall, .polymeshCall): return { - guard case .polymeshCall(let l) = lhs, case .polymeshCall(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Result containing the signed and encoded transaction. -public struct TW_Polkadot_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Polkadot.Proto" - -extension TW_Polkadot_Proto_RewardDestination: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "STAKED"), - 1: .same(proto: "STASH"), - 2: .same(proto: "CONTROLLER"), - ] -} - -extension TW_Polkadot_Proto_Era: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Era" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "block_number"), - 2: .same(proto: "period"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.blockNumber) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.period) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.blockNumber != 0 { - try visitor.visitSingularUInt64Field(value: self.blockNumber, fieldNumber: 1) - } - if self.period != 0 { - try visitor.visitSingularUInt64Field(value: self.period, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Era, rhs: TW_Polkadot_Proto_Era) -> Bool { - if lhs.blockNumber != rhs.blockNumber {return false} - if lhs.period != rhs.period {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_CustomCallIndices: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CustomCallIndices" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 4: .standard(proto: "module_index"), - 5: .standard(proto: "method_index"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 4: try { try decoder.decodeSingularInt32Field(value: &self.moduleIndex) }() - case 5: try { try decoder.decodeSingularInt32Field(value: &self.methodIndex) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.moduleIndex != 0 { - try visitor.visitSingularInt32Field(value: self.moduleIndex, fieldNumber: 4) - } - if self.methodIndex != 0 { - try visitor.visitSingularInt32Field(value: self.methodIndex, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_CustomCallIndices, rhs: TW_Polkadot_Proto_CustomCallIndices) -> Bool { - if lhs.moduleIndex != rhs.moduleIndex {return false} - if lhs.methodIndex != rhs.methodIndex {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_CallIndices: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CallIndices" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "custom"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_Polkadot_Proto_CustomCallIndices? - var hadOneofValue = false - if let current = self.variant { - hadOneofValue = true - if case .custom(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.variant = .custom(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if case .custom(let v)? = self.variant { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_CallIndices, rhs: TW_Polkadot_Proto_CallIndices) -> Bool { - if lhs.variant != rhs.variant {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Balance: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Balance" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "transfer"), - 2: .same(proto: "batchTransfer"), - 3: .standard(proto: "asset_transfer"), - 4: .standard(proto: "batch_asset_transfer"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_Polkadot_Proto_Balance.Transfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .transfer(v) - } - }() - case 2: try { - var v: TW_Polkadot_Proto_Balance.BatchTransfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .batchTransfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .batchTransfer(v) - } - }() - case 3: try { - var v: TW_Polkadot_Proto_Balance.AssetTransfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .assetTransfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .assetTransfer(v) - } - }() - case 4: try { - var v: TW_Polkadot_Proto_Balance.BatchAssetTransfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .batchAssetTransfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .batchAssetTransfer(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.messageOneof { - case .transfer?: try { - guard case .transfer(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .batchTransfer?: try { - guard case .batchTransfer(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .assetTransfer?: try { - guard case .assetTransfer(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .batchAssetTransfer?: try { - guard case .batchAssetTransfer(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Balance, rhs: TW_Polkadot_Proto_Balance) -> Bool { - if lhs.messageOneof != rhs.messageOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Balance.Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Balance.protoMessageName + ".Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "to_address"), - 2: .same(proto: "value"), - 3: .same(proto: "memo"), - 4: .standard(proto: "call_indices"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.memo) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 1) - } - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 2) - } - if !self.memo.isEmpty { - try visitor.visitSingularStringField(value: self.memo, fieldNumber: 3) - } - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Balance.Transfer, rhs: TW_Polkadot_Proto_Balance.Transfer) -> Bool { - if lhs.toAddress != rhs.toAddress {return false} - if lhs.value != rhs.value {return false} - if lhs.memo != rhs.memo {return false} - if lhs._callIndices != rhs._callIndices {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Balance.BatchTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Balance.protoMessageName + ".BatchTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "call_indices"), - 2: .same(proto: "transfers"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.transfers) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.transfers.isEmpty { - try visitor.visitRepeatedMessageField(value: self.transfers, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Balance.BatchTransfer, rhs: TW_Polkadot_Proto_Balance.BatchTransfer) -> Bool { - if lhs._callIndices != rhs._callIndices {return false} - if lhs.transfers != rhs.transfers {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Balance.AssetTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Balance.protoMessageName + ".AssetTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "call_indices"), - 2: .standard(proto: "to_address"), - 3: .same(proto: "value"), - 4: .standard(proto: "asset_id"), - 5: .standard(proto: "fee_asset_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 4: try { try decoder.decodeSingularUInt32Field(value: &self.assetID) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &self.feeAssetID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 2) - } - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 3) - } - if self.assetID != 0 { - try visitor.visitSingularUInt32Field(value: self.assetID, fieldNumber: 4) - } - if self.feeAssetID != 0 { - try visitor.visitSingularUInt32Field(value: self.feeAssetID, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Balance.AssetTransfer, rhs: TW_Polkadot_Proto_Balance.AssetTransfer) -> Bool { - if lhs._callIndices != rhs._callIndices {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.value != rhs.value {return false} - if lhs.assetID != rhs.assetID {return false} - if lhs.feeAssetID != rhs.feeAssetID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Balance.BatchAssetTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Balance.protoMessageName + ".BatchAssetTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "call_indices"), - 2: .standard(proto: "fee_asset_id"), - 3: .same(proto: "transfers"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.feeAssetID) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.transfers) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if self.feeAssetID != 0 { - try visitor.visitSingularUInt32Field(value: self.feeAssetID, fieldNumber: 2) - } - if !self.transfers.isEmpty { - try visitor.visitRepeatedMessageField(value: self.transfers, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Balance.BatchAssetTransfer, rhs: TW_Polkadot_Proto_Balance.BatchAssetTransfer) -> Bool { - if lhs._callIndices != rhs._callIndices {return false} - if lhs.feeAssetID != rhs.feeAssetID {return false} - if lhs.transfers != rhs.transfers {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Staking: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Staking" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "bond"), - 2: .standard(proto: "bond_and_nominate"), - 3: .standard(proto: "bond_extra"), - 4: .same(proto: "unbond"), - 5: .standard(proto: "withdraw_unbonded"), - 6: .same(proto: "nominate"), - 7: .same(proto: "chill"), - 8: .standard(proto: "chill_and_unbond"), - 9: .same(proto: "rebond"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_Polkadot_Proto_Staking.Bond? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .bond(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .bond(v) - } - }() - case 2: try { - var v: TW_Polkadot_Proto_Staking.BondAndNominate? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .bondAndNominate(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .bondAndNominate(v) - } - }() - case 3: try { - var v: TW_Polkadot_Proto_Staking.BondExtra? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .bondExtra(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .bondExtra(v) - } - }() - case 4: try { - var v: TW_Polkadot_Proto_Staking.Unbond? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .unbond(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .unbond(v) - } - }() - case 5: try { - var v: TW_Polkadot_Proto_Staking.WithdrawUnbonded? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .withdrawUnbonded(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .withdrawUnbonded(v) - } - }() - case 6: try { - var v: TW_Polkadot_Proto_Staking.Nominate? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .nominate(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .nominate(v) - } - }() - case 7: try { - var v: TW_Polkadot_Proto_Staking.Chill? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .chill(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .chill(v) - } - }() - case 8: try { - var v: TW_Polkadot_Proto_Staking.ChillAndUnbond? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .chillAndUnbond(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .chillAndUnbond(v) - } - }() - case 9: try { - var v: TW_Polkadot_Proto_Staking.Rebond? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .rebond(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .rebond(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.messageOneof { - case .bond?: try { - guard case .bond(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .bondAndNominate?: try { - guard case .bondAndNominate(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .bondExtra?: try { - guard case .bondExtra(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .unbond?: try { - guard case .unbond(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case .withdrawUnbonded?: try { - guard case .withdrawUnbonded(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - }() - case .nominate?: try { - guard case .nominate(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - }() - case .chill?: try { - guard case .chill(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - }() - case .chillAndUnbond?: try { - guard case .chillAndUnbond(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case .rebond?: try { - guard case .rebond(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Staking, rhs: TW_Polkadot_Proto_Staking) -> Bool { - if lhs.messageOneof != rhs.messageOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Staking.Bond: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Staking.protoMessageName + ".Bond" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "controller"), - 2: .same(proto: "value"), - 3: .standard(proto: "reward_destination"), - 4: .standard(proto: "call_indices"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.controller) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.rewardDestination) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.controller.isEmpty { - try visitor.visitSingularStringField(value: self.controller, fieldNumber: 1) - } - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 2) - } - if self.rewardDestination != .staked { - try visitor.visitSingularEnumField(value: self.rewardDestination, fieldNumber: 3) - } - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Staking.Bond, rhs: TW_Polkadot_Proto_Staking.Bond) -> Bool { - if lhs.controller != rhs.controller {return false} - if lhs.value != rhs.value {return false} - if lhs.rewardDestination != rhs.rewardDestination {return false} - if lhs._callIndices != rhs._callIndices {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Staking.BondAndNominate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Staking.protoMessageName + ".BondAndNominate" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "controller"), - 2: .same(proto: "value"), - 3: .standard(proto: "reward_destination"), - 4: .same(proto: "nominators"), - 5: .standard(proto: "call_indices"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.controller) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.rewardDestination) }() - case 4: try { try decoder.decodeRepeatedStringField(value: &self.nominators) }() - case 5: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.controller.isEmpty { - try visitor.visitSingularStringField(value: self.controller, fieldNumber: 1) - } - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 2) - } - if self.rewardDestination != .staked { - try visitor.visitSingularEnumField(value: self.rewardDestination, fieldNumber: 3) - } - if !self.nominators.isEmpty { - try visitor.visitRepeatedStringField(value: self.nominators, fieldNumber: 4) - } - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Staking.BondAndNominate, rhs: TW_Polkadot_Proto_Staking.BondAndNominate) -> Bool { - if lhs.controller != rhs.controller {return false} - if lhs.value != rhs.value {return false} - if lhs.rewardDestination != rhs.rewardDestination {return false} - if lhs.nominators != rhs.nominators {return false} - if lhs._callIndices != rhs._callIndices {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Staking.BondExtra: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Staking.protoMessageName + ".BondExtra" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - 2: .standard(proto: "call_indices"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 1) - } - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Staking.BondExtra, rhs: TW_Polkadot_Proto_Staking.BondExtra) -> Bool { - if lhs.value != rhs.value {return false} - if lhs._callIndices != rhs._callIndices {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Staking.Unbond: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Staking.protoMessageName + ".Unbond" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - 2: .standard(proto: "call_indices"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 1) - } - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Staking.Unbond, rhs: TW_Polkadot_Proto_Staking.Unbond) -> Bool { - if lhs.value != rhs.value {return false} - if lhs._callIndices != rhs._callIndices {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Staking.Rebond: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Staking.protoMessageName + ".Rebond" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - 2: .standard(proto: "call_indices"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 1) - } - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Staking.Rebond, rhs: TW_Polkadot_Proto_Staking.Rebond) -> Bool { - if lhs.value != rhs.value {return false} - if lhs._callIndices != rhs._callIndices {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Staking.WithdrawUnbonded: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Staking.protoMessageName + ".WithdrawUnbonded" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "slashing_spans"), - 2: .standard(proto: "call_indices"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self.slashingSpans) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.slashingSpans != 0 { - try visitor.visitSingularInt32Field(value: self.slashingSpans, fieldNumber: 1) - } - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Staking.WithdrawUnbonded, rhs: TW_Polkadot_Proto_Staking.WithdrawUnbonded) -> Bool { - if lhs.slashingSpans != rhs.slashingSpans {return false} - if lhs._callIndices != rhs._callIndices {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Staking.Nominate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Staking.protoMessageName + ".Nominate" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "nominators"), - 2: .standard(proto: "call_indices"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedStringField(value: &self.nominators) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.nominators.isEmpty { - try visitor.visitRepeatedStringField(value: self.nominators, fieldNumber: 1) - } - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Staking.Nominate, rhs: TW_Polkadot_Proto_Staking.Nominate) -> Bool { - if lhs.nominators != rhs.nominators {return false} - if lhs._callIndices != rhs._callIndices {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Staking.ChillAndUnbond: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Staking.protoMessageName + ".ChillAndUnbond" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - 2: .standard(proto: "call_indices"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 1) - } - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Staking.ChillAndUnbond, rhs: TW_Polkadot_Proto_Staking.ChillAndUnbond) -> Bool { - if lhs.value != rhs.value {return false} - if lhs._callIndices != rhs._callIndices {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Staking.Chill: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Staking.protoMessageName + ".Chill" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "call_indices"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Staking.Chill, rhs: TW_Polkadot_Proto_Staking.Chill) -> Bool { - if lhs._callIndices != rhs._callIndices {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Identity: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Identity" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "join_identity_as_key"), - 2: .standard(proto: "add_authorization"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_Polkadot_Proto_Identity.JoinIdentityAsKey? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .joinIdentityAsKey(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .joinIdentityAsKey(v) - } - }() - case 2: try { - var v: TW_Polkadot_Proto_Identity.AddAuthorization? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .addAuthorization(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .addAuthorization(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.messageOneof { - case .joinIdentityAsKey?: try { - guard case .joinIdentityAsKey(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .addAuthorization?: try { - guard case .addAuthorization(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Identity, rhs: TW_Polkadot_Proto_Identity) -> Bool { - if lhs.messageOneof != rhs.messageOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Identity.JoinIdentityAsKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Identity.protoMessageName + ".JoinIdentityAsKey" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "call_indices"), - 2: .standard(proto: "auth_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.authID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if self.authID != 0 { - try visitor.visitSingularUInt64Field(value: self.authID, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Identity.JoinIdentityAsKey, rhs: TW_Polkadot_Proto_Identity.JoinIdentityAsKey) -> Bool { - if lhs._callIndices != rhs._callIndices {return false} - if lhs.authID != rhs.authID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Identity.AddAuthorization: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Identity.protoMessageName + ".AddAuthorization" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "call_indices"), - 2: .same(proto: "target"), - 3: .same(proto: "data"), - 4: .same(proto: "expiry"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._callIndices) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.target) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._data) }() - case 4: try { try decoder.decodeSingularUInt64Field(value: &self.expiry) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._callIndices { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.target.isEmpty { - try visitor.visitSingularStringField(value: self.target, fieldNumber: 2) - } - try { if let v = self._data { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if self.expiry != 0 { - try visitor.visitSingularUInt64Field(value: self.expiry, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Identity.AddAuthorization, rhs: TW_Polkadot_Proto_Identity.AddAuthorization) -> Bool { - if lhs._callIndices != rhs._callIndices {return false} - if lhs.target != rhs.target {return false} - if lhs._data != rhs._data {return false} - if lhs.expiry != rhs.expiry {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Identity.AddAuthorization.DataMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Identity.AddAuthorization.protoMessageName + ".Data" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.data) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Identity.AddAuthorization.DataMessage, rhs: TW_Polkadot_Proto_Identity.AddAuthorization.DataMessage) -> Bool { - if lhs.data != rhs.data {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_Identity.AddAuthorization.AuthData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Polkadot_Proto_Identity.AddAuthorization.protoMessageName + ".AuthData" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "asset"), - 2: .same(proto: "extrinsic"), - 3: .same(proto: "portfolio"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._asset) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._extrinsic) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._portfolio) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._asset { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - try { if let v = self._extrinsic { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try { if let v = self._portfolio { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_Identity.AddAuthorization.AuthData, rhs: TW_Polkadot_Proto_Identity.AddAuthorization.AuthData) -> Bool { - if lhs._asset != rhs._asset {return false} - if lhs._extrinsic != rhs._extrinsic {return false} - if lhs._portfolio != rhs._portfolio {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_PolymeshCall: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".PolymeshCall" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 2: .standard(proto: "identity_call"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 2: try { - var v: TW_Polkadot_Proto_Identity? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .identityCall(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .identityCall(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if case .identityCall(let v)? = self.messageOneof { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_PolymeshCall, rhs: TW_Polkadot_Proto_PolymeshCall) -> Bool { - if lhs.messageOneof != rhs.messageOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "block_hash"), - 2: .standard(proto: "genesis_hash"), - 3: .same(proto: "nonce"), - 4: .standard(proto: "spec_version"), - 5: .standard(proto: "transaction_version"), - 6: .same(proto: "tip"), - 7: .same(proto: "era"), - 8: .standard(proto: "private_key"), - 9: .same(proto: "network"), - 10: .standard(proto: "multi_address"), - 11: .standard(proto: "balance_call"), - 12: .standard(proto: "staking_call"), - 13: .standard(proto: "polymesh_call"), - ] - - fileprivate class _StorageClass { - var _blockHash: Data = Data() - var _genesisHash: Data = Data() - var _nonce: UInt64 = 0 - var _specVersion: UInt32 = 0 - var _transactionVersion: UInt32 = 0 - var _tip: Data = Data() - var _era: TW_Polkadot_Proto_Era? = nil - var _privateKey: Data = Data() - var _network: UInt32 = 0 - var _multiAddress: Bool = false - var _messageOneof: TW_Polkadot_Proto_SigningInput.OneOf_MessageOneof? - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _blockHash = source._blockHash - _genesisHash = source._genesisHash - _nonce = source._nonce - _specVersion = source._specVersion - _transactionVersion = source._transactionVersion - _tip = source._tip - _era = source._era - _privateKey = source._privateKey - _network = source._network - _multiAddress = source._multiAddress - _messageOneof = source._messageOneof - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &_storage._blockHash) }() - case 2: try { try decoder.decodeSingularBytesField(value: &_storage._genesisHash) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &_storage._nonce) }() - case 4: try { try decoder.decodeSingularUInt32Field(value: &_storage._specVersion) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &_storage._transactionVersion) }() - case 6: try { try decoder.decodeSingularBytesField(value: &_storage._tip) }() - case 7: try { try decoder.decodeSingularMessageField(value: &_storage._era) }() - case 8: try { try decoder.decodeSingularBytesField(value: &_storage._privateKey) }() - case 9: try { try decoder.decodeSingularUInt32Field(value: &_storage._network) }() - case 10: try { try decoder.decodeSingularBoolField(value: &_storage._multiAddress) }() - case 11: try { - var v: TW_Polkadot_Proto_Balance? - var hadOneofValue = false - if let current = _storage._messageOneof { - hadOneofValue = true - if case .balanceCall(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._messageOneof = .balanceCall(v) - } - }() - case 12: try { - var v: TW_Polkadot_Proto_Staking? - var hadOneofValue = false - if let current = _storage._messageOneof { - hadOneofValue = true - if case .stakingCall(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._messageOneof = .stakingCall(v) - } - }() - case 13: try { - var v: TW_Polkadot_Proto_PolymeshCall? - var hadOneofValue = false - if let current = _storage._messageOneof { - hadOneofValue = true - if case .polymeshCall(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._messageOneof = .polymeshCall(v) - } - }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !_storage._blockHash.isEmpty { - try visitor.visitSingularBytesField(value: _storage._blockHash, fieldNumber: 1) - } - if !_storage._genesisHash.isEmpty { - try visitor.visitSingularBytesField(value: _storage._genesisHash, fieldNumber: 2) - } - if _storage._nonce != 0 { - try visitor.visitSingularUInt64Field(value: _storage._nonce, fieldNumber: 3) - } - if _storage._specVersion != 0 { - try visitor.visitSingularUInt32Field(value: _storage._specVersion, fieldNumber: 4) - } - if _storage._transactionVersion != 0 { - try visitor.visitSingularUInt32Field(value: _storage._transactionVersion, fieldNumber: 5) - } - if !_storage._tip.isEmpty { - try visitor.visitSingularBytesField(value: _storage._tip, fieldNumber: 6) - } - try { if let v = _storage._era { - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } }() - if !_storage._privateKey.isEmpty { - try visitor.visitSingularBytesField(value: _storage._privateKey, fieldNumber: 8) - } - if _storage._network != 0 { - try visitor.visitSingularUInt32Field(value: _storage._network, fieldNumber: 9) - } - if _storage._multiAddress != false { - try visitor.visitSingularBoolField(value: _storage._multiAddress, fieldNumber: 10) - } - switch _storage._messageOneof { - case .balanceCall?: try { - guard case .balanceCall(let v)? = _storage._messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - }() - case .stakingCall?: try { - guard case .stakingCall(let v)? = _storage._messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - }() - case .polymeshCall?: try { - guard case .polymeshCall(let v)? = _storage._messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 13) - }() - case nil: break - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_SigningInput, rhs: TW_Polkadot_Proto_SigningInput) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._blockHash != rhs_storage._blockHash {return false} - if _storage._genesisHash != rhs_storage._genesisHash {return false} - if _storage._nonce != rhs_storage._nonce {return false} - if _storage._specVersion != rhs_storage._specVersion {return false} - if _storage._transactionVersion != rhs_storage._transactionVersion {return false} - if _storage._tip != rhs_storage._tip {return false} - if _storage._era != rhs_storage._era {return false} - if _storage._privateKey != rhs_storage._privateKey {return false} - if _storage._network != rhs_storage._network {return false} - if _storage._multiAddress != rhs_storage._multiAddress {return false} - if _storage._messageOneof != rhs_storage._messageOneof {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Polkadot_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Polkadot_Proto_SigningOutput, rhs: TW_Polkadot_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ripple+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ripple+Proto.swift deleted file mode 100644 index 9fffff83..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ripple+Proto.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias RippleCurrencyAmount = TW_Ripple_Proto_CurrencyAmount -public typealias RippleOperationTrustSet = TW_Ripple_Proto_OperationTrustSet -public typealias RippleOperationPayment = TW_Ripple_Proto_OperationPayment -public typealias RippleOperationNFTokenBurn = TW_Ripple_Proto_OperationNFTokenBurn -public typealias RippleOperationNFTokenCreateOffer = TW_Ripple_Proto_OperationNFTokenCreateOffer -public typealias RippleOperationNFTokenAcceptOffer = TW_Ripple_Proto_OperationNFTokenAcceptOffer -public typealias RippleOperationNFTokenCancelOffer = TW_Ripple_Proto_OperationNFTokenCancelOffer -public typealias RippleSigningInput = TW_Ripple_Proto_SigningInput -public typealias RippleSigningOutput = TW_Ripple_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ripple.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ripple.pb.swift deleted file mode 100644 index 76910cd7..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Ripple.pb.swift +++ /dev/null @@ -1,855 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Ripple.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// https://xrpl.org/currency-formats.html#token-amounts -public struct TW_Ripple_Proto_CurrencyAmount { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Currency code - /// https://xrpl.org/currency-formats.html#currency-codes - public var currency: String = String() - - /// String number - /// https://xrpl.org/currency-formats.html#string-numbers - public var value: String = String() - - /// Account - /// https://xrpl.org/accounts.html - public var issuer: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// https://xrpl.org/trustset.html -public struct TW_Ripple_Proto_OperationTrustSet { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var limitAmount: TW_Ripple_Proto_CurrencyAmount { - get {return _limitAmount ?? TW_Ripple_Proto_CurrencyAmount()} - set {_limitAmount = newValue} - } - /// Returns true if `limitAmount` has been explicitly set. - public var hasLimitAmount: Bool {return self._limitAmount != nil} - /// Clears the value of `limitAmount`. Subsequent reads from it will return its default value. - public mutating func clearLimitAmount() {self._limitAmount = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _limitAmount: TW_Ripple_Proto_CurrencyAmount? = nil -} - -/// https://xrpl.org/payment.html -public struct TW_Ripple_Proto_OperationPayment { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Transfer amount - public var amountOneof: TW_Ripple_Proto_OperationPayment.OneOf_AmountOneof? = nil - - public var amount: Int64 { - get { - if case .amount(let v)? = amountOneof {return v} - return 0 - } - set {amountOneof = .amount(newValue)} - } - - public var currencyAmount: TW_Ripple_Proto_CurrencyAmount { - get { - if case .currencyAmount(let v)? = amountOneof {return v} - return TW_Ripple_Proto_CurrencyAmount() - } - set {amountOneof = .currencyAmount(newValue)} - } - - /// Target account - public var destination: String = String() - - /// A Destination Tag - public var destinationTag: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Transfer amount - public enum OneOf_AmountOneof: Equatable { - case amount(Int64) - case currencyAmount(TW_Ripple_Proto_CurrencyAmount) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Ripple_Proto_OperationPayment.OneOf_AmountOneof, rhs: TW_Ripple_Proto_OperationPayment.OneOf_AmountOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.amount, .amount): return { - guard case .amount(let l) = lhs, case .amount(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.currencyAmount, .currencyAmount): return { - guard case .currencyAmount(let l) = lhs, case .currencyAmount(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// https://xrpl.org/nftokenburn.html -public struct TW_Ripple_Proto_OperationNFTokenBurn { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Hash256 NFTokenId - public var nftokenID: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// https://xrpl.org/nftokencreateoffer.html -public struct TW_Ripple_Proto_OperationNFTokenCreateOffer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Hash256 NFTokenId - public var nftokenID: Data = Data() - - /// Destination account - public var destination: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// https://xrpl.org/nftokenacceptoffer.html -public struct TW_Ripple_Proto_OperationNFTokenAcceptOffer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Hash256 NFTokenOffer - public var sellOffer: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// https://xrpl.org/nftokencanceloffer.html -public struct TW_Ripple_Proto_OperationNFTokenCancelOffer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Vector256 NFTokenOffers - public var tokenOffers: [Data] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Ripple_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Transfer fee - public var fee: Int64 = 0 - - /// Account sequence number - public var sequence: Int32 = 0 - - /// Ledger sequence number - public var lastLedgerSequence: Int32 = 0 - - /// Source account - public var account: String = String() - - /// Transaction flags, optional - public var flags: Int64 = 0 - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - public var operationOneof: TW_Ripple_Proto_SigningInput.OneOf_OperationOneof? = nil - - public var opTrustSet: TW_Ripple_Proto_OperationTrustSet { - get { - if case .opTrustSet(let v)? = operationOneof {return v} - return TW_Ripple_Proto_OperationTrustSet() - } - set {operationOneof = .opTrustSet(newValue)} - } - - public var opPayment: TW_Ripple_Proto_OperationPayment { - get { - if case .opPayment(let v)? = operationOneof {return v} - return TW_Ripple_Proto_OperationPayment() - } - set {operationOneof = .opPayment(newValue)} - } - - public var opNftokenBurn: TW_Ripple_Proto_OperationNFTokenBurn { - get { - if case .opNftokenBurn(let v)? = operationOneof {return v} - return TW_Ripple_Proto_OperationNFTokenBurn() - } - set {operationOneof = .opNftokenBurn(newValue)} - } - - public var opNftokenCreateOffer: TW_Ripple_Proto_OperationNFTokenCreateOffer { - get { - if case .opNftokenCreateOffer(let v)? = operationOneof {return v} - return TW_Ripple_Proto_OperationNFTokenCreateOffer() - } - set {operationOneof = .opNftokenCreateOffer(newValue)} - } - - public var opNftokenAcceptOffer: TW_Ripple_Proto_OperationNFTokenAcceptOffer { - get { - if case .opNftokenAcceptOffer(let v)? = operationOneof {return v} - return TW_Ripple_Proto_OperationNFTokenAcceptOffer() - } - set {operationOneof = .opNftokenAcceptOffer(newValue)} - } - - public var opNftokenCancelOffer: TW_Ripple_Proto_OperationNFTokenCancelOffer { - get { - if case .opNftokenCancelOffer(let v)? = operationOneof {return v} - return TW_Ripple_Proto_OperationNFTokenCancelOffer() - } - set {operationOneof = .opNftokenCancelOffer(newValue)} - } - - /// Only used by tss chain-integration. - public var publicKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_OperationOneof: Equatable { - case opTrustSet(TW_Ripple_Proto_OperationTrustSet) - case opPayment(TW_Ripple_Proto_OperationPayment) - case opNftokenBurn(TW_Ripple_Proto_OperationNFTokenBurn) - case opNftokenCreateOffer(TW_Ripple_Proto_OperationNFTokenCreateOffer) - case opNftokenAcceptOffer(TW_Ripple_Proto_OperationNFTokenAcceptOffer) - case opNftokenCancelOffer(TW_Ripple_Proto_OperationNFTokenCancelOffer) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Ripple_Proto_SigningInput.OneOf_OperationOneof, rhs: TW_Ripple_Proto_SigningInput.OneOf_OperationOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.opTrustSet, .opTrustSet): return { - guard case .opTrustSet(let l) = lhs, case .opTrustSet(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.opPayment, .opPayment): return { - guard case .opPayment(let l) = lhs, case .opPayment(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.opNftokenBurn, .opNftokenBurn): return { - guard case .opNftokenBurn(let l) = lhs, case .opNftokenBurn(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.opNftokenCreateOffer, .opNftokenCreateOffer): return { - guard case .opNftokenCreateOffer(let l) = lhs, case .opNftokenCreateOffer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.opNftokenAcceptOffer, .opNftokenAcceptOffer): return { - guard case .opNftokenAcceptOffer(let l) = lhs, case .opNftokenAcceptOffer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.opNftokenCancelOffer, .opNftokenCancelOffer): return { - guard case .opNftokenCancelOffer(let l) = lhs, case .opNftokenCancelOffer(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Ripple_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Encoded transaction - public var encoded: Data = Data() - - /// Optional error - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Ripple.Proto" - -extension TW_Ripple_Proto_CurrencyAmount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CurrencyAmount" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "currency"), - 2: .same(proto: "value"), - 3: .same(proto: "issuer"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.currency) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.value) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.issuer) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.currency.isEmpty { - try visitor.visitSingularStringField(value: self.currency, fieldNumber: 1) - } - if !self.value.isEmpty { - try visitor.visitSingularStringField(value: self.value, fieldNumber: 2) - } - if !self.issuer.isEmpty { - try visitor.visitSingularStringField(value: self.issuer, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ripple_Proto_CurrencyAmount, rhs: TW_Ripple_Proto_CurrencyAmount) -> Bool { - if lhs.currency != rhs.currency {return false} - if lhs.value != rhs.value {return false} - if lhs.issuer != rhs.issuer {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ripple_Proto_OperationTrustSet: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OperationTrustSet" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "limit_amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._limitAmount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._limitAmount { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ripple_Proto_OperationTrustSet, rhs: TW_Ripple_Proto_OperationTrustSet) -> Bool { - if lhs._limitAmount != rhs._limitAmount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ripple_Proto_OperationPayment: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OperationPayment" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - 2: .standard(proto: "currency_amount"), - 3: .same(proto: "destination"), - 4: .standard(proto: "destination_tag"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: Int64? - try decoder.decodeSingularInt64Field(value: &v) - if let v = v { - if self.amountOneof != nil {try decoder.handleConflictingOneOf()} - self.amountOneof = .amount(v) - } - }() - case 2: try { - var v: TW_Ripple_Proto_CurrencyAmount? - var hadOneofValue = false - if let current = self.amountOneof { - hadOneofValue = true - if case .currencyAmount(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.amountOneof = .currencyAmount(v) - } - }() - case 3: try { try decoder.decodeSingularStringField(value: &self.destination) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.destinationTag) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.amountOneof { - case .amount?: try { - guard case .amount(let v)? = self.amountOneof else { preconditionFailure() } - try visitor.visitSingularInt64Field(value: v, fieldNumber: 1) - }() - case .currencyAmount?: try { - guard case .currencyAmount(let v)? = self.amountOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case nil: break - } - if !self.destination.isEmpty { - try visitor.visitSingularStringField(value: self.destination, fieldNumber: 3) - } - if self.destinationTag != 0 { - try visitor.visitSingularInt64Field(value: self.destinationTag, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ripple_Proto_OperationPayment, rhs: TW_Ripple_Proto_OperationPayment) -> Bool { - if lhs.amountOneof != rhs.amountOneof {return false} - if lhs.destination != rhs.destination {return false} - if lhs.destinationTag != rhs.destinationTag {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ripple_Proto_OperationNFTokenBurn: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OperationNFTokenBurn" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "nftoken_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.nftokenID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.nftokenID.isEmpty { - try visitor.visitSingularBytesField(value: self.nftokenID, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ripple_Proto_OperationNFTokenBurn, rhs: TW_Ripple_Proto_OperationNFTokenBurn) -> Bool { - if lhs.nftokenID != rhs.nftokenID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ripple_Proto_OperationNFTokenCreateOffer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OperationNFTokenCreateOffer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "nftoken_id"), - 2: .same(proto: "destination"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.nftokenID) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.destination) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.nftokenID.isEmpty { - try visitor.visitSingularBytesField(value: self.nftokenID, fieldNumber: 1) - } - if !self.destination.isEmpty { - try visitor.visitSingularStringField(value: self.destination, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ripple_Proto_OperationNFTokenCreateOffer, rhs: TW_Ripple_Proto_OperationNFTokenCreateOffer) -> Bool { - if lhs.nftokenID != rhs.nftokenID {return false} - if lhs.destination != rhs.destination {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ripple_Proto_OperationNFTokenAcceptOffer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OperationNFTokenAcceptOffer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "sell_offer"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.sellOffer) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.sellOffer.isEmpty { - try visitor.visitSingularBytesField(value: self.sellOffer, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ripple_Proto_OperationNFTokenAcceptOffer, rhs: TW_Ripple_Proto_OperationNFTokenAcceptOffer) -> Bool { - if lhs.sellOffer != rhs.sellOffer {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ripple_Proto_OperationNFTokenCancelOffer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OperationNFTokenCancelOffer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "token_offers"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedBytesField(value: &self.tokenOffers) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.tokenOffers.isEmpty { - try visitor.visitRepeatedBytesField(value: self.tokenOffers, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ripple_Proto_OperationNFTokenCancelOffer, rhs: TW_Ripple_Proto_OperationNFTokenCancelOffer) -> Bool { - if lhs.tokenOffers != rhs.tokenOffers {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ripple_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "fee"), - 2: .same(proto: "sequence"), - 3: .standard(proto: "last_ledger_sequence"), - 4: .same(proto: "account"), - 5: .same(proto: "flags"), - 6: .standard(proto: "private_key"), - 7: .standard(proto: "op_trust_set"), - 8: .standard(proto: "op_payment"), - 9: .standard(proto: "op_nftoken_burn"), - 10: .standard(proto: "op_nftoken_create_offer"), - 11: .standard(proto: "op_nftoken_accept_offer"), - 12: .standard(proto: "op_nftoken_cancel_offer"), - 15: .standard(proto: "public_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.fee) }() - case 2: try { try decoder.decodeSingularInt32Field(value: &self.sequence) }() - case 3: try { try decoder.decodeSingularInt32Field(value: &self.lastLedgerSequence) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.account) }() - case 5: try { try decoder.decodeSingularInt64Field(value: &self.flags) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 7: try { - var v: TW_Ripple_Proto_OperationTrustSet? - var hadOneofValue = false - if let current = self.operationOneof { - hadOneofValue = true - if case .opTrustSet(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationOneof = .opTrustSet(v) - } - }() - case 8: try { - var v: TW_Ripple_Proto_OperationPayment? - var hadOneofValue = false - if let current = self.operationOneof { - hadOneofValue = true - if case .opPayment(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationOneof = .opPayment(v) - } - }() - case 9: try { - var v: TW_Ripple_Proto_OperationNFTokenBurn? - var hadOneofValue = false - if let current = self.operationOneof { - hadOneofValue = true - if case .opNftokenBurn(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationOneof = .opNftokenBurn(v) - } - }() - case 10: try { - var v: TW_Ripple_Proto_OperationNFTokenCreateOffer? - var hadOneofValue = false - if let current = self.operationOneof { - hadOneofValue = true - if case .opNftokenCreateOffer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationOneof = .opNftokenCreateOffer(v) - } - }() - case 11: try { - var v: TW_Ripple_Proto_OperationNFTokenAcceptOffer? - var hadOneofValue = false - if let current = self.operationOneof { - hadOneofValue = true - if case .opNftokenAcceptOffer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationOneof = .opNftokenAcceptOffer(v) - } - }() - case 12: try { - var v: TW_Ripple_Proto_OperationNFTokenCancelOffer? - var hadOneofValue = false - if let current = self.operationOneof { - hadOneofValue = true - if case .opNftokenCancelOffer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationOneof = .opNftokenCancelOffer(v) - } - }() - case 15: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.fee != 0 { - try visitor.visitSingularInt64Field(value: self.fee, fieldNumber: 1) - } - if self.sequence != 0 { - try visitor.visitSingularInt32Field(value: self.sequence, fieldNumber: 2) - } - if self.lastLedgerSequence != 0 { - try visitor.visitSingularInt32Field(value: self.lastLedgerSequence, fieldNumber: 3) - } - if !self.account.isEmpty { - try visitor.visitSingularStringField(value: self.account, fieldNumber: 4) - } - if self.flags != 0 { - try visitor.visitSingularInt64Field(value: self.flags, fieldNumber: 5) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 6) - } - switch self.operationOneof { - case .opTrustSet?: try { - guard case .opTrustSet(let v)? = self.operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - }() - case .opPayment?: try { - guard case .opPayment(let v)? = self.operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case .opNftokenBurn?: try { - guard case .opNftokenBurn(let v)? = self.operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case .opNftokenCreateOffer?: try { - guard case .opNftokenCreateOffer(let v)? = self.operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - }() - case .opNftokenAcceptOffer?: try { - guard case .opNftokenAcceptOffer(let v)? = self.operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - }() - case .opNftokenCancelOffer?: try { - guard case .opNftokenCancelOffer(let v)? = self.operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - }() - case nil: break - } - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 15) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ripple_Proto_SigningInput, rhs: TW_Ripple_Proto_SigningInput) -> Bool { - if lhs.fee != rhs.fee {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.lastLedgerSequence != rhs.lastLedgerSequence {return false} - if lhs.account != rhs.account {return false} - if lhs.flags != rhs.flags {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.operationOneof != rhs.operationOneof {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Ripple_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Ripple_Proto_SigningOutput, rhs: TW_Ripple_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Solana+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Solana+Proto.swift deleted file mode 100644 index a78f1694..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Solana+Proto.swift +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias SolanaTransfer = TW_Solana_Proto_Transfer -public typealias SolanaDelegateStake = TW_Solana_Proto_DelegateStake -public typealias SolanaDeactivateStake = TW_Solana_Proto_DeactivateStake -public typealias SolanaDeactivateAllStake = TW_Solana_Proto_DeactivateAllStake -public typealias SolanaWithdrawStake = TW_Solana_Proto_WithdrawStake -public typealias SolanaStakeAccountValue = TW_Solana_Proto_StakeAccountValue -public typealias SolanaWithdrawAllStake = TW_Solana_Proto_WithdrawAllStake -public typealias SolanaCreateTokenAccount = TW_Solana_Proto_CreateTokenAccount -public typealias SolanaTokenTransfer = TW_Solana_Proto_TokenTransfer -public typealias SolanaCreateAndTransferToken = TW_Solana_Proto_CreateAndTransferToken -public typealias SolanaCreateNonceAccount = TW_Solana_Proto_CreateNonceAccount -public typealias SolanaWithdrawNonceAccount = TW_Solana_Proto_WithdrawNonceAccount -public typealias SolanaAdvanceNonceAccount = TW_Solana_Proto_AdvanceNonceAccount -public typealias SolanaSigningInput = TW_Solana_Proto_SigningInput -public typealias SolanaSigningOutput = TW_Solana_Proto_SigningOutput -public typealias SolanaPreSigningOutput = TW_Solana_Proto_PreSigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Solana.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Solana.pb.swift deleted file mode 100644 index 28a4456d..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Solana.pb.swift +++ /dev/null @@ -1,1491 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Solana.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Transfer transaction -public struct TW_Solana_Proto_Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// destination address - public var recipient: String = String() - - /// amount - public var value: UInt64 = 0 - - /// optional memo - public var memo: String = String() - - /// optional referenced public keys - public var references: [String] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Create and initialize a stake account, and delegate amount to it. -/// Recommendation behavior is to not specify a stake account, and a new unique account will be created each time. -/// Optionally a stake account pubkey can be specified, but it should not exist on chain. -public struct TW_Solana_Proto_DelegateStake { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Validator's public key - public var validatorPubkey: String = String() - - /// delegation amount - public var value: UInt64 = 0 - - /// staking account - public var stakeAccount: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Deactivate staking on stake account -public struct TW_Solana_Proto_DeactivateStake { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// staking account - public var stakeAccount: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Deactivate staking on multiple stake account -public struct TW_Solana_Proto_DeactivateAllStake { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// staking accounts - public var stakeAccounts: [String] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Withdraw amount from stake account -public struct TW_Solana_Proto_WithdrawStake { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// staking account - public var stakeAccount: String = String() - - /// withdrawal amount - public var value: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Technical structure to group a staking account and an amount -public struct TW_Solana_Proto_StakeAccountValue { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// staking account - public var stakeAccount: String = String() - - /// amount - public var value: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Withdraw amounts from stake accounts -public struct TW_Solana_Proto_WithdrawAllStake { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var stakeAccounts: [TW_Solana_Proto_StakeAccountValue] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Create a token account under a main account for a token type -public struct TW_Solana_Proto_CreateTokenAccount { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// main account -- can be same as signer, or other main account (if done on some other account's behalf) - public var mainAddress: String = String() - - /// Token minting address - public var tokenMintAddress: String = String() - - /// Token address - public var tokenAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Transfer tokens -public struct TW_Solana_Proto_TokenTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Mint address of the token - public var tokenMintAddress: String = String() - - /// Source address - public var senderTokenAddress: String = String() - - /// Destination address - public var recipientTokenAddress: String = String() - - /// Amount - public var amount: UInt64 = 0 - - /// Note: 8-bit value - public var decimals: UInt32 = 0 - - /// optional memo§ - public var memo: String = String() - - /// optional referenced public keys - public var references: [String] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// CreateTokenAccount and TokenTransfer combined -public struct TW_Solana_Proto_CreateAndTransferToken { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// main account -- can be same as signer, or other main account (if done on some other account's behalf) - public var recipientMainAddress: String = String() - - /// Mint address of the token - public var tokenMintAddress: String = String() - - /// Token address for the recipient, will be created first - public var recipientTokenAddress: String = String() - - /// Sender's token address - public var senderTokenAddress: String = String() - - /// amount - public var amount: UInt64 = 0 - - /// Note: 8-bit value - public var decimals: UInt32 = 0 - - /// optional - public var memo: String = String() - - /// optional referenced public keys - public var references: [String] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Solana_Proto_CreateNonceAccount { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Required for building pre-signing hash of a transaction - public var nonceAccount: String = String() - - public var rent: UInt64 = 0 - - /// Optional for building pre-signing hash of a transaction - public var nonceAccountPrivateKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Solana_Proto_WithdrawNonceAccount { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var nonceAccount: String = String() - - public var recipient: String = String() - - public var value: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Solana_Proto_AdvanceNonceAccount { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var nonceAccount: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Solana_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Relatively recent block hash - public var recentBlockhash: String = String() - - public var v0Msg: Bool = false - - /// Payload message - public var transactionType: TW_Solana_Proto_SigningInput.OneOf_TransactionType? = nil - - public var transferTransaction: TW_Solana_Proto_Transfer { - get { - if case .transferTransaction(let v)? = transactionType {return v} - return TW_Solana_Proto_Transfer() - } - set {transactionType = .transferTransaction(newValue)} - } - - public var delegateStakeTransaction: TW_Solana_Proto_DelegateStake { - get { - if case .delegateStakeTransaction(let v)? = transactionType {return v} - return TW_Solana_Proto_DelegateStake() - } - set {transactionType = .delegateStakeTransaction(newValue)} - } - - public var deactivateStakeTransaction: TW_Solana_Proto_DeactivateStake { - get { - if case .deactivateStakeTransaction(let v)? = transactionType {return v} - return TW_Solana_Proto_DeactivateStake() - } - set {transactionType = .deactivateStakeTransaction(newValue)} - } - - public var deactivateAllStakeTransaction: TW_Solana_Proto_DeactivateAllStake { - get { - if case .deactivateAllStakeTransaction(let v)? = transactionType {return v} - return TW_Solana_Proto_DeactivateAllStake() - } - set {transactionType = .deactivateAllStakeTransaction(newValue)} - } - - public var withdrawTransaction: TW_Solana_Proto_WithdrawStake { - get { - if case .withdrawTransaction(let v)? = transactionType {return v} - return TW_Solana_Proto_WithdrawStake() - } - set {transactionType = .withdrawTransaction(newValue)} - } - - public var withdrawAllTransaction: TW_Solana_Proto_WithdrawAllStake { - get { - if case .withdrawAllTransaction(let v)? = transactionType {return v} - return TW_Solana_Proto_WithdrawAllStake() - } - set {transactionType = .withdrawAllTransaction(newValue)} - } - - public var createTokenAccountTransaction: TW_Solana_Proto_CreateTokenAccount { - get { - if case .createTokenAccountTransaction(let v)? = transactionType {return v} - return TW_Solana_Proto_CreateTokenAccount() - } - set {transactionType = .createTokenAccountTransaction(newValue)} - } - - public var tokenTransferTransaction: TW_Solana_Proto_TokenTransfer { - get { - if case .tokenTransferTransaction(let v)? = transactionType {return v} - return TW_Solana_Proto_TokenTransfer() - } - set {transactionType = .tokenTransferTransaction(newValue)} - } - - public var createAndTransferTokenTransaction: TW_Solana_Proto_CreateAndTransferToken { - get { - if case .createAndTransferTokenTransaction(let v)? = transactionType {return v} - return TW_Solana_Proto_CreateAndTransferToken() - } - set {transactionType = .createAndTransferTokenTransaction(newValue)} - } - - public var createNonceAccount: TW_Solana_Proto_CreateNonceAccount { - get { - if case .createNonceAccount(let v)? = transactionType {return v} - return TW_Solana_Proto_CreateNonceAccount() - } - set {transactionType = .createNonceAccount(newValue)} - } - - public var withdrawNonceAccount: TW_Solana_Proto_WithdrawNonceAccount { - get { - if case .withdrawNonceAccount(let v)? = transactionType {return v} - return TW_Solana_Proto_WithdrawNonceAccount() - } - set {transactionType = .withdrawNonceAccount(newValue)} - } - - public var advanceNonceAccount: TW_Solana_Proto_AdvanceNonceAccount { - get { - if case .advanceNonceAccount(let v)? = transactionType {return v} - return TW_Solana_Proto_AdvanceNonceAccount() - } - set {transactionType = .advanceNonceAccount(newValue)} - } - - /// Required for building pre-signing hash of a transaction - public var sender: String = String() - - /// Required for using durable transaction nonce - public var nonceAccount: String = String() - - /// Optional external fee payer private key. support: TokenTransfer, CreateAndTransferToken - public var feePayerPrivateKey: Data = Data() - - /// Optional external fee payer. support: TokenTransfer, CreateAndTransferToken - public var feePayer: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Payload message - public enum OneOf_TransactionType: Equatable { - case transferTransaction(TW_Solana_Proto_Transfer) - case delegateStakeTransaction(TW_Solana_Proto_DelegateStake) - case deactivateStakeTransaction(TW_Solana_Proto_DeactivateStake) - case deactivateAllStakeTransaction(TW_Solana_Proto_DeactivateAllStake) - case withdrawTransaction(TW_Solana_Proto_WithdrawStake) - case withdrawAllTransaction(TW_Solana_Proto_WithdrawAllStake) - case createTokenAccountTransaction(TW_Solana_Proto_CreateTokenAccount) - case tokenTransferTransaction(TW_Solana_Proto_TokenTransfer) - case createAndTransferTokenTransaction(TW_Solana_Proto_CreateAndTransferToken) - case createNonceAccount(TW_Solana_Proto_CreateNonceAccount) - case withdrawNonceAccount(TW_Solana_Proto_WithdrawNonceAccount) - case advanceNonceAccount(TW_Solana_Proto_AdvanceNonceAccount) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Solana_Proto_SigningInput.OneOf_TransactionType, rhs: TW_Solana_Proto_SigningInput.OneOf_TransactionType) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transferTransaction, .transferTransaction): return { - guard case .transferTransaction(let l) = lhs, case .transferTransaction(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.delegateStakeTransaction, .delegateStakeTransaction): return { - guard case .delegateStakeTransaction(let l) = lhs, case .delegateStakeTransaction(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.deactivateStakeTransaction, .deactivateStakeTransaction): return { - guard case .deactivateStakeTransaction(let l) = lhs, case .deactivateStakeTransaction(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.deactivateAllStakeTransaction, .deactivateAllStakeTransaction): return { - guard case .deactivateAllStakeTransaction(let l) = lhs, case .deactivateAllStakeTransaction(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.withdrawTransaction, .withdrawTransaction): return { - guard case .withdrawTransaction(let l) = lhs, case .withdrawTransaction(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.withdrawAllTransaction, .withdrawAllTransaction): return { - guard case .withdrawAllTransaction(let l) = lhs, case .withdrawAllTransaction(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.createTokenAccountTransaction, .createTokenAccountTransaction): return { - guard case .createTokenAccountTransaction(let l) = lhs, case .createTokenAccountTransaction(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.tokenTransferTransaction, .tokenTransferTransaction): return { - guard case .tokenTransferTransaction(let l) = lhs, case .tokenTransferTransaction(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.createAndTransferTokenTransaction, .createAndTransferTokenTransaction): return { - guard case .createAndTransferTokenTransaction(let l) = lhs, case .createAndTransferTokenTransaction(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.createNonceAccount, .createNonceAccount): return { - guard case .createNonceAccount(let l) = lhs, case .createNonceAccount(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.withdrawNonceAccount, .withdrawNonceAccount): return { - guard case .withdrawNonceAccount(let l) = lhs, case .withdrawNonceAccount(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.advanceNonceAccount, .advanceNonceAccount): return { - guard case .advanceNonceAccount(let l) = lhs, case .advanceNonceAccount(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Solana_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The encoded transaction - public var encoded: String = String() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - /// The unsigned transaction - public var unsignedTx: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -//// Transaction pre-signing output -public struct TW_Solana_Proto_PreSigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - //// Signer list - public var signers: [Data] = [] - - //// Pre-image data. There is no hashing for Solana presign image - public var data: Data = Data() - - /// Error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// Error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Solana.Proto" - -extension TW_Solana_Proto_Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "recipient"), - 2: .same(proto: "value"), - 3: .same(proto: "memo"), - 4: .same(proto: "references"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.recipient) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.memo) }() - case 4: try { try decoder.decodeRepeatedStringField(value: &self.references) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.recipient.isEmpty { - try visitor.visitSingularStringField(value: self.recipient, fieldNumber: 1) - } - if self.value != 0 { - try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 2) - } - if !self.memo.isEmpty { - try visitor.visitSingularStringField(value: self.memo, fieldNumber: 3) - } - if !self.references.isEmpty { - try visitor.visitRepeatedStringField(value: self.references, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_Transfer, rhs: TW_Solana_Proto_Transfer) -> Bool { - if lhs.recipient != rhs.recipient {return false} - if lhs.value != rhs.value {return false} - if lhs.memo != rhs.memo {return false} - if lhs.references != rhs.references {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_DelegateStake: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DelegateStake" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "validator_pubkey"), - 2: .same(proto: "value"), - 3: .standard(proto: "stake_account"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.validatorPubkey) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.stakeAccount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.validatorPubkey.isEmpty { - try visitor.visitSingularStringField(value: self.validatorPubkey, fieldNumber: 1) - } - if self.value != 0 { - try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 2) - } - if !self.stakeAccount.isEmpty { - try visitor.visitSingularStringField(value: self.stakeAccount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_DelegateStake, rhs: TW_Solana_Proto_DelegateStake) -> Bool { - if lhs.validatorPubkey != rhs.validatorPubkey {return false} - if lhs.value != rhs.value {return false} - if lhs.stakeAccount != rhs.stakeAccount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_DeactivateStake: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DeactivateStake" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "stake_account"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.stakeAccount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.stakeAccount.isEmpty { - try visitor.visitSingularStringField(value: self.stakeAccount, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_DeactivateStake, rhs: TW_Solana_Proto_DeactivateStake) -> Bool { - if lhs.stakeAccount != rhs.stakeAccount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_DeactivateAllStake: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DeactivateAllStake" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "stake_accounts"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedStringField(value: &self.stakeAccounts) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.stakeAccounts.isEmpty { - try visitor.visitRepeatedStringField(value: self.stakeAccounts, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_DeactivateAllStake, rhs: TW_Solana_Proto_DeactivateAllStake) -> Bool { - if lhs.stakeAccounts != rhs.stakeAccounts {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_WithdrawStake: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".WithdrawStake" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "stake_account"), - 2: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.stakeAccount) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.stakeAccount.isEmpty { - try visitor.visitSingularStringField(value: self.stakeAccount, fieldNumber: 1) - } - if self.value != 0 { - try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_WithdrawStake, rhs: TW_Solana_Proto_WithdrawStake) -> Bool { - if lhs.stakeAccount != rhs.stakeAccount {return false} - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_StakeAccountValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".StakeAccountValue" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "stake_account"), - 2: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.stakeAccount) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.stakeAccount.isEmpty { - try visitor.visitSingularStringField(value: self.stakeAccount, fieldNumber: 1) - } - if self.value != 0 { - try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_StakeAccountValue, rhs: TW_Solana_Proto_StakeAccountValue) -> Bool { - if lhs.stakeAccount != rhs.stakeAccount {return false} - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_WithdrawAllStake: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".WithdrawAllStake" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "stake_accounts"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedMessageField(value: &self.stakeAccounts) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.stakeAccounts.isEmpty { - try visitor.visitRepeatedMessageField(value: self.stakeAccounts, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_WithdrawAllStake, rhs: TW_Solana_Proto_WithdrawAllStake) -> Bool { - if lhs.stakeAccounts != rhs.stakeAccounts {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_CreateTokenAccount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CreateTokenAccount" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "main_address"), - 2: .standard(proto: "token_mint_address"), - 3: .standard(proto: "token_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.mainAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.tokenMintAddress) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.tokenAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.mainAddress.isEmpty { - try visitor.visitSingularStringField(value: self.mainAddress, fieldNumber: 1) - } - if !self.tokenMintAddress.isEmpty { - try visitor.visitSingularStringField(value: self.tokenMintAddress, fieldNumber: 2) - } - if !self.tokenAddress.isEmpty { - try visitor.visitSingularStringField(value: self.tokenAddress, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_CreateTokenAccount, rhs: TW_Solana_Proto_CreateTokenAccount) -> Bool { - if lhs.mainAddress != rhs.mainAddress {return false} - if lhs.tokenMintAddress != rhs.tokenMintAddress {return false} - if lhs.tokenAddress != rhs.tokenAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_TokenTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TokenTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "token_mint_address"), - 2: .standard(proto: "sender_token_address"), - 3: .standard(proto: "recipient_token_address"), - 4: .same(proto: "amount"), - 5: .same(proto: "decimals"), - 6: .same(proto: "memo"), - 7: .same(proto: "references"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.tokenMintAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.senderTokenAddress) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.recipientTokenAddress) }() - case 4: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &self.decimals) }() - case 6: try { try decoder.decodeSingularStringField(value: &self.memo) }() - case 7: try { try decoder.decodeRepeatedStringField(value: &self.references) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.tokenMintAddress.isEmpty { - try visitor.visitSingularStringField(value: self.tokenMintAddress, fieldNumber: 1) - } - if !self.senderTokenAddress.isEmpty { - try visitor.visitSingularStringField(value: self.senderTokenAddress, fieldNumber: 2) - } - if !self.recipientTokenAddress.isEmpty { - try visitor.visitSingularStringField(value: self.recipientTokenAddress, fieldNumber: 3) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 4) - } - if self.decimals != 0 { - try visitor.visitSingularUInt32Field(value: self.decimals, fieldNumber: 5) - } - if !self.memo.isEmpty { - try visitor.visitSingularStringField(value: self.memo, fieldNumber: 6) - } - if !self.references.isEmpty { - try visitor.visitRepeatedStringField(value: self.references, fieldNumber: 7) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_TokenTransfer, rhs: TW_Solana_Proto_TokenTransfer) -> Bool { - if lhs.tokenMintAddress != rhs.tokenMintAddress {return false} - if lhs.senderTokenAddress != rhs.senderTokenAddress {return false} - if lhs.recipientTokenAddress != rhs.recipientTokenAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.decimals != rhs.decimals {return false} - if lhs.memo != rhs.memo {return false} - if lhs.references != rhs.references {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_CreateAndTransferToken: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CreateAndTransferToken" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "recipient_main_address"), - 2: .standard(proto: "token_mint_address"), - 3: .standard(proto: "recipient_token_address"), - 4: .standard(proto: "sender_token_address"), - 5: .same(proto: "amount"), - 6: .same(proto: "decimals"), - 7: .same(proto: "memo"), - 8: .same(proto: "references"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.recipientMainAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.tokenMintAddress) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.recipientTokenAddress) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.senderTokenAddress) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 6: try { try decoder.decodeSingularUInt32Field(value: &self.decimals) }() - case 7: try { try decoder.decodeSingularStringField(value: &self.memo) }() - case 8: try { try decoder.decodeRepeatedStringField(value: &self.references) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.recipientMainAddress.isEmpty { - try visitor.visitSingularStringField(value: self.recipientMainAddress, fieldNumber: 1) - } - if !self.tokenMintAddress.isEmpty { - try visitor.visitSingularStringField(value: self.tokenMintAddress, fieldNumber: 2) - } - if !self.recipientTokenAddress.isEmpty { - try visitor.visitSingularStringField(value: self.recipientTokenAddress, fieldNumber: 3) - } - if !self.senderTokenAddress.isEmpty { - try visitor.visitSingularStringField(value: self.senderTokenAddress, fieldNumber: 4) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 5) - } - if self.decimals != 0 { - try visitor.visitSingularUInt32Field(value: self.decimals, fieldNumber: 6) - } - if !self.memo.isEmpty { - try visitor.visitSingularStringField(value: self.memo, fieldNumber: 7) - } - if !self.references.isEmpty { - try visitor.visitRepeatedStringField(value: self.references, fieldNumber: 8) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_CreateAndTransferToken, rhs: TW_Solana_Proto_CreateAndTransferToken) -> Bool { - if lhs.recipientMainAddress != rhs.recipientMainAddress {return false} - if lhs.tokenMintAddress != rhs.tokenMintAddress {return false} - if lhs.recipientTokenAddress != rhs.recipientTokenAddress {return false} - if lhs.senderTokenAddress != rhs.senderTokenAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.decimals != rhs.decimals {return false} - if lhs.memo != rhs.memo {return false} - if lhs.references != rhs.references {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_CreateNonceAccount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CreateNonceAccount" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "nonce_account"), - 2: .same(proto: "rent"), - 3: .standard(proto: "nonce_account_private_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.nonceAccount) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.rent) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.nonceAccountPrivateKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.nonceAccount.isEmpty { - try visitor.visitSingularStringField(value: self.nonceAccount, fieldNumber: 1) - } - if self.rent != 0 { - try visitor.visitSingularUInt64Field(value: self.rent, fieldNumber: 2) - } - if !self.nonceAccountPrivateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.nonceAccountPrivateKey, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_CreateNonceAccount, rhs: TW_Solana_Proto_CreateNonceAccount) -> Bool { - if lhs.nonceAccount != rhs.nonceAccount {return false} - if lhs.rent != rhs.rent {return false} - if lhs.nonceAccountPrivateKey != rhs.nonceAccountPrivateKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_WithdrawNonceAccount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".WithdrawNonceAccount" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "nonce_account"), - 2: .same(proto: "recipient"), - 3: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.nonceAccount) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.recipient) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.nonceAccount.isEmpty { - try visitor.visitSingularStringField(value: self.nonceAccount, fieldNumber: 1) - } - if !self.recipient.isEmpty { - try visitor.visitSingularStringField(value: self.recipient, fieldNumber: 2) - } - if self.value != 0 { - try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_WithdrawNonceAccount, rhs: TW_Solana_Proto_WithdrawNonceAccount) -> Bool { - if lhs.nonceAccount != rhs.nonceAccount {return false} - if lhs.recipient != rhs.recipient {return false} - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_AdvanceNonceAccount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".AdvanceNonceAccount" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "nonce_account"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.nonceAccount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.nonceAccount.isEmpty { - try visitor.visitSingularStringField(value: self.nonceAccount, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_AdvanceNonceAccount, rhs: TW_Solana_Proto_AdvanceNonceAccount) -> Bool { - if lhs.nonceAccount != rhs.nonceAccount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "private_key"), - 2: .standard(proto: "recent_blockhash"), - 3: .standard(proto: "v0_msg"), - 4: .standard(proto: "transfer_transaction"), - 5: .standard(proto: "delegate_stake_transaction"), - 6: .standard(proto: "deactivate_stake_transaction"), - 7: .standard(proto: "deactivate_all_stake_transaction"), - 8: .standard(proto: "withdraw_transaction"), - 9: .standard(proto: "withdraw_all_transaction"), - 10: .standard(proto: "create_token_account_transaction"), - 11: .standard(proto: "token_transfer_transaction"), - 12: .standard(proto: "create_and_transfer_token_transaction"), - 13: .standard(proto: "create_nonce_account"), - 16: .standard(proto: "withdraw_nonce_account"), - 19: .standard(proto: "advance_nonce_account"), - 14: .same(proto: "sender"), - 15: .standard(proto: "nonce_account"), - 17: .standard(proto: "fee_payer_private_key"), - 18: .standard(proto: "fee_payer"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.recentBlockhash) }() - case 3: try { try decoder.decodeSingularBoolField(value: &self.v0Msg) }() - case 4: try { - var v: TW_Solana_Proto_Transfer? - var hadOneofValue = false - if let current = self.transactionType { - hadOneofValue = true - if case .transferTransaction(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionType = .transferTransaction(v) - } - }() - case 5: try { - var v: TW_Solana_Proto_DelegateStake? - var hadOneofValue = false - if let current = self.transactionType { - hadOneofValue = true - if case .delegateStakeTransaction(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionType = .delegateStakeTransaction(v) - } - }() - case 6: try { - var v: TW_Solana_Proto_DeactivateStake? - var hadOneofValue = false - if let current = self.transactionType { - hadOneofValue = true - if case .deactivateStakeTransaction(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionType = .deactivateStakeTransaction(v) - } - }() - case 7: try { - var v: TW_Solana_Proto_DeactivateAllStake? - var hadOneofValue = false - if let current = self.transactionType { - hadOneofValue = true - if case .deactivateAllStakeTransaction(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionType = .deactivateAllStakeTransaction(v) - } - }() - case 8: try { - var v: TW_Solana_Proto_WithdrawStake? - var hadOneofValue = false - if let current = self.transactionType { - hadOneofValue = true - if case .withdrawTransaction(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionType = .withdrawTransaction(v) - } - }() - case 9: try { - var v: TW_Solana_Proto_WithdrawAllStake? - var hadOneofValue = false - if let current = self.transactionType { - hadOneofValue = true - if case .withdrawAllTransaction(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionType = .withdrawAllTransaction(v) - } - }() - case 10: try { - var v: TW_Solana_Proto_CreateTokenAccount? - var hadOneofValue = false - if let current = self.transactionType { - hadOneofValue = true - if case .createTokenAccountTransaction(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionType = .createTokenAccountTransaction(v) - } - }() - case 11: try { - var v: TW_Solana_Proto_TokenTransfer? - var hadOneofValue = false - if let current = self.transactionType { - hadOneofValue = true - if case .tokenTransferTransaction(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionType = .tokenTransferTransaction(v) - } - }() - case 12: try { - var v: TW_Solana_Proto_CreateAndTransferToken? - var hadOneofValue = false - if let current = self.transactionType { - hadOneofValue = true - if case .createAndTransferTokenTransaction(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionType = .createAndTransferTokenTransaction(v) - } - }() - case 13: try { - var v: TW_Solana_Proto_CreateNonceAccount? - var hadOneofValue = false - if let current = self.transactionType { - hadOneofValue = true - if case .createNonceAccount(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionType = .createNonceAccount(v) - } - }() - case 14: try { try decoder.decodeSingularStringField(value: &self.sender) }() - case 15: try { try decoder.decodeSingularStringField(value: &self.nonceAccount) }() - case 16: try { - var v: TW_Solana_Proto_WithdrawNonceAccount? - var hadOneofValue = false - if let current = self.transactionType { - hadOneofValue = true - if case .withdrawNonceAccount(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionType = .withdrawNonceAccount(v) - } - }() - case 17: try { try decoder.decodeSingularBytesField(value: &self.feePayerPrivateKey) }() - case 18: try { try decoder.decodeSingularStringField(value: &self.feePayer) }() - case 19: try { - var v: TW_Solana_Proto_AdvanceNonceAccount? - var hadOneofValue = false - if let current = self.transactionType { - hadOneofValue = true - if case .advanceNonceAccount(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionType = .advanceNonceAccount(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 1) - } - if !self.recentBlockhash.isEmpty { - try visitor.visitSingularStringField(value: self.recentBlockhash, fieldNumber: 2) - } - if self.v0Msg != false { - try visitor.visitSingularBoolField(value: self.v0Msg, fieldNumber: 3) - } - switch self.transactionType { - case .transferTransaction?: try { - guard case .transferTransaction(let v)? = self.transactionType else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case .delegateStakeTransaction?: try { - guard case .delegateStakeTransaction(let v)? = self.transactionType else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - }() - case .deactivateStakeTransaction?: try { - guard case .deactivateStakeTransaction(let v)? = self.transactionType else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - }() - case .deactivateAllStakeTransaction?: try { - guard case .deactivateAllStakeTransaction(let v)? = self.transactionType else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - }() - case .withdrawTransaction?: try { - guard case .withdrawTransaction(let v)? = self.transactionType else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case .withdrawAllTransaction?: try { - guard case .withdrawAllTransaction(let v)? = self.transactionType else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case .createTokenAccountTransaction?: try { - guard case .createTokenAccountTransaction(let v)? = self.transactionType else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - }() - case .tokenTransferTransaction?: try { - guard case .tokenTransferTransaction(let v)? = self.transactionType else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - }() - case .createAndTransferTokenTransaction?: try { - guard case .createAndTransferTokenTransaction(let v)? = self.transactionType else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - }() - case .createNonceAccount?: try { - guard case .createNonceAccount(let v)? = self.transactionType else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 13) - }() - default: break - } - if !self.sender.isEmpty { - try visitor.visitSingularStringField(value: self.sender, fieldNumber: 14) - } - if !self.nonceAccount.isEmpty { - try visitor.visitSingularStringField(value: self.nonceAccount, fieldNumber: 15) - } - try { if case .withdrawNonceAccount(let v)? = self.transactionType { - try visitor.visitSingularMessageField(value: v, fieldNumber: 16) - } }() - if !self.feePayerPrivateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.feePayerPrivateKey, fieldNumber: 17) - } - if !self.feePayer.isEmpty { - try visitor.visitSingularStringField(value: self.feePayer, fieldNumber: 18) - } - try { if case .advanceNonceAccount(let v)? = self.transactionType { - try visitor.visitSingularMessageField(value: v, fieldNumber: 19) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_SigningInput, rhs: TW_Solana_Proto_SigningInput) -> Bool { - if lhs.privateKey != rhs.privateKey {return false} - if lhs.recentBlockhash != rhs.recentBlockhash {return false} - if lhs.v0Msg != rhs.v0Msg {return false} - if lhs.transactionType != rhs.transactionType {return false} - if lhs.sender != rhs.sender {return false} - if lhs.nonceAccount != rhs.nonceAccount {return false} - if lhs.feePayerPrivateKey != rhs.feePayerPrivateKey {return false} - if lhs.feePayer != rhs.feePayer {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - 4: .standard(proto: "unsigned_tx"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.unsignedTx) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularStringField(value: self.encoded, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - if !self.unsignedTx.isEmpty { - try visitor.visitSingularStringField(value: self.unsignedTx, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_SigningOutput, rhs: TW_Solana_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unsignedTx != rhs.unsignedTx {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Solana_Proto_PreSigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".PreSigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "signers"), - 2: .same(proto: "data"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeRepeatedBytesField(value: &self.signers) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.data) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.signers.isEmpty { - try visitor.visitRepeatedBytesField(value: self.signers, fieldNumber: 1) - } - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Solana_Proto_PreSigningOutput, rhs: TW_Solana_Proto_PreSigningOutput) -> Bool { - if lhs.signers != rhs.signers {return false} - if lhs.data != rhs.data {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Stellar+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Stellar+Proto.swift deleted file mode 100644 index bc934962..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Stellar+Proto.swift +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias StellarAsset = TW_Stellar_Proto_Asset -public typealias StellarOperationCreateAccount = TW_Stellar_Proto_OperationCreateAccount -public typealias StellarOperationPayment = TW_Stellar_Proto_OperationPayment -public typealias StellarOperationChangeTrust = TW_Stellar_Proto_OperationChangeTrust -public typealias StellarClaimant = TW_Stellar_Proto_Claimant -public typealias StellarOperationCreateClaimableBalance = TW_Stellar_Proto_OperationCreateClaimableBalance -public typealias StellarOperationClaimClaimableBalance = TW_Stellar_Proto_OperationClaimClaimableBalance -public typealias StellarMemoVoid = TW_Stellar_Proto_MemoVoid -public typealias StellarMemoText = TW_Stellar_Proto_MemoText -public typealias StellarMemoId = TW_Stellar_Proto_MemoId -public typealias StellarMemoHash = TW_Stellar_Proto_MemoHash -public typealias StellarSigningInput = TW_Stellar_Proto_SigningInput -public typealias StellarSigningOutput = TW_Stellar_Proto_SigningOutput -public typealias StellarClaimPredicate = TW_Stellar_Proto_ClaimPredicate diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Stellar.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Stellar.pb.swift deleted file mode 100644 index 0eb95a52..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Stellar.pb.swift +++ /dev/null @@ -1,1184 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Stellar.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// A predicate (used in claim) -/// Rest of predicates not currently supported -/// See https://github.com/stellar/stellar-protocol/blob/master/core/cap-0023.md -public enum TW_Stellar_Proto_ClaimPredicate: SwiftProtobuf.Enum { - public typealias RawValue = Int - case predicateUnconditional // = 0 - case UNRECOGNIZED(Int) - - public init() { - self = .predicateUnconditional - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .predicateUnconditional - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .predicateUnconditional: return 0 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Stellar_Proto_ClaimPredicate: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Stellar_Proto_ClaimPredicate] = [ - .predicateUnconditional, - ] -} - -#endif // swift(>=4.2) - -/// Represents an asset -/// Note: alphanum12 currently not supported -public struct TW_Stellar_Proto_Asset { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Optional in case of non-native asset; the asset issuer address - public var issuer: String = String() - - /// Optional in case of non-native asset; the asset alphanum4 code. - public var alphanum4: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Create a new account -public struct TW_Stellar_Proto_OperationCreateAccount { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// address - public var destination: String = String() - - /// Amount (*10^7) - public var amount: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Perform payment -public struct TW_Stellar_Proto_OperationPayment { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Destination address - public var destination: String = String() - - /// Optional, can be left empty for native asset - public var asset: TW_Stellar_Proto_Asset { - get {return _asset ?? TW_Stellar_Proto_Asset()} - set {_asset = newValue} - } - /// Returns true if `asset` has been explicitly set. - public var hasAsset: Bool {return self._asset != nil} - /// Clears the value of `asset`. Subsequent reads from it will return its default value. - public mutating func clearAsset() {self._asset = nil} - - /// Amount (*10^7) - public var amount: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _asset: TW_Stellar_Proto_Asset? = nil -} - -/// Change trust -public struct TW_Stellar_Proto_OperationChangeTrust { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The asset - public var asset: TW_Stellar_Proto_Asset { - get {return _asset ?? TW_Stellar_Proto_Asset()} - set {_asset = newValue} - } - /// Returns true if `asset` has been explicitly set. - public var hasAsset: Bool {return self._asset != nil} - /// Clears the value of `asset`. Subsequent reads from it will return its default value. - public mutating func clearAsset() {self._asset = nil} - - /// Validity (time bound to), unix time. Set to (now() + 2 * 365 * 86400) for 2 years; set to 0 for missing. - public var validBefore: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _asset: TW_Stellar_Proto_Asset? = nil -} - -/// Claimant: account & predicate -public struct TW_Stellar_Proto_Claimant { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Claimant account - public var account: String = String() - - /// predicate - public var predicate: TW_Stellar_Proto_ClaimPredicate = .predicateUnconditional - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Create a claimable balance (2-phase transfer) -public struct TW_Stellar_Proto_OperationCreateClaimableBalance { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Optional, can be left empty for native asset - public var asset: TW_Stellar_Proto_Asset { - get {return _asset ?? TW_Stellar_Proto_Asset()} - set {_asset = newValue} - } - /// Returns true if `asset` has been explicitly set. - public var hasAsset: Bool {return self._asset != nil} - /// Clears the value of `asset`. Subsequent reads from it will return its default value. - public mutating func clearAsset() {self._asset = nil} - - /// Amount (*10^7) - public var amount: Int64 = 0 - - /// One or more claimants - public var claimants: [TW_Stellar_Proto_Claimant] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _asset: TW_Stellar_Proto_Asset? = nil -} - -/// Claim a claimable balance -public struct TW_Stellar_Proto_OperationClaimClaimableBalance { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// 32-byte balance ID hash - public var balanceID: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Empty memo (placeholder) -public struct TW_Stellar_Proto_MemoVoid { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Memo with text -public struct TW_Stellar_Proto_MemoText { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var text: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Memo with an ID -public struct TW_Stellar_Proto_MemoId { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var id: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Memo with a hash -public struct TW_Stellar_Proto_MemoHash { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var hash: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Stellar_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Transaction fee - public var fee: Int32 = 0 - - /// Account sequence - public var sequence: Int64 = 0 - - /// Source account - public var account: String = String() - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Wellknown passphrase, specific to the chain - public var passphrase: String = String() - - /// Payload message - public var operationOneof: TW_Stellar_Proto_SigningInput.OneOf_OperationOneof? = nil - - public var opCreateAccount: TW_Stellar_Proto_OperationCreateAccount { - get { - if case .opCreateAccount(let v)? = operationOneof {return v} - return TW_Stellar_Proto_OperationCreateAccount() - } - set {operationOneof = .opCreateAccount(newValue)} - } - - public var opPayment: TW_Stellar_Proto_OperationPayment { - get { - if case .opPayment(let v)? = operationOneof {return v} - return TW_Stellar_Proto_OperationPayment() - } - set {operationOneof = .opPayment(newValue)} - } - - public var opChangeTrust: TW_Stellar_Proto_OperationChangeTrust { - get { - if case .opChangeTrust(let v)? = operationOneof {return v} - return TW_Stellar_Proto_OperationChangeTrust() - } - set {operationOneof = .opChangeTrust(newValue)} - } - - public var opCreateClaimableBalance: TW_Stellar_Proto_OperationCreateClaimableBalance { - get { - if case .opCreateClaimableBalance(let v)? = operationOneof {return v} - return TW_Stellar_Proto_OperationCreateClaimableBalance() - } - set {operationOneof = .opCreateClaimableBalance(newValue)} - } - - public var opClaimClaimableBalance: TW_Stellar_Proto_OperationClaimClaimableBalance { - get { - if case .opClaimClaimableBalance(let v)? = operationOneof {return v} - return TW_Stellar_Proto_OperationClaimClaimableBalance() - } - set {operationOneof = .opClaimClaimableBalance(newValue)} - } - - /// Memo - public var memoTypeOneof: TW_Stellar_Proto_SigningInput.OneOf_MemoTypeOneof? = nil - - public var memoVoid: TW_Stellar_Proto_MemoVoid { - get { - if case .memoVoid(let v)? = memoTypeOneof {return v} - return TW_Stellar_Proto_MemoVoid() - } - set {memoTypeOneof = .memoVoid(newValue)} - } - - public var memoText: TW_Stellar_Proto_MemoText { - get { - if case .memoText(let v)? = memoTypeOneof {return v} - return TW_Stellar_Proto_MemoText() - } - set {memoTypeOneof = .memoText(newValue)} - } - - public var memoID: TW_Stellar_Proto_MemoId { - get { - if case .memoID(let v)? = memoTypeOneof {return v} - return TW_Stellar_Proto_MemoId() - } - set {memoTypeOneof = .memoID(newValue)} - } - - public var memoHash: TW_Stellar_Proto_MemoHash { - get { - if case .memoHash(let v)? = memoTypeOneof {return v} - return TW_Stellar_Proto_MemoHash() - } - set {memoTypeOneof = .memoHash(newValue)} - } - - public var memoReturnHash: TW_Stellar_Proto_MemoHash { - get { - if case .memoReturnHash(let v)? = memoTypeOneof {return v} - return TW_Stellar_Proto_MemoHash() - } - set {memoTypeOneof = .memoReturnHash(newValue)} - } - - public var timeBounds: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Payload message - public enum OneOf_OperationOneof: Equatable { - case opCreateAccount(TW_Stellar_Proto_OperationCreateAccount) - case opPayment(TW_Stellar_Proto_OperationPayment) - case opChangeTrust(TW_Stellar_Proto_OperationChangeTrust) - case opCreateClaimableBalance(TW_Stellar_Proto_OperationCreateClaimableBalance) - case opClaimClaimableBalance(TW_Stellar_Proto_OperationClaimClaimableBalance) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Stellar_Proto_SigningInput.OneOf_OperationOneof, rhs: TW_Stellar_Proto_SigningInput.OneOf_OperationOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.opCreateAccount, .opCreateAccount): return { - guard case .opCreateAccount(let l) = lhs, case .opCreateAccount(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.opPayment, .opPayment): return { - guard case .opPayment(let l) = lhs, case .opPayment(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.opChangeTrust, .opChangeTrust): return { - guard case .opChangeTrust(let l) = lhs, case .opChangeTrust(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.opCreateClaimableBalance, .opCreateClaimableBalance): return { - guard case .opCreateClaimableBalance(let l) = lhs, case .opCreateClaimableBalance(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.opClaimClaimableBalance, .opClaimClaimableBalance): return { - guard case .opClaimClaimableBalance(let l) = lhs, case .opClaimClaimableBalance(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - /// Memo - public enum OneOf_MemoTypeOneof: Equatable { - case memoVoid(TW_Stellar_Proto_MemoVoid) - case memoText(TW_Stellar_Proto_MemoText) - case memoID(TW_Stellar_Proto_MemoId) - case memoHash(TW_Stellar_Proto_MemoHash) - case memoReturnHash(TW_Stellar_Proto_MemoHash) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Stellar_Proto_SigningInput.OneOf_MemoTypeOneof, rhs: TW_Stellar_Proto_SigningInput.OneOf_MemoTypeOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.memoVoid, .memoVoid): return { - guard case .memoVoid(let l) = lhs, case .memoVoid(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.memoText, .memoText): return { - guard case .memoText(let l) = lhs, case .memoText(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.memoID, .memoID): return { - guard case .memoID(let l) = lhs, case .memoID(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.memoHash, .memoHash): return { - guard case .memoHash(let l) = lhs, case .memoHash(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.memoReturnHash, .memoReturnHash): return { - guard case .memoReturnHash(let l) = lhs, case .memoReturnHash(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Stellar_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signature. - public var signature: String = String() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Stellar.Proto" - -extension TW_Stellar_Proto_ClaimPredicate: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "Predicate_unconditional"), - ] -} - -extension TW_Stellar_Proto_Asset: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Asset" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "issuer"), - 2: .same(proto: "alphanum4"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.issuer) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.alphanum4) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.issuer.isEmpty { - try visitor.visitSingularStringField(value: self.issuer, fieldNumber: 1) - } - if !self.alphanum4.isEmpty { - try visitor.visitSingularStringField(value: self.alphanum4, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Stellar_Proto_Asset, rhs: TW_Stellar_Proto_Asset) -> Bool { - if lhs.issuer != rhs.issuer {return false} - if lhs.alphanum4 != rhs.alphanum4 {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Stellar_Proto_OperationCreateAccount: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OperationCreateAccount" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "destination"), - 2: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.destination) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.destination.isEmpty { - try visitor.visitSingularStringField(value: self.destination, fieldNumber: 1) - } - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Stellar_Proto_OperationCreateAccount, rhs: TW_Stellar_Proto_OperationCreateAccount) -> Bool { - if lhs.destination != rhs.destination {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Stellar_Proto_OperationPayment: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OperationPayment" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "destination"), - 2: .same(proto: "asset"), - 3: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.destination) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._asset) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.destination.isEmpty { - try visitor.visitSingularStringField(value: self.destination, fieldNumber: 1) - } - try { if let v = self._asset { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Stellar_Proto_OperationPayment, rhs: TW_Stellar_Proto_OperationPayment) -> Bool { - if lhs.destination != rhs.destination {return false} - if lhs._asset != rhs._asset {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Stellar_Proto_OperationChangeTrust: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OperationChangeTrust" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "asset"), - 2: .standard(proto: "valid_before"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._asset) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.validBefore) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._asset { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if self.validBefore != 0 { - try visitor.visitSingularInt64Field(value: self.validBefore, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Stellar_Proto_OperationChangeTrust, rhs: TW_Stellar_Proto_OperationChangeTrust) -> Bool { - if lhs._asset != rhs._asset {return false} - if lhs.validBefore != rhs.validBefore {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Stellar_Proto_Claimant: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Claimant" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "account"), - 2: .same(proto: "predicate"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.account) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.predicate) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.account.isEmpty { - try visitor.visitSingularStringField(value: self.account, fieldNumber: 1) - } - if self.predicate != .predicateUnconditional { - try visitor.visitSingularEnumField(value: self.predicate, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Stellar_Proto_Claimant, rhs: TW_Stellar_Proto_Claimant) -> Bool { - if lhs.account != rhs.account {return false} - if lhs.predicate != rhs.predicate {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Stellar_Proto_OperationCreateClaimableBalance: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OperationCreateClaimableBalance" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "asset"), - 2: .same(proto: "amount"), - 3: .same(proto: "claimants"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._asset) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.claimants) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._asset { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 2) - } - if !self.claimants.isEmpty { - try visitor.visitRepeatedMessageField(value: self.claimants, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Stellar_Proto_OperationCreateClaimableBalance, rhs: TW_Stellar_Proto_OperationCreateClaimableBalance) -> Bool { - if lhs._asset != rhs._asset {return false} - if lhs.amount != rhs.amount {return false} - if lhs.claimants != rhs.claimants {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Stellar_Proto_OperationClaimClaimableBalance: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OperationClaimClaimableBalance" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "balance_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.balanceID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.balanceID.isEmpty { - try visitor.visitSingularBytesField(value: self.balanceID, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Stellar_Proto_OperationClaimClaimableBalance, rhs: TW_Stellar_Proto_OperationClaimClaimableBalance) -> Bool { - if lhs.balanceID != rhs.balanceID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Stellar_Proto_MemoVoid: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".MemoVoid" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - public mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - public func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Stellar_Proto_MemoVoid, rhs: TW_Stellar_Proto_MemoVoid) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Stellar_Proto_MemoText: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".MemoText" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "text"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.text) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.text.isEmpty { - try visitor.visitSingularStringField(value: self.text, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Stellar_Proto_MemoText, rhs: TW_Stellar_Proto_MemoText) -> Bool { - if lhs.text != rhs.text {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Stellar_Proto_MemoId: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".MemoId" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.id) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.id != 0 { - try visitor.visitSingularInt64Field(value: self.id, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Stellar_Proto_MemoId, rhs: TW_Stellar_Proto_MemoId) -> Bool { - if lhs.id != rhs.id {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Stellar_Proto_MemoHash: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".MemoHash" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "hash"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.hash) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.hash.isEmpty { - try visitor.visitSingularBytesField(value: self.hash, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Stellar_Proto_MemoHash, rhs: TW_Stellar_Proto_MemoHash) -> Bool { - if lhs.hash != rhs.hash {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Stellar_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "fee"), - 2: .same(proto: "sequence"), - 3: .same(proto: "account"), - 4: .standard(proto: "private_key"), - 5: .same(proto: "passphrase"), - 6: .standard(proto: "op_create_account"), - 7: .standard(proto: "op_payment"), - 8: .standard(proto: "op_change_trust"), - 14: .standard(proto: "op_create_claimable_balance"), - 15: .standard(proto: "op_claim_claimable_balance"), - 9: .standard(proto: "memo_void"), - 10: .standard(proto: "memo_text"), - 11: .standard(proto: "memo_id"), - 12: .standard(proto: "memo_hash"), - 13: .standard(proto: "memo_return_hash"), - 16: .standard(proto: "time_bounds"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self.fee) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.sequence) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.account) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.passphrase) }() - case 6: try { - var v: TW_Stellar_Proto_OperationCreateAccount? - var hadOneofValue = false - if let current = self.operationOneof { - hadOneofValue = true - if case .opCreateAccount(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationOneof = .opCreateAccount(v) - } - }() - case 7: try { - var v: TW_Stellar_Proto_OperationPayment? - var hadOneofValue = false - if let current = self.operationOneof { - hadOneofValue = true - if case .opPayment(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationOneof = .opPayment(v) - } - }() - case 8: try { - var v: TW_Stellar_Proto_OperationChangeTrust? - var hadOneofValue = false - if let current = self.operationOneof { - hadOneofValue = true - if case .opChangeTrust(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationOneof = .opChangeTrust(v) - } - }() - case 9: try { - var v: TW_Stellar_Proto_MemoVoid? - var hadOneofValue = false - if let current = self.memoTypeOneof { - hadOneofValue = true - if case .memoVoid(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.memoTypeOneof = .memoVoid(v) - } - }() - case 10: try { - var v: TW_Stellar_Proto_MemoText? - var hadOneofValue = false - if let current = self.memoTypeOneof { - hadOneofValue = true - if case .memoText(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.memoTypeOneof = .memoText(v) - } - }() - case 11: try { - var v: TW_Stellar_Proto_MemoId? - var hadOneofValue = false - if let current = self.memoTypeOneof { - hadOneofValue = true - if case .memoID(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.memoTypeOneof = .memoID(v) - } - }() - case 12: try { - var v: TW_Stellar_Proto_MemoHash? - var hadOneofValue = false - if let current = self.memoTypeOneof { - hadOneofValue = true - if case .memoHash(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.memoTypeOneof = .memoHash(v) - } - }() - case 13: try { - var v: TW_Stellar_Proto_MemoHash? - var hadOneofValue = false - if let current = self.memoTypeOneof { - hadOneofValue = true - if case .memoReturnHash(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.memoTypeOneof = .memoReturnHash(v) - } - }() - case 14: try { - var v: TW_Stellar_Proto_OperationCreateClaimableBalance? - var hadOneofValue = false - if let current = self.operationOneof { - hadOneofValue = true - if case .opCreateClaimableBalance(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationOneof = .opCreateClaimableBalance(v) - } - }() - case 15: try { - var v: TW_Stellar_Proto_OperationClaimClaimableBalance? - var hadOneofValue = false - if let current = self.operationOneof { - hadOneofValue = true - if case .opClaimClaimableBalance(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationOneof = .opClaimClaimableBalance(v) - } - }() - case 16: try { try decoder.decodeSingularInt64Field(value: &self.timeBounds) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.fee != 0 { - try visitor.visitSingularInt32Field(value: self.fee, fieldNumber: 1) - } - if self.sequence != 0 { - try visitor.visitSingularInt64Field(value: self.sequence, fieldNumber: 2) - } - if !self.account.isEmpty { - try visitor.visitSingularStringField(value: self.account, fieldNumber: 3) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 4) - } - if !self.passphrase.isEmpty { - try visitor.visitSingularStringField(value: self.passphrase, fieldNumber: 5) - } - switch self.operationOneof { - case .opCreateAccount?: try { - guard case .opCreateAccount(let v)? = self.operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - }() - case .opPayment?: try { - guard case .opPayment(let v)? = self.operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - }() - case .opChangeTrust?: try { - guard case .opChangeTrust(let v)? = self.operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - default: break - } - switch self.memoTypeOneof { - case .memoVoid?: try { - guard case .memoVoid(let v)? = self.memoTypeOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case .memoText?: try { - guard case .memoText(let v)? = self.memoTypeOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - }() - case .memoID?: try { - guard case .memoID(let v)? = self.memoTypeOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - }() - case .memoHash?: try { - guard case .memoHash(let v)? = self.memoTypeOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - }() - case .memoReturnHash?: try { - guard case .memoReturnHash(let v)? = self.memoTypeOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 13) - }() - case nil: break - } - switch self.operationOneof { - case .opCreateClaimableBalance?: try { - guard case .opCreateClaimableBalance(let v)? = self.operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 14) - }() - case .opClaimClaimableBalance?: try { - guard case .opClaimClaimableBalance(let v)? = self.operationOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - }() - default: break - } - if self.timeBounds != 0 { - try visitor.visitSingularInt64Field(value: self.timeBounds, fieldNumber: 16) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Stellar_Proto_SigningInput, rhs: TW_Stellar_Proto_SigningInput) -> Bool { - if lhs.fee != rhs.fee {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.account != rhs.account {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.passphrase != rhs.passphrase {return false} - if lhs.operationOneof != rhs.operationOneof {return false} - if lhs.memoTypeOneof != rhs.memoTypeOneof {return false} - if lhs.timeBounds != rhs.timeBounds {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Stellar_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "signature"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.signature) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.signature.isEmpty { - try visitor.visitSingularStringField(value: self.signature, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Stellar_Proto_SigningOutput, rhs: TW_Stellar_Proto_SigningOutput) -> Bool { - if lhs.signature != rhs.signature {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Sui+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Sui+Proto.swift deleted file mode 100644 index ce478ff3..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Sui+Proto.swift +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias SuiSignDirect = TW_Sui_Proto_SignDirect -public typealias SuiSigningInput = TW_Sui_Proto_SigningInput -public typealias SuiSigningOutput = TW_Sui_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Sui.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Sui.pb.swift deleted file mode 100644 index b2e2abd0..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Sui.pb.swift +++ /dev/null @@ -1,246 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Sui.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Base64 encoded msg to sign (string) -public struct TW_Sui_Proto_SignDirect { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Obtain by calling any write RpcJson on SUI - public var unsignedTxMsg: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Sui_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Private key to sign the transaction (bytes) - public var privateKey: Data = Data() - - public var transactionPayload: TW_Sui_Proto_SigningInput.OneOf_TransactionPayload? = nil - - public var signDirectMessage: TW_Sui_Proto_SignDirect { - get { - if case .signDirectMessage(let v)? = transactionPayload {return v} - return TW_Sui_Proto_SignDirect() - } - set {transactionPayload = .signDirectMessage(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_TransactionPayload: Equatable { - case signDirectMessage(TW_Sui_Proto_SignDirect) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Sui_Proto_SigningInput.OneOf_TransactionPayload, rhs: TW_Sui_Proto_SigningInput.OneOf_TransactionPayload) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.signDirectMessage, .signDirectMessage): return { - guard case .signDirectMessage(let l) = lhs, case .signDirectMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - } - } - #endif - } - - public init() {} -} - -/// Transaction signing output. -public struct TW_Sui_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - //// The raw transaction without indent in base64 - public var unsignedTx: String = String() - - //// The signature encoded in base64 - public var signature: String = String() - - /// Error code, 0 is ok, other codes will be treated as errors. - public var error: TW_Common_Proto_SigningError = .ok - - /// Error description. - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Sui.Proto" - -extension TW_Sui_Proto_SignDirect: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SignDirect" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "unsigned_tx_msg"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.unsignedTxMsg) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.unsignedTxMsg.isEmpty { - try visitor.visitSingularStringField(value: self.unsignedTxMsg, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Sui_Proto_SignDirect, rhs: TW_Sui_Proto_SignDirect) -> Bool { - if lhs.unsignedTxMsg != rhs.unsignedTxMsg {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Sui_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "private_key"), - 2: .standard(proto: "sign_direct_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 2: try { - var v: TW_Sui_Proto_SignDirect? - var hadOneofValue = false - if let current = self.transactionPayload { - hadOneofValue = true - if case .signDirectMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.transactionPayload = .signDirectMessage(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 1) - } - try { if case .signDirectMessage(let v)? = self.transactionPayload { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Sui_Proto_SigningInput, rhs: TW_Sui_Proto_SigningInput) -> Bool { - if lhs.privateKey != rhs.privateKey {return false} - if lhs.transactionPayload != rhs.transactionPayload {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Sui_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "unsigned_tx"), - 2: .same(proto: "signature"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.unsignedTx) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.signature) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.unsignedTx.isEmpty { - try visitor.visitSingularStringField(value: self.unsignedTx, fieldNumber: 1) - } - if !self.signature.isEmpty { - try visitor.visitSingularStringField(value: self.signature, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Sui_Proto_SigningOutput, rhs: TW_Sui_Proto_SigningOutput) -> Bool { - if lhs.unsignedTx != rhs.unsignedTx {return false} - if lhs.signature != rhs.signature {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/THORChainSwap+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/THORChainSwap+Proto.swift deleted file mode 100644 index 7d177b57..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/THORChainSwap+Proto.swift +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias THORChainSwapError = TW_THORChainSwap_Proto_Error -public typealias THORChainSwapAsset = TW_THORChainSwap_Proto_Asset -public typealias THORChainSwapStreamParams = TW_THORChainSwap_Proto_StreamParams -public typealias THORChainSwapSwapInput = TW_THORChainSwap_Proto_SwapInput -public typealias THORChainSwapSwapOutput = TW_THORChainSwap_Proto_SwapOutput -public typealias THORChainSwapChain = TW_THORChainSwap_Proto_Chain -public typealias THORChainSwapErrorCode = TW_THORChainSwap_Proto_ErrorCode diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/THORChainSwap.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/THORChainSwap.pb.swift deleted file mode 100644 index 4b9ad18e..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/THORChainSwap.pb.swift +++ /dev/null @@ -1,912 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: THORChainSwap.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Supported blockchains -public enum TW_THORChainSwap_Proto_Chain: SwiftProtobuf.Enum { - public typealias RawValue = Int - case thor // = 0 - case btc // = 1 - case eth // = 2 - case bnb // = 3 - case doge // = 4 - case bch // = 5 - case ltc // = 6 - case atom // = 7 - case avax // = 8 - case bsc // = 9 - case UNRECOGNIZED(Int) - - public init() { - self = .thor - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .thor - case 1: self = .btc - case 2: self = .eth - case 3: self = .bnb - case 4: self = .doge - case 5: self = .bch - case 6: self = .ltc - case 7: self = .atom - case 8: self = .avax - case 9: self = .bsc - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .thor: return 0 - case .btc: return 1 - case .eth: return 2 - case .bnb: return 3 - case .doge: return 4 - case .bch: return 5 - case .ltc: return 6 - case .atom: return 7 - case .avax: return 8 - case .bsc: return 9 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_THORChainSwap_Proto_Chain: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_THORChainSwap_Proto_Chain] = [ - .thor, - .btc, - .eth, - .bnb, - .doge, - .bch, - .ltc, - .atom, - .avax, - .bsc, - ] -} - -#endif // swift(>=4.2) - -/// Predefined error codes -public enum TW_THORChainSwap_Proto_ErrorCode: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// OK - case ok // = 0 - case errorGeneral // = 1 - case errorInputProtoDeserialization // = 2 - case errorUnsupportedFromChain // = 13 - case errorUnsupportedToChain // = 14 - case errorInvalidFromAddress // = 15 - case errorInvalidToAddress // = 16 - case errorInvalidVaultAddress // = 21 - case errorInvalidRouterAddress // = 22 - case UNRECOGNIZED(Int) - - public init() { - self = .ok - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .ok - case 1: self = .errorGeneral - case 2: self = .errorInputProtoDeserialization - case 13: self = .errorUnsupportedFromChain - case 14: self = .errorUnsupportedToChain - case 15: self = .errorInvalidFromAddress - case 16: self = .errorInvalidToAddress - case 21: self = .errorInvalidVaultAddress - case 22: self = .errorInvalidRouterAddress - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .ok: return 0 - case .errorGeneral: return 1 - case .errorInputProtoDeserialization: return 2 - case .errorUnsupportedFromChain: return 13 - case .errorUnsupportedToChain: return 14 - case .errorInvalidFromAddress: return 15 - case .errorInvalidToAddress: return 16 - case .errorInvalidVaultAddress: return 21 - case .errorInvalidRouterAddress: return 22 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_THORChainSwap_Proto_ErrorCode: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_THORChainSwap_Proto_ErrorCode] = [ - .ok, - .errorGeneral, - .errorInputProtoDeserialization, - .errorUnsupportedFromChain, - .errorUnsupportedToChain, - .errorInvalidFromAddress, - .errorInvalidToAddress, - .errorInvalidVaultAddress, - .errorInvalidRouterAddress, - ] -} - -#endif // swift(>=4.2) - -/// An error code + a free text -public struct TW_THORChainSwap_Proto_Error { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// code of the error - public var code: TW_THORChainSwap_Proto_ErrorCode = .ok - - /// optional error message - public var message: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Represents an asset. Examples: BNB.BNB, RUNE.RUNE, BNB.RUNE-67C -public struct TW_THORChainSwap_Proto_Asset { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Chain ID - public var chain: TW_THORChainSwap_Proto_Chain = .thor - - /// Symbol - public var symbol: String = String() - - /// The ID of the token (blockchain-specific format) - public var tokenID: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_THORChainSwap_Proto_StreamParams { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Optional Swap Interval ncy in blocks. - /// The default is 1 - time-optimised means getting the trade done quickly, regardless of the cost. - public var interval: String = String() - - /// Optional Swap Quantity. Swap interval times every Interval blocks. - /// The default is 0 - network will determine the number of swaps. - public var quantity: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input for a swap between source and destination chains; for creating a TX on the source chain. -public struct TW_THORChainSwap_Proto_SwapInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Source chain - public var fromAsset: TW_THORChainSwap_Proto_Asset { - get {return _storage._fromAsset ?? TW_THORChainSwap_Proto_Asset()} - set {_uniqueStorage()._fromAsset = newValue} - } - /// Returns true if `fromAsset` has been explicitly set. - public var hasFromAsset: Bool {return _storage._fromAsset != nil} - /// Clears the value of `fromAsset`. Subsequent reads from it will return its default value. - public mutating func clearFromAsset() {_uniqueStorage()._fromAsset = nil} - - /// Source address, on source chain - public var fromAddress: String { - get {return _storage._fromAddress} - set {_uniqueStorage()._fromAddress = newValue} - } - - /// Destination chain+asset, on destination chain - public var toAsset: TW_THORChainSwap_Proto_Asset { - get {return _storage._toAsset ?? TW_THORChainSwap_Proto_Asset()} - set {_uniqueStorage()._toAsset = newValue} - } - /// Returns true if `toAsset` has been explicitly set. - public var hasToAsset: Bool {return _storage._toAsset != nil} - /// Clears the value of `toAsset`. Subsequent reads from it will return its default value. - public mutating func clearToAsset() {_uniqueStorage()._toAsset = nil} - - /// Destination address, on destination chain - public var toAddress: String { - get {return _storage._toAddress} - set {_uniqueStorage()._toAddress = newValue} - } - - /// ThorChainSwap vault, on the source chain. Should be queried afresh, as it may change - public var vaultAddress: String { - get {return _storage._vaultAddress} - set {_uniqueStorage()._vaultAddress = newValue} - } - - /// ThorChain router, only in case of Ethereum source network - public var routerAddress: String { - get {return _storage._routerAddress} - set {_uniqueStorage()._routerAddress = newValue} - } - - /// The source amount, integer as string, in the smallest native unit of the chain - public var fromAmount: String { - get {return _storage._fromAmount} - set {_uniqueStorage()._fromAmount = newValue} - } - - /// Optional minimum accepted destination amount. Actual destination amount will depend on current rates, limit amount can be used to prevent using very unfavorable rates. - /// The default is 0 - no price limit. - public var toAmountLimit: String { - get {return _storage._toAmountLimit} - set {_uniqueStorage()._toAmountLimit = newValue} - } - - /// Optional affiliate fee destination address. A Rune address. - public var affiliateFeeAddress: String { - get {return _storage._affiliateFeeAddress} - set {_uniqueStorage()._affiliateFeeAddress = newValue} - } - - /// Optional affiliate fee, percentage base points, e.g. 100 means 1%, 0 - 1000, as string. Empty means to ignore it. - public var affiliateFeeRateBp: String { - get {return _storage._affiliateFeeRateBp} - set {_uniqueStorage()._affiliateFeeRateBp = newValue} - } - - /// Optional extra custom memo, reserved for later use. - public var extraMemo: String { - get {return _storage._extraMemo} - set {_uniqueStorage()._extraMemo = newValue} - } - - /// Optional expirationTime, will be now() + 15 min if not set - public var expirationTime: UInt64 { - get {return _storage._expirationTime} - set {_uniqueStorage()._expirationTime = newValue} - } - - /// Optional streaming parameters. Use Streaming Swaps and Swap Optimisation strategy if set. - /// https://docs.thorchain.org/thorchain-finance/continuous-liquidity-pools#streaming-swaps-and-swap-optimisation - public var streamParams: TW_THORChainSwap_Proto_StreamParams { - get {return _storage._streamParams ?? TW_THORChainSwap_Proto_StreamParams()} - set {_uniqueStorage()._streamParams = newValue} - } - /// Returns true if `streamParams` has been explicitly set. - public var hasStreamParams: Bool {return _storage._streamParams != nil} - /// Clears the value of `streamParams`. Subsequent reads from it will return its default value. - public mutating func clearStreamParams() {_uniqueStorage()._streamParams = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Result of the swap, a SigningInput struct for the specific chain -public struct TW_THORChainSwap_Proto_SwapOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Source chain - public var fromChain: TW_THORChainSwap_Proto_Chain { - get {return _storage._fromChain} - set {_uniqueStorage()._fromChain = newValue} - } - - /// Destination chain - public var toChain: TW_THORChainSwap_Proto_Chain { - get {return _storage._toChain} - set {_uniqueStorage()._toChain = newValue} - } - - /// Error code, filled in case of error, OK/empty on success - public var error: TW_THORChainSwap_Proto_Error { - get {return _storage._error ?? TW_THORChainSwap_Proto_Error()} - set {_uniqueStorage()._error = newValue} - } - /// Returns true if `error` has been explicitly set. - public var hasError: Bool {return _storage._error != nil} - /// Clears the value of `error`. Subsequent reads from it will return its default value. - public mutating func clearError() {_uniqueStorage()._error = nil} - - /// Prepared unsigned transaction input, on the source chain, to THOR. Some fields must be completed, and it has to be signed. - public var signingInputOneof: OneOf_SigningInputOneof? { - get {return _storage._signingInputOneof} - set {_uniqueStorage()._signingInputOneof = newValue} - } - - public var bitcoin: TW_Bitcoin_Proto_SigningInput { - get { - if case .bitcoin(let v)? = _storage._signingInputOneof {return v} - return TW_Bitcoin_Proto_SigningInput() - } - set {_uniqueStorage()._signingInputOneof = .bitcoin(newValue)} - } - - public var ethereum: TW_Ethereum_Proto_SigningInput { - get { - if case .ethereum(let v)? = _storage._signingInputOneof {return v} - return TW_Ethereum_Proto_SigningInput() - } - set {_uniqueStorage()._signingInputOneof = .ethereum(newValue)} - } - - public var binance: TW_Binance_Proto_SigningInput { - get { - if case .binance(let v)? = _storage._signingInputOneof {return v} - return TW_Binance_Proto_SigningInput() - } - set {_uniqueStorage()._signingInputOneof = .binance(newValue)} - } - - public var cosmos: TW_Cosmos_Proto_SigningInput { - get { - if case .cosmos(let v)? = _storage._signingInputOneof {return v} - return TW_Cosmos_Proto_SigningInput() - } - set {_uniqueStorage()._signingInputOneof = .cosmos(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Prepared unsigned transaction input, on the source chain, to THOR. Some fields must be completed, and it has to be signed. - public enum OneOf_SigningInputOneof: Equatable { - case bitcoin(TW_Bitcoin_Proto_SigningInput) - case ethereum(TW_Ethereum_Proto_SigningInput) - case binance(TW_Binance_Proto_SigningInput) - case cosmos(TW_Cosmos_Proto_SigningInput) - - #if !swift(>=4.1) - public static func ==(lhs: TW_THORChainSwap_Proto_SwapOutput.OneOf_SigningInputOneof, rhs: TW_THORChainSwap_Proto_SwapOutput.OneOf_SigningInputOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.bitcoin, .bitcoin): return { - guard case .bitcoin(let l) = lhs, case .bitcoin(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.ethereum, .ethereum): return { - guard case .ethereum(let l) = lhs, case .ethereum(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.binance, .binance): return { - guard case .binance(let l) = lhs, case .binance(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.cosmos, .cosmos): return { - guard case .cosmos(let l) = lhs, case .cosmos(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.THORChainSwap.Proto" - -extension TW_THORChainSwap_Proto_Chain: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "THOR"), - 1: .same(proto: "BTC"), - 2: .same(proto: "ETH"), - 3: .same(proto: "BNB"), - 4: .same(proto: "DOGE"), - 5: .same(proto: "BCH"), - 6: .same(proto: "LTC"), - 7: .same(proto: "ATOM"), - 8: .same(proto: "AVAX"), - 9: .same(proto: "BSC"), - ] -} - -extension TW_THORChainSwap_Proto_ErrorCode: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "OK"), - 1: .same(proto: "Error_general"), - 2: .same(proto: "Error_Input_proto_deserialization"), - 13: .same(proto: "Error_Unsupported_from_chain"), - 14: .same(proto: "Error_Unsupported_to_chain"), - 15: .same(proto: "Error_Invalid_from_address"), - 16: .same(proto: "Error_Invalid_to_address"), - 21: .same(proto: "Error_Invalid_vault_address"), - 22: .same(proto: "Error_Invalid_router_address"), - ] -} - -extension TW_THORChainSwap_Proto_Error: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Error" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "code"), - 2: .same(proto: "message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.code) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.message) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.code != .ok { - try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) - } - if !self.message.isEmpty { - try visitor.visitSingularStringField(value: self.message, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_THORChainSwap_Proto_Error, rhs: TW_THORChainSwap_Proto_Error) -> Bool { - if lhs.code != rhs.code {return false} - if lhs.message != rhs.message {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_THORChainSwap_Proto_Asset: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Asset" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "chain"), - 2: .same(proto: "symbol"), - 3: .standard(proto: "token_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.chain) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.symbol) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.tokenID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.chain != .thor { - try visitor.visitSingularEnumField(value: self.chain, fieldNumber: 1) - } - if !self.symbol.isEmpty { - try visitor.visitSingularStringField(value: self.symbol, fieldNumber: 2) - } - if !self.tokenID.isEmpty { - try visitor.visitSingularStringField(value: self.tokenID, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_THORChainSwap_Proto_Asset, rhs: TW_THORChainSwap_Proto_Asset) -> Bool { - if lhs.chain != rhs.chain {return false} - if lhs.symbol != rhs.symbol {return false} - if lhs.tokenID != rhs.tokenID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_THORChainSwap_Proto_StreamParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".StreamParams" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "interval"), - 2: .same(proto: "quantity"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.interval) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.quantity) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.interval.isEmpty { - try visitor.visitSingularStringField(value: self.interval, fieldNumber: 1) - } - if !self.quantity.isEmpty { - try visitor.visitSingularStringField(value: self.quantity, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_THORChainSwap_Proto_StreamParams, rhs: TW_THORChainSwap_Proto_StreamParams) -> Bool { - if lhs.interval != rhs.interval {return false} - if lhs.quantity != rhs.quantity {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_THORChainSwap_Proto_SwapInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SwapInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "from_asset"), - 2: .standard(proto: "from_address"), - 3: .standard(proto: "to_asset"), - 4: .standard(proto: "to_address"), - 5: .standard(proto: "vault_address"), - 6: .standard(proto: "router_address"), - 7: .standard(proto: "from_amount"), - 8: .standard(proto: "to_amount_limit"), - 9: .standard(proto: "affiliate_fee_address"), - 10: .standard(proto: "affiliate_fee_rate_bp"), - 11: .standard(proto: "extra_memo"), - 12: .standard(proto: "expiration_time"), - 13: .standard(proto: "stream_params"), - ] - - fileprivate class _StorageClass { - var _fromAsset: TW_THORChainSwap_Proto_Asset? = nil - var _fromAddress: String = String() - var _toAsset: TW_THORChainSwap_Proto_Asset? = nil - var _toAddress: String = String() - var _vaultAddress: String = String() - var _routerAddress: String = String() - var _fromAmount: String = String() - var _toAmountLimit: String = String() - var _affiliateFeeAddress: String = String() - var _affiliateFeeRateBp: String = String() - var _extraMemo: String = String() - var _expirationTime: UInt64 = 0 - var _streamParams: TW_THORChainSwap_Proto_StreamParams? = nil - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _fromAsset = source._fromAsset - _fromAddress = source._fromAddress - _toAsset = source._toAsset - _toAddress = source._toAddress - _vaultAddress = source._vaultAddress - _routerAddress = source._routerAddress - _fromAmount = source._fromAmount - _toAmountLimit = source._toAmountLimit - _affiliateFeeAddress = source._affiliateFeeAddress - _affiliateFeeRateBp = source._affiliateFeeRateBp - _extraMemo = source._extraMemo - _expirationTime = source._expirationTime - _streamParams = source._streamParams - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &_storage._fromAsset) }() - case 2: try { try decoder.decodeSingularStringField(value: &_storage._fromAddress) }() - case 3: try { try decoder.decodeSingularMessageField(value: &_storage._toAsset) }() - case 4: try { try decoder.decodeSingularStringField(value: &_storage._toAddress) }() - case 5: try { try decoder.decodeSingularStringField(value: &_storage._vaultAddress) }() - case 6: try { try decoder.decodeSingularStringField(value: &_storage._routerAddress) }() - case 7: try { try decoder.decodeSingularStringField(value: &_storage._fromAmount) }() - case 8: try { try decoder.decodeSingularStringField(value: &_storage._toAmountLimit) }() - case 9: try { try decoder.decodeSingularStringField(value: &_storage._affiliateFeeAddress) }() - case 10: try { try decoder.decodeSingularStringField(value: &_storage._affiliateFeeRateBp) }() - case 11: try { try decoder.decodeSingularStringField(value: &_storage._extraMemo) }() - case 12: try { try decoder.decodeSingularUInt64Field(value: &_storage._expirationTime) }() - case 13: try { try decoder.decodeSingularMessageField(value: &_storage._streamParams) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = _storage._fromAsset { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !_storage._fromAddress.isEmpty { - try visitor.visitSingularStringField(value: _storage._fromAddress, fieldNumber: 2) - } - try { if let v = _storage._toAsset { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if !_storage._toAddress.isEmpty { - try visitor.visitSingularStringField(value: _storage._toAddress, fieldNumber: 4) - } - if !_storage._vaultAddress.isEmpty { - try visitor.visitSingularStringField(value: _storage._vaultAddress, fieldNumber: 5) - } - if !_storage._routerAddress.isEmpty { - try visitor.visitSingularStringField(value: _storage._routerAddress, fieldNumber: 6) - } - if !_storage._fromAmount.isEmpty { - try visitor.visitSingularStringField(value: _storage._fromAmount, fieldNumber: 7) - } - if !_storage._toAmountLimit.isEmpty { - try visitor.visitSingularStringField(value: _storage._toAmountLimit, fieldNumber: 8) - } - if !_storage._affiliateFeeAddress.isEmpty { - try visitor.visitSingularStringField(value: _storage._affiliateFeeAddress, fieldNumber: 9) - } - if !_storage._affiliateFeeRateBp.isEmpty { - try visitor.visitSingularStringField(value: _storage._affiliateFeeRateBp, fieldNumber: 10) - } - if !_storage._extraMemo.isEmpty { - try visitor.visitSingularStringField(value: _storage._extraMemo, fieldNumber: 11) - } - if _storage._expirationTime != 0 { - try visitor.visitSingularUInt64Field(value: _storage._expirationTime, fieldNumber: 12) - } - try { if let v = _storage._streamParams { - try visitor.visitSingularMessageField(value: v, fieldNumber: 13) - } }() - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_THORChainSwap_Proto_SwapInput, rhs: TW_THORChainSwap_Proto_SwapInput) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._fromAsset != rhs_storage._fromAsset {return false} - if _storage._fromAddress != rhs_storage._fromAddress {return false} - if _storage._toAsset != rhs_storage._toAsset {return false} - if _storage._toAddress != rhs_storage._toAddress {return false} - if _storage._vaultAddress != rhs_storage._vaultAddress {return false} - if _storage._routerAddress != rhs_storage._routerAddress {return false} - if _storage._fromAmount != rhs_storage._fromAmount {return false} - if _storage._toAmountLimit != rhs_storage._toAmountLimit {return false} - if _storage._affiliateFeeAddress != rhs_storage._affiliateFeeAddress {return false} - if _storage._affiliateFeeRateBp != rhs_storage._affiliateFeeRateBp {return false} - if _storage._extraMemo != rhs_storage._extraMemo {return false} - if _storage._expirationTime != rhs_storage._expirationTime {return false} - if _storage._streamParams != rhs_storage._streamParams {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_THORChainSwap_Proto_SwapOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SwapOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "from_chain"), - 2: .standard(proto: "to_chain"), - 3: .same(proto: "error"), - 4: .same(proto: "bitcoin"), - 5: .same(proto: "ethereum"), - 6: .same(proto: "binance"), - 7: .same(proto: "cosmos"), - ] - - fileprivate class _StorageClass { - var _fromChain: TW_THORChainSwap_Proto_Chain = .thor - var _toChain: TW_THORChainSwap_Proto_Chain = .thor - var _error: TW_THORChainSwap_Proto_Error? = nil - var _signingInputOneof: TW_THORChainSwap_Proto_SwapOutput.OneOf_SigningInputOneof? - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _fromChain = source._fromChain - _toChain = source._toChain - _error = source._error - _signingInputOneof = source._signingInputOneof - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &_storage._fromChain) }() - case 2: try { try decoder.decodeSingularEnumField(value: &_storage._toChain) }() - case 3: try { try decoder.decodeSingularMessageField(value: &_storage._error) }() - case 4: try { - var v: TW_Bitcoin_Proto_SigningInput? - var hadOneofValue = false - if let current = _storage._signingInputOneof { - hadOneofValue = true - if case .bitcoin(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._signingInputOneof = .bitcoin(v) - } - }() - case 5: try { - var v: TW_Ethereum_Proto_SigningInput? - var hadOneofValue = false - if let current = _storage._signingInputOneof { - hadOneofValue = true - if case .ethereum(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._signingInputOneof = .ethereum(v) - } - }() - case 6: try { - var v: TW_Binance_Proto_SigningInput? - var hadOneofValue = false - if let current = _storage._signingInputOneof { - hadOneofValue = true - if case .binance(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._signingInputOneof = .binance(v) - } - }() - case 7: try { - var v: TW_Cosmos_Proto_SigningInput? - var hadOneofValue = false - if let current = _storage._signingInputOneof { - hadOneofValue = true - if case .cosmos(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - _storage._signingInputOneof = .cosmos(v) - } - }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if _storage._fromChain != .thor { - try visitor.visitSingularEnumField(value: _storage._fromChain, fieldNumber: 1) - } - if _storage._toChain != .thor { - try visitor.visitSingularEnumField(value: _storage._toChain, fieldNumber: 2) - } - try { if let v = _storage._error { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - switch _storage._signingInputOneof { - case .bitcoin?: try { - guard case .bitcoin(let v)? = _storage._signingInputOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case .ethereum?: try { - guard case .ethereum(let v)? = _storage._signingInputOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - }() - case .binance?: try { - guard case .binance(let v)? = _storage._signingInputOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - }() - case .cosmos?: try { - guard case .cosmos(let v)? = _storage._signingInputOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - }() - case nil: break - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_THORChainSwap_Proto_SwapOutput, rhs: TW_THORChainSwap_Proto_SwapOutput) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._fromChain != rhs_storage._fromChain {return false} - if _storage._toChain != rhs_storage._toChain {return false} - if _storage._error != rhs_storage._error {return false} - if _storage._signingInputOneof != rhs_storage._signingInputOneof {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Tezos+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Tezos+Proto.swift deleted file mode 100644 index dc17c120..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Tezos+Proto.swift +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias TezosSigningInput = TW_Tezos_Proto_SigningInput -public typealias TezosSigningOutput = TW_Tezos_Proto_SigningOutput -public typealias TezosOperationList = TW_Tezos_Proto_OperationList -public typealias TezosOperation = TW_Tezos_Proto_Operation -public typealias TezosFA12Parameters = TW_Tezos_Proto_FA12Parameters -public typealias TezosTxs = TW_Tezos_Proto_Txs -public typealias TezosTxObject = TW_Tezos_Proto_TxObject -public typealias TezosFA2Parameters = TW_Tezos_Proto_FA2Parameters -public typealias TezosOperationParameters = TW_Tezos_Proto_OperationParameters -public typealias TezosTransactionOperationData = TW_Tezos_Proto_TransactionOperationData -public typealias TezosRevealOperationData = TW_Tezos_Proto_RevealOperationData -public typealias TezosDelegationOperationData = TW_Tezos_Proto_DelegationOperationData diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Tezos.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Tezos.pb.swift deleted file mode 100644 index 7a6588e6..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Tezos.pb.swift +++ /dev/null @@ -1,1025 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Tezos.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Input data necessary to create a signed Tezos transaction. -/// Next field: 3 -public struct TW_Tezos_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// One or more operations - public var operationList: TW_Tezos_Proto_OperationList { - get {return _operationList ?? TW_Tezos_Proto_OperationList()} - set {_operationList = newValue} - } - /// Returns true if `operationList` has been explicitly set. - public var hasOperationList: Bool {return self._operationList != nil} - /// Clears the value of `operationList`. Subsequent reads from it will return its default value. - public mutating func clearOperationList() {self._operationList = nil} - - /// Encoded operation bytes obtained with $RPC_URL/chains/main/blocks/head/helpers/forge/operations, operation_list will be ignored. - public var encodedOperations: Data = Data() - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _operationList: TW_Tezos_Proto_OperationList? = nil -} - -/// Result containing the signed and encoded transaction. -/// Next field: 2 -public struct TW_Tezos_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The encoded transaction - public var encoded: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// A list of operations and a branch. -/// Next field: 3 -public struct TW_Tezos_Proto_OperationList { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// branch - public var branch: String = String() - - /// list of operations - public var operations: [TW_Tezos_Proto_Operation] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// An operation that can be applied to the Tezos blockchain. -/// Next field: 12 -public struct TW_Tezos_Proto_Operation { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// counter - public var counter: Int64 = 0 - - /// source account - public var source: String = String() - - /// fee - public var fee: Int64 = 0 - - /// gas limit - public var gasLimit: Int64 = 0 - - /// storage limit - public var storageLimit: Int64 = 0 - - /// Operation type - public var kind: TW_Tezos_Proto_Operation.OperationKind = .endorsement - - /// Operation specific data depending on the type of the operation. - public var operationData: TW_Tezos_Proto_Operation.OneOf_OperationData? = nil - - public var revealOperationData: TW_Tezos_Proto_RevealOperationData { - get { - if case .revealOperationData(let v)? = operationData {return v} - return TW_Tezos_Proto_RevealOperationData() - } - set {operationData = .revealOperationData(newValue)} - } - - public var transactionOperationData: TW_Tezos_Proto_TransactionOperationData { - get { - if case .transactionOperationData(let v)? = operationData {return v} - return TW_Tezos_Proto_TransactionOperationData() - } - set {operationData = .transactionOperationData(newValue)} - } - - public var delegationOperationData: TW_Tezos_Proto_DelegationOperationData { - get { - if case .delegationOperationData(let v)? = operationData {return v} - return TW_Tezos_Proto_DelegationOperationData() - } - set {operationData = .delegationOperationData(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Operation specific data depending on the type of the operation. - public enum OneOf_OperationData: Equatable { - case revealOperationData(TW_Tezos_Proto_RevealOperationData) - case transactionOperationData(TW_Tezos_Proto_TransactionOperationData) - case delegationOperationData(TW_Tezos_Proto_DelegationOperationData) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Tezos_Proto_Operation.OneOf_OperationData, rhs: TW_Tezos_Proto_Operation.OneOf_OperationData) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.revealOperationData, .revealOperationData): return { - guard case .revealOperationData(let l) = lhs, case .revealOperationData(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.transactionOperationData, .transactionOperationData): return { - guard case .transactionOperationData(let l) = lhs, case .transactionOperationData(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.delegationOperationData, .delegationOperationData): return { - guard case .delegationOperationData(let l) = lhs, case .delegationOperationData(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - /// Operation types - public enum OperationKind: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Note: Proto3 semantics require a zero value. - case endorsement // = 0 - case reveal // = 107 - case transaction // = 108 - case delegation // = 110 - case UNRECOGNIZED(Int) - - public init() { - self = .endorsement - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .endorsement - case 107: self = .reveal - case 108: self = .transaction - case 110: self = .delegation - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .endorsement: return 0 - case .reveal: return 107 - case .transaction: return 108 - case .delegation: return 110 - case .UNRECOGNIZED(let i): return i - } - } - - } - - public init() {} -} - -#if swift(>=4.2) - -extension TW_Tezos_Proto_Operation.OperationKind: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Tezos_Proto_Operation.OperationKind] = [ - .endorsement, - .reveal, - .transaction, - .delegation, - ] -} - -#endif // swift(>=4.2) - -public struct TW_Tezos_Proto_FA12Parameters { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var entrypoint: String = String() - - public var from: String = String() - - public var to: String = String() - - public var value: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Tezos_Proto_Txs { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var to: String = String() - - public var tokenID: String = String() - - public var amount: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Tezos_Proto_TxObject { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var from: String = String() - - public var txs: [TW_Tezos_Proto_Txs] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Tezos_Proto_FA2Parameters { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var entrypoint: String = String() - - public var txsObject: [TW_Tezos_Proto_TxObject] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Generic operation parameters -public struct TW_Tezos_Proto_OperationParameters { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var parameters: TW_Tezos_Proto_OperationParameters.OneOf_Parameters? = nil - - public var fa12Parameters: TW_Tezos_Proto_FA12Parameters { - get { - if case .fa12Parameters(let v)? = parameters {return v} - return TW_Tezos_Proto_FA12Parameters() - } - set {parameters = .fa12Parameters(newValue)} - } - - public var fa2Parameters: TW_Tezos_Proto_FA2Parameters { - get { - if case .fa2Parameters(let v)? = parameters {return v} - return TW_Tezos_Proto_FA2Parameters() - } - set {parameters = .fa2Parameters(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_Parameters: Equatable { - case fa12Parameters(TW_Tezos_Proto_FA12Parameters) - case fa2Parameters(TW_Tezos_Proto_FA2Parameters) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Tezos_Proto_OperationParameters.OneOf_Parameters, rhs: TW_Tezos_Proto_OperationParameters.OneOf_Parameters) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.fa12Parameters, .fa12Parameters): return { - guard case .fa12Parameters(let l) = lhs, case .fa12Parameters(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.fa2Parameters, .fa2Parameters): return { - guard case .fa2Parameters(let l) = lhs, case .fa2Parameters(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Transaction operation specific data. -/// Next field: 3 -public struct TW_Tezos_Proto_TransactionOperationData { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var destination: String = String() - - public var amount: Int64 = 0 - - public var encodedParameter: Data = Data() - - public var parameters: TW_Tezos_Proto_OperationParameters { - get {return _parameters ?? TW_Tezos_Proto_OperationParameters()} - set {_parameters = newValue} - } - /// Returns true if `parameters` has been explicitly set. - public var hasParameters: Bool {return self._parameters != nil} - /// Clears the value of `parameters`. Subsequent reads from it will return its default value. - public mutating func clearParameters() {self._parameters = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _parameters: TW_Tezos_Proto_OperationParameters? = nil -} - -/// Reveal operation specific data. -/// Next field: 2 -public struct TW_Tezos_Proto_RevealOperationData { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var publicKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Delegation operation specific data. -/// Next field: 2 -public struct TW_Tezos_Proto_DelegationOperationData { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var delegate: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Tezos.Proto" - -extension TW_Tezos_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "operation_list"), - 2: .standard(proto: "encoded_operations"), - 3: .standard(proto: "private_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._operationList) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.encodedOperations) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._operationList { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !self.encodedOperations.isEmpty { - try visitor.visitSingularBytesField(value: self.encodedOperations, fieldNumber: 2) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tezos_Proto_SigningInput, rhs: TW_Tezos_Proto_SigningInput) -> Bool { - if lhs._operationList != rhs._operationList {return false} - if lhs.encodedOperations != rhs.encodedOperations {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tezos_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tezos_Proto_SigningOutput, rhs: TW_Tezos_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tezos_Proto_OperationList: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OperationList" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "branch"), - 2: .same(proto: "operations"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.branch) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.operations) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.branch.isEmpty { - try visitor.visitSingularStringField(value: self.branch, fieldNumber: 1) - } - if !self.operations.isEmpty { - try visitor.visitRepeatedMessageField(value: self.operations, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tezos_Proto_OperationList, rhs: TW_Tezos_Proto_OperationList) -> Bool { - if lhs.branch != rhs.branch {return false} - if lhs.operations != rhs.operations {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tezos_Proto_Operation: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Operation" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "counter"), - 2: .same(proto: "source"), - 3: .same(proto: "fee"), - 4: .standard(proto: "gas_limit"), - 5: .standard(proto: "storage_limit"), - 7: .same(proto: "kind"), - 8: .standard(proto: "reveal_operation_data"), - 9: .standard(proto: "transaction_operation_data"), - 11: .standard(proto: "delegation_operation_data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.counter) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.source) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.fee) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.gasLimit) }() - case 5: try { try decoder.decodeSingularInt64Field(value: &self.storageLimit) }() - case 7: try { try decoder.decodeSingularEnumField(value: &self.kind) }() - case 8: try { - var v: TW_Tezos_Proto_RevealOperationData? - var hadOneofValue = false - if let current = self.operationData { - hadOneofValue = true - if case .revealOperationData(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationData = .revealOperationData(v) - } - }() - case 9: try { - var v: TW_Tezos_Proto_TransactionOperationData? - var hadOneofValue = false - if let current = self.operationData { - hadOneofValue = true - if case .transactionOperationData(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationData = .transactionOperationData(v) - } - }() - case 11: try { - var v: TW_Tezos_Proto_DelegationOperationData? - var hadOneofValue = false - if let current = self.operationData { - hadOneofValue = true - if case .delegationOperationData(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.operationData = .delegationOperationData(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.counter != 0 { - try visitor.visitSingularInt64Field(value: self.counter, fieldNumber: 1) - } - if !self.source.isEmpty { - try visitor.visitSingularStringField(value: self.source, fieldNumber: 2) - } - if self.fee != 0 { - try visitor.visitSingularInt64Field(value: self.fee, fieldNumber: 3) - } - if self.gasLimit != 0 { - try visitor.visitSingularInt64Field(value: self.gasLimit, fieldNumber: 4) - } - if self.storageLimit != 0 { - try visitor.visitSingularInt64Field(value: self.storageLimit, fieldNumber: 5) - } - if self.kind != .endorsement { - try visitor.visitSingularEnumField(value: self.kind, fieldNumber: 7) - } - switch self.operationData { - case .revealOperationData?: try { - guard case .revealOperationData(let v)? = self.operationData else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - }() - case .transactionOperationData?: try { - guard case .transactionOperationData(let v)? = self.operationData else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - }() - case .delegationOperationData?: try { - guard case .delegationOperationData(let v)? = self.operationData else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tezos_Proto_Operation, rhs: TW_Tezos_Proto_Operation) -> Bool { - if lhs.counter != rhs.counter {return false} - if lhs.source != rhs.source {return false} - if lhs.fee != rhs.fee {return false} - if lhs.gasLimit != rhs.gasLimit {return false} - if lhs.storageLimit != rhs.storageLimit {return false} - if lhs.kind != rhs.kind {return false} - if lhs.operationData != rhs.operationData {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tezos_Proto_Operation.OperationKind: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "ENDORSEMENT"), - 107: .same(proto: "REVEAL"), - 108: .same(proto: "TRANSACTION"), - 110: .same(proto: "DELEGATION"), - ] -} - -extension TW_Tezos_Proto_FA12Parameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FA12Parameters" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "entrypoint"), - 2: .same(proto: "from"), - 3: .same(proto: "to"), - 4: .same(proto: "value"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.entrypoint) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.from) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.value) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.entrypoint.isEmpty { - try visitor.visitSingularStringField(value: self.entrypoint, fieldNumber: 1) - } - if !self.from.isEmpty { - try visitor.visitSingularStringField(value: self.from, fieldNumber: 2) - } - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 3) - } - if !self.value.isEmpty { - try visitor.visitSingularStringField(value: self.value, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tezos_Proto_FA12Parameters, rhs: TW_Tezos_Proto_FA12Parameters) -> Bool { - if lhs.entrypoint != rhs.entrypoint {return false} - if lhs.from != rhs.from {return false} - if lhs.to != rhs.to {return false} - if lhs.value != rhs.value {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tezos_Proto_Txs: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Txs" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "to"), - 2: .standard(proto: "token_id"), - 3: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.tokenID) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 1) - } - if !self.tokenID.isEmpty { - try visitor.visitSingularStringField(value: self.tokenID, fieldNumber: 2) - } - if !self.amount.isEmpty { - try visitor.visitSingularStringField(value: self.amount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tezos_Proto_Txs, rhs: TW_Tezos_Proto_Txs) -> Bool { - if lhs.to != rhs.to {return false} - if lhs.tokenID != rhs.tokenID {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tezos_Proto_TxObject: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TxObject" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "from"), - 2: .same(proto: "txs"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.from) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.txs) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.from.isEmpty { - try visitor.visitSingularStringField(value: self.from, fieldNumber: 1) - } - if !self.txs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.txs, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tezos_Proto_TxObject, rhs: TW_Tezos_Proto_TxObject) -> Bool { - if lhs.from != rhs.from {return false} - if lhs.txs != rhs.txs {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tezos_Proto_FA2Parameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FA2Parameters" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "entrypoint"), - 2: .standard(proto: "txs_object"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.entrypoint) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.txsObject) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.entrypoint.isEmpty { - try visitor.visitSingularStringField(value: self.entrypoint, fieldNumber: 1) - } - if !self.txsObject.isEmpty { - try visitor.visitRepeatedMessageField(value: self.txsObject, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tezos_Proto_FA2Parameters, rhs: TW_Tezos_Proto_FA2Parameters) -> Bool { - if lhs.entrypoint != rhs.entrypoint {return false} - if lhs.txsObject != rhs.txsObject {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tezos_Proto_OperationParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".OperationParameters" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "fa12_parameters"), - 2: .standard(proto: "fa2_parameters"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_Tezos_Proto_FA12Parameters? - var hadOneofValue = false - if let current = self.parameters { - hadOneofValue = true - if case .fa12Parameters(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.parameters = .fa12Parameters(v) - } - }() - case 2: try { - var v: TW_Tezos_Proto_FA2Parameters? - var hadOneofValue = false - if let current = self.parameters { - hadOneofValue = true - if case .fa2Parameters(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.parameters = .fa2Parameters(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.parameters { - case .fa12Parameters?: try { - guard case .fa12Parameters(let v)? = self.parameters else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .fa2Parameters?: try { - guard case .fa2Parameters(let v)? = self.parameters else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tezos_Proto_OperationParameters, rhs: TW_Tezos_Proto_OperationParameters) -> Bool { - if lhs.parameters != rhs.parameters {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tezos_Proto_TransactionOperationData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransactionOperationData" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "destination"), - 2: .same(proto: "amount"), - 3: .standard(proto: "encoded_parameter"), - 4: .same(proto: "parameters"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.destination) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.encodedParameter) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._parameters) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.destination.isEmpty { - try visitor.visitSingularStringField(value: self.destination, fieldNumber: 1) - } - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 2) - } - if !self.encodedParameter.isEmpty { - try visitor.visitSingularBytesField(value: self.encodedParameter, fieldNumber: 3) - } - try { if let v = self._parameters { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tezos_Proto_TransactionOperationData, rhs: TW_Tezos_Proto_TransactionOperationData) -> Bool { - if lhs.destination != rhs.destination {return false} - if lhs.amount != rhs.amount {return false} - if lhs.encodedParameter != rhs.encodedParameter {return false} - if lhs._parameters != rhs._parameters {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tezos_Proto_RevealOperationData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".RevealOperationData" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "public_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tezos_Proto_RevealOperationData, rhs: TW_Tezos_Proto_RevealOperationData) -> Bool { - if lhs.publicKey != rhs.publicKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tezos_Proto_DelegationOperationData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DelegationOperationData" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "delegate"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.delegate) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.delegate.isEmpty { - try visitor.visitSingularStringField(value: self.delegate, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tezos_Proto_DelegationOperationData, rhs: TW_Tezos_Proto_DelegationOperationData) -> Bool { - if lhs.delegate != rhs.delegate {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/TheOpenNetwork+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/TheOpenNetwork+Proto.swift deleted file mode 100644 index 3eca06b4..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/TheOpenNetwork+Proto.swift +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias TheOpenNetworkTransfer = TW_TheOpenNetwork_Proto_Transfer -public typealias TheOpenNetworkJettonTransfer = TW_TheOpenNetwork_Proto_JettonTransfer -public typealias TheOpenNetworkSigningInput = TW_TheOpenNetwork_Proto_SigningInput -public typealias TheOpenNetworkSigningOutput = TW_TheOpenNetwork_Proto_SigningOutput -public typealias TheOpenNetworkWalletVersion = TW_TheOpenNetwork_Proto_WalletVersion -public typealias TheOpenNetworkSendMode = TW_TheOpenNetwork_Proto_SendMode diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/TheOpenNetwork.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/TheOpenNetwork.pb.swift deleted file mode 100644 index 3b9c8e18..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/TheOpenNetwork.pb.swift +++ /dev/null @@ -1,561 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: TheOpenNetwork.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -public enum TW_TheOpenNetwork_Proto_WalletVersion: SwiftProtobuf.Enum { - public typealias RawValue = Int - case walletV3R1 // = 0 - case walletV3R2 // = 1 - case walletV4R2 // = 2 - case UNRECOGNIZED(Int) - - public init() { - self = .walletV3R1 - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .walletV3R1 - case 1: self = .walletV3R2 - case 2: self = .walletV4R2 - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .walletV3R1: return 0 - case .walletV3R2: return 1 - case .walletV4R2: return 2 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_TheOpenNetwork_Proto_WalletVersion: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_TheOpenNetwork_Proto_WalletVersion] = [ - .walletV3R1, - .walletV3R2, - .walletV4R2, - ] -} - -#endif // swift(>=4.2) - -public enum TW_TheOpenNetwork_Proto_SendMode: SwiftProtobuf.Enum { - public typealias RawValue = Int - case `default` // = 0 - case payFeesSeparately // = 1 - case ignoreActionPhaseErrors // = 2 - case destroyOnZeroBalance // = 32 - case attachAllInboundMessageValue // = 64 - case attachAllContractBalance // = 128 - case UNRECOGNIZED(Int) - - public init() { - self = .default - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .default - case 1: self = .payFeesSeparately - case 2: self = .ignoreActionPhaseErrors - case 32: self = .destroyOnZeroBalance - case 64: self = .attachAllInboundMessageValue - case 128: self = .attachAllContractBalance - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .default: return 0 - case .payFeesSeparately: return 1 - case .ignoreActionPhaseErrors: return 2 - case .destroyOnZeroBalance: return 32 - case .attachAllInboundMessageValue: return 64 - case .attachAllContractBalance: return 128 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_TheOpenNetwork_Proto_SendMode: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_TheOpenNetwork_Proto_SendMode] = [ - .default, - .payFeesSeparately, - .ignoreActionPhaseErrors, - .destroyOnZeroBalance, - .attachAllInboundMessageValue, - .attachAllContractBalance, - ] -} - -#endif // swift(>=4.2) - -public struct TW_TheOpenNetwork_Proto_Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Wallet version - public var walletVersion: TW_TheOpenNetwork_Proto_WalletVersion = .walletV3R1 - - /// Recipient address - public var dest: String = String() - - /// Amount to send in nanotons - public var amount: UInt64 = 0 - - /// Message counter (optional, 0 by default used for the first deploy) - /// This field is required, because we need to protect the smart contract against "replay attacks" - /// Learn more: https://ton.org/docs/develop/smart-contracts/guidelines/external-messages - public var sequenceNumber: UInt32 = 0 - - /// Send mode (optional, 0 by default) - /// Learn more: https://ton.org/docs/develop/func/stdlib#send_raw_message - public var mode: UInt32 = 0 - - /// Expiration UNIX timestamp (optional, now() + 60 by default) - public var expireAt: UInt32 = 0 - - /// Transfer comment message (optional, empty by default) - public var comment: String = String() - - /// If the address is bounceable - public var bounceable: Bool = false - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_TheOpenNetwork_Proto_JettonTransfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Dest in Transfer means contract address of sender's jetton wallet. - public var transfer: TW_TheOpenNetwork_Proto_Transfer { - get {return _transfer ?? TW_TheOpenNetwork_Proto_Transfer()} - set {_transfer = newValue} - } - /// Returns true if `transfer` has been explicitly set. - public var hasTransfer: Bool {return self._transfer != nil} - /// Clears the value of `transfer`. Subsequent reads from it will return its default value. - public mutating func clearTransfer() {self._transfer = nil} - - /// Arbitrary request number. Deafult is 0. Optional field. - public var queryID: UInt64 = 0 - - /// Amount of transferred jettons in elementary integer units. The real value transferred is jetton_amount multiplied by ten to the power of token decimal precision - public var jettonAmount: UInt64 = 0 - - /// Address of the new owner of the jettons. - public var toOwner: String = String() - - /// Address where to send a response with confirmation of a successful transfer and the rest of the incoming message Toncoins. Usually the sender should get back their toncoins. - public var responseAddress: String = String() - - /// Amount in nanotons to forward to recipient. Basically minimum amount - 1 nanoton should be used - public var forwardAmount: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _transfer: TW_TheOpenNetwork_Proto_Transfer? = nil -} - -public struct TW_TheOpenNetwork_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// The payload transfer - public var actionOneof: TW_TheOpenNetwork_Proto_SigningInput.OneOf_ActionOneof? = nil - - public var transfer: TW_TheOpenNetwork_Proto_Transfer { - get { - if case .transfer(let v)? = actionOneof {return v} - return TW_TheOpenNetwork_Proto_Transfer() - } - set {actionOneof = .transfer(newValue)} - } - - public var jettonTransfer: TW_TheOpenNetwork_Proto_JettonTransfer { - get { - if case .jettonTransfer(let v)? = actionOneof {return v} - return TW_TheOpenNetwork_Proto_JettonTransfer() - } - set {actionOneof = .jettonTransfer(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// The payload transfer - public enum OneOf_ActionOneof: Equatable { - case transfer(TW_TheOpenNetwork_Proto_Transfer) - case jettonTransfer(TW_TheOpenNetwork_Proto_JettonTransfer) - - #if !swift(>=4.1) - public static func ==(lhs: TW_TheOpenNetwork_Proto_SigningInput.OneOf_ActionOneof, rhs: TW_TheOpenNetwork_Proto_SigningInput.OneOf_ActionOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transfer, .transfer): return { - guard case .transfer(let l) = lhs, case .transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.jettonTransfer, .jettonTransfer): return { - guard case .jettonTransfer(let l) = lhs, case .jettonTransfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Transaction signing output. -public struct TW_TheOpenNetwork_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and base64 encoded BOC message - public var encoded: String = String() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.TheOpenNetwork.Proto" - -extension TW_TheOpenNetwork_Proto_WalletVersion: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "WALLET_V3_R1"), - 1: .same(proto: "WALLET_V3_R2"), - 2: .same(proto: "WALLET_V4_R2"), - ] -} - -extension TW_TheOpenNetwork_Proto_SendMode: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "DEFAULT"), - 1: .same(proto: "PAY_FEES_SEPARATELY"), - 2: .same(proto: "IGNORE_ACTION_PHASE_ERRORS"), - 32: .same(proto: "DESTROY_ON_ZERO_BALANCE"), - 64: .same(proto: "ATTACH_ALL_INBOUND_MESSAGE_VALUE"), - 128: .same(proto: "ATTACH_ALL_CONTRACT_BALANCE"), - ] -} - -extension TW_TheOpenNetwork_Proto_Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "wallet_version"), - 2: .same(proto: "dest"), - 3: .same(proto: "amount"), - 4: .standard(proto: "sequence_number"), - 5: .same(proto: "mode"), - 6: .standard(proto: "expire_at"), - 7: .same(proto: "comment"), - 8: .same(proto: "bounceable"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.walletVersion) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.dest) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.amount) }() - case 4: try { try decoder.decodeSingularUInt32Field(value: &self.sequenceNumber) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &self.mode) }() - case 6: try { try decoder.decodeSingularUInt32Field(value: &self.expireAt) }() - case 7: try { try decoder.decodeSingularStringField(value: &self.comment) }() - case 8: try { try decoder.decodeSingularBoolField(value: &self.bounceable) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.walletVersion != .walletV3R1 { - try visitor.visitSingularEnumField(value: self.walletVersion, fieldNumber: 1) - } - if !self.dest.isEmpty { - try visitor.visitSingularStringField(value: self.dest, fieldNumber: 2) - } - if self.amount != 0 { - try visitor.visitSingularUInt64Field(value: self.amount, fieldNumber: 3) - } - if self.sequenceNumber != 0 { - try visitor.visitSingularUInt32Field(value: self.sequenceNumber, fieldNumber: 4) - } - if self.mode != 0 { - try visitor.visitSingularUInt32Field(value: self.mode, fieldNumber: 5) - } - if self.expireAt != 0 { - try visitor.visitSingularUInt32Field(value: self.expireAt, fieldNumber: 6) - } - if !self.comment.isEmpty { - try visitor.visitSingularStringField(value: self.comment, fieldNumber: 7) - } - if self.bounceable != false { - try visitor.visitSingularBoolField(value: self.bounceable, fieldNumber: 8) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_TheOpenNetwork_Proto_Transfer, rhs: TW_TheOpenNetwork_Proto_Transfer) -> Bool { - if lhs.walletVersion != rhs.walletVersion {return false} - if lhs.dest != rhs.dest {return false} - if lhs.amount != rhs.amount {return false} - if lhs.sequenceNumber != rhs.sequenceNumber {return false} - if lhs.mode != rhs.mode {return false} - if lhs.expireAt != rhs.expireAt {return false} - if lhs.comment != rhs.comment {return false} - if lhs.bounceable != rhs.bounceable {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_TheOpenNetwork_Proto_JettonTransfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".JettonTransfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "transfer"), - 2: .standard(proto: "query_id"), - 3: .standard(proto: "jetton_amount"), - 4: .standard(proto: "to_owner"), - 5: .standard(proto: "response_address"), - 6: .standard(proto: "forward_amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &self._transfer) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.queryID) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.jettonAmount) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.toOwner) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.responseAddress) }() - case 6: try { try decoder.decodeSingularUInt64Field(value: &self.forwardAmount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._transfer { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if self.queryID != 0 { - try visitor.visitSingularUInt64Field(value: self.queryID, fieldNumber: 2) - } - if self.jettonAmount != 0 { - try visitor.visitSingularUInt64Field(value: self.jettonAmount, fieldNumber: 3) - } - if !self.toOwner.isEmpty { - try visitor.visitSingularStringField(value: self.toOwner, fieldNumber: 4) - } - if !self.responseAddress.isEmpty { - try visitor.visitSingularStringField(value: self.responseAddress, fieldNumber: 5) - } - if self.forwardAmount != 0 { - try visitor.visitSingularUInt64Field(value: self.forwardAmount, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_TheOpenNetwork_Proto_JettonTransfer, rhs: TW_TheOpenNetwork_Proto_JettonTransfer) -> Bool { - if lhs._transfer != rhs._transfer {return false} - if lhs.queryID != rhs.queryID {return false} - if lhs.jettonAmount != rhs.jettonAmount {return false} - if lhs.toOwner != rhs.toOwner {return false} - if lhs.responseAddress != rhs.responseAddress {return false} - if lhs.forwardAmount != rhs.forwardAmount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_TheOpenNetwork_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "private_key"), - 2: .same(proto: "transfer"), - 3: .standard(proto: "jetton_transfer"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 2: try { - var v: TW_TheOpenNetwork_Proto_Transfer? - var hadOneofValue = false - if let current = self.actionOneof { - hadOneofValue = true - if case .transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.actionOneof = .transfer(v) - } - }() - case 3: try { - var v: TW_TheOpenNetwork_Proto_JettonTransfer? - var hadOneofValue = false - if let current = self.actionOneof { - hadOneofValue = true - if case .jettonTransfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.actionOneof = .jettonTransfer(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 1) - } - switch self.actionOneof { - case .transfer?: try { - guard case .transfer(let v)? = self.actionOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case .jettonTransfer?: try { - guard case .jettonTransfer(let v)? = self.actionOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_TheOpenNetwork_Proto_SigningInput, rhs: TW_TheOpenNetwork_Proto_SigningInput) -> Bool { - if lhs.privateKey != rhs.privateKey {return false} - if lhs.actionOneof != rhs.actionOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_TheOpenNetwork_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "error"), - 3: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularStringField(value: self.encoded, fieldNumber: 1) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 2) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_TheOpenNetwork_Proto_SigningOutput, rhs: TW_TheOpenNetwork_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Theta+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Theta+Proto.swift deleted file mode 100644 index 9aef389e..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Theta+Proto.swift +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias ThetaSigningInput = TW_Theta_Proto_SigningInput -public typealias ThetaSigningOutput = TW_Theta_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Theta.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Theta.pb.swift deleted file mode 100644 index 943567a3..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Theta.pb.swift +++ /dev/null @@ -1,207 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Theta.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -//// Input data necessary to create a signed transaction -public struct TW_Theta_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - //// Chain ID string, mainnet, testnet and privatenet - public var chainID: String = String() - - //// Recipient address - public var toAddress: String = String() - - //// Theta token amount to send in wei (uint256, serialized little endian) - public var thetaAmount: Data = Data() - - //// TFuel token amount to send in wei (uint256, serialized little endian) - public var tfuelAmount: Data = Data() - - //// Sequence number of the transaction for the sender address - public var sequence: UInt64 = 0 - - //// Fee amount in TFuel wei for the transaction (uint256, serialized little endian) - public var fee: Data = Data() - - //// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - //// Public key - public var publicKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Theta_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - //// Signed and encoded transaction bytes - public var encoded: Data = Data() - - //// Signature - public var signature: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Theta.Proto" - -extension TW_Theta_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "chain_id"), - 2: .standard(proto: "to_address"), - 3: .standard(proto: "theta_amount"), - 4: .standard(proto: "tfuel_amount"), - 5: .same(proto: "sequence"), - 6: .same(proto: "fee"), - 7: .standard(proto: "private_key"), - 8: .standard(proto: "public_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.chainID) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.thetaAmount) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.tfuelAmount) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.sequence) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.fee) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 8: try { try decoder.decodeSingularBytesField(value: &self.publicKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.chainID.isEmpty { - try visitor.visitSingularStringField(value: self.chainID, fieldNumber: 1) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 2) - } - if !self.thetaAmount.isEmpty { - try visitor.visitSingularBytesField(value: self.thetaAmount, fieldNumber: 3) - } - if !self.tfuelAmount.isEmpty { - try visitor.visitSingularBytesField(value: self.tfuelAmount, fieldNumber: 4) - } - if self.sequence != 0 { - try visitor.visitSingularUInt64Field(value: self.sequence, fieldNumber: 5) - } - if !self.fee.isEmpty { - try visitor.visitSingularBytesField(value: self.fee, fieldNumber: 6) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 7) - } - if !self.publicKey.isEmpty { - try visitor.visitSingularBytesField(value: self.publicKey, fieldNumber: 8) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Theta_Proto_SigningInput, rhs: TW_Theta_Proto_SigningInput) -> Bool { - if lhs.chainID != rhs.chainID {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.thetaAmount != rhs.thetaAmount {return false} - if lhs.tfuelAmount != rhs.tfuelAmount {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.fee != rhs.fee {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.publicKey != rhs.publicKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Theta_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "signature"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Theta_Proto_SigningOutput, rhs: TW_Theta_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.signature != rhs.signature {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/TransactionCompiler+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/TransactionCompiler+Proto.swift deleted file mode 100644 index 328bec4b..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/TransactionCompiler+Proto.swift +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias TxCompilerPreSigningOutput = TW_TxCompiler_Proto_PreSigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/TransactionCompiler.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/TransactionCompiler.pb.swift deleted file mode 100644 index 1d90f7f2..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/TransactionCompiler.pb.swift +++ /dev/null @@ -1,98 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: TransactionCompiler.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -//// Transaction pre-signing output -public struct TW_TxCompiler_Proto_PreSigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - //// Pre-image data hash that will be used for signing - public var dataHash: Data = Data() - - //// Pre-image data - public var data: Data = Data() - - //// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - //// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.TxCompiler.Proto" - -extension TW_TxCompiler_Proto_PreSigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".PreSigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "data_hash"), - 2: .same(proto: "data"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.dataHash) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.data) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.dataHash.isEmpty { - try visitor.visitSingularBytesField(value: self.dataHash, fieldNumber: 1) - } - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_TxCompiler_Proto_PreSigningOutput, rhs: TW_TxCompiler_Proto_PreSigningOutput) -> Bool { - if lhs.dataHash != rhs.dataHash {return false} - if lhs.data != rhs.data {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Tron+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Tron+Proto.swift deleted file mode 100644 index 948ae8bf..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Tron+Proto.swift +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias TronTransferContract = TW_Tron_Proto_TransferContract -public typealias TronTransferAssetContract = TW_Tron_Proto_TransferAssetContract -public typealias TronTransferTRC20Contract = TW_Tron_Proto_TransferTRC20Contract -public typealias TronFreezeBalanceContract = TW_Tron_Proto_FreezeBalanceContract -public typealias TronFreezeBalanceV2Contract = TW_Tron_Proto_FreezeBalanceV2Contract -public typealias TronUnfreezeBalanceV2Contract = TW_Tron_Proto_UnfreezeBalanceV2Contract -public typealias TronWithdrawExpireUnfreezeContract = TW_Tron_Proto_WithdrawExpireUnfreezeContract -public typealias TronDelegateResourceContract = TW_Tron_Proto_DelegateResourceContract -public typealias TronUnDelegateResourceContract = TW_Tron_Proto_UnDelegateResourceContract -public typealias TronUnfreezeBalanceContract = TW_Tron_Proto_UnfreezeBalanceContract -public typealias TronUnfreezeAssetContract = TW_Tron_Proto_UnfreezeAssetContract -public typealias TronVoteAssetContract = TW_Tron_Proto_VoteAssetContract -public typealias TronVoteWitnessContract = TW_Tron_Proto_VoteWitnessContract -public typealias TronWithdrawBalanceContract = TW_Tron_Proto_WithdrawBalanceContract -public typealias TronTriggerSmartContract = TW_Tron_Proto_TriggerSmartContract -public typealias TronBlockHeader = TW_Tron_Proto_BlockHeader -public typealias TronTransaction = TW_Tron_Proto_Transaction -public typealias TronSigningInput = TW_Tron_Proto_SigningInput -public typealias TronSigningOutput = TW_Tron_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Tron.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Tron.pb.swift deleted file mode 100644 index ea5ef8d7..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Tron.pb.swift +++ /dev/null @@ -1,1962 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Tron.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// A transfer transaction -public struct TW_Tron_Proto_TransferContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Sender address. - public var ownerAddress: String = String() - - /// Recipient address. - public var toAddress: String = String() - - /// Amount to send. - public var amount: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Asset transfer -public struct TW_Tron_Proto_TransferAssetContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Asset name. - public var assetName: String = String() - - /// Sender address. - public var ownerAddress: String = String() - - /// Recipient address. - public var toAddress: String = String() - - /// Amount to send. - public var amount: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// TRC20 token transfer -public struct TW_Tron_Proto_TransferTRC20Contract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Contract name. - public var contractAddress: String = String() - - /// Sender address. - public var ownerAddress: String = String() - - /// Recipient address. - public var toAddress: String = String() - - /// Amount to send, (uint256, serialized big endian) - public var amount: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Freeze balance -public struct TW_Tron_Proto_FreezeBalanceContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Sender address. - public var ownerAddress: String = String() - - /// Frozen balance. Minimum 1 - public var frozenBalance: Int64 = 0 - - /// Frozen duration - public var frozenDuration: Int64 = 0 - - /// Resource type: BANDWIDTH | ENERGY - public var resource: String = String() - - /// Receiver address - public var receiverAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// stake TRX to obtain TRON Power (voting rights) and bandwidth or energy. -public struct TW_Tron_Proto_FreezeBalanceV2Contract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Address of transaction initiator, data type is string - public var ownerAddress: String = String() - - /// Amount of TRX to be staked, unit is sun, data type is uint256 - public var frozenBalance: Int64 = 0 - - /// Resource type, "BANDWIDTH" or "ENERGY", data type is string - public var resource: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Unstake TRX to release bandwidth and energy and at the same time TRON Power will be reduced and all corresponding votes will be canceled. -public struct TW_Tron_Proto_UnfreezeBalanceV2Contract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Address of transaction initiator, data type is string - public var ownerAddress: String = String() - - /// Amount of TRX to be unstaked, unit is sun, data type is uint256 - public var unfreezeBalance: Int64 = 0 - - /// Resource type, "BANDWIDTH" or "ENERGY", data type is string - public var resource: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// withdraw unfrozen balance -public struct TW_Tron_Proto_WithdrawExpireUnfreezeContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Address of transaction initiator, data type is string - public var ownerAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// delegate resource -public struct TW_Tron_Proto_DelegateResourceContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Address of transaction initiator, data type is string - public var ownerAddress: String = String() - - /// Resource type, "BANDWIDTH" or "ENERGY", data type is string - public var resource: String = String() - - /// Amount of TRX staked for resource to be delegated, unit is sun, data type is uint256 - public var balance: Int64 = 0 - - /// Receiver address of resource to be delegated to - public var receiverAddress: String = String() - - /// Whether it is locked, if it is set to true, the delegated resources cannot be undelegated within 3 days. - /// When the lock time is not over, if the owner delegates the same resources using the lock to the same address, - /// the lock time will be reset to 3 days - public var lock: Bool = false - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// undelegate resource -public struct TW_Tron_Proto_UnDelegateResourceContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Address of transaction initiator, data type is string - public var ownerAddress: String = String() - - /// Resource type, "BANDWIDTH" or "ENERGY", data type is string - public var resource: String = String() - - /// Amount of TRX staked for resource to be undelegated, unit is sun, data type is uint256 - public var balance: Int64 = 0 - - /// Receiver address of resource to be delegated to, data type is string - public var receiverAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Unfreeze balance -public struct TW_Tron_Proto_UnfreezeBalanceContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Sender address - public var ownerAddress: String = String() - - /// Resource type: BANDWIDTH | ENERGY - public var resource: String = String() - - /// Receiver address - public var receiverAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Unfreeze asset -public struct TW_Tron_Proto_UnfreezeAssetContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Sender address - public var ownerAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Vote asset -public struct TW_Tron_Proto_VoteAssetContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Sender address - public var ownerAddress: String = String() - - /// Vote addresses - public var voteAddress: [String] = [] - - public var support: Bool = false - - public var count: Int32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Vote witness -public struct TW_Tron_Proto_VoteWitnessContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Owner - public var ownerAddress: String = String() - - /// The votes - public var votes: [TW_Tron_Proto_VoteWitnessContract.Vote] = [] - - public var support: Bool = false - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// A vote - public struct Vote { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// address - public var voteAddress: String = String() - - /// vote count - public var voteCount: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public init() {} -} - -/// Withdraw balance -public struct TW_Tron_Proto_WithdrawBalanceContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Sender address - public var ownerAddress: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Smart contract call -public struct TW_Tron_Proto_TriggerSmartContract { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Owner - public var ownerAddress: String = String() - - /// Contract address - public var contractAddress: String = String() - - /// amount - public var callValue: Int64 = 0 - - /// call data - public var data: Data = Data() - - /// token value - public var callTokenValue: Int64 = 0 - - /// ID of the token - public var tokenID: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Info from block header -public struct TW_Tron_Proto_BlockHeader { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// creation timestamp - public var timestamp: Int64 = 0 - - /// root - public var txTrieRoot: Data = Data() - - /// hash of the parent - public var parentHash: Data = Data() - - public var number: Int64 = 0 - - public var witnessAddress: Data = Data() - - public var version: Int32 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Transaction -public struct TW_Tron_Proto_Transaction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Transaction timestamp in milliseconds. - public var timestamp: Int64 = 0 - - /// Transaction expiration time in milliseconds. - public var expiration: Int64 = 0 - - /// Transaction block header. - public var blockHeader: TW_Tron_Proto_BlockHeader { - get {return _blockHeader ?? TW_Tron_Proto_BlockHeader()} - set {_blockHeader = newValue} - } - /// Returns true if `blockHeader` has been explicitly set. - public var hasBlockHeader: Bool {return self._blockHeader != nil} - /// Clears the value of `blockHeader`. Subsequent reads from it will return its default value. - public mutating func clearBlockHeader() {self._blockHeader = nil} - - /// Transaction fee limit - public var feeLimit: Int64 = 0 - - /// Contract. - public var contractOneof: TW_Tron_Proto_Transaction.OneOf_ContractOneof? = nil - - public var transfer: TW_Tron_Proto_TransferContract { - get { - if case .transfer(let v)? = contractOneof {return v} - return TW_Tron_Proto_TransferContract() - } - set {contractOneof = .transfer(newValue)} - } - - public var transferAsset: TW_Tron_Proto_TransferAssetContract { - get { - if case .transferAsset(let v)? = contractOneof {return v} - return TW_Tron_Proto_TransferAssetContract() - } - set {contractOneof = .transferAsset(newValue)} - } - - public var freezeBalance: TW_Tron_Proto_FreezeBalanceContract { - get { - if case .freezeBalance(let v)? = contractOneof {return v} - return TW_Tron_Proto_FreezeBalanceContract() - } - set {contractOneof = .freezeBalance(newValue)} - } - - public var unfreezeBalance: TW_Tron_Proto_UnfreezeBalanceContract { - get { - if case .unfreezeBalance(let v)? = contractOneof {return v} - return TW_Tron_Proto_UnfreezeBalanceContract() - } - set {contractOneof = .unfreezeBalance(newValue)} - } - - public var unfreezeAsset: TW_Tron_Proto_UnfreezeAssetContract { - get { - if case .unfreezeAsset(let v)? = contractOneof {return v} - return TW_Tron_Proto_UnfreezeAssetContract() - } - set {contractOneof = .unfreezeAsset(newValue)} - } - - public var withdrawBalance: TW_Tron_Proto_WithdrawBalanceContract { - get { - if case .withdrawBalance(let v)? = contractOneof {return v} - return TW_Tron_Proto_WithdrawBalanceContract() - } - set {contractOneof = .withdrawBalance(newValue)} - } - - public var voteAsset: TW_Tron_Proto_VoteAssetContract { - get { - if case .voteAsset(let v)? = contractOneof {return v} - return TW_Tron_Proto_VoteAssetContract() - } - set {contractOneof = .voteAsset(newValue)} - } - - public var voteWitness: TW_Tron_Proto_VoteWitnessContract { - get { - if case .voteWitness(let v)? = contractOneof {return v} - return TW_Tron_Proto_VoteWitnessContract() - } - set {contractOneof = .voteWitness(newValue)} - } - - public var triggerSmartContract: TW_Tron_Proto_TriggerSmartContract { - get { - if case .triggerSmartContract(let v)? = contractOneof {return v} - return TW_Tron_Proto_TriggerSmartContract() - } - set {contractOneof = .triggerSmartContract(newValue)} - } - - public var transferTrc20Contract: TW_Tron_Proto_TransferTRC20Contract { - get { - if case .transferTrc20Contract(let v)? = contractOneof {return v} - return TW_Tron_Proto_TransferTRC20Contract() - } - set {contractOneof = .transferTrc20Contract(newValue)} - } - - public var freezeBalanceV2: TW_Tron_Proto_FreezeBalanceV2Contract { - get { - if case .freezeBalanceV2(let v)? = contractOneof {return v} - return TW_Tron_Proto_FreezeBalanceV2Contract() - } - set {contractOneof = .freezeBalanceV2(newValue)} - } - - public var unfreezeBalanceV2: TW_Tron_Proto_UnfreezeBalanceV2Contract { - get { - if case .unfreezeBalanceV2(let v)? = contractOneof {return v} - return TW_Tron_Proto_UnfreezeBalanceV2Contract() - } - set {contractOneof = .unfreezeBalanceV2(newValue)} - } - - public var withdrawExpireUnfreeze: TW_Tron_Proto_WithdrawExpireUnfreezeContract { - get { - if case .withdrawExpireUnfreeze(let v)? = contractOneof {return v} - return TW_Tron_Proto_WithdrawExpireUnfreezeContract() - } - set {contractOneof = .withdrawExpireUnfreeze(newValue)} - } - - public var delegateResource: TW_Tron_Proto_DelegateResourceContract { - get { - if case .delegateResource(let v)? = contractOneof {return v} - return TW_Tron_Proto_DelegateResourceContract() - } - set {contractOneof = .delegateResource(newValue)} - } - - public var undelegateResource: TW_Tron_Proto_UnDelegateResourceContract { - get { - if case .undelegateResource(let v)? = contractOneof {return v} - return TW_Tron_Proto_UnDelegateResourceContract() - } - set {contractOneof = .undelegateResource(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Contract. - public enum OneOf_ContractOneof: Equatable { - case transfer(TW_Tron_Proto_TransferContract) - case transferAsset(TW_Tron_Proto_TransferAssetContract) - case freezeBalance(TW_Tron_Proto_FreezeBalanceContract) - case unfreezeBalance(TW_Tron_Proto_UnfreezeBalanceContract) - case unfreezeAsset(TW_Tron_Proto_UnfreezeAssetContract) - case withdrawBalance(TW_Tron_Proto_WithdrawBalanceContract) - case voteAsset(TW_Tron_Proto_VoteAssetContract) - case voteWitness(TW_Tron_Proto_VoteWitnessContract) - case triggerSmartContract(TW_Tron_Proto_TriggerSmartContract) - case transferTrc20Contract(TW_Tron_Proto_TransferTRC20Contract) - case freezeBalanceV2(TW_Tron_Proto_FreezeBalanceV2Contract) - case unfreezeBalanceV2(TW_Tron_Proto_UnfreezeBalanceV2Contract) - case withdrawExpireUnfreeze(TW_Tron_Proto_WithdrawExpireUnfreezeContract) - case delegateResource(TW_Tron_Proto_DelegateResourceContract) - case undelegateResource(TW_Tron_Proto_UnDelegateResourceContract) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Tron_Proto_Transaction.OneOf_ContractOneof, rhs: TW_Tron_Proto_Transaction.OneOf_ContractOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transfer, .transfer): return { - guard case .transfer(let l) = lhs, case .transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.transferAsset, .transferAsset): return { - guard case .transferAsset(let l) = lhs, case .transferAsset(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.freezeBalance, .freezeBalance): return { - guard case .freezeBalance(let l) = lhs, case .freezeBalance(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.unfreezeBalance, .unfreezeBalance): return { - guard case .unfreezeBalance(let l) = lhs, case .unfreezeBalance(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.unfreezeAsset, .unfreezeAsset): return { - guard case .unfreezeAsset(let l) = lhs, case .unfreezeAsset(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.withdrawBalance, .withdrawBalance): return { - guard case .withdrawBalance(let l) = lhs, case .withdrawBalance(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.voteAsset, .voteAsset): return { - guard case .voteAsset(let l) = lhs, case .voteAsset(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.voteWitness, .voteWitness): return { - guard case .voteWitness(let l) = lhs, case .voteWitness(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.triggerSmartContract, .triggerSmartContract): return { - guard case .triggerSmartContract(let l) = lhs, case .triggerSmartContract(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.transferTrc20Contract, .transferTrc20Contract): return { - guard case .transferTrc20Contract(let l) = lhs, case .transferTrc20Contract(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.freezeBalanceV2, .freezeBalanceV2): return { - guard case .freezeBalanceV2(let l) = lhs, case .freezeBalanceV2(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.unfreezeBalanceV2, .unfreezeBalanceV2): return { - guard case .unfreezeBalanceV2(let l) = lhs, case .unfreezeBalanceV2(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.withdrawExpireUnfreeze, .withdrawExpireUnfreeze): return { - guard case .withdrawExpireUnfreeze(let l) = lhs, case .withdrawExpireUnfreeze(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.delegateResource, .delegateResource): return { - guard case .delegateResource(let l) = lhs, case .delegateResource(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.undelegateResource, .undelegateResource): return { - guard case .undelegateResource(let l) = lhs, case .undelegateResource(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} - - fileprivate var _blockHeader: TW_Tron_Proto_BlockHeader? = nil -} - -/// Input data necessary to create a signed transaction. -public struct TW_Tron_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Transaction. - public var transaction: TW_Tron_Proto_Transaction { - get {return _storage._transaction ?? TW_Tron_Proto_Transaction()} - set {_uniqueStorage()._transaction = newValue} - } - /// Returns true if `transaction` has been explicitly set. - public var hasTransaction: Bool {return _storage._transaction != nil} - /// Clears the value of `transaction`. Subsequent reads from it will return its default value. - public mutating func clearTransaction() {_uniqueStorage()._transaction = nil} - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data { - get {return _storage._privateKey} - set {_uniqueStorage()._privateKey = newValue} - } - - /// For direct sign in Tron, we just have to sign the txId returned by the DApp json payload. - public var txID: String { - get {return _storage._txID} - set {_uniqueStorage()._txID = newValue} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _storage = _StorageClass.defaultInstance -} - -/// Result containing the signed and encoded transaction. -public struct TW_Tron_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Transaction identifier. - public var id: Data = Data() - - /// Signature. - public var signature: Data = Data() - - public var refBlockBytes: Data = Data() - - public var refBlockHash: Data = Data() - - /// Result in JSON - public var json: String = String() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Tron.Proto" - -extension TW_Tron_Proto_TransferContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransferContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "owner_address"), - 2: .standard(proto: "to_address"), - 3: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 1) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 2) - } - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_TransferContract, rhs: TW_Tron_Proto_TransferContract) -> Bool { - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_TransferAssetContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransferAssetContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "asset_name"), - 2: .standard(proto: "owner_address"), - 3: .standard(proto: "to_address"), - 4: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.assetName) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.assetName.isEmpty { - try visitor.visitSingularStringField(value: self.assetName, fieldNumber: 1) - } - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 2) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 3) - } - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_TransferAssetContract, rhs: TW_Tron_Proto_TransferAssetContract) -> Bool { - if lhs.assetName != rhs.assetName {return false} - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_TransferTRC20Contract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransferTRC20Contract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "contract_address"), - 2: .standard(proto: "owner_address"), - 3: .standard(proto: "to_address"), - 4: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.contractAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.toAddress) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.contractAddress.isEmpty { - try visitor.visitSingularStringField(value: self.contractAddress, fieldNumber: 1) - } - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 2) - } - if !self.toAddress.isEmpty { - try visitor.visitSingularStringField(value: self.toAddress, fieldNumber: 3) - } - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_TransferTRC20Contract, rhs: TW_Tron_Proto_TransferTRC20Contract) -> Bool { - if lhs.contractAddress != rhs.contractAddress {return false} - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.toAddress != rhs.toAddress {return false} - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_FreezeBalanceContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FreezeBalanceContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "owner_address"), - 2: .standard(proto: "frozen_balance"), - 3: .standard(proto: "frozen_duration"), - 10: .same(proto: "resource"), - 15: .standard(proto: "receiver_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.frozenBalance) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.frozenDuration) }() - case 10: try { try decoder.decodeSingularStringField(value: &self.resource) }() - case 15: try { try decoder.decodeSingularStringField(value: &self.receiverAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 1) - } - if self.frozenBalance != 0 { - try visitor.visitSingularInt64Field(value: self.frozenBalance, fieldNumber: 2) - } - if self.frozenDuration != 0 { - try visitor.visitSingularInt64Field(value: self.frozenDuration, fieldNumber: 3) - } - if !self.resource.isEmpty { - try visitor.visitSingularStringField(value: self.resource, fieldNumber: 10) - } - if !self.receiverAddress.isEmpty { - try visitor.visitSingularStringField(value: self.receiverAddress, fieldNumber: 15) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_FreezeBalanceContract, rhs: TW_Tron_Proto_FreezeBalanceContract) -> Bool { - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.frozenBalance != rhs.frozenBalance {return false} - if lhs.frozenDuration != rhs.frozenDuration {return false} - if lhs.resource != rhs.resource {return false} - if lhs.receiverAddress != rhs.receiverAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_FreezeBalanceV2Contract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".FreezeBalanceV2Contract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "owner_address"), - 2: .standard(proto: "frozen_balance"), - 3: .same(proto: "resource"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.frozenBalance) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.resource) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 1) - } - if self.frozenBalance != 0 { - try visitor.visitSingularInt64Field(value: self.frozenBalance, fieldNumber: 2) - } - if !self.resource.isEmpty { - try visitor.visitSingularStringField(value: self.resource, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_FreezeBalanceV2Contract, rhs: TW_Tron_Proto_FreezeBalanceV2Contract) -> Bool { - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.frozenBalance != rhs.frozenBalance {return false} - if lhs.resource != rhs.resource {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_UnfreezeBalanceV2Contract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".UnfreezeBalanceV2Contract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "owner_address"), - 2: .standard(proto: "unfreeze_balance"), - 3: .same(proto: "resource"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.unfreezeBalance) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.resource) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 1) - } - if self.unfreezeBalance != 0 { - try visitor.visitSingularInt64Field(value: self.unfreezeBalance, fieldNumber: 2) - } - if !self.resource.isEmpty { - try visitor.visitSingularStringField(value: self.resource, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_UnfreezeBalanceV2Contract, rhs: TW_Tron_Proto_UnfreezeBalanceV2Contract) -> Bool { - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.unfreezeBalance != rhs.unfreezeBalance {return false} - if lhs.resource != rhs.resource {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_WithdrawExpireUnfreezeContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".WithdrawExpireUnfreezeContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "owner_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_WithdrawExpireUnfreezeContract, rhs: TW_Tron_Proto_WithdrawExpireUnfreezeContract) -> Bool { - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_DelegateResourceContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".DelegateResourceContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "owner_address"), - 2: .same(proto: "resource"), - 3: .same(proto: "balance"), - 4: .standard(proto: "receiver_address"), - 5: .same(proto: "lock"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.resource) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.balance) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.receiverAddress) }() - case 5: try { try decoder.decodeSingularBoolField(value: &self.lock) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 1) - } - if !self.resource.isEmpty { - try visitor.visitSingularStringField(value: self.resource, fieldNumber: 2) - } - if self.balance != 0 { - try visitor.visitSingularInt64Field(value: self.balance, fieldNumber: 3) - } - if !self.receiverAddress.isEmpty { - try visitor.visitSingularStringField(value: self.receiverAddress, fieldNumber: 4) - } - if self.lock != false { - try visitor.visitSingularBoolField(value: self.lock, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_DelegateResourceContract, rhs: TW_Tron_Proto_DelegateResourceContract) -> Bool { - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.resource != rhs.resource {return false} - if lhs.balance != rhs.balance {return false} - if lhs.receiverAddress != rhs.receiverAddress {return false} - if lhs.lock != rhs.lock {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_UnDelegateResourceContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".UnDelegateResourceContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "owner_address"), - 2: .same(proto: "resource"), - 3: .same(proto: "balance"), - 4: .standard(proto: "receiver_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.resource) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.balance) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.receiverAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 1) - } - if !self.resource.isEmpty { - try visitor.visitSingularStringField(value: self.resource, fieldNumber: 2) - } - if self.balance != 0 { - try visitor.visitSingularInt64Field(value: self.balance, fieldNumber: 3) - } - if !self.receiverAddress.isEmpty { - try visitor.visitSingularStringField(value: self.receiverAddress, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_UnDelegateResourceContract, rhs: TW_Tron_Proto_UnDelegateResourceContract) -> Bool { - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.resource != rhs.resource {return false} - if lhs.balance != rhs.balance {return false} - if lhs.receiverAddress != rhs.receiverAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_UnfreezeBalanceContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".UnfreezeBalanceContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "owner_address"), - 10: .same(proto: "resource"), - 15: .standard(proto: "receiver_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 10: try { try decoder.decodeSingularStringField(value: &self.resource) }() - case 15: try { try decoder.decodeSingularStringField(value: &self.receiverAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 1) - } - if !self.resource.isEmpty { - try visitor.visitSingularStringField(value: self.resource, fieldNumber: 10) - } - if !self.receiverAddress.isEmpty { - try visitor.visitSingularStringField(value: self.receiverAddress, fieldNumber: 15) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_UnfreezeBalanceContract, rhs: TW_Tron_Proto_UnfreezeBalanceContract) -> Bool { - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.resource != rhs.resource {return false} - if lhs.receiverAddress != rhs.receiverAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_UnfreezeAssetContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".UnfreezeAssetContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "owner_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_UnfreezeAssetContract, rhs: TW_Tron_Proto_UnfreezeAssetContract) -> Bool { - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_VoteAssetContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".VoteAssetContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "owner_address"), - 2: .standard(proto: "vote_address"), - 3: .same(proto: "support"), - 5: .same(proto: "count"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 2: try { try decoder.decodeRepeatedStringField(value: &self.voteAddress) }() - case 3: try { try decoder.decodeSingularBoolField(value: &self.support) }() - case 5: try { try decoder.decodeSingularInt32Field(value: &self.count) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 1) - } - if !self.voteAddress.isEmpty { - try visitor.visitRepeatedStringField(value: self.voteAddress, fieldNumber: 2) - } - if self.support != false { - try visitor.visitSingularBoolField(value: self.support, fieldNumber: 3) - } - if self.count != 0 { - try visitor.visitSingularInt32Field(value: self.count, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_VoteAssetContract, rhs: TW_Tron_Proto_VoteAssetContract) -> Bool { - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.voteAddress != rhs.voteAddress {return false} - if lhs.support != rhs.support {return false} - if lhs.count != rhs.count {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_VoteWitnessContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".VoteWitnessContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "owner_address"), - 2: .same(proto: "votes"), - 3: .same(proto: "support"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 2: try { try decoder.decodeRepeatedMessageField(value: &self.votes) }() - case 3: try { try decoder.decodeSingularBoolField(value: &self.support) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 1) - } - if !self.votes.isEmpty { - try visitor.visitRepeatedMessageField(value: self.votes, fieldNumber: 2) - } - if self.support != false { - try visitor.visitSingularBoolField(value: self.support, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_VoteWitnessContract, rhs: TW_Tron_Proto_VoteWitnessContract) -> Bool { - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.votes != rhs.votes {return false} - if lhs.support != rhs.support {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_VoteWitnessContract.Vote: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Tron_Proto_VoteWitnessContract.protoMessageName + ".Vote" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "vote_address"), - 2: .standard(proto: "vote_count"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.voteAddress) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.voteCount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.voteAddress.isEmpty { - try visitor.visitSingularStringField(value: self.voteAddress, fieldNumber: 1) - } - if self.voteCount != 0 { - try visitor.visitSingularInt64Field(value: self.voteCount, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_VoteWitnessContract.Vote, rhs: TW_Tron_Proto_VoteWitnessContract.Vote) -> Bool { - if lhs.voteAddress != rhs.voteAddress {return false} - if lhs.voteCount != rhs.voteCount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_WithdrawBalanceContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".WithdrawBalanceContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "owner_address"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_WithdrawBalanceContract, rhs: TW_Tron_Proto_WithdrawBalanceContract) -> Bool { - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_TriggerSmartContract: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TriggerSmartContract" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "owner_address"), - 2: .standard(proto: "contract_address"), - 3: .standard(proto: "call_value"), - 4: .same(proto: "data"), - 5: .standard(proto: "call_token_value"), - 6: .standard(proto: "token_id"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.ownerAddress) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.contractAddress) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.callValue) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.data) }() - case 5: try { try decoder.decodeSingularInt64Field(value: &self.callTokenValue) }() - case 6: try { try decoder.decodeSingularInt64Field(value: &self.tokenID) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.ownerAddress.isEmpty { - try visitor.visitSingularStringField(value: self.ownerAddress, fieldNumber: 1) - } - if !self.contractAddress.isEmpty { - try visitor.visitSingularStringField(value: self.contractAddress, fieldNumber: 2) - } - if self.callValue != 0 { - try visitor.visitSingularInt64Field(value: self.callValue, fieldNumber: 3) - } - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 4) - } - if self.callTokenValue != 0 { - try visitor.visitSingularInt64Field(value: self.callTokenValue, fieldNumber: 5) - } - if self.tokenID != 0 { - try visitor.visitSingularInt64Field(value: self.tokenID, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_TriggerSmartContract, rhs: TW_Tron_Proto_TriggerSmartContract) -> Bool { - if lhs.ownerAddress != rhs.ownerAddress {return false} - if lhs.contractAddress != rhs.contractAddress {return false} - if lhs.callValue != rhs.callValue {return false} - if lhs.data != rhs.data {return false} - if lhs.callTokenValue != rhs.callTokenValue {return false} - if lhs.tokenID != rhs.tokenID {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_BlockHeader: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".BlockHeader" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "timestamp"), - 2: .standard(proto: "tx_trie_root"), - 3: .standard(proto: "parent_hash"), - 7: .same(proto: "number"), - 9: .standard(proto: "witness_address"), - 10: .same(proto: "version"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.timestamp) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.txTrieRoot) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.parentHash) }() - case 7: try { try decoder.decodeSingularInt64Field(value: &self.number) }() - case 9: try { try decoder.decodeSingularBytesField(value: &self.witnessAddress) }() - case 10: try { try decoder.decodeSingularInt32Field(value: &self.version) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.timestamp != 0 { - try visitor.visitSingularInt64Field(value: self.timestamp, fieldNumber: 1) - } - if !self.txTrieRoot.isEmpty { - try visitor.visitSingularBytesField(value: self.txTrieRoot, fieldNumber: 2) - } - if !self.parentHash.isEmpty { - try visitor.visitSingularBytesField(value: self.parentHash, fieldNumber: 3) - } - if self.number != 0 { - try visitor.visitSingularInt64Field(value: self.number, fieldNumber: 7) - } - if !self.witnessAddress.isEmpty { - try visitor.visitSingularBytesField(value: self.witnessAddress, fieldNumber: 9) - } - if self.version != 0 { - try visitor.visitSingularInt32Field(value: self.version, fieldNumber: 10) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_BlockHeader, rhs: TW_Tron_Proto_BlockHeader) -> Bool { - if lhs.timestamp != rhs.timestamp {return false} - if lhs.txTrieRoot != rhs.txTrieRoot {return false} - if lhs.parentHash != rhs.parentHash {return false} - if lhs.number != rhs.number {return false} - if lhs.witnessAddress != rhs.witnessAddress {return false} - if lhs.version != rhs.version {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_Transaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transaction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "timestamp"), - 2: .same(proto: "expiration"), - 3: .standard(proto: "block_header"), - 4: .standard(proto: "fee_limit"), - 10: .same(proto: "transfer"), - 11: .standard(proto: "transfer_asset"), - 12: .standard(proto: "freeze_balance"), - 13: .standard(proto: "unfreeze_balance"), - 14: .standard(proto: "unfreeze_asset"), - 15: .standard(proto: "withdraw_balance"), - 16: .standard(proto: "vote_asset"), - 17: .standard(proto: "vote_witness"), - 18: .standard(proto: "trigger_smart_contract"), - 19: .standard(proto: "transfer_trc20_contract"), - 20: .standard(proto: "freeze_balance_v2"), - 21: .standard(proto: "unfreeze_balance_v2"), - 23: .standard(proto: "withdraw_expire_unfreeze"), - 24: .standard(proto: "delegate_resource"), - 25: .standard(proto: "undelegate_resource"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.timestamp) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.expiration) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._blockHeader) }() - case 4: try { try decoder.decodeSingularInt64Field(value: &self.feeLimit) }() - case 10: try { - var v: TW_Tron_Proto_TransferContract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .transfer(v) - } - }() - case 11: try { - var v: TW_Tron_Proto_TransferAssetContract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .transferAsset(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .transferAsset(v) - } - }() - case 12: try { - var v: TW_Tron_Proto_FreezeBalanceContract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .freezeBalance(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .freezeBalance(v) - } - }() - case 13: try { - var v: TW_Tron_Proto_UnfreezeBalanceContract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .unfreezeBalance(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .unfreezeBalance(v) - } - }() - case 14: try { - var v: TW_Tron_Proto_UnfreezeAssetContract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .unfreezeAsset(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .unfreezeAsset(v) - } - }() - case 15: try { - var v: TW_Tron_Proto_WithdrawBalanceContract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .withdrawBalance(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .withdrawBalance(v) - } - }() - case 16: try { - var v: TW_Tron_Proto_VoteAssetContract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .voteAsset(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .voteAsset(v) - } - }() - case 17: try { - var v: TW_Tron_Proto_VoteWitnessContract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .voteWitness(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .voteWitness(v) - } - }() - case 18: try { - var v: TW_Tron_Proto_TriggerSmartContract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .triggerSmartContract(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .triggerSmartContract(v) - } - }() - case 19: try { - var v: TW_Tron_Proto_TransferTRC20Contract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .transferTrc20Contract(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .transferTrc20Contract(v) - } - }() - case 20: try { - var v: TW_Tron_Proto_FreezeBalanceV2Contract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .freezeBalanceV2(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .freezeBalanceV2(v) - } - }() - case 21: try { - var v: TW_Tron_Proto_UnfreezeBalanceV2Contract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .unfreezeBalanceV2(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .unfreezeBalanceV2(v) - } - }() - case 23: try { - var v: TW_Tron_Proto_WithdrawExpireUnfreezeContract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .withdrawExpireUnfreeze(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .withdrawExpireUnfreeze(v) - } - }() - case 24: try { - var v: TW_Tron_Proto_DelegateResourceContract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .delegateResource(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .delegateResource(v) - } - }() - case 25: try { - var v: TW_Tron_Proto_UnDelegateResourceContract? - var hadOneofValue = false - if let current = self.contractOneof { - hadOneofValue = true - if case .undelegateResource(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.contractOneof = .undelegateResource(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.timestamp != 0 { - try visitor.visitSingularInt64Field(value: self.timestamp, fieldNumber: 1) - } - if self.expiration != 0 { - try visitor.visitSingularInt64Field(value: self.expiration, fieldNumber: 2) - } - try { if let v = self._blockHeader { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - if self.feeLimit != 0 { - try visitor.visitSingularInt64Field(value: self.feeLimit, fieldNumber: 4) - } - switch self.contractOneof { - case .transfer?: try { - guard case .transfer(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - }() - case .transferAsset?: try { - guard case .transferAsset(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - }() - case .freezeBalance?: try { - guard case .freezeBalance(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 12) - }() - case .unfreezeBalance?: try { - guard case .unfreezeBalance(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 13) - }() - case .unfreezeAsset?: try { - guard case .unfreezeAsset(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 14) - }() - case .withdrawBalance?: try { - guard case .withdrawBalance(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 15) - }() - case .voteAsset?: try { - guard case .voteAsset(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 16) - }() - case .voteWitness?: try { - guard case .voteWitness(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 17) - }() - case .triggerSmartContract?: try { - guard case .triggerSmartContract(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 18) - }() - case .transferTrc20Contract?: try { - guard case .transferTrc20Contract(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 19) - }() - case .freezeBalanceV2?: try { - guard case .freezeBalanceV2(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 20) - }() - case .unfreezeBalanceV2?: try { - guard case .unfreezeBalanceV2(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 21) - }() - case .withdrawExpireUnfreeze?: try { - guard case .withdrawExpireUnfreeze(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 23) - }() - case .delegateResource?: try { - guard case .delegateResource(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 24) - }() - case .undelegateResource?: try { - guard case .undelegateResource(let v)? = self.contractOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 25) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_Transaction, rhs: TW_Tron_Proto_Transaction) -> Bool { - if lhs.timestamp != rhs.timestamp {return false} - if lhs.expiration != rhs.expiration {return false} - if lhs._blockHeader != rhs._blockHeader {return false} - if lhs.feeLimit != rhs.feeLimit {return false} - if lhs.contractOneof != rhs.contractOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "transaction"), - 2: .standard(proto: "private_key"), - 3: .same(proto: "txId"), - ] - - fileprivate class _StorageClass { - var _transaction: TW_Tron_Proto_Transaction? = nil - var _privateKey: Data = Data() - var _txID: String = String() - - static let defaultInstance = _StorageClass() - - private init() {} - - init(copying source: _StorageClass) { - _transaction = source._transaction - _privateKey = source._privateKey - _txID = source._txID - } - } - - fileprivate mutating func _uniqueStorage() -> _StorageClass { - if !isKnownUniquelyReferenced(&_storage) { - _storage = _StorageClass(copying: _storage) - } - return _storage - } - - public mutating func decodeMessage(decoder: inout D) throws { - _ = _uniqueStorage() - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularMessageField(value: &_storage._transaction) }() - case 2: try { try decoder.decodeSingularBytesField(value: &_storage._privateKey) }() - case 3: try { try decoder.decodeSingularStringField(value: &_storage._txID) }() - default: break - } - } - } - } - - public func traverse(visitor: inout V) throws { - try withExtendedLifetime(_storage) { (_storage: _StorageClass) in - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = _storage._transaction { - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - } }() - if !_storage._privateKey.isEmpty { - try visitor.visitSingularBytesField(value: _storage._privateKey, fieldNumber: 2) - } - if !_storage._txID.isEmpty { - try visitor.visitSingularStringField(value: _storage._txID, fieldNumber: 3) - } - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_SigningInput, rhs: TW_Tron_Proto_SigningInput) -> Bool { - if lhs._storage !== rhs._storage { - let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in - let _storage = _args.0 - let rhs_storage = _args.1 - if _storage._transaction != rhs_storage._transaction {return false} - if _storage._privateKey != rhs_storage._privateKey {return false} - if _storage._txID != rhs_storage._txID {return false} - return true - } - if !storagesAreEqual {return false} - } - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Tron_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "id"), - 2: .same(proto: "signature"), - 3: .standard(proto: "ref_block_bytes"), - 4: .standard(proto: "ref_block_hash"), - 5: .same(proto: "json"), - 6: .same(proto: "error"), - 7: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.id) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.refBlockBytes) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.refBlockHash) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.json) }() - case 6: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 7: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.id.isEmpty { - try visitor.visitSingularBytesField(value: self.id, fieldNumber: 1) - } - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 2) - } - if !self.refBlockBytes.isEmpty { - try visitor.visitSingularBytesField(value: self.refBlockBytes, fieldNumber: 3) - } - if !self.refBlockHash.isEmpty { - try visitor.visitSingularBytesField(value: self.refBlockHash, fieldNumber: 4) - } - if !self.json.isEmpty { - try visitor.visitSingularStringField(value: self.json, fieldNumber: 5) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 6) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 7) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Tron_Proto_SigningOutput, rhs: TW_Tron_Proto_SigningOutput) -> Bool { - if lhs.id != rhs.id {return false} - if lhs.signature != rhs.signature {return false} - if lhs.refBlockBytes != rhs.refBlockBytes {return false} - if lhs.refBlockHash != rhs.refBlockHash {return false} - if lhs.json != rhs.json {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Utxo+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Utxo+Proto.swift deleted file mode 100644 index 351ae722..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Utxo+Proto.swift +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias UtxoSigningInput = TW_Utxo_Proto_SigningInput -public typealias UtxoLockTime = TW_Utxo_Proto_LockTime -public typealias UtxoTxIn = TW_Utxo_Proto_TxIn -public typealias UtxoTxOut = TW_Utxo_Proto_TxOut -public typealias UtxoPreSigningOutput = TW_Utxo_Proto_PreSigningOutput -public typealias UtxoSighash = TW_Utxo_Proto_Sighash -public typealias UtxoPreSerialization = TW_Utxo_Proto_PreSerialization -public typealias UtxoTxInClaim = TW_Utxo_Proto_TxInClaim -public typealias UtxoSerializedTransaction = TW_Utxo_Proto_SerializedTransaction -public typealias UtxoError = TW_Utxo_Proto_Error -public typealias UtxoInputSelector = TW_Utxo_Proto_InputSelector -public typealias UtxoSigningMethod = TW_Utxo_Proto_SigningMethod -public typealias UtxoSighashType = TW_Utxo_Proto_SighashType diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Utxo.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Utxo.pb.swift deleted file mode 100644 index d8b9c79e..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Utxo.pb.swift +++ /dev/null @@ -1,1158 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Utxo.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -public enum TW_Utxo_Proto_Error: SwiftProtobuf.Enum { - public typealias RawValue = Int - case ok // = 0 - case invalidLeafHash // = 1 - case invalidSighashType // = 2 - case invalidLockTime // = 3 - case invalidTxid // = 4 - case sighashFailed // = 5 - case missingSighashMethod // = 6 - case failedEncoding // = 7 - case insufficientInputs // = 8 - case missingChangeScriptPubkey // = 9 - case UNRECOGNIZED(Int) - - public init() { - self = .ok - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .ok - case 1: self = .invalidLeafHash - case 2: self = .invalidSighashType - case 3: self = .invalidLockTime - case 4: self = .invalidTxid - case 5: self = .sighashFailed - case 6: self = .missingSighashMethod - case 7: self = .failedEncoding - case 8: self = .insufficientInputs - case 9: self = .missingChangeScriptPubkey - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .ok: return 0 - case .invalidLeafHash: return 1 - case .invalidSighashType: return 2 - case .invalidLockTime: return 3 - case .invalidTxid: return 4 - case .sighashFailed: return 5 - case .missingSighashMethod: return 6 - case .failedEncoding: return 7 - case .insufficientInputs: return 8 - case .missingChangeScriptPubkey: return 9 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Utxo_Proto_Error: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Utxo_Proto_Error] = [ - .ok, - .invalidLeafHash, - .invalidSighashType, - .invalidLockTime, - .invalidTxid, - .sighashFailed, - .missingSighashMethod, - .failedEncoding, - .insufficientInputs, - .missingChangeScriptPubkey, - ] -} - -#endif // swift(>=4.2) - -public enum TW_Utxo_Proto_InputSelector: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Use all the inputs provided in the given order. - case useAll // = 0 - - /// Automatically select enough inputs in the given order to cover the - /// outputs of the transaction. - case selectInOrder // = 1 - - /// Automatically select enough inputs in an ascending order to cover the - /// outputs of the transaction. - case selectAscending // = 2 - case UNRECOGNIZED(Int) - - public init() { - self = .useAll - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .useAll - case 1: self = .selectInOrder - case 2: self = .selectAscending - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .useAll: return 0 - case .selectInOrder: return 1 - case .selectAscending: return 2 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Utxo_Proto_InputSelector: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Utxo_Proto_InputSelector] = [ - .useAll, - .selectInOrder, - .selectAscending, - ] -} - -#endif // swift(>=4.2) - -public enum TW_Utxo_Proto_SigningMethod: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Used for P2SH and P2PKH - case legacy // = 0 - - /// Used for P2WSH and P2WPKH - case segwit // = 1 - - /// Used for P2TR key-path and P2TR script-paty - case taprootAll // = 2 - - /// Used for P2TR key-path and P2TR script-paty if only one prevout should be - /// used to calculate the Sighash. Normally this is not used. - case taprootOnePrevout // = 3 - case UNRECOGNIZED(Int) - - public init() { - self = .legacy - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .legacy - case 1: self = .segwit - case 2: self = .taprootAll - case 3: self = .taprootOnePrevout - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .legacy: return 0 - case .segwit: return 1 - case .taprootAll: return 2 - case .taprootOnePrevout: return 3 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Utxo_Proto_SigningMethod: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Utxo_Proto_SigningMethod] = [ - .legacy, - .segwit, - .taprootAll, - .taprootOnePrevout, - ] -} - -#endif // swift(>=4.2) - -public enum TW_Utxo_Proto_SighashType: SwiftProtobuf.Enum { - public typealias RawValue = Int - - /// Use default (All) - case useDefault // = 0 - - /// Sign all outputs (default). - case all // = 1 - - /// Sign no outputs, anyone can choose the destination. - case none // = 2 - - /// Sign the output whose index matches this inputs index. - case single // = 3 - - ///Sign all outputs but only this input. - case allPlusAnyoneCanPay // = 129 - - /// Sign no outputs and only this input. - case nonePlusAnyoneCanPay // = 130 - - /// Sign one output and only this input. - case singlePlusAnyoneCanPay // = 131 - case UNRECOGNIZED(Int) - - public init() { - self = .useDefault - } - - public init?(rawValue: Int) { - switch rawValue { - case 0: self = .useDefault - case 1: self = .all - case 2: self = .none - case 3: self = .single - case 129: self = .allPlusAnyoneCanPay - case 130: self = .nonePlusAnyoneCanPay - case 131: self = .singlePlusAnyoneCanPay - default: self = .UNRECOGNIZED(rawValue) - } - } - - public var rawValue: Int { - switch self { - case .useDefault: return 0 - case .all: return 1 - case .none: return 2 - case .single: return 3 - case .allPlusAnyoneCanPay: return 129 - case .nonePlusAnyoneCanPay: return 130 - case .singlePlusAnyoneCanPay: return 131 - case .UNRECOGNIZED(let i): return i - } - } - -} - -#if swift(>=4.2) - -extension TW_Utxo_Proto_SighashType: CaseIterable { - // The compiler won't synthesize support with the UNRECOGNIZED case. - public static var allCases: [TW_Utxo_Proto_SighashType] = [ - .useDefault, - .all, - .none, - .single, - .allPlusAnyoneCanPay, - .nonePlusAnyoneCanPay, - .singlePlusAnyoneCanPay, - ] -} - -#endif // swift(>=4.2) - -public struct TW_Utxo_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The protocol version. - public var version: Int32 = 0 - - /// Block height or timestamp indicating at what point transactions can be - /// included in a block. - public var lockTime: TW_Utxo_Proto_LockTime { - get {return _lockTime ?? TW_Utxo_Proto_LockTime()} - set {_lockTime = newValue} - } - /// Returns true if `lockTime` has been explicitly set. - public var hasLockTime: Bool {return self._lockTime != nil} - /// Clears the value of `lockTime`. Subsequent reads from it will return its default value. - public mutating func clearLockTime() {self._lockTime = nil} - - /// The inputs of the transaction. - public var inputs: [TW_Utxo_Proto_TxIn] = [] - - /// The outputs of the transaction. - public var outputs: [TW_Utxo_Proto_TxOut] = [] - - /// How inputs should be selected. - public var inputSelector: TW_Utxo_Proto_InputSelector = .useAll - - /// The base unit per weight. In the case of Bitcoin, that would refer to - /// satoshis by vbyte ("satVb"). - public var weightBase: UInt64 = 0 - - /// The change output where to send left-over funds to (usually the sender). - public var changeScriptPubkey: Data = Data() - - /// Explicility disable change output creation. - public var disableChangeOutput: Bool = false - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _lockTime: TW_Utxo_Proto_LockTime? = nil -} - -public struct TW_Utxo_Proto_LockTime { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var variant: TW_Utxo_Proto_LockTime.OneOf_Variant? = nil - - public var blocks: UInt32 { - get { - if case .blocks(let v)? = variant {return v} - return 0 - } - set {variant = .blocks(newValue)} - } - - public var seconds: UInt32 { - get { - if case .seconds(let v)? = variant {return v} - return 0 - } - set {variant = .seconds(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_Variant: Equatable { - case blocks(UInt32) - case seconds(UInt32) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Utxo_Proto_LockTime.OneOf_Variant, rhs: TW_Utxo_Proto_LockTime.OneOf_Variant) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.blocks, .blocks): return { - guard case .blocks(let l) = lhs, case .blocks(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.seconds, .seconds): return { - guard case .seconds(let l) = lhs, case .seconds(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -public struct TW_Utxo_Proto_TxIn { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The referenced transaction ID in REVERSED order. - public var txid: Data = Data() - - /// The position in the previous transactions output that this input - /// references. - public var vout: UInt32 = 0 - - /// The value of this input, such as satoshis. Required for producing - /// Segwit/Taproot transactions. - public var value: UInt64 = 0 - - /// The sequence number, used for timelocks, replace-by-fee, etc. Normally - /// this number is simply 4294967295 (0xFFFFFFFF) . - public var sequence: UInt32 = 0 - - /// The spending condition of the referenced output. - public var scriptPubkey: Data = Data() - - /// The sighash type, normally `SighashType::UseDefault` (All). - public var sighashType: TW_Utxo_Proto_SighashType = .useDefault - - /// The signing method. - public var signingMethod: TW_Utxo_Proto_SigningMethod = .legacy - - /// The estimated weight of the input, required for estimating fees. - public var weightEstimate: UInt64 = 0 - - /// If this input is a Taproot script-path (complex transaction), then this - /// leaf hash is required in order to compute the sighash. - public var leafHash: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// The output of a transaction. -public struct TW_Utxo_Proto_TxOut { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The value of the output. - public var value: UInt64 = 0 - - /// The spending condition of the output. - public var scriptPubkey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Utxo_Proto_PreSigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Utxo_Proto_Error = .ok - - /// The transaction ID in NON-reversed order. Note that this must be reversed - /// when referencing in future transactions. - public var txid: Data = Data() - - //// Sighashes to be signed; ECDSA for legacy and Segwit, Schnorr for Taproot. - public var sighashes: [TW_Utxo_Proto_Sighash] = [] - - /// The raw inputs. - public var inputs: [TW_Utxo_Proto_TxIn] = [] - - /// The raw outputs. - public var outputs: [TW_Utxo_Proto_TxOut] = [] - - /// The estimated weight of the transaction. - public var weightEstimate: UInt64 = 0 - - /// The estimated fee of the transaction denominated in the base unit (such - /// as satoshis). - public var feeEstimate: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Utxo_Proto_Sighash { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The sighash to be signed. - public var sighash: Data = Data() - - /// The used signing method for this sighash. - public var signingMethod: TW_Utxo_Proto_SigningMethod = .legacy - - /// The used sighash type for this sighash. - public var sighashType: TW_Utxo_Proto_SighashType = .useDefault - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Utxo_Proto_PreSerialization { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The protocol version, is currently expected to be 1 or 2 (BIP68) - public var version: Int32 = 0 - - /// Block height or timestamp indicating at what point transactions can be - /// included in a block. - public var lockTime: TW_Utxo_Proto_LockTime { - get {return _lockTime ?? TW_Utxo_Proto_LockTime()} - set {_lockTime = newValue} - } - /// Returns true if `lockTime` has been explicitly set. - public var hasLockTime: Bool {return self._lockTime != nil} - /// Clears the value of `lockTime`. Subsequent reads from it will return its default value. - public mutating func clearLockTime() {self._lockTime = nil} - - /// The transaction inputs containing the serialized claim scripts. - public var inputs: [TW_Utxo_Proto_TxInClaim] = [] - - /// The transaction outputs. - public var outputs: [TW_Utxo_Proto_TxOut] = [] - - /// The base unit per weight. In the case of Bitcoin, that would refer to - /// satoshis ("satVb"). - public var weightBase: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _lockTime: TW_Utxo_Proto_LockTime? = nil -} - -public struct TW_Utxo_Proto_TxInClaim { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// The referenced transaction hash. - public var txid: Data = Data() - - /// The index of the referenced output. - public var vout: UInt32 = 0 - - /// The sequence number (TODO). - public var sequence: UInt32 = 0 - - /// The script used for claiming an input. - public var scriptSig: Data = Data() - - /// The script used for claiming an input. - public var witnessItems: [Data] = [] - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -public struct TW_Utxo_Proto_SerializedTransaction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Utxo_Proto_Error = .ok - - /// The encoded transaction, ready to be submitted to the network. - public var encoded: Data = Data() - - /// The transaction ID. - public var txid: Data = Data() - - /// The total and final weight of the transaction. - public var weight: UInt64 = 0 - - /// The total and final fee of the transaction denominated in the base unit - /// (such as satoshis). - public var fee: UInt64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Utxo.Proto" - -extension TW_Utxo_Proto_Error: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "OK"), - 1: .same(proto: "Error_invalid_leaf_hash"), - 2: .same(proto: "Error_invalid_sighash_type"), - 3: .same(proto: "Error_invalid_lock_time"), - 4: .same(proto: "Error_invalid_txid"), - 5: .same(proto: "Error_sighash_failed"), - 6: .same(proto: "Error_missing_sighash_method"), - 7: .same(proto: "Error_failed_encoding"), - 8: .same(proto: "Error_insufficient_inputs"), - 9: .same(proto: "Error_missing_change_script_pubkey"), - ] -} - -extension TW_Utxo_Proto_InputSelector: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UseAll"), - 1: .same(proto: "SelectInOrder"), - 2: .same(proto: "SelectAscending"), - ] -} - -extension TW_Utxo_Proto_SigningMethod: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "Legacy"), - 1: .same(proto: "Segwit"), - 2: .same(proto: "TaprootAll"), - 3: .same(proto: "TaprootOnePrevout"), - ] -} - -extension TW_Utxo_Proto_SighashType: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "UseDefault"), - 1: .same(proto: "All"), - 2: .same(proto: "None"), - 3: .same(proto: "Single"), - 129: .same(proto: "AllPlusAnyoneCanPay"), - 130: .same(proto: "NonePlusAnyoneCanPay"), - 131: .same(proto: "SinglePlusAnyoneCanPay"), - ] -} - -extension TW_Utxo_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "version"), - 2: .standard(proto: "lock_time"), - 3: .same(proto: "inputs"), - 4: .same(proto: "outputs"), - 5: .standard(proto: "input_selector"), - 6: .standard(proto: "weight_base"), - 7: .standard(proto: "change_script_pubkey"), - 8: .standard(proto: "disable_change_output"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self.version) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._lockTime) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.inputs) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.outputs) }() - case 5: try { try decoder.decodeSingularEnumField(value: &self.inputSelector) }() - case 6: try { try decoder.decodeSingularUInt64Field(value: &self.weightBase) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.changeScriptPubkey) }() - case 8: try { try decoder.decodeSingularBoolField(value: &self.disableChangeOutput) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.version != 0 { - try visitor.visitSingularInt32Field(value: self.version, fieldNumber: 1) - } - try { if let v = self._lockTime { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - if !self.inputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 3) - } - if !self.outputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 4) - } - if self.inputSelector != .useAll { - try visitor.visitSingularEnumField(value: self.inputSelector, fieldNumber: 5) - } - if self.weightBase != 0 { - try visitor.visitSingularUInt64Field(value: self.weightBase, fieldNumber: 6) - } - if !self.changeScriptPubkey.isEmpty { - try visitor.visitSingularBytesField(value: self.changeScriptPubkey, fieldNumber: 7) - } - if self.disableChangeOutput != false { - try visitor.visitSingularBoolField(value: self.disableChangeOutput, fieldNumber: 8) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Utxo_Proto_SigningInput, rhs: TW_Utxo_Proto_SigningInput) -> Bool { - if lhs.version != rhs.version {return false} - if lhs._lockTime != rhs._lockTime {return false} - if lhs.inputs != rhs.inputs {return false} - if lhs.outputs != rhs.outputs {return false} - if lhs.inputSelector != rhs.inputSelector {return false} - if lhs.weightBase != rhs.weightBase {return false} - if lhs.changeScriptPubkey != rhs.changeScriptPubkey {return false} - if lhs.disableChangeOutput != rhs.disableChangeOutput {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Utxo_Proto_LockTime: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".LockTime" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "blocks"), - 2: .same(proto: "seconds"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: UInt32? - try decoder.decodeSingularUInt32Field(value: &v) - if let v = v { - if self.variant != nil {try decoder.handleConflictingOneOf()} - self.variant = .blocks(v) - } - }() - case 2: try { - var v: UInt32? - try decoder.decodeSingularUInt32Field(value: &v) - if let v = v { - if self.variant != nil {try decoder.handleConflictingOneOf()} - self.variant = .seconds(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.variant { - case .blocks?: try { - guard case .blocks(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularUInt32Field(value: v, fieldNumber: 1) - }() - case .seconds?: try { - guard case .seconds(let v)? = self.variant else { preconditionFailure() } - try visitor.visitSingularUInt32Field(value: v, fieldNumber: 2) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Utxo_Proto_LockTime, rhs: TW_Utxo_Proto_LockTime) -> Bool { - if lhs.variant != rhs.variant {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Utxo_Proto_TxIn: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TxIn" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "txid"), - 2: .same(proto: "vout"), - 3: .same(proto: "value"), - 4: .same(proto: "sequence"), - 7: .standard(proto: "script_pubkey"), - 8: .standard(proto: "sighash_type"), - 9: .standard(proto: "signing_method"), - 10: .standard(proto: "weight_estimate"), - 11: .standard(proto: "leaf_hash"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.txid) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.vout) }() - case 3: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() - case 4: try { try decoder.decodeSingularUInt32Field(value: &self.sequence) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.scriptPubkey) }() - case 8: try { try decoder.decodeSingularEnumField(value: &self.sighashType) }() - case 9: try { try decoder.decodeSingularEnumField(value: &self.signingMethod) }() - case 10: try { try decoder.decodeSingularUInt64Field(value: &self.weightEstimate) }() - case 11: try { try decoder.decodeSingularBytesField(value: &self.leafHash) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.txid.isEmpty { - try visitor.visitSingularBytesField(value: self.txid, fieldNumber: 1) - } - if self.vout != 0 { - try visitor.visitSingularUInt32Field(value: self.vout, fieldNumber: 2) - } - if self.value != 0 { - try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 3) - } - if self.sequence != 0 { - try visitor.visitSingularUInt32Field(value: self.sequence, fieldNumber: 4) - } - if !self.scriptPubkey.isEmpty { - try visitor.visitSingularBytesField(value: self.scriptPubkey, fieldNumber: 7) - } - if self.sighashType != .useDefault { - try visitor.visitSingularEnumField(value: self.sighashType, fieldNumber: 8) - } - if self.signingMethod != .legacy { - try visitor.visitSingularEnumField(value: self.signingMethod, fieldNumber: 9) - } - if self.weightEstimate != 0 { - try visitor.visitSingularUInt64Field(value: self.weightEstimate, fieldNumber: 10) - } - if !self.leafHash.isEmpty { - try visitor.visitSingularBytesField(value: self.leafHash, fieldNumber: 11) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Utxo_Proto_TxIn, rhs: TW_Utxo_Proto_TxIn) -> Bool { - if lhs.txid != rhs.txid {return false} - if lhs.vout != rhs.vout {return false} - if lhs.value != rhs.value {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.scriptPubkey != rhs.scriptPubkey {return false} - if lhs.sighashType != rhs.sighashType {return false} - if lhs.signingMethod != rhs.signingMethod {return false} - if lhs.weightEstimate != rhs.weightEstimate {return false} - if lhs.leafHash != rhs.leafHash {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Utxo_Proto_TxOut: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TxOut" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - 2: .standard(proto: "script_pubkey"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.scriptPubkey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.value != 0 { - try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 1) - } - if !self.scriptPubkey.isEmpty { - try visitor.visitSingularBytesField(value: self.scriptPubkey, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Utxo_Proto_TxOut, rhs: TW_Utxo_Proto_TxOut) -> Bool { - if lhs.value != rhs.value {return false} - if lhs.scriptPubkey != rhs.scriptPubkey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Utxo_Proto_PreSigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".PreSigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "error"), - 2: .same(proto: "txid"), - 3: .same(proto: "sighashes"), - 4: .same(proto: "inputs"), - 5: .same(proto: "outputs"), - 6: .standard(proto: "weight_estimate"), - 7: .standard(proto: "fee_estimate"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.txid) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.sighashes) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.inputs) }() - case 5: try { try decoder.decodeRepeatedMessageField(value: &self.outputs) }() - case 6: try { try decoder.decodeSingularUInt64Field(value: &self.weightEstimate) }() - case 7: try { try decoder.decodeSingularUInt64Field(value: &self.feeEstimate) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 1) - } - if !self.txid.isEmpty { - try visitor.visitSingularBytesField(value: self.txid, fieldNumber: 2) - } - if !self.sighashes.isEmpty { - try visitor.visitRepeatedMessageField(value: self.sighashes, fieldNumber: 3) - } - if !self.inputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 4) - } - if !self.outputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 5) - } - if self.weightEstimate != 0 { - try visitor.visitSingularUInt64Field(value: self.weightEstimate, fieldNumber: 6) - } - if self.feeEstimate != 0 { - try visitor.visitSingularUInt64Field(value: self.feeEstimate, fieldNumber: 7) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Utxo_Proto_PreSigningOutput, rhs: TW_Utxo_Proto_PreSigningOutput) -> Bool { - if lhs.error != rhs.error {return false} - if lhs.txid != rhs.txid {return false} - if lhs.sighashes != rhs.sighashes {return false} - if lhs.inputs != rhs.inputs {return false} - if lhs.outputs != rhs.outputs {return false} - if lhs.weightEstimate != rhs.weightEstimate {return false} - if lhs.feeEstimate != rhs.feeEstimate {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Utxo_Proto_Sighash: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Sighash" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "sighash"), - 2: .standard(proto: "signing_method"), - 3: .standard(proto: "sighash_type"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.sighash) }() - case 2: try { try decoder.decodeSingularEnumField(value: &self.signingMethod) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.sighashType) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.sighash.isEmpty { - try visitor.visitSingularBytesField(value: self.sighash, fieldNumber: 1) - } - if self.signingMethod != .legacy { - try visitor.visitSingularEnumField(value: self.signingMethod, fieldNumber: 2) - } - if self.sighashType != .useDefault { - try visitor.visitSingularEnumField(value: self.sighashType, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Utxo_Proto_Sighash, rhs: TW_Utxo_Proto_Sighash) -> Bool { - if lhs.sighash != rhs.sighash {return false} - if lhs.signingMethod != rhs.signingMethod {return false} - if lhs.sighashType != rhs.sighashType {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Utxo_Proto_PreSerialization: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".PreSerialization" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "version"), - 2: .standard(proto: "lock_time"), - 3: .same(proto: "inputs"), - 4: .same(proto: "outputs"), - 5: .standard(proto: "weight_base"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self.version) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._lockTime) }() - case 3: try { try decoder.decodeRepeatedMessageField(value: &self.inputs) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.outputs) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.weightBase) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.version != 0 { - try visitor.visitSingularInt32Field(value: self.version, fieldNumber: 1) - } - try { if let v = self._lockTime { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - if !self.inputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 3) - } - if !self.outputs.isEmpty { - try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 4) - } - if self.weightBase != 0 { - try visitor.visitSingularUInt64Field(value: self.weightBase, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Utxo_Proto_PreSerialization, rhs: TW_Utxo_Proto_PreSerialization) -> Bool { - if lhs.version != rhs.version {return false} - if lhs._lockTime != rhs._lockTime {return false} - if lhs.inputs != rhs.inputs {return false} - if lhs.outputs != rhs.outputs {return false} - if lhs.weightBase != rhs.weightBase {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Utxo_Proto_TxInClaim: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TxInClaim" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "txid"), - 2: .same(proto: "vout"), - 3: .same(proto: "sequence"), - 4: .standard(proto: "script_sig"), - 5: .standard(proto: "witness_items"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.txid) }() - case 2: try { try decoder.decodeSingularUInt32Field(value: &self.vout) }() - case 3: try { try decoder.decodeSingularUInt32Field(value: &self.sequence) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.scriptSig) }() - case 5: try { try decoder.decodeRepeatedBytesField(value: &self.witnessItems) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.txid.isEmpty { - try visitor.visitSingularBytesField(value: self.txid, fieldNumber: 1) - } - if self.vout != 0 { - try visitor.visitSingularUInt32Field(value: self.vout, fieldNumber: 2) - } - if self.sequence != 0 { - try visitor.visitSingularUInt32Field(value: self.sequence, fieldNumber: 3) - } - if !self.scriptSig.isEmpty { - try visitor.visitSingularBytesField(value: self.scriptSig, fieldNumber: 4) - } - if !self.witnessItems.isEmpty { - try visitor.visitRepeatedBytesField(value: self.witnessItems, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Utxo_Proto_TxInClaim, rhs: TW_Utxo_Proto_TxInClaim) -> Bool { - if lhs.txid != rhs.txid {return false} - if lhs.vout != rhs.vout {return false} - if lhs.sequence != rhs.sequence {return false} - if lhs.scriptSig != rhs.scriptSig {return false} - if lhs.witnessItems != rhs.witnessItems {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Utxo_Proto_SerializedTransaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SerializedTransaction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "error"), - 2: .same(proto: "encoded"), - 3: .same(proto: "txid"), - 4: .same(proto: "weight"), - 5: .same(proto: "fee"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.txid) }() - case 4: try { try decoder.decodeSingularUInt64Field(value: &self.weight) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.fee) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 1) - } - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 2) - } - if !self.txid.isEmpty { - try visitor.visitSingularBytesField(value: self.txid, fieldNumber: 3) - } - if self.weight != 0 { - try visitor.visitSingularUInt64Field(value: self.weight, fieldNumber: 4) - } - if self.fee != 0 { - try visitor.visitSingularUInt64Field(value: self.fee, fieldNumber: 5) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Utxo_Proto_SerializedTransaction, rhs: TW_Utxo_Proto_SerializedTransaction) -> Bool { - if lhs.error != rhs.error {return false} - if lhs.encoded != rhs.encoded {return false} - if lhs.txid != rhs.txid {return false} - if lhs.weight != rhs.weight {return false} - if lhs.fee != rhs.fee {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/VeChain+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/VeChain+Proto.swift deleted file mode 100644 index d1c6934a..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/VeChain+Proto.swift +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias VeChainClause = TW_VeChain_Proto_Clause -public typealias VeChainSigningInput = TW_VeChain_Proto_SigningInput -public typealias VeChainSigningOutput = TW_VeChain_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/VeChain.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/VeChain.pb.swift deleted file mode 100644 index 687a0622..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/VeChain.pb.swift +++ /dev/null @@ -1,283 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: VeChain.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// A clause, between a sender and destination -public struct TW_VeChain_Proto_Clause { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - //// Recipient address. - public var to: String = String() - - //// Transaction amount (uint256, serialized little endian) - public var value: Data = Data() - - //// Payload data. - public var data: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_VeChain_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - //// Last byte of the genesis block ID which is used to identify a blockchain to prevent the cross-chain replay attack. - public var chainTag: UInt32 = 0 - - //// Reference to a specific block. - public var blockRef: UInt64 = 0 - - //// How long, in terms of the number of blocks, the transaction will be allowed to be mined in VeChainThor. - public var expiration: UInt32 = 0 - - //// An array of Clause objects. - //// - //// Each clause contains fields To, Value and Data to enable a single transaction to carry multiple tasks issued - //// by the transaction sender. - public var clauses: [TW_VeChain_Proto_Clause] = [] - - //// Coefficient used to calculate the gas price for the transaction. - public var gasPriceCoef: UInt32 = 0 - - //// Maximum amount of gas allowed to pay for the transaction. - public var gas: UInt64 = 0 - - //// ID of the transaction on which the current transaction depends. - public var dependsOn: Data = Data() - - //// Number set by user. - public var nonce: UInt64 = 0 - - //// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_VeChain_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed and encoded transaction bytes. - public var encoded: Data = Data() - - /// Signature. - public var signature: Data = Data() - - /// error code, 0 is ok, other codes will be treated as errors - public var error: TW_Common_Proto_SigningError = .ok - - /// error code description - public var errorMessage: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.VeChain.Proto" - -extension TW_VeChain_Proto_Clause: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Clause" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "to"), - 2: .same(proto: "value"), - 3: .same(proto: "data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.value) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.data) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 1) - } - if !self.value.isEmpty { - try visitor.visitSingularBytesField(value: self.value, fieldNumber: 2) - } - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_VeChain_Proto_Clause, rhs: TW_VeChain_Proto_Clause) -> Bool { - if lhs.to != rhs.to {return false} - if lhs.value != rhs.value {return false} - if lhs.data != rhs.data {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_VeChain_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "chain_tag"), - 2: .standard(proto: "block_ref"), - 3: .same(proto: "expiration"), - 4: .same(proto: "clauses"), - 5: .standard(proto: "gas_price_coef"), - 6: .same(proto: "gas"), - 7: .standard(proto: "depends_on"), - 8: .same(proto: "nonce"), - 9: .standard(proto: "private_key"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &self.chainTag) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.blockRef) }() - case 3: try { try decoder.decodeSingularUInt32Field(value: &self.expiration) }() - case 4: try { try decoder.decodeRepeatedMessageField(value: &self.clauses) }() - case 5: try { try decoder.decodeSingularUInt32Field(value: &self.gasPriceCoef) }() - case 6: try { try decoder.decodeSingularUInt64Field(value: &self.gas) }() - case 7: try { try decoder.decodeSingularBytesField(value: &self.dependsOn) }() - case 8: try { try decoder.decodeSingularUInt64Field(value: &self.nonce) }() - case 9: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.chainTag != 0 { - try visitor.visitSingularUInt32Field(value: self.chainTag, fieldNumber: 1) - } - if self.blockRef != 0 { - try visitor.visitSingularUInt64Field(value: self.blockRef, fieldNumber: 2) - } - if self.expiration != 0 { - try visitor.visitSingularUInt32Field(value: self.expiration, fieldNumber: 3) - } - if !self.clauses.isEmpty { - try visitor.visitRepeatedMessageField(value: self.clauses, fieldNumber: 4) - } - if self.gasPriceCoef != 0 { - try visitor.visitSingularUInt32Field(value: self.gasPriceCoef, fieldNumber: 5) - } - if self.gas != 0 { - try visitor.visitSingularUInt64Field(value: self.gas, fieldNumber: 6) - } - if !self.dependsOn.isEmpty { - try visitor.visitSingularBytesField(value: self.dependsOn, fieldNumber: 7) - } - if self.nonce != 0 { - try visitor.visitSingularUInt64Field(value: self.nonce, fieldNumber: 8) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 9) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_VeChain_Proto_SigningInput, rhs: TW_VeChain_Proto_SigningInput) -> Bool { - if lhs.chainTag != rhs.chainTag {return false} - if lhs.blockRef != rhs.blockRef {return false} - if lhs.expiration != rhs.expiration {return false} - if lhs.clauses != rhs.clauses {return false} - if lhs.gasPriceCoef != rhs.gasPriceCoef {return false} - if lhs.gas != rhs.gas {return false} - if lhs.dependsOn != rhs.dependsOn {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_VeChain_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "encoded"), - 2: .same(proto: "signature"), - 3: .same(proto: "error"), - 4: .standard(proto: "error_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.encoded) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 3: try { try decoder.decodeSingularEnumField(value: &self.error) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.encoded.isEmpty { - try visitor.visitSingularBytesField(value: self.encoded, fieldNumber: 1) - } - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 2) - } - if self.error != .ok { - try visitor.visitSingularEnumField(value: self.error, fieldNumber: 3) - } - if !self.errorMessage.isEmpty { - try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 4) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_VeChain_Proto_SigningOutput, rhs: TW_VeChain_Proto_SigningOutput) -> Bool { - if lhs.encoded != rhs.encoded {return false} - if lhs.signature != rhs.signature {return false} - if lhs.error != rhs.error {return false} - if lhs.errorMessage != rhs.errorMessage {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Waves+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Waves+Proto.swift deleted file mode 100644 index de42a65e..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Waves+Proto.swift +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias WavesTransferMessage = TW_Waves_Proto_TransferMessage -public typealias WavesLeaseMessage = TW_Waves_Proto_LeaseMessage -public typealias WavesCancelLeaseMessage = TW_Waves_Proto_CancelLeaseMessage -public typealias WavesSigningInput = TW_Waves_Proto_SigningInput -public typealias WavesSigningOutput = TW_Waves_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Waves.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Waves.pb.swift deleted file mode 100644 index fa54f5eb..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Waves.pb.swift +++ /dev/null @@ -1,464 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Waves.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Transfer transaction -public struct TW_Waves_Proto_TransferMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// amount - public var amount: Int64 = 0 - - /// asset ID - public var asset: String = String() - - /// minimum 0.001 Waves (100000 Wavelets) for now - public var fee: Int64 = 0 - - /// asset of the fee - public var feeAsset: String = String() - - /// destination address - public var to: String = String() - - /// any 140 bytes payload, will be displayed to the client as utf-8 string - public var attachment: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Lease transaction -public struct TW_Waves_Proto_LeaseMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// amount - public var amount: Int64 = 0 - - /// destination - public var to: String = String() - - /// minimum 0.001 Waves (100000 Wavelets) for now - public var fee: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Cancel Lease transaction -public struct TW_Waves_Proto_CancelLeaseMessage { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Lease ID to cancel - public var leaseID: String = String() - - /// Fee used - public var fee: Int64 = 0 - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Waves_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// in millis - public var timestamp: Int64 = 0 - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// Payload message - public var messageOneof: TW_Waves_Proto_SigningInput.OneOf_MessageOneof? = nil - - public var transferMessage: TW_Waves_Proto_TransferMessage { - get { - if case .transferMessage(let v)? = messageOneof {return v} - return TW_Waves_Proto_TransferMessage() - } - set {messageOneof = .transferMessage(newValue)} - } - - public var leaseMessage: TW_Waves_Proto_LeaseMessage { - get { - if case .leaseMessage(let v)? = messageOneof {return v} - return TW_Waves_Proto_LeaseMessage() - } - set {messageOneof = .leaseMessage(newValue)} - } - - public var cancelLeaseMessage: TW_Waves_Proto_CancelLeaseMessage { - get { - if case .cancelLeaseMessage(let v)? = messageOneof {return v} - return TW_Waves_Proto_CancelLeaseMessage() - } - set {messageOneof = .cancelLeaseMessage(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - /// Payload message - public enum OneOf_MessageOneof: Equatable { - case transferMessage(TW_Waves_Proto_TransferMessage) - case leaseMessage(TW_Waves_Proto_LeaseMessage) - case cancelLeaseMessage(TW_Waves_Proto_CancelLeaseMessage) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Waves_Proto_SigningInput.OneOf_MessageOneof, rhs: TW_Waves_Proto_SigningInput.OneOf_MessageOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transferMessage, .transferMessage): return { - guard case .transferMessage(let l) = lhs, case .transferMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.leaseMessage, .leaseMessage): return { - guard case .leaseMessage(let l) = lhs, case .leaseMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.cancelLeaseMessage, .cancelLeaseMessage): return { - guard case .cancelLeaseMessage(let l) = lhs, case .cancelLeaseMessage(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - public init() {} -} - -/// Result containing the signed and encoded transaction. -public struct TW_Waves_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// signature data - public var signature: Data = Data() - - /// transaction in JSON format - public var json: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Waves.Proto" - -extension TW_Waves_Proto_TransferMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".TransferMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - 2: .same(proto: "asset"), - 3: .same(proto: "fee"), - 4: .standard(proto: "fee_asset"), - 5: .same(proto: "to"), - 6: .same(proto: "attachment"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.asset) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.fee) }() - case 4: try { try decoder.decodeSingularStringField(value: &self.feeAsset) }() - case 5: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.attachment) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 1) - } - if !self.asset.isEmpty { - try visitor.visitSingularStringField(value: self.asset, fieldNumber: 2) - } - if self.fee != 0 { - try visitor.visitSingularInt64Field(value: self.fee, fieldNumber: 3) - } - if !self.feeAsset.isEmpty { - try visitor.visitSingularStringField(value: self.feeAsset, fieldNumber: 4) - } - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 5) - } - if !self.attachment.isEmpty { - try visitor.visitSingularBytesField(value: self.attachment, fieldNumber: 6) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Waves_Proto_TransferMessage, rhs: TW_Waves_Proto_TransferMessage) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.asset != rhs.asset {return false} - if lhs.fee != rhs.fee {return false} - if lhs.feeAsset != rhs.feeAsset {return false} - if lhs.to != rhs.to {return false} - if lhs.attachment != rhs.attachment {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Waves_Proto_LeaseMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".LeaseMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - 2: .same(proto: "to"), - 3: .same(proto: "fee"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.amount) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 3: try { try decoder.decodeSingularInt64Field(value: &self.fee) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if self.amount != 0 { - try visitor.visitSingularInt64Field(value: self.amount, fieldNumber: 1) - } - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 2) - } - if self.fee != 0 { - try visitor.visitSingularInt64Field(value: self.fee, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Waves_Proto_LeaseMessage, rhs: TW_Waves_Proto_LeaseMessage) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.to != rhs.to {return false} - if lhs.fee != rhs.fee {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Waves_Proto_CancelLeaseMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".CancelLeaseMessage" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "lease_id"), - 2: .same(proto: "fee"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.leaseID) }() - case 2: try { try decoder.decodeSingularInt64Field(value: &self.fee) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.leaseID.isEmpty { - try visitor.visitSingularStringField(value: self.leaseID, fieldNumber: 1) - } - if self.fee != 0 { - try visitor.visitSingularInt64Field(value: self.fee, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Waves_Proto_CancelLeaseMessage, rhs: TW_Waves_Proto_CancelLeaseMessage) -> Bool { - if lhs.leaseID != rhs.leaseID {return false} - if lhs.fee != rhs.fee {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Waves_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "timestamp"), - 2: .standard(proto: "private_key"), - 3: .standard(proto: "transfer_message"), - 4: .standard(proto: "lease_message"), - 5: .standard(proto: "cancel_lease_message"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt64Field(value: &self.timestamp) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 3: try { - var v: TW_Waves_Proto_TransferMessage? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .transferMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .transferMessage(v) - } - }() - case 4: try { - var v: TW_Waves_Proto_LeaseMessage? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .leaseMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .leaseMessage(v) - } - }() - case 5: try { - var v: TW_Waves_Proto_CancelLeaseMessage? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .cancelLeaseMessage(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .cancelLeaseMessage(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.timestamp != 0 { - try visitor.visitSingularInt64Field(value: self.timestamp, fieldNumber: 1) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 2) - } - switch self.messageOneof { - case .transferMessage?: try { - guard case .transferMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - }() - case .leaseMessage?: try { - guard case .leaseMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - }() - case .cancelLeaseMessage?: try { - guard case .cancelLeaseMessage(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Waves_Proto_SigningInput, rhs: TW_Waves_Proto_SigningInput) -> Bool { - if lhs.timestamp != rhs.timestamp {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs.messageOneof != rhs.messageOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Waves_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "signature"), - 2: .same(proto: "json"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.json) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 1) - } - if !self.json.isEmpty { - try visitor.visitSingularStringField(value: self.json, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Waves_Proto_SigningOutput, rhs: TW_Waves_Proto_SigningOutput) -> Bool { - if lhs.signature != rhs.signature {return false} - if lhs.json != rhs.json {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Zilliqa+Proto.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Zilliqa+Proto.swift deleted file mode 100644 index 96d9366f..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Zilliqa+Proto.swift +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -public typealias ZilliqaTransaction = TW_Zilliqa_Proto_Transaction -public typealias ZilliqaSigningInput = TW_Zilliqa_Proto_SigningInput -public typealias ZilliqaSigningOutput = TW_Zilliqa_Proto_SigningOutput diff --git a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Zilliqa.pb.swift b/Pods/TrustWalletCore/Sources/Generated/Protobuf/Zilliqa.pb.swift deleted file mode 100644 index bb3bd6b5..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/Protobuf/Zilliqa.pb.swift +++ /dev/null @@ -1,426 +0,0 @@ -// DO NOT EDIT. -// swift-format-ignore-file -// -// Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: Zilliqa.proto -// -// For information on using the generated types, please see the documentation: -// https://github.com/apple/swift-protobuf/ - -import Foundation -import SwiftProtobuf - -// If the compiler emits an error on this type, it is because this file -// was generated by a version of the `protoc` Swift plug-in that is -// incompatible with the version of SwiftProtobuf to which you are linking. -// Please ensure that you are building against the same version of the API -// that was used to generate this file. -fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} - typealias Version = _2 -} - -/// Generic transaction -public struct TW_Zilliqa_Proto_Transaction { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - public var messageOneof: TW_Zilliqa_Proto_Transaction.OneOf_MessageOneof? = nil - - public var transfer: TW_Zilliqa_Proto_Transaction.Transfer { - get { - if case .transfer(let v)? = messageOneof {return v} - return TW_Zilliqa_Proto_Transaction.Transfer() - } - set {messageOneof = .transfer(newValue)} - } - - public var rawTransaction: TW_Zilliqa_Proto_Transaction.Raw { - get { - if case .rawTransaction(let v)? = messageOneof {return v} - return TW_Zilliqa_Proto_Transaction.Raw() - } - set {messageOneof = .rawTransaction(newValue)} - } - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public enum OneOf_MessageOneof: Equatable { - case transfer(TW_Zilliqa_Proto_Transaction.Transfer) - case rawTransaction(TW_Zilliqa_Proto_Transaction.Raw) - - #if !swift(>=4.1) - public static func ==(lhs: TW_Zilliqa_Proto_Transaction.OneOf_MessageOneof, rhs: TW_Zilliqa_Proto_Transaction.OneOf_MessageOneof) -> Bool { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch (lhs, rhs) { - case (.transfer, .transfer): return { - guard case .transfer(let l) = lhs, case .transfer(let r) = rhs else { preconditionFailure() } - return l == r - }() - case (.rawTransaction, .rawTransaction): return { - guard case .rawTransaction(let l) = lhs, case .rawTransaction(let r) = rhs else { preconditionFailure() } - return l == r - }() - default: return false - } - } - #endif - } - - /// Transfer transaction - public struct Transfer { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Amount to send (uint256, serialized little endian) - public var amount: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - /// Generic contract call - public struct Raw { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Amount to send (uint256, serialized little endian) - public var amount: Data = Data() - - /// Smart contract code - public var code: Data = Data() - - /// String-ified JSON object specifying the transition parameter - public var data: Data = Data() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - } - - public init() {} -} - -/// Input data necessary to create a signed transaction. -public struct TW_Zilliqa_Proto_SigningInput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Transaction version - public var version: UInt32 = 0 - - /// Nonce - public var nonce: UInt64 = 0 - - /// Recipient's address. - public var to: String = String() - - /// GasPrice (256-bit number) - public var gasPrice: Data = Data() - - /// GasLimit - public var gasLimit: UInt64 = 0 - - /// The secret private key used for signing (32 bytes). - public var privateKey: Data = Data() - - /// The payload transaction - public var transaction: TW_Zilliqa_Proto_Transaction { - get {return _transaction ?? TW_Zilliqa_Proto_Transaction()} - set {_transaction = newValue} - } - /// Returns true if `transaction` has been explicitly set. - public var hasTransaction: Bool {return self._transaction != nil} - /// Clears the value of `transaction`. Subsequent reads from it will return its default value. - public mutating func clearTransaction() {self._transaction = nil} - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} - - fileprivate var _transaction: TW_Zilliqa_Proto_Transaction? = nil -} - -/// Result containing the signed and encoded transaction. -public struct TW_Zilliqa_Proto_SigningOutput { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - /// Signed signature bytes. - public var signature: Data = Data() - - /// JSON transaction with signature - public var json: String = String() - - public var unknownFields = SwiftProtobuf.UnknownStorage() - - public init() {} -} - -// MARK: - Code below here is support for the SwiftProtobuf runtime. - -fileprivate let _protobuf_package = "TW.Zilliqa.Proto" - -extension TW_Zilliqa_Proto_Transaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".Transaction" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "transfer"), - 2: .standard(proto: "raw_transaction"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { - var v: TW_Zilliqa_Proto_Transaction.Transfer? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .transfer(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .transfer(v) - } - }() - case 2: try { - var v: TW_Zilliqa_Proto_Transaction.Raw? - var hadOneofValue = false - if let current = self.messageOneof { - hadOneofValue = true - if case .rawTransaction(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.messageOneof = .rawTransaction(v) - } - }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - switch self.messageOneof { - case .transfer?: try { - guard case .transfer(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 1) - }() - case .rawTransaction?: try { - guard case .rawTransaction(let v)? = self.messageOneof else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - }() - case nil: break - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Zilliqa_Proto_Transaction, rhs: TW_Zilliqa_Proto_Transaction) -> Bool { - if lhs.messageOneof != rhs.messageOneof {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Zilliqa_Proto_Transaction.Transfer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Zilliqa_Proto_Transaction.protoMessageName + ".Transfer" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Zilliqa_Proto_Transaction.Transfer, rhs: TW_Zilliqa_Proto_Transaction.Transfer) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Zilliqa_Proto_Transaction.Raw: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = TW_Zilliqa_Proto_Transaction.protoMessageName + ".Raw" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "amount"), - 2: .same(proto: "code"), - 3: .same(proto: "data"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.amount) }() - case 2: try { try decoder.decodeSingularBytesField(value: &self.code) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self.data) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.amount.isEmpty { - try visitor.visitSingularBytesField(value: self.amount, fieldNumber: 1) - } - if !self.code.isEmpty { - try visitor.visitSingularBytesField(value: self.code, fieldNumber: 2) - } - if !self.data.isEmpty { - try visitor.visitSingularBytesField(value: self.data, fieldNumber: 3) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Zilliqa_Proto_Transaction.Raw, rhs: TW_Zilliqa_Proto_Transaction.Raw) -> Bool { - if lhs.amount != rhs.amount {return false} - if lhs.code != rhs.code {return false} - if lhs.data != rhs.data {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Zilliqa_Proto_SigningInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningInput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "version"), - 2: .same(proto: "nonce"), - 3: .same(proto: "to"), - 4: .standard(proto: "gas_price"), - 5: .standard(proto: "gas_limit"), - 6: .standard(proto: "private_key"), - 7: .same(proto: "transaction"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularUInt32Field(value: &self.version) }() - case 2: try { try decoder.decodeSingularUInt64Field(value: &self.nonce) }() - case 3: try { try decoder.decodeSingularStringField(value: &self.to) }() - case 4: try { try decoder.decodeSingularBytesField(value: &self.gasPrice) }() - case 5: try { try decoder.decodeSingularUInt64Field(value: &self.gasLimit) }() - case 6: try { try decoder.decodeSingularBytesField(value: &self.privateKey) }() - case 7: try { try decoder.decodeSingularMessageField(value: &self._transaction) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if self.version != 0 { - try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 1) - } - if self.nonce != 0 { - try visitor.visitSingularUInt64Field(value: self.nonce, fieldNumber: 2) - } - if !self.to.isEmpty { - try visitor.visitSingularStringField(value: self.to, fieldNumber: 3) - } - if !self.gasPrice.isEmpty { - try visitor.visitSingularBytesField(value: self.gasPrice, fieldNumber: 4) - } - if self.gasLimit != 0 { - try visitor.visitSingularUInt64Field(value: self.gasLimit, fieldNumber: 5) - } - if !self.privateKey.isEmpty { - try visitor.visitSingularBytesField(value: self.privateKey, fieldNumber: 6) - } - try { if let v = self._transaction { - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Zilliqa_Proto_SigningInput, rhs: TW_Zilliqa_Proto_SigningInput) -> Bool { - if lhs.version != rhs.version {return false} - if lhs.nonce != rhs.nonce {return false} - if lhs.to != rhs.to {return false} - if lhs.gasPrice != rhs.gasPrice {return false} - if lhs.gasLimit != rhs.gasLimit {return false} - if lhs.privateKey != rhs.privateKey {return false} - if lhs._transaction != rhs._transaction {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension TW_Zilliqa_Proto_SigningOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - public static let protoMessageName: String = _protobuf_package + ".SigningOutput" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "signature"), - 2: .same(proto: "json"), - ] - - public mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBytesField(value: &self.signature) }() - case 2: try { try decoder.decodeSingularStringField(value: &self.json) }() - default: break - } - } - } - - public func traverse(visitor: inout V) throws { - if !self.signature.isEmpty { - try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 1) - } - if !self.json.isEmpty { - try visitor.visitSingularStringField(value: self.json, fieldNumber: 2) - } - try unknownFields.traverse(visitor: &visitor) - } - - public static func ==(lhs: TW_Zilliqa_Proto_SigningOutput, rhs: TW_Zilliqa_Proto_SigningOutput) -> Bool { - if lhs.signature != rhs.signature {return false} - if lhs.json != rhs.json {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} diff --git a/Pods/TrustWalletCore/Sources/Generated/PublicKey.swift b/Pods/TrustWalletCore/Sources/Generated/PublicKey.swift deleted file mode 100644 index bd84da5e..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/PublicKey.swift +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents a public key. -public final class PublicKey { - - /// Determines if the given public key is valid or not - /// - /// - Parameter data: Non-null block of data representing the public key - /// - Parameter type: type of the public key - /// - Returns: true if the block of data is a valid public key, false otherwise - public static func isValid(data: Data, type: PublicKeyType) -> Bool { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - return TWPublicKeyIsValid(dataData, TWPublicKeyType(rawValue: type.rawValue)) - } - - /// Try to get a public key from a given signature and a message - /// - /// - Parameter signature: Non-null pointer to a block of data corresponding to the signature - /// - Parameter message: Non-null pointer to a block of data corresponding to the message - /// - Returns: Null pointer if the public key can't be recover from the given signature and message, - /// pointer to the public key otherwise - public static func recover(signature: Data, message: Data) -> PublicKey? { - let signatureData = TWDataCreateWithNSData(signature) - defer { - TWDataDelete(signatureData) - } - let messageData = TWDataCreateWithNSData(message) - defer { - TWDataDelete(messageData) - } - guard let value = TWPublicKeyRecover(signatureData, messageData) else { - return nil - } - return PublicKey(rawValue: value) - } - - /// Determines if the given public key is compressed or not - /// - /// - Parameter pk: Non-null pointer to a public key - /// - Returns: true if the public key is compressed, false otherwise - public var isCompressed: Bool { - return TWPublicKeyIsCompressed(rawValue) - } - - /// Give the compressed public key of the given non-compressed public key - /// - /// - Parameter from: Non-null pointer to a non-compressed public key - /// - Returns: Non-null pointer to the corresponding compressed public-key - public var compressed: PublicKey { - return PublicKey(rawValue: TWPublicKeyCompressed(rawValue)) - } - - /// Give the non-compressed public key of a corresponding compressed public key - /// - /// - Parameter from: Non-null pointer to the corresponding compressed public key - /// - Returns: Non-null pointer to the corresponding non-compressed public key - public var uncompressed: PublicKey { - return PublicKey(rawValue: TWPublicKeyUncompressed(rawValue)) - } - - /// Gives the raw data of a given public-key - /// - /// - Parameter pk: Non-null pointer to a public key - /// - Returns: Non-null pointer to the raw block of data of the given public key - public var data: Data { - return TWDataNSData(TWPublicKeyData(rawValue)) - } - - /// Give the public key type (eliptic) of a given public key - /// - /// - Parameter publicKey: Non-null pointer to a public key - /// - Returns: The public key type of the given public key (eliptic) - public var keyType: PublicKeyType { - return PublicKeyType(rawValue: TWPublicKeyKeyType(rawValue).rawValue)! - } - - /// Get the public key description from a given public key - /// - /// - Parameter publicKey: Non-null pointer to a public key - /// - Returns: Non-null pointer to a string representing the description of the public key - public var description: String { - return TWStringNSString(TWPublicKeyDescription(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init?(data: Data, type: PublicKeyType) { - let dataData = TWDataCreateWithNSData(data) - defer { - TWDataDelete(dataData) - } - guard let rawValue = TWPublicKeyCreateWithData(dataData, TWPublicKeyType(rawValue: type.rawValue)) else { - return nil - } - self.rawValue = rawValue - } - - deinit { - TWPublicKeyDelete(rawValue) - } - - /// Verify the validity of a signature and a message using the given public key - /// - /// - Parameter pk: Non-null pointer to a public key - /// - Parameter signature: Non-null pointer to a block of data corresponding to the signature - /// - Parameter message: Non-null pointer to a block of data corresponding to the message - /// - Returns: true if the signature and the message belongs to the given public key, false otherwise - public func verify(signature: Data, message: Data) -> Bool { - let signatureData = TWDataCreateWithNSData(signature) - defer { - TWDataDelete(signatureData) - } - let messageData = TWDataCreateWithNSData(message) - defer { - TWDataDelete(messageData) - } - return TWPublicKeyVerify(rawValue, signatureData, messageData) - } - - /// Verify the validity as DER of a signature and a message using the given public key - /// - /// - Parameter pk: Non-null pointer to a public key - /// - Parameter signature: Non-null pointer to a block of data corresponding to the signature - /// - Parameter message: Non-null pointer to a block of data corresponding to the message - /// - Returns: true if the signature and the message belongs to the given public key, false otherwise - public func verifyAsDER(signature: Data, message: Data) -> Bool { - let signatureData = TWDataCreateWithNSData(signature) - defer { - TWDataDelete(signatureData) - } - let messageData = TWDataCreateWithNSData(message) - defer { - TWDataDelete(messageData) - } - return TWPublicKeyVerifyAsDER(rawValue, signatureData, messageData) - } - - /// Verify a Zilliqa schnorr signature with a signature and message. - /// - /// - Parameter pk: Non-null pointer to a public key - /// - Parameter signature: Non-null pointer to a block of data corresponding to the signature - /// - Parameter message: Non-null pointer to a block of data corresponding to the message - /// - Returns: true if the signature and the message belongs to the given public key, false otherwise - public func verifyZilliqaSchnorr(signature: Data, message: Data) -> Bool { - let signatureData = TWDataCreateWithNSData(signature) - defer { - TWDataDelete(signatureData) - } - let messageData = TWDataCreateWithNSData(message) - defer { - TWDataDelete(messageData) - } - return TWPublicKeyVerifyZilliqaSchnorr(rawValue, signatureData, messageData) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/RippleXAddress.swift b/Pods/TrustWalletCore/Sources/Generated/RippleXAddress.swift deleted file mode 100644 index bed49355..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/RippleXAddress.swift +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents a Ripple X-address. -public final class RippleXAddress: Address { - - /// Compares two addresses for equality. - /// - /// - Parameter lhs: left non-null pointer to a Ripple Address - /// - Parameter rhs: right non-null pointer to a Ripple Address - /// - Returns: true if both address are equal, false otherwise - public static func == (lhs: RippleXAddress, rhs: RippleXAddress) -> Bool { - return TWRippleXAddressEqual(lhs.rawValue, rhs.rawValue) - } - - /// Determines if the string is a valid Ripple address. - /// - /// - Parameter string: Non-null pointer to a string that represent the Ripple Address to be checked - /// - Returns: true if the given address is a valid Ripple address, false otherwise - public static func isValidString(string: String) -> Bool { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - return TWRippleXAddressIsValidString(stringString) - } - - /// Returns the address string representation. - /// - /// - Parameter address: Non-null pointer to a Ripple Address - /// - Returns: Non-null pointer to the ripple address string representation - public var description: String { - return TWStringNSString(TWRippleXAddressDescription(rawValue)) - } - - /// Returns the destination tag. - /// - /// - Parameter address: Non-null pointer to a Ripple Address - /// - Returns: The destination tag of the given Ripple Address (1-10) - public var tag: UInt32 { - return TWRippleXAddressTag(rawValue) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init?(string: String) { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let rawValue = TWRippleXAddressCreateWithString(stringString) else { - return nil - } - self.rawValue = rawValue - } - - public init(publicKey: PublicKey, tag: UInt32) { - rawValue = TWRippleXAddressCreateWithPublicKey(publicKey.rawValue, tag) - } - - deinit { - TWRippleXAddressDelete(rawValue) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/SegwitAddress.swift b/Pods/TrustWalletCore/Sources/Generated/SegwitAddress.swift deleted file mode 100644 index ea6effbb..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/SegwitAddress.swift +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents a BIP 0173 address. -public final class SegwitAddress: Address { - - /// Compares two addresses for equality. - /// - /// - Parameter lhs: left non-null pointer to a Bech32 Address - /// - Parameter rhs: right non-null pointer to a Bech32 Address - /// - Returns: true if both address are equal, false otherwise - public static func == (lhs: SegwitAddress, rhs: SegwitAddress) -> Bool { - return TWSegwitAddressEqual(lhs.rawValue, rhs.rawValue) - } - - /// Determines if the string is a valid Bech32 address. - /// - /// - Parameter string: Non-null pointer to a Bech32 address as a string - /// - Returns: true if the string is a valid Bech32 address, false otherwise. - public static func isValidString(string: String) -> Bool { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - return TWSegwitAddressIsValidString(stringString) - } - - /// Returns the address string representation. - /// - /// - Parameter address: Non-null pointer to a Segwit Address - /// - Returns: Non-null pointer to the segwit address string representation - public var description: String { - return TWStringNSString(TWSegwitAddressDescription(rawValue)) - } - - /// Returns the human-readable part. - /// - /// - Parameter address: Non-null pointer to a Segwit Address - /// - Returns: the HRP part of the given address - public var hrp: HRP { - return HRP(rawValue: TWSegwitAddressHRP(rawValue).rawValue)! - } - - /// Returns the human-readable part. - /// - /// - Parameter address: Non-null pointer to a Segwit Address - /// - Returns: returns the witness version of the given segwit address - public var witnessVersion: Int32 { - return TWSegwitAddressWitnessVersion(rawValue) - } - - /// Returns the witness program - /// - /// - Parameter address: Non-null pointer to a Segwit Address - /// - Returns: returns the witness data of the given segwit address as a non-null pointer block of data - public var witnessProgram: Data { - return TWDataNSData(TWSegwitAddressWitnessProgram(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init?(string: String) { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let rawValue = TWSegwitAddressCreateWithString(stringString) else { - return nil - } - self.rawValue = rawValue - } - - public init(hrp: HRP, publicKey: PublicKey) { - rawValue = TWSegwitAddressCreateWithPublicKey(TWHRP(rawValue: hrp.rawValue), publicKey.rawValue) - } - - deinit { - TWSegwitAddressDelete(rawValue) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/SolanaAddress.swift b/Pods/TrustWalletCore/Sources/Generated/SolanaAddress.swift deleted file mode 100644 index cd63ec3a..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/SolanaAddress.swift +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Solana address helper functions -public final class SolanaAddress: Address { - - /// Returns the address string representation. - /// - /// - Parameter address: Non-null pointer to a Solana Address - /// - Returns: Non-null pointer to the Solana address string representation - public var description: String { - return TWStringNSString(TWSolanaAddressDescription(rawValue)) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init?(string: String) { - let stringString = TWStringCreateWithNSString(string) - defer { - TWStringDelete(stringString) - } - guard let rawValue = TWSolanaAddressCreateWithString(stringString) else { - return nil - } - self.rawValue = rawValue - } - - deinit { - TWSolanaAddressDelete(rawValue) - } - - /// Derive default token address for token - /// - /// - Parameter address: Non-null pointer to a Solana Address - /// - Parameter tokenMintAddress: Non-null pointer to a token mint address as a string - /// - Returns: Null pointer if the Default token address for a token is not found, valid pointer otherwise - public func defaultTokenAddress(tokenMintAddress: String) -> String? { - let tokenMintAddressString = TWStringCreateWithNSString(tokenMintAddress) - defer { - TWStringDelete(tokenMintAddressString) - } - guard let result = TWSolanaAddressDefaultTokenAddress(rawValue, tokenMintAddressString) else { - return nil - } - return TWStringNSString(result) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/StarkExMessageSigner.swift b/Pods/TrustWalletCore/Sources/Generated/StarkExMessageSigner.swift deleted file mode 100644 index 58d04e31..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/StarkExMessageSigner.swift +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// StarkEx message signing and verification. -/// -/// StarkEx and some other wallets support a message signing & verification format, to create a proof (a signature) -/// that someone has access to the private keys of a specific address. -public struct StarkExMessageSigner { - - /// Sign a message. - /// - /// - Parameter privateKey:: the private key used for signing - /// - Parameter message:: A custom hex message which is input to the signing. - /// - Returns:s the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. - public static func signMessage(privateKey: PrivateKey, message: String) -> String { - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - return TWStringNSString(TWStarkExMessageSignerSignMessage(privateKey.rawValue, messageString)) - } - - /// Verify signature for a message. - /// - /// - Parameter pubKey:: pubKey that will verify and recover the message from the signature - /// - Parameter message:: the message signed (without prefix) in hex - /// - Parameter signature:: in Hex-encoded form. - /// - Returns:s false on any invalid input (does not throw), true if the message can be recovered from the signature - public static func verifyMessage(pubKey: PublicKey, message: String, signature: String) -> Bool { - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - let signatureString = TWStringCreateWithNSString(signature) - defer { - TWStringDelete(signatureString) - } - return TWStarkExMessageSignerVerifyMessage(pubKey.rawValue, messageString, signatureString) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/StarkWare.swift b/Pods/TrustWalletCore/Sources/Generated/StarkWare.swift deleted file mode 100644 index 2a4dd368..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/StarkWare.swift +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - - -public struct StarkWare { - - /// Generates the private stark key at the given derivation path from a valid eth signature - /// - /// - Parameter derivationPath: non-null StarkEx Derivation path - /// - Parameter signature: valid eth signature - /// - Returns: The private key for the specified derivation path/signature - public static func getStarkKeyFromSignature(derivationPath: DerivationPath, signature: String) -> PrivateKey { - let signatureString = TWStringCreateWithNSString(signature) - defer { - TWStringDelete(signatureString) - } - return PrivateKey(rawValue: TWStarkWareGetStarkKeyFromSignature(derivationPath.rawValue, signatureString)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/StoredKey.swift b/Pods/TrustWalletCore/Sources/Generated/StoredKey.swift deleted file mode 100644 index b45b6d73..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/StoredKey.swift +++ /dev/null @@ -1,498 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Represents a key stored as an encrypted file. -public final class StoredKey { - - /// Loads a key from a file. - /// - /// - Parameter path: filepath to the key as a non-null string - /// - Note: Returned object needs to be deleted with \TWStoredKeyDelete - /// - Returns: Nullptr if the key can't be load, the stored key otherwise - public static func load(path: String) -> StoredKey? { - let pathString = TWStringCreateWithNSString(path) - defer { - TWStringDelete(pathString) - } - guard let value = TWStoredKeyLoad(pathString) else { - return nil - } - return StoredKey(rawValue: value) - } - - /// Imports a private key. - /// - /// - Parameter privateKey: Non-null Block of data private key - /// - Parameter name: The name of the stored key to import as a non-null string - /// - Parameter password: Non-null block of data, password of the stored key - /// - Parameter coin: the coin type - /// - Note: Returned object needs to be deleted with \TWStoredKeyDelete - /// - Returns: Nullptr if the key can't be imported, the stored key otherwise - public static func importPrivateKey(privateKey: Data, name: String, password: Data, coin: CoinType) -> StoredKey? { - let privateKeyData = TWDataCreateWithNSData(privateKey) - defer { - TWDataDelete(privateKeyData) - } - let nameString = TWStringCreateWithNSString(name) - defer { - TWStringDelete(nameString) - } - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - guard let value = TWStoredKeyImportPrivateKey(privateKeyData, nameString, passwordData, TWCoinType(rawValue: coin.rawValue)) else { - return nil - } - return StoredKey(rawValue: value) - } - - /// Imports a private key. - /// - /// - Parameter privateKey: Non-null Block of data private key - /// - Parameter name: The name of the stored key to import as a non-null string - /// - Parameter password: Non-null block of data, password of the stored key - /// - Parameter coin: the coin type - /// - Parameter encryption: cipher encryption mode - /// - Note: Returned object needs to be deleted with \TWStoredKeyDelete - /// - Returns: Nullptr if the key can't be imported, the stored key otherwise - public static func importPrivateKeyWithEncryption(privateKey: Data, name: String, password: Data, coin: CoinType, encryption: StoredKeyEncryption) -> StoredKey? { - let privateKeyData = TWDataCreateWithNSData(privateKey) - defer { - TWDataDelete(privateKeyData) - } - let nameString = TWStringCreateWithNSString(name) - defer { - TWStringDelete(nameString) - } - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - guard let value = TWStoredKeyImportPrivateKeyWithEncryption(privateKeyData, nameString, passwordData, TWCoinType(rawValue: coin.rawValue), TWStoredKeyEncryption(rawValue: encryption.rawValue)) else { - return nil - } - return StoredKey(rawValue: value) - } - - /// Imports an HD wallet. - /// - /// - Parameter mnemonic: Non-null bip39 mnemonic - /// - Parameter name: The name of the stored key to import as a non-null string - /// - Parameter password: Non-null block of data, password of the stored key - /// - Parameter coin: the coin type - /// - Note: Returned object needs to be deleted with \TWStoredKeyDelete - /// - Returns: Nullptr if the key can't be imported, the stored key otherwise - public static func importHDWallet(mnemonic: String, name: String, password: Data, coin: CoinType) -> StoredKey? { - let mnemonicString = TWStringCreateWithNSString(mnemonic) - defer { - TWStringDelete(mnemonicString) - } - let nameString = TWStringCreateWithNSString(name) - defer { - TWStringDelete(nameString) - } - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - guard let value = TWStoredKeyImportHDWallet(mnemonicString, nameString, passwordData, TWCoinType(rawValue: coin.rawValue)) else { - return nil - } - return StoredKey(rawValue: value) - } - - /// Imports an HD wallet. - /// - /// - Parameter mnemonic: Non-null bip39 mnemonic - /// - Parameter name: The name of the stored key to import as a non-null string - /// - Parameter password: Non-null block of data, password of the stored key - /// - Parameter coin: the coin type - /// - Parameter encryption: cipher encryption mode - /// - Note: Returned object needs to be deleted with \TWStoredKeyDelete - /// - Returns: Nullptr if the key can't be imported, the stored key otherwise - public static func importHDWalletWithEncryption(mnemonic: String, name: String, password: Data, coin: CoinType, encryption: StoredKeyEncryption) -> StoredKey? { - let mnemonicString = TWStringCreateWithNSString(mnemonic) - defer { - TWStringDelete(mnemonicString) - } - let nameString = TWStringCreateWithNSString(name) - defer { - TWStringDelete(nameString) - } - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - guard let value = TWStoredKeyImportHDWalletWithEncryption(mnemonicString, nameString, passwordData, TWCoinType(rawValue: coin.rawValue), TWStoredKeyEncryption(rawValue: encryption.rawValue)) else { - return nil - } - return StoredKey(rawValue: value) - } - - /// Imports a key from JSON. - /// - /// - Parameter json: Json stored key import format as a non-null block of data - /// - Note: Returned object needs to be deleted with \TWStoredKeyDelete - /// - Returns: Nullptr if the key can't be imported, the stored key otherwise - public static func importJSON(json: Data) -> StoredKey? { - let jsonData = TWDataCreateWithNSData(json) - defer { - TWDataDelete(jsonData) - } - guard let value = TWStoredKeyImportJSON(jsonData) else { - return nil - } - return StoredKey(rawValue: value) - } - - /// Stored key unique identifier. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Note: Returned object needs to be deleted with \TWStringDelete - /// - Returns: The stored key unique identifier if it's found, null pointer otherwise. - public var identifier: String? { - guard let result = TWStoredKeyIdentifier(rawValue) else { - return nil - } - return TWStringNSString(result) - } - - /// Stored key namer. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Note: Returned object needs to be deleted with \TWStringDelete - /// - Returns: The stored key name as a non-null string pointer. - public var name: String { - return TWStringNSString(TWStoredKeyName(rawValue)) - } - - /// Whether this key is a mnemonic phrase for a HD wallet. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Returns: true if the given stored key is a mnemonic, false otherwise - public var isMnemonic: Bool { - return TWStoredKeyIsMnemonic(rawValue) - } - - /// The number of accounts. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Returns: the number of accounts associated to the given stored key - public var accountCount: Int { - return TWStoredKeyAccountCount(rawValue) - } - - /// Retrieve stored key encoding parameters, as JSON string. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Returns: Null pointer on failure, encoding parameter as a json string otherwise. - public var encryptionParameters: String? { - guard let result = TWStoredKeyEncryptionParameters(rawValue) else { - return nil - } - return TWStringNSString(result) - } - - let rawValue: OpaquePointer - - init(rawValue: OpaquePointer) { - self.rawValue = rawValue - } - - public init(name: String, password: Data, encryptionLevel: StoredKeyEncryptionLevel) { - let nameString = TWStringCreateWithNSString(name) - defer { - TWStringDelete(nameString) - } - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - rawValue = TWStoredKeyCreateLevel(nameString, passwordData, TWStoredKeyEncryptionLevel(rawValue: encryptionLevel.rawValue)) - } - - public init(name: String, password: Data, encryptionLevel: StoredKeyEncryptionLevel, encryption: StoredKeyEncryption) { - let nameString = TWStringCreateWithNSString(name) - defer { - TWStringDelete(nameString) - } - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - rawValue = TWStoredKeyCreateLevelAndEncryption(nameString, passwordData, TWStoredKeyEncryptionLevel(rawValue: encryptionLevel.rawValue), TWStoredKeyEncryption(rawValue: encryption.rawValue)) - } - - public init(name: String, password: Data) { - let nameString = TWStringCreateWithNSString(name) - defer { - TWStringDelete(nameString) - } - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - rawValue = TWStoredKeyCreate(nameString, passwordData) - } - - public init(name: String, password: Data, encryption: StoredKeyEncryption) { - let nameString = TWStringCreateWithNSString(name) - defer { - TWStringDelete(nameString) - } - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - rawValue = TWStoredKeyCreateEncryption(nameString, passwordData, TWStoredKeyEncryption(rawValue: encryption.rawValue)) - } - - deinit { - TWStoredKeyDelete(rawValue) - } - - /// Returns the account at a given index. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter index: the account index to be retrieved - /// - Note: Returned object needs to be deleted with \TWAccountDelete - /// - Returns: Null pointer if the associated account is not found, pointer to the account otherwise. - public func account(index: Int) -> Account? { - guard let value = TWStoredKeyAccount(rawValue, index) else { - return nil - } - return Account(rawValue: value) - } - - /// Returns the account for a specific coin, creating it if necessary. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter coin: The coin type - /// - Parameter wallet: The associated HD wallet, can be null. - /// - Note: Returned object needs to be deleted with \TWAccountDelete - /// - Returns: Null pointer if the associated account is not found/not created, pointer to the account otherwise. - public func accountForCoin(coin: CoinType, wallet: HDWallet?) -> Account? { - guard let value = TWStoredKeyAccountForCoin(rawValue, TWCoinType(rawValue: coin.rawValue), wallet?.rawValue) else { - return nil - } - return Account(rawValue: value) - } - - /// Returns the account for a specific coin + derivation, creating it if necessary. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter coin: The coin type - /// - Parameter derivation: The derivation for the given coin - /// - Parameter wallet: the associated HD wallet, can be null. - /// - Note: Returned object needs to be deleted with \TWAccountDelete - /// - Returns: Null pointer if the associated account is not found/not created, pointer to the account otherwise. - public func accountForCoinDerivation(coin: CoinType, derivation: Derivation, wallet: HDWallet?) -> Account? { - guard let value = TWStoredKeyAccountForCoinDerivation(rawValue, TWCoinType(rawValue: coin.rawValue), TWDerivation(rawValue: derivation.rawValue), wallet?.rawValue) else { - return nil - } - return Account(rawValue: value) - } - - /// Adds a new account, using given derivation (usually TWDerivationDefault) - /// and derivation path (usually matches path from derivation, but custom possible). - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter address: Non-null pointer to the address of the coin for this account - /// - Parameter coin: coin type - /// - Parameter derivation: derivation of the given coin type - /// - Parameter derivationPath: HD bip44 derivation path of the given coin - /// - Parameter publicKey: Non-null public key of the given coin/address - /// - Parameter extendedPublicKey: Non-null extended public key of the given coin/address - public func addAccountDerivation(address: String, coin: CoinType, derivation: Derivation, derivationPath: String, publicKey: String, extendedPublicKey: String) -> Void { - let addressString = TWStringCreateWithNSString(address) - defer { - TWStringDelete(addressString) - } - let derivationPathString = TWStringCreateWithNSString(derivationPath) - defer { - TWStringDelete(derivationPathString) - } - let publicKeyString = TWStringCreateWithNSString(publicKey) - defer { - TWStringDelete(publicKeyString) - } - let extendedPublicKeyString = TWStringCreateWithNSString(extendedPublicKey) - defer { - TWStringDelete(extendedPublicKeyString) - } - return TWStoredKeyAddAccountDerivation(rawValue, addressString, TWCoinType(rawValue: coin.rawValue), TWDerivation(rawValue: derivation.rawValue), derivationPathString, publicKeyString, extendedPublicKeyString) - } - - /// Adds a new account, using given derivation path. - /// - /// \deprecated Use TWStoredKeyAddAccountDerivation (with TWDerivationDefault) instead. - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter address: Non-null pointer to the address of the coin for this account - /// - Parameter coin: coin type - /// - Parameter derivationPath: HD bip44 derivation path of the given coin - /// - Parameter publicKey: Non-null public key of the given coin/address - /// - Parameter extendedPublicKey: Non-null extended public key of the given coin/address - public func addAccount(address: String, coin: CoinType, derivationPath: String, publicKey: String, extendedPublicKey: String) -> Void { - let addressString = TWStringCreateWithNSString(address) - defer { - TWStringDelete(addressString) - } - let derivationPathString = TWStringCreateWithNSString(derivationPath) - defer { - TWStringDelete(derivationPathString) - } - let publicKeyString = TWStringCreateWithNSString(publicKey) - defer { - TWStringDelete(publicKeyString) - } - let extendedPublicKeyString = TWStringCreateWithNSString(extendedPublicKey) - defer { - TWStringDelete(extendedPublicKeyString) - } - return TWStoredKeyAddAccount(rawValue, addressString, TWCoinType(rawValue: coin.rawValue), derivationPathString, publicKeyString, extendedPublicKeyString) - } - - /// Remove the account for a specific coin - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter coin: Account coin type to be removed - public func removeAccountForCoin(coin: CoinType) -> Void { - return TWStoredKeyRemoveAccountForCoin(rawValue, TWCoinType(rawValue: coin.rawValue)) - } - - /// Remove the account for a specific coin with the given derivation. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter coin: Account coin type to be removed - /// - Parameter derivation: The derivation of the given coin type - public func removeAccountForCoinDerivation(coin: CoinType, derivation: Derivation) -> Void { - return TWStoredKeyRemoveAccountForCoinDerivation(rawValue, TWCoinType(rawValue: coin.rawValue), TWDerivation(rawValue: derivation.rawValue)) - } - - /// Remove the account for a specific coin with the given derivation path. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter coin: Account coin type to be removed - /// - Parameter derivationPath: The derivation path (bip44) of the given coin type - public func removeAccountForCoinDerivationPath(coin: CoinType, derivationPath: String) -> Void { - let derivationPathString = TWStringCreateWithNSString(derivationPath) - defer { - TWStringDelete(derivationPathString) - } - return TWStoredKeyRemoveAccountForCoinDerivationPath(rawValue, TWCoinType(rawValue: coin.rawValue), derivationPathString) - } - - /// Saves the key to a file. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter path: Non-null string filepath where the key will be saved - /// - Returns: true if the key was successfully stored in the given filepath file, false otherwise - public func store(path: String) -> Bool { - let pathString = TWStringCreateWithNSString(path) - defer { - TWStringDelete(pathString) - } - return TWStoredKeyStore(rawValue, pathString) - } - - /// Decrypts the private key. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter password: Non-null block of data, password of the stored key - /// - Returns: Decrypted private key as a block of data if success, null pointer otherwise - public func decryptPrivateKey(password: Data) -> Data? { - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - guard let result = TWStoredKeyDecryptPrivateKey(rawValue, passwordData) else { - return nil - } - return TWDataNSData(result) - } - - /// Decrypts the mnemonic phrase. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter password: Non-null block of data, password of the stored key - /// - Returns: Bip39 decrypted mnemonic if success, null pointer otherwise - public func decryptMnemonic(password: Data) -> String? { - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - guard let result = TWStoredKeyDecryptMnemonic(rawValue, passwordData) else { - return nil - } - return TWStringNSString(result) - } - - /// Returns the private key for a specific coin. Returned object needs to be deleted. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter coin: Account coin type to be queried - /// - Note: Returned object needs to be deleted with \TWPrivateKeyDelete - /// - Returns: Null pointer on failure, pointer to the private key otherwise - public func privateKey(coin: CoinType, password: Data) -> PrivateKey? { - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - guard let value = TWStoredKeyPrivateKey(rawValue, TWCoinType(rawValue: coin.rawValue), passwordData) else { - return nil - } - return PrivateKey(rawValue: value) - } - - /// Decrypts and returns the HD Wallet for mnemonic phrase keys. Returned object needs to be deleted. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter password: Non-null block of data, password of the stored key - /// - Note: Returned object needs to be deleted with \TWHDWalletDelete - /// - Returns: Null pointer on failure, pointer to the HDWallet otherwise - public func wallet(password: Data) -> HDWallet? { - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - guard let value = TWStoredKeyWallet(rawValue, passwordData) else { - return nil - } - return HDWallet(rawValue: value) - } - - /// Exports the key as JSON - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Returns: Null pointer on failure, pointer to a block of data containing the json otherwise - public func exportJSON() -> Data? { - guard let result = TWStoredKeyExportJSON(rawValue) else { - return nil - } - return TWDataNSData(result) - } - - /// Fills in empty and invalid addresses. - /// This method needs the encryption password to re-derive addresses from private keys. - /// - /// - Parameter key: Non-null pointer to a stored key - /// - Parameter password: Non-null block of data, password of the stored key - /// - Returns: `false` if the password is incorrect, true otherwise. - public func fixAddresses(password: Data) -> Bool { - let passwordData = TWDataCreateWithNSData(password) - defer { - TWDataDelete(passwordData) - } - return TWStoredKeyFixAddresses(rawValue, passwordData) - } - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/THORChainSwap.swift b/Pods/TrustWalletCore/Sources/Generated/THORChainSwap.swift deleted file mode 100644 index b04149e3..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/THORChainSwap.swift +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// THORChain swap functions -public struct THORChainSwap { - - /// Builds a THORChainSwap transaction input. - /// - /// - Parameter input: The serialized data of SwapInput. - /// - Returns: The serialized data of SwapOutput. - public static func buildSwap(input: Data) -> Data { - let inputData = TWDataCreateWithNSData(input) - defer { - TWDataDelete(inputData) - } - return TWDataNSData(TWTHORChainSwapBuildSwap(inputData)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/TezosMessageSigner.swift b/Pods/TrustWalletCore/Sources/Generated/TezosMessageSigner.swift deleted file mode 100644 index 9e4b1043..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/TezosMessageSigner.swift +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Tezos message signing, verification and utilities. -public struct TezosMessageSigner { - - /// Implement format input as described in https://tezostaquito.io/docs/signing/ - /// - /// - Parameter message: message to format e.g: Hello, World - /// - Parameter dAppUrl: the app url, e.g: testUrl - /// - Returns:s the formatted message as a string - public static func formatMessage(message: String, url: String) -> String { - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - let urlString = TWStringCreateWithNSString(url) - defer { - TWStringDelete(urlString) - } - return TWStringNSString(TWTezosMessageSignerFormatMessage(messageString, urlString)) - } - - /// Implement input to payload as described in: https://tezostaquito.io/docs/signing/ - /// - /// - Parameter message: formatted message to be turned into an hex payload - /// - Returns: the hexpayload of the formated message as a hex string - public static func inputToPayload(message: String) -> String { - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - return TWStringNSString(TWTezosMessageSignerInputToPayload(messageString)) - } - - /// Sign a message as described in https://tezostaquito.io/docs/signing/ - /// - /// - Parameter privateKey:: the private key used for signing - /// - Parameter message:: A custom message payload (hex) which is input to the signing. - /// - Returns:s the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. - public static func signMessage(privateKey: PrivateKey, message: String) -> String { - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - return TWStringNSString(TWTezosMessageSignerSignMessage(privateKey.rawValue, messageString)) - } - - /// Verify signature for a message as described in https://tezostaquito.io/docs/signing/ - /// - /// - Parameter pubKey:: pubKey that will verify the message from the signature - /// - Parameter message:: the message signed as a payload (hex) - /// - Parameter signature:: in Base58-encoded form. - /// - Returns:s false on any invalid input (does not throw), true if the message can be verified from the signature - public static func verifyMessage(pubKey: PublicKey, message: String, signature: String) -> Bool { - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - let signatureString = TWStringCreateWithNSString(signature) - defer { - TWStringDelete(signatureString) - } - return TWTezosMessageSignerVerifyMessage(pubKey.rawValue, messageString, signatureString) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/TransactionCompiler.swift b/Pods/TrustWalletCore/Sources/Generated/TransactionCompiler.swift deleted file mode 100644 index a178741a..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/TransactionCompiler.swift +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Non-core transaction utility methods, like building a transaction using an external signature. -public struct TransactionCompiler { - - /// Builds a coin-specific SigningInput (proto object) from a simple transaction. - /// - /// \deprecated `TWTransactionCompilerBuildInput` will be removed soon. - /// - Parameter coin: coin type. - /// - Parameter from: sender of the transaction. - /// - Parameter to: receiver of the transaction. - /// - Parameter amount: transaction amount in string - /// - Parameter asset: optional asset name, like "BNB" - /// - Parameter memo: optional memo - /// - Parameter chainId: optional chainId to override default - /// - Returns: serialized data of the SigningInput proto object. - public static func buildInput(coinType: CoinType, from: String, to: String, amount: String, asset: String, memo: String, chainId: String) -> Data { - let fromString = TWStringCreateWithNSString(from) - defer { - TWStringDelete(fromString) - } - let toString = TWStringCreateWithNSString(to) - defer { - TWStringDelete(toString) - } - let amountString = TWStringCreateWithNSString(amount) - defer { - TWStringDelete(amountString) - } - let assetString = TWStringCreateWithNSString(asset) - defer { - TWStringDelete(assetString) - } - let memoString = TWStringCreateWithNSString(memo) - defer { - TWStringDelete(memoString) - } - let chainIdString = TWStringCreateWithNSString(chainId) - defer { - TWStringDelete(chainIdString) - } - return TWDataNSData(TWTransactionCompilerBuildInput(TWCoinType(rawValue: coinType.rawValue), fromString, toString, amountString, assetString, memoString, chainIdString)) - } - - /// Obtains pre-signing hashes of a transaction. - /// - /// We provide a default `PreSigningOutput` in TransactionCompiler.proto. - /// For some special coins, such as bitcoin, we will create a custom `PreSigningOutput` object in its proto file. - /// - Parameter coin: coin type. - /// - Parameter txInputData: The serialized data of a signing input - /// - Returns: serialized data of a proto object `PreSigningOutput` includes hash. - public static func preImageHashes(coinType: CoinType, txInputData: Data) -> Data { - let txInputDataData = TWDataCreateWithNSData(txInputData) - defer { - TWDataDelete(txInputDataData) - } - return TWDataNSData(TWTransactionCompilerPreImageHashes(TWCoinType(rawValue: coinType.rawValue), txInputDataData)) - } - - /// Compiles a complete transation with one or more external signatures. - /// - /// Puts together from transaction input and provided public keys and signatures. The signatures must match the hashes - /// returned by TWTransactionCompilerPreImageHashes, in the same order. The publicKeyHash attached - /// to the hashes enable identifying the private key needed for signing the hash. - /// - Parameter coin: coin type. - /// - Parameter txInputData: The serialized data of a signing input. - /// - Parameter signatures: signatures to compile, using TWDataVector. - /// - Parameter publicKeys: public keys for signers to match private keys, using TWDataVector. - /// - Returns: serialized data of a proto object `SigningOutput`. - public static func compileWithSignatures(coinType: CoinType, txInputData: Data, signatures: DataVector, publicKeys: DataVector) -> Data { - let txInputDataData = TWDataCreateWithNSData(txInputData) - defer { - TWDataDelete(txInputDataData) - } - return TWDataNSData(TWTransactionCompilerCompileWithSignatures(TWCoinType(rawValue: coinType.rawValue), txInputDataData, signatures.rawValue, publicKeys.rawValue)) - } - - - public static func compileWithSignaturesAndPubKeyType(coinType: CoinType, txInputData: Data, signatures: DataVector, publicKeys: DataVector, pubKeyType: PublicKeyType) -> Data { - let txInputDataData = TWDataCreateWithNSData(txInputData) - defer { - TWDataDelete(txInputDataData) - } - return TWDataNSData(TWTransactionCompilerCompileWithSignaturesAndPubKeyType(TWCoinType(rawValue: coinType.rawValue), txInputDataData, signatures.rawValue, publicKeys.rawValue, TWPublicKeyType(rawValue: pubKeyType.rawValue))) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/TronMessageSigner.swift b/Pods/TrustWalletCore/Sources/Generated/TronMessageSigner.swift deleted file mode 100644 index c4b98aa6..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/TronMessageSigner.swift +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - -/// Tron message signing and verification. -/// -/// Tron and some other wallets support a message signing & verification format, to create a proof (a signature) -/// that someone has access to the private keys of a specific address. -public struct TronMessageSigner { - - /// Sign a message. - /// - /// - Parameter privateKey:: the private key used for signing - /// - Parameter message:: A custom message which is input to the signing. - /// - Returns:s the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. - public static func signMessage(privateKey: PrivateKey, message: String) -> String { - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - return TWStringNSString(TWTronMessageSignerSignMessage(privateKey.rawValue, messageString)) - } - - /// Verify signature for a message. - /// - /// - Parameter pubKey:: pubKey that will verify and recover the message from the signature - /// - Parameter message:: the message signed (without prefix) - /// - Parameter signature:: in Hex-encoded form. - /// - Returns:s false on any invalid input (does not throw), true if the message can be recovered from the signature - public static func verifyMessage(pubKey: PublicKey, message: String, signature: String) -> Bool { - let messageString = TWStringCreateWithNSString(message) - defer { - TWStringDelete(messageString) - } - let signatureString = TWStringCreateWithNSString(signature) - defer { - TWStringDelete(signatureString) - } - return TWTronMessageSignerVerifyMessage(pubKey.rawValue, messageString, signatureString) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/Generated/WebAuthn.swift b/Pods/TrustWalletCore/Sources/Generated/WebAuthn.swift deleted file mode 100644 index 255f5fea..00000000 --- a/Pods/TrustWalletCore/Sources/Generated/WebAuthn.swift +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. -// - -import Foundation - - -public struct WebAuthn { - - /// Converts attestation object to the public key on P256 curve - /// - /// - Parameter attestationObject: Attestation object retrieved from webuthn.get method - /// - Returns: Public key. - public static func getPublicKey(attestationObject: Data) -> PublicKey? { - let attestationObjectData = TWDataCreateWithNSData(attestationObject) - defer { - TWDataDelete(attestationObjectData) - } - guard let value = TWWebAuthnGetPublicKey(attestationObjectData) else { - return nil - } - return PublicKey(rawValue: value) - } - - /// Uses ASN parser to extract r and s values from a webauthn signature - /// - /// - Parameter signature: ASN encoded webauthn signature: https://www.w3.org/TR/webauthn-2/#sctn-signature-attestation-types - /// - Returns: Concatenated r and s values. - public static func getRSValues(signature: Data) -> Data { - let signatureData = TWDataCreateWithNSData(signature) - defer { - TWDataDelete(signatureData) - } - return TWDataNSData(TWWebAuthnGetRSValues(signatureData)) - } - - /// Reconstructs the original message that was signed via P256 curve. Can be used for signature validation. - /// - /// - Parameter authenticatorData: Authenticator Data: https://www.w3.org/TR/webauthn-2/#authenticator-data - /// - Parameter clientDataJSON: clientDataJSON: https://www.w3.org/TR/webauthn-2/#dom-authenticatorresponse-clientdatajson - /// - Returns: original messages. - public static func reconstructOriginalMessage(authenticatorData: Data, clientDataJSON: Data) -> Data { - let authenticatorDataData = TWDataCreateWithNSData(authenticatorData) - defer { - TWDataDelete(authenticatorDataData) - } - let clientDataJSONData = TWDataCreateWithNSData(clientDataJSON) - defer { - TWDataDelete(clientDataJSONData) - } - return TWDataNSData(TWWebAuthnReconstructOriginalMessage(authenticatorDataData, clientDataJSONData)) - } - - - init() { - } - - -} diff --git a/Pods/TrustWalletCore/Sources/KeyStore.Error.swift b/Pods/TrustWalletCore/Sources/KeyStore.Error.swift deleted file mode 100644 index 722bb1db..00000000 --- a/Pods/TrustWalletCore/Sources/KeyStore.Error.swift +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright © 2017-2018 Trust. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -extension KeyStore { - public enum Error: Swift.Error, LocalizedError { - case accountNotFound - case invalidMnemonic - case invalidJSON - case invalidKey - case invalidPassword - - public var errorDescription: String? { - switch self { - case .accountNotFound: - return NSLocalizedString("Account not found", comment: "Error message when trying to access an account that does not exist") - case .invalidMnemonic: - return NSLocalizedString("Invalid mnemonic phrase", comment: "Error message when trying to import an invalid mnemonic phrase") - case .invalidJSON: - return NSLocalizedString("Invalid Keystore/JSON format", comment: "Error message when trying to import an invalid json phrase") - case .invalidKey: - return NSLocalizedString("Invalid private key", comment: "Error message when trying to import an invalid private key") - case .invalidPassword: - return NSLocalizedString("Invalid password", comment: "Error message when trying to export a private key") - } - } - } -} diff --git a/Pods/TrustWalletCore/Sources/KeyStore.swift b/Pods/TrustWalletCore/Sources/KeyStore.swift deleted file mode 100644 index 0b6c3368..00000000 --- a/Pods/TrustWalletCore/Sources/KeyStore.swift +++ /dev/null @@ -1,372 +0,0 @@ -// Copyright © 2017-2018 Trust. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -/// Manages directories of key and wallet files and presents them as accounts. -public final class KeyStore { - static let watchesFileName = "watches.json" - - /// The key file directory. - public let keyDirectory: URL - - /// The watches file URL. - public let watchesFile: URL - - /// List of wallets. - public private(set) var wallets = [Wallet]() - - /// List of accounts being watched - public var watches = [Watch]() - - /// Creates a `KeyStore` for the given directory. - public init(keyDirectory: URL) throws { - self.keyDirectory = keyDirectory - self.watchesFile = keyDirectory.appendingPathComponent(KeyStore.watchesFileName) - - try load() - } - - private func load() throws { - let fileManager = FileManager.default - try? fileManager.createDirectory(at: keyDirectory, withIntermediateDirectories: true, attributes: nil) - - if fileManager.fileExists(atPath: watchesFile.path) { - let data = try Data(contentsOf: watchesFile) - watches = try JSONDecoder().decode([Watch].self, from: data) - } - - let accountURLs = try fileManager.contentsOfDirectory(at: keyDirectory, includingPropertiesForKeys: [], options: [.skipsHiddenFiles]) - for url in accountURLs { - if url.lastPathComponent == KeyStore.watchesFileName { - // Skip watches file - continue - } - guard let key = StoredKey.load(path: url.path) else { - // Ignore invalid keys - continue - } - let wallet = Wallet(keyURL: url, key: key) - wallets.append(wallet) - } - } - - /// Watches a list of accounts. - public func watch(_ watches: [Watch]) throws { - self.watches.append(contentsOf: watches) - - let data = try JSONEncoder().encode(watches) - try data.write(to: watchesFile) - } - - /// Stop watching an account. - public func removeWatch(_ watch: Watch) throws { - guard let index = watches.firstIndex(of: watch) else { - return - } - watches.remove(at: index) - - let data = try JSONEncoder().encode(watches) - try data.write(to: watchesFile) - } - - /// Creates a new wallet. HD default by default - public func createWallet(name: String, password: String, coins: [CoinType], encryption: StoredKeyEncryption = .aes128Ctr) throws -> Wallet { - let key = StoredKey(name: name, password: Data(password.utf8), encryption: encryption) - return try saveCreatedWallet(for: key, password: password, coins: coins) - } - - private func saveCreatedWallet(for key: StoredKey, password: String, coins: [CoinType]) throws -> Wallet { - let url = makeAccountURL() - let wallet = Wallet(keyURL: url, key: key) - for coin in coins { - _ = try wallet.getAccount(password: password, coin: coin) - } - wallets.append(wallet) - - try save(wallet: wallet) - - return wallet - } - - /// Adds accounts to a wallet. - public func addAccounts(wallet: Wallet, coins: [CoinType], password: String) throws -> [Account] { - let accounts = try wallet.getAccounts(password: password, coins: coins) - try save(wallet: wallet) - return accounts - } - - /// Remove accounts from a wallet. - public func removeAccounts(wallet: Wallet, coins: [CoinType], password: String) throws -> Wallet { - guard wallet.key.decryptPrivateKey(password: Data(password.utf8)) != nil else { - throw Error.invalidPassword - } - - guard let index = wallets.firstIndex(of: wallet) else { - fatalError("Missing wallet") - } - - for coin in coins { - wallet.key.removeAccountForCoin(coin: coin) - } - - wallets[index] = wallet - try save(wallet: wallet) - return wallet - } - - /// Imports an encrypted JSON key. - /// - /// - Parameters: - /// - json: json wallet - /// - password: key password - /// - newPassword: password to use for the imported key - /// - coins: coins to use for this wallet - /// - Returns: new account - public func `import`(json: Data, name: String, password: String, newPassword: String, coins: [CoinType]) throws -> Wallet { - guard let key = StoredKey.importJSON(json: json) else { - throw Error.invalidJSON - } - guard let data = key.decryptPrivateKey(password: Data(password.utf8)) else { - throw Error.invalidPassword - } - - if let mnemonic = checkMnemonic(data) { - return try self.import(mnemonic: mnemonic, name: name, encryptPassword: newPassword, coins: coins) - } - - guard let privateKey = PrivateKey(data: data) else { - throw Error.invalidKey - } - return try self.import(privateKey: privateKey, name: name, password: newPassword, coin: coins.first ?? .ethereum) - } - - private func checkMnemonic(_ data: Data) -> String? { - guard let mnemonic = String(data: data, encoding: .ascii), Mnemonic.isValid(mnemonic: mnemonic) else { - return nil - } - return mnemonic - } - - /// Imports a private key. - /// - /// - Parameters: - /// - privateKey: private key to import - /// - password: password to use for the imported private key - /// - coin: coin to use for this wallet - /// - Returns: new wallet - public func `import`(privateKey: PrivateKey, name: String, password: String, coin: CoinType, encryption: StoredKeyEncryption = .aes128Ctr) throws -> Wallet { - guard let newKey = StoredKey.importPrivateKeyWithEncryption(privateKey: privateKey.data, name: name, password: Data(password.utf8), coin: coin, encryption: encryption) else { - throw Error.invalidKey - } - let url = makeAccountURL() - let wallet = Wallet(keyURL: url, key: newKey) - _ = try wallet.getAccount(password: password, coin: coin) - wallets.append(wallet) - - try save(wallet: wallet) - - return wallet - } - - /// Imports a wallet. - /// - /// - Parameters: - /// - mnemonic: wallet's mnemonic phrase - /// - encryptPassword: password to use for encrypting - /// - coins: coins to add - /// - Returns: new account - public func `import`(mnemonic: String, name: String, encryptPassword: String, coins: [CoinType], encryption: StoredKeyEncryption = .aes128Ctr) throws -> Wallet { - guard let key = StoredKey.importHDWalletWithEncryption(mnemonic: mnemonic, name: name, password: Data(encryptPassword.utf8), coin: coins.first ?? .ethereum, encryption: encryption) else { - throw Error.invalidMnemonic - } - let url = makeAccountURL() - let wallet = Wallet(keyURL: url, key: key) - _ = try wallet.getAccounts(password: encryptPassword, coins: coins) - - wallets.append(wallet) - - try save(wallet: wallet) - - return wallet - } - - /// Exports a wallet as JSON data. - /// - /// - Parameters: - /// - wallet: wallet to export - /// - password: account password - /// - newPassword: password to use for exported key - /// - Returns: encrypted JSON key - public func export(wallet: Wallet, password: String, newPassword: String, encryption: StoredKeyEncryption = .aes128Ctr) throws -> Data { - var privateKeyData = try exportPrivateKey(wallet: wallet, password: password) - defer { - privateKeyData.resetBytes(in: 0 ..< privateKeyData.count) - } - - guard let coin = wallet.key.account(index: 0)?.coin else { - throw Error.accountNotFound - } - - if let mnemonic = checkMnemonic(privateKeyData), let newKey = StoredKey.importHDWalletWithEncryption(mnemonic: mnemonic, name: "", password: Data(newPassword.utf8), coin: coin, encryption: encryption) { - guard let json = newKey.exportJSON() else { - throw Error.invalidKey - } - return json - } else if let newKey = StoredKey.importPrivateKeyWithEncryption(privateKey: privateKeyData, name: "", password: Data(newPassword.utf8), coin: coin, encryption: encryption) { - guard let json = newKey.exportJSON() else { - throw Error.invalidKey - } - return json - } - - throw Error.invalidKey - } - - /// Exports a wallet as private key data. - /// - /// - Parameters: - /// - wallet: wallet to export - /// - password: account password - /// - Returns: private key data for encrypted keys or mnemonic phrase for HD wallets - public func exportPrivateKey(wallet: Wallet, password: String) throws -> Data { - guard let key = wallet.key.decryptPrivateKey(password: Data(password.utf8)) else { - throw Error.invalidPassword - } - return key - } - - /// Exports a wallet as a mnemonic phrase. - /// - /// - Parameters: - /// - wallet: wallet to export - /// - password: account password - /// - Returns: mnemonic phrase - /// - Throws: `EncryptError.invalidMnemonic` if the account is not an HD wallet. - public func exportMnemonic(wallet: Wallet, password: String) throws -> String { - guard let mnemonic = wallet.key.decryptMnemonic(password: Data(password.utf8)) else { - throw Error.invalidPassword - } - return mnemonic - } - - /// Updates the password of an existing account. - /// - /// - Parameters: - /// - wallet: wallet to update - /// - password: current password - /// - newPassword: new password - public func update(wallet: Wallet, password: String, newPassword: String) throws { - try update(wallet: wallet, password: password, newPassword: newPassword, newName: wallet.key.name) - } - - /// Updates the name of an existing account. - /// - /// - Parameters: - /// - wallet: wallet to update - /// - password: current password - /// - newName: new name - public func update(wallet: Wallet, password: String, newName: String, encryption: StoredKeyEncryption = .aes128Ctr) throws { - try update(wallet: wallet, password: password, newPassword: password, newName: newName, encryption: encryption) - } - - private func update(wallet: Wallet, password: String, newPassword: String, newName: String, encryption: StoredKeyEncryption = .aes128Ctr) throws { - guard let index = wallets.firstIndex(of: wallet) else { - fatalError("Missing wallet") - } - - guard var privateKeyData = wallet.key.decryptPrivateKey(password: Data(password.utf8)) else { - throw Error.invalidPassword - } - defer { - privateKeyData.resetBytes(in: 0 ..< privateKeyData.count) - } - - let coins = wallet.accounts.map({ $0.coin }) - guard !coins.isEmpty else { - throw Error.accountNotFound - } - - if let mnemonic = checkMnemonic(privateKeyData), - let key = StoredKey.importHDWalletWithEncryption(mnemonic: mnemonic, name: newName, password: Data(newPassword.utf8), coin: coins[0], encryption: encryption) { - wallets[index].key = key - } else if let key = StoredKey.importPrivateKeyWithEncryption( - privateKey: privateKeyData, name: newName, password: Data(newPassword.utf8), coin: coins[0], encryption: encryption) { - wallets[index].key = key - } else { - throw Error.invalidKey - } - - _ = try wallets[index].getAccounts(password: newPassword, coins: coins) - try save(wallet: wallets[index]) - } - - /// Deletes an account including its key if the password is correct. - public func delete(wallet: Wallet, password: String) throws { - guard let index = wallets.firstIndex(of: wallet) else { - fatalError("Missing wallet") - } - - guard var privateKey = wallet.key.decryptPrivateKey(password: Data(password.utf8)) else { - throw KeyStore.Error.invalidKey - } - defer { - privateKey.resetBytes(in: 0.. URL { - return keyDirectory.appendingPathComponent(generateFileName(identifier: address.description)) - } - - private func makeAccountURL() -> URL { - return keyDirectory.appendingPathComponent(generateFileName(identifier: UUID().uuidString)) - } - - private func save(wallet: Wallet) throws { - _ = wallet.key.store(path: wallet.keyURL.path) - } - - /// Generates a unique file name for an address. - func generateFileName(identifier: String, date: Date = Date(), timeZone: TimeZone = .current) -> String { - // keyFileName implements the naming convention for keyfiles: - // UTC---
- return "UTC--\(filenameTimestamp(for: date, in: timeZone))--\(identifier)" - } - - private func filenameTimestamp(for date: Date, in timeZone: TimeZone = .current) -> String { - var tz = "" - let offset = timeZone.secondsFromGMT() - if offset == 0 { - tz = "Z" - } else { - tz = String(format: "%03d00", offset/60) - } - - let components = Calendar(identifier: .iso8601).dateComponents(in: timeZone, from: date) - return String(format: "%04d-%02d-%02dT%02d-%02d-%02d.%09d%@", - components.year!, components.month!, - components.day!, components.hour!, - components.minute!, components.second!, - components.nanosecond!, tz) - } -} diff --git a/Pods/TrustWalletCore/Sources/SecRandom.m b/Pods/TrustWalletCore/Sources/SecRandom.m deleted file mode 100644 index 4baf4405..00000000 --- a/Pods/TrustWalletCore/Sources/SecRandom.m +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright © 2017-2018 Trust. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -@import Security; - -uint32_t random32(void) { - uint32_t value; - if (SecRandomCopyBytes(kSecRandomDefault, sizeof(value), &value) != errSecSuccess) { - // failed to generate random number - abort(); - } - return value; -} - -void random_buffer(uint8_t *buf, size_t len) { - if (SecRandomCopyBytes(kSecRandomDefault, len, buf) != errSecSuccess) { - // failed to generate random number - abort(); - } -} diff --git a/Pods/TrustWalletCore/Sources/TWCardano.swift b/Pods/TrustWalletCore/Sources/TWCardano.swift deleted file mode 100644 index 1eb456be..00000000 --- a/Pods/TrustWalletCore/Sources/TWCardano.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © 2017-2022 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -public func CardanoMinAdaAmount(tokenBundle: Data) -> UInt64 { - let tokenBundleData = TWDataCreateWithNSData(tokenBundle) - defer { - TWDataDelete(tokenBundleData) - } - return TWCardanoMinAdaAmount(tokenBundleData) -} diff --git a/Pods/TrustWalletCore/Sources/TWData.swift b/Pods/TrustWalletCore/Sources/TWData.swift deleted file mode 100644 index f5cef1d2..00000000 --- a/Pods/TrustWalletCore/Sources/TWData.swift +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -/// Converts a Data struct to TWData/UnsafeRawPointer caller must delete it after use. -public func TWDataCreateWithNSData(_ data: Data) -> UnsafeRawPointer { - return TWDataCreateWithBytes([UInt8](data), data.count) -} - -/// Converts a TWData/UnsafeRawPointer (will be deleted within this call) to a Data struct. -public func TWDataNSData(_ data: UnsafeRawPointer) -> Data { - defer { - TWDataDelete(data) - } - return Data(bytes: TWDataBytes(data), count: TWDataSize(data)) -} diff --git a/Pods/TrustWalletCore/Sources/TWString.swift b/Pods/TrustWalletCore/Sources/TWString.swift deleted file mode 100644 index a9225577..00000000 --- a/Pods/TrustWalletCore/Sources/TWString.swift +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -/// Converts a String struct to TWString/UnsafeRawPointer, caller must delete it after use. -public func TWStringCreateWithNSString(_ string: String) -> UnsafeRawPointer { - return TWStringCreateWithUTF8Bytes([CChar](string.utf8CString)) -} - -/// Converts a TWString/UnsafeRawPointer (will be deleted within this call) to a String struct. -public func TWStringNSString(_ string: UnsafeRawPointer) -> String { - defer { - TWStringDelete(string) - } - return String(utf8String: TWStringUTF8Bytes(string))! -} diff --git a/Pods/TrustWalletCore/Sources/Types/UniversalAssetID.swift b/Pods/TrustWalletCore/Sources/Types/UniversalAssetID.swift deleted file mode 100644 index 9cd4f599..00000000 --- a/Pods/TrustWalletCore/Sources/Types/UniversalAssetID.swift +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright © 2017-2020 Trust. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -// https://developer.trustwallet.com/add_new_asset/universal_asset_id -public struct UniversalAssetID: CustomStringConvertible, Equatable, Hashable { - public enum Prefix: String { - case coin = "c" - case token = "t" - } - - public let coin: CoinType - public let token: String - - public var description: String { - let prefix = "\(Prefix.coin.rawValue)\(coin.rawValue)" - guard !token.isEmpty else { return prefix } - let suffix = "\(Prefix.token.rawValue)\(token)" - return [prefix, suffix].joined(separator: "_") - } - - public init(coin: CoinType, token: String = "") { - self.coin = coin - self.token = token - } - - public init?(string: String) { - guard !string.isEmpty else { return nil } - let parts = string.split(separator: "_") - - var prefix = Prefix.coin.rawValue - guard - parts[0].hasPrefix(prefix), - let int = UInt32(String(parts[0].dropFirst(prefix.count))), - let coin = CoinType(rawValue: int) - else { - return nil - } - self.coin = coin - - prefix = Prefix.token.rawValue - if parts.count == 2 { - if !parts[1].hasPrefix(prefix) { - return nil - } - self.token = String(parts[1].dropFirst(prefix.count)) - } else { - self.token = "" - } - } -} - -extension UniversalAssetID: Codable { - public init(from decoder: Decoder) throws { - let container = try decoder.singleValueContainer() - let value = try container.decode(String.self) - guard let id = UniversalAssetID(string: value) else { - throw DecodingError.dataCorruptedError(in: container, debugDescription: "Invalid asset id") - } - self = id - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.singleValueContainer() - try container.encode(description) - } -} diff --git a/Pods/TrustWalletCore/Sources/Wallet.swift b/Pods/TrustWalletCore/Sources/Wallet.swift deleted file mode 100644 index 04749b5d..00000000 --- a/Pods/TrustWalletCore/Sources/Wallet.swift +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright © 2017-2018 Trust. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -/// Coin wallet. -public final class Wallet: Hashable, Equatable { - /// Unique wallet identifier. - public let identifier: String - - /// URL for the key file on disk. - public var keyURL: URL - - /// Encrypted wallet key - public var key: StoredKey - - public var accounts: [Account] { - return (0.. Account { - let wallet = key.wallet(password: Data(password.utf8)) - guard let account = key.accountForCoin(coin: coin, wallet: wallet) else { - throw KeyStore.Error.invalidPassword - } - return account - } - - /// Returns the account for a specific coin and derivation. - /// - /// - Parameters: - /// - password: wallet encryption password - /// - coin: coin type - /// - derivation: derivation, a specific or default - /// - Returns: the account - /// - Throws: `KeyStore.Error.invalidPassword` if the password is incorrect. - public func getAccount(password: String, coin: CoinType, derivation: Derivation) throws -> Account { - let wallet = key.wallet(password: Data(password.utf8)) - guard let account = key.accountForCoinDerivation(coin: coin, derivation: derivation, wallet: wallet) else { - throw KeyStore.Error.invalidPassword - } - return account - } - - /// Returns the accounts for a specific coins. - /// - /// - Parameters: - /// - password: wallet encryption password - /// - coins: coins to add accounts for - /// - Returns: the added accounts - /// - Throws: `KeyStore.Error.invalidPassword` if the password is incorrect. - public func getAccounts(password: String, coins: [CoinType]) throws -> [Account] { - guard let wallet = key.wallet(password: Data(password.utf8)) else { - throw KeyStore.Error.invalidPassword - } - return coins.compactMap({ key.accountForCoin(coin: $0, wallet: wallet) }) - } - - /// Returns the private key for a specific coin. - /// - /// - Parameters: - /// - password: wallet encryption password - /// - coin: coin type - /// - Returns: the private key - /// - Throws: `KeyStore.Error.invalidPassword` if the password is incorrect. - public func privateKey(password: String, coin: CoinType) throws -> PrivateKey { - guard let pk = key.privateKey(coin: coin, password: Data(password.utf8)) else { - throw KeyStore.Error.invalidPassword - } - return pk - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(identifier) - } - - public static func == (lhs: Wallet, rhs: Wallet) -> Bool { - return lhs.identifier == rhs.identifier - } -} - -/// Support account types. -public enum WalletType { - case encryptedKey - case hierarchicalDeterministicWallet -} - -public enum WalletError: LocalizedError { - case invalidKeyType -} diff --git a/Pods/TrustWalletCore/Sources/Watch.swift b/Pods/TrustWalletCore/Sources/Watch.swift deleted file mode 100644 index c81e207c..00000000 --- a/Pods/TrustWalletCore/Sources/Watch.swift +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright © 2017-2018 Trust. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -import Foundation - -/// An account watch. -public struct Watch: Codable, Equatable { - /// Coin type. - public var coin: CoinType - - /// Account name - public var name: String - - /// Account address. - public var address: String - - /// Account xpub. - public var xpub: String? - - public init(coin: CoinType, name: String, address: String, xpub: String?) { - self.coin = coin - self.name = name - self.address = address - self.xpub = xpub - } - - enum CodingKeys: CodingKey { - case coin - case name - case address - case xpub - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - guard let coin = CoinType(rawValue: try container.decode(CoinType.RawValue.self, forKey: .coin)) else { - throw DecodingError.dataCorruptedError(forKey: CodingKeys.coin, in: container, debugDescription: "Invalid coin type") - } - self.coin = coin - name = try container.decodeIfPresent(String.self, forKey: .name) ?? "" - address = try container.decode(String.self, forKey: .address) - xpub = try container.decodeIfPresent(String.self, forKey: .xpub) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(coin.rawValue, forKey: .coin) - try container.encode(name, forKey: .name) - try container.encode(address, forKey: .address) - try container.encodeIfPresent(xpub, forKey: .xpub) - } -} diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWAES.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWAES.h deleted file mode 100644 index 383804ce..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWAES.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWAESPaddingMode.h" - -TW_EXTERN_C_BEGIN - -/// AES encryption/decryption methods. -TW_EXPORT_STRUCT -struct TWAES { - uint8_t unused; // C doesn't allow zero-sized struct -}; - -/// Encrypts a block of Data using AES in Cipher Block Chaining (CBC) mode. -/// -/// \param key encryption key Data, must be 16, 24, or 32 bytes long. -/// \param data Data to encrypt. -/// \param iv initialization vector. -/// \param mode padding mode. -/// \return encrypted Data. -TW_EXPORT_STATIC_METHOD -TWData *_Nullable TWAESEncryptCBC(TWData *_Nonnull key, TWData *_Nonnull data, TWData *_Nonnull iv, enum TWAESPaddingMode mode); - -/// Decrypts a block of data using AES in Cipher Block Chaining (CBC) mode. -/// -/// \param key decryption key Data, must be 16, 24, or 32 bytes long. -/// \param data Data to decrypt. -/// \param iv initialization vector Data. -/// \param mode padding mode. -/// \return decrypted Data. -TW_EXPORT_STATIC_METHOD -TWData *_Nullable TWAESDecryptCBC(TWData *_Nonnull key, TWData *_Nonnull data, TWData *_Nonnull iv, enum TWAESPaddingMode mode); - -/// Encrypts a block of data using AES in Counter (CTR) mode. -/// -/// \param key encryption key Data, must be 16, 24, or 32 bytes long. -/// \param data Data to encrypt. -/// \param iv initialization vector Data. -/// \return encrypted Data. -TW_EXPORT_STATIC_METHOD -TWData *_Nullable TWAESEncryptCTR(TWData *_Nonnull key, TWData *_Nonnull data, TWData *_Nonnull iv); - -/// Decrypts a block of data using AES in Counter (CTR) mode. -/// -/// \param key decryption key Data, must be 16, 24, or 32 bytes long. -/// \param data Data to decrypt. -/// \param iv initialization vector Data. -/// \return decrypted Data. -TW_EXPORT_STATIC_METHOD -TWData *_Nullable TWAESDecryptCTR(TWData *_Nonnull key, TWData *_Nonnull data, TWData *_Nonnull iv); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWAESPaddingMode.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWAESPaddingMode.h deleted file mode 100644 index b9e7c707..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWAESPaddingMode.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Padding mode used in AES encryption. -TW_EXPORT_ENUM(uint32_t) -enum TWAESPaddingMode { - TWAESPaddingModeZero = 0, // padding value is zero - TWAESPaddingModePKCS7 = 1, // padding value is the number of padding bytes; for even size add an extra block -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWAccount.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWAccount.h deleted file mode 100644 index adb6f8a9..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWAccount.h +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWCoinType.h" -#include "TWDerivation.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Represents an Account in C++ with address, coin type and public key info, an item within a keystore. -TW_EXPORT_CLASS -struct TWAccount; - -/// Creates a new Account with an address, a coin type, derivation enum, derivationPath, publicKey, -/// and extendedPublicKey. Must be deleted with TWAccountDelete after use. -/// -/// \param address The address of the Account. -/// \param coin The coin type of the Account. -/// \param derivation The derivation of the Account. -/// \param derivationPath The derivation path of the Account. -/// \param publicKey hex encoded public key. -/// \param extendedPublicKey Base58 encoded extended public key. -/// \return A new Account. -TW_EXPORT_STATIC_METHOD -struct TWAccount* _Nonnull TWAccountCreate(TWString* _Nonnull address, - enum TWCoinType coin, - enum TWDerivation derivation, - TWString* _Nonnull derivationPath, - TWString* _Nonnull publicKey, - TWString* _Nonnull extendedPublicKey); -/// Deletes an account. -/// -/// \param account Account to delete. -TW_EXPORT_METHOD -void TWAccountDelete(struct TWAccount *_Nonnull account); - -/// Returns the address of an account. -/// -/// \param account Account to get the address of. -TW_EXPORT_PROPERTY -TWString *_Nonnull TWAccountAddress(struct TWAccount *_Nonnull account); - -/// Return CoinType enum of an account. -/// -/// \param account Account to get the coin type of. -TW_EXPORT_PROPERTY -enum TWCoinType TWAccountCoin(struct TWAccount* _Nonnull account); - -/// Returns the derivation enum of an account. -/// -/// \param account Account to get the derivation enum of. -TW_EXPORT_PROPERTY -enum TWDerivation TWAccountDerivation(struct TWAccount *_Nonnull account); - -/// Returns derivationPath of an account. -/// -/// \param account Account to get the derivation path of. -TW_EXPORT_PROPERTY -TWString *_Nonnull TWAccountDerivationPath(struct TWAccount *_Nonnull account); - -/// Returns hex encoded publicKey of an account. -/// -/// \param account Account to get the public key of. -TW_EXPORT_PROPERTY -TWString* _Nonnull TWAccountPublicKey(struct TWAccount* _Nonnull account); - -/// Returns Base58 encoded extendedPublicKey of an account. -/// -/// \param account Account to get the extended public key of. -TW_EXPORT_PROPERTY -TWString* _Nonnull TWAccountExtendedPublicKey(struct TWAccount* _Nonnull account); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWAeternityProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWAeternityProto.h deleted file mode 100644 index 6f55a385..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWAeternityProto.h +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Aeternity_Proto_SigningInput; -typedef TWData *_Nonnull TW_Aeternity_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWAionProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWAionProto.h deleted file mode 100644 index 7604a45d..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWAionProto.h +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Aion_Proto_SigningInput; -typedef TWData *_Nonnull TW_Aion_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWAlgorandProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWAlgorandProto.h deleted file mode 100644 index defcf158..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWAlgorandProto.h +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Algorand_Proto_Transfer; -typedef TWData *_Nonnull TW_Algorand_Proto_AssetTransfer; -typedef TWData *_Nonnull TW_Algorand_Proto_AssetOptIn; -typedef TWData *_Nonnull TW_Algorand_Proto_SigningInput; -typedef TWData *_Nonnull TW_Algorand_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWAnyAddress.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWAnyAddress.h deleted file mode 100644 index ce501489..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWAnyAddress.h +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWCoinType.h" -#include "TWData.h" -#include "TWFilecoinAddressType.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -struct TWPublicKey; - -/// Represents an address in C++ for almost any blockchain. -TW_EXPORT_CLASS -struct TWAnyAddress; - -/// Compares two addresses for equality. -/// -/// \param lhs The first address to compare. -/// \param rhs The second address to compare. -/// \return bool indicating the addresses are equal. -TW_EXPORT_STATIC_METHOD -bool TWAnyAddressEqual(struct TWAnyAddress* _Nonnull lhs, struct TWAnyAddress* _Nonnull rhs); - -/// Determines if the string is a valid Any address. -/// -/// \param string address to validate. -/// \param coin coin type of the address. -/// \return bool indicating if the address is valid. -TW_EXPORT_STATIC_METHOD -bool TWAnyAddressIsValid(TWString* _Nonnull string, enum TWCoinType coin); - -/// Determines if the string is a valid Any address with the given hrp. -/// -/// \param string address to validate. -/// \param coin coin type of the address. -/// \param hrp explicit given hrp of the given address. -/// \return bool indicating if the address is valid. -TW_EXPORT_STATIC_METHOD -bool TWAnyAddressIsValidBech32(TWString* _Nonnull string, enum TWCoinType coin, TWString* _Nonnull hrp); - -/// Determines if the string is a valid Any address with the given SS58 network prefix. -/// -/// \param string address to validate. -/// \param coin coin type of the address. -/// \param ss58Prefix ss58Prefix of the given address. -/// \return bool indicating if the address is valid. -TW_EXPORT_STATIC_METHOD -bool TWAnyAddressIsValidSS58(TWString* _Nonnull string, enum TWCoinType coin, uint32_t ss58Prefix); - -/// Creates an address from a string representation and a coin type. Must be deleted with TWAnyAddressDelete after use. -/// -/// \param string address to create. -/// \param coin coin type of the address. -/// \return TWAnyAddress pointer or nullptr if address and coin are invalid. -TW_EXPORT_STATIC_METHOD -struct TWAnyAddress* _Nullable TWAnyAddressCreateWithString(TWString* _Nonnull string, enum TWCoinType coin); - -/// Creates an bech32 address from a string representation, a coin type and the given hrp. Must be deleted with TWAnyAddressDelete after use. -/// -/// \param string address to create. -/// \param coin coin type of the address. -/// \param hrp hrp of the address. -/// \return TWAnyAddress pointer or nullptr if address and coin are invalid. -TW_EXPORT_STATIC_METHOD -struct TWAnyAddress* _Nullable TWAnyAddressCreateBech32(TWString* _Nonnull string, enum TWCoinType coin, TWString* _Nonnull hrp); - -/// Creates an SS58 address from a string representation, a coin type and the given ss58Prefix. Must be deleted with TWAnyAddressDelete after use. -/// -/// \param string address to create. -/// \param coin coin type of the address. -/// \param ss58Prefix ss58Prefix of the SS58 address. -/// \return TWAnyAddress pointer or nullptr if address and coin are invalid. -TW_EXPORT_STATIC_METHOD -struct TWAnyAddress* _Nullable TWAnyAddressCreateSS58(TWString* _Nonnull string, enum TWCoinType coin, uint32_t ss58Prefix); - - -/// Creates an address from a public key. -/// -/// \param publicKey derivates the address from the public key. -/// \param coin coin type of the address. -/// \return TWAnyAddress pointer or nullptr if public key is invalid. -TW_EXPORT_STATIC_METHOD -struct TWAnyAddress* _Nonnull TWAnyAddressCreateWithPublicKey(struct TWPublicKey* _Nonnull publicKey, enum TWCoinType coin); - -/// Creates an address from a public key and derivation option. -/// -/// \param publicKey derivates the address from the public key. -/// \param coin coin type of the address. -/// \param derivation the custom derivation to use. -/// \return TWAnyAddress pointer or nullptr if public key is invalid. -TW_EXPORT_STATIC_METHOD -struct TWAnyAddress* _Nonnull TWAnyAddressCreateWithPublicKeyDerivation(struct TWPublicKey* _Nonnull publicKey, enum TWCoinType coin, enum TWDerivation derivation); - -/// Creates an bech32 address from a public key and a given hrp. -/// -/// \param publicKey derivates the address from the public key. -/// \param coin coin type of the address. -/// \param hrp hrp of the address. -/// \return TWAnyAddress pointer or nullptr if public key is invalid. -TW_EXPORT_STATIC_METHOD -struct TWAnyAddress* _Nonnull TWAnyAddressCreateBech32WithPublicKey(struct TWPublicKey* _Nonnull publicKey, enum TWCoinType coin, TWString* _Nonnull hrp); - -/// Creates an SS58 address from a public key and a given ss58Prefix. -/// -/// \param publicKey derivates the address from the public key. -/// \param coin coin type of the address. -/// \param ss58Prefix ss58Prefix of the SS58 address. -/// \return TWAnyAddress pointer or nullptr if public key is invalid. -TW_EXPORT_STATIC_METHOD -struct TWAnyAddress* _Nonnull TWAnyAddressCreateSS58WithPublicKey(struct TWPublicKey* _Nonnull publicKey, enum TWCoinType coin, uint32_t ss58Prefix); - -/// Creates a Filecoin address from a public key and a given address type. -/// -/// \param publicKey derivates the address from the public key. -/// \param filecoinAddressType Filecoin address type. -/// \return TWAnyAddress pointer or nullptr if public key is invalid. -TW_EXPORT_STATIC_METHOD -struct TWAnyAddress* _Nonnull TWAnyAddressCreateWithPublicKeyFilecoinAddressType(struct TWPublicKey* _Nonnull publicKey, enum TWFilecoinAddressType filecoinAddressType); - -/// Deletes an address. -/// -/// \param address address to delete. -TW_EXPORT_METHOD -void TWAnyAddressDelete(struct TWAnyAddress* _Nonnull address); - -/// Returns the address string representation. -/// -/// \param address address to get the string representation of. -TW_EXPORT_PROPERTY -TWString* _Nonnull TWAnyAddressDescription(struct TWAnyAddress* _Nonnull address); - -/// Returns coin type of address. -/// -/// \param address address to get the coin type of. -TW_EXPORT_PROPERTY -enum TWCoinType TWAnyAddressCoin(struct TWAnyAddress* _Nonnull address); - -/// Returns underlaying data (public key or key hash) -/// -/// \param address address to get the data of. -TW_EXPORT_PROPERTY -TWData* _Nonnull TWAnyAddressData(struct TWAnyAddress* _Nonnull address); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWAnySigner.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWAnySigner.h deleted file mode 100644 index 25cebe5c..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWAnySigner.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -#pragma once - -#include "TWBase.h" -#include "TWCoinType.h" -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Represents a signer to sign transactions for any blockchain. -struct TWAnySigner; - -/// Signs a transaction specified by the signing input and coin type. -/// -/// \param input The serialized data of a signing input (e.g. TW.Bitcoin.Proto.SigningInput). -/// \param coin The given coin type to sign the transaction for. -/// \return The serialized data of a `SigningOutput` proto object. (e.g. TW.Bitcoin.Proto.SigningOutput). -extern TWData *_Nonnull TWAnySignerSign(TWData *_Nonnull input, enum TWCoinType coin); - -/// Signs a transaction specified by the JSON representation of signing input, coin type and a private key, returning the JSON representation of the signing output. -/// -/// \param json JSON representation of a signing input -/// \param key The private key to sign with. -/// \param coin The given coin type to sign the transaction for. -/// \return The JSON representation of a `SigningOutput` proto object. -extern TWString *_Nonnull TWAnySignerSignJSON(TWString *_Nonnull json, TWData *_Nonnull key, enum TWCoinType coin); - -/// Check if AnySigner supports signing JSON representation of signing input. -/// -/// \param coin The given coin type to sign the transaction for. -/// \return true if AnySigner supports signing JSON representation of signing input for a given coin. -extern bool TWAnySignerSupportsJSON(enum TWCoinType coin); - -/// Plans a transaction (for UTXO chains only). -/// -/// \param input The serialized data of a signing input -/// \param coin The given coin type to plan the transaction for. -/// \return The serialized data of a `TransactionPlan` proto object. -extern TWData *_Nonnull TWAnySignerPlan(TWData *_Nonnull input, enum TWCoinType coin); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWAptosProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWAptosProto.h deleted file mode 100644 index f3884995..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWAptosProto.h +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Aptos_Proto_TransferMessage; -typedef TWData *_Nonnull TW_Aptos_Proto_StructTag; -typedef TWData *_Nonnull TW_Aptos_Proto_TokenTransferMessage; -typedef TWData *_Nonnull TW_Aptos_Proto_TokenTransferCoinsMessage; -typedef TWData *_Nonnull TW_Aptos_Proto_ManagedTokensRegisterMessage; -typedef TWData *_Nonnull TW_Aptos_Proto_CreateAccountMessage; -typedef TWData *_Nonnull TW_Aptos_Proto_OfferNftMessage; -typedef TWData *_Nonnull TW_Aptos_Proto_CancelOfferNftMessage; -typedef TWData *_Nonnull TW_Aptos_Proto_ClaimNftMessage; -typedef TWData *_Nonnull TW_Aptos_Proto_TortugaClaim; -typedef TWData *_Nonnull TW_Aptos_Proto_TortugaStake; -typedef TWData *_Nonnull TW_Aptos_Proto_TortugaUnstake; -typedef TWData *_Nonnull TW_Aptos_Proto_LiquidStaking; -typedef TWData *_Nonnull TW_Aptos_Proto_NftMessage; -typedef TWData *_Nonnull TW_Aptos_Proto_SigningInput; -typedef TWData *_Nonnull TW_Aptos_Proto_TransactionAuthenticator; -typedef TWData *_Nonnull TW_Aptos_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWAsnParser.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWAsnParser.h deleted file mode 100644 index 67d0c658..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWAsnParser.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWData.h" - -TW_EXTERN_C_BEGIN - -/// Represents an ASN.1 DER parser. -TW_EXPORT_STRUCT -struct TWAsnParser; - -/// Parses the given ECDSA signature from ASN.1 DER encoded bytes. -/// -/// \param encoded The ASN.1 DER encoded signature. -/// \return The ECDSA signature standard binary representation: RS, where R - 32 byte array, S - 32 byte array. -TW_EXPORT_STATIC_METHOD -TWData* _Nullable TWAsnParserEcdsaSignatureFromDer(TWData* _Nonnull encoded); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBarz.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBarz.h deleted file mode 100644 index 3bc08ed3..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBarz.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" -#include "TWPublicKey.h" - -TW_EXTERN_C_BEGIN - -/// Barz functions -TW_EXPORT_STRUCT -struct TWBarz; - -/// Calculate a counterfactual address for the smart contract wallet -/// -/// \param input The serialized data of ContractAddressInput. -/// \return The address. -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWBarzGetCounterfactualAddress(TWData *_Nonnull input); - -/// Returns the init code parameter of ERC-4337 User Operation -/// -/// \param factory Wallet factory address (BarzFactory) -/// \param publicKey Public key for the verification facet -/// \param verificationFacet Verification facet address -/// \return The address. -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWBarzGetInitCode(TWString* _Nonnull factory, struct TWPublicKey* _Nonnull publicKey, TWString* _Nonnull verificationFacet, uint32_t salt); - -/// Converts the original ASN-encoded signature from webauthn to the format accepted by Barz -/// -/// \param signature Original signature -/// \param challenge The original challenge that was signed -/// \param authenticatorData Returned from Webauthn API -/// \param clientDataJSON Returned from Webauthn API -/// \return Bytes of the formatted signature -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWBarzGetFormattedSignature(TWData* _Nonnull signature, TWData* _Nonnull challenge, TWData* _Nonnull authenticatorData, TWString* _Nonnull clientDataJSON); -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBarzProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBarzProto.h deleted file mode 100644 index 682344a2..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBarzProto.h +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Barz_Proto_ContractAddressInput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBase.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBase.h deleted file mode 100644 index f0486654..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBase.h +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#if !defined(TW_EXTERN_C_BEGIN) -#if defined(__cplusplus) -#define TW_EXTERN_C_BEGIN extern "C" { -#define TW_EXTERN_C_END } -#else -#define TW_EXTERN_C_BEGIN -#define TW_EXTERN_C_END -#endif -#endif - -// Marker for default visibility -#define TW_VISIBILITY_DEFAULT __attribute__((visibility("default"))) - -// Marker for exported classes -#define TW_EXPORT_CLASS - -// Marker for exported structs -#define TW_EXPORT_STRUCT - -// Marker for exported enums -#define TW_EXPORT_ENUM(type) - -// Marker for exported functions -#define TW_EXPORT_FUNC extern - -// Marker for exported methods -#define TW_EXPORT_METHOD extern - -// Marker for exported properties -#define TW_EXPORT_PROPERTY extern - -// Marker for exported static methods -#define TW_EXPORT_STATIC_METHOD extern - -// Marker for exported static properties -#define TW_EXPORT_STATIC_PROPERTY extern - -// Marker for discardable result (static) method -#define TW_METHOD_DISCARDABLE_RESULT - -// Marker for Protobuf types to be serialized across the interface -#define PROTO(x) TWData * - -#if __has_feature(assume_nonnull) -#define TW_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") -#define TW_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") -#else -#define TW_ASSUME_NONNULL_BEGIN -#define TW_ASSUME_NONNULL_END -#endif - -#if defined(__cplusplus) && (__cplusplus >= 201402L) -# define TW_DEPRECATED(since) [[deprecated("Since " #since)]] -# define TW_DEPRECATED_FOR(since, replacement) [[deprecated("Since " #since "; use " #replacement)]] -#else -# define TW_DEPRECATED(since) -# define TW_DEPRECATED_FOR(since, replacement) -#endif - -#if !__has_feature(nullability) -#ifndef _Nullable -#define _Nullable -#endif -#ifndef _Nonnull -#define _Nonnull -#endif -#ifndef _Null_unspecified -#define _Null_unspecified -#endif -#endif - -#include -#include -#include -#include diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBase32.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBase32.h deleted file mode 100644 index 153d348f..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBase32.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Base32 encode / decode functions -TW_EXPORT_STRUCT -struct TWBase32; - -/// Decode a Base32 input with the given alphabet -/// -/// \param string Encoded base32 input to be decoded -/// \param alphabet Decode with the given alphabet, if nullptr ALPHABET_RFC4648 is used by default -/// \return The decoded data, can be null. -/// \note ALPHABET_RFC4648 doesn't support padding in the default alphabet -TW_EXPORT_STATIC_METHOD -TWData* _Nullable TWBase32DecodeWithAlphabet(TWString* _Nonnull string, TWString* _Nullable alphabet); - -/// Decode a Base32 input with the default alphabet (ALPHABET_RFC4648) -/// -/// \param string Encoded input to be decoded -/// \return The decoded data -/// \note Call TWBase32DecodeWithAlphabet with nullptr. -TW_EXPORT_STATIC_METHOD -TWData* _Nullable TWBase32Decode(TWString* _Nonnull string); - -/// Encode an input to Base32 with the given alphabet -/// -/// \param data Data to be encoded (raw bytes) -/// \param alphabet Encode with the given alphabet, if nullptr ALPHABET_RFC4648 is used by default -/// \return The encoded data -/// \note ALPHABET_RFC4648 doesn't support padding in the default alphabet -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWBase32EncodeWithAlphabet(TWData *_Nonnull data, TWString* _Nullable alphabet); - -/// Encode an input to Base32 with the default alphabet (ALPHABET_RFC4648) -/// -/// \param data Data to be encoded (raw bytes) -/// \return The encoded data -/// \note Call TWBase32EncodeWithAlphabet with nullptr. -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWBase32Encode(TWData *_Nonnull data); - -TW_EXTERN_C_END - diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBase58.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBase58.h deleted file mode 100644 index 87a3cbe7..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBase58.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Base58 encode / decode functions -TW_EXPORT_STRUCT -struct TWBase58; - -/// Encodes data as a Base58 string, including the checksum. -/// -/// \param data The data to encode. -/// \return the encoded Base58 string with checksum. -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWBase58Encode(TWData *_Nonnull data); - -/// Encodes data as a Base58 string, not including the checksum. -/// -/// \param data The data to encode. -/// \return then encoded Base58 string without checksum. -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWBase58EncodeNoCheck(TWData *_Nonnull data); - -/// Decodes a Base58 string, checking the checksum. Returns null if the string is not a valid Base58 string. -/// -/// \param string The Base58 string to decode. -/// \return the decoded data, empty if the string is not a valid Base58 string with checksum. -TW_EXPORT_STATIC_METHOD -TWData *_Nullable TWBase58Decode(TWString *_Nonnull string); - -/// Decodes a Base58 string, w/o checking the checksum. Returns null if the string is not a valid Base58 string. -/// -/// \param string The Base58 string to decode. -/// \return the decoded data, empty if the string is not a valid Base58 string without checksum. -TW_EXPORT_STATIC_METHOD -TWData *_Nullable TWBase58DecodeNoCheck(TWString *_Nonnull string); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBase64.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBase64.h deleted file mode 100644 index 7ca0c374..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBase64.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Base64 encode / decode functions -TW_EXPORT_STRUCT -struct TWBase64; - -/// Decode a Base64 input with the default alphabet (RFC4648 with '+', '/') -/// -/// \param string Encoded input to be decoded -/// \return The decoded data, empty if decoding failed. -TW_EXPORT_STATIC_METHOD -TWData* _Nullable TWBase64Decode(TWString* _Nonnull string); - -/// Decode a Base64 input with the alphabet safe for URL-s and filenames (RFC4648 with '-', '_') -/// -/// \param string Encoded base64 input to be decoded -/// \return The decoded data, empty if decoding failed. -TW_EXPORT_STATIC_METHOD -TWData* _Nullable TWBase64DecodeUrl(TWString* _Nonnull string); - -/// Encode an input to Base64 with the default alphabet (RFC4648 with '+', '/') -/// -/// \param data Data to be encoded (raw bytes) -/// \return The encoded data -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWBase64Encode(TWData *_Nonnull data); - -/// Encode an input to Base64 with the alphabet safe for URL-s and filenames (RFC4648 with '-', '_') -/// -/// \param data Data to be encoded (raw bytes) -/// \return The encoded data -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWBase64EncodeUrl(TWData *_Nonnull data); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBinanceProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBinanceProto.h deleted file mode 100644 index 37f21175..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBinanceProto.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Binance_Proto_Transaction; -typedef TWData *_Nonnull TW_Binance_Proto_Signature; -typedef TWData *_Nonnull TW_Binance_Proto_TradeOrder; -typedef TWData *_Nonnull TW_Binance_Proto_CancelTradeOrder; -typedef TWData *_Nonnull TW_Binance_Proto_SendOrder; -typedef TWData *_Nonnull TW_Binance_Proto_TokenIssueOrder; -typedef TWData *_Nonnull TW_Binance_Proto_TokenMintOrder; -typedef TWData *_Nonnull TW_Binance_Proto_TokenBurnOrder; -typedef TWData *_Nonnull TW_Binance_Proto_TokenFreezeOrder; -typedef TWData *_Nonnull TW_Binance_Proto_TokenUnfreezeOrder; -typedef TWData *_Nonnull TW_Binance_Proto_HTLTOrder; -typedef TWData *_Nonnull TW_Binance_Proto_DepositHTLTOrder; -typedef TWData *_Nonnull TW_Binance_Proto_ClaimHTLOrder; -typedef TWData *_Nonnull TW_Binance_Proto_RefundHTLTOrder; -typedef TWData *_Nonnull TW_Binance_Proto_TransferOut; -typedef TWData *_Nonnull TW_Binance_Proto_SideChainDelegate; -typedef TWData *_Nonnull TW_Binance_Proto_SideChainRedelegate; -typedef TWData *_Nonnull TW_Binance_Proto_SideChainUndelegate; -typedef TWData *_Nonnull TW_Binance_Proto_TimeLockOrder; -typedef TWData *_Nonnull TW_Binance_Proto_TimeRelockOrder; -typedef TWData *_Nonnull TW_Binance_Proto_TimeUnlockOrder; -typedef TWData *_Nonnull TW_Binance_Proto_SigningInput; -typedef TWData *_Nonnull TW_Binance_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinAddress.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinAddress.h deleted file mode 100644 index 1ef667bf..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinAddress.h +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -struct TWPublicKey; - -/// Represents a legacy Bitcoin address in C++. -TW_EXPORT_CLASS -struct TWBitcoinAddress; - -/// Compares two addresses for equality. -/// -/// \param lhs The first address to compare. -/// \param rhs The second address to compare. -/// \return bool indicating the addresses are equal. -TW_EXPORT_STATIC_METHOD -bool TWBitcoinAddressEqual(struct TWBitcoinAddress *_Nonnull lhs, struct TWBitcoinAddress *_Nonnull rhs); - -/// Determines if the data is a valid Bitcoin address. -/// -/// \param data data to validate. -/// \return bool indicating if the address data is valid. -TW_EXPORT_STATIC_METHOD -bool TWBitcoinAddressIsValid(TWData *_Nonnull data); - -/// Determines if the string is a valid Bitcoin address. -/// -/// \param string string to validate. -/// \return bool indicating if the address string is valid. -TW_EXPORT_STATIC_METHOD -bool TWBitcoinAddressIsValidString(TWString *_Nonnull string); - -/// Initializes an address from a Base58 sring. Must be deleted with TWBitcoinAddressDelete after use. -/// -/// \param string Base58 string to initialize the address from. -/// \return TWBitcoinAddress pointer or nullptr if string is invalid. -TW_EXPORT_STATIC_METHOD -struct TWBitcoinAddress *_Nullable TWBitcoinAddressCreateWithString(TWString *_Nonnull string); - -/// Initializes an address from raw data. -/// -/// \param data Raw data to initialize the address from. Must be deleted with TWBitcoinAddressDelete after use. -/// \return TWBitcoinAddress pointer or nullptr if data is invalid. -TW_EXPORT_STATIC_METHOD -struct TWBitcoinAddress *_Nullable TWBitcoinAddressCreateWithData(TWData *_Nonnull data); - -/// Initializes an address from a public key and a prefix byte. -/// -/// \param publicKey Public key to initialize the address from. -/// \param prefix Prefix byte (p2pkh, p2sh, etc). -/// \return TWBitcoinAddress pointer or nullptr if public key is invalid. -TW_EXPORT_STATIC_METHOD -struct TWBitcoinAddress *_Nullable TWBitcoinAddressCreateWithPublicKey(struct TWPublicKey *_Nonnull publicKey, uint8_t prefix); - -/// Deletes a legacy Bitcoin address. -/// -/// \param address Address to delete. -TW_EXPORT_METHOD -void TWBitcoinAddressDelete(struct TWBitcoinAddress *_Nonnull address); - -/// Returns the address in Base58 string representation. -/// -/// \param address Address to get the string representation of. -TW_EXPORT_PROPERTY -TWString *_Nonnull TWBitcoinAddressDescription(struct TWBitcoinAddress *_Nonnull address); - -/// Returns the address prefix. -/// -/// \param address Address to get the prefix of. -TW_EXPORT_PROPERTY -uint8_t TWBitcoinAddressPrefix(struct TWBitcoinAddress *_Nonnull address); - -/// Returns the key hash data. -/// -/// \param address Address to get the keyhash data of. -TW_EXPORT_PROPERTY -TWData *_Nonnull TWBitcoinAddressKeyhash(struct TWBitcoinAddress *_Nonnull address); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinFee.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinFee.h deleted file mode 100644 index 33dc9c6c..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinFee.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -TW_EXPORT_CLASS -struct TWBitcoinFee; - -/// Calculates the fee of any Bitcoin transaction. -/// -/// \param data: the signed transaction in its final form. -/// \param satVb: the satoshis per vbyte amount. The passed on string is interpreted as a unit64_t. -/// \returns the fee denominated in satoshis or nullptr if the transaction failed to be decoded. -TW_EXPORT_STATIC_METHOD -TWString* _Nullable TWBitcoinFeeCalculateFee(TWData* _Nonnull data, TWString* _Nonnull satVb); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinMessageSigner.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinMessageSigner.h deleted file mode 100644 index 6b09918f..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinMessageSigner.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" -#include "TWPrivateKey.h" - -TW_EXTERN_C_BEGIN - -/// Bitcoin message signing and verification. -/// -/// Bitcoin Core and some other wallets support a message signing & verification format, to create a proof (a signature) -/// that someone has access to the private keys of a specific address. -/// This feature currently works on old legacy addresses only. -TW_EXPORT_STRUCT -struct TWBitcoinMessageSigner; - -/// Sign a message. -/// -/// \param privateKey: the private key used for signing -/// \param address: the address that matches the privateKey, must be a legacy address (P2PKH) -/// \param message: A custom message which is input to the signing. -/// \note Address is derived assuming compressed public key format. -/// \returns the signature, Base64-encoded. On invalid input empty string is returned. Returned object needs to be deleteed after use. -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWBitcoinMessageSignerSignMessage(const struct TWPrivateKey* _Nonnull privateKey, TWString* _Nonnull address, TWString* _Nonnull message); - -/// Verify signature for a message. -/// -/// \param address: address to use, only legacy is supported -/// \param message: the message signed (without prefix) -/// \param signature: in Base64-encoded form. -/// \returns false on any invalid input (does not throw). -TW_EXPORT_STATIC_METHOD -bool TWBitcoinMessageSignerVerifyMessage(TWString* _Nonnull address, TWString* _Nonnull message, TWString* _Nonnull signature); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinProto.h deleted file mode 100644 index c84c1fe4..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinProto.h +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Bitcoin_Proto_Transaction; -typedef TWData *_Nonnull TW_Bitcoin_Proto_TransactionInput; -typedef TWData *_Nonnull TW_Bitcoin_Proto_OutPoint; -typedef TWData *_Nonnull TW_Bitcoin_Proto_TransactionOutput; -typedef TWData *_Nonnull TW_Bitcoin_Proto_UnspentTransaction; -typedef TWData *_Nonnull TW_Bitcoin_Proto_OutputAddress; -typedef TWData *_Nonnull TW_Bitcoin_Proto_SigningInput; -typedef TWData *_Nonnull TW_Bitcoin_Proto_TransactionPlan; -typedef TWData *_Nonnull TW_Bitcoin_Proto_SigningOutput; -typedef TWData *_Nonnull TW_Bitcoin_Proto_HashPublicKey; -typedef TWData *_Nonnull TW_Bitcoin_Proto_PreSigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinScript.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinScript.h deleted file mode 100644 index 94ed5ce0..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinScript.h +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWBitcoinSigHashType.h" -#include "TWCoinType.h" -#include "TWData.h" -#include "TWPublicKey.h" - -TW_EXTERN_C_BEGIN - -/// Bitcoin script manipulating functions -TW_EXPORT_CLASS -struct TWBitcoinScript; - -/// Creates an empty script. -/// -/// \return A pointer to the script -TW_EXPORT_STATIC_METHOD -struct TWBitcoinScript* _Nonnull TWBitcoinScriptCreate(); - -/// Creates a script from a raw data representation. -/// -/// \param data The data buffer -/// \note Must be deleted with \TWBitcoinScriptDelete -/// \return A pointer to the script -TW_EXPORT_STATIC_METHOD -struct TWBitcoinScript* _Nonnull TWBitcoinScriptCreateWithData(TWData* _Nonnull data); - -/// Creates a script from a raw bytes and size. -/// -/// \param bytes The buffer -/// \param size The size of the buffer -/// \note Must be deleted with \TWBitcoinScriptDelete -/// \return A pointer to the script -struct TWBitcoinScript* _Nonnull TWBitcoinScriptCreateWithBytes(uint8_t* _Nonnull bytes, size_t size); - -/// Creates a script by copying an existing script. -/// -/// \param script Non-null pointer to a script -/// \note Must be deleted with \TWBitcoinScriptDelete -/// \return A pointer to the script -TW_EXPORT_STATIC_METHOD -struct TWBitcoinScript* _Nonnull TWBitcoinScriptCreateCopy(const struct TWBitcoinScript* _Nonnull script); - -/// Delete/Deallocate a given script. -/// -/// \param script Non-null pointer to a script -TW_EXPORT_METHOD -void TWBitcoinScriptDelete(struct TWBitcoinScript* _Nonnull script); - -/// Get size of a script -/// -/// \param script Non-null pointer to a script -/// \return size of the script -TW_EXPORT_PROPERTY -size_t TWBitcoinScriptSize(const struct TWBitcoinScript* _Nonnull script); - -/// Get data of a script -/// -/// \param script Non-null pointer to a script -/// \return data of the given script -TW_EXPORT_PROPERTY -TWData* _Nonnull TWBitcoinScriptData(const struct TWBitcoinScript* _Nonnull script); - -/// Return script hash of a script -/// -/// \param script Non-null pointer to a script -/// \return script hash of the given script -TW_EXPORT_PROPERTY -TWData* _Nonnull TWBitcoinScriptScriptHash(const struct TWBitcoinScript* _Nonnull script); - -/// Determines whether this is a pay-to-script-hash (P2SH) script. -/// -/// \param script Non-null pointer to a script -/// \return true if this is a pay-to-script-hash (P2SH) script, false otherwise -TW_EXPORT_PROPERTY -bool TWBitcoinScriptIsPayToScriptHash(const struct TWBitcoinScript* _Nonnull script); - -/// Determines whether this is a pay-to-witness-script-hash (P2WSH) script. -/// -/// \param script Non-null pointer to a script -/// \return true if this is a pay-to-witness-script-hash (P2WSH) script, false otherwise -TW_EXPORT_PROPERTY -bool TWBitcoinScriptIsPayToWitnessScriptHash(const struct TWBitcoinScript* _Nonnull script); - -/// Determines whether this is a pay-to-witness-public-key-hash (P2WPKH) script. -/// -/// \param script Non-null pointer to a script -/// \return true if this is a pay-to-witness-public-key-hash (P2WPKH) script, false otherwise -TW_EXPORT_PROPERTY -bool TWBitcoinScriptIsPayToWitnessPublicKeyHash(const struct TWBitcoinScript* _Nonnull script); - -/// Determines whether this is a witness program script. -/// -/// \param script Non-null pointer to a script -/// \return true if this is a witness program script, false otherwise -TW_EXPORT_PROPERTY -bool TWBitcoinScriptIsWitnessProgram(const struct TWBitcoinScript* _Nonnull script); - -/// Determines whether 2 scripts have the same content -/// -/// \param lhs Non-null pointer to the first script -/// \param rhs Non-null pointer to the second script -/// \return true if both script have the same content -TW_EXPORT_STATIC_METHOD -bool TWBitcoinScriptEqual(const struct TWBitcoinScript* _Nonnull lhs, const struct TWBitcoinScript* _Nonnull rhs); - -/// Matches the script to a pay-to-public-key (P2PK) script. -/// -/// \param script Non-null pointer to a script -/// \return The public key. -TW_EXPORT_METHOD -TWData* _Nullable TWBitcoinScriptMatchPayToPubkey(const struct TWBitcoinScript* _Nonnull script); - -/// Matches the script to a pay-to-public-key-hash (P2PKH). -/// -/// \param script Non-null pointer to a script -/// \return the key hash. -TW_EXPORT_METHOD -TWData* _Nullable TWBitcoinScriptMatchPayToPubkeyHash(const struct TWBitcoinScript* _Nonnull script); - -/// Matches the script to a pay-to-script-hash (P2SH). -/// -/// \param script Non-null pointer to a script -/// \return the script hash. -TW_EXPORT_METHOD -TWData* _Nullable TWBitcoinScriptMatchPayToScriptHash(const struct TWBitcoinScript* _Nonnull script); - -/// Matches the script to a pay-to-witness-public-key-hash (P2WPKH). -/// -/// \param script Non-null pointer to a script -/// \return the key hash. -TW_EXPORT_METHOD -TWData* _Nullable TWBitcoinScriptMatchPayToWitnessPublicKeyHash(const struct TWBitcoinScript* _Nonnull script); - -/// Matches the script to a pay-to-witness-script-hash (P2WSH). -/// -/// \param script Non-null pointer to a script -/// \return the script hash, a SHA256 of the witness script.. -TW_EXPORT_METHOD -TWData* _Nullable TWBitcoinScriptMatchPayToWitnessScriptHash(const struct TWBitcoinScript* _Nonnull script); - -/// Encodes the script. -/// -/// \param script Non-null pointer to a script -/// \return The encoded script -TW_EXPORT_METHOD -TWData* _Nonnull TWBitcoinScriptEncode(const struct TWBitcoinScript* _Nonnull script); - -/// Builds a standard 'pay to public key' script. -/// -/// \param pubkey Non-null pointer to a pubkey -/// \note Must be deleted with \TWBitcoinScriptDelete -/// \return A pointer to the built script -TW_EXPORT_STATIC_METHOD -struct TWBitcoinScript* _Nonnull TWBitcoinScriptBuildPayToPublicKey(TWData* _Nonnull pubkey); - -/// Builds a standard 'pay to public key hash' script. -/// -/// \param hash Non-null pointer to a PublicKey hash -/// \note Must be deleted with \TWBitcoinScriptDelete -/// \return A pointer to the built script -TW_EXPORT_STATIC_METHOD -struct TWBitcoinScript* _Nonnull TWBitcoinScriptBuildPayToPublicKeyHash(TWData* _Nonnull hash); - -/// Builds a standard 'pay to script hash' script. -/// -/// \param scriptHash Non-null pointer to a script hash -/// \note Must be deleted with \TWBitcoinScriptDelete -/// \return A pointer to the built script -TW_EXPORT_STATIC_METHOD -struct TWBitcoinScript* _Nonnull TWBitcoinScriptBuildPayToScriptHash(TWData* _Nonnull scriptHash); - -/// Builds a pay-to-witness-public-key-hash (P2WPKH) script.. -/// -/// \param hash Non-null pointer to a witness public key hash -/// \note Must be deleted with \TWBitcoinScriptDelete -/// \return A pointer to the built script -TW_EXPORT_STATIC_METHOD -struct TWBitcoinScript* _Nonnull TWBitcoinScriptBuildPayToWitnessPubkeyHash(TWData* _Nonnull hash); - -/// Builds a pay-to-witness-script-hash (P2WSH) script. -/// -/// \param scriptHash Non-null pointer to a script hash -/// \note Must be deleted with \TWBitcoinScriptDelete -/// \return A pointer to the built script -TW_EXPORT_STATIC_METHOD -struct TWBitcoinScript* _Nonnull TWBitcoinScriptBuildPayToWitnessScriptHash(TWData* _Nonnull scriptHash); - -/// Builds the Ordinals inscripton for BRC20 transfer. -/// -/// \param ticker ticker of the brc20 -/// \param amount uint64 transfer amount -/// \param pubkey Non-null pointer to a pubkey -/// \note Must be deleted with \TWBitcoinScriptDelete -/// \return A pointer to the built script -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWBitcoinScriptBuildBRC20InscribeTransfer(TWString* _Nonnull ticker, TWString* _Nonnull amount, TWData* _Nonnull pubkey); - -/// Builds the Ordinals inscripton for NFT construction. -/// -/// \param mimeType the MIME type of the payload -/// \param payload the payload to inscribe -/// \param pubkey Non-null pointer to a pubkey -/// \note Must be deleted with \TWBitcoinScriptDelete -/// \return A pointer to the built script -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWBitcoinScriptBuildOrdinalNftInscription(TWString* _Nonnull mimeType, TWData* _Nonnull payload, TWData* _Nonnull pubkey); - -/// Builds a appropriate lock script for the given address.. -/// -/// \param address Non-null pointer to an address -/// \param coin coin type -/// \note Must be deleted with \TWBitcoinScriptDelete -/// \return A pointer to the built script -TW_EXPORT_STATIC_METHOD -struct TWBitcoinScript *_Nonnull TWBitcoinScriptLockScriptForAddress(TWString* _Nonnull address, enum TWCoinType coin); - -/// Builds a appropriate lock script for the given address with replay. -TW_EXPORT_STATIC_METHOD -struct TWBitcoinScript *_Nonnull TWBitcoinScriptLockScriptForAddressReplay(TWString *_Nonnull address, enum TWCoinType coin, TWData *_Nonnull blockHash, int64_t blockHeight); - -/// Return the default HashType for the given coin, such as TWBitcoinSigHashTypeAll. -/// -/// \param coinType coin type -/// \return default HashType for the given coin -TW_EXPORT_STATIC_METHOD -uint32_t TWBitcoinScriptHashTypeForCoin(enum TWCoinType coinType); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinSigHashType.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinSigHashType.h deleted file mode 100644 index c71bde2d..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinSigHashType.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Bitcoin SIGHASH type. -TW_EXPORT_ENUM(uint32_t) -enum TWBitcoinSigHashType { - TWBitcoinSigHashTypeAll = 0x01, - TWBitcoinSigHashTypeNone = 0x02, - TWBitcoinSigHashTypeSingle = 0x03, - TWBitcoinSigHashTypeFork = 0x40, - TWBitcoinSigHashTypeForkBTG = 0x4f40, - TWBitcoinSigHashTypeAnyoneCanPay = 0x80 -}; - -/// Determines if the given sig hash is single -/// -/// \param type sig hash type -/// \return true if the sigh hash type is single, false otherwise -TW_EXPORT_METHOD -bool TWBitcoinSigHashTypeIsSingle(enum TWBitcoinSigHashType type); - -/// Determines if the given sig hash is none -/// -/// \param type sig hash type -/// \return true if the sigh hash type is none, false otherwise -TW_EXPORT_METHOD -bool TWBitcoinSigHashTypeIsNone(enum TWBitcoinSigHashType type); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinV2Proto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinV2Proto.h deleted file mode 100644 index b6a979c2..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBitcoinV2Proto.h +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_BitcoinV2_Proto_SigningInput; -typedef TWData *_Nonnull TW_BitcoinV2_Proto_Input; -typedef TWData *_Nonnull TW_BitcoinV2_Proto_Output; -typedef TWData *_Nonnull TW_BitcoinV2_Proto_ToPublicKeyOrHash; -typedef TWData *_Nonnull TW_BitcoinV2_Proto_PreSigningOutput; -typedef TWData *_Nonnull TW_BitcoinV2_Proto_SigningOutput; -typedef TWData *_Nonnull TW_BitcoinV2_Proto_Transaction; -typedef TWData *_Nonnull TW_BitcoinV2_Proto_TransactionInput; -typedef TWData *_Nonnull TW_BitcoinV2_Proto_TransactionOutput; -typedef TWData *_Nonnull TW_BitcoinV2_Proto_ComposePlan; -typedef TWData *_Nonnull TW_BitcoinV2_Proto_TransactionPlan; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWBlockchain.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWBlockchain.h deleted file mode 100644 index d715176e..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWBlockchain.h +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Blockchain enum type -TW_EXPORT_ENUM(uint32_t) -enum TWBlockchain { - TWBlockchainBitcoin = 0, - TWBlockchainEthereum = 1, - TWBlockchainVechain = 3, - TWBlockchainTron = 4, - TWBlockchainIcon = 5, - TWBlockchainBinance = 6, - TWBlockchainRipple = 7, - TWBlockchainTezos = 8, - TWBlockchainNimiq = 9, - TWBlockchainStellar = 10, - TWBlockchainAion = 11, - TWBlockchainCosmos = 12, - TWBlockchainTheta = 13, - TWBlockchainOntology = 14, - TWBlockchainZilliqa = 15, - TWBlockchainIoTeX = 16, - TWBlockchainEOS = 17, - TWBlockchainNano = 18, - TWBlockchainNULS = 19, - TWBlockchainWaves = 20, - TWBlockchainAeternity = 21, - TWBlockchainNebulas = 22, - TWBlockchainFIO = 23, - TWBlockchainSolana = 24, - TWBlockchainHarmony = 25, - TWBlockchainNEAR = 26, - TWBlockchainAlgorand = 27, - TWBlockchainIOST = 28, - TWBlockchainPolkadot = 29, - TWBlockchainCardano = 30, - TWBlockchainNEO = 31, - TWBlockchainFilecoin = 32, - TWBlockchainMultiversX = 33, - TWBlockchainOasisNetwork = 34, - TWBlockchainDecred = 35, // Bitcoin - TWBlockchainZcash = 36, // Bitcoin - TWBlockchainGroestlcoin = 37, // Bitcoin - TWBlockchainThorchain = 38, // Cosmos - TWBlockchainRonin = 39, // Ethereum - TWBlockchainKusama = 40, // Polkadot - TWBlockchainZen = 41, // Bitcoin - TWBlockchainBitcoinDiamond = 42, // Bitcoin - TWBlockchainVerge = 43, // Bitcoin - TWBlockchainNervos = 44, - TWBlockchainEverscale = 45, - TWBlockchainAptos = 46, // Aptos - TWBlockchainNebl = 47, // Bitcoin - TWBlockchainHedera = 48, // Hedera - TWBlockchainTheOpenNetwork = 49, - TWBlockchainSui = 50, - TWBlockchainGreenfield = 51, -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWCardano.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWCardano.h deleted file mode 100644 index 0892d616..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWCardano.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Cardano helper functions -TW_EXPORT_STRUCT -struct TWCardano; - -/// Calculates the minimum ADA amount needed for a UTXO. -/// -/// \deprecated consider using `TWCardanoOutputMinAdaAmount` instead. -/// \see reference https://docs.cardano.org/native-tokens/minimum-ada-value-requirement -/// \param tokenBundle serialized data of TW.Cardano.Proto.TokenBundle. -/// \return the minimum ADA amount. -TW_EXPORT_STATIC_METHOD -uint64_t TWCardanoMinAdaAmount(TWData *_Nonnull tokenBundle) TW_VISIBILITY_DEFAULT; - -/// Calculates the minimum ADA amount needed for an output. -/// -/// \see reference https://docs.cardano.org/native-tokens/minimum-ada-value-requirement -/// \param toAddress valid destination address, as string. -/// \param tokenBundle serialized data of TW.Cardano.Proto.TokenBundle. -/// \param coinsPerUtxoByte cost per one byte of a serialized UTXO (Base-10 decimal string). -/// \return the minimum ADA amount (Base-10 decimal string). -TW_EXPORT_STATIC_METHOD -TWString *_Nullable TWCardanoOutputMinAdaAmount(TWString *_Nonnull toAddress, TWData *_Nonnull tokenBundle, TWString *_Nonnull coinsPerUtxoByte) TW_VISIBILITY_DEFAULT; - -/// Return the staking address associated to (contained in) this address. Must be a Base address. -/// Empty string is returned on error. Result must be freed. -/// \param baseAddress A valid base address, as string. -/// \return the associated staking (reward) address, as string, or empty string on error. -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWCardanoGetStakingAddress(TWString *_Nonnull baseAddress) TW_VISIBILITY_DEFAULT; - -/// Return the legacy(byron) address. -/// \param publicKey A valid public key with TWPublicKeyTypeED25519Cardano type. -/// \return the legacy(byron) address, as string, or empty string on error. -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWCardanoGetByronAddress(struct TWPublicKey *_Nonnull publicKey); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWCardanoProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWCardanoProto.h deleted file mode 100644 index acc253d0..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWCardanoProto.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Cardano_Proto_OutPoint; -typedef TWData *_Nonnull TW_Cardano_Proto_TokenAmount; -typedef TWData *_Nonnull TW_Cardano_Proto_TxInput; -typedef TWData *_Nonnull TW_Cardano_Proto_TxOutput; -typedef TWData *_Nonnull TW_Cardano_Proto_TokenBundle; -typedef TWData *_Nonnull TW_Cardano_Proto_Transfer; -typedef TWData *_Nonnull TW_Cardano_Proto_RegisterStakingKey; -typedef TWData *_Nonnull TW_Cardano_Proto_DeregisterStakingKey; -typedef TWData *_Nonnull TW_Cardano_Proto_Delegate; -typedef TWData *_Nonnull TW_Cardano_Proto_Withdraw; -typedef TWData *_Nonnull TW_Cardano_Proto_TransactionPlan; -typedef TWData *_Nonnull TW_Cardano_Proto_SigningInput; -typedef TWData *_Nonnull TW_Cardano_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWCoinType.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWCoinType.h deleted file mode 100644 index ad78ddfa..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWCoinType.h +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWBlockchain.h" -#include "TWCurve.h" -#include "TWDerivation.h" -#include "TWHDVersion.h" -#include "TWHRP.h" -#include "TWPurpose.h" -#include "TWString.h" -#include "TWDerivation.h" -#include "TWPublicKeyType.h" - -TW_EXTERN_C_BEGIN - -/// Represents a private key. -struct TWPrivateKey; - -/// Represents a public key. -struct TWPublicKey; - -/// Coin type for Level 2 of BIP44. -/// -/// \see https://github.com/satoshilabs/slips/blob/master/slip-0044.md -TW_EXPORT_ENUM(uint32_t) -enum TWCoinType { - TWCoinTypeAeternity = 457, - TWCoinTypeAion = 425, - TWCoinTypeBinance = 714, - TWCoinTypeBitcoin = 0, - TWCoinTypeBitcoinCash = 145, - TWCoinTypeBitcoinGold = 156, - TWCoinTypeCallisto = 820, - TWCoinTypeCardano = 1815, // Note: Cardano Shelley testnet uses purpose 1852 (not 44) 1852/1815 - TWCoinTypeCosmos = 118, - TWCoinTypePivx = 119, - TWCoinTypeDash = 5, - TWCoinTypeDecred = 42, - TWCoinTypeDigiByte = 20, - TWCoinTypeDogecoin = 3, - TWCoinTypeEOS = 194, - TWCoinTypeWAX = 14001, - TWCoinTypeEthereum = 60, - TWCoinTypeEthereumClassic = 61, - TWCoinTypeFIO = 235, - TWCoinTypeGoChain = 6060, - TWCoinTypeGroestlcoin = 17, - TWCoinTypeICON = 74, - TWCoinTypeIoTeX = 304, - TWCoinTypeKava = 459, - TWCoinTypeKin = 2017, - TWCoinTypeLitecoin = 2, - TWCoinTypeMonacoin = 22, - TWCoinTypeNebulas = 2718, - TWCoinTypeNULS = 8964, - TWCoinTypeNano = 165, - TWCoinTypeNEAR = 397, - TWCoinTypeNimiq = 242, - TWCoinTypeOntology = 1024, - TWCoinTypePOANetwork = 178, - TWCoinTypeQtum = 2301, - TWCoinTypeXRP = 144, - TWCoinTypeSolana = 501, - TWCoinTypeStellar = 148, - TWCoinTypeTezos = 1729, - TWCoinTypeTheta = 500, - TWCoinTypeThunderCore = 1001, - TWCoinTypeNEO = 888, - TWCoinTypeTomoChain = 889, - TWCoinTypeTron = 195, - TWCoinTypeVeChain = 818, - TWCoinTypeViacoin = 14, - TWCoinTypeWanchain = 5718350, - TWCoinTypeZcash = 133, - TWCoinTypeFiro = 136, - TWCoinTypeZilliqa = 313, - TWCoinTypeZelcash = 19167, - TWCoinTypeRavencoin = 175, - TWCoinTypeWaves = 5741564, - TWCoinTypeTerra = 330, // see also TerraV2 - TWCoinTypeTerraV2 = 10000330, // see also Terra - TWCoinTypeHarmony = 1023, - TWCoinTypeAlgorand = 283, - TWCoinTypeKusama = 434, - TWCoinTypePolkadot = 354, - TWCoinTypeFilecoin = 461, - TWCoinTypeMultiversX = 508, - TWCoinTypeBandChain = 494, - TWCoinTypeSmartChainLegacy = 10000714, - TWCoinTypeSmartChain = 20000714, - TWCoinTypeTBinance = 30000714, - TWCoinTypeOasis = 474, - TWCoinTypePolygon = 966, - TWCoinTypeTHORChain = 931, - TWCoinTypeBluzelle = 483, - TWCoinTypeOptimism = 10000070, - TWCoinTypeZksync = 10000324, - TWCoinTypeArbitrum = 10042221, - TWCoinTypeECOChain = 10000553, - TWCoinTypeAvalancheCChain = 10009000, - TWCoinTypeXDai = 10000100, - TWCoinTypeFantom = 10000250, - TWCoinTypeCryptoOrg = 394, - TWCoinTypeCelo = 52752, - TWCoinTypeRonin = 10002020, - TWCoinTypeOsmosis = 10000118, - TWCoinTypeECash = 899, - TWCoinTypeIOST = 291, - TWCoinTypeCronosChain = 10000025, - TWCoinTypeSmartBitcoinCash = 10000145, - TWCoinTypeKuCoinCommunityChain = 10000321, - TWCoinTypeBitcoinDiamond = 999, - TWCoinTypeBoba = 10000288, - TWCoinTypeSyscoin = 57, - TWCoinTypeVerge = 77, - TWCoinTypeZen = 121, - TWCoinTypeMetis = 10001088, - TWCoinTypeAurora = 1323161554, - TWCoinTypeEvmos = 10009001, - TWCoinTypeNativeEvmos = 20009001, - TWCoinTypeMoonriver = 10001285, - TWCoinTypeMoonbeam = 10001284, - TWCoinTypeKavaEvm = 10002222, - TWCoinTypeKlaytn = 10008217, - TWCoinTypeMeter = 18000, - TWCoinTypeOKXChain = 996, - TWCoinTypeStratis = 105105, - TWCoinTypeKomodo = 141, - TWCoinTypeNervos = 309, - TWCoinTypeEverscale = 396, - TWCoinTypeAptos = 637, - TWCoinTypeNebl = 146, - TWCoinTypeHedera = 3030, - TWCoinTypeSecret = 529, - TWCoinTypeNativeInjective = 10000060, - TWCoinTypeAgoric = 564, - TWCoinTypeTON = 607, - TWCoinTypeSui = 784, - TWCoinTypeStargaze = 20000118, - TWCoinTypePolygonzkEVM = 10001101, - TWCoinTypeJuno = 30000118, - TWCoinTypeStride = 40000118, - TWCoinTypeAxelar = 50000118, - TWCoinTypeCrescent = 60000118, - TWCoinTypeKujira = 70000118, - TWCoinTypeIoTeXEVM = 10004689, - TWCoinTypeNativeCanto = 10007700, - TWCoinTypeComdex = 80000118, - TWCoinTypeNeutron = 90000118, - TWCoinTypeSommelier = 11000118, - TWCoinTypeFetchAI = 12000118, - TWCoinTypeMars = 13000118, - TWCoinTypeUmee = 14000118, - TWCoinTypeCoreum = 10000990, - TWCoinTypeQuasar = 15000118, - TWCoinTypePersistence = 16000118, - TWCoinTypeAkash = 17000118, - TWCoinTypeNoble = 18000118, - TWCoinTypeScroll = 534353, - TWCoinTypeRootstock = 137, - TWCoinTypeThetaFuel = 361, - TWCoinTypeConfluxeSpace = 1030, - TWCoinTypeAcala = 787, - TWCoinTypeAcalaEVM = 10000787, - TWCoinTypeOpBNB = 204, - TWCoinTypeNeon = 245022934, - TWCoinTypeBase = 8453, - TWCoinTypeSei = 19000118, - TWCoinTypeArbitrumNova = 10042170, - TWCoinTypeLinea = 59144, - TWCoinTypeGreenfield = 5600, - TWCoinTypeMantle = 5000, - TWCoinTypeZenEON = 7332, -}; - -/// Returns the blockchain for a coin type. -/// -/// \param coin A coin type -/// \return blockchain associated to the given coin type -TW_EXPORT_PROPERTY -enum TWBlockchain TWCoinTypeBlockchain(enum TWCoinType coin); - -/// Returns the purpose for a coin type. -/// -/// \param coin A coin type -/// \return purpose associated to the given coin type -TW_EXPORT_PROPERTY -enum TWPurpose TWCoinTypePurpose(enum TWCoinType coin); - -/// Returns the curve that should be used for a coin type. -/// -/// \param coin A coin type -/// \return curve that should be used for the given coin type -TW_EXPORT_PROPERTY -enum TWCurve TWCoinTypeCurve(enum TWCoinType coin); - -/// Returns the xpub HD version that should be used for a coin type. -/// -/// \param coin A coin type -/// \return xpub HD version that should be used for the given coin type -TW_EXPORT_PROPERTY -enum TWHDVersion TWCoinTypeXpubVersion(enum TWCoinType coin); - -/// Returns the xprv HD version that should be used for a coin type. -/// -/// \param coin A coin type -/// \return the xprv HD version that should be used for the given coin type. -TW_EXPORT_PROPERTY -enum TWHDVersion TWCoinTypeXprvVersion(enum TWCoinType coin); - -/// Validates an address string. -/// -/// \param coin A coin type -/// \param address A public address -/// \return true if the address is a valid public address of the given coin, false otherwise. -TW_EXPORT_METHOD -bool TWCoinTypeValidate(enum TWCoinType coin, TWString* _Nonnull address); - -/// Returns the default derivation path for a particular coin. -/// -/// \param coin A coin type -/// \return the default derivation path for the given coin type. -TW_EXPORT_METHOD -TWString* _Nonnull TWCoinTypeDerivationPath(enum TWCoinType coin); - -/// Returns the derivation path for a particular coin with the explicit given derivation. -/// -/// \param coin A coin type -/// \param derivation A derivation type -/// \return the derivation path for the given coin with the explicit given derivation -TW_EXPORT_METHOD -TWString* _Nonnull TWCoinTypeDerivationPathWithDerivation(enum TWCoinType coin, enum TWDerivation derivation); - -/// Derives the address for a particular coin from the private key. -/// -/// \param coin A coin type -/// \param privateKey A valid private key -/// \return Derived address for the given coin from the private key. -TW_EXPORT_METHOD -TWString* _Nonnull TWCoinTypeDeriveAddress(enum TWCoinType coin, - struct TWPrivateKey* _Nonnull privateKey); - -/// Derives the address for a particular coin from the public key. -/// -/// \param coin A coin type -/// \param publicKey A valid public key -/// \return Derived address for the given coin from the public key. -TW_EXPORT_METHOD -TWString* _Nonnull TWCoinTypeDeriveAddressFromPublicKey(enum TWCoinType coin, - struct TWPublicKey* _Nonnull publicKey); - -/// Derives the address for a particular coin from the public key with the derivation. -TW_EXPORT_METHOD -TWString* _Nonnull TWCoinTypeDeriveAddressFromPublicKeyAndDerivation(enum TWCoinType coin, - struct TWPublicKey* _Nonnull publicKey, - enum TWDerivation derivation); - -/// HRP for this coin type -/// -/// \param coin A coin type -/// \return HRP of the given coin type. -TW_EXPORT_PROPERTY -enum TWHRP TWCoinTypeHRP(enum TWCoinType coin); - -/// P2PKH prefix for this coin type -/// -/// \param coin A coin type -/// \return P2PKH prefix for the given coin type -TW_EXPORT_PROPERTY -uint8_t TWCoinTypeP2pkhPrefix(enum TWCoinType coin); - -/// P2SH prefix for this coin type -/// -/// \param coin A coin type -/// \return P2SH prefix for the given coin type -TW_EXPORT_PROPERTY -uint8_t TWCoinTypeP2shPrefix(enum TWCoinType coin); - -/// Static prefix for this coin type -/// -/// \param coin A coin type -/// \return Static prefix for the given coin type -TW_EXPORT_PROPERTY -uint8_t TWCoinTypeStaticPrefix(enum TWCoinType coin); - -/// ChainID for this coin type. -/// -/// \param coin A coin type -/// \return ChainID for the given coin type. -/// \note Caller must free returned object. -TW_EXPORT_PROPERTY -TWString* _Nonnull TWCoinTypeChainId(enum TWCoinType coin); - -/// SLIP-0044 id for this coin type -/// -/// \param coin A coin type -/// \return SLIP-0044 id for the given coin type -TW_EXPORT_PROPERTY -uint32_t TWCoinTypeSlip44Id(enum TWCoinType coin); - -/// SS58Prefix for this coin type -/// -/// \param coin A coin type -/// \return SS58Prefix for the given coin type -TW_EXPORT_PROPERTY -uint32_t TWCoinTypeSS58Prefix(enum TWCoinType coin); - -/// public key type for this coin type -/// -/// \param coin A coin type -/// \return public key type for the given coin type -TW_EXPORT_PROPERTY -enum TWPublicKeyType TWCoinTypePublicKeyType(enum TWCoinType coin); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWCoinTypeConfiguration.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWCoinTypeConfiguration.h deleted file mode 100644 index c83db775..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWCoinTypeConfiguration.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWCoinType.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// CoinTypeConfiguration functions -TW_EXPORT_STRUCT -struct TWCoinTypeConfiguration { - uint8_t unused; // C doesn't allow zero-sized struct -}; - -/// Returns stock symbol of coin -/// -/// \param type A coin type -/// \return A non-null TWString stock symbol of coin -/// \note Caller must free returned object -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWCoinTypeConfigurationGetSymbol(enum TWCoinType type); - -/// Returns max count decimal places for minimal coin unit -/// -/// \param type A coin type -/// \return Returns max count decimal places for minimal coin unit -TW_EXPORT_STATIC_METHOD -int TWCoinTypeConfigurationGetDecimals(enum TWCoinType type); - -/// Returns transaction url in blockchain explorer -/// -/// \param type A coin type -/// \param transactionID A transaction identifier -/// \return Returns a non-null TWString transaction url in blockchain explorer -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWCoinTypeConfigurationGetTransactionURL(enum TWCoinType type, TWString *_Nonnull transactionID); - -/// Returns account url in blockchain explorer -/// -/// \param type A coin type -/// \param accountID an Account identifier -/// \return Returns a non-null TWString account url in blockchain explorer -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWCoinTypeConfigurationGetAccountURL(enum TWCoinType type, TWString *_Nonnull accountID); - -/// Returns full name of coin in lower case -/// -/// \param type A coin type -/// \return Returns a non-null TWString, full name of coin in lower case -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWCoinTypeConfigurationGetID(enum TWCoinType type); - -/// Returns full name of coin -/// -/// \param type A coin type -/// \return Returns a non-null TWString, full name of coin -TW_EXPORT_STATIC_METHOD -TWString *_Nonnull TWCoinTypeConfigurationGetName(enum TWCoinType type); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWCommonProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWCommonProto.h deleted file mode 100644 index 625b9e0a..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWCommonProto.h +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWCosmosProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWCosmosProto.h deleted file mode 100644 index 9d457878..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWCosmosProto.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Cosmos_Proto_Amount; -typedef TWData *_Nonnull TW_Cosmos_Proto_Fee; -typedef TWData *_Nonnull TW_Cosmos_Proto_Height; -typedef TWData *_Nonnull TW_Cosmos_Proto_THORChainAsset; -typedef TWData *_Nonnull TW_Cosmos_Proto_THORChainCoin; -typedef TWData *_Nonnull TW_Cosmos_Proto_Message; -typedef TWData *_Nonnull TW_Cosmos_Proto_SigningInput; -typedef TWData *_Nonnull TW_Cosmos_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWCurve.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWCurve.h deleted file mode 100644 index f04256c6..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWCurve.h +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Elliptic cruves -TW_EXPORT_ENUM() -enum TWCurve { - TWCurveSECP256k1 /* "secp256k1" */, - TWCurveED25519 /* "ed25519" */, - TWCurveED25519Blake2bNano /* "ed25519-blake2b-nano" */, - TWCurveCurve25519 /* "curve25519" */, - TWCurveNIST256p1 /* "nist256p1" */, - TWCurveED25519ExtendedCardano /* "ed25519-cardano-seed" */, - TWCurveStarkex /* "starkex" */, - TWCurveNone -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWData.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWData.h deleted file mode 100644 index 8c498d81..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWData.h +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -typedef const void TWString; - -/// Defines a resizable block of data. -/// -/// The implementantion of these methods should be language-specific to minimize translation overhead. For instance it -/// should be a `jbyteArray` for Java and an `NSData` for Swift. -typedef const void TWData; - -/// Creates a block of data from a byte array. -/// -/// \param bytes Non-null raw bytes buffer -/// \param size size of the buffer -/// \return Non-null filled block of data. -TWData *_Nonnull TWDataCreateWithBytes(const uint8_t *_Nonnull bytes, size_t size) TW_VISIBILITY_DEFAULT; - -/// Creates an uninitialized block of data with the provided size. -/// -/// \param size size for the block of data -/// \return Non-null uninitialized block of data with the provided size -TWData *_Nonnull TWDataCreateWithSize(size_t size) TW_VISIBILITY_DEFAULT; - -/// Creates a block of data by copying another block of data. -/// -/// \param data buffer that need to be copied -/// \return Non-null filled block of data. -TWData *_Nonnull TWDataCreateWithData(TWData *_Nonnull data) TW_VISIBILITY_DEFAULT; - -/// Creates a block of data from a hexadecimal string. Odd length is invalid (intended grouping to bytes is not obvious). -/// -/// \param hex input hex string -/// \return Non-null filled block of data -TWData *_Nullable TWDataCreateWithHexString(const TWString *_Nonnull hex) TW_VISIBILITY_DEFAULT; - -/// Returns the size in bytes. -/// -/// \param data A non-null valid block of data -/// \return the size of the given block of data -size_t TWDataSize(TWData *_Nonnull data) TW_VISIBILITY_DEFAULT; - -/// Returns the raw pointer to the contents of data. -/// -/// \param data A non-null valid block of data -/// \return the raw pointer to the contents of data -uint8_t *_Nonnull TWDataBytes(TWData *_Nonnull data) TW_VISIBILITY_DEFAULT; - -/// Returns the byte at the provided index. -/// -/// \param data A non-null valid block of data -/// \param index index of the byte that we want to fetch - index need to be < TWDataSize(data) -/// \return the byte at the provided index -uint8_t TWDataGet(TWData *_Nonnull data, size_t index) TW_VISIBILITY_DEFAULT; - -/// Sets the byte at the provided index. -/// -/// \param data A non-null valid block of data -/// \param index index of the byte that we want to set - index need to be < TWDataSize(data) -/// \param byte Given byte to be written in data -void TWDataSet(TWData *_Nonnull data, size_t index, uint8_t byte) TW_VISIBILITY_DEFAULT; - -/// Copies a range of bytes into the provided buffer. -/// -/// \param data A non-null valid block of data -/// \param start starting index of the range - index need to be < TWDataSize(data) -/// \param size size of the range we want to copy - size need to be < TWDataSize(data) - start -/// \param output The output buffer where we want to copy the data. -void TWDataCopyBytes(TWData *_Nonnull data, size_t start, size_t size, uint8_t *_Nonnull output) TW_VISIBILITY_DEFAULT; - -/// Replaces a range of bytes with the contents of the provided buffer. -/// -/// \param data A non-null valid block of data -/// \param start starting index of the range - index need to be < TWDataSize(data) -/// \param size size of the range we want to replace - size need to be < TWDataSize(data) - start -/// \param bytes The buffer that will replace the range of data -void TWDataReplaceBytes(TWData *_Nonnull data, size_t start, size_t size, const uint8_t *_Nonnull bytes) TW_VISIBILITY_DEFAULT; - -/// Appends data from a byte array. -/// -/// \param data A non-null valid block of data -/// \param bytes Non-null byte array -/// \param size The size of the byte array -void TWDataAppendBytes(TWData *_Nonnull data, const uint8_t *_Nonnull bytes, size_t size) TW_VISIBILITY_DEFAULT; - -/// Appends a single byte. -/// -/// \param data A non-null valid block of data -/// \param byte A single byte -void TWDataAppendByte(TWData *_Nonnull data, uint8_t byte) TW_VISIBILITY_DEFAULT; - -/// Appends a block of data. -/// -/// \param data A non-null valid block of data -/// \param append A non-null valid block of data -void TWDataAppendData(TWData *_Nonnull data, TWData *_Nonnull append) TW_VISIBILITY_DEFAULT; - -/// Reverse the bytes. -/// -/// \param data A non-null valid block of data -void TWDataReverse(TWData *_Nonnull data) TW_VISIBILITY_DEFAULT; - -/// Sets all bytes to the given value. -/// -/// \param data A non-null valid block of data -void TWDataReset(TWData *_Nonnull data) TW_VISIBILITY_DEFAULT; - -/// Deletes a block of data created with a `TWDataCreate*` method. -/// -/// \param data A non-null valid block of data -void TWDataDelete(TWData *_Nonnull data) TW_VISIBILITY_DEFAULT; - -/// Determines whether two data blocks are equal. -/// -/// \param lhs left non null block of data to be compared -/// \param rhs right non null block of data to be compared -/// \return true if both block of data are equal, false otherwise -bool TWDataEqual(TWData *_Nonnull lhs, TWData *_Nonnull rhs) TW_VISIBILITY_DEFAULT; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWDataVector.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWDataVector.h deleted file mode 100644 index 3f950635..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWDataVector.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" - -TW_EXTERN_C_BEGIN - -/// A vector of TWData byte arrays -TW_EXPORT_CLASS -struct TWDataVector; - -/// Creates a Vector of Data. -/// -/// \note Must be deleted with \TWDataVectorDelete -/// \return a non-null Vector of Data. -TW_EXPORT_STATIC_METHOD -struct TWDataVector* _Nonnull TWDataVectorCreate(); - -/// Creates a Vector of Data with the given element -/// -/// \param data A non-null valid block of data -/// \return A Vector of data with a single given element -TW_EXPORT_STATIC_METHOD -struct TWDataVector* _Nonnull TWDataVectorCreateWithData(TWData* _Nonnull data); - -/// Delete/Deallocate a Vector of Data -/// -/// \param dataVector A non-null Vector of data -TW_EXPORT_METHOD -void TWDataVectorDelete(struct TWDataVector* _Nonnull dataVector); - -/// Add an element to a Vector of Data. Element is cloned -/// -/// \param dataVector A non-null Vector of data -/// \param data A non-null valid block of data -/// \note data input parameter must be deleted on its own -TW_EXPORT_METHOD -void TWDataVectorAdd(struct TWDataVector* _Nonnull dataVector, TWData* _Nonnull data); - -/// Retrieve the number of elements -/// -/// \param dataVector A non-null Vector of data -/// \return the size of the given vector. -TW_EXPORT_PROPERTY -size_t TWDataVectorSize(const struct TWDataVector* _Nonnull dataVector); - -/// Retrieve the n-th element. -/// -/// \param dataVector A non-null Vector of data -/// \param index index element of the vector to be retrieved, need to be < TWDataVectorSize -/// \note Returned element must be freed with \TWDataDelete -/// \return A non-null block of data -TW_EXPORT_METHOD -TWData* _Nullable TWDataVectorGet(const struct TWDataVector* _Nonnull dataVector, size_t index); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWDecredProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWDecredProto.h deleted file mode 100644 index ad75ff1b..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWDecredProto.h +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Decred_Proto_Transaction; -typedef TWData *_Nonnull TW_Decred_Proto_TransactionInput; -typedef TWData *_Nonnull TW_Decred_Proto_TransactionOutput; -typedef TWData *_Nonnull TW_Decred_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWDerivation.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWDerivation.h deleted file mode 100644 index 781aa93b..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWDerivation.h +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE from \registry.json, changes made here WILL BE LOST. -// - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Non-default coin address derivation names (default, unnamed derivations are not included). -TW_EXPORT_ENUM() -enum TWDerivation { - TWDerivationDefault = 0, // default, for any coin - TWDerivationCustom = 1, // custom, for any coin - TWDerivationBitcoinSegwit = 2, - TWDerivationBitcoinLegacy = 3, - TWDerivationBitcoinTestnet = 4, - TWDerivationLitecoinLegacy = 5, - TWDerivationSolanaSolana = 6, -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWDerivationPath.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWDerivationPath.h deleted file mode 100644 index 0d116870..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWDerivationPath.h +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWCoinType.h" -#include "TWPurpose.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Represents a BIP44 DerivationPath in C++. -TW_EXPORT_CLASS -struct TWDerivationPath; - -/// Creates a new DerivationPath with a purpose, coin, account, change and address. -/// Must be deleted with TWDerivationPathDelete after use. -/// -/// \param purpose The purpose of the Path. -/// \param coin The coin type of the Path. -/// \param account The derivation of the Path. -/// \param change The derivation path of the Path. -/// \param address hex encoded public key. -/// \return A new DerivationPath. -TW_EXPORT_STATIC_METHOD -struct TWDerivationPath* _Nonnull TWDerivationPathCreate(enum TWPurpose purpose, uint32_t coin, uint32_t account, uint32_t change, uint32_t address); - -/// Creates a new DerivationPath with a string -/// -/// \param string The string of the Path. -/// \return A new DerivationPath or null if string is invalid. -TW_EXPORT_STATIC_METHOD -struct TWDerivationPath* _Nullable TWDerivationPathCreateWithString(TWString* _Nonnull string); - -/// Deletes a DerivationPath. -/// -/// \param path DerivationPath to delete. -TW_EXPORT_METHOD -void TWDerivationPathDelete(struct TWDerivationPath* _Nonnull path); - -/// Returns the index component of a DerivationPath. -/// -/// \param path DerivationPath to get the index of. -/// \param index The index component of the DerivationPath. -/// \return DerivationPathIndex or null if index is invalid. -TW_EXPORT_METHOD -struct TWDerivationPathIndex* _Nullable TWDerivationPathIndexAt(struct TWDerivationPath* _Nonnull path, uint32_t index); - -/// Returns the indices count of a DerivationPath. -/// -/// \param path DerivationPath to get the indices count of. -/// \return The indices count of the DerivationPath. -TW_EXPORT_METHOD -uint32_t TWDerivationPathIndicesCount(struct TWDerivationPath* _Nonnull path); - -/// Returns the purpose enum of a DerivationPath. -/// -/// \param path DerivationPath to get the purpose of. -/// \return DerivationPathPurpose. -TW_EXPORT_PROPERTY -enum TWPurpose TWDerivationPathPurpose(struct TWDerivationPath* _Nonnull path); - -/// Returns the coin value of a derivation path. -/// -/// \param path DerivationPath to get the coin of. -/// \return The coin part of the DerivationPath. -TW_EXPORT_PROPERTY -uint32_t TWDerivationPathCoin(struct TWDerivationPath* _Nonnull path); - -/// Returns the account value of a derivation path. -/// -/// \param path DerivationPath to get the account of. -/// \return the account part of a derivation path. -TW_EXPORT_PROPERTY -uint32_t TWDerivationPathAccount(struct TWDerivationPath* _Nonnull path); - -/// Returns the change value of a derivation path. -/// -/// \param path DerivationPath to get the change of. -/// \return The change part of a derivation path. -TW_EXPORT_PROPERTY -uint32_t TWDerivationPathChange(struct TWDerivationPath* _Nonnull path); - -/// Returns the address value of a derivation path. -/// -/// \param path DerivationPath to get the address of. -/// \return The address part of the derivation path. -TW_EXPORT_PROPERTY -uint32_t TWDerivationPathAddress(struct TWDerivationPath* _Nonnull path); - -/// Returns the string description of a derivation path. -/// -/// \param path DerivationPath to get the address of. -/// \return The string description of the derivation path. -TW_EXPORT_PROPERTY -TWString* _Nonnull TWDerivationPathDescription(struct TWDerivationPath* _Nonnull path); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWDerivationPathIndex.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWDerivationPathIndex.h deleted file mode 100644 index fe7d93ae..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWDerivationPathIndex.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Represents a derivation path index in C++ with value and hardened flag. -TW_EXPORT_CLASS -struct TWDerivationPathIndex; - -/// Creates a new Index with a value and hardened flag. -/// Must be deleted with TWDerivationPathIndexDelete after use. -/// -/// \param value Index value -/// \param hardened Indicates if the Index is hardened. -/// \return A new Index. -TW_EXPORT_STATIC_METHOD -struct TWDerivationPathIndex* _Nonnull TWDerivationPathIndexCreate(uint32_t value, bool hardened); - -/// Deletes an Index. -/// -/// \param index Index to delete. -TW_EXPORT_METHOD -void TWDerivationPathIndexDelete(struct TWDerivationPathIndex* _Nonnull index); - -/// Returns numeric value of an Index. -/// -/// \param index Index to get the numeric value of. -TW_EXPORT_PROPERTY -uint32_t TWDerivationPathIndexValue(struct TWDerivationPathIndex* _Nonnull index); - -/// Returns hardened flag of an Index. -/// -/// \param index Index to get hardened flag. -/// \return true if hardened, false otherwise. -TW_EXPORT_PROPERTY -bool TWDerivationPathIndexHardened(struct TWDerivationPathIndex* _Nonnull index); - -/// Returns the string description of a derivation path index. -/// -/// \param path Index to get the address of. -/// \return The string description of the derivation path index. -TW_EXPORT_PROPERTY -TWString* _Nonnull TWDerivationPathIndexDescription(struct TWDerivationPathIndex* _Nonnull index); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWEOSProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWEOSProto.h deleted file mode 100644 index 95b0a808..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWEOSProto.h +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_EOS_Proto_Asset; -typedef TWData *_Nonnull TW_EOS_Proto_SigningInput; -typedef TWData *_Nonnull TW_EOS_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereum.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereum.h deleted file mode 100644 index 20007e4a..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereum.h +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -TW_EXPORT_STRUCT -struct TWEthereum; - -/// Generate a layer 2 eip2645 derivation path from eth address, layer, application and given index. -/// -/// \param wallet non-null TWHDWallet -/// \param ethAddress non-null Ethereum address -/// \param layer non-null layer 2 name (E.G starkex) -/// \param application non-null layer 2 application (E.G immutablex) -/// \param index non-null layer 2 index (E.G 1) -/// \return a valid eip2645 layer 2 derivation path as a string -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWEthereumEip2645GetPath(TWString* _Nonnull ethAddress, TWString* _Nonnull layer, TWString* _Nonnull application, TWString* _Nonnull index); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumAbi.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumAbi.h deleted file mode 100644 index 33b976dc..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumAbi.h +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWCoinType.h" -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Wrapper class for Ethereum ABI encoding & decoding. -struct TWEthereumAbiFunction; - -TW_EXPORT_STRUCT -struct TWEthereumAbi; - -/// Decode a contract call (function input) according to an ABI json. -/// -/// \param coin EVM-compatible coin type. -/// \param input The serialized data of `TW.EthereumAbi.Proto.ContractCallDecodingInput`. -/// \return The serialized data of a `TW.EthereumAbi.Proto.ContractCallDecodingOutput` proto object. -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiDecodeContractCall(enum TWCoinType coin, TWData* _Nonnull input); - -/// Decode a function input or output data according to a given ABI. -/// -/// \param coin EVM-compatible coin type. -/// \param input The serialized data of `TW.EthereumAbi.Proto.ParamsDecodingInput`. -/// \return The serialized data of a `TW.EthereumAbi.Proto.ParamsDecodingOutput` proto object. -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiDecodeParams(enum TWCoinType coin, TWData* _Nonnull input); - -/// /// Decodes an Eth ABI value according to a given type. -/// -/// \param coin EVM-compatible coin type. -/// \param input The serialized data of `TW.EthereumAbi.Proto.ValueDecodingInput`. -/// \return The serialized data of a `TW.EthereumAbi.Proto.ValueDecodingOutput` proto object. -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiDecodeValue(enum TWCoinType coin, TWData* _Nonnull input); - -/// Encode function to Eth ABI binary. -/// -/// \param coin EVM-compatible coin type. -/// \param input The serialized data of `TW.EthereumAbi.Proto.FunctionEncodingInput`. -/// \return The serialized data of a `TW.EthereumAbi.Proto.FunctionEncodingOutput` proto object. -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiEncodeFunction(enum TWCoinType coin, TWData* _Nonnull input); - -/// Encode function to Eth ABI binary -/// -/// \param fn Non-null Eth abi function -/// \return Non-null encoded block of data -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiEncode(struct TWEthereumAbiFunction* _Nonnull fn); - -/// Decode function output from Eth ABI binary, fill output parameters -/// -/// \param[in] fn Non-null Eth abi function -/// \param[out] encoded Non-null block of data -/// \return true if encoded have been filled correctly, false otherwise -TW_EXPORT_STATIC_METHOD -bool TWEthereumAbiDecodeOutput(struct TWEthereumAbiFunction* _Nonnull fn, TWData* _Nonnull encoded); - -/// Decode function call data to human readable json format, according to input abi json -/// -/// \param data Non-null block of data -/// \param abi Non-null string -/// \return Non-null json string function call data -TW_EXPORT_STATIC_METHOD -TWString* _Nullable TWEthereumAbiDecodeCall(TWData* _Nonnull data, TWString* _Nonnull abi); - -/// Compute the hash of a struct, used for signing, according to EIP712 ("v4"). -/// Input is a Json object (as string), with following fields: -/// - types: map of used struct types (see makeTypes()) -/// - primaryType: the type of the message (string) -/// - domain: EIP712 domain specifier values -/// - message: the message (object). -/// Throws on error. -/// Example input: -/// R"({ -/// "types": { -/// "EIP712Domain": [ -/// {"name": "name", "type": "string"}, -/// {"name": "version", "type": "string"}, -/// {"name": "chainId", "type": "uint256"}, -/// {"name": "verifyingContract", "type": "address"} -/// ], -/// "Person": [ -/// {"name": "name", "type": "string"}, -/// {"name": "wallet", "type": "address"} -/// ] -/// }, -/// "primaryType": "Person", -/// "domain": { -/// "name": "Ether Person", -/// "version": "1", -/// "chainId": 1, -/// "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC" -/// }, -/// "message": { -/// "name": "Cow", -/// "wallet": "CD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" -/// } -/// })"); -/// On error, empty Data is returned. -/// Returned data must be deleted (hint: use WRAPD() macro). -/// -/// \param messageJson Non-null json abi input -/// \return Non-null block of data, encoded abi input -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiEncodeTyped(TWString* _Nonnull messageJson); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumAbiFunction.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumAbiFunction.h deleted file mode 100644 index d07199a2..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumAbiFunction.h +++ /dev/null @@ -1,456 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Represents Ethereum ABI function -TW_EXPORT_CLASS -struct TWEthereumAbiFunction; - -/// Creates a function object, with the given name and empty parameter list. It must be deleted at the end. -/// -/// \param name function name -/// \return Non-null Ethereum abi function -TW_EXPORT_STATIC_METHOD -struct TWEthereumAbiFunction* _Nonnull TWEthereumAbiFunctionCreateWithString(TWString* _Nonnull name); - -/// Deletes a function object created with a 'TWEthereumAbiFunctionCreateWithString' method. -/// -/// \param fn Non-null Ethereum abi function -TW_EXPORT_METHOD -void TWEthereumAbiFunctionDelete(struct TWEthereumAbiFunction* _Nonnull fn); - -/// Return the function type signature, of the form "baz(int32,uint256)" -/// -/// \param fn A Non-null eth abi function -/// \return function type signature as a Non-null string. -TW_EXPORT_METHOD -TWString* _Nonnull TWEthereumAbiFunctionGetType(struct TWEthereumAbiFunction* _Nonnull fn); - -/// Methods for adding parameters of the given type (input or output). -/// For output parameters (isOutput=true) a value has to be specified, although usually not need; - -/// Add a uint8 type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamUInt8(struct TWEthereumAbiFunction* _Nonnull fn, uint8_t val, bool isOutput); - -/// Add a uint16 type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamUInt16(struct TWEthereumAbiFunction* _Nonnull fn, uint16_t val, bool isOutput); - -/// Add a uint32 type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamUInt32(struct TWEthereumAbiFunction* _Nonnull fn, uint32_t val, bool isOutput); - -/// Add a uint64 type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamUInt64(struct TWEthereumAbiFunction* _Nonnull fn, uint64_t val, bool isOutput); - -/// Add a uint256 type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamUInt256(struct TWEthereumAbiFunction* _Nonnull fn, TWData* _Nonnull val, bool isOutput); - -/// Add a uint(bits) type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamUIntN(struct TWEthereumAbiFunction* _Nonnull fn, int bits, TWData* _Nonnull val, bool isOutput); - -/// Add a int8 type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamInt8(struct TWEthereumAbiFunction* _Nonnull fn, int8_t val, bool isOutput); - -/// Add a int16 type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamInt16(struct TWEthereumAbiFunction* _Nonnull fn, int16_t val, bool isOutput); - -/// Add a int32 type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamInt32(struct TWEthereumAbiFunction* _Nonnull fn, int32_t val, bool isOutput); - -/// Add a int64 type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamInt64(struct TWEthereumAbiFunction* _Nonnull fn, int64_t val, bool isOutput); - -/// Add a int256 type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified (stored in a block of data) -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamInt256(struct TWEthereumAbiFunction* _Nonnull fn, TWData* _Nonnull val, bool isOutput); - -/// Add a int(bits) type parameter -/// -/// \param fn A Non-null eth abi function -/// \param bits Number of bits of the integer parameter -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamIntN(struct TWEthereumAbiFunction* _Nonnull fn, int bits, TWData* _Nonnull val, bool isOutput); - -/// Add a bool type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamBool(struct TWEthereumAbiFunction* _Nonnull fn, bool val, bool isOutput); - -/// Add a string type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamString(struct TWEthereumAbiFunction* _Nonnull fn, TWString* _Nonnull val, bool isOutput); - -/// Add an address type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamAddress(struct TWEthereumAbiFunction* _Nonnull fn, TWData* _Nonnull val, bool isOutput); - -/// Add a bytes type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamBytes(struct TWEthereumAbiFunction* _Nonnull fn, TWData* _Nonnull val, bool isOutput); - -/// Add a bytes[N] type parameter -/// -/// \param fn A Non-null eth abi function -/// \param size fixed size of the bytes array parameter (val). -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamBytesFix(struct TWEthereumAbiFunction* _Nonnull fn, size_t size, TWData* _Nonnull val, bool isOutput); - -/// Add a type[] type parameter -/// -/// \param fn A Non-null eth abi function -/// \param val for output parameters, value has to be specified -/// \param isOutput determines if the parameter is an input or output -/// \return the index of the parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddParamArray(struct TWEthereumAbiFunction* _Nonnull fn, bool isOutput); - -/// Methods for accessing the value of an output or input parameter, of different types. - -/// Get a uint8 type parameter at the given index -/// -/// \param fn A Non-null eth abi function -/// \param idx index for the parameter (0-based). -/// \param isOutput determines if the parameter is an input or output -/// \return the value of the parameter. -TW_EXPORT_METHOD -uint8_t TWEthereumAbiFunctionGetParamUInt8(struct TWEthereumAbiFunction* _Nonnull fn, int idx, bool isOutput); - -/// Get a uint64 type parameter at the given index -/// -/// \param fn A Non-null eth abi function -/// \param idx index for the parameter (0-based). -/// \param isOutput determines if the parameter is an input or output -/// \return the value of the parameter. -TW_EXPORT_METHOD -uint64_t TWEthereumAbiFunctionGetParamUInt64(struct TWEthereumAbiFunction* _Nonnull fn, int idx, bool isOutput); - -/// Get a uint256 type parameter at the given index -/// -/// \param fn A Non-null eth abi function -/// \param idx index for the parameter (0-based). -/// \param isOutput determines if the parameter is an input or output -/// \return the value of the parameter stored in a block of data. -TW_EXPORT_METHOD -TWData* _Nonnull TWEthereumAbiFunctionGetParamUInt256(struct TWEthereumAbiFunction* _Nonnull fn, int idx, bool isOutput); - -/// Get a bool type parameter at the given index -/// -/// \param fn A Non-null eth abi function -/// \param idx index for the parameter (0-based). -/// \param isOutput determines if the parameter is an input or output -/// \return the value of the parameter. -TW_EXPORT_METHOD -bool TWEthereumAbiFunctionGetParamBool(struct TWEthereumAbiFunction* _Nonnull fn, int idx, bool isOutput); - -/// Get a string type parameter at the given index -/// -/// \param fn A Non-null eth abi function -/// \param idx index for the parameter (0-based). -/// \param isOutput determines if the parameter is an input or output -/// \return the value of the parameter. -TW_EXPORT_METHOD -TWString* _Nonnull TWEthereumAbiFunctionGetParamString(struct TWEthereumAbiFunction* _Nonnull fn, int idx, bool isOutput); - -/// Get an address type parameter at the given index -/// -/// \param fn A Non-null eth abi function -/// \param idx index for the parameter (0-based). -/// \param isOutput determines if the parameter is an input or output -/// \return the value of the parameter. -TW_EXPORT_METHOD -TWData* _Nonnull TWEthereumAbiFunctionGetParamAddress(struct TWEthereumAbiFunction* _Nonnull fn, int idx, bool isOutput); - -/// Methods for adding a parameter of the given type to a top-level input parameter array. Returns the index of the parameter (0-based). -/// Note that nested ParamArrays are not possible through this API, could be done by using index paths like "1/0" - -/// Adding a uint8 type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamUInt8(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, uint8_t val); - -/// Adding a uint16 type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamUInt16(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, uint16_t val); - -/// Adding a uint32 type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamUInt32(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, uint32_t val); - -/// Adding a uint64 type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamUInt64(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, uint64_t val); - -/// Adding a uint256 type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter stored in a block of data -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamUInt256(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, TWData* _Nonnull val); - -/// Adding a uint[N] type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param bits Number of bits of the integer parameter -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter stored in a block of data -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamUIntN(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, int bits, TWData* _Nonnull val); - -/// Adding a int8 type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamInt8(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, int8_t val); - -/// Adding a int16 type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamInt16(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, int16_t val); - -/// Adding a int32 type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamInt32(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, int32_t val); - -/// Adding a int64 type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamInt64(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, int64_t val); - -/// Adding a int256 type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter stored in a block of data -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamInt256(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, TWData* _Nonnull val); - -/// Adding a int[N] type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param bits Number of bits of the integer parameter -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter stored in a block of data -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamIntN(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, int bits, TWData* _Nonnull val); - -/// Adding a bool type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamBool(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, bool val); - -/// Adding a string type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamString(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, TWString* _Nonnull val); - -/// Adding an address type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamAddress(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, TWData* _Nonnull val); - -/// Adding a bytes type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param val the value of the parameter -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamBytes(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, TWData* _Nonnull val); - -/// Adding a int64 type parameter of to the top-level input parameter array -/// -/// \param fn A Non-null eth abi function -/// \param arrayIdx array index for the abi function (0-based). -/// \param size fixed size of the bytes array parameter (val). -/// \param val the value of the parameter -/// \return the index of the added parameter (0-based). -TW_EXPORT_METHOD -TW_METHOD_DISCARDABLE_RESULT -int TWEthereumAbiFunctionAddInArrayParamBytesFix(struct TWEthereumAbiFunction* _Nonnull fn, int arrayIdx, size_t size, TWData* _Nonnull val); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumAbiProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumAbiProto.h deleted file mode 100644 index 4a863a3f..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumAbiProto.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_EthereumAbi_Proto_BoolType; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_NumberNType; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_StringType; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_AddressType; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_ArrayType; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_FixedArrayType; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_ByteArrayType; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_ByteArrayFixType; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_TupleType; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_Param; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_ParamType; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_NumberNParam; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_ArrayParam; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_TupleParam; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_Token; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_ContractCallDecodingInput; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_ContractCallDecodingOutput; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_AbiParams; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_ParamsDecodingInput; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_ParamsDecodingOutput; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_ValueDecodingInput; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_ValueDecodingOutput; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_FunctionEncodingInput; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_FunctionEncodingOutput; -typedef TWData *_Nonnull TW_EthereumAbi_Proto_FunctionGetTypeInput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumAbiValue.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumAbiValue.h deleted file mode 100644 index 0af2f1e2..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumAbiValue.h +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWString.h" -#include "TWData.h" - -TW_EXTERN_C_BEGIN - -/// Represents Ethereum ABI value -TW_EXPORT_STRUCT -struct TWEthereumAbiValue; - -/// Encode a bool according to Ethereum ABI, into 32 bytes. Values are padded by 0 on the left, unless specified otherwise -/// -/// \param value a boolean value -/// \return Encoded value stored in a block of data -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiValueEncodeBool(bool value); - -/// Encode a int32 according to Ethereum ABI, into 32 bytes. Values are padded by 0 on the left, unless specified otherwise -/// -/// \param value a int32 value -/// \return Encoded value stored in a block of data -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiValueEncodeInt32(int32_t value); - -/// Encode a uint32 according to Ethereum ABI, into 32 bytes. Values are padded by 0 on the left, unless specified otherwise -/// -/// \param value a uint32 value -/// \return Encoded value stored in a block of data -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiValueEncodeUInt32(uint32_t value); - -/// Encode a int256 according to Ethereum ABI, into 32 bytes. Values are padded by 0 on the left, unless specified otherwise -/// -/// \param value a int256 value stored in a block of data -/// \return Encoded value stored in a block of data -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiValueEncodeInt256(TWData* _Nonnull value); - -/// Encode an int256 according to Ethereum ABI, into 32 bytes. Values are padded by 0 on the left, unless specified otherwise -/// -/// \param value a int256 value stored in a block of data -/// \return Encoded value stored in a block of data -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiValueEncodeUInt256(TWData* _Nonnull value); - -/// Encode an address according to Ethereum ABI, 20 bytes of the address. -/// -/// \param value an address value stored in a block of data -/// \return Encoded value stored in a block of data -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiValueEncodeAddress(TWData* _Nonnull value); - -/// Encode a string according to Ethereum ABI by encoding its hash. -/// -/// \param value a string value -/// \return Encoded value stored in a block of data -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiValueEncodeString(TWString* _Nonnull value); - -/// Encode a number of bytes, up to 32 bytes, padded on the right. Longer arrays are truncated. -/// -/// \param value bunch of bytes -/// \return Encoded value stored in a block of data -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiValueEncodeBytes(TWData* _Nonnull value); - -/// Encode a dynamic number of bytes by encoding its hash -/// -/// \param value bunch of bytes -/// \return Encoded value stored in a block of data -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumAbiValueEncodeBytesDyn(TWData* _Nonnull value); - -/// Decodes input data (bytes longer than 32 will be truncated) as uint256 -/// -/// \param input Data to be decoded -/// \return Non-null decoded string value -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWEthereumAbiValueDecodeUInt256(TWData* _Nonnull input); - -/// Decode an arbitrary type, return value as string -/// -/// \param input Data to be decoded -/// \param type the underlying type that need to be decoded -/// \return Non-null decoded string value -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWEthereumAbiValueDecodeValue(TWData* _Nonnull input, TWString* _Nonnull type); - -/// Decode an array of given simple types. Return a '\n'-separated string of elements -/// -/// \param input Data to be decoded -/// \param type the underlying type that need to be decoded -/// \return Non-null decoded string value -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWEthereumAbiValueDecodeArray(TWData* _Nonnull input, TWString* _Nonnull type); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumChainID.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumChainID.h deleted file mode 100644 index 6658d723..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumChainID.h +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE from \registry.json, changes made here WILL BE LOST. -// - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Chain identifiers for Ethereum-based blockchains, for convenience. Recommended to use the dynamic CoinType.ChainId() instead. -/// See also TWChainId. -TW_EXPORT_ENUM(uint32_t) -enum TWEthereumChainID { - TWEthereumChainIDEthereum = 1, - TWEthereumChainIDClassic = 61, - TWEthereumChainIDRootstock = 30, - TWEthereumChainIDPoa = 99, - TWEthereumChainIDOpbnb = 204, - TWEthereumChainIDTfuelevm = 361, - TWEthereumChainIDVechain = 74, - TWEthereumChainIDCallisto = 820, - TWEthereumChainIDTomochain = 88, - TWEthereumChainIDPolygon = 137, - TWEthereumChainIDOkc = 66, - TWEthereumChainIDThundertoken = 108, - TWEthereumChainIDCfxevm = 1030, - TWEthereumChainIDMantle = 5000, - TWEthereumChainIDGochain = 60, - TWEthereumChainIDZeneon = 7332, - TWEthereumChainIDBase = 8453, - TWEthereumChainIDMeter = 82, - TWEthereumChainIDCelo = 42220, - TWEthereumChainIDLinea = 59144, - TWEthereumChainIDScroll = 534353, - TWEthereumChainIDWanchain = 888, - TWEthereumChainIDCronos = 25, - TWEthereumChainIDOptimism = 10, - TWEthereumChainIDXdai = 100, - TWEthereumChainIDSmartbch = 10000, - TWEthereumChainIDFantom = 250, - TWEthereumChainIDBoba = 288, - TWEthereumChainIDKcc = 321, - TWEthereumChainIDZksync = 324, - TWEthereumChainIDHeco = 128, - TWEthereumChainIDAcalaevm = 787, - TWEthereumChainIDMetis = 1088, - TWEthereumChainIDPolygonzkevm = 1101, - TWEthereumChainIDMoonbeam = 1284, - TWEthereumChainIDMoonriver = 1285, - TWEthereumChainIDRonin = 2020, - TWEthereumChainIDKavaevm = 2222, - TWEthereumChainIDIotexevm = 4689, - TWEthereumChainIDKlaytn = 8217, - TWEthereumChainIDAvalanchec = 43114, - TWEthereumChainIDEvmos = 9001, - TWEthereumChainIDArbitrumnova = 42170, - TWEthereumChainIDArbitrum = 42161, - TWEthereumChainIDSmartchain = 56, - TWEthereumChainIDNeon = 245022934, - TWEthereumChainIDAurora = 1313161554, -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumMessageSigner.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumMessageSigner.h deleted file mode 100644 index cf21d8a8..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumMessageSigner.h +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" -#include "TWPrivateKey.h" -#include "TWPublicKey.h" - -TW_EXTERN_C_BEGIN - -/// Ethereum message signing and verification. -/// -/// Ethereum and some other wallets support a message signing & verification format, to create a proof (a signature) -/// that someone has access to the private keys of a specific address. -TW_EXPORT_STRUCT -struct TWEthereumMessageSigner; - -/// Sign a typed message EIP-712 V4. -/// -/// \param privateKey: the private key used for signing -/// \param messageJson: A custom typed data message in json -/// \returns the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWEthereumMessageSignerSignTypedMessage(const struct TWPrivateKey* _Nonnull privateKey, TWString* _Nonnull messageJson); - -/// Sign a typed message EIP-712 V4 with EIP-155 replay attack protection. -/// -/// \param privateKey: the private key used for signing -/// \param messageJson: A custom typed data message in json -/// \param chainId: chainId for eip-155 protection -/// \returns the signature, Hex-encoded. On invalid input empty string is returned or invalid chainId error message. Returned object needs to be deleted after use. -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWEthereumMessageSignerSignTypedMessageEip155(const struct TWPrivateKey* _Nonnull privateKey, TWString* _Nonnull messageJson, int chainId); - -/// Sign a message. -/// -/// \param privateKey: the private key used for signing -/// \param message: A custom message which is input to the signing. -/// \returns the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWEthereumMessageSignerSignMessage(const struct TWPrivateKey* _Nonnull privateKey, TWString* _Nonnull message); - -/// Sign a message with Immutable X msg type. -/// -/// \param privateKey: the private key used for signing -/// \param message: A custom message which is input to the signing. -/// \returns the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWEthereumMessageSignerSignMessageImmutableX(const struct TWPrivateKey* _Nonnull privateKey, TWString* _Nonnull message); - -/// Sign a message with Eip-155 msg type. -/// -/// \param privateKey: the private key used for signing -/// \param message: A custom message which is input to the signing. -/// \param chainId: chainId for eip-155 protection -/// \returns the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWEthereumMessageSignerSignMessageEip155(const struct TWPrivateKey* _Nonnull privateKey, TWString* _Nonnull message, int chainId); - -/// Verify signature for a message. -/// -/// \param pubKey: pubKey that will verify and recover the message from the signature -/// \param message: the message signed (without prefix) -/// \param signature: in Hex-encoded form. -/// \returns false on any invalid input (does not throw), true if the message can be recovered from the signature -TW_EXPORT_STATIC_METHOD -bool TWEthereumMessageSignerVerifyMessage(const struct TWPublicKey* _Nonnull pubKey, TWString* _Nonnull message, TWString* _Nonnull signature); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumProto.h deleted file mode 100644 index 7c47b0ba..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumProto.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Ethereum_Proto_Transaction; -typedef TWData *_Nonnull TW_Ethereum_Proto_UserOperation; -typedef TWData *_Nonnull TW_Ethereum_Proto_SigningInput; -typedef TWData *_Nonnull TW_Ethereum_Proto_SigningOutput; -typedef TWData *_Nonnull TW_Ethereum_Proto_MaybeChainId; -typedef TWData *_Nonnull TW_Ethereum_Proto_MessageSigningInput; -typedef TWData *_Nonnull TW_Ethereum_Proto_MessageSigningOutput; -typedef TWData *_Nonnull TW_Ethereum_Proto_MessageVerifyingInput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumRlp.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumRlp.h deleted file mode 100644 index 1644c86e..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumRlp.h +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWCoinType.h" -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -TW_EXPORT_STRUCT -struct TWEthereumRlp; - -/// Encode an item or a list of items as Eth RLP binary format. -/// -/// \param coin EVM-compatible coin type. -/// \param input Non-null serialized `EthereumRlp::Proto::EncodingInput`. -/// \return serialized `EthereumRlp::Proto::EncodingOutput`. -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWEthereumRlpEncode(enum TWCoinType coin, TWData* _Nonnull input); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumRlpProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumRlpProto.h deleted file mode 100644 index 82aa0a4a..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWEthereumRlpProto.h +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_EthereumRlp_Proto_RlpList; -typedef TWData *_Nonnull TW_EthereumRlp_Proto_RlpItem; -typedef TWData *_Nonnull TW_EthereumRlp_Proto_EncodingInput; -typedef TWData *_Nonnull TW_EthereumRlp_Proto_EncodingOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWEverscaleProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWEverscaleProto.h deleted file mode 100644 index ebfe458b..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWEverscaleProto.h +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Everscale_Proto_Transfer; -typedef TWData *_Nonnull TW_Everscale_Proto_SigningInput; -typedef TWData *_Nonnull TW_Everscale_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWFIOAccount.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWFIOAccount.h deleted file mode 100644 index a8abca53..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWFIOAccount.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Represents a FIO Account name -TW_EXPORT_CLASS -struct TWFIOAccount; - -/// Create a FIO Account -/// -/// \param string Account name -/// \note Must be deleted with \TWFIOAccountDelete -/// \return Pointer to a nullable FIO Account -TW_EXPORT_STATIC_METHOD -struct TWFIOAccount *_Nullable TWFIOAccountCreateWithString(TWString *_Nonnull string); - -/// Delete a FIO Account -/// -/// \param account Pointer to a non-null FIO Account -TW_EXPORT_METHOD -void TWFIOAccountDelete(struct TWFIOAccount *_Nonnull account); - -/// Returns the short account string representation. -/// -/// \param account Pointer to a non-null FIO Account -/// \return Account non-null string representation -TW_EXPORT_PROPERTY -TWString *_Nonnull TWFIOAccountDescription(struct TWFIOAccount *_Nonnull account); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWFIOProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWFIOProto.h deleted file mode 100644 index 465cbcc5..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWFIOProto.h +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_FIO_Proto_PublicAddress; -typedef TWData *_Nonnull TW_FIO_Proto_NewFundsContent; -typedef TWData *_Nonnull TW_FIO_Proto_Action; -typedef TWData *_Nonnull TW_FIO_Proto_ChainParams; -typedef TWData *_Nonnull TW_FIO_Proto_SigningInput; -typedef TWData *_Nonnull TW_FIO_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWFilecoinAddressConverter.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWFilecoinAddressConverter.h deleted file mode 100644 index aa5e37b8..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWFilecoinAddressConverter.h +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Filecoin-Ethereum address converter. -TW_EXPORT_STRUCT -struct TWFilecoinAddressConverter; - -/// Converts a Filecoin address to Ethereum. -/// -/// \param filecoinAddress: a Filecoin address. -/// \returns the Ethereum address. On invalid input empty string is returned. Returned object needs to be deleted after use. -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWFilecoinAddressConverterConvertToEthereum(TWString* _Nonnull filecoinAddress); - -/// Converts an Ethereum address to Filecoin. -/// -/// \param ethAddress: an Ethereum address. -/// \returns the Filecoin address. On invalid input empty string is returned. Returned object needs to be deleted after use. -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWFilecoinAddressConverterConvertFromEthereum(TWString* _Nonnull ethAddress); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWFilecoinAddressType.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWFilecoinAddressType.h deleted file mode 100644 index 98f82450..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWFilecoinAddressType.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Filecoin address type. -TW_EXPORT_ENUM(uint32_t) -enum TWFilecoinAddressType { - TWFilecoinAddressTypeDefault = 0, // default - TWFilecoinAddressTypeDelegated = 1, -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWFilecoinProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWFilecoinProto.h deleted file mode 100644 index 2bdf5759..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWFilecoinProto.h +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Filecoin_Proto_SigningInput; -typedef TWData *_Nonnull TW_Filecoin_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWGreenfieldProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWGreenfieldProto.h deleted file mode 100644 index 445df8fe..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWGreenfieldProto.h +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Greenfield_Proto_Amount; -typedef TWData *_Nonnull TW_Greenfield_Proto_Fee; -typedef TWData *_Nonnull TW_Greenfield_Proto_Message; -typedef TWData *_Nonnull TW_Greenfield_Proto_SigningInput; -typedef TWData *_Nonnull TW_Greenfield_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWGroestlcoinAddress.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWGroestlcoinAddress.h deleted file mode 100644 index e6512db8..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWGroestlcoinAddress.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWString.h" -#include "TWData.h" - -TW_EXTERN_C_BEGIN - -struct TWPublicKey; - -/// Represents a legacy Groestlcoin address. -TW_EXPORT_CLASS -struct TWGroestlcoinAddress; - -/// Compares two addresses for equality. -/// -/// \param lhs left Non-null GroestlCoin address to be compared -/// \param rhs right Non-null GroestlCoin address to be compared -/// \return true if both address are equal, false otherwise -TW_EXPORT_STATIC_METHOD -bool TWGroestlcoinAddressEqual(struct TWGroestlcoinAddress *_Nonnull lhs, struct TWGroestlcoinAddress *_Nonnull rhs); - -/// Determines if the string is a valid Groestlcoin address. -/// -/// \param string Non-null string. -/// \return true if it's a valid address, false otherwise -TW_EXPORT_STATIC_METHOD -bool TWGroestlcoinAddressIsValidString(TWString *_Nonnull string); - -/// Create an address from a base58 string representation. -/// -/// \param string Non-null string -/// \note Must be deleted with \TWGroestlcoinAddressDelete -/// \return Non-null GroestlcoinAddress -TW_EXPORT_STATIC_METHOD -struct TWGroestlcoinAddress *_Nullable TWGroestlcoinAddressCreateWithString(TWString *_Nonnull string); - -/// Create an address from a public key and a prefix byte. -/// -/// \param publicKey Non-null public key -/// \param prefix public key prefix -/// \note Must be deleted with \TWGroestlcoinAddressDelete -/// \return Non-null GroestlcoinAddress -TW_EXPORT_STATIC_METHOD -struct TWGroestlcoinAddress *_Nonnull TWGroestlcoinAddressCreateWithPublicKey(struct TWPublicKey *_Nonnull publicKey, uint8_t prefix); - -/// Delete a Groestlcoin address -/// -/// \param address Non-null GroestlcoinAddress -TW_EXPORT_METHOD -void TWGroestlcoinAddressDelete(struct TWGroestlcoinAddress *_Nonnull address); - -/// Returns the address base58 string representation. -/// -/// \param address Non-null GroestlcoinAddress -/// \return Address description as a non-null string -TW_EXPORT_PROPERTY -TWString *_Nonnull TWGroestlcoinAddressDescription(struct TWGroestlcoinAddress *_Nonnull address); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWHDVersion.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWHDVersion.h deleted file mode 100644 index 6e726bef..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWHDVersion.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Registered HD version bytes -/// -/// \see https://github.com/satoshilabs/slips/blob/master/slip-0132.md -TW_EXPORT_ENUM(uint32_t) -enum TWHDVersion { - TWHDVersionNone = 0, - - // Bitcoin - TWHDVersionXPUB = 0x0488b21e, - TWHDVersionXPRV = 0x0488ade4, - TWHDVersionYPUB = 0x049d7cb2, - TWHDVersionYPRV = 0x049d7878, - TWHDVersionZPUB = 0x04b24746, - TWHDVersionZPRV = 0x04b2430c, - TWHDVersionVPUB = 0x045f1cf6, - TWHDVersionVPRV = 0x045f18bc, - TWHDVersionTPUB = 0x043587cf, - TWHDVersionTPRV = 0x04358394, - - // Litecoin - TWHDVersionLTUB = 0x019da462, - TWHDVersionLTPV = 0x019d9cfe, - TWHDVersionMTUB = 0x01b26ef6, - TWHDVersionMTPV = 0x01b26792, - TWHDVersionTTUB = 0x0436f6e1, - TWHDVersionTTPV = 0x0436ef7d, - - // Decred - TWHDVersionDPUB = 0x2fda926, - TWHDVersionDPRV = 0x2fda4e8, - - // Dogecoin - TWHDVersionDGUB = 0x02facafd, - TWHDVersionDGPV = 0x02fac398, -}; - -/// Determine if the HD Version is public -/// -/// \param version HD version -/// \return true if the version is public, false otherwise -TW_EXPORT_PROPERTY -bool TWHDVersionIsPublic(enum TWHDVersion version); - -/// Determine if the HD Version is private -/// -/// \param version HD version -/// \return true if the version is private, false otherwise -TW_EXPORT_PROPERTY -bool TWHDVersionIsPrivate(enum TWHDVersion version); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWHDWallet.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWHDWallet.h deleted file mode 100644 index e48e9bd7..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWHDWallet.h +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWCoinType.h" -#include "TWCurve.h" -#include "TWData.h" -#include "TWDerivation.h" -#include "TWDerivationPath.h" -#include "TWHDVersion.h" -#include "TWDerivation.h" -#include "TWPrivateKey.h" -#include "TWPublicKey.h" -#include "TWPurpose.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Hierarchical Deterministic (HD) Wallet -TW_EXPORT_CLASS -struct TWHDWallet; - -/// Creates a new HDWallet with a new random mnemonic with the provided strength in bits. -/// -/// \param strength strength in bits -/// \param passphrase non-null passphrase -/// \note Null is returned on invalid strength -/// \note Returned object needs to be deleted with \TWHDWalletDelete -/// \return Nullable TWHDWallet -TW_EXPORT_STATIC_METHOD -struct TWHDWallet* _Nullable TWHDWalletCreate(int strength, TWString* _Nonnull passphrase); - -/// Creates an HDWallet from a valid BIP39 English mnemonic and a passphrase. -/// -/// \param mnemonic non-null Valid BIP39 mnemonic -/// \param passphrase non-null passphrase -/// \note Null is returned on invalid mnemonic -/// \note Returned object needs to be deleted with \TWHDWalletDelete -/// \return Nullable TWHDWallet -TW_EXPORT_STATIC_METHOD -struct TWHDWallet* _Nullable TWHDWalletCreateWithMnemonic(TWString* _Nonnull mnemonic, TWString* _Nonnull passphrase); - -/// Creates an HDWallet from a BIP39 mnemonic, a passphrase and validation flag. -/// -/// \param mnemonic non-null Valid BIP39 mnemonic -/// \param passphrase non-null passphrase -/// \param check validation flag -/// \note Null is returned on invalid mnemonic -/// \note Returned object needs to be deleted with \TWHDWalletDelete -/// \return Nullable TWHDWallet -TW_EXPORT_STATIC_METHOD -struct TWHDWallet* _Nullable TWHDWalletCreateWithMnemonicCheck(TWString* _Nonnull mnemonic, TWString* _Nonnull passphrase, bool check); - -/// Creates an HDWallet from entropy (corresponding to a mnemonic). -/// -/// \param entropy Non-null entropy data (corresponding to a mnemonic) -/// \param passphrase non-null passphrase -/// \note Null is returned on invalid input -/// \note Returned object needs to be deleted with \TWHDWalletDelete -/// \return Nullable TWHDWallet -TW_EXPORT_STATIC_METHOD -struct TWHDWallet* _Nullable TWHDWalletCreateWithEntropy(TWData* _Nonnull entropy, TWString* _Nonnull passphrase); - -/// Deletes a wallet. -/// -/// \param wallet non-null TWHDWallet -TW_EXPORT_METHOD -void TWHDWalletDelete(struct TWHDWallet* _Nonnull wallet); - -/// Wallet seed. -/// -/// \param wallet non-null TWHDWallet -/// \return The wallet seed as a Non-null block of data. -TW_EXPORT_PROPERTY -TWData* _Nonnull TWHDWalletSeed(struct TWHDWallet* _Nonnull wallet); - -/// Wallet Mnemonic -/// -/// \param wallet non-null TWHDWallet -/// \return The wallet mnemonic as a non-null TWString -TW_EXPORT_PROPERTY -TWString* _Nonnull TWHDWalletMnemonic(struct TWHDWallet* _Nonnull wallet); - -/// Wallet entropy -/// -/// \param wallet non-null TWHDWallet -/// \return The wallet entropy as a non-null block of data. -TW_EXPORT_PROPERTY -TWData* _Nonnull TWHDWalletEntropy(struct TWHDWallet* _Nonnull wallet); - -/// Returns master key. -/// -/// \param wallet non-null TWHDWallet -/// \param curve a curve -/// \note Returned object needs to be deleted with \TWPrivateKeyDelete -/// \return Non-null corresponding private key -TW_EXPORT_METHOD -struct TWPrivateKey* _Nonnull TWHDWalletGetMasterKey(struct TWHDWallet* _Nonnull wallet, enum TWCurve curve); - -/// Generates the default private key for the specified coin, using default derivation. -/// -/// \see TWHDWalletGetKey -/// \see TWHDWalletGetKeyDerivation -/// \param wallet non-null TWHDWallet -/// \param coin a coin type -/// \note Returned object needs to be deleted with \TWPrivateKeyDelete -/// \return return the default private key for the specified coin -TW_EXPORT_METHOD -struct TWPrivateKey* _Nonnull TWHDWalletGetKeyForCoin(struct TWHDWallet* _Nonnull wallet, enum TWCoinType coin); - -/// Generates the default address for the specified coin (without exposing intermediary private key), default derivation. -/// -/// \see TWHDWalletGetAddressDerivation -/// \param wallet non-null TWHDWallet -/// \param coin a coin type -/// \return return the default address for the specified coin as a non-null TWString -TW_EXPORT_METHOD -TWString* _Nonnull TWHDWalletGetAddressForCoin(struct TWHDWallet* _Nonnull wallet, enum TWCoinType coin); - -/// Generates the default address for the specified coin and derivation (without exposing intermediary private key). -/// -/// \see TWHDWalletGetAddressForCoin -/// \param wallet non-null TWHDWallet -/// \param coin a coin type -/// \param derivation a (custom) derivation to use -/// \return return the default address for the specified coin as a non-null TWString -TW_EXPORT_METHOD -TWString* _Nonnull TWHDWalletGetAddressDerivation(struct TWHDWallet* _Nonnull wallet, enum TWCoinType coin, enum TWDerivation derivation); - -/// Generates the private key for the specified derivation path. -/// -/// \see TWHDWalletGetKeyForCoin -/// \see TWHDWalletGetKeyDerivation -/// \param wallet non-null TWHDWallet -/// \param coin a coin type -/// \param derivationPath a non-null derivation path -/// \note Returned object needs to be deleted with \TWPrivateKeyDelete -/// \return The private key for the specified derivation path/coin -TW_EXPORT_METHOD -struct TWPrivateKey* _Nonnull TWHDWalletGetKey(struct TWHDWallet* _Nonnull wallet, enum TWCoinType coin, TWString* _Nonnull derivationPath); - -/// Generates the private key for the specified derivation. -/// -/// \see TWHDWalletGetKey -/// \see TWHDWalletGetKeyForCoin -/// \param wallet non-null TWHDWallet -/// \param coin a coin type -/// \param derivation a (custom) derivation to use -/// \note Returned object needs to be deleted with \TWPrivateKeyDelete -/// \return The private key for the specified derivation path/coin -TW_EXPORT_METHOD -struct TWPrivateKey* _Nonnull TWHDWalletGetKeyDerivation(struct TWHDWallet* _Nonnull wallet, enum TWCoinType coin, enum TWDerivation derivation); - -/// Generates the private key for the specified derivation path and curve. -/// -/// \param wallet non-null TWHDWallet -/// \param curve a curve -/// \param derivationPath a non-null derivation path -/// \note Returned object needs to be deleted with \TWPrivateKeyDelete -/// \return The private key for the specified derivation path/curve -TW_EXPORT_METHOD -struct TWPrivateKey* _Nonnull TWHDWalletGetKeyByCurve(struct TWHDWallet* _Nonnull wallet, enum TWCurve curve, TWString* _Nonnull derivationPath); - -/// Shortcut method to generate private key with the specified account/change/address (bip44 standard). -/// -/// \see https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki -/// -/// \param wallet non-null TWHDWallet -/// \param coin a coin type -/// \param account valid bip44 account -/// \param change valid bip44 change -/// \param address valid bip44 address -/// \note Returned object needs to be deleted with \TWPrivateKeyDelete -/// \return The private key for the specified bip44 parameters -TW_EXPORT_METHOD -struct TWPrivateKey* _Nonnull TWHDWalletGetDerivedKey(struct TWHDWallet* _Nonnull wallet, enum TWCoinType coin, uint32_t account, uint32_t change, uint32_t address); - -/// Returns the extended private key (for default 0 account). -/// -/// \param wallet non-null TWHDWallet -/// \param purpose a purpose -/// \param coin a coin type -/// \param version hd version -/// \note Returned object needs to be deleted with \TWStringDelete -/// \return Extended private key as a non-null TWString -TW_EXPORT_METHOD -TWString* _Nonnull TWHDWalletGetExtendedPrivateKey(struct TWHDWallet* _Nonnull wallet, enum TWPurpose purpose, enum TWCoinType coin, enum TWHDVersion version); - -/// Returns the extended public key (for default 0 account). -/// -/// \param wallet non-null TWHDWallet -/// \param purpose a purpose -/// \param coin a coin type -/// \param version hd version -/// \note Returned object needs to be deleted with \TWStringDelete -/// \return Extended public key as a non-null TWString -TW_EXPORT_METHOD -TWString* _Nonnull TWHDWalletGetExtendedPublicKey(struct TWHDWallet* _Nonnull wallet, enum TWPurpose purpose, enum TWCoinType coin, enum TWHDVersion version); - -/// Returns the extended private key, for custom account. -/// -/// \param wallet non-null TWHDWallet -/// \param purpose a purpose -/// \param coin a coin type -/// \param derivation a derivation -/// \param version an hd version -/// \param account valid bip44 account -/// \note Returned object needs to be deleted with \TWStringDelete -/// \return Extended private key as a non-null TWString -TW_EXPORT_METHOD -TWString* _Nonnull TWHDWalletGetExtendedPrivateKeyAccount(struct TWHDWallet* _Nonnull wallet, enum TWPurpose purpose, enum TWCoinType coin, enum TWDerivation derivation, enum TWHDVersion version, uint32_t account); - -/// Returns the extended public key, for custom account. -/// -/// \param wallet non-null TWHDWallet -/// \param purpose a purpose -/// \param coin a coin type -/// \param derivation a derivation -/// \param version an hd version -/// \param account valid bip44 account -/// \note Returned object needs to be deleted with \TWStringDelete -/// \return Extended public key as a non-null TWString -TW_EXPORT_METHOD -TWString* _Nonnull TWHDWalletGetExtendedPublicKeyAccount(struct TWHDWallet* _Nonnull wallet, enum TWPurpose purpose, enum TWCoinType coin, enum TWDerivation derivation, enum TWHDVersion version, uint32_t account); - -/// Returns the extended private key (for default 0 account with derivation). -/// -/// \param wallet non-null TWHDWallet -/// \param purpose a purpose -/// \param coin a coin type -/// \param derivation a derivation -/// \param version an hd version -/// \note Returned object needs to be deleted with \TWStringDelete -/// \return Extended private key as a non-null TWString -TW_EXPORT_METHOD -TWString* _Nonnull TWHDWalletGetExtendedPrivateKeyDerivation(struct TWHDWallet* _Nonnull wallet, enum TWPurpose purpose, enum TWCoinType coin, enum TWDerivation derivation, enum TWHDVersion version); - -/// Returns the extended public key (for default 0 account with derivation). -/// -/// \param wallet non-null TWHDWallet -/// \param purpose a purpose -/// \param coin a coin type -/// \param derivation a derivation -/// \param version an hd version -/// \note Returned object needs to be deleted with \TWStringDelete -/// \return Extended public key as a non-null TWString -TW_EXPORT_METHOD -TWString* _Nonnull TWHDWalletGetExtendedPublicKeyDerivation(struct TWHDWallet* _Nonnull wallet, enum TWPurpose purpose, enum TWCoinType coin, enum TWDerivation derivation, enum TWHDVersion version); - -/// Computes the public key from an extended public key representation. -/// -/// \param extended extended public key -/// \param coin a coin type -/// \param derivationPath a derivation path -/// \note Returned object needs to be deleted with \TWPublicKeyDelete -/// \return Nullable TWPublic key -TW_EXPORT_STATIC_METHOD -struct TWPublicKey* _Nullable TWHDWalletGetPublicKeyFromExtended(TWString* _Nonnull extended, enum TWCoinType coin, TWString* _Nonnull derivationPath); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWHRP.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWHRP.h deleted file mode 100644 index b25cee97..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWHRP.h +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE from \registry.json, changes made here WILL BE LOST. -// - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Registered human-readable parts for BIP-0173 -/// -/// - SeeAlso: https://github.com/satoshilabs/slips/blob/master/slip-0173.md -TW_EXPORT_ENUM() -enum TWHRP { - TWHRPUnknown /* "" */, - TWHRPBitcoin /* "bc" */, - TWHRPLitecoin /* "ltc" */, - TWHRPViacoin /* "via" */, - TWHRPGroestlcoin /* "grs" */, - TWHRPDigiByte /* "dgb" */, - TWHRPMonacoin /* "mona" */, - TWHRPSyscoin /* "sys" */, - TWHRPVerge /* "vg" */, - TWHRPCosmos /* "cosmos" */, - TWHRPBitcoinCash /* "bitcoincash" */, - TWHRPBitcoinGold /* "btg" */, - TWHRPIoTeX /* "io" */, - TWHRPNervos /* "ckb" */, - TWHRPZilliqa /* "zil" */, - TWHRPTerra /* "terra" */, - TWHRPCryptoOrg /* "cro" */, - TWHRPKava /* "kava" */, - TWHRPOasis /* "oasis" */, - TWHRPBluzelle /* "bluzelle" */, - TWHRPBandChain /* "band" */, - TWHRPMultiversX /* "erd" */, - TWHRPSecret /* "secret" */, - TWHRPAgoric /* "agoric" */, - TWHRPBinance /* "bnb" */, - TWHRPECash /* "ecash" */, - TWHRPTHORChain /* "thor" */, - TWHRPBitcoinDiamond /* "bcd" */, - TWHRPHarmony /* "one" */, - TWHRPCardano /* "addr" */, - TWHRPQtum /* "qc" */, - TWHRPStratis /* "strax" */, - TWHRPNativeInjective /* "inj" */, - TWHRPOsmosis /* "osmo" */, - TWHRPTerraV2 /* "terra" */, - TWHRPCoreum /* "core" */, - TWHRPNativeCanto /* "canto" */, - TWHRPSommelier /* "somm" */, - TWHRPFetchAI /* "fetch" */, - TWHRPMars /* "mars" */, - TWHRPUmee /* "umee" */, - TWHRPQuasar /* "quasar" */, - TWHRPPersistence /* "persistence" */, - TWHRPAkash /* "akash" */, - TWHRPNoble /* "noble" */, - TWHRPSei /* "sei" */, - TWHRPStargaze /* "stars" */, - TWHRPNativeEvmos /* "evmos" */, - TWHRPJuno /* "juno" */, - TWHRPTBinance /* "tbnb" */, - TWHRPStride /* "stride" */, - TWHRPAxelar /* "axelar" */, - TWHRPCrescent /* "cre" */, - TWHRPKujira /* "kujira" */, - TWHRPComdex /* "comdex" */, - TWHRPNeutron /* "neutron" */, -}; - -static const char *_Nonnull HRP_BITCOIN = "bc"; -static const char *_Nonnull HRP_LITECOIN = "ltc"; -static const char *_Nonnull HRP_VIACOIN = "via"; -static const char *_Nonnull HRP_GROESTLCOIN = "grs"; -static const char *_Nonnull HRP_DIGIBYTE = "dgb"; -static const char *_Nonnull HRP_MONACOIN = "mona"; -static const char *_Nonnull HRP_SYSCOIN = "sys"; -static const char *_Nonnull HRP_VERGE = "vg"; -static const char *_Nonnull HRP_COSMOS = "cosmos"; -static const char *_Nonnull HRP_BITCOINCASH = "bitcoincash"; -static const char *_Nonnull HRP_BITCOINGOLD = "btg"; -static const char *_Nonnull HRP_IOTEX = "io"; -static const char *_Nonnull HRP_NERVOS = "ckb"; -static const char *_Nonnull HRP_ZILLIQA = "zil"; -static const char *_Nonnull HRP_TERRA = "terra"; -static const char *_Nonnull HRP_CRYPTOORG = "cro"; -static const char *_Nonnull HRP_KAVA = "kava"; -static const char *_Nonnull HRP_OASIS = "oasis"; -static const char *_Nonnull HRP_BLUZELLE = "bluzelle"; -static const char *_Nonnull HRP_BAND = "band"; -static const char *_Nonnull HRP_ELROND = "erd"; -static const char *_Nonnull HRP_SECRET = "secret"; -static const char *_Nonnull HRP_AGORIC = "agoric"; -static const char *_Nonnull HRP_BINANCE = "bnb"; -static const char *_Nonnull HRP_ECASH = "ecash"; -static const char *_Nonnull HRP_THORCHAIN = "thor"; -static const char *_Nonnull HRP_BITCOINDIAMOND = "bcd"; -static const char *_Nonnull HRP_HARMONY = "one"; -static const char *_Nonnull HRP_CARDANO = "addr"; -static const char *_Nonnull HRP_QTUM = "qc"; -static const char *_Nonnull HRP_STRATIS = "strax"; -static const char *_Nonnull HRP_NATIVEINJECTIVE = "inj"; -static const char *_Nonnull HRP_OSMOSIS = "osmo"; -static const char *_Nonnull HRP_TERRAV2 = "terra"; -static const char *_Nonnull HRP_COREUM = "core"; -static const char *_Nonnull HRP_NATIVECANTO = "canto"; -static const char *_Nonnull HRP_SOMMELIER = "somm"; -static const char *_Nonnull HRP_FETCHAI = "fetch"; -static const char *_Nonnull HRP_MARS = "mars"; -static const char *_Nonnull HRP_UMEE = "umee"; -static const char *_Nonnull HRP_QUASAR = "quasar"; -static const char *_Nonnull HRP_PERSISTENCE = "persistence"; -static const char *_Nonnull HRP_AKASH = "akash"; -static const char *_Nonnull HRP_NOBLE = "noble"; -static const char *_Nonnull HRP_SEI = "sei"; -static const char *_Nonnull HRP_STARGAZE = "stars"; -static const char *_Nonnull HRP_NATIVEEVMOS = "evmos"; -static const char *_Nonnull HRP_JUNO = "juno"; -static const char *_Nonnull HRP_TBINANCE = "tbnb"; -static const char *_Nonnull HRP_STRIDE = "stride"; -static const char *_Nonnull HRP_AXELAR = "axelar"; -static const char *_Nonnull HRP_CRESCENT = "cre"; -static const char *_Nonnull HRP_KUJIRA = "kujira"; -static const char *_Nonnull HRP_COMDEX = "comdex"; -static const char *_Nonnull HRP_NEUTRON = "neutron"; - -const char *_Nullable stringForHRP(enum TWHRP hrp); -enum TWHRP hrpForString(const char *_Nonnull string); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWHarmonyProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWHarmonyProto.h deleted file mode 100644 index 340239d0..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWHarmonyProto.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Harmony_Proto_SigningInput; -typedef TWData *_Nonnull TW_Harmony_Proto_SigningOutput; -typedef TWData *_Nonnull TW_Harmony_Proto_TransactionMessage; -typedef TWData *_Nonnull TW_Harmony_Proto_StakingMessage; -typedef TWData *_Nonnull TW_Harmony_Proto_Description; -typedef TWData *_Nonnull TW_Harmony_Proto_Decimal; -typedef TWData *_Nonnull TW_Harmony_Proto_CommissionRate; -typedef TWData *_Nonnull TW_Harmony_Proto_DirectiveCreateValidator; -typedef TWData *_Nonnull TW_Harmony_Proto_DirectiveEditValidator; -typedef TWData *_Nonnull TW_Harmony_Proto_DirectiveDelegate; -typedef TWData *_Nonnull TW_Harmony_Proto_DirectiveUndelegate; -typedef TWData *_Nonnull TW_Harmony_Proto_DirectiveCollectRewards; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWHash.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWHash.h deleted file mode 100644 index f8f4a974..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWHash.h +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" - -TW_EXTERN_C_BEGIN - -/// Hash functions -TW_EXPORT_STRUCT -struct TWHash { - uint8_t unused; // C doesn't allow zero-sized struct -}; - -static const size_t TWHashSHA1Length = 20; -static const size_t TWHashSHA256Length = 32; -static const size_t TWHashSHA512Length = 64; -static const size_t TWHashRipemdLength = 20; - -/// Computes the SHA1 of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed SHA1 block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashSHA1(TWData *_Nonnull data); - -/// Computes the SHA256 of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed SHA256 block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashSHA256(TWData *_Nonnull data); - -/// Computes the SHA512 of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed SHA512 block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashSHA512(TWData *_Nonnull data); - -/// Computes the SHA512_256 of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed SHA512_256 block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashSHA512_256(TWData *_Nonnull data); - -/// Computes the Keccak256 of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed Keccak256 block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashKeccak256(TWData *_Nonnull data); - -/// Computes the Keccak512 of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed Keccak512 block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashKeccak512(TWData *_Nonnull data); - -/// Computes the SHA3_256 of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed SHA3_256 block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashSHA3_256(TWData *_Nonnull data); - -/// Computes the SHA3_512 of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed SHA3_512 block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashSHA3_512(TWData *_Nonnull data); - -/// Computes the RIPEMD of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed RIPEMD block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashRIPEMD(TWData *_Nonnull data); - -/// Computes the Blake256 of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed Blake256 block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashBlake256(TWData *_Nonnull data); - -/// Computes the Blake2b of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed Blake2b block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashBlake2b(TWData *_Nonnull data, size_t size); - -/// Computes the Groestl512 of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed Groestl512 block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashBlake2bPersonal(TWData *_Nonnull data, TWData * _Nonnull personal, size_t outlen); - -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashGroestl512(TWData *_Nonnull data); - -/// Computes the SHA256D of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed SHA256D block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashSHA256SHA256(TWData *_Nonnull data); - -/// Computes the SHA256RIPEMD of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed SHA256RIPEMD block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashSHA256RIPEMD(TWData *_Nonnull data); - -/// Computes the SHA3_256RIPEMD of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed SHA3_256RIPEMD block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashSHA3_256RIPEMD(TWData *_Nonnull data); - -/// Computes the Blake256D of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed Blake256D block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashBlake256Blake256(TWData *_Nonnull data); - -/// Computes the Blake256RIPEMD of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed Blake256RIPEMD block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashBlake256RIPEMD(TWData *_Nonnull data); - -/// Computes the Groestl512D of a block of data. -/// -/// \param data Non-null block of data -/// \return Non-null computed Groestl512D block of data -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWHashGroestl512Groestl512(TWData *_Nonnull data); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWHederaProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWHederaProto.h deleted file mode 100644 index d7fea063..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWHederaProto.h +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Hedera_Proto_Timestamp; -typedef TWData *_Nonnull TW_Hedera_Proto_TransactionID; -typedef TWData *_Nonnull TW_Hedera_Proto_TransferMessage; -typedef TWData *_Nonnull TW_Hedera_Proto_TransactionBody; -typedef TWData *_Nonnull TW_Hedera_Proto_SigningInput; -typedef TWData *_Nonnull TW_Hedera_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWIOSTProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWIOSTProto.h deleted file mode 100644 index 4fdb56e4..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWIOSTProto.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_IOST_Proto_Action; -typedef TWData *_Nonnull TW_IOST_Proto_AmountLimit; -typedef TWData *_Nonnull TW_IOST_Proto_Signature; -typedef TWData *_Nonnull TW_IOST_Proto_Transaction; -typedef TWData *_Nonnull TW_IOST_Proto_AccountInfo; -typedef TWData *_Nonnull TW_IOST_Proto_SigningInput; -typedef TWData *_Nonnull TW_IOST_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWIconProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWIconProto.h deleted file mode 100644 index fb6c9afd..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWIconProto.h +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Icon_Proto_SigningInput; -typedef TWData *_Nonnull TW_Icon_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWIoTeXProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWIoTeXProto.h deleted file mode 100644 index 1cafd4f2..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWIoTeXProto.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_IoTeX_Proto_Transfer; -typedef TWData *_Nonnull TW_IoTeX_Proto_Staking; -typedef TWData *_Nonnull TW_IoTeX_Proto_ContractCall; -typedef TWData *_Nonnull TW_IoTeX_Proto_SigningInput; -typedef TWData *_Nonnull TW_IoTeX_Proto_SigningOutput; -typedef TWData *_Nonnull TW_IoTeX_Proto_ActionCore; -typedef TWData *_Nonnull TW_IoTeX_Proto_Action; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWLiquidStaking.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWLiquidStaking.h deleted file mode 100644 index 4829ef3b..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWLiquidStaking.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// THORChain swap functions -TW_EXPORT_STRUCT -struct TWLiquidStaking; - -/// Builds a LiquidStaking transaction input. -/// -/// \param input The serialized data of LiquidStakingInput. -/// \return The serialized data of LiquidStakingOutput. -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWLiquidStakingBuildRequest(TWData *_Nonnull input); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWLiquidStakingProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWLiquidStakingProto.h deleted file mode 100644 index 8565539d..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWLiquidStakingProto.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_LiquidStaking_Proto_Status; -typedef TWData *_Nonnull TW_LiquidStaking_Proto_Asset; -typedef TWData *_Nonnull TW_LiquidStaking_Proto_Stake; -typedef TWData *_Nonnull TW_LiquidStaking_Proto_Unstake; -typedef TWData *_Nonnull TW_LiquidStaking_Proto_Withdraw; -typedef TWData *_Nonnull TW_LiquidStaking_Proto_Input; -typedef TWData *_Nonnull TW_LiquidStaking_Proto_Output; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWMnemonic.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWMnemonic.h deleted file mode 100644 index 6baa9b11..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWMnemonic.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Mnemonic validate / lookup functions -TW_EXPORT_STRUCT -struct TWMnemonic; - -/// Determines whether a BIP39 English mnemonic phrase is valid. -/// -/// \param mnemonic Non-null BIP39 english mnemonic -/// \return true if the mnemonic is valid, false otherwise -TW_EXPORT_STATIC_METHOD -bool TWMnemonicIsValid(TWString *_Nonnull mnemonic); - -/// Determines whether word is a valid BIP39 English mnemonic word. -/// -/// \param word Non-null BIP39 English mnemonic word -/// \return true if the word is a valid BIP39 English mnemonic word, false otherwise -TW_EXPORT_STATIC_METHOD -bool TWMnemonicIsValidWord(TWString *_Nonnull word); - -/// Return BIP39 English words that match the given prefix. A single string is returned, with space-separated list of words. -/// -/// \param prefix Non-null string prefix -/// \return Single non-null string, space-separated list of words containing BIP39 words that match the given prefix. -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWMnemonicSuggest(TWString *_Nonnull prefix); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWMultiversXProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWMultiversXProto.h deleted file mode 100644 index 4dc298b6..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWMultiversXProto.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_MultiversX_Proto_GenericAction; -typedef TWData *_Nonnull TW_MultiversX_Proto_EGLDTransfer; -typedef TWData *_Nonnull TW_MultiversX_Proto_ESDTTransfer; -typedef TWData *_Nonnull TW_MultiversX_Proto_ESDTNFTTransfer; -typedef TWData *_Nonnull TW_MultiversX_Proto_Accounts; -typedef TWData *_Nonnull TW_MultiversX_Proto_SigningInput; -typedef TWData *_Nonnull TW_MultiversX_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWNEARAccount.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWNEARAccount.h deleted file mode 100644 index 8daa5365..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWNEARAccount.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Represents a NEAR Account name -TW_EXPORT_CLASS -struct TWNEARAccount; - -/// Create a NEAR Account -/// -/// \param string Account name -/// \note Account should be deleted by calling \TWNEARAccountDelete -/// \return Pointer to a nullable NEAR Account. -TW_EXPORT_STATIC_METHOD -struct TWNEARAccount *_Nullable TWNEARAccountCreateWithString(TWString *_Nonnull string); - -/// Delete the given Near Account -/// -/// \param account Pointer to a non-null NEAR Account -TW_EXPORT_METHOD -void TWNEARAccountDelete(struct TWNEARAccount *_Nonnull account); - -/// Returns the user friendly string representation. -/// -/// \param account Pointer to a non-null NEAR Account -/// \return Non-null string account description -TW_EXPORT_PROPERTY -TWString *_Nonnull TWNEARAccountDescription(struct TWNEARAccount *_Nonnull account); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWNEARProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWNEARProto.h deleted file mode 100644 index 42e8f97c..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWNEARProto.h +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_NEAR_Proto_PublicKey; -typedef TWData *_Nonnull TW_NEAR_Proto_FunctionCallPermission; -typedef TWData *_Nonnull TW_NEAR_Proto_FullAccessPermission; -typedef TWData *_Nonnull TW_NEAR_Proto_AccessKey; -typedef TWData *_Nonnull TW_NEAR_Proto_CreateAccount; -typedef TWData *_Nonnull TW_NEAR_Proto_DeployContract; -typedef TWData *_Nonnull TW_NEAR_Proto_FunctionCall; -typedef TWData *_Nonnull TW_NEAR_Proto_Transfer; -typedef TWData *_Nonnull TW_NEAR_Proto_Stake; -typedef TWData *_Nonnull TW_NEAR_Proto_AddKey; -typedef TWData *_Nonnull TW_NEAR_Proto_DeleteKey; -typedef TWData *_Nonnull TW_NEAR_Proto_DeleteAccount; -typedef TWData *_Nonnull TW_NEAR_Proto_TokenTransfer; -typedef TWData *_Nonnull TW_NEAR_Proto_Action; -typedef TWData *_Nonnull TW_NEAR_Proto_SigningInput; -typedef TWData *_Nonnull TW_NEAR_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWNEOProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWNEOProto.h deleted file mode 100644 index 8204a76e..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWNEOProto.h +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_NEO_Proto_TransactionInput; -typedef TWData *_Nonnull TW_NEO_Proto_OutputAddress; -typedef TWData *_Nonnull TW_NEO_Proto_TransactionOutput; -typedef TWData *_Nonnull TW_NEO_Proto_Transaction; -typedef TWData *_Nonnull TW_NEO_Proto_SigningInput; -typedef TWData *_Nonnull TW_NEO_Proto_SigningOutput; -typedef TWData *_Nonnull TW_NEO_Proto_TransactionOutputPlan; -typedef TWData *_Nonnull TW_NEO_Proto_TransactionAttributePlan; -typedef TWData *_Nonnull TW_NEO_Proto_TransactionPlan; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWNULSProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWNULSProto.h deleted file mode 100644 index a3bd8c4c..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWNULSProto.h +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_NULS_Proto_TransactionCoinFrom; -typedef TWData *_Nonnull TW_NULS_Proto_TransactionCoinTo; -typedef TWData *_Nonnull TW_NULS_Proto_Signature; -typedef TWData *_Nonnull TW_NULS_Proto_Transaction; -typedef TWData *_Nonnull TW_NULS_Proto_SigningInput; -typedef TWData *_Nonnull TW_NULS_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWNanoProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWNanoProto.h deleted file mode 100644 index 23595dee..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWNanoProto.h +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Nano_Proto_SigningInput; -typedef TWData *_Nonnull TW_Nano_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWNebulasProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWNebulasProto.h deleted file mode 100644 index 73bc6da8..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWNebulasProto.h +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Nebulas_Proto_SigningInput; -typedef TWData *_Nonnull TW_Nebulas_Proto_SigningOutput; -typedef TWData *_Nonnull TW_Nebulas_Proto_Data; -typedef TWData *_Nonnull TW_Nebulas_Proto_RawTransaction; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWNervosAddress.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWNervosAddress.h deleted file mode 100644 index eedceb86..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWNervosAddress.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Represents a Nervos address. -TW_EXPORT_CLASS -struct TWNervosAddress; - -/// Compares two addresses for equality. -/// -/// \param lhs The first address to compare. -/// \param rhs The second address to compare. -/// \return bool indicating the addresses are equal. -TW_EXPORT_STATIC_METHOD -bool TWNervosAddressEqual(struct TWNervosAddress *_Nonnull lhs, struct TWNervosAddress *_Nonnull rhs); - -/// Determines if the string is a valid Nervos address. -/// -/// \param string string to validate. -/// \return bool indicating if the address is valid. -TW_EXPORT_STATIC_METHOD -bool TWNervosAddressIsValidString(TWString *_Nonnull string); - -/// Initializes an address from a sring representaion. -/// -/// \param string Bech32 string to initialize the address from. -/// \return TWNervosAddress pointer or nullptr if string is invalid. -TW_EXPORT_STATIC_METHOD -struct TWNervosAddress *_Nullable TWNervosAddressCreateWithString(TWString *_Nonnull string); - -/// Deletes a Nervos address. -/// -/// \param address Address to delete. -TW_EXPORT_METHOD -void TWNervosAddressDelete(struct TWNervosAddress *_Nonnull address); - -/// Returns the address string representation. -/// -/// \param address Address to get the string representation of. -TW_EXPORT_PROPERTY -TWString *_Nonnull TWNervosAddressDescription(struct TWNervosAddress *_Nonnull address); - -/// Returns the Code hash -/// -/// \param address Address to get the keyhash data of. -TW_EXPORT_PROPERTY -TWData *_Nonnull TWNervosAddressCodeHash(struct TWNervosAddress *_Nonnull address); - -/// Returns the address hash type -/// -/// \param address Address to get the hash type of. -TW_EXPORT_PROPERTY -TWString *_Nonnull TWNervosAddressHashType(struct TWNervosAddress *_Nonnull address); - -/// Returns the address args data. -/// -/// \param address Address to get the args data of. -TW_EXPORT_PROPERTY -TWData *_Nonnull TWNervosAddressArgs(struct TWNervosAddress *_Nonnull address); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWNervosProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWNervosProto.h deleted file mode 100644 index 3dc63373..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWNervosProto.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Nervos_Proto_TransactionPlan; -typedef TWData *_Nonnull TW_Nervos_Proto_CellDep; -typedef TWData *_Nonnull TW_Nervos_Proto_OutPoint; -typedef TWData *_Nonnull TW_Nervos_Proto_CellOutput; -typedef TWData *_Nonnull TW_Nervos_Proto_Script; -typedef TWData *_Nonnull TW_Nervos_Proto_NativeTransfer; -typedef TWData *_Nonnull TW_Nervos_Proto_SudtTransfer; -typedef TWData *_Nonnull TW_Nervos_Proto_DaoDeposit; -typedef TWData *_Nonnull TW_Nervos_Proto_DaoWithdrawPhase1; -typedef TWData *_Nonnull TW_Nervos_Proto_DaoWithdrawPhase2; -typedef TWData *_Nonnull TW_Nervos_Proto_SigningInput; -typedef TWData *_Nonnull TW_Nervos_Proto_Cell; -typedef TWData *_Nonnull TW_Nervos_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWNimiqProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWNimiqProto.h deleted file mode 100644 index 8bcdf205..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWNimiqProto.h +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Nimiq_Proto_SigningInput; -typedef TWData *_Nonnull TW_Nimiq_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWOasisProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWOasisProto.h deleted file mode 100644 index b8acfe47..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWOasisProto.h +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Oasis_Proto_TransferMessage; -typedef TWData *_Nonnull TW_Oasis_Proto_EscrowMessage; -typedef TWData *_Nonnull TW_Oasis_Proto_ReclaimEscrowMessage; -typedef TWData *_Nonnull TW_Oasis_Proto_SigningInput; -typedef TWData *_Nonnull TW_Oasis_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWOntologyProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWOntologyProto.h deleted file mode 100644 index 0d77583a..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWOntologyProto.h +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Ontology_Proto_SigningInput; -typedef TWData *_Nonnull TW_Ontology_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWPBKDF2.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWPBKDF2.h deleted file mode 100644 index b7070849..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWPBKDF2.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" - -TW_EXTERN_C_BEGIN - -/// Password-Based Key Derivation Function 2 -TW_EXPORT_STRUCT -struct TWPBKDF2; - -/// Derives a key from a password and a salt using PBKDF2 + Sha256. -/// -/// \param password is the master password from which a derived key is generated -/// \param salt is a sequence of bits, known as a cryptographic salt -/// \param iterations is the number of iterations desired -/// \param dkLen is the desired bit-length of the derived key -/// \return the derived key data. -TW_EXPORT_STATIC_METHOD -TWData *_Nullable TWPBKDF2HmacSha256(TWData *_Nonnull password, TWData *_Nonnull salt, uint32_t iterations, uint32_t dkLen); - -/// Derives a key from a password and a salt using PBKDF2 + Sha512. -/// -/// \param password is the master password from which a derived key is generated -/// \param salt is a sequence of bits, known as a cryptographic salt -/// \param iterations is the number of iterations desired -/// \param dkLen is the desired bit-length of the derived key -/// \return the derived key data. -TW_EXPORT_STATIC_METHOD -TWData *_Nullable TWPBKDF2HmacSha512(TWData *_Nonnull password, TWData *_Nonnull salt, uint32_t iterations, uint32_t dkLen); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWPolkadotProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWPolkadotProto.h deleted file mode 100644 index 897398f9..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWPolkadotProto.h +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Polkadot_Proto_Era; -typedef TWData *_Nonnull TW_Polkadot_Proto_CustomCallIndices; -typedef TWData *_Nonnull TW_Polkadot_Proto_CallIndices; -typedef TWData *_Nonnull TW_Polkadot_Proto_Balance; -typedef TWData *_Nonnull TW_Polkadot_Proto_Staking; -typedef TWData *_Nonnull TW_Polkadot_Proto_Identity; -typedef TWData *_Nonnull TW_Polkadot_Proto_PolymeshCall; -typedef TWData *_Nonnull TW_Polkadot_Proto_SigningInput; -typedef TWData *_Nonnull TW_Polkadot_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWPrivateKey.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWPrivateKey.h deleted file mode 100644 index 2e32b19f..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWPrivateKey.h +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWCurve.h" -#include "TWData.h" -#include "TWPublicKey.h" -#include "TWCoinType.h" - -TW_EXTERN_C_BEGIN - -/// Represents a private key. -TW_EXPORT_CLASS -struct TWPrivateKey; - -static const size_t TWPrivateKeySize = 32; - -/// Create a random private key -/// -/// \note Should be deleted with \TWPrivateKeyDelete -/// \return Non-null Private key -TW_EXPORT_STATIC_METHOD -struct TWPrivateKey* _Nonnull TWPrivateKeyCreate(void); - -/// Create a private key with the given block of data -/// -/// \param data a block of data -/// \note Should be deleted with \TWPrivateKeyDelete -/// \return Nullable pointer to Private Key -TW_EXPORT_STATIC_METHOD -struct TWPrivateKey* _Nullable TWPrivateKeyCreateWithData(TWData* _Nonnull data); - -/// Deep copy a given private key -/// -/// \param key Non-null private key to be copied -/// \note Should be deleted with \TWPrivateKeyDelete -/// \return Deep copy, Nullable pointer to Private key -TW_EXPORT_STATIC_METHOD -struct TWPrivateKey* _Nullable TWPrivateKeyCreateCopy(struct TWPrivateKey* _Nonnull key); - -/// Delete the given private key -/// -/// \param pk Non-null pointer to private key -TW_EXPORT_METHOD -void TWPrivateKeyDelete(struct TWPrivateKey* _Nonnull pk); - -/// Determines if the given private key is valid or not. -/// -/// \param data block of data (private key bytes) -/// \param curve Eliptic curve of the private key -/// \return true if the private key is valid, false otherwise -TW_EXPORT_STATIC_METHOD -bool TWPrivateKeyIsValid(TWData* _Nonnull data, enum TWCurve curve); - -/// Convert the given private key to raw-bytes block of data -/// -/// \param pk Non-null pointer to the private key -/// \return Non-null block of data (raw bytes) of the given private key -TW_EXPORT_PROPERTY -TWData* _Nonnull TWPrivateKeyData(struct TWPrivateKey* _Nonnull pk); - -/// Returns the public key associated with the given coinType and privateKey -/// -/// \param pk Non-null pointer to the private key -/// \param coinType coinType of the given private key -/// \return Non-null pointer to the corresponding public key -TW_EXPORT_METHOD -struct TWPublicKey* _Nonnull TWPrivateKeyGetPublicKey(struct TWPrivateKey* _Nonnull pk, enum TWCoinType coinType); - -/// Returns the public key associated with the given pubkeyType and privateKey -/// -/// \param pk Non-null pointer to the private key -/// \param pubkeyType pubkeyType of the given private key -/// \return Non-null pointer to the corresponding public key -TW_EXPORT_METHOD -struct TWPublicKey* _Nonnull TWPrivateKeyGetPublicKeyByType(struct TWPrivateKey* _Nonnull pk, enum TWPublicKeyType pubkeyType); - -/// Returns the Secp256k1 public key associated with the given private key -/// -/// \param pk Non-null pointer to the private key -/// \param compressed if the given private key is compressed or not -/// \return Non-null pointer to the corresponding public key -TW_EXPORT_METHOD -struct TWPublicKey* _Nonnull TWPrivateKeyGetPublicKeySecp256k1(struct TWPrivateKey* _Nonnull pk, bool compressed); - -/// Returns the Nist256p1 public key associated with the given private key -/// -/// \param pk Non-null pointer to the private key -/// \return Non-null pointer to the corresponding public key -TW_EXPORT_METHOD -struct TWPublicKey* _Nonnull TWPrivateKeyGetPublicKeyNist256p1(struct TWPrivateKey* _Nonnull pk); - -/// Returns the Ed25519 public key associated with the given private key -/// -/// \param pk Non-null pointer to the private key -/// \return Non-null pointer to the corresponding public key -TW_EXPORT_METHOD -struct TWPublicKey* _Nonnull TWPrivateKeyGetPublicKeyEd25519(struct TWPrivateKey* _Nonnull pk); - -/// Returns the Ed25519Blake2b public key associated with the given private key -/// -/// \param pk Non-null pointer to the private key -/// \return Non-null pointer to the corresponding public key -TW_EXPORT_METHOD -struct TWPublicKey* _Nonnull TWPrivateKeyGetPublicKeyEd25519Blake2b(struct TWPrivateKey* _Nonnull pk); - -/// Returns the Ed25519Cardano public key associated with the given private key -/// -/// \param pk Non-null pointer to the private key -/// \return Non-null pointer to the corresponding public key -TW_EXPORT_METHOD -struct TWPublicKey* _Nonnull TWPrivateKeyGetPublicKeyEd25519Cardano(struct TWPrivateKey* _Nonnull pk); - -/// Returns the Curve25519 public key associated with the given private key -/// -/// \param pk Non-null pointer to the private key -/// \return Non-null pointer to the corresponding public key -TW_EXPORT_METHOD -struct TWPublicKey* _Nonnull TWPrivateKeyGetPublicKeyCurve25519(struct TWPrivateKey* _Nonnull pk); - -/// Signs a digest using ECDSA and given curve. -/// -/// \param pk Non-null pointer to a Private key -/// \param digest Non-null digest block of data -/// \param curve Eliptic curve -/// \return Signature as a Non-null block of data -TW_EXPORT_METHOD -TWData* _Nullable TWPrivateKeySign(struct TWPrivateKey* _Nonnull pk, TWData* _Nonnull digest, enum TWCurve curve); - -/// Signs a digest using ECDSA. The result is encoded with DER. -/// -/// \param pk Non-null pointer to a Private key -/// \param digest Non-null digest block of data -/// \return Signature as a Non-null block of data -TW_EXPORT_METHOD -TWData* _Nullable TWPrivateKeySignAsDER(struct TWPrivateKey* _Nonnull pk, TWData* _Nonnull digest); - -/// Signs a digest using ECDSA and Zilliqa schnorr signature scheme. -/// -/// \param pk Non-null pointer to a Private key -/// \param message Non-null message -/// \return Signature as a Non-null block of data -TW_EXPORT_METHOD -TWData* _Nullable TWPrivateKeySignZilliqaSchnorr(struct TWPrivateKey* _Nonnull pk, TWData* _Nonnull message); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWPrivateKeyType.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWPrivateKeyType.h deleted file mode 100644 index a51aebae..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWPrivateKeyType.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Private key types, the vast majority of chains use the default, 32-byte key. -TW_EXPORT_ENUM(uint32_t) -enum TWPrivateKeyType { - TWPrivateKeyTypeDefault = 0, // 32 bytes long - TWPrivateKeyTypeCardano = 1, // 2 extended keys plus chainCode, 96 bytes long, used by Cardano -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWPublicKey.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWPublicKey.h deleted file mode 100644 index 326f694d..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWPublicKey.h +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWPublicKeyType.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -static const size_t TWPublicKeyCompressedSize = 33; -static const size_t TWPublicKeyUncompressedSize = 65; - -/// Represents a public key. -TW_EXPORT_CLASS -struct TWPublicKey; - -/// Create a public key from a block of data -/// -/// \param data Non-null block of data representing the public key -/// \param type type of the public key -/// \note Should be deleted with \TWPublicKeyDelete -/// \return Nullable pointer to the public key -TW_EXPORT_STATIC_METHOD -struct TWPublicKey *_Nullable TWPublicKeyCreateWithData(TWData *_Nonnull data, enum TWPublicKeyType type); - -/// Delete the given public key -/// -/// \param pk Non-null pointer to a public key -TW_EXPORT_METHOD -void TWPublicKeyDelete(struct TWPublicKey *_Nonnull pk); - -/// Determines if the given public key is valid or not -/// -/// \param data Non-null block of data representing the public key -/// \param type type of the public key -/// \return true if the block of data is a valid public key, false otherwise -TW_EXPORT_STATIC_METHOD -bool TWPublicKeyIsValid(TWData *_Nonnull data, enum TWPublicKeyType type); - -/// Determines if the given public key is compressed or not -/// -/// \param pk Non-null pointer to a public key -/// \return true if the public key is compressed, false otherwise -TW_EXPORT_PROPERTY -bool TWPublicKeyIsCompressed(struct TWPublicKey *_Nonnull pk); - -/// Give the compressed public key of the given non-compressed public key -/// -/// \param from Non-null pointer to a non-compressed public key -/// \return Non-null pointer to the corresponding compressed public-key -TW_EXPORT_PROPERTY -struct TWPublicKey *_Nonnull TWPublicKeyCompressed(struct TWPublicKey *_Nonnull from); - -/// Give the non-compressed public key of a corresponding compressed public key -/// -/// \param from Non-null pointer to the corresponding compressed public key -/// \return Non-null pointer to the corresponding non-compressed public key -TW_EXPORT_PROPERTY -struct TWPublicKey *_Nonnull TWPublicKeyUncompressed(struct TWPublicKey *_Nonnull from); - -/// Gives the raw data of a given public-key -/// -/// \param pk Non-null pointer to a public key -/// \return Non-null pointer to the raw block of data of the given public key -TW_EXPORT_PROPERTY -TWData *_Nonnull TWPublicKeyData(struct TWPublicKey *_Nonnull pk); - -/// Verify the validity of a signature and a message using the given public key -/// -/// \param pk Non-null pointer to a public key -/// \param signature Non-null pointer to a block of data corresponding to the signature -/// \param message Non-null pointer to a block of data corresponding to the message -/// \return true if the signature and the message belongs to the given public key, false otherwise -TW_EXPORT_METHOD -bool TWPublicKeyVerify(struct TWPublicKey *_Nonnull pk, TWData *_Nonnull signature, TWData *_Nonnull message); - -/// Verify the validity as DER of a signature and a message using the given public key -/// -/// \param pk Non-null pointer to a public key -/// \param signature Non-null pointer to a block of data corresponding to the signature -/// \param message Non-null pointer to a block of data corresponding to the message -/// \return true if the signature and the message belongs to the given public key, false otherwise -TW_EXPORT_METHOD -bool TWPublicKeyVerifyAsDER(struct TWPublicKey *_Nonnull pk, TWData *_Nonnull signature, TWData *_Nonnull message); - -/// Verify a Zilliqa schnorr signature with a signature and message. -/// -/// \param pk Non-null pointer to a public key -/// \param signature Non-null pointer to a block of data corresponding to the signature -/// \param message Non-null pointer to a block of data corresponding to the message -/// \return true if the signature and the message belongs to the given public key, false otherwise -TW_EXPORT_METHOD -bool TWPublicKeyVerifyZilliqaSchnorr(struct TWPublicKey *_Nonnull pk, TWData *_Nonnull signature, TWData *_Nonnull message); - -/// Give the public key type (eliptic) of a given public key -/// -/// \param publicKey Non-null pointer to a public key -/// \return The public key type of the given public key (eliptic) -TW_EXPORT_PROPERTY -enum TWPublicKeyType TWPublicKeyKeyType(struct TWPublicKey *_Nonnull publicKey); - -/// Get the public key description from a given public key -/// -/// \param publicKey Non-null pointer to a public key -/// \return Non-null pointer to a string representing the description of the public key -TW_EXPORT_PROPERTY -TWString *_Nonnull TWPublicKeyDescription(struct TWPublicKey *_Nonnull publicKey); - -/// Try to get a public key from a given signature and a message -/// -/// \param signature Non-null pointer to a block of data corresponding to the signature -/// \param message Non-null pointer to a block of data corresponding to the message -/// \return Null pointer if the public key can't be recover from the given signature and message, -/// pointer to the public key otherwise -TW_EXPORT_STATIC_METHOD -struct TWPublicKey *_Nullable TWPublicKeyRecover(TWData *_Nonnull signature, TWData *_Nonnull message); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWPublicKeyType.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWPublicKeyType.h deleted file mode 100644 index 894292ad..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWPublicKeyType.h +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Public key types -TW_EXPORT_ENUM(uint32_t) -enum TWPublicKeyType { - TWPublicKeyTypeSECP256k1 = 0, - TWPublicKeyTypeSECP256k1Extended = 1, - TWPublicKeyTypeNIST256p1 = 2, - TWPublicKeyTypeNIST256p1Extended = 3, - TWPublicKeyTypeED25519 = 4, - TWPublicKeyTypeED25519Blake2b = 5, - TWPublicKeyTypeCURVE25519 = 6, - TWPublicKeyTypeED25519Cardano = 7, - TWPublicKeyTypeStarkex = 8, -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWPurpose.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWPurpose.h deleted file mode 100644 index 142ed4f1..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWPurpose.h +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// HD wallet purpose -/// -/// \see https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki -/// \see https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki -/// \see https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki -TW_EXPORT_ENUM(uint32_t) -enum TWPurpose { - TWPurposeBIP44 = 44, - TWPurposeBIP49 = 49, // Derivation scheme for P2WPKH-nested-in-P2SH - TWPurposeBIP84 = 84, // Derivation scheme for P2WPKH - TWPurposeBIP1852 = 1852, // Derivation scheme used by Cardano-Shelley -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWRippleProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWRippleProto.h deleted file mode 100644 index c612d708..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWRippleProto.h +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Ripple_Proto_CurrencyAmount; -typedef TWData *_Nonnull TW_Ripple_Proto_OperationTrustSet; -typedef TWData *_Nonnull TW_Ripple_Proto_OperationPayment; -typedef TWData *_Nonnull TW_Ripple_Proto_OperationNFTokenBurn; -typedef TWData *_Nonnull TW_Ripple_Proto_OperationNFTokenCreateOffer; -typedef TWData *_Nonnull TW_Ripple_Proto_OperationNFTokenAcceptOffer; -typedef TWData *_Nonnull TW_Ripple_Proto_OperationNFTokenCancelOffer; -typedef TWData *_Nonnull TW_Ripple_Proto_SigningInput; -typedef TWData *_Nonnull TW_Ripple_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWRippleXAddress.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWRippleXAddress.h deleted file mode 100644 index ff412711..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWRippleXAddress.h +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWString.h" -#include "TWData.h" -#include "TWHRP.h" - -TW_EXTERN_C_BEGIN - -struct TWPublicKey; - -/// Represents a Ripple X-address. -TW_EXPORT_CLASS -struct TWRippleXAddress; - -/// Compares two addresses for equality. -/// -/// \param lhs left non-null pointer to a Ripple Address -/// \param rhs right non-null pointer to a Ripple Address -/// \return true if both address are equal, false otherwise -TW_EXPORT_STATIC_METHOD -bool TWRippleXAddressEqual(struct TWRippleXAddress *_Nonnull lhs, struct TWRippleXAddress *_Nonnull rhs); - -/// Determines if the string is a valid Ripple address. -/// -/// \param string Non-null pointer to a string that represent the Ripple Address to be checked -/// \return true if the given address is a valid Ripple address, false otherwise -TW_EXPORT_STATIC_METHOD -bool TWRippleXAddressIsValidString(TWString *_Nonnull string); - -/// Creates an address from a string representation. -/// -/// \param string Non-null pointer to a string that should be a valid ripple address -/// \note Should be deleted with \TWRippleXAddressDelete -/// \return Null pointer if the given string is an invalid ripple address, pointer to a Ripple address otherwise -TW_EXPORT_STATIC_METHOD -struct TWRippleXAddress *_Nullable TWRippleXAddressCreateWithString(TWString *_Nonnull string); - -/// Creates an address from a public key and destination tag. -/// -/// \param publicKey Non-null pointer to a public key -/// \param tag valid ripple destination tag (1-10) -/// \note Should be deleted with \TWRippleXAddressDelete -/// \return Non-null pointer to a Ripple Address -TW_EXPORT_STATIC_METHOD -struct TWRippleXAddress *_Nonnull TWRippleXAddressCreateWithPublicKey(struct TWPublicKey *_Nonnull publicKey, uint32_t tag); - -/// Delete the given ripple address -/// -/// \param address Non-null pointer to a Ripple Address -TW_EXPORT_METHOD -void TWRippleXAddressDelete(struct TWRippleXAddress *_Nonnull address); - -/// Returns the address string representation. -/// -/// \param address Non-null pointer to a Ripple Address -/// \return Non-null pointer to the ripple address string representation -TW_EXPORT_PROPERTY -TWString *_Nonnull TWRippleXAddressDescription(struct TWRippleXAddress *_Nonnull address); - -/// Returns the destination tag. -/// -/// \param address Non-null pointer to a Ripple Address -/// \return The destination tag of the given Ripple Address (1-10) -TW_EXPORT_PROPERTY -uint32_t TWRippleXAddressTag(struct TWRippleXAddress *_Nonnull address); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWSS58AddressType.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWSS58AddressType.h deleted file mode 100644 index 846c9d8c..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWSS58AddressType.h +++ /dev/null @@ -1,23 +0,0 @@ - -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Substrate based chains Address Type -/// -/// \see https://github.com/paritytech/substrate/wiki/External-Address-Format-(SS58)#address-type -TW_EXPORT_ENUM(uint8_t) -enum TWSS58AddressType { - TWSS58AddressTypePolkadot = 0, - TWSS58AddressTypeKusama = 2, -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWSegwitAddress.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWSegwitAddress.h deleted file mode 100644 index 29c81571..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWSegwitAddress.h +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWString.h" -#include "TWData.h" -#include "TWHRP.h" - -TW_EXTERN_C_BEGIN - -struct TWPublicKey; - -/// Represents a BIP 0173 address. -TW_EXPORT_CLASS -struct TWSegwitAddress; - -/// Compares two addresses for equality. -/// -/// \param lhs left non-null pointer to a Bech32 Address -/// \param rhs right non-null pointer to a Bech32 Address -/// \return true if both address are equal, false otherwise -TW_EXPORT_STATIC_METHOD -bool TWSegwitAddressEqual(struct TWSegwitAddress *_Nonnull lhs, struct TWSegwitAddress *_Nonnull rhs); - -/// Determines if the string is a valid Bech32 address. -/// -/// \param string Non-null pointer to a Bech32 address as a string -/// \return true if the string is a valid Bech32 address, false otherwise. -TW_EXPORT_STATIC_METHOD -bool TWSegwitAddressIsValidString(TWString *_Nonnull string); - -/// Creates an address from a string representation. -/// -/// \param string Non-null pointer to a Bech32 address as a string -/// \note should be deleted with \TWSegwitAddressDelete -/// \return Pointer to a Bech32 address if the string is a valid Bech32 address, null pointer otherwise -TW_EXPORT_STATIC_METHOD -struct TWSegwitAddress *_Nullable TWSegwitAddressCreateWithString(TWString *_Nonnull string); - -/// Creates a segwit-version-0 address from a public key and HRP prefix. -/// Taproot (v>=1) is not supported by this method. -/// -/// \param hrp HRP of the utxo coin targeted -/// \param publicKey Non-null pointer to the public key of the targeted coin -/// \note should be deleted with \TWSegwitAddressDelete -/// \return Non-null pointer to the corresponding Segwit address -TW_EXPORT_STATIC_METHOD -struct TWSegwitAddress *_Nonnull TWSegwitAddressCreateWithPublicKey(enum TWHRP hrp, struct TWPublicKey *_Nonnull publicKey); - -/// Delete the given Segwit address -/// -/// \param address Non-null pointer to a Segwit address -TW_EXPORT_METHOD -void TWSegwitAddressDelete(struct TWSegwitAddress *_Nonnull address); - -/// Returns the address string representation. -/// -/// \param address Non-null pointer to a Segwit Address -/// \return Non-null pointer to the segwit address string representation -TW_EXPORT_PROPERTY -TWString *_Nonnull TWSegwitAddressDescription(struct TWSegwitAddress *_Nonnull address); - -/// Returns the human-readable part. -/// -/// \param address Non-null pointer to a Segwit Address -/// \return the HRP part of the given address -TW_EXPORT_PROPERTY -enum TWHRP TWSegwitAddressHRP(struct TWSegwitAddress *_Nonnull address); - -/// Returns the human-readable part. -/// -/// \param address Non-null pointer to a Segwit Address -/// \return returns the witness version of the given segwit address -TW_EXPORT_PROPERTY -int TWSegwitAddressWitnessVersion(struct TWSegwitAddress *_Nonnull address); - -/// Returns the witness program -/// -/// \param address Non-null pointer to a Segwit Address -/// \return returns the witness data of the given segwit address as a non-null pointer block of data -TW_EXPORT_PROPERTY -TWData *_Nonnull TWSegwitAddressWitnessProgram(struct TWSegwitAddress *_Nonnull address); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWSolanaAddress.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWSolanaAddress.h deleted file mode 100644 index 9e9c4ede..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWSolanaAddress.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Solana address helper functions -TW_EXPORT_CLASS -struct TWSolanaAddress; - -/// Creates an address from a string representation. -/// -/// \param string Non-null pointer to a solana address string -/// \note Should be deleted with \TWSolanaAddressDelete -/// \return Non-null pointer to a Solana address data structure -TW_EXPORT_STATIC_METHOD -struct TWSolanaAddress* _Nullable TWSolanaAddressCreateWithString(TWString* _Nonnull string); - -/// Delete the given Solana address -/// -/// \param address Non-null pointer to a Solana Address -TW_EXPORT_METHOD -void TWSolanaAddressDelete(struct TWSolanaAddress* _Nonnull address); - -/// Derive default token address for token -/// -/// \param address Non-null pointer to a Solana Address -/// \param tokenMintAddress Non-null pointer to a token mint address as a string -/// \return Null pointer if the Default token address for a token is not found, valid pointer otherwise -TW_EXPORT_METHOD -TWString* _Nullable TWSolanaAddressDefaultTokenAddress(struct TWSolanaAddress* _Nonnull address, TWString* _Nonnull tokenMintAddress); - -/// Returns the address string representation. -/// -/// \param address Non-null pointer to a Solana Address -/// \return Non-null pointer to the Solana address string representation -TW_EXPORT_PROPERTY -TWString *_Nonnull TWSolanaAddressDescription(struct TWSolanaAddress *_Nonnull address); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWSolanaProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWSolanaProto.h deleted file mode 100644 index 39ef0c18..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWSolanaProto.h +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Solana_Proto_Transfer; -typedef TWData *_Nonnull TW_Solana_Proto_DelegateStake; -typedef TWData *_Nonnull TW_Solana_Proto_DeactivateStake; -typedef TWData *_Nonnull TW_Solana_Proto_DeactivateAllStake; -typedef TWData *_Nonnull TW_Solana_Proto_WithdrawStake; -typedef TWData *_Nonnull TW_Solana_Proto_StakeAccountValue; -typedef TWData *_Nonnull TW_Solana_Proto_WithdrawAllStake; -typedef TWData *_Nonnull TW_Solana_Proto_CreateTokenAccount; -typedef TWData *_Nonnull TW_Solana_Proto_TokenTransfer; -typedef TWData *_Nonnull TW_Solana_Proto_CreateAndTransferToken; -typedef TWData *_Nonnull TW_Solana_Proto_CreateNonceAccount; -typedef TWData *_Nonnull TW_Solana_Proto_WithdrawNonceAccount; -typedef TWData *_Nonnull TW_Solana_Proto_AdvanceNonceAccount; -typedef TWData *_Nonnull TW_Solana_Proto_SigningInput; -typedef TWData *_Nonnull TW_Solana_Proto_SigningOutput; -typedef TWData *_Nonnull TW_Solana_Proto_PreSigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWStarkExMessageSigner.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWStarkExMessageSigner.h deleted file mode 100644 index 63e0d2eb..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWStarkExMessageSigner.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" -#include "TWPrivateKey.h" - -TW_EXTERN_C_BEGIN - -/// StarkEx message signing and verification. -/// -/// StarkEx and some other wallets support a message signing & verification format, to create a proof (a signature) -/// that someone has access to the private keys of a specific address. -TW_EXPORT_STRUCT -struct TWStarkExMessageSigner; - -/// Sign a message. -/// -/// \param privateKey: the private key used for signing -/// \param message: A custom hex message which is input to the signing. -/// \returns the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWStarkExMessageSignerSignMessage(const struct TWPrivateKey* _Nonnull privateKey, TWString* _Nonnull message); - -/// Verify signature for a message. -/// -/// \param pubKey: pubKey that will verify and recover the message from the signature -/// \param message: the message signed (without prefix) in hex -/// \param signature: in Hex-encoded form. -/// \returns false on any invalid input (does not throw), true if the message can be recovered from the signature -TW_EXPORT_STATIC_METHOD -bool TWStarkExMessageSignerVerifyMessage(const struct TWPublicKey* _Nonnull pubKey, TWString* _Nonnull message, TWString* _Nonnull signature); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWStarkWare.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWStarkWare.h deleted file mode 100644 index 1f767ea6..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWStarkWare.h +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWPrivateKey.h" -#include "TWString.h" -#include "TWDerivationPath.h" - -TW_EXTERN_C_BEGIN - -TW_EXPORT_STRUCT -struct TWStarkWare; - -/// Generates the private stark key at the given derivation path from a valid eth signature -/// -/// \param derivationPath non-null StarkEx Derivation path -/// \param signature valid eth signature -/// \return The private key for the specified derivation path/signature -TW_EXPORT_STATIC_METHOD -struct TWPrivateKey* _Nonnull TWStarkWareGetStarkKeyFromSignature(const struct TWDerivationPath* _Nonnull derivationPath, TWString* _Nonnull signature); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWStellarMemoType.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWStellarMemoType.h deleted file mode 100644 index 812edbf4..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWStellarMemoType.h +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Stellar memo type. -TW_EXPORT_ENUM(uint32_t) -enum TWStellarMemoType { - TWStellarMemoTypeNone = 0, - TWStellarMemoTypeText = 1, - TWStellarMemoTypeId = 2, - TWStellarMemoTypeHash = 3, - TWStellarMemoTypeReturn = 4, -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWStellarPassphrase.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWStellarPassphrase.h deleted file mode 100644 index d5618724..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWStellarPassphrase.h +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Stellar network passphrase string. -TW_EXPORT_ENUM() -enum TWStellarPassphrase { - TWStellarPassphraseStellar /* "Public Global Stellar Network ; September 2015" */, - TWStellarPassphraseKin /* "Kin Mainnet ; December 2018" */, -}; - -static const char *_Nonnull TWStellarPassphrase_Stellar = "Public Global Stellar Network ; September 2015"; -static const char *_Nonnull TWStellarPassphrase_Kin = "Kin Mainnet ; December 2018"; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWStellarProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWStellarProto.h deleted file mode 100644 index 64476b0a..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWStellarProto.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Stellar_Proto_Asset; -typedef TWData *_Nonnull TW_Stellar_Proto_OperationCreateAccount; -typedef TWData *_Nonnull TW_Stellar_Proto_OperationPayment; -typedef TWData *_Nonnull TW_Stellar_Proto_OperationChangeTrust; -typedef TWData *_Nonnull TW_Stellar_Proto_Claimant; -typedef TWData *_Nonnull TW_Stellar_Proto_OperationCreateClaimableBalance; -typedef TWData *_Nonnull TW_Stellar_Proto_OperationClaimClaimableBalance; -typedef TWData *_Nonnull TW_Stellar_Proto_MemoVoid; -typedef TWData *_Nonnull TW_Stellar_Proto_MemoText; -typedef TWData *_Nonnull TW_Stellar_Proto_MemoId; -typedef TWData *_Nonnull TW_Stellar_Proto_MemoHash; -typedef TWData *_Nonnull TW_Stellar_Proto_SigningInput; -typedef TWData *_Nonnull TW_Stellar_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWStellarVersionByte.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWStellarVersionByte.h deleted file mode 100644 index f2df0f65..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWStellarVersionByte.h +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Stellar address version byte. -TW_EXPORT_ENUM(uint16_t) -enum TWStellarVersionByte { - TWStellarVersionByteAccountID = 0x30, // G - TWStellarVersionByteSeed = 0xc0, // S - TWStellarVersionBytePreAuthTX = 0xc8, // T - TWStellarVersionByteSHA256Hash = 0x118, // X -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWStoredKey.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWStoredKey.h deleted file mode 100644 index 01efa96e..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWStoredKey.h +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWCoinType.h" -#include "TWData.h" -#include "TWDerivation.h" -#include "TWHDWallet.h" -#include "TWPrivateKey.h" -#include "TWStoredKeyEncryptionLevel.h" -#include "TWStoredKeyEncryption.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Represents a key stored as an encrypted file. -TW_EXPORT_CLASS -struct TWStoredKey; - -/// Loads a key from a file. -/// -/// \param path filepath to the key as a non-null string -/// \note Returned object needs to be deleted with \TWStoredKeyDelete -/// \return Nullptr if the key can't be load, the stored key otherwise -TW_EXPORT_STATIC_METHOD -struct TWStoredKey* _Nullable TWStoredKeyLoad(TWString* _Nonnull path); - -/// Imports a private key. -/// -/// \param privateKey Non-null Block of data private key -/// \param name The name of the stored key to import as a non-null string -/// \param password Non-null block of data, password of the stored key -/// \param coin the coin type -/// \note Returned object needs to be deleted with \TWStoredKeyDelete -/// \return Nullptr if the key can't be imported, the stored key otherwise -TW_EXPORT_STATIC_METHOD -struct TWStoredKey* _Nullable TWStoredKeyImportPrivateKey(TWData* _Nonnull privateKey, TWString* _Nonnull name, TWData* _Nonnull password, enum TWCoinType coin); - -/// Imports a private key. -/// -/// \param privateKey Non-null Block of data private key -/// \param name The name of the stored key to import as a non-null string -/// \param password Non-null block of data, password of the stored key -/// \param coin the coin type -/// \param encryption cipher encryption mode -/// \note Returned object needs to be deleted with \TWStoredKeyDelete -/// \return Nullptr if the key can't be imported, the stored key otherwise -TW_EXPORT_STATIC_METHOD -struct TWStoredKey* _Nullable TWStoredKeyImportPrivateKeyWithEncryption(TWData* _Nonnull privateKey, TWString* _Nonnull name, TWData* _Nonnull password, enum TWCoinType coin, enum TWStoredKeyEncryption encryption); - -/// Imports an HD wallet. -/// -/// \param mnemonic Non-null bip39 mnemonic -/// \param name The name of the stored key to import as a non-null string -/// \param password Non-null block of data, password of the stored key -/// \param coin the coin type -/// \note Returned object needs to be deleted with \TWStoredKeyDelete -/// \return Nullptr if the key can't be imported, the stored key otherwise -TW_EXPORT_STATIC_METHOD -struct TWStoredKey* _Nullable TWStoredKeyImportHDWallet(TWString* _Nonnull mnemonic, TWString* _Nonnull name, TWData* _Nonnull password, enum TWCoinType coin); - -/// Imports an HD wallet. -/// -/// \param mnemonic Non-null bip39 mnemonic -/// \param name The name of the stored key to import as a non-null string -/// \param password Non-null block of data, password of the stored key -/// \param coin the coin type -/// \param encryption cipher encryption mode -/// \note Returned object needs to be deleted with \TWStoredKeyDelete -/// \return Nullptr if the key can't be imported, the stored key otherwise -TW_EXPORT_STATIC_METHOD -struct TWStoredKey* _Nullable TWStoredKeyImportHDWalletWithEncryption(TWString* _Nonnull mnemonic, TWString* _Nonnull name, TWData* _Nonnull password, enum TWCoinType coin, enum TWStoredKeyEncryption encryption); - -/// Imports a key from JSON. -/// -/// \param json Json stored key import format as a non-null block of data -/// \note Returned object needs to be deleted with \TWStoredKeyDelete -/// \return Nullptr if the key can't be imported, the stored key otherwise -TW_EXPORT_STATIC_METHOD -struct TWStoredKey* _Nullable TWStoredKeyImportJSON(TWData* _Nonnull json); - -/// Creates a new key, with given encryption strength level. Returned object needs to be deleted. -/// -/// \param name The name of the key to be stored -/// \param password Non-null block of data, password of the stored key -/// \param encryptionLevel The level of encryption, see \TWStoredKeyEncryptionLevel -/// \note Returned object needs to be deleted with \TWStoredKeyDelete -/// \return The stored key as a non-null pointer -TW_DEPRECATED_FOR("3.1.1", "TWStoredKeyCreateLevelAndEncryption") -TW_EXPORT_STATIC_METHOD -struct TWStoredKey* _Nonnull TWStoredKeyCreateLevel(TWString* _Nonnull name, TWData* _Nonnull password, enum TWStoredKeyEncryptionLevel encryptionLevel); - -/// Creates a new key, with given encryption strength level. Returned object needs to be deleted. -/// -/// \param name The name of the key to be stored -/// \param password Non-null block of data, password of the stored key -/// \param encryptionLevel The level of encryption, see \TWStoredKeyEncryptionLevel -/// \param encryption cipher encryption mode -/// \note Returned object needs to be deleted with \TWStoredKeyDelete -/// \return The stored key as a non-null pointer -TW_EXPORT_STATIC_METHOD -struct TWStoredKey* _Nonnull TWStoredKeyCreateLevelAndEncryption(TWString* _Nonnull name, TWData* _Nonnull password, enum TWStoredKeyEncryptionLevel encryptionLevel, enum TWStoredKeyEncryption encryption); - -/// Creates a new key. -/// -/// \deprecated use TWStoredKeyCreateLevel. -/// \param name The name of the key to be stored -/// \param password Non-null block of data, password of the stored key -/// \note Returned object needs to be deleted with \TWStoredKeyDelete -/// \return The stored key as a non-null pointer -TW_EXPORT_STATIC_METHOD struct TWStoredKey* _Nonnull TWStoredKeyCreate(TWString* _Nonnull name, TWData* _Nonnull password); - -/// Creates a new key. -/// -/// \deprecated use TWStoredKeyCreateLevel. -/// \param name The name of the key to be stored -/// \param password Non-null block of data, password of the stored key -/// \param encryption cipher encryption mode -/// \note Returned object needs to be deleted with \TWStoredKeyDelete -/// \return The stored key as a non-null pointer -TW_EXPORT_STATIC_METHOD struct TWStoredKey* _Nonnull TWStoredKeyCreateEncryption(TWString* _Nonnull name, TWData* _Nonnull password, enum TWStoredKeyEncryption encryption); - -/// Delete a stored key -/// -/// \param key The key to be deleted -TW_EXPORT_METHOD -void TWStoredKeyDelete(struct TWStoredKey* _Nonnull key); - -/// Stored key unique identifier. -/// -/// \param key Non-null pointer to a stored key -/// \note Returned object needs to be deleted with \TWStringDelete -/// \return The stored key unique identifier if it's found, null pointer otherwise. -TW_EXPORT_PROPERTY -TWString* _Nullable TWStoredKeyIdentifier(struct TWStoredKey* _Nonnull key); - -/// Stored key namer. -/// -/// \param key Non-null pointer to a stored key -/// \note Returned object needs to be deleted with \TWStringDelete -/// \return The stored key name as a non-null string pointer. -TW_EXPORT_PROPERTY -TWString* _Nonnull TWStoredKeyName(struct TWStoredKey* _Nonnull key); - -/// Whether this key is a mnemonic phrase for a HD wallet. -/// -/// \param key Non-null pointer to a stored key -/// \return true if the given stored key is a mnemonic, false otherwise -TW_EXPORT_PROPERTY -bool TWStoredKeyIsMnemonic(struct TWStoredKey* _Nonnull key); - -/// The number of accounts. -/// -/// \param key Non-null pointer to a stored key -/// \return the number of accounts associated to the given stored key -TW_EXPORT_PROPERTY -size_t TWStoredKeyAccountCount(struct TWStoredKey* _Nonnull key); - -/// Returns the account at a given index. -/// -/// \param key Non-null pointer to a stored key -/// \param index the account index to be retrieved -/// \note Returned object needs to be deleted with \TWAccountDelete -/// \return Null pointer if the associated account is not found, pointer to the account otherwise. -TW_EXPORT_METHOD -struct TWAccount* _Nullable TWStoredKeyAccount(struct TWStoredKey* _Nonnull key, size_t index); - -/// Returns the account for a specific coin, creating it if necessary. -/// -/// \param key Non-null pointer to a stored key -/// \param coin The coin type -/// \param wallet The associated HD wallet, can be null. -/// \note Returned object needs to be deleted with \TWAccountDelete -/// \return Null pointer if the associated account is not found/not created, pointer to the account otherwise. -TW_EXPORT_METHOD -struct TWAccount* _Nullable TWStoredKeyAccountForCoin(struct TWStoredKey* _Nonnull key, enum TWCoinType coin, struct TWHDWallet* _Nullable wallet); - -/// Returns the account for a specific coin + derivation, creating it if necessary. -/// -/// \param key Non-null pointer to a stored key -/// \param coin The coin type -/// \param derivation The derivation for the given coin -/// \param wallet the associated HD wallet, can be null. -/// \note Returned object needs to be deleted with \TWAccountDelete -/// \return Null pointer if the associated account is not found/not created, pointer to the account otherwise. -TW_EXPORT_METHOD -struct TWAccount* _Nullable TWStoredKeyAccountForCoinDerivation(struct TWStoredKey* _Nonnull key, enum TWCoinType coin, enum TWDerivation derivation, struct TWHDWallet* _Nullable wallet); - -/// Adds a new account, using given derivation (usually TWDerivationDefault) -/// and derivation path (usually matches path from derivation, but custom possible). -/// -/// \param key Non-null pointer to a stored key -/// \param address Non-null pointer to the address of the coin for this account -/// \param coin coin type -/// \param derivation derivation of the given coin type -/// \param derivationPath HD bip44 derivation path of the given coin -/// \param publicKey Non-null public key of the given coin/address -/// \param extendedPublicKey Non-null extended public key of the given coin/address -TW_EXPORT_METHOD -void TWStoredKeyAddAccountDerivation(struct TWStoredKey* _Nonnull key, TWString* _Nonnull address, enum TWCoinType coin, enum TWDerivation derivation, TWString* _Nonnull derivationPath, TWString* _Nonnull publicKey, TWString* _Nonnull extendedPublicKey); - -/// Adds a new account, using given derivation path. -/// -/// \deprecated Use TWStoredKeyAddAccountDerivation (with TWDerivationDefault) instead. -/// \param key Non-null pointer to a stored key -/// \param address Non-null pointer to the address of the coin for this account -/// \param coin coin type -/// \param derivationPath HD bip44 derivation path of the given coin -/// \param publicKey Non-null public key of the given coin/address -/// \param extendedPublicKey Non-null extended public key of the given coin/address -TW_EXPORT_METHOD -void TWStoredKeyAddAccount(struct TWStoredKey* _Nonnull key, TWString* _Nonnull address, enum TWCoinType coin, TWString* _Nonnull derivationPath, TWString* _Nonnull publicKey, TWString* _Nonnull extendedPublicKey); - -/// Remove the account for a specific coin -/// -/// \param key Non-null pointer to a stored key -/// \param coin Account coin type to be removed -TW_EXPORT_METHOD -void TWStoredKeyRemoveAccountForCoin(struct TWStoredKey* _Nonnull key, enum TWCoinType coin); - -/// Remove the account for a specific coin with the given derivation. -/// -/// \param key Non-null pointer to a stored key -/// \param coin Account coin type to be removed -/// \param derivation The derivation of the given coin type -TW_EXPORT_METHOD -void TWStoredKeyRemoveAccountForCoinDerivation(struct TWStoredKey* _Nonnull key, enum TWCoinType coin, enum TWDerivation derivation); - -/// Remove the account for a specific coin with the given derivation path. -/// -/// \param key Non-null pointer to a stored key -/// \param coin Account coin type to be removed -/// \param derivationPath The derivation path (bip44) of the given coin type -TW_EXPORT_METHOD -void TWStoredKeyRemoveAccountForCoinDerivationPath(struct TWStoredKey* _Nonnull key, enum TWCoinType coin, TWString* _Nonnull derivationPath); - -/// Saves the key to a file. -/// -/// \param key Non-null pointer to a stored key -/// \param path Non-null string filepath where the key will be saved -/// \return true if the key was successfully stored in the given filepath file, false otherwise -TW_EXPORT_METHOD -bool TWStoredKeyStore(struct TWStoredKey* _Nonnull key, TWString* _Nonnull path); - -/// Decrypts the private key. -/// -/// \param key Non-null pointer to a stored key -/// \param password Non-null block of data, password of the stored key -/// \return Decrypted private key as a block of data if success, null pointer otherwise -TW_EXPORT_METHOD -TWData* _Nullable TWStoredKeyDecryptPrivateKey(struct TWStoredKey* _Nonnull key, TWData* _Nonnull password); - -/// Decrypts the mnemonic phrase. -/// -/// \param key Non-null pointer to a stored key -/// \param password Non-null block of data, password of the stored key -/// \return Bip39 decrypted mnemonic if success, null pointer otherwise -TW_EXPORT_METHOD -TWString* _Nullable TWStoredKeyDecryptMnemonic(struct TWStoredKey* _Nonnull key, TWData* _Nonnull password); - -/// Returns the private key for a specific coin. Returned object needs to be deleted. -/// -/// \param key Non-null pointer to a stored key -/// \param coin Account coin type to be queried -/// \note Returned object needs to be deleted with \TWPrivateKeyDelete -/// \return Null pointer on failure, pointer to the private key otherwise -TW_EXPORT_METHOD -struct TWPrivateKey* _Nullable TWStoredKeyPrivateKey(struct TWStoredKey* _Nonnull key, enum TWCoinType coin, TWData* _Nonnull password); - -/// Decrypts and returns the HD Wallet for mnemonic phrase keys. Returned object needs to be deleted. -/// -/// \param key Non-null pointer to a stored key -/// \param password Non-null block of data, password of the stored key -/// \note Returned object needs to be deleted with \TWHDWalletDelete -/// \return Null pointer on failure, pointer to the HDWallet otherwise -TW_EXPORT_METHOD -struct TWHDWallet* _Nullable TWStoredKeyWallet(struct TWStoredKey* _Nonnull key, TWData* _Nonnull password); - -/// Exports the key as JSON -/// -/// \param key Non-null pointer to a stored key -/// \return Null pointer on failure, pointer to a block of data containing the json otherwise -TW_EXPORT_METHOD -TWData* _Nullable TWStoredKeyExportJSON(struct TWStoredKey* _Nonnull key); - -/// Fills in empty and invalid addresses. -/// This method needs the encryption password to re-derive addresses from private keys. -/// -/// \param key Non-null pointer to a stored key -/// \param password Non-null block of data, password of the stored key -/// \return `false` if the password is incorrect, true otherwise. -TW_EXPORT_METHOD -bool TWStoredKeyFixAddresses(struct TWStoredKey* _Nonnull key, TWData* _Nonnull password); - -/// Retrieve stored key encoding parameters, as JSON string. -/// -/// \param key Non-null pointer to a stored key -/// \return Null pointer on failure, encoding parameter as a json string otherwise. -TW_EXPORT_PROPERTY -TWString* _Nullable TWStoredKeyEncryptionParameters(struct TWStoredKey* _Nonnull key); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWStoredKeyEncryption.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWStoredKeyEncryption.h deleted file mode 100644 index 856b4071..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWStoredKeyEncryption.h +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Preset encryption kind -TW_EXPORT_ENUM(uint32_t) -enum TWStoredKeyEncryption { - TWStoredKeyEncryptionAes128Ctr = 0, - TWStoredKeyEncryptionAes128Cbc = 1, - TWStoredKeyEncryptionAes192Ctr = 2, - TWStoredKeyEncryptionAes256Ctr = 3, -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWStoredKeyEncryptionLevel.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWStoredKeyEncryptionLevel.h deleted file mode 100644 index 071df20c..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWStoredKeyEncryptionLevel.h +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -/// Preset encryption parameter with different security strength, for key store -TW_EXPORT_ENUM(uint32_t) -enum TWStoredKeyEncryptionLevel { - /// Default, which is one of the below values, determined by the implementation. - TWStoredKeyEncryptionLevelDefault = 0, - /// Minimal sufficient level of encryption strength (scrypt 4096) - TWStoredKeyEncryptionLevelMinimal = 1, - /// Weak encryption strength (scrypt 16k) - TWStoredKeyEncryptionLevelWeak = 2, - /// Standard level of encryption strength (scrypt 262k) - TWStoredKeyEncryptionLevelStandard = 3, -}; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWString.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWString.h deleted file mode 100644 index 336b8892..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWString.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" - -TW_EXTERN_C_BEGIN - -typedef const void TWData; - -/// Defines a resizable string. -/// -/// The implementantion of these methods should be language-specific to minimize translation -/// overhead. For instance it should be a `jstring` for Java and an `NSString` for Swift. Create -/// allocates memory, the delete call should be called at the end to release memory. -typedef const void TWString; - -/// Creates a TWString from a null-terminated UTF8 byte array. It must be deleted at the end. -/// -/// \param bytes a null-terminated UTF8 byte array. -TWString* _Nonnull TWStringCreateWithUTF8Bytes(const char* _Nonnull bytes) TW_VISIBILITY_DEFAULT; - -/// Creates a string from a raw byte array and size. It must be deleted at the end. -/// -/// \param bytes a raw byte array. -/// \param size the size of the byte array. -TWString* _Nonnull TWStringCreateWithRawBytes(const uint8_t* _Nonnull bytes, size_t size) TW_VISIBILITY_DEFAULT; - -/// Creates a hexadecimal string from a block of data. It must be deleted at the end. -/// -/// \param data a block of data. -TWString* _Nonnull TWStringCreateWithHexData(TWData* _Nonnull data) TW_VISIBILITY_DEFAULT; - -/// Returns the string size in bytes. -/// -/// \param string a TWString pointer. -size_t TWStringSize(TWString* _Nonnull string) TW_VISIBILITY_DEFAULT; - -/// Returns the byte at the provided index. -/// -/// \param string a TWString pointer. -/// \param index the index of the byte. -char TWStringGet(TWString* _Nonnull string, size_t index) TW_VISIBILITY_DEFAULT; - -/// Returns the raw pointer to the string's UTF8 bytes (null-terminated). -/// -/// \param string a TWString pointer. -const char* _Nonnull TWStringUTF8Bytes(TWString* _Nonnull string) TW_VISIBILITY_DEFAULT; - -/// Deletes a string created with a `TWStringCreate*` method and frees the memory. -/// -/// \param string a TWString pointer. -void TWStringDelete(TWString* _Nonnull string) TW_VISIBILITY_DEFAULT; - -/// Determines whether two string blocks are equal. -/// -/// \param lhs a TWString pointer. -/// \param rhs another TWString pointer. -bool TWStringEqual(TWString* _Nonnull lhs, TWString* _Nonnull rhs) TW_VISIBILITY_DEFAULT; - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWSuiProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWSuiProto.h deleted file mode 100644 index 9e10a877..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWSuiProto.h +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Sui_Proto_SignDirect; -typedef TWData *_Nonnull TW_Sui_Proto_SigningInput; -typedef TWData *_Nonnull TW_Sui_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWTHORChainSwap.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWTHORChainSwap.h deleted file mode 100644 index bcd35a09..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWTHORChainSwap.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// THORChain swap functions -TW_EXPORT_STRUCT -struct TWTHORChainSwap; - -/// Builds a THORChainSwap transaction input. -/// -/// \param input The serialized data of SwapInput. -/// \return The serialized data of SwapOutput. -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWTHORChainSwapBuildSwap(TWData *_Nonnull input); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWTHORChainSwapProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWTHORChainSwapProto.h deleted file mode 100644 index 699a45a2..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWTHORChainSwapProto.h +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_THORChainSwap_Proto_Error; -typedef TWData *_Nonnull TW_THORChainSwap_Proto_Asset; -typedef TWData *_Nonnull TW_THORChainSwap_Proto_StreamParams; -typedef TWData *_Nonnull TW_THORChainSwap_Proto_SwapInput; -typedef TWData *_Nonnull TW_THORChainSwap_Proto_SwapOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWTezosMessageSigner.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWTezosMessageSigner.h deleted file mode 100644 index bcb99bf8..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWTezosMessageSigner.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" -#include "TWPrivateKey.h" -#include "TWPublicKey.h" - -TW_EXTERN_C_BEGIN - -/// Tezos message signing, verification and utilities. -TW_EXPORT_STRUCT -struct TWTezosMessageSigner; - -/// Implement format input as described in https://tezostaquito.io/docs/signing/ -/// -/// \param message message to format e.g: Hello, World -/// \param dAppUrl the app url, e.g: testUrl -/// \returns the formatted message as a string -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWTezosMessageSignerFormatMessage(TWString* _Nonnull message, TWString* _Nonnull url); - -/// Implement input to payload as described in: https://tezostaquito.io/docs/signing/ -/// -/// \param message formatted message to be turned into an hex payload -/// \return the hexpayload of the formated message as a hex string -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWTezosMessageSignerInputToPayload(TWString* _Nonnull message); - -/// Sign a message as described in https://tezostaquito.io/docs/signing/ -/// -/// \param privateKey: the private key used for signing -/// \param message: A custom message payload (hex) which is input to the signing. -/// \returns the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWTezosMessageSignerSignMessage(const struct TWPrivateKey* _Nonnull privateKey, TWString* _Nonnull message); - -/// Verify signature for a message as described in https://tezostaquito.io/docs/signing/ -/// -/// \param pubKey: pubKey that will verify the message from the signature -/// \param message: the message signed as a payload (hex) -/// \param signature: in Base58-encoded form. -/// \returns false on any invalid input (does not throw), true if the message can be verified from the signature -TW_EXPORT_STATIC_METHOD -bool TWTezosMessageSignerVerifyMessage(const struct TWPublicKey* _Nonnull pubKey, TWString* _Nonnull message, TWString* _Nonnull signature); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWTezosProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWTezosProto.h deleted file mode 100644 index d9676aed..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWTezosProto.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Tezos_Proto_SigningInput; -typedef TWData *_Nonnull TW_Tezos_Proto_SigningOutput; -typedef TWData *_Nonnull TW_Tezos_Proto_OperationList; -typedef TWData *_Nonnull TW_Tezos_Proto_Operation; -typedef TWData *_Nonnull TW_Tezos_Proto_FA12Parameters; -typedef TWData *_Nonnull TW_Tezos_Proto_Txs; -typedef TWData *_Nonnull TW_Tezos_Proto_TxObject; -typedef TWData *_Nonnull TW_Tezos_Proto_FA2Parameters; -typedef TWData *_Nonnull TW_Tezos_Proto_OperationParameters; -typedef TWData *_Nonnull TW_Tezos_Proto_TransactionOperationData; -typedef TWData *_Nonnull TW_Tezos_Proto_RevealOperationData; -typedef TWData *_Nonnull TW_Tezos_Proto_DelegationOperationData; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWTheOpenNetworkProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWTheOpenNetworkProto.h deleted file mode 100644 index 314b1986..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWTheOpenNetworkProto.h +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_TheOpenNetwork_Proto_Transfer; -typedef TWData *_Nonnull TW_TheOpenNetwork_Proto_JettonTransfer; -typedef TWData *_Nonnull TW_TheOpenNetwork_Proto_SigningInput; -typedef TWData *_Nonnull TW_TheOpenNetwork_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWThetaProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWThetaProto.h deleted file mode 100644 index f8f73c90..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWThetaProto.h +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Theta_Proto_SigningInput; -typedef TWData *_Nonnull TW_Theta_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWTransactionCompiler.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWTransactionCompiler.h deleted file mode 100644 index 5ec06883..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWTransactionCompiler.h +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWCoinType.h" -#include "TWData.h" -#include "TWDataVector.h" -#include "TWString.h" - -TW_EXTERN_C_BEGIN - -/// Non-core transaction utility methods, like building a transaction using an external signature. -TW_EXPORT_STRUCT -struct TWTransactionCompiler; - -/// Builds a coin-specific SigningInput (proto object) from a simple transaction. -/// -/// \deprecated `TWTransactionCompilerBuildInput` will be removed soon. -/// \param coin coin type. -/// \param from sender of the transaction. -/// \param to receiver of the transaction. -/// \param amount transaction amount in string -/// \param asset optional asset name, like "BNB" -/// \param memo optional memo -/// \param chainId optional chainId to override default -/// \return serialized data of the SigningInput proto object. -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWTransactionCompilerBuildInput(enum TWCoinType coinType, TWString* _Nonnull from, - TWString* _Nonnull to, TWString* _Nonnull amount, - TWString* _Nonnull asset, TWString* _Nonnull memo, - TWString* _Nonnull chainId); - -/// Obtains pre-signing hashes of a transaction. -/// -/// We provide a default `PreSigningOutput` in TransactionCompiler.proto. -/// For some special coins, such as bitcoin, we will create a custom `PreSigningOutput` object in its proto file. -/// \param coin coin type. -/// \param txInputData The serialized data of a signing input -/// \return serialized data of a proto object `PreSigningOutput` includes hash. -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWTransactionCompilerPreImageHashes(enum TWCoinType coinType, - TWData* _Nonnull txInputData); - -/// Compiles a complete transation with one or more external signatures. -/// -/// Puts together from transaction input and provided public keys and signatures. The signatures must match the hashes -/// returned by TWTransactionCompilerPreImageHashes, in the same order. The publicKeyHash attached -/// to the hashes enable identifying the private key needed for signing the hash. -/// \param coin coin type. -/// \param txInputData The serialized data of a signing input. -/// \param signatures signatures to compile, using TWDataVector. -/// \param publicKeys public keys for signers to match private keys, using TWDataVector. -/// \return serialized data of a proto object `SigningOutput`. -TW_EXPORT_STATIC_METHOD -TWData* _Nonnull TWTransactionCompilerCompileWithSignatures( - enum TWCoinType coinType, TWData* _Nonnull txInputData, - const struct TWDataVector* _Nonnull signatures, const struct TWDataVector* _Nonnull publicKeys); - -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWTransactionCompilerCompileWithSignaturesAndPubKeyType( - enum TWCoinType coinType, TWData *_Nonnull txInputData, - const struct TWDataVector *_Nonnull signatures, const struct TWDataVector *_Nonnull publicKeys, - enum TWPublicKeyType pubKeyType); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWTransactionCompilerProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWTransactionCompilerProto.h deleted file mode 100644 index 5a4c5c56..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWTransactionCompilerProto.h +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_TxCompiler_Proto_PreSigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWTronMessageSigner.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWTronMessageSigner.h deleted file mode 100644 index 56f326d4..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWTronMessageSigner.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. - -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWString.h" -#include "TWPrivateKey.h" -#include "TWPublicKey.h" - -TW_EXTERN_C_BEGIN - -/// Tron message signing and verification. -/// -/// Tron and some other wallets support a message signing & verification format, to create a proof (a signature) -/// that someone has access to the private keys of a specific address. -TW_EXPORT_STRUCT -struct TWTronMessageSigner; - -/// Sign a message. -/// -/// \param privateKey: the private key used for signing -/// \param message: A custom message which is input to the signing. -/// \returns the signature, Hex-encoded. On invalid input empty string is returned. Returned object needs to be deleted after use. -TW_EXPORT_STATIC_METHOD -TWString* _Nonnull TWTronMessageSignerSignMessage(const struct TWPrivateKey* _Nonnull privateKey, TWString* _Nonnull message); - -/// Verify signature for a message. -/// -/// \param pubKey: pubKey that will verify and recover the message from the signature -/// \param message: the message signed (without prefix) -/// \param signature: in Hex-encoded form. -/// \returns false on any invalid input (does not throw), true if the message can be recovered from the signature -TW_EXPORT_STATIC_METHOD -bool TWTronMessageSignerVerifyMessage(const struct TWPublicKey* _Nonnull pubKey, TWString* _Nonnull message, TWString* _Nonnull signature); - -TW_EXTERN_C_END diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWTronProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWTronProto.h deleted file mode 100644 index 9f9007f7..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWTronProto.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Tron_Proto_TransferContract; -typedef TWData *_Nonnull TW_Tron_Proto_TransferAssetContract; -typedef TWData *_Nonnull TW_Tron_Proto_TransferTRC20Contract; -typedef TWData *_Nonnull TW_Tron_Proto_FreezeBalanceContract; -typedef TWData *_Nonnull TW_Tron_Proto_FreezeBalanceV2Contract; -typedef TWData *_Nonnull TW_Tron_Proto_UnfreezeBalanceV2Contract; -typedef TWData *_Nonnull TW_Tron_Proto_WithdrawExpireUnfreezeContract; -typedef TWData *_Nonnull TW_Tron_Proto_DelegateResourceContract; -typedef TWData *_Nonnull TW_Tron_Proto_UnDelegateResourceContract; -typedef TWData *_Nonnull TW_Tron_Proto_UnfreezeBalanceContract; -typedef TWData *_Nonnull TW_Tron_Proto_UnfreezeAssetContract; -typedef TWData *_Nonnull TW_Tron_Proto_VoteAssetContract; -typedef TWData *_Nonnull TW_Tron_Proto_VoteWitnessContract; -typedef TWData *_Nonnull TW_Tron_Proto_WithdrawBalanceContract; -typedef TWData *_Nonnull TW_Tron_Proto_TriggerSmartContract; -typedef TWData *_Nonnull TW_Tron_Proto_BlockHeader; -typedef TWData *_Nonnull TW_Tron_Proto_Transaction; -typedef TWData *_Nonnull TW_Tron_Proto_SigningInput; -typedef TWData *_Nonnull TW_Tron_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWUtxoProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWUtxoProto.h deleted file mode 100644 index 0e6f803b..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWUtxoProto.h +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Utxo_Proto_SigningInput; -typedef TWData *_Nonnull TW_Utxo_Proto_LockTime; -typedef TWData *_Nonnull TW_Utxo_Proto_TxIn; -typedef TWData *_Nonnull TW_Utxo_Proto_TxOut; -typedef TWData *_Nonnull TW_Utxo_Proto_PreSigningOutput; -typedef TWData *_Nonnull TW_Utxo_Proto_Sighash; -typedef TWData *_Nonnull TW_Utxo_Proto_PreSerialization; -typedef TWData *_Nonnull TW_Utxo_Proto_TxInClaim; -typedef TWData *_Nonnull TW_Utxo_Proto_SerializedTransaction; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWVeChainProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWVeChainProto.h deleted file mode 100644 index 1c11d90b..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWVeChainProto.h +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_VeChain_Proto_Clause; -typedef TWData *_Nonnull TW_VeChain_Proto_SigningInput; -typedef TWData *_Nonnull TW_VeChain_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWWavesProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWWavesProto.h deleted file mode 100644 index db535590..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWWavesProto.h +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Waves_Proto_TransferMessage; -typedef TWData *_Nonnull TW_Waves_Proto_LeaseMessage; -typedef TWData *_Nonnull TW_Waves_Proto_CancelLeaseMessage; -typedef TWData *_Nonnull TW_Waves_Proto_SigningInput; -typedef TWData *_Nonnull TW_Waves_Proto_SigningOutput; diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWWebAuthn.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWWebAuthn.h deleted file mode 100644 index 4d988daa..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWWebAuthn.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright © 2017-2023 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -#pragma once - -#include "TWBase.h" -#include "TWData.h" -#include "TWPublicKey.h" - -TW_EXTERN_C_BEGIN - -TW_EXPORT_STRUCT -struct TWWebAuthn; - -/// Converts attestation object to the public key on P256 curve -/// -/// \param attestationObject Attestation object retrieved from webuthn.get method -/// \return Public key. -TW_EXPORT_STATIC_METHOD -struct TWPublicKey *_Nullable TWWebAuthnGetPublicKey(TWData *_Nonnull attestationObject); - -/// Uses ASN parser to extract r and s values from a webauthn signature -/// -/// \param signature ASN encoded webauthn signature: https://www.w3.org/TR/webauthn-2/#sctn-signature-attestation-types -/// \return Concatenated r and s values. -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWWebAuthnGetRSValues(TWData *_Nonnull signature); - -/// Reconstructs the original message that was signed via P256 curve. Can be used for signature validation. -/// -/// \param authenticatorData Authenticator Data: https://www.w3.org/TR/webauthn-2/#authenticator-data -/// \param clientDataJSON clientDataJSON: https://www.w3.org/TR/webauthn-2/#dom-authenticatorresponse-clientdatajson -/// \return original messages. -TW_EXPORT_STATIC_METHOD -TWData *_Nonnull TWWebAuthnReconstructOriginalMessage(TWData* _Nonnull authenticatorData, TWData* _Nonnull clientDataJSON); -TW_EXTERN_C_END \ No newline at end of file diff --git a/Pods/TrustWalletCore/include/TrustWalletCore/TWZilliqaProto.h b/Pods/TrustWalletCore/include/TrustWalletCore/TWZilliqaProto.h deleted file mode 100644 index 0aa356e4..00000000 --- a/Pods/TrustWalletCore/include/TrustWalletCore/TWZilliqaProto.h +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © 2017-2020 Trust Wallet. -// -// This file is part of Trust. The full Trust copyright notice, including -// terms governing use, modification, and redistribution, is contained in the -// file LICENSE at the root of the source code distribution tree. -// -// This is a GENERATED FILE, changes made here WILL BE LOST. - -#pragma once - -#include "TWData.h" - -typedef TWData *_Nonnull TW_Zilliqa_Proto_Transaction; -typedef TWData *_Nonnull TW_Zilliqa_Proto_SigningInput; -typedef TWData *_Nonnull TW_Zilliqa_Proto_SigningOutput; diff --git a/README.md b/README.md index e37de9da..897f2a36 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Tokenary -Crypto wallet with Safari extension for iOS and macOS. +Crypto wallet with a Safari extension for iOS and macOS. Download on the [App Store](https://tokenary.io/get). @@ -7,10 +7,8 @@ Download on the [App Store](https://tokenary.io/get). Required: -- CocoaPods (`brew install cocoapods`) - Yarn (`brew install yarn`) Steps: -1. Run `pod install` -2. Run Xcode project +1. Run the Xcode project. diff --git a/Safari iOS/Resources/manifest.json b/Safari iOS/Resources/manifest.json index 2efbd3d0..cb67c577 100644 --- a/Safari iOS/Resources/manifest.json +++ b/Safari iOS/Resources/manifest.json @@ -4,7 +4,7 @@ "name": "__MSG_extension_name__", "description": "__MSG_extension_description__", - "version": "2.0.21", + "version": "2.0.22", "icons": { "48": "images/icon-48.png", diff --git a/Safari macOS/Resources/manifest.json b/Safari macOS/Resources/manifest.json index 115aa35a..22745d08 100644 --- a/Safari macOS/Resources/manifest.json +++ b/Safari macOS/Resources/manifest.json @@ -4,7 +4,7 @@ "name": "__MSG_extension_name__", "description": "__MSG_extension_description__", - "version": "2.0.21", + "version": "2.0.22", "icons": { "48": "images/icon-48.png", diff --git a/Shared/Ethereum/Nodes.swift b/Shared/Ethereum/Nodes.swift index dec50e0d..1730ab80 100644 --- a/Shared/Ethereum/Nodes.swift +++ b/Shared/Ethereum/Nodes.swift @@ -4,6 +4,8 @@ import Foundation struct Nodes { + private static var infuraKey = "" // TODO: get from CloudKit + static func getNode(chainId: Int) -> String? { if let domain = BundledNodes.dict[chainId] { let https = "https://" + domain diff --git a/Shared/Extension/BigInt.swift b/Shared/Extension/BigInt.swift index 766a6c46..57c0b6ef 100644 --- a/Shared/Extension/BigInt.swift +++ b/Shared/Extension/BigInt.swift @@ -1,5 +1,6 @@ // Copyright © 2023 Tokenary. All rights reserved. +import Foundation import BigInt extension BigInt { diff --git a/Tokenary.xcodeproj/project.pbxproj b/Tokenary.xcodeproj/project.pbxproj index eca790ec..3e4fc3fc 100644 --- a/Tokenary.xcodeproj/project.pbxproj +++ b/Tokenary.xcodeproj/project.pbxproj @@ -9,14 +9,13 @@ /* Begin PBXBuildFile section */ 0D059AD226C2796200EE3023 /* ApprovalSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D059AD126C2796200EE3023 /* ApprovalSubject.swift */; }; 0DC850E726B73A5900809E82 /* AuthenticationReason.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DC850E626B73A5900809E82 /* AuthenticationReason.swift */; }; - 25AF5CD700D21B45A06132C4 /* Pods_Tokenary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 862D3481284205F026A9B3D9 /* Pods_Tokenary.framework */; }; 2C03D1D2269B407900EF10EA /* NetworkMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C03D1D1269B407900EF10EA /* NetworkMonitor.swift */; }; 2C03D1D5269B428C00EF10EA /* Notification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C03D1D4269B428C00EF10EA /* Notification.swift */; }; 2C09CBA2273979C1009AD39B /* SafariWebExtensionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C09CBA1273979C1009AD39B /* SafariWebExtensionHandler.swift */; }; 2C09CBA9273979C1009AD39B /* manifest.json in Resources */ = {isa = PBXBuildFile; fileRef = 2C09CBA8273979C1009AD39B /* manifest.json */; }; 2C09CBAB273979C1009AD39B /* background.js in Resources */ = {isa = PBXBuildFile; fileRef = 2C09CBAA273979C1009AD39B /* background.js */; }; 2C09CBAD273979C1009AD39B /* content.js in Resources */ = {isa = PBXBuildFile; fileRef = 2C09CBAC273979C1009AD39B /* content.js */; }; - 2C09CBB9273979C1009AD39B /* Safari macOS.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 2C09CB9F273979C1009AD39B /* Safari macOS.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 2C09CBB9273979C1009AD39B /* Safari macOS.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 2C09CB9F273979C1009AD39B /* Safari macOS.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 2C09FC5F2828078C00DE9C27 /* AccountsHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2C09FC5D2828078C00DE9C27 /* AccountsHeaderView.xib */; }; 2C09FC602828078C00DE9C27 /* AccountsHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C09FC5E2828078C00DE9C27 /* AccountsHeaderView.swift */; }; 2C09FC662828331D00DE9C27 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C09FC652828331D00DE9C27 /* Image.swift */; }; @@ -113,6 +112,14 @@ 2C8A09E326757FC000993638 /* AccountCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C8A09E226757FC000993638 /* AccountCellView.swift */; }; 2C8A09EB2675964700993638 /* ApproveViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C8A09EA2675964700993638 /* ApproveViewController.swift */; }; 2C8A09EE2675965F00993638 /* WaitingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C8A09ED2675965F00993638 /* WaitingViewController.swift */; }; + 2C8BD3082AF53AC200DC9A7C /* SwiftProtobuf in Frameworks */ = {isa = PBXBuildFile; productRef = 2C8BD3072AF53AC200DC9A7C /* SwiftProtobuf */; }; + 2C8BD30A2AF53AC200DC9A7C /* WalletCore in Frameworks */ = {isa = PBXBuildFile; productRef = 2C8BD3092AF53AC200DC9A7C /* WalletCore */; }; + 2C8BD30D2AF53AD600DC9A7C /* SwiftProtobuf in Frameworks */ = {isa = PBXBuildFile; productRef = 2C8BD30C2AF53AD600DC9A7C /* SwiftProtobuf */; }; + 2C8BD30F2AF53AD600DC9A7C /* WalletCore in Frameworks */ = {isa = PBXBuildFile; productRef = 2C8BD30E2AF53AD600DC9A7C /* WalletCore */; }; + 2C8BD3122AF53AF600DC9A7C /* BigInt in Frameworks */ = {isa = PBXBuildFile; productRef = 2C8BD3112AF53AF600DC9A7C /* BigInt */; }; + 2C8BD3142AF53B0200DC9A7C /* BigInt in Frameworks */ = {isa = PBXBuildFile; productRef = 2C8BD3132AF53B0200DC9A7C /* BigInt */; }; + 2C8BD3172AF53B1800DC9A7C /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = 2C8BD3162AF53B1800DC9A7C /* Kingfisher */; }; + 2C8BD3192AF53B2100DC9A7C /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = 2C8BD3182AF53B2100DC9A7C /* Kingfisher */; }; 2C8E47A326A322E8007B8354 /* RightClickTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C8E47A226A322E8007B8354 /* RightClickTableView.swift */; }; 2C8E889F275F9967003EB8DB /* Storyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C8E889E275F9967003EB8DB /* Storyboard.swift */; }; 2C8E88A2275FA596003EB8DB /* ImportViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C8E88A1275FA596003EB8DB /* ImportViewController.swift */; }; @@ -162,16 +169,12 @@ 2CC8C5AD276A7EF80083FB1B /* EthereumNetwork.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C9F0B6726BDCB2E008FA3D6 /* EthereumNetwork.swift */; }; 2CC8C5B4276A96760083FB1B /* Haptic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CC8C5B3276A96760083FB1B /* Haptic.swift */; }; 2CCEB83727594E2A00768473 /* manifest.json in Resources */ = {isa = PBXBuildFile; fileRef = 2CCEB83627594E2A00768473 /* manifest.json */; }; - 2CCEB84527594E2A00768473 /* Safari iOS.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 2CCEB82D27594E2A00768473 /* Safari iOS.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 2CCEB84527594E2A00768473 /* Safari iOS.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 2CCEB82D27594E2A00768473 /* Safari iOS.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 2CD0669126B5537B00728C20 /* TokenaryWallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD0668B26B2142000728C20 /* TokenaryWallet.swift */; }; 2CD0669226B5537B00728C20 /* WalletsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD0668926B213E500728C20 /* WalletsManager.swift */; }; 2CD0B3F526A0DAA900488D92 /* NSPasteboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD0B3F426A0DAA900488D92 /* NSPasteboard.swift */; }; 2CD0B3F726AC619900488D92 /* AddAccountOptionCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD0B3F626AC619900488D92 /* AddAccountOptionCellView.swift */; }; 2CDAB3722675B3F0009F8B97 /* PasswordViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CDAB3712675B3F0009F8B97 /* PasswordViewController.swift */; }; - 2CDD86F82AE3295600F33F95 /* Secrets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CDD86F72AE3295600F33F95 /* Secrets.swift */; }; - 2CDD86F92AE3295600F33F95 /* Secrets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CDD86F72AE3295600F33F95 /* Secrets.swift */; }; - 2CDD86FA2AE3296600F33F95 /* Secrets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CDD86F72AE3295600F33F95 /* Secrets.swift */; }; - 2CDD86FB2AE3296700F33F95 /* Secrets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CDD86F72AE3295600F33F95 /* Secrets.swift */; }; 2CE059372763D60A0042D844 /* KeyboardObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CE059362763D60A0042D844 /* KeyboardObserver.swift */; }; 2CE059392763F3FF0042D844 /* CGFloat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CE059382763F3FF0042D844 /* CGFloat.swift */; }; 2CE0593F27640E300042D844 /* SafariWebExtensionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C09CBA1273979C1009AD39B /* SafariWebExtensionHandler.swift */; }; @@ -225,7 +228,6 @@ 2CF255BA275A749300AE54B9 /* ApproveViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF255B9275A749300AE54B9 /* ApproveViewController.swift */; }; 2CFAE56A28BE6292001D0799 /* NSImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CFAE56928BE6292001D0799 /* NSImage.swift */; }; 2CFDDF4E2765417E00F89019 /* ios-specific-content.js in Resources */ = {isa = PBXBuildFile; fileRef = 2CFDDF4D2765417D00F89019 /* ios-specific-content.js */; }; - 6A39E6D0371A2B20B780E539 /* Pods_Tokenary_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1BAC31076676F60524FD8CED /* Pods_Tokenary_iOS.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -246,26 +248,26 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - 2C09CBB8273979C1009AD39B /* Embed App Extensions */ = { + 2C09CBB8273979C1009AD39B /* Embed Foundation Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 13; files = ( - 2C09CBB9273979C1009AD39B /* Safari macOS.appex in Embed App Extensions */, + 2C09CBB9273979C1009AD39B /* Safari macOS.appex in Embed Foundation Extensions */, ); - name = "Embed App Extensions"; + name = "Embed Foundation Extensions"; runOnlyForDeploymentPostprocessing = 0; }; - 2CCEB84627594E2A00768473 /* Embed App Extensions */ = { + 2CCEB84627594E2A00768473 /* Embed Foundation Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 13; files = ( - 2CCEB84527594E2A00768473 /* Safari iOS.appex in Embed App Extensions */, + 2CCEB84527594E2A00768473 /* Safari iOS.appex in Embed Foundation Extensions */, ); - name = "Embed App Extensions"; + name = "Embed Foundation Extensions"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ @@ -273,8 +275,6 @@ /* Begin PBXFileReference section */ 0D059AD126C2796200EE3023 /* ApprovalSubject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApprovalSubject.swift; sourceTree = ""; }; 0DC850E626B73A5900809E82 /* AuthenticationReason.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationReason.swift; sourceTree = ""; }; - 1BAC31076676F60524FD8CED /* Pods_Tokenary_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Tokenary_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1F6E6CD590A375230CCA0D15 /* Pods-Tokenary iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tokenary iOS.release.xcconfig"; path = "Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS.release.xcconfig"; sourceTree = ""; }; 2C03D1D1269B407900EF10EA /* NetworkMonitor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkMonitor.swift; sourceTree = ""; }; 2C03D1D4269B428C00EF10EA /* Notification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notification.swift; sourceTree = ""; }; 2C09CB9F273979C1009AD39B /* Safari macOS.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Safari macOS.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -405,7 +405,6 @@ 2CD0B3F426A0DAA900488D92 /* NSPasteboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSPasteboard.swift; sourceTree = ""; }; 2CD0B3F626AC619900488D92 /* AddAccountOptionCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountOptionCellView.swift; sourceTree = ""; }; 2CDAB3712675B3F0009F8B97 /* PasswordViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PasswordViewController.swift; sourceTree = ""; }; - 2CDD86F72AE3295600F33F95 /* Secrets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Secrets.swift; sourceTree = ""; }; 2CE059362763D60A0042D844 /* KeyboardObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardObserver.swift; sourceTree = ""; }; 2CE059382763F3FF0042D844 /* CGFloat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGFloat.swift; sourceTree = ""; }; 2CE059482764169E0042D844 /* Tokenary iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Tokenary iOS.entitlements"; sourceTree = ""; }; @@ -419,16 +418,13 @@ 2CED86B92AF1820E006F9E26 /* Nodes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Nodes.swift; sourceTree = ""; }; 2CED86BE2AF25C32006F9E26 /* Networks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Networks.swift; sourceTree = ""; }; 2CEFEB15274D5DC900CE23BD /* inpage.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = inpage.js; sourceTree = ""; }; + 2CF16E522AF523A40098F996 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = SOURCE_ROOT; }; 2CF255B3275A744000AE54B9 /* PasswordViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PasswordViewController.swift; sourceTree = ""; }; 2CF255B5275A746000AE54B9 /* AccountsListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsListViewController.swift; sourceTree = ""; }; 2CF255B7275A748300AE54B9 /* ApproveTransactionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApproveTransactionViewController.swift; sourceTree = ""; }; 2CF255B9275A749300AE54B9 /* ApproveViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApproveViewController.swift; sourceTree = ""; }; 2CFAE56928BE6292001D0799 /* NSImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSImage.swift; sourceTree = ""; }; 2CFDDF4D2765417D00F89019 /* ios-specific-content.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "ios-specific-content.js"; sourceTree = ""; }; - 5C3FA792039425643D3C9E7E /* Pods-Tokenary iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tokenary iOS.debug.xcconfig"; path = "Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS.debug.xcconfig"; sourceTree = ""; }; - 862D3481284205F026A9B3D9 /* Pods_Tokenary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Tokenary.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - AFECC25CED3336886E0EDE5D /* Pods-Tokenary.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tokenary.debug.xcconfig"; path = "Target Support Files/Pods-Tokenary/Pods-Tokenary.debug.xcconfig"; sourceTree = ""; }; - EB2412E527E2BE22586C1E2C /* Pods-Tokenary.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tokenary.release.xcconfig"; path = "Target Support Files/Pods-Tokenary/Pods-Tokenary.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -443,7 +439,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 25AF5CD700D21B45A06132C4 /* Pods_Tokenary.framework in Frameworks */, + 2C8BD3172AF53B1800DC9A7C /* Kingfisher in Frameworks */, + 2C8BD3122AF53AF600DC9A7C /* BigInt in Frameworks */, + 2C8BD30A2AF53AC200DC9A7C /* WalletCore in Frameworks */, + 2C8BD3082AF53AC200DC9A7C /* SwiftProtobuf in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -451,7 +450,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 6A39E6D0371A2B20B780E539 /* Pods_Tokenary_iOS.framework in Frameworks */, + 2C8BD3192AF53B2100DC9A7C /* Kingfisher in Frameworks */, + 2C8BD3142AF53B0200DC9A7C /* BigInt in Frameworks */, + 2C8BD30F2AF53AD600DC9A7C /* WalletCore in Frameworks */, + 2C8BD30D2AF53AD600DC9A7C /* SwiftProtobuf in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -480,15 +482,6 @@ path = Models; sourceTree = ""; }; - 2A0AFDB57F9F3812D0EDB9C5 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 862D3481284205F026A9B3D9 /* Pods_Tokenary.framework */, - 1BAC31076676F60524FD8CED /* Pods_Tokenary_iOS.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 2C09CBA0273979C1009AD39B /* Safari macOS */ = { isa = PBXGroup; children = ( @@ -519,8 +512,7 @@ 2CCEB82E27594E2A00768473 /* Safari iOS */, 2CED86A32AF00BC9006F9E26 /* tools */, 2C19953D2674C4B900A8E370 /* Products */, - FB5786212D81829B0FADBD25 /* Pods */, - 2A0AFDB57F9F3812D0EDB9C5 /* Frameworks */, + 2C8BD30B2AF53AD600DC9A7C /* Frameworks */, ); sourceTree = ""; }; @@ -699,6 +691,13 @@ path = Views; sourceTree = ""; }; + 2C8BD30B2AF53AD600DC9A7C /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; 2C8E88A0275F99D4003EB8DB /* Content */ = { isa = PBXGroup; children = ( @@ -793,7 +792,6 @@ isa = PBXGroup; children = ( 2C901C492689F01700D0926A /* Strings.swift */, - 2CDD86F72AE3295600F33F95 /* Secrets.swift */, 2C528A15267FA8EB00CA3ADD /* Defaults.swift */, 2C8A09C2267513A700993638 /* Ethereum */, 2CF255A4275A483600AE54B9 /* Services */, @@ -937,6 +935,7 @@ isa = PBXGroup; children = ( 2C4E26BD27564EB000265DCC /* README.md */, + 2CF16E522AF523A40098F996 /* .gitignore */, 2C4768AD2826ECE5005E8D4D /* SharedAssets.xcassets */, ); path = "Supporting Files"; @@ -953,17 +952,6 @@ path = Screens; sourceTree = ""; }; - FB5786212D81829B0FADBD25 /* Pods */ = { - isa = PBXGroup; - children = ( - AFECC25CED3336886E0EDE5D /* Pods-Tokenary.debug.xcconfig */, - EB2412E527E2BE22586C1E2C /* Pods-Tokenary.release.xcconfig */, - 5C3FA792039425643D3C9E7E /* Pods-Tokenary iOS.debug.xcconfig */, - 1F6E6CD590A375230CCA0D15 /* Pods-Tokenary iOS.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -989,12 +977,10 @@ isa = PBXNativeTarget; buildConfigurationList = 2C19954C2674C4BA00A8E370 /* Build configuration list for PBXNativeTarget "Tokenary" */; buildPhases = ( - 7C98876E639B0D8FCBE94A98 /* [CP] Check Pods Manifest.lock */, 2C1995382674C4B900A8E370 /* Sources */, 2C1995392674C4B900A8E370 /* Frameworks */, 2C19953A2674C4B900A8E370 /* Resources */, - 2C09CBB8273979C1009AD39B /* Embed App Extensions */, - EAF105B6A41DA64B22A6E58E /* [CP] Embed Pods Frameworks */, + 2C09CBB8273979C1009AD39B /* Embed Foundation Extensions */, ); buildRules = ( ); @@ -1002,6 +988,12 @@ 2C09CBB7273979C1009AD39B /* PBXTargetDependency */, ); name = Tokenary; + packageProductDependencies = ( + 2C8BD3072AF53AC200DC9A7C /* SwiftProtobuf */, + 2C8BD3092AF53AC200DC9A7C /* WalletCore */, + 2C8BD3112AF53AF600DC9A7C /* BigInt */, + 2C8BD3162AF53B1800DC9A7C /* Kingfisher */, + ); productName = "Ecrypted Ink"; productReference = 2C19953C2674C4B900A8E370 /* Tokenary.app */; productType = "com.apple.product-type.application"; @@ -1010,12 +1002,10 @@ isa = PBXNativeTarget; buildConfigurationList = 2C5FF98026C84F7C00B32ACC /* Build configuration list for PBXNativeTarget "Tokenary iOS" */; buildPhases = ( - F632D1D214E4F6BD43481F28 /* [CP] Check Pods Manifest.lock */, 2C5FF96B26C84F7B00B32ACC /* Sources */, 2C5FF96C26C84F7B00B32ACC /* Frameworks */, 2C5FF96D26C84F7B00B32ACC /* Resources */, - 2CCEB84627594E2A00768473 /* Embed App Extensions */, - 531D279F638FC010BDFF3AB3 /* [CP] Embed Pods Frameworks */, + 2CCEB84627594E2A00768473 /* Embed Foundation Extensions */, ); buildRules = ( ); @@ -1023,6 +1013,12 @@ 2CCEB84427594E2A00768473 /* PBXTargetDependency */, ); name = "Tokenary iOS"; + packageProductDependencies = ( + 2C8BD30C2AF53AD600DC9A7C /* SwiftProtobuf */, + 2C8BD30E2AF53AD600DC9A7C /* WalletCore */, + 2C8BD3132AF53B0200DC9A7C /* BigInt */, + 2C8BD3182AF53B2100DC9A7C /* Kingfisher */, + ); productName = "Encrypted Ink iOS"; productReference = 2C5FF96F26C84F7B00B32ACC /* Tokenary iOS.app */; productType = "com.apple.product-type.application"; @@ -1067,8 +1063,9 @@ 2C1995342674C4B900A8E370 /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 1500; - LastUpgradeCheck = 1240; + LastUpgradeCheck = 1500; TargetAttributes = { 2C09CB9E273979C1009AD39B = { CreatedOnToolsVersion = 13.0; @@ -1096,6 +1093,11 @@ Base, ); mainGroup = 2C1995332674C4B900A8E370; + packageReferences = ( + 2C8BD3062AF53AC200DC9A7C /* XCRemoteSwiftPackageReference "wallet-core" */, + 2C8BD3102AF53AF600DC9A7C /* XCRemoteSwiftPackageReference "BigInt" */, + 2C8BD3152AF53B1800DC9A7C /* XCRemoteSwiftPackageReference "Kingfisher" */, + ); productRefGroup = 2C19953D2674C4B900A8E370 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -1213,84 +1215,6 @@ shellPath = /bin/sh; shellScript = "if [ \"${CONFIGURATION}\" = \"Debug\" ]; then\n FILE=/usr/lib/bin/yarn\n if [ -f \"$FILE\" ]; then\n export PATH=/usr/lib/bin:$PATH\n else\n export PATH=/opt/homebrew/bin:$PATH\n fi\n\n cd \"$PROJECT_DIR\"/Safari\\ Shared/web3-provider\n yarn run prebuild\n yarn run build\nfi\n"; }; - 531D279F638FC010BDFF3AB3 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Tokenary iOS/Pods-Tokenary iOS-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 7C98876E639B0D8FCBE94A98 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Tokenary-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - EAF105B6A41DA64B22A6E58E /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Tokenary/Pods-Tokenary-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - F632D1D214E4F6BD43481F28 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Tokenary iOS-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -1298,7 +1222,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2CDD86FA2AE3296600F33F95 /* Secrets.swift in Sources */, 2CF255B2275A4A7200AE54B9 /* UserDefaults.swift in Sources */, 2C264BD227B2F30C00234393 /* UnknownSafariRequest.swift in Sources */, 2C264BD727B5806200234393 /* InpageProvider.swift in Sources */, @@ -1327,7 +1250,6 @@ 2C901C4A2689F01700D0926A /* Strings.swift in Sources */, 2C2AA1D228AD1DC100E35DBF /* SpecificWalletAccount.swift in Sources */, 2C6706A5267A6BFE006AAEF2 /* Bundle.swift in Sources */, - 2CDD86F82AE3295600F33F95 /* Secrets.swift in Sources */, 2CC0CDBE2692027E0072922A /* PriceService.swift in Sources */, 2C8A09C6267513FC00993638 /* Agent.swift in Sources */, 2C8A09D42675184700993638 /* Window.swift in Sources */, @@ -1454,7 +1376,6 @@ 2CE0594427640EB40042D844 /* ExtensionBridge.swift in Sources */, 2CF255B1275A4A1800AE54B9 /* ResponseToExtension.swift in Sources */, 2C09FC602828078C00DE9C27 /* AccountsHeaderView.swift in Sources */, - 2CDD86F92AE3295600F33F95 /* Secrets.swift in Sources */, 2CF2559B275A46E700AE54B9 /* AuthenticationReason.swift in Sources */, 2C6F6D5E2827434800D6E8FB /* CoinDerivationTableViewCell.swift in Sources */, 2C96D3A92763D13400687301 /* DataStateView.swift in Sources */, @@ -1478,7 +1399,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2CDD86FB2AE3296700F33F95 /* Secrets.swift in Sources */, 2CE0594627640F470042D844 /* UserDefaults.swift in Sources */, 2C264BD327B2F30C00234393 /* UnknownSafariRequest.swift in Sources */, 2C264BD827B5806200234393 /* InpageProvider.swift in Sources */, @@ -1559,7 +1479,8 @@ CODE_SIGN_ENTITLEMENTS = "Safari macOS/Safari.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 73; + CURRENT_PROJECT_VERSION = 75; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = XWNXDSM6BU; ENABLE_HARDENED_RUNTIME = YES; GENERATE_INFOPLIST_FILE = YES; @@ -1572,7 +1493,7 @@ "@executable_path/../../../../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.4; - MARKETING_VERSION = 2.0.21; + MARKETING_VERSION = 2.0.22; OTHER_LDFLAGS = ( "-framework", SafariServices, @@ -1593,7 +1514,8 @@ CODE_SIGN_ENTITLEMENTS = "Safari macOS/Safari.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 73; + CURRENT_PROJECT_VERSION = 75; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = XWNXDSM6BU; ENABLE_HARDENED_RUNTIME = YES; GENERATE_INFOPLIST_FILE = YES; @@ -1606,7 +1528,7 @@ "@executable_path/../../../../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.4; - MARKETING_VERSION = 2.0.21; + MARKETING_VERSION = 2.0.22; OTHER_LDFLAGS = ( "-framework", SafariServices, @@ -1654,6 +1576,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -1715,6 +1638,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -1737,7 +1661,6 @@ }; 2C19954D2674C4BA00A8E370 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AFECC25CED3336886E0EDE5D /* Pods-Tokenary.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; @@ -1746,7 +1669,8 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 73; + CURRENT_PROJECT_VERSION = 75; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = XWNXDSM6BU; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = "$(SRCROOT)/Tokenary macOS/Supporting Files/Info.plist"; @@ -1755,7 +1679,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.4; - MARKETING_VERSION = 2.0.21; + MARKETING_VERSION = 2.0.22; PRODUCT_BUNDLE_IDENTIFIER = mac.tokenary.io; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1765,7 +1689,6 @@ }; 2C19954E2674C4BA00A8E370 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EB2412E527E2BE22586C1E2C /* Pods-Tokenary.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; @@ -1774,7 +1697,8 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 73; + CURRENT_PROJECT_VERSION = 75; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = XWNXDSM6BU; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = "$(SRCROOT)/Tokenary macOS/Supporting Files/Info.plist"; @@ -1783,7 +1707,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.4; - MARKETING_VERSION = 2.0.21; + MARKETING_VERSION = 2.0.22; PRODUCT_BUNDLE_IDENTIFIER = mac.tokenary.io; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1793,14 +1717,13 @@ }; 2C5FF98126C84F7C00B32ACC /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5C3FA792039425643D3C9E7E /* Pods-Tokenary iOS.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = "Tokenary iOS/Tokenary iOS.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 73; + CURRENT_PROJECT_VERSION = 75; DEVELOPMENT_TEAM = XWNXDSM6BU; INFOPLIST_FILE = "Tokenary iOS/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -1808,7 +1731,8 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.0.21; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; + MARKETING_VERSION = 2.0.22; PRODUCT_BUNDLE_IDENTIFIER = mac.tokenary.io; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -1822,14 +1746,13 @@ }; 2C5FF98226C84F7C00B32ACC /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1F6E6CD590A375230CCA0D15 /* Pods-Tokenary iOS.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = "Tokenary iOS/Tokenary iOS.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 73; + CURRENT_PROJECT_VERSION = 75; DEVELOPMENT_TEAM = XWNXDSM6BU; INFOPLIST_FILE = "Tokenary iOS/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -1837,7 +1760,8 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.0.21; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; + MARKETING_VERSION = 2.0.22; PRODUCT_BUNDLE_IDENTIFIER = mac.tokenary.io; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -1856,7 +1780,7 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CODE_SIGN_ENTITLEMENTS = "Safari iOS/Safari iOS.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 73; + CURRENT_PROJECT_VERSION = 75; DEVELOPMENT_TEAM = XWNXDSM6BU; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "Safari iOS/Info.plist"; @@ -1868,7 +1792,8 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 2.0.21; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; + MARKETING_VERSION = 2.0.22; OTHER_LDFLAGS = ( "-framework", SafariServices, @@ -1890,7 +1815,7 @@ CODE_SIGN_ENTITLEMENTS = "Safari iOS/Safari iOS.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 73; + CURRENT_PROJECT_VERSION = 75; DEVELOPMENT_TEAM = XWNXDSM6BU; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "Safari iOS/Info.plist"; @@ -1902,7 +1827,8 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 2.0.21; + MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; + MARKETING_VERSION = 2.0.22; OTHER_LDFLAGS = ( "-framework", SafariServices, @@ -1925,6 +1851,7 @@ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CODE_SIGN_STYLE = Automatic; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = XWNXDSM6BU; ENABLE_HARDENED_RUNTIME = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -1943,6 +1870,7 @@ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CODE_SIGN_STYLE = Automatic; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = XWNXDSM6BU; ENABLE_HARDENED_RUNTIME = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -2012,6 +1940,76 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 2C8BD3062AF53AC200DC9A7C /* XCRemoteSwiftPackageReference "wallet-core" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/trustwallet/wallet-core"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 4.0.4; + }; + }; + 2C8BD3102AF53AF600DC9A7C /* XCRemoteSwiftPackageReference "BigInt" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/attaswift/BigInt"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.1.0; + }; + }; + 2C8BD3152AF53B1800DC9A7C /* XCRemoteSwiftPackageReference "Kingfisher" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/onevcat/Kingfisher"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 7.10.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 2C8BD3072AF53AC200DC9A7C /* SwiftProtobuf */ = { + isa = XCSwiftPackageProductDependency; + package = 2C8BD3062AF53AC200DC9A7C /* XCRemoteSwiftPackageReference "wallet-core" */; + productName = SwiftProtobuf; + }; + 2C8BD3092AF53AC200DC9A7C /* WalletCore */ = { + isa = XCSwiftPackageProductDependency; + package = 2C8BD3062AF53AC200DC9A7C /* XCRemoteSwiftPackageReference "wallet-core" */; + productName = WalletCore; + }; + 2C8BD30C2AF53AD600DC9A7C /* SwiftProtobuf */ = { + isa = XCSwiftPackageProductDependency; + package = 2C8BD3062AF53AC200DC9A7C /* XCRemoteSwiftPackageReference "wallet-core" */; + productName = SwiftProtobuf; + }; + 2C8BD30E2AF53AD600DC9A7C /* WalletCore */ = { + isa = XCSwiftPackageProductDependency; + package = 2C8BD3062AF53AC200DC9A7C /* XCRemoteSwiftPackageReference "wallet-core" */; + productName = WalletCore; + }; + 2C8BD3112AF53AF600DC9A7C /* BigInt */ = { + isa = XCSwiftPackageProductDependency; + package = 2C8BD3102AF53AF600DC9A7C /* XCRemoteSwiftPackageReference "BigInt" */; + productName = BigInt; + }; + 2C8BD3132AF53B0200DC9A7C /* BigInt */ = { + isa = XCSwiftPackageProductDependency; + package = 2C8BD3102AF53AF600DC9A7C /* XCRemoteSwiftPackageReference "BigInt" */; + productName = BigInt; + }; + 2C8BD3162AF53B1800DC9A7C /* Kingfisher */ = { + isa = XCSwiftPackageProductDependency; + package = 2C8BD3152AF53B1800DC9A7C /* XCRemoteSwiftPackageReference "Kingfisher" */; + productName = Kingfisher; + }; + 2C8BD3182AF53B2100DC9A7C /* Kingfisher */ = { + isa = XCSwiftPackageProductDependency; + package = 2C8BD3152AF53B1800DC9A7C /* XCRemoteSwiftPackageReference "Kingfisher" */; + productName = Kingfisher; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 2C1995342674C4B900A8E370 /* Project object */; } diff --git a/Tokenary.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Tokenary.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..e52796b3 --- /dev/null +++ b/Tokenary.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,32 @@ +{ + "pins" : [ + { + "identity" : "bigint", + "kind" : "remoteSourceControl", + "location" : "https://github.com/attaswift/BigInt", + "state" : { + "revision" : "0ed110f7555c34ff468e72e1686e59721f2b0da6", + "version" : "5.3.0" + } + }, + { + "identity" : "kingfisher", + "kind" : "remoteSourceControl", + "location" : "https://github.com/onevcat/Kingfisher", + "state" : { + "revision" : "277f1ab2c6664b19b4a412e32b094b201e2d5757", + "version" : "7.10.0" + } + }, + { + "identity" : "wallet-core", + "kind" : "remoteSourceControl", + "location" : "https://github.com/trustwallet/wallet-core", + "state" : { + "revision" : "1382e3c8ac6d8e956e25c0475039f6c3988f9355", + "version" : "4.0.4" + } + } + ], + "version" : 2 +} diff --git a/Tokenary.xcodeproj/xcshareddata/xcschemes/Tokenary.xcscheme b/Tokenary.xcodeproj/xcshareddata/xcschemes/Tokenary.xcscheme index 44ed5ed9..07c41f49 100644 --- a/Tokenary.xcodeproj/xcshareddata/xcschemes/Tokenary.xcscheme +++ b/Tokenary.xcodeproj/xcshareddata/xcschemes/Tokenary.xcscheme @@ -1,6 +1,6 @@ - - - - - - diff --git a/Tokenary.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Tokenary.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/Tokenary.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - -